:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --text: #11231d;
  --muted: #62736c;
  --line: #d9e3de;
  --accent: #0f7b56;
  --accent-dark: #07583d;
  --gold: #f4c247;
  --danger: #a53b32;
  --blue: #1769aa;
  --shadow: 0 18px 50px rgba(10, 42, 30, 0.12);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(15, 123, 86, 0.08) 0, transparent 220px),
    linear-gradient(180deg, #f9fbfa 0%, var(--bg) 100%);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.protecting {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

img {
  -webkit-user-drag: none;
}

.app-shell {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 12px 10px 34px;
}

.banner-slot {
  overflow: hidden;
  margin-bottom: 8px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(10, 42, 30, 0.14);
}

.banner-slot img {
  display: block;
  width: 100%;
  height: auto;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 11px;
}

h1,
h2 {
  margin: 0;
  line-height: 1.04;
  letter-spacing: 0;
}

h1 {
  max-width: 380px;
  font-size: 32px;
}

h2 {
  font-size: 24px;
}

.status-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(15, 123, 86, 0.24);
  background: linear-gradient(180deg, #effaf3, #e5f5ed);
  color: var(--accent-dark);
  font-weight: 800;
  border-radius: 999px;
  padding: 8px 12px;
  box-shadow: 0 8px 20px rgba(15, 123, 86, 0.08);
}

.countdown-strip {
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 48px;
  margin-bottom: 10px;
  border: 1px solid rgba(15, 123, 86, 0.18);
  border-radius: 8px;
  padding: 7px 10px;
  background: #0f7b56;
  color: #fff;
  text-align: center;
}

.countdown-strip span {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.countdown-strip strong {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 14px;
}

.form-panel {
  position: relative;
  overflow: hidden;
}

.form-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--blue));
}

.hidden {
  display: none !important;
}

form {
  display: grid;
  gap: 14px;
}

.upload-box {
  position: relative;
  min-height: 230px;
  border: 1px dashed #8fb2a3;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(242, 251, 246, 0.92)),
    #f7faf8;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.upload-box:hover,
.upload-box:focus-within {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(15, 123, 86, 0.08), 0 12px 26px rgba(15, 123, 86, 0.12);
  transform: translateY(-1px);
}

.upload-box input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-title {
  display: block;
  font-size: 20px;
  font-weight: 800;
}

.upload-subtitle {
  display: block;
  color: var(--muted);
}

#upload-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.upload-box.has-image #upload-preview {
  display: block;
}

.upload-box.has-image .upload-title,
.upload-box.has-image .upload-subtitle {
  position: relative;
  z-index: 1;
  color: white;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-group-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.form-group-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(15, 123, 86, 0.24);
}

.form-group-heading.optional-heading {
  color: var(--muted);
}

.form-group-heading.optional-heading::after {
  background: var(--line);
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 123, 86, 0.12);
  outline: 0;
}

select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--accent-dark) 50%) calc(100% - 17px) 20px / 6px 6px no-repeat,
    linear-gradient(135deg, var(--accent-dark) 50%, transparent 50%) calc(100% - 12px) 20px / 6px 6px no-repeat,
    #fff;
  padding-right: 30px;
}

.date-parts {
  display: grid;
  grid-template-columns: 0.72fr 0.72fr 1fr;
  gap: 6px;
}

#team-other {
  margin-top: 2px;
}

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfdfc;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

details .field-grid {
  margin-top: 10px;
}

button,
.download-link,
.print-link {
  position: relative;
  overflow: hidden;
  min-height: 50px;
  border: 0;
  border-radius: 7px;
  padding: 0 16px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.primary-button {
  background: var(--accent);
  color: white;
}

.generate-button {
  min-height: 56px;
  background: linear-gradient(135deg, #07583d 0%, #0f7b56 55%, #16a36f 100%);
  box-shadow: 0 14px 28px rgba(15, 123, 86, 0.24);
  white-space: normal;
  text-align: center;
}

.generate-button::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  pointer-events: none;
}

.generate-button:active {
  transform: scale(0.99);
}

.pay-button {
  min-height: 58px;
  background: linear-gradient(135deg, #07583d 0%, #0f7b56 55%, #16a36f 100%);
  box-shadow: 0 14px 30px rgba(15, 123, 86, 0.3), 0 0 0 0 rgba(244, 194, 71, 0.52);
  isolation: isolate;
  transform: translateZ(0);
  animation: pay-pulse 1.8s ease-in-out infinite;
}

.pay-button::before {
  content: "";
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: -55%;
  width: 42%;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.52), transparent);
  transform: rotate(18deg);
  animation: pay-shine 2.4s ease-in-out infinite;
}

