:root {
  color-scheme: light;
  --ink: #102b2a;
  --muted: #607672;
  --paper: #f5efe3;
  --card: rgba(255, 255, 255, 0.93);
  --teal: #0f756e;
  --coral: #db6846;
  --gold: #edb75d;
  --line: #d9e1dc;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 15% 10%, rgba(237, 183, 93, 0.32), transparent 30rem),
    radial-gradient(circle at 90% 80%, rgba(15, 117, 110, 0.18), transparent 34rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

button, a { font: inherit; }
button { cursor: pointer; }

.shell { width: min(1100px, 100%); height: 100svh; margin: 0 auto; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 18px clamp(16px, 4vw, 52px) 28px; }
.shell::-webkit-scrollbar { display: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 15px; background: var(--teal); color: white; font-size: 21px; font-weight: 900; box-shadow: 0 10px 28px rgba(15, 117, 110, 0.23); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.ghost-button { border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.66); padding: 9px 14px; color: var(--muted); font-size: 12px; font-weight: 800; }

.hero { display: grid; align-items: center; gap: clamp(28px, 7vw, 72px); min-height: calc(100svh - 100px); padding: 24px 0; }
.eyebrow, .card-kicker { margin: 0; color: var(--coral); font-size: 12px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
h1 { max-width: 760px; margin: 14px 0 0; font-size: clamp(43px, 7.8vw, 84px); line-height: .95; letter-spacing: -.065em; }
.lead { max-width: 670px; margin: 24px 0 0; color: var(--muted); font-size: clamp(17px, 2.2vw, 21px); line-height: 1.6; }
.start-card, .event-card, .finish { border: 1px solid rgba(255,255,255,.9); border-radius: 30px; background: var(--card); box-shadow: 0 25px 80px rgba(21, 62, 58, .12); }
.start-card { padding: clamp(20px, 4vw, 30px); }
.budget-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 18px 0; }
.budget-option { border: 2px solid var(--line); border-radius: 18px; background: #f8fbf9; padding: 14px 8px; color: var(--ink); }
.budget-option strong, .budget-option span { display: block; }
.budget-option strong { font-size: 17px; }
.budget-option span { margin-top: 3px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.budget-option.active { border-color: var(--teal); background: #e8f3f0; color: var(--teal); box-shadow: 0 0 0 3px rgba(15,117,110,.08); }
.primary-button, .secondary-button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; border-radius: 999px; padding: 0 22px; font-weight: 900; text-decoration: none; }
.primary-button { width: 100%; border: 0; background: var(--coral); color: white; box-shadow: 0 12px 28px rgba(219,104,70,.24); }
.primary-button:hover, .primary-button:focus-visible { background: #c95839; }
.primary-button[disabled], .secondary-button[disabled] { cursor: wait; opacity: .55; }
.secondary-button { border: 1px solid var(--line); background: white; color: var(--teal); }
.start-card > .secondary-button { width: 100%; margin-top: 9px; }
.best-score { min-height: 16px; margin: 13px 0 0; color: var(--teal); font-size: 12px; font-weight: 800; text-align: center; }
.privacy-note { margin: 12px 0 0; color: #7d8e8a; font-size: 11px; line-height: 1.45; text-align: center; }

.game { padding: 22px 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stats article { border: 1px solid rgba(255,255,255,.8); border-radius: 18px; background: rgba(255,255,255,.74); padding: 10px 14px; }
.stats span, .stats strong { display: block; }
.stats span { color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.stats strong { margin-top: 5px; font-size: clamp(15px, 2.2vw, 22px); }
.progress-track { height: 8px; margin: 10px 0 14px; overflow: hidden; border-radius: 999px; background: rgba(16,43,42,.12); }
.progress-fill { width: 14.285%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--coral)); transition: width .3s ease; }
.event-card { padding: clamp(20px, 3vw, 28px); }
.event-heading { display: flex; align-items: center; gap: 16px; }
.event-icon { display: grid; width: 58px; height: 58px; flex: 0 0 auto; place-items: center; border-radius: 20px; background: #fff4d8; font-size: 28px; }
.event-card h2, .finish h2 { margin: 6px 0 0; font-size: clamp(30px, 5vw, 50px); line-height: 1; letter-spacing: -.05em; }
.event-copy { margin: 14px 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.choices { display: grid; gap: 8px; }
.choice { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; width: 100%; border: 1px solid var(--line); border-radius: 19px; background: #fbfdfc; padding: 10px 14px; color: var(--ink); text-align: left; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.choice:hover, .choice:focus-visible { transform: translateY(-2px); border-color: #88b2aa; background: #edf7f4; outline: 0; }
.choice strong, .choice small { display: block; }
.choice small { margin-top: 5px; color: var(--muted); }
.choice-cost { border-radius: 999px; background: #f2e6d3; padding: 7px 10px; color: #8a5e1d; font-size: 12px; font-weight: 900; white-space: nowrap; }
.choice[disabled] { cursor: default; opacity: .55; transform: none; }
.outcome { border-left: 4px solid var(--gold); border-radius: 0 12px 12px 0; background: #fff7e7; padding: 10px 13px; color: #6f5326; line-height: 1.45; }
.event-card > .primary-button { width: auto; margin-top: 12px; }

.finish { margin: clamp(56px, 10vw, 120px) auto; padding: clamp(28px, 7vw, 70px); text-align: center; }
.finish-score { margin: 22px 0 0; color: var(--teal); font-size: clamp(28px, 5vw, 46px); font-weight: 950; }
.finish .lead { margin-inline: auto; }
.finish-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.finish-actions .primary-button { width: auto; }
.hidden { display: none !important; }

footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 18px; color: var(--muted); font-size: 11px; }

@media (min-width: 860px) { .hero { grid-template-columns: 1.15fr .85fr; } }
@media (max-width: 640px) {
  .shell { padding: 10px 12px 14px; }
  .topbar { gap: 8px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 12px; }
  .hero { min-height: calc(100svh - 68px); padding: 24px 0; }
  h1 { font-size: clamp(36px, 12vw, 54px); }
  .lead { margin-top: 16px; font-size: 15px; line-height: 1.45; }
  .game { padding: 22px 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats article { padding: 10px; }
  .progress-track { margin: 10px 0 14px; }
  .event-card { padding: 18px; }
  .event-copy { margin: 14px 0; font-size: 15px; line-height: 1.45; }
  .choice { padding: 12px 13px; }
  .choice { grid-template-columns: 1fr; }
  .choice-cost { width: fit-content; }
  .budget-options { grid-template-columns: repeat(3, 1fr); }
  footer { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
