/* lobby area: the Lobby, Live and Recent pages (.area-lobby) and the dialogs lobby.js opens (dialog.lobby-dlg, appended to <body>,
   so they are scoped by that class). Tokens come from style.css; no inline styles (CSP): lobby.js sets custom properties only. */

/* ---- the bar above every list: game chips on the left, view / filter / sort on the right ---- */
.area-lobby .lobby-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; margin: 0 0 0.9rem; }
.area-lobby .lobby-tools, .area-lobby .lobby-js { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.area-lobby .lobby-js[hidden] { display: none; }
.area-lobby nav.game-chips[aria-label="Game"] { border: 0; margin: 0; padding: 0; gap: 0.4rem; flex-wrap: wrap; overflow: visible; }
.area-lobby .game-chips::after { content: none !important; display: none; }
.area-lobby .game-chips a { margin: 0; padding: 0.3rem 0.8rem; border: 1.5px solid var(--rule-strong); border-radius: 999px; font-size: 0.875rem; color: var(--ink); background: var(--sheet); }
.area-lobby .game-chips a:hover { border-color: var(--ink); background: var(--hover); }
.area-lobby .game-chips a.on { background: var(--action); border-color: var(--action); color: var(--on-action); }
.area-lobby .count { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; opacity: 0.8; margin-left: 0.2rem; }
.area-lobby .game-chips a.on .count { opacity: 1; }
.area-lobby .lobby-note { margin: 0 0 0.75rem; }
.area-lobby .list-count { margin: 0 0 0.6rem; font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.area-lobby .waiting-count { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; padding: 0.05rem 0.4rem; border-radius: 4px; background: color-mix(in srgb, var(--on-action) 14%, transparent); }

.lobby-sort [aria-checked]::before { content: ""; flex: none; width: 0.55rem; height: 0.55rem; border-radius: 50%; margin-right: 0.6rem; }
.lobby-sort [aria-checked="true"]::before { background: var(--action); }

/* ---- the next expiry and the countdown ring ---- */
.area-lobby .expiry-strip { display: flex; align-items: center; gap: 0.4rem; margin: 0 0 0.75rem; padding: 0.45rem 0.8rem; border: 1px solid var(--rule); border-radius: var(--r-sheet); background: var(--sheet); font-size: 0.875rem; color: var(--ink-2); }
.area-lobby .expiry-strip time { color: var(--ink); font-size: 0.8125rem; }
.area-lobby .expiry-strip.is-low time { color: var(--err); }
.area-lobby .expiry { display: inline-flex; align-items: center; gap: 0.4rem; }
.area-lobby .expiry .ring { width: 1.15rem; height: 1.15rem; }

/* ---- cards: equal size, new ones arrive, expired ones fade ---- */
.area-lobby .card-grid { align-items: stretch; }
.area-lobby .card-grid > .set-card { height: 100%; }
.area-lobby .challenge-card, .area-lobby table.lobby tbody tr { transition: opacity 0.35s ease, translate 0.35s ease; }
.area-lobby .challenge-card.enter, .area-lobby table.lobby tbody tr.enter { transition: opacity 0.4s ease, translate 0.4s cubic-bezier(0.2, 0.9, 0.3, 1); }
@starting-style {
  .area-lobby .challenge-card.enter { opacity: 0; translate: 0 14px; }
  .area-lobby table.lobby tbody tr.enter { opacity: 0; }
}
.area-lobby .challenge-card.leaving, .area-lobby table.lobby tbody tr.leaving { opacity: 0; translate: 0 -6px; pointer-events: none; }
.area-lobby .is-expired { opacity: 0.45; }
.area-lobby .is-expired .card-actions { pointer-events: none; }
.area-lobby .challenge-card[hidden], .area-lobby table.lobby tbody tr[hidden] { display: none; }
.area-lobby .set-card .set-options { min-height: 1.6rem; align-content: flex-start; }
/* a sample game's board fills the card's board area (the grid centring there would collapse it: a .wall-board has no size of its own) */
.area-lobby .demo-board .wall-board { width: 100%; }
/* Live and Recent: every card the height of the tallest, its head always two lines so the seats line up */
.area-sets .card-grid { grid-auto-rows: 1fr; }
.area-lobby .challenge-card .card-head { align-items: flex-start; min-height: 2.6rem; }
.area-sets .set-card .card-head { align-items: flex-start; min-height: 2.6rem; }
.area-sets .set-card .card-state { max-width: 62%; }

/* a table on a card (the lobby's, Live's, Recent's and the home page's): the seats as one numbered strip */
.board-card .table-of { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; padding: 0.05rem 0.4rem; border: 1px solid var(--slate-line, var(--rule-strong)); border-radius: 4px; color: var(--slate-ink, var(--ink)); white-space: nowrap; }
.board-card .seat-row.table-seats { display: flex; flex-wrap: wrap; align-content: center; gap: 0.3rem; min-height: 2.9rem; }
.board-card .table-seats .seat-cell { display: block; flex: none; }
.board-card .table-seats .badge { gap: 0; }
.board-card .table-seats .badge-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.board-card .table-seats .badge-seat { width: 1.75rem; height: 1.75rem; font-size: 0.8125rem; }
.board-card .table-seats .seat-score { display: none; }

/* ---- empty state ---- */
.area-lobby .lobby-empty { display: grid; justify-items: center; text-align: center; gap: 0.6rem; padding: 3rem 1.25rem; margin: 0 0 1.25rem; border: 1.5px dashed var(--rule-strong); border-radius: var(--r-sheet); background: transparent; color: var(--ink-2); }
.area-lobby .lobby-empty h2 { margin: 0; font-size: 1.375rem; color: var(--ink); }
.area-lobby .lobby-more { margin: 1.25rem 0 0; color: var(--ink-2); }
.area-lobby .lobby-more summary { cursor: pointer; min-height: 2.75rem; display: flex; align-items: center; font-weight: 600; }
.area-lobby .lobby-bar.lobby-actions { padding: 0; background: none; border: 0; }
.area-lobby .lobby-empty p { margin: 0; max-width: 44ch; }
.area-lobby .lobby-empty .art { width: 5rem; height: 5rem; color: var(--rule-strong); stroke-width: 1; }
.area-lobby .empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-top: 0.5rem; }

.area-lobby .mono, .dlg .mono, dialog.lobby-dlg .mono { font-family: var(--font-mono); font-size: 0.8125rem; }

/* ---- Find me a set ---- */
.area-lobby .seek-panel, .area-lobby .post-panel { scroll-margin-top: 1rem; }
.seek-form { display: grid; gap: 0.8rem; }
.seek-form .field { display: grid; gap: 0.3rem; font-weight: 600; font-size: 0.9rem; }
.seek-form .field select, .seek-form .field input { max-width: 100%; }
.seek-form .stake-field { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 500; }
.seek-form .stake-field input { width: 8rem; }
.seek-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.5rem 0 0; }
.seek-error { margin: 0; padding: 0.55rem 0.8rem; border: 1px solid var(--err); border-left: 4px solid var(--err); border-radius: var(--r-control); }
.seek-error[hidden], .seek-live[hidden], .seek-state[hidden], .seek-form[hidden] { display: none; }
.seek-head { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 0.8rem; font-size: 1.125rem; }
.seek-ring { width: 1.6rem; height: 1.6rem; }
.window-bar { margin: 0.2rem 0 0.8rem; }
.window-track { position: relative; display: block; height: 0.65rem; border-radius: 999px; background: var(--rule); overflow: hidden; }
.window-fill { position: absolute; inset-block: 0; left: var(--lo, 33%); right: calc(100% - var(--hi, 67%)); border-radius: 999px; background: var(--teal); transition: left 0.5s ease, right 0.5s ease; }
.window-me { position: absolute; inset-block: 0; left: calc(var(--me, 50%) - 1px); width: 3px; background: var(--ink); }
.window-ends { display: flex; justify-content: space-between; margin-top: 0.3rem; color: var(--ink-2); }
.seek-meta { margin: 0 0 0.4rem; font-variant-numeric: tabular-nums; }
.found-card { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.75rem; padding: 0.9rem 1rem; margin: 0 0 0.8rem; border: 1px solid var(--teal); border-radius: var(--r-sheet); background: var(--field); }
.found-bot { display: grid; gap: 0.3rem; min-width: 0; }
.found-vs { color: var(--ink-2); font-weight: 700; }
.found-card .badge { max-width: 100%; }
.found-card .mono { color: var(--ink-2); }
@media (max-width: 480px) { .found-card { grid-template-columns: 1fr; } .found-vs { display: none; } }

