/* === Classic warm theme, Ember / Frost palette ===
   --accent  = Ember = alpha (south side, first to move)
   --accent-2 = Frost = omega (north side)                   */
:root {
    --bg: #1f1a14;
    --panel: #2d251c;
    --ink: #f3ebdb;
    --muted: #a89880;
    --board-light: #efe1c6;
    --board-dark: #b39474;
    --grid-line: #6e5538;
    --accent: #c25e3a;
    --accent-2: #549fb9;
    --error: #d96f4a;
    --font-display: 'Iowan Old Style', 'Palatino', 'Georgia', serif;
    --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 14px;
    min-height: 100vh;
}

button { font-family: inherit; }

h1, h2, h3 { font-family: var(--font-display); margin: 0; }

.screen { display: block; }
.screen[hidden] { display: none; }

/* === Buttons === */
.btn {
    background: var(--accent);
    color: var(--bg);
    border: none;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 2px;
    transition: filter 120ms ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { filter: brightness(0.94); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; filter: none; }
.btn.primary { background: var(--accent); }
.btn.outline {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--grid-line);
}
.btn.ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid transparent;
}
.btn.ghost:hover { color: var(--ink); border-color: var(--grid-line); }
.btn.small { padding: 4px 10px; font-size: 12px; }

/* === Text input === */
.text-input {
    background: transparent;
    border: 1px solid var(--grid-line);
    color: var(--ink);
    padding: 9px 12px;
    font-family: var(--font-ui);
    font-size: 14px;
    border-radius: 2px;
    width: 100%;
}
.text-input:focus {
    outline: none;
    border-color: var(--accent);
}

.field-label {
    display: block;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}

.error-text {
    color: var(--error);
    margin: 14px 0 0;
    font-size: 13px;
}

/* === Home screen === */
.home {
    /* Leave a strip at the bottom so the site-credit footer sits in view. */
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.home-card {
    background: var(--panel);
    padding: 36px 40px;
    border-radius: 4px;
    max-width: 420px;
    width: 100%;
}
.title {
    font-size: 36px;
    letter-spacing: 0.02em;
    color: var(--accent);
}
.subtitle {
    color: var(--muted);
    margin: 6px 0 28px;
}
.home-actions { display: flex; flex-direction: column; gap: 20px; }
.home-actions .btn { width: 100%; }
.home-footer {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--grid-line);
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}
.home-link {
    color: var(--muted);
    text-decoration: none;
    font-family: var(--font-display);
    letter-spacing: 0.04em;
    transition: color 100ms;
}
.home-link:hover { color: var(--accent); }
.home-link-sep { margin: 0 12px; color: var(--grid-line); }

/* Site-wide credit footer, anchored below every screen. */
.site-credit {
    text-align: center;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.04em;
    padding: 16px 20px 20px;
    opacity: 0.8;
}
.site-credit a { color: var(--muted); text-decoration: underline; }
.site-credit a:hover { color: var(--accent); }

/* === Sandbox === */
.sandbox-hint {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    margin: 0 0 12px;
}
.sandbox-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.sandbox-controls .btn { width: 100%; }
.sandbox-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-size: 13px;
    cursor: pointer;
}
.sandbox-tip-list {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    padding-left: 18px;
    margin: 0;
}
.sandbox-tip-list li { margin-bottom: 6px; }

