/* Marconi control room. Everything down to the marker below is design/control-room/prototype.html's stylesheet, unchanged, as Alex approved it on 5 Nov 2026; tests/test_controlroom_app.py holds it to that file. */
:root {
  color-scheme: dark;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, "Roboto Mono", "DejaVu Sans Mono", monospace;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --room: #070b16; --card-d: #0b0b0b; --ink: #0b0b0b;
  --fill-1: rgba(255,255,255,0.07); --fill-2: rgba(255,255,255,0.10); --fill-3: rgba(255,255,255,0.14);
  --line-d: rgba(255,255,255,0.10);
  --text: #ffffff; --text-2: rgba(255,255,255,0.70); --text-3: rgba(255,255,255,0.45);
  --gold-l: #ffd84a; --gold: #c9a24a; --signal: #ff5a1f;
  --ok-l: #7fd3a6; --warn-l: #ffb450; --fail-l: #ff8a65;
  --seg-1: #ff5a1f; --seg-2: #5d7f3f; --seg-3: #5e95d1; --seg-4: #d8ad5a; --seg-5: #3d4252; --seg-6: #8c5a8e; --seg-7: #2fa88d; --seg-8: #c23c7a;
  --spring: cubic-bezier(0.32, 0.72, 0, 1); --pop: cubic-bezier(0.34, 1.4, 0.64, 1); --rise: cubic-bezier(0.22, 0.8, 0.2, 1); --mat: cubic-bezier(0.4, 0, 0.2, 1);
  --sl: max(16px, env(safe-area-inset-left, 0px)); --sr: max(16px, env(safe-area-inset-right, 0px));
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
  --tab: 28px; /* the tab hangs 34px into the column; with --sr that makes a 44px right gutter */
}
html, body { height: 100%; margin: 0; }
body { background: var(--room); color: var(--text); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; overflow-x: hidden; }
* { box-sizing: border-box; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--gold-l); outline-offset: 2px; }
.phone { position: relative; width: 100%; max-width: 430px; height: 100%; margin: 0 auto; overflow: clip; background: var(--room);
  background-image: radial-gradient(rgba(255,255,255,0.07) 0.7px, transparent 0.9px); background-size: 12px 12px; }
