/* room.css: live votes on the projector, the teacher's phone and the student's phone (spec v0.6). Taken from the
   approved mockup (mockups/live-votes/mock.css); the tokens are class.css's Sports-day ones. The bar steps are
   lightness steps of --primary, one hue, so the letter, not the colour, carries the meaning. */

/* projector: room strip, room-open screen, vote, results */
.room-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 18px; margin: 0 0 12px; font-size: .8em; }
.code { color: var(--link); font-weight: 700; letter-spacing: .08em; }   /* BCJK: the room code in a colour of its own */
.room-strip .grow { flex: 1 1 auto; }
.room-open { display: grid; gap: 6px; }
.room-open canvas.qr { max-width: 100%; border-radius: 12px; }
.big-code { color: var(--link); font-size: clamp(3rem, 8vw, 5.5rem); font-weight: 700; letter-spacing: .12em; line-height: 1; margin: 6px 0 10px; }
.joined { font-size: 1.2em; }
.join-url { font-weight: 700; }
.vote-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 16px; }
.ring { --p: 1; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--primary) calc(var(--p) * 360deg), var(--tint) 0); }
.ring span { width: 74px; height: 74px; border-radius: 50%; background: var(--surface-strong); display: grid; place-items: center; font-weight: 700; font-size: 1.1em; }
.ring.small { width: 44px; height: 44px; } .ring.small span { width: 34px; height: 34px; font-size: .75em; }
.answered { flex: 1 1 260px; }
.meter { height: 10px; border-radius: 999px; background: var(--tint); overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; width: 0; background: var(--primary); border-radius: 999px; transition: width .6s var(--ease); }
.controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.bars { display: grid; gap: 14px; margin: 18px 0 6px; padding: 0; list-style: none; }
.bar { display: grid; grid-template-columns: 2.2em 1fr 4.5em; gap: 14px; align-items: center; }
.bar .track { height: 44px; border-radius: 12px; background: var(--tint); overflow: hidden; }
.bar .fill { height: 100%; width: 0; border-radius: 12px; background: var(--step, var(--ink-3)); transition: width 1.1s var(--spring); }
.bar .count { text-align: right; font-weight: 700; }
.bar .opt { grid-column: 2 / 4; color: var(--ink-2); font-size: .72em; margin-top: -8px; }
.bar.win .letter { background: var(--primary); color: var(--on-primary); }
.pick { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; margin: 6px 0 0; }
.pick svg { width: 1.2em; height: 1.2em; }
.pair-form { display: grid; gap: 10px; max-width: 420px; }
.pair-form label, .phone label { display: grid; gap: 4px; color: var(--ink-2); font-size: .92em; }
.pair-form input, .phone input { font: inherit; color: var(--ink); min-height: 52px; padding: 8px 14px; border: 0; border-radius: 14px; background: var(--field);
  box-shadow: inset 0 0 0 1.5px var(--rule); width: 100%; }
.err { color: var(--negative); }

/* phones: the student's page and the teacher's Room tab */
.phone { max-width: 420px; margin: 0 auto; padding: 22px 18px; display: flex; flex-direction: column; gap: 14px; font-size: 15.5px; min-height: 70vh; }
.phone .bar-top { display: flex; justify-content: space-between; align-items: center; color: var(--ink-2); font-size: .85em; }
.phone h2 { font-size: 1.35em; line-height: 1.3; margin: 6px 0 0; }
.phone h2.q { font-size: 1.12em; font-weight: 400; line-height: 1.6; }   /* BCJK: "let's not bold the questions" */
.phone .fill-space { flex: 1 1 auto; }
.phone .btn { width: 100%; justify-content: center; text-align: center; }
.phone .fine { color: var(--ink-2); font-size: .85em; margin: 0; }
.phone input.code-in { letter-spacing: .3em; font-weight: 700; font-size: 1.3em; text-transform: uppercase; }
.opt-btn { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; width: 100%; min-height: 64px; padding: 12px 14px; border: 0; border-radius: 18px;
  background: var(--surface-strong); box-shadow: inset 0 0 0 1.5px var(--rule); text-align: left; font: inherit; color: var(--ink); line-height: 1.5; cursor: pointer; }
