:root {
  --cream: #FAF6F0; --white: #fff; --ink: #17181A; --muted: #5E6168; --line: #E8E1D7;
  --coral: #E4572E; --coral-soft: #FFE3D8; --navy: #1F2A44; --navy-2: #2A3756; --butter: #FFD867; --peach: #FFB39E;
  --good: #2E9E6A;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 16px/1.5 "Inter", system-ui, sans-serif; color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; }
h1, h2, h3, .display { font-family: "Space Grotesk", "Inter", sans-serif; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
button, input, textarea, select { font: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: "Space Grotesk"; font-weight: 700; font-size: 20px; }
.beat { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.beat i { display: block; width: 4px; border-radius: 2px; background: var(--coral); }
.beat i:nth-child(1){height:40%}.beat i:nth-child(2){height:100%}.beat i:nth-child(3){height:60%}.beat i:nth-child(4){height:85%}

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; border: 2px solid var(--ink); background: var(--white); color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: none; transition: transform .1s ease, box-shadow .1s ease; }
.btn:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.btn:active { transform: none; box-shadow: none; }
.btn:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.btn-primary { background: var(--coral); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.field { width: 100%; padding: 14px 16px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; font-size: 17px; }
.field:focus { outline: 3px solid var(--butter); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: 14px; }
.card { background: var(--white); border: 2px solid var(--ink); border-radius: 18px; padding: 20px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 50; max-width: 90vw; }
.status { font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.status.off::before { background: var(--coral); }

/* ---------- host ---------- */
.host-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--white); position: sticky; top: 0; z-index: 10; flex-wrap: wrap; }
.host-top .code { font-family: "Space Grotesk"; font-weight: 700; font-size: 22px; letter-spacing: .12em; }
.steps { display: flex; gap: 6px; padding: 14px 24px 0; flex-wrap: wrap; }
.steps span { font-size: 13px; padding: 6px 12px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); color: var(--muted); }
.steps span.done { color: var(--ink); }
.steps span.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.host-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; padding: 20px 24px 120px; max-width: 1200px; margin: 0 auto; }
@media (max-width: 900px) { .host-grid { grid-template-columns: 1fr; } }
.phase-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.phase-head h1 { font-size: 34px; }
.timer { font-family: "Space Grotesk"; font-weight: 700; font-size: 34px; font-variant-numeric: tabular-nums; }
.timer.over { color: var(--coral); }
.script { margin-top: 18px; display: grid; gap: 10px; }
.script p { margin: 0; padding: 14px 16px; background: var(--coral-soft); border-left: 4px solid var(--coral); border-radius: 0 12px 12px 0; font-size: 18px; }
.tip { margin-top: 12px; font-size: 14px; color: var(--muted); }
.tip b { color: var(--ink); }
.panel { margin-top: 22px; }
.roster h3 { font-size: 16px; margin-bottom: 10px; }
.roster ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.roster li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.roster li.zero { border-color: var(--coral); background: var(--coral-soft); }
.roster .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); display: inline-block; margin-right: 6px; }
.roster .dot.off { background: #c9c3ba; }
.host-bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--white); border-top: 1px solid var(--line); padding: 14px 24px; display: flex; gap: 10px; justify-content: flex-end; z-index: 10; }
.preview { border: 2px dashed var(--line); border-radius: 14px; padding: 16px; background: var(--white); }
.preview .label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.picker { max-width: 880px; margin: 40px auto; padding: 0 24px; }
.picker .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }

/* ---------- big screen ---------- */
body.screen { background: var(--navy); color: #fff; min-height: 100vh; overflow: hidden; }
.screen .top { display: flex; justify-content: space-between; align-items: center; padding: 3vh 4vw 0; font-size: 2vh; }
.screen .top .logo { font-size: 3vh; color: #fff; }
.screen .top .beat i { background: var(--peach); }
.screen .timer { font-size: 5vh; color: var(--butter); }
.screen .stage { position: absolute; inset: 12vh 4vw 6vh; display: flex; flex-direction: column; justify-content: center; }
.screen h1 { font-size: 8vh; }
.screen .sub { font-size: 3vh; opacity: .8; margin-top: 2vh; }
.join { display: grid; grid-template-columns: auto 1fr; gap: 5vw; align-items: center; }
.join .qr { background: #fff; padding: 2vh; border-radius: 2vh; width: 42vh; height: 42vh; }
.join .qr svg, .join .qr img { width: 100%; height: 100%; display: block; }
.join .url { font-size: 3.4vh; margin-top: 2vh; }
.join .url b { color: var(--butter); letter-spacing: .08em; }
.names { display: flex; flex-wrap: wrap; gap: 1.2vh; margin-top: 4vh; }
.names span { background: rgba(255,255,255,.12); padding: 1vh 2vh; border-radius: 99px; font-size: 2.6vh; animation: pop .35s ease; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.award { text-align: center; }
.award .for { font-size: 3.2vh; letter-spacing: .2em; text-transform: uppercase; color: var(--peach); }
.award .name { font-family: "Space Grotesk"; font-weight: 700; font-size: 12vh; line-height: 1; margin: 2vh 0 4vh; animation: pop .5s ease; }
.award .text { font-size: 5vh; max-width: 70vw; margin: 0 auto; line-height: 1.25; }
.clapbar { margin: 6vh auto 0; width: 50vw; height: 1.6vh; background: rgba(255,255,255,.15); border-radius: 99px; overflow: hidden; }
.clapbar i { display: block; height: 100%; background: var(--butter); transition: width .2s ease; }
.clapcount { margin-top: 1.5vh; font-size: 2.6vh; opacity: .8; }
.bigstat { display: flex; gap: 8vw; margin-top: 5vh; }
.bigstat div b { display: block; font-family: "Space Grotesk"; font-size: 12vh; color: var(--butter); line-height: 1; }
.bigstat div span { font-size: 2.6vh; opacity: .8; }

/* ---------- player ---------- */
body.play { min-height: 100vh; }
.play-wrap { max-width: 480px; margin: 0 auto; padding: 18px 18px 40px; }
.play-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.play h1 { font-size: 30px; }
.play .lead { font-size: 17px; color: var(--muted); margin: 8px 0 20px; }
.who { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.who button { padding: 12px; border-radius: 12px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; text-align: left; }
.who button.on { border-color: var(--ink); background: var(--butter); }
textarea.field { min-height: 110px; resize: vertical; }
.counter { font-size: 13px; color: var(--muted); text-align: right; margin-top: 4px; }
.sent { margin-top: 18px; display: grid; gap: 8px; }
.sent div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.clap { width: 100%; aspect-ratio: 1 / 1; max-width: 320px; margin: 24px auto 0; display: grid; place-items: center; border-radius: 50%; background: var(--coral); color: #fff; border: 4px solid var(--ink); font-family: "Space Grotesk"; font-weight: 700; font-size: 34px; cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.clap:active { transform: scale(.96); background: #c9471f; }
.stars { display: flex; gap: 8px; justify-content: space-between; margin-top: 12px; }
.stars button { flex: 1; aspect-ratio: 1; border-radius: 14px; border: 2px solid var(--ink); background: #fff; font-family: "Space Grotesk"; font-weight: 700; font-size: 24px; cursor: pointer; }
.stars button.on { background: var(--butter); }
.inbox { display: grid; gap: 10px; margin-top: 16px; }
.inbox div { background: var(--butter); border-radius: 4px; padding: 18px; font-family: "Space Grotesk"; font-size: 19px; box-shadow: 0 10px 20px -14px rgba(0,0,0,.5); }
.inbox div:nth-child(2n) { transform: rotate(-1deg); } .inbox div:nth-child(2n+1) { transform: rotate(1deg); }

/* ---------- library ---------- */
.lib-wrap { max-width: 1100px; margin: 0 auto; padding: 32px 24px 80px; }
.lib-wrap h1 { font-size: 34px; }
.lib-wrap .lead { margin: 6px 0 20px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.lib-card { display: flex; flex-direction: column; gap: 8px; }
.lib-card p { margin: 0; }
.lib-card .btn { margin-top: auto; align-self: flex-start; }
.lib-tag { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--coral); }
.lib-meta { font-size: 14px; color: var(--muted); margin-bottom: 8px !important; }

/* ---------- stamps & superpower ---------- */
.step { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.stamps, .guesses { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stamp-btn { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; font-size: 14px; text-align: left; }
.stamp-btn .e { font-size: 20px; }
.stamp-btn.on { border-color: var(--ink); background: var(--butter); }
.stamp { display: inline-block; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--coral-soft); color: var(--ink); white-space: nowrap; }
.inbox div small { display: block; font-family: "Inter"; font-size: 12px; font-weight: 600; opacity: .7; margin-bottom: 6px; }
.screen-stamps { display: flex; flex-wrap: wrap; gap: 1.4vh; margin-top: 4vh; }
.screen-stamps span { background: rgba(255,255,255,.12); padding: 1.2vh 2.2vh; border-radius: 99px; font-size: 2.8vh; }
.stamp-big { display: inline-block; margin-top: 3vh; padding: 1vh 2.6vh; border-radius: 99px; background: rgba(255,255,255,.12); font-size: 3vh; }
.for-left { font-size: 3vh; letter-spacing: .2em; text-transform: uppercase; color: var(--peach); margin-bottom: 2vh; }
.award .name.power { font-size: 9vh; color: var(--butter); animation: pop .7s ease; }
.bars { display: grid; gap: 8px; margin: 8px 0; }
.bar { display: grid; grid-template-columns: 200px 1fr 40px; align-items: center; gap: 10px; font-size: 14px; }
.bar .bt { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar .bt i { display: block; height: 100%; background: var(--muted); border-radius: 99px; }
.bar.win { font-weight: 700; }
.bar.win .bt i { background: var(--coral); }
.bars.big { width: 60vw; margin: 4vh auto 2vh; gap: 1.6vh; text-align: left; }
.bars.big .bar { grid-template-columns: 34vh 1fr 6vh; font-size: 2.6vh; }
.bars.big .bt { height: 1.6vh; background: rgba(255,255,255,.15); }
.bars.big .bt i { background: rgba(255,255,255,.45); transition: width 1.2s ease; }
.bars.big .bar.win .bt i { background: var(--butter); }

/* ---------- most likely to ---------- */
.screen h1.q { font-size: 9vh; max-width: 88vw; }
.rules { margin-top: 5vh; display: grid; gap: 2vh; }
.rules p { margin: 0; font-size: 3.4vh; }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(34vh, 1fr)); gap: 1.6vh; margin-top: 4vh; }
.wall .tile { background: rgba(255,255,255,.1); border-radius: 1.6vh; padding: 2vh 2.4vh; animation: pop .5s ease both; }
.wall .tile b { display: block; font-family: "Space Grotesk"; font-size: 3.4vh; color: var(--butter); }
.wall .tile span { font-size: 2.2vh; opacity: .9; }
.wall .tile.wild b { color: var(--peach); }

/* ---------- team museum ---------- */
.tm-count { font-family: "Space Grotesk"; font-weight: 700; font-size: 14vh; color: var(--butter); line-height: 1; }
.tm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(26vh, 1fr)); gap: 1.6vh; margin: 1vh 0 2vh; max-height: 64vh; overflow: hidden; }
.tm-grid figure { position: relative; margin: 0; background: #fff; padding: 1vh 1vh 0; border-radius: .6vh; color: var(--ink); animation: pop .4s ease both; }
.tm-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.tm-grid figcaption { font-size: 2vh; padding: .8vh 0 1vh; min-height: 3.4vh; font-family: "Space Grotesk"; font-weight: 700; }
.tm-grid .num, .tm-pick .num { position: absolute; top: 1.4vh; left: 1.4vh; background: var(--ink); color: #fff; border-radius: 99px; min-width: 3.4vh; height: 3.4vh; display: grid; place-items: center; font-size: 1.8vh; font-weight: 700; }
.tm-grid.small { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); max-height: none; gap: 8px; }
.tm-grid.small figure { padding: 6px 6px 0; border: 1px solid var(--line); }
.tm-grid.small figcaption { font-size: 12px; min-height: 18px; padding: 4px 0 6px; }
.tm-grid.vote { grid-template-columns: 1fr 1fr; max-height: none; gap: 10px; margin-top: 14px; }
.tm-pick { position: relative; padding: 6px; border: 3px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; text-align: left; }
.tm-pick img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border-radius: 6px; }
.tm-pick .num { top: 12px; left: 12px; min-width: 24px; height: 24px; font-size: 12px; }
.tm-pick .cap { display: block; font-size: 13px; font-weight: 600; padding: 6px 2px 2px; min-height: 22px; }
.tm-pick.on { border-color: var(--coral); background: var(--coral-soft); }
.tm-pick.mine { opacity: .45; cursor: default; }
.tm-mine { margin-top: 16px; }
.tm-mine img { width: 100%; max-width: 360px; border-radius: 12px; display: block; margin-bottom: 8px; }
.tm-timer { font-family: "Space Grotesk"; font-weight: 700; font-size: 22px; color: var(--coral); }
.tm-row { display: flex; gap: 14px; align-items: center; margin-top: 8px; }
.tm-thumb { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; }
.tm-win { display: grid; grid-template-columns: 60vh 1fr; gap: 5vw; align-items: center; }
.tm-win img { width: 60vh; height: 60vh; object-fit: cover; border: 1.4vh solid #fff; border-radius: .6vh; box-shadow: 0 3vh 6vh -3vh rgba(0,0,0,.6); animation: pop .6s ease; }
.tm-win h1 { font-size: 9vh; color: var(--butter); }
.tm-museum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.4vh; margin-top: 4vh; }
.tm-museum figure { margin: 0; background: #fff; color: var(--ink); padding: 1.4vh; border-radius: .6vh; animation: pop .6s ease both; }
.tm-museum figure:nth-child(2) { animation-delay: .2s } .tm-museum figure:nth-child(3) { animation-delay: .4s } .tm-museum figure:nth-child(4) { animation-delay: .6s }
.tm-museum figure.main { outline: .6vh solid var(--butter); }
.tm-museum img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.tm-museum figcaption { padding-top: 1.2vh; display: grid; gap: .4vh; }
.tm-museum small { font-size: 1.6vh; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--coral); }
.tm-museum b { font-family: "Space Grotesk"; font-size: 2.6vh; }
.tm-museum span { font-size: 1.7vh; color: var(--muted); }
.tm-museum em { font-size: 1.7vh; font-style: normal; font-weight: 600; }
.tm-museum.phone { grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.tm-museum.phone figure { padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.tm-museum.phone small { font-size: 10px; } .tm-museum.phone b { font-size: 15px; } .tm-museum.phone em { font-size: 12px; }
.tm-count { transition: color .3s ease; }
.tm-count.hurry { color: var(--coral); animation: pulse 1s ease infinite; }
.tm-count.done { font-size: 9vh; color: var(--coral); animation: none; }
@keyframes pulse { 50% { transform: scale(1.06); } }
/* Who's Who */
.who.one { grid-template-columns: 1fr; }
.who.one button { font-weight: 500; line-height: 1.35; }
.wall.dense { grid-template-columns: repeat(auto-fill, minmax(26vh, 1fr)); gap: 1.2vh; }
.wall.dense .tile { padding: 1.4vh 1.8vh; }
.wall.dense .tile b { font-size: 2.6vh; }
.wall.dense .tile span { font-size: 1.8vh; }
.award.reveal .text { font-family: "Space Grotesk"; }
/* Library: team mood filter */
.mood-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 18px; }
.mood-row .chip { cursor: pointer; min-width: 34px; }
.mood-row .chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
/* Mood Check */
.mc-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 18px; }
.mc-pick button { aspect-ratio: 1; border-radius: 14px; border: 2px solid var(--line); background: #fff; font: 700 22px "Space Grotesk"; cursor: pointer; }
.mc-pick button.on { border-color: var(--ink); background: var(--butter); }
.mc-scale { display: flex; justify-content: space-between; max-width: 70vw; margin-top: 3vh; font-size: 2.6vh; opacity: .8; }
.mc-scale.small { max-width: none; font-size: 13px; margin-top: 8px; }
.mc-result { display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; align-items: end; }
.mc-avg { font-family: "Space Grotesk"; font-weight: 700; font-size: 26vh; line-height: 1; color: var(--butter); animation: pop .6s ease; }
.mc-label { font-family: "Space Grotesk"; font-weight: 700; font-size: 6vh; margin: 1vh 0 2vh; }
.mc-bars { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; height: 140px; margin-top: 18px; }
.mc-bars div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.mc-bars i { display: block; width: 100%; min-height: 3px; background: var(--coral); border-radius: 4px 4px 0 0; }
.mc-bars span { font-size: 12px; opacity: .7; }
.mc-bars.big { height: 42vh; gap: 1vw; }
.mc-bars.big i { background: var(--peach); }
.mc-bars.big span { font-size: 2.4vh; }
.mc-card { margin-bottom: 32px; background: var(--butter); }
