/* ============================================================
   MOVE 37 — clean white arena (lmarena-style)
   white canvas, hairline borders, black actions, coral accent
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg2: #fafafa;
  --panel: #ffffff;
  --panel2: #f7f7f8;
  --line: #e7e7e9;
  --line2: #d9d9dd;
  --ink: #18181b;
  --dim: #6b7280;
  --faint: #9ca3af;
  --gold: #e8590c;          /* coral-orange accent, used sparingly */
  --gold-soft: #e8590c14;
  --teal: #0d9488;          /* live indicator */
  --teal-soft: #0d948812;
  --red: #dc2626;
  --green: #16a34a;
  --display: "Inter", -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --rail-w: 218px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 1px 3px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scrollbar-color: var(--line2) transparent; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-size: 14.5px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.grain { display: none; }

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.gold { color: var(--gold); }
.teal { color: var(--teal); }

/* ---------------- rail ---------------- */
.rail {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--rail-w);
  border-right: 1px solid var(--line);
  background: var(--bg);
  display: flex; flex-direction: column; padding: 22px 12px 16px;
  z-index: 10;
}
.logo { display: flex; align-items: center; gap: 10px; padding: 2px 10px 22px; }
.logo-stone {
  width: 24px; height: 24px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8c4d, var(--gold) 65%, #b23f06);
  position: relative; flex: none;
}
.logo-stone::after {
  content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--bg);
}
.logo-word { font-weight: 500; font-size: 17px; letter-spacing: .08em; color: var(--ink); }
.logo-word b { font-weight: 800; color: var(--gold); }
.rail-links { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.rail-links a {
  display: flex; align-items: baseline; gap: 10px;
  padding: 9px 12px; font-size: 14px; font-weight: 500; color: var(--dim);
  border-radius: 8px;
  transition: color .12s, background .12s;
}
.rail-links a .num { font-family: var(--mono); font-size: 10px; color: var(--faint); }
.rail-links a:hover { color: var(--ink); background: var(--panel2); }
.rail-links a.active { color: var(--ink); background: #f0f0f2; }
.rail-links a.active .num { color: var(--gold); }
.rail-status { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid var(--line); font-size: 12px; }
.status-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; color: var(--dim); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line2); flex: none; }
.dot.on { background: var(--teal); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .45; } }

/* ---------------- view shell ---------------- */
.view { margin-left: var(--rail-w); padding: 40px 48px 90px; max-width: 1280px; animation: viewin .3s ease both; }
@keyframes viewin { from { opacity: 0; transform: translateY(6px); } }

.kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px;
}
.kicker::before { content: ""; }
h1.head { font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; letter-spacing: -.025em; line-height: 1.12; margin-bottom: 8px; color: var(--ink); }
h1.head b { font-weight: 800; }
.sub { color: var(--dim); max-width: 64ch; margin-bottom: 30px; font-size: 15px; }

.section-label {
  display: flex; align-items: center; gap: 12px; margin: 38px 0 14px;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--dim);
}
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------------- panels & tables ---------------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
table.lb { width: 100%; border-collapse: collapse; font-size: 14px; }
table.lb th {
  text-align: left; font-weight: 600; font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint); padding: 12px 16px; border-bottom: 1px solid var(--line);
  background: var(--bg2);
}
table.lb td { padding: 13px 16px; border-bottom: 1px solid #f1f1f3; }
table.lb tr:last-child td { border-bottom: none; }
table.lb tbody tr { transition: background .1s; }
table.lb tbody tr:hover { background: var(--bg2); }
td.rank { font-family: var(--mono); color: var(--faint); width: 52px; font-size: 12.5px; }
tr.r1 td.rank { color: var(--gold); font-weight: 600; }
tr.r1 .model-cell { color: var(--ink); }
tr.r1 td.elo { color: var(--gold); }
td.elo { font-family: var(--mono); font-weight: 600; font-size: 14.5px; }
td.rec { font-family: var(--mono); color: var(--dim); font-size: 12px; }
.model-cell { font-weight: 600; letter-spacing: -.005em; }
.model-cell .provider { color: var(--faint); font-weight: 400; }
a:hover .model-cell { text-decoration: underline; text-underline-offset: 3px; }
.delta { font-family: var(--mono); font-size: 11.5px; }
.delta.up { color: var(--green); } .delta.down { color: var(--red); }

/* podium hero on home */
.podium { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 14px; margin-bottom: 8px; }
.champ {
  position: relative; overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px; padding: 24px 26px 20px;
  box-shadow: var(--shadow-md);
}
.champ::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), #ffb380);
}
.champ::after {
  content: "01"; position: absolute; right: -4px; top: -28px; font-weight: 800; font-size: 130px;
  color: #00000006; letter-spacing: -.05em;
}
.champ .crown { font-size: 11px; font-weight: 600; letter-spacing: .18em; color: var(--gold); text-transform: uppercase; }
.champ .name { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 2px; line-height: 1.12; word-break: break-word; }
.champ .elo-big { font-family: var(--mono); font-size: 36px; font-weight: 600; color: var(--gold); }
.champ .rec-line { color: var(--dim); font-family: var(--mono); font-size: 12px; margin-top: 6px; }
.runner {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 20px 16px;
  position: relative; overflow: hidden; box-shadow: var(--shadow-sm);
}
.runner .pos { font-family: var(--mono); font-size: 10.5px; letter-spacing: .3em; color: var(--faint); }
.runner .name { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin: 8px 0 2px; word-break: break-word; }
.runner .elo-big { font-family: var(--mono); font-size: 24px; color: var(--ink); }