/* ---- the take page and dialog: terms in a sentence, the bot, one button ---- */
.take-sheet .take-lead, .dlg-body .take-lead { margin: 0 0 0.75rem; font-size: 1.0625rem; line-height: 1.5; max-width: 62ch; }
.take-sheet .take-lead b, .dlg-body .take-lead b { font-weight: 700; color: var(--ink); }
.take-sheet dl.take-facts, .dlg-body dl.take-facts { margin: 0.5rem 0 0.75rem; gap: 0.3rem 1rem; font-size: 0.9375rem; }
.take-more, .dlg-body .take-more { margin: 0 0 1rem; }
.take-more > summary { cursor: pointer; color: var(--ink-2); font-size: 0.875rem; }
.take-more[open] > summary { margin-bottom: 0.4rem; }
.take-form { margin: 0; }
.take-bots { border: 0; padding: 0; margin: 0 0 0.75rem; min-width: 0; }
.take-bots { align-items: center; }
.take-bots-label { flex-basis: 100%; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.take-note[hidden], .move-points-form[hidden] { display: none; }
.take-note .notice { margin: 0 0 0.75rem; font-size: 0.9375rem; }
.take-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.take-actions button.primary { padding: 0.7rem 1.3rem; font-size: 1rem; }
@media (max-width: 480px) { .take-actions button.primary, .take-actions .btn { width: 100%; text-align: center; justify-content: center; } }

/* ---- the take dialog's "Move N points" ---- */
.move-points-form { display: grid; gap: 0.5rem; margin: 0.75rem 0 0; }
.dlg-body .move-points-form { margin: 0.5rem 0 0.25rem; padding: 0.7rem 0.8rem; border: 1px dashed var(--rule-strong); border-radius: var(--r-control); }

/* ---- dialogs lobby.js opens: Find me a set (centred) and Post a challenge (a drawer on the right) ---- */
dialog.lobby-dlg { padding: 0; border: 1px solid var(--rule-strong); background: var(--sheet); color: var(--ink); box-shadow: 0 30px 80px var(--shade); max-height: 100dvh; overflow: auto; }
dialog.lobby-dlg::backdrop { background: var(--scrim); backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.25s ease, overlay 0.28s allow-discrete, display 0.28s allow-discrete; }
dialog.lobby-dlg[open]::backdrop { opacity: 1; }
@starting-style { dialog.lobby-dlg[open]::backdrop { opacity: 0; } }
dialog.lobby-seek { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); border-radius: 14px; opacity: 0; transform: scale(0.94); transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1), overlay 0.25s allow-discrete, display 0.25s allow-discrete; }
dialog.lobby-seek[open] { opacity: 1; transform: none; }
@starting-style { dialog.lobby-seek[open] { opacity: 0; transform: scale(0.94); } }
dialog.lobby-drawer { margin: 0 0 0 auto; width: min(640px, 100vw); height: 100dvh; max-height: 100dvh; border-width: 0 0 0 1px; border-radius: 0; translate: 100% 0; transition: translate 0.3s cubic-bezier(0.2, 0.9, 0.3, 1), overlay 0.3s allow-discrete, display 0.3s allow-discrete; }
dialog.lobby-drawer[open] { translate: 0 0; }
@starting-style { dialog.lobby-drawer[open] { translate: 100% 0; } }
html:has(dialog.lobby-dlg:modal) { overflow: hidden; }
dialog.lobby-dlg > .panel { margin: 0; border: 0; border-radius: 0; background: transparent; padding: 1.25rem 1.5rem 1.5rem; }
dialog.lobby-dlg .dlg-close { position: absolute; top: 0.6rem; right: 0.7rem; z-index: 2; }
dialog.lobby-dlg .panel > h2, dialog.lobby-dlg .panel > .step-note, dialog.lobby-dlg .panel > [data-seek-note] > .step-note { padding-right: 4.25rem; }
/* the post form's game picker: a chip per game (the options step shows the chosen game's example start) */
.post-panel .post-grid { grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 0.5rem; }
.post-panel .post-grid .pick-tile { flex-direction: row; align-items: center; min-height: 2.75rem; padding: 0.45rem 0.7rem; border: 1.5px solid var(--rule-strong); border-radius: var(--r-control); background: transparent; }
.post-panel .post-grid .pick-tile:hover { border-color: var(--ink-2); background: var(--hover); }
.post-panel .post-grid .pick-tile:has(input:checked) { border-color: var(--teal); background: var(--hover); box-shadow: inset 0 0 0 1px var(--teal); }
.post-panel .post-grid .pick-tile:has(input:checked)::after { content: none; }
.post-panel .post-grid .pick-name { padding: 0; flex: 1; font-size: 0.9375rem; }
.post-panel .post-grid .pick-name .tag { font-size: 0.75rem; }
.post-panel .post-step { margin-top: 1.1rem; }
.post-panel .post-step .step-title { font-size: 1.0625rem; margin-bottom: 0.6rem; }
.post-options-step > summary { list-style: none; cursor: pointer; }
.post-options-step > summary::-webkit-details-marker { display: none; }
.post-options-step > summary .step-title { margin-bottom: 0.6rem; }
.post-options-step > summary .step-title::after { content: ""; width: 0.55rem; height: 0.55rem; margin-left: auto; border: solid var(--ink-2); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform 0.2s ease; }
.post-options-step[open] > summary .step-title::after { transform: rotate(-135deg); }
.post-options-step > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--r-control); }
.step-hint { margin-left: 0.4rem; font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); }
/* the post form inside the drawer: one column, the summary bar stuck to the foot */
dialog.lobby-drawer .post-options-row { display: block; }
dialog.lobby-drawer .post-preview { margin-top: 0.8rem; }
dialog.lobby-drawer .post-grid { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
dialog.lobby-drawer .post-bar { position: sticky; bottom: -1.5rem; margin: 1rem -1.5rem -1.5rem; padding: 0.9rem 1.5rem; background: var(--sheet); border-top: 1px solid var(--rule-strong); }
dialog.lobby-drawer .post-terms { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
dialog.lobby-drawer .post-preview .ag-board { max-width: 26rem; margin-inline: auto; }
@media (max-width: 480px) {
  dialog.lobby-dlg > .panel { padding: 1rem; }
  dialog.lobby-drawer .post-bar { bottom: -1rem; margin: 1rem -1rem -1rem; padding: 0.8rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .area-lobby .challenge-card, .area-lobby table.lobby tbody tr, .window-fill, dialog.lobby-dlg, dialog.lobby-dlg::backdrop { transition: none; }
  dialog.lobby-seek, dialog.lobby-drawer { transform: none; translate: none; }
  .area-lobby .challenge-card.leaving, .area-lobby table.lobby tbody tr.leaving { translate: none; }
}

/* ======================================================================================================
   Round 2: the dense Lobby (Rows by default, Cards as before), the header stats, the one-line toolbar
   ====================================================================================================== */
.area-lobby { --spring: cubic-bezier(0.34, 1.45, 0.64, 1); --ease-out: cubic-bezier(0.2, 0.9, 0.3, 1); --d1: 0.15s; --d2: 0.25s; --d3: 0.4s; }
.area-lobby svg.ic { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -0.2em; }
.area-lobby svg.ic.ic-lg { width: 1.65rem; height: 1.65rem; }
.gi-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.area-lobby .figure, .area-lobby .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* header: the title and the two figures */
.area-lobby .lobby-head { align-items: flex-end; }
.area-lobby .live-stats { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.area-lobby .stat { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-sheet); padding: 0.5rem 0.9rem; min-width: 8.5rem; }
.area-lobby .stat b { display: block; font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.area-lobby .stat span { font-size: 0.8125rem; color: var(--ink-2); }
.area-lobby .pulse-dot { display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.4rem; border-radius: 50%; background: var(--teal); animation: lobby-pulse 1.8s ease-out infinite; }
@keyframes lobby-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 55%, transparent); } 100% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--teal) 0%, transparent); } }