.opt-btn[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--primary); }
.opt-btn[aria-pressed="true"] .letter { background: var(--primary); color: var(--on-primary); }
.got { text-align: center; display: grid; gap: 10px; justify-items: center; }
.got .tick { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); }
.got .tick svg { width: 30px; height: 30px; color: var(--positive); }
.pin { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--tint); }
.pin b { font-size: 1.8em; letter-spacing: .12em; }
.chip { font: inherit; font-size: .82em; min-height: 44px; min-width: 64px; padding: 4px 12px; border: 0; border-radius: 999px; cursor: pointer; color: var(--ink);
  background: var(--surface-strong); box-shadow: inset 0 0 0 1.5px var(--rule); }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: var(--primary); color: var(--on-primary); box-shadow: none; }
.waitlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.waitlist li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 14px; background: var(--tint); }
.phone .controls { margin-top: 0; }
.phone .controls .btn { flex: 1 1 0; width: auto; }
.ok-dot svg { width: 14px; height: 14px; color: var(--positive); vertical-align: -2px; }

/* actor page tabs: Script | Room */
.page-tabs { display: flex; gap: 8px; margin: 0 0 14px; }

@media (max-width: 700px) { .bar { grid-template-columns: 2em 1fr 3.6em; } }
@media (prefers-reduced-motion: reduce) { .bar .fill, .meter i { transition: none; } }
:root[data-motion="reduce"] .bar .fill, :root[data-motion="reduce"] .meter i { transition: none; }

/* the "You're in" toast on the student's phone (BCJK): drops in, holds, lifts away; still, but shown, under reduced motion */
.toast { position: fixed; top: 58px; left: 50%; transform: translateX(-50%); z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 999px; font-weight: 700; color: var(--ink); background: var(--surface-strong);
  box-shadow: var(--shadow), inset 0 0 0 1.5px var(--rule); animation: toast-in 3.2s var(--spring) both; }
.toast .tick { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tint); }
.toast .tick svg { width: 16px; height: 16px; color: var(--positive); }
@keyframes toast-in { 0% { opacity: 0; transform: translate(-50%, -140%); } 12% { opacity: 1; transform: translate(-50%, 0); } 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -140%); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: toast-fade 3.2s linear both; } }
:root[data-motion="reduce"] .toast { animation: toast-fade 3.2s linear both; }
@keyframes toast-fade { 0%, 90% { opacity: 1; } 100% { opacity: 0; } }

.diag-out { white-space: pre-wrap; word-break: break-word; }

/* ---- the QCE52A lesson (spec v0.7) ---- */
/* BCJK, 12 Oct retest: "The prompts in the game are way too big, making all the responses too small to read." */
.q-hero { font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.35; font-weight: 700; }
.classroom .choices .choice { font-size: 1.05em; }
/* Tony's options read aloud: the two shared sentences once, above them, and a marker in their place (BCJK, 13 Oct) */
.shared { display: grid; gap: 6px; margin: 12px 0 4px; padding: 12px 16px; border-radius: 14px; background: var(--tint); }
.shared p { margin: 0; }
.slot { display: inline-block; margin: 0 .2em; padding: 0 .55em; border-radius: 999px; font-size: .78em; font-weight: 700; line-height: 1.7;
  vertical-align: .08em; background: var(--surface-strong); box-shadow: inset 0 0 0 1.5px var(--rule); white-space: nowrap; }
