/* ---------- theme ---------- */
:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif;
  --radius: 8px;
  --header-h: 52px;
  --tw: #e5484d; --dw: #e9689c; --tl: #3e63dd; --dl: #2fa8c6;
  --tile-top: #fbe5ad; --tile-bot: #efc360; --tile-edge: #c58f2a; --tile-ink: #3a2810;
  --ok: #7cc242; --bad: #f2555a; --warn: #f0a33a;
}
[data-theme="dark"] {
  --bg: #161512; --bg2: #1d1b18; --panel: #262421; --panel2: #302d29; --border: #3d3934;
  --text: #c4c0b9; --strong: #ece8e1; --muted: #8b867e;
  --accent: #629924; --accent-hi: #75b52e; --blue: #3692e7;
  --board-frame: #2b2722; --cell-bg: #3b362f; --board-bg: #24211d; --cell-ink: #ffffffd0;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #edebe9; --bg2: #e4e1dd; --panel: #ffffff; --panel2: #f4f2ef; --border: #d9d4cd;
  --text: #4a4744; --strong: #1f1d1a; --muted: #8a857e;
  --accent: #629924; --accent-hi: #6fae28; --blue: #2b7ed1;
  --board-frame: #cbbfa9; --cell-bg: #e9e1d2; --board-bg: #d9cfbc; --cell-ink: #ffffffe6;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text); font: 15px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: var(--blue); text-decoration: none; }
h1 { font-size: 1.5rem; color: var(--strong); margin: 0 0 16px; font-weight: 600; }
h2 { font-size: 1rem; color: var(--strong); margin: 0 0 10px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 8px; font-weight: 600; }
h3:first-child { margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--border); background: var(--panel2); color: var(--strong);
  padding: 9px 16px; border-radius: var(--radius); font: 600 .95rem var(--font);
  cursor: pointer; transition: background .12s, transform .06s, opacity .12s; user-select: none; white-space: nowrap;
}
.btn:hover:not(:disabled) { background: var(--border); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-hi); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 11px; font-size: .85rem; }
.btn.block { width: 100%; }
.danger-text { color: var(--bad) !important; }
.iconbtn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius);
  background: transparent; border: 0; color: var(--text); cursor: pointer;
}
.iconbtn:hover:not(:disabled) { background: var(--panel2); color: var(--strong); }
.iconbtn:disabled { opacity: .35; }
.iconbtn.big { width: 46px; height: 46px; }
.iconbtn.big .icon { width: 24px; height: 24px; }

