:root {
  --bg: #0b0b10;
  --surface: #14141c;
  --surface-2: #1c1c27;
  --surface-3: #252533;
  --line: rgba(255, 255, 255, 0.07);
  --text: #f4f4f7;
  --muted: #9393a6;
  --accent: #c6f432;
  --accent-ink: #0b0b10;
  --gold: #ffd23f;
  --up: #4ade80;
  --down: #ff6b6b;
  --radius: 20px;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(198, 244, 50, 0.08), transparent 60%),
    radial-gradient(700px 400px at -10% 10%, rgba(195, 139, 255, 0.07), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
  min-height: 100vh;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h2 { font-family: var(--display); font-weight: 700; font-size: 19px; margin: 0; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: rgba(11, 11, 16, 0.78);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--display); font-weight: 800; font-size: 22px;
  transform: rotate(-6deg);
  box-shadow: 0 6px 24px rgba(198, 244, 50, 0.25);
}
.wordmark { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; line-height: 1.1; }
.date { color: var(--muted); font-size: 12.5px; }
.me {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-weight: 600; font-size: 14px;
}

/* Layout */
.layout { max-width: 1240px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; }
.col-main, .col-side { display: grid; gap: 16px; align-content: start; min-width: 0; }
@media (min-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; padding: 24px; }
  .col-side { position: sticky; top: 88px; max-height: calc(100vh - 100px); overflow: auto; scrollbar-width: none; }
  .col-side::-webkit-scrollbar { display: none; }
  body { padding-bottom: 32px; }
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

/* Avatars */
.av {
  --c: var(--accent);
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--c) 22%, transparent);
  color: var(--c); border: 1.5px solid color-mix(in srgb, var(--c) 60%, transparent);
  font-family: var(--display); font-weight: 800; font-size: 13px;
}
.av.lg { width: 40px; height: 40px; font-size: 17px; }
.av.sm { width: 22px; height: 22px; font-size: 11px; border-width: 1px; }
.av.dim { opacity: 0.25; filter: grayscale(1); }

