@font-face {
  font-family: "Noto Sans TC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans TC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/sans-700.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Serif TC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/serif-700.woff2") format("woff2");
}

:root {
  --cream: #fffaf2;
  --paper: #f6e7c8;
  --ink: #4a3018;
  --brown: #4a3018;
  --muted: #7a5a3a;
  --green: #5f8f3e;
  --green-deep: #2f5c32;
  --gold: #c6a15a;
  --line: #e4d0aa;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Noto Sans CJK TC", "Microsoft JhengHei", sans-serif;
  --shadow: 0 10px 28px rgba(92, 64, 50, 0.1);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
p, .blessing, .lead, .hint, .note, .line, .plaque strong, .plaque small {
  text-wrap: pretty;
}
html { color-scheme: light; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  background: var(--paper);
}
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 5;
  background: #fff;
  padding: 8px 12px;
  border-radius: 8px;
}
.skip:focus { top: 8px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 46% at 50% -8%, #fff8ea 0%, rgba(255, 248, 234, 0) 62%),
    radial-gradient(ellipse 42% 28% at 100% 6%, rgba(255, 214, 140, 0.5), transparent 70%),
    radial-gradient(ellipse 36% 26% at 0% 16%, rgba(244, 190, 190, 0.34), transparent 72%),
    linear-gradient(180deg, #f8edd6 0%, #f4e4c4 42%, #e7f0dc 100%);
}
.sky::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(42vh, 380px);
  background: url("/assets/scenery.svg") center bottom / 150% auto no-repeat;
}

.app {
  width: min(480px, 100%);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(12px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
}
main { flex: 1; }

.badge {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.9);
  border: 1px solid rgba(198, 161, 90, 0.5);
  box-shadow: var(--shadow);
}
.badge-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(160deg, #f8e7b8, #a07d3e);
  flex: none;
}
.badge-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: #fbf6ea;
  display: block;
}
.badge-copy { display: flex; flex-direction: column; min-width: 0; }
.badge-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
}
.badge-brand { color: var(--green); margin-left: 6px; }
.badge-slogan {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

.hero { text-align: center; padding: 14px 0 6px; }
.stage {
  position: relative;
  height: 168px;
  margin: 0 auto 4px;
}
.stage .bob {
  position: absolute;
  animation: floaty 4.6s ease-in-out infinite;
}
.stage .sun { width: 148px; left: 50%; margin-left: -74px; top: 8px; }
.stage .heart { width: 62px; left: 4%; top: 18px; animation-delay: -1s; }
.stage .tea { width: 64px; right: 4%; top: 22px; animation-delay: -2s; }
.stage .flower { width: 58px; left: 18%; bottom: 0; animation-delay: -1.6s; }
.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 9vw, 2.5rem);
  letter-spacing: 0.08em;
  color: #5f8f3e;
  text-shadow: 0 2px 0 rgba(47, 92, 50, 0.28);
  margin: 2px 0 10px;
}
.lead { color: var(--ink); margin: 12px 0 16px; }
.hint, .quiet { color: var(--muted); font-size: 0.95rem; }
.section-label {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin: 6px 0 10px;
}