.choice.off { opacity: .55; }
.strip-timer { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* D's cloud: phrases sized by how many typed them; grouped by idea in order, never labelled or coloured by group */
.cloud { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; }
.cw { --s: 1; font-size: calc(.8em + var(--s) * .22em); font-weight: 700; padding: 4px 12px; border-radius: 12px; background: var(--tint); }
.cw .cn { font-size: .7em; color: var(--ink-2); font-weight: 400; }
/* "Scene 1 of 5" fades in and out above the scene (BCJK, 12 Oct retest) */
.scene-tag { color: var(--ink-2); font-size: .8em; margin: 0 0 8px; animation: scene-tag 3.6s ease both; }
@keyframes scene-tag { 0% { opacity: 0; } 15% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .scene-tag { animation: none; } }
:root[data-motion="reduce"] .scene-tag { animation: none; }
.earlier .scene-tag { display: none; }
/* the phones: the winner banner (gold lettering with the word, so colour is never alone) and typed answers */
.banner { text-align: center; display: grid; gap: 8px; justify-items: center; }
.banner .win-word { font-size: 2.4em; font-weight: 800; letter-spacing: .02em; color: var(--gold, #a8740a); }
.phone textarea { font: inherit; color: var(--ink); min-height: 120px; padding: 10px 14px; border: 0; border-radius: 14px; background: var(--field);
  box-shadow: inset 0 0 0 1.5px var(--rule); width: 100%; resize: vertical; }
.phone .count { text-align: right; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: fall 2.8s linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }
:root[data-motion="reduce"] .confetti { display: none; }
/* the student's top bar (BCJK, 12 Oct retest): the room code underlined; Leave faded until tapped or hovered, left of Settings */
.phone .bar-top .code-u { text-decoration: underline 2px; text-underline-offset: 3px; }
.phone .bar-top .acts { display: inline-flex; gap: 6px; align-items: center; margin-right: -8px; }
.chip.faint { opacity: .55; box-shadow: none; background: transparent; }
.chip.faint:hover, .chip.faint:focus-visible, .chip.faint:active { opacity: 1; box-shadow: inset 0 0 0 1.5px var(--rule); }
/* host phone lists */
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 14px; background: var(--tint); }
.list li.hid { opacity: .5; text-decoration: line-through; }
.list .grp { color: var(--ink-2); font-size: .8em; }
.phone h3 { font-size: 1em; margin: 8px 0 0; }
.room-card .code { font-size: 2.2em; letter-spacing: .12em; }
.room-card .pin-sm { font-weight: 700; letter-spacing: .12em; }
.pin.room-card { background: var(--surface-strong); box-shadow: inset 0 0 0 1.5px var(--rule); }
:root[data-pips="hide"] .strike-count { display: none; }

/* ---- session 7 part 2 (BCJK, 13 Oct) ---- */
/* the strip: one row, the rare actions in a menu */
.room-strip { flex-wrap: nowrap; gap: 12px 16px; font-size: .78em; }
.room-strip > span { white-space: nowrap; }
.room-strip .strip-timer .btn { min-height: 40px; padding: 4px 12px; }
.room-menu { position: relative; }
.room-menu > summary { list-style: none; cursor: pointer; min-height: 40px; padding: 4px 14px; }
.room-menu > summary::-webkit-details-marker { display: none; }
.room-menu .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; display: grid; gap: 8px; padding: 10px; min-width: 230px; border-radius: 16px; }
.room-menu .menu .btn { width: 100%; justify-content: flex-start; }
.room-menu[open] .menu { animation: pop-in .18s var(--ease, ease) both; }
@media (max-width: 760px) { .room-strip { flex-wrap: wrap; } }
/* names on the projector, and the door */
.pills { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 2px; padding: 0; }
.pill { padding: 6px 14px; border-radius: 999px; background: var(--surface-strong); box-shadow: inset 0 0 0 1.5px var(--rule); font-weight: 700; font-size: .85em;
  cursor: grab; user-select: none; touch-action: none; }
.pill.new { animation: pop-in .35s var(--spring, ease) both; }
.pill.waiting { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); border: 1.5px dashed transparent; font-weight: 400; cursor: pointer; }
.pill.lifted { opacity: .35; }
.pill.ghost { position: fixed; z-index: 40; pointer-events: none; transform: translate(-50%, -50%) rotate(-3deg) scale(1.08); box-shadow: var(--shadow), inset 0 0 0 1.5px var(--rule); animation: none; }
.pill:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.door { position: fixed; z-index: 35; left: 50%; bottom: 28px; transform: translate(-50%, 30px); opacity: 0; display: grid; justify-items: center; gap: 4px;
  padding: 16px 26px; border-radius: 22px; background: var(--surface-strong); box-shadow: var(--shadow), inset 0 0 0 2px var(--rule); color: var(--ink-2);
  transition: transform .2s var(--spring, ease), opacity .2s ease, background .15s ease, color .15s ease; }