/* Today */
.today { display: grid; gap: 16px; overflow: hidden; position: relative; }
.today-top { display: flex; align-items: center; gap: 18px; }
.ring { position: relative; width: 92px; height: 92px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .n { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .n b { display: block; font-family: var(--display); font-size: 28px; font-weight: 800; line-height: 1; }
.ring .n span { font-size: 11px; color: var(--muted); }
.today h1 { font-family: var(--display); font-size: clamp(24px, 5vw, 34px); line-height: 1.05; margin: 0 0 6px; letter-spacing: -0.02em; font-weight: 800; }
.today h1 em { font-style: normal; color: var(--accent); }
.crew { display: flex; flex-wrap: wrap; gap: 8px; }
.crew .pill { display: flex; align-items: center; gap: 7px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.crew .pill .c { color: var(--muted); font-weight: 500; }

/* Games grid */
.games { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.game {
  --c: #888;
  position: relative; display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px;
  transition: transform 0.15s ease, border-color 0.15s ease;
  overflow: hidden;
}
.game::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--c); opacity: 0.85;
}
.game:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.game.done { background: linear-gradient(160deg, color-mix(in srgb, var(--c) 10%, transparent), transparent 55%), var(--surface); }
.game-head { display: flex; align-items: center; gap: 11px; }
.tile {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-size: 22px;
  background: color-mix(in srgb, var(--c) 18%, var(--surface-2));
}
.game-name { font-weight: 700; font-size: 15.5px; }
.game-sub { font-size: 12.5px; color: var(--muted); }
.play {
  margin-left: auto; padding: 7px 12px; border-radius: 999px;
  background: var(--surface-3); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.game:not(.done) .play { background: var(--c); color: #0b0b10; }
.scores { display: grid; gap: 6px; }
.score-row { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.score-row .who { flex: 1; color: var(--muted); }
.score-row.me .who { color: var(--text); font-weight: 600; }
.score-row .val { font-weight: 700; font-variant-numeric: tabular-nums; }
.score-row .crown { width: 18px; text-align: center; }
.empty { font-size: 13px; color: var(--muted); padding: 4px 0 2px; }

/* Post */
.post textarea {
  width: 100%; resize: vertical; min-height: 120px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; font-size: 15px; line-height: 1.35; outline: none;
  transition: border-color 0.15s;
}
.post textarea:focus { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.post p { margin: -4px 0 12px; }
.preview { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; min-height: 4px; }
.chip {
  --c: var(--accent);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: color-mix(in srgb, var(--c) 16%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
}
.btn {
  width: 100%; padding: 13px 16px; border: 0; border-radius: 14px;
  font-weight: 700; font-size: 15px; transition: transform 0.1s, opacity 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn:disabled { opacity: 0.35; cursor: default; }
.msg { font-size: 13px; margin-top: 8px; min-height: 18px; color: var(--muted); }
.msg.err { color: var(--down); }
.icon-btn { background: var(--surface-2); border: 0; width: 32px; height: 32px; border-radius: 50%; }
.close-sheet, .sheet-grip { display: none; }

/* Leaderboard */
select {
  appearance: none; -webkit-appearance: none;
  background: var(--surface-2) url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M1 1l4 4 4-4' stroke='%239393a6' stroke-width='1.6' fill='none'/></svg>") no-repeat right 12px center;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 30px 7px 13px; font-size: 13px; font-weight: 600; max-width: 55%;
}
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg); border-radius: 12px; margin-bottom: 12px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 7px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); }
.tabs button.on { background: var(--surface-3); color: var(--text); }
.ranks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rank {
  display: grid; grid-template-columns: 22px 40px 1fr auto; align-items: center; gap: 10px;
  padding: 10px 12px 10px 10px; border-radius: 14px; background: var(--surface-2);
}
.rank.first {
  background: linear-gradient(120deg, rgba(255, 210, 63, 0.16), transparent 70%), var(--surface-2);
  box-shadow: inset 0 0 0 1px rgba(255, 210, 63, 0.25);
}
.rank .pos { font-family: var(--display); font-weight: 800; color: var(--muted); text-align: center; font-size: 15px; }
.rank.first .pos { color: var(--gold); }
.rank .name { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.rank .meta { font-size: 12px; color: var(--muted); }
.rank .right { text-align: right; }
.rank .rating { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.delta { font-size: 11.5px; font-weight: 700; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta.flat { color: var(--muted); }
.spark { display: block; margin-top: 4px; }
.prov { font-size: 10px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; }
.hows { margin-top: 14px; border-top: 1px solid var(--line); }
.how { font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); padding: 11px 0; }
.how:last-child { border-bottom: 0; padding-bottom: 0; }
.how b { color: var(--text); font-weight: 600; }
.how summary::-webkit-details-marker { display: none; }
.how summary { cursor: pointer; font-weight: 600; color: var(--text); list-style: none; }
.rules { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 7px; }
.rules li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; }
.rule { margin: -4px 0 12px; font-size: 13px; color: var(--muted); }
.rule b { color: var(--text); }
.how summary::before { content: '＋ '; color: var(--accent); }
.how[open] summary::before { content: '－ '; }
.how p { margin: 8px 0 0; }

/* Feed */
.feed ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.feed li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.feed li:last-child { border-bottom: 0; }
.feed .what { flex: 1; min-width: 0; }
.feed .what b { font-weight: 600; }
.feed .when { font-size: 12px; color: var(--muted); white-space: nowrap; }
.feed .del { background: none; border: 0; color: var(--muted); padding: 2px 4px; font-size: 13px; }

/* FAB + sheet (mobile) */
.fab {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px;
  padding: 14px 22px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 800; font-size: 15.5px;
  box-shadow: 0 10px 34px rgba(198, 244, 50, 0.32), 0 2px 8px rgba(0,0,0,0.5);
}
.fab span { font-size: 19px; line-height: 1; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.55); opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 40; }
@media (max-width: 959px) {
  .post {
    position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
    border-radius: 24px 24px 0 0; padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(105%); transition: transform 0.28s cubic-bezier(.2,.8,.2,1);
    max-height: 88vh; overflow: auto;
    box-shadow: 0 -20px 60px rgba(0,0,0,0.5);
  }
  .sheet-open .post { transform: none; }
  .sheet-open .scrim { opacity: 1; pointer-events: auto; }
  .sheet-grip { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 0 auto 12px; }
  .close-sheet { display: block; }
}
@media (min-width: 960px) { .fab, .scrim { display: none; } }

/* Who dialog */
dialog {
  border: 1px solid var(--line); border-radius: 24px; padding: 22px;
  background: var(--surface); color: var(--text); width: min(420px, calc(100vw - 32px));
}
dialog::backdrop { background: rgba(0,0,0,0.7); backdrop-filter: blur(6px); }
dialog h2 { font-size: 24px; margin-bottom: 14px; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 16px; }
.who-grid button {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 8px; border-radius: 16px; background: var(--surface-2);
  border: 2px solid transparent; font-weight: 700;
}
.who-grid button.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface-2)); }
.field { display: grid; gap: 6px; margin-bottom: 16px; font-size: 13px; color: var(--muted); font-weight: 600; }
.field input { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 16px; color: var(--text); outline: none; }

/* Toast */
.toast {
  position: fixed; z-index: 60; left: 50%; top: calc(76px + env(safe-area-inset-top));
  transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  background: var(--surface-3); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 16px; font-weight: 600; font-size: 14px; transition: all 0.25s; white-space: nowrap;
  max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.skeleton { height: 120px; border-radius: 18px; background: linear-gradient(90deg, var(--surface), var(--surface-2), var(--surface)); background-size: 200% 100%; animation: sh 1.2s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

/* Awards */
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text); white-space: nowrap; }
.aw { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.aw li {
  display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px;
  padding: 9px 12px 9px 9px; border-radius: 14px;
  background: linear-gradient(110deg, color-mix(in srgb, var(--c) 12%, transparent), transparent 60%), var(--surface-2);
}
.aw-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; background: var(--surface-3); }
.aw-body { display: grid; min-width: 0; }
.aw-body b { font-size: 14px; }
.aw-body span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aw-sub { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 14px 0 8px; }
.awards p { margin: 10px 0 0; }

/* Score breakdown */
.rank { grid-template-columns: 22px 40px 1fr auto 10px; cursor: pointer; transition: background 0.15s; }
.rank:hover { background: var(--surface-3); }
.rank .chev { color: var(--muted); font-size: 20px; line-height: 1; }
.score-row .pts { font-size: 12px; font-weight: 700; color: var(--accent); min-width: 34px; text-align: right; }
.tip { color: var(--accent) !important; }
.detail { padding: 0; width: min(560px, calc(100vw - 32px)); max-height: 86vh; overflow: auto; }
.detail > div { padding: 20px; }
.d-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-bottom: 16px; }
.d-head h2 { margin: 0; font-size: 22px; }
.d-total { background: var(--bg); border-radius: 14px; padding: 6px 14px; }
.d-line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.d-line span { color: var(--muted); }
.d-line.sum { border-bottom: 0; font-size: 16px; }
.d-line.sum span { color: var(--text); font-weight: 700; }
.d-line.sum b { font-family: var(--display); font-size: 22px; color: var(--accent); }
.d-games { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.d-games li { position: relative; display: grid; grid-template-columns: 1fr auto 44px; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); overflow: hidden; font-size: 14px; }
.d-games li > * { position: relative; z-index: 1; }
.d-games li b { text-align: right; }
.d-games i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--c) 18%, transparent); z-index: 0; }
.d-day { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--muted); margin: 14px 0 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.d-day span { color: var(--accent); }
.d-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.d-items li { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: start; padding: 10px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.d-items .muted { margin-top: 2px; line-height: 1.4; }
.d-items .muted b { color: var(--text); }
.tile.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 17px; background: color-mix(in srgb, var(--c) 18%, var(--surface-3)); }
.d-pts { font-family: var(--display); font-size: 18px; }
@media (max-width: 959px) {
  .detail { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 24px 24px 0 0; max-height: 90vh; border-bottom: 0; }
  .detail > div { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}

/* Group vocab touches */
.aka { font-family: var(--body); font-size: 11.5px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.who-grid .aka { margin: -4px 0 0; font-size: 11px; }
.oik { font-size: 10.5px; font-weight: 800; color: #0b0b10; background: #f2795c; border-radius: 6px; padding: 1px 5px; margin-left: 4px; white-space: nowrap; }
.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 8px 16px 24px; letter-spacing: 0.01em; }
.layout { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .layout { grid-template-columns: minmax(0, 1fr) 400px; } }
.rank { grid-template-columns: 22px 40px minmax(0, 1fr) auto auto; }
.rank .name { flex-wrap: wrap; }
.tags { gap: 3px; }
.tag { font-size: 10.5px; padding: 2px 6px; }

/* Leaderboard as the hero */
.hero { padding: 22px; background:
  radial-gradient(600px 260px at 50% 0%, rgba(255, 210, 63, 0.10), transparent 70%),
  linear-gradient(180deg, rgba(255,255,255,0.03), transparent), var(--surface); }
.hero-title { font-size: clamp(26px, 5vw, 34px); font-weight: 800; letter-spacing: -0.02em; }
.av.xl { width: 64px; height: 64px; font-size: 28px; border-width: 2px; }
.av.xs { width: 20px; height: 20px; font-size: 10px; border-width: 1px; margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-items: end; margin: 8px 0 14px; }
.step {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: 0; padding: 0; min-width: 0; text-align: center;
}
.step .medal { font-size: 22px; line-height: 1; }
.step .p-name { font-weight: 800; font-size: 15px; margin-top: 4px; }
.step .p-aka { font-size: 11px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step .p-pts { font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.step .p-sub { font-size: 11.5px; font-weight: 700; color: var(--up); }
.step .block {
  width: 100%; margin-top: 8px; border-radius: 14px 14px 6px 6px;
  display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 26px; color: rgba(255,255,255,0.18);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 32%, var(--surface-2)), var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); border-bottom: 0;
}
.step.s1 .block { height: 96px; }
.step.s2 .block { height: 64px; }
.step.s3 .block { height: 44px; }
.step.s1 .av.xl { width: 78px; height: 78px; font-size: 34px; box-shadow: 0 0 0 4px rgba(255, 210, 63, 0.25), 0 10px 40px rgba(255, 210, 63, 0.25); }
.step.s1 .p-pts { font-size: 38px; color: var(--gold); }
.step:hover .block { filter: brightness(1.15); }
@media (min-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr) 380px; }
  .hero { padding: 28px; }
  .podium { gap: 16px; margin: 12px 0 18px; }
  .step.s1 .block { height: 120px; }
  .step.s2 .block { height: 80px; }
  .step.s3 .block { height: 56px; }
}