.palette-modes {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}
.palette-modes .btn { flex: 1; padding: 6px 10px; font-size: 12px; }
.palette-mode-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(194, 94, 58, 0.12);
}
.palette {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
}
.palette-btn {
    background: transparent;
    border: 1px solid var(--grid-line);
    border-radius: 3px;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--ink);
    font-size: 11px;
    font-family: var(--font-display);
    letter-spacing: 0.04em;
    text-transform: capitalize;
    transition: border-color 100ms, background 100ms;
}
.palette-btn:hover { border-color: var(--accent); }
.palette-btn.active {
    border-color: var(--accent);
    background: rgba(194, 94, 58, 0.18);
}
.palette-btn .piece {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.palette-btn .piece svg { width: 100%; height: 100%; }
.palette-btn[data-side="alpha"] .piece { color: var(--accent); }
.palette-btn[data-side="omega"] .piece { color: var(--accent-2); }
.palette-label { color: var(--muted); }

/* === How to play === */
.htp { display: flex; flex-direction: column; min-height: 100vh; }
.htp-body {
    max-width: 980px;
    margin: 0 auto;
    padding: 24px 32px 64px;
    width: 100%;
}
.htp-section { margin-bottom: 48px; }
.htp-h2 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.06em;
    font-size: 22px;
    color: var(--accent);
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--grid-line);
}
.htp-body p {
    color: var(--ink);
    line-height: 1.6;
    margin: 0 0 14px;
}
.ember-text { color: var(--accent); font-weight: 600; }
.frost-text { color: var(--accent-2); font-weight: 600; }

.htp-pieces {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 18px;
}
.piece-card {
    background: var(--panel);
    border: 1px solid var(--grid-line);
    border-radius: 4px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.piece-card-title {
    font-family: var(--font-display);
    letter-spacing: 0.08em;
    font-size: 16px;
    text-transform: uppercase;
    margin: 0;
    color: var(--ink);
}
.piece-card-body {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    margin: 0;
    align-self: stretch;
}

/* Mini-boards used by HTP and elsewhere. Inherit the .square styling
 * from the live board but with a fixed size grid. */
.mini-board {
    display: grid;
    grid-template-columns: repeat(7, 36px);
    grid-template-rows: repeat(7, 36px);
    border: 1px solid var(--grid-line);
}
.mini-board .square {
    position: relative;
    overflow: hidden;
}
.htp-special {
    background: var(--panel);
    border: 1px solid var(--grid-line);
    border-radius: 4px;
    padding: 18px 22px;
    margin-bottom: 18px;
}
.htp-special h3 {
    font-family: var(--font-display);
    letter-spacing: 0.06em;
    color: var(--accent-2);
    margin: 0 0 10px;
    font-size: 17px;
}
.htp-special p { color: var(--ink); font-size: 14px; }
.htp-mini-wrap {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}
.htp-footer {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 36px;
}
.divider {
    display: flex;
    align-items: center;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    gap: 10px;
}
.divider::before, .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--grid-line);
}
.join-row { display: flex; gap: 8px; }
.join-row .text-input { text-transform: uppercase; letter-spacing: 0.18em; font-family: var(--font-display); }