input:not([type=checkbox]) {
  font: inherit; color: var(--strong); background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px; width: 100%; outline: none;
}
input:focus { border-color: var(--blue); }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field span { font-size: .85rem; color: var(--muted); }
.check { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.form-error { color: var(--bad); min-height: 1.2em; margin: 4px 0 10px; font-size: .9rem; }

.segmented { display: inline-flex; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 3px; }
.seg { border: 0; background: transparent; color: var(--text); padding: 8px 16px; border-radius: 7px; font: 600 .95rem var(--font); cursor: pointer; display: flex; gap: 6px; align-items: center; }
.seg.on { background: var(--panel); color: var(--strong); box-shadow: 0 1px 3px #0004; }
.seg:disabled { opacity: .4; cursor: not-allowed; }
.flag { font-size: 1.1em; }
.segmented.full { display: flex; width: 100%; margin: 4px 0 14px; }
.segmented.full .seg { flex: 1; justify-content: center; }
.auth-form.embedded { background: none; border: 0; padding: 0; margin: 0; }
.auth-form .center, .center { text-align: center; }
.auth-form .center { margin: 14px 0 0; }
.join-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.small-chip { cursor: default; font-size: .85rem; padding: 3px 12px 3px 3px; }
.small-chip .avatar { width: 22px; height: 22px; font-size: .7rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--bg2); color: var(--text); font: 500 .95rem var(--font); cursor: pointer;
}
.chip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--panel)); color: var(--strong); }
.chip.skeleton { color: transparent; width: 110px; animation: pulse 1.2s infinite; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-weight: 700; font-size: .85rem; color: #fff; background: linear-gradient(135deg, var(--blue), #8b5cf6);
}
.label { font-size: .8rem; color: var(--muted); margin: 10px 0 6px; }
.pill { font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--panel2); color: var(--muted); margin-left: 6px; }
.pill.turn { background: var(--accent); color: #fff; }
.pill.win { background: color-mix(in srgb, var(--ok) 25%, transparent); color: var(--ok); }
.pill.loss { background: color-mix(in srgb, var(--bad) 20%, transparent); color: var(--bad); }
.lang-badge { font-size: .7rem; font-weight: 800; letter-spacing: .05em; padding: 2px 6px; border-radius: 5px; background: var(--blue); color: #fff; }
.count { font-size: .75rem; color: var(--muted); background: var(--panel2); padding: 1px 8px; border-radius: 99px; font-weight: 600; }

.copy-field { display: flex; gap: 8px; margin: 8px 0; }
.copy-field input { font-family: ui-monospace, monospace; font-size: .85rem; }

/* ---------- layout ---------- */
.topbar {
  height: var(--header-h); display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: var(--bg2); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10;
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--strong); font-weight: 700; font-size: 1.15rem; }
.logo-tile {
  width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; font-weight: 800;
  background: linear-gradient(var(--tile-top), var(--tile-bot)); color: var(--tile-ink); box-shadow: 0 2px 0 var(--tile-edge);
}
.topnav { display: flex; align-items: center; gap: 4px; }
.page { max-width: 1100px; margin: 0 auto; padding: 22px 16px 60px; }
.page.narrow { max-width: 620px; }
.page.auth { max-width: 400px; padding-top: 8vh; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 18px; margin-bottom: 14px; }
.panel.tight { padding: 12px; margin: 0; }
.actions { margin-top: 20px; justify-content: flex-end; flex-wrap: wrap; }
.empty { text-align: center; padding: 60px 0; }

.offline-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--warn); color: #000; text-align: center; padding: 4px; font-size: .85rem; z-index: 50; }
body.offline .offline-bar { display: block; }

