:root {
  --survey-bg: #f8fafc;
  --survey-surface: #ffffff;
  --survey-text: #0f172a;
  --survey-muted: #64748b;
  --survey-border: #e2e8f0;
  --survey-accent: #f97316;
  --survey-accent-dark: #ea580c;
  --survey-accent-soft: #fff0e6;
  --survey-radius: 16px;
  --survey-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

.survey-page {
  background: radial-gradient(circle at top right, #e0f2fe 0%, #f8fafc 34%, #f8fafc 100%);
  color: var(--survey-text);
}

.survey-main {
  padding: 1rem 0 2.5rem;
}

.survey-hero {
  background: var(--survey-surface);
  border: 1px solid var(--survey-border);
  border-radius: calc(var(--survey-radius) + 4px);
  box-shadow: var(--survey-shadow);
  padding: 1rem;
}

.survey-kicker {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9a3412;
  background: var(--survey-accent-soft);
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
}

.survey-kicker::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--survey-accent);
}

.survey-hero h1 {
  margin: 0.85rem 0 0;
  font-size: clamp(1.75rem, 6.4vw, 2.45rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.survey-subheadline {
  margin: 0.8rem 0 0;
  color: var(--survey-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.survey-trust {
  margin: 0.85rem 0 0;
  font-weight: 700;
  font-size: 0.92rem;
  color: #334155;
}

.survey-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  min-height: 48px;
  padding: 0.72rem 1.1rem;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.survey-btn:focus-visible,
.option-card:focus-visible,
.survey-input:focus-visible {
  outline: 3px solid rgba(249, 115, 22, 0.35);
  outline-offset: 2px;
}

.survey-btn-primary {
  background: var(--survey-accent);
  color: #ffffff;
}

.survey-btn-primary:hover {
  background: var(--survey-accent-dark);
}

.survey-btn:active {
  transform: translateY(1px);
}

.survey-btn-ghost {
  background: #eef2f7;
  border-color: var(--survey-border);
  color: #0f172a;
}

.survey-btn-ghost:hover {
  background: #e2e8f0;
}

#startSurveyBtn {
  margin-top: 1rem;
  width: 100%;
}

.survey-hero-visual {
  margin-top: 1rem;
  border-radius: var(--survey-radius);
  border: 1px solid rgba(148, 163, 184, 0.36);
  background: linear-gradient(165deg, #111827, #1e293b);
  padding: 0.85rem;
  color: #e2e8f0;
}

.survey-visual-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
}

.survey-visual-stack {
  margin-top: 0.65rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.survey-mini-mockup {
  margin: 0;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(226, 232, 240, 0.3);
  border-radius: 12px;
  overflow: hidden;
}

.survey-mini-mockup img {
  display: block;
  width: 100%;
  aspect-ratio: 54 / 43;
  object-fit: cover;
}

.survey-mini-mockup figcaption {
  padding: 0.42rem 0.5rem 0.5rem;
  font-size: 0.72rem;
  color: #cbd5e1;
}

.survey-card {
  margin-top: 1rem;
  background: var(--survey-surface);
  border: 1px solid var(--survey-border);
  border-radius: calc(var(--survey-radius) + 2px);
  box-shadow: var(--survey-shadow);
  padding: 1rem;
}

.survey-progress-wrap {
  display: grid;
  gap: 0.45rem;
}

.survey-progress-text {
  margin: 0;
  font-weight: 750;
  color: #334155;
}

.survey-progress {
  width: 100%;
  height: 0.62rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

#progressFill {
  display: block;
  height: 100%;
  width: 12.5%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f97316, #fb923c);
  transition: width 0.3s ease;
}

.survey-steps {
  margin-top: 1rem;
}

.survey-step {
  display: none;
}

.survey-step.is-active {
  display: block;
  animation: fadeStepIn 0.24s ease;
}

@keyframes fadeStepIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.survey-step h2 {
  margin: 0;
  font-size: clamp(1.15rem, 4.8vw, 1.5rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.survey-step button {
  background-image: linear-gradient(to right, #f97316, #f97316);
  background-repeat: no-repeat;
  background-position: left top;
  background-size: 3% 100%;
}

.survey-note {
  margin: 0.55rem 0 0;
  color: var(--survey-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.survey-multi-hint {
  margin: 1rem 0 0.65rem;
  color: #c2410c;
  background: #fff0e6;
  border: 1px solid #fdba74;
  border-radius: 12px;
  padding: 0.72rem 0.88rem;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.3;
}

.inline-mockup {
  margin: 0.8rem 0 0;
  border: 1px solid var(--survey-border);
  border-radius: 12px;
  overflow: hidden;
  max-width: 320px;
  background: #f8fafc;
}

.inline-mockup img {
  display: block;
  width: 100%;
  aspect-ratio: 54 / 43;
  object-fit: cover;
}

.inline-mockup figcaption {
  margin: 0;
  padding: 0.48rem 0.58rem 0.58rem;
  color: #475569;
  font-size: 0.75rem;
}

.option-grid {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.52rem;
}

.option-card {
  border: 1px solid var(--survey-border);
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  min-height: 54px;
  padding: 0.74rem 0.88rem;
  font-size: 0.98rem;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .option-card:not(.is-selected):hover {
    border-color: #fdba74;
    background: #fff7ed;
  }
}

.option-card.is-selected {
  border-color: #f97316;
  background: #f97316;
  color: #ffffff;
  background-image: linear-gradient(to right, #ea580c, #ea580c);
  background-repeat: no-repeat;
  background-position: left top;
  background-size: 3% 100%;
}

.option-card .option-subtext {
  display: block;
  margin-top: 0.24rem;
  font-size: 0.84rem;
  line-height: 1.35;
  font-weight: 400;
  color: #475569;
}

.survey-label {
  display: block;
  margin-top: 0.9rem;
  margin-bottom: 0.4rem;
  font-weight: 750;
  font-size: 0.92rem;
}

.survey-input {
  width: 100%;
  min-height: 50px;
  border-radius: 12px;
  border: 1px solid var(--survey-border);
  background: #ffffff;
  color: #0f172a;
  padding: 0.72rem 0.8rem;
  font-size: 1rem;
}

.survey-inline-toggle {
  margin-top: 0.9rem;
  width: 100%;
  justify-content: center;
}

.survey-bakery-presets {
  margin-top: 0.8rem;
  padding: 0.75rem;
  border: 1px solid #fdba74;
  border-radius: 12px;
  background: #fff7ed;
}

.survey-bakery-presets-grid {
  margin-top: 0.35rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.survey-bakery-preset-btn {
  min-height: 46px;
  border: 1px solid #fdba74;
  border-radius: 10px;
  background: #ffffff;
  color: #9a3412;
  font-size: 0.92rem;
  font-weight: 760;
  padding: 0.58rem 0.62rem;
  text-align: center;
  cursor: pointer;
}

.survey-bakery-preset-btn.is-selected {
  background: #f97316;
  border-color: #ea580c;
  color: #ffffff;
  background-image: linear-gradient(to right, #ea580c, #ea580c);
  background-repeat: no-repeat;
  background-position: left top;
  background-size: 3% 100%;
}

.survey-manual-fields-hidden {
  display: none;
}

.survey-secondary-group {
  margin-top: 0.8rem;
  padding: 0.75rem;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
}

.survey-summary {
  margin-top: 1rem;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  border-radius: 12px;
  padding: 0.8rem;
}

.survey-summary h3 {
  margin: 0;
  font-size: 1rem;
}

.survey-summary ul {
  margin: 0.6rem 0 0;
  padding-left: 1rem;
  color: #334155;
  display: grid;
  gap: 0.32rem;
}

.validation-message {
  min-height: 1.3rem;
  margin: 0.6rem 0 0;
  color: #b91c1c;
  font-size: 0.88rem;
  font-weight: 650;
}

.survey-actions {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.survey-actions .survey-btn {
  width: 100%;
}

.survey-actions .survey-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.thank-you {
  text-align: left;
}

.thanks-header-visual {
  margin: 0 0 0.9rem;
  border-radius: 12px;
  overflow: visible;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  position: relative;
  z-index: 1;
}

.thanks-header-visual img {
  display: block;
  width: 100%;
  height: clamp(180px, 30vw, 320px);
  object-fit: cover;
  object-position: center;
}

.mobile-hero-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.54);
  z-index: 1200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 0.9rem 1rem;
}

.mobile-hero-modal[hidden] {
  display: none !important;
}

.mobile-hero-modal-card {
  width: min(560px, 100%);
  background: #ffffff;
  border: 1px solid #fdba74;
  border-radius: 14px;
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.28);
  padding: 0.85rem;
}

.mobile-hero-modal-image {
  display: block;
  width: 100%;
  height: clamp(120px, 28vw, 200px);
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #fed7aa;
}

.mobile-hero-modal-title {
  margin: 0.7rem 0 0;
  color: #0f172a;
  font-size: 1.1rem;
  line-height: 1.25;
}

.mobile-hero-modal-text {
  margin: 0.45rem 0 0;
  color: #9a3412;
  font-size: 0.95rem;
  font-weight: 760;
}

.mobile-hero-modal-card .survey-btn {
  margin-top: 0.7rem;
  width: 100%;
}

.mobile-boost-banner {
  margin: 0.75rem 0 0;
  padding: 0.8rem 0.88rem;
  border-radius: 12px;
  border: 1px solid #fb923c;
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  color: #c2410c;
  font-size: 1.1rem;
  line-height: 1.25;
  text-align: center;
}

.copy-feedback-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 1210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.copy-feedback-modal[hidden] {
  display: none !important;
}

.copy-feedback-modal-card {
  width: min(620px, 100%);
  background: #ffffff;
  border: 1px solid #fdba74;
  border-radius: 12px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.modal-header {
  background: #ea580c;
  border-radius: 11px 11px 0 0;
  padding: 14px 14px 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-header-title {
  flex: 1;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.35;
}

.modal-close-x-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
  line-height: 1;
  padding: 0;
}

.modal-close-x-btn:hover {
  background: rgba(255,255,255,0.35);
}

.modal-sub-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px 0;
}

.modal-subheadline {
  flex: 1;
  margin: 0;
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.45;
}

.modal-share-deco {
  flex-shrink: 0;
}

.modal-share-icon-wrap {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.13);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-divider {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #e2e8f0 20%, #e2e8f0 80%, transparent);
  margin: 16px 0 0;
}

.modal-body {
  padding: 14px 16px 16px;
}

.thank-you h2 {
  margin-top: 0;
  font-size: clamp(1.35rem, 5vw, 1.9rem);
}

.thank-you p {
  margin: 0.6rem 0 0;
  color: #334155;
}

.thanks-final-headline {
  margin-top: 0;
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  line-height: 1.1;
  color: #ea580c;
}

.thanks-final-headline strong {
  font-weight: 850;
}

.thanks-heart {
  color: #ea580c;
  margin-right: 0.2rem;
}

.thanks-panel {
  margin-top: 0.9rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  padding: 0.85rem;
}

.thanks-panel:first-of-type {
  margin-top: 0;
}

.thanks-kicker {
  margin-top: 0;
  display: inline-block;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: #ffedd5;
  border: 1px solid #fdba74;
  color: #9a3412;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.thanks-headline {
  margin: 0.55rem 0 0;
  font-size: clamp(1.4rem, 4.2vw, 2.05rem);
  line-height: 1.15;
  color: #0f172a;
}

.thanks-email-confirm {
  margin-top: 0.55rem;
  font-size: 1rem;
  color: #1e293b;
}

.thanks-lottery-badge {
  margin-top: 0.7rem;
  padding: 0.72rem 0.85rem;
  border-radius: 10px;
  border: 1px solid #fb923c;
  background: linear-gradient(180deg, #ffedd5 0%, #fed7aa 100%);
  color: #7c2d12;
  font-size: 1.03rem;
  font-weight: 850;
}

.thanks-subheadline {
  margin-top: 1rem;
}

.thanks-boost-title {
  margin: 0.35rem 0 0.15rem;
  color: #0f172a;
  font-size: clamp(1.1rem, 3.5vw, 1.45rem);
  line-height: 1.25;
}

.thanks-share-lead {
  margin-top: 0;
  padding: 0.55rem 0.7rem;
  border-left: 4px solid #f97316;
  background: #fff7ed;
  color: #7c2d12;
  font-size: 1rem;
  font-weight: 780;
}

.thanks-win-note {
  color: #c2410c;
}

.thanks-link-title {
  margin-top: 0.7rem;
  color: #0f172a;
}

.thanks-share-grid {
  margin-top: 0.55rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  align-items: start;
}

.thanks-share-copy p:first-child {
  margin-top: 0;
}

.thanks-mockup {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  background: #ffffff;
}

.thanks-mockup img {
  display: block;
  width: 100%;
  height: auto;
}

.ref-link-wrap {
  margin-top: 0.45rem;
}

.ref-link {
  display: inline-flex;
  max-width: 100%;
  word-break: break-all;
  color: #0c4a6e;
  font-weight: 700;
}

.ref-field-row {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.thanks-email-row {
  grid-template-columns: 1fr;
}

.ref-field-row-stack {
  grid-template-columns: 1fr;
}

.ref-template-row {
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: stretch;
}

.ref-template-input {
  min-height: 288px;
  resize: vertical;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.ref-input {
  min-height: 44px;
}

.ref-input-small {
  font-size: 0.78rem;
}

.copy-status {
  min-height: 1.2rem;
  margin: 0.45rem 0 0;
  color: #475569;
  font-size: 0.86rem;
  font-weight: 700;
}

.copy-status.is-highlight {
  color: #c2410c;
}

.copy-status.is-error {
  color: #b91c1c;
}

.thanks-captcha-wrap {
  margin-top: 0.65rem;
  padding: 0.35rem 0;
}

.share-links {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.share-links[hidden] {
  display: none !important;
}

.share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.4rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #0f172a;
  text-decoration: none;
  font-weight: 700;
  background: #fff;
}

.share-link:hover {
  background: #f8fafc;
}

.share-link-icon {
  width: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 999px;
  font-size: 1.18rem;
}

.share-link-icon .fa-brands,
.share-link-icon .fa-solid {
  line-height: 1;
}

.personal-stats-panel {
  background: #eef2ff;
  border-color: #c7d2fe;
}

.stats-grid {
  margin-top: 0.6rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.55rem;
}

.stat-label {
  margin: 0;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
}

.stat-value {
  margin: 0.2rem 0 0;
  color: #0f172a;
  font-size: 1.12rem;
  font-weight: 850;
}

.stats-formula {
  margin-top: 0.55rem;
  color: #334155;
  font-size: 0.88rem;
}

.share-reminder-panel {
  background: #fff7ed;
  border-color: #fdba74;
}

.share-reminder-panel .share-links {
  justify-content: center;
}

.share-reminder-box {
  padding: 0.65rem 0.75rem;
  border: 1px solid #fb923c;
  border-radius: 10px;
  background: #ffffff;
}

.share-reminder-box p {
  margin: 0;
}

.share-reminder-box p + p {
  margin-top: 0.35rem;
}

.share-reminder-lead {
  font-size: clamp(1.15rem, 3.8vw, 1.5rem);
  line-height: 1.25;
  color: #0f172a;
}

.survey-btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.thank-you .survey-btn {
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .survey-main {
    padding: 1.6rem 0 3rem;
  }

  .survey-hero {
    padding: 1.35rem;
  }

  .survey-hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1rem;
    align-items: stretch;
  }

  #startSurveyBtn {
    width: auto;
    min-width: 210px;
  }

  .survey-card {
    padding: 1.25rem;
  }

  .option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .survey-actions {
    grid-template-columns: auto auto;
    justify-content: flex-end;
  }

  .survey-actions .survey-btn {
    min-width: 140px;
  }

  .thanks-share-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    gap: 1rem;
  }

  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .thanks-email-row {
    grid-template-columns: 1fr auto;
  }
}

@media (max-width: 767px) {
  .ref-template-row {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .thanks-confirm-panel {
    display: none;
  }

  .thanks-header-visual {
    display: none;
  }

  .share-reminder-box {
    display: none;
  }
}
