/* Launch Day. Swap the brand colors here: every screen reads from these variables. */
:root {
  /* Zenpire brand, sampled from zenpire.tech: navy #232052 / #110b37, blues #014a87 to #4da8d2, pale #d8eaf5 */
  --bg: #110b37;
  --bg2: #232052;
  --panel: rgba(30, 30, 84, 0.86);
  --panel-solid: #1f1d55;
  --line: rgba(216, 234, 245, 0.16);
  --ink: #f6f7fc;
  --mut: #b9c6e6;
  --brand: #2576a6;
  --brand-deep: #014a87;
  --brand2: #4da8d2;
  --pale: #d8eaf5;
  --amber: #ffb84d;
  --pink: #82bedb;
  --cyan: #4da8d2;
  --red: #ff6b6b;
  --good: #5cf0b4;
  --bad: #ff8a8a;
  --r: 16px;
  --display: 'Fredoka', 'Trebuchet MS', sans-serif;
  --body: 'DM Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.1; letter-spacing: 0.01em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- animated sky: the Zenpire arcs ---------- */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(1100px 700px at 80% -10%, #1a4c7f 0%, transparent 60%), linear-gradient(180deg, var(--bg2), var(--bg)); }
.arc { position: absolute; bottom: -4vh; height: 46vh; width: 130vw; border-top-left-radius: 46vh; opacity: 0.5; animation: arcin 1.4s cubic-bezier(0.2, 1, 0.3, 1) both, sway 16s ease-in-out infinite alternate; }
.arc:nth-child(1) { left: -6vw; background: #d8eaf5; opacity: 0.16; animation-delay: 0s, 0s; }
.arc:nth-child(2) { left: 2vw; background: #82bedb; opacity: 0.2; animation-delay: 0.08s, -2s; }
.arc:nth-child(3) { left: 10vw; background: #398bb7; opacity: 0.26; animation-delay: 0.16s, -4s; }
.arc:nth-child(4) { left: 18vw; background: #1a6497; opacity: 0.34; animation-delay: 0.24s, -6s; }
.arc:nth-child(5) { left: 26vw; background: #1a4c7f; opacity: 0.45; animation-delay: 0.32s, -8s; }
.arc:nth-child(6) { left: 34vw; background: #203769; opacity: 0.6; animation-delay: 0.4s, -10s; }
.arc:nth-child(7) { left: 42vw; background: #1b1a4d; opacity: 0.85; animation-delay: 0.48s, -12s; }
@keyframes arcin { from { transform: translateY(50vh); } }
@keyframes sway { from { margin-left: 0; } to { margin-left: 3vw; } }
.stars { position: absolute; inset: -50%; background-image: radial-gradient(1.5px 1.5px at 20px 30px, #fff 60%, transparent), radial-gradient(1px 1px at 120px 80px, #fff 60%, transparent), radial-gradient(1.5px 1.5px at 200px 160px, #d8eaf5 60%, transparent), radial-gradient(1px 1px at 60px 190px, #fff 60%, transparent); background-size: 260px 240px; opacity: 0.3; animation: starfall 120s linear infinite; }
@keyframes starfall { to { transform: translate(260px, 240px); } }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; gap: 12px; padding: 12px 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 24px; }
.brand svg { width: 34px; height: 34px; animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-6deg); } }
.brand span b { color: var(--brand2); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.chip { padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line); font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip.live { background: rgba(77, 168, 210, 0.22); border-color: rgba(77, 168, 210, 0.7); }
.top-actions { display: flex; gap: 8px; }
.tbtn { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.08); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; transition: transform 0.12s, background 0.2s; }
.tbtn:hover { background: rgba(255, 255, 255, 0.16); }
.tbtn:active { transform: scale(0.96); }
.tbtn svg { width: 18px; height: 18px; }
.tbtn[aria-pressed='true'] { background: var(--brand); border-color: transparent; }
.eq { display: none; gap: 2px; align-items: flex-end; height: 14px; }
.tbtn[aria-pressed='true'] .eq { display: inline-flex; }
.eq i { width: 3px; background: #fff; border-radius: 2px; animation: eq 0.8s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -0.3s; } .eq i:nth-child(3) { animation-delay: -0.55s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }

main { padding: 6px 18px 40px; max-width: 1500px; margin: 0 auto; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; backdrop-filter: blur(10px); }
.panel h2 { font-size: 20px; margin-bottom: 10px; }
.mut { color: var(--mut); }
.small { font-size: 13px; }

.btn { min-height: 48px; padding: 0 22px; border-radius: 14px; border: 0; font-family: var(--display); font-weight: 600; font-size: 17px; background: linear-gradient(180deg, #398bb7, #1a6497); color: #fff; box-shadow: 0 5px 0 #0c3a66, 0 12px 24px rgba(0, 0, 0, 0.35); transition: transform 0.1s, box-shadow 0.1s, filter 0.2s; }
.btn:hover:not(:disabled) { filter: brightness(1.1); }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #0c3a66; }
.btn.go { background: linear-gradient(180deg, #d8eaf5, #82bedb); color: #110b37; box-shadow: 0 5px 0 #2576a6, 0 12px 24px rgba(0, 0, 0, 0.35); }
.btn.go:active:not(:disabled) { box-shadow: 0 1px 0 #2576a6; }
.btn.ghost { background: rgba(255, 255, 255, 0.1); box-shadow: none; border: 1px solid var(--line); font-family: var(--body); font-size: 15px; }
.btn.ghost:active:not(:disabled) { transform: scale(0.97); box-shadow: none; }
.btn.wide { width: 100%; }
.btn.pulse { animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.04); filter: brightness(1.15); } }

/* ---------- landing ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 18px; align-items: stretch; margin-top: 6px; }
main:has(> .hero) { padding-bottom: 16px; }
.herocol { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hero .intro { padding: 16px 18px; }
.hero h1 { font-size: clamp(34px, 3.6vw, 54px); }
.hero p.lead { margin: 8px 0 0; }
.hero form .field { margin-bottom: 10px; }
.hero form .field .inp { min-height: 44px; }
.hero form .formhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.hero form .formhead h2 { margin: 0; }
.hero form .authrow { display: flex; gap: 10px; }
.hero form .authrow > .field { flex: 1 1 0; min-width: 0; }
.hero form p.mut { margin: 10px 0 0; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #4da8d2, #82bedb, #d8eaf5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: var(--mut); max-width: 46ch; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 18px; }
.heroart { position: relative; min-height: 300px; border-radius: 24px; overflow: hidden; background: #110b37; border: 1px solid var(--line); }
.heroart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.fly { animation: fly 5s ease-in-out infinite; transform-origin: center; }
@keyframes fly { 0%, 100% { transform: translate(0, 6px) rotate(-8deg); } 50% { transform: translate(8px, -10px) rotate(-3deg); } }
.flame { animation: flame 0.25s ease-in-out infinite alternate; transform-origin: 50% 0; }
@keyframes flame { to { transform: scaleY(1.25); opacity: 0.8; } }
.herocol.side .heroart { flex: 1 1 0; min-height: 160px; }
.how { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.how .panel { padding: 12px 14px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-content: start; }
.how .n { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--amber); line-height: 1; grid-row: span 2; }
.how .panel h2 { font-size: 18px; margin-bottom: 4px; }
select.sel { min-height: 48px; padding: 0 12px; border-radius: 12px; background: var(--panel-solid); border: 1px solid var(--line); }

/* ---------- lobby ---------- */
.lobby { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr); gap: 18px; align-items: start; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .glabel { font-weight: 600; font-size: 14px; }
.inp { min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid rgba(255, 255, 255, 0.3); background: rgba(0, 0, 0, 0.25); font-size: 16px; }
.tokrow { display: flex; gap: 8px; flex-wrap: wrap; }
.tokbtn { width: 48px; height: 48px; border-radius: 50%; border: 2px solid transparent; background: rgba(255, 255, 255, 0.1); display: grid; place-items: center; transition: transform 0.15s; }
.tokbtn svg { width: 26px; height: 26px; fill: var(--ink); }
.tokbtn[aria-pressed='true'] { background: var(--brand2); border-color: #fff; transform: scale(1.12) rotate(-6deg); }
.tokbtn[aria-pressed='true'] svg { fill: #110b37; }
.budget { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(0, 0, 0, 0.3); margin-bottom: 14px; position: sticky; top: 8px; z-index: 3; border: 1px solid var(--line); }
.budget .bar { flex: 1; height: 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.budget .bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--brand2), var(--cyan)); transition: width 0.35s cubic-bezier(0.2, 1.4, 0.4, 1); }
.budget.over .bar i { background: var(--red); }
.budget b { font-family: var(--display); font-size: 22px; min-width: 92px; text-align: right; }
.group { margin-bottom: 14px; }
.opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.opt { text-align: left; padding: 10px 12px; border-radius: 14px; border: 1.5px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.06); display: flex; flex-direction: column; gap: 3px; min-height: 92px; transition: transform 0.15s, background 0.2s, border-color 0.2s; }
.opt:hover:not(:disabled):not([aria-pressed='true']) { transform: translateY(-2px); background: rgba(255, 255, 255, 0.12); }
.opt .ol { font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; gap: 6px; }
.opt .oc { font-family: var(--display); color: var(--amber); }
.opt .ob { font-size: 12px; color: var(--mut); line-height: 1.3; }
.opt[aria-pressed='true'] { background: linear-gradient(160deg, #1a6497, #398bb7); border-color: #fff; animation: pop 0.25s; }
.opt[aria-pressed='true'] .ob { color: #f6f7fc; }
@keyframes pop { 50% { transform: scale(1.05); } }
.plist { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 14px; }
.prow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); animation: slidein 0.35s both; }
@keyframes slidein { from { opacity: 0; transform: translateX(16px); } }
.prow .nm { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); white-space: nowrap; }
.tag.ok { background: rgba(92, 240, 180, 0.2); color: var(--good); }
.tag.you { background: var(--amber); color: #2b1a00; }
.xbtn { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: transparent; font-size: 18px; }

/* ---------- tokens ---------- */
.tok { width: var(--ts, 28px); height: var(--ts, 28px); border-radius: 50%; display: grid; place-items: center; background: var(--c, #8b5cf6); border: 2px solid #fff; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.45); flex: none; }
.tok svg { width: 62%; height: 62%; fill: #120e2e; }
.tok.sm { border-width: 1.5px; } .tok.sm svg { display: none; }

/* ---------- play ---------- */
.play { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 16px; align-items: start; }
.boardwrap { position: relative; }
.board { position: relative; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(0, 1fr)); gap: 6px; aspect-ratio: 8 / 5.7; padding: 10px; border-radius: 26px; background: rgba(12, 9, 44, 0.6); border: 1px solid var(--line); box-shadow: inset 0 0 60px rgba(77, 168, 210, 0.22); }
.cell { position: relative; border-radius: 12px; padding: 7px 8px; overflow: hidden; display: flex; flex-direction: column; background: linear-gradient(160deg, var(--t1), var(--t2)); border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; min-width: 0; transition: box-shadow 0.3s, transform 0.3s; }
.cell .ck { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.9; }
.cell .cn { font-family: var(--display); font-weight: 600; font-size: clamp(11px, 1.05vw, 15px); line-height: 1.1; margin-top: 2px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.cell > svg { position: absolute; right: -6px; bottom: -6px; width: 56%; height: 56%; opacity: 0.22; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cell.t-start { --t1: #2bd9a0; --t2: #0d8f6b; } .cell.t-build { --t1: #4cc9f0; --t2: #2563c9; }
.cell.t-mkt { --t1: #ff7ab2; --t2: #b9347f; } .cell.t-support { --t1: #3ed6c4; --t2: #117c86; }
.cell.t-growth { --t1: #9be15d; --t2: #2f9e44; } .cell.t-platform { --t1: #a78bfa; --t2: #5b34c9; }
.cell.t-event { --t1: #ffc861; --t2: #e8742c; } .cell.t-payday { --t1: #ffe27a; --t2: #c99a12; }
.cell.t-rush { --t1: #ff8a5c; --t2: #d6336c; } .cell.t-exit { --t1: #f6f7fc; --t2: #82bedb; color: #110b37; }
.cell.t-exit > svg { stroke: #110b37; } .cell.t-exit .cn { text-shadow: none; }
.cell.t-event::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%); transform: translateX(-120%); animation: shine 4.5s ease-in-out infinite; }
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.cell.on { box-shadow: 0 0 0 3px #fff, 0 0 26px 6px var(--t1); transform: scale(1.05); z-index: 2; }
.center { grid-column: 2 / 8; grid-row: 2 / 6; display: flex; flex-direction: column; gap: 10px; padding: 8px 10px; min-width: 0; min-height: 0; }
.chead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.month { font-family: var(--display); font-size: clamp(16px, 2vw, 26px); font-weight: 700; }
.month small { display: block; font-family: var(--body); font-size: 13px; font-weight: 500; color: var(--mut); }
.tokens { position: absolute; inset: 0; pointer-events: none; }
.tokens .tok { position: absolute; left: 0; top: 0; transition: transform 0.17s cubic-bezier(0.3, 1.6, 0.5, 1); z-index: 5; }
.tokens .tok.hop { animation: hop 0.17s ease-out; }
@keyframes hop { 50% { margin-top: -14px; } }
.tokens .tok.turn { box-shadow: 0 0 0 3px var(--amber), 0 0 18px 4px var(--amber); z-index: 6; }

/* dice */
.dicebox { perspective: 500px; width: 64px; height: 64px; flex: none; }
.dice { position: relative; width: 64px; height: 64px; transform-style: preserve-3d; transition: transform 0.95s cubic-bezier(0.2, 0.9, 0.3, 1.05); }
.face { position: absolute; inset: 0; border-radius: 12px; background: linear-gradient(145deg, #fff, #d8eaf5); border: 1px solid #82bedb; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 9px; gap: 2px; }
.face i { border-radius: 50%; } .face i.p { background: #232052; }
.f1 { transform: translateZ(32px); } .f6 { transform: rotateY(180deg) translateZ(32px); }
.f2 { transform: rotateY(90deg) translateZ(32px); } .f5 { transform: rotateY(-90deg) translateZ(32px); }
.f3 { transform: rotateX(90deg) translateZ(32px); } .f4 { transform: rotateX(-90deg) translateZ(32px); }
.dicebox.rolling { animation: toss 0.95s ease-out; }
@keyframes toss { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-38px) scale(1.25); } 70% { transform: translateY(0) scale(1); } 85% { transform: translateY(-8px); } }

/* card */
.card { flex: 1; min-height: 0; border-radius: 18px; padding: 16px 18px; background: linear-gradient(165deg, #ffffff, #e8f1f8); color: #110b37; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45); overflow: auto; position: relative; }
.card.flip { animation: flip 0.55s cubic-bezier(0.2, 1.2, 0.4, 1); }
@keyframes flip { 0% { transform: rotateY(90deg) scale(0.8); opacity: 0; } 100% { transform: none; opacity: 1; } }
.card.shake { animation: shake 0.5s; }
@keyframes shake { 20% { transform: translateX(-8px) rotate(-1deg); } 40% { transform: translateX(8px) rotate(1deg); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
.card .kind { align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; color: #fff; background: var(--kc, #5b34c9); }
.card h3 { font-size: clamp(18px, 2vw, 26px); color: #110b37; }
.card p { margin: 0; color: #3b3a66; }
.results { display: flex; flex-direction: column; gap: 6px; }
.res { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; padding: 5px 8px; border-radius: 10px; background: rgba(27, 22, 64, 0.06); animation: slidein 0.3s both; }
.res .who { font-weight: 700; }
.res.g1 { background: #dff8ec; color: #0b5a3c; } .res.g-1 { background: #ffe3e3; color: #8a1f1f; } .res.me { outline: 2px solid #110b37; }
.res .arrow { font-weight: 800; width: 14px; text-align: center; }
.lesson { margin-top: auto; padding: 9px 12px; border-radius: 12px; background: #110b37; color: #f5f3ff; font-size: 13px; }
.lesson b { color: var(--amber); }
.card.empty { align-items: center; justify-content: center; text-align: center; background: rgba(255, 255, 255, 0.06); color: var(--mut); box-shadow: none; border: 1px dashed var(--line); }

/* side */
.side { display: flex; flex-direction: column; gap: 12px; }
.turn h2 { font-size: 22px; }
.turn .who { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.turn .acts { display: flex; flex-direction: column; gap: 10px; }
.turn.mine { border-color: var(--amber); box-shadow: 0 0 0 2px var(--amber), 0 0 30px rgba(255, 184, 77, 0.35); }
.cost { font-family: var(--body); font-size: 13px; font-weight: 700; opacity: 0.85; margin-left: 6px; }
.rank { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); margin-bottom: 6px; }
.rank.me { background: rgba(255, 184, 77, 0.14); outline: 1px solid rgba(255, 184, 77, 0.6); }
.rank .pos { font-family: var(--display); font-weight: 700; width: 20px; text-align: center; color: var(--mut); }
.rank .info { flex: 1; min-width: 0; }
.rank .nm { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.rank .nm span.n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .sub { font-size: 12px; color: var(--mut); white-space: nowrap; }
.rank .val { font-family: var(--display); font-weight: 700; font-size: 18px; }
.mini { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.14); }
.delta { position: absolute; right: 8px; top: -8px; font-weight: 800; font-size: 13px; padding: 2px 8px; border-radius: 999px; animation: rise 2.4s ease-out forwards; pointer-events: none; z-index: 4; white-space: nowrap; }
.delta.up { background: var(--good); color: #06281b; } .delta.down { background: var(--bad); color: #4a0b0b; }
@keyframes rise { 0% { transform: translateY(8px) scale(0.6); opacity: 0; } 12% { transform: translateY(0) scale(1.1); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-26px); opacity: 0; } }
.bchips { display: flex; flex-wrap: wrap; gap: 6px; }
.bchip { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line); }
.logl { margin: 0; padding: 0; list-style: none; max-height: 150px; overflow: auto; font-size: 13px; color: var(--mut); display: flex; flex-direction: column; gap: 4px; }
.logl li:first-child { color: var(--ink); font-weight: 600; }
.emotes { display: flex; gap: 6px; }
.emo { flex: 1; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); font-size: 20px; transition: transform 0.12s; }
.emo:active { transform: scale(1.3) rotate(-8deg); }
#float { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.fl { position: absolute; bottom: -40px; font-size: 34px; animation: floatup 2.8s ease-out forwards; text-align: center; }
.fl small { display: block; font-size: 11px; font-weight: 700; background: rgba(0, 0, 0, 0.55); padding: 1px 6px; border-radius: 6px; }
@keyframes floatup { 15% { opacity: 1; } 100% { transform: translateY(-70vh) rotate(14deg); opacity: 0; } }

/* pivot sheet + modal */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(5, 3, 20, 0.7); display: grid; place-items: center; padding: 16px; animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(640px, 100%); max-height: 88vh; overflow: auto; background: var(--panel-solid); border: 1px solid var(--line); border-radius: 22px; padding: 22px; animation: sheet 0.3s cubic-bezier(0.2, 1.3, 0.4, 1); }
@keyframes sheet { from { transform: translateY(30px) scale(0.95); opacity: 0; } }
.sheet h2 { font-size: 26px; margin-bottom: 8px; }
.sheet ul { padding-left: 20px; margin: 8px 0; } .sheet li { margin-bottom: 6px; }

/* toasts, confetti */
#toasts { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 70; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 10px 18px; border-radius: 999px; background: #fff; color: #110b37; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); animation: toast 3.2s both; }
@keyframes toast { 0% { transform: translateY(-30px); opacity: 0; } 10%, 85% { transform: none; opacity: 1; } 100% { transform: translateY(-20px); opacity: 0; } }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

/* end */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin: 26px 0 18px; min-height: 260px; }
.pod { width: min(30%, 200px); text-align: center; }
.pod .tok { --ts: 58px; margin: 0 auto 8px; animation: bob 2.4s ease-in-out infinite; }
.pod .nm { font-family: var(--display); font-weight: 700; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod .v { color: var(--mut); font-weight: 600; margin-bottom: 8px; }
.pod .blk { border-radius: 16px 16px 0 0; display: grid; place-items: center; font-family: var(--display); font-size: 44px; font-weight: 700; transform-origin: bottom; animation: growup 0.9s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
.pod.p1 .blk { height: 170px; background: linear-gradient(180deg, #ffe27a, #c99a12); color: #3a2a00; animation-delay: 0.5s; }
.pod.p2 .blk { height: 120px; background: linear-gradient(180deg, #e5e7f5, #9aa0c8); color: #110b37; animation-delay: 0.25s; }
.pod.p3 .blk { height: 84px; background: linear-gradient(180deg, #ffb48a, #b9602b); color: #3a1500; }
@keyframes growup { from { transform: scaleY(0); } }
.endgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.awards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.award { padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.07); }
.award b { display: block; font-family: var(--display); font-size: 17px; color: var(--amber); }
.chart { width: 100%; height: auto; display: block; }
.lessons { margin: 0; padding-left: 20px; } .lessons li { margin-bottom: 8px; }
.cardslot:empty { display: none; }

@media (max-width: 1020px) {
  .play { grid-template-columns: 1fr; }
  .hero, .lobby, .endgrid { grid-template-columns: 1fr; }
  .how { grid-template-columns: repeat(2, 1fr); }
  .heroart, .herocol.side .heroart { min-height: 200px; flex: none; }
  .herocol.side .how { order: -1; }
}
@media (max-width: 480px) { .hero form .authrow { flex-direction: column; gap: 0; } }
@media (max-width: 760px) {
  main { padding: 4px 10px 110px; }
  .top { padding: 10px; }
  .brand { font-size: 20px; flex: 1; }
  .chips { order: 3; flex-basis: 100%; }
  .tbtn .lbl { display: none; }
  .board { gap: 3px; padding: 5px; border-radius: 16px; aspect-ratio: 8 / 6.4; }
  .cell { padding: 0; align-items: center; justify-content: flex-start; border-radius: 8px; }
  .cell .ck, .cell .cn { display: none; }
  .cell > svg { position: static; width: 58%; height: 58%; opacity: 0.95; margin-top: 3px; }
  .center { align-items: center; justify-content: center; }
  .chead { flex-direction: column; text-align: center; }
  .card { min-height: 160px; }
  .opts { grid-template-columns: 1fr; }
  .opt { min-height: 0; }
  .turn { position: sticky; bottom: 8px; z-index: 20; background: var(--panel-solid); order: -1; }
  .awards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- season additions ---------- */
.banner { padding: 10px 12px; border-radius: 12px; background: rgba(77, 168, 210, 0.18); border: 1px solid rgba(77, 168, 210, 0.5); font-size: 14px; margin: 0 0 12px; }
.ptop { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.ptop h2 { margin: 0; }
.tabs { display: flex; gap: 6px; }
.tab { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.08); font-size: 13px; font-weight: 700; }
.tab[aria-pressed='true'] { background: var(--brand2); color: #110b37; border-color: transparent; }
.card .tab { border-color: rgba(17, 11, 55, 0.25); background: rgba(17, 11, 55, 0.06); color: #110b37; }
.card .tab[aria-pressed='true'] { background: #232052; color: #fff; }
.linkbtn { min-height: 40px; background: none; border: 0; color: var(--brand2); font-weight: 700; text-decoration: underline; padding: 4px 6px; align-self: flex-start; }
.card .linkbtn { color: #014a87; }
.steps { display: flex; gap: 6px; margin: 8px 0 12px; }
.steps i { flex: 1; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.16); transition: background 0.3s; }
.steps i.on { background: var(--amber); }
.pickbtn { background: rgba(255, 255, 255, 0.1); box-shadow: none; border: 1.5px solid var(--line); font-family: var(--body); font-size: 15px; font-weight: 700; }
.pickbtn.on { background: linear-gradient(180deg, #d8eaf5, #82bedb); color: #110b37; border-color: #fff; }
.pickbtn:active:not(:disabled) { transform: scale(0.97); box-shadow: none; }
.more { position: absolute; right: 5px; top: 4px; font-size: 11px; font-weight: 800; background: rgba(17, 11, 55, 0.75); color: #fff; border-radius: 999px; padding: 1px 6px; z-index: 3; }
.more:empty { display: none; }
.tokens .tok.mine { z-index: 7; }
.scrolly, .plist { max-height: 460px; overflow: auto; }

/* ---------- pacing and narration ---------- */
.dicewrap { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; }
.rollcap { font-size: 13px; font-weight: 700; color: var(--pale); text-align: center; min-height: 18px; max-width: 150px; }
.narr { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; padding: 8px 10px; border-radius: 12px; background: #232052; color: #fff; }
.recap { display: flex; flex-direction: column; gap: 5px; margin: 8px 0 12px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.28); font-size: 14px; font-weight: 600; }
.recap .rct { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mut); }
.recap .g1 { color: var(--good); } .recap .g-1 { color: var(--bad); }
.chip[aria-pressed] { cursor: pointer; }
#slotT:empty { display: none; }
#slotT { margin-top: 10px; }
@media (max-width: 760px) { .turn { position: static; } main { padding-bottom: 40px; } }
.res .who { white-space: nowrap; }
.res { flex-wrap: wrap; }
@media (max-width: 760px) { #toasts { top: auto; bottom: 18px; } }

.own { font-size: 12px; font-weight: 600; color: var(--mut); white-space: nowrap; }

/* ---------- server version additions ---------- */
button.cell { appearance: none; -webkit-appearance: none; font: inherit; text-align: left; cursor: pointer; align-items: stretch; }
.slotA { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.slotB { margin-top: 10px; } .slotB:empty { display: none; }
.pin { letter-spacing: 0.4em; font-size: 20px; font-weight: 700; }
.area { width: 100%; height: auto; padding: 12px; font-size: 15px; resize: vertical; min-height: 96px; }
.idearow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 10px; }
.idearow .sel { min-height: 44px; }
.center-text { text-align: center; } .winner { font-size: clamp(30px, 5vw, 54px); }
.h2gap { font-size: 20px; margin-top: 16px; }
.endgrid { margin-top: 16px; }
form.panel .tabs .tab { min-height: 44px; }
.hosttable { width: 100%; border-collapse: collapse; font-size: 14px; }
.hosttable th, .hosttable td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.hosttable th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mut); }
.sugg { padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); margin-bottom: 10px; }
.sugg .meta { font-size: 12px; color: var(--mut); margin-bottom: 6px; }
.sugg .row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.sbtn { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.1); font-weight: 700; font-size: 14px; }
.sbtn.yes { background: #1f8f66; border-color: transparent; } .sbtn.no { background: #b23b3b; border-color: transparent; }
.hostgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.frow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.check input { width: 22px; height: 22px; }
.tablewrap { overflow-x: auto; }
@media (max-width: 760px) { .slotA { display: none; } .hostgrid, .frow { grid-template-columns: 1fr; } button.cell { align-items: center; } }