/* ---------- home ---------- */
.game-group { margin-bottom: 28px; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.game-card {
  display: flex; gap: 12px; padding: 10px; border-radius: 10px; background: var(--panel);
  border: 1px solid var(--border); color: var(--text); transition: border-color .12s, transform .12s;
}
.game-card:hover { border-color: var(--blue); }
.game-card.my-turn { border-color: color-mix(in srgb, var(--accent) 70%, var(--border)); box-shadow: inset 3px 0 0 var(--accent); }
.miniboard { border-radius: 5px; flex: none; }
.lobby-mini { width: 120px; height: 120px; display: grid; place-items: center; font-size: 2rem; background: var(--board-bg); }
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.card-players { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.card-player { display: flex; justify-content: space-between; color: var(--strong); }
.card-player.me { color: var(--muted); }
.card-player .score { font-weight: 700; font-variant-numeric: tabular-nums; }
.card-foot { display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; }

.list { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.list-row:first-child { border-top: 0; }
.list-row.highlight { background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* ---------- game ---------- */
.game-main { height: calc(100dvh - var(--header-h)); overflow: auto; }
.game-layout {
  /* header 52 + padding 28 + status 40 + rack ~78 + action bar 46 + gaps 30 */
  --board-size: max(240px, min(calc(100vw - 380px), calc(100dvh - 280px), 760px));
  --rack-tile: clamp(30px, calc((var(--board-size) - 8px) / 7.9), 60px);
  display: grid; grid-template-columns: var(--board-size) 320px; gap: 18px; justify-content: center;
  padding: 14px; height: 100%;
}
.board-col { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.mobile-top { display: none; }
.mobile-only { display: none !important; }

.board-wrap { width: var(--board-size); flex: none; }
.board {
  container-type: inline-size; aspect-ratio: 1; display: grid;
  grid-template-columns: repeat(15, 1fr); grid-template-rows: repeat(15, 1fr);
  gap: 0.4cqw; padding: 0.6cqw; background: var(--board-frame); border-radius: 1.2cqw;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.cell {
  position: relative; background: var(--cell-bg); border-radius: 0.7cqw; display: grid; place-items: center;
  font-size: 2.1cqw; font-weight: 800; color: var(--cell-ink); letter-spacing: -.02em;
}
.cell.p-TW { background: linear-gradient(145deg, #f0646a, var(--tw)); }
.cell.p-DW { background: linear-gradient(145deg, #f48bb5, var(--dw)); }
.cell.p-TL { background: linear-gradient(145deg, #5a7cf0, var(--tl)); }
.cell.p-DL { background: linear-gradient(145deg, #4cc3df, var(--dl)); }
.cell .star { font-size: 4cqw; color: #fff; text-shadow: 0 0 1cqw #fff6; }
.cell.target:hover { outline: 0.4cqw solid var(--blue); outline-offset: -0.4cqw; cursor: pointer; }
.cell.drop-hover { outline: 0.5cqw solid var(--accent-hi); outline-offset: -0.2cqw; z-index: 2; }
.cell.w-ok .tile { box-shadow: 0 0.35cqw 0 var(--tile-edge), 0 0 0 0.45cqw var(--ok); }
.cell.w-neutral .tile { box-shadow: 0 0.35cqw 0 var(--tile-edge), 0 0 0 0.45cqw var(--warn); }
.cell.w-bad .tile { box-shadow: 0 0.35cqw 0 var(--tile-edge), 0 0 0 0.45cqw var(--bad); }

.tile {
  position: relative; display: grid; place-items: center; border-radius: 12%;
  background: linear-gradient(var(--tile-top), var(--tile-bot)); color: var(--tile-ink);
  box-shadow: 0 0.35cqw 0 var(--tile-edge); font-weight: 800; line-height: 1; user-select: none;
}
.cell .tile { width: 100%; height: 100%; font-size: 4.1cqw; }
.tile .pts { position: absolute; right: 9%; bottom: 7%; font-size: .38em; font-weight: 700; opacity: .85; }
.tile.blank .letter { color: #b0561e; }
.tile.last { background: linear-gradient(#ffe3a0, #ffbe48); }
.tile.last::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 0.3cqw #e98a1388; }
.tile.pending {
  background: linear-gradient(#fff6d6, #ffd66e); cursor: grab; touch-action: none;
  animation: drop .14s ease-out;
}
.tile.pending.bad { background: linear-gradient(#ffe0dc, #ffb2a8); }
.score-badge {
  position: absolute; right: -0.9cqw; bottom: -0.9cqw; z-index: 3; min-width: 3.4cqw; padding: 0.3cqw 0.6cqw;
  border-radius: 99px; font-size: 2.2cqw; font-weight: 800; color: #fff; text-align: center; pointer-events: none;
  box-shadow: 0 1px 4px #0006;
}
.score-badge.ok { background: var(--accent); }
.score-badge.bad { background: var(--bad); }
.score-badge.neutral { background: #777; }

.status-line {
  min-height: 40px; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 6px 12px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border);
  font-weight: 600; color: var(--text); font-size: .95rem;
}
.status-line.ok { color: var(--ok); }
.status-line.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); }
.status-line.warn { color: var(--warn); }
.status-line.info { color: var(--strong); }
.bingo { color: #ffb84d; }

.rack-row {
  width: 100%; display: grid; grid-template-columns: minmax(48px, auto) minmax(0, 1fr) minmax(48px, auto);
  grid-template-areas: "rack rack rack" "left right more"; align-items: center; gap: 8px 6px;
}
.rack-side.left { grid-area: left; }
.rack-zone { grid-area: rack; }
.rack-side.right { grid-area: right; }
.more-btn { grid-area: more; }
.rack-side.right { display: flex; justify-content: center; min-width: 0; }
.rack-side.right .btn { width: 100%; max-width: 360px; }
.rack-zone { display: flex; justify-content: center; min-width: 0; }
.rack {
  display: flex; gap: calc(var(--rack-tile) * .1); padding: calc(var(--rack-tile) * .14);
  background: linear-gradient(#3a2a1a, #2a1d10); border-radius: 10px; box-shadow: inset 0 2px 6px #0008;
  touch-action: none;
}
[data-theme="light"] .rack { background: linear-gradient(#9c7a52, #7d5d3a); }
.rack .tile {
  width: var(--rack-tile); height: var(--rack-tile); font-size: calc(var(--rack-tile) * .56);
  box-shadow: 0 3px 0 var(--tile-edge); cursor: grab; touch-action: none; transition: transform .12s;
}
.rack .tile.slot { background: #0003; box-shadow: none; cursor: default; }
.rack .tile.selected { transform: translateY(-8px); box-shadow: 0 3px 0 var(--tile-edge), 0 0 0 3px var(--blue); }
.rack.exchange .tile { cursor: pointer; }
.rack .tile.ex-sel { transform: translateY(-8px); box-shadow: 0 3px 0 var(--tile-edge), 0 0 0 3px var(--warn); }
.rack.shuffling .tile { animation: wiggle .25s ease; }
.tile.dragging { opacity: .25; }
.tile.ghost {
  position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none;
  box-shadow: 0 10px 24px #0007, 0 3px 0 var(--tile-edge); will-change: transform;
}
.btn.play { min-width: 0; padding: 11px 14px; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; display: block; }

.side { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.players { display: flex; flex-direction: column; gap: 4px; }
.player {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius);
  border: 1px solid transparent; color: var(--strong);
}
.player.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.player.winner .pscore::before { content: "🏆 "; }
.player.resigned { opacity: .5; text-decoration: line-through; }
.pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pscore { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.bag-line { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.side-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.side-actions .btn { flex: 1; }
.side-actions .icon { width: 16px; height: 16px; }
.grow-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.result { display: flex; flex-direction: column; gap: 8px; }
.result-title { font-size: 1.2rem; font-weight: 700; color: var(--strong); }

.history { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; font-size: .9rem; }
.move { display: flex; gap: 8px; align-items: baseline; padding: 5px 4px; border-bottom: 1px solid var(--border); }
.move:nth-child(odd) { background: color-mix(in srgb, var(--panel2) 50%, transparent); }
.move .who { color: var(--muted); width: 72px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.move .words { flex: 1; display: flex; flex-wrap: wrap; gap: 0 8px; min-width: 0; }
.move .w1 { font-weight: 700; color: var(--strong); letter-spacing: .03em; }
.move .w2 { color: var(--muted); font-size: .85em; }
.move .mscore { font-weight: 700; color: var(--ok); font-variant-numeric: tabular-nums; }
.move .mscore.bingo { color: #ffb84d; }
.move.end { font-weight: 600; }

.board-skeleton { width: min(90vw, 70vh); aspect-ratio: 1; margin: 20px auto; border-radius: 12px; background: var(--panel); animation: pulse 1.2s infinite; }

/* ---------- modal / toast ---------- */
.modal-wrap { position: fixed; inset: 0; background: #0009; display: grid; place-items: center; z-index: 200; animation: fade .12s; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 20px; width: min(440px, 100%); max-height: 85dvh; overflow: auto; animation: pop .14s ease-out; }
.modal.bottom { align-self: end; }
.modal h3 { margin-top: 0; }
.confirm p { color: var(--strong); font-size: 1.05rem; margin: 0 0 18px; }
.letter-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.tile.pick { aspect-ratio: 1; border: 0; font: 800 1.3rem var(--font); cursor: pointer; box-shadow: 0 3px 0 var(--tile-edge); }
.tile.pick:hover { filter: brightness(1.08); transform: translateY(-1px); }
.sheet { display: flex; flex-direction: column; max-height: 75dvh; }
.sheet-actions { margin-bottom: 8px; }
.sheet .history { max-height: 45dvh; }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--strong); color: var(--bg); padding: 10px 18px; border-radius: 99px; font-weight: 600; z-index: 300;
  transition: opacity .18s, transform .18s; max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: var(--bad); color: #fff; }
#toast.ok { background: var(--accent); color: #fff; }

@keyframes pulse { 50% { opacity: .5; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
@keyframes drop { from { transform: scale(1.15); } }
@keyframes wiggle { 30% { transform: translateY(-5px) rotate(-4deg); } 70% { transform: translateY(-2px) rotate(3deg); } }

/* ---------- narrow & mobile: no side panel, compact top bar ---------- */
@media (max-width: 899.98px), (max-height: 519.98px), (min-aspect-ratio: 8/5) and (max-height: 860px) {
  .hide-xs { display: none; }
  .topbar.compact { display: none; }
  .game-main { height: 100dvh; }
  .game-layout {
    /* top bar 40 + status 34 + rack ~73 + action bar 44 + gaps 24 + padding 14 */
    --board-size: max(200px, min(calc(100vw - 8px), calc(100dvh - 232px), 760px));
    --rack-tile: clamp(30px, calc((min(100vw, var(--board-size) + 120px) - 16px) / 7.9), 58px);
    grid-template-columns: minmax(0, 1fr); padding: 4px 4px max(8px, env(safe-area-inset-bottom)); gap: 0;
  }
  .board-col { align-items: center; gap: 6px; height: 100%; width: 100%; max-width: max(var(--board-size), 560px); margin: 0 auto; }
  .board-wrap { margin: auto 0; }
  .side { display: none; }
  .mobile-only { display: inline-grid !important; }
  .mobile-top { display: flex; align-items: center; gap: 4px; width: 100%; padding: 2px 2px 0; }
  .players-strip { flex: 1; display: flex; gap: 4px; min-width: 0; }
  .players-strip .player { flex: 1; padding: 4px 8px; gap: 6px; min-width: 0; background: var(--panel); }
  .players-strip .player.active { background: color-mix(in srgb, var(--accent) 22%, var(--panel)); }
  .players-strip .avatar { width: 24px; height: 24px; font-size: .75rem; }
  .players-strip .pname { font-size: .85rem; }
  .players-strip .pscore { font-size: 1.1rem; }
  .bag-mini { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: var(--panel); font-weight: 700; font-size: .85rem; color: var(--muted); }
  .status-line { width: 100%; min-height: 34px; font-size: .88rem; }
  .iconbtn.big { width: 44px; height: 44px; }
  .game-grid { grid-template-columns: 1fr; }
  .page { padding: 16px 12px 60px; }
}

/* ---------- wide & short (phone on its side, laptop screens): board left, controls right ---------- */
@media (min-aspect-ratio: 8/5) and (max-height: 860px) {
  .game-layout {
    --board-size: max(200px, calc(100dvh - 12px));
    --rack-tile: clamp(28px, calc((100vw - var(--board-size) - 40px) / 7.9), 52px);
    padding: 6px;
  }
  .board-col {
    display: grid; max-width: none; height: 100%; gap: 8px 12px; align-content: center;
    grid-template-columns: var(--board-size) minmax(0, 1fr);
    grid-template-areas: "board top" "board status" "board rack";
    grid-template-rows: auto auto 1fr;
  }
  .board-col > .mobile-top { grid-area: top; }
  .board-col > .board-wrap { grid-area: board; margin: 0; }
  .board-col > .status-line { grid-area: status; }
  .board-col > .rack-row { grid-area: rack; align-self: start; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
