/* Best of Neapolitan — the look.
 *
 * WHERE IT COMES FROM. The rulebook (rules_EN.pdf): its cover's diagonal Neapolitan stripes
 * (strawberry pink, vanilla cream, cocoa brown), the waffle-cone pages, the chocolate drip over
 * the waffle, the cards' fields (vanilla butter, strawberry candy, chocolate olive-cocoa), and
 * the comic ink outline every illustration carries — #3b2418, used here for every border.
 * Fonts: Pacifico stands in for the rulebook's script wordmark; Fredoka for its rounded
 * headings and labels; Jua (rounded, playful) carries the Korean, which neither of them has —
 * all three Google Fonts, loaded without blocking.
 * The table is a waffle cone; the cards are the brightest thing on it.
 */

:root {
    --ink: #3b2418;
    --ink-soft: #7a5a48;
    --cocoa: #6e4027;
    --cocoa-deep: #4a2a19;
    --cream: #fff8ec;
    --vanilla: #f5dc95;
    --pink: #f19ac0;
    --berry: #c23a6a;
    --berry-deep: #9c2752;
    --waffle: #e3a65c;
    --waffle-line: #c98a45;
    --waffle-deep: #a8692e;
    --good: #2f7d4f;
    --font-ui: 'Fredoka', 'Jua', 'Nunito', 'Trebuchet MS', sans-serif;
    --font-script: 'Pacifico', 'Jua', 'Fredoka', cursive;
    --cw: 80px;
    color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
    font-family: var(--font-ui); color: var(--ink); background: var(--waffle);
    -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
::selection { background: var(--pink); color: var(--ink); }
button { font-family: inherit; touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--berry); outline-offset: 2px; }

/* ── the table: a waffle cone under a warm parlour light ─────────────────────────────────── */
#game { position: fixed; inset: 0; touch-action: none; overflow: hidden; }
#table {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 50% 45%, rgba(255, 236, 200, 0.55), rgba(255, 236, 200, 0) 60%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(74, 42, 25, 0.42) 100%),
        repeating-linear-gradient(45deg, transparent 0 34px, var(--waffle-line) 34px 39px),
        repeating-linear-gradient(-45deg, transparent 0 34px, var(--waffle-line) 34px 39px),
        linear-gradient(180deg, #eab36c, var(--waffle) 60%, #d99a50);
}
body:not(.in-game) #table { filter: saturate(0.85) brightness(0.92); }
#layer { position: absolute; inset: 0; }

/* ── cards ────────────────────────────────────────────────────────────────────────────── */
.card {
    position: absolute; border-radius: 9%/6.5%;
    filter: drop-shadow(0 2px 2px rgba(59, 36, 24, 0.35)) drop-shadow(0 8px 10px rgba(59, 36, 24, 0.18));
    transform-origin: 50% 50%;
}
.card svg { width: 100%; height: 100%; display: block; }
.cf-num { font: 700 29px/1 var(--font-ui); }
.card.played { z-index: 4; }
.card.hand { transition: filter 140ms ease, top 160ms ease; }
.card.hand.playable { cursor: pointer; }
.card.hand.playable::after {
    content: ''; position: absolute; inset: -3px; border-radius: 10%/7%;
    box-shadow: 0 0 0 3px var(--berry), 0 6px 14px rgba(194, 58, 106, 0.35); pointer-events: none;
}
@media (hover: hover) { .card.hand.playable:hover { filter: brightness(1.07) drop-shadow(0 10px 14px rgba(59, 36, 24, 0.35)); } }
.card.hand.blocked { filter: saturate(0.45) brightness(0.78) drop-shadow(0 2px 2px rgba(59, 36, 24, 0.3)); }
.card.played.lit::after {
    content: ''; position: absolute; inset: -5px; border-radius: 11%/8%; pointer-events: none;
    box-shadow: 0 0 0 4px var(--cream), 0 0 0 7px var(--berry), 0 10px 20px rgba(194, 58, 106, 0.45);
}
.card.played.lost { filter: saturate(0.6) brightness(0.85) drop-shadow(0 2px 2px rgba(59, 36, 24, 0.3)); }

/* the cards nobody was dealt */
.leftover { position: absolute; pointer-events: none; text-align: right; }
.leftover-label { font: 600 11px/1 var(--font-ui); letter-spacing: 0.04em; color: var(--cocoa-deep); background: rgba(255, 248, 236, 0.75); padding: 3px 7px; border-radius: 999px; display: inline-block; white-space: nowrap; }

/* ── the flavor stack: three scoops in a waffle cone, strongest on top ──────────────────── */
#stack { position: absolute; z-index: 2; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.stack-discs { position: relative; }
.disc { position: absolute; left: 0; transition: top 620ms cubic-bezier(.5, -0.35, .35, 1.35); filter: drop-shadow(0 2px 1.5px rgba(59, 36, 24, 0.3)); }
.cone { position: absolute; z-index: 0; filter: drop-shadow(0 3px 2px rgba(59, 36, 24, 0.3)); }
.cone-svg { width: 100%; height: 100%; display: block; }
.disc-svg { width: 100%; height: 100%; display: block; }

/* ── the ranking: the race to the ice cream truck ──────────────────────────────────────────
 * Names on the left, a bar of each player's own flavor filling a waffle track toward the truck
 * parked on the right (the points goal). The bar ends in a round scoop carrying the score. Rows
 * slide to their places and bars grow when a round is scored. */