/* chips row, then ONE toolbar line: view, game, sort, refresh ... Find me a set, Post a challenge */
.area-lobby nav.game-chips[aria-label="Game"] { margin: 0 0 0.7rem; }
.area-lobby .lobby-bar { justify-content: flex-start; flex-wrap: wrap; gap: 0.5rem; padding: 0.5rem; margin: 0 0 0.9rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-sheet); }
.area-lobby .lobby-grow { flex: 1; }
.area-lobby .lobby-bar .head-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.area-lobby .lobby-bar .tool, .area-lobby .lobby-bar .btn.small { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.25rem; }
.area-lobby .lobby-bar .btn.small:active, .area-lobby .lobby-bar .tool:active, .area-lobby .crow .btn:active { transform: scale(0.97); }
.area-lobby .lobby-bar .tool .chev { transition: rotate var(--d2) var(--ease-out); }
.area-lobby .lobby-bar .tool[aria-expanded="true"] .chev, .area-lobby .lobby-bar .tool:has(+ [popover]:popover-open) .chev { rotate: 180deg; }
.area-lobby .lobby-bar .tabs.small { margin: 0; }
@media (max-width: 640px) { .area-lobby .lobby-bar .head-actions { width: 100%; } .area-lobby .lobby-bar .head-actions .btn { flex: 1; justify-content: center; } .area-lobby .lobby-grow { display: none; } }

