/* The Back Kitchen: the room's own pieces, after look.css. Only bk- classes; never restyle an lk- class. */
.bk-spoon-chip b { font-variant-numeric: tabular-nums; }
.bk-spoon-chip svg { width: 1.05rem; height: 1.05rem; flex: none; }
.bk-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; font-weight: 600; word-break: break-all; text-align: right; }
.bk-proof { margin-top: .9rem; border-top: 1px solid var(--lk-rule); padding-top: .4rem; }
.bk-proof summary { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 44px; cursor: pointer; font-weight: 600; color: var(--lk-soft); list-style: none; }
.bk-proof summary::-webkit-details-marker { display: none; }
.bk-proof summary small { color: var(--lk-soft2); font-weight: 500; }
.bk-verdict { min-height: 1.4em; margin: .6rem 0 0; font-weight: 600; }
.bk-verdict.is-ok { color: var(--lk-pass); } .bk-verdict.is-bad { color: var(--lk-fail); }
.bk-preview { display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 .8rem; padding: .35rem .8rem; border-radius: 999px; background: rgba(246, 196, 83, .14); color: var(--lk-gold); font-size: .86rem; font-weight: 700; }

/* lobby: the three games */
.bk-games { display: grid; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 760px) { .bk-games { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .bk-games { grid-template-columns: repeat(4, 1fr); } }
.bk-game { display: flex; flex-direction: column; gap: .7rem; text-decoration: none; color: inherit; }
.bk-game .bk-art { aspect-ratio: 16 / 10; border-radius: 1rem; display: grid; place-items: center; overflow: hidden; }
.bk-game .bk-art svg { width: 78%; height: 78%; }
.bk-art--souffle { background: radial-gradient(circle at 50% 70%, #ff9b4a33, transparent 60%), linear-gradient(160deg, #3a1420, #160710); }
.bk-art--plates { background: radial-gradient(circle at 50% 50%, #f6c45322, transparent 60%), linear-gradient(160deg, #10282b, #071214); }
.bk-art--slots { background: radial-gradient(circle at 50% 45%, #f6c45333, transparent 60%), linear-gradient(160deg, #2b1a08, #120a04); }
.bk-art--susan { background: radial-gradient(circle at 50% 50%, #ff4f9333, transparent 62%), linear-gradient(160deg, #2a1236, #110716); }
.bk-game .bk-meta { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; color: var(--lk-soft2); font-size: .9rem; }
.bk-game .lk-btn { align-self: flex-start; }

/* lobby: the pantry (Spoons for CRO, not open yet) */
.bk-packs { display: grid; gap: .8rem; margin-top: .9rem; }
@media (min-width: 760px) { .bk-packs { grid-template-columns: repeat(3, 1fr); } }
.bk-pack { padding: 1rem 1.1rem; border-radius: 1.3rem; background: var(--lk-panel2); border: 1px solid var(--lk-line); }
.bk-pack b { display: block; font-family: Bricolage, sans-serif; font-weight: 800; font-size: 1.6rem; color: var(--lk-gold); }
.bk-pack span { color: var(--lk-soft); }

/* game pages: the shared frame of a game card */
.bk-board { position: relative; border-radius: 1.3rem; overflow: hidden; background: #0d0409; border: 1px solid var(--lk-line); }
.bk-bet { display: grid; gap: .6rem; margin-top: .9rem; }
.bk-bet-row { display: flex; align-items: center; gap: .5rem; }
.bk-bet-row .lk-input { flex: 1; min-width: 0; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.bk-step { min-width: 44px; min-height: 44px; border-radius: .9rem; border: 1px solid var(--lk-line); background: var(--lk-panel2); color: var(--lk-text); font: inherit; font-weight: 700; cursor: pointer; }
.bk-step:disabled { opacity: .45; cursor: default; }
.bk-result { min-height: 1.5em; margin: .8rem 0 0; font-weight: 700; text-align: center; }
.bk-result.is-win { color: var(--lk-pass); } .bk-result.is-lose { color: var(--lk-pink2); }
.bk-odds { margin-top: .9rem; }
@media (prefers-reduced-motion: reduce) { .bk-board *, .bk-art * { animation: none !important; transition: none !important; } }

/* 18+: always shown, next to the preview badge */
.bk-badges { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .8rem; }
.bk-badges .bk-preview { margin: 0; }
.bk-18 { display: inline-grid; place-items: center; min-width: 2.6rem; height: 2.1rem; padding: 0 .55rem; border-radius: 999px; border: 2px solid var(--lk-pink2); color: var(--lk-pink2); font-family: Bricolage, sans-serif; font-weight: 800; font-size: .95rem; letter-spacing: .02em; }

/* ---- shared game-page pieces (after the feel review, 13 Nov) ---- */
/* one header for every game: title, 18+, its return, play money. <div class="bk-gamehead"><h1>…</h1><span class="bk-18">18+</span>
   <span class="bk-chiplet">Returns 97%</span><span class="bk-chiplet">Play money</span></div> */
.bk-gamehead { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .6rem; margin: 0 0 .9rem; }
.bk-gamehead h1 { flex: 1 1 100%; margin: 0; font-family: Bricolage, sans-serif; font-weight: 800; font-size: clamp(1.7rem, 6.4vw, 2.5rem); line-height: 1.02; letter-spacing: -.01em; color: var(--lk-text); }
@media (min-width: 420px) { .bk-gamehead h1 { flex: 0 1 auto; margin-right: auto; } }
.bk-chiplet { display: inline-flex; align-items: center; min-height: 2.1rem; padding: 0 .7rem; border-radius: 999px; background: rgba(246, 196, 83, .13); color: var(--lk-gold); font-weight: 700; font-size: .86rem; white-space: nowrap; }
/* game pages (body.bk-play): no raised pink "Buy" disc in the tab bar, 9px under the game's own button (a mis-tap would leave the game
   for the real-money Till). */
/* r13 (polish 12): the same five tabs on all six pages. On a game the Till is a flat tab like the others (a small pink "Buy" over "The
   Till", inside the bar): the raised disc stays off the games, so nothing rises into the game's own button */
body.bk-play .lk-tabs .lk-go { display: grid; }
body.bk-play .lk-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
body.bk-play .lk-tabs .lk-go i { width: auto; min-width: 2.5rem; height: 1.5rem; margin-top: 0; padding: 0 .5rem; border-radius: 999px; box-shadow: none; font-size: max(.74rem, 12px); line-height: 1; }

/* ---- the room itself, for any Back Kitchen page that wants to stand in it (lobby redesign, 13 Nov) ----
   Opt in with one class on <body>: <body class="lk-tool bk-play bk-room">. It paints the wine-tiled wall, a warm lamp pool from
   above and a low checkered floor at the foot of the screen, behind the page: body backgrounds, a fixed body::before, and --lk-bg
   set to the wall's low wine so the kit's own fades and its action strip end in the room's colour, not black. No lk- class is
   restyled; cards and papers keep their own colours. Nothing moves. Needs img/lobby/floor.svg (drawn by tools/lobby_art.mjs). */
body.bk-room {
  --lk-bg: #14060f;                              /* the kit's own fades and the action strip end in the room's low wine, not black */
  background-color: #160812;
  background-image:
    radial-gradient(ellipse 80% 55% at 50% -8%, rgba(255, 184, 107, .17), rgba(255, 184, 107, 0) 72%),
    radial-gradient(ellipse 120% 90% at 50% 40%, rgba(6, 1, 5, 0) 55%, rgba(6, 1, 5, .55)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72'%3E%3Cg fill='none'%3E%3Cpath d='M0 .5H72M0 36.5H72M.5 0V36M36.5 36V72' stroke='%23070105' stroke-opacity='.8'/%3E%3Cpath d='M1.5 2H71M0 38H35.5M37.5 38H72' stroke='%23fff' stroke-opacity='.05'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, #2a0d1f 0%, #1c0916 60%, #120510 100%);
  background-attachment: fixed;
}
body.bk-room::before {
  content: ""; position: fixed; z-index: -1; left: 0; right: 0; bottom: 0; height: 30vh; pointer-events: none;
  background: url("../img/lobby/floor.svg") 50% 0 / max(100%, 80rem) auto no-repeat;
  -webkit-mask-image: linear-gradient(0deg, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0)); mask-image: linear-gradient(0deg, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0));
}

/* ---- THE ROOM'S DESKTOP LAYOUT: .bk-wide on each game page's two-part wrapper (Soufflé, Hot Plates, Lazy Karen, Jar Slots).
   From 1200px wide the four games share one grid: her on the left (sticky, centred, the same height on every page), one game
   column of --bk-game-w, the same side paddings and gap, and the game's header at the top left of that column. Below 1200 each
   page keeps its own tablet layout. `.bk-play .bk-wide` outranks the pages' own wrapper rules (their CSS loads after this file). */
@media (min-width: 1200px) and (min-height: 600px) {
  .bk-play .bk-wide { --bk-game-w: 52rem; --bk-gap: clamp(1.4rem, 3.4vw, 3.4rem); --bk-pad: clamp(1rem, 4.4vw, 4.4rem);
    --bk-her-w: calc(100vw - 2 * var(--bk-pad) - var(--bk-game-w) - var(--bk-gap));
    display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(0, var(--bk-game-w)); gap: 0 var(--bk-gap); align-items: start;
    max-width: none; margin: 0; padding: 1.3rem var(--bk-pad) 1.6rem; }
  .bk-play .bk-wide > :is(.lk-wife, .bk-souffle-her) { grid-area: 1 / 1; position: sticky; top: 3.4rem; justify-self: center; margin: 0; }
  .bk-play .bk-wide > :not(.lk-wife, .bk-souffle-her) { grid-area: 1 / 2; margin-top: 0; }
  body.bk-play .bk-wide .lk-wife { --lk-wife-h: min(var(--lk-fig), (var(--bk-her-w) - 1rem) * 1.08, 100svh - 13rem); }
  body.bk-play .bk-wide .lk-wife .lk-say { margin-bottom: 1.1rem; }
}
/* r12: a seal row whose value is words, not a hash ("shown once you sign in", "shown after this round"): the page's own type, never cut with
   an "…", the words kept together (they move whole to the next line when they must) */
.bk-seal-w { font: inherit; color: inherit; white-space: nowrap; word-break: normal; overflow-wrap: normal; }
.bk-seal-row.is-words { display: inline; }
/* r12: every game opens the same way on a phone: its title first (Hot Plates and the Jar Slots move it above her: js/bk-ui.js headFirst),
   on one line with 18+ and the room's chiplet where they fit; "Returns 97%" steps aside on a phone in all four (the ticker over every
   page says "Every game returns 97%", and each game's rules give its numbers) */
@media (max-width: 759px) {
  body.bk-play .bk-gamehead { column-gap: .45rem; }
  body.bk-play .bk-gamehead h1 { flex: 0 1 auto; min-width: 0; margin-right: auto; font-size: clamp(1.4rem, 6.6vw, 1.75rem); }
  body.bk-play .bk-gamehead :is([data-sf="rtp-tag"], [data-susan-rtp-chip], #bkp-rtp, #bksl-rtp-chip) { display: none; }
  body.bk-play .bk-gamehead.is-top { margin: .7rem 0 .55rem; }
}
/* r12: on a desktop her bubble's second line is 14px, weight 500 (12.5px in a rotated bubble rendered soft at 1x: "You choose when.") */
@media (min-width: 1000px) {
  body.bk-play :is(.bk-sf .bk-souffle-her, .bk-host--croupier, .bk-host--pass, .bk-host--neon, .lk-wife) .lk-say small { font-size: max(14px, .86rem); font-weight: 500; line-height: 1.3; }
}
/* ============================================================== r13 (15 Nov review, 8.4) */
/* polish 4: on a phone the rules start closer under the game (about 100px of empty space sat under the seats' strip) */
@media (max-width: 759px) { body.bk-play #rules.lk-sec { padding-top: 2.2rem; } }

/* r15 (16 Nov): "Still there, darling?" after 5 idle minutes (the tables are read every 15 s until the player moves; js bk-ui idleNote) */
.bk-idle { position: fixed; z-index: 30; left: 50%; top: calc(4rem + env(safe-area-inset-top)); transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .1rem .45rem; width: max-content; max-width: min(92vw, 26rem); min-height: 44px; margin: 0; padding: .55rem 1.1rem; border: 0; border-radius: 999px; background: var(--lk-cream, #fbeed6); color: var(--lk-ink, #1d0612); box-shadow: 0 .6rem 1.6rem rgba(0, 0, 0, .55), inset 0 0 0 1.5px rgba(246, 196, 83, .8); font: inherit; font-size: .92rem; line-height: 1.3; text-align: center; cursor: pointer; }
.bk-idle b { font-weight: 800; }
.bk-idle span { font-weight: 600; color: #4d2f3c; }
.bk-idle[hidden] { display: none; }
/* r15: the proof's row labels ("This round’s seed, shown now") in the surface's fine-print colour: lighter on a dark card (it read 4.4:1) */
.bk-proof .lk-row > span:first-child { color: var(--lk-soft2); }

/* ============================================================== r16 (16 Nov review, 8.3) */
/* polish 3: "Still there, darling?" covers nothing that matters (under the header it sat on the page's title and its 18+): on a phone or
   tablet it sits over the tab bar (a tap anywhere wakes the page and the note goes, so the tabs are back at once); on a desktop it hangs
   over the ticker at the top, clear of the header's links and chips */
.bk-idle { top: auto; bottom: calc(env(safe-area-inset-bottom) + .5rem); max-width: min(94vw, 26rem); }
@media (min-width: 1000px) { .bk-idle { top: calc(env(safe-area-inset-top) + .1rem); bottom: auto; max-width: none; flex-wrap: nowrap; min-height: 44px; padding-block: .35rem; white-space: nowrap; } }
/* polish 7 and 9: her lines wrap balanced in every bubble of the room (at 1920 the lobby's left "home." alone; the closed Slots' neon left
   "machine" alone at 1440): her first two and last two words already stay together (js holdLast), balance evens the lines between */
body.bk-play :is(.lk-say, .bk-bubble) q, body.bk-room :is(.lk-say, .bk-bubble) q { text-wrap: balance; }

/* ---- r17 (16 Nov): a table that opens soon (the kitchen's BK_GAMES). A closed game's page: her notice in place of the game (the page's
   header, tab bar and footer stay); the game and its rules step aside, so no bet control is there to tap. A round of yours from before it
   closed plays out first, under a slim line (.bk-soon-bar). The lobby's closed cards (.bk-station.is-soon) are in css/bk-lobby.css */
body.bk-table-soon main > :not(.bk-soon) { display: none !important; }
.bk-soon { padding: clamp(1.25rem, 5vw, 3.4rem) var(--lk-pad) clamp(2.4rem, 7vw, 4.6rem);
  background: radial-gradient(75% 55% at 50% 0%, rgba(255, 79, 147, .16), rgba(6, 1, 5, 0) 70%), radial-gradient(60% 50% at 80% 100%, rgba(246, 196, 83, .08), rgba(6, 1, 5, 0) 70%), #060105; }
.bk-soon-card { position: relative; max-width: 62rem; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); border-radius: 1.6rem; overflow: hidden;
  background: linear-gradient(165deg, #2b0c1f, #16060f 55%, #120509); border: 1px solid rgba(246, 196, 83, .5); box-shadow: 0 1.4rem 3.4rem rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06); }
.bk-soon-her { position: relative; height: clamp(13.5rem, 58vw, 19rem); overflow: hidden;
  background: radial-gradient(60% 75% at 50% 100%, rgba(255, 79, 147, .32), rgba(255, 79, 147, 0) 70%), linear-gradient(#3a1028, #1b0712); }
.bk-soon-her::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3.5rem; background: linear-gradient(rgba(22, 6, 15, 0), #17060f); }
.bk-soon-her img { position: absolute; left: 50%; top: 6%; width: auto; height: 132%; max-width: none; translate: -50% 0; }
.bk-soon-txt { position: relative; display: flex; flex-direction: column; gap: .75rem; padding: .3rem 1.35rem 1.6rem; }
.bk-soon-plaque { align-self: flex-start; margin: 0; padding: .32rem .85rem; border-radius: .55rem; background: linear-gradient(#ffd97a, #f0b93f); color: var(--lk-ink);
  font-family: Bricolage, Geist, sans-serif; font-weight: 800; font-size: .86rem; letter-spacing: .02em; box-shadow: 0 .2rem 0 #a8771a, inset 0 0 0 1px rgba(255, 255, 255, .35); }
.bk-soon h1 { margin: 0; font-family: Bricolage, Geist, sans-serif; font-weight: 800; font-size: clamp(1.85rem, 7.4vw, 3.1rem); line-height: 1.02; letter-spacing: -.025em; color: var(--lk-cream); text-wrap: balance; }
.bk-soon-line { margin: 0; max-width: 34rem; font-size: 1.02rem; line-height: 1.5; color: #e6d6de; text-wrap: pretty; }
.bk-soon-btns { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: .35rem; }
.bk-soon-btns .lk-btn { min-height: max(3.2rem, 44px); }
@media (max-width: 380px) { .bk-soon-btns .lk-btn { flex: 1 1 100%; } }
@media (min-width: 760px) {
  .bk-soon-card { grid-template-columns: minmax(0, 24rem) minmax(0, 1fr); align-items: center; }
  .bk-soon-her { height: 100%; min-height: 25rem; background: radial-gradient(70% 70% at 40% 100%, rgba(255, 79, 147, .3), rgba(255, 79, 147, 0) 70%), linear-gradient(90deg, #35102a, rgba(43, 12, 31, 0)); }
  .bk-soon-her::after { display: none; }
  .bk-soon-her img { left: 0; top: 7%; height: 106%; translate: 0 0; }   /* (she points at the words; her hand inside the card) */
  .bk-soon-txt { padding: 2.2rem 2.4rem 2.4rem 1.2rem; gap: .9rem; }
}
.bk-soon-bar { position: sticky; top: 0; z-index: 12; margin: 0; padding: .55rem var(--lk-pad); display: flex; flex-wrap: wrap; justify-content: center; gap: .1rem .45rem; text-align: center;
  background: var(--lk-cream, #fbeed6); color: var(--lk-ink, #1d0612); font-size: .92rem; line-height: 1.35; box-shadow: 0 .4rem 1rem rgba(0, 0, 0, .45), inset 0 -1.5px 0 rgba(246, 196, 83, .8); }
.bk-soon-bar b { font-weight: 800; } .bk-soon-bar span { font-weight: 600; color: #4d2f3c; }
/* (a short phone, 320x568: her picture shorter, so the way out sits above the tab bar without a scroll) */
@media (max-width: 759px) and (max-height: 700px) {
  .bk-soon { padding-top: .9rem; }
  .bk-soon-her { height: 8.75rem; }
  .bk-soon-her img { top: 5%; height: 150%; }
  .bk-soon-txt { gap: .55rem; padding-bottom: 1.2rem; }
  .bk-soon h1 { font-size: clamp(1.6rem, 7vw, 2rem); }
  .bk-soon-line { font-size: .95rem; }
  .bk-soon-btns { gap: .5rem; } .bk-soon-btns .lk-btn { min-height: 44px; }
}