/* === Room screen === */
.room {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.room-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: var(--panel);
    border-bottom: 1px solid var(--grid-line);
}
.room-id { display: flex; align-items: baseline; gap: 12px; }
.room-id .label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; }
.room-id .code {
    font-family: var(--font-display);
    font-size: 22px;
    letter-spacing: 0.2em;
    color: var(--accent);
}
.room-status { display: flex; align-items: center; gap: 12px; }
.pill {
    background: var(--accent);
    color: var(--bg);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.pill[data-phase="lobby"] { background: var(--muted); color: var(--bg); }
.pill[data-phase="finished"] { background: var(--grid-line); color: var(--ink); }

.room-body {
    display: grid;
    grid-template-columns: 260px 1fr 280px;
    gap: 16px;
    padding: 20px 24px;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.panel {
    background: var(--panel);
    border-radius: 4px;
    padding: 16px;
    min-height: 240px;
}
.panel-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 12px;
}
.panel-note { color: var(--muted); font-size: 13px; }

.board-area { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }

.turn-indicator {
    display: flex;
    justify-content: center;
}
.turn-pill {
    padding: 6px 18px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: 0.04em;
    background: var(--accent);
    color: var(--bg);
}
.turn-pill[data-side="omega"] { background: var(--accent-2); }
.turn-pill[data-side="finished"] { background: var(--grid-line); color: var(--ink); }

/* Board grid: 1 file-label col + 10 file cols + 1 file-label col,
   1 rank-label row + 12 rank rows + 1 rank-label row. */
.board {
    display: grid;
    grid-template-columns: 22px repeat(10, 1fr) 22px;
    grid-template-rows: 22px repeat(12, 1fr) 22px;
    width: 100%;
    max-width: 540px;
    aspect-ratio: 12 / 14;
    background: var(--panel);
    padding: 4px;
    border-radius: 4px;
    user-select: none;
    /* Disable native touch panning so finger-drag becomes a piece drag
     * (we still receive click events for the click-click flow). */
    touch-action: none;
}
.label {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 11px;
}
.square {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--board-light);
}
.square.dark { background: var(--board-dark); }
.square .piece {
    width: 80%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.square .piece svg {
    width: 100%;
    height: 100%;
    display: block;
}
.square[data-side="alpha"] .piece,
.square[data-side="alpha"] .witch-role { color: var(--accent); }
.square[data-side="omega"] .piece,
.square[data-side="omega"] .witch-role { color: var(--accent-2); }

/* Witch role badge: tiny piece icon in the bottom-right corner that
   says "this witch is acting as X". Aura/claim dots sit at the
   bottom-center, so the corner is free. Inherits the side color from
   the parent square so it tints the same as the witch itself. */
.square .witch-role {
    position: absolute;
    right: 4%;
    bottom: 4%;
    width: 28%;
    height: 28%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0.95;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}
.square .witch-role svg { width: 100%; height: 100%; display: block; }

/* Transient feedback toast for invalid clicks (protected pieces, pieces
   claimed by the opponent, etc.). Fades in/out without shifting layout. */
.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--panel);
    color: var(--ink);
    padding: 10px 18px;
    border-radius: 4px;
    border: 1px solid var(--grid-line);
    font-size: 13px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 200ms;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    max-width: 80%;
    text-align: center;
}
.toast.visible { opacity: 1; }

/* === Move preview overlays ===
   - selected piece: translucent accent wash on the source square
   - empty legal destination: ghost silhouette of the moving piece
   - capture target: corner brackets + dimmed enemy piece                */
.square { cursor: default; }
.square[data-side="alpha"] { cursor: pointer; }
.square[data-side="omega"] { cursor: pointer; }
.board[data-perspective="alpha"] .square[data-side="omega"] { cursor: default; }
.board[data-perspective="omega"] .square[data-side="alpha"] { cursor: default; }
/* My piece claimed by the opponent: out of my control this turn. */
.board[data-perspective="alpha"] .square.omega-claim { cursor: default; }
.board[data-perspective="omega"] .square.alpha-claim { cursor: default; }
/* Enemy piece my puppeteer is holding: I can still click/drag it. */
.board[data-perspective="alpha"] .square.alpha-claim { cursor: pointer; }
.board[data-perspective="omega"] .square.omega-claim { cursor: pointer; }
.square.move-target { cursor: pointer; }
.square.capture-target { cursor: pointer; }

.square.selected::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--accent);
    opacity: 0.52;
    pointer-events: none;
    z-index: 0;
}
.board[data-perspective="omega"] .square.selected::before {
    background: var(--accent-2);
}

.piece.ghost {
    opacity: 0.50;
    color: var(--ghost-color, var(--accent));
    position: absolute;
    inset: 6%;
    width: auto;
    height: auto;
}

.square.capture-target .piece:not(.ghost) {
    filter: grayscale(0.7) brightness(0.55);
    opacity: 0.70;
}
.bracket {
    position: absolute;
    width: 18%;
    height: 18%;
    border: 0 solid var(--accent);
    opacity: 1.0;
    pointer-events: none;
    z-index: 3;
}
.board[data-perspective="omega"] .bracket { border-color: var(--accent-2); }
.bracket.tl { top: 4%; left: 4%; border-top-width: 2px; border-left-width: 2px; }
.bracket.tr { top: 4%; right: 4%; border-top-width: 2px; border-right-width: 2px; }
.bracket.bl { bottom: 4%; left: 4%; border-bottom-width: 2px; border-left-width: 2px; }
.bracket.br { bottom: 4%; right: 4%; border-bottom-width: 2px; border-right-width: 2px; }