.slogan-scroll, .scroll-btn {
  display: flex;
  align-items: stretch;
  width: 100%;
  gap: 0;
}
.roller {
  width: 16px;
  border-radius: 999px;
  flex: none;
  background: linear-gradient(90deg, #7a5524 0%, #f8e7b8 40%, #d7b15c 62%, #8a6230 100%);
  box-shadow: inset 0 0 0 1px rgba(90, 50, 10, 0.35);
  position: relative;
}
.roller::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  bottom: 8px;
  width: 2px;
  margin-left: -1px;
  background: rgba(80, 48, 12, 0.35);
}
.slogan-plaque {
  flex: 1;
  margin: 0 -2px;
  padding: 12px 8px 10px;
  border-radius: 14px;
  background:
    linear-gradient(#fffaf0, #fffaf0) padding-box,
    linear-gradient(180deg, #f6e3b0, #c6a15a 45%, #f8e7c0 70%, #a8843e) border-box;
  border: 3px solid transparent;
  box-shadow: 0 8px 18px rgba(92, 64, 50, 0.1);
}
.slogan-line {
  position: relative;
  margin: 0;
  text-align: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.55rem, 6.6vw, 2.05rem);
  line-height: 1.35;
  letter-spacing: 0.03em;
}
.slogan-stroke, .slogan-fill { font: inherit; letter-spacing: inherit; }
.slogan-stroke {
  position: absolute;
  inset: 0;
  color: #4a2208;
  -webkit-text-stroke: 4px #4a2208;
  z-index: 0;
}
.slogan-fill {
  position: relative;
  z-index: 1;
  color: #b8892e;
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .slogan-fill {
    background: linear-gradient(180deg, #fff6d0 0%, #f0d078 38%, #d7a441 62%, #f8e7b0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.menu { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.scroll-btn {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  text-align: center;
  touch-action: manipulation;
}
.plaque {
  flex: 1;
  margin: 0 -2px;
  min-height: 64px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 8px;
  position: relative;
  z-index: 1;
}
.plaque strong {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.35;
  letter-spacing: 0.03em;
}
.plaque small { font-size: 0.88rem; line-height: 1.35; }
.tone-green .plaque {
  color: #f8efd2;
  background: linear-gradient(180deg, #6d9a62 0%, #3e6a45 42%, #2c5336 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 0 rgba(30, 50, 30, 0.12);
}
.tone-green .plaque small { color: #f3e6c8; }
.tone-gold .plaque {
  color: #4a3018;
  background: linear-gradient(180deg, #fff6dd 0%, #f0d59a 100%);
  box-shadow: inset 0 0 0 2px #e2c27a, inset 0 0 0 4px #fffaf0, 0 6px 0 rgba(120, 80, 30, 0.12);
}
.tone-gold .plaque small { color: #7a5a3a; }
.tone-cream .plaque {
  color: #4a3018;
  background: linear-gradient(180deg, #fffdf8 0%, #f7efe0 100%);
  box-shadow: inset 0 0 0 2px #e7d3a4, 0 6px 0 rgba(120, 80, 30, 0.08);
}
.tone-cream .plaque small { color: #7a5a3a; }
.scroll-btn:active .plaque { transform: translateY(2px); }
@media (hover: hover) {
  .scroll-btn:hover .plaque { filter: brightness(1.03); }
}
.scroll-btn:focus-visible, .choice:focus-visible, .text-btn:focus-visible, .badge:focus-visible, .chip input:focus-visible + span {
  outline: 3px solid #c6a15a;
  outline-offset: 3px;
}

.foot {
  margin-top: 22px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 250, 242, 0.78);
  text-align: center;
}
.foot-links { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.foot a { color: #6a4a2c; font-weight: 700; text-underline-offset: 3px; }
.foot p { margin-top: 6px; color: var(--muted); font-size: 0.92rem; }

.panel {
  background: rgba(255, 250, 242, 0.92);
  border: 1px solid rgba(226, 194, 122, 0.7);
  border-radius: 22px;
  padding: 16px 14px 18px;
  box-shadow: var(--shadow);
}
.screen h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.7rem, 7vw, 2.15rem);
  line-height: 1.3;
  margin-bottom: 8px;
}
.center { text-align: center; }
.mascot-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  margin: 12px 0 16px;
}
.mascot-row img { width: 64px; height: auto; }
.mascot-row .lg { width: 108px; }
.bob { animation: floaty 4.6s ease-in-out infinite; }
.delay-1 { animation-delay: -1.2s; }
.delay-2 { animation-delay: -2.1s; }
.delay-3 { animation-delay: -0.6s; }

.q-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.q-head img { width: 72px; height: 72px; flex: none; }
.progress-label { font-size: 0.95rem; color: var(--green-deep); font-weight: 700; margin-bottom: 6px; }
.progress {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #f0d078, #c6a15a);
  border-radius: inherit;
  transition: width 0.35s ease;
}
.question-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.45;
  margin: 12px 0;
}
.choice {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  min-height: 56px;
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1.5px solid #e3d0aa;
  background: rgba(255, 252, 247, 0.96);
  box-shadow: 0 4px 0 rgba(160, 125, 62, 0.12);
  touch-action: manipulation;
}
.choice .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e2b34a;
  box-shadow: 0 0 0 4px rgba(226, 179, 74, 0.25);
  flex: none;
}
.choice.is-picked {
  background: #4a3018;
  color: #fffaf2;
  border-color: #4a3018;
}
.choice.is-picked .dot { background: #fff6d0; box-shadow: none; }
.text-btn {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  background: none;
  border: 0;
  color: #7a5a3a;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-align: center;
}
.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.result-mascot { width: 128px; height: auto; margin: 4px auto 8px; display: block; }
.line {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.45;
  margin: 6px 0 8px;
}
.action-box {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff6e4;
  border: 1px solid #efd7a4;
  text-align: left;
}
.eyebrow {
  color: #5f7344;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.preview { margin: 12px 0 6px; min-height: 80px; }
.preview img {
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(92, 64, 50, 0.16);
  background: #fffaf2;
}
.painting { color: var(--muted); padding: 18px 0; }

fieldset.field { border: 0; margin: 0 0 14px; padding: 0; min-inline-size: 0; }
legend { font-weight: 700; padding: 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; text-align: left; }
.field > span:first-child { font-weight: 700; }
.hint, .counter { font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  border: 1.5px solid #e0cda8;
  background: #fff;
  padding: 10px 12px;
  font-size: max(16px, 1rem);
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.date-row { display: flex; gap: 8px; }
.date-row select {
  flex: 1;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #7a5a3a 50%), linear-gradient(135deg, #7a5a3a 50%, transparent 50%);
  background-position: calc(100% - 18px) 22px, calc(100% - 12px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid #d7c09a;
  background: #fffaf2;
}
.chip input:checked + span {
  background: #4a3018;
  color: #fffaf2;
  border-color: #4a3018;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #ead8b4;
  margin: 4px 0 14px;
  text-align: left;
}
.check input { width: 22px; height: 22px; margin-top: 3px; accent-color: #a07d3e; flex: none; }
.note {
  background: #fff6e4;
  border: 1px solid #efd7a4;
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 12px;
  text-align: left;
}
.note.error { background: #fdeeee; border-color: #e7b4b4; }
.counter { font-size: 0.92rem; color: var(--muted); text-align: right; }
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.flower-kicker {
  display: inline-block;
  margin: 4px 0 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #fff6e4;
  border: 1px solid #efd7a4;
  color: #6a4a2c;
  font-weight: 700;
}
.blessing {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.5;
  margin: 6px 0 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 20;
  max-width: min(420px, calc(100% - 32px));
  background: #4a3018;
  color: #fffaf2;
  border-radius: 999px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
  text-align: center;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.screen.is-on { animation: rise 0.45s ease both; }
.scroll-btn.attention .plaque { animation: glow 2.4s ease-in-out infinite; }
@keyframes glow {
  0%, 100% { box-shadow: inset 0 0 0 2px #e2c27a, inset 0 0 0 4px #fffaf0, 0 6px 0 rgba(120, 80, 30, 0.12); }
  50% { box-shadow: inset 0 0 0 2px #e2c27a, inset 0 0 0 4px #fffaf0, 0 6px 0 rgba(120, 80, 30, 0.12), 0 0 0 8px rgba(232, 196, 106, 0.28); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