@media (min-width: 560px) { body { background: #030509; } .phone { box-shadow: 0 0 0 1px var(--line-d); } }

/* the voice: mono, upper, tracked */
.mono, .kick, .lbl, .unit, .pill, .chip, .st, .t2, .fresh, .tag, .kv b, .tl-time, .toast, .h1, .h2, .btn, .code, .dm-l { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
.kick { font-size: 9.5px; letter-spacing: 0.14em; color: var(--text-3); line-height: 1.5; display: flex; align-items: center; justify-content: space-between; margin: 26px 0 10px; }
.kick:first-child { margin-top: 0; }
.kick .pill { margin: 0; }
.lbl { font-size: 9.5px; color: var(--text-3); letter-spacing: 0.08em; line-height: 1.5; }
.unit { font-size: 9px; letter-spacing: 0.14em; color: var(--text-3); margin-left: 4px; }
.fine { font: 12px/1.45 var(--mono); color: var(--text-3); letter-spacing: 0.02em; }
.exp { font: 12px/1.4 var(--mono); color: var(--text-2); letter-spacing: 0.02em; margin-top: 4px; }
.card.gold .exp { color: rgba(11,11,11,0.7); }
.fresh { font-size: 9px; letter-spacing: 0.12em; color: var(--text-3); margin-top: 8px; }
.val { font: 700 44px/1 var(--mono); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--text); display: flex; align-items: baseline; }
.val.sm { font-size: 28px; }
.val.xl { font-size: 56px; }
.h1 { font: 700 24px/1.12 var(--mono); letter-spacing: 0.02em; color: var(--text); margin: 6px 0 4px; min-height: 1.12em; }
.h1 .caret { display: inline-block; width: 0.55em; height: 1em; background: #fff; vertical-align: -0.12em; margin-left: 2px; animation: blink 0.9s steps(1) infinite; }
.h1.done .caret { display: none; }
@keyframes blink { 50% { opacity: 0; } }
.h2 { font: 700 13px/1.4 var(--mono); letter-spacing: 0.06em; }
.prose { font: 14px/1.45 var(--sans); color: var(--text-2); }
.prose.serif { font: 15px/1.5 var(--serif); color: rgba(255,255,255,0.9); }
.tab-num, .dm, .val, .tl-time, .kv b, .code { font-variant-numeric: tabular-nums; }
.dm svg { display: block; fill: currentColor; height: 100%; }
.dm { color: var(--gold-l); }
.dm.ink { color: var(--text); }
.mark { color: var(--gold-l); filter: drop-shadow(0 0 10px rgba(255,216,74,0.18)); }
.mark svg { display: block; width: 100%; height: 100%; fill: currentColor; }

/* screens */
.scr { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: calc(var(--st) + 16px) calc(var(--sr) + var(--tab)) calc(var(--sb) + 112px) var(--sl); display: none; scrollbar-width: none; }
.scr::-webkit-scrollbar { display: none; }
.scr.on { display: block; }
.part { position: relative; }
.part.in { animation: partin 0.52s var(--spring) both; animation-delay: calc(140ms + var(--i, 0) * 60ms); }
@keyframes partin { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding-right: 40px; }
.head .mark { width: 28px; height: 28px; flex: 0 0 28px; }
.head .dm { height: 14px; }
.hk { display: flex; flex-direction: column; gap: 3px; }
.hk .kick { margin: 0; color: var(--text-2); }
.tbar { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; margin-bottom: 14px; }
.tbar .tt { text-align: center; }
.tbar .tt .h2 { font-size: 13px; }
.tbar .tt .lbl { margin-top: 2px; }
.disc { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08); display: grid; place-items: center; color: rgba(255,255,255,0.75); transition: transform 0.25s var(--spring), background 0.2s; }
.disc:active { transform: scale(0.9); background: var(--fill-3); }
.disc svg { width: 16px; height: 16px; }
.disc.lg { width: 46px; height: 46px; }
.disc.gold { background: var(--gold-l); color: var(--ink); }

/* cards and rows */
.card { position: relative; background: var(--fill-1); border-radius: 16px; padding: 14px; overflow: hidden; }
.card.gold { background: var(--gold-l); color: var(--ink); }
.card.gold .lbl, .card.gold .unit, .card.gold .fresh { color: rgba(11,11,11,0.55); }
.card.gold .val { color: var(--ink); }
.card.gold .dm { color: var(--ink); }
.card.line { background: transparent; box-shadow: inset 0 0 0 1px var(--line-d); }
.card.press { transition: transform 0.2s var(--spring); }
.card.press:active { transform: scale(0.97); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2 > .card { min-height: 112px; }
.stack { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-d); width: 100%; }
.row:first-of-type { border-top: 0; }
.row .t { font: 600 13px/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; flex: 1; min-width: 0; }
.row .t small { display: block; font: 400 10px/1.5 var(--mono); letter-spacing: 0.06em; color: var(--text-3); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .side { font: 10px/1.5 var(--mono); letter-spacing: 0.06em; color: var(--text-3); text-transform: uppercase; text-align: right; white-space: nowrap; }
.row .t small.wrap { white-space: normal; overflow: visible; text-overflow: clip; }
.row .side.narrow { display: grid; justify-items: end; gap: 4px; max-width: 84px; }
.row .side.narrow .tag { font-size: 8.5px; white-space: normal; text-align: right; line-height: 1.3; }
.rows .row { border-top: 1px solid var(--line-d); }
.rows .row:first-child { border-top: 0; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 12px; }
.kv div { min-width: 0; }
.kv b { display: block; font-size: 9px; letter-spacing: 0.12em; color: var(--text-3); font-weight: 400; margin-bottom: 3px; }
.kv span { font: 600 13px/1.35 var(--mono); letter-spacing: 0.02em; text-transform: uppercase; display: block; overflow: hidden; text-overflow: ellipsis; }
.kv span.ph { font: 400 10px/1.5 var(--mono); letter-spacing: 0.06em; white-space: normal; color: var(--text-2); }
.card.gold .kv b { color: rgba(11,11,11,0.5); }
.st { font-size: 9px; letter-spacing: 0.12em; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; line-height: 1; }
.st i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); flex: 0 0 6px; }
.st.ok i { background: var(--ok-l); } .st.ok { color: var(--ok-l); }
.st.run i { background: var(--gold-l); box-shadow: 0 0 10px rgba(255,216,74,0.6); } .st.run { color: var(--gold-l); }
.st.warn i { background: var(--warn-l); } .st.warn { color: var(--warn-l); }
.st.fail i { background: var(--fail-l); } .st.fail { color: var(--fail-l); }
.st.live i { background: var(--signal); box-shadow: 0 0 12px rgba(255,90,31,0.7); animation: blinkstep 1s steps(1) infinite; } .st.live { color: var(--signal); }
.st.next i { background: var(--text-3); }
@keyframes blinkstep { 50% { opacity: 0.3; } }
.pill, .chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid rgba(255,255,255,0.22); font-size: 9px; letter-spacing: 0.12em; line-height: 1; color: var(--text); white-space: nowrap; transition: transform 0.2s var(--spring), background 0.2s; flex: 0 0 auto; }
.pill:active, .chip:active { transform: scale(0.95); }
.pill.sm { height: 24px; padding: 0 9px; }
.pill.gold { background: var(--gold-l); border-color: var(--gold-l); color: var(--ink); }
.pill.ink { background: var(--ink); border-color: var(--ink); }
.chip.on { background: var(--fill-2); border-color: transparent; }
.pill.on { border-color: var(--gold-l); color: var(--gold-l); }
.chip .x { opacity: 0.55; margin-left: 2px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * (var(--sr) + var(--tab))) 0 calc(-1 * var(--sl)); padding: 2px calc(var(--sr) + var(--tab)) 2px var(--sl); }
.chips::-webkit-scrollbar { display: none; }
.tag { font-size: 9px; letter-spacing: 0.12em; color: var(--text-3); }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 16px; border-radius: 18px; background: #fff; color: var(--ink); font-size: 9.5px; letter-spacing: 0.12em; font-weight: 600; transition: transform 0.2s var(--spring), opacity 0.2s; }
.btn:active { transform: scale(0.95); }
.btn { white-space: nowrap; }
.btn svg { width: 14px; height: 14px; flex: 0 0 14px; }
.btn.gold { background: var(--gold-l); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,0.22); }
.btn.wide { width: 100%; height: 46px; border-radius: 23px; }
.btn.off { opacity: 0.4; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 14px; border-radius: 16px; background: var(--fill-1); font: 9.5px/1.3 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); width: 100%; transition: transform 0.2s var(--spring), background 0.2s; }
.tile:active { transform: scale(0.96); background: var(--fill-3); }
.tile.on { background: var(--gold-l); color: var(--ink); }
.tile i { width: 28px; height: 28px; border-radius: 50%; background: var(--fill-2); display: grid; place-items: center; flex: 0 0 28px; }
.tile.on i { background: rgba(11,11,11,0.15); }
.tile svg { width: 14px; height: 14px; }
.pic { border-radius: 12px; background: #e8e4dc; position: relative; overflow: hidden; }
.pic::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(11,11,11,0.5) 0.7px, transparent 0.9px); background-size: 4px 4px; mix-blend-mode: multiply; }
.pic svg { display: block; width: 100%; height: 100%; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #5a5a5a, #1a1a1a 70%); position: relative; overflow: hidden; flex: 0 0 48px; }
.avatar::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(#ffffff55 0.7px, transparent 0.9px); background-size: 4px 4px; }
.avatar .ini { position: absolute; inset: 0; display: grid; place-items: center; font: 700 12px var(--mono); letter-spacing: 0.08em; color: #fff; }
.avatar.bench { opacity: 0.45; }
.avatar.sm { width: 36px; height: 36px; flex-basis: 36px; } .avatar.sm .ini { font-size: 10px; }
.castrow { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * (var(--sr) + var(--tab))) 0 calc(-1 * var(--sl)); padding: 4px calc(var(--sr) + var(--tab)) 4px var(--sl); }
.castrow::-webkit-scrollbar { display: none; }
.castrow button { display: grid; justify-items: center; gap: 6px; }
.castrow .tag { font-size: 8.5px; }
.hatch { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.18) 0 1px, transparent 1px 4px); }
.bar-h { height: 8px; border-radius: 4px; overflow: hidden; position: relative; }
.bar-h i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--gold-l); border-radius: 4px; }
.bar-h.thin { height: 3px; }
.cols svg, .line svg, .gauge svg, .strip svg { display: block; width: 100%; }
.gauge { display: grid; place-items: center; }
.gauge .val { margin-top: -16px; }
.bigdm { height: 34px; margin: 6px 0 2px; }
.bigdm svg { height: 100%; }
.thinking { display: inline-flex; gap: 5px; align-items: center; height: 10px; }
.thinking i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold-l); animation: think 1s ease-in-out infinite; }
.thinking i:nth-child(2) { animation-delay: 0.15s; } .thinking i:nth-child(3) { animation-delay: 0.3s; }
@keyframes think { 0%, 100% { opacity: 0.25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.alert { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--ink); font: 9px/1.5 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.alert i { width: 6px; height: 6px; border-radius: 50%; background: var(--warn-l); flex: 0 0 6px; }
.alert.sig i { background: var(--signal); }
.alert span { flex: 1; }
.alert small { color: var(--text-3); font-size: 9px; }
.ex { font: 9px/1.5 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); opacity: 0.6; margin-top: 28px; text-align: center; }

/* timeline (Loop) */
.tl { display: grid; grid-template-columns: 44px 1fr; column-gap: 8px; position: relative; }
.tl::before { content: ""; position: absolute; left: 44px; top: 6px; bottom: 6px; width: 1px; background: var(--line-d); }
.tl-time { font-size: 10px; color: var(--text-3); padding-top: 12px; position: relative; }
.tl-time::after { content: ""; position: absolute; right: -10.5px; top: 17px; width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); }
.tl-time.now::after { background: var(--gold-l); box-shadow: 0 0 0 3px var(--room), 0 0 10px var(--gold-l); width: 7px; height: 7px; right: -11.5px; top: 16px; }
.tl-time.now { color: var(--gold-l); }
.tlc { margin: 4px 0 10px; border-radius: 18px; padding: 14px 14px 12px; color: #fff; position: relative; width: 100%; display: block; transition: transform 0.2s var(--spring); }
.tlc:active { transform: scale(0.97); }
.tlc.ink { color: var(--ink); }
.tlc .pill.sm { border-color: currentColor; opacity: 0.85; }
.tlc .nm { font: 700 18px/1.15 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; margin: 10px 0 4px; }
.tlc .ln { font: 10px/1.5 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.8; }
.tlc .flag { position: absolute; right: 12px; top: 12px; }
.tlc .flag.sig { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 10px var(--signal); }
.tlc.done { padding: 10px 14px; }
.tlc.done .nm { font-size: 13px; margin: 2px 0 0; }
.tlc.quiet { background: var(--fill-1) !important; color: var(--text-2); }
.nowline { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; color: var(--gold-l); font: 9px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; }
.nowline::after { content: ""; flex: 1; height: 1px; background: var(--gold-l); opacity: 0.6; }
.nowline i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-l); box-shadow: 0 0 10px var(--gold-l); }
.daybreak { font: 9px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; }
.daybreak::after { content: ""; width: 34px; height: 1px; background: var(--line-d); }