.rank {
    position: absolute; z-index: 2; display: flex; align-items: center; gap: 2px; pointer-events: none;
    padding: 7px 6px 7px 10px; background: rgba(255, 248, 236, 0.9); border: 2px solid var(--ink); border-radius: 16px;
    box-shadow: 0 3px 0 rgba(59, 36, 24, 0.85);
    --row-h: 23px; --name-w: 66px; --track-w: 118px; --head: 19px;
}
.rank-rows { position: relative; width: calc(var(--name-w) + var(--track-w) + 12px); }
.rank-row {
    position: absolute; left: 0; right: 0; height: var(--row-h); display: flex; align-items: center; gap: 4px;
    transition: top 700ms cubic-bezier(.45, -0.3, .3, 1.3);
}
.rank-name { width: var(--name-w); flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 13px/1.1 var(--font-ui); color: var(--ink); }
.rank-row.me .rank-name { color: var(--berry-deep); font-weight: 700; }
.rank-laps { font-style: normal; font-size: 10px; color: var(--berry); margin-left: 2px; }
.rank-track {
    position: relative; width: var(--track-w); height: calc(var(--row-h) - 9px); flex: none; border-radius: 999px;
    border: 1.6px solid var(--ink);
    background: repeating-linear-gradient(45deg, transparent 0 5px, rgba(168, 105, 46, 0.35) 5px 6.5px),
        repeating-linear-gradient(-45deg, transparent 0 5px, rgba(168, 105, 46, 0.35) 5px 6.5px), #f3c98b;
}
.rank-ticks i { position: absolute; top: 2px; bottom: 2px; width: 0; border-left: 1.5px dotted rgba(59, 36, 24, 0.45); }
.rank-bar {
    position: absolute; left: -1.6px; top: -1.6px; bottom: -1.6px; min-width: 0; border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.45), transparent 45%), var(--flavor);
    border: 1.6px solid var(--ink); border-right: 0;
    transition: width 900ms cubic-bezier(.3, 1.4, .5, 1);
}
.rank-head {
    position: absolute; right: calc(var(--head) / -2); top: 50%; width: var(--head); height: var(--head); transform: translateY(-50%);
    display: grid; place-items: center; border-radius: 50% 50% 46% 46%; border: 1.6px solid var(--ink);
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.7), transparent 40%), var(--flavor);
    font: 700 11px/1 var(--font-ui); color: var(--ink); font-variant-numeric: tabular-nums;
}
.rank-head.neg { color: var(--berry-deep); }
.rank-row.lead .rank-head::after {        /* the leader's scoop wears the cherry */
    content: ''; position: absolute; top: -7px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%;
    background: #d6283f; border: 1.4px solid var(--ink);
}
.rank-truck { position: relative; width: 58px; flex: none; align-self: center; margin-left: 2px; }
/* the target, written on the truck's signboard: real text, so it stays legible at any truck size */
.truck-goal {
    position: absolute; left: 34%; top: 48%; transform: translate(-50%, -50%); padding: 1px 4px;
    font: 700 12px/1 var(--font-ui); color: var(--berry-deep); white-space: nowrap; font-variant-numeric: tabular-nums;
    background: var(--vanilla); border: 1.4px solid var(--ink); border-radius: 4px;
}
.rank-truck-svg { width: 100%; display: block; overflow: visible; }
.rank.compact { padding: 4px 4px 4px 6px; border-width: 1.5px; border-radius: 11px; --row-h: 17px; --name-w: 44px; --track-w: 66px; --head: 14px; }
.rank.compact .rank-name { font-size: 10px; }
.rank.compact .rank-head { font-size: 8.5px; border-width: 1.2px; }
.rank.compact .rank-track { border-width: 1.2px; }
.rank.compact .rank-truck { width: 42px; }
.rank.compact .truck-goal { font-size: 11.5px; padding: 1px 3px; border-width: 1.2px; }
.rank.compact .rank-row.lead .rank-head::after { top: -5px; width: 6px; height: 6px; margin-left: -3px; }
.rank.tight { --row-h: 13px; --head: 12px; --name-w: 38px; --track-w: 54px; padding: 3px 4px 3px 6px; }
.rank.tight .rank-name { font-size: 9px; }
.rank.tight .rank-head { font-size: 7.5px; }
.rank.tight .rank-truck { width: 38px; }
.rank.tight .truck-goal { font-size: 10.5px; }
@media (prefers-reduced-motion: reduce) { .rank-row, .rank-bar { transition: none; } }
.stack-info { position: absolute; top: 100%; margin-top: 6px; font: 600 12px/1 var(--font-ui); color: var(--cream); background: var(--cocoa); padding: 5px 10px; border-radius: 999px; white-space: nowrap; box-shadow: 0 2px 0 var(--cocoa-deep); }
@media (prefers-reduced-motion: reduce) { .disc { transition: top 120ms linear; } }


/* ── seat tags: a little ice cream parlour table per player ───────────────────────────────
 * A round marble top with a strawberry edge (the table's thickness, drawn as two stacked
 * shadows under the top), on a bistro pedestal: column and foot. The whole table is the
 * measured box, so every placement rule in game.js keeps the leg clear of the cards. */