.door svg { width: 44px; height: 44px; }
.door[hidden] { display: none; }   /* a hidden door must not sit over the page catching clicks (verifier, 13 Oct) */
.names-row { margin: -4px 0 12px; padding: 10px 16px; font-size: .8em; }
.door.show { opacity: 1; transform: translate(-50%, 0); }
.door.hot { background: var(--negative); color: #fff; transform: translate(-50%, 0) scale(1.12); }
.toast.has-action { padding-right: 8px; }
.toast .chip { min-height: 36px; }
.toast { animation-duration: var(--toast-ms, 3.2s); }
/* the pick screen: the bars are the buttons */
.bar-btn { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 2.2em 1fr 4.5em; gap: 14px; align-items: center; width: 100%; padding: 6px 8px; border-radius: 14px; cursor: pointer; }
.bar-btn:hover { background: var(--tint); }
.bar-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.bar-btn[aria-pressed="true"] { box-shadow: inset 0 0 0 2.5px var(--primary); }
.bar-btn[aria-pressed="true"] .letter { background: var(--primary); color: var(--on-primary); }
.bar-btn .opt { grid-column: 2 / 4; }
/* transitions (BCJK, 13 Oct: "Include more animations and transitions"); all off under reduced motion */
@keyframes pop-in { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.stage.enter > * { animation: rise-in .38s var(--spring, ease) both; }
.stage.enter .choices > * { animation: rise-in .4s var(--spring, ease) both; }   /* moves only: a vote count arriving does not replay it */
.choices > *:nth-child(2) { animation-delay: .06s; } .choices > *:nth-child(3) { animation-delay: .12s; }
.cloud .cw.new { animation: pop-in .45s var(--spring, ease) both; }
.cloud .cw:nth-child(3n+2) { animation-delay: .08s; } .cloud .cw:nth-child(3n) { animation-delay: .16s; }
.ring.ending span { animation: tick-pulse 1s ease-in-out infinite; }
@keyframes tick-pulse { 50% { transform: scale(1.12); } }
.phone > * { animation: rise-in .32s var(--spring, ease) both; }
.phone .opt-btn:nth-of-type(2) { animation-delay: .05s; } .phone .opt-btn:nth-of-type(3) { animation-delay: .1s; }
.banner .win-word { animation: pop-in .6s var(--spring, ease) both; }
@media (prefers-reduced-motion: reduce) { .stage.enter > *, .choices > *, .cloud .cw, .phone > *, .pill, .banner .win-word, .room-menu[open] .menu, .ring.ending span { animation: none !important; } .door { transition: none; } }
:root[data-motion="reduce"] .stage.enter > *, :root[data-motion="reduce"] .choices > *, :root[data-motion="reduce"] .cloud .cw, :root[data-motion="reduce"] .phone > *,
:root[data-motion="reduce"] .pill, :root[data-motion="reduce"] .banner .win-word, :root[data-motion="reduce"] .room-menu[open] .menu, :root[data-motion="reduce"] .ring.ending span { animation: none !important; }
:root[data-motion="reduce"] .door { transition: none; }
/* the actors' Live tab */
.live-card { display: grid; gap: 8px; }
.live-card h2 { font-size: 1.15em; }
.live-card .line.mine { font-size: 1.12em; font-weight: 700; padding: 8px 10px; border-radius: 12px; background: var(--tint); }
.live-card .line.other { color: var(--ink-2); }
.live-card .your-line { justify-self: start; margin: 0; padding: 2px 10px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: .8em; }
.live-card.enter { animation: rise-in .35s var(--spring, ease) both; }
.roles { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.roles legend { color: var(--ink-2); font-size: .92em; margin-bottom: 4px; }
.role { display: flex !important; grid-auto-flow: column; align-items: center; gap: 10px; min-height: 48px; padding: 6px 14px; border-radius: 14px; background: var(--surface-strong); box-shadow: inset 0 0 0 1.5px var(--rule); color: var(--ink) !important; }
.role input { width: auto !important; min-height: 0 !important; box-shadow: none !important; }
@media (prefers-reduced-motion: reduce) { .live-card.enter { animation: none; } }
:root[data-motion="reduce"] .live-card.enter { animation: none; }
.bars li.bar.pickable { display: block; }
@media (max-width: 700px) { .bar-btn { grid-template-columns: 2em 1fr 3.6em; } }

/* ---- session 8, the 13 Oct retest (BCJK) ---- */
/* waiting: three dots that swell one after another, a 3 s cycle; loading: a spinning arc that grows and shrinks; both still
   (static) under reduced motion, like every animation here */
.dots { display: inline-flex; gap: .45em; align-items: center; height: 1.4em; padding: .2em 0; }
.dots i { width: .5em; height: .5em; border-radius: 50%; background: var(--ink-3); animation: dot-swell 3s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: 1s; } .dots i:nth-child(3) { animation-delay: 2s; }
@keyframes dot-swell { 0%, 34%, 100% { transform: scale(1); opacity: .55; } 14% { transform: scale(1.7); opacity: 1; } }
.spinner { width: 1.6em; height: 1.6em; flex: none; color: var(--primary); animation: spin 1.4s linear infinite; }
.spinner circle { fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1 150; stroke-dashoffset: 0; animation: arc 1.4s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes arc { 0% { stroke-dasharray: 1 150; stroke-dashoffset: 0; } 50% { stroke-dasharray: 90 150; stroke-dashoffset: -35; } 100% { stroke-dasharray: 90 150; stroke-dashoffset: -124; } }
.loading { display: flex; align-items: center; gap: 12px; color: var(--ink-2); margin: 0; }
.loading span:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .dots i, .spinner, .spinner circle { animation: none !important; } .spinner circle { stroke-dasharray: 90 150; } }
:root[data-motion="reduce"] .dots i, :root[data-motion="reduce"] .spinner, :root[data-motion="reduce"] .spinner circle { animation: none !important; }
:root[data-motion="reduce"] .spinner circle { stroke-dasharray: 90 150; }

/* the point markers in each framing option, filled with the speaker's colour (BCJK: "Whole box.") */
.slot.slot-J { background: var(--janice); color: var(--paper); box-shadow: none; }
.slot.slot-W { background: var(--wayne); color: var(--paper); box-shadow: none; }

/* who reacts, below Tony's response card (BCJK: "Something like Janice reacts.") */
.reacts { margin: 2px 0 0 30px; font-size: .9em; color: var(--ink-2); }

/* the ending, in full on the projector */
.ending .hero { margin-bottom: 14px; }
.end-lines p { margin: 0 0 10px; }
.end-lines .dir { color: var(--ink-2); }

/* the end screen: the spoken question */
.the-end .hero { margin: 8px 0 10px; }

/* the dock: the buttons, and the scene and counters centred on a row of their own when space runs out */
.dock { container-type: inline-size; justify-content: space-between; }
.dock-nav, .dock-room { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.dock-status { display: inline-flex; align-items: center; justify-content: center; gap: 6px 16px; flex-wrap: wrap; flex: 1 1 auto; }
@container (max-width: 820px) { .dock-status { order: 3; flex-basis: 100%; } }
.scene-btn { font: inherit; color: var(--ink); background: none; border: 0; min-height: 44px; padding: 4px 8px; border-radius: 10px; cursor: pointer;
  text-decoration: underline 1.5px; text-decoration-color: var(--ink-3); text-underline-offset: 4px; }
.scene-btn:hover:not([disabled]) { background: var(--tint); text-decoration-color: var(--ink); }
.scene-btn[disabled] { cursor: default; text-decoration: none; }
/* the earlier beats, over the page */
.earlier-dlg { width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 0; border: 0; color: var(--ink); background: var(--surface-strong); font-size: 1rem; }
.earlier-dlg::backdrop { background: rgba(0,0,0,.35); }
.earlier-dlg[open] { animation: pop-in .2s var(--ease, ease) both; }
.earlier-dlg .dlg-in { padding: 0 22px 20px; }   /* the dialog itself has no padding, so only the backdrop closes it */
.earlier-dlg .dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -22px 12px; padding: 14px 22px 10px;
  position: sticky; top: 0; z-index: 1; background: var(--surface-strong); }
.earlier-dlg ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.earlier-dlg li { padding: 10px 14px; border-radius: 14px; background: var(--tint); }
.earlier-dlg li .glass { background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0; }
.earlier-dlg li p { margin: 0 0 6px; }
.earlier-dlg .scene-tag { display: none; }
:root[data-motion="reduce"] .earlier-dlg[open] { animation: none; }

/* the actors' Live tab: the scene so far, the beat on stage, the other actor's lines dulled */
.live .me { font-size: .9em; }
.live .me > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; list-style: none; }
.live .me > summary::-webkit-details-marker { display: none; }
.live .me > summary .faint { margin-left: auto; font-size: .85em; }
.live .me > summary .faint::after { content: " ▾"; }
.live .me[open] > summary .faint::after { content: " ▴"; }
.live .me .chip { margin-top: 8px; }
.scene-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.scene-list .past { padding: 10px 12px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--rule); }
.scene-list .past h3 { margin: 0 0 6px; font-size: .85em; color: var(--ink-2); }
.scene-list .past .line { font-size: .92em; }
.live-card.now { scroll-margin-top: 12px; padding: 12px; border-radius: 16px; box-shadow: inset 0 0 0 2px var(--primary); }
.live-card .now-tag { justify-self: start; margin: 0; padding: 2px 10px; border-radius: 999px; background: var(--tint); font-weight: 700; font-size: .8em; }
.live .line.other { color: var(--ink-3); }
.live .line.mine { color: var(--ink); }
.scene-list .line.mine { font-weight: 700; }

/* the teacher's phone: folded details */
.phone details.more > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--ink-2); font-size: .9em; }
.phone details.more[open] { display: grid; gap: 8px; }
.phone .stack { display: grid; gap: 8px; }