.pay-button::after {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: -2;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.pay-button span {
  position: relative;
  z-index: 1;
}

.pay-button:active {
  transform: scale(0.98);
}

.pay-button:disabled {
  animation: none;
  box-shadow: none;
}

.secondary-button {
  background: #e9efec;
  color: var(--text);
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
}

.form-status.error {
  color: var(--danger);
}

.generation-loader {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(15, 123, 86, 0.18);
  border-radius: 8px;
  padding: 12px;
  background: #f2fbf6;
}

.loader-copy,
.loader-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.loader-copy span {
  color: var(--text);
  font-weight: 800;
}

.loader-copy strong {
  color: var(--accent-dark);
  font-size: 13px;
}

.loader-track {
  position: relative;
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #dce9e3;
}

.loader-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f7b56, #22b47b, #f4c247);
  transition: width 0.55s ease;
}

.loader-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: loader-shine 1.25s linear infinite;
}

.loader-steps span {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.loader-steps span.active {
  color: var(--accent-dark);
}

.result-panel {
  display: grid;
  gap: 12px;
}

.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.locked-preview {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #030504;
  aspect-ratio: 2 / 3;
}

.preview-shadow,
.preview-reveal {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.preview-shadow {
  z-index: 0;
  opacity: 0.18;
  filter: blur(8px) saturate(0.75);
  transform: scale(1.03);
}

.preview-reveal {
  z-index: 2;
  opacity: 0.98;
  filter: none;
  animation: preview-scan 5.2s ease-in-out infinite alternate;
  clip-path: inset(8% 0 70% 0 round 6px);
}

.locked-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.82);
  pointer-events: none;
}

.locked-preview::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 8%;
  height: 22%;
  z-index: 3;
  border-top: 1px solid rgba(255, 255, 255, 0.48);
  border-bottom: 1px solid rgba(255, 255, 255, 0.48);
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.2);
  pointer-events: none;
  animation: preview-window 5.2s ease-in-out infinite alternate;
}

.lock-layer {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 0 0 26px;
  z-index: 4;
  pointer-events: none;
}

.lock-icon {
  background: rgba(17, 35, 29, 0.88);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

@keyframes preview-scan {
  0% {
    clip-path: inset(8% 0 70% 0 round 6px);
  }

  100% {
    clip-path: inset(70% 0 8% 0 round 6px);
  }
}

@keyframes preview-window {
  0% {
    top: 8%;
  }

  100% {
    top: 70%;
  }
}

@keyframes pay-pulse {
  0%,
  100% {
    box-shadow: 0 14px 30px rgba(15, 123, 86, 0.3), 0 0 0 0 rgba(244, 194, 71, 0.5);
  }

  50% {
    box-shadow: 0 18px 38px rgba(15, 123, 86, 0.42), 0 0 0 9px rgba(244, 194, 71, 0);
  }
}

@keyframes pay-shine {
  0% {
    left: -55%;
  }

  48%,
  100% {
    left: 120%;
  }
}

@keyframes loader-shine {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.action-stack {
  display: grid;
  gap: 10px;
}

.initial-choice-actions {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.bundle-offer-button {
  border-color: rgba(244, 194, 71, 0.7);
  background: #fff8df;
  color: #153323;
  box-shadow: 0 10px 24px rgba(244, 194, 71, 0.18);
}

.bundle-super-button {
  min-height: 58px;
  background: linear-gradient(135deg, #07583d 0%, #0f7b56 55%, #16a36f 100%);
  color: #fff;
  box-shadow: 0 16px 34px rgba(15, 123, 86, 0.28), 0 0 0 0 rgba(15, 123, 86, 0.42);
  text-align: center;
  white-space: normal;
  animation: pay-pulse 1.55s ease-in-out infinite;
}

.bundle-super-button::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 5px;
  pointer-events: none;
}

.bundle-builder,
.bundle-results,
.bundle-delivery {
  margin-top: 10px;
}

.bundle-extra-list,
.bundle-preview-grid,
.bundle-final-grid {
  display: grid;
  gap: 10px;
}

.bundle-builder .loader-copy {
  align-items: flex-start;
}

.bundle-builder .loader-copy span {
  max-width: 78%;
  line-height: 1.25;
}

.bundle-extra-card,
.bundle-preview-card,
.bundle-final-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.96);
}

.bundle-extra-card h2,
.bundle-preview-card h3,
.bundle-final-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.1;
}

