/* Chester's Escape */
:root {
  --bg: #000000;
  --raise: #121410;
  --raise-2: #1a1d17;
  --line: #2a2f26;
  --line-2: #3a4135;
  --text: #ece8de;
  --muted: #a3a898;
  --faint: #6f7568;
  --accent: #f2a33a;        /* candlelight: actions */
  --accent-ink: #1a0f00;
  --good: #3fd04a;          /* slime green: cleared, escaped */
  --bad: #a78bfa;           /* bruise purple: tricks, setbacks */
  --warn: #ff6b5a;
  --gold: #f2c46b;
  --display: 'Grenze Gotisch', Georgia, serif;
  --ui: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-sm: 6px;
  --r: 12px;
  --die-hi: #ffb347; --die-mid: #e8822a; --die-lo: #9a4a12;
  --treasure: #3fd04a; --trick: #a78bfa; --task: #f2c46b; --fate: #9aa3ad;
  color-scheme: dark;
}
body[data-theme="christmas"], body[data-theme="snowy"] {
  --bg: #050b14;
  --raise: #0c1726;
  --raise-2: #13223a;
  --line: #1f3350;
  --line-2: #2c4769;
  --text: #f3f7fb;
  --muted: #a9bdd2;
  --faint: #6f86a0;
  --accent: #e23a4e;
  --accent-ink: #fff;
  --good: #3cc46a;
  --bad: #7fb2ff;
  --gold: #f4c542;
  --display: 'Mountains of Christmas', Georgia, serif;
  --die-hi: #ff7a8a; --die-mid: #d7263d; --die-lo: #7d0e1d;
  --treasure: #3cc46a; --trick: #7fb2ff; --task: #f4c542; --fate: #c9d6e3;
}
body[data-theme="halloween"] {
  --bg: #0b0612;
  --raise: #160d22;
  --raise-2: #20132f;
  --line: #2f1d45;
  --line-2: #42295e;
  --text: #f6eefc;
  --muted: #c3afd6;
  --faint: #806a96;
  --accent: #ff8a2b;
  --accent-ink: #1a0a00;
  --good: #6fd36f;
  --bad: #c084fc;
  --gold: #ffb347;
  --display: 'Creepster', Georgia, serif;
  --die-hi: #ffb067;
  --die-mid: #ff8a2b;
  --die-lo: #8a3a0a;
  --treasure: #6fd36f;
  --trick: #c084fc;
  --task: #ffb347;
  --fate: #d6c6e6;
}
body[data-theme="newyear"] {
  --bg: #050816;
  --raise: #0e1430;
  --raise-2: #151d42;
  --line: #232c5a;
  --line-2: #313c75;
  --text: #f2f4ff;
  --muted: #aab3dc;
  --faint: #6f79a6;
  --accent: #f2c046;
  --accent-ink: #1a1400;
  --good: #3cc46a;
  --bad: #8ea2ff;
  --gold: #f2c046;
  --display: 'Sniglet', system-ui, sans-serif;
  --die-hi: #ffe08a;
  --die-mid: #f2c046;
  --die-lo: #9a7414;
  --treasure: #3cc46a;
  --trick: #8ea2ff;
  --task: #f2c046;
  --fate: #c9d0ec;
}
body[data-theme="valentine"] {
  --bg: #0d0408;
  --raise: #1c0a12;
  --raise-2: #28101a;
  --line: #3a1726;
  --line-2: #522036;
  --text: #fff0f4;
  --muted: #e2b2c2;
  --faint: #a0707f;
  --accent: #ff4d6d;
  --accent-ink: #fff;
  --good: #4fd18b;
  --bad: #ff8fab;
  --gold: #ffc2d1;
  --display: 'Pacifico', Georgia, serif;
  --die-hi: #ff8fa3;
  --die-mid: #ff4d6d;
  --die-lo: #8a0f2c;
  --treasure: #4fd18b;
  --trick: #ff8fab;
  --task: #ffc2d1;
  --fate: #e6c8d2;
}
body[data-theme="spring"] {
  --bg: #050b06;
  --raise: #0f1a10;
  --raise-2: #172617;
  --line: #24381f;
  --line-2: #33502c;
  --text: #f2fbef;
  --muted: #b5cdb0;
  --faint: #74906d;
  --accent: #ff8fb8;
  --accent-ink: #2a0716;
  --good: #6cd46c;
  --bad: #ffa3c4;
  --gold: #ffd23f;
  --display: 'Sniglet', system-ui, sans-serif;
  --die-hi: #ffc0d5;
  --die-mid: #ff8fb8;
  --die-lo: #a8325c;
  --treasure: #6cd46c;
  --trick: #ffa3c4;
  --task: #ffd23f;
  --fate: #cfe3c8;
}
body[data-theme="summer"] {
  --bg: #03090d;
  --raise: #0a1820;
  --raise-2: #10232e;
  --line: #18333f;
  --line-2: #224656;
  --text: #effaff;
  --muted: #a9cfdc;
  --faint: #6a93a2;
  --accent: #ffb703;
  --accent-ink: #1a1000;
  --good: #4ad991;
  --bad: #ff8c42;
  --gold: #ffd166;
  --display: 'Sniglet', system-ui, sans-serif;
  --die-hi: #ffd166;
  --die-mid: #ffb703;
  --die-lo: #a35f00;
  --treasure: #4ad991;
  --trick: #ff8c42;
  --task: #ffd166;
  --fate: #c6e3ec;
}
/* Creepster and Pacifico only come in one weight; keep the browser from faking bold. */
body[data-theme="halloween"], body[data-theme="valentine"] { font-synthesis: none; }
body[data-theme="halloween"] .cback { background: repeating-linear-gradient(45deg, #3b1d4a 0 18px, #5a2d82 18px 36px); border-color: #ff8a2b; }
body[data-theme="newyear"] .cback { background: repeating-linear-gradient(45deg, #151d42 0 18px, #1d2350 18px 36px); border-color: #f2c046; }
body[data-theme="valentine"] .cback { background: repeating-linear-gradient(45deg, #c9184a 0 18px, #ff4d6d 18px 36px); border-color: #fff; }
body[data-theme="spring"] .cback { background: repeating-linear-gradient(45deg, #3fa34d 0 18px, #6cd46c 18px 36px); border-color: #ffd23f; }
body[data-theme="summer"] .cback { background: repeating-linear-gradient(45deg, #fb8500 0 18px, #ffb703 18px 36px); border-color: #fff; }
body[data-theme="thanksgiving"] {
  --bg: #0b0704;
  --raise: #1a110a;
  --raise-2: #251810;
  --line: #3a2716;
  --line-2: #523720;
  --text: #f6ecdc;
  --muted: #cdb595;
  --faint: #8f7658;
  --accent: #e8792a;
  --accent-ink: #1a0a00;
  --good: #8cc152;
  --bad: #ff8a65;
  --gold: #f2c046;
  --display: 'Cherry Swash', Georgia, serif;
  --die-hi: #ffb067; --die-mid: #d9661f; --die-lo: #7a3410;
  --treasure: #8cc152; --trick: #ff8a65; --task: #f2c046; --fate: #d9c3a3;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--ui); min-height: 100vh; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); }
img { max-width: 100%; }
.sr { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- header ---- */
.top { display: flex; align-items: center; gap: 18px; padding: 12px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-crow { width: 42px; height: 46px; flex: none; }
.brand h1 { margin: 0; font: 700 34px/1 var(--display); letter-spacing: .5px; white-space: nowrap; }
body[data-theme="christmas"] .brand h1, body[data-theme="snowy"] .brand h1 { color: #ff5a6e; }
/* Snowy Escape's title, styled like LumberJack's board logo (app.js titleHtml) */
body[data-theme="snowy"] .brand h1 .tt-r, body[data-theme="snowy"] .brand h1 .tt-acc { color: #ff4d61; -webkit-text-stroke: 1px #fff; paint-order: stroke fill; text-shadow: 0 2px 0 #4a0710; }
body[data-theme="snowy"] .brand h1 .tt-b { color: #d6ecff; -webkit-text-stroke: 1px #14284a; paint-order: stroke fill; text-shadow: 0 2px 0 #0b1830; }
body[data-theme="snowy"] .brand h1 .tt-acc { display: inline-block; font-size: .8em; transform: rotate(-8deg) translateY(-.22em); margin-right: -.06em; }
body[data-theme="thanksgiving"] .brand h1 { color: #f39a4a; }
.daybox { display: flex; align-items: baseline; gap: 12px; padding: 6px 14px; border: 1px solid var(--line-2); border-radius: 999px; }
.day { font: 700 22px/1 var(--display); color: var(--gold); }
.clock { font-size: 14px; color: var(--muted); }
.topnav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.nav-btn { position: relative; background: none; border: 1px solid transparent; border-radius: 8px; padding: 8px 12px; color: var(--muted); font-size: 15px; text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.nav-btn:hover { color: var(--text); border-color: var(--line-2); }
.nav-btn.icon { padding: 8px; }
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font: 800 12px/1 ui-monospace, 'Cascadia Code', Consolas, monospace; box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 55%, transparent); vertical-align: middle; }
.nav-badge.bump { animation: badgePop .6s ease-out 2; }
@keyframes badgePop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.hsec.attn { border-left: 3px solid var(--accent); padding-left: 12px; }
.hsec h3 .nav-badge { margin-left: 6px; }
@media (prefers-reduced-motion: reduce) { .nav-badge.bump { animation: none; } }
.nav-btn svg { width: 22px; height: 22px; }
#muteBtn .slash { display: none; }
#muteBtn[aria-pressed="true"] .slash { display: inline; }
#muteBtn[aria-pressed="true"] .wave { display: none; }

.demo-bar { display: flex; align-items: center; gap: 16px; justify-content: space-between; flex-wrap: wrap; padding: 10px 22px; background: #0d0a03; border-bottom: 1px solid #3a2a0e; color: #e9d3ab; font-size: 14.5px; }
body[data-theme="christmas"] .demo-bar, body[data-theme="snowy"] .demo-bar { background: #0b1220; border-color: #23395a; color: #c9dcf2; }
body[data-theme="thanksgiving"] .demo-bar { background: #160c04; border-color: #4a2c12; color: #f0d6b0; }
.demo-bar p { margin: 0; max-width: 80ch; }
.demo-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.playas { display: flex; align-items: center; gap: 8px; }
select, input[type="text"], input[type="url"], input[type="number"] { background: var(--raise); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; min-height: 38px; }
input::placeholder { color: var(--faint); }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; transition: transform .08s, filter .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: var(--raise-2); color: var(--faint); cursor: not-allowed; filter: none; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14.5px; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn.ghost:hover { border-color: var(--muted); }
.btn.good { background: var(--good); color: #04220a; }
.btn.link { background: none; color: var(--muted); padding: 6px 4px; min-height: 0; text-decoration: underline; font-weight: 400; }
.btn.danger { background: transparent; border: 1px solid #5a2323; color: #ff8a80; }

/* ---- layout ---- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 22px; padding: 20px 22px 8px; max-width: 1480px; margin: 0 auto; align-items: start; }
.board-col { min-width: 0; }
.board-wrap { position: relative; width: 100%; max-width: min(100%, calc(100vh - 120px)); min-width: 300px; margin: 0 auto; aspect-ratio: 1; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 30px 80px -30px rgba(0,0,0,.9); background: #0c110a; }
.board-wrap svg { display: block; width: 100%; height: 100%; }
.side { display: flex; flex-direction: column; gap: 14px; min-width: 0; position: sticky; top: 12px; }
.panel { border: 1px solid var(--line); border-radius: var(--r); background: var(--raise); padding: 16px; }
.panel h2 { margin: 0 0 10px; font: 700 22px/1.1 var(--display); letter-spacing: .3px; }

/* board interactions */
.board-svg .sp { cursor: pointer; }
.board-svg .sp .face { transition: filter .15s; }
.board-svg .sp:hover .face, .board-svg .sp:focus .face { filter: brightness(1.15); }
.board-svg .sp:focus { outline: none; }
.board-svg .sp:focus-visible .face { stroke: #fff; stroke-width: 3; }
.board-svg .sp.mine .face { stroke: #fff; stroke-width: 3.5; }
.board-svg .sp:hover .face.ghost, .board-svg .sp:focus-visible .face.ghost { stroke: #fff; stroke-width: 3; fill: rgba(255,255,255,.12); }
.board-svg .sp.mine .face.ghost { stroke: #fff; stroke-width: 4; stroke-dasharray: 6 4; }
.board-svg .tok { transition: transform .22s cubic-bezier(.3,.7,.4,1.4); }
.board-svg .tok.fly { transition: transform .7s cubic-bezier(.6,-0.2,.3,1.2); }
.board-svg .tok.hop .tok-in { animation: hop .22s ease-out; }
.board-svg .tok.ping .tok-in { animation: ping 1.2s ease-out 2; }
.board-svg .tok .me-ring { animation: spin 8s linear infinite; transform-origin: 0 0; }
@keyframes hop { 0% { transform: translateY(0) scale(1); } 45% { transform: translateY(-14px) scale(1.08); } 100% { transform: translateY(0) scale(1); } }
@keyframes ping { 0%,100% { transform: scale(1); } 30% { transform: scale(1.5); } }
@keyframes spin { to { transform: rotate(360deg); } }
.board-svg .hl .target { fill: none; stroke: var(--accent); stroke-width: 4; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }

/* ---- standings ---- */
.standings { margin-top: 18px; }
.standings h2 { font: 700 24px/1 var(--display); margin: 0 0 10px; }
.st-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.st { display: grid; grid-template-columns: 34px 36px minmax(0,1fr); gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--raise); cursor: pointer; text-align: left; width: 100%; }
.st:hover { border-color: var(--line-2); }
.st.me { border-color: var(--accent); }
.st .place { font: 700 20px/1 var(--display); color: var(--muted); text-align: center; }
.st-list.no-places .st { grid-template-columns: 36px minmax(0,1fr); }   /* sign-ups: no places yet */
.st .ava { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 3px solid var(--c, var(--accent)); background: var(--raise-2); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.st .nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* name, route and badges on one line; a name too long to share the line gets it to itself (the route
   and badges move under it), and only a name wider than the whole row shortens with "..." */
.st-line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; }
.st-line > .nm { max-width: 100%; }
.st-line > :not(.nm) { flex: none; }
.st .place.ord { font-size: 16px; letter-spacing: -.3px; }   /* "1st", "12th" fit the column */
.st .sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st .bar { height: 5px; border-radius: 3px; background: var(--raise-2); margin-top: 5px; overflow: hidden; }
.st .bar i { display: block; height: 100%; background: var(--c, var(--accent)); border-radius: 3px; }
.st.done .place { color: var(--good); }
.chip { display: inline-block; font-size: 12.5px; line-height: 1; padding: 4px 7px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); vertical-align: middle; }
.chip.risk { border-color: #6b3b3b; color: #ffb0a6; }
.chip.long { border-color: #3d5a2a; color: #b9e3a3; }
.chip.none { border-style: dashed; color: var(--muted); }
.st.noroute .bar { visibility: hidden; }
.st.noroute .ava-wrap { opacity: .75; }
body[data-theme="christmas"] .chip.long, body[data-theme="snowy"] .chip.long { border-color: #23506a; color: #a9d8f5; }
body[data-theme="thanksgiving"] .chip.long { border-color: #4a6a2a; color: #c8e3a3; }

/* ---- me panel ---- */
.me { position: relative; }
.me.has-skull .me-row { padding-right: 40px; }   /* room for the host skull */
.me > .host-btn.me-skull { position: absolute; top: 10px; right: 10px; }   /* beats the later .host-btn { position: relative } */
.me-row { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 12px; align-items: center; }
.me-ava { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid var(--c, var(--accent)); background: var(--raise-2); display: grid; place-items: center; font-weight: 700; }
.me-name { font: 700 24px/1.1 var(--display); overflow-wrap: anywhere; }   /* a long name wraps instead of running off the card */
.me-sub { color: var(--muted); font-size: 14.5px; }
.me-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.stat { font-size: 13.5px; padding: 5px 9px; border-radius: 8px; background: var(--raise-2); color: var(--text); }
.stat.good { color: var(--good); }
.stat.bad { color: var(--bad); }

/* ---- turn panel ---- */
.turn { display: flex; flex-direction: column; gap: 14px; }
.turn:focus { outline: none; }
.task { border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--raise-2); position: relative; }
.task-head { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 12px; padding: 12px; align-items: center; }
.task-cover { width: 88px; height: 88px; border-radius: 8px; object-fit: cover; background: #000; }
.task-cover.ph { display: grid; place-items: center; font: 700 15px var(--ui); color: var(--muted); border: 1px dashed var(--line-2); }
.task-why { font-size: 13px; color: var(--gold); font-weight: 700; }
.task-song { font-weight: 700; font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
.task-meta { font-size: 13.5px; color: var(--muted); }
.task-keys { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.key { font: 700 14px var(--ui); background: #000; border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 8px; cursor: pointer; }
.key:hover { border-color: var(--accent); }
.task-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 12px 12px; }
.studio-btn b { color: #4f8fff; }
.studio-logo { width: 22px; height: 22px; border-radius: 6px; overflow: hidden; flex: none; display: block; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.studio-logo svg { width: 100%; height: 100%; display: block; transition: transform .2s; }
.studio-btn:hover .studio-logo svg, .studio-btn:focus-visible .studio-logo svg { transform: scale(1.12) rotate(-6deg); }
/* Get the maps: the logo's play button kicks on two beats while the sabers flash, the same move as
   Playlist Studio's own logo. Once when the window opens, and again on hover. */
.studio-logo .ptri { transform-box: fill-box; transform-origin: 50% 50%; }
.studio-btn.kick .studio-logo .ptri { animation: studioTriKick .75s cubic-bezier(.2,.8,.3,1) .45s; }
.studio-btn.kick .studio-logo .hr, .studio-btn.kick .studio-logo .hb { animation: studioArcKick .75s ease-out .45s; }
.studio-btn.kick:hover .studio-logo .ptri { animation: studioTriKick2 .75s cubic-bezier(.2,.8,.3,1); }
.studio-btn.kick:hover .studio-logo .hr, .studio-btn.kick:hover .studio-logo .hb { animation: studioArcKick2 .75s ease-out; }
@keyframes studioTriKick { 0% { transform: scale(1); } 12% { transform: scale(1.2); } 30% { transform: scale(.96); } 48% { transform: scale(1.14); } 70% { transform: scale(.98); } 100% { transform: scale(1); } }
@keyframes studioTriKick2 { 0% { transform: scale(1); } 12% { transform: scale(1.2); } 30% { transform: scale(.96); } 48% { transform: scale(1.14); } 70% { transform: scale(.98); } 100% { transform: scale(1); } }
@keyframes studioArcKick { 0%, 100% { stroke-width: 7; } 12%, 48% { stroke-width: 9.5; } 30% { stroke-width: 7; } }
@keyframes studioArcKick2 { 0%, 100% { stroke-width: 7; } 12%, 48% { stroke-width: 9.5; } 30% { stroke-width: 7; } }
@media (prefers-reduced-motion: reduce) { .studio-logo svg { transition: none; } .studio-btn.kick .studio-logo *, .studio-btn.kick:hover .studio-logo * { animation: none !important; } }
.task-note { padding: 0 12px 12px; font-size: 13.5px; color: var(--muted); }
.task-claim { padding: 0 12px 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.task-claim input { flex: 1 1 180px; min-width: 0; }
.task.cleared::after { content: attr(data-stamp); position: absolute; right: 12px; top: 14px; font: 800 26px/1 var(--display); color: var(--good); border: 3px solid var(--good); border-radius: 8px; padding: 4px 10px; transform: rotate(-8deg); animation: stamp .45s cubic-bezier(.2,1.6,.4,1); background: rgba(0,0,0,.6); }
@keyframes stamp { from { transform: rotate(-8deg) scale(2.2); opacity: 0; } to { transform: rotate(-8deg) scale(1); opacity: 1; } }

.roll-box { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 16px; align-items: center; }
.roll-copy b { display: block; font: 700 22px/1.1 var(--display); }
.roll-copy p { margin: 4px 0 10px; color: var(--muted); font-size: 14.5px; }
.acc-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.acc-open { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.acc-stack { flex-direction: column; align-items: stretch; }
.acc-stack .btn { width: 100%; }
/* Lifelines (AccSaber mode): a strip with a pixel heart per lifeline and a button that rolls without a mission. */
.lf { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.lf-lbl { display: flex; flex-direction: column; gap: 6px; flex: 1 0 auto; }
.roll-copy .lf-lbl b { font: 700 14.5px/1.2 var(--ui); color: var(--text); }
.lf-hearts { display: flex; gap: 5px; align-items: center; }
.lf-h { position: relative; display: block; width: 26px; height: 23px; color: var(--faint); flex: none; }
.lf-h svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lf-full { position: absolute; inset: 0; }
.lf-burst { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.lf-burst i { position: absolute; display: block; }
.lf-btn { flex: none; min-width: 124px; white-space: nowrap; }
.roll-copy .lf-earn { margin: 0; flex: 0 1 150px; font-size: 13.5px; line-height: 1.4; text-align: right; }
.acc-mark { width: 16px; height: 16px; flex: none; }
.why { color: var(--muted); font-size: 14px; }

/* d4 */
.d4 { position: relative; width: 120px; height: 112px; }
.d4-body { position: absolute; inset: 0; filter: drop-shadow(0 8px 10px rgba(0,0,0,.55)); }
.d4-svg { width: 100%; height: 100%; display: block; }
.d4-shadow { position: absolute; left: 22px; right: 22px; bottom: -4px; height: 12px; border-radius: 50%; background: rgba(0,0,0,.6); filter: blur(4px); }
.d4.rolling .d4-body { animation: tumble .32s linear infinite; }
.d4.rolling .d4-shadow { animation: shadow .32s linear infinite; }
.d4.landed .d4-body { animation: land .5s cubic-bezier(.2,1.8,.4,1); }
@keyframes tumble { 0% { transform: translate(0,-6px) rotate(0) scale(.92); } 25% { transform: translate(6px,-18px) rotate(95deg) scale(1.02); } 50% { transform: translate(0,-8px) rotate(190deg) scale(.9); } 75% { transform: translate(-6px,-20px) rotate(280deg) scale(1.04); } 100% { transform: translate(0,-6px) rotate(360deg) scale(.92); } }
@keyframes shadow { 0%,50%,100% { transform: scale(.9); opacity: .7; } 25%,75% { transform: scale(.6); opacity: .35; } }
@keyframes land { 0% { transform: scale(1.25); } 100% { transform: scale(1); } }
.d4.disabled { opacity: .45; filter: grayscale(.6); }

/* route picker */
.routes { display: grid; gap: 10px; }
.route-card { display: block; text-align: left; padding: 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--raise-2); cursor: pointer; width: 100%; }
.route-card:hover { border-color: var(--accent); }
.route-card b { font: 700 22px/1.1 var(--display); display: block; }
.route-card span { color: var(--muted); font-size: 14.5px; }
.route-card.risk b { color: #ff9a8a; }
body[data-theme="christmas"] .route-card.risk b, body[data-theme="snowy"] .route-card.risk b { color: #ff8090; }
body[data-theme="thanksgiving"] .route-card.risk b { color: #ff9a6a; }

/* ---- feed ---- */
.thread-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.thread-head h2 { margin: 0; }
/* Visits: a round refresh button that spins once when pressed */
.refresh-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--raise); color: var(--muted); cursor: pointer; padding: 0; flex: none; }
.refresh-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.refresh-btn:hover, .refresh-btn:focus-visible { color: var(--accent); border-color: var(--accent); }
.refresh-btn.spin svg { animation: refreshSpin .7s ease-in-out 1; }
@keyframes refreshSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .refresh-btn.spin svg { animation: none; } }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg button { background: none; border: 0; padding: 6px 12px; color: var(--muted); cursor: pointer; font-size: 14px; }
.seg button[aria-selected="true"] { background: var(--raise-2); color: var(--text); }
.feed { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.feed li { display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.feed li:last-child { border-bottom: 0; }
.feed .ic { font-size: 17px; line-height: 1.3; text-align: center; }
.feed .who { font-weight: 700; }
.feed .when { color: var(--faint); font-size: 12.5px; }
.feed .good { color: var(--good); }
.feed .bad { color: var(--bad); }
.feed .dayline { grid-template-columns: 1fr; text-align: center; color: var(--gold); font: 700 18px var(--display); border-bottom: 1px dashed var(--line-2); }
.empty { color: var(--muted); font-size: 14.5px; margin: 6px 0; }

/* ---- overlays ---- */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.72); backdrop-filter: blur(2px); }
.overlay[hidden] { display: none; }
.card-stage { display: flex; flex-direction: column; align-items: center; gap: 22px; perspective: 1400px; }
.card3d { width: min(320px, 82vw); aspect-ratio: 5 / 7; position: relative; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3,1.3,.5,1); transform: rotateY(180deg) translateY(30px) scale(.8); }
.card3d.show { transform: rotateY(0) translateY(0) scale(1); }
.cface { position: absolute; inset: 0; border-radius: 18px; backface-visibility: hidden; overflow: hidden; box-shadow: 0 30px 70px rgba(0,0,0,.7); }
.cback { transform: rotateY(180deg); background: radial-gradient(circle at 50% 40%, #2c3a22, #0f150b 70%); border: 6px solid #3a4434; display: grid; place-items: center; text-align: center; }
body[data-theme="christmas"] .cback { background: repeating-linear-gradient(45deg, #b0182d 0 18px, #d7263d 18px 36px); border-color: #fff; }
body[data-theme="snowy"] .cback { background: repeating-linear-gradient(45deg, #24507c 0 18px, #2f6fae 18px 36px); border-color: #fff; }
body[data-theme="thanksgiving"] .cback { background: repeating-linear-gradient(90deg, #8a3a12 0 14px, #b4501a 14px 28px, #8a3a12 28px 30px), #8a3a12; border-color: #f2c046; }
.cback .crow { width: 52%; }
.cback p { margin: 0; font: 700 26px/1 var(--display); color: #e9e4d6; padding: 0 16px; }
.cfront { background: #f3eee2; color: #1d1b16; border: 7px solid var(--cc, var(--treasure)); display: flex; flex-direction: column; }
.cfront .ctype { background: var(--cc, var(--treasure)); color: #0b0b08; font-weight: 700; font-size: 14px; text-align: center; padding: 6px 8px 8px; }
.cfront .cart { flex: 1; display: grid; place-items: center; font-size: 96px; line-height: 1; background: radial-gradient(circle at 50% 55%, rgba(0,0,0,.08), transparent 62%); }
.cfront .ctitle { font: 700 34px/1 var(--display); text-align: center; padding: 0 14px; }
.cfront .ctext { font-size: 15px; line-height: 1.4; text-align: center; padding: 8px 18px 0; color: #4a463c; }
.cfront .cfx { margin: 14px 14px 16px; padding: 10px; border-radius: 10px; background: #1d1b16; color: #fff; font-weight: 700; text-align: center; font-size: 16px; }
.card-overlay .btn { opacity: 0; transition: opacity .3s .7s; }
.card-overlay.ready .btn { opacity: 1; }

.win-overlay { background: rgba(0,0,0,.82); }
.win-inner { text-align: center; position: relative; }
.win-title { margin: 0; font: 800 clamp(56px, 12vw, 128px)/.95 var(--display); color: var(--good); text-shadow: 0 6px 0 #0d3c10, 0 0 40px rgba(63,208,74,.45); animation: winpop .7s cubic-bezier(.2,1.6,.4,1); }
.win-sub { font-size: 20px; color: var(--text); margin: 14px 0 24px; }
@keyframes winpop { from { transform: scale(.2) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

.modal { position: relative; width: min(640px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--raise); border: 1px solid var(--line-2); border-radius: 16px; padding: 24px; }
.modal h2 { margin: 0 0 14px; font: 700 30px/1.1 var(--display); padding-right: 40px; overflow-wrap: anywhere; }
.modal p { color: var(--text); }
.modal .lede { color: var(--muted); }
.x { position: absolute; z-index: 3; right: 14px; top: 12px; width: 40px; height: 40px; border-radius: 10px; background: none; border: 1px solid var(--line-2); color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.x:hover { color: var(--text); }
.rules { padding-left: 20px; margin: 0; }
.rules li { margin: 6px 0; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; }
.field label { font-weight: 700; }
.field .hint { font-size: 13.5px; color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.err { color: var(--warn); font-size: 14.5px; }
.join-ask { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.join-ask .why { margin: 0 0 10px; }
.result-img { width: 100%; border-radius: 10px; border: 1px solid var(--line-2); }

/* drawer */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 40; }
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(560px, 100vw); z-index: 41; background: var(--raise); border-left: 1px solid var(--line-2); display: flex; flex-direction: column; box-shadow: -30px 0 60px rgba(0,0,0,.6); animation: slidein .25s ease-out; }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); position: relative; }
.drawer-head h2 { margin: 0; font: 700 28px var(--display); }
.drawer-body { overflow: auto; padding: 8px 20px 30px; }
.hsec { padding: 16px 0; border-bottom: 1px solid var(--line); }
.hsec h3 { margin: 0 0 6px; font-size: 17px; }
.hsec p { margin: 0 0 10px; color: var(--muted); font-size: 14.5px; }
.ptable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ptable td { padding: 8px 4px; border-top: 1px solid var(--line); vertical-align: middle; overflow-wrap: anywhere; }
.ptable input[type="number"] { width: 70px; }
.ptable select { max-width: 150px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; cursor: pointer; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); }
.claim { padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; margin: 8px 0; }

/* space popover */
.pop { position: fixed; z-index: 30; width: min(320px, calc(100vw - 24px)); background: var(--raise); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.7); padding: 14px; }
.pop h3 { margin: 0 0 4px; font: 700 22px/1.1 var(--display); padding-right: 34px; }
.pop .x { width: 32px; height: 32px; right: 8px; top: 8px; font-size: 20px; }
.pop .fx { color: var(--gold); font-weight: 700; font-size: 14.5px; }
.pop .maps { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.pop .mapline { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 10px; align-items: center; }
.pop .mapline img { width: 54px; height: 54px; border-radius: 6px; object-fit: cover; background: #000; }
.pop .here { margin-top: 10px; font-size: 13.5px; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 140%); z-index: 60; background: var(--raise-2); border: 1px solid var(--line-2); color: var(--text); padding: 12px 18px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.6); transition: transform .25s, opacity .25s; max-width: min(92vw, 520px); font-weight: 700; opacity: 0; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.good { border-color: var(--good); }
.toast.bad { border-color: var(--warn); }

.foot { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--faint); font-size: 13.5px; padding: 30px 20px 36px; border-top: 1px solid var(--line); margin-top: 18px; }
.foot-count { display: inline-flex; align-items: center; font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 12.5px; color: var(--faint); letter-spacing: .3px; white-space: nowrap; }
.foot-count .fc-n { color: #cfe0ff; font-weight: 700; text-shadow: 0 0 8px rgba(30,107,255,.45); margin: 0 4px; }
.foot-count .fc-dot { color: #ff2740; margin-right: 4px; }
.foot-count .fc-img { height: 15px; vertical-align: middle; filter: invert(1) brightness(1.5); opacity: .9; }
.foot-meta { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.foot-updated { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 12.5px; color: var(--faint); letter-spacing: .3px; white-space: nowrap; }
.foot-count:not([hidden]) + .foot-updated::before { content: '\00b7'; margin-right: 10px; color: var(--faint); }
.foot-more { text-align: center; font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 13px; color: var(--faint); letter-spacing: .3px; line-height: 1.9; }
.foot-more a { color: var(--accent); text-decoration: none; white-space: nowrap; }
.foot-more a:hover { color: var(--text); text-decoration: underline; }
.foot-more .sep { margin: 0 4px; }
/* Phones: the label gets its own line and the three links stay on one line. */
@media (max-width: 560px) {
  .foot-more { white-space: nowrap; font-family: var(--ui); font-size: 13px; letter-spacing: 0; }
  .foot-more .fm-label { display: block; }
  .foot-more .fm-long { display: none; }
  .foot-more .sep { margin: 0 2px; }
}
.foot-badges { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
/* developer badge and Ko-fi button, same as MSploit's other tools */
a.credit { display: inline-flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; border: 1px solid var(--line-2); border-radius: 12px; background: #060607; text-decoration: none; transition: .16s; }
a.credit:hover { border-color: #2f8cff; box-shadow: 0 0 20px rgba(47,140,255,.22); transform: translateY(-2px); }
a.credit img { width: 42px; height: 42px; border-radius: 10px; border: 1px solid #ffffff1f; box-shadow: 0 0 12px rgba(47,140,255,.28); display: block; }
a.credit .ctxt { display: flex; flex-direction: column; line-height: 1.3; text-align: left; }
a.credit .c1 { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 11px; color: #5a6273; text-transform: uppercase; letter-spacing: 1.5px; }
a.credit .c2 { font-size: 16px; font-weight: 800; color: #2f8cff; text-shadow: 0 0 10px rgba(47,140,255,.4); }
a.credit .c3 { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 11px; color: #ff2740; }
a.kofi-support { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 11px; font-family: system-ui, 'Segoe UI', Arial, sans-serif; font-size: 14px; font-weight: 800; letter-spacing: .2px; text-decoration: none; color: #fff; background: #060607; border: 1px solid #2a2a2a; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
a.kofi-support .kofi-heart { font-size: 15px; line-height: 1; display: inline-block; transform-origin: center center; }
a.kofi-support .kofi-heart.beat, a.kofi-support:hover .kofi-heart { animation: kofiBeat .95s ease-in-out; }
a.kofi-support:hover { transform: translateY(-2px); border-color: #ff2740; box-shadow: 0 8px 24px -8px rgba(255,39,64,.55); color: #fff; }
@keyframes kofiBeat { 0% { transform: scale(1); } 14% { transform: scale(1.32); } 28% { transform: scale(1); } 42% { transform: scale(1.22); } 60% { transform: scale(1); } 100% { transform: scale(1); } }

/* ---- responsive ---- */
@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(0,1fr); }
  .board-col { display: contents; }
  .board-zone { order: 1; }
  .side { order: 2; position: static; }
  .standings { order: 3; margin-top: 0; }
  .board-wrap { max-width: 860px; }
}
@media (max-width: 640px) {
  .top { padding: 10px 14px; gap: 10px; }
  .brand h1 { font-size: 26px; }
  .brand-crow { width: 34px; height: 38px; }
  .daybox { padding: 4px 10px; }
  .day { font-size: 18px; }
  .clock { font-size: 13px; }
  .topnav { margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .topnav::-webkit-scrollbar { display: none; }
  .nav-btn { white-space: nowrap; }
  .zoom-btn { display: inline-flex; }
  .nav-btn { padding: 7px 9px; font-size: 14px; }
  .demo-bar { padding: 10px 14px; font-size: 14px; }
  .layout { padding: 14px 10px 6px; gap: 14px; }
  .board-wrap { min-width: 0; border-radius: 10px; }
  .panel { padding: 14px; }
  .roll-box { grid-template-columns: 96px minmax(0,1fr); gap: 12px; }
  .d4 { width: 96px; height: 90px; }
  .task-head { grid-template-columns: 72px minmax(0,1fr); }
  .task-cover { width: 72px; height: 72px; }
  .st-list { grid-template-columns: 1fr; }
  .modal { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* board zoom (phones) */
/* the zone is exactly the board, so the buttons and the roll stage sit on its edges */
.board-zone { position: relative; min-width: 300px; width: 100%; max-width: min(100%, calc(100vh - 120px)); margin: 0 auto; }
@media (max-width: 1100px) { .board-zone { max-width: 860px; } }
@media (max-width: 640px) { .board-zone { min-width: 0; } }
.board-zone.busy .zoom-btn { visibility: hidden; }
.zoom-btn { display: none; position: absolute; left: 10px; bottom: 10px; z-index: 5; align-items: center; gap: 6px; min-height: 40px; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.72); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
.board-wrap.zoomed { overflow: auto; aspect-ratio: 1; -webkit-overflow-scrolling: touch; }
.board-wrap.zoomed svg { width: 220%; height: auto; }
@media (max-width: 760px) { .zoom-btn { display: inline-flex; } }

/* invite-only screen */
body.gated .topnav > :not(.clan-switch), body.gated .daybox, body.gated .demo-bar { display: none !important; }
body.gated .topnav { margin-left: auto; width: auto; }
body.gated .foot { border-top: 0; margin-top: 0; }
.gate { min-height: calc(100vh - 230px); display: grid; place-items: center; padding: 24px 16px; }
.gate-card { width: min(520px, 100%); text-align: center; border: 1px solid var(--line); border-radius: 18px; background: var(--raise); padding: 34px 26px; }
.gate-crow { width: 120px; height: 132px; }
.gate-card h2 { font: 700 40px/1.05 var(--display); margin: 10px 0 10px; }
.gate-card p { color: var(--muted); max-width: 42ch; margin: 0 auto 22px; }
/* countdown to the start (sign-ups open) */
.countdown { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 6px 0 16px; padding: 18px 14px 16px; border: 1px solid var(--line-2); border-radius: 14px; background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%), var(--raise-2); text-align: center; }
.cd-label { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.cd-time { display: flex; justify-content: center; gap: 8px; min-height: 64px; align-items: center; }
.cd-seg { display: flex; flex-direction: column; align-items: center; min-width: 62px; padding: 8px 6px 6px; border-radius: 10px; background: #000; border: 1px solid var(--line); }
.cd-seg b { font: 700 32px/1 var(--display); color: var(--gold); font-variant-numeric: tabular-nums; text-shadow: 0 0 14px color-mix(in srgb, var(--accent) 45%, transparent); }
.cd-seg i { font-style: normal; font-size: 12px; color: var(--muted); margin-top: 4px; letter-spacing: .06em; }
.cd-now { font: 700 28px/1 var(--display); color: var(--good); }
.cd-date { font-size: 15px; color: var(--text); }
.gate-card .countdown { margin: 0 0 22px; }
.countdown + p { margin-top: 0; }
.push-on { color: var(--good) !important; }
/* song covers on map tiles */
.sp .cover { clip-path: inset(0 round 4px); opacity: 0; animation: coverIn .5s ease-out forwards; }
.sp .cover-shade { fill: rgba(0,0,0,.45); pointer-events: none; }
@keyframes coverIn { to { opacity: .95; } }
.sp.has-cover text { fill: #fff; paint-order: stroke; stroke: rgba(0,0,0,.85); stroke-width: 3px; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .sp .cover { animation: none; opacity: .95; } }
/* end of the game */
.confetti.burst { z-index: 70; }
.finale .lede { font-size: 17px; }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 10px; margin: 18px 0 14px; }
.pod { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-width: 0; }
.pod b { font-size: 16px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod > span { font-size: 13px; color: var(--muted); }
.pod-ava { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--c); object-fit: cover; display: grid; place-items: center; font-weight: 800; font-size: 22px; background: #1a1d18; color: #fff; box-shadow: 0 0 18px color-mix(in srgb, var(--c) 50%, transparent); }
.pod1 .pod-ava { width: 84px; height: 84px; font-size: 28px; }
.pod-step { width: 100%; margin-top: 8px; border-radius: 10px 10px 0 0; display: grid; place-items: center; font: 700 26px/1 var(--display); color: var(--accent-ink); background: linear-gradient(180deg, var(--gold), color-mix(in srgb, var(--gold) 55%, #000)); }
.pod1 .pod-step { height: 96px; font-size: 34px; }
.pod2 .pod-step { height: 70px; background: linear-gradient(180deg, #d7dbe0, #7c8188); }
.pod3 .pod-step { height: 52px; background: linear-gradient(180deg, #e0a36a, #7a4a22); }
.pod.empty { visibility: hidden; }
.finale-rest { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.finale-rest li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--raise-2); }
.finale-rest li.me { border-color: var(--accent); }
.finale-rest .place { min-width: 34px; font-weight: 800; color: var(--gold); }
.finale-rest .why { margin-left: auto; }
.finale-me { font-size: 17px; margin: 6px 0 16px; }
/* while you were away */
.away { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.away li { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--raise-2); font-size: 16px; }
.away-next { font-size: 17px; margin: 0 0 16px; color: var(--gold) !important; }
/* replay of the day */
.replay-btn { position: absolute; right: 10px; bottom: 10px; z-index: 5; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.72); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
.replay-btn:hover { border-color: var(--accent); }
.replay-btn span { color: var(--accent); }
.board-zone.busy .replay-btn { visibility: hidden; }
.replay-cap { position: absolute; left: 12px; right: 12px; bottom: 12px; margin: 0 auto; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 620px; padding: 10px 10px 10px 16px; border-radius: 12px; background: rgba(0,0,0,.84); border: 1px solid var(--line-2); color: #fff; font-size: 15px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.replay-cap #replayText { min-width: 0; }
.replay-cap button { flex: none; padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.3); background: none; color: #fff; font-weight: 700; cursor: pointer; }
.board-zone.replaying .zoom-btn { visibility: hidden; }
/* roll reminders in the player panel */
.me-push:empty { display: none; }
.me-push { margin-top: 14px; }
.rem { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 12px; border-radius: 14px; border: 1px solid var(--line-2); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%), var(--raise-2); transition: border-color .25s, box-shadow .25s; }
.rem.on { border-color: color-mix(in srgb, var(--good) 55%, var(--line-2)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--good) 25%, transparent), 0 8px 24px -12px color-mix(in srgb, var(--good) 60%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--good) 12%, transparent), transparent 60%), var(--raise-2); }
.rem-bell { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #000; border: 1px solid var(--line-2); color: var(--muted); }
.rem-bell svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transform-origin: 50% 10%; }
.rem:not(.on):hover .rem-bell svg { animation: ring 1s ease-in-out; }
.rem.on .rem-bell { color: var(--good); border-color: color-mix(in srgb, var(--good) 50%, transparent); box-shadow: 0 0 16px color-mix(in srgb, var(--good) 35%, transparent); }
.rem.on .rem-bell svg { fill: color-mix(in srgb, var(--good) 25%, transparent); animation: ring 1.1s ease-in-out 1; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
.rem-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rem-txt b { font-size: 15.5px; color: var(--text); }
.rem-txt > span { font-size: 13.5px; color: var(--muted); line-height: 1.35; }
.rem-test { align-self: flex-start; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--good); font: inherit; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rem-switch { flex: none; position: relative; width: 52px; height: 30px; border-radius: 999px; border: 1px solid var(--line-2); background: #000; cursor: pointer; transition: background .25s, border-color .25s, box-shadow .25s; }
.rem-switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: transform .25s cubic-bezier(.3,1.4,.5,1), background .25s; }
.rem-switch:hover { border-color: var(--accent); }
.rem-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rem-switch[aria-checked="true"] { background: var(--good); border-color: var(--good); box-shadow: 0 0 14px color-mix(in srgb, var(--good) 45%, transparent); }
.rem-switch[aria-checked="true"] i { transform: translateX(22px); background: #fff; }
@media (prefers-reduced-motion: reduce) { .rem-bell svg { animation: none !important; } }
.start-field select { max-width: 260px; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: #000; color: var(--text); font: inherit; color-scheme: dark; }
.start-field { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; font-size: 14px; color: var(--muted); }
.start-field input { max-width: 260px; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: #000; color: var(--text); font: inherit; color-scheme: dark; }
@media (max-width: 420px) { .cd-seg { min-width: 54px; } .cd-seg b { font-size: 26px; } }

/* ---- atmosphere ---- */
.board-svg .fog1 { animation: drift 38s ease-in-out infinite alternate; }
.board-svg .fog2 { animation: drift 46s ease-in-out infinite alternate-reverse; }
.board-svg .fog3 { animation: drift 54s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translateX(-90px); } to { transform: translateX(110px); } }
.board-svg .wisp { animation: wisp 9s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes wisp { 0%,100% { transform: translate(0,0) scale(.7); opacity: .15; } 25% { transform: translate(14px,-18px) scale(1); opacity: .9; } 50% { transform: translate(-6px,-34px) scale(.8); opacity: .4; } 75% { transform: translate(-16px,-12px) scale(1.05); opacity: .85; } }
.board-svg .flake { animation: snow 12s linear infinite; }
.board-svg .leaf { animation: leaf 16s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes leaf { from { transform: translate(0, 0) rotate(0); } 25% { transform: translate(var(--sway, 20px), 260px) rotate(110deg); } 50% { transform: translate(calc(var(--sway, 20px) * -1), 520px) rotate(200deg); } 75% { transform: translate(var(--sway, 20px), 780px) rotate(290deg); } to { transform: translate(0, 1060px) rotate(380deg); } }
@keyframes snow { from { transform: translate(0, 0); } 50% { transform: translate(var(--sway, 10px), 520px); } to { transform: translate(0, 1040px); } }
.board-svg .eyes, .brand-crow .eyes, .gate-crow .eyes, .cback .eyes { animation: blink 5.5s infinite; transform-box: fill-box; transform-origin: center; }
/* Taco does a little dip and wiggle every few seconds, the way Chester blinks. */
.board-svg .art-hero, .taco-move { animation: peek 6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.taco-move { transform-origin: 50% 92%; }
.board-svg .art-hero.hop { animation-name: tacohop; }
@keyframes tacohop { 0%, 60%, 100% { transform: none; } 66% { transform: translateY(-14%); } 72% { transform: translateY(0) scale(1.05, .95); } 77% { transform: rotate(-4deg); } 83% { transform: rotate(3deg); } 89% { transform: rotate(-1.5deg); } 94% { transform: none; } }
@keyframes peek { 0%, 60%, 100% { transform: none; } 65% { transform: translateY(6%) scale(1.02, .97); } 71% { transform: rotate(-4deg); } 77% { transform: rotate(3.5deg); } 83% { transform: rotate(-2deg); } 89% { transform: rotate(1deg); } 94% { transform: none; } }
@keyframes blink { 0%,94%,100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }

/* ---- roll preview, landing ---- */
.board-svg .prev { animation: prevIn .35s ease-out both; }
.board-svg .prev-ring { fill: rgba(242,163,58,.12); stroke: var(--accent); stroke-width: 3; stroke-dasharray: 7 5; animation: march 1.2s linear infinite; }
.board-svg .prev-dot { fill: var(--accent); stroke: #000; stroke-width: 2; }
.board-svg .prev-n { font: 700 13px var(--ui); fill: var(--accent-ink); }
@keyframes prevIn { from { opacity: 0; } }
@keyframes march { to { stroke-dashoffset: -24; } }
.board-svg .ripple { fill: none; stroke: var(--good); stroke-width: 4; transform-box: fill-box; transform-origin: center; animation: ripple 1.1s ease-out forwards; }
.board-svg .ripple.r2 { animation-delay: .18s; opacity: 0; }
@keyframes ripple { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }

/* ---- the roll, on the board ---- */
.roll-stage { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; pointer-events: none; border-radius: 14px;
  background: radial-gradient(circle at 50% 50%, rgba(0,0,0,.25), rgba(0,0,0,.72) 70%); opacity: 0; transition: opacity .25s; }
.roll-stage.on { opacity: 1; }
.stage-die { grid-area: 1 / 1; width: 200px; height: 186px; }
.stage-die.d4 .d4-body { filter: drop-shadow(0 18px 24px rgba(0,0,0,.7)) drop-shadow(0 0 30px rgba(255,170,60,.35)); }
.burst { grid-area: 1 / 1; font: 800 170px/1 var(--display); color: var(--gold); text-shadow: 0 6px 0 #2a1600, 0 0 50px rgba(242,196,107,.65); opacity: 0; transform: translateY(-120px) scale(.4); }
.burst.go { animation: burst .8s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes burst { 0% { opacity: 0; transform: translateY(-60px) scale(.4); } 40% { opacity: 1; transform: translateY(var(--lift-hi, -190px)) scale(1.15); } 100% { opacity: 1; transform: translateY(var(--lift, -180px)) scale(1); } }

/* ---- card rays ---- */
.card-stage { position: relative; }
.card-stage::before { content: ""; position: absolute; left: 50%; top: 42%; width: 900px; height: 900px; margin: -450px 0 0 -450px; z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--cc, #f2c46b) 32%, transparent) 0 8deg, transparent 8deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 0 22%, transparent 62%); mask: radial-gradient(circle, #000 0 22%, transparent 62%);
  animation: rays 24s linear infinite; opacity: 0; transition: opacity .6s .3s; }
.card-overlay.ready .card-stage::before { opacity: 1; }
@keyframes rays { to { transform: rotate(360deg); } }

/* ---- phone action bar ---- */
.mbar { display: none; }
@media (max-width: 760px) {
  body.has-mbar { padding-bottom: 84px; }
  .mbar { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 25; display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 10px; align-items: center;
    padding: 10px 10px 10px 12px; border-radius: 16px; background: rgba(18,20,16,.94); border: 1px solid var(--line-2); box-shadow: 0 14px 40px rgba(0,0,0,.7); backdrop-filter: blur(8px); }
  body[data-theme="christmas"] .mbar, body[data-theme="snowy"] .mbar { background: rgba(12,23,38,.94); }
  body[data-theme="thanksgiving"] .mbar { background: rgba(26,17,10,.94); }
  .mbar[hidden] { display: none !important; }
  .mb-ava { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 3px solid var(--c, var(--accent)); background: var(--raise-2); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
  .mb-txt { min-width: 0; line-height: 1.25; }
  .mb-txt b { display: block; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mb-txt span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mbar .btn { min-height: 44px; }
  .toast { bottom: 98px; }
  .stage-die { width: 150px; height: 140px; }
  .burst { font-size: 120px; --lift: -130px; --lift-hi: -140px; }
}

/* ---- clan games ---- */
.clan-switch { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--raise); }
.clan-switch[hidden] { display: none; }
.clan-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 700 14.5px/1 var(--ui); cursor: pointer; }
.clan-btn:hover { color: var(--text); }
.clan-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); cursor: default; }
.clan-ic, .clan-big { display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; background: var(--raise-2); color: var(--text); font-weight: 700; flex: none; }
.clan-ic[hidden], .clan-big[hidden] { display: none; }
.clan-ic { width: 30px; height: 30px; font-size: 12px; }
.clan-btn:not([aria-pressed="true"]) .clan-ic { filter: grayscale(.5); opacity: .8; }
.clan-btn:hover .clan-ic { filter: none; opacity: 1; }
.clan-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-top: 6px; }
.clan-pick { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 14px 18px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--raise-2); color: var(--text); font: 700 22px/1.1 var(--display); cursor: pointer; transition: transform .15s, border-color .15s; }
.clan-pick:hover, .clan-pick:focus-visible { border-color: var(--accent); transform: translateY(-2px); }
.clan-big { width: 88px; height: 88px; font-size: 28px; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
@media (max-width: 640px) { .clan-btn .nm { display: none; } .clan-btn { padding: 3px; } }

/* ---- UI pass, Oct 20 ---- */
.nav-btn .sm { display: none; }
@media (max-width: 640px) {
  .topnav { overflow: visible; justify-content: space-between; gap: 2px; }
  .nav-btn .lg { display: none; }
  .nav-btn .sm { display: inline; }
  .nav-btn { padding: 7px 8px; }
}
/* Phones: Rules and Maps sit together on the left as bold links with an orange icon, and the bell,
   skull and clan switcher keep the right edge, so the row looks right with any mix of them. */
.nav-btn .nv-ic { display: inline-block; width: 18px; height: 18px; color: var(--accent); flex: none; }   /* Rules and Maps keep their orange icons on every screen */
@media (max-width: 640px) {
  .topnav { justify-content: flex-start; gap: 18px; align-items: center; padding-left: 2px; }
  #playlistBtn, #accBtn { margin-right: auto; }   /* Maps, or Missions in AccSaber mode; the bell, skull and clan switcher go to the right edge */
  .topnav:has(#playlistBtn[hidden]):has(#accBtn[hidden]) #howBtn { margin-right: auto; }   /* neither showing: Rules does the pushing */
  #howBtn, #playlistBtn, #accBtn { padding: 6px 0; color: var(--text); font-weight: 700; border: 0; border-radius: 0; border-bottom: 2px solid transparent; }
  #howBtn:hover, #playlistBtn:hover, #accBtn:hover, #howBtn:focus-visible, #playlistBtn:focus-visible, #accBtn:focus-visible { border-bottom-color: var(--accent); }
}
/* Phones: Zoom and Replay sit in a row under the board instead of over its last row. */
@media (max-width: 760px) {
  .board-zone { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
  .board-zone > .board-wrap { flex: 0 0 100%; }
  .board-zone > .zoom-btn, .board-zone > .replay-btn { position: static; background: var(--raise); border-color: var(--line-2); }
  .board-zone > .replay-btn { margin-left: auto; }
  .board-zone > .roll-stage { bottom: 48px; }
}
.turn > h2 { margin-bottom: 0; }
.turn > p { margin: 0; }
.turn > h2 + p.why { margin-top: -8px; }
@media (max-width: 640px) {
  .ptable, .ptable tbody { display: block; }
  .ptable tr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 0; border-top: 1px solid var(--line); }
  .ptable td { border: 0; padding: 0; }
  .ptable td:first-child { flex: 1 0 100%; }
}
/* Standings get the full width under the board and the side panels. */
.layout > .standings { grid-column: 1 / -1; margin-top: 4px; }
.st .sub { display: flex !important; align-items: center; gap: 6px; }
.st-cover { width: 18px; height: 18px; border-radius: 4px; object-fit: cover; flex: none; }
.route-card .rc-stats { display: block; margin-top: 8px; font-size: 13px; color: var(--faint); }
.st .st-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptable td:empty { display: none; }

/* Before a game is picked: no theme, no character, plain type. */
body.neutral { --display: var(--ui); --raise: #111; --raise-2: #191919; --line: #262626; --line-2: #333; }
body.neutral .brand h1, body.neutral .gate-card h2 { letter-spacing: 0; }
.gate-die { width: 96px; height: 96px; margin: 0 auto 4px; display: block; }

/* Wide desktop: standings on the left, the board in the middle, your panels on the right. */
@media (min-width: 1500px) {
  .layout { grid-template-columns: 300px minmax(0, 1fr) 400px; grid-template-areas: "st board side"; max-width: 1960px; }
  .layout > .board-col { grid-area: board; }
  .layout > .side { grid-area: side; }
  .layout > .standings { grid-area: st; grid-column: auto; margin-top: 0; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; scrollbar-width: thin; }
  .layout > .standings h2 { font-size: 22px; }
  .layout > .standings .st-list { grid-template-columns: 1fr; gap: 6px; }
  .layout > .standings .st { padding: 8px 10px; }
}
/* Mid-size desktop: standings stack under your panels on the right, next to the board. */
@media (min-width: 1101px) and (max-width: 1499px) {
  .layout { grid-template-areas: "board side" "board st"; grid-template-rows: auto 1fr; }
  .layout > .board-col { grid-area: board; }
  .layout > .side { grid-area: side; position: static; }
  .layout > .standings { grid-area: st; grid-column: auto; margin-top: 0; align-self: start; }
  .layout > .standings h2 { font-size: 22px; }
  .layout > .standings .st-list { grid-template-columns: 1fr; gap: 6px; }
  .layout > .standings .st { padding: 8px 10px; }
}

/* Roll reminders: a bell in the header that opens a small panel. The bell looks the same on or off; the panel shows which. */
.rem-btn { position: relative; }
.rem-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rem-pop { position: fixed; z-index: 45; width: min(380px, calc(100vw - 24px)); padding: 8px; border-radius: 16px; background: var(--raise); border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.rem-pop .rem { border: 0; background: none; box-shadow: none; }
.rem-pop .push-box:empty::before { content: 'Checking this device.'; display: block; padding: 12px; color: var(--muted); font-size: 14px; }
.rem-pop .push-box > p { margin: 10px 12px; }

/* Server switcher: a button in the header's menu with a dropdown. */
.topnav .clan-switch { display: flex; border: 0; padding: 0; background: none; border-radius: 0; }
.topnav .clan-switch[hidden] { display: none; }
.clan-cur { gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text); font-weight: 700; }
.clan-cur:hover, .clan-cur[aria-expanded="true"] { border-color: var(--accent); }
.clan-cur .clan-ic { width: 28px; height: 28px; filter: none !important; opacity: 1 !important; }
.clan-cur .chev, .clan-opt .tick { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.clan-cur .chev { color: var(--muted); transition: transform .2s; }
.clan-cur[aria-expanded="true"] .chev { transform: rotate(180deg); }
.clan-pop { position: fixed; z-index: 45; min-width: 220px; padding: 6px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.clan-pop .cp-h { margin: 6px 10px 6px; font-size: 12.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.clan-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--text); font: 700 16px/1 var(--ui); cursor: pointer; text-align: left; }
.clan-opt:hover { background: var(--raise-2); }
.clan-opt span { flex: 1; }
.clan-opt .clan-ic { width: 34px; height: 34px; font-size: 13px; }
.clan-opt.on { cursor: default; }
.clan-opt.on .tick { color: var(--accent); }
@media (max-width: 640px) { .clan-cur { padding: 3px 6px 3px 3px; gap: 4px; } .clan-cur .nm { display: none; } }
.sound-opt { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.topnav .clan-switch { margin-left: 6px; }
@media (max-width: 640px) { .topnav .clan-switch { margin-left: 0; } }

/* Card pictures from the card editor */
.cfront .cart { min-height: 0; overflow: hidden; }
.cfront .cart.pic { background: #000; padding: 0; }
.cfront .cart-img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Picture cards: the art is the whole card */
.cfront.is-full { border: 0; background: #0b1220; }
.cfront .cfull { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; }

.hsec .hsub { margin: 16px 0 6px; font-size: 15px; font-weight: 700; color: var(--text); }

/* Host tools: a skull in the header; the board designer opens from inside the drawer */
.host-btn { position: relative; }
.host-btn svg { width: 24px; height: 24px; fill: currentColor; display: block; overflow: visible; }
.host-btn:hover svg, .host-btn:focus-visible svg { color: var(--accent); }
.skull * { transform-box: view-box; }
.skull .sk-all { transform-origin: 12px 19px; transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.skull .sk-jaw { transform-origin: 12px 18px; }
.skull .sk-eye { fill: #ff5a36; opacity: 0; transition: opacity .2s; filter: drop-shadow(0 0 1.6px #ff5a36); }
/* hover: tilt, eyes light up, jaw chatters */
.host-btn:hover .sk-all, .host-btn:focus-visible .sk-all { transform: rotate(-8deg); }
.host-btn:hover .sk-eye, .host-btn:focus-visible .sk-eye { opacity: 1; }
.host-btn:hover .sk-jaw, .host-btn:focus-visible .sk-jaw { animation: skChat .36s ease-in-out 3; }
@keyframes skChat { 0%, 100% { transform: none; } 50% { transform: translateY(1.6px) rotate(4deg); } }
/* something waiting: the eyes smoulder and the jaw calls out every few seconds */
.host-btn.todo .sk-eye { animation: skGlow 2.4s ease-in-out infinite; }
.host-btn.todo .sk-jaw { animation: skCall 5s ease-in-out infinite; }
@keyframes skGlow { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes skCall { 0%, 18%, 100% { transform: none; } 3%, 9%, 15% { transform: translateY(1.6px) rotate(4deg); } 6%, 12% { transform: none; } }
/* page load: the jaw opens and shuts once to say hello */
.host-btn.hello .sk-jaw { animation: skHello .55s ease-in-out 1; }
@keyframes skHello { 0%, 100% { transform: none; } 45% { transform: translateY(2px) rotate(6deg); } }
/* click: a cackle */
.host-btn.laugh .sk-all { animation: skCackle .8s ease-in-out; }
.host-btn.laugh .sk-jaw { animation: skChat .13s linear 6; }
.host-btn.laugh .sk-eye { opacity: 1; animation: none; }
@keyframes skCackle { 0%, 100% { transform: none; } 15% { transform: rotate(-12deg) translateY(-1px); } 35% { transform: rotate(10deg) translateY(-1.5px); } 55% { transform: rotate(-8deg); } 75% { transform: rotate(5deg); } }
@media (prefers-reduced-motion: reduce) { .skull *, .host-btn:hover .sk-jaw, .host-btn.todo .sk-jaw, .host-btn.hello .sk-jaw, .host-btn.laugh .sk-all, .host-btn.laugh .sk-jaw { animation: none !important; transition: none !important; } .host-btn:hover .sk-all { transform: none; } }
.host-btn .nav-badge { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; font-size: 11.5px; padding: 0 5px; }
/* the Admin card's Host tools button: the same skull, left of the words */
.btn.host-btn { display: inline-flex; align-items: center; gap: 8px; }
.btn.host-btn svg { width: 20px; height: 20px; }
.btn.host-btn:hover svg, .btn.host-btn:focus-visible svg { color: inherit; }
.drawer-head .designer-link { margin-left: auto; margin-right: 52px; }

/* ---- How to play ---- */
.modal.how { width: min(740px, 100%); }
.hw-hero { display: flex; align-items: center; gap: 14px; margin: -2px 0 6px; padding: 14px 16px; border-radius: var(--r); background: radial-gradient(120% 140% at 0% 50%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%), var(--raise-2); border: 1px solid var(--line-2); }
.hw-hero svg { flex: none; width: 74px; height: 76px; overflow: visible; }
.hw-hero .a-bob { animation: hwBob 2.6s ease-in-out infinite; transform-box: view-box; }
@keyframes hwBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.hw-hero p { margin: 0; font-size: 17px; line-height: 1.4; color: var(--text); }
.hw-h { margin: 18px 0 9px; font: 700 13px var(--ui); letter-spacing: .09em; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: 10px; }
.hw-h::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.hw-h span { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); font-size: 14px; }
.hw-loop { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; counter-reset: hw; }
.hw-step { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 12px 12px; border-radius: var(--r); background: var(--raise-2); border: 1px solid var(--line); counter-increment: hw; }
.hw-step::before { content: counter(hw); position: absolute; top: 10px; right: 11px; font: 700 12px var(--ui); color: var(--faint); }
.hw-step:not(:last-child)::after { content: ''; position: absolute; right: -9px; top: 32px; width: 8px; height: 8px; border-top: 2px solid var(--line-2); border-right: 2px solid var(--line-2); transform: rotate(45deg); }
.hw-ic { display: block; width: 40px; height: 40px; margin-bottom: 4px; }
.hw-ic svg { width: 100%; height: 100%; display: block; }
.hw-step b { font-size: 16px; }
.hw-step > span:last-child { font-size: 14px; line-height: 1.4; color: var(--muted); }
.hw-step > span:last-child b { font-size: inherit; color: var(--text); }
.hw-routes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hw-route { padding: 14px; border-radius: var(--r); background: var(--raise-2); border: 1px solid var(--line); border-left: 4px solid var(--good); }
.hw-route.risk { border-left-color: var(--warn); }
.hw-tag { display: block; font: 700 12px var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--good); margin-bottom: 2px; }
.hw-route.risk .hw-tag { color: var(--warn); }
.hw-route b { font-size: 17px; }
.hw-route p { margin: 6px 0 8px; font-size: 15px; line-height: 1.4; }
.hw-stats { display: block; font-size: 13px; color: var(--muted); line-height: 1.5; }
.hw-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hw-sp { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; border-radius: var(--r); background: var(--raise-2); border: 1px solid var(--line); }
.hw-tile { flex: none; width: 54px; height: 54px; border-radius: 10px; display: block; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); }
.hw-sp > span { min-width: 0; font-size: 14px; line-height: 1.35; color: var(--muted); }
.hw-sp > span b { font-size: 15px; color: var(--text); }
.hw-sp > span > span { display: block; margin-top: 2px; }
.hw-tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.hw-tips li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.45; }
.hw-ti { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--raise-2); border: 1px solid var(--line); font-size: 16px; line-height: 1; }
.hw-rx { display: grid; place-items: center; color: var(--text); }
.hw-rx svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hw-dot { width: 12px; height: 12px; border-radius: 50%; background: #3fd04a; box-shadow: 0 0 0 2px #000, 0 0 8px #3fd04a; }
.hw-help { margin-top: 16px; padding: 12px 14px; border-radius: var(--r); border: 1px dashed var(--line-2); font-size: 14px; line-height: 1.45; color: var(--muted); }
.hw-help b { color: var(--text); }
@media (max-width: 640px) {
  .hw-loop { grid-template-columns: 1fr 1fr; }
  .hw-step:nth-child(2)::after { display: none; }
  .hw-routes { grid-template-columns: 1fr; }
  .hw-legend { grid-template-columns: 1fr 1fr; gap: 6px; }
  .hw-tile { width: 46px; height: 46px; }
  .hw-sp > span { font-size: 13px; }
  .hw-sp > span b { font-size: 14px; }
  .hw-step { padding: 12px 10px 10px; }
  .hw-hero { padding: 12px; }
  .hw-hero svg { width: 60px; height: 62px; }
  .hw-hero p { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .hw-hero .a-bob { animation: none; } }

/* ---- Host tools tabs ---- */
.htabs { position: sticky; top: -8px; z-index: 2; display: flex; gap: 4px; margin: -8px -20px 4px; padding: 10px 20px; background: var(--raise); border-bottom: 1px solid var(--line); }
.htab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 6px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--muted); font: 700 15px var(--ui); cursor: pointer; }
.htab:hover { color: var(--text); background: var(--raise-2); }
.htab[aria-selected="true"] { color: var(--accent-ink); background: var(--accent); }
.htab[aria-selected="true"] .nav-badge { background: var(--accent-ink); color: var(--accent); }
.hpane > .hsec:last-child { border-bottom: 0; }
.hsec.danger-zone { margin-top: 10px; padding: 14px; border: 1px dashed color-mix(in srgb, var(--warn) 55%, transparent); border-radius: var(--r); }
.hsec .hsub .why { font-weight: 400; font-size: 13px; margin-left: 6px; }
.check input { flex: none; }
.ptable .btn { white-space: nowrap; }
.row.nowrap { flex-wrap: nowrap; }

/* ---- standings header ---- */
.st-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.st-head h2 { margin: 0 !important; flex: 1; }
.hall-btn { white-space: nowrap; }

/* ---- player card ---- */
.modal.pcard { width: min(620px, 100%); }
.pc-head { display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin-bottom: 14px; border-radius: var(--r); background: var(--raise-2); border: 1px solid var(--line-2); border-left: 4px solid var(--c); }
.pc-ava { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; display: grid; place-items: center; background: #1a1d18; border: 3px solid var(--c); font: 700 20px var(--ui); color: #fff; }
.pc-place { font: 700 20px var(--ui); }
.pc-where { color: var(--muted); font-size: 15px; margin-top: 2px; }
.pc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pc-tile { padding: 12px; border-radius: var(--r); background: var(--raise-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pc-tile b { font-size: 24px; line-height: 1.1; }
.pc-tile span { font-size: 13px; color: var(--muted); }
.pc-tile i { font-style: normal; font-size: 12.5px; color: var(--faint); overflow-wrap: anywhere; }
.pc-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.pc-badges > span { font: 700 12px var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-right: 4px; }
@media (max-width: 560px) { .pc-grid { grid-template-columns: 1fr 1fr; } .pc-tile b { font-size: 21px; } }

/* ---- hall of fame ---- */
.modal.hall { width: min(720px, 100%); }
.hf-games { display: grid; gap: 10px; }
.hf-game { padding: 12px 14px; border-radius: var(--r); background: var(--raise-2); border: 1px solid var(--line-2); }
.hf-gh { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.hf-gh b { font-size: 17px; }
.hf-gh span { font-size: 13px; color: var(--muted); }
.hf-pod { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hf-pod li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 10px 6px; border-radius: 10px; background: rgba(255,255,255,.03); min-width: 0; }
.hf-pod li.p1 { background: color-mix(in srgb, var(--gold) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 45%, transparent); }
.hf-m { font-size: 22px; line-height: 1; }
.hf-ava { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: #1a1d18; border: 2px solid var(--line-2); font: 700 15px var(--ui); color: #fff; }
.hf-pod b { font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hf-pod li > span:last-child { font-size: 12.5px; color: var(--muted); }
.hf-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.hf-table th { text-align: right; font: 700 12px var(--ui); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line-2); }
.hf-table th:first-child, .hf-table td:first-child { text-align: left; }
.hf-table td { text-align: right; padding: 8px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.hf-table tr.me td { color: var(--accent); font-weight: 700; }
.hf-rank { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; margin-right: 8px; background: var(--raise-2); color: var(--faint); font-size: 12px; font-weight: 700; vertical-align: middle; }

/* ---- host undo ---- */
.undo-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.undo-row:last-of-type { border-bottom: 0; }
.undo-row.old b { font-weight: 400; color: var(--muted); }
@media (max-width: 560px) {
  .hf-table { font-size: 14px; }
  .hf-table th { font-size: 10.5px; letter-spacing: 0; padding: 6px 4px; }
  .hf-table td { padding: 8px 4px; }
  .hf-rank { margin-right: 6px; }
  .hf-table th:last-child, .hf-table td:last-child { display: none; }   /* phones: Games makes room for names */
}
.hf-rm { margin-left: 10px; color: var(--warn) !important; font-size: 13px; }
.hf-rank.g1, .hf-rank.g2, .hf-rank.g3 { color: #2a1a0a; }
.hf-who { display: flex; align-items: center; }
.hf-who .hf-rank { flex: none; }
.hf-tava { flex: none; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; margin-right: 10px; display: inline-grid; place-items: center; background: #1a1d18; border: 1.5px solid var(--line-2); font: 700 11px var(--ui); color: #fff; }
.hf-who > span:last-child { min-width: 0; overflow-wrap: break-word; }
.hf-rank.g1 { background: #f2c046; } .hf-rank.g2 { background: #cfd6df; } .hf-rank.g3 { background: #d08a4e; }
.hf-table tr.hf-t1 td { background: rgba(242,192,70,.08); } .hf-table tr.hf-t2 td { background: rgba(207,214,223,.05); } .hf-table tr.hf-t3 td { background: rgba(208,138,78,.06); }
/* Hall of fame spotlight: the newest game's top 3 in laurels, the winner crowned in the middle, confetti behind. */
.hf-spot { position: relative; overflow: hidden; text-align: center; padding: 18px 14px 16px; border-radius: 16px; border: 1px solid var(--line-2);
  background: radial-gradient(70% 90% at 50% 0%, color-mix(in srgb, var(--gold) 35%, transparent), color-mix(in srgb, var(--accent) 12%, transparent) 45%, var(--raise) 75%); }
.hf-spot > * { position: relative; }
.hf-spot > .hf-conf { position: absolute; inset: 0; pointer-events: none; }
.hf-conf rect { transform-box: fill-box; transform-origin: center; }
.hf-kick { font: 700 12px var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hf-kick .hf-rm { letter-spacing: 0; text-transform: none; }
.hf-trio { display: grid; grid-template-columns: 1fr 1.35fr 1fr; gap: 10px; align-items: end; margin-top: 8px; }
.hf-tc { min-width: 0; padding: 12px 8px; border-radius: 14px; background: rgba(0,0,0,.28); border: 1px solid var(--line-2); display: flex; flex-direction: column; align-items: center; }
.hf-tc.hf-c1 { background: none; border: 0; }
.hf-lw { position: relative; width: 91px; height: 91px; display: grid; place-items: center; }
.hf-c1 .hf-lw { width: 149px; height: 149px; }
.hf-lau { position: absolute; inset: 0; width: 100%; height: 100%; }
.hf-crown { position: absolute; top: 2%; left: 50%; transform: translateX(-50%); width: 33px; height: 23px; }
.hf-sa { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid var(--m); background: var(--raise); display: grid; place-items: center; font: 700 20px var(--ui); color: var(--text); }
.hf-c1 .hf-sa { width: 92px; height: 92px; font-size: 32px; }
.hf-pl { font: 700 11px var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--m); }
.hf-tc b { display: block; max-width: 100%; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hf-c1 b { font: 700 30px/1.15 var(--display); }
.hf-dy { font-size: 12.5px; color: var(--muted); }
.hf-stats { display: flex; justify-content: center; gap: 18px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.hf-stats b { color: var(--text); font-size: 16px; margin-right: 4px; }
@media (max-width: 560px) {
  .hf-trio { grid-template-columns: 1fr 1fr; }
  .hf-trio .hf-c1 { grid-column: 1 / 3; order: -1; }
  .hf-c1 .hf-lw { width: 123px; height: 123px; }
  .hf-c1 .hf-sa { width: 76px; height: 76px; }
  .hf-lw { width: 81px; height: 81px; }
  .hf-sa { width: 50px; height: 50px; }
  .hf-c1 b { font-size: 26px; }
}

/* ---- token piles (6 or more on one space) ---- */
.board-svg .tok.piled { display: none; }
.board-svg .tok[data-pile] { cursor: pointer; }
.board-svg .pile-badge { cursor: pointer; }
.board-svg .pile-badge circle { fill: var(--accent); stroke: #000; stroke-width: 2.5; }
.board-svg .pile-badge text { font: 800 12.5px var(--ui); fill: var(--accent-ink); pointer-events: none; }
.board-svg .pile-badge:hover circle { filter: brightness(1.15); }
.modal.pile { width: min(460px, 100%); }
.pile-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 60vh; overflow: auto; }
.pile-list button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--raise-2); color: var(--text); font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.pile-list button:hover, .pile-list button:focus-visible { border-color: var(--accent); }
.pile-list button.me { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.pile-list b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pile-list b i { font-style: normal; font-weight: 400; color: var(--muted); }
.pile-list .ava-wrap { position: relative; flex: none; display: inline-flex; }
.pile-list .ava { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: #1a1d18; border: 2px solid var(--c); font: 700 12px var(--ui); color: #fff; }
.pl-place { font: 700 13px var(--ui); color: var(--muted); min-width: 34px; text-align: right; }
.admin-badge { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: #000; font: 800 12px/1.2 var(--ui); letter-spacing: .08em; text-transform: uppercase; }
.studio-btn[aria-disabled="true"] { opacity: .6; cursor: progress; }
/* long names with no spaces wrap in the thread, the finale and the who-reacted list */
#feed li, .finale-rest li, .finale-me, .pc-head > div { overflow-wrap: anywhere; min-width: 0; }
/* Host tools, Players: find a player */
.psearch { position: sticky; top: 52px; z-index: 1; display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--raise-2); }
.psearch:focus-within { border-color: var(--accent); }
.psearch svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; }
.psearch input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: 15px var(--ui); padding: 10px 0; outline: none; }
.psearch-n { flex: none; font-size: 13px; color: var(--muted); }
#hostBody [data-pname][hidden] { display: none !important; }

/* Host tools Players tab: your hosting switch, filter chips and a card per player */
.hp-you { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--raise-2); cursor: pointer; }
.hp-you-main { flex: 1; min-width: 0; }
.hp-you-main b { font-size: 16px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-you-main .why { display: block; margin-top: 2px; }
.hp-you-note { margin: 8px 2px 0; }
.hp-you-group { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--raise-2); overflow: hidden; }
.hp-you-group .hp-you { border: 0; border-radius: 0; background: none; }
.hp-you-group .hp-you + .hp-you { border-top: 1px solid var(--line-2); }
.hp-ava.hp-ic { background: var(--raise-2); color: var(--text); box-shadow: none; border: 1px solid var(--line-2); }
.hp-you-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 10px; flex-wrap: wrap; }
.hp-switch { position: relative; flex: none; width: 44px; height: 26px; }
.hp-switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.hp-switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background .15s; pointer-events: none; }
.hp-switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.hp-switch input:checked + i { background: var(--accent); }
.hp-switch input:checked + i::after { transform: translateX(18px); }
.hp-switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.hp-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.hp-chips::-webkit-scrollbar { display: none; }
.hp-chip { flex: none; font: 700 14px var(--ui); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink); cursor: pointer; }
.hp-chip b { margin-left: 5px; color: var(--muted); font-weight: 700; }
.hp-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.hp-chip[aria-pressed="true"] b { color: inherit; opacity: .75; }
.hp-list { display: flex; flex-direction: column; gap: 8px; }
.hp-card { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--raise-2); overflow: hidden; }
.hp-card[hidden] { display: none; }
.hp-card.open { border-color: color-mix(in srgb, var(--accent) 60%, var(--line-2)); }
.hp-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 12px; width: 100%; text-align: left; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.hp-ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 800 15px var(--ui); color: #111; background: var(--c, #8a8f98); flex: none; object-fit: cover; box-shadow: 0 0 0 2px var(--c, transparent); }
.hp-main { min-width: 0; display: block; }
.hp-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hp-name b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-route { flex: none; font: 700 12px var(--ui); letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--rc) 22%, transparent); color: var(--rc); }
.hp-where { display: block; font-size: 14px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hp-tag { font: 700 12.5px var(--ui); padding: 2px 8px; border-radius: 6px; background: var(--raise); border: 1px solid var(--line); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.hp-tag.map { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.hp-tag.warn { color: #ffb4a8; border-color: #7a3a33; }
.hp-tag.ok { color: #b7e4a3; border-color: #3f6a33; }
.hp-caret { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--muted); }
.hp-caret svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.hp-card.open .hp-caret svg { transform: rotate(180deg); }
.hp-body { border-top: 1px solid var(--line); padding: 4px 14px 12px; }
.hp-none { margin: 12px 0 0; }
.hp-act { padding: 12px 0; border-bottom: 1px solid var(--line); }
.hp-act:last-child { border-bottom: 0; }
.hp-act h5 { margin: 0 0 8px; font: 800 12.5px var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hp-move { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hp-step { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; flex: none; }
.hp-step button { width: 40px; height: 40px; background: var(--raise); border: 0; color: var(--ink); font: 800 20px var(--ui); cursor: pointer; }
.hp-step input { width: 56px; height: 40px; text-align: center; border: 0; border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2); border-radius: 0; background: transparent; color: var(--ink); font: 800 18px var(--ui); -moz-appearance: textfield; }
.hp-step input::-webkit-inner-spin-button, .hp-step input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.hp-dest { flex: 1 1 160px; min-width: 0; font-size: 14.5px; }
.hp-dest b { display: block; font-size: 15px; }
.hp-dest .why { font-size: 13px; }
.hp-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-top: 10px; }
.hp-row .check { margin: 0; }
.hp-give { display: flex; gap: 8px; }
.hp-give select { flex: 1 1 auto; min-width: 0; height: 40px; }
.hp-mapline { display: flex; align-items: center; gap: 10px; }
.hp-mt { flex: 1; min-width: 0; }
.hp-mt b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-mt .why { display: block; }
.hp-danger { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.hp-danger p { margin: 0; font-size: 14px; color: var(--muted); flex: 1; }

/* Host tools scroll bar on computers: slim, rounded and in the theme's color (phones keep their own) */
.drawer-body { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--accent) 55%, var(--line-2)) transparent; }
.drawer-body::-webkit-scrollbar { width: 12px; }
.drawer-body::-webkit-scrollbar-track { background: transparent; margin: 6px 0; }
.drawer-body::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--accent) 45%, var(--line-2)); border-radius: 999px; border: 3px solid var(--raise); min-height: 48px; }
.drawer-body::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.drawer-body::-webkit-scrollbar-button { display: none; height: 0; }

/* Host tools: a run to approve, with the song, the run and the game's players on that map */
.ap-card { border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line-2)); border-radius: var(--r); background: var(--raise-2); overflow: hidden; margin: 8px 0 12px; }
.ap-song { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 12px; align-items: center; }
.ap-cov { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--raise); display: grid; place-items: center; font-size: 28px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.ap-main { min-width: 0; display: block; }
.ap-title { display: block; font: 800 18px var(--ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-sub { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.ap-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.ap-tag { font: 700 12.5px var(--ui); padding: 2px 8px; border-radius: 6px; background: var(--raise); border: 1px solid var(--line); white-space: nowrap; }
.ap-tag.gold { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.ap-sec { border-top: 1px solid var(--line); padding: 11px 12px; }
.ap-who { display: flex; align-items: center; gap: 10px; }
.ap-who .hp-ava { width: 34px; height: 34px; font-size: 13px; }
.ap-who b { font-size: 15.5px; }
.ap-facts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14.5px; }
.ap-facts li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px; }
.ap-facts .why { font-size: 13.5px; }
.ap-bad { color: #ffb4a8; }
.ap-note { margin: 8px 0 0; font-style: italic; color: var(--muted); }
.ap-h { margin: 0 0 8px; font: 800 12.5px var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.ap-tabs { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.ap-tabs button { padding: 4px 12px; font: 700 12.5px var(--ui); color: var(--ink); background: none; border: 0; cursor: pointer; text-transform: none; letter-spacing: 0; }
.ap-tabs button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.ap-lb { display: grid; gap: 2px; }
.ap-lbr { display: grid; grid-template-columns: 40px 26px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 5px 6px; border-radius: 8px; font-size: 14.5px; color: inherit; text-decoration: none; }
.ap-lbr:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.ap-lbr .hp-ava { width: 24px; height: 24px; font-size: 10px; box-shadow: none; }
.ap-lbr .rk { color: var(--muted); font-weight: 700; text-align: right; }
.ap-lbr .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.ap-lbr .ac { font-weight: 800; }
.ap-lbr .fc { font: 700 11.5px var(--ui); color: #b7e4a3; }
.ap-lbr .ms { font: 700 11.5px var(--ui); color: #ffb4a8; white-space: nowrap; }
.ap-lbr.me { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ap-none, .ap-foot { margin: 6px 0 0; }
.ap-links { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-links:empty { display: none; }
.ap-acts { display: flex; gap: 8px; }
.ap-acts .btn { flex: 1 1 0; justify-content: center; }

/* Host tools: your recent changes, grouped by day */
.rc-day { font: 800 12px var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 12px 0 2px; }
.rc-list { display: grid; }
.rc-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rc-row:last-child { border-bottom: 0; }
.rc-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: var(--raise-2); border: 1px solid var(--line-2); }
.rc-row.new .rc-ic { border-color: color-mix(in srgb, var(--accent) 60%, var(--line-2)); }
.rc-main { min-width: 0; }
.rc-main b { display: block; font-size: 15px; }
.rc-main .why { font-size: 13px; }
.rc-lock { font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.rc-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 9px 11px; border-radius: 10px; background: var(--raise-2); border: 1px dashed var(--line-2); font-size: 13.5px; color: var(--muted); }

/* Admin card: the host's picture to the left of their name */
.admin-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-ava { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--accent); background: var(--raise-2); display: grid; place-items: center; font: 800 15px var(--ui); color: var(--ink); }
.admin-head .admin-badge { margin-left: 0; }
/* Discord: the chat button in the top bar (styled like the bell), and a quiet line on the turn card after your day's big moment */
#chatBtn[hidden] { display: none; }   /* plain icon like the bell; hidden until the server knows the channel */
.turn-dc { display: flex; align-items: center; gap: 7px; margin-top: 12px; color: var(--muted); text-decoration: none; font-size: 14px; }   /* one quiet line, part of the card's message */
.turn-dc .tdc-ic { display: grid; place-items: center; color: #8f99ff; flex: none; }
.turn-dc .tdc-ic svg { width: 16px; height: 16px; }
.turn-dc div { display: flex; flex-wrap: wrap; gap: 0 5px; }
.turn-dc b { color: var(--text); font-weight: 700; }
.turn-dc span { color: var(--muted); }
.turn-dc:hover span, .turn-dc:focus-visible span { color: var(--text); text-decoration: underline; }
.turn-dc .tdc-go { width: 13px; height: 13px; margin-left: 2px; color: var(--muted); flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.toast.act { pointer-events: auto; }   /* a toast with a link in it (Discord's "use the browser instead") */
.toast a { color: #8f99ff; margin-left: 6px; }
/* Host tools, Alerts: how the Discord feed is doing */
.feed-stat { font-size: 14px; color: var(--muted); margin: 6px 0 10px; }
.feed-warn { font-size: 14px; color: var(--text); background: color-mix(in srgb, var(--warn) 16%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 55%, transparent); border-radius: 10px; padding: 8px 10px; margin: 6px 0; }
/* Support me card: the same outline as the Developed by card in every theme (the footer script copies
   the outline color once at load, before the game's theme is applied) */
.foot-badges a.kofi-support.msp-k { border-color: var(--line-2); }
/* Supporters: the thank-you card and the faces on Support me use the game's theme colors instead of the
   navy they have on MSploit's other tools (the footer script's own styles come first, so these win) */
body .msp-pop { background: var(--raise); border-color: var(--line-2); color: var(--text); box-shadow: 0 18px 40px rgba(0,0,0,.6); }
body .msp-pop::after { background: var(--raise); }
body .msp-pop.up::after, body .msp-pop.down::after { border-color: var(--line-2); }
body .msp-pop h4, body .msp-pop .msp-r b { color: var(--text); }
body .msp-pop .msp-r i { color: var(--muted); }
body .msp-pop .msp-f { color: var(--muted); border-top-color: var(--line); }
body .msp-pop .msp-f a { color: var(--accent); }
body .msp-k .msp-kf .msp-sb, body .msp-k .msp-kf .msp-more { color: var(--muted); }
body .msp-av { background: var(--raise-2); color: var(--text); }
/* Turn card: within one roll of the exit, what it takes to get out and whether the gate is open today */
.near-exit { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 10%, var(--raise-2)); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line-2)); }
.near-exit p { display: flex; gap: 9px; align-items: flex-start; margin: 0; font-size: 14.5px; line-height: 1.4; color: var(--text); }
.near-exit p + p { margin-top: 7px; padding-top: 7px; border-top: 1px solid var(--line); color: var(--muted); }
.near-exit p + p b { color: var(--text); }
.near-exit b { color: var(--accent); }

/* ---- Between games: the next board is a secret (players only, while the host hides the next game) ---- */
/* While the page loads (and when switching clans) it shows the Beat Saber Games header and the saber line, nothing else. */
body.booting .daybox, body.booting .topnav, body.booting main.layout, body.booting .demo-bar { visibility: hidden; }
.boot-ld { display: none; }
body.booting .top { position: relative; }
body.booting .boot-ld { display: block; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; overflow: hidden; background: #0d0f14; }
.boot-ld i { position: absolute; top: 0; bottom: 0; width: 35%; left: -35%; background: linear-gradient(90deg, transparent, #ff2740 35%, #2f7bff 65%, transparent); animation: bootSweep 1.1s ease-in-out infinite; }
@keyframes bootSweep { to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .boot-ld i { animation: none; left: 32%; } }
body.between, body.bsg { --bg: #000; --raise: #0d0f14; --raise-2: #151821; --line: #232734; --line-2: #313748; --text: #f1f3f8; --muted: #a7aec0; --faint: #6c7489;
  --accent: #2f7bff; --accent-ink: #fff; --display: var(--ui); background: #000; }
body.between .brand-crow, body.bsg .brand-crow { width: 42px; height: 42px; }
body.between .brand h1, body.bsg .brand h1 { font: 700 30px/1 var(--ui); letter-spacing: -.01em; }
.bsg-b { color: #ff2740; } .bsg-s { color: #2f7bff; } .bsg-g { color: #fff; }
.between-main { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; padding: 20px 22px 8px; max-width: 1280px; margin: 0 auto; align-items: start; }
.bt-board { position: relative; overflow: hidden; padding: 26px 22px 22px; background: radial-gradient(ellipse at 50% 0%, rgba(47,123,255,.16), transparent 60%), radial-gradient(ellipse at 50% 100%, rgba(255,39,64,.12), transparent 60%), var(--raise); }
.bt-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(8px, 1.6vw, 16px); max-width: 620px; margin: 0 auto; }
.bt-note { aspect-ratio: 1; border-radius: 16%; display: grid; place-items: center; font: 700 clamp(22px, 4vw, 40px)/1 var(--ui); color: #fff; transform: rotate(var(--tilt, 0deg));
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.25), 0 10px 22px -12px rgba(0,0,0,.9); animation: btBob 4.8s ease-in-out infinite; }
.bt-note:nth-child(3n) { animation-delay: -1.6s; } .bt-note:nth-child(3n+1) { animation-delay: -3.2s; }
.bt-note.r { background: linear-gradient(160deg, #ff4a5f, #c8152a); }
.bt-note.b { background: linear-gradient(160deg, #4f90ff, #1c58cf); }
@keyframes btBob { 0%, 100% { transform: rotate(var(--tilt, 0deg)) translateY(0); } 50% { transform: rotate(var(--tilt, 0deg)) translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .bt-note { animation: none; } }
.bt-cap { text-align: center; margin-top: 22px; }
.bt-cap h2 { margin: 0 0 6px; font: 700 30px/1.1 var(--ui); letter-spacing: -.01em; }
.bt-cap p { margin: 0; color: var(--muted); font-size: 16px; }
.bt-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.bt-side .panel h2 { font: 700 20px/1.1 var(--ui); }
.bt-side .countdown { margin: 0; }
.bt-soon { margin: 0; color: var(--muted); }
.bt-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bt-steps li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r); background: var(--raise-2); border: 1px solid var(--line); }
.bt-ic { width: 36px; height: 36px; display: block; } .bt-ic svg { width: 100%; height: 100%; display: block; }
.bt-steps b { display: block; font-size: 15.5px; } .bt-steps li span span { display: block; font-size: 13.5px; color: var(--muted); }
.bt-hall { align-self: stretch; }
@media (max-width: 900px) {
  .between-main { grid-template-columns: minmax(0, 1fr); padding: 14px 10px 6px; gap: 14px; }
  .bt-board { padding: 18px 12px 16px; }
  .bt-cap h2 { font-size: 24px; }
  body.between .brand h1, body.bsg .brand h1 { font-size: 24px; }
  body.between .brand-crow, body.bsg .brand-crow { width: 34px; height: 34px; }
}
/* Phones: the clan switcher keeps the right edge, in the Between games row (no Rules or Maps here to push it over) */
@media (max-width: 640px) { body.between .topnav { margin-left: auto; width: auto; } }

/* Beat Saber Games gate pages (signed out, no game for your clan, game picker) */
.gate-logo { width: 104px; height: 104px; display: block; margin: 0 auto 8px; border-radius: 22px; box-shadow: 0 14px 34px -14px rgba(47,123,255,.45), 0 0 0 1px rgba(255,255,255,.08); }
body.bsg .gate-card { background: var(--raise); border-color: var(--line); }
.bsg-card h2 { font: 700 40px/1.05 var(--ui); letter-spacing: -.01em; text-wrap: balance; }
.gate-card p.gate-tag { color: var(--text); font-weight: 700; font-size: 18px; margin-bottom: 10px; }
.btn.discord { background: #5865f2; color: #fff; }
.btn.discord svg { width: 22px; height: 22px; flex: none; }
.gate-card p.gate-more { font-size: 14px; color: var(--faint); margin: 20px auto 0; }
.gate-more a { color: var(--muted); text-decoration: underline; }
.gate-more a:hover { color: var(--text); }
@media (max-width: 640px) { .bsg-card h2 { font-size: 32px; } .gate-logo { width: 88px; height: 88px; } }