.claim-hint {
    color: var(--muted);
    font-size: 12px;
    font-style: italic;
}

/* Reminder text above the chat input. Sits between the panel title
   and the log. Quiet on purpose: a "set your name first" nudge rather
   than a demand. */
.chat-hint {
    color: var(--muted);
    font-size: 11px;
    font-style: italic;
    margin: 0 0 6px;
    letter-spacing: 0.02em;
}

/* === Drag ghost (the piece that follows the pointer during a drag) === */
.drag-ghost {
    position: fixed;
    left: 0;
    top: 0;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 100;
    opacity: 0.9;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}
.drag-ghost svg { width: 100%; height: 100%; }
.drag-ghost[data-side="alpha"] { color: var(--accent); }
.drag-ghost[data-side="omega"] { color: var(--accent-2); }

/* === Claim markers ===
 * Eligible (during target-picking): thick dashed ring in viewer's accent.
 * Queued (after a target has been picked): thicker solid ring + a soft
 * glow so it reads as "locked in" rather than "still a candidate".  */
.square.claim-eligible {
    outline: 3px dashed var(--accent);
    outline-offset: -5px;
    cursor: pointer;
    /* A tracked background dash pattern would be nice but it's
     * browser-dependent; the extra outline width + offset already gives
     * us enough visual difference from the queued state. */
}
.board[data-perspective="omega"] .square.claim-eligible { outline-color: var(--accent-2); }
/* Aura and claim both render a small corner dot in the bottom-center of
 * the square. They cannot co-occur (aura blocks claims) so they share
 * the position. Aura is gold (color-blind, "holy protection"); claim
 * is colored by the claimer's side regardless of who is viewing -- this
 * is what makes the marker work for spectators too. The queued-claim
 * state uses the same dot (locally only) so the user sees the claim
 * lock in immediately; a faint ring around it signals "not yet
 * committed". */
.square.aura::after,
.square.alpha-claim::after,
.square.omega-claim::after,
.square.claim-queued::after {
    content: "";
    position: absolute;
    bottom: 2%;
    left: 50%;
    transform: translateX(-50%);
    width: 12%;
    height: 12%;
    border-radius: 50%;
    z-index: 4;
    pointer-events: none;
}
.square.aura::after        { background: #d4a449; }
.square.alpha-claim::after { background: var(--accent); }
.square.omega-claim::after { background: var(--accent-2); }
/* Queued claim: my-side color with a soft ring so it reads as
   "pending". Perspective-driven because only I see the queue. */
.board[data-perspective="alpha"] .square.claim-queued::after {
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}
.board[data-perspective="omega"] .square.claim-queued::after {
    background: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

/* === Action bar (under the board) === */
.action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    min-height: 1px;
}

/* === Staged move (playtest + future real-client staging UX) === */
.square.staged-from .piece {
    opacity: 0.4;
}
.square.staged-from {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}
.square.staged-to {
    box-shadow: inset 0 0 0 3px var(--accent);
}
.board[data-perspective="omega"] .square.staged-to {
    box-shadow: inset 0 0 0 3px var(--accent-2);
}

/* === Playtest-only game-over banner === */
.pt-game-over {
    margin: 12px 0;
    padding: 14px 18px;
    border: 2px solid var(--accent);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.45);
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent);
}
.pt-game-over[data-side="omega"] {
    border-color: var(--accent-2);
    color: var(--accent-2);
}
.pt-game-over[data-side="draw"] {
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--ink);
}

