:root {
  --ink: #192420;
  --text: #323c3b;
  --muted: #527066;
  --brand: #2b5e4d;
  --brand-dark: #17352b;
  --pale: #eef7f2;
  --bg: #fafcfb;
  --line: #e4ede8;
  --soft: #e4eae8;
  --error: #b4402c;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: var(--bg); color: var(--muted); font: 17px/1.55 Figtree, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { touch-action: manipulation; }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid rgba(43, 94, 77, .35); outline-offset: 2px; }

.header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .94); backdrop-filter: saturate(140%) blur(12px); }
.header-inner { display: flex; align-items: center; gap: 24px; max-width: 1420px; min-height: 76px; margin: 0 auto; padding: 12px 28px; }
.brand { display: flex; align-items: center; gap: 16px; min-width: 0; overflow: hidden; }
.brand img { display: block; width: auto; height: 50px; }
.brand .divider { width: 1px; height: 30px; flex: 0 0 auto; background: var(--line); }
.brand .title { overflow: hidden; color: var(--text); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.progress { display: flex; flex: 1 1 auto; align-items: center; justify-content: flex-end; gap: 16px; min-width: 0; }
.progress-module { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.progress-track { width: min(280px, 100%); min-width: 70px; height: 6px; overflow: hidden; border-radius: 999px; background: var(--soft); }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width .35s ease; }
.progress-value { color: var(--text); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 48px; max-width: 1420px; min-height: calc(100vh - 76px); margin: 0 auto; padding: 48px 40px 72px; }
.rail { position: sticky; top: 100px; align-self: start; display: grid; gap: 2px; }
.rail-title { margin: 0 0 14px; padding-left: 4px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.rail button { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border: 0; border-radius: 9px; background: transparent; color: #5f7a72; cursor: default; font-size: 14px; text-align: left; }
.rail button.is-done, .rail button.is-current { cursor: pointer; }
.rail button.is-done { color: var(--brand); }
.rail button.is-current { color: var(--ink); font-weight: 600; }
.rail button:not(:disabled):hover { background: var(--pale); }
.rail-dot { width: 8px; height: 8px; flex: 0 0 auto; border: 1.5px solid #a3b8b1; border-radius: 50%; background: #fff; }
.rail .is-done .rail-dot { border-color: var(--brand); background: var(--brand); }
.rail .is-current .rail-dot { border-color: var(--brand); box-shadow: 0 0 0 4px var(--pale); }

main { min-width: 0; }
.card { width: 100%; max-width: 1080px; margin: 0 auto; padding: clamp(28px, 3.4vw, 52px); border: 1px solid var(--line); border-radius: 20px; background: #fff; box-sizing: border-box; }
.page-card { max-width: none; }
.accent { width: 56px; height: 3px; margin-bottom: 24px; background: var(--brand); }
.eyebrow { margin: 0 0 14px; color: var(--brand); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; color: var(--ink); letter-spacing: -.025em; line-height: 1.1; }
h1 { max-width: 24ch; font-size: clamp(34px, 4.2vw, 56px); font-weight: 800; }
h2 { font-size: clamp(25px, 3.2vw, 36px); font-weight: 800; }
h3 { font-size: 16px; font-weight: 700; }
.lead { max-width: 50ch; margin: 20px 0 0; font-size: clamp(19px, 2.1vw, 22px); font-weight: 500; line-height: 1.35; }
.intro-copy { display: grid; gap: 16px; max-width: 72ch; margin-top: 30px; }
.intro-copy p, .module-note { margin: 0; }
.facts { display: grid; gap: 13px; margin: 34px 0 0; padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); list-style: none; }
.facts li { display: grid; grid-template-columns: 20px 1fr; gap: 13px; align-items: start; font-size: 15px; }
.tick { position: relative; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%; background: var(--soft); }
.tick::after { position: absolute; top: 5px; left: 5px; width: 8px; height: 4px; border-bottom: 1.8px solid var(--brand); border-left: 1.8px solid var(--brand); content: ""; transform: rotate(-45deg); }
.prize { margin-top: 34px; padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.prize-intro { margin: 0 0 22px; color: var(--text); font-size: 17px; font-weight: 500; }
.prize-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.prize-item { display: grid; grid-template-columns: 104px 1fr; gap: 18px; align-items: start; }
.prize-item img { display: block; width: 100%; max-width: 104px; height: auto; border: 1px solid var(--line); border-radius: 4px; }
.prize-item h3 { font-size: 16px; letter-spacing: -.01em; line-height: 1.3; }
.prize-item p { margin: 8px 0 0; font-size: 14px; line-height: 1.45; }
.date-label { margin-top: 12px !important; color: var(--brand); font-size: 11px !important; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.date { margin-top: 4px !important; color: var(--text); font-size: 15px !important; font-weight: 600; }
.small { margin: 22px 0 0; font-size: 13px; }
.privacy { margin: 20px 0 0; font-size: 14px; }

.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 54px; padding: 15px 24px; border: 1px solid transparent; border-radius: 10px; background: var(--brand); color: var(--pale); cursor: pointer; font-size: 16px; font-weight: 600; text-decoration: none; transition: background .18s, opacity .18s; }
.button:hover:not(:disabled) { background: var(--brand-dark); color: var(--pale); }
.button:disabled { cursor: not-allowed; opacity: .48; }
.button.start { min-height: 62px; padding: 20px 30px; font-size: 17px; }
.button.secondary { border-color: var(--brand); background: transparent; color: var(--brand); }
.button.secondary:hover:not(:disabled) { background: var(--pale); color: var(--brand); }
.notice { min-height: 22px; margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.notice.error { color: var(--error); font-weight: 600; }

.hint-bar { margin: 0 0 30px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 13.5px; line-height: 1.45; }
.page-heading { margin-bottom: 34px; }
.page-heading .eyebrow { margin-bottom: 14px; }
.module-note { max-width: 62ch; margin-top: 16px; }
.question { margin: 0 0 44px; scroll-margin-top: 110px; }
.question-head { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: baseline; margin-bottom: 18px; }
.question-number { color: #5f7a72; font-size: 13px; font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.question-text { color: var(--ink); font-size: clamp(19px, 2vw, 21px); font-weight: 700; letter-spacing: -.02em; line-height: 1.3; }
.question-hint { margin: -10px 0 16px 30px; font-size: 14px; }
.question-error { margin: 12px 0 0 30px; padding: 11px 15px; border: 1px solid #fbd5d2; border-radius: 8px; background: #fdf1f1; color: var(--error); font-size: 14px; font-weight: 600; }
.options { display: grid; gap: 8px; }
.option { display: grid; grid-template-columns: 24px 1fr; gap: 14px; align-items: center; width: 100%; min-height: 56px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1.4; text-align: left; transition: border-color .18s, background .18s; }
.option:hover { border-color: #a3b8b1; background: var(--bg); }
.option.is-selected { border-color: var(--brand); background: var(--pale); color: var(--text); font-weight: 500; }
.choice-box { position: relative; display: block; width: 22px; height: 22px; border: 1.5px solid #a3b8b1; border-radius: 6px; background: #fff; }
.option.radio .choice-box { border-radius: 50%; }
.option.is-selected .choice-box { border-color: var(--brand); background: var(--brand); }
.choice-box::after { position: absolute; top: 6px; left: 6px; display: none; width: 8px; height: 4px; border-bottom: 2px solid #fff; border-left: 2px solid #fff; content: ""; transform: rotate(-45deg); }
.option.is-selected .choice-box::after { display: block; }
.option.radio .choice-box::after { top: 5px; left: 5px; width: 8px; height: 8px; border: 0; border-radius: 50%; background: #fff; transform: none; }

.matrix { overflow-x: auto; }
.matrix-header, .matrix-row { display: grid; grid-template-columns: minmax(180px, 1.5fr) repeat(var(--scale-count), minmax(112px, 1fr)); gap: 6px; min-width: 820px; }
.matrix-header { margin-bottom: 6px; }
.matrix-header div { display: flex; align-items: flex-end; justify-content: center; padding: 4px 7px 10px; color: var(--muted); font-size: 12px; line-height: 1.15; text-align: center; }
.matrix-row { align-items: stretch; border-radius: 8px; }
.matrix-row:nth-child(odd) { background: var(--bg); }
.matrix-label { display: flex; align-items: center; padding: 12px 16px 12px 4px; color: var(--text); font-size: 15px; font-weight: 500; line-height: 1.35; }
.matrix-choice { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.matrix-choice:hover { border-color: #a3b8b1; background: var(--bg); }
.matrix-choice.is-selected { border-color: var(--brand); background: var(--pale); }
.matrix-dot { position: relative; display: block; width: 16px; height: 16px; border: 1.5px solid #a3b8b1; border-radius: 50%; background: #fff; }
.matrix-choice.is-selected .matrix-dot { border-color: var(--brand); background: var(--brand); }
.matrix-choice.is-selected .matrix-dot::after { position: absolute; top: 4px; left: 4px; width: 6px; height: 3px; border-bottom: 1.6px solid #fff; border-left: 1.6px solid #fff; content: ""; transform: rotate(-45deg); }
.matrix-choice-label { display: none; }
.raffle { margin-top: 40px; padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.raffle-intro { max-width: 58ch; margin: 0; color: var(--text); font-size: 16px; font-weight: 500; line-height: 1.4; }
.raffle label { display: block; max-width: 420px; margin-top: 18px; color: var(--muted); font-size: 14px; }
.raffle input { width: 100%; margin-top: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; }
.raffle input[aria-invalid="true"] { border-color: var(--error); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 28px; border-top: 1px solid #eff1f0; }
.nav .button-row { margin: 0; }
.center { max-width: 720px; text-align: center; }
.center .accent { margin-right: auto; margin-left: auto; }
.center h2 { margin: 0 auto; }
.center .intro-copy { margin-right: auto; margin-left: auto; }
.footer { border-top: 1px solid var(--line); background: #fff; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 1420px; margin: 0 auto; padding: 30px 28px 36px; }
.credit { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 0; color: var(--muted); font-size: 13px; text-align: center; }
.credit img { width: auto; height: 16px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.footer-links a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }

@media (max-width: 980px) {
  .layout { padding-right: 28px; padding-left: 28px; }
  .header-inner { min-height: 64px; padding: 10px 18px; }
  .brand img { height: 38px; }
  .brand .divider, .brand .title, .progress-module { display: none; }
  .progress { gap: 12px; }
  .progress-track { width: 100%; }
  .layout { grid-template-columns: 1fr; padding: 26px 18px 48px; }
  .rail { display: none; }
  .prize-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .card { padding: 24px 20px; border-radius: 16px; }
  .prize, .raffle { padding: 20px; }
  .prize-item { grid-template-columns: 84px 1fr; }
  .prize-item img { max-width: 84px; }
  .question-head { grid-template-columns: 1fr; gap: 5px; }
  .question-hint, .question-error { margin-left: 0; }
  .matrix { overflow: visible; }
  .matrix-header { display: none; }
  .matrix-row { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; margin-bottom: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff !important; }
  .matrix-label { flex: 1 0 100%; padding: 0 0 4px; color: var(--ink); font-size: 16px; font-weight: 600; }
  .matrix-choice { flex: 1 1 calc(50% - 4px); justify-content: flex-start; gap: 10px; min-height: 48px; padding: 12px 14px; }
  .matrix-choice-label { display: block; color: var(--muted); font-size: 14px; line-height: 1.25; }
  .matrix-choice.is-selected .matrix-choice-label { color: var(--text); }
  .nav { align-items: flex-start; }
  .footer-inner { padding: 26px 18px 30px; }
}

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