/* Pixel Office: the weekly studio drama. Plain CSS, no build step.
   The scene is a fixed 1280x720 stage scaled by office.js; everything inside
   it is laid out in stage pixels to match the design canvas (TEMPLATES.md). */

:root {
  --ground: #0d0d1a;
  --bar: #080810;
  --rule: #1e1e3a;
  --edge: #3a3a6a;
  --text: #e8e8f0;
  --dim: #b8bcd8;
  --mute: #9aa0bc;
  --lilac: #c4b5fd;
  --mint: #00ffc8;
  --lead: #7c3aed;
  --pixel: 'Press Start 2P', monospace;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --serif: 'IBM Plex Serif', Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ground);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--mint); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── page header ── */
.po-hdr {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 16px; background: var(--bar); border-bottom: 2px solid var(--rule);
}
.po-hdr a.home { font-size: 13px; color: var(--dim); text-decoration: none; }
.po-hdr a.home:hover { color: var(--text); }
.po-hdr h1 { margin: 0; font: 12px/1.4 var(--pixel); color: var(--text); letter-spacing: 1px; }
.po-hdr .tag { font-size: 12px; color: var(--mute); }
@media (max-width: 640px) { .po-hdr .tag { display: none; } }

/* ── layout: the theatre, then one compact row under it ── */
.po-layout { display: block; padding: 12px 16px 32px; }
.po-theatre { min-width: 0; }

.po-vp {
  position: relative; overflow: hidden; margin: 0 auto;
  background: var(--ground); border: 2px solid var(--rule);
}
.po-vp .stage { will-change: transform; }

