/* style.css — Vulture Culture. THIS GAME ONLY.
 *
 * THE CARD ROOM (chosen 2026-11-28 with /impeccable: the category standard, played straight,
 * at the finish of the best Deckades tables — Hasp is the bar). A dark room, one green-baize
 * table standing in it with a walnut rim and a lamp pool on the cloth, clean white card stock
 * printed in the AMIGO set colours, walnut-and-brass name plates.
 *
 * ../core/deckades.css still supplies the header MARKUP behaviour, the AI badge, the rules
 * popup and the dialog shell; every colour they paint with is re-pointed below, so nothing
 * violet survives. The start screen is this game's own (.gv-menu, start.js) — it does not use
 * the shared .start-* card at all.
 *
 * One ink, one meaning:
 *   meerkat blue  — a positive point card, and nothing else
 *   vulture orange — a negative point card, the Play button and the game's name
 *   seat colours  — a seat's own cards and the chip on its plate, nothing else
 *   brass         — the lamp-lit edges of wood and the "you may act" ring on your hand
 */

@font-face {
    font-family: 'Duality';
    src: url('assets/duality.otf') format('opentype');
    font-weight: 400;
    font-display: swap;
}

:root {
    /* ── The room, the table, the plates ─────────────────────────────────── */
    --room:       #0d0b09;
    --room-warm:  #1d1610;
    --felt-hi:    #2b7149;
    --felt:       #1d5537;
    --felt-lo:    #0f3220;
    --wood-hi:    #7b4a25;
    --wood:       #5a3519;
    --wood-lo:    #2e190a;
    --brass:      #cfa95e;
    --brass-soft: rgba(207, 169, 94, 0.38);
    --plate:      rgba(24, 17, 11, 0.9);
    --plate-line: rgba(207, 169, 94, 0.30);
    --cream:      #f3ead6;
    --cream-dim:  rgba(243, 234, 214, 0.66);
    --cream-faint: rgba(243, 234, 214, 0.42);

    /* ── Card stock and the printed inks ─────────────────────────────────── */
    --stock:      #fbf8f1;
    --stock-edge: #d9d1c0;
    --meerkat:    #2a84c6;
    --meerkat-lo: #1a5f94;
    --vulture:    #e2762c;
    --vulture-lo: #b3511a;
    --vulture-ink: #2a1206;           /* dark ink ON vulture orange (7.1:1) */
    --strike:     #e2432c;

    --card-w: 80px;                    /* game.js writes these on load and resize */
    --card-h: 116px;
    --hand-w: 80px;
    --hand-h: 116px;

    /* ── The shared sheet, re-pointed (no violet may survive) ────────────── */
    --dk-accent:      var(--vulture);
    --dk-accent-soft: rgba(226, 118, 44, 0.35);
    --dk-tint:        rgba(29, 85, 55, 0.20);
    --dk-font-display: 'Duality', Georgia, serif;
    /* The owner's instruction (2026-07-28): Duality carries EVERY text in this game. */
    --dk-font-ui:     'Duality', 'Segoe UI', sans-serif;
    --dk-wordmark:    var(--vulture);

    --dk-header-bg:   linear-gradient(180deg, rgba(13, 10, 7, 0.96), rgba(13, 10, 7, 0.78) 78%, rgba(13, 10, 7, 0));
    --dk-header-line: rgba(207, 169, 94, 0.14);
    --dk-logo:        rgba(243, 234, 214, 0.48);
    --dk-logo-hover:  var(--cream);
    --dk-spade:       rgba(226, 118, 44, 0.7);
    --dk-spade-hover: var(--vulture);
    --dk-chrome-plate:      rgba(18, 13, 8, 0.94);
    --dk-chrome-plate-line: var(--plate-line);

    --dk-tool-ring:       rgba(207, 169, 94, 0.42);
    --dk-tool-ink:        rgba(243, 234, 214, 0.82);
    --dk-tool-wash:       rgba(207, 169, 94, 0.16);
    --dk-tool-ink-hover:  #fff;
    --dk-tool-ring-hover: var(--brass);

    --dk-ai-bg:           rgba(18, 13, 8, 0.8);
    --dk-ai-ink:          var(--cream-dim);
    --dk-ai-ready-ink:    var(--cream);
    --dk-ai-ready-ring:   var(--brass-soft);
    --dk-ai-ready-dot:    var(--brass);
    --dk-ai-ready-glow:   0 0 6px rgba(207, 169, 94, 0.6);

    --dk-msg:         var(--cream);
    --dk-msg-good:    #9fe0a8;
    --dk-msg-alert:   #ffab84;

    --dk-panel:        rgba(20, 14, 9, 0.97);
    --dk-panel-line:   var(--plate-line);
    --dk-panel-text:   var(--cream);
    --dk-panel-dim:    var(--cream-dim);
    --dk-panel-accent: var(--vulture);
    --dk-dialog-bg:    radial-gradient(120% 90% at 50% 0%, var(--felt-hi), var(--felt) 45%, var(--felt-lo));
    --dk-dialog-line:  var(--brass-soft);
    --dk-dialog-radius: 14px;
    --dk-scrim:        rgba(6, 5, 4, 0.78);
    --dk-popup-line:   var(--brass-soft);
    --dk-popup-close:  var(--cream-dim);
    --dk-scroll-thumb: rgba(207, 169, 94, 0.34);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
#intro { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
::selection { background: rgba(226, 118, 44, 0.45); color: #fff; }

body {
    background:
        radial-gradient(ellipse 80% 70% at 50% 48%, var(--room-warm) 0%, var(--room) 72%);
    background-color: var(--room);
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
    color: var(--cream);
}

#game {
    position: relative;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
    color: var(--cream);
    font-family: var(--dk-font-ui);
    touch-action: none;         /* stop OS pan/scroll from stealing card taps */
}

/* ── The table: walnut rim, green baize, a lamp pool ─────────────────────────
 * game.js (renderTable) sizes it so the opponents' fans rest ON the rim and the human's
 * hand overlaps the near edge. The rim is a border, the wood is painted into it by
 * ::before, and the shadow falls BELOW because the lamp hangs above the table. */
#table {
    --rim: 14px;
    position: absolute;
    z-index: 0;
    pointer-events: none;
    border: var(--rim) solid var(--wood);
    background:
        radial-gradient(ellipse 62% 58% at 50% 44%, rgba(255, 236, 190, 0.13), rgba(255, 230, 180, 0.05) 45%, rgba(0, 0, 0, 0) 72%),
        radial-gradient(ellipse 110% 100% at 50% 40%, var(--felt-hi) 0%, var(--felt) 48%, var(--felt-lo) 100%);
    box-shadow:
        inset 0 0 0 2px rgba(207, 169, 94, 0.22),     /* brass inlay round the cloth */
        inset 0 10px 26px rgba(0, 0, 0, 0.42),        /* the cloth dips under the rim */
        0 0 0 2px var(--wood-lo),                     /* the rim's outer lip */
        0 34px 70px rgba(0, 0, 0, 0.66),
        0 12px 22px rgba(0, 0, 0, 0.5);
}
#table::before {               /* the walnut itself, painted into the border box */
    content: ''; position: absolute; inset: calc(-1 * var(--rim));
    border-radius: inherit;
    padding: var(--rim);
    background:
        linear-gradient(180deg, rgba(255, 222, 170, 0.22) 0%, rgba(255, 222, 170, 0.06) 14%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.18) 72%, rgba(0, 0, 0, 0.42) 100%),
        repeating-linear-gradient(92deg, rgba(0, 0, 0, 0) 0 8px, rgba(30, 14, 4, 0.28) 8px 11px, rgba(0, 0, 0, 0) 11px 23px),
        repeating-linear-gradient(88deg, rgba(0, 0, 0, 0) 0 13px, rgba(140, 90, 46, 0.2) 13px 17px, rgba(0, 0, 0, 0) 17px 37px),
        linear-gradient(90deg, var(--wood), var(--wood-hi) 30%, var(--wood) 55%, var(--wood-hi) 80%, var(--wood));
    -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
