/* /door, redesigned: the operator kit (paste/op-shell.css) carried onto the
   shared Tool shell. Loaded last. The shell's markup is paste/tool.js, which
   /console, /admin and /post share, so it is dressed here, scoped to this
   page's body, rather than edited. Verdict colours are status colours and
   never follow the accent. */

/* ── Tokens and grain ───────────────────────────────────────────────────── */
body.d-scene { --ink3: #5B574F; --pad: clamp(24px, 3.2vw, 56px); font-size: 17px; }
:root[data-theme="dark"] body.d-scene { --ink3: #B3A996; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body.d-scene { --ink3: #B3A996; } }
/* op-shell.css hides the page grain for its own .xroot; the door keeps the body's. */
body.d-scene::after { display: block; }

.pu-boot { padding: 32px var(--tg); min-height: 100vh; background: var(--ground); }

/* ── The shell: a full-height sidebar on the ground, the page beside it ── */
body.d-scene .side { gap: 22px; padding: 24px 16px 22px 20px; background: var(--ground); overflow-x: hidden; }
@media (min-width: 961px) {
  body.d-scene .tool-shell { grid-template-columns: 292px minmax(0, 1fr); }
  body.d-scene .side { background: none; }
}
body.d-scene .side-brand { gap: 9px; padding: 0; font-size: 19px; letter-spacing: .03em; }
body.d-scene .side-brand svg { width: 26px; height: 26px; }
body.d-scene .side-brand .tool-name { color: var(--ink3); font-weight: 650; letter-spacing: -.01em; }

/* Which night: a slip taped to the top of the sidebar. */
body.d-scene .side-place { grid-template-columns: 46px minmax(0, 1fr) 18px; gap: 12px; padding: 12px 12px 14px; margin-top: 6px; --tilt: -.9deg; }
body.d-scene .side-place img { width: 46px; height: 46px; object-fit: cover; border-radius: 3px; }
body.d-scene .side-place b { font-size: 16px; line-height: 1.25; white-space: normal; }
body.d-scene .side-place small { gap: 7px; margin-top: 2px; font-size: 14px; font-weight: 550; color: var(--ink2); }
body.d-scene .side-place small .sdot { width: 8px; height: 8px; }
body.d-scene .side-place .ico { color: var(--ink2); }
body.d-scene .side-place:focus-visible { outline: 2.5px solid var(--green); outline-offset: 4px; }

/* The nav: ink and an underline for where you are, never a fill or green. */
body.d-scene .side-nav { gap: 1px; }
body.d-scene .side-nav .grp { margin: 18px 10px 6px; font-size: 12px; font-weight: 750; color: var(--ink3); }
body.d-scene .side-nav a { height: 42px; gap: 12px; font-size: 16px; font-weight: 650; color: var(--ink2); }
body.d-scene .side-nav a .ico { width: 20px; height: 20px; }
body.d-scene .side-nav a[aria-current] { background: none; color: var(--ink); font-weight: 750; text-decoration: none; }
body.d-scene .side-nav a[aria-current] .ico { color: var(--ink); }
body.d-scene .side-nav a[aria-current] > span:not(.count) { text-decoration: underline; text-decoration-thickness: 2.5px; text-underline-offset: 6px; }
@media (hover: hover) { body.d-scene .side-nav a:not([aria-current]):hover { background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink); } }

/* The note: a notched mustard stub with a dashed edge, the board's plan slip. */
body.d-scene .side-note { position: relative; isolation: isolate; margin-top: auto; padding: 16px 18px 18px; border-radius: 0; background: none; color: #1D1F22; font-size: 15px; rotate: .8deg; filter: drop-shadow(0 1px .5px rgba(70,50,20,.2)) drop-shadow(0 12px 12px rgba(50,34,12,.18)); }
body.d-scene .side-note::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--fc, var(--mustard));
  -webkit-mask: radial-gradient(circle 9px at 0 50%, #0000 97%, #000) 0 0 / 51% 100% no-repeat, radial-gradient(circle 9px at 100% 50%, #0000 97%, #000) 100% 0 / 51% 100% no-repeat;
  mask: radial-gradient(circle 9px at 0 50%, #0000 97%, #000) 0 0 / 51% 100% no-repeat, radial-gradient(circle 9px at 100% 50%, #0000 97%, #000) 100% 0 / 51% 100% no-repeat; }
body.d-scene .side-note::after { content: ''; position: absolute; inset: 6px; border-radius: 3px; outline: 1.3px dashed rgba(29,31,34,.4); pointer-events: none; }
body.d-scene .side-note b { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.02em; color: #1D1F22; }
body.d-scene .side-note b .k { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(29,31,34,.72); }
body.d-scene .side-note p { margin-top: 2px; font-size: 15px; line-height: 1.4; color: rgba(29,31,34,.78); }

body.d-scene .side-foot { gap: 1px; }
body.d-scene .side-foot > a, body.d-scene .side-foot > button { height: 42px; gap: 12px; font-size: 16px; color: var(--ink2); }
body.d-scene .side-foot .ico { width: 20px; height: 20px; }
body.d-scene .legal-links, body.d-scene .side-foot .legal-links a { font-size: 13.5px; color: var(--ink3); }

/* The top bar: the crumb, a wide search, the theme switch and you. */
body.d-scene .topbar { min-height: 80px; gap: 10px; padding: 0 var(--pad); }
body.d-scene .topbar .crumb { gap: 10px; font-size: 16px; font-weight: 600; color: var(--ink3); }
body.d-scene .search-btn { height: 44px; min-width: 300px; padding: 0 8px 0 16px; background: var(--ground2); color: var(--ink3); font-size: 16px; font-weight: 550; }
body.d-scene .search-btn kbd { min-width: 0; height: auto; padding: 3px 8px; border-radius: 7px; box-shadow: none; font-size: 12.5px; }
body.d-scene .topbar .theme { gap: 2px; padding: 3px; background: none; box-shadow: inset 0 0 0 1.5px var(--rule2); }
body.d-scene .topbar .theme button { width: 36px; height: 36px; }
body.d-scene .topbar .theme button svg { width: 18px; height: 18px; }
body.d-scene .topbar .theme button[aria-pressed="true"] { box-shadow: var(--shadow); }
body.d-scene .topbar .avatar { width: 44px; height: 44px; font-size: 15px; }
body.d-scene .menu-tool { width: 44px; height: 44px; }

body.d-scene .page { padding: 0 var(--pad) 80px; overflow-x: clip; }

/* ── Type and controls at the kit's sizes ──────────────────────────────── */
body.d-scene .btn { font-size: 16px; }
body.d-scene .btn.sm { --bh: 42px; padding: 0 18px; font-size: 16px; }
body.d-scene .lbl { font-size: 16px; color: var(--ink); }
body.d-scene .hint { font-size: 15px; color: var(--ink2); }
body.d-scene .hint.err { color: var(--danger); }
body.d-scene .small { font-size: 15px; color: var(--ink2); }
body.d-scene .kick { font-size: 13px; }
body.d-scene .xfoot a { color: var(--ink3); }
@media (hover: hover) { body.d-scene .xfoot a:hover { color: var(--ink); } }
body.d-scene button.link { padding: 0 0 1px; font: inherit; font-weight: 700; }

/* ── The statement and its stage ───────────────────────────────────────── */
body.d-scene .dhero { padding-top: clamp(4px, 1.6vw, 24px); }
body.d-scene .h2 .rest { font-weight: 400; color: var(--ink2); letter-spacing: -.03em; }
body.d-scene .dacts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
body.d-scene .dhero > aside, body.d-scene .dhero > .dway, body.d-scene .dhero > .wcounter { justify-self: center; }

/* The ticket: op-shell's, with its stub width a variable so a phone can narrow it. */
body.d-scene .dticket { --stub: 150px; grid-template-columns: minmax(0, 1fr) var(--stub); }
body.d-scene .dticket::before {
  -webkit-mask: radial-gradient(circle 14px at calc(100% - var(--stub)) 0, #0000 96%, #000) 0 0 / 100% 51% no-repeat, radial-gradient(circle 14px at calc(100% - var(--stub)) 100%, #0000 96%, #000) 0 100% / 100% 51% no-repeat;
  mask: radial-gradient(circle 14px at calc(100% - var(--stub)) 0, #0000 96%, #000) 0 0 / 100% 51% no-repeat, radial-gradient(circle 14px at calc(100% - var(--stub)) 100%, #0000 96%, #000) 0 100% / 100% 51% no-repeat; }
body.d-scene .dticket h3 { overflow-wrap: anywhere; }
body.d-scene .dticket .stubp b { overflow-wrap: anywhere; }
body.d-scene .dticket .bar { grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); }
body.d-scene .dticket .bar.meter { display: block; height: 10px; border-radius: 99px; background: rgba(29,31,34,.14); overflow: hidden; }
body.d-scene .dticket .bar.meter i { display: block; height: 100%; }
body.d-scene .dticket .count.none span { font-size: 18px; font-weight: 700; color: #1D1F22; }
body.d-scene .dticket .count b.bump { display: inline-block; animation: d-bump 380ms var(--ease-spring); }
@keyframes d-bump { 40% { transform: scale(1.12); } }

/* ── Your doors ─────────────────────────────────────────────────────────── */
body.d-scene .dways { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
body.d-scene .dway .btn.quiet { background: transparent; color: #1D1F22; box-shadow: inset 0 0 0 1.5px #1D1F22; }
/* .dfoot, not op-shell's .foot: components.css owns .foot for the site footer. */
body.d-scene .dway .dfoot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 28px; }
body.d-scene .dway .dfoot .btn { flex: none; }
body.d-scene .dnote .who { display: inline; font-size: inherit; font-weight: 750; }
body.d-scene .dnote.dnone { margin-top: 0; }
body.d-scene .dmore { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 30px 24px; }
body.d-scene .dmini { display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 24px; }
body.d-scene .dmini .k { font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); }
body.d-scene .dmini h3 { font-size: 26px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; overflow-wrap: anywhere; }
body.d-scene .dmini p { font-size: 16px; color: var(--ink2); }
body.d-scene .dmini .fine { font-size: 15px; color: var(--ink3); }
body.d-scene .dmini .btn { align-self: flex-start; margin-top: 10px; }

/* ── The gate ───────────────────────────────────────────────────────────── */
body.d-scene .gatepage { display: flex; flex-direction: column; }
body.d-scene .gate-hero { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
body.d-scene .gate-hero .xh1 { font-size: clamp(36px, 3.8vw, 60px); }
body.d-scene .gate-hero .xline { max-width: 40em; }
body.d-scene .gate-acts { margin-top: 0; justify-content: flex-end; }
body.d-scene .gate { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); grid-template-areas: "cam verdict" "cam type"; grid-template-rows: 1fr auto; gap: 24px clamp(22px, 2.4vw, 36px); margin-top: clamp(32px, 3.4vw, 52px); }

/* The viewfinder, with its one button on it. Dark in both themes: it is a camera. */
body.d-scene .viewfinder { grid-area: cam; position: relative; overflow: hidden; align-self: start; border-radius: 12px; aspect-ratio: 4 / 3; background: #1D1F22; box-shadow: var(--shadow-lift); }
body.d-scene .viewfinder video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 300ms ease; }
body.d-scene .viewfinder.live video { opacity: 1; }
body.d-scene .vf-frame { position: absolute; left: 50%; top: 43%; width: min(46%, 62vw); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.38), inset 0 0 0 3px rgba(251,248,241,.9); }
body.d-scene .vf-line { position: absolute; left: 29%; right: 29%; top: 43%; height: 2px; background: var(--mint); box-shadow: 0 0 12px var(--mint); opacity: 0; }
body.d-scene .viewfinder.live .vf-line { opacity: 1; animation: vfscan 1.4s var(--ease-io) infinite alternate; }
@keyframes vfscan { from { transform: translateY(-80px); } to { transform: translateY(80px); } }
body.d-scene .vf-cap { position: absolute; left: 14px; top: 14px; display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border-radius: 99px; background: rgba(251,248,241,.92); color: #1D1F22; font-size: 14px; font-weight: 750; }
body.d-scene .gate-scan { position: absolute; z-index: 2; left: 50%; bottom: 18px; translate: -50% 0; min-width: min(300px, calc(100% - 32px)); background: #FBF8F1; color: #1D1F22; box-shadow: 0 14px 26px -12px rgba(0,0,0,.8); }
body.d-scene .gate-scan[aria-pressed="true"] { background: rgba(29,31,34,.78); color: #FBF8F1; box-shadow: inset 0 0 0 1.5px rgba(251,248,241,.8); }
body.d-scene .gate-scan:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }

/* The verdict: an enamel plate, screwed to the wall, readable at arm's length.
   Fixed colours in both themes so the small line under it keeps AA contrast. */
body.d-scene .gate-verdict { grid-area: verdict; display: grid; }
body.d-scene .verdict { --vc: #12754A; position: relative; display: grid; align-content: center; gap: 4px; min-height: 230px; padding: clamp(30px, 3vw, 46px) clamp(24px, 3vw, 44px); border-radius: 18px; background-color: var(--vc); background-image: linear-gradient(160deg, rgba(255,255,255,.1), rgba(255,255,255,0) 34%); color: #FBF8F1; box-shadow: 0 0 0 4px var(--ground), 0 0 0 5.5px color-mix(in srgb, var(--ink) 16%, transparent), 0 22px 34px -20px rgba(0,0,0,.6); }
body.d-scene .verdict::before, body.d-scene .verdict::after { content: ''; position: absolute; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.8), rgba(255,255,255,.3) 45%, rgba(0,0,0,.35)); box-shadow: inset 0 0 0 1px rgba(0,0,0,.22); }
body.d-scene .verdict::before { left: 14px; }
body.d-scene .verdict::after { right: 14px; }
body.d-scene .verdict .vk { font-weight: 800; font-size: clamp(60px, 7vw, 116px); line-height: .9; letter-spacing: -.05em; overflow-wrap: anywhere; }
body.d-scene .verdict b { margin-top: 12px; font-weight: 800; font-size: clamp(22px, 2vw, 30px); letter-spacing: -.025em; line-height: 1.15; overflow-wrap: anywhere; }
body.d-scene .verdict small { font-size: 16px; font-weight: 600; max-width: 30em; }
body.d-scene .verdict.go { --vc: #12754A; }
body.d-scene .verdict.back { --vc: #E0A126; color: #2A1E06; }
body.d-scene .verdict.no { --vc: #B42F37; }
body.d-scene .verdict:not(.idle) { animation: vpop 420ms var(--ease-spring); }
@keyframes vpop { from { transform: scale(.96); opacity: .4; } }
/* Waiting: the plate's outline, dashed on the ground, until a code comes in. */
body.d-scene .verdict.idle { background: none; color: var(--ink); box-shadow: none; outline: 2px dashed var(--rule2); outline-offset: -2px; }
body.d-scene .verdict.idle::before, body.d-scene .verdict.idle::after { display: none; }
body.d-scene .verdict.idle .vk { color: var(--ink3); }
body.d-scene .verdict.idle small { color: var(--ink2); }

body.d-scene .typeit { grid-area: type; }
body.d-scene .trow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
body.d-scene .typeit .inp { min-height: 56px; padding: 0 22px; border-radius: 99px; background: var(--sheet); box-shadow: inset 0 0 0 1.5px var(--rule2); font-weight: 800; font-size: 19px; letter-spacing: .12em; text-transform: uppercase; }
body.d-scene .typeit .inp::placeholder { letter-spacing: .12em; color: var(--ink3); }

body.d-scene .gate-night { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 4vw, 64px); align-items: start; }
body.d-scene .gate-night.solo { grid-template-columns: minmax(0, 600px); }
body.d-scene .gate-night .dticket { margin-top: 10px; }
body.d-scene .dscans { display: grid; gap: 10px; }
body.d-scene .dscan { display: flex; align-items: center; gap: 14px; min-height: 66px; padding: 12px 18px; border-radius: 12px; background: var(--sheet); box-shadow: var(--shadow); }
body.d-scene .dscan .grow { flex: 1; min-width: 0; }
body.d-scene .dscan b { display: block; font-size: 17px; font-weight: 750; overflow-wrap: anywhere; }
body.d-scene .dscan small { display: block; font-size: 15px; color: var(--ink2); }
body.d-scene .dscan time { font-size: 15px; font-weight: 700; color: var(--ink2); white-space: nowrap; font-variant-numeric: tabular-nums; }
body.d-scene .vdot { width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--s-open); }
body.d-scene .vdot.back { background: var(--s-busy); }
body.d-scene .vdot.no { background: var(--s-sold); }

/* ── Walk-up ────────────────────────────────────────────────────────────── */
body.d-scene .wcounter { display: grid; gap: 20px; width: min(560px, 100%); }
body.d-scene .wticket { width: 100%; }
body.d-scene .wnum { margin-top: 10px; font-weight: 800; font-size: clamp(72px, 8vw, 120px); line-height: .9; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
body.d-scene .wnum.wait { font-size: clamp(30px, 3vw, 42px); line-height: 1.05; letter-spacing: -.035em; color: rgba(29,31,34,.66); }
body.d-scene .wticket .meta:empty { display: none; }
body.d-scene .walkacts { display: grid; gap: 10px; }
body.d-scene .walkacts .op-walkup-add { width: 100%; }
body.d-scene .walk2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
body.d-scene .walk2 .btn { width: 100%; padding: 0 14px; }
body.d-scene .op-walkup-notice:empty { display: none; }
body.d-scene .dsteps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 22px; }
body.d-scene .dstep { position: relative; isolation: isolate; display: grid; gap: 8px; align-content: start; min-height: 250px; padding: 26px 26px 28px; border-radius: 12px; background: var(--fc); color: #1D1F22; overflow: hidden; }
body.d-scene .dstep .no { position: absolute; z-index: -1; right: 18px; top: 4px; font-size: 112px; font-weight: 800; line-height: 1; letter-spacing: -.06em; color: rgba(29,31,34,.12); }
body.d-scene .dstep .aic { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: rgba(251,248,241,.6); }
body.d-scene .dstep .aic .ico { width: 22px; height: 22px; }
body.d-scene .dstep b { margin-top: 22px; font-size: 25px; font-weight: 800; line-height: 1.1; letter-spacing: -.03em; }
body.d-scene .dstep p { font-size: 16.5px; color: rgba(29,31,34,.82); }

/* The walk-up's own ticket, in the dialog: a stub torn off the roll. */
body.d-scene .qrbox { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 20px; align-items: center; margin-top: 18px; padding: 18px 18px 26px; }
body.d-scene .qrbox .muted { color: var(--ink2); font-size: 15px; }
body.d-scene .qr { width: 100%; border-radius: 6px; transition: opacity 300ms ease; }
body.d-scene .op-qr-code { margin: 4px 0 10px; font-weight: 800; font-size: 22px; letter-spacing: .1em; }
body.d-scene .qrleft { font-weight: 800; font-size: 48px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { body.d-scene .qrbox { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; } body.d-scene .qr { max-width: 220px; } }

/* ── Guest list ─────────────────────────────────────────────────────────── */
body.d-scene .dledger { display: grid; gap: 10px; width: min(460px, 100%); padding: 28px 28px 26px; }
body.d-scene .dledger .k { font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); }
body.d-scene .dledger h3 { font-size: 28px; font-weight: 800; line-height: 1.05; letter-spacing: -.035em; }
body.d-scene .dledger ul { display: grid; gap: 14px; margin: 10px 0 4px; padding: 0; list-style: none; }
body.d-scene .dledger li b { display: block; font-size: 18px; font-weight: 750; }
body.d-scene .dledger li small { display: block; font-size: 15px; color: var(--ink2); }
body.d-scene .dledger .fine { font-size: 15px; color: var(--ink2); }

body.d-scene .dguests { max-width: 1000px; }
body.d-scene .gsearch { display: grid; gap: 16px; }
body.d-scene .dsearch { position: relative; }
body.d-scene .dsearch .ico { position: absolute; left: 22px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; color: var(--ink3); pointer-events: none; }
body.d-scene .dsearch .inp { min-height: 60px; padding: 0 24px 0 54px; border-radius: 99px; background: var(--sheet); box-shadow: inset 0 0 0 1.5px var(--rule2); font-size: 18px; -webkit-appearance: none; appearance: none; }
body.d-scene .dsearch .inp::-webkit-search-cancel-button { -webkit-appearance: none; }
body.d-scene .dsearch .inp::placeholder { color: var(--ink3); }
body.d-scene .dtabs { display: flex; flex-wrap: wrap; gap: 0 26px; }
body.d-scene .dtabs button { display: inline-flex; align-items: center; gap: 8px; height: 44px; font-size: 16px; font-weight: 650; color: var(--ink2); }
body.d-scene .dtabs button[aria-pressed="true"] { color: var(--ink); font-weight: 750; }
body.d-scene .dtabs button[aria-pressed="true"] > span:not(.n) { text-decoration: underline; text-decoration-thickness: 2.5px; text-underline-offset: 7px; }
body.d-scene .dtabs button:focus-visible { outline: 2.5px solid var(--green); outline-offset: 2px; border-radius: 6px; }
body.d-scene .dtabs .n { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 99px; box-shadow: inset 0 0 0 1.5px var(--rule2); font-size: 13px; font-weight: 750; }
@media (hover: hover) { body.d-scene .dtabs button:hover { color: var(--ink); } }

body.d-scene .op-guests { display: grid; gap: 2px; margin-top: 18px; }
body.d-scene .op-guests .row, body.d-scene .op-guests .row:nth-child(odd) { gap: 14px; min-height: 70px; padding: 10px 14px; border-radius: 12px; background: none; }
@media (hover: hover) { body.d-scene .op-guests .row:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); } }
body.d-scene .op-guests .row b { font-size: 17px; font-weight: 750; }
body.d-scene .op-guests .row small { font-size: 15px; color: var(--ink2); }
body.d-scene .op-guests .kick { margin: 26px 14px 6px; }
body.d-scene .op-guests .small { margin: 14px; }
body.d-scene .avatar.sm { width: 44px; height: 44px; flex: none; font-size: 15px; background: var(--slate); }
body.d-scene .gstate { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--ink2); white-space: nowrap; }
body.d-scene .gstate.in { color: var(--ink); }
body.d-scene .op-guest-ref { font-weight: 750; letter-spacing: .06em; color: var(--ink); }
body.d-scene .op-guest-pay.paid .ico { color: var(--green-ink); }
body.d-scene .op-guest-pay.claimed { background: var(--s-busy); color: #2A1E06; }
body.d-scene [data-guest-notice]:empty { display: none; }

/* ── On the door ────────────────────────────────────────────────────────── */
body.d-scene .staffadd { width: min(520px, 100%); min-height: 0; }
body.d-scene .dway.staffadd .dfoot { display: grid; align-items: stretch; gap: 8px; padding-top: 26px; }
body.d-scene .staffadd .inp { min-height: 56px; padding: 0 20px; border-radius: 99px; background: rgba(251,248,241,.74); color: #1D1F22; font-size: 18px; }
body.d-scene .staffadd .inp::placeholder { color: rgba(29,31,34,.62); }
body.d-scene .staffadd .btn { background: #1D1F22; color: #FBF8F1; }
body.d-scene .staffadd .hint { color: rgba(29,31,34,.8); }
body.d-scene .staffadd .hint.err { color: #8E1F1C; }
body.d-scene #staff-notice:empty { display: none; }
body.d-scene .dbadges { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 30px 24px; }
body.d-scene .dbadge { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; padding: 22px; }
body.d-scene .dbadge .avatar { width: 54px; height: 54px; flex: none; font-size: 17px; background: var(--slate); }
body.d-scene .dbadge .grow { flex: 1; min-width: 130px; }
body.d-scene .dbadge b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
body.d-scene .dbadge small { display: block; font-size: 15px; color: var(--ink2); }

/* ── Appearance (shared code): its heading at the kit's size ───────────── */
body.d-scene .page-head { margin: clamp(4px, 1.6vw, 24px) 0 40px; }
body.d-scene .page-head h1 { font-size: clamp(40px, 5.1vw, 80px); line-height: .98; letter-spacing: -.046em; }
body.d-scene .page-head .lede { margin-top: 18px; font-size: 19px; }

/* ── Phones and small windows ───────────────────────────────────────────── */
@media (max-width: 960px) {
  body.d-scene .topbar { min-height: 64px; }
  body.d-scene .search-btn { min-width: 0; width: 44px; padding: 0; }
  /* The phone bar: ink and an underline for the page you are on, no fill. */
  body.d-scene .tabbar { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); height: 70px; gap: 0; padding: 0 2px; border-radius: 22px; background: var(--sheet); }
  body.d-scene .tabbar a, body.d-scene .tabbar button { align-content: center; gap: 5px; padding: 0; border-radius: 16px; font-size: 16px; font-weight: 700; letter-spacing: -.02em; color: var(--ink3); white-space: nowrap; }
  body.d-scene .tabbar .ico { width: 22px; height: 22px; }
  body.d-scene .tabbar [aria-current] { background: none; color: var(--ink); text-decoration: underline; text-decoration-thickness: 2.5px; text-underline-offset: 5px; }
}
@media (max-width: 1180px) {
  body.d-scene .gate-hero { grid-template-columns: minmax(0, 1fr); }
  body.d-scene .gate-acts { justify-content: flex-start; margin-top: 24px; }
}
/* Between a phone and a laptop the sidebar stays and leaves the page about
   460px: the hero, the gate and the night take the phone's single column. */
@media (min-width: 761px) and (max-width: 960px) {
  body.d-scene .dhero, body.d-scene .xsec-head, body.d-scene .gate-night { grid-template-columns: minmax(0, 1fr); }
  body.d-scene .gate { grid-template-columns: minmax(0, 1fr); grid-template-areas: "cam" "verdict" "type"; grid-template-rows: auto; }
  body.d-scene .gate-night .dticket { width: 100%; }
  body.d-scene .dstage { min-height: 460px; }
}
@media (max-width: 760px) {
  body.d-scene { --pad: 16px; font-size: 16px; }
  body.d-scene .page { padding-bottom: 128px; }
  body.d-scene .topbar { padding: 0 16px; }
  body.d-scene .xsec { margin-top: 84px; }
  body.d-scene .dacts { margin-top: 26px; }
  body.d-scene .dstage { min-height: 420px; margin-top: 4px; }
  body.d-scene .dticket { --stub: 98px; rotate: -1deg; }
  body.d-scene .dticket .main { padding: 20px 16px 20px 20px; }
  body.d-scene .dticket h3 { font-size: 28px; }
  body.d-scene .dticket .count b { font-size: 38px; }
  body.d-scene .dticket .stubp { padding: 12px 8px; }
  body.d-scene .dticket .stubp b { font-size: 22px; white-space: nowrap; overflow-wrap: normal; }
  body.d-scene .wticket { --stub: 112px; }
  body.d-scene .dway { min-height: 320px; }

  /* The gate on a phone: camera first, edge to edge, then the plate. */
  body.d-scene .gate { order: -1; grid-template-columns: minmax(0, 1fr); grid-template-areas: "cam" "verdict" "type"; grid-template-rows: auto; gap: 20px; margin-top: 0; }
  body.d-scene .gate .viewfinder { margin: 0 -16px; border-radius: 0; box-shadow: none; }
  body.d-scene .verdict { min-height: 210px; padding: 30px 22px 24px; }
  body.d-scene .verdict .vk { font-size: clamp(54px, 17vw, 72px); }
  body.d-scene .gate-hero { margin-top: 56px; }
  body.d-scene .gate-hero .xh1 { font-size: 36px; }
  body.d-scene .gate-night { grid-template-columns: minmax(0, 1fr); }
  body.d-scene .gate-night .dticket { width: 100%; }

  body.d-scene .wnum { font-size: 76px; }
  body.d-scene .dledger { padding: 24px 22px 22px; }
  /* A guest on a phone: the face, then their name, their state and the one button under it. */
  body.d-scene .op-guests .row, body.d-scene .op-guests .row:nth-child(odd) { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px 14px; padding: 12px 4px; }
  body.d-scene .op-guests .row > .avatar { grid-row: 1 / span 3; align-self: start; }
  body.d-scene .op-guests .row > :not(.avatar) { grid-column: 2; justify-self: start; }
  body.d-scene .page-head h1 { font-size: 42px; }
}
/* At 320 "Walk-up" is wider than a fifth of the bar: size the tabs to their words. */
@media (max-width: 360px) {
  body.d-scene .tabbar { grid-template-columns: repeat(5, minmax(48px, auto)); justify-content: space-evenly; left: 4px; right: 4px; }
}
@media (max-width: 420px) {
  body.d-scene .walk2 { grid-template-columns: minmax(0, 1fr); }
  body.d-scene .trow .btn { padding: 0 18px; }
}

@media (prefers-reduced-motion: reduce) {
  body.d-scene .viewfinder.live .vf-line, body.d-scene .verdict:not(.idle), body.d-scene .dticket .count b.bump { animation: none; }
}
