/* ============ Neon Kitchen ============
   The page is a dark tiled wall. Neon is SVG tube geometry, never text-shadow.
   Nothing here may be brighter than a tube. */

:root {
  --wall: #151011;
  --grout: #0d0a0b;
  --ink: #f6ece2;
  --ink-dim: #9b8578;
  --ink-warm: #d8a68c;
  --line: #241c1e;
  --measure: 62ch;
  --tile-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='136' height='68'%3E%3Crect width='136' height='68' fill='%23151011'/%3E%3Crect x='1' y='1' width='66' height='32' rx='2' fill='%231d1618'/%3E%3Crect x='69' y='1' width='66' height='32' rx='2' fill='%231b1516'/%3E%3Crect x='-33' y='35' width='66' height='32' rx='2' fill='%231c1517'/%3E%3Crect x='35' y='35' width='66' height='32' rx='2' fill='%231e1719'/%3E%3Crect x='103' y='35' width='66' height='32' rx='2' fill='%231a1415'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { color-scheme: dark; }

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: system-ui, "Segoe UI", sans-serif;
  line-height: 1.6;
  background-color: var(--wall);
  background-image: var(--tile-img);
  background-size: 68px 34px;
  background-attachment: fixed;
}

@font-face {
  font-family: "Barlow Condensed";
  src: url("/static/fonts/BarlowCondensed-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

h1, h2, h3, .card-title, .site-nav a, .btn, .chip, .dash-table th {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

main { max-width: 1060px; margin: 0 auto; padding: 1rem 1rem 0; }

.skip {
  position: absolute; left: -9999px;
  background: #000; color: var(--ink); padding: 0.6rem 1rem; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---- signs ---- */
.sign { display: block; width: 100%; height: auto; }
.wordmark { display: block; width: min(340px, 52vw); text-decoration: none; }

.site-header {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem;
  align-items: center; justify-content: space-between;
  padding: 1rem 1.2rem 0.4rem;
}
.site-nav { display: flex; gap: 1.3rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 1.05rem; opacity: 0.82; }
.site-nav a:hover, .site-nav a:focus-visible { opacity: 1; }

a { color: var(--ink-warm); }
:focus-visible { outline: 2px solid #ffd7c2; outline-offset: 3px; }

/* ---- the stainless counter ---- */
.site-footer { margin-top: 3.4rem; text-align: center; color: var(--ink-dim); }
.counter {
  height: 64px;
  border-top: 2px solid #4a4144;
  background: linear-gradient(180deg, #2a2427 0%, #171315 22%, #0b0809 100%);
}
.site-footer p { margin: 1rem 0 1.4rem; letter-spacing: 0.08em; font-size: 0.95rem; }

/* ---- body copy stays readable, never neon ---- */
.rant p, .about p { max-width: var(--measure); font-size: 1.05rem; color: var(--ink); }
.meta { color: var(--ink-dim); font-size: 0.92rem; }
.verdict { color: var(--ink-warm); font-style: italic; }

/* ---- seed wall (debug) ---- */
.portrait-svg { display: block; width: 100%; height: auto; }
.seed-grid { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.seed-grid figure { margin: 0; background: #0d0a0b; border: 1px solid var(--line); border-radius: 6px; }
.seed-grid figcaption { font-size: 0.7rem; color: var(--ink-dim); text-align: center; padding: 0 0 0.4rem; }

/* ---- hero ---- */
.hero { text-align: center; padding: 1.5rem 0 2rem; }
.hero-sign { margin: 0 auto; }
.hero-small { max-width: 260px; }
.hero-big { max-width: min(760px, 92vw); margin-top: -0.4rem; }
.tagline {
  margin: 1.4rem 0 0; color: var(--ink-dim);
  letter-spacing: 0.28em; text-transform: uppercase; font-size: 0.82rem;
}

/* ---- chips ---- */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.4rem; }
.chip {
  color: var(--ink); text-decoration: none; font-size: 0.92rem;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 0.2rem 0.85rem; background: #0f0c0d;
}
.chip.active, .chip:hover { border-color: #6b4b3a; background: #1a1315; }
.chip.small { font-size: 0.76rem; padding: 0.05rem 0.55rem; }

/* ---- cards ---- */
.cards { display: grid; gap: 1.6rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .cards { grid-template-columns: 1fr 1fr; } }

.card {
  background: linear-gradient(180deg, rgba(23,18,20,0), rgba(13,10,11,0.8));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem 1rem 1.1rem;
}
.card-link { text-decoration: none; color: inherit; display: block; }
.portrait { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; }
.card-title {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 0.8rem; font-size: 1.35rem; margin: 0.4rem 0 0.2rem;
}
.score-num { color: var(--ink-warm); white-space: nowrap; }

/* ---- empty state ---- */
.empty-basket { text-align: center; padding: 2.5rem 0; }
.empty-basket .sign { width: 180px; margin: 0 auto 1rem; }
.empty-basket p { color: var(--ink-dim); }

/* ---- pager ---- */
.pager { display: flex; justify-content: space-between; margin: 2rem 0 0; }
.pager-link {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--ink); text-transform: uppercase;
  font-family: "Barlow Condensed", sans-serif; letter-spacing: 0.08em;
}
.pager-link .sign { width: 54px; }
.pager-link.prev .sign { transform: scaleX(-1); }
.pager-link.next { margin-left: auto; flex-direction: row-reverse; }

/* ---- review page ---- */
.review-page { padding-top: 0.5rem; }
.review-hero { max-width: 520px; margin: 0 auto; }
.review-score { width: 110px; margin: -1.5rem auto 0.5rem; }
.review-page h1.card-title { font-size: clamp(1.8rem, 5vw, 2.6rem); justify-content: center; text-align: center; }
.review-page .meta { text-align: center; }
.review-page .verdict.big { font-size: 1.25rem; text-align: center; max-width: var(--measure); margin: 1rem auto 2rem; }
.rant { max-width: var(--measure); margin: 0 auto; }

/* ---- leaderboard ---- */
.board-title { max-width: 620px; margin: 0.5rem auto 2rem; }
.boards { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .boards { grid-template-columns: 1fr 1fr; } }
.board { display: grid; gap: 1.2rem; align-content: start; }
.lamp { width: 130px; margin: 0 auto -1.4rem; }
.board-heading { max-width: 420px; margin: 0 auto 0.4rem; }

/* ---- about ---- */
.about-mark { width: 74px; margin: 1rem auto 0; }
.about-title { max-width: 460px; margin: 0 auto 1.6rem; }
.about p { margin-inline: auto; }

/* ---- errors ---- */
.error-page { text-align: center; padding: 3.5rem 1rem; }
.error-sign { max-width: 620px; margin: 0 auto 1.4rem; }
.btn {
  display: inline-block; margin-top: 1rem;
  color: var(--ink); text-decoration: none;
  border: 1px solid var(--line); border-radius: 10px;
  padding: 0.5rem 1.1rem; background: #0f0c0d;
}
.btn:hover { border-color: #6b4b3a; background: #1a1315; }

/* ---- admin: deliberately flat. A phone tool, not a showpiece. ---- */
.admin-shell {
  background: #0b0809;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem 1.6rem;
  margin: 1rem 0 2rem;
}
.admin-shell h1 { font-size: 1.7rem; margin: 0.4rem 0 1rem; }
.admin-form form, .auth form { display: grid; gap: 0.9rem; max-width: 560px; }
.admin-form label, .auth label { display: grid; gap: 0.3rem; color: var(--ink-dim); }
input, textarea, select {
  background: #060404; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 0.6rem 0.7rem; font: inherit;
}
input:focus, textarea:focus { outline: none; border-color: #6b4b3a; }
label.check { display: flex; gap: 0.5rem; align-items: center; }
.dash-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1rem 0 1.4rem; align-items: center; }
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th, .dash-table td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); }
.dash-table th { color: var(--ink-dim); font-size: 0.95rem; }
.cat-list { list-style: none; padding: 0; display: grid; gap: 0.5rem; max-width: 420px; }
.cat-list form { display: flex; gap: 0.5rem; }
.cat-list input { flex: 1; }
.btn.primary { background: #2a1a1d; border-color: #6b4b3a; font-weight: 700; }
.btn.danger { border-color: #6b2a26; }
.btn.mom { border-color: #6b2a52; }
.btn.mom.on { background: #3a1330; }
.btn.small { padding: 0.15rem 0.6rem; font-size: 0.85rem; }
.with-bell { display: inline-flex; align-items: center; gap: 0.5rem; }
.with-bell .sign { width: 26px; }
.flash-error {
  border: 1px solid #6b2a26; background: #1c0e0f; color: #ffb4ae;
  border-radius: 10px; padding: 0.6rem 0.9rem;
}

/* ============ Diorama (Phase 1, DOM tier) ============
   Applied only when room.js boots and sets html.room. The no-JS page keeps
   the classic layout. Board text glow here is interim — Phase 2 replaces it
   with GL tube lettering. */

html.room body > .site-header,
html.room body > #main,
html.room body > .site-footer { display: none; }
html.room, html.room body { overflow: hidden; height: 100%; }

#stage-root {
  position: fixed; inset: 0; z-index: 10; overflow: hidden;
  background: #07060a;
}
.stage {
  position: absolute; top: 0; left: 0;
  width: 1600px; height: 900px;
  transform-origin: 0 0;
}
/* Planes stack over each other full-stage; only their interactive children
   may take the pointer, or the topmost plane eats every click. */
.plane { position: absolute; inset: 0; will-change: transform; pointer-events: none; }
.plane a, .plane button { pointer-events: auto; }

.p-wall {
  background-image: var(--tile-img, none);
  background-color: var(--wall);
  box-shadow: inset 0 0 240px 60px rgba(0, 0, 0, 0.82);
}
.p-pass .counter {
  position: absolute; left: 0; right: 0; top: 640px; height: 130px;
  background: linear-gradient(#3a3d42, #1b1c20 60%, #101114);
  border-top: 1px solid #565a61;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
}
.p-floor .checker {
  position: absolute; left: -8%; right: -8%; top: 770px; height: 130px;
  background: repeating-conic-gradient(#141317 0 25%, #0b0a0d 0 50%) 0 0/72px 72px;
  transform: perspective(120px) rotateX(38deg);
  transform-origin: top; opacity: 0.9;
}

.stage .wordmark-slot { position: absolute; top: 36px; right: 210px; width: 420px; }
.stage .wordmark-slot .wm-small { width: 40%; margin-left: 4px; }
.stage .wall-count {
  position: absolute; top: 200px; right: 230px;
  color: #9fd8d4; letter-spacing: 0.2em; font-size: 13px; opacity: 0.8;
}
.stage .nav-signs { position: absolute; top: 40px; left: 210px; display: flex; gap: 28px; }
.stage .nav-signs a { display: block; width: 120px; opacity: 0.55; }
.stage .nav-signs a[aria-current="true"], .stage .nav-signs a:hover,
.stage .nav-signs a:focus-visible { opacity: 1; }
.stage .nav-signs a[data-nav="nav-fame"] { width: 230px; }

.menu-board {
  position: absolute; left: 210px; top: 130px; width: 520px;
  background: rgba(6, 5, 8, 0.75); border: 2px solid #3a3037; border-radius: 6px;
  padding: 14px 16px; box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.7);
}
.menu-board .tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.menu-board .tabs button {
  background: none; border: 1px solid #3a3037; border-radius: 4px;
  color: var(--ink-dim); font: inherit; font-size: 12px; padding: 2px 8px; cursor: pointer;
}
.menu-board .tabs button[aria-pressed="true"] { color: #ffd76a; border-color: #ffd76a; }
.menu-board ol { list-style: none; margin: 0; padding: 0; }
.menu-board button.row {
  display: flex; justify-content: space-between; gap: 16px; width: 100%;
  background: none; border: 0; cursor: pointer; padding: 4px 8px; border-radius: 4px;
  font-family: Georgia, serif; font-weight: 700; letter-spacing: 0.08em;
  font-size: 15px; color: #b98f83; text-shadow: 0 0 6px rgba(255, 90, 70, 0.35);
}
.menu-board button.row .btitle {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left;
}
.menu-board button.row .bscore { color: #ffd76a; text-shadow: 0 0 8px rgba(255, 184, 36, 0.6); }
.menu-board button.row[aria-current="true"] {
  color: #ff5a4d; background: rgba(255, 90, 70, 0.10);
  outline: 1px solid rgba(255, 90, 70, 0.45);
  text-shadow: 0 0 2px #fff, 0 0 9px #ff3b2e;
}

.rail-bar {
  position: absolute; left: 0; right: 0; top: 430px;
  border-top: 4px solid #44484f; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55);
}
.printer {
  position: absolute; right: 216px; top: 396px; width: 90px; height: 40px;
  background: linear-gradient(#2e3136, #17181c);
  border: 1px solid #4a4e55; border-radius: 5px 5px 3px 3px;
}
.tickets { position: absolute; left: 0; right: 0; top: 402px; height: 210px; }
.ticket {
  position: absolute; top: 0; width: 190px; padding: 10px 12px 14px;
  background: #f3ead6; color: #33302a; border-radius: 2px;
  font: 13px/1.45 "Courier New", monospace; text-align: left;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.65);
  border: 0; cursor: pointer;
  transition: transform 0.25s ease, opacity 0.25s ease, left 0.25s ease;
}
.ticket::before {
  content: ""; display: block; width: 11px; height: 11px; border-radius: 50%;
  background: #7a7f87; margin: -16px auto 6px;
}
.ticket .tt { font-weight: 700; display: block; }
.ticket .tsc { float: right; font-weight: 700; color: #a33; }
.ticket[aria-current="true"] {
  transform: scale(1.12); z-index: 3;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8), 0 0 22px rgba(255, 120, 90, 0.16);
}
.ticket:not([aria-current="true"]) { opacity: 0.55; }

.order { position: absolute; left: 690px; top: 470px; width: 320px; text-align: center; }
.order img { width: 300px; height: 225px; }
.order .score-slot { position: absolute; left: -140px; top: 40px; width: 120px; }

.keys-card {
  position: absolute; left: 214px; top: 700px; padding: 6px 10px;
  background: #e8e2d2; color: #4a463d; border-radius: 3px; transform: rotate(-1.5deg);
  font: 11px/1.5 "Courier New", monospace; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}

.receipt-layer {
  position: absolute; inset: 0; display: none;
  align-items: flex-start; justify-content: center; z-index: 5;
}
html.room .scene-review .receipt-layer { display: flex; }
.receipt {
  margin-top: 60px; width: 520px; max-width: 44vw; max-height: 78vh;
  overflow-y: auto;                      /* the only scrollable surface */
  background: #f6efdd; color: #35322b; border-radius: 2px;
  padding: 22px 26px 30px; font: 14px/1.6 "Courier New", monospace;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.78);
}
.receipt .hd { text-align: center; border-bottom: 1px dashed #35322b; padding-bottom: 10px; margin-bottom: 12px; }
.receipt .row { display: flex; justify-content: space-between; gap: 16px; }
.receipt .stamp {
  float: right; margin: 4px 0 8px 12px; transform: rotate(8deg);
  border: 3px solid #b3372c; color: #b3372c; border-radius: 6px;
  font: 700 26px/1 Georgia, serif; padding: 5px 12px; opacity: 0.9;
}
.receipt .rule { border-top: 1px dashed #35322b; margin: 12px 0; }

.stage-arrow {
  position: absolute; top: 430px; width: 54px; height: 70px;
  background: none; border: 0; cursor: pointer; z-index: 4;
}
.stage-arrow svg { width: 100%; height: 100%; }
.stage-arrow.prev { left: 150px; }
.stage-arrow.next { right: 150px; transform: scaleX(-1); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
:where(#stage-root) button:focus-visible, :where(#stage-root) a:focus-visible {
  outline: 2px solid #9fd8d4; outline-offset: 3px;
}

.scene-fade { transition: opacity 0.4s ease; }
@media (prefers-reduced-motion: reduce) {
  #stage-root * { transition: none !important; animation: none !important; }
}

/* ============ GL tier ============
   When room-gl.js boots it sets html.gl: the GPU paints the room and all
   glass, and the DOM keeps layout, input and accessibility. Anchors stay in
   place but their interim visuals go quiet. */

.room-gl-canvas { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
#stage-root .stage { z-index: 1; }

html.gl .p-wall { background: none; box-shadow: none; }
html.gl .p-pass .counter { background: none; border-top: 0; box-shadow: none; }
html.gl .p-floor .checker { background: none; }
html.gl .wordmark-slot svg, html.gl .nav-signs svg,
html.gl .order img, html.gl .order .score-slot svg,
html.gl .stage-arrow svg { opacity: 0; }
html.gl .wall-count { color: transparent; text-shadow: none; }
html.gl .menu-board button.row,
html.gl .menu-board button.row .bscore { color: transparent; text-shadow: none; }
html.gl .menu-board button.row[aria-current="true"] { color: transparent; text-shadow: none; }

.review-title-slot {
  position: absolute; top: 150px; left: 260px; width: 700px; height: 110px;
  display: none; visibility: hidden;
}
html.room .scene-review .p-wall .review-title-slot { visibility: hidden; }

/* ---- scene layers: leaderboard + about ---- */
.lb-layer, .about-layer { display: none; }
#stage-root.scene-leaderboard .lb-layer { display: flex; }
#stage-root.scene-about .about-layer { display: block; }
#stage-root.scene-leaderboard .menu-board, #stage-root.scene-about .menu-board,
#stage-root.scene-leaderboard .tickets, #stage-root.scene-about .tickets,
#stage-root.scene-leaderboard .rail-bar, #stage-root.scene-about .rail-bar,
#stage-root.scene-leaderboard .printer, #stage-root.scene-about .printer,
#stage-root.scene-leaderboard .order, #stage-root.scene-about .order,
#stage-root.scene-leaderboard .stage-arrow, #stage-root.scene-about .stage-arrow { display: none; }

.lb-layer {
  position: absolute; left: 230px; right: 230px; top: 150px; gap: 80px;
}
.lb-panel {
  flex: 1; position: relative; padding: 16px 18px 14px; border-radius: 6px;
  background: rgba(6, 5, 8, 0.75); border: 2px solid #3a3037;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.7);
}
.lb-panel .lamp-slot { width: 190px; height: 130px; margin: -120px auto 0; }
.lb-panel .lb-head {
  height: 62px; margin: 4px 10px 12px; text-align: center;
  font-family: Georgia, serif; font-weight: 700; letter-spacing: 0.1em;
  font-size: 24px; line-height: 62px; color: #b98f83;
}
.lb-panel ol { list-style: none; margin: 0; padding: 0; }
.lb-panel button.row {
  display: flex; justify-content: space-between; gap: 16px; width: 100%;
  background: none; border: 0; cursor: pointer; padding: 5px 8px; border-radius: 4px;
  font-family: Georgia, serif; font-weight: 700; letter-spacing: 0.08em;
  font-size: 16px; color: #b98f83;
}
.lb-panel button.row .btitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-panel button.row .bscore { color: #ffd76a; }
.lb-panel button.row:hover, .lb-panel button.row:focus-visible { background: rgba(255, 90, 70, 0.10); }

.about-layer { position: absolute; left: 0; right: 0; top: 90px; }
.about-layer .fork-slot { width: 130px; height: 160px; margin: 0 auto; }
.about-layer .about-head {
  width: 620px; height: 86px; margin: 8px auto 4px; text-align: center;
  font-family: Georgia, serif; font-weight: 700; font-size: 30px; line-height: 86px;
  letter-spacing: 0.1em; color: #9fd8d4;
}
.about-layer .paper-note {
  width: 540px; margin: 22px auto 0; padding: 18px 22px;
  background: #f0e7d3; color: #35322b; border-radius: 2px;
  font: 13.5px/1.6 "Courier New", monospace; transform: rotate(-0.8deg);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.7);
}
.about-layer .paper-note p { margin: 0 0 10px; }
.about-layer .paper-note p:last-child { margin: 0; font-weight: 700; }

html.gl .lb-panel .lb-head, html.gl .lb-panel button.row,
html.gl .lb-panel button.row .bscore, html.gl .about-layer .about-head { color: transparent; }

#stage-root.scene-leaderboard .wordmark-slot, #stage-root.scene-about .wordmark-slot,
#stage-root.scene-leaderboard .wall-count, #stage-root.scene-about .wall-count { display: none; }

/* ---- sound switch + printer moment ---- */
.sound-switch {
  position: absolute; right: 240px; top: 700px; padding: 6px 12px;
  background: #e8e2d2; color: #4a463d; border: 0; border-radius: 3px;
  transform: rotate(1.2deg); cursor: pointer;
  font: 11px/1.4 "Courier New", monospace; letter-spacing: 0.08em;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}
.sound-switch[aria-pressed="true"] { background: #ffd76a; }

@keyframes ticket-print {
  0% { transform: translate(340px, -36px) rotate(6deg); opacity: 0; }
  55% { opacity: 1; }
  80% { transform: translate(-8px, 3px) rotate(-1deg) scale(1.06); }
  100% { transform: scale(1.12); }
}
.ticket.printing[aria-current="true"] { animation: ticket-print 0.65s ease-out; }

/* ---- breaker + service panel ---- */
.breaker {
  position: absolute; right: 246px; top: 648px; width: 44px; height: 62px;
  background: linear-gradient(#33363b, #1c1e22); border: 1px solid #4a4e55;
  border-radius: 3px; cursor: pointer; pointer-events: auto;
}
.breaker::after {
  content: ""; position: absolute; left: 14px; right: 14px; top: 12px; height: 20px;
  background: #0c0d0f; border-radius: 2px; box-shadow: inset 0 2px 3px rgba(0,0,0,.8);
}
#stage-root.scene-leaderboard .breaker, #stage-root.scene-about .breaker { display: none; }

.breaker-open {
  position: fixed; right: 12px; top: 12px; bottom: 12px; width: 360px; z-index: 40;
  overflow-y: auto; padding: 14px 16px; border-radius: 6px;
  background: #17181c; border: 1px solid #4a4e55; color: #cfd3da;
  font: 12px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.6);
}
.breaker-open header { font-weight: 700; letter-spacing: 0.1em; margin-bottom: 10px; }
.bp-close {
  float: right; background: none; border: 1px solid #4a4e55; color: inherit;
  border-radius: 4px; width: 26px; height: 26px; cursor: pointer; font-size: 15px;
}
.bp-stats { margin: 6px 0 12px; color: #9fd8d4; }
.bp-row { display: grid; grid-template-columns: 92px 1fr 44px; gap: 8px; align-items: center; margin: 7px 0; }
.bp-row input[type="range"] { width: 100%; accent-color: #ff5a4d; }
.bp-copy {
  margin: 10px 0 4px; padding: 6px 10px; cursor: pointer;
  background: none; border: 1px solid #4a4e55; color: inherit; border-radius: 4px;
  font: inherit; letter-spacing: 0.08em;
}
.bp-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.bp-thumbs figure { margin: 0; }
.bp-thumbs canvas { width: 100%; border: 1px solid #33363b; border-radius: 3px; background: #000; }
.bp-thumbs figcaption { opacity: 0.65; margin-top: 2px; }

/* ---- portrait recomposition (the 900x1600 stage) ---- */
.board-toggle { display: none; }
#stage-root.stage-portrait .board-toggle {
  display: block; position: absolute; left: 64px; top: 268px; padding: 6px 14px;
  background: #e8e2d2; color: #4a463d; border: 0; border-radius: 3px;
  transform: rotate(-1deg); cursor: pointer; pointer-events: auto;
  font: 13px/1.4 "Courier New", monospace; letter-spacing: 0.08em;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5); z-index: 6;
}
#stage-root.stage-portrait .wordmark-slot { left: 50%; right: auto; top: 28px; width: 500px; transform: translateX(-50%); }
#stage-root.stage-portrait .wall-count { right: 50%; transform: translateX(50%); top: 205px; }
#stage-root.stage-portrait .nav-signs { left: 50%; transform: translateX(-50%); top: 258px; gap: 20px; }
#stage-root.stage-portrait .nav-signs a { width: 96px; }
#stage-root.stage-portrait .nav-signs a[data-nav="nav-fame"] { width: 186px; }
#stage-root.stage-portrait .menu-board { display: none; left: 64px; right: 64px; width: auto; top: 330px; z-index: 6; }
#stage-root.stage-portrait.board-open .menu-board { display: block; }
#stage-root.stage-portrait .rail-bar { top: 830px; }
#stage-root.stage-portrait .tickets { top: 800px; }
#stage-root.stage-portrait .printer { right: 48px; top: 794px; }
#stage-root.stage-portrait .stage-arrow { top: 828px; }
#stage-root.stage-portrait .stage-arrow.prev { left: 12px; }
#stage-root.stage-portrait .stage-arrow.next { right: 12px; }
#stage-root.stage-portrait .order { left: 50%; transform: translateX(-50%); top: 1058px; }
#stage-root.stage-portrait .order .score-slot { left: -128px; }
#stage-root.stage-portrait .keys-card { display: none; }
#stage-root.stage-portrait .sound-switch { right: auto; left: 50%; transform: translateX(-50%) rotate(1.2deg); top: 1330px; }
#stage-root.stage-portrait .breaker { right: 56px; top: 1300px; }
#stage-root.stage-portrait .p-pass .counter { top: 1250px; height: 150px; }
#stage-root.stage-portrait .p-floor .checker { top: 1420px; height: 180px; }
#stage-root.stage-portrait .review-title-slot { left: 60px; right: 60px; width: auto; top: 300px; }
#stage-root.stage-portrait .receipt { width: auto; max-width: 88vw; margin-top: 40px; max-height: 72vh; }
#stage-root.stage-portrait .lb-layer { flex-direction: column; left: 70px; right: 70px; top: 320px; gap: 140px; }
#stage-root.stage-portrait .lb-panel .lamp-slot { width: 160px; height: 110px; margin-top: -104px; }
#stage-root.stage-portrait .about-layer { top: 320px; }
#stage-root.stage-portrait .about-layer .about-head { width: auto; margin-inline: 60px; }
#stage-root.stage-portrait .about-layer .paper-note { width: auto; margin-inline: 70px; }