/* ---- session 9, the second 13 Oct retest (BCJK) ---- */
/* results: a ring around each percentage, the words beside it */
@property --w { syntax: "<number>"; inherits: false; initial-value: 0; }
.bars.rings { gap: 10px; }
.rings .bar, .rings .bar-btn { display: grid; grid-template-columns: auto auto 1fr; gap: 14px; align-items: center; }
.rings .bar.pickable { display: block; }
.pct-ring { position: relative; width: 78px; height: 78px; display: grid; place-items: center; flex: none; }
.pct-ring .fill { position: absolute; inset: 0; width: auto; height: auto; border-radius: 50%; --w: 0;
  background: conic-gradient(var(--step, var(--ink-3)) calc(var(--w) * 1%), var(--tint) 0); transition: --w 1.1s var(--ease, ease); }
.pct-ring .count { position: relative; width: 60px; height: 60px; border-radius: 50%; background: var(--surface-strong); display: grid; place-items: center;
  font-weight: 700; font-size: .85em; text-align: center; }
.rings .opt { grid-column: auto; margin: 0; color: var(--ink); font-size: .9em; line-height: 1.5; }
.rings .opt .n { color: var(--ink-2); font-size: .85em; }
@media (max-width: 700px) { .pct-ring { width: 62px; height: 62px; } .pct-ring .count { width: 48px; height: 48px; font-size: .75em; } .rings .bar, .rings .bar-btn { gap: 10px; } }
:root[data-motion="reduce"] .pct-ring .fill { transition: none; }
@media (prefers-reduced-motion: reduce) { .pct-ring .fill { transition: none; } }