.area-lobby .lobby-main { min-width: 0; container-type: inline-size; }
@media (min-width: 1000px) { .area-lobby .expiry-strip { margin-bottom: 0.7rem; } }

/* ---- the rows ---- */
.area-lobby .crows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.area-lobby .crow { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto auto auto; gap: 0.5rem 1.1rem; align-items: center; padding: 0.75rem 0.9rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-sheet); transition: border-color var(--d2), background var(--d2), opacity 0.35s ease, translate 0.35s var(--ease-out); }
.area-lobby .crow:hover, .area-lobby .crow:focus-within { border-color: var(--rule-strong); background: color-mix(in srgb, var(--hover) 55%, var(--sheet)); }
.area-lobby .crow.mine { border-color: color-mix(in srgb, var(--teal) 45%, var(--rule)); }
.area-lobby .crow.just-posted { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.area-lobby .crow.enter { transition: opacity 0.4s ease, translate 0.4s var(--ease-out); }
@starting-style { .area-lobby .crow.enter, .area-lobby .crows > .crow { opacity: 0; translate: 0 -12px; } }
.area-lobby .crow.leaving { opacity: 0; translate: 24px 0; pointer-events: none; }
.area-lobby .crow[hidden] { display: none; }
.area-lobby .pict { width: 3rem; height: 3rem; border-radius: 12px; display: grid; place-items: center; background: var(--slate); border: 1px solid var(--rule); color: var(--teal); }
.area-lobby .crow-main { min-width: 0; display: grid; gap: 0.4rem; }
.area-lobby .crow-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.65rem; min-width: 0; }
.area-lobby .crow-title .game-name { font-family: var(--font-head); font-size: 1.0625rem; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.area-lobby .crow-title .game-name:hover { text-decoration: underline; }
.area-lobby .who { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--ink-2); font-size: 0.875rem; min-width: 0; }
.area-lobby .who a { color: var(--ink); font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 12rem; }
.area-lobby .who a:hover { text-decoration: underline; }
.area-lobby .who .ic { width: 1rem; height: 1rem; }
.area-lobby .rating { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-2); background: var(--slate); border: 1px solid var(--rule); border-radius: 6px; padding: 0 0.4rem; }
.area-lobby .strikes { font-size: 0.8125rem; color: var(--err); }
.area-lobby .crow-opts { display: contents; }
.area-lobby .crow-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.area-lobby .crow-chips .chip.option { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.75rem; padding: 0.05rem 0.5rem; border-radius: 99px; color: var(--ink-2); background: var(--slate); }
.area-lobby .crow-chips .chip .ic { width: 0.85rem; height: 0.85rem; }
.area-lobby .crow-stake { text-align: right; line-height: 1.15; min-width: 5.5rem; }
.area-lobby .crow-stake b { display: block; font-size: 1.375rem; font-weight: 600; }
.area-lobby .crow-stake span { font-size: 0.8125rem; color: var(--ink-2); }
.area-lobby .cd { position: relative; width: 3.25rem; height: 3.25rem; display: grid; place-items: center; }
.area-lobby .cd .ring { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-mask: radial-gradient(circle, transparent 62%, #000 64%); mask: radial-gradient(circle, transparent 62%, #000 64%); }
.area-lobby .cd-t { position: relative; font-family: var(--font-mono); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.area-lobby .cd .ring.low + .cd-t { color: var(--err); }
.area-lobby .crow-act { display: flex; flex-direction: column; gap: 0.3rem; align-items: stretch; min-width: 6.5rem; }
.area-lobby .crow-act form { display: contents; }
.area-lobby .crow-act .btn, .area-lobby .crow-act button { justify-content: center; text-align: center; }
.area-lobby .crow-act .btn:not(.ghost):not(.danger) { background: var(--teal); border-color: var(--teal); color: var(--on-action); font-weight: 600; }
.area-lobby .crow-act .btn:not(.ghost):not(.danger):hover { filter: brightness(1.1); }
.area-lobby .crow-act .btn.small[href="/account"] { background: transparent; border-color: var(--rule-strong); color: var(--ink); font-weight: 500; }
.area-lobby .crow .table-of { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; padding: 0.05rem 0.4rem; border: 1px solid var(--rule-strong); border-radius: 4px; white-space: nowrap; }
.area-lobby .crow.is-expired { opacity: 0.5; }
.area-lobby .crow.is-expired .crow-act { pointer-events: none; }

/* a row on a phone: the mark and the title above, the stake and the ring beside it, the action across */
@container (max-width: 40rem) {
  .area-lobby .crow { grid-template-columns: 2.5rem minmax(0, 1fr) auto; gap: 0.5rem 0.75rem; }
  .area-lobby .pict { width: 2.5rem; height: 2.5rem; }
  .area-lobby .crow-stake { grid-column: 2; grid-row: 2; text-align: left; display: flex; align-items: baseline; gap: 0.4rem; }
  .area-lobby .crow-stake b { display: inline; font-size: 1.25rem; }
  .area-lobby .cd { grid-column: 3; grid-row: 1; width: 2.9rem; height: 2.9rem; }
  .area-lobby .crow-act { grid-column: 1 / -1; grid-row: 3; flex-direction: row; }
  .area-lobby .crow-act > * { flex: 1; }
}

/* the loading rows */

/* Live and Recent: nothing wraps in a card's head, seats line up, boards fill their frame */
.area-sets .set-card .card-head { flex-wrap: nowrap; gap: 0.5rem; min-height: 0; align-items: center; }
.area-sets .set-card .card-head .game-name, .area-lobby .challenge-card .card-head .game-name { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.area-sets .set-card .card-state { flex: none; max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (prefers-reduced-motion: reduce) {
  .area-lobby .crow, .area-lobby .lobby-bar .tool .chev { transition: none; }
  .area-lobby .crow.leaving, .area-lobby .crow.enter { translate: none; }
  .area-lobby .pulse-dot,   @starting-style { .area-lobby .crow.enter, .area-lobby .crows > .crow { opacity: 1; translate: none; } }
}


/* the lists are dense: no edge-to-edge band around the card grid */
.area-lobby .arena { border-image: none; background: transparent; padding: 0; margin: 0 0 1.25rem; }
/* Hex draws a wide, flat board that sits small in the 4:3 frame: scale it up to fill, the frame clips the margin */
.area-lobby .mini-board[data-game-type="hex"] canvas, .area-lobby .mini-board[data-game-type="hex"] svg:not(.ic),
.area-lobby .wall-board[data-game-type="hex"] canvas { scale: 1.45; transform-origin: 50% 52%; }
@media (prefers-reduced-motion: reduce) { .area-lobby .mini-board canvas { transition: none; } }

/* one filter bar on Lobby, Live and Recent: the chips take the width, the view switch sits at the end (the chips are
   inside the phone's game picker, .game-menu, which is display: contents wider: style.css) */
.area-lobby .lobby-bar nav.game-chips { flex: 1 1 24rem; min-width: 0; margin: 0; }
.area-lobby .lobby-bar > .tabs.small { flex: none; margin-left: auto; }
.area-lobby .lobby-bar > .game-menu-btn { flex: 1 1 auto; }
.area-lobby .lobby-practice { font-size: 0.875rem; padding: 0.5rem 0.25rem; }

/* the row action is a real tap target */
.area-lobby .crow-act .btn, .area-lobby .crow-act button { min-height: 44px; }
.area-lobby .stall-more > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--ink-2); }

/* "Take with <bot>": one tap for a bot that is ready for the game (queries.quick_takes); the reason under a disabled one */
.area-lobby .quick-take button { background: var(--teal); border-color: var(--teal); color: var(--on-action, #06231e); font-weight: 600; white-space: nowrap; }
.area-lobby .quick-take button:disabled { background: transparent; border-color: var(--rule-strong); color: var(--ink-2); font-weight: 500; cursor: not-allowed; }
.area-lobby .quick-why { display: block; font-size: 0.75rem; color: var(--ink-2); line-height: 1.3; }
.area-lobby .pick-another { font-size: 0.75rem; color: var(--ink-2); text-align: center; }
.area-lobby .challenge-card .card-actions .quick-why { flex-basis: 100%; text-align: right; }
/* the games a bot is ready for, in the "Your bots" strip, and the marker in the take dialog */
.area-lobby .ready-games .tag.ready-game { font-size: 0.75rem; padding: 0 0.4rem; border-color: var(--teal); color: var(--teal); }
.area-lobby .bot-pill-ready { font-size: 0.75rem; margin-left: 0.35rem; white-space: nowrap; }
