@font-face { font-family: "Instrument Serif"; src: url(/fonts/instrument-serif-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/instrument-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/instrument-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --paper: #ffffff; --surface: #f5f5f3; --grey-100: #e8e8e5; --grey-300: #c4c4c0; --grey-500: #767672; --grey-700: #4a4a47;
  --ink: #0b0b0b; --on-ink: #ffffff; --volt: #d4ff3a; --on-volt: #0b0b0b; --violet: #6a2cf5; --mint: #00d4a6; --error: #b42318;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 20px; --tap: 52px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--on-ink); font-family: var(--sans); -webkit-text-size-adjust: 100%; }
body { overscroll-behavior: none; }
#app { min-height: 100dvh; display: flex; flex-direction: column; padding: max(24px, env(safe-area-inset-top)) var(--gutter) max(24px, env(safe-area-inset-bottom)); }

/* Shell screens: door, camera check, sitting, waiting */
.shell { flex: 1; display: flex; flex-direction: column; gap: 20px; max-width: 560px; width: 100%; margin: 0 auto; }
.shell h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 10vw, 52px); line-height: 1.05; margin: 24px 0 0; letter-spacing: -0.01em; }
.shell p { font-size: 17px; line-height: 1.45; margin: 0; color: #d8d8d4; }
.shell .grow { flex: 1; }
.choices { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.choice { display: flex; gap: 14px; align-items: center; min-height: var(--tap); padding: 14px 16px; border: 1px solid #3d3d3d; border-radius: 2px; font-size: 17px; line-height: 1.3; cursor: pointer; }
.choice input { width: 22px; height: 22px; accent-color: var(--volt); flex: none; margin: 0; }
.choice:has(input:checked) { border-color: var(--volt); background: #1b2008; }
.note { font-size: 15px !important; color: #a8a8a4 !important; }
button.primary, button.secondary { font: 500 18px/1 var(--sans); min-height: 56px; width: 100%; border-radius: 9999px; border: 0; cursor: pointer; padding: 0 24px; }
button.primary { background: var(--volt); color: var(--on-volt); }
button.secondary { background: transparent; color: var(--on-ink); border: 1px solid #5a5a56; }
button:disabled { opacity: .5; }
.buttons { display: flex; flex-direction: column; gap: 12px; }

.camera { position: relative; width: min(72vw, 300px); aspect-ratio: 1; margin: 8px auto; border-radius: 50%; overflow: hidden; background: #161616; border: 3px solid var(--volt); }
.camera video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }

.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--volt); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }

/* The stage */
.stage { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px; max-width: 640px; width: 100%; margin: 0 auto; }
.stage .lead { font-size: 20px; color: #b8b8b4; margin: 0; }
.stage .line { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 11.5vw, 68px); line-height: 1.04; margin: 0; letter-spacing: -0.01em; }
.stage.in .line, .stage.in .lead { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; }
.stage.in .line { animation-delay: .05s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.stage.big .line { font-size: clamp(56px, 16vw, 104px); color: var(--volt); }
.stage.dark { background: transparent; }
.stage .answers { display: flex; gap: 12px; width: 100%; margin-top: 18px; }
.stage .answers button { flex: 1; }
.count { font-family: var(--serif); font-size: clamp(120px, 40vw, 220px); line-height: 1; margin: 0 auto; align-self: center; }

/* The news. Same screen, same timing, same weight for both words. */
.news { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; position: relative; }
.news .pre { font-family: var(--serif); font-size: clamp(44px, 13vw, 80px); line-height: 1; margin: 0; color: var(--on-ink); animation: land .7s cubic-bezier(.15,.8,.2,1.1) .15s both; }
.news .word { font-family: var(--serif); font-size: clamp(120px, 38vw, 260px); line-height: .95; margin: 0; color: var(--volt); animation: land 1s cubic-bezier(.15,.8,.2,1.15) .3s both; }
@keyframes land { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: none; } }
.burst, .fall { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.news .pre, .news .word { position: relative; z-index: 1; }
.burst i { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; border-radius: 50%; opacity: 0; animation: fly 1.8s ease-out .3s forwards; }
@keyframes fly { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(.4); } }
.fall i { position: absolute; top: -20px; width: 9px; height: 15px; border-radius: 2px; opacity: .95; animation: drop var(--d) linear var(--w) 2 both; }
@keyframes drop { from { transform: translate(0, 0) rotate(0); } to { transform: translate(var(--sx), 110vh) rotate(var(--r)); } }
.news .sub { font-family: var(--serif); font-size: clamp(30px, 8.5vw, 48px); line-height: 1.1; margin: 28px 0 0; min-height: 1.2em; color: var(--on-ink); position: relative; z-index: 1; }
.news .sub.in { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; }
.news .after { position: absolute; bottom: 8px; left: 0; right: 0; font-size: 15px; color: #a8a8a4; }
#flash.volt { background: var(--volt); }

#flash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 10; }
#flash.on { animation: flash 1.1s ease-out; }
@keyframes flash { 0% { opacity: 0; } 8% { opacity: 1; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) { * { animation-duration: .01s !important; } }