/* the critical action windows: a double border in the style of the old handheld battle menu (BCJK: "for nostalgia and a
   bit of an unexpected element to an otherwise too polished/modern/standard look"), with a ▶ cursor on the choice */
.pk { background: var(--surface-strong) !important; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 14px;
  border: 4px solid var(--ink); box-shadow: inset 0 0 0 4px var(--surface-strong), inset 0 0 0 6.5px var(--ink), 0 10px 28px rgba(0,0,0,.18) !important; }
.pk .choice, .pk .opt-btn { box-shadow: none; background: transparent; border-radius: 8px; position: relative; padding-left: 30px; }
.pk .choice::before, .pk .opt-btn::before, .pk .bar-btn::before { content: "▶"; position: absolute; left: 6px; top: 50%; transform: translateY(-50%); font-size: .8em; opacity: 0; }
.pk .bar-btn { position: relative; padding-left: 30px; }
.pk .opt-btn[aria-pressed="true"]::before, .pk .bar-btn[aria-pressed="true"]::before, .pk .choice:hover::before, .pk .choice:focus-visible::before { opacity: 1; }
.pk .opt-btn[aria-pressed="true"], .pk .bar-btn[aria-pressed="true"] { box-shadow: none; }
.phone .pk-win { display: grid; gap: 8px; padding: 14px 12px; }

