/* You're Live · course stylesheet. Mid-century palette shared with the films (engine/toon.js PAL). */
@font-face { font-family: 'Alfa Slab One'; src: url('../fonts/AlfaSlabOne-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Jost'; src: url('../fonts/Jost.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Oleo Script'; src: url('../fonts/OleoScript-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --paper: #F4EAD5; --paper-d: #E6D8BC; --paper-dd: #D4C29F; --white: #FBF6EA;
  --ink: #2B2420; --ink-soft: #4A3F38;
  --coral: #E4613F; --coral-d: #B8452B; --coral-l: #F0917A;
  --mustard: #E8B43A; --mustard-d: #C08A1E; --mustard-l: #F3D37F;
  --teal: #3FA7A0; --teal-d: #257A74; --teal-dd: #1B5753; --teal-l: #8ACFC6;
  --blue: #7F9CC0; --blue-l: #B5C8DE; --wall: #B9CBD9;
  --good: #1B5753; --warn: #A8351C;
  --slab: 'Alfa Slab One', 'Rockwell', Georgia, serif;
  --sans: 'Jost', 'Segoe UI', system-ui, sans-serif;
  --script: 'Oleo Script', 'Brush Script MT', cursive;
  --radius: 14px;
  --shadow: 4px 4px 0 var(--ink);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.17 0 0 0 0 0.14 0 0 0 0 0.12 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--paper) var(--grain); color: var(--ink);
  font: 17px/1.5 var(--sans); min-height: 100vh;
  display: grid; grid-template-rows: auto auto 1fr auto auto;
}
button { font: inherit; color: inherit; }
body > * { min-width: 0; max-width: 100vw; }
img, video { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 99; border-radius: 8px; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; box-shadow: 0 0 0 6px var(--ink); }
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; box-shadow: none; }

/* ---------------- top bar ---------------- */
.topbar {
  background: var(--ink); color: var(--paper); display: flex; align-items: center; gap: 24px;
  padding: 10px 22px; flex-wrap: wrap; border-bottom: 4px solid var(--coral);
}
.brand { display: flex; flex-direction: column; line-height: 1.15; margin-right: auto; }
.brand-kicker { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--mustard-l); }
.brand-title { font-family: var(--slab); font-size: 20px; letter-spacing: .01em; }
.agent { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 10px; border-radius: 999px; background: #3d342e; font-weight: 600; font-size: 15px; border: 2px solid #5a4e46; }
.status-pill .dot { width: 11px; height: 11px; border-radius: 50%; background: #8E9894; box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.status-pill[data-state="ready"] .dot { background: var(--teal-l); }
.status-pill[data-state="call"] .dot { background: var(--coral-l); animation: blink 1.2s infinite; }
.status-pill[data-state="acw"] .dot { background: var(--mustard); }
.status-pill[data-state="call"] { border-color: var(--coral); }
@keyframes blink { 50% { opacity: .35; } }
.meta { display: inline-flex; flex-direction: column; line-height: 1.05; font-size: 18px; }
.meta-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #bfb19c; }
.mono { font-variant-numeric: tabular-nums; font-weight: 600; }
.whisper { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; border: 2px dashed #6b5e55; color: #bfb19c; font-size: 14px; transition: all .25s var(--ease); }
.whisper svg { width: 20px; height: 20px; }
.whisper.on { color: var(--ink); background: var(--mustard); border: 2px solid var(--mustard-l); box-shadow: 0 0 0 0 rgba(232,180,58,.6); animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(232,180,58,.55); } 70% { box-shadow: 0 0 0 12px rgba(232,180,58,0); } 100% { box-shadow: 0 0 0 0 rgba(232,180,58,0); } }
.tools { display: flex; gap: 8px; }
.icon-btn { background: transparent; border: 2px solid #6b5e55; color: var(--paper); border-radius: 10px; min-height: 44px; min-width: 44px; padding: 6px 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn:hover { border-color: var(--mustard); }
#btnMute .x { display: none; }
#btnMute[aria-pressed="true"] .x { display: inline; }
#btnMute[aria-pressed="true"] .waves { display: none; }

/* ---------------- progress strip ---------------- */
.progress { background: var(--paper-d); border-bottom: 2px solid var(--paper-dd); }
.progress ol { list-style: none; margin: 0 auto; padding: 8px 18px; display: flex; gap: 6px; max-width: 1500px; overflow-x: auto; }
.progress li { flex: 1 1 0; min-width: 92px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); padding: 6px 4px 4px; border-top: 6px solid var(--paper-dd); white-space: nowrap; }
.progress li.done { border-top-color: var(--teal); color: var(--teal-dd); }
.progress li.now { border-top-color: var(--coral); color: var(--ink); }
.progress li .n { font-family: var(--slab); margin-right: 4px; }
.progress li { overflow: hidden; text-overflow: ellipsis; }
.progress ol.review li .jump { all: unset; cursor: pointer; display: block; width: 100%; font: inherit; color: inherit; border-radius: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress ol.review li .jump:hover { text-decoration: underline; }
.progress ol.review li .jump:focus-visible { outline: 3px solid var(--mustard, #E2A83A); outline-offset: 2px; }

/* ---------------- desk ---------------- */
.desk { display: grid; grid-template-columns: 270px minmax(0, 1fr) 330px; gap: 18px; padding: 18px; max-width: 1640px; width: 100%; margin: 0 auto; align-items: start; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
body.theater .col-left, body.theater .col-right { display: none; }
body.theater .desk { grid-template-columns: minmax(0, 1fr); max-width: 1240px; }

.panel { background: var(--white); border: 2.5px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px 16px; position: relative; }
.panel-title { font: 600 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 10px; }

.portrait { width: 150px; height: 150px; border-radius: 50%; margin: 2px auto 10px; border: 3px solid var(--ink); background: var(--teal-l); position: relative; overflow: hidden; display: grid; place-items: center; box-shadow: 4px 4px 0 var(--mustard); }
.portrait.small { width: 92px; height: 92px; box-shadow: 3px 3px 0 var(--coral-l); background: var(--mustard-l); }
.portrait .initials { font-family: var(--slab); font-size: 46px; color: var(--ink); }
.portrait.small .initials { font-size: 34px; }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.portrait.has-img img { display: block; }
.portrait.has-img .initials { display: none; }
.portrait[data-who="none"] { background: var(--paper-d); box-shadow: none; border-style: dashed; }
.portrait::after { content: ''; position: absolute; left: 50%; bottom: 26%; width: 22%; height: 4%; margin-left: -11%; border-radius: 6px; background: var(--ink); opacity: 0; transition: opacity .1s; }
.portrait:not(.has-img).open::after { opacity: 1; transform: scaleY(3.2); }
@keyframes mouth { from { transform: scaleY(1); } to { transform: scaleY(3.2); } }
.portrait.talking { box-shadow: 4px 4px 0 var(--coral); }
.caller-name { text-align: center; font-family: var(--slab); font-size: 20px; margin: 0 0 6px; }
.caller-meta { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0; font-size: 14px; }
.caller-meta dt { color: var(--ink-soft); }
.caller-meta dd { margin: 0; font-weight: 600; }
.renee { text-align: center; }
.renee-name { font-family: var(--slab); font-size: 18px; margin: 0; }
.renee-sub { font-size: 13.5px; color: var(--ink-soft); margin: 4px 0 0; }
.renee.talking { background: #fff6dd; }

.gauge { width: 100%; height: auto; display: block; }
.needle { transform-origin: 100px 108px; transform: rotate(0deg); transition: transform 1.1s cubic-bezier(.34, 1.56, .64, 1); }
.gauge-read { text-align: center; font-weight: 700; margin: 2px 0 0; font-size: 15px; }

.notes-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.notes-list li { padding: 7px 10px; border-left: 5px solid var(--mustard); background: #fbf3df; border-radius: 0 8px 8px 0; animation: noteIn .45s var(--ease); }
.notes-list li.k-stated { border-left-color: var(--blue); }
.notes-list li.k-unstated { border-left-color: var(--coral); }
.notes-list li.k-match { border-left-color: var(--teal); }
.notes-list li b { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.notes-list li.empty { border: 2px dashed var(--paper-dd); background: transparent; color: var(--ink-soft); font-style: italic; animation: none; }
@keyframes noteIn { from { opacity: 0; transform: translateY(6px); } }

/* house: images when present, CSS colour-block rooms otherwise */
.house-view { position: relative; aspect-ratio: 14 / 9; border-radius: 10px; overflow: hidden; border: 2px solid var(--ink); background: #e9dfc7; }
.house-view .house-base { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.house-view.has-img .house-base { display: block; }
.room { position: absolute; transition: opacity 1.2s var(--ease), filter 1.2s var(--ease); }
.room img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.house-view.has-img .room { inset: 0; opacity: 0; }
.house-view.has-img .room img { display: block; }
.house-view.has-img .room.lit { opacity: 1; }
.house-view.has-img .room-label { display: none; }
.house-view:not(.has-img) .room { border: 2px solid var(--ink); display: grid; place-items: end start; padding: 6px; filter: grayscale(.85) brightness(.62); }
.house-view:not(.has-img) .room.lit { filter: none; box-shadow: inset 0 0 0 3px var(--mustard-l); }
.house-view:not(.has-img)::before { content: ''; position: absolute; left: 3%; right: 3%; top: 2%; height: 16%; background: var(--coral-d); clip-path: polygon(8% 100%, 50% 0, 92% 100%); }
.house-view:not(.has-img) .r-office { left: 4%; top: 18%; width: 45%; height: 39%; background: var(--teal-l); }
.house-view:not(.has-img) .r-studio { left: 51%; top: 18%; width: 45%; height: 39%; background: var(--mustard-l); }
.house-view:not(.has-img) .r-teens { left: 4%; top: 59%; width: 45%; height: 37%; background: var(--coral-l); }
.house-view:not(.has-img) .r-kitchen { left: 51%; top: 59%; width: 45%; height: 37%; background: var(--blue-l); }
.room-label { font-size: 12px; font-weight: 700; background: var(--white); border: 1.5px solid var(--ink); border-radius: 6px; padding: 1px 6px; }
.house-hint { font-size: 13px; color: var(--ink-soft); margin: 8px 0 0; }

/* ---------------- stage ---------------- */
.stage { background: var(--white); border: 2.5px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); min-height: 520px; padding: 28px 32px 30px; position: relative; outline: none; }
.stage > * { animation: stageIn .4s var(--ease); }
@keyframes stageIn { from { opacity: 0; transform: translateY(8px); } }
.eyebrow { font: 600 12.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--coral-d); margin: 0 0 10px; }
.stage h1, .stage h2.h { font-family: var(--slab); font-weight: 400; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.08; margin: 0 0 14px; letter-spacing: .005em; }
.kicker { font-family: var(--script); color: var(--teal-d); font-size: 24px; }
.lead { font-size: 18.5px; max-width: 62ch; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 22px; }
.row.end { justify-content: flex-end; }

.btn { min-height: 48px; padding: 10px 22px; border-radius: 12px; border: 2.5px solid var(--ink); background: var(--white); font-weight: 700; font-size: 16.5px; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); transition: transform .12s, box-shadow .12s, background .2s; }
.btn:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.primary { background: var(--coral-d); color: var(--white); }
.btn.teal { background: var(--teal-dd); color: var(--white); }
.btn.big { font-size: 20px; padding: 14px 30px; min-height: 58px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* start screen */
.start { position: relative; min-height: 560px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; text-align: center; color: var(--white);
  background: var(--coral) repeating-conic-gradient(from 0deg at 50% 52%, rgba(255,255,255,.13) 0 5deg, transparent 5deg 15deg); }
.start.has-img { background: #000 center / cover no-repeat; place-items: end center; }
.start.has-img h1, .start.has-img .kicker, .start.has-img .sub { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.start.has-img .start-inner { padding-bottom: 28px; }
.start.has-img .tags .tag { background: rgba(43,36,32,.92); }
.start-inner { position: relative; z-index: 1; padding: 40px 24px; max-width: 760px; }
.start h1 { font-size: clamp(44px, 7vw, 92px); color: var(--white); text-shadow: 5px 5px 0 var(--ink); margin: 0; }
.start .sub { font-size: 20px; margin: 8px 0 28px; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.start .tags { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.start .tag { background: rgba(43,36,32,.85); color: var(--paper); padding: 5px 12px; border-radius: 999px; font-size: 14px; }
.start .btn { color: var(--ink); }
.start .btn.primary { color: var(--white); }

/* film */
.film { position: relative; }
.film video { width: 100%; max-height: calc(100vh - 290px); min-height: 200px; border-radius: 10px; border: 2.5px solid var(--ink); background: #1d1815; display: block; aspect-ratio: 16 / 9; object-fit: contain; }
body.theater .stage { padding: 18px 22px 20px; min-height: 0; }
.film video::cue { font-family: var(--sans); font-size: 1em; background: rgba(43,36,32,.82); color: #fff; }
.film-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.film-label .t { font-family: var(--slab); font-size: 22px; }
.film-label .n { font-size: 13px; color: var(--ink-soft); letter-spacing: .1em; text-transform: uppercase; }

/* sticky notes + objectives */
.stickies { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 14px; }
.sticky { position: relative; min-height: 210px; padding: 18px 18px 16px; text-align: left; border: 2.5px solid var(--ink); border-radius: 4px 4px 18px 4px; cursor: pointer; background: var(--mustard-l); box-shadow: 4px 5px 0 rgba(43,36,32,.85); transform: rotate(var(--rot, -1.2deg)); transition: transform .3s var(--ease), background .3s; font-size: 16px; }
.sticky:nth-child(2) { --rot: 1.4deg; background: var(--teal-l); }
.sticky:nth-child(3) { --rot: -.6deg; background: var(--coral-l); }
.sticky:hover { transform: rotate(0) translateY(-3px); }
.sticky .num { font-family: var(--slab); font-size: 30px; line-height: 1; display: block; }
.sticky .q { font-weight: 700; font-size: 18px; display: block; margin-top: 8px; }
.sticky .more { display: block; margin-top: 10px; font-size: 14.5px; color: var(--ink-soft); }
.sticky[aria-pressed="true"]::after { content: '✓ heard'; position: absolute; right: 10px; top: 10px; font-size: 12px; font-weight: 700; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 2px 8px; }
.sticky::before { content: ''; position: absolute; left: 50%; top: -10px; width: 64px; height: 18px; margin-left: -32px; background: rgba(251,246,234,.75); border: 1px solid rgba(43,36,32,.25); transform: rotate(-3deg); }
.objectives { list-style: none; padding: 0; margin: 10px 0 0; counter-reset: o; display: grid; gap: 8px; }
.objectives li { counter-increment: o; padding-left: 44px; position: relative; min-height: 32px; }
.objectives li::before { content: counter(o); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-family: var(--slab); }

/* tier cards */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 14px; }
.tier { text-align: left; border: 2.5px solid var(--ink); border-radius: 14px; padding: 16px; background: var(--white); cursor: pointer; box-shadow: 4px 4px 0 var(--teal); min-height: 170px; transition: transform .15s; }
.tier:nth-child(2) { box-shadow: 4px 4px 0 var(--mustard); }
.tier:nth-child(3) { box-shadow: 4px 4px 0 var(--coral); }
.tier:hover { transform: translateY(-2px); }
.tier .tname { font-family: var(--slab); font-size: 24px; display: block; }
.tier .tspeed { display: inline-block; margin: 6px 0 8px; font-weight: 700; background: var(--ink); color: var(--paper); border-radius: 6px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.tier .tfit { display: block; font-size: 15px; color: var(--ink-soft); }
.tier[aria-pressed="true"] { background: #fbf3df; }
.tier[aria-pressed="true"]::after { content: '✓ heard'; float: right; font-size: 12px; font-weight: 700; }
.fine { font-size: 13px; color: var(--ink-soft); margin-top: 16px; max-width: 80ch; }

/* call stage */
.callhead { display: flex; align-items: center; gap: 14px; border-bottom: 2px dashed var(--paper-dd); padding-bottom: 12px; margin-bottom: 14px; }
.wave { display: flex; align-items: center; gap: 3px; height: 34px; flex: 1; }
.wave i { flex: 1; max-width: 6px; background: var(--paper-dd); border-radius: 3px; height: 18%; transition: height .12s, background .2s; }
.wave.dana i { background: var(--coral); }
.wave.renee i { background: var(--mustard-d); }
.callhead .who { font-family: var(--slab); font-size: 17px; min-width: 150px; }
.thread { display: flex; flex-direction: column; gap: 10px; max-height: 300px; overflow-y: auto; padding: 4px 4px 8px; scroll-behavior: smooth; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 16px; border: 2px solid var(--ink); font-size: 16px; animation: noteIn .35s var(--ease); }
.bubble .by { display: block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 2px; }
.bubble.dana { background: #fde3d9; align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.rep { background: #dff1ee; align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble.renee { background: #fff1c9; align-self: center; border-style: dashed; font-style: italic; max-width: 90%; }
.bubble.renee .by::before { content: '🎧 '; font-style: normal; }
.bubble.sys { align-self: center; background: transparent; border: none; font-size: 13px; color: var(--ink-soft); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

.choices { margin-top: 14px; }
.choices .prompt { font-family: var(--slab); font-size: 21px; margin: 0 0 10px; }
.choice { display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left; border: 2.5px solid var(--ink); background: var(--white); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); font-size: 16.5px; transition: transform .12s, background .2s; min-height: 56px; }
.choice:hover:not(:disabled) { transform: translateX(3px); background: #f8f1e1; }
.choice .letter { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-family: var(--slab); }
.choice:disabled { cursor: default; }
.choice.picked { background: #fbf3df; }
.choice.right { border-color: var(--good); background: #dff1ee; }
.choice.wrong { border-color: var(--warn); background: #fde3d9; }
.verdict { display: inline-block; font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; margin-left: 8px; color: var(--white); }
.verdict.ok { background: var(--good); }
.verdict.no { background: var(--warn); }
.waiting { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--coral-d); }
.waiting::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); animation: blink 1s infinite; }

.clues { line-height: 2.1; font-size: 17.5px; background: #fdf7ea; border: 2px dashed var(--paper-dd); border-radius: 12px; padding: 14px 16px; }
.clue { border: 2px solid var(--ink-soft); background: var(--white); border-radius: 8px; padding: 2px 8px; cursor: pointer; font-size: 16.5px; line-height: 1.5; }
.clue[aria-pressed="true"].yes { background: var(--mustard-l); border-color: var(--ink); font-weight: 600; }
.clue[aria-pressed="true"].meh { background: var(--blue-l); border-style: dashed; }
.clue-fb { min-height: 28px; font-weight: 600; margin-top: 10px; }

.record { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border: 2px solid var(--ink); border-radius: 12px; background: #fdf7ea; margin-top: 12px; }
.rec-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--paper-dd); }
.record.on .rec-dot { background: var(--coral); animation: blink .8s infinite; }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 700; }

/* score chip */
.scoreline { display: inline-flex; align-items: center; gap: 10px; font-family: var(--slab); font-size: 22px; padding: 8px 16px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--mustard-l); box-shadow: 3px 3px 0 var(--ink); margin-top: 14px; }

/* after-call work */
.acw { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cards { display: flex; flex-direction: column; gap: 8px; }
.ncard { text-align: left; border: 2px solid var(--ink); border-radius: 10px; background: var(--white); padding: 9px 12px; cursor: grab; font-size: 15px; box-shadow: 2px 2px 0 var(--ink); position: relative; min-height: 44px; }
.ncard[aria-pressed="true"] { outline: 3px solid var(--teal); }
.ncard.bounce { animation: bounce .55s; }
.ncard.used { opacity: .35; cursor: default; box-shadow: none; }
@keyframes bounce { 20% { transform: translateX(-10px) rotate(-2deg); } 50% { transform: translateX(8px) rotate(1deg); } 80% { transform: translateX(-4px); } }
.stamp { position: absolute; right: 8px; top: 50%; transform: translateY(-50%) rotate(-8deg); border: 3px solid var(--warn); color: var(--warn); font-family: var(--slab); font-size: 15px; padding: 0 6px; border-radius: 6px; background: rgba(251,246,234,.92); animation: stampIn .25s var(--ease); }
@keyframes stampIn { from { transform: translateY(-50%) rotate(-8deg) scale(1.8); opacity: 0; } }
.promptbox { background: var(--ink); color: var(--paper); border-radius: 14px; padding: 16px; min-height: 290px; border: 2.5px solid var(--ink); box-shadow: 4px 4px 0 var(--teal); }
.promptbox .ptitle { font: 600 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--mustard-l); }
.promptbox .ptext { font-family: ui-monospace, Consolas, monospace; font-size: 14.5px; margin: 10px 0; color: #efe5cf; }
.drop { border: 2px dashed #8f8173; border-radius: 10px; min-height: 120px; padding: 10px; display: flex; flex-direction: column; gap: 6px; transition: background .2s; }
.drop.over { background: rgba(63,167,160,.18); border-color: var(--teal-l); }
.drop .chip { background: #3f3630; border-left: 4px solid var(--teal-l); padding: 6px 10px; border-radius: 6px; font-size: 14px; animation: noteIn .3s; }
.drop .ph { color: #a99d8c; font-size: 14px; font-style: italic; }
.draft { border: 2.5px solid var(--ink); border-radius: 12px; padding: 14px 16px; background: #fdf7ea; margin-top: 8px; }
.draft .dline { display: block; width: 100%; text-align: left; border: 2px solid transparent; background: transparent; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 16px; }
.draft .dline:hover { border-color: var(--paper-dd); }
.draft .dline.caught { border-color: var(--warn); background: #fde3d9; text-decoration: line-through; text-decoration-color: var(--warn); }
.draft .dline.nope { animation: bounce .5s; }
.pcards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-top: 14px; }
.pcard { background: var(--ink); color: var(--paper); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; border: 2.5px solid var(--ink); }
.pcard h3 { margin: 0; font-family: var(--slab); font-weight: 400; font-size: 19px; color: var(--mustard-l); }
.pcard p { margin: 0; font-size: 14.5px; font-family: ui-monospace, Consolas, monospace; color: #efe5cf; flex: 1; }
.pcard .btn { align-self: flex-start; min-height: 42px; padding: 6px 14px; font-size: 14px; color: var(--ink); background: var(--mustard-l); box-shadow: 3px 3px 0 var(--mustard-d); }
.pcard.guard { background: #fde3d9; color: var(--ink); border-color: var(--warn); box-shadow: 4px 4px 0 var(--warn); }
.pcard.guard h3 { color: var(--warn); }
.pcard.guard ul { margin: 0; padding-left: 18px; font-size: 15px; display: grid; gap: 6px; }

/* queue */
.queue-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.qdots { display: flex; gap: 6px; }
.qdots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); background: var(--white); }
.qdots i.done { background: var(--teal); }
.qdots i.now { background: var(--coral); }
.ringing { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 2.5px solid var(--ink); border-radius: 14px; background: #fde3d9; margin-bottom: 12px; }
.ringing .portrait { width: 78px; height: 78px; margin: 0; box-shadow: 3px 3px 0 var(--coral); }
.ringing .portrait .initials { font-size: 28px; }

/* end of shift */
.result { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.bigscore { width: 170px; height: 170px; border-radius: 50%; border: 4px solid var(--ink); display: grid; place-items: center; text-align: center; background: var(--mustard); box-shadow: 5px 5px 0 var(--ink); font-family: var(--slab); }
.bigscore.pass { background: var(--teal-l); }
.bigscore b { display: block; font-size: 54px; line-height: 1; font-weight: 400; }
.bigscore small { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.guide { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 18px; border: 2.5px solid var(--ink); border-radius: 14px; overflow: hidden; font-size: 15.5px; }
.guide caption { text-align: left; font-family: var(--slab); font-size: 24px; padding-bottom: 10px; }
.guide th { background: var(--ink); color: var(--paper); text-align: left; padding: 10px 12px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.guide td { padding: 10px 12px; border-top: 2px solid var(--paper-d); vertical-align: top; background: var(--white); }
.guide td:first-child { font-weight: 700; font-style: italic; }
.guide td:last-child { font-weight: 700; color: var(--teal-dd); }
.method { margin-top: 14px; font-size: 18px; }
.method b { font-family: var(--slab); font-weight: 400; color: var(--coral-d); }

/* caption bar */
.captionbar { position: sticky; bottom: 0; z-index: 20; background: var(--ink); color: var(--white); display: flex; align-items: center; gap: 14px; padding: 10px 22px; min-height: 58px; border-top: 4px solid var(--mustard); }
.caption { flex: 1; font-size: 18px; line-height: 1.35; max-width: 1100px; margin: 0 auto; transition: opacity .2s; }
.caption:empty, .caption.idle { opacity: .5; }
.caption.idle .cap-text::before { content: 'Captions appear here when someone speaks.'; font-size: 14px; color: #bfb19c; }
.cap-who { font-family: var(--slab); font-size: 14px; letter-spacing: .06em; margin-right: 10px; padding: 1px 8px; border-radius: 6px; background: var(--paper); color: var(--ink); }
.cap-who:empty { display: none; }
.cap-who.renee { background: var(--mustard); }
.cap-who.dana { background: var(--coral-l); }
.skip-line { background: transparent; color: var(--paper); border: 2px solid #6b5e55; border-radius: 10px; min-height: 44px; padding: 6px 12px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.skip-line:hover { border-color: var(--mustard); }

.transcript { position: fixed; right: 16px; top: 90px; bottom: 90px; width: min(420px, 92vw); background: var(--white); border: 2.5px solid var(--ink); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--ink); z-index: 40; display: flex; flex-direction: column; }
.transcript-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 2px solid var(--paper-d); }
.transcript-head h2 { margin: 0; font-family: var(--slab); font-weight: 400; font-size: 20px; }
.transcript-head .icon-btn { color: var(--ink); border-color: var(--ink); }
.transcript ol { list-style: none; margin: 0; padding: 12px 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; }
.transcript li b { font-size: 11px; letter-spacing: .1em; display: block; color: var(--ink-soft); }

/* rewind overlay */
.rewind { position: fixed; inset: 0; z-index: 60; display: none; place-items: center; align-content: center; gap: 14px; background: var(--coral) repeating-conic-gradient(from 0deg at 50% 45%, rgba(255,255,255,.14) 0 5deg, transparent 5deg 15deg); }
.rewind.on { display: grid; animation: rw 1.3s var(--ease) both; }
.rewind-badge { width: 130px; height: 130px; border-radius: 50%; background: var(--white); border: 4px solid var(--ink); display: grid; place-items: center; font-size: 46px; color: var(--ink); animation: spin 1.3s linear; }
.rewind-word { font-family: var(--slab); font-size: 64px; color: var(--white); text-shadow: 4px 4px 0 var(--ink); }
@keyframes spin { to { transform: rotate(-720deg); } }
@keyframes rw { 0% { opacity: 0; } 15%, 80% { opacity: 1; } 100% { opacity: 0; } }

.foot { font-size: 12.5px; color: var(--ink-soft); text-align: center; padding: 14px 22px 18px; max-width: 1100px; margin: 0 auto; }
.print-only { display: none; }

/* ---------------- responsive ---------------- */
@media (max-width: 1180px) {
  .desk { grid-template-columns: 240px minmax(0, 1fr); }
  .col-right { grid-column: 1 / -1; flex-direction: row; }
  .col-right .panel { flex: 1; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .topbar { padding: 8px 14px; gap: 10px; }
  .brand-title { font-size: 17px; }
  .whisper span { display: none; }
  .meta:nth-of-type(2) { display: none; }
  .desk { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 12px; }
  .progress li { min-width: 74px; font-size: 11.5px; }
  .tools .icon-btn { padding: 6px; }
  .agent { gap: 10px; }
  .renee { display: none; }
  .house-view { max-height: 260px; }
  .col-center { order: -1; }
  .col-left { flex-direction: row; flex-wrap: wrap; }
  .col-left .panel { flex: 1 1 160px; }
  .portrait { width: 104px; height: 104px; }
  .col-right { flex-direction: column; }
  .stage { padding: 18px 16px 20px; min-height: 0; }
  .acw, .pcards { grid-template-columns: 1fr; }
  .result { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .caption { font-size: 15.5px; }
  .captionbar { padding: 8px 12px; }
  .bubble { max-width: 94%; }
  .start { min-height: 460px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* print: only the pocket guide */
@media print {
  body > *:not(#printGuide) { display: none !important; }
  body { background: #fff; display: block; }
  #printGuide { display: block !important; color: #000; font-family: var(--sans); padding: 10mm; }
  #printGuide h1 { font-family: var(--slab); font-weight: 400; font-size: 26pt; margin: 0 0 4mm; }
  #printGuide table { width: 100%; border-collapse: collapse; font-size: 12pt; }
  #printGuide th, #printGuide td { border: 1.5pt solid #000; padding: 3mm; text-align: left; vertical-align: top; }
  #printGuide th { background: #eee; }
  #printGuide .q { margin-top: 6mm; font-size: 12pt; }
}

/* ---------------- polish pass ---------------- */
/* after-call work: Renee's on-screen instruction, blocked notes, sent summary */
.instr { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; background: #fff1c9; border: 2px dashed var(--mustard-d); border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; }
.instr-by { grid-row: span 2; font-family: var(--slab); font-size: 13px; background: var(--mustard); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; }
.instr-by::before { content: '🎧 '; }
.instr p { margin: 0; font-size: 16.5px; }
.instr .instr-kbd { font-size: 13.5px; color: var(--ink-soft); }
.blocked { color: var(--warn); }
.kept { font-weight: 700; color: var(--teal-dd); margin: 0 0 10px; }
.sent { background: var(--ink); color: var(--paper); border-radius: 14px; padding: 14px 16px; grid-column: 1 / -1; box-shadow: 4px 4px 0 var(--teal); }
.sent .ptitle { font: 600 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--mustard-l); }
.sent ul { margin: 8px 0 0; padding-left: 18px; font-size: 14.5px; columns: 2; column-gap: 28px; }
.draft .dline.fixed { color: var(--teal-dd); font-weight: 700; cursor: default; }
.draft, .keep, .continue-row { scroll-margin: 90px 0 110px; }
.continue-row .btn { min-width: 260px; }

/* phone: patience meter pinned on the stage, notes + household in a sheet */
.mobilebar { display: none; }
.sheet-close { display: none; }
@media (max-width: 760px) {
  .mobilebar { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 0; z-index: 15; background: var(--paper); padding: 6px 0 8px; }
  body.theater .mobilebar { display: none; }
  .mb-meter { display: none; align-items: center; gap: 10px; background: var(--white); border: 2.5px solid var(--ink); border-radius: 12px; padding: 7px 12px; box-shadow: 3px 3px 0 var(--ink); }
  .mobilebar.has-meter .mb-meter { display: flex; }
  .mb-label { font: 600 11px/1.1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }
  .mb-track { flex: 1; height: 12px; border-radius: 999px; border: 2px solid var(--ink); background: linear-gradient(90deg, var(--coral) 0 33%, var(--mustard) 33% 66%, var(--teal) 66%); position: relative; }
  .mb-fill { position: absolute; top: -6px; width: 6px; height: 20px; margin-left: -3px; border-radius: 3px; background: var(--ink); left: 50%; transition: left 1.1s cubic-bezier(.34, 1.56, .64, 1); }
  .mb-read { font-weight: 700; font-size: 13.5px; min-width: 92px; text-align: right; }
  .mb-tabs { display: flex; gap: 8px; }
  .mb-tab { flex: 1; min-height: 44px; border: 2px solid var(--ink); border-radius: 10px; background: var(--white); font-weight: 700; font-size: 14.5px; position: relative; cursor: pointer; }
  .mb-tab .badge { position: absolute; right: 8px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); border: 2px solid var(--ink); }
  .col-left .patience { display: none !important; }
  .col-right { display: none; }
  .col-right.sheet-open { display: flex; position: fixed; left: 8px; right: 8px; bottom: 74px; max-height: 72vh; overflow-y: auto; z-index: 45; background: var(--paper); border: 2.5px solid var(--ink); border-radius: var(--radius); box-shadow: 0 -4px 0 rgba(43,36,32,.2), 6px 6px 0 var(--ink); padding: 10px; }
  .col-right.sheet-open .sheet-close { display: block; position: sticky; top: 0; align-self: flex-end; z-index: 2; min-height: 44px; padding: 6px 14px; border: 2px solid var(--ink); border-radius: 10px; background: var(--ink); color: var(--paper); font-weight: 700; cursor: pointer; }
  .sent ul { columns: 1; }
}
.stage button, .stage .choices { scroll-margin-bottom: 96px; scroll-margin-top: 16px; }
