:root {
  --bg: #faf6ee;
  --paper: #fffdf8;
  --ink: #2a2118;
  --muted: #6b5d4c;
  --accent: #9e2a1e;
  --accent-ink: #fff;
  --gold: #c8962e;
  --line: #eadfca;
  --wa: #128c4a;
  --page-w: 490px;
  --dock-h: 96px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "PingFang TC", "Hiragino Sans GB", "Microsoft YaHei", "Microsoft JhengHei", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); line-height: 1.7; overflow-wrap: anywhere; }
a { color: var(--accent); }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page { max-width: var(--page-w); margin: 0 auto; background: var(--paper); padding-bottom: calc(var(--dock-h) + 16px); min-height: 100vh; }
.hero-link { display: block; }
.hero picture, .hero img { display: block; width: 100%; height: auto; }
.hero picture { background: linear-gradient(180deg, #f3e6c9, var(--paper)); }

.cohort { padding: 16px 18px 0; text-align: center; }
.cohort p { margin: 2px 0; }
.cohort-seats { font-size: 18px; font-weight: 700; color: var(--accent); }
.cohort-countdown strong { margin-left: 6px; font-size: 22px; color: var(--accent); font-variant-numeric: tabular-nums; }
.cohort-time { font-size: 14px; color: var(--muted); }

.course { padding: 24px 18px 8px; }
.course h1 { font-size: 24px; line-height: 1.35; margin: 0 0 8px; color: var(--accent); }
.course h2 { font-size: 18px; margin: 24px 0 10px; padding-left: 10px; border-left: 4px solid var(--gold); }
.course p { margin: 0 0 10px; }
.schedule { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.schedule li { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.schedule .day { color: var(--accent); font-weight: 700; margin-right: 6px; }
.schedule .title { font-weight: 700; }
.schedule .desc { display: block; color: var(--muted); font-size: 15px; }
.format { margin: 0; padding-left: 20px; }
.disclaimer { font-size: 13px; color: var(--muted); margin-top: 18px; }

.site-footer { padding: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.site-footer p { margin: 0 0 6px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.link-button { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font-size: inherit; }

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; pointer-events: none; }
.dock > * { pointer-events: auto; max-width: var(--page-w); margin: 0 auto; }
.cta-bar { background: rgba(255, 253, 248, 0.97); border-top: 1px solid var(--line); padding: 10px 14px max(10px, env(safe-area-inset-bottom)); text-align: center; }
.cta { display: flex; align-items: center; justify-content: center; min-height: 54px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-size: 20px; font-weight: 700; text-decoration: none; box-shadow: 0 4px 12px rgba(158, 42, 30, 0.28); }
.notice { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
[data-consent-tier="strict"] .notice { display: none; }

.consent { background: #2a2118; color: #f6efe2; padding: 12px 14px; border-radius: 12px 12px 0 0; font-size: 14px; }
.consent p { margin: 0 0 10px; }
.consent a { color: #f3d48c; }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.consent-btn { min-height: 44px; border-radius: 8px; border: 1px solid #f6efe2; background: transparent; color: #f6efe2; font-weight: 700; cursor: pointer; }
.consent-btn.accept { background: #f6efe2; color: #2a2118; }

/* quiz */
.chat { max-width: var(--page-w); margin: 0 auto; min-height: 100vh; background: #eef0ec; padding: 20px 14px calc(var(--dock-h) + 20px); }
.chat h1 { font-size: 18px; text-align: center; margin: 0 0 16px; color: var(--muted); }
.chat-row { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; }
.chat-row.user { justify-content: flex-end; }
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 40px; background: #fff; }
.bubble { margin: 0; max-width: 78%; padding: 10px 13px; border-radius: 10px; font-size: 17px; line-height: 1.55; background: #fff; }
.user .bubble { background: #c9efb0; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 14px max(14px, env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(238, 240, 236, 0), #eef0ec 30%); }
.choices:empty { display: none; }
.choice { min-height: 50px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-size: 17px; font-weight: 700; cursor: pointer; padding: 6px 8px; }
.claim-panel { grid-template-columns: 1fr; }
.claim { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; border: 0; border-radius: 12px; background: var(--wa); color: #fff; font-size: 19px; font-weight: 700; cursor: pointer; padding: 6px 12px; }
.claim[aria-busy="true"] { opacity: 0.75; cursor: progress; }
.fallback { margin: 0; font-size: 14px; text-align: center; }
.quiz-footer { max-width: var(--page-w); margin: 0 auto; }

/* legal */
.legal { padding: 24px 18px; }
.legal h1 { font-size: 24px; color: var(--accent); margin: 0 0 12px; }
.legal h2 { font-size: 17px; margin: 18px 0 6px; }
.legal p { margin: 0 0 8px; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