.tag {
    position: absolute; z-index: 3; display: flex; flex-direction: column; align-items: center;
    min-width: 104px; max-width: 182px; pointer-events: none;
    --edge: var(--pink); --top: var(--cream);
}
.tag-top {
    position: relative; align-self: stretch; padding: 6px 16px 6px; border: 2px solid var(--ink); border-radius: 999px;
    background:
        radial-gradient(ellipse 60% 70% at 28% 22%, rgba(255, 255, 255, 0.85), transparent 70%),
        linear-gradient(118deg, transparent 0 34%, rgba(176, 140, 128, 0.22) 36%, transparent 39% 61%, rgba(176, 140, 128, 0.16) 63%, transparent 66%),
        linear-gradient(64deg, transparent 0 70%, rgba(176, 140, 128, 0.14) 72%, transparent 75%),
        var(--top);
    box-shadow: 0 4px 0 0 var(--edge), 0 4px 0 2px var(--ink);
    transition: box-shadow 200ms ease, background-color 200ms ease;
}
.tag-stand { position: relative; width: 40px; height: 17px; flex: none; }
.tag-stand::before {               /* the column, a little chrome */
    content: ''; position: absolute; left: 50%; top: 4px; width: 7px; height: 10px; transform: translateX(-50%);
    background: linear-gradient(90deg, #8f7767, #e9ddd0 45%, #a48b79); border: 1.5px solid var(--ink); border-top: 0;
}
.tag-stand::after {                /* the foot */
    content: ''; position: absolute; left: 50%; bottom: 0; width: 34px; height: 6px; transform: translateX(-50%);
    background: var(--cocoa); border: 1.5px solid var(--ink); border-radius: 50%;
}
.tag.active .tag-top { --top: #fff1c9; box-shadow: 0 4px 0 0 var(--edge), 0 4px 0 2px var(--ink), 0 0 0 5px rgba(241, 154, 192, 0.95); }
.tag.won .tag-top { --top: #ffe0ec; }
.tag-top { text-align: center; padding: 6px 18px 7px; }
.tag-name { display: flex; justify-content: center; align-items: center; gap: 4px; font: 700 15px/1.15 var(--font-ui); white-space: nowrap; overflow: hidden; }
.tag-name span { overflow: hidden; text-overflow: ellipsis; }
.laps { font-size: 11px; color: var(--berry); letter-spacing: -1px; }
.tag-cherry { width: 14px; height: 15px; flex: none; }
.tag-decl { display: block; margin-top: 2px; font: 600 11px/1 var(--font-ui); color: var(--berry-deep); }
/* the glasses stand ON the marble, the parlour things at the two ends: the row overlaps the top's
   rim and sits above it */
.tag-cups {
    position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end;
    align-self: stretch; height: 30px; margin: 0 12px -7px; gap: 4px;
}
.cups { display: flex; align-items: flex-end; gap: 0; }
.cup { width: 23px; height: 29px; flex: none; margin: 0 -1px; }
.decor { width: 19px; height: 27px; flex: none; filter: drop-shadow(0 1.5px 0 rgba(59, 36, 24, 0.2)); }
.cup.won { filter: drop-shadow(0 1.5px 0 rgba(59, 36, 24, 0.25)); }
.cup.fresh { animation: cup-in 420ms cubic-bezier(.3, 1.6, .5, 1) both; }
.cup.over { --cup: #c9b8ac; --cup-shade: #a8968a; filter: saturate(0.4) drop-shadow(0 1.5px 0 rgba(59, 36, 24, 0.2)); }
@keyframes cup-in { from { transform: translateY(-8px) scale(0.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cup.fresh { animation: none; } }

/* ── status line: a ribbon above the player's hand ───────────────────────────────────── */
#status-line {
    position: fixed; z-index: 60; transform: translateX(-50%); pointer-events: none; opacity: 0;
    display: flex; align-items: center; transition: opacity 200ms ease;
}
#status-line.show { opacity: 1; }
#status-msg {
    font: 600 14px/1 var(--font-ui); color: var(--cream); background: var(--cocoa); padding: 6px 14px;
    border-radius: 999px; white-space: nowrap; box-shadow: 0 2px 0 var(--cocoa-deep);
}
#status-msg.msg-good { background: var(--berry); box-shadow: 0 2px 0 var(--berry-deep); }
#status-msg.msg-alert { background: #8a2b2b; }

/* ── header: a chocolate band dripping over the parlour ──────────────────────────────── */
#bon-header {
    position: fixed; top: 0; left: 0; right: 0; height: 58px; z-index: 100;
    display: flex; align-items: center; justify-content: space-between; padding: 0 8px 6px;
    color: var(--cream); pointer-events: none;
    background:
        radial-gradient(circle at 6% 86%, var(--cocoa) 9px, transparent 10px),
        radial-gradient(circle at 23% 86%, var(--cocoa) 6px, transparent 7px),
        radial-gradient(circle at 47% 86%, var(--cocoa) 11px, transparent 12px),
        radial-gradient(circle at 71% 86%, var(--cocoa) 7px, transparent 8px),
        radial-gradient(circle at 92% 86%, var(--cocoa) 10px, transparent 11px),
        linear-gradient(180deg, var(--cocoa-deep), var(--cocoa) 80%, var(--cocoa) 86%, transparent 86%);
    filter: drop-shadow(0 3px 2px rgba(59, 36, 24, 0.35));
}
body:not(.in-game) #bon-header { display: none; }
.hd-left, .hd-right { display: flex; align-items: center; gap: 2px; pointer-events: auto; min-width: 0; }
.hd-name { display: flex; align-items: center; height: 44px; padding: 0 8px; flex: none; }
.hd-name-text { font: 400 22px/1 var(--font-script); color: var(--cream); white-space: nowrap; text-shadow: 0 2px 0 var(--cocoa-deep); }
.hd-name-text i { font-style: normal; font-size: 0.7em; color: var(--pink); }
.hd-btn { width: 44px; height: 44px; border: 0; padding: 0; border-radius: 50%; background: transparent; color: var(--cream); cursor: pointer; display: grid; place-items: center; flex: none; }
.hd-btn svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.hd-btn:hover { color: var(--vanilla); background: rgba(255, 248, 236, 0.1); }
.hd-btn.active { color: var(--ink); background: var(--pink); }
.hd-btn.off { color: rgba(255, 248, 236, 0.55); }
.flag { display: block; width: 24px; height: 16px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1.5px var(--cream); pointer-events: none; }
.flag svg { width: 100%; height: 100%; display: block; }
.hd-btn .flag svg, .more-ico .flag svg, .st-lang .flag svg { stroke: none; }
#more-btn { display: none; }
#ai-indicator {
    position: relative; height: 44px; margin: 0 2px; padding: 0 2px; cursor: pointer;
    display: inline-flex; align-items: center; white-space: nowrap; font: 600 12px/1 var(--font-ui); color: var(--ink);
}
.ai-pill { height: 28px; padding: 0 12px 0 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; background: var(--vanilla); box-shadow: 0 2px 0 var(--cocoa-deep); }
.ai-lamp { width: 10px; height: 10px; border-radius: 50%; border: 1.6px solid var(--ink); flex: none; }
#ai-indicator.ai-onnx .ai-lamp, #ai-indicator.ai-ready .ai-lamp { background: var(--good); }
#ai-indicator.ai-heuristic .ai-lamp { background: linear-gradient(90deg, var(--berry) 50%, transparent 50%); }
#ai-indicator.ai-pending .ai-lamp { animation: lamp 1.2s ease-in-out infinite; }
@keyframes lamp { 50% { opacity: 0.3; } }
#ai-indicator-detail {
    display: none; position: absolute; top: 42px; right: 0; width: 280px; padding: 12px 14px; z-index: 5;
    color: var(--ink); background: var(--cream); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink);
    white-space: normal; cursor: default;
}
#ai-indicator.tip-open #ai-indicator-detail { display: block; }
@media (hover: hover) { #ai-indicator:hover #ai-indicator-detail { display: block; } }
.ai-detail-head { font: 600 14px/1 var(--font-ui); margin-bottom: 8px; }
.ai-detail-row { display: flex; justify-content: space-between; gap: 10px; font: 400 13px/1.45 var(--font-ui); }
.ai-detail-key { color: var(--ink-soft); }
.ai-detail-val { text-align: right; font-weight: 500; }
.ai-detail-time { margin-top: 8px; font: 400 12px/1.4 var(--font-ui); color: var(--ink-soft); }

/* compact (phones): no band — two chocolate corner clusters; tools move into "more" */
@media (max-height: 479px), (max-width: 599px) {
    #bon-header { background: none; height: 46px; padding: 0 2px; filter: none; }
    .hd-tool { display: none; }
    #more-btn { display: grid; }
    .hd-name { padding: 0 4px 0 0; }
    .hd-name-text { font-size: 15px; }
    /* phones: no AI badge (user, 2026-11-03) -- the table needs the corner */
    #ai-indicator { display: none; }
    .hd-left, .hd-right { background: var(--cocoa); border-radius: 0 0 16px 16px; box-shadow: 0 3px 0 var(--cocoa-deep); }
    .hd-left { padding-right: 8px; }
}

/* ── panels and the "more" sheet: a cream menu card ───────────────────────────────── */
.side-panel, .bon-sheet {
    position: fixed; z-index: 1200; right: 10px; top: 62px; width: min(360px, calc(100vw - 20px));
    max-height: calc(100vh - 74px); overflow-y: auto; -webkit-overflow-scrolling: touch;
    color: var(--ink); background: var(--cream); padding: 14px 16px 12px;
    border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 var(--ink), 0 18px 30px -10px rgba(59, 36, 24, 0.6);
    scrollbar-color: var(--pink) transparent; user-select: text;
}
.side-panel h3 { margin: 0 44px 10px 0; font: 600 17px/1.2 var(--font-ui); }
.panel-close { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.panel-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.panel-close:hover { background: rgba(194, 58, 106, 0.12); }
.muted { color: var(--ink-soft); }
.log-list { list-style: none; margin: 0; padding: 0; font-size: 13px; line-height: 1.7; }
.log-round { margin-top: 6px; font-weight: 600; color: var(--berry-deep); border-top: 1.5px dashed rgba(59, 36, 24, 0.3); padding-top: 4px; }
.log-score { color: var(--ink-soft); }
.aip-dec { padding: 6px 0 8px; border-bottom: 1.5px dashed rgba(59, 36, 24, 0.25); }
.aip-head { font-size: 13px; margin-bottom: 4px; }
.aip-row { display: grid; grid-template-columns: 1fr 80px 40px; gap: 8px; align-items: center; font-size: 12px; line-height: 1.85; font-variant-numeric: tabular-nums; }
.aip-row.chosen { font-weight: 600; }
.aip-bar { height: 7px; border-radius: 4px; background: rgba(59, 36, 24, 0.12); overflow: hidden; }
.aip-bar i { display: block; height: 100%; background: var(--cocoa); }
.aip-row.chosen .aip-bar i { background: var(--berry); }
.aip-v { text-align: right; color: var(--ink-soft); }
.aip-foot { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-soft); }
.bon-sheet { width: 230px; padding: 8px; display: flex; flex-direction: column; gap: 2px; top: 50px; }
.more-item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 10px; border: 0; background: transparent; color: var(--ink); border-radius: 10px; cursor: pointer; font: 500 14px/1 var(--font-ui); text-align: left; }
.more-item:hover { background: rgba(194, 58, 106, 0.1); }
.more-ico { width: 24px; height: 24px; display: grid; place-items: center; flex: none; }
.more-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.more-ico .flag { box-shadow: 0 0 0 1.5px var(--ink); }
@media (max-height: 479px), (max-width: 599px) { .side-panel { top: 50px; max-height: calc(100vh - 56px); } }
/* short screens: the more sheet in two columns, so all six tools fit a 300px phone without scrolling */
@media (max-height: 479px) {
    .bon-sheet { width: min(420px, calc(100vw - 16px)); display: grid; grid-template-columns: 1fr 1fr; max-height: calc(100vh - 58px); }
    .more-item { font-size: 13px; }
}

