/* Brateng Music v3 — the kitchen kiosk shell (SPEC v3 §6.1, §8.1; D29–D32).
 *
 * Carried from the approved mockup (design/v3_kiosk_mockups.html, its
 * <style>) — every metric in CANVAS px on the 1280x800 stage that
 * js/shells/stage.js scales by innerWidth/1280 (×0.7516 to the Fire's 962x602
 * CSS px). The shared player (base.css, §5) is re-metric'd here for the
 * kiosk's frame; everything else is the front's chrome and the three back
 * tabs.
 *
 * Every rule is scoped `.kiosk …` (the class the shell puts on its stage) so
 * nothing here can reach the kid shell, which shares the page.
 *
 * Browser floor (§8.1): Chrome 96. No :has(), no container queries, no
 * nesting, no @layer, no dvh; aspect-ratio and grid are in.
 */

/* ---------------------------------------------------------------- stage */
.kiosk { font: 20px/1.3 "Amazon Ember", Roboto, -apple-system, "Segoe UI", system-ui, sans-serif; }
.kiosk .wash { background: radial-gradient(1100px 900px at 24% 50%, var(--tint) 0%, var(--tint2) 45%, transparent 75%); }

/* ================================================================= FRONT */
.kiosk .player { padding: 40px; flex-direction: column; }
.kiosk .player .top { display: none; }
.kiosk .player .body { margin-top: 0; align-items: stretch; height: 720px; flex: 0 0 auto; }
.kiosk .player .lft { width: 640px; height: 720px; justify-content: center; }
.kiosk .art { width: 640px; height: 640px; border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
/* Idle: the blank slate — the flat card with the mockup's note glyph
   (`#art.empty`, `♪`), the wash neutral (§6.1). */
.kiosk .player.idle .art { background: var(--panel2); box-shadow: none; display: grid; place-items: center; color: #3a4358; font-size: 220px; }
.kiosk.pane-list .player.idle .art { display: none; }
.kiosk .player.idle .art::before { content: "♪"; }
.kiosk .player .col { margin-left: 48px; justify-content: flex-start; height: 720px; }

/* The playing list — full height, no caption, current song marked (§6.1). */
.kiosk .pq { height: 720px; }
.kiosk .pq .cap { display: none; }
.kiosk .pq .tr { height: 60px; }
/* Idle lands on the art face (kiosk.js repaint); should the pane ever be left
   open on the blank slate, its rows are inert for the same reason the idle
   transport is — a stray tap must not resume the queue Stop left behind. */
.kiosk .player.idle .pq { pointer-events: none; }

/* Entry-button row: Speakers · Playlists · Search shifted left and sized
   down, the house at the right end (§6.1, D32). Flush with the progress bar. */
.kiosk .entry { display: flex; gap: 12px; justify-content: space-between; flex: 0 0 auto; }
.kiosk .entry button {
  flex: 1; height: 56px; padding: 0 16px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  font-size: 18px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--text);
}
.kiosk .entry .ico { width: 20px; height: 20px; color: var(--accent2); }
.kiosk .entry .homebtn, .kiosk .bar .homebtn {
  flex: 0 0 56px; width: 56px; height: 56px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); color: var(--dim);
}
.kiosk .homebtn .ico { width: 26px; height: 26px; color: var(--dim); }
.kiosk .bar .homebtn { margin-left: 14px; }

/* The origin line sits in the gap between the entry row and the group line
   (the mockup's 150 px `.grp` margin). On the kiosk it renders ONLY the duck
   badge and the "Loading the rest of the list…" line (§5): there is no origin
   line on the wall's front (§6.1's column has none), the art overlay carries
   an announcement on the art face, and the title-row badge carries it on the
   list face. */
.kiosk .gap { height: 150px; display: flex; align-items: flex-end; padding-bottom: 14px; flex: 0 0 auto; }
.kiosk .gap .from { align-self: flex-end; font-size: 18px; }
.kiosk .gap .from.ann { height: 40px; font-size: 17px; }
.kiosk .gap .from:not(.ann):not(.loading) { visibility: hidden; }
.kiosk.pane-list .gap .from.ann { visibility: hidden; }
.kiosk.pane-art .gap .from.ann:not(.duck) { visibility: hidden; }
.kiosk .player.idle .gap .from { visibility: hidden; }
/* §7.21: a playing station is the one source whose name appears nowhere else on
   the art face (the title row carries the stream's current song), so its line
   takes the slot the announcement and loading lines use. */