.bundle-extra-card .upload-preview {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bundle-extra-card .upload-box.has-image .upload-preview {
  display: block;
}

.bundle-extra-card .upload-box.has-image .upload-title,
.bundle-extra-card .upload-box.has-image .upload-subtitle {
  position: relative;
  z-index: 1;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
}

.bundle-preview-grid,
.bundle-final-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 10px;
}

.bundle-preview-card .locked-preview {
  min-height: 220px;
}

.bundle-final-card img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f5faf7;
}

.bundle-final-card .secondary-button {
  min-height: 42px;
  font-size: 13px;
}

.issue-button {
  width: 100%;
  border: 0;
  margin-top: 8px;
  padding: 6px 8px;
  background: transparent;
  color: #a53b32;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.issue-button.reported {
  color: var(--muted);
  text-decoration: none;
  cursor: default;
}

.inline-upsell {
  display: grid;
  gap: 7px;
  border: 1px solid rgba(244, 194, 71, 0.65);
  border-radius: 8px;
  padding: 10px;
  background: #fff8df;
}

.inline-upsell span {
  color: #153323;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.inline-upsell .secondary-button {
  min-height: 46px;
  justify-content: space-between;
}

.inline-upsell strong {
  font-variant-numeric: tabular-nums;
}

.screen-guard {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 99;
  background: rgba(7, 31, 23, 0.94);
  color: white;
  font-size: 22px;
  font-weight: 900;
}

body.guard-visible .screen-guard {
  display: grid;
}

body.modal-open {
  overflow: hidden;
}

.review-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(7, 31, 23, 0.68);
  backdrop-filter: blur(8px);
}

.upsell-modal,
.issue-modal,
.exit-offer-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(7, 31, 23, 0.72);
  backdrop-filter: blur(8px);
}

.review-card,
.choice-card,
.upsell-card,
.exit-offer-card {
  width: min(100%, 430px);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  padding: 18px;
}

.review-card h2,
.choice-card h2,
.upsell-card h2,
.exit-offer-card h2 {
  margin-bottom: 10px;
}

.review-card p:not(.eyebrow),
.choice-card p:not(.eyebrow),
.upsell-card p:not(.eyebrow),
.exit-offer-card p:not(.eyebrow) {
  margin: 0 0 16px;
  color: var(--muted);
}

.review-card .primary-button,
.choice-card .primary-button,
.choice-card .secondary-button,
.upsell-card .primary-button,
.upsell-card .secondary-button,
.exit-offer-card .primary-button,
.exit-offer-card .secondary-button {
  width: 100%;
}

.choice-card {
  border-top: 5px solid #d9362b;
}

.choice-emoji {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: #fff1cc;
  font-size: 26px;
}

.choice-card .bundle-super-button {
  margin-bottom: 10px;
}

.upsell-card {
  border-top: 5px solid var(--gold);
}

.exit-offer-card {
  border-top: 5px solid #d9362b;
}

#exit-offer-intro,
.coupon-options,
.issue-modal .choice-card {
  display: grid;
  gap: 10px;
}

.coupon-main-button {
  min-height: 58px;
  background: linear-gradient(135deg, #07583d, #16a36f);
  box-shadow: 0 14px 30px rgba(15, 123, 86, 0.24);
}

.upsell-button {
  min-height: 62px;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #07583d, #16a36f);
  box-shadow: 0 16px 34px rgba(15, 123, 86, 0.28);
}

.upsell-button strong {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.18);
  font-variant-numeric: tabular-nums;
}

@media print {
  body > *:not(.screen-guard) {
    display: none !important;
  }

  .screen-guard {
    display: grid !important;
    position: static;
    min-height: 100vh;
    background: #071f17;
  }
}

@media (max-width: 430px) {
  .app-shell {
    padding: 12px 10px 28px;
  }

  .countdown-strip {
    align-items: center;
    flex-direction: row;
    gap: 8px;
  }

  h1 {
    font-size: 29px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .date-parts {
    grid-template-columns: 1fr 1fr 1.15fr;
  }

  .banner-slot {
    margin-inline: -2px;
  }
}