#table::after {                /* baize nap: a fine fibre, never a pattern */
    content: ''; position: absolute; inset: 0;
    border-radius: inherit;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0.05  0 0 0 0 0.02  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    opacity: 0.5;
}

/* The round's play area, stitched into the cloth: a betting line, not a box. */
#board {
    position: absolute;
    border-radius: 22px;
    border: 1.5px dashed rgba(243, 234, 214, 0.16);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.14);
    pointer-events: none;
    z-index: 1;
}

/* ── SHORT screens (game.js sets body.chrome-float + .gv-short at height <= 420) ──
   The shared float hides the logo with the band; here it stays, as its own pill top-left,
   because it is the way back. */
body.chrome-float #header-left {
    display: flex; align-items: center;
    position: fixed; top: 6px; left: 8px;
    height: 44px; padding: 0 14px;
    border-radius: 999px;
    background: var(--dk-chrome-plate);
    border: 1px solid var(--dk-chrome-plate-line);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}
body.chrome-float #header-left .deckades-logo { font-size: 17px; }
/* Plates ride above the fans here: on a phone a plate may meet a neighbour's fan, and the
   backs carry nothing a plate could hide. */
body.gv-short .seat { z-index: 25; }

/* ── Live ranking: a brass-edged plate at the room's top right ───────────── */