.kiosk.pane-art .player.live:not(.idle) .gap .from:not(.ann) { visibility: visible; }

.kiosk .grp { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 19px; font-weight: 600; flex: 0 0 auto; }
.kiosk .grp .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); flex: 0 0 auto; }
.kiosk .grp .dot.off { background: #3a4358; box-shadow: none; }

/* Title row: title, the announcement badge (list face only), the list button
   at the right end (§5, §6.1, D31). */
.kiosk .ttlrow { display: flex; align-items: center; gap: 18px; margin-top: 8px; flex: 0 0 auto; }
.kiosk .ttl { margin-top: 0; flex: 1; min-width: 0; font-size: 50px; font-weight: 800; line-height: 1.12; letter-spacing: -.01em; }
.kiosk .player.idle .ttl:empty::before { content: "Make a selection"; }
.kiosk .player.idle .artist:empty::before { content: "Playlists or Search, top right"; }
/* The cold-clip paint (announcing, nothing frozen, nothing judged — kiosk.js
   `.coldclip`): §5 renders the reflect-state ALONE, the overlay over a neutral
   wash. The slate's copy and the ♪ card would otherwise say "idle" under an
   overlay while the dot and glyph read the pre-clip PLAYING (B3 review round
   2, 2026-09-12). */
.kiosk.coldclip .player.idle .ttl:empty::before,
.kiosk.coldclip .player.idle .artist:empty::before,
.kiosk.coldclip .player.idle .art::before { content: ""; }
.stage.kiosk .listbtn {
  width: 72px; height: 72px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--dim); flex: 0 0 auto;
}
.kiosk .listbtn .ico { width: 34px; height: 34px; }
.stage.kiosk .listbtn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.kiosk .player.idle .listbtn { opacity: .35; pointer-events: none; }
.kiosk .artist { margin-top: 8px; font-size: 27px; font-weight: 500; }

/* Progress with seek (§10 item 25): margin auto pushes the transport and
   volume to the foot of the column, as the mockup lays it out. base.css's
   24 canvas px of seek touch padding is kept but its LAYOUT effect is
   neutralised (negative bottom margin), or the bar and its time row sit 12
   canvas px above where the mockup draws them — every other front metric
   measured identical (B3 review round 2, 2026-09-12). */