/* the room's row in the top bar */
.top { position: relative; z-index: 30; flex-wrap: nowrap; }   /* the hamburger stays on the row at phone width (verifier, 13 Oct) */
.top .brand { flex: none; }
.top-slot { min-width: 0; justify-content: flex-end; margin-left: auto; }
.top-slot { display: inline-flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; font-size: .85em; }
.top-slot:empty { display: none; }
.top-slot .room-head { white-space: nowrap; }
.joined-ic { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); }
.joined-ic svg { color: var(--ink-2); }
.joined-ic b { color: var(--ink); }
.top-slot .strip-timer .btn, .top-slot .room-menu > summary { min-height: 40px; padding: 4px 14px; }
.top-slot .room-menu .menu { z-index: 40; }
.names-row { margin: 0 0 12px; }
/* Settings as a hamburger */
.burger { min-width: 48px; justify-content: center; padding-left: 12px !important; padding-right: 12px !important; }
.chip.burger { display: inline-grid; place-items: center; }

/* the pixel classroom behind the projector: BCJK's own picture from session 10 (pixel-classroom.webp), dimmed so the cards read; the
   dark theme dims it further. `cover` crops the sides on a narrow screen. */
#room-bg { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; image-rendering: pixelated; image-rendering: crisp-edges; object-fit: cover;
  filter: brightness(.62) saturate(.9); pointer-events: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #room-bg { filter: brightness(.3) saturate(.7); } }
:root[data-theme="dark"] #room-bg { filter: brightness(.3) saturate(.7); }
:root.has-bg, :root.has-bg body { background: transparent; }
:root.has-bg { background: var(--paper); }

/* ---- session 10 (BCJK, 13 Oct: "Opening the menu shouldn't bring the whole page down. It should overlay.") ---- */
/* the folds on the actors' and the teacher's phones open over the page instead of pushing it down */
.fold { position: relative; }
.fold[open] { z-index: 15; }   /* each child of .phone animates into its own stacking layer, so the open fold must rise above its later siblings */
.fold[open] > .fold-body { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 15; display: grid; gap: 8px; padding: 12px;
  border-radius: 14px; background: var(--surface-strong); box-shadow: 0 10px 28px rgba(0, 0, 0, .3), inset 0 0 0 1px var(--rule); animation: pop-in .18s var(--ease, ease) both; }
:root[data-motion="reduce"] .fold[open] > .fold-body { animation: none; }
@media (prefers-reduced-motion: reduce) { .fold[open] > .fold-body { animation: none; } }
.phone details.fold[open] { display: block; }
.live .me .code { font-weight: 700; letter-spacing: .08em; }
/* the brand label stays readable on the picture in light mode (verifier, 13 Oct) */
:root.has-bg .top .brand { background: var(--surface); padding: 2px 12px; border-radius: 999px; }