#ranking-table {
    position: fixed; top: calc(var(--dk-header-h) + 12px); right: 14px;
    width: 178px;
    z-index: 200; pointer-events: none; user-select: none;
    font-family: var(--dk-font-ui);
}
#ranking-table .rank-row {
    position: absolute; left: 0; right: 0; height: 34px;
    display: flex; align-items: center; gap: 8px; padding: 0 12px;
    background: var(--plate);
    border: 1px solid var(--plate-line);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    font-size: 13px;
    transition: top 380ms cubic-bezier(.22, 1, .36, 1);
}
.rank-place { color: var(--cream-faint); font-size: 11px; width: 14px; flex-shrink: 0;
              font-variant-numeric: tabular-nums; }
.rank-name  { flex: 1; color: var(--cream); overflow: hidden;
              text-overflow: ellipsis; white-space: nowrap; }
.rank-score { color: var(--cream); font-size: 15px; flex-shrink: 0;
              font-variant-numeric: tabular-nums; }
.rank-score.negative, .seat-score.negative, .go-score.negative { color: #ffab84; }

/* The seat chip: a tiny card in the seat's own colour. It is how a name is tied to a fan. */
.chip {
    flex-shrink: 0;
    width: 9px; height: 13px;
    border-radius: 2px;
    background: var(--seat-color);
    box-shadow: 0 0 0 1.5px var(--stock), 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* ── Player cards: white stock, the set colour printed as a panel ─────────
 * A card must not INHERIT anything that decides how it looks: flying ghosts live in <body>,
 * settled cards in #game. Colour and face are set on the card itself, and every glyph sizes
 * in cqh (a share of THIS card), so a card looks the same at fan, slot and flight size. */
.pcard, .point-card {
    color: var(--stock);
    font-family: var(--dk-font-display);
}

.pcard {
    position: absolute;
    width: var(--card-w); height: var(--card-h);
    border-radius: 9% / 6.2%;      /* NOT cqh: a box's own cqh resolves against its ancestor */
    background: var(--stock);
    box-shadow: 0 0 0 1px var(--stock-edge), 0 2px 3px rgba(0, 0, 0, 0.32), 0 6px 14px rgba(0, 0, 0, 0.32);
    user-select: none;
    overflow: hidden;
    cursor: default;
    transition: filter 0.12s, box-shadow 0.16s, opacity 0.18s;
    touch-action: none;
    container-type: size;
}
.pcard::before {               /* the printed colour panel */
    content: '';
    position: absolute; left: 7%; right: 7%; top: 14%; bottom: 14%;
    border-radius: 6% / 4%;
    background:
        radial-gradient(120% 70% at 30% 20%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 60%),
        var(--seat-color, #7b4aa8);
    pointer-events: none;
}
.pc-num {
    position: absolute; inset: 14% 7%;
    display: flex; align-items: center; justify-content: center;
    font-size: 40cqh;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 1.2cqh rgba(0, 0, 0, 0.42), 0 0.8cqh 0 rgba(0, 0, 0, 0.3);
    pointer-events: none;
}
.pc-corner {
    position: absolute;
    font-size: 10.5cqh;
    line-height: 1;
    color: var(--seat-color, #7b4aa8);
    pointer-events: none;
}
.pc-corner.tl { top: 2.2%; left: 9%; }
.pc-corner.br { bottom: 2.2%; right: 9%; transform: rotate(180deg); }

/* The back: the set colour inside a white frame, a fine lattice and the vulture's mark. */
.pcard.face-down::before {
    inset: 6% 8%;
    border-radius: 6% / 4.2%;
    background:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.13) 0 1.1cqh, rgba(0, 0, 0, 0) 1.1cqh 5cqh),
        repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.13) 0 1.1cqh, rgba(0, 0, 0, 0) 1.1cqh 5cqh),
        linear-gradient(170deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.22)),
        var(--seat-color, #7b4aa8);
}
.pc-back {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}
.pc-back svg { width: 46%; height: auto; opacity: 0.55; }