/* ── plates: notes over the table, picture left, text right ─────────────────────────── */
#plates { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.note {
    position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
    max-width: min(460px, calc(100vw - 24px)); padding: 7px 14px 7px 8px;
    background: var(--cream); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink);
    animation: note-up 260ms cubic-bezier(.2, .8, .25, 1);
    transition: opacity 300ms ease, transform 300ms ease;
}
/* a note rises out of the status line and sinks back into it: it never swings up over the trick */
.note.out { opacity: 0; transform: translate(-50%, 8px); }
@keyframes note-up { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes note-in { from { opacity: 0; transform: translate(-50%, -10px); } }
.note-pic { width: 34px; flex: none; }
.note-pic svg { width: 100%; height: auto; display: block; }
.note-text { display: flex; flex-direction: column; gap: 2px; font: 500 14px/1.25 var(--font-ui); }
.note-text b { font-weight: 600; }
.note-text span { font-size: 12px; color: var(--berry-deep); }
.note-cherry { width: 30px; height: 33px; }

.veil {
    position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center;
    background: rgba(59, 36, 24, 0.38); padding: 10px;
}
/* The cherry question lets the player look at the hand AND reach the header (rules, log, back):
   its veil sits under the header (100), over the table, the notes (70) and the status pill (60). */
.veil.veil-top { align-items: flex-end; background: rgba(59, 36, 24, 0.18); z-index: 90; }
/* it shrinks toward the hand it stands on (game.js modal() room) */
.veil.veil-top > .plate { transform-origin: 50% 100%; }
/* the stack order and the declarations so far, repeated on the plate that covers them */
.pl-stack { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font: 600 13px/1.3 var(--font-ui) !important; color: var(--ink-soft); }
.pl-flavor { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); }
.pl-disc { display: inline-block; width: 20px; height: 16px; }
.pl-disc svg { width: 100%; height: 100%; display: block; }
.pl-gt { color: var(--ink-soft); }
.pl-declared { display: flex; align-items: center; gap: 4px; }
.pl-mini-cherry { width: 16px; height: 18px; flex: none; }
/* A phone on its side has ~170px between header and hand: the question goes wide and tight
   instead of shrinking its words and buttons below a finger. */