/* Today and games, secondary */
.today.compact { padding: 14px; gap: 12px; }
.today.compact .ring { width: 64px; height: 64px; }
.today.compact .ring svg { width: 64px; height: 64px; }
.today.compact .ring .n b { font-size: 20px; }
.today.compact h1 { font-size: 20px; }
.games-card { padding: 14px; }
.games.compact { display: grid; grid-template-columns: 1fr; gap: 4px; }
.games.compact .game { padding: 0; border-radius: 12px; gap: 0; background: var(--surface-2); border: 0; }
.games.compact .game:hover { transform: none; }
.games.compact .game::before { inset: 0 auto 0 0; width: 3px; height: auto; }
.games.compact .game-head { padding: 8px 10px 8px 12px; gap: 10px; list-style: none; cursor: pointer; }
.games.compact .game-head::-webkit-details-marker { display: none; }
.games.compact .tile { width: 32px; height: 32px; font-size: 16px; border-radius: 9px; }
.games.compact .g-mid { min-width: 0; flex: 1; }
.games.compact .game-name { font-size: 14px; }
.games.compact .game-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.games.compact .stack { display: flex; padding-left: 6px; }
.games.compact .play { margin-left: 0; padding: 5px 10px; font-size: 12px; }
.games.compact .scores { padding: 2px 12px 10px 54px; }
.games.compact .game.done { background: color-mix(in srgb, var(--c) 8%, var(--surface-2)); }
@media (min-width: 960px) {
  .col-side { display: flex; flex-direction: column; gap: 16px; }
  .col-side > * { flex: none; }
}

/* Explainers and welcome */
.top-right { display: flex; align-items: center; gap: 8px; }
.help { width: 36px; height: 36px; font-weight: 800; font-size: 16px; border: 1px solid var(--line); }
.explain { margin: 0 0 14px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.explain b { color: var(--text); }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.steps li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; background: var(--surface-2); border-radius: 14px; padding: 12px; font-size: 14px; color: var(--muted); line-height: 1.45; }
.steps li span { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; font-size: 18px; }
.steps b { color: var(--text); }
dialog#who { max-height: 92vh; overflow: auto; }
.aw li { grid-template-columns: 36px 1fr auto; align-items: center; }
.aw-desc { color: var(--text) !important; opacity: 0.8; white-space: normal !important; }
.aw-who { font-weight: 600; }
.aw li.open { background: var(--surface-2); opacity: 0.7; }
.aw li.open .aw-who { font-style: italic; }
.aw-who { white-space: normal !important; }
.aw-open { margin-top: 10px; padding: 12px; border-radius: 14px; background: var(--surface-2); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.aw-open .muted { width: 100%; margin-top: 2px; }
dialog h2:focus { outline: none; }