/* YOUR MOVE: the hand is the brightest thing on screen and its cards ring in brass. */
.pcard.playable { cursor: pointer; box-shadow: 0 0 0 2px var(--brass), 0 2px 3px rgba(0, 0, 0, 0.32), 0 8px 18px rgba(0, 0, 0, 0.36); }
/* Hover must NOT move the card — a translateY fires just before click and makes it jump. */
.pcard.playable:hover { filter: brightness(1.06); box-shadow: 0 0 0 3px #f3cf7f, 0 0 18px rgba(243, 207, 127, 0.55), 0 8px 18px rgba(0, 0, 0, 0.4); z-index: 200 !important; }
.pcard.playable:focus-visible { outline: 3px solid #f3cf7f; outline-offset: 2px; z-index: 200 !important; }
.pcard.not-playable { filter: saturate(0.55) brightness(0.78); }

/* ── Point cards: the same stock, a meerkat-blue or vulture-orange panel ── */

.point-card {
    position: absolute;
    width: var(--card-w); height: var(--card-h);
    border-radius: 9% / 6.2%;      /* NOT cqh: a box's own cqh resolves against its ancestor */
    background: var(--stock);
    box-shadow: 0 0 0 1px var(--stock-edge), 0 2px 3px rgba(0, 0, 0, 0.32), 0 8px 18px rgba(0, 0, 0, 0.36);
    overflow: hidden;
    user-select: none;
    container-type: size;
}
.point-card .pt-face {
    position: absolute; inset: 6% 8%;
    border-radius: 6% / 4.2%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3%;
}
.point-card.meerkat .pt-face { background: radial-gradient(120% 80% at 30% 15%, #4fa5e4, var(--meerkat) 55%, var(--meerkat-lo)); }
.point-card.vulture .pt-face { background: radial-gradient(120% 80% at 30% 15%, #f59a55, var(--vulture) 55%, var(--vulture-lo)); }
.pt-val {
    font-size: 29cqh;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0.8cqh 0 rgba(0, 0, 0, 0.26), 0 0 3cqh rgba(0, 0, 0, 0.2);
    font-variant-numeric: tabular-nums;
}
.pt-art { width: 58%; height: 40%; }
.pt-art svg { width: 100%; height: 100%; display: block; }

/* The point deck's back: umber panel, cream lattice, the same frame as the player backs. */
.point-card.face-down .pt-face {
    background:
        repeating-linear-gradient(45deg, rgba(243, 234, 214, 0.12) 0 1.1cqh, rgba(0, 0, 0, 0) 1.1cqh 5cqh),
        repeating-linear-gradient(-45deg, rgba(243, 234, 214, 0.12) 0 1.1cqh, rgba(0, 0, 0, 0) 1.1cqh 5cqh),
        linear-gradient(170deg, #4a3220, #2c1c10);
}
.point-card.face-down .pt-face svg { width: 48%; opacity: 0.4; }

/* ── Centre: the point deck and the pot ──────────────────────────────────── */

#pot-area {
    position: absolute;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    pointer-events: none;
    z-index: 12;
}
#pot-cards { position: relative; }
#deck-stack { position: absolute; pointer-events: none; z-index: 10; }
.deck-count {
    position: absolute; left: 50%; transform: translateX(-50%);
    top: calc(100% + 5px);
    font-size: 12px; letter-spacing: 0.06em;
    color: var(--cream-dim);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* ── Play slots — where each seat's committed card lands ─────────────────── */

.play-slot {
    position: absolute;
    width: var(--card-w); height: var(--card-h);
    border-radius: 7px;
    border: 1.5px dashed rgba(243, 234, 214, 0.14);
    pointer-events: none;
    z-index: 20;
}
.play-slot.filled { border-color: transparent; }

/* A value two seats shared is struck out entirely — drawn, not just computed. */
.slot-strike {
    position: absolute; inset: 0;
    border-radius: 7px;
    background: rgba(12, 8, 5, 0.38);
    pointer-events: none;
    z-index: 3;
}
.slot-strike::before, .slot-strike::after {
    content: '';
    position: absolute; left: 6%; right: 6%; top: 50%;
    height: 3px; border-radius: 2px;
    background: var(--strike);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.slot-strike::before { transform: rotate(24deg); }
.slot-strike::after  { transform: rotate(-24deg); }
.slot-strike-label {
    position: absolute; left: 2%; right: 2%; bottom: 5%;
    text-align: center; white-space: nowrap;
    font-size: 9px;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: #ffc7b8;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

/* The winner: a steady brass ring with one flare on top. */
.slot-winner {
    box-shadow: 0 0 0 3px #f3cf7f, 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 24px rgba(243, 207, 127, 0.5);
    animation: slot-win 620ms cubic-bezier(.22, 1, .36, 1) 2;
}
@keyframes slot-win {
    0%, 100% { box-shadow: 0 0 0 3px #f3cf7f, 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 24px rgba(243, 207, 127, 0.5); }
    45%      { box-shadow: 0 0 0 6px #ffe2a3, 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 38px rgba(243, 207, 127, 0.8); }
}

/* ── Used piles — one per seat, only the top card readable ───────────────── */

.pile { position: absolute; pointer-events: none; z-index: 16; }
.pile-under {
    position: absolute; inset: 0;
    border-radius: 5px;
    background: var(--stock);
    box-shadow: 0 0 0 1px var(--stock-edge), 0 1px 3px rgba(0, 0, 0, 0.4);
    filter: brightness(0.82);
}

/* ── Name plates: walnut and brass, a seat chip, name, score ─────────────── */

.seat {
    position: absolute;
    display: flex; align-items: center;
    padding: 5px 11px 5px 9px;
    min-height: 30px;
    background: var(--plate);
    border: 1px solid var(--plate-line);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    z-index: 18;
    transition: border-color 0.2s, background 0.2s;
}
.seat.committed { border-color: rgba(207, 169, 94, 0.62); }
.seat-head { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.seat-name { font-size: 14px; color: var(--cream); }
.seat-score {
    font-size: 16px; line-height: 1;
    color: var(--cream);
    font-variant-numeric: tabular-nums;
    padding-left: 8px;
    border-left: 1px solid var(--plate-line);
}

/* ── Status line: a plate on the floor, under your hand ──────────────────── */

#status-line {
    position: fixed;
    transform: translateX(-50%);
    max-width: 92vw;
    text-align: center;
    pointer-events: none;
    z-index: 120;
}
#status-msg {
    display: inline-block;
    font-family: var(--dk-font-display);
    font-size: 16px; letter-spacing: 0.02em; line-height: 22px;
    padding: 0 12px;
    border-radius: 11px;
    background: var(--plate);
    box-shadow: 0 0 0 1px var(--plate-line), 0 4px 12px rgba(0, 0, 0, 0.4);
    color: var(--cream);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 92vw;
    opacity: 0; transition: opacity 0.25s, color 0.2s;
}
#status-msg.show       { opacity: 1; }
#status-msg.msg-good   { color: var(--dk-msg-good); }
#status-msg.msg-alert  { color: var(--dk-msg-alert); }

@media (max-height: 560px) {
    #status-msg { font-size: 14px; line-height: 20px; }
}

/* ── Round badge and banners ─────────────────────────────────────────────── */

#round-badge {
    position: absolute; left: 50%; transform: translateX(-50%);
    top: calc(var(--dk-header-h) + 4px);
    font-family: var(--dk-font-display);
    font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--cream-dim);
    pointer-events: none; z-index: 30; white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.flash-banner {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--dk-font-display);
    font-size: clamp(22px, 4.4vw, 44px);
    letter-spacing: 0.06em;
    padding: 0.18em 0.7em 0.22em;
    border-radius: 14px;
    background: var(--plate);
    box-shadow: 0 0 0 1.5px currentColor, 0 14px 40px rgba(0, 0, 0, 0.6);
    text-align: center; white-space: nowrap;
    pointer-events: none; z-index: 1400;
    animation: banner-pop 1500ms cubic-bezier(.22, 1, .36, 1) forwards;
}
.flash-banner.meerkat { color: #8ccaf5; }
.flash-banner.vulture { color: #ffa869; }
.flash-banner.neutral { color: var(--cream); }
@keyframes banner-pop {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.86); }
    16%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    76%  { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

/* ── Game over: the dialog is a piece of the same baize ──────────────────── */

#game-over-modal .panel {
    border: 6px solid var(--wood);
    box-shadow: 0 0 0 1px var(--wood-lo), inset 0 0 0 1.5px rgba(207, 169, 94, 0.3), 0 24px 60px rgba(0, 0, 0, 0.7);
}
#game-over-modal h2 { font-size: 30px; letter-spacing: 0.02em; color: var(--cream); font-weight: 400; }
#game-over-modal .primary-btn {
    background: var(--vulture); border-color: var(--vulture-lo);
    color: var(--vulture-ink);
    font-size: 19px; font-weight: 400; border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 220, 180, 0.6), 0 4px 0 var(--vulture-lo), 0 8px 18px rgba(0, 0, 0, 0.4);
}
#game-over-modal .primary-btn:focus-visible { outline-color: var(--cream); }

.go-row {
    display: flex; align-items: center; gap: 9px; padding: 8px 12px;
    border-radius: 8px; font-size: 15px;
    background: rgba(13, 10, 7, 0.42);
    border: 1px solid transparent;
    margin-bottom: 5px;
}
.go-row.winner { background: rgba(13, 10, 7, 0.62); border-color: var(--brass); }
.go-row.tied-out { opacity: 0.6; }
.go-place { color: var(--cream-faint); font-size: 12px; width: 20px; flex-shrink: 0; text-align: left;
            font-variant-numeric: tabular-nums; }
.go-name  { flex: 1; color: var(--cream); text-align: left; white-space: nowrap;
            overflow: hidden; text-overflow: ellipsis; }
.go-note  { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
            color: #ffc7b8; flex-shrink: 0; }
.go-score { font-size: 19px; color: var(--cream); min-width: 38px;
            text-align: right; font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* ── AI panel body (the shell itself is shared) ──────────────────────────── */

.ai-src { font-size: 10px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--brass); }
.ai-src.net { color: var(--dk-msg-good); }
.ai-note {
    margin-top: 10px; padding-top: 8px;
    border-top: 1px solid var(--dk-panel-line);
    font-size: 10.5px; line-height: 1.5; color: var(--dk-panel-dim);
}

/* ════════════════════════════════════════════════════════════════════════════
 * THE MENU — a corner of the same table, seen close. Baize, walnut rim, the five
 * printed sets fanned at the top like the box's component photo, the name under the
 * lamp, and only what changes the game: how many sit down, and how a tie is broken.
 * ════════════════════════════════════════════════════════════════════════════ */

#start-screen {
    background: radial-gradient(ellipse 80% 75% at 50% 45%, rgba(29, 22, 16, 0.9), rgba(8, 6, 4, 0.96));
    backdrop-filter: none;
    padding: 12px;
    align-items: center;
}

.gv-menu {
    --rim: 12px;
    position: relative;
    width: 760px;
    max-width: none;
    padding: 30px 40px 26px;
    border: var(--rim) solid var(--wood);
    border-radius: 26px;
    background:
        radial-gradient(ellipse 70% 55% at 50% 22%, rgba(255, 236, 190, 0.15), rgba(0, 0, 0, 0) 70%),
        radial-gradient(ellipse 110% 100% at 50% 30%, var(--felt-hi) 0%, var(--felt) 50%, var(--felt-lo) 100%);
    box-shadow:
        inset 0 0 0 2px rgba(207, 169, 94, 0.24),
        inset 0 10px 26px rgba(0, 0, 0, 0.42),
        0 0 0 2px var(--wood-lo),
        0 34px 80px rgba(0, 0, 0, 0.75);
    color: var(--cream);
    font-family: var(--dk-font-ui);
    transform-origin: center;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "hero form";
    column-gap: 34px;
    align-items: center;
}
.gv-menu::before {             /* the walnut rim, same recipe as the table */
    content: ''; position: absolute; inset: calc(-1 * var(--rim));
    border-radius: inherit;
    padding: var(--rim);
    background:
        linear-gradient(180deg, rgba(255, 222, 170, 0.24) 0%, rgba(255, 222, 170, 0.06) 14%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.2) 72%, rgba(0, 0, 0, 0.44) 100%),
        repeating-linear-gradient(92deg, rgba(0, 0, 0, 0) 0 8px, rgba(30, 14, 4, 0.28) 8px 11px, rgba(0, 0, 0, 0) 11px 23px),
        linear-gradient(90deg, var(--wood), var(--wood-hi) 30%, var(--wood) 55%, var(--wood-hi) 80%, var(--wood));
    -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    pointer-events: none;
}

.gv-hero { grid-area: hero; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.gv-form { grid-area: form; display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* The five sets, fanned like the box's component photo. Built with the game's own card
   factory, so the menu shows exactly the cards you will hold. */
.gv-fan {
    position: relative;
    width: 250px; height: 118px;
    margin: 0 auto 10px;
}
.gv-fan .pcard {
    --card-w: 64px; --card-h: 92px;
    left: 50%; top: 8px;
    transform-origin: 50% 160%;
    box-shadow: 0 0 0 1px var(--stock-edge), 0 6px 14px rgba(0, 0, 0, 0.45);
}

.gv-title {
    font-family: var(--dk-font-display);
    font-size: 46px; line-height: 0.95; letter-spacing: 0.01em;
    color: var(--cream);
    text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.35);
    text-wrap: balance;
}
.gv-title em { font-style: normal; color: var(--vulture); }
.gv-sub {
    margin-top: 12px;
    max-width: 30ch;
    font-size: 15px; line-height: 1.4;
    color: rgba(243, 234, 214, 0.86);
    text-wrap: pretty;
}
.gv-credits {
    margin-top: 14px;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 14px;
    font-size: 12.5px; letter-spacing: 0.02em;
    color: var(--cream-dim);
}
.gv-credits b { font-weight: 400; color: var(--cream); }

/* Fields: a label and a row of plates you tap. */
.gv-field { display: flex; flex-direction: column; gap: 7px; }
.gv-label {
    font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--cream-dim);
}
.gv-seg {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px;
}
.gv-opt {
    position: relative;
    min-height: 46px;
    padding: 6px 10px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
    border-radius: 9px;
    border: 1px solid rgba(207, 169, 94, 0.26);
    background: rgba(10, 26, 17, 0.55);
    color: var(--cream);
    font-family: var(--dk-font-ui);
    font-size: 17px; line-height: 1.1;
    cursor: pointer;
    touch-action: manipulation;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.gv-opt small { font-size: 12px; color: var(--cream-dim); }
.gv-opt:hover { border-color: rgba(207, 169, 94, 0.6); background: rgba(10, 26, 17, 0.72); }
.gv-opt[aria-pressed="true"] {
    background: var(--plate);
    border-color: var(--brass);
    box-shadow: inset 0 0 0 1px var(--brass), 0 4px 10px rgba(0, 0, 0, 0.35);
}
.gv-opt[aria-pressed="true"] small { color: var(--cream); }
.gv-opt:focus-visible { outline: 2px solid #f3cf7f; outline-offset: 2px; }
.gv-seats { display: flex; gap: 3px; margin-top: 3px; }
.gv-seats i {
    width: 7px; height: 10px; border-radius: 1.5px;
    background: var(--seat-color);
    box-shadow: 0 0 0 1px rgba(251, 248, 241, 0.85);
}

.gv-play {
    margin-top: 4px;
    min-height: 56px;
    border: 1px solid var(--vulture-lo);
    border-radius: 12px;
    background: linear-gradient(180deg, #f08a40, var(--vulture));
    color: var(--vulture-ink);
    font-family: var(--dk-font-display);
    font-size: 24px; letter-spacing: 0.04em;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: inset 0 1px 0 rgba(255, 224, 190, 0.7), 0 4px 0 var(--vulture-lo), 0 10px 22px rgba(0, 0, 0, 0.45);
    transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
}
.gv-play:hover { filter: brightness(1.06); }
.gv-play:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 224, 190, 0.7), 0 1px 0 var(--vulture-lo), 0 5px 12px rgba(0, 0, 0, 0.4); }
.gv-play:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }

.gv-foot { display: flex; justify-content: center; }
.gv-rules {
    min-height: 44px; padding: 0 12px;
    display: inline-flex; align-items: center;
    color: var(--cream-dim);
    font-size: 14px; letter-spacing: 0.04em;
    text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--brass-soft);
}
.gv-rules:hover { color: var(--cream); text-decoration-color: var(--brass); }
.gv-rules:focus-visible { outline: 2px solid #f3cf7f; outline-offset: 2px; border-radius: 6px; }

/* Language: a brass-ringed flag in the rim's corner. */
.gv-lang { position: absolute; top: 8px; left: 8px; z-index: 2; }
.gv-lang-btn, .gv-lang-opt {
    width: 44px; height: 44px; padding: 9px 6px;
    border: 0; border-radius: 9px; background: transparent; cursor: pointer;
    display: grid; place-items: center;
}
.gv-lang-btn svg, .gv-lang-opt svg { width: 32px; height: auto; display: block; border-radius: 3px; box-shadow: 0 0 0 1px rgba(207, 169, 94, 0.5), 0 2px 5px rgba(0, 0, 0, 0.4); }
.gv-lang-btn:hover, .gv-lang-opt:hover { background: rgba(10, 26, 17, 0.6); }
.gv-lang-btn:focus-visible, .gv-lang-opt:focus-visible { outline: 2px solid #f3cf7f; outline-offset: 0; }
.gv-lang-picker {
    position: absolute; top: 48px; left: 0;
    display: flex; flex-direction: column; gap: 2px; padding: 4px;
    background: var(--plate); border: 1px solid var(--plate-line); border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}
.gv-lang-opt.on { background: rgba(207, 169, 94, 0.2); }

/* Narrow (portrait phones, small tablets): one column, hero on top. */
@media (max-width: 560px), (orientation: portrait) and (max-width: 700px) {
    .gv-menu {
        width: min(440px, calc(100vw - 24px));
        grid-template-columns: 1fr;
        grid-template-areas: "hero" "form";
        row-gap: 18px;
        padding: 26px 26px 20px;
    }
}
/* Short landscape (the phone floor is 640×300): the fan gives its height to the form. */
@media (max-height: 470px) and (min-width: 600px) {
    #start-screen { padding: 6px; }
    .gv-menu { width: min(760px, calc(100vw - 12px)); padding: 16px 26px 12px; column-gap: 24px; }
    .gv-fan { width: 200px; height: 78px; margin-bottom: 4px; }
    .gv-fan .pcard { --card-w: 44px; --card-h: 63px; top: 4px; }
    .gv-title { font-size: 34px; }
    .gv-sub { margin-top: 6px; font-size: 13px; }
    .gv-credits { margin-top: 6px; font-size: 11.5px; }
    .gv-form { gap: 8px; }
    .gv-opt { min-height: 44px; font-size: 16px; padding: 4px 8px; }
    .gv-play { min-height: 48px; font-size: 21px; }
    .gv-foot { margin-top: -4px; }
}
@media (max-height: 340px) and (min-width: 600px) {
    .gv-fan { display: none; }
    .gv-sub { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .slot-winner { animation: none; }
    .flash-banner { animation-duration: 900ms; }
    #ranking-table .rank-row, .pcard, .gv-play, .gv-opt { transition: none; }
}
