/* Brass table. Layout: the board is the centre of the table; everything else (your turn, players, log) sits
   around it, stacking on a phone. Copied from the SETI table's styles with the SETI game pieces taken out. */
:root {
  color-scheme: dark;
  --space: #0e0c0a;
  --panel: #181410;
  --panel-2: #211b15;
  --line: #3a3026;
  --ink: #f0e8da;
  --muted: #a39682;
  --signal: #d9a441;
  --sun: #ffd166;
  --ok: #5ad39a;
  --warn: #f4a259;
  --p-red: #ef5d60;
  --p-blue: #4ea1ff;
  --p-green: #4fc97f;
  --p-yellow: #f2c94c;
  --p-purple: #a78bfa;
  --p-orange: #ff8a3d;
  --p-white: #eef2f8;
  --p-pink: #ff7ac3;
  --s-red: #e5484d;
  --s-yellow: #e9c341;
  --s-blue: #3e8ef7;
  --s-black: #8a93a6;
  --font-display: "Chakra Petch", "Arial Narrow", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--space);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}
button, input, select { font: inherit; color: inherit; }
@media (hover: none) and (pointer: coarse) {
input, select { font-size: 16px; }
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: 0.01em; }
a { color: var(--signal); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.wrap { max-width: 1280px; margin-inline: auto; padding-inline: 16px; padding-block: 20px 48px; display: flex; flex-direction: column; gap: 18px; }
.narrow { max-width: 560px; }
.brand { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.brand h1 { font-size: 1.7rem; font-weight: 700; }
.brand .tag { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel h2 { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.mono { font-family: var(--font-mono); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field span, .field > label { font-size: 0.8rem; color: var(--muted); }
.seat { display: flex; gap: 12px; align-items: center; }
.seat input[type="text"] { flex: 1; min-width: 0; }
.ai { background: var(--space); color: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font: inherit; font-size: 0.9rem; cursor: pointer; }
.ai-tag { margin-left: 6px; padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); vertical-align: middle; }
input[type="text"] { background: var(--space); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; width: 100%; }
input[type="text"]:focus { border-color: var(--signal); outline: none; }
.btn { background: var(--signal); color: #071022; border: 0; border-radius: 8px; padding: 10px 16px; font-weight: 600; cursor: pointer; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.sm { padding: 5px 10px; font-size: 0.82rem; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { margin-top: 4px; }
.err { color: var(--warn); font-size: 0.9rem; }
.links { display: flex; flex-direction: column; gap: 8px; }
.link { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.link code { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.c-red { background: var(--p-red); }
.c-blue { background: var(--p-blue); }
.c-green { background: var(--p-green); }
.c-yellow { background: var(--p-yellow); }
.c-purple { background: var(--p-purple); }
.c-orange { background: var(--p-orange); }
.c-white { background: var(--p-white); }
.c-pink { background: var(--p-pink); }
.c-none { background: var(--muted); }
.notice { border: 1px solid var(--warn); background: rgba(244, 162, 89, 0.08); color: var(--warn); border-radius: 8px; padding: 9px 12px; font-size: 0.88rem; }
/* ---- table ---- */
.table { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) {
.table { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
}
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.status { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.status b { color: var(--ink); font-weight: 500; }
.players { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.player { background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--pc); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.player.me { box-shadow: 0 0 0 1px var(--pc) inset; }
.player .who { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.player .who strong { font-family: var(--font-display); font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player .score { font-family: var(--font-mono); font-size: 1.1rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 10px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.stats b { color: var(--ink); font-weight: 500; }
.turn { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ok); font-family: var(--font-mono); }
.cards { display: flex; gap: 10px; flex-wrap: wrap; }
.card { width: 124px; aspect-ratio: 150 / 209; border-radius: 7px; background-color: #1b2540; background-repeat: no-repeat; border: 1px solid var(--line); flex: none; position: relative; overflow: hidden; }
.card.plain { padding: 8px; font-size: 0.72rem; display: flex; flex-direction: column; gap: 4px; }
.card.plain b { font-family: var(--font-display); font-size: 0.8rem; line-height: 1.15; }
.log { font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted); display: flex; flex-direction: column; gap: 3px; max-height: 180px; overflow: auto; }
/* ---- play ---- */
.opts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
select { background: var(--space); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; }
.ask { border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal) inset; }
.decision { display: flex; flex-direction: column; gap: 8px; }
.decision p { margin: 0; font-weight: 500; }
.stack { display: flex; flex-direction: column; gap: 5px; align-items: stretch; }
.card.click { cursor: pointer; }
.card.sel { outline: 3px solid var(--signal); outline-offset: 1px; }
.turn.off { color: var(--muted); }
.pip { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 3px; vertical-align: middle; }
@media (max-width: 520px) {
.card { width: 104px; }
}
/* ---- depth and motion ---- */
.btn, .card { transition: transform 0.14s ease, box-shadow 0.18s ease, border-color 0.18s ease, filter 0.18s ease, background-color 0.18s ease; }
.btn { box-shadow: 0 2px 0 #0006, 0 4px 10px #0004; }
.btn:not(:disabled):hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 3px 0 #0006, 0 8px 16px #0005; }
.btn:not(:disabled):active { transform: translateY(2px) scale(0.98); box-shadow: 0 0 0 #0006, 0 1px 3px #0005; filter: brightness(0.95); }
.btn.ghost { box-shadow: none; }
.btn.ghost:not(:disabled):hover { border-color: var(--signal); box-shadow: 0 4px 12px #0005; }
.card { box-shadow: 0 2px 6px #0007; }
.card.click:hover { transform: translateY(-5px) rotate(-0.6deg); box-shadow: 0 12px 22px #000a; }
.card.click:active { transform: translateY(-1px) scale(0.97); box-shadow: 0 3px 8px #0009; }
.card.sel { transform: translateY(-9px); box-shadow: 0 16px 26px #000b, 0 0 0 3px var(--signal); outline: none; }
.panel { animation: rise 0.35s ease both; }
.panel.ask { animation: rise 0.35s ease both, glow 1.6s ease-in-out 0.35s 2; }
.pip { animation: pop 0.3s ease both; }
.log .logline:last-child { animation: rise 0.4s ease both; }
.logline { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: baseline; }
.logline time { color: color-mix(in srgb, var(--muted) 70%, transparent); font-size: 0.68rem; min-width: 3.1em; white-space: nowrap; }
@keyframes pop { from { transform: scale(0); } 70% { transform: scale(1.3); } to { transform: scale(1); } }
@keyframes pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation: none !important; transition: none !important; }
}
/* ---- compact view: text and symbols, tighter spacing ---- */
.compact, .compact .col { gap: 8px; }
.compact .panel { padding: 10px; gap: 8px; border-radius: 8px; }
.compact .cards { gap: 6px; }
.compact .stack { max-width: 170px; }
@media (max-width: 520px) {
.compact .stack { max-width: calc(50% - 3px); }
}
/* ---- colour choice, rotation indicator, species boards ---- */
.swatches { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.swatch { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #0008; padding: 0; cursor: pointer; transition: transform 0.14s ease, box-shadow 0.14s ease; }
.swatch:not(:disabled):hover { transform: scale(1.25); box-shadow: 0 0 0 2px #fff8; }
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.swatch:disabled { opacity: 0.25; cursor: not-allowed; }
/* ---- game page: resource bar on top, turn box first, hand tray at the bottom ---- */
.game { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.hud { position: sticky; top: 0; z-index: 30; display: flex; gap: 6px 16px; flex-wrap: wrap; align-items: center; padding: 8px 12px; background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--line); border-left: 4px solid var(--pc); border-radius: 10px; box-shadow: 0 6px 18px #000a; font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.hud b { color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.hud-turn { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); }
.hud-turn.on { color: #071022; background: var(--ok); border-color: var(--ok); font-weight: 600; }
@media (min-width: 1000px) {
.table { grid-template-rows: auto 1fr; }
.turnbox { grid-column: 2; grid-row: 1; }
.boardcol { grid-column: 1; grid-row: 1 / span 2; }
.sidecol { grid-column: 2; grid-row: 2; }
}
.turnbox:empty { display: none; }
.tray { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--panel); border-top: 1px solid var(--signal); box-shadow: 0 -8px 24px #000b; }
.tray-bar { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; background: none; border: 0; cursor: pointer; font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; }
.tray-bar b { font-family: var(--font-mono); margin-left: 6px; }
.tray-body { padding: 0 16px 12px; display: flex; flex-direction: column; gap: 8px; max-height: 62vh; overflow-y: auto; max-width: 1280px; margin-inline: auto; }
.tray-body p { margin: 0; }
.tray-cards { display: flex; gap: 10px; overflow-x: auto; padding: 12px 4px 6px; scrollbar-width: thin; }
.tray-space { height: 52px; flex: none; }
.tray-space.open { height: 300px; }
/* ---- undo, pop-ups ---- */
.panel.undo { flex-direction: row; align-items: center; flex-wrap: wrap; padding: 10px 16px; }
.toasts { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none; }
.toast { max-width: min(92vw, 520px); padding: 18px 28px; border-radius: 14px; background: color-mix(in srgb, var(--panel) 92%, transparent); border: 2px solid var(--signal); box-shadow: 0 18px 50px #000d; font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; text-align: center; animation: toast 1.3s ease both; }
.toast.rotate { border-color: var(--sun); color: var(--sun); }
.toast.mine { border-color: var(--ok); color: var(--ok); }
.toast.round { border-color: var(--ink); }
@keyframes toast { 0% { opacity: 0; transform: scale(0.85); } 12% { opacity: 1; transform: scale(1.04); } 20% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(0.98); } }
.soundbtn { margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 0.72rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.soundbtn[aria-pressed="true"] { color: var(--ink); }
/* ---- cards named in the log ---- */
.logcard { color: var(--ink); text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.logcard:hover, .logcard:focus { color: var(--signal); outline: none; }
.logpop { position: fixed; z-index: 70; pointer-events: none; filter: drop-shadow(0 12px 24px #000d); }
.logpop .card { width: 190px; }
.btn[aria-pressed="true"] { border-color: var(--sun); color: var(--sun); }
/* ---- first player, planning view, data tokens as tinted data icons, gains in the log ---- */
.first { align-self: flex-start; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: #071022; background: var(--sun); border-radius: 999px; padding: 1px 8px; }
/* ---- passed players, clickable spaces, gold tile markers ---- */
.passed { align-self: flex-start; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); background: #3a4560; border-radius: 999px; padding: 1px 8px; }
.player.out { opacity: 0.62; }
/* ---- final scores ---- */
.panel.final { border-color: var(--sun); gap: 14px; }
.winner { margin: 0; font-family: var(--font-display); font-size: 1.5rem; }
.winner b { color: var(--sun); }
.finalgrid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) {
.finalgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.scoretable-wrap { overflow-x: auto; }
.scoretable { border-collapse: collapse; width: 100%; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.scoretable th, .scoretable td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.scoretable tbody th, .scoretable tfoot th { text-align: left; font-weight: 400; color: var(--muted); }
.scoretable thead th { font-family: var(--font-display); font-weight: 600; border-bottom: 3px solid var(--pc, var(--line)); }
.scoretable td.top { color: var(--sun); font-weight: 600; }
.scoretable tfoot td, .scoretable tfoot th { font-size: 1.05rem; font-weight: 700; color: var(--ink); border-bottom: 0; border-top: 2px solid var(--line); }
.place { display: inline-grid; place-items: center; width: 1.4em; height: 1.4em; margin-right: 6px; border-radius: 50%; background: var(--pc); color: #071022; font-family: var(--font-mono); font-size: 0.75rem; }
.scorechart { margin: 0; }
.scorechart svg { width: 100%; height: auto; display: block; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; }
.scorechart text { fill: var(--muted); font-family: var(--font-mono); font-size: 11px; }
.scorechart .gridline { stroke: var(--line); stroke-width: 1; }
.scorechart figcaption { display: flex; gap: 6px 14px; flex-wrap: wrap; margin-top: 8px; font-size: 0.82rem; }
/* The score table gets the full width; the chart sits beneath it. */
.finalgrid { grid-template-columns: minmax(0, 1fr) !important; }
.scorechart { max-width: 820px; }
.hud { gap: 6px 8px; }
@media (max-width: 520px) {
.hud { padding: 6px 8px; gap: 5px 5px; }
}
/* Phone layout (up to 700 px wide): the table in tabs, one group of panels at a time. On wider screens a section is invisible to the layout. */
.tabsec { display: contents; }
.game.tabbed { --tabh: calc(54px + env(safe-area-inset-bottom, 0px)); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; gap: 2px; overflow-x: auto; padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); background: var(--panel); border-top: 1px solid var(--signal); box-shadow: 0 -8px 24px #000b; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabbar::-webkit-scrollbar { display: none; }
.tabbtn { flex: 1 0 auto; min-height: 42px; padding: 6px 7px; border-radius: 7px; border: 1px solid transparent; background: transparent; color: var(--muted); font: inherit; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.02em; cursor: pointer; white-space: nowrap; }
.tabbtn.on { background: var(--panel-2); border-color: var(--line); color: var(--ink); font-weight: 600; }
.tabbtn.asking { color: var(--ink); }
.tabbtn:focus-visible { outline: 2px solid var(--sun); outline-offset: 1px; }
/* The hand opens from the button in the status bar and sits above the tabs; there is no bar while it is closed. */
.game.tabbed .tray { bottom: var(--tabh); z-index: 44; }
.game .tray:not(.open) { display: none; }
.game.tabbed .tray-space, .game.tabbed .tray-space.open { height: calc(var(--tabh) + 12px); }
.handbtn { white-space: nowrap; }
.game.tabbed .handbtn { margin-left: auto; }
.game:not(.tabbed) .tray-space:not(.open) { height: 0; }
.handbtn.on { box-shadow: inset 0 0 0 2px var(--sun); }
.game.tabbed .table { display: flex; flex-direction: column; gap: 12px; width:100%; min-width:0; max-width: 760px; margin-inline: auto; }
.game.tabbed .table > .col { display: contents; }
.game.tabbed .table .tabsec { display: flex; flex-direction: column; gap: 12px; }
.game.tabbed .table[data-active="turn"] .tabsec:not([data-tab="turn"]) { display: none; }
.game.tabbed .table[data-active="board"] .tabsec:not([data-tab="board"]) { display: none; }
.game.tabbed .table[data-active="players"] .tabsec:not([data-tab="players"]) { display: none; }
.game.tabbed .table[data-active="log"] .tabsec:not([data-tab="log"]) { display: none; }
/* The title is the way back to the New game page. */
.brand h1 a.home { color: inherit; text-decoration: none; }
.brand h1 a.home:hover { text-decoration: underline; text-underline-offset: 6px; }
.brand h1 a.home:focus-visible { outline: 2px solid var(--sun); outline-offset: 4px; border-radius: 4px; }
/* Phone layout: the hand opens and closes from the button in the status bar, so its own bar is only a heading. */
.game .tray-bar { pointer-events: none; cursor: default; }
.game .tray-bar .muted { display: none; }
/* Wide screens: three columns (board | your turn and your own things | players, cards, tech, log) using the full width. */
@media (min-width: 1500px) {
.wrap:has(.game) { max-width: 1880px; }
.table { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 0.9fr); grid-template-rows: auto; }
.turnbox { grid-column: 2; grid-row: 1; }
.boardcol { grid-column: 1; grid-row: 1; }
.sidecol { grid-column: 3; grid-row: 1; }
.tray-body { max-width: 1880px; }
}
/* Reminder that a mission can be completed, and the question asked before ending the turn without it */
.readynote { color: var(--sun); margin-top: 8px; }
/* Account forms and public score tables fit the phone lobby. */
.field label input { display: block; width: 100%; margin-top: 6px; }
.panel table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.panel th, .panel td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line, #26334b); }
/* ---- admin page ---- */
.admin-game { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid var(--line); }
.admin-game:first-of-type { border-top: 0; }
.admin-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.admin-tag { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--signal); }
.admin-tag.done { color: var(--ok); }
.admin-dates { color: var(--muted); font-size: 0.85rem; }
.admin-players { width: 100%; border-collapse: collapse; }
.admin-players td { padding: 4px 8px 4px 0; vertical-align: middle; }
.admin-players td.num { font-family: var(--font-mono); text-align: right; width: 3.5em; }
.admin-players select { max-width: 100%; }
.admin-name { width: 100%; min-width: 6em; background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; color: var(--ink); font: inherit; }
.admin-name:hover, .admin-name:focus { border-color: var(--line); background: var(--panel); }
.admin-delete { align-self: flex-start; color: var(--warn); border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
/* Adaptive signal trace: exact VP anchors, separately spaced labels and player cards. */

/* ---- leaving the table (bottom of the Turn tab) ---- */
.panel.leave { gap: 10px; }
.panel.leave .row { gap: 8px; flex-wrap: wrap; }
.version { text-align: center; font-family: var(--font-mono); letter-spacing: 0.06em; opacity: 0.8; }
/* Profile: summary tiles, points by source, comparison and the list of games. */
.profile { max-width: 780px; }
.profile h3 { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 6px 0 0; }
.profile .up { color: var(--ok); font-style: normal; }
.profile .down { color: var(--warn); font-style: normal; }
.profile .filters { gap: 8px 18px; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; }
.stat-tiles > div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; }
.stat-tiles b { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-tiles span { font-size: 0.78rem; color: var(--muted); }
.scorechart .avgline { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 5 5; }
.scorechart .pickable { cursor: pointer; }
.profile .scorechart { max-width: none; }
.profile .legend { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.profile .scoretable { margin-top: 0; }
.profile .scoretable th, .profile .scoretable td { text-align: right; padding: 6px 8px; }
.profile .scoretable tbody th { text-align: left; }
.profile .scoretable .sub, .gamerow .sub { display: block; font-family: var(--font-body); font-size: 0.72rem; font-weight: 400; color: var(--muted); }
.profile .scoretable tr.rule th { padding-top: 14px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--line); }
.profile .scoretable.compare { table-layout: fixed; }
.profile .scoretable.compare th, .profile .scoretable.compare td { white-space: normal; padding: 6px 5px; }
.profile .scoretable.compare thead th:first-child { width: 32%; }
.profile .scoretable.compare thead th { font-size: 0.82rem; }
.profile .scoretable-wrap { min-width: 0; max-width: 100%; }
.profile .scoretable tr.you th, .profile .scoretable tr.you td { color: var(--ink); font-weight: 600; }
.profile .scoretable .ai-tag { margin-left: 6px; }
.profile .scoretable.rounds th, .profile .scoretable.rounds td { text-align: center; }
.profile .scoretable.rounds { table-layout: fixed; }
.profile .scoretable.rounds th, .profile .scoretable.rounds td { padding: 6px 2px; }
.profile .scoretable.rounds .steps td { color: var(--muted); font-size: 0.8rem; border-bottom: 0; }
.gamerow { position: relative; border-top: 1px solid var(--line); padding-top: 10px; scroll-margin-top: 12px; }
.gamerow:first-of-type { border-top: 0; padding-top: 0; }
.gamerow summary { display: grid; grid-template-columns: 3.4em 1fr auto; gap: 10px; align-items: center; cursor: pointer; list-style: none; padding-right: 96px; min-height: 44px; }
.gamerow summary::-webkit-details-marker { display: none; }
.gamerow summary > b { font-family: var(--font-display); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.gamerow summary > i { font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.gamerow .rank.won { color: var(--sun); font-weight: 600; }
.gamerow .pick { position: absolute; right: 0; top: 10px; height: 44px; display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--muted); cursor: pointer; }
.gamerow:first-of-type .pick { top: 0; }
.gamebody { display: flex; flex-direction: column; gap: 10px; padding: 10px 0 6px; }
/* Leaderboard: sortable standings and the best single games. */
.leaderboard .tabs { gap: 6px; }
.scoretable.board th button { all: unset; cursor: pointer; color: var(--muted); font: inherit; white-space: nowrap; }
.scoretable.board th button.on { color: var(--ink); }
.scoretable.board thead th { font-size: 0.8rem; }
.scoretable.board td:first-child, .scoretable.board thead th:first-child { text-align: left; color: var(--muted); width: 2.2em; }
.scoretable.board thead th:nth-child(2) { text-align: left; }
.scoretable.board tbody th { color: var(--ink); }
.scoretable.board td.sorted { color: var(--sun); font-weight: 600; }
.scoretable.board tr.you > * { background: color-mix(in srgb, var(--signal) 14%, transparent); }
.scoretable.board tr.unsettled > * { opacity: 0.6; }
.topgames { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.topgames li { display: grid; grid-template-columns: 1.8em 3.2em 1fr; gap: 10px; align-items: center; padding: 8px 4px; border-top: 1px solid var(--line); }
.topgames li:first-child { border-top: 0; }
.topgames li.you { background: color-mix(in srgb, var(--signal) 14%, transparent); }
.topgames .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.topgames b { font-family: var(--font-display); font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.topgames .sub { display: block; font-size: 0.74rem; color: var(--muted); }
.topgames .rank.won { color: var(--sun); font-weight: 600; }
@media (max-width: 700px) {
.leaderboard .scoretable.board { min-width: 620px; }
.scoretable.board th, .scoretable.board td { padding: 6px 8px; font-size: 13px; }
.scoretable.board thead th { font-size: 13px; }
.scoretable.board th button { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; }
.scoretable.board .ai-tag { display: none; }
}
/* Friends, "Your games" in the lobby, and the account link at the top right of a game. */
.brandbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brandbar .brand { min-width: 0; }
.account-chip { flex: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 0.85rem; font-weight: 600; text-decoration: none; color: #071022; background: var(--signal); white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.account-chip.in { background: var(--panel-2); color: var(--ink); }
.friendrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); min-height: 44px; }
.friendrow:first-of-type { border-top: 0; }
.friendrow span { overflow-wrap: anywhere; }
.friends .seat .btn { flex: none; }
.ok-note { color: var(--ok); }
.badge { display: inline-block; margin-left: 6px; min-width: 1.4em; padding: 0 5px; border-radius: 999px; background: var(--sun); color: #071022; font-size: 0.72rem; font-weight: 700; text-align: center; }
.mygame { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.mygame:first-of-type { border-top: 0; }
.mygame .head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.mygame .state { flex: none; font-size: 0.8rem; color: var(--muted); }
.mygame .state.turn { color: var(--sun); font-weight: 700; }
.mygame .scores { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 0.85rem; color: var(--muted); }
.mygame .scores > span { display: inline-flex; align-items: center; gap: 5px; }
.mygame .scores .you { color: var(--ink); }
.mygame .scores b { font-variant-numeric: tabular-nums; color: var(--ink); }
.mygame .scores b.lead { color: var(--sun); }
.mygame.done { opacity: 0.7; }
.game.tabbed { --tabh:calc(60px + env(safe-area-inset-bottom,0px)); }
.tabbtn { min-height:48px; }
.brand .tag, .ai-tag, .hud-turn, .turn, .profile h3, .profile .sub, .topgames .sub, .badge, .profile .scoretable tr.rule th { font-size:12px; }
.brand .tag { overflow-wrap:anywhere; }
.scorechart text { font-size:12px; }
form input:not([type]), form input[type=text], form input[type=email], form input[type=password] { width:100%; min-height:44px; padding:10px 12px; background:var(--space); border:1px solid var(--line); border-radius:8px; }
form input:focus { border-color:var(--signal); }
.admin-game .admin-name { background:var(--space); border:1px solid var(--line); border-radius:6px; }
.newgame>label:not(.check) { display:flex; flex-direction:column; gap:6px; }
.account-chip { min-height:44px; min-width:44px; display:inline-flex; align-items:center; justify-content:center; }
.friendrow { flex-wrap:wrap; }
.friendrow>b { min-width:0; overflow-wrap:anywhere; }
.profile .gamerow .pick { min-width:44px; }
@media(min-width:701px) and (max-width:999px) {
.tray-body { max-height:40vh; }
}
@media(min-width:1000px) {
.tray-body { max-height:min(36vh,320px); }
}
@media(pointer:coarse),(max-width:1180px) {
.btn, .soundbtn, .ai, select, .admin-name { min-height:44px; min-width:44px; }
.filters select { padding:6px 8px; }
.row>a, .links>a, .wrap>a, .profile nav>a, .friends nav>a, .brand h1>a { min-height:44px; display:inline-flex; align-items:center; }
input:not([type=checkbox]):not([type=radio]), select { font-size:16px; }
.check { min-height:44px; align-items:center; }
.friends .seat { flex-wrap:wrap; }
.friends .seat input { flex:1 1 140px; }
}
.donegames { border-top: 1px solid var(--line); padding-top: 4px; }
.donegames:first-child, h2 + .donegames { border-top: 0; padding-top: 0; }
.donegames summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--muted); font-size: 0.9rem; }
.donegames .mygame:first-of-type { border-top: 1px solid var(--line); }
/* How to play (main page): collapsible topics that look like the "Completed games" list. */
.howto-item summary { color: var(--ink); font-size: 0.95rem; font-weight: 600; }
.howto-body { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 12px; font-size: 0.92rem; line-height: 1.5; }
.howto-body p, .howto-body ul { margin: 0; }
.howto-body ul { padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.howto-table { width: 100%; border-collapse: collapse; margin: 0; table-layout: fixed; }
.howto-table th, .howto-table td { text-align: left; vertical-align: top; padding: 8px 6px; border-top: 1px solid var(--line); }
.howto-table th { width: 34%; font-weight: 600; overflow-wrap: anywhere; }
.howto-table th small { display: block; font-weight: 400; color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
/* Main page: sections that open and close, with an arrow that shows they can be pressed. */
.fold { gap: 0; }
.fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; min-height: 44px; margin: -10px 0; }
.fold > summary::-webkit-details-marker, .donegames summary::-webkit-details-marker { display: none; }
.fold > summary h2 { font-size: 0.9rem; color: var(--ink); }
.fold > summary::after, .donegames summary::after { content: ""; flex: none; width: 9px; height: 9px; margin: 0 6px 4px 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.15s ease; }
.fold > summary::after { color: var(--muted); }
.fold[open] > summary::after, .donegames[open] summary::after { transform: rotate(-135deg); margin-bottom: -4px; }
.fold > summary:hover::after { color: var(--ink); }
.donegames summary { justify-content: space-between; }
.foldbody, .newgame { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.foldbody { margin-top: 14px; }
@media (prefers-reduced-motion: reduce) {
.fold > summary::after, .donegames summary::after { transition: none; }
}
/* Main page links: an icon over a label, sharing the row equally. */
.homenav { flex-direction: row; gap: 8px; padding: 8px; }
.homenav > a { flex: 1 1 0; min-width: 0; min-height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 4px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 1.05rem; font-weight: 600; text-align: center; }
.homenav > a:hover, .homenav > a:focus-visible { background: rgba(255, 255, 255, 0.06); }
.homenav .navicon { color: var(--sun); }
.signedin { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 4px 0; }
/* Cards side by side keep their own height: a taller neighbour (a mission with buttons) must not stretch them. */
.cards { align-items: flex-start; }
/* Table chat */
.chatlog { font-size: 0.84rem; display: flex; flex-direction: column; gap: 4px; max-height: 220px; min-height: 60px; overflow: auto; overflow-wrap: anywhere; }
.chatline { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: baseline; }
.chatline time { font-family: var(--font-mono); color: color-mix(in srgb, var(--muted) 70%, transparent); font-size: 0.68rem; min-width: 3.1em; white-space: nowrap; }
.chatline span { white-space: pre-wrap; }
.chatform { display: flex; gap: 6px; margin-top: 8px; }
.chatform input { flex: 1; min-width: 0; font-size: 16px; }
.chat-badge { display: inline-block; min-width: 1.35em; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--signal); color: var(--space); font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; line-height: 1.5; text-align: center; vertical-align: middle; }
.chat-toast { position: fixed; z-index: 58; top: calc(8px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); max-width: min(92vw, 420px); padding: 9px 14px; border-radius: 12px; background: color-mix(in srgb, var(--panel) 94%, transparent); border: 1px solid var(--signal); box-shadow: 0 10px 30px #000b; color: var(--ink); font: inherit; font-size: 0.86rem; text-align: left; overflow-wrap: anywhere; cursor: pointer; animation: chat-toast 5s ease both; }
.chat-float { padding: 10px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--signal); box-shadow: 0 8px 24px #000b; color: var(--ink); font: inherit; font-size: 0.85rem; cursor: pointer; }
@keyframes chat-toast { 0% { opacity: 0; transform: translate(-50%, -12px); } 6%, 90% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -6px); } }
@media (prefers-reduced-motion: reduce) {
.chat-toast { animation: none; }
}
.game.tabbed .table[data-active="chat"] .tabsec:not([data-tab="chat"]) { display: none; }
.game.tabbed .chatlog { max-height: 55vh; }
.h2note { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 0.8rem; color: var(--muted); margin-left: 8px; }
.game.tabbed .table .tabsec-last { order: 1; }
/* Floats over the hand tray (z-index 40) rather than above it. */
.chat-dock { position: fixed; z-index: 46; right: 18px; bottom: 16px; display: flex; flex-direction: column; align-items: flex-end; }
.chat-dock .panel.chat { width: min(360px, calc(100vw - 36px)); margin: 0; box-shadow: 0 12px 32px #000c; border-color: var(--signal); }
.chat-dock .chatlog { max-height: min(42vh, 360px); }
.chat-dock h2 { display: flex; align-items: center; }
.chat-close { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 1.3rem; line-height: 1; padding: 0 4px; cursor: pointer; }
.chat-close:hover, .chat-close:focus-visible { color: var(--ink); }
/* Move pop-ups: other players' log lines, and the viewer's own resource changes */
.move-toasts { position: fixed; z-index: 57; left: 50%; transform: translateX(-50%); width: max-content; max-width: min(92vw, 420px); display: flex; flex-direction: column; gap: 6px; align-items: stretch; pointer-events: none; }
.move-toast { pointer-events: auto; padding: 7px 12px; border-radius: 10px; background: color-mix(in srgb, var(--panel) 94%, transparent); border: 1px solid color-mix(in srgb, var(--pc, var(--signal)) 55%, transparent); border-left: 4px solid var(--pc, var(--signal)); box-shadow: 0 8px 22px #000a; color: var(--ink); font: inherit; font-size: 0.82rem; text-align: left; overflow-wrap: anywhere; cursor: pointer; animation: move-toast 3.5s ease both; }
.move-toast.own { pointer-events: none; cursor: default; border: 1px solid var(--ok); border-left-width: 4px; color: var(--ok); font-family: var(--font-mono); font-weight: 600; text-align: center; animation: move-toast 2.2s ease both; }
@keyframes move-toast { 0% { opacity: 0; transform: translateY(-8px); } 8%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
.move-toast, .move-toast.own { animation-name: move-toast-fade; }
@keyframes move-toast-fade { 0%, 90% { opacity: 1; } 100% { opacity: 0; } }
}
.move-sub { display: block; margin-top: 2px; color: var(--muted); font-family: var(--font-mono); font-size: 0.74rem; }

/* ---- Brass additions: the placeholder board, the crude action box, hand cards ---- */
.boardsoon h3 { font-size: 0.95rem; margin-top: 8px; }
.statelist { margin: 4px 0 0; padding-left: 18px; font-size: 0.85rem; }
.statelist code, .card code, .tray-body code { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); }
.rawview { max-height: 360px; overflow: auto; font-family: var(--font-mono); font-size: 0.72rem; background: var(--space); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.rawaction { width: 100%; font-family: var(--font-mono); font-size: 0.8rem; background: var(--space); border: 1px solid var(--line); border-radius: 8px; padding: 8px; color: var(--ink); resize: vertical; }
.card.click { width: 120px; flex: none; display: flex; flex-direction: column; gap: 4px; align-items: stretch; text-align: left; cursor: pointer; padding: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; }
.card.click img { width: 100%; height: auto; border-radius: 4px; display: block; }
.card.click.sel { border-color: var(--signal); box-shadow: 0 0 0 2px var(--signal); }
/* ---- the board ---- */
.boardcol { gap: 12px; }
.board-svg { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 10px; border: 1px solid var(--line); background: #0b0a0d; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.hit-ring { fill: rgba(255, 209, 102, 0.16); stroke: var(--sun); stroke-width: 3; }
.hit-target .hit-ring { animation: hitpulse 1.3s ease-in-out infinite; }
.hit-chosen .hit-ring { fill: rgba(90, 211, 154, 0.28); stroke: var(--ok); stroke-width: 3.5; }
.hit-asked .hit-ring { fill: rgba(78, 161, 255, 0.22); stroke: #7cc0ff; stroke-width: 3.5; animation: hitpulse 1s ease-in-out infinite; }
.routehit .hit-ring { fill: rgba(255, 209, 102, 0.4); }
.hit-chosen.routehit .hit-ring { fill: rgba(90, 211, 154, 0.55); }
.hit:hover .hit-ring { stroke-width: 5; }
@keyframes hitpulse { 0%, 100% { stroke-opacity: 0.45; } 50% { stroke-opacity: 1; } }
/* ---- cards ---- */
.card.click { background: #1b1611; padding: 0; }
.card.click img + b { display: none; }
.card.click b { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; text-align: center; font-family: var(--font-display); font-size: 0.85rem; }
.card .dual { position: absolute; left: 0; right: 0; top: 0; padding: 2px 3px; background: #000c; font-size: 0.58rem; line-height: 1.15; text-align: center; color: var(--sun); }
.card.dim { opacity: 0.35; filter: grayscale(0.6); cursor: not-allowed; }
.card.mini { width: 74px; }
.card:disabled:not(.dim) { cursor: default; opacity: 1; }
.card:disabled:not(.dim):hover { transform: none; box-shadow: 0 2px 6px #0007; }
.handpanel h2 b { color: var(--ink); font-family: var(--font-mono); margin-left: 6px; }
.handpanel .cards { gap: 8px; }
.handstrip { display: flex; gap: 6px; overflow-x: auto; padding: 8px 2px 6px; scrollbar-width: thin; }
/* ---- main actions, flow bar ---- */
.mains { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.mains .btn, .flowbar .opts .btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 9px 12px; line-height: 1.2; min-height: 46px; }
.mains .btn small, .flowbar .btn small { font-weight: 400; font-size: 0.72rem; opacity: 0.85; }
.mains .btn:disabled { background: var(--panel-2); color: var(--muted); box-shadow: none; opacity: 0.6; border: 1px solid var(--line); }
.mains .btn.on, .flowbar .btn.on { background: var(--sun); box-shadow: 0 0 0 2px var(--ok); }
.flowbar { border-color: var(--sun); gap: 8px; }
.flowhead { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.flowhead b { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; color: var(--sun); }
.flowbar .btn.go { background: var(--ok); }
.flowbar .btn.ghost { min-height: 46px; justify-content: center; }
.ask .opts .btn { min-height: 44px; text-align: left; }
.advanced { display: flex; flex-direction: column; gap: 8px; }
/* ---- player mat, markets ---- */
.matfold summary { cursor: pointer; font-size: 0.78rem; color: var(--muted); padding: 4px 0; }
.mat { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.matrow { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 6px; align-items: center; }
.matname { font-size: 0.7rem; color: var(--muted); line-height: 1.1; }
.matlevels { display: flex; gap: 3px; flex-wrap: nowrap; }
.mattile { position: relative; flex: 1 1 0; max-width: 34px; aspect-ratio: 1; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.mattile img { width: 100%; height: 100%; display: block; }
.mattile b { position: absolute; right: 0; bottom: 0; background: #000c; color: var(--ink); font-family: var(--font-mono); font-size: 0.66rem; line-height: 1; padding: 2px 3px; border-top-left-radius: 4px; }
.mattile.gone { opacity: 0.25; filter: grayscale(1); }
.mattile.next { border-color: var(--sun); box-shadow: 0 0 0 1px var(--sun); }
.track { display: flex; flex-direction: column; gap: 3px; }
.trackhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 0.85rem; }
.tracksvg { width: 100%; max-width: 420px; height: auto; display: block; }
.order { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { font-family: var(--font-mono); font-size: 0.74rem; padding: 3px 9px; border-radius: 999px; border: 2px solid var(--pc); background: var(--panel-2); }
.chip.now { background: var(--pc); color: #071022; font-weight: 600; }
.panel .status { margin: 0; }
@media (max-width: 1023px) {
.game.tabbed .flowbar { position: sticky; bottom: calc(var(--tabh) + 6px); z-index: 20; box-shadow: 0 -6px 18px #000c; }
.game.tabbed .board-svg { border-radius: 6px; }
}
@media (max-width: 520px) {
.mains { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { width: 96px; }
.card.mini { width: 70px; }
}

/* Phone: zoomable board so spaces are big enough to tap. */
.boardwrap.zoomed { overflow: auto; max-height: 75vh; border-radius: 10px; -webkit-overflow-scrolling: touch; }
.boardwrap.zoomed .board-svg { width: 220%; max-width: none; touch-action: pan-x pan-y; }
.zoombtn { align-self: flex-start; }

/* Compact table status; ownership always has a seat number as well as colour. */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.hud { gap:8px 16px; }
.hud-stats, .hud-tools { display:flex; align-items:center; gap:14px; }
.hud-stats { white-space:nowrap; font-variant-numeric:tabular-nums; }
.hud-tools { margin-left:auto; gap:4px; }
.hud-tools .soundbtn { margin:0; min-height:44px; min-width:44px; }
.hud-era { white-space:nowrap; }
.mains .btn:disabled { opacity:1; color:#bdb09c; background:var(--panel-2); border:1px dashed #625442; cursor:not-allowed; }
.mains .btn:disabled small { opacity:1; }
.action-label { font-weight:600; }
.action-lock { color:var(--muted); }
.mains .btn:not(:disabled) { border:1px solid transparent; }
.mains .btn:not(:disabled):hover { border-color:var(--sun); filter:brightness(1.08); }
.board-controls { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.board-controls .btn { min-height:44px; }
.board-controls .btn[aria-pressed="true"] { background:var(--panel-2); border-color:var(--sun); color:var(--sun); }
.board-scale { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:12px; flex:1; }
.board-scale input { width:100%; min-width:60px; max-width:140px; min-height:44px; accent-color:var(--signal); }
.board-hint { flex-basis:100%; color:var(--muted); font-size:12px; }
.boardwrap { min-width:0; }
.boardwrap.zoomed { max-height:60vh; overscroll-behavior-x:contain; scrollbar-width:thin; scrollbar-color:var(--signal) var(--panel); }
.boardwrap.zoomed .board-svg { width:calc(100% * var(--board-scale, 2.8)); }
.inspect-tile { cursor:pointer; }
.inspect-tile:focus-visible { outline:3px solid var(--sun); }
.tile-inspector { width: min(420px, calc(100% - 24px)); max-height:80dvh; padding:0; color:var(--ink); background:var(--panel); border:1px solid var(--signal); border-radius:12px; box-shadow:0 20px 70px #000c; }
.tile-inspector::backdrop { background:#080604b8; }
.tile-detail { padding:18px; }
.tile-detail header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.tile-detail-main { display:flex; align-items:center; gap:16px; margin:16px 0; }
.tile-detail-main img { width:88px; height:88px; border-radius:6px; }
.tile-detail h2 { color:var(--ink); font-size:1.2rem; text-transform:none; letter-spacing:0; }
.tile-detail p { margin:8px 0; }
.tile-detail dl { margin:16px 0; }
.tile-detail dl div { display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 12px; border-top:1px solid var(--line); padding:8px 0; }
.tile-detail dt { color:var(--muted); }
.tile-detail dd { margin:0; }
button.mattile { padding:0; background:var(--panel-2); cursor:pointer; color:var(--ink); }
button.mattile.gone { opacity:0.55; }
@media (max-width:1023px) {
.hud { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:2px 8px; padding:6px 8px; }
.hud-turn { grid-column:1; grid-row:1; justify-self:start; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; letter-spacing:0.03em; }
.hud-era { grid-column:2; grid-row:1; font-size:12px; }
.hud-stats { grid-column:1; grid-row:2; gap:10px; font-size:12px; }
.hud-stats b { font-size:15px; }
.hud-tools { grid-column:2; grid-row:2; }
.hud-tools .toggle-label { display:none; }
.hud-tools .soundbtn { padding:0; font-size:16px; border-radius:8px; }
.hud-tools .soundbtn[aria-pressed="false"] { opacity:0.55; border-style:dashed; }
.game.tabbed .flowbar { position:static; }
}
@media (prefers-reduced-motion:reduce) { .hit-target .hit-ring, .hit-asked .hit-ring { animation:none; } }
.seat-number { display:inline-grid; place-items:center; min-width:1.4em; height:1.4em; border:1px solid currentColor; border-radius:50%; font-family:var(--font-mono); font-size:12px; font-weight:600; line-height:1; }
.hud-tools .soundbtn { display:inline-flex; align-items:center; justify-content:center; gap:5px; }