/* game tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.tab {
  font-size: 13px; font-weight: 500;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); color: var(--dim); transition: all .12s;
}
.tab:hover { color: var(--ink); border-color: var(--line2); background: var(--bg2); }
.tab.active { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }

/* ---------------- match cards ---------------- */
.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.match-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
  display: block; transition: border-color .12s, box-shadow .12s, transform .12s; position: relative;
  box-shadow: var(--shadow-sm);
}
.match-card:hover { border-color: var(--line2); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.match-card .mc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.mc-game { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.mc-id { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.mc-vs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.mc-side { min-width: 0; }
.mc-side .nm { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-side .lbl { font-size: 10.5px; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; }
.mc-side.right { text-align: right; }
.mc-x { font-family: var(--mono); color: var(--faint); font-size: 12px; }
.mc-side.winner .nm { color: var(--gold); }
.mc-side.winner .nm::after { content: " 🏆"; font-size: 11px; }
.mc-foot { display: flex; gap: 14px; margin-top: 12px; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--dim); background: var(--bg2);
}
.badge.live { color: var(--teal); border-color: #0d948833; background: var(--teal-soft); }
.badge.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); animation: pulse 1.4s infinite; }
.badge.win { color: var(--gold); border-color: #e8590c33; background: var(--gold-soft); }
.badge.err { color: var(--red); border-color: #dc262633; background: #dc26260d; }

/* ---------------- match viewer ---------------- */
.viewer { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.stage {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  position: sticky; top: 24px; box-shadow: var(--shadow-sm);
}
.scoreline { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.scoreline .pl { min-width: 0; }
.scoreline .pl .nm { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.scoreline .pl .tag { font-size: 10.5px; letter-spacing: .1em; color: var(--faint); text-transform: uppercase; font-weight: 600; }
.scoreline .pl.right { text-align: right; }
.scoreline .pl.toact .nm { color: var(--teal); }
.scoreline .pl.won .nm { color: var(--gold); }
.scoreline .vs { font-family: var(--mono); color: var(--faint); }
.boardwrap { width: 100%; display: flex; justify-content: center; }

.controls { display: flex; align-items: center; gap: 8px; width: 100%; }
.ctl {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 9px;
  font-size: 14px; transition: all .12s;
}
.ctl:hover { border-color: var(--ink); background: var(--bg2); }
.ctl[disabled] { opacity: .35; pointer-events: none; }
.scrub { flex: 1; appearance: none; height: 4px; background: var(--line); border-radius: 2px; outline: none; }
.scrub::-webkit-slider-thumb {
  appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink); cursor: pointer; border: 2.5px solid #fff; box-shadow: 0 0 0 1px var(--line2), var(--shadow-sm);
}
.plycount { font-family: var(--mono); font-size: 12px; color: var(--dim); min-width: 74px; text-align: right; }

.result-banner {
  width: 100%; text-align: center; border-radius: 10px; padding: 13px;
  background: var(--gold-soft); border: 1px solid #e8590c2e; color: var(--gold);
  font-weight: 700; letter-spacing: .01em;
}
.result-banner .why { display: block; font-family: var(--mono); font-weight: 400; font-size: 11.5px; color: var(--dim); margin-top: 3px; }
.elo-moves { display: flex; justify-content: center; align-items: baseline; gap: 16px; margin-top: 7px; font-family: var(--mono); font-size: 12px; flex-wrap: wrap; }

.movelist { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; max-height: 78vh; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.movelist h3 { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--bg2); }
.moves-scroll { overflow-y: auto; }
.move-row { padding: 10px 18px; border-bottom: 1px solid #f1f1f3; cursor: pointer; transition: background .1s; }
.move-row:hover { background: var(--bg2); }
.move-row.sel { background: var(--gold-soft); border-left: 2px solid var(--gold); }
.move-row .mr-top { display: flex; align-items: baseline; gap: 10px; }
.move-row .ply { font-family: var(--mono); font-size: 10.5px; color: var(--faint); min-width: 30px; }
.move-row .mv { font-family: var(--mono); font-weight: 600; font-size: 13.5px; }
.move-row .who { font-size: 11.5px; color: var(--dim); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.move-row .p0 { color: var(--gold); } .move-row .p1 { color: var(--teal); }
.move-row .thought { font-size: 12.5px; color: var(--dim); margin-top: 4px; font-style: italic; }
.move-row .meta { font-family: var(--mono); font-size: 10px; color: var(--faint); margin-top: 3px; display: flex; gap: 10px; }
.move-row .fb { color: var(--red); }

/* ---------------- boards ---------------- */
.board-frame { border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-md), 0 0 0 1px rgba(0,0,0,.06); }

/* chess + checkers grid */
.gridboard { display: grid; }
.gridboard .sq { display: grid; place-items: center; position: relative; user-select: none; }
.sq.light { background: #f0d9b5; } .sq.dark { background: #b58863; }
.sq .pc { font-size: calc(var(--cell) * .74); line-height: 1; }
.pc.w { color: #ffffff; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.pc.b { color: #1f1d1a; text-shadow: 0 1px 0 rgba(255,255,255,.2); }
.sq.lastmove::after { content: ""; position: absolute; inset: 0; background: #e8590c33; }
.coordlbl { position: absolute; font-family: var(--mono); font-size: 9px; color: rgba(0,0,0,.45); }

/* checkers men */
.man { width: 72%; height: 72%; border-radius: 50%; display: grid; place-items: center; font-size: calc(var(--cell)*.4); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.man.red { background: radial-gradient(circle at 35% 30%, #f87171, #c0362c 65%, #7e1f18); color: #ffd9d4; }
.man.white { background: radial-gradient(circle at 35% 30%, #ffffff, #e2d9c3 65%, #a89b7e); color: #6b6147; }

/* go / gomoku */
.goban { background: linear-gradient(135deg, #e3bd7d, #d2a55c); position: relative; }
.goban svg { display: block; }

/* othello */
.felt { background: radial-gradient(circle at 50% 30%, #1e7a4f, #176342 80%); }

/* connect4 */
.c4 { background: linear-gradient(180deg, #2563ab, #1d4e8f); padding: calc(var(--cell) * .12); }
.c4 .hole { width: var(--cell); height: var(--cell); display: grid; place-items: center; }
.c4 .disc { width: 82%; height: 82%; border-radius: 50%; background: #ffffff; box-shadow: inset 0 2px 6px rgba(0,0,0,.25); }
.c4 .disc.p1 { background: radial-gradient(circle at 35% 30%, #ff8a7a, #d23b2e 65%, #8c2018); }
.c4 .disc.p2 { background: radial-gradient(circle at 35% 30%, #ffe28a, #e8b934 65%, #99751a); }

/* tictactoe */
.ttt { display: grid; grid-template-columns: repeat(3, var(--cell)); }
.ttt .cell { width: var(--cell); height: var(--cell); display: grid; place-items: center; font-weight: 350; font-size: calc(var(--cell) * .6); border: 1px solid var(--line); background: var(--bg); }
.ttt .x { color: var(--ink); } .ttt .o { color: var(--gold); }

/* poker */
.ptable { width: 100%; max-width: 560px; border-radius: 18px; padding: 22px; background: radial-gradient(ellipse at 50% 40%, #20704a, #185538 75%); border: 1px solid #2c5c47; }
.ptable .seat { display: flex; justify-content: space-between; align-items: center; padding: 6px 4px; }
.ptable .seat .pname { font-weight: 650; font-size: 13.5px; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #f0fdf6; }
.ptable .seat .chips { font-family: var(--mono); font-size: 12px; color: #b8e0cb; }
.ptable .seat.toact .pname { color: #6ee7c8; }
.cards { display: flex; gap: 6px; }
.card {
  width: 40px; height: 56px; border-radius: 6px; background: #ffffff; color: #1a1a1a;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 600; font-size: 15px; line-height: 1.05;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.card.redsuit { color: #c22b2b; }
.card .suit { font-size: 16px; }
.card.back { background: repeating-linear-gradient(45deg, #4a6e96, #4a6e96 4px, #3c5b7e 4px, #3c5b7e 8px); }
.pot-line { text-align: center; font-family: var(--mono); font-size: 12px; color: #d9efe3; margin: 10px 0 6px; letter-spacing: .12em; }
.community { display: flex; justify-content: center; gap: 6px; min-height: 56px; margin: 6px 0 10px; }
.community .dim { color: #9fc4b1 !important; }
.plog { font-family: var(--mono); font-size: 11px; color: #cbe8d8; max-height: 90px; overflow-y: auto; padding: 8px 10px; background: rgba(8,40,26,.55); border-radius: 8px; }

/* ---------------- games page ---------------- */
.game-doc { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.game-doc .gd-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.game-doc .gd-head .icon { font-size: 24px; }
.game-doc h2 { font-weight: 800; font-size: 21px; letter-spacing: -.02em; }
.game-doc .desc { color: var(--dim); margin-bottom: 14px; }
.gd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.codeblock {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.55; overflow-x: auto;
  white-space: pre; color: #374151; max-height: 420px; overflow-y: auto;
}
.codeblock .k { color: var(--teal); } .codeblock .s { color: var(--gold); } .codeblock .c { color: var(--faint); }
.code-label { font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin: 0 0 7px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff; font-weight: 600; letter-spacing: .01em;
  border: 1px solid var(--ink); border-radius: 10px; padding: 10px 20px; font-size: 14px;
  transition: opacity .12s, transform .12s, box-shadow .12s;
}
.btn:hover { opacity: .85; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn.ghost { background: var(--bg); color: var(--dim); border: 1px solid var(--line2); font-weight: 500; }
.btn.ghost:hover { color: var(--ink); border-color: var(--faint); opacity: 1; box-shadow: none; }
.btn.danger { background: var(--bg); border: 1px solid #dc26264d; color: var(--red); }
.btn[disabled] { opacity: .4; pointer-events: none; transform: none; box-shadow: none; }

/* ---------------- control room ---------------- */
.ctrl-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; align-items: start; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
input[type=text], input[type=number], input[type=search], select {
  width: 100%; background: var(--bg); color: var(--ink); border: 1px solid var(--line2);
  border-radius: 9px; padding: 9px 13px; font: inherit; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
.pickgrid { display: flex; flex-wrap: wrap; gap: 8px; }
.pick {
  font-size: 12.5px; font-weight: 500; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--dim); background: var(--bg); transition: all .12s;
}
.pick:hover { color: var(--ink); border-color: var(--line2); background: var(--bg2); }
.pick.on { border-color: var(--ink); color: #fff; background: var(--ink); }
.model-search-list { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; background: var(--bg); }
.msl-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 13px; border-bottom: 1px solid #f1f1f3; cursor: pointer; font-size: 13px; }
.msl-row:hover { background: var(--bg2); }
.msl-row .price { font-family: var(--mono); font-size: 10.5px; color: var(--faint); white-space: nowrap; }
.chips-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 12px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 7px 5px 12px;
}
.chip button { background: none; border: none; color: var(--faint); font-size: 13px; padding: 0 4px; }
.chip button:hover { color: var(--red); }
.tour-row { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.tour-row:last-child { border-bottom: none; }
.tour-row .tr-top { display: flex; justify-content: space-between; align-items: baseline; }
.tour-row .tr-name { font-weight: 600; }
.progressbar { height: 5px; background: var(--line); border-radius: 3px; margin-top: 9px; overflow: hidden; }
.progressbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #ff9357); transition: width .4s; }

/* toast */
#toast-root { position: fixed; bottom: 22px; right: 22px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--ink); color: #fff; border-radius: 10px; padding: 12px 16px; font-size: 13px; max-width: 380px;
  animation: toastin .25s ease both; box-shadow: 0 8px 28px rgba(0,0,0,.25);
}
.toast.err { background: #7f1d1d; }
@keyframes toastin { from { opacity: 0; transform: translateX(20px); } }

.empty { padding: 44px; text-align: center; color: var(--faint); font-size: 13px; }

/* ---------------- dense home dashboard ---------------- */
.statline { display: flex; gap: 18px; font-size: 12px; color: var(--dim); padding-bottom: 6px; flex-wrap: wrap; }
.statline b { color: var(--ink); font-weight: 600; font-size: 15px; margin-right: 2px; }
.statline .teal b { color: var(--teal); }

.dash { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 24px; align-items: start; }

.bar { display: flex; height: 6px; border-radius: 3px; background: #f1f1f3; overflow: hidden; min-width: 90px; }
.bar i { display: block; height: 100%; }
.bar .w { background: var(--green); }
.bar .d { background: #d1d5db; }
/* surge-style rotating row palette for the win segment */
tbody tr:nth-child(8n + 1) .bar .w { background: #f3ac46; }
tbody tr:nth-child(8n + 2) .bar .w { background: #eb5027; }
tbody tr:nth-child(8n + 3) .bar .w { background: #ed745e; }
tbody tr:nth-child(8n + 4) .bar .w { background: #ed9efa; }
tbody tr:nth-child(8n + 5) .bar .w { background: #b96bf7; }
tbody tr:nth-child(8n + 6) .bar .w { background: #7939f6; }
tbody tr:nth-child(8n + 7) .bar .w { background: #9651f6; }
tbody tr:nth-child(8n) .bar .w { background: #f6cd62; }

.prov-logo { width: 18px; height: 18px; border-radius: 5px; vertical-align: -4px; margin-right: 8px; object-fit: contain; }
.prov-mono {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px;
  color: #fff; font-size: 10px; font-weight: 800; vertical-align: -4px; margin-right: 8px;
}
tr.expandable td:nth-child(2) { transition: padding-left .15s; }
tr.expandable:hover td:nth-child(2) { padding-left: 22px; }

.holders { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.holder {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  transition: border-color .12s, box-shadow .12s; box-shadow: var(--shadow-sm); min-width: 0;
}
.holder:hover { border-color: var(--line2); box-shadow: var(--shadow-md); }
.holder .h-game { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.holder .h-champ { font-size: 13px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.holder .h-elo { font-size: 10.5px; color: var(--gold); margin-top: 1px; }

.live-stack { display: flex; flex-direction: column; gap: 10px; }
.live-tile {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px;
  box-shadow: var(--shadow-sm); transition: border-color .12s, box-shadow .12s;
}
.live-tile:hover { border-color: var(--line2); box-shadow: var(--shadow-md); }
.lt-board { border-radius: 8px; overflow: hidden; flex: none; }
.mini-board { overflow: hidden; border-radius: 6px; }
.lt-info { min-width: 0; }
.lt-game { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); display: flex; align-items: center; }
.lt-vs { font-size: 13.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-meta { font-size: 10.5px; color: var(--faint); margin-top: 2px; }
.lt-thought { font-size: 11.5px; color: var(--dim); font-style: italic; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.feed { display: flex; flex-direction: column; }
.feed-row {
  display: grid; grid-template-columns: 22px 1fr auto auto; gap: 10px; align-items: baseline;
  padding: 8px 14px; border-bottom: 1px solid #f1f1f3; font-size: 12.5px; transition: background .1s;
}
.feed-row:last-child { border-bottom: none; }
.feed-row:hover { background: var(--bg2); }
.feed-row .f-icon { font-size: 13px; }
.feed-row .f-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.feed-row .f-reason { font-size: 11px; }
.feed-row .f-time { font-size: 10.5px; }

.reel { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.hl-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  box-shadow: var(--shadow-sm); transition: border-color .12s, box-shadow .12s, transform .12s;
  display: flex; flex-direction: column; gap: 8px;
}
.hl-card:hover { border-color: var(--line2); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.hl-tag { font-size: 10px; font-weight: 600; letter-spacing: .2em; color: var(--gold); }
.hl-board { display: flex; justify-content: center; min-height: 100px; align-items: center; }
.hl-vs { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-note { font-size: 10.5px; margin-top: 2px; }

/* floating tooltip */
#tip {
  position: fixed; z-index: 2000; display: none; pointer-events: none;
  background: var(--ink); color: #fff; font-size: 12px; line-height: 1.5;
  padding: 8px 11px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  font-family: var(--display); max-width: 280px;
}
#tip b { font-weight: 700; }

/* custom dropdown */
.csel { position: relative; display: inline-block; }
.csel-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--bg); border: 1px solid var(--line2); border-radius: 10px;
  padding: 9px 13px; font-size: 13.5px; font-weight: 600; color: var(--ink);
  transition: border-color .12s, box-shadow .12s;
}
.csel-btn:hover { border-color: var(--faint); }
.csel.open .csel-btn { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
.csel-btn svg { color: var(--faint); flex: none; transition: transform .15s; }
.csel.open .csel-btn svg { transform: rotate(180deg); }
.csel-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 100%; max-height: 320px; overflow-y: auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md), 0 12px 40px rgba(0,0,0,.08);
  display: none; flex-direction: column; padding: 5px; z-index: 100;
}
.csel.open .csel-menu { display: flex; animation: cselin .14s ease; }
@keyframes cselin { from { opacity: 0; transform: translateY(-4px); } }
.csel-opt {
  text-align: left; background: none; border: none; border-radius: 8px;
  padding: 8px 11px; font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap;
}
.csel-opt:hover { background: var(--bg2); }
.csel-opt.on { background: var(--gold-soft); color: var(--gold); font-weight: 700; }

/* stats */
.charts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(440px, 100%), 1fr)); gap: 16px; }
.chart-card.span2 { grid-column: 1 / -1; }
.chart-card { transition: box-shadow .15s; }
.chart-card:hover { box-shadow: var(--shadow-md); }
.chart-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 12px; box-shadow: var(--shadow-sm); }
.chart-title { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.chart-sub { font-size: 12px; color: var(--dim); margin-top: 2px; }
.chart-host { margin-top: 12px; min-height: 60px; }
.chart-host svg { max-width: 100%; height: auto; display: block; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.cl-item { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--dim); font-family: var(--mono); }
.cl-item i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* game-theory ledgers */
.ledger { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; width: 100%; max-width: 540px; }
.lg-scores { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.lg-score { text-align: center; padding: 8px 16px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; min-width: 90px; }
.lg-name { font-size: 11px; font-weight: 600; color: var(--dim); max-width: 130px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-pts { font-size: 22px; font-weight: 600; color: var(--ink); }
.lg-title { text-align: center; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 6px 0 10px; }
.lg-rows { display: flex; flex-direction: column; gap: 3px; max-height: 260px; overflow-y: auto; }
.lg-row { font-size: 12px; color: var(--dim); padding: 4px 8px; border-radius: 6px; background: var(--bg2); }
.cp-track { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.cp-step { padding: 10px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 11px; color: var(--dim); background: var(--bg2); min-width: 50px; text-align: center; }
.cp-step.passed { opacity: .45; text-decoration: line-through; }
.cp-step.now { border-color: var(--teal); color: var(--teal); font-weight: 600; }
.cp-step.took { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); font-weight: 700; }

/* chess piece images + check/lastmove */
.pcimg { width: 90%; height: 90%; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.sq.checked::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; box-shadow: 0 0 0 3px var(--red), 0 0 14px rgba(220,38,38,.6); }
.board-explain { font-size: 12px; color: var(--dim); text-align: center; max-width: 60ch; line-height: 1.5; }

/* blotto battlefield */
.bl-fields { display: flex; justify-content: center; gap: 18px; margin: 8px 0 10px; }
.bl-field { text-align: center; }
.bl-flag { font-size: 18px; }
.bl-name { font-size: 10px; color: var(--faint); margin: 2px 0 6px; }
.bl-bars { display: flex; gap: 5px; align-items: flex-end; height: 100px; justify-content: center; }
.bl-bar { width: 26px; border-radius: 5px 5px 2px 2px; display: flex; align-items: flex-start; justify-content: center; color: #fff; font-size: 10px; padding-top: 2px; transition: height .3s; }
.bl-bar.red { background: linear-gradient(180deg, #ef4444, #b91c1c); }
.bl-bar.blue { background: linear-gradient(180deg, #3b82f6, #1d4ed8); }
.bl-pips { display: flex; gap: 5px; justify-content: center; margin-top: 4px; }
.bl-pip { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

/* ultimatum split bars */
.ult-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.ult-bar { flex: 1; display: flex; height: 20px; border-radius: 5px; overflow: hidden; border: 1px solid var(--line); }
.ult-bar.dead { opacity: .4; filter: grayscale(1); }
.ult-bar i { display: flex; align-items: center; justify-content: center; font-size: 10px; font-family: var(--mono); color: #fff; font-style: normal; }
.ult-bar .keep { background: #6b7280; }
.ult-bar .give { background: var(--green); }

/* auction thermometer */
.auc-therm { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.auc-lane { display: flex; align-items: center; gap: 10px; }
.auc-name { min-width: 110px; font-size: 11px; text-align: right; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auc-track { flex: 1; position: relative; height: 18px; background: var(--bg2); border: 1px solid var(--line); border-radius: 5px; }
.auc-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; transition: width .3s; }
.auc-val { position: absolute; right: 6px; top: 1px; font-size: 11px; color: var(--ink); }
.auc-prize { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--gold); }

/* guess 2/3 number lines */
.g23-line { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.g23-track { flex: 1; position: relative; height: 16px; background: linear-gradient(90deg, var(--bg2), #f1f1f3); border-radius: 8px; border: 1px solid var(--line); }
.g23-dot { position: absolute; top: 2px; width: 10px; height: 10px; border-radius: 50%; transform: translateX(-50%); }
.g23-target { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--gold); transform: translateX(-50%); }

/* mafia */
.mf-seats { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 10px; }
.mf-seat { text-align: center; padding: 8px 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; min-width: 86px; }
.mf-seat.dead { opacity: .4; }
.mf-seat.dead .mf-name { text-decoration: line-through; }
.mf-role { font-size: 20px; }
.mf-name { font-size: 11px; font-weight: 600; max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mf-tag { font-size: 9.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.mf-log { display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow-y: auto; }
.mf-line { font-size: 12.5px; color: var(--ink); padding: 5px 9px; background: var(--bg2); border-radius: 7px; }
.mf-line.grim { color: var(--red); background: #dc26260a; }
.mf-line.dim { color: var(--faint); }

/* bracket tree */
.bracket { display: flex; gap: 26px; overflow-x: auto; padding: 8px 2px 18px; align-items: stretch; }
.b-round { display: flex; flex-direction: column; justify-content: space-around; gap: 14px; min-width: 215px; }
.b-label { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); text-align: center; }
.b-tie { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-sm); }
.b-side { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; padding: 8px 12px; font-size: 13px; border-bottom: 1px solid #f1f1f3; }
.b-side:last-of-type { border-bottom: none; }
.b-side.won { background: var(--gold-soft); font-weight: 700; }
.b-side.won .b-name::after { content: " ✓"; color: var(--gold); }
.b-side.bye { color: var(--faint); font-style: italic; }
.b-seed { font-size: 10px; color: var(--faint); }
.b-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-pts { font-size: 11.5px; color: var(--dim); }
.b-links { display: flex; gap: 6px; padding: 6px 12px; background: var(--bg2); border-top: 1px solid var(--line); }
.b-links a { font-size: 13px; opacity: .75; transition: opacity .1s, transform .1s; }
.b-links a:hover { opacity: 1; transform: scale(1.2); }
.b-links a.liveb { filter: drop-shadow(0 0 3px var(--teal)); }

.seat-strip { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; justify-content: center; }
.seat-pill {
  font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--dim); background: var(--bg2);
}
.seat-pill.toact { color: var(--teal); border-color: #0d948844; background: var(--teal-soft); }
.seat-pill.won { color: var(--gold); border-color: #e8590c44; background: var(--gold-soft); }
.ptable .seat.folded { opacity: .55; }

.game-select {
  width: auto; min-width: 230px; font-weight: 600; font-size: 14px;
  padding: 9px 36px 9px 14px; border-radius: 10px; cursor: pointer;
  appearance: none; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
}

/* compact match rows */
.mrow {
  display: grid; grid-template-columns: 48px 110px minmax(200px, 1.4fr) minmax(0, 1fr) 52px 64px 78px 64px;
  gap: 10px; align-items: center; padding: 9px 14px; border-bottom: 1px solid #f1f1f3;
  font-size: 13px; transition: background .1s;
}
.mrow:last-child { border-bottom: none; }
.mrow:hover { background: var(--bg2); }
.mrow .mr-id { font-size: 10.5px; }
.mrow .mr-game { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .mr-pair { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .mr-reason { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .mr-meta, .mrow .mr-time { font-size: 10.5px; text-align: right; }
.mrow .badge { justify-self: center; }

@media (max-width: 1180px) {
  .dash { grid-template-columns: 1fr; }
  .holders { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .mrow { grid-template-columns: 40px 90px 1.4fr 60px 70px; }
  .mrow .mr-reason, .mrow .mr-meta:nth-of-type(5), .mrow .mr-time { display: none; }
}

/* hero explore strip */
.hero-strip { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 14px; }
.hs-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 9px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
  font-size: 12.5px; font-weight: 600; color: var(--dim);
  transition: all .14s; animation: chipin .4s ease backwards;
}
.hero-strip .hs-chip:nth-child(n) { animation-delay: calc(var(--i, 0) * 0s); }
.hs-chip:hover { border-color: var(--gold); color: var(--ink); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(232,89,12,.12); }
.hs-chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.hs-chip .hs-icon { font-size: 15px; }
@keyframes chipin { from { opacity: 0; transform: translateY(6px); } }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }

/* games page tabbed body */
.gd-body { margin-top: 12px; min-height: 200px; }
.gd-body .codeblock { max-height: 56vh; }

/* inline model expansion */
tr.expandable { cursor: pointer; }
.mx-caret { color: var(--faint); font-size: 10px; }
.mx-tr td { background: var(--bg2); }
.mx { display: flex; flex-direction: column; gap: 12px; padding: 12px 6px; }
.mx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mx-chip { font-size: 11px; padding: 4px 9px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.mx-chip i { font-style: normal; color: var(--faint); margin-left: 5px; font-size: 10px; }
.mx-recent { display: flex; flex-direction: column; gap: 3px; }
.mx-row { display: flex; gap: 10px; align-items: baseline; font-size: 11.5px; padding: 4px 8px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); }
.mx-row:hover { border-color: var(--line2); }
.mx-opp { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-spark { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 6px; }

/* hljs on white codeblocks */
.codeblock .hljs-attr { color: #0550ae; }
.codeblock .hljs-string { color: #0a3069; }
.codeblock .hljs-keyword { color: #cf222e; }
.codeblock .hljs-comment { color: #6e7781; }

/* ---------------- responsive ---------------- */
@media (max-width: 1080px) {
  .viewer { grid-template-columns: 1fr; }
  .stage { position: static; }
  .podium, .gd-cols, .ctrl-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  :root { --rail-w: 0px; }
  .rail { position: sticky; top: 0; width: auto; flex-direction: row; align-items: center; padding: 8px 12px; border-right: none; border-bottom: 1px solid var(--line); z-index: 50; background: var(--bg); }
  .logo { padding: 0 8px 0 0; }
  .logo-word { font-size: 15px; }
  .rail-links { flex-direction: row; margin: 0 auto; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .rail-links a { padding: 8px 9px; font-size: 13px; white-space: nowrap; }
  .rail-links a .num { display: none; }
  .rail-status { display: none; }
  .view { margin-left: 0; padding: 20px 14px 70px; }
  .panel { overflow-x: auto; }
  table.lb { min-width: 0; width: 100%; }
  table.lb th, table.lb td { padding: 9px 8px; }
  table.lb th:nth-child(5), table.lb td:nth-child(5) { display: none; }  /* win-rate bar */
  table.lb th:nth-child(4), table.lb td:nth-child(4) { display: none; }  /* record */
  td.rank { width: 34px; }
  .model-cell .provider { display: none; } /* logo carries the provider on phones */
  .boardwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; justify-content: flex-start; }
  .dash > *, .viewer > *, .gd-cols > *, .ctrl-grid > * { min-width: 0; }
  body { overflow-x: hidden; }
  .stage { padding: 14px; }
  .charts-grid { grid-template-columns: 1fr; }
  .holders { grid-template-columns: repeat(2, 1fr); }
  .reel { grid-template-columns: 1fr 1fr; }
  .live-tile { grid-template-columns: 1fr; }
  .lt-board { justify-self: center; }
  .mrow { grid-template-columns: 90px 1fr 70px; }
  .mrow .mr-id, .mrow .mr-reason, .mrow .mr-meta, .mrow .mr-time { display: none; }
  h1.head { font-size: 26px; }
  .game-select { min-width: 0; max-width: 100%; }
  .statline { gap: 12px; }
  .ptable { padding: 14px; }
  .gd-cols { grid-template-columns: 1fr; }
  .codeblock { font-size: 10.5px; }
  .section-label { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .reel { grid-template-columns: 1fr; }
  .holders { grid-template-columns: 1fr 1fr; }
  .controls { flex-wrap: wrap; }
  .scrub { min-width: 120px; }
}

/* stats headline tiles */
.stat-tiles { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.stile {
  flex: 1 1 110px; min-width: 110px; text-align: center; padding: 13px 10px 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm);
}
a.stile:hover { border-color: var(--gold); }
.st-big { font-size: 22px; font-weight: 600; color: var(--ink); }
a.stile .st-big { color: var(--gold); }
.st-label { font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-top: 2px; }

/* footer */
.site-footer { margin-left: var(--rail-w); border-top: 1px solid var(--line); padding: 22px 48px 30px; background: var(--bg2); }
.sf-inner { max-width: 1280px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--dim); }
.sf-brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; letter-spacing: .06em; color: var(--ink); }
.sf-brand b { color: var(--gold); font-weight: 800; }
.sf-line { flex: 1; min-width: 260px; }
.sf-links a { color: var(--gold); }
.sf-links a:hover { text-decoration: underline; }
@media (max-width: 800px) { .site-footer { margin-left: 0; padding: 18px 16px 26px; } }

.kbd-hint { display: flex; gap: 10px; justify-content: center; font-size: 10.5px; color: var(--faint); font-family: var(--mono); }
.kbd-hint kbd { border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--bg); font-family: inherit; }
@media (hover: none) { .kbd-hint { display: none; } }

.logo-mark { width: 27px; height: 27px; border-radius: 7px; flex: none; box-shadow: 0 1px 3px rgba(212,74,5,.3); transition: transform .15s; }
.logo:hover .logo-mark { transform: rotate(-6deg) scale(1.05); }
