@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300&family=Inter+Tight:wght@300;400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap");

:root {
  --mint: #d5ecdf;
  --paper: #f3faf6;
  --ink: #141414;
  --ink-2: #4a5a53;
  --line: #141414;
  --pink: #ffb3c9;
  --blue: #3a4dff;
  --yellow: #ffe15a;
  --red: #ff5232;
  --green: #2e8a5b;
  --accent: var(--pink);
  --on-accent: var(--ink);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter Tight", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
}
.c-pink { --accent: var(--pink); --on-accent: var(--ink); }
.c-blue { --accent: var(--blue); --on-accent: #fff; }
.c-yellow { --accent: var(--yellow); --on-accent: var(--ink); }
.c-red { --accent: var(--red); --on-accent: var(--ink); }
.c-green { --accent: var(--green); --on-accent: #fff; }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--mint); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button { font: inherit; cursor: pointer; color: inherit; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); }
.label { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.snow, .confetti { position: fixed; inset: 0; pointer-events: none; }
.snow { z-index: 1; }
.confetti { z-index: 60; }

/* ============ shared bits ============ */
.sticker { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600; white-space: nowrap; }
.sticker .em { font-size: 1.25em; line-height: 1; }
.sticker .sub { font-family: var(--mono); font-weight: 400; font-size: .72em; opacity: .75; }
.sticker.off { background: transparent; color: var(--ink); border-style: dashed; opacity: .55; }
.marquee { overflow: hidden; white-space: nowrap; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); background: var(--accent); color: var(--on-accent); }
.marquee .track { display: inline-block; padding: 10px 0; font-family: var(--mono); font-size: 15px; letter-spacing: .08em; text-transform: uppercase; animation: marq 28s linear infinite; }
@keyframes marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.8) rotate(-3deg); opacity: 0; } 60% { transform: scale(1.06) rotate(1deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
@keyframes stamp { 0% { transform: scale(2.2) rotate(-14deg); opacity: 0; } 70% { transform: scale(.94) rotate(-6deg); opacity: 1; } 100% { transform: scale(1) rotate(-6deg); } }
@keyframes wobble { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
.enter > * { animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.enter > *:nth-child(2) { animation-delay: .07s; } .enter > *:nth-child(3) { animation-delay: .14s; } .enter > *:nth-child(4) { animation-delay: .21s; } .enter > *:nth-child(5) { animation-delay: .28s; }

/* ============ HOST ============ */
.host { min-height: 100vh; display: flex; flex-direction: column; position: relative; z-index: 2; }
.frame-corner { position: fixed; z-index: 4; font-family: var(--mono); font-size: 13px; line-height: 1.35; letter-spacing: .04em; text-transform: uppercase; pointer-events: none; }
.fc-tl { top: 22px; left: 28px; } .fc-tr { top: 22px; right: 28px; text-align: right; }
.fc-bl { bottom: 22px; left: 28px; } .fc-br { bottom: 22px; right: 28px; text-align: right; }
.host .stage { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 96px 9vw 110px; gap: 28px; }
.host.full { background: var(--accent); color: var(--on-accent); }
.host.full .frame-corner { color: var(--on-accent); }

.display { font-family: var(--serif); font-weight: 300; line-height: .92; letter-spacing: -.02em; margin: 0; }
.d-xl { font-size: clamp(70px, 10vw, 190px); }
.d-l { font-size: clamp(54px, 6.6vw, 120px); }
.d-m { font-size: clamp(40px, 4.4vw, 80px); }
.quote { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(44px, 5vw, 92px); line-height: 1; letter-spacing: -.02em; margin: 0; }
.qtext { font-family: var(--sans); font-weight: 500; font-size: clamp(24px, 2.2vw, 40px); letter-spacing: -.02em; margin: 0; }
.qsub { font-family: var(--mono); font-size: clamp(14px, 1.1vw, 18px); opacity: .75; margin: 0; }
.tag { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; padding: 6px 12px; background: var(--accent); color: var(--on-accent); border: 1.5px solid var(--ink); }

/* round intro */
.bignum { font-family: var(--sans); font-weight: 300; font-size: clamp(180px, 34vh, 420px); line-height: .78; letter-spacing: -.07em; margin: 0 0 0 -.06em; }
.roundgrid { display: grid; grid-template-columns: auto 1fr; gap: 5vw; align-items: end; }
.roundgrid .blurb { font-size: clamp(20px, 1.7vw, 30px); max-width: 32ch; font-weight: 400; letter-spacing: -.01em; }
.host.full .marquee { position: fixed; left: 0; right: 0; bottom: 64px; z-index: 3; background: var(--ink); color: var(--accent); border-color: var(--ink); }

/* lobby */
.lobbygrid { display: grid; grid-template-columns: 1fr auto; gap: 6vw; align-items: center; }
.joinbox { display: inline-block; font-family: var(--mono); font-size: clamp(20px, 1.8vw, 30px); padding: 12px 18px; border: 1.5px solid var(--ink); background: var(--paper); }
#qr { padding: 18px; background: var(--paper); border: 1.5px solid var(--ink); position: relative; }
#qr::after { content: "SCAN TO JOIN"; position: absolute; left: 0; right: 0; bottom: -30px; text-align: center; font-family: var(--mono); font-size: 13px; letter-spacing: .1em; }
.stickers { display: flex; flex-wrap: wrap; gap: 12px; }
.stickers .sticker { font-size: clamp(16px, 1.3vw, 22px); animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.stickers .sticker:nth-child(odd) { transform: rotate(-2deg); } .stickers .sticker:nth-child(even) { transform: rotate(1.5deg); }

/* question */
.qgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: 5vw; align-items: center; }
.qgrid.nomedia { grid-template-columns: 1fr; }
.qcol { display: flex; flex-direction: column; gap: 22px; }
.media { position: relative; border: 1.5px solid var(--ink); background: var(--paper); padding: 12px 12px 36px; transform: rotate(1.2deg); box-shadow: 10px 10px 0 var(--accent); }
.media img, .media video { display: block; width: 100%; max-height: 60vh; object-fit: contain; background: #eaf4ee; }
.media .cap { position: absolute; left: 14px; bottom: 9px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.answered { display: flex; flex-wrap: wrap; gap: 10px; }
.answered .sticker { font-size: 15px; transition: all .3s; }
.answered .sticker.on { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1) both; }
.hint { font-family: var(--mono); font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }

/* reveal */
.reveal-ans { align-self: flex-start; font-family: var(--sans); font-weight: 600; font-size: clamp(44px, 5vw, 96px); letter-spacing: -.04em; line-height: 1; padding: 14px 26px 18px; background: var(--accent); color: var(--on-accent); border: 2px solid var(--ink); animation: stamp .6s cubic-bezier(.3, 1.5, .5, 1) both; transform: rotate(-6deg); box-shadow: 8px 8px 0 var(--ink); }
.reveal-ans small { display: block; font-family: var(--mono); font-weight: 400; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.restable { width: 100%; border-collapse: collapse; font-size: clamp(18px, 1.45vw, 26px); }
.restable td { padding: 10px 6px; border-bottom: 1.5px solid var(--ink); }
.restable tr { animation: rise .45s both; }
.restable tr:nth-child(2) { animation-delay: .08s; } .restable tr:nth-child(3) { animation-delay: .16s; } .restable tr:nth-child(4) { animation-delay: .24s; } .restable tr:nth-child(5) { animation-delay: .32s; }
.restable td.n { font-family: var(--mono); text-align: right; white-space: nowrap; }
.restable .pt { display: inline-block; min-width: 46px; text-align: center; padding: 2px 8px; font-family: var(--mono); font-weight: 700; background: var(--accent); color: var(--on-accent); border: 1.5px solid var(--ink); }
.restable tr.miss { opacity: .45; }
.winner-big { display: flex; flex-wrap: wrap; gap: 16px; }
.winner-big .sticker { font-size: clamp(28px, 2.6vw, 48px); padding: 14px 26px 14px 18px; animation: pop .6s cubic-bezier(.3, 1.6, .5, 1) both; }

/* leaderboard: the sleigh race */
.race { display: flex; flex-direction: column; gap: 12px; }
.lane { position: relative; display: grid; grid-template-columns: 52px minmax(180px, 280px) 1fr 70px; align-items: center; gap: 18px; }
.lane .rk { font-family: var(--sans); font-weight: 300; font-size: clamp(30px, 2.6vw, 48px); letter-spacing: -.05em; }
.lane .who { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lane .who b { font-weight: 600; font-size: clamp(18px, 1.5vw, 26px); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane .title { font-family: var(--mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; opacity: .8; }
.track { position: relative; height: 54px; border: 1.5px solid var(--ink); background: repeating-linear-gradient(90deg, transparent 0 38px, rgba(20, 20, 20, .08) 38px 40px), var(--paper); }
.track .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); border-right: 1.5px solid var(--ink); transition: width 1.6s cubic-bezier(.2, .8, .2, 1); }
.track .rider { position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%); font-size: 36px; transition: left 1.6s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .25)); animation: wobble 1.2s ease-in-out infinite; }
.track .finish { position: absolute; right: -2px; top: -2px; bottom: -2px; width: 14px; background: repeating-conic-gradient(var(--ink) 0 25%, #fff 0 50%) 0 0 / 7px 7px; border: 1.5px solid var(--ink); }
.lane .sc { font-family: var(--sans); font-weight: 600; font-size: clamp(28px, 2.4vw, 44px); text-align: right; letter-spacing: -.04em; }
.move { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border: 1.5px solid var(--ink); margin-left: 6px; vertical-align: 2px; }
.move.up { background: var(--green); color: #fff; } .move.down { background: var(--red); }
.facts { display: flex; flex-wrap: wrap; gap: 12px; }
.fact { font-family: var(--mono); font-size: 14px; text-transform: uppercase; letter-spacing: .04em; padding: 8px 12px; border: 1.5px solid var(--ink); background: var(--paper); }
.podium { display: flex; align-items: flex-end; gap: 18px; }
.pod { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pod .em { font-size: clamp(60px, 6vw, 110px); animation: wobble 1.4s ease-in-out infinite; }
.pod .block { width: 100%; border: 2px solid var(--ink); background: var(--accent); color: var(--on-accent); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 14px 10px; text-align: center; animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.pod .block .pn { font-family: var(--sans); font-weight: 300; font-size: clamp(50px, 5vw, 90px); line-height: .9; letter-spacing: -.06em; }
.pod .block b { font-size: clamp(18px, 1.6vw, 28px); letter-spacing: -.02em; }
.pod .block .pts { font-family: var(--mono); font-size: 14px; margin-top: 4px; }

/* host controls */
.controls { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 70; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; max-width: calc(100vw - 340px); padding: 8px 10px; background: var(--paper); border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); font-size: 13px; }
.controls.collapsed > :not(.always) { display: none; }
.controls button { padding: 8px 12px; border: 1.5px solid var(--ink); background: var(--paper); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.controls button.primary { background: var(--ink); color: var(--paper); }
.controls button.hot { background: var(--red); }
.controls button.on { background: var(--green); color: #fff; }
.controls button:disabled { opacity: .35; }
.controls select, .controls input { font: 12px var(--mono); padding: 7px; border: 1.5px solid var(--ink); background: #fff; }
.controls .sep { width: 1.5px; align-self: stretch; background: var(--ink); opacity: .3; }
.controls .lbl { font-family: var(--mono); font-size: 11px; text-transform: uppercase; opacity: .7; }
#fix { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex-basis: 100%; justify-content: center; }

/* ============ PHONE ============ */
.phone { position: relative; z-index: 2; max-width: 520px; margin: 0 auto; min-height: 100vh; padding: 16px 16px 40px; display: flex; flex-direction: column; gap: 16px; }
.ptop { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; padding-bottom: 10px; border-bottom: 1.5px solid var(--ink); }
.ptop a { color: inherit; }
.phone h1 { font-family: var(--serif); font-weight: 300; font-size: 46px; line-height: .95; letter-spacing: -.02em; margin: 0; }
.phone h2 { font-family: var(--sans); font-weight: 600; font-size: 24px; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.pquote { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 30px; line-height: 1.05; }
.pcard { border: 1.5px solid var(--ink); background: var(--paper); padding: 16px; }
.pcard.acc { background: var(--accent); color: var(--on-accent); }
.pbtn { display: block; width: 100%; text-align: left; padding: 15px 16px; border: 1.5px solid var(--ink); background: var(--paper); font-size: 18px; font-weight: 500; }
.pbtn.sel { background: var(--ink); color: var(--paper); }
.pbtn.right { background: var(--green); color: #fff; }
.pbtn.wrong { opacity: .4; }
.pbtn.go { background: var(--ink); color: var(--paper); text-align: center; font-weight: 600; }
.pbtn.go:disabled { opacity: .35; }
.stack { display: grid; gap: 8px; }
.search { width: 100%; font: 500 18px var(--sans); padding: 14px; border: 1.5px solid var(--ink); background: #fff; border-radius: 0; }
.namegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.namegrid .pbtn { text-align: center; padding: 13px 8px; }
.chosen { display: flex; gap: 8px; flex-wrap: wrap; min-height: 42px; }
.numrow { display: flex; gap: 8px; }
.numrow input { flex: 1; min-width: 0; font: 700 26px var(--mono); padding: 14px; border: 1.5px solid var(--ink); background: #fff; border-radius: 0; }
.numrow .pbtn { width: auto; }
.bigpts { font-family: var(--sans); font-weight: 300; font-size: 84px; line-height: .9; letter-spacing: -.06em; animation: pop .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.pmeta { font-family: var(--mono); font-size: 12px; letter-spacing: .03em; text-transform: uppercase; opacity: .8; }
.emojis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.emojis button { font-size: 28px; padding: 8px 0; border: 1.5px solid var(--ink); background: var(--paper); }
.emojis button.sel { background: var(--accent); transform: scale(1.08); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 80; background: var(--ink); color: var(--paper); padding: 10px 16px; font-family: var(--mono); font-size: 13px; }
.phone .marquee { margin: 0 -16px; }
.lb { display: grid; gap: 6px; }
.lb .row { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; padding: 10px; border: 1.5px solid var(--ink); background: var(--paper); }
.lb .row.me { background: var(--accent); color: var(--on-accent); }
.lb .rk { font-weight: 300; font-size: 26px; letter-spacing: -.05em; }
.lb .sc { font-family: var(--mono); font-weight: 700; font-size: 18px; }
@media (max-width: 1100px) {
  .host .stage { padding: 90px 5vw 120px; }
  .qgrid, .lobbygrid, .roundgrid { grid-template-columns: 1fr; }
  .controls { max-width: calc(100vw - 20px); }
  .lane { grid-template-columns: 36px minmax(120px, 1fr) 1.4fr 50px; }
}

/* ---------- garland + slow reveal ---------- */
.garland { position: fixed; top: 0; left: 170px; right: 170px; z-index: 3; pointer-events: none; }
.garland .orn { animation: swing 4s ease-in-out infinite alternate; }
@keyframes swing { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
.host .stage { padding-top: 170px; }
.host.full .garland path, .host.full .garland line { stroke: var(--on-accent); }
.phone .garland { position: relative; left: auto; right: auto; top: auto; margin: -6px -8px -6px; }
.slow img { animation: unblur var(--dur, 30s) linear both; animation-delay: var(--delay, 0s); transform-origin: var(--ox, 50%) var(--oy, 40%); }
@keyframes unblur { 0% { filter: blur(34px) saturate(.4); transform: scale(2.6); } 40% { filter: blur(16px) saturate(.7); transform: scale(1.8); } 75% { filter: blur(5px); transform: scale(1.2); } 100% { filter: blur(0); transform: scale(1); } }
.slow { overflow: hidden; }
.slow .imgwrap { overflow: hidden; }
.worth { display: inline-flex; align-items: baseline; gap: 12px; align-self: flex-start; padding: 10px 18px; border: 2px solid var(--ink); background: var(--accent); color: var(--on-accent); font-family: var(--sans); font-weight: 600; font-size: clamp(26px, 2.4vw, 42px); letter-spacing: -.03em; box-shadow: 6px 6px 0 var(--ink); }
.worth small { font-family: var(--mono); font-weight: 400; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.sticker.setup { opacity: .6; border-style: dashed; }