.kiosk .prog, .kiosk .prog.seekable { margin-top: auto; padding: 12px 0; margin-bottom: -12px; }
.kiosk .prog .bar { height: 8px; }
.kiosk .prog .bar b { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
.kiosk .prog .t { font-size: 18px; margin-top: 12px; }

/* Transport: back · play/pause · stop · next at 88 / 112 canvas px (§6.1). */
.kiosk .tx { justify-content: space-between; gap: 0; margin-top: 34px; }
.kiosk .tx button { width: 88px; height: 88px; }
.kiosk .tx button .ico { width: 40px; height: 40px; }
.kiosk .tx button.play { width: 112px; height: 112px; }
.kiosk .tx button.play .ico { width: 52px; height: 52px; }
.kiosk .tx button[data-act="stop"] .ico { width: 34px; height: 34px; }
/* Idle (§6.1, §10 item 15): the transport dims PER KEY and is inert — except
   Stop, which stays live at normal strength while the group holds more than
   the device's default_zones (`.front.multi`). */
.kiosk .player.idle .tx button { opacity: .35; pointer-events: none; }
.kiosk .player.idle.multi .tx button[data-act="stop"] { opacity: 1; pointer-events: auto; }
/* While a clip runs the Announcer owns the transport and its restore replays
   the pre-clip state, so back / play-pause / next would be undone seconds
   later — inert for the clip (§5, §7.11). Stop is NOT dimmed here: a Stop
   arriving mid-clip is deferred server-side and honoured after the restore
   (§7.11, 202), so it keeps following the idle rules above. Recorded in §6.1's
   duck paragraph and in the mockup's `syncDuck()` (B3 review round 2,
   2026-09-12) — one rule to drop if Phil prefers the transport live. */
.kiosk.announcing .tx button[data-act="prev"],
.kiosk.announcing .tx button[data-act="toggle"],
.kiosk.announcing .tx button[data-act="next"] { opacity: .35; pointer-events: none; }

.kiosk .vol { gap: 18px; margin-top: 38px; }
.kiosk .vol .ico { width: 34px; height: 34px; }
.kiosk .vol .n { width: 56px; font-size: 26px; }
.kiosk input[type=range] { height: 64px; }
.kiosk input[type=range]::-webkit-slider-runnable-track { height: 14px; border-radius: 7px; }
.kiosk input[type=range]::-webkit-slider-thumb { width: 40px; height: 40px; margin-top: -13px; }
.kiosk input[type=range].sm { height: 56px; }
.kiosk input[type=range].sm::-webkit-slider-runnable-track { height: 10px; border-radius: 5px; }
.kiosk input[type=range].sm::-webkit-slider-thumb { width: 34px; height: 34px; margin-top: -12px; }
.kiosk .vol.ducked { opacity: .35; }

/* The announcement overlay on the art (§6.1 "Duck overlay"). Hidden on the
   list face, where the title-row badge carries the state (26b). */
/* `.annov`, not the mockup's `.duck`: the shared player's origin line carries
   `.from.ann.duck` for a wake-word duck, and a bare `.duck {display:none}`
   here hid that badge too. */
.kiosk .annov {
  position: absolute; left: 0; top: 40px; width: 640px; height: 640px; border-radius: 22px;
  background: rgba(11, 13, 18, .72); display: none; place-items: center; text-align: center; padding: 40px;
}
.kiosk.pane-art .annov.on { display: grid; }
.kiosk .annov .big { font-size: 34px; font-weight: 800; color: var(--gold, #ffd166); }
.kiosk .annov .sm { margin-top: 10px; font-size: 20px; color: var(--dim); }

/* The title-row badge on the list face — "Announcement", or the quieter
   "Listening · music turned down" for a wake-word duck (§6.1, 26b). */
.kiosk .dbadge {
  display: none; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px; flex: 0 0 auto;
  background: rgba(255, 209, 102, .14); border: 1px solid rgba(255, 209, 102, .55); color: var(--gold, #ffd166);
  font-size: 17px; font-weight: 700; white-space: nowrap;
}
.kiosk .dbadge .ico { width: 18px; height: 18px; }
.kiosk .dbadge.quiet { background: rgba(154, 164, 184, .12); border-color: var(--line); color: var(--dim); }
.kiosk.ducked.pane-list .dbadge { display: flex; }
.kiosk.ducked .player.idle .dbadge { display: none; }

/* ================================================================== BACK */
.kiosk .back { flex-direction: column; background: var(--bg); }
.kiosk .bar { height: 96px; display: flex; align-items: center; gap: 18px; padding: 0 24px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
/* The now-playing pill — the way home to the front (§6.1). `.kiosk .np`
   outranks base.css's `.stage button` reset, which it is. */
.kiosk .np {
  display: flex; align-items: center; gap: 14px; height: 72px; padding: 0 20px 0 10px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); max-width: 420px; min-width: 0; color: var(--text); text-align: left;
}
.kiosk .np > .ico { width: 26px; height: 26px; color: var(--accent2); flex: 0 0 auto; }
.kiosk .np .th { width: 52px; height: 52px; border-radius: 10px; background: var(--panel2) center/cover no-repeat; flex: 0 0 auto; }
.kiosk .np .tt { min-width: 0; line-height: 1.15; }
.kiosk .np .tt b { display: block; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kiosk .np .tt small { display: block; color: var(--dim); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kiosk .np .tt small.npd { display: none; color: var(--gold, #ffd166); }
.kiosk.ducked .np .tt small.npa { display: none; }
.kiosk.ducked .np .tt small.npd { display: block; }
.kiosk.ducked:not(.announcing) .np .tt small.npd { color: var(--dim); }
/* A clip into an IDLE kitchen: "an announcing group never counts as leaving
   idle" (§5) — the front keeps the blank slate and the pill keeps "Make a
   selection · Kitchen" rather than an announcement line over nothing playing.
   The Speakers-tab dimming (26b) still applies: the restore rewrites member
   volumes regardless. */
.kiosk.ducked.idle .np .tt small.npa { display: block; }
.kiosk.ducked.idle .np .tt small.npd { display: none; }
.kiosk .tabs { margin-left: auto; display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 5px; }
.kiosk .tabs button { height: 60px; padding: 0 30px; border-radius: 999px; font-size: 21px; font-weight: 700; color: var(--dim); }
.kiosk .tabs button.on { background: var(--accent); color: #fff; }
.kiosk .body { flex: 1; min-height: 0; position: relative; }
.kiosk .pane { position: absolute; inset: 0; display: none; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 22px 24px 28px; }
.kiosk .pane.on { display: block; }
/* Keyboard up (§8.1): 962x321 leaves the top ≈427 canvas px visible; the open
   pane is shortened to that band (kiosk.js writes --kbvis) so the typing
   state's live hits scroll where they can be seen. Nothing rescales. */
.kiosk.kbup .pane.on { bottom: auto; height: calc(var(--kbvis, 800px) - 96px); }
.kiosk .empty { color: var(--dim); font-size: 22px; font-weight: 600; padding: 24px 14px; }
.kiosk .empty.flatline { font-size: 19px; }

/* ---- Speakers (§4.2, §6.1) ---- */
.kiosk .zones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; }
.kiosk .z { display: flex; align-items: center; gap: 16px; height: 72px; padding: 0 18px 0 12px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.kiosk .z .tog { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 auto; background: var(--panel2); border: 2px solid var(--line); color: transparent; }
.kiosk .z .tog .ico { width: 30px; height: 30px; }
.kiosk .z.on { border-color: #33507f; background: linear-gradient(135deg, #1c2a48, #161d2c); }
.kiosk .z.on .tog { background: var(--accent); border-color: var(--accent); color: #fff; }
/* Kitchen drawn LOCKED, "always on" as the lock's own label (§6.1, 26d). */
.kiosk .z.lock .tog { background: var(--panel2); border-color: #33507f; color: var(--accent2); pointer-events: none; }
.kiosk .z .nm { width: 250px; font-size: 21px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 0 0 auto; }
.kiosk .z .nm small { display: block; color: var(--dim); font-size: 14px; font-weight: 500; }
/* A slider is live only for a zone ALREADY IN the group; a drafted-in zone's
   slider is inert until the selection applies (§4.2). */
.kiosk .z input[type=range] { opacity: .22; pointer-events: none; min-width: 0; }
.kiosk .z.live input[type=range] { opacity: 1; pointer-events: auto; }
.kiosk .z .n { width: 44px; text-align: right; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--dim); flex: 0 0 auto; }
.kiosk .z.on .n { color: var(--text); }
.kiosk .zfoot { margin-top: 18px; display: flex; align-items: center; gap: 18px; padding: 0 6px; color: var(--dim); font-size: 19px; font-weight: 600; }
.kiosk .zfoot .lbl { flex: 0 0 auto; }
.kiosk .zfoot > .ico { width: 30px; height: 30px; flex: 0 0 auto; }
.kiosk .zfoot .n { width: 56px; text-align: right; font-size: 24px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
/* Every volume control dimmed and inert while ducked / announcing (26b). */
.kiosk.ducked .z input[type=range], .kiosk.ducked .z .n { pointer-events: none; opacity: .22; }
.kiosk.ducked .z.live input[type=range], .kiosk.ducked .z.live .n { opacity: .35; }
.kiosk.ducked .zfoot { opacity: .35; pointer-events: none; }

/* ---- Playlists (§6.1) ---- */
.kiosk .playlists .page { display: none; }
.kiosk .playlists.onpage .grid { display: none; }
.kiosk .playlists.onpage .page { display: block; }
.kiosk .pl { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; }
/* §7.21: the radio band — same tiles, its own heading, gone when the roster is empty. */
.kiosk .radio { display: none; margin-bottom: 28px; }
.kiosk .radio.has { display: block; }
.kiosk .radio .sec { margin: 0 0 12px 2px; color: var(--dim); font-size: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.kiosk .radio .st { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; }
.kiosk .radio .tile .a { box-shadow: 0 10px 30px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(255, 255, 255, .06); }
.kiosk .tile { display: block; text-align: left; color: var(--text); width: 100%; min-width: 0; }
.kiosk .tile .a { aspect-ratio: 1; border-radius: 18px; background: var(--panel2) center/cover no-repeat; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); position: relative; }
.kiosk .tile .a .noart { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; text-align: center; color: var(--dim); font-size: 19px; font-weight: 700; line-height: 1.25; }
.kiosk .tile .t { margin-top: 10px; font-size: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kiosk .tile .t small { display: block; color: var(--dim); font-size: 15px; font-weight: 500; }
.kiosk .pl .sk.tile { border-radius: 18px; }
.kiosk .pl .empty { grid-column: 1 / -1; }
.kiosk .crumb { height: 52px; display: flex; align-items: center; gap: 8px; color: var(--accent2); font-size: 19px; font-weight: 600; margin: -6px 0 8px; }
.kiosk .crumb .ico { width: 20px; height: 20px; }
.kiosk .pld { display: flex; gap: 26px; align-items: flex-end; margin-bottom: 18px; }
.kiosk .pld .a { width: 200px; height: 200px; border-radius: 18px; background: var(--panel2) center/cover no-repeat; flex: 0 0 auto; position: relative; }
.kiosk .pld .a .noart { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; text-align: center; color: var(--dim); font-size: 20px; font-weight: 700; }
.kiosk .pld h2 { font-size: 38px; font-weight: 800; line-height: 1.1; }
.kiosk .pld .m { color: var(--dim); font-size: 19px; margin-top: 6px; min-height: 25px; }
.kiosk .pld .go { margin-top: 16px; display: flex; gap: 12px; }
.kiosk .pld .go button { height: 60px; padding: 0 26px; border-radius: 999px; font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.kiosk .pld .go .p { background: var(--text); color: #0b0d12; }
.kiosk .pld .go .s { background: var(--panel); border: 1px solid var(--line); color: var(--text); }
.kiosk .pld .go .ico { width: 22px; height: 22px; }
.kiosk .tr { height: 64px; gap: 16px; padding: 0 14px; }
.kiosk .tr .i { width: 36px; font-size: 18px; }
.kiosk .tr .th { width: 44px; height: 44px; border-radius: 8px; }
.kiosk .tr .t { font-size: 21px; }
.kiosk .tr .t small { display: inline; font-size: 17px; margin-left: 12px; }
.kiosk .tr .d { font-size: 18px; }
.kiosk .tracks .tr.dim { opacity: .45; pointer-events: none; }

/* ---- Search (§6.1) ---- */
.kiosk .sbox { display: flex; align-items: center; gap: 16px; height: 80px; padding: 0 24px; border-radius: 999px; background: var(--panel); border: 2px solid var(--accent); margin-bottom: 18px; }
.kiosk .sbox > .ico { width: 30px; height: 30px; color: var(--accent2); flex: 0 0 auto; }
.kiosk .sbox input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 28px; font-weight: 600; -webkit-appearance: none; appearance: none; padding: 0; }
.kiosk .sbox input::-webkit-search-cancel-button,
.kiosk .sbox input::-webkit-search-decoration,
.kiosk .sbox input::-webkit-search-results-button { -webkit-appearance: none; appearance: none; display: none; }
/* Weight stated: kid.css's bare `.sbox input::placeholder { font-weight: 500 }`
   otherwise reaches this field (the two shells share the page), and the
   mockup's placeholder inherits the field's 600 (B3 review round 2, 2026-09-12). */
.kiosk .sbox input::-webkit-input-placeholder { color: #5b6579; font-weight: 600; }
.kiosk .sbox input::placeholder { color: #5b6579; font-weight: 600; }
.kiosk .sbox .x { width: 56px; height: 56px; border-radius: 50%; background: var(--panel2); display: grid; place-items: center; color: var(--dim); flex: 0 0 auto; }
.kiosk .sbox .x .ico { width: 22px; height: 22px; }
.kiosk .sh { font-size: 15px; margin: 14px 0 6px 14px; }
/* No inset: the mockup's `.row5` runs to the pane edge (B3 review round 2). */
.kiosk .row5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; }

/* The kiosk's toast: centred, at the mockup's position (§8.3). On <body>, so
   scaled by --stage-scale like the kid shell's. */
body.shell-kiosk .toast { bottom: calc(24px * var(--stage-scale, 1)); font-size: 20px; }
