:root {
  --brand-orange: #ffae5b;
  --brand-orange-deep: #de8d35;
  --brand-orange-soft: #fff1df;
  --ink: #4a3e35;
  --ink-soft: #7b6d63;
  --canvas: #f6f3ef;
  --paper: #fffdf9;
  --white: #ffffff;
  --line: #efd8c1;
  --line-soft: #eee5dc;
  --error: #a44738;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, label, select { -webkit-tap-highlight-color: transparent; }

.brand-band {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  height: 8px;
  background: var(--brand-orange);
}
.site-header {
  position: fixed;
  top: 8px;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  height: 78px;
  align-items: center;
  justify-content: space-between;
  padding: 9px clamp(22px, 5vw, 68px);
  border-bottom: 1px solid rgba(239, 216, 193, .65);
  background: rgba(246, 243, 239, .92);
  backdrop-filter: blur(12px);
}
.brand-link { display: inline-flex; align-items: center; text-decoration: none; }
.brand-link img { display: block; width: 64px; height: auto; }
.anniversary-mark { display: flex; align-items: baseline; gap: 8px; color: var(--brand-orange-deep); }
.anniversary-mark span { font-size: 26px; font-weight: 700; line-height: 1; }
.anniversary-mark small { font-size: 9px; font-weight: 600; letter-spacing: .18em; }

main { min-height: 100vh; }
.intro, .survey-shell, .thank-you { display: none; min-height: 100vh; }
.intro.is-active, .survey-shell.is-active, .thank-you.is-active { display: flex; }

.intro {
  position: relative;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 126px clamp(18px, 5vw, 54px) 54px;
  align-items: center;
  justify-content: center;
}
.intro-copy {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  padding: clamp(44px, 6vw, 68px) clamp(24px, 7vw, 76px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 253, 249, .94);
  box-shadow: 0 18px 48px rgba(102, 78, 55, .08);
  text-align: center;
}
.intro-logo { display: block; width: 128px; height: auto; margin: 0 auto 25px; }
.eyebrow, .question-kicker {
  margin: 0 0 16px;
  color: var(--brand-orange-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
}
h1 {
  margin: 0;
  color: var(--brand-orange-deep);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .01em;
}
.nowrap { white-space: nowrap; }
.lead { margin: 24px auto 30px; color: var(--ink-soft); font-size: clamp(15px, 1.7vw, 17px); line-height: 1.95; }
.primary-button {
  min-width: 166px;
  min-height: 52px;
  padding: 13px 25px;
  border: 1px solid var(--brand-orange-deep);
  border-radius: 14px;
  color: var(--white);
  background: var(--brand-orange-deep);
  box-shadow: 0 8px 22px rgba(222, 141, 53, .2);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.primary-button:hover { transform: translateY(-2px); background: #d3822d; box-shadow: 0 12px 28px rgba(222, 141, 53, .28); }
.primary-button:disabled { cursor: wait; opacity: .65; transform: none; }
.primary-button:focus-visible, .back-button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(255, 174, 91, .45); outline-offset: 3px; }
.primary-button span { display: inline-block; margin-left: 16px; transition: transform .2s ease; }
.primary-button:hover span { transform: translateX(3px); }
.time-note { margin: 14px 0 0; color: var(--ink-soft); font-size: 12px; }
.intro-art {
  position: absolute;
  right: 2%;
  bottom: 8%;
  z-index: 3;
  width: 138px;
  height: 138px;
  border: 1px solid rgba(255, 174, 91, .65);
  border-radius: 50%;
  background: var(--brand-orange-soft);
  transform: rotate(5deg);
  text-align: center;
}
.intro-art .ten { margin-top: 18px; color: var(--brand-orange); font-size: 54px; font-weight: 700; line-height: 1; }
.intro-art p { margin: 7px 0 0; color: var(--brand-orange-deep); font-size: 9px; font-weight: 600; line-height: 1.6; letter-spacing: .12em; }

.survey-shell {
  width: min(930px, 100%);
  margin: 0 auto;
  padding: 116px clamp(18px, 5vw, 54px) 48px;
  flex-direction: column;
}
.progress-wrap { width: 100%; margin-bottom: 20px; padding: 0 8px; }
.progress-meta { display: flex; justify-content: space-between; color: var(--ink-soft); font-size: 10px; font-weight: 600; letter-spacing: .12em; }
.progress-meta strong { color: var(--brand-orange-deep); font-size: 17px; }
.progress-track { height: 6px; margin-top: 12px; overflow: hidden; border-radius: 99px; background: #eadfd5; }
.progress-bar { width: 7.14%; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand-orange), var(--brand-orange-deep)); transition: width .45s ease; }
#survey-form {
  display: flex;
  min-height: 600px;
  flex: 1;
  flex-direction: column;
  padding: clamp(32px, 5vw, 50px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 16px 42px rgba(102, 78, 55, .07);
}
.question { display: none; animation: question-in .42s cubic-bezier(.22,.61,.36,1); }
.question.is-active { display: block; }
@keyframes question-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.question-kicker { margin-bottom: 12px; }
.question h2 { max-width: 790px; margin: 0 0 12px; color: var(--ink); font-size: clamp(24px, 3.5vw, 32px); font-weight: 700; line-height: 1.55; letter-spacing: .01em; outline: 0; }
.question-hint, .privacy-note { margin: 0 0 24px; color: var(--ink-soft); font-size: 14px; line-height: 1.8; }
.option-grid, .option-grid.compact, .product-grid { display: grid; grid-template-columns: 1fr; gap: 11px; margin-top: 28px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.choice span {
  position: relative;
  display: flex;
  min-height: 56px;
  align-items: center;
  padding: 14px 18px 14px 50px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: var(--white);
  font-size: 15px;
  line-height: 1.55;
  transition: border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.choice span::before { content: ""; position: absolute; left: 19px; width: 17px; height: 17px; border: 1px solid #b9ada2; border-radius: 50%; background: var(--white); }
.choice input[type="checkbox"] + span::before { border-radius: 4px; }
.choice input:checked + span { border-color: var(--brand-orange); background: var(--brand-orange-soft); box-shadow: 0 5px 15px rgba(222, 141, 53, .09); }
.choice input:checked + span::after { content: ""; position: absolute; left: 24px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-orange-deep); }
.choice input[type="checkbox"]:checked + span::after { left: 23px; width: 8px; height: 5px; border: solid var(--brand-orange-deep); border-width: 0 0 2px 2px; border-radius: 0; background: transparent; transform: rotate(-45deg) translateY(-1px); }
.choice input:focus-visible + span { outline: 3px solid rgba(255, 174, 91, .35); outline-offset: 2px; }
.choice:hover span { border-color: var(--brand-orange); transform: translateY(-1px); }
.line-input {
  width: 100%;
  margin-top: 30px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: var(--white);
  font-size: 17px;
  outline: 0;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.line-input::placeholder { color: #ad9f93; }
.line-input:focus { border-color: var(--brand-orange); box-shadow: 0 0 0 4px rgba(255, 174, 91, .13); }
.line-input.small { margin-top: 8px; font-size: 15px; }
.textarea { min-height: 125px; resize: vertical; line-height: 1.8; }
.conditional-field { display: none; margin-top: 22px; padding: 18px; border: 1px dashed var(--line); border-radius: 18px; background: #fffaf4; }
.conditional-field.is-visible { display: block; animation: question-in .3s ease; }
.conditional-field > label, .conditional-field > p { display: block; margin: 0 0 8px; color: var(--ink-soft); font-size: 13px; }
.select-wrap { position: relative; }
.select-wrap::after { content: "⌄"; position: absolute; top: 50%; right: 18px; transform: translateY(-55%); pointer-events: none; }
select { width: 100%; min-height: 54px; padding: 10px 48px 10px 16px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: var(--white); appearance: none; }
.score-grid { display: grid; grid-template-columns: repeat(11, 1fr); gap: 8px; margin-top: 34px; }
.score-grid label { cursor: pointer; }
.score-grid input { position: absolute; opacity: 0; pointer-events: none; }
.score-grid span { display: grid; aspect-ratio: 1; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--white); font-size: 14px; font-weight: 600; transition: .2s ease; }
.score-grid input:checked + span { color: var(--white); border-color: var(--brand-orange-deep); background: var(--brand-orange-deep); transform: translateY(-2px); }
.score-grid input:focus-visible + span { outline: 3px solid rgba(255, 174, 91, .4); outline-offset: 2px; }
.score-labels { display: flex; justify-content: space-between; margin-top: 10px; color: var(--ink-soft); font-size: 11px; }
.error-message { min-height: 22px; margin: 14px 0 0; color: var(--error); font-size: 13px; }
.form-navigation { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 36px; }
.back-button { padding: 12px 0; border: 0; color: var(--ink-soft); background: transparent; cursor: pointer; font-size: 14px; }
.back-button:hover { color: var(--brand-orange-deep); }
.back-button span { margin-right: 8px; }
.submit-button { display: none; }
.honeypot { position: absolute; left: -9999px; }

.thank-you {
  width: min(760px, calc(100% - 36px));
  min-height: auto;
  margin: 130px auto 50px;
  padding: 52px 26px 58px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: 0 18px 48px rgba(102, 78, 55, .08);
  text-align: center;
}
.thank-you-logo { width: 110px; height: auto; margin-bottom: 15px; }
.thank-you-mark { margin: 0 0 -8px; color: var(--brand-orange); font-size: 76px; font-weight: 700; line-height: 1; opacity: .35; }
.thank-you h2, .thank-you-title { margin: 0; color: var(--brand-orange-deep); font-size: clamp(30px, 5vw, 46px); font-weight: 700; line-height: 1.55; letter-spacing: .01em; }
.thank-you-copy { margin: 24px 0 26px; color: var(--ink-soft); line-height: 1.9; }
.coupon-card {
  width: min(550px, 100%);
  margin: 0 0 30px;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--brand-orange-soft);
}
.coupon-card p { margin: 0 0 19px; color: var(--ink); font-size: 15px; line-height: 1.8; text-wrap: balance; }
.coupon-label { display: block; margin-bottom: 6px; color: var(--brand-orange-deep); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.coupon-code { display: block; color: var(--brand-orange-deep); font-size: clamp(23px, 4vw, 30px); font-weight: 700; letter-spacing: .04em; }
.copy-button { margin-top: 18px; padding: 9px 18px; border: 1px solid var(--brand-orange-deep); border-radius: 10px; color: var(--brand-orange-deep); background: var(--white); cursor: pointer; font-size: 13px; font-weight: 600; }
.copy-button:hover { color: var(--white); background: var(--brand-orange-deep); }
.copy-status { display: block; min-height: 20px; margin-top: 7px; color: var(--ink-soft); font-size: 12px; }
.link-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 760px) {
  .site-header { height: 66px; padding: 7px 18px; }
  .brand-link img { width: 51px; }
  .anniversary-mark span { font-size: 23px; }
  .anniversary-mark small { max-width: 55px; font-size: 7px; line-height: 1.25; }
  .intro { padding-top: 100px; }
  .intro-copy { padding: 38px 22px 36px; border-radius: 24px; }
  .intro-logo { width: 104px; margin-bottom: 20px; }
  h1 { font-size: clamp(29px, 8.5vw, 40px); }
  .lead br { display: none; }
  .intro-art { display: none; }
  .survey-shell { padding: 94px 13px 28px; }
  .progress-wrap { margin-bottom: 14px; }
  #survey-form { min-height: calc(100vh - 155px); padding: 27px 18px; border-radius: 22px; }
  .question h2 { font-size: 23px; line-height: 1.5; }
  .option-grid, .option-grid.compact, .product-grid { gap: 9px; margin-top: 22px; }
  .choice span { min-height: 52px; padding: 12px 14px 12px 46px; font-size: 14px; }
  .choice span::before { left: 17px; }
  .choice input:checked + span::after { left: 22px; }
  .choice input[type="checkbox"]:checked + span::after { left: 21px; }
  .score-grid { grid-template-columns: repeat(6, 1fr); row-gap: 10px; }
  .score-grid span { max-width: 44px; }
  .form-navigation { padding-top: 28px; }
  .primary-button { min-width: 142px; min-height: 50px; padding: 12px 18px; }
  .thank-you { margin-top: 100px; }
}

@media (max-width: 390px) {
  .progress-meta > span:first-child { font-size: 8px; }
  .anniversary-mark small { display: none; }
  .primary-button { min-width: 132px; }
  .primary-button span { margin-left: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