@media (max-height: 420px) {
    .plate.declare-plate { width: min(620px, calc(100vw - 20px)); padding: 10px 16px 12px 12px; gap: 12px; }
    .plate.declare-plate .pl-pic { width: 50px; }
    .plate.declare-plate .pl-cherry { width: 46px !important; }
    .plate.declare-plate h2 { font-size: 21px; margin-bottom: 2px; }
    .plate.declare-plate p { margin-bottom: 3px; line-height: 1.3; }
    .plate.declare-plate .pl-actions { margin-top: 6px; }
}
/* A trick's note hangs where the status pill stands: the pill steps aside while it is up. */
body.note-band #status-line { opacity: 0; }

/* An upright phone: the table is laid out for the wide side. Tablets keep their portrait table. */
#rotate-cover {
    position: fixed; inset: 0; z-index: 5000; display: none; place-items: center; padding: 24px;
    background: var(--waffle);
    background-image: repeating-linear-gradient(45deg, transparent 0 26px, var(--waffle-line) 26px 29px),
        repeating-linear-gradient(-45deg, transparent 0 26px, var(--waffle-line) 26px 29px);
}
.rot-plate {
    display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 300px; padding: 22px 22px 20px;
    text-align: center; color: var(--ink); background: var(--cream); border: 3px solid var(--ink); border-radius: 22px;
    box-shadow: 0 6px 0 var(--ink);
}
.rot-phone {
    width: 34px; height: 56px; border: 3px solid var(--ink); border-radius: 8px; background: var(--pink);
    animation: rot-turn 2.4s ease-in-out infinite;
}
@keyframes rot-turn { 0%, 30% { transform: rotate(0); } 55%, 100% { transform: rotate(-90deg); } }
@media (prefers-reduced-motion: reduce) { .rot-phone { animation: none; transform: rotate(-90deg); } }
.rot-title { font: 400 26px/1.2 var(--font-script); color: var(--berry); margin-top: 10px; }
.rot-body { font: 500 16px/1.35 var(--font-ui); }
@media (pointer: coarse) and (orientation: portrait) and (max-width: 560px) { #rotate-cover { display: grid; } }
.plate {
    position: relative; display: flex; gap: 18px; align-items: center; width: min(520px, calc(100vw - 20px));
    padding: 18px 22px 18px 18px; transform-origin: 50% 50%;
    background: var(--cream); border: 3px solid var(--ink); border-radius: 22px;
    box-shadow: 0 6px 0 var(--ink), 0 26px 40px -14px rgba(59, 36, 24, 0.7);
    animation: plate-in 320ms cubic-bezier(.2, .8, .25, 1);
}
.plate::before {
    content: ''; position: absolute; left: 14px; right: 14px; top: -3px; height: 9px; border-radius: 0 0 6px 6px;
    background: repeating-linear-gradient(90deg, var(--pink) 0 22px, var(--cream) 22px 44px, var(--cocoa) 44px 66px);
    border: 2px solid var(--ink); border-top: 0;
}
@keyframes plate-in { from { opacity: 0; translate: 0 12px; } }
@media (prefers-reduced-motion: reduce) { .plate, .note { animation: none; } }
.pl-pic { flex: none; width: 92px; display: flex; flex-direction: column; align-items: center; }
.pl-pic svg { width: 100%; height: auto; }
.pl-cherry { width: 78px !important; }
.wl-sc, .ov-sc { width: 82px; height: 66px; margin-top: -18px; }
.wl-sc:first-child, .ov-sc:first-child { margin-top: 0; }
.pl-body { flex: 1; min-width: 0; }
.plate h2 { margin: 0 0 6px; font: 400 26px/1.15 var(--font-script); color: var(--berry-deep); }
.plate p { margin: 0 0 8px; font: 400 15px/1.45 var(--font-ui); }
.pl-small { font-size: 13px !important; color: var(--ink-soft); }
.pl-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.btn {
    min-height: 46px; padding: 0 20px; border: 2.5px solid var(--ink); border-radius: 999px; cursor: pointer;
    font: 600 16px/1 var(--font-ui); color: var(--ink); background: var(--cream); box-shadow: 0 4px 0 var(--ink);
    transition: transform 90ms ease, box-shadow 90ms ease, filter 120ms ease;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn-main, .btn-cherry { background: var(--berry); color: var(--cream); }
.btn-plain { background: var(--vanilla); }
.score-table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.score-table th { text-align: left; font: 600 12px/1 var(--font-ui); color: var(--ink-soft); padding: 4px 6px; border-bottom: 2px solid var(--ink); }
.score-table td { padding: 5px 6px; border-bottom: 1.5px dashed rgba(59, 36, 24, 0.25); }
.score-table td:not(:first-child), .score-table th:not(:first-child) { text-align: center; }
.over-plate .score-table td:nth-child(2) { text-align: left; }
.over-plate .score-table td:first-child { width: 2.4em; }
.score-table tr.good td { color: var(--good); font-weight: 600; }
.score-table tr.bad td { color: var(--berry-deep); }
.row-cherry { width: 14px; height: 15px; vertical-align: -2px; }
.round-plate, .over-plate { width: min(500px, calc(100vw - 20px)); }

/* ── start screen: a menu card under the striped awning ───────────────────────────── */
#start-screen {
    position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
    /* the Neapolitan stripes as a faint, wide weave on deep chocolate — a backdrop, not a pattern
       to look at (user 2026-10-26: the full-contrast stripes were blinding) */
    background:
        radial-gradient(ellipse 70% 60% at 50% 45%, rgba(255, 236, 205, 0.16), rgba(255, 236, 205, 0) 70%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0) 50%, rgba(30, 16, 9, 0.55) 100%),
        repeating-linear-gradient(-55deg, rgba(241, 154, 192, 0.10) 0 90px, rgba(251, 239, 207, 0.06) 90px 180px, rgba(0, 0, 0, 0) 180px 270px),
        #4f2e1c;
}
.st-awning {
    position: absolute; left: 0; right: 0; top: 0; height: 64px;
    background: repeating-linear-gradient(90deg, var(--berry) 0 60px, var(--cream) 60px 120px);
    border-bottom: 3px solid var(--ink);
    -webkit-mask: radial-gradient(30px 20px at 30px 64px, transparent 98%, #000) -0px 0 / 60px 100% repeat-x;
            mask: radial-gradient(30px 20px at 30px 64px, transparent 98%, #000) 0 0 / 60px 100% repeat-x;
}
.st-card {
    position: relative; width: 520px; padding: 20px 26px 22px; transform-origin: 50% 50%;
    background: var(--cream); border: 3px solid var(--ink); border-radius: 26px;
    box-shadow: 0 7px 0 var(--ink), 0 30px 60px -16px rgba(59, 36, 24, 0.75);
}
.st-scoops { display: flex; justify-content: center; margin: -54px 0 2px; }
.st-sc { width: 70px; height: 57px; margin: 0 -8px; filter: drop-shadow(0 3px 0 rgba(59, 36, 24, 0.25)); }
.st-sc:nth-child(2) { margin-top: -12px; }
.st-title { margin: 0; text-align: center; font-weight: 400; line-height: 1; color: var(--cocoa); }
.st-best, .st-nea { font: 400 46px/1.05 var(--font-script); }
.st-of { font: 400 26px/1 var(--font-script); color: var(--berry); }
.st-nea { display: block; color: var(--berry-deep); }
.st-tag { margin: 8px 6px 14px; text-align: center; font: 400 15px/1.4 var(--font-ui); color: var(--ink-soft); }
.st-row { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 6px 12px; margin: 10px 0; }
.st-label { font: 600 14px/1 var(--font-ui); color: var(--cocoa); }
.st-seg { display: flex; gap: 8px; }
.st-seg-btn {
    width: 56px; height: 46px; border: 2.5px solid var(--ink); border-radius: 14px; background: var(--cream);
    font: 600 20px/1 var(--font-ui); color: var(--ink); cursor: pointer; box-shadow: 0 3px 0 var(--ink);
}
.st-seg-btn.on { background: var(--pink); }
.st-goal { grid-column: 2; font: 400 13px/1.2 var(--font-ui); color: var(--ink-soft); }
.st-var-row { align-items: start; }
.st-vars { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-var {
    display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 10px; text-align: left; cursor: pointer;
    border: 2px solid var(--ink); border-radius: 14px; background: #fff; color: var(--ink);
}
.st-var.on { background: #ffe3ee; box-shadow: inset 0 0 0 2px var(--berry); }
.st-var-tick { width: 22px; height: 22px; flex: none; border: 2px solid var(--ink); border-radius: 7px; display: grid; place-items: center; background: var(--cream); }
.st-var.on .st-var-tick { background: var(--berry); }
.st-var.on .st-var-tick::after { content: ''; width: 9px; height: 5px; border: solid var(--cream); border-width: 0 0 3px 3px; transform: translateY(-1px) rotate(-45deg); }
.st-var-tick .st-cherry { display: none; }
.st-var-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-var-name { font: 600 13px/1.15 var(--font-ui); }
.st-var-desc { font: 400 11.5px/1.25 var(--font-ui); color: var(--ink-soft); }
.st-actions { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.st-play {
    min-width: 200px; height: 56px; border: 3px solid var(--ink); border-radius: 999px; cursor: pointer;
    font: 400 28px/1 var(--font-script); color: var(--cream); background: var(--berry); box-shadow: 0 5px 0 var(--ink);
    transition: transform 90ms ease, box-shadow 90ms ease;
}
.st-rules {
    height: 46px; padding: 0 18px; border: 2.5px solid var(--ink); border-radius: 999px; cursor: pointer;
    font: 600 15px/1 var(--font-ui); color: var(--ink); background: var(--vanilla); box-shadow: 0 3px 0 var(--ink);
}
.st-rules:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.st-play:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.st-lang {
    position: absolute; top: 10px; right: 10px; width: 52px; height: 44px; display: grid; place-items: center;
    border: 2px solid var(--ink); border-radius: 12px; background: var(--vanilla); cursor: pointer; box-shadow: 0 3px 0 var(--ink);
}
.st-lang .flag { width: 30px; height: 20px; box-shadow: 0 0 0 1.5px var(--ink); }
.st-sound {
    position: absolute; top: 10px; left: 10px; width: 48px; height: 44px; display: grid; place-items: center; color: var(--ink);
    border: 2px solid var(--ink); border-radius: 12px; background: var(--vanilla); cursor: pointer; box-shadow: 0 3px 0 var(--ink);
}
.st-sound svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.st-sound.off { color: var(--ink-soft); background: var(--cream); }

/* the language picker: a cream menu slip under the flag */
.lang-picker {
    position: fixed; z-index: 3000; min-width: 170px; padding: 6px; display: flex; flex-direction: column; gap: 2px;
    background: var(--cream); border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink), 0 16px 26px -10px rgba(59, 36, 24, 0.6);
    animation: note-in 180ms cubic-bezier(.2, .8, .25, 1);
}
.lang-opt { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; font: 500 16px/1 var(--font-ui); text-align: left; }
.lang-opt:hover { background: rgba(241, 154, 192, 0.25); }
.lang-opt.on { background: var(--pink); font-weight: 600; }
.lang-opt .flag { width: 30px; height: 20px; flex: none; box-shadow: 0 0 0 1.5px var(--ink); }
.lang-opt .flag svg { stroke: none; }
@media (prefers-reduced-motion: reduce) { .lang-picker { animation: none; } }
@media (max-height: 479px) {
    /* short screens: no tagline, no variant blurbs, the goal beside the seat count — fits 300px unscaled */
    .st-awning { height: 34px; -webkit-mask-position: 0 -30px; mask-position: 0 -30px; }
    .st-card { width: min(600px, calc(100vw - 16px)); padding: 10px 18px 12px; border-radius: 20px; }
    .st-scoops, .st-tag, .st-var-desc { display: none; }
    .st-best, .st-nea { font-size: 30px; }
    .st-of { font-size: 18px; }
    .st-nea { display: inline; }
    .st-row { grid-template-columns: 80px auto 1fr; margin: 8px 0; }
    .st-goal { grid-column: 3; }
    .st-var-row .st-vars { grid-column: 2 / 4; }
    .st-var { min-height: 44px; }
    .st-seg-btn { height: 44px; width: 52px; }
    .st-actions { margin-top: 8px; }
    .st-play { height: 50px; font-size: 24px; }
    .st-lang { height: 44px; }
}

/* the back question (core/back.js) wears the parlour too */
:root {
    --dk-scrim: rgba(59, 36, 24, 0.45); --dk-font-ui: var(--font-ui); --dk-font-display: var(--font-script);
    --dk-dialog-top: var(--cream); --dk-dialog-bottom: var(--cream); --dk-dialog-line: var(--ink);
    --dk-panel-text: var(--ink); --dk-panel-accent: var(--berry-deep);
    --dk-back-btn-bg: var(--berry); --dk-back-btn-ink: var(--cream); --dk-back-btn-line: var(--ink); --dk-back-btn-shadow: 0 4px 0 var(--ink);
    --dk-back-alt-bg: var(--vanilla); --dk-back-alt-ink: var(--ink); --dk-back-alt-line: var(--ink); --dk-back-focus: var(--berry);
}
#dk-back-ask .dk-back-panel { border-width: 3px; border-radius: 22px; box-shadow: 0 6px 0 var(--ink); }
#dk-back-ask h2 { font-weight: 400; }
#dk-back-ask button { border-width: 2.5px; border-radius: 999px; }

@media (max-height: 479px), (max-width: 599px) {
    /* phones: the stack's labels and its trick pill are placed by game.js (placeStackNotes) on the
       first free spot -- the labels beside their disc, the pill above the player's own tag */
    .stack-info { position: fixed; top: 0; left: 0; margin: 0; font-size: 10px; line-height: 1.2; padding: 4px 9px; border-radius: 12px; display: flex; flex-direction: column; }
    .si-sep { display: none; }
    .leftover-label { font-size: 9.5px; padding: 2px 6px; }
    .si-goal { font-weight: 500; opacity: 0.9; }
    /* a trick's note: one line on the status ribbon, no picture -- the lit card on the table is the picture */
    .note { padding: 4px 12px; gap: 6px; border-width: 1.5px; border-radius: 12px; box-shadow: 0 3px 0 var(--ink); }
    .note-pic { display: none; }
    .note-text { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 6px; font-size: 13px; line-height: 1.2; }
    .note-text span { font-size: 11.5px; }
    /* the tool panels stop above the hand: the player can still play with one open */
    .side-panel { max-height: calc(var(--hand-top, 100vh) - 54px); }
    /* and the order slips shrink to one line of name over pips */
    .tag { min-width: 0; max-width: 146px; }
    .tag-top { padding: 3px 12px 4px; border-width: 1.5px; box-shadow: 0 3px 0 0 var(--edge), 0 3px 0 1.5px var(--ink); }
    .tag.active .tag-top { box-shadow: 0 3px 0 0 var(--edge), 0 3px 0 1.5px var(--ink), 0 0 0 4px rgba(241, 154, 192, 0.95); }
    .tag-stand { width: 30px; height: 12px; }
    .tag-stand::before { top: 3px; width: 5px; height: 7px; border-width: 1.2px; }
    .tag-stand::after { width: 24px; height: 4px; border-width: 1.2px; }
    .tag-name { font-size: 12.5px; }
    .tag-cups { height: 21px; margin: 0 9px -5px; gap: 2px; }
    .cup { width: 16px; height: 20px; }
    .decor { width: 13px; height: 19px; }
    .tag-cherry { width: 11px; height: 12px; }
}

/* ── Online: the start screen's door and the lobby (mpDialog.js) ────────────────────────── */
.st-online {
    height: 46px; padding: 0 18px; border: 2.5px solid var(--ink); border-radius: 999px; cursor: pointer;
    font: 600 15px/1 var(--font-ui); color: var(--cream); background: var(--cocoa); box-shadow: 0 3px 0 var(--ink);
}
.st-online:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
/* the lobby is a cream plate on the cocoa veil, the same object as every other question */
.bon-mp-layer { z-index: 1200; }
.plate.bon-mp {
    display: flex; flex-direction: column; align-items: stretch; gap: 10px;
    width: min(460px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); overflow-y: auto; padding: 22px 22px 18px;
}
.plate.bon-mp.room { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; width: min(760px, calc(100vw - 20px)); align-items: start; }
.bon-mp-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.bon-mp-title { margin: 0; font: 400 26px/1.15 var(--font-script); color: var(--berry-deep); }
.bon-mp-sub { margin: 0; font: 600 13px/1.2 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.bon-mp-line, .bon-mp-note { margin: 0; font: 400 14px/1.4 var(--font-ui); color: var(--ink); }
.bon-mp-note { font-size: 12.5px; color: var(--ink-soft); }
.bon-mp-error { margin: 0; min-height: 0; font: 600 14px/1.35 var(--font-ui); color: var(--berry-deep); }
.bon-mp-error:empty { display: none; }
.bon-mp-doors { display: grid; gap: 12px; }
.bon-mp-door {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 64px; padding: 12px 16px; text-align: left;
    border: 2.5px solid var(--ink); border-radius: 16px; cursor: pointer; background: var(--vanilla); color: var(--ink); box-shadow: 0 4px 0 var(--ink);
}
.bon-mp-door-host { background: var(--pink); }
.bon-mp-door:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.bon-mp-door:focus-visible, .bon-mp-pill:focus-visible, .bon-mp input:focus-visible { outline: 3px solid var(--berry); outline-offset: 2px; }
.bon-mp-door-title { font: 400 21px/1.15 var(--font-script); color: var(--berry-deep); }
.bon-mp-door-sub { font: 500 14px/1.3 var(--font-ui); }
.bon-mp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.bon-mp-fields { display: grid; gap: 10px; }
.bon-mp-field { display: flex; flex-direction: column; gap: 4px; font: 600 13px/1.2 var(--font-ui); color: var(--ink-soft); }
.bon-mp-field input {
    min-height: 44px; padding: 0 12px; border: 2.5px solid var(--ink); border-radius: 12px; background: #fff;
    font: 500 17px/1 var(--font-ui); color: var(--ink);
}
.bon-mp-code-input { font: 600 22px/1 var(--font-ui) !important; letter-spacing: .3em; text-transform: uppercase; }
.bon-mp-code-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bon-mp-code {
    padding: 6px 14px; border: 2.5px dashed var(--ink); border-radius: 12px; background: var(--vanilla);
    font: 700 32px/1.1 var(--font-ui); letter-spacing: .22em; color: var(--ink); user-select: all;
}
.bon-mp-copy { min-height: 44px; }
.bon-mp-settings { display: flex; flex-direction: column; gap: 8px; }
.bon-mp-set { display: flex; flex-direction: column; gap: 5px; }
.bon-mp-set-label { font: 600 12.5px/1.2 var(--font-ui); color: var(--ink-soft); }
.bon-mp-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.bon-mp-pill {
    min-height: 36px; min-width: 44px; padding: 0 12px; border: 2px solid var(--ink); border-radius: 999px; cursor: pointer;
    font: 600 14px/1 var(--font-ui); color: var(--ink); background: var(--cream);
}
.bon-mp-pill.on { background: var(--berry); color: var(--cream); }
.bon-mp-pill:disabled { cursor: default; opacity: .75; }
.bon-mp-pill:disabled:not(.on) { opacity: .45; }
.bon-mp-seats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bon-mp-seat {
    display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 10px 4px 6px;
    border: 2px solid var(--ink); border-radius: 999px; background: #fff; font: 600 15px/1.2 var(--font-ui); color: var(--ink);
}
.bon-mp-seat.open { border-style: dashed; background: transparent; color: var(--ink-soft); font-weight: 500; }
.bon-mp-seat.me { box-shadow: 0 0 0 3px var(--pink); }
.bon-mp-disc {
    flex: none; width: 28px; height: 28px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%;
    background: var(--seat, var(--vanilla)); font: 700 13px/1 var(--font-ui); color: var(--ink);
}
.bon-mp-seat.open .bon-mp-disc { background: transparent; border-style: dashed; }
.bon-mp-seat-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bon-mp-seat-tag { flex: none; font: 500 12px/1.2 var(--font-ui); color: var(--ink-soft); }
.bon-mp-wait { margin: 0; font: 500 14px/1.35 var(--font-ui); color: var(--ink-soft); }
.bon-mp-toast {
    position: fixed; left: 50%; bottom: 18px; z-index: 1300; max-width: min(520px, calc(100vw - 24px)); padding: 10px 18px;
    transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity 200ms ease, transform 200ms ease;
    background: var(--cream); border: 2.5px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink);
    font: 600 14px/1.35 var(--font-ui); color: var(--ink); text-align: center;
}
.bon-mp-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 620px) { .plate.bon-mp.room { grid-template-columns: 1fr; } }
@media (max-height: 420px) {
    .plate.bon-mp { padding: 14px 16px 12px; gap: 8px; }
    .bon-mp-title { font-size: 22px; }
    .bon-mp-code { font-size: 26px; }
    .bon-mp-door { min-height: 52px; padding: 8px 14px; }
}
@media (prefers-reduced-motion: reduce) { .bon-mp-toast { transition: none; } }

/* The crawlable #about text (index.html): hidden from sight, kept for search engines and screen readers. */
.bon-about { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