/* === Captured pieces === */
.captured-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-height: 28px;
    margin-bottom: 6px;
}
.captured-row .mini {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    opacity: 0.85;
}
.captured-row .mini[data-side="omega"] { color: var(--accent-2); }
.captured-row .mini svg { width: 100%; height: 100%; }

/* === History === */
.history {
    list-style: decimal inside;
    margin: 0;
    padding: 0;
    max-height: 180px;
    overflow-y: auto;
    font-family: var(--font-display);
    font-size: 13px;
    color: var(--ink);
}
.history li {
    padding: 2px 0;
    border-bottom: 1px dotted var(--grid-line);
}
.history li:last-child { border-bottom: none; }
.history .turn-pair { display: inline-flex; gap: 10px; margin-left: 4px; }
.history .ember { color: var(--accent); }
.history .frost { color: var(--accent-2); }

/* === Chat === */
.chat-log {
    max-height: 140px;
    overflow-y: auto;
    font-size: 13px;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 2px;
    margin-bottom: 8px;
    min-height: 38px;
}
.chat-log .msg { padding: 2px 0; }
.chat-log .who { font-weight: 600; margin-right: 6px; color: var(--accent); }
.chat-log .msg.omega .who { color: var(--accent-2); }
/* System notices (claim notifications, etc.) render as a single muted,
   italic line with no "who:" prefix. */
.chat-log .msg.system { color: var(--muted); font-style: italic; }
.chat-form { margin: 0; }

/* === Modal === */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 12, 9, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 24px;
}
.modal[hidden] { display: none; }
.modal-card {
    background: var(--panel);
    padding: 30px 36px;
    border-radius: 4px;
    max-width: 360px;
    width: 100%;
    text-align: center;
}
.modal-title {
    font-size: 26px;
    margin-bottom: 8px;
    color: var(--accent);
}
.modal-title.frost { color: var(--accent-2); }
.modal-detail { color: var(--muted); margin: 0 0 22px; }
.modal-actions { display: flex; justify-content: center; gap: 10px; }

/* Promotion modal choices: 4 type buttons + icon preview */
.promotion-choices {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}
.promote-btn {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--grid-line);
    padding: 14px 10px;
    font-family: var(--font-display);
    font-size: 15px;
    cursor: pointer;
    border-radius: 2px;
    transition: border-color 100ms, background 100ms;
}
.promote-btn:hover {
    border-color: var(--accent);
    background: rgba(217, 111, 74, 0.1);
}

.member-list {
    list-style: none;
    margin: 0;
    padding: 0;
    color: var(--muted);
    font-size: 13px;
}
.member-list li { padding: 4px 0; }
.member-list li.connected { color: var(--ink); }
.member-list li.empty { font-style: italic; opacity: 0.7; }

/* === Seat blocks === */
.seat {
    border: 1px solid var(--grid-line);
    border-radius: 3px;
    padding: 10px 12px;
    margin-bottom: 8px;
    position: relative;
}
.seat[data-side="alpha"] { border-left: 3px solid var(--accent); }
.seat[data-side="omega"] { border-left: 3px solid var(--accent-2); }
.seat.me { background: rgba(217, 111, 74, 0.08); }
.seat[data-side="omega"].me { background: rgba(111, 177, 201, 0.08); }
.seat-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}
.seat-name {
    font-family: var(--font-display);
    font-size: 15px;
}
.seat[data-side="alpha"] .seat-name { color: var(--accent); }
.seat[data-side="omega"] .seat-name { color: var(--accent-2); }
.seat-state {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}
.seat-state.ready { color: #b08a3e; }
.seat-occupant {
    color: var(--ink);
    font-size: 13px;
    margin-bottom: 8px;
}
.seat-occupant.vacant { color: var(--muted); font-style: italic; }
.seat-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.seat-actions .btn { padding: 4px 10px; font-size: 12px; }

/* Side-left panel needs to grow a bit on smaller screens to fit the seats. */
.panel + .panel { margin-top: 0; }