/* chrome: capsule, tab, heartbeat bar */
.capsule { position: absolute; right: calc(var(--sr) - 4px); top: calc(var(--st) + 14px); width: 62px; height: 104px; border-radius: 31px; background: var(--ink); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 9px 0; z-index: 8; box-shadow: 0 10px 30px rgba(0,0,0,0.35); transform-origin: 100% 0; }
.capsule.intro { animation: capsule 0.5s var(--pop) both; animation-delay: 0.7s; }
@keyframes capsule { from { opacity: 0; transform: scale(0.2); } to { opacity: 1; transform: scale(1); } }
.capsule .orb-s { width: 48px; height: 48px; border-radius: 50%; background: var(--fill-1); display: grid; place-items: center; position: relative; }
.capsule .orb-s svg { width: 40px; height: 40px; fill: var(--gold-l); }
.capsule .orb-s .dotp { position: absolute; right: 2px; bottom: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); }
.capsule .hi { font: 7.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.phone.detail .capsule { display: none; }
.capsule { transition: transform 0.45s var(--spring), opacity 0.3s; }
.phone.scrolled .capsule { transform: translateY(-150%); opacity: 0; pointer-events: none; }
.phone.scrolled .capsule.intro { animation: none; }
.sub { display: flex; gap: 14px; flex-wrap: wrap; padding-right: 40px; min-height: 26px; margin: 0 0 14px; font: 10px/1.6 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); font-variant-numeric: tabular-nums; }
.sub b { color: var(--text-2); font-weight: 400; }
.tbar .disc svg.orb-mini { width: 26px; height: 26px; fill: var(--gold-l); }
.capsule .talk { width: 45px; height: 45px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; transition: transform 0.25s var(--spring); }
.capsule .talk:active { transform: scale(0.9); }
.capsule .talk svg { width: 18px; height: 18px; }
.rail { position: absolute; right: calc(-40px + (var(--sr) - 16px) * -1); top: 50%; width: 74px; height: 290px; margin-top: -145px; padding: 0 40px 0 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; z-index: 7; background: var(--ink); clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 calc(100% - 14px), 0 14px); transform-origin: 100% 50%; }
.rail { transition: transform 0.4s var(--spring); }
.rail.intro { animation: tab-in 0.45s var(--pop) both; animation-delay: 0.95s; }
.phone.roomed .rail { transform: translateX(100%); }
.phone.roomed .scrim { background: rgba(7,11,22,0.88); }   /* the frame goes nearly dark under the room so nothing peeks at its corners */
.phone.roomed .rail.intro { animation: none; }
@keyframes tab-in { from { transform: translateX(100%) scale(0.9); } to { transform: translateX(0) scale(1); } }
.rr { position: relative; width: 16px; height: 16px; color: #fff; opacity: 0.5; display: grid; place-items: center; transition: opacity 0.25s ease, transform 0.3s var(--spring); }
.rr svg { width: 15px; height: 15px; }
.rr[aria-current="page"] { opacity: 1; transform: scale(1.1); }
.rr[aria-current="page"]::after { content: ""; position: absolute; left: -7px; top: 50%; width: 2px; height: 2px; margin-top: -1px; border-radius: 50%; background: #fff; }
.hb { position: absolute; left: var(--sl); right: var(--sr); bottom: calc(var(--sb) + 18px); height: 46px; border-radius: 12px; background: #fff; color: var(--ink); display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px; z-index: 9; box-shadow: 0 6px 24px rgba(0,0,0,0.35), 0 0 0 1px rgba(0,0,0,0.04); transition: transform 0.55s var(--spring); }
.hb.gone { transform: translateY(calc(100% + var(--sb) + 20px)); }
.hb .lab { font: 8.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.hb .lab i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-l); box-shadow: 0 0 8px rgba(255,216,74,0.8); }
.hb .track { flex: 1; height: 12px; display: flex; align-items: center; gap: 3px; position: relative; }
.hb .seg { height: 3px; border-radius: 2px; opacity: 0.35; flex: 1; }
.hb .seg.done { opacity: 1; } .hb .seg.now { opacity: 1; height: 5px; }
.hb .needle { position: absolute; top: -2px; width: 2px; height: 16px; background: var(--ink); border-radius: 1px; }
.hb .dm { height: 14px; color: var(--ink); }
.chrome.pre { visibility: hidden; }

/* the dark room (Chief Director) and the morph panel */
.room { position: absolute; inset: 12px; background: var(--ink); color: #fff; border-radius: 28px; box-shadow: 0 24px 70px rgba(0,0,0,0.35); overflow: hidden; z-index: 20; will-change: clip-path; contain: strict; transform: translateZ(0); display: none; }
.room::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,0.07) 0.7px, transparent 0.9px); background-size: 12px 12px; }
.room.on { display: block; }
.room > * { position: relative; }
.room .inner { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; padding: 18px 14px calc(var(--sb) + 24px) 20px; }
.room .inner::-webkit-scrollbar { display: none; }
.room .rpart { opacity: 0; }
.room.ready .rpart { opacity: 1; }
.rhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rhead .kick { margin: 0; color: #fff; gap: 10px; justify-content: flex-start; }
.rhead .kick i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-l); box-shadow: 0 0 10px rgba(255,216,74,0.8); }
.stage { display: grid; justify-items: center; gap: 8px; padding: 6px 0 14px; }
.orb { width: 104px; height: 104px; filter: drop-shadow(0 0 14px rgba(255,216,74,0.35)); }
.orb svg { width: 100%; height: 100%; fill: var(--gold-l); overflow: visible; }
.stage .status { font: 9.5px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.6); }
.stage .heard { font: 15px/1.4 var(--serif); color: rgba(255,255,255,0.9); text-align: center; max-width: 300px; }
.bubble { max-width: 92%; border-radius: 18px; padding: 11px 14px; background: var(--fill-2); font: 14.5px/1.45 var(--sans); color: rgba(255,255,255,0.92); border-bottom-left-radius: 6px; margin: 8px 0; animation: bubblein 0.42s var(--spring) both; }
@keyframes bubblein { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: none; } }
.bubble .bk { display: block; font: 8.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-l); margin-bottom: 6px; }
.bubble.serif { font: 15px/1.5 var(--serif); }
.bubble.you { background: #fff; color: var(--ink); margin-left: auto; border-radius: 18px; border-bottom-right-radius: 6px; }
.jrow { padding: 10px 0; border-top: 1px solid var(--line-d); }
.jrow .meta { font: 9px/1.5 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); display: flex; gap: 8px; align-items: center; }
.jrow .meta b { color: var(--text-2); font-weight: 400; }
.room .jrow .meta { gap: 6px; }
.room .jrow .meta b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room .jrow .meta .k { flex: 0 0 auto; }
.jrow .meta .k { color: var(--gold-l); }
.jrow .meta .k.change { color: var(--warn-l); } .jrow .meta .k.alert { color: var(--fail-l); } .jrow .meta .k.report { color: var(--ok-l); }
.jrow .body { font: 14px/1.45 var(--sans); color: rgba(255,255,255,0.85); margin-top: 4px; }
.jrow .body.serif { font: 15px/1.5 var(--serif); font-style: italic; color: rgba(255,255,255,0.7); }
.compose { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.compose input { flex: 1; height: 46px; border-radius: 23px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); padding: 0 16px; font: 15px/1.2 var(--sans); color: #fff; outline: 0; }
.compose input::placeholder { color: rgba(255,255,255,0.4); }
.compose input:focus { border-color: rgba(255,216,74,0.7); }
.compose .disc { flex: 0 0 46px; }
.morph { position: absolute; inset: 0; z-index: 30; background: var(--card-d); color: #fff; overflow: hidden; display: none; will-change: clip-path; contain: strict; transform: translateZ(0); }
.morph.on { display: block; }
.morph .inner { position: absolute; inset: 0; overflow-y: auto; scrollbar-width: none; padding: calc(var(--st) + 18px) var(--sr) calc(var(--sb) + 30px) var(--sl); opacity: 0; transition: opacity 0.12s; }
.morph.ready .inner { opacity: 1; }
.morph.closing .inner { opacity: 0; transition: opacity 0.08s; }
.morph .x { position: absolute; right: var(--sr); top: calc(var(--st) + 14px); z-index: 2; opacity: 0; transition: opacity 0.12s; }
.morph.ready .x { opacity: 1; }
.typed { font: 15px/1.5 var(--serif); color: rgba(255,255,255,0.9); min-height: 1.5em; }
.typed .caret { display: inline-block; width: 0.5em; height: 1em; background: #fff; vertical-align: -0.15em; margin-left: 2px; animation: blink 0.9s steps(1) infinite; }
.typed.done .caret { display: none; }
textarea.note { width: 100%; min-height: 72px; border-radius: 14px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); padding: 10px 14px; font: 14px/1.45 var(--sans); color: #fff; resize: none; outline: 0; }
textarea.note:focus { border-color: rgba(255,216,74,0.7); }

/* sheet and frame push */
.frame { position: absolute; inset: 0; overflow: clip; transition: transform 0.55s var(--spring), border-radius 0.55s var(--spring); transform-origin: 50% 0; }
.frame.pushed { transform: scale(0.94) translateY(calc(var(--st) + 10px)); border-radius: 26px; overflow: hidden; }
.scrim { position: absolute; inset: 0; background: rgba(0,0,0,0.5); opacity: 0; pointer-events: none; transition: opacity 0.45s; z-index: 14; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; height: 88%; background: var(--card-d); border-radius: 28px 28px 0 0; transform: translateY(104%); transition: transform 0.6s var(--spring); z-index: 15; padding: 10px var(--sr) calc(var(--sb) + 20px) var(--sl); display: flex; flex-direction: column; }
.sheet.on { transform: translateY(0); }
.sheet .grab { width: 38px; height: 4px; border-radius: 2px; background: #d9d9d9; margin: 0 auto 14px; opacity: 0.5; }
.sheet .body { flex: 1; overflow-y: auto; scrollbar-width: none; }
.sheet pre { white-space: pre-wrap; font: 12px/1.6 var(--mono); color: var(--text-2); letter-spacing: 0.01em; margin: 0; }
.toast { position: absolute; left: 50%; bottom: calc(var(--sb) + 76px); transform: translate(-50%, 12px); opacity: 0; height: 34px; padding: 0 16px; border-radius: 17px; background: var(--ink); color: #fff; font-size: 9.5px; letter-spacing: 0.12em; display: flex; align-items: center; gap: 10px; z-index: 40; transition: transform 0.5s var(--spring), opacity 0.3s; white-space: nowrap; box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.toast.on { transform: translate(-50%, 0); opacity: 1; }
.toast b { color: var(--gold-l); font-weight: 400; }

/* login and splash */
.splash { position: absolute; inset: 0; background: var(--room); z-index: 60; display: grid; place-items: center; }
.splash-mark { width: 96px; height: 96px; color: var(--gold-l); filter: drop-shadow(0 0 18px rgba(255,216,74,0.18)); will-change: transform; }
.splash-mark svg { width: 100%; height: 100%; fill: currentColor; display: block; }
.splash-mark rect { opacity: 0.08; transition: opacity 0.12s; }
.splash-mark rect.on { opacity: 1; }
.splash-bloom { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: radial-gradient(circle, #fff9e0 0%, rgba(255,216,74,0) 70%); transform: scale(0); opacity: 0; pointer-events: none; }
.login { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 14px; padding: 0 var(--sr) 0 var(--sl); z-index: 50; display: none; }
.login.on { display: grid; }
.login .mark { width: 32px; height: 32px; }
.login form { width: 100%; max-width: 320px; display: grid; gap: 10px; }
.login .fine { text-align: center; }
.code { display: flex; gap: 8px; justify-content: center; }
.code input { width: 40px; height: 48px; border-radius: 12px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); text-align: center; font: 700 18px var(--mono); color: #fff; outline: 0; }
.code input:focus { border-color: rgba(255,216,74,0.7); }
.field { height: 46px; border-radius: 23px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); padding: 0 16px; font: 15px/1.2 var(--sans); color: #fff; outline: 0; width: 100%; }
.field::placeholder { color: rgba(255,255,255,0.4); }
.field:focus { border-color: rgba(255,216,74,0.7); }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; }
.form label .lbl { font-size: 9px; letter-spacing: 0.12em; }
.voices { display: grid; gap: 10px; }
.voice { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--fill-1); width: 100%; transition: background 0.2s, transform 0.2s var(--spring); }
.voice.on { box-shadow: inset 0 0 0 1px var(--gold-l); }
.voice:active { transform: scale(0.97); }
.voice .t { flex: 1; font: 600 13px/1.3 var(--mono); letter-spacing: 0.03em; text-transform: uppercase; }
.voice .t small { display: block; font: 400 10px/1.5 var(--mono); color: var(--text-3); letter-spacing: 0.06em; }
.wave { display: flex; gap: 2px; align-items: center; height: 18px; width: 40px; }
.wave i { flex: 1; height: 30%; background: var(--gold-l); border-radius: 1px; }
.wave.play i { animation: wv 0.8s ease-in-out infinite alternate; }
.wave i:nth-child(2) { animation-delay: 0.1s; } .wave i:nth-child(3) { animation-delay: 0.2s; } .wave i:nth-child(4) { animation-delay: 0.3s; } .wave i:nth-child(5) { animation-delay: 0.4s; } .wave i:nth-child(6) { animation-delay: 0.5s; }
@keyframes wv { from { height: 20%; } to { height: 100%; } }
.dial { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ghostcap { position: absolute; font: 10px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.26); pointer-events: none; animation: ghost 0.6s ease both; }
@keyframes ghost { from { opacity: 0; } to { opacity: 1; } }
.vlist .row { align-items: flex-start; }
.vlist .btn { height: 28px; padding: 0 12px; font-size: 9px; }
.sec { margin-top: 18px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
}

/* ---- past this line: what the live app adds. The prototype's own rules above are never edited. ---- */
#hb-dm { width: 92px; }
.head .dm.clock { height: 12px; width: 92px; }
.dm.block { display: block; }
.bigdm .dm { display: block; height: 100%; }
.bigdm svg { max-width: 100%; }      /* the prototype only ever counted +3:22; after the last show it is +11:00, and it must fit */
img.mark { display: block; filter: drop-shadow(0 0 10px rgba(255,216,74,0.18)); }
.login img.mark { width: 32px; height: 32px; }
.login .link-kick { justify-content: center; margin: 0; }
.login .err { color: var(--fail-l); text-align: center; }
.login .err:empty { display: none; }
.empty { font: 9.5px/1.5 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.card .empty { margin-top: 8px; }
.ex.shadow { color: var(--gold-l); opacity: 0.85; }
.flow { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 4px 0 14px; }
.flow > div:first-child { flex: 1; }
.flow .bar-h { margin-top: 8px; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.ticks { display: flex; justify-content: space-between; margin-top: 6px; position: relative; }
.ticks .now-tick { position: absolute; transform: translateX(-50%); }
.gap-t { margin-top: 8px; }
.gap-t-lg { margin-top: 10px; }
.filter-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * (var(--sr) + var(--tab))) 14px calc(-1 * var(--sl)); padding: 2px calc(var(--sr) + var(--tab)) 2px var(--sl); }
.filter-row::-webkit-scrollbar { display: none; }
.grow { flex: 1; }
.filter-row .tag { align-self: center; white-space: nowrap; flex: 0 0 auto; }
.tl-time.ahead { color: rgba(255,255,255,0.3); }
.tlc .flag.st.on-light { color: #0b0b0b; }
.tlc .flag.st.on-dark { color: #ffd84a; }
.tlc .word { display: inline-flex; margin-top: 8px; }
.tlc .thinking.ink i { background: #0b0b0b; }
.foot-row { display: flex; align-items: center; justify-content: center; margin-top: 22px; }
.none-yet { padding: 18px 14px; }
.none-yet .prose { margin-top: 8px; }
.retry { margin-top: 12px; }
.rows .row.rowbtn { width: 100%; }
.room .fine.read-only { margin-top: 14px; }

/* the journal as a conversation (docs/backend/ADDENDUM-DIRECTOR-WAKE.md section 4): threads of the app's bubbles and rows */
.chips.second { margin-top: 8px; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; }
.chips .sep { flex: 0 0 1px; align-self: stretch; margin: 6px 2px; background: var(--line-d); }
.thread { margin-top: 10px; padding: 12px 14px 14px; }
.th-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; font: 9.5px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.th-head .tag { flex: 0 0 auto; }
.th-head .who { min-width: 0; }
.th-earlier { margin: 10px 0 2px; }
.msg { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 8px; margin-top: 12px; }
.msg.you { grid-template-columns: minmax(0, 1fr); justify-items: end; }
.msg .side-l { display: block; padding-top: 15px; }
.msg .side-l .avatar { display: block; }
.avatar.xs { width: 28px; height: 28px; flex-basis: 28px; }
.avatar.xs .ini { font-size: 9px; letter-spacing: 0.04em; }
.msg-who { font: 8.5px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-l); overflow-wrap: anywhere; }
.msg-who .arrow { color: var(--text-3); padding: 0 4px; }
.msg .bubble { max-width: 100%; margin: 4px 0 0; overflow-wrap: anywhere; }
.msg .bubble.still { animation: none; }
.msg .bubble.you { max-width: 92%; }
.msg-foot { font: 9px/1.5 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-top: 4px; display: flex; gap: 8px; font-variant-numeric: tabular-nums; }
.msg-foot .k { color: var(--gold-l); }
.msg-foot .k.handover { color: var(--text-2); } .msg-foot .k.answer { color: var(--ok-l); } .msg-foot .k.directive { color: var(--warn-l); }
.msg.handover { display: block; padding: 8px 0 0; margin-top: 10px; border-top: 1px solid var(--line-d); }
.msg.handover:first-of-type { border-top: 0; }
.msg.handover .line { font: 13px/1.4 var(--sans); color: var(--text-2); margin-top: 2px; overflow-wrap: anywhere; }
.typing::after { content: ""; display: inline-block; width: 0.5em; height: 1em; background: #fff; vertical-align: -0.15em; margin-left: 2px; animation: blink 0.9s steps(1) infinite; }
.jrow .body { overflow-wrap: anywhere; }
.older { display: flex; justify-content: center; margin-top: 14px; }
.j-empty { margin-top: 26px; }
.jrow .meta .k.alert { display: inline; padding: 0; background: none; border-radius: 0; }   /* the kind word, not the notice chip of the same name */

/* hit areas a thumb can find, with nothing drawn: the tab's icons tile its column, and a small pill reaches past its edge */
.rr::before { content: ""; position: absolute; inset: -12px -16px; }
.pill.sm { position: relative; }
.pill.sm::after { content: ""; position: absolute; inset: -10px -4px; }
.chips .pill.sm::after { content: none; }      /* inside a scrolling row it would only make the row scroll */
/* a Home Screen app runs under the status bar: the room's close disc comes down below it */
.room .inner { padding-top: calc(var(--st) + 18px); }
/* a show that stopped: its score in the fail colour, and its segment on the heartbeat bar a broken line */
.val.fail { color: var(--fail-l); }
.val.warn { color: var(--warn-l); }
.sub .failed, .sub .failed b { color: var(--fail-l); }
/* the stage line on a colour card is the card's words: on white text it is not dimmed */
.tlc:not(.ink) .ln { opacity: 1; }
.login > .btn.wide { max-width: 320px; }
/* the bar: the listener's compact player (edge/app/app.css), ported; nothing is imported from the listener app */
.bar { position: absolute; left: var(--sl); right: var(--sr); bottom: calc(var(--sb) + 18px); height: 46px; background: #fff; color: var(--ink); border-radius: 12px; display: flex; align-items: stretch; z-index: 9; box-shadow: 0 6px 24px rgba(0,0,0,0.35), 0 0 0 1px rgba(0,0,0,0.04); transition: transform 0.55s var(--spring), opacity 0.3s ease; }
.bar.away { transform: translateY(calc(100% + var(--sb) + 20px)); opacity: 0; }
.bar-play { width: 46px; display: grid; place-items: center; color: var(--ink); background: none; border: 0; padding: 0; }
.bar-play:disabled { opacity: 0.3; }
.bar-play svg { width: 16px; height: 16px; }
.i-pause { display: none; } .playing .i-play { display: none; } .playing .i-pause { display: block; }
.bar-open { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 14px 0 0; min-width: 0; color: var(--ink); background: none; border: 0; font: inherit; }
.bar-label { font: 8.5px/1 var(--mono); letter-spacing: 0.12em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; text-transform: uppercase; }
.bar-dots { display: flex; flex-direction: column; gap: 4px; }
.bar-dots i { width: 3px; height: 3px; background: var(--ink); border-radius: 1px; display: block; }
.bar-track { flex: 1; position: relative; height: 14px; display: flex; align-items: center; gap: 2px; }
.bar-track .seg { height: 3px; border-radius: 1px; opacity: 0.35; transition: opacity 0.3s ease, height 0.3s ease; }
.bar-track .seg.done, .bar-track .seg.now { opacity: 1; }
.bar-track .seg.now { height: 5px; }
.bar-needle { position: absolute; top: -1px; width: 2px; height: 16px; background: var(--ink); left: 0; transform: translateX(-1px); border-radius: 1px; }
.bar-time { font: 8.5px/1 var(--mono); letter-spacing: 0.06em; min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.sub .held b { color: var(--warn-l); }
.row.show-setting { min-height: 44px; }
.row.show-setting input[type=checkbox] { width: 22px; height: 22px; margin: 0; flex: 0 0 22px; accent-color: var(--gold-l); }
.row input.field[type=time] { flex: 0 0 auto; width: 118px; height: 36px; padding: 0 10px; accent-color: var(--gold-l); color-scheme: dark; font: 600 13px/1 var(--mono); }
.row input.field[type=time]:disabled { opacity: 0.4; }

/* package 7: steering, versions and timers, on the prototype's own components */
.steering-form { display: grid; gap: 10px; margin-top: 10px; }
.steering-label { display: grid; gap: 6px; }
.steering-text { min-height: 120px; width: 100%; resize: vertical; }
.steering-form .btn { min-height: 46px; }
.steering-actions .btn, .version-row .btn, .timer-row .btn { min-height: 44px; }
.version-row, .timer-row { min-height: 56px; }
.steering-list { margin: 8px 0 0; padding-left: 20px; font: 14px/1.45 var(--sans); color: var(--text-2); }
.steering-list li + li { margin-top: 6px; }
.steering-note { margin-top: 8px; }
.steering-details { margin-top: 12px; }
.steering-details summary { min-height: 44px; display: flex; align-items: center; font: 600 9.5px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }
.steering-pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.6 var(--mono); color: var(--text-2); letter-spacing: 0.01em; margin: 8px 0 0; }
.castrow button { min-width: 52px; min-height: 64px; }
.timer-row .t small.wrap { white-space: normal; }

/* package 10: the Chief Director's changes, with a full-thumb restore at phone width */
.chief-changes { padding: 0 14px; }
.room .chips { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
.chief-change .meta { flex-wrap: wrap; }
.chief-change .body, .chief-change .fine { overflow-wrap: anywhere; }
.chief-change .fine { margin-top: 6px; }
.chief-change .btn { width: 100%; min-height: 44px; margin-top: 10px; }
.chief-change .btn:disabled { opacity: 0.45; }