/* ── controls ── */
.po-controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  margin: 10px auto 0; padding: 10px 12px; background: var(--bar); border: 2px solid var(--rule);
}
.po-btns { display: flex; gap: 8px; }
.ctl {
  font: 9px/1 var(--pixel); min-height: 44px; min-width: 44px; padding: 0 14px;
  background: var(--rule); color: var(--text); border: 2px solid var(--edge); cursor: pointer;
}
.ctl:hover { background: #2a2a55; }
.ctl[disabled] { opacity: .45; cursor: default; }
.po-scrub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; flex: 1 1 220px; min-width: 0; }
.po-controls { min-width: 0; max-width: 100%; box-sizing: border-box; }
.po-scrub input[type=range] { flex: 1 1 160px; min-width: 0; accent-color: var(--mint); min-height: 44px; }
.po-pos { font: 8px/1.4 var(--pixel); color: var(--lilac); white-space: nowrap; }
.po-caption { flex: 1 1 100%; min-width: 0; max-width: 100%; font-size: 13px; line-height: 1.5; color: var(--dim); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.po-caption:empty { display: none; }
.po-caption b { color: var(--text); font-weight: 600; }

/* ── phone panel (only on narrow screens; desktop shows this inside the stage) ── */
.po-phone { display: none; }
.is-phone .po-phone { display: block; }
.is-phone .stage .ui, .is-phone .stage .layer-ui, .is-phone .stage .layer-bubbles { display: none !important; }
.pp-title { padding: 14px 14px 12px; background: var(--bar); border: 2px solid var(--rule); border-bottom: 0; }
.pp-body { padding: 0 0 4px; }
.is-phone .po-theatre { display: flex; flex-direction: column; }
.is-phone #phone-top { order: 0; } .is-phone .po-vp { order: 1; } .is-phone #phone { order: 2; } .is-phone .po-controls { order: 3; }
.is-phone .po-vp { margin: 0; }
.pp-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip { font: 8px/1 var(--pixel); color: var(--ground); background: var(--mint); padding: 5px 6px; }
.chip.offsite { background: #e8c547; }
.chip.soap { background: #ff9ecf; }
.pp-week { font-size: 12px; color: var(--dim); }
.pp-name { font: 13px/20px var(--pixel); color: var(--text); margin-top: 10px; }
.pp-tick { font: 8px/1.6 var(--pixel); color: var(--lilac); margin-top: 8px; }
.pp-tick span { color: var(--mint); }
.pp-lines { display: grid; gap: 10px; margin-top: 12px; }
.pp-lines:empty { display: none; }
.pp-line { background: #f4f4fa; color: #14141f; border: 3px solid #14141f; padding: 10px 12px; }
.pp-line.lead { background: #fff6c2; }
.pp-who { font: 7px/1.4 var(--pixel); color: #334155; margin-bottom: 6px; }
.pp-line.lead .pp-who, .real { color: #5b21b6; }
.pp-line.lead .pp-say { font: 10px/17px var(--pixel); }
.pp-say { font-size: 14px; line-height: 20px; }
.real { font: 6px/1 var(--pixel); margin-top: 8px; }
.pp-extra { margin-top: 12px; display: grid; gap: 10px; }
.pp-card { background: var(--bar); border: 2px solid var(--edge); padding: 10px 12px; }
.pp-card h3 { margin: 0 0 6px; font: 8px/1.5 var(--pixel); color: var(--lilac); }
.pp-card p { margin: 0; font-size: 13px; line-height: 19px; color: var(--text); }
.pp-card p + p { margin-top: 6px; }
.pp-card .serif { font-family: var(--serif); font-size: 15px; line-height: 22px; }
.pp-card .stamp { font: 7px/1.4 var(--pixel); color: var(--mint); }
.pp-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pp-face { background: #14141f; border: 2px solid var(--edge); }
.pp-face .crop { height: 64px; overflow: hidden; position: relative; background: var(--rule); }
.pp-face .crop img { position: absolute; left: 50%; top: 4px; width: 48px; height: auto; transform: translateX(-50%); image-rendering: pixelated; }
.pp-face .n { padding: 6px; font: 6px/1.4 var(--pixel); color: var(--lilac); }
.pp-face .l { padding: 0 6px 8px; font-size: 12px; line-height: 16px; }

/* ── aside ── */
.po-aside { display: grid; gap: 8px; margin: 10px auto 0; }
.po-card { background: var(--bar); border: 2px solid var(--rule); padding: 16px; }
.po-card h2 { margin: 0 0 10px; font: 10px/1.6 var(--pixel); color: var(--lilac); }
.po-card p { margin: 0 0 10px; font-size: 14px; line-height: 1.6; color: var(--dim); }
.po-card p:last-child { margin-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.stat { background: #14141f; border: 1px solid var(--edge); padding: 10px; }
.stat b { display: block; font: 14px/1.4 var(--pixel); color: var(--mint); }
.stat span { font-size: 12px; color: var(--dim); }
.games { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.games li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.games i { width: 10px; height: 10px; flex: none; }
.games em { margin-left: auto; font-style: normal; color: var(--dim); }
.cast { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cast li { font-size: 13px; color: var(--text); }
.cast li span { color: var(--mute); }
.keys { font-size: 12px; color: var(--mute); }
/* Below the scene: one caption line, the controls, one row of links, a closed disclosure. */
.po-links { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 13px; }
.po-links a { color: var(--dim); text-decoration: none; }
.po-links a:hover, .po-links a:focus-visible { color: var(--text); text-decoration: underline; }
.po-links a:not([hidden]) ~ a:not([hidden])::before { content: '\00b7'; display: inline-block; padding: 0 10px; color: var(--mute); }
.po-about { font-size: 13px; color: var(--mute); }
.po-about summary { cursor: pointer; color: var(--dim); min-height: 24px; }
.po-about p { margin: 8px 0 0; max-width: 72ch; line-height: 1.6; }

/* ── the stage (1280x720, stage pixels) ── */
.stage {
  position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform-origin: 0 0;
  overflow: hidden; background: var(--ground); font-family: var(--mono); color: var(--text);
}
.stage img { position: absolute; display: block; image-rendering: pixelated; image-rendering: crisp-edges; image-rendering: pixelated; }
.stage .layer { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; }
/* Each layer is its own stacking context: actors sort by their feet inside the
   actor layer, and every speech bubble sits above every sprite and prop. */
.stage .layer-tint { z-index: 1; } .stage .layer-props { z-index: 2; } .stage .layer-actors { z-index: 3; }
.stage .layer-fx { z-index: 4; } .stage .layer-bubbles { z-index: 5; } .stage .layer-ui { z-index: 6; }
.stage .px { font-family: var(--pixel); }
.abs { position: absolute; }

.actor { position: absolute; transition: left 1.4s steps(14), top 1.4s steps(14); }
.actor > img { left: 0; top: 0; width: 100%; height: 100%; }
.actor.flip > img { transform: scaleX(-1); }
.actor.tip > img { transform-origin: bottom center; animation: tip 1.6s steps(6) infinite alternate; }
.actor.hop > img { animation: hop .5s steps(2) 4; }
/* A typist's screen: a faint wash and a scrolling line in their game's colour. */
.actor .scr { position: absolute; left: 62%; top: 30%; width: 19%; height: 15%; overflow: hidden; pointer-events: none; mix-blend-mode: screen; animation: scrflick 2.6s steps(1) infinite; }
.actor .scr::before { content: ''; position: absolute; inset: 0; background: currentColor; opacity: .16; }
.actor .scr::after { content: ''; position: absolute; left: 10%; width: 70%; height: 2px; top: 0; background: currentColor; opacity: .7; animation: scrline 1.3s steps(9) infinite; }
.actor.flip .scr { left: auto; right: 62%; }
@keyframes scrline { from { top: 0; } to { top: 100%; } }
@keyframes scrflick { 0% { opacity: .8; } 37% { opacity: 1; } 38% { opacity: .55; } 71% { opacity: .9; } }
.bubble.walking { transition: left 1.4s steps(14), top 1.4s steps(14); }
.ntag {
  position: absolute; left: 50%; top: -26px; transform: translateX(-50%); white-space: nowrap;
  padding: 3px 6px; font: 700 13px/1.1 var(--mono); letter-spacing: .5px; color: #fff; background: #14141fe6; border: 1px solid var(--edge);
}
.ntag.lead { background: var(--lead); border-color: var(--lead); }
/* Mood emotes (office.js MOODS): a tiny pixel bubble centred over the speaker's
   head, just above their name tag. A child of the actor, so it moves and layers
   with them; the line's speech bubble lifts above it (EMOTE_LIFT). */
.emote {
  position: absolute; left: 50%; bottom: calc(100% + 34px); transform: translateX(-50%);
  width: 38px; height: 38px; padding: 2px; background: #fff; border: 2px solid #14141f; box-shadow: 2px 2px 0 #14141f66;
  image-rendering: pixelated; animation: emotepop .3s steps(3); pointer-events: none; line-height: 0; z-index: 1;
}
.emote.notag { bottom: calc(100% + 10px); }
.emote svg { display: block; width: 30px; height: 30px; }
.emote::after { content: ''; position: absolute; left: 50%; bottom: -10px; margin-left: -4px; border: 4px solid transparent; border-top-color: #14141f; }
@keyframes emotepop { 0% { transform: translateX(-50%) scale(.4); } 100% { transform: translateX(-50%) scale(1); } }
/* Body cues: individual transform properties, so a flipped sprite stays flipped. */
.actor[class*="cue-"] > img { transform-origin: bottom center; }
.actor.cue-hop > img { animation: cuehop .44s steps(2) 3; }
.actor.cue-jump > img { animation: cuehop .36s steps(2) 1; }
.actor.cue-shake > img { animation: cueshake .3s steps(3) 4; }
.actor.cue-jitter > img { animation: cuejitter .5s steps(2) 5; }
.actor.cue-sink > img { animation: cuesink 1.2s steps(4) forwards; }
.actor.cue-duck > img { animation: cueduck .6s steps(3) forwards; }
.actor.cue-tilt > img { animation: cuetilt .8s steps(3) forwards; }
.actor.cue-rise > img { animation: cuerise .6s steps(3) forwards; }
.actor.cue-nod > img { animation: cuenod .5s steps(2) 2; }
@keyframes cuehop { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes cueshake { 0%, 100% { translate: 0 0; } 33% { translate: -3px 0; } 66% { translate: 3px 0; } }
@keyframes cuejitter { 0%, 100% { translate: 0 0; } 50% { translate: 1px 0; } }
@keyframes cuesink { to { translate: 0 4px; } }
@keyframes cueduck { to { translate: 0 2px; rotate: -2deg; } }
@keyframes cuetilt { to { rotate: 3deg; } }
@keyframes cuerise { to { translate: 0 -2px; } }
@keyframes cuenod { 0%, 100% { translate: 0 0; } 50% { translate: 0 3px; } }
.plate {
  position: absolute; left: 14px; bottom: 30px; width: 140px; padding: 5px 4px; text-align: center;
  background: #14141f; border-top: 4px solid var(--mint); font: 700 13px/1.2 var(--mono); letter-spacing: .5px; color: #fff; white-space: nowrap; overflow: hidden;
}
.spark { position: absolute; width: 6px; height: 6px; animation: twinkle 1.6s steps(4) infinite; }
.spark.slow { animation-duration: 2.4s; }
.spark.live { box-shadow: 0 0 0 2px #ffffff55; }
.bang { position: absolute; font: 14px/1 var(--pixel); color: #ffe066; text-shadow: 2px 2px 0 #14141f; animation: blink .4s steps(2) 4; }

.titlecard {
  position: absolute; left: 0; top: 0; width: 1280px; height: 52px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--bar); border-bottom: 2px solid var(--rule);
}
.titlecard .l { display: flex; align-items: center; gap: 14px; min-width: 0; }
.titlecard .chip { font-size: 9px; padding: 6px 8px; }
.titlecard .t { font: 12px/1.3 var(--pixel); color: var(--text); letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 560px; }
.titlecard .w { font-size: 13px; color: var(--dim); white-space: nowrap; }
.ticker { font: 10px/1.3 var(--pixel); color: var(--lilac); white-space: nowrap; }
.ticker span { color: var(--mint); }

.bubble {
  position: absolute; padding: 10px 12px; background: #f4f4fa; border: 3px solid #14141f; color: #14141f;
  animation: pop .25s steps(3);
}
.bubble.lead { background: #fff6c2; }
.bubble .who { font: 700 12px/1.3 var(--mono); letter-spacing: .5px; color: #334155; margin-bottom: 4px; }
.bubble.lead .who { color: #5b21b6; }
.bubble .say { font-size: 13px; line-height: 18px; }
.bubble.lead .say { font: 11px/18px var(--pixel); }
.bubble.big .say { font-size: 14px; line-height: 20px; }
.bubble .real { font: 600 11px/1.2 var(--mono); color: #5b21b6; margin-top: 6px; }
.bubble .tail {
  position: absolute; bottom: -12px; width: 12px; height: 12px; background: inherit;
  border-right: 3px solid #14141f; border-bottom: 3px solid #14141f; transform: rotate(45deg); margin-bottom: 4px;
}
.bubble .tail.right { bottom: auto; top: 20px; right: -9px; transform: rotate(-45deg); margin: 0; }

.note {
  position: absolute; width: 76px; height: 54px; padding: 6px; overflow: hidden;
  font: 6px/10px var(--pixel); color: #14141f; box-shadow: 0 2px 0 #00000040;
}
.note.fresh { animation: drop .6s steps(6); }
/* The corkboard on the desks-room wall: at most six big cards, dark on light. */
.cork { position: absolute; background: #9a6b3f; border: 4px solid #5c3d22; box-shadow: 0 3px 0 #00000055; }
.cork .card { position: absolute; padding: 4px 3px; overflow: hidden; font: 700 12px/14px var(--mono); letter-spacing: -.3px; color: #14141f; box-shadow: 0 2px 0 #00000040; word-break: keep-all; overflow-wrap: normal; }
.cork .card.more { background: #f4f4fa; display: flex; align-items: center; justify-content: center; text-align: center; }
.cork .card.fresh { animation: drop .6s steps(6); }
.board-hit { position: absolute; background: transparent; border: 0; padding: 0; cursor: zoom-in; }
.board-hit:hover { outline: 3px solid var(--mint); outline-offset: 2px; }
/* The board's readable list. */
.po-board { width: min(640px, calc(100vw - 32px)); max-height: min(80vh, 720px); padding: 0; background: var(--bar); color: var(--text); border: 2px solid var(--edge); }
.po-board::backdrop { background: #05050acc; }
.po-board .bd-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--bar); border-bottom: 2px solid var(--rule); }
.po-board h2 { margin: 0; font: 12px/1.5 var(--pixel); color: var(--lilac); }
.po-board .bd-close { font: 10px/1 var(--pixel); min-height: 44px; padding: 0 14px; background: var(--rule); color: var(--text); border: 2px solid var(--edge); cursor: pointer; }
.po-board .bd-list { margin: 0; padding: 8px 16px 16px 36px; display: grid; gap: 12px; }
.po-board .bd-t { margin: 0; font-size: 16px; line-height: 1.5; color: var(--text); }
.po-board .bd-m { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--dim); }
.parcel { width: 26px; height: 20px; border-top: 4px solid #00000040; }
.parcel.fly { position: absolute; transition: left 1.2s steps(10), top 1.2s steps(10); z-index: 900; }
.pile { position: absolute; display: flex; flex-wrap: wrap-reverse; gap: 4px; width: 150px; }
.pile .lbl { position: absolute; left: 0; top: -26px; font: 700 13px/1 var(--mono); color: #14141f; background: #f4f4fa; padding: 4px 6px; white-space: nowrap; }
.stinger { position: absolute; display: flex; align-items: center; gap: 8px; animation: rise 2.4s steps(12) forwards; z-index: 950; }
.stinger span { font: 700 13px/1 var(--mono); color: #14141f; background: #f4f4fa; padding: 5px 6px; border: 2px solid #14141f; white-space: nowrap; }
.conf { position: absolute; width: 8px; height: 8px; animation: confetti 2.2s steps(10) 2 forwards; z-index: 960; }
.flame { position: absolute; transform-origin: bottom center; animation: flicker .6s steps(3) infinite; }
.whoosh { position: absolute; height: 5px; background: #fff; animation: whoosh .9s steps(5) 3 forwards; }
.eraser { position: absolute; width: 34px; height: 20px; background: #3a3a5a; border-top: 6px solid #8a8fb0; animation: wipe 1.2s steps(6) 2 alternate; }
.scrawl { position: absolute; font: 14px/26px var(--pixel); color: var(--lead); transform: rotate(-2deg); }
.scrawl.fresh { animation: write 1s steps(8); }

/* panels, rails and cards inside the stage */
.panels { position: absolute; left: 16px; top: 66px; display: flex; gap: 10px; }
.rpanel { width: 104px; background: #080810e6; border: 2px solid var(--edge); animation: pop .25s steps(3); }
.rpanel .crop { width: 100px; height: 72px; overflow: hidden; position: relative; background: var(--rule); }
.rpanel .n { padding: 6px; font: 700 12px/1.3 var(--mono); color: var(--lilac); }
.rpanel .l { padding: 0 6px 8px; font-size: 12px; line-height: 16px; color: var(--text); }

.card-soon {
  position: absolute; left: 300px; top: 120px; width: 680px; padding: 26px 30px;
  background: #080810f2; border: 3px solid var(--edge); box-shadow: 0 6px 0 #00000066;
}
.card-soon h2 { margin: 0 0 14px; font: 18px/1.5 var(--pixel); color: var(--text); }
.card-soon p { margin: 0 0 14px; font-size: 16px; line-height: 1.6; color: var(--dim); }
.card-soon .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.card-soon .stat b { font-size: 16px; }
.card-soon .src { font-size: 12px; color: var(--mute); margin: 12px 0 0; }

@keyframes twinkle { 0%, 100% { opacity: .15; transform: scale(.6); } 50% { opacity: 1; transform: scale(1); } }
@keyframes tip { 0% { transform: rotate(-8deg); } 100% { transform: rotate(-28deg); } }
@keyframes hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes drop { 0% { transform: translateY(-40px); opacity: 0; } 100% { opacity: 1; } }
@keyframes rise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-60px); opacity: 0; } }
@keyframes confetti { 0% { transform: translateY(-40px) rotate(0); opacity: 1; } 100% { transform: translateY(420px) rotate(260deg); opacity: 0; } }
@keyframes flicker { 0%, 100% { opacity: .6; transform: scaleY(1); } 50% { opacity: 1; transform: scaleY(1.25); } }
@keyframes whoosh { 0% { opacity: 0; transform: translateX(20px); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateX(-30px); } }
@keyframes wipe { 0% { transform: translateX(0); } 100% { transform: translateX(120px); } }
@keyframes write { 0% { clip-path: inset(0 100% 0 0); } 100% { clip-path: inset(0 0 0 0); } }

/* Reduced motion: office.js also stops autoplay and shows every line at once. */
@media (prefers-reduced-motion: reduce) {
  .stage *, .stage { animation: none !important; transition: none !important; }
  .stinger { opacity: 1; }
  .conf { display: none; }
}
.reduced .stage *, .reduced .stage { animation: none !important; transition: none !important; }
.reduced .conf { display: none; }

/* ───────────── live office (office-live.js) ───────────── */
.po-modes { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px 0; }
.mode {
  font: 9px/1 var(--pixel); min-height: 44px; padding: 0 14px; cursor: pointer;
  background: var(--bar); color: var(--dim); border: 2px solid var(--rule);
}
.mode:hover { color: var(--text); border-color: var(--edge); }
.mode[aria-pressed="true"] { background: var(--rule); color: var(--text); border-color: var(--mint); }
.mode:focus-visible, .room-btn:focus-visible, .cal-block:focus-visible, .ag-item:focus-visible, .door-btn:focus-visible, .tr-lines:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

.po-live {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px;
  margin: 0 auto 10px; padding: 10px 12px; background: var(--bar); border: 2px solid var(--rule);
}
.po-clock { margin: 0; flex: 1 1 auto; min-width: 0; }
.clock-time { font: 11px/1.6 var(--pixel); color: var(--mint); }
.clock-sub { font-size: 13px; color: var(--dim); }
.po-status { margin: 0; flex: 1 1 100%; font-size: 13px; line-height: 1.5; color: var(--dim); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.po-status b { color: var(--text); font-weight: 600; }
.po-status:empty, .po-actions:empty, .po-toast:empty { display: none; }
.po-status .dot { width: 10px; height: 10px; background: #ff4d8d; display: inline-block; animation: blink 1.6s steps(2) infinite; }
.po-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.po-toast { margin: 0; flex: 1 1 100%; font-size: 13px; color: var(--lilac); }
.ctl.small { min-height: 36px; padding: 0 10px; font-size: 8px; }
@media (pointer: coarse) { .ctl.small { min-height: 44px; } }

.po-rooms { margin: 10px auto 0; }
.room-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.room-btn {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "k n c" "f f l"; align-items: center; gap: 6px 8px;
  min-height: 56px; padding: 8px 10px; text-align: left; cursor: pointer;
  background: var(--bar); color: var(--text); border: 2px solid var(--rule); font-family: var(--mono);
}
.room-btn:hover { border-color: var(--edge); }
.room-btn[aria-pressed="true"] { border-color: var(--mint); background: #12122a; }
.room-btn .rk { grid-area: k; font: 7px/1 var(--pixel); color: var(--mute); border: 1px solid var(--edge); padding: 3px 4px; }
.room-btn .rn { grid-area: n; font: 8px/1.4 var(--pixel); }
.room-btn .rc { grid-area: c; font: 8px/1 var(--pixel); color: var(--mint); }
.room-btn .rlive { grid-area: l; font: 7px/1 var(--pixel); color: #14141f; background: #ff4d8d; padding: 3px 4px; }
.room-btn .rlive:empty { display: none; }
.room-btn .rfaces { grid-area: f; display: flex; gap: 3px; min-height: 8px; }
.room-btn .rfaces i { width: 8px; height: 8px; display: block; }
@media (max-width: 640px) { .room-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.po-transcript { margin: 10px auto 0; background: var(--bar); border: 2px solid var(--rule); padding: 12px 14px; }
.is-wide .po-transcript { margin-top: 10px; }
.tr-head h2 { margin: 0; font: 10px/1.6 var(--pixel); color: var(--lilac); }
.tr-head p { margin: 4px 0 8px; font-size: 12px; color: var(--mute); }
.tr-empty { margin: 0; font-size: 13px; color: var(--dim); }
.tr-lines { list-style: none; margin: 0; padding: 0 4px 0 0; max-height: 200px; overflow-y: auto; display: grid; align-content: start; gap: 8px; }
.tr-lines li { font-size: 14px; line-height: 1.5; color: var(--text); }
.tr-lines .tw { display: block; font: 7px/1.6 var(--pixel); color: var(--mint); }
.tr-lines li.lead .tw { color: var(--lilac); }
.tr-lines .src { display: inline-block; margin-left: 8px; font-size: 11px; color: var(--lilac); border-bottom: 1px dotted var(--lilac); }

/* in the stage */
.room-card { position: absolute; left: 16px; top: 16px; padding: 8px 10px; font-size: 12px; color: var(--text); background: #080810d9; border: 2px solid var(--edge); }
.layer-ui[data-more]::after { content: attr(data-more) " AT DESKS"; position: absolute; right: 16px; top: 16px; padding: 8px 10px; font: 8px/1 var(--pixel); color: var(--text); background: #080810d9; border: 2px solid var(--edge); }
.door-btn {
  position: absolute; top: 300px; min-height: 64px; padding: 0 14px; cursor: pointer;
  background: #080810d9; color: var(--text); border: 2px solid var(--edge); font-size: 9px;
}
.door-btn:hover { border-color: var(--mint); color: var(--mint); }
.door-btn.left { left: 12px; }
.door-btn.right { right: 12px; }
.lobby-sign { position: absolute; left: 520px; top: 404px; width: 240px; padding: 6px 0; text-align: center; font-size: 9px; color: #e8e8f0; background: #14141f; border: 2px solid #3a3a6a; }
.screen { position: absolute; left: 846px; top: 210px; width: 276px; height: 168px; padding: 14px 16px; overflow: hidden; color: #e8e8f0; }
.screen .s-k { font-size: 12px; color: var(--mint); margin-bottom: 10px; }
.screen .s-t { font-size: 19px; line-height: 26px; }
.screen .s-list { margin: 0; padding-left: 18px; font-size: 16px; line-height: 22px; }
.screen .s-list li { margin-bottom: 4px; }
.screen.fresh { animation: drop .6s steps(6); }
.glow { position: absolute; width: 58px; height: 40px; opacity: .35; box-shadow: 0 0 24px 8px currentColor; mix-blend-mode: screen; }
.bubble.thinking .say { font: 14px/1 var(--pixel); letter-spacing: 2px; }
.bubble.thinking .who { display: none; }
.off-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.pp-card .off-btns { margin-top: 12px; }

/* calendar */
.po-cal { background: var(--bar); border: 2px solid var(--rule); padding: 16px; }
.cal-head h2 { margin: 0 0 6px; font: 11px/1.6 var(--pixel); color: var(--lilac); }
.cal-head p { margin: 0 0 10px; font-size: 14px; color: var(--dim); }
.cal-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 14px; padding: 0; }
.cal-legend li { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); text-transform: capitalize; }
.cal-legend i { width: 12px; height: 12px; display: block; }
.cal-none { color: var(--dim); }
.cal-row { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); }
.cal-days { border-bottom: 2px solid var(--rule); }
.cal-day { padding: 6px 4px; font-size: 12px; color: var(--dim); text-align: center; }
.cal-day b { font: 8px/1.6 var(--pixel); color: var(--text); }
.cal-day.today { background: #12122a; }
.cal-day em { display: block; font: 7px/1.6 var(--pixel); font-style: normal; color: var(--mint); }
.cal-body { position: relative; }
.cal-hours { position: relative; }
.cal-h { position: absolute; left: 0; right: 6px; font-size: 11px; color: var(--mute); text-align: right; transform: translateY(-1px); }
.cal-col { position: relative; border-left: 1px solid var(--rule); background-image: linear-gradient(to bottom, var(--rule) 1px, transparent 1px); }
.cal-block {
  position: absolute; margin: 0 2px; padding: 4px 6px; overflow: hidden; text-align: left; cursor: pointer;
  background: var(--topic, #c8cce0); color: #14141f; border: 2px solid #14141f; font-family: var(--mono);
  display: flex; flex-direction: column; gap: 2px;
}
.cal-block { z-index: 2; }
.cal-block.short .cb-time { display: none; }
.cal-block.short .cb-title { -webkit-line-clamp: 1; }
.cal-block:hover, .cal-block:focus-visible { z-index: 4; box-shadow: 0 0 0 2px var(--mint); }
.cal-block.live { box-shadow: 0 0 0 3px #ff4d8d; }
.cb-time { font: 7px/1.4 var(--pixel); }
.cb-title { font-size: 12px; line-height: 15px; font-weight: 600; }
.cal-now { position: absolute; left: -1px; right: 0; height: 0; border-top: 2px solid #ff4d8d; z-index: 1; pointer-events: none; }
.cal-now::before { content: ''; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; background: #ff4d8d; }
.cal-now-l { position: absolute; right: 4px; z-index: 3; font-size: 6px; line-height: 1; color: #14141f; background: #ff4d8d; padding: 4px 3px; white-space: nowrap; }
.cal-block .cb-title { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.cal-agenda { display: none; }
.cal-agenda h3 { margin: 16px 0 8px; font: 9px/1.6 var(--pixel); color: var(--text); }
.cal-agenda ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ag-item {
  width: 100%; display: grid; gap: 4px; padding: 10px 12px; text-align: left; cursor: pointer; font-family: var(--mono);
  background: #14141f; color: var(--text); border: 2px solid var(--edge); border-left: 8px solid var(--topic, #c8cce0);
}
.ag-item.live { border-color: #ff4d8d; border-left-color: var(--topic); }
.ag-item .cb-title { font-size: 14px; line-height: 19px; }
.ag-item .cb-topic { font-size: 12px; color: var(--dim); text-transform: capitalize; }
.ag-item .cb-sum { font-size: 13px; line-height: 19px; color: var(--dim); }
.cal-detail { margin-top: 16px; padding: 14px; background: #14141f; border: 2px solid var(--edge); }
.cal-detail:empty { display: none; }
.cd-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cd-when { font-size: 13px; color: var(--dim); }
.cal-detail h3 { margin: 10px 0 6px; font: 11px/1.6 var(--pixel); color: var(--text); }
.cal-detail p { margin: 0 0 10px; font-size: 14px; line-height: 1.6; color: var(--dim); }
.cal-detail .cd-who { font-size: 13px; color: var(--mute); }
@media (max-width: 760px) {
  .cal-grid { display: none; }
  .cal-agenda { display: block; }
  .cal-detail { display: none; }
}
.reduced .po-status .dot { animation: none; }
@media (prefers-reduced-motion: reduce) { .po-status .dot { animation: none; } }
.tr-side .po-stagewrap { display: flex; justify-content: center; gap: 16px; align-items: flex-start; }
.tr-side .po-vp { margin: 0; flex: none; }
.tr-side .po-transcript { width: 360px; flex: none; margin: 0; display: flex; flex-direction: column; }
.tr-side .tr-lines { max-height: none; flex: 1 1 auto; min-height: 0; }
.is-phone .po-stagewrap { order: 1; }
.is-phone .po-cal { order: 1; }
.is-phone .tr-lines { max-height: 260px; }

/* showrunner pass */
.titlecard .logline { position: absolute; left: 24px; top: 56px; max-width: 720px; padding: 6px 10px; background: #080810d9; font-size: 13px; line-height: 18px; color: var(--text); }
.bubble.past { opacity: .55; }
.po-pos + .po-pos { margin-left: 12px; color: var(--mute); }
.po-caption .happened { color: var(--text); }
.po-prev { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #05050ae6; z-index: 50; padding: 16px; overflow: auto; }
.po-prev-card { max-width: 640px; max-height: 100%; overflow: auto; padding: 28px 30px; background: #0d0d1a; border: 3px solid var(--edge); box-shadow: 0 6px 0 #00000066; }
.po-prev-card h2 { margin: 14px 0 12px; font: 16px/1.5 var(--pixel); color: var(--text); }
.po-prev-card p { margin: 0 0 14px; font-size: 17px; line-height: 1.6; color: var(--dim); }
.po-prev-card .tonight { color: var(--text); font-style: italic; }
.po-prev-card .go { margin-top: 6px; padding: 12px 18px; }
.po-prev-card .rt { margin: 12px 0 0; font-size: 12px; color: var(--mute); }
.is-phone .po-prev-card { padding: 16px; }
.is-phone .po-prev-card p { font-size: 14px; }
#show .logline { color: var(--text); font-size: 16px; font-style: italic; }
#show h3 { margin: 14px 0 6px; font: 8px/1.4 var(--pixel); color: var(--lilac); }
.coming { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.coming li { font-size: 15px; line-height: 1.45; color: var(--text); padding-left: 12px; border-left: 4px solid var(--topic, #c8cce0); }
.coming li span { display: block; font: 7px/1.6 var(--pixel); color: var(--mint); }
.card-soon.big { top: 70px; }
.empty-card { position: absolute; left: 50%; top: 560px; transform: translateX(-50%); width: 560px; padding: 16px 20px; text-align: center; background: #080810e6; border: 3px solid var(--edge); }
.empty-card p { margin: 0 0 12px; font-size: 17px; line-height: 1.5; color: var(--text); }

/* ── threads: the board on the meeting-room wall, the counter, desk check-ins ── */
.tboard { position: absolute; background: #f1efe6; border: 4px solid #3a3a52; box-shadow: 0 3px 0 #00000055; }
.tboard .tb-head { position: absolute; left: 8px; right: 8px; top: 6px; display: flex; font: 700 14px/22px var(--mono); letter-spacing: 1px; color: #14141f; }
.tboard .tb-head span:first-child { width: 218px; }
.tb-card { position: absolute; display: flex; gap: 6px; align-items: center; padding: 4px 6px 4px 4px; background: #fff; border: 2px solid #14141f; border-left-width: 6px; box-shadow: 0 2px 0 #00000030; overflow: hidden; }
.tb-card .tb-face { flex: none; width: 38px; height: 42px; overflow: hidden; position: relative; background: #d9dbe8; }
.tb-card .tb-face .crop { position: absolute; left: 0; top: 0; }
.tb-card .tb-tx { min-width: 0; }
.tb-card .tb-t { font: 700 14px/16px var(--mono); color: #14141f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-card .tb-m { font: 600 12px/15px var(--mono); color: #3a3d55; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-card.done { display: block; border-left-width: 2px; background: #e6f6ea; }
.tb-card.done .tb-t { font-size: 13px; }
.tb-card.dropped { background: #d9d9de; filter: grayscale(1); opacity: .8; }
.tb-card.more { justify-content: center; font: 700 13px/1 var(--mono); color: #14141f; background: #f4f4fa; }
.tb-card.flip { animation: cardflip .6s steps(4); }
@keyframes cardflip { 0% { transform: perspective(300px) rotateY(90deg); } 100% { transform: none; } }
.thread-count { position: absolute; right: 16px; top: 16px; padding: 8px 10px; font-size: 11px; color: #14141f; background: #ffe066; border: 2px solid #14141f; cursor: zoom-in; }
.bubble.ping { border-style: dashed; background: #eef6ff; }
.shot { position: absolute; left: 62%; top: 29%; width: 19%; height: 15%; background: #f4f4fa; border: 2px solid; padding: 3px; display: grid; gap: 3px; align-content: start; animation: shotflash 1.4s steps(4) forwards; pointer-events: none; }
.shot i { display: block; height: 4px; width: 80%; }
@keyframes shotflash { 0% { opacity: 0; box-shadow: 0 0 0 40px #ffffffaa; } 25% { opacity: 1; box-shadow: 0 0 0 0 #ffffff00; } 85% { opacity: 1; } 100% { opacity: 0; } }
.shots { position: absolute; right: 2px; top: 40%; padding: 3px 5px; font: 700 12px/1 var(--mono); color: #14141f; background: #f4f4fa; border: 2px solid #14141f; white-space: nowrap; }
.reduced .shot { opacity: 1; }
.cal-block.tick { padding: 0 4px; min-height: 0; overflow: hidden; border-left-width: 3px; background: #ffe066; color: #14141f; z-index: 3; }
.cal-block.tick .cb-time { display: none; }
.cal-block.tick .cb-title { font-size: 9px; line-height: 12px; white-space: nowrap; }
.cal-block.sync { background-image: repeating-linear-gradient(135deg, transparent 0 6px, #ffffff14 6px 12px); }
.cal-legend .lg-sync i { background: repeating-linear-gradient(135deg, #8a8fb0 0 3px, #c8cce0 3px 6px); }
.cal-legend .lg-tick i { background: #ffe066; height: 4px; }
