/* class-v2.css */
/* The new class screen (GURVA_CLASS_V2; classroom.js). Loaded only while the switch is on, and every rule is under
   body.class-v2, so the page is exactly as before with it off.

   Desktop and tablet: the room's top bar over 30% teacher (left) and 70% board (right), the full height of the window.
   Phone (< 768 px): the top bar, a compact teacher bar (~25%), the board (~75%) and a thumb-zone dock at the bottom edge;
   a phone turned sideways gets the side-by-side split. */

body.class-v2 { --v2-bar: 56px; --v2-dock: 78px; }

/* in the class, the room's own bar replaces the page's header */
body.class-v2:has(#lesson:not([hidden])) > .top { display: none; }
body.class-v2 #mic { display: none; }            /* the dock's talk button is the mic in the class */
body.class-v2 #lang-toggle { display: none; }

body.class-v2 #lesson {
  max-width: none; height: 100%; min-height: 0; position: relative;
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "bar bar" "side desk"; gap: 10px 20px;
  padding: 0 20px max(14px, env(safe-area-inset-bottom));
}
body.class-v2 #lesson[hidden] { display: none; }
body.class-v2 #lesson > .side { grid-area: side; }
body.class-v2 #lesson > .desk { grid-area: desk; position: relative; }
body.class-v2 .side .tile { width: min(100%, 36vh); align-self: center; }

/* ── the room's top bar ───────────────────────────────────────────────────────────────── */
.v2-bar {
  grid-area: bar; display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: max(8px, env(safe-area-inset-top)) 0 6px; border-bottom: 1.5px solid var(--wall-2);
}
.v2-logo { font: 700 24px/1 var(--voice); color: var(--maroon); flex: none; }
.v2-chapter {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 34ch; flex: 0 1 auto;
  border: 1.5px solid var(--wall-2); background: var(--paper); border-radius: 999px; padding: 6px 14px 5px; color: var(--ink);
  font-weight: 600; font-size: 15px;
}
.v2-chapter svg { width: 18px; height: 18px; fill: var(--maroon); flex: none; }
.v2-chapter-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-chapter:hover, .v2-btn:hover { border-color: var(--maroon); }
.v2-stagewrap { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.v2-stages { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; justify-content: center; }
.v2-stage {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13px; font-weight: 500;
  padding: 4px 10px 3px; border-radius: 999px; background: var(--wall-2); color: var(--ink-2);
}
.v2-stage-dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid currentColor; flex: none; }
.v2-stage.is-done { background: var(--tint-ok); color: var(--tint-ok-ink); }
.v2-stage.is-done .v2-stage-dot { background: currentColor; }
.v2-stage.is-active { background: var(--board); color: var(--chalk); }
.v2-stage.is-active .v2-stage-dot { background: var(--chalk-yellow); border-color: var(--chalk-yellow); }
.v2-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.v2-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--wall-2); background: var(--paper);
  border-radius: 999px; padding: 6px 12px 5px; font-weight: 600; font-size: 14px; color: var(--ink);
}
.v2-btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.v2-btn[hidden] { display: none; }
.v2-lang { min-width: 72px; justify-content: center; }
body.v2-sit-paused .v2-pause { background: var(--maroon); color: var(--chalk); border-color: var(--maroon); }

/* ── the teacher's stage ──────────────────────────────────────────────────────────────── */
.v2-voice {
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 999px;
  background: var(--paper); box-shadow: 0 1px 0 var(--wall-2); font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.v2-vdot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-2); flex: none; }
.v2-vlabel { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-wave { display: inline-flex; align-items: center; gap: 2px; height: 18px; margin-right: auto; }
.v2-wave i { width: 3px; height: 4px; border-radius: 2px; background: currentColor; opacity: 0.35; }
.v2-voice[data-state="listening"] { color: var(--marigold-2); }
.v2-voice[data-state="listening"] .v2-vdot { background: var(--marigold); }
.v2-voice[data-state="speaking"] { color: var(--board); }
.v2-voice[data-state="speaking"] .v2-vdot { background: var(--board); }
.v2-voice[data-state="processing"] .v2-vdot { background: var(--pen); animation: v2-pulse 1s ease-in-out infinite; }
.v2-voice[data-state="muted"] .v2-vdot, .v2-voice[data-state="paused"] .v2-vdot { background: var(--dot-off); }
.v2-voice[data-state="listening"] .v2-wave i, .v2-voice[data-state="speaking"] .v2-wave i { opacity: 1; animation: v2-wave 900ms ease-in-out infinite; }
.v2-wave i:nth-child(2) { animation-delay: 120ms !important; }
.v2-wave i:nth-child(3) { animation-delay: 240ms !important; }
.v2-wave i:nth-child(4) { animation-delay: 360ms !important; }
.v2-wave i:nth-child(5) { animation-delay: 480ms !important; }
@keyframes v2-wave { 0%, 100% { height: 4px; } 50% { height: 16px; } }
@keyframes v2-pulse { 50% { opacity: 0.3; } }
.v2-speedwrap { flex: none; }
.v2-speed { border: 1px solid var(--wall-2); background: var(--paper); border-radius: 999px; padding: 3px 6px; font: inherit; font-size: 13px; }
.v2-mic {
  flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--maroon); color: var(--chalk);
  display: grid; place-items: center;
}
.v2-mic[aria-pressed="false"] { background: var(--dot-off); }
.v2-mic svg { width: 20px; height: 20px; fill: currentColor; }
.v2-mic:disabled { opacity: 0.5; }
.v2-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.v2-memory { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.v2-memory[hidden], .v2-streak[hidden] { display: none; }
.v2-meter { width: 90px; height: 8px; border-radius: 999px; background: var(--wall-2); overflow: hidden; }
.v2-meter i { display: block; height: 100%; width: 0; background: var(--board); }
.v2-streak { margin: 0; font-size: 13px; color: var(--ink-2); }
body.v2-barged .side .tile { box-shadow: 0 0 0 4px var(--pen); }

/* the dock: hand, talk, stuck */
.v2-dock { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 6px 0 2px; }
.v2-talk {
  width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--maroon); color: var(--chalk);
  display: grid; place-items: center; position: relative; touch-action: none; user-select: none; -webkit-user-select: none;
}
.v2-talk svg { width: 28px; height: 28px; fill: currentColor; }
.v2-talk-label { position: absolute; top: 100%; margin-top: 3px; font-size: 12px; color: var(--ink-2); white-space: nowrap; font-weight: 600; }
.v2-talk.on { background: var(--marigold-2); box-shadow: 0 0 0 5px var(--ring-accent); }
.v2-talk.held { transform: scale(1.06); background: var(--marigold-2); }
.v2-talk:disabled, .v2-dockbtn:disabled { opacity: 0.45; }
.v2-dockbtn {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 76px;
  border: 1.5px solid var(--wall-2); background: var(--paper); color: var(--ink); border-radius: 18px; padding: 8px 10px 6px;
  font-size: 13px; font-weight: 600;
}
.v2-dockbtn svg { width: 22px; height: 22px; fill: var(--maroon); }
body.v2-hand-up .v2-handbtn { background: var(--marigold); border-color: var(--marigold-2); }
.v2-ptt { margin: 14px 0 0; text-align: center; font-size: 12px; color: var(--ink-2); }
@media (hover: none) { .v2-ptt { display: none; } }

/* ── the board's header ───────────────────────────────────────────────────────────────── */
.v2-head { flex: none; padding: 10px 20px 8px; border-bottom: 1px solid var(--q-line); }
.v2-course { margin: 0; font-size: 13px; color: var(--chalk-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-topicrow { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.v2-topic { margin: 0; font: 600 18px/1.3 var(--ui); color: var(--chalk-yellow); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-badge { flex: none; font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--chalk-blue); color: var(--chalk-blue); }
.v2-badge[hidden] { display: none; }
body.class-v2:not(.v2-practice) .q-label { display: none; }   /* the board's header names the course and chapter */
.v2-topicrow:has(.v2-topic:empty):has(.v2-badge[hidden]) { display: none; }
/* the step being worked on now */
body.class-v2 .entry.teacher.current .bl:last-of-type { background: var(--q-hl); border-radius: 8px; padding: 0 8px; margin-left: -8px; }

/* the hand raised: the board pauses, and she asks which step */
body.class-v2 .board { position: relative; }
body.v2-hand-up .log { opacity: 0.45; }
.v2-hand {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 3; background: var(--paper); color: var(--ink);
  border-radius: 16px; padding: 12px 14px; box-shadow: 0 10px 30px var(--q-shadow); max-height: 70%; overflow-y: auto;
}
.v2-hand[hidden] { display: none; }
.v2-hand h3 { margin: 0; font-size: 15px; color: var(--maroon); }
.v2-hand-ask { margin: 2px 0 8px; font: 600 17px/1.35 var(--voice); }
.v2-hand-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.v2-step { border: 1.5px solid var(--board); background: var(--tint-ok); color: var(--board); border-radius: 12px; padding: 6px 12px 4px; font-size: 16px; text-align: left; }
.v2-step-whole { border-style: dashed; }

/* the sitting paused: over the board, which stays as it was underneath */
.v2-paused { grid-area: desk; z-index: 6; display: grid; place-items: center; background: var(--paused-veil); border-radius: 14px; backdrop-filter: blur(2px); }
.v2-paused[hidden] { display: none; }
.v2-paused-card { text-align: center; background: var(--paper); border-radius: 22px; padding: 24px 28px; max-width: 420px; box-shadow: 0 10px 30px var(--shadow-ink); }
.v2-paused-card h2 { margin: 0 0 6px; font: 700 26px/1.2 var(--voice); color: var(--maroon); }
.v2-paused-note { margin: 0 0 16px; color: var(--ink-2); }
.v2-resume { display: inline-flex; align-items: center; gap: 8px; }
.v2-resume svg { width: 20px; height: 20px; fill: currentColor; }

/* ── sheets: another chapter, the locker ──────────────────────────────────────────────── */
.v2-sheet .sheet-body { display: flex; flex-direction: column; gap: 14px; }

/* the code editor of a programming class (code-editor.js) */
@media (min-width: 768px) { .sheet.ce-sheet { width: min(860px, calc(100% - 32px)); } }
.ce-body { gap: 10px; }
.ce-top { display: flex; }
.ce-langwrap { display: flex; align-items: center; gap: 8px; }
.ce-label { margin: 0; font: 600 15px/1.3 var(--ui); color: var(--ink); }
.ce-lang { border: 1.5px solid var(--rule); border-radius: 10px; padding: 7px 10px 5px; background: var(--paper); color: var(--ink); font: 400 16px/1.3 var(--ui); }
.ce-editor { display: flex; min-height: 220px; max-height: 44dvh; border: 1.5px solid var(--rule); border-radius: 12px; overflow: hidden; background: var(--paper); }
.ce-editor:focus-within { border-color: var(--board); }
.ce-nums, .ce-code, .ce-out, .ce-input { font: 400 15px/1.5 ui-monospace, "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace; tab-size: 4; }
.ce-nums { flex: none; margin: 0; padding: 10px 8px 10px 10px; min-width: 2.2em; text-align: right; color: var(--ink-2); background: var(--wall); overflow: hidden; user-select: none; }
.ce-code { flex: 1; min-width: 0; border: 0; padding: 10px; background: transparent; color: var(--ink); resize: none; white-space: pre; overflow: auto; outline: none; }
.ce-inputbox summary { font: 600 15px/1.3 var(--ui); color: var(--ink); cursor: pointer; }
.ce-note { display: block; margin: 4px 0; color: var(--ink-2); font-size: 14px; }
.ce-input { width: 100%; box-sizing: border-box; border: 1.5px solid var(--rule); border-radius: 10px; padding: 8px 10px; background: var(--paper); color: var(--ink); resize: vertical; }
.ce-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.ce-actions .ce-run { flex: 0 1 160px; }
.ce-run:disabled { opacity: 0.55; }
.ce-out { margin: 0; min-height: 96px; max-height: 30dvh; padding: 10px; border-radius: 12px; background: var(--wall); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; }
.ce-out .ce-err { font-weight: 600; }
.ce-out .ce-err::before { content: "! "; }
.ce-msg { margin: 0; min-height: 1.4em; font-size: 15px; font-weight: 600; }
.v2-close { font-size: 26px; line-height: 1; }
.v2-course-group h3 { margin: 0 0 6px; font: 600 18px/1.3 var(--voice); }
.v2-shelf { border: 1px solid var(--wall-2); border-radius: 14px; padding: 6px 12px; margin-bottom: 8px; background: var(--paper); }
.v2-shelf summary { font-weight: 600; cursor: pointer; padding: 4px 0; }
.v2-ch-list { list-style: none; margin: 4px 0 0; padding: 0; }
.v2-ch { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--rule); }
.v2-ch.is-here .v2-ch-title { color: var(--maroon); font-weight: 600; }
.v2-ch-go { display: flex; gap: 6px; flex: none; }
.v2-small { padding: 5px 12px 3px; font-size: 14px; }
.v2-settings { display: flex; flex-direction: column; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--wall); }
.v2-settings h3 { margin: 0; font-size: 16px; }
.v2-locker-go { display: flex; flex-wrap: wrap; gap: 10px; }

/* the dashboard opened from the class: full width over it; Gurva small at the bottom right to come back */
body.v2-dashboard #acct { position: fixed; inset: 0; z-index: 40; overflow-y: auto; background: var(--wall); }
.v2-float {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 50;
  display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 18px 10px 14px;
  background: var(--maroon); color: var(--chalk); font-weight: 600; box-shadow: 0 8px 22px var(--shadow-deep);
}
.v2-float svg { width: 22px; height: 22px; fill: currentColor; }
.v2-float[hidden] { display: none; }

/* ── landing in the class ─────────────────────────────────────────────────────────────── */
.v2-land { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: var(--wall); padding: 20px; overflow-y: auto; }
.v2-land[hidden] { display: none; }
.v2-land-card { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; max-width: 460px; }
.v2-land-tile { width: min(260px, 60vw); }
.v2-land h1 { margin: 0; font: 700 28px/1.2 var(--voice); color: var(--maroon); }
.v2-land-note { margin: 0; color: var(--ink-2); }

/* ── phones ───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  body.class-v2 #lesson {
    grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "bar" "side" "desk";
    gap: 6px; padding: 0 10px calc(var(--v2-dock) + max(8px, env(safe-area-inset-bottom)));
  }
  .v2-bar { flex-wrap: wrap; gap: 6px 8px; padding-top: max(6px, env(safe-area-inset-top)); padding-bottom: 4px; }
  .v2-logo { font-size: 20px; }
  .v2-chapter { flex: 1 1 0; max-width: none; padding: 5px 10px 4px; font-size: 14px; }
  .v2-btn { padding: 6px 8px; }
  .v2-btn .v2-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .v2-lang { min-width: 0; padding: 6px 10px; font-size: 13px; }
  .v2-stagewrap { order: 3; flex: 1 0 100%; }
  .v2-stages { justify-content: flex-start; }
  .v2-stage { font-size: 12px; padding: 3px 8px 2px; }
  .v2-stage:not(.is-active) .v2-stage-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

  /* the compact teacher bar: about a quarter of the screen */
  body.class-v2 #lesson > .side {
    display: grid; grid-template-columns: 76px minmax(0, 1fr); grid-template-areas: "faces talk" "voice voice";
    gap: 6px 10px; max-height: 22dvh; overflow: hidden; align-items: start;
  }
  body.class-v2 .side .faces { grid-area: faces; width: 76px; }
  body.class-v2 .side .tile { width: 76px; border-radius: 18px; }
  body.class-v2 .side .me { width: 76px; right: 0; }   /* inside its 76 px column: nothing cut at the screen's edge */
  body.class-v2 .side .me .me-state { font-size: 10px; padding: 2px 3px 1px; }
  body.class-v2 .side .talk { grid-area: talk; min-height: 0; }
  body.class-v2 .side .bubble { max-height: 13dvh; font-size: 16px; }
  .v2-voice { grid-area: voice; padding: 3px 4px 3px 10px; font-size: 13px; }
  .v2-mic { width: 30px; height: 30px; }
  .v2-extra { display: none; }
  .v2-ptt { display: none; }
  /* the thumb zone: hand, talk, stuck at the bottom edge */
  .v2-dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; gap: 18px; height: calc(var(--v2-dock) + env(safe-area-inset-bottom));
    padding: 6px 12px max(8px, env(safe-area-inset-bottom)); background: var(--paper); border-top: 1.5px solid var(--wall-2);
    box-shadow: 0 -6px 18px var(--shadow-ink);
  }
  .v2-talk { width: 58px; height: 58px; margin-bottom: 12px; }
  .v2-dockbtn { min-width: 84px; }
  body.class-v2 .desk { min-height: 0; }
  .v2-head { padding: 6px 12px 5px; }
  .v2-topic { font-size: 15px; }
  .v2-hand { left: 8px; right: 8px; bottom: 8px; }
}

/* a phone turned sideways: the side-by-side split, the dock under the teacher */
@media (max-height: 520px) and (orientation: landscape) {
  body.class-v2 #lesson {
    grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "bar bar" "side desk"; padding: 0 12px max(6px, env(safe-area-inset-bottom)); gap: 4px 12px;
  }
  .v2-bar { flex-wrap: nowrap; padding-top: 4px; padding-bottom: 3px; gap: 8px; }
  .v2-logo { font-size: 20px; }
  .v2-chapter { max-width: 22ch; padding: 4px 10px 3px; font-size: 14px; }
  .v2-btn { padding: 5px 8px; }
  .v2-btn .v2-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .v2-stagewrap { order: 0; flex: 1 1 auto; }
  .v2-stage:not(.is-active) .v2-stage-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .v2-course { display: none; }
  .v2-head { padding: 4px 12px; }
  body.class-v2 .question { padding: 6px 14px 5px; }
  body.class-v2 .q-text { font-size: 16px; }
  body.class-v2 .side .faces { display: flex; gap: 6px; }
  body.class-v2 .side .me { width: 40%; }
  body.class-v2 .side .bubble { overflow-y: auto; }
  body.class-v2 #lesson > .side { display: flex; flex-direction: column; max-height: none; overflow-y: auto; gap: 6px; }
  body.class-v2 .side .tile { width: min(100%, 26vh); }
  body.class-v2 .side .bubble { max-height: 30vh; font-size: 15px; }
  .v2-dock { position: static; height: auto; padding: 2px 0; background: none; border: 0; box-shadow: none; gap: 8px; }
  .v2-talk { width: 48px; height: 48px; margin-bottom: 14px; }
  .v2-dockbtn { min-width: 0; padding: 4px 6px; }
  .v2-extra { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .v2-wave i, .v2-voice[data-state="processing"] .v2-vdot { animation: none !important; }
}

/* ── the end of the sitting: the summary, the PDF notes, a copy to print ──────────────────────────── */
.v2-saved { flex: none; margin: -4px 0 0; font-size: 12px; color: var(--ink-2); text-align: right; }
.v2-sum-body { display: flex; flex-direction: column; gap: 12px; }
.v2-sum-sec { padding: 10px 14px; border-radius: 14px; background: var(--wall); }
.v2-sum-sec h3 { margin: 0 0 4px; font-size: 14px; color: var(--maroon); text-transform: none; }
.v2-sum-sec p, .v2-sum-sec ul, .v2-sum-sec ol { margin: 2px 0; }
.v2-sum-sec ul, .v2-sum-sec ol { padding-left: 20px; }
.v2-sum-ch { font: 600 18px/1.3 var(--voice); }
.v2-sum-course { font-size: 13px; color: var(--ink-2); }
.v2-sum-ok { color: var(--tint-ok-ink); font-weight: 600; }
.v2-sum-none { color: var(--ink-2); }
.v2-sum-msg { margin: 0; color: var(--maroon); font-size: 14px; }
.v2-sum-msg:empty { display: none; }
.v2-sum-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.v2-sum-foot [hidden] { display: none; }
@media (max-width: 767px) { .v2-saved { display: none; } }

/* "Print / save offline copy": only the summary goes on paper */
@media print {
  body.class-v2:has(#v2-summary[open]) > *:not(#v2-summary) { display: none !important; }
  body.class-v2 #v2-summary { position: static; display: block; width: auto; max-height: none; border: 0; box-shadow: none; margin: 0; }
  body.class-v2 #v2-summary::backdrop { display: none; }
  body.class-v2 #v2-summary .sheet-foot { display: none; }
  body.class-v2 .v2-sum-sec { background: none; border: 1px solid var(--q-line); break-inside: avoid; }
}

/* ── the board's workspace: symbol keys, "Check my step", rough work, the drawer ───────────────────── */
.v2-keybar { flex: none; display: flex; align-items: center; gap: 8px; min-width: 0; }
.v2-keys { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; flex: 1 1 auto; min-width: 0; padding: 2px 0; }
.v2-keys[hidden] { display: none; }
.v2-key {
  flex: none; min-width: 40px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1.5px solid var(--wall-2);
  background: var(--paper); color: var(--ink); font: 500 17px/1 var(--ui);
}
.v2-key:active { background: var(--wall-2); }
.v2-checkrow { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
.v2-check { border: 0; border-radius: 999px; background: var(--board); color: var(--chalk); padding: 8px 14px 6px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.v2-check[hidden] { display: none; }

/* full-class mode: one screen for a whole room. The board and what she is saying are larger, to read from the back;
   what belongs to one student's sitting (the note that steps are saved to their notes) is not shown. */
.v2-roomchip { display: inline-block; margin-left: 10px; padding: 3px 10px 2px; border-radius: 999px; background: var(--board); color: var(--chalk); font: 600 13px/1.4 var(--ui); vertical-align: middle; }
.v2-roomchip[hidden] { display: none; }
body[data-room="on"] .desk .board .log { zoom: 1.3; }
body[data-room="on"] .side .caption { zoom: 1.2; }
body[data-room="on"] .v2-saved { display: none; }
@media (max-width: 767px) { body[data-room="on"] .desk .board .log { zoom: 1.12; } body[data-room="on"] .side .caption { zoom: 1.08; } }
.v2-check-short { display: none; }
.v2-verdict:empty { display: none; }
.v2-verdict { font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.v2-verdict.ok { color: var(--tint-ok-ink); }
.v2-verdict.no { color: var(--tint-bad-ink); }
/* the engine's red pen on the student's own line ("Check my step"): a tick on a line that holds; on a slip, the mark and
   the slip's hint under the line (the marks are written, never colour alone) */
body.class-v2 .entry.student .bl.v2-pen-ok::after { content: " ✓"; color: var(--tint-ok-ink); font-weight: 700; }
body.class-v2 .entry.student .bl.v2-pen-slip { text-decoration: underline wavy var(--tint-bad-ink) 1.5px; text-underline-offset: 5px; }
body.class-v2 .entry.student .bl.v2-pen-slip::after { content: " ✗"; color: var(--tint-bad-ink); font-weight: 700; }
body.class-v2 .entry.student .v2-pen-note { margin: 2px 0 0; max-width: 46ch; font-size: 15px; line-height: 1.4; color: var(--tint-bad-ink); }
.v2-tools { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin-top: 4px; flex-wrap: wrap; }
.v2-padtools { display: inline-flex; gap: 6px; }
.v2-padtools[hidden] { display: none; }
.v2-tool { border: 1px solid var(--q-line); background: transparent; color: var(--chalk); border-radius: 999px; padding: 3px 10px 2px; font-size: 13px; font-weight: 500; }
.v2-tool[aria-pressed="true"] { background: var(--chalk-blue); color: var(--board); border-color: var(--chalk-blue); }
.v2-tool[hidden] { display: none; }
.v2-pad-canvas { position: absolute; inset: 0; z-index: 2; display: none; touch-action: none; cursor: crosshair; }
.v2-pad-canvas.on { display: block; }
body.v2-pad-on .v2-head { position: relative; z-index: 3; background: var(--q-surface); }

/* the engine's tools in the board */
.v2-toolcard {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 4; background: var(--paper); color: var(--ink);
  border-radius: 16px; padding: 12px 14px; box-shadow: 0 10px 30px var(--q-shadow); border-top: 4px solid var(--marigold);
}
.v2-toolcard[hidden] { display: none; }
.v2-toolcard h3 { margin: 0 0 4px; font-size: 15px; color: var(--maroon); }
.v2-toolcard p { margin: 0 0 8px; }
.v2-tool-form { display: flex; gap: 8px; }
.v2-tool-in { flex: 1; min-width: 0; }
/* the walk-back: the earlier idea's rule, a worked example, a question to think through, back to the step */
.v2-wb-rule { margin: 0 0 8px; max-width: 62ch; }
.v2-wb-ex { display: flex; flex-direction: column; gap: 2px; margin: 0 0 8px; padding: 4px 0 4px 12px; border-left: 3px solid var(--q-line); }
.v2-wb-line { font-size: 17px; }
.v2-wb-q { margin: 0 0 10px; font-weight: 600; max-width: 62ch; }
/* a calm line under the student's working (three fast wrong answers in a row) */
body.class-v2 .entry.student .v2-calm { margin: 2px 0 0; max-width: 46ch; font-size: 15px; line-height: 1.4; color: var(--q-muted); }

/* the sitting's own stages, over the whole board while one runs (sitting.js: the homework check) */
.v2-stagecard {
  position: absolute; inset: 0; z-index: 5; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column;
  gap: 14px; padding: 20px 22px 18px; background: var(--q-surface); color: var(--q-text); border-radius: 14px;
}
.v2-stagecard[hidden] { display: none; }
/* while a stage runs it has the desk to itself: the notebook and its keys wait below it, hidden */
body.v2-stage-on .desk > .v2-keybar, body.v2-stage-on .desk > .answer, body.v2-stage-on .desk > .v2-saved { display: none !important; }
.v2-sc-head { display: flex; flex-direction: column; gap: 4px; }
.v2-sc-title { margin: 0; font-size: 21px; line-height: 1.3; font-weight: 700; }
.v2-sc-title:focus { outline: none; }
.v2-sc-note { margin: 0; color: var(--q-muted); font-size: 15px; line-height: 1.45; }
.v2-hw-list { margin: 0; padding-left: 1.5em; display: flex; flex-direction: column; gap: 18px; }
.v2-hw-item::marker { font-weight: 700; color: var(--q-muted); }
.v2-hw-q { display: block; margin: 0 0 8px; font-size: 17px; line-height: 1.5; max-width: 62ch; }
.v2-hw-in {
  display: block; width: 100%; box-sizing: border-box; min-height: 4.6em; resize: vertical; padding: 8px 10px;
  font: inherit; font-size: 17px; line-height: 1.5; color: var(--q-text); background: var(--q-bg);
  border: 1px solid var(--q-line); border-radius: 10px;
}
.v2-hw-in:focus-visible { outline: 2px solid var(--q-accent); outline-offset: 1px; }
.v2-hw-in[readonly] { color: var(--q-muted); }
.v2-hw-res:empty { display: none; }
.v2-hw-res { margin-top: 6px; font-size: 15px; line-height: 1.45; max-width: 62ch; }
.v2-hw-res.is-correct b { color: var(--tint-ok-ink); }
.v2-hw-res.is-slip b { color: var(--tint-bad-ink); }
.v2-sc-msg:empty { display: none; }
.v2-sc-msg { margin: 0; font-weight: 600; }
.v2-sc-foot { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 4px; }
.v2-sum-note { margin: 6px 0 0; color: var(--q-muted); font-size: 14px; }
/* "Spot Gurva's mistake" at the head of the summary: her working, the wrong line, what it should say, the rule */
.v2-mirror { border: 1px solid var(--q-line); border-radius: 14px; padding: 12px 14px 14px; }
.v2-mi-note { margin: 0 0 10px; color: var(--q-muted); max-width: 62ch; }
.v2-mi-form { display: flex; flex-direction: column; gap: 12px; }
.v2-mi-task { margin: 0; font-weight: 600; }
.v2-mi-set { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; border: 0; min-width: 0; }
.v2-mi-set legend { margin: 0 0 4px; padding: 0; font-weight: 600; }
.v2-mi-opt { display: flex; align-items: baseline; gap: 8px; padding: 6px 8px; border-radius: 10px; cursor: pointer; }
.v2-mi-opt:has(input:checked) { background: var(--q-raise); }
.v2-mi-opt input { flex: none; margin: 0; }
.v2-mi-n { flex: none; min-width: 1.4em; color: var(--q-muted); }
.v2-mi-label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.v2-mi-value { font-weight: 400; }
.v2-mi-res:empty { display: none; }
.v2-mi-res { margin: 0; max-width: 62ch; }
.v2-mi-res.is-pass { color: var(--tint-ok-ink); font-weight: 600; }
.v2-mi-foot { display: flex; flex-wrap: wrap; gap: 8px; }

/* the drawer: a slide-over from the right */
.v2-drawer {
  position: fixed; inset: 0 0 0 auto; margin: 0; height: 100dvh; max-height: 100dvh; width: min(440px, 100vw); max-width: 100vw;
  border: 0; padding: 0; background: var(--paper); box-shadow: -10px 0 30px var(--shadow-deep); display: none; flex-direction: column;
}
.v2-drawer[open] { display: flex; animation: v2-slide 180ms ease-out; }
.v2-drawer::backdrop { background: var(--q-veil); }
@keyframes v2-slide { from { transform: translateX(30px); opacity: 0.6; } }
.v2-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: max(14px, env(safe-area-inset-top)) 16px 10px; border-bottom: 1px solid var(--rule); }
.v2-drawer-head h2 { margin: 0; font: 600 19px/1.3 var(--voice); color: var(--maroon); }
.v2-drawer-body { overflow-y: auto; padding: 12px 16px max(16px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.v2-drawer-src { margin: 0; font-size: 13px; color: var(--ink-2); }
.v2-drawer-src:empty { display: none; }
.v2-sheet-items { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.v2-sheet-items li { padding: 8px 10px; border-radius: 10px; background: var(--wall); font-size: 16px; line-height: 1.45; }
.v2-sheet-items small { color: var(--ink-2); }

/* the books of a commerce class (ledger-book.js): the journal, the ledger and the trial balance */
.lb-tabs { flex: none; display: flex; gap: 6px; padding: 10px 22px 0; }
.lb-tab { border: 0; border-radius: 999px; padding: 8px 14px 6px; background: none; color: var(--ink-2); font-weight: 600; font-size: 15px; }
.lb-tab[aria-selected="true"] { background: var(--board); color: var(--chalk); }
.lb-body { gap: 12px; }
.lb-lines, .lb-entries { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lb-line { display: grid; grid-template-columns: minmax(0, 1fr) 96px 120px 28px; gap: 6px; align-items: center; }
.lb-in { width: 100%; min-width: 0; box-sizing: border-box; border: 1.5px solid var(--rule); border-radius: 10px; padding: 9px 10px 7px; background: var(--paper); color: var(--ink); font: 400 16px/1.3 var(--ui); }
.lb-amount, .lb-amt { text-align: right; font-variant-numeric: tabular-nums; }
.lb-drop { width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: var(--ink-2); font-size: 18px; line-height: 1; }
.lb-label { font-weight: 600; font-size: 15px; }
.lb-sum { margin: 0; font-weight: 600; font-size: 15px; }
.lb-sum.is-agree { color: var(--board); }
.lb-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.lb-actions .lb-go { flex: 1 1 200px; }
.lb-add { align-self: flex-start; }
.lb-kept h3, .lb-t h3 { margin: 0 0 6px; font: 600 16px/1.3 var(--ui); color: var(--ink); }
.lb-entries li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: var(--wall); }
.lb-entry { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 15px; overflow-wrap: anywhere; }
.lb-entry .lb-cr { padding-left: 22px; }
.lb-entry .lb-narr { color: var(--ink-2); }
.lb-empty { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.lb-t { padding: 10px 12px; border: 1px solid var(--rule); border-radius: 12px; }
.lb-t-sides { display: grid; grid-template-columns: 1fr 1fr; }
.lb-t-side { display: flex; flex-direction: column; gap: 4px; padding: 0 8px; min-width: 0; font-size: 14px; }
.lb-t-side + .lb-t-side { border-left: 1.5px solid var(--ink-2); }
.lb-t-side ul { list-style: none; margin: 0; padding: 0; flex: 1; display: grid; gap: 2px; align-content: start; }
.lb-t-side li, .lb-t-total { display: flex; justify-content: space-between; gap: 8px; margin: 0; overflow-wrap: anywhere; }
.lb-t-total { border-top: 1px solid var(--rule); padding-top: 3px; font-weight: 600; }
.lb-cd { color: var(--ink-2); }
.lb-tb { width: 100%; border-collapse: collapse; font-size: 15px; }
.lb-tb th, .lb-tb td { padding: 6px 8px; border-bottom: 1px solid var(--rule); text-align: left; }
.lb-tb .lb-amt { text-align: right; }
.lb-tb-total th, .lb-tb-total td { font-weight: 700; border-bottom: 0; }
.lb-msg { margin: 0; padding: 0 22px 14px; min-height: 1.4em; font-size: 15px; font-weight: 600; }
@media (max-width: 767px) {
  .lb-tabs { padding: 8px 16px 0; }
  .lb-line { grid-template-columns: minmax(0, 1fr) 84px 28px; }
  .lb-line .lb-account { grid-column: 1 / -1; }
  .lb-msg { padding: 0 16px 12px; }
}
.v2-past-title { margin: 10px 0 0; font-size: 15px; }
.v2-past { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.v2-past li { display: flex; flex-direction: column; font-size: 14px; border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
.v2-past li span { color: var(--ink-2); }
.v2-pop { align-self: flex-start; }
@media (max-width: 1024px), (hover: none) { .v2-pop { display: none; } }   /* pop-out windows are for a desktop */
body.v2-popout { height: auto; display: block; background: var(--paper); }
body.v2-popout h1 { font: 600 20px/1.3 var(--voice); color: var(--maroon); margin: 0; }
body.v2-popout .v2-pop { display: none; }

@media (max-width: 767px) {
  /* the board is never squeezed out: the rest of the desk scrolls under it */
  body.class-v2 #lesson > .desk { overflow-y: auto; overscroll-behavior: contain; }
  body.class-v2 .board { flex: 1 0 auto; min-height: 40dvh; }
  /* the step input and the symbol keys stay in reach at the bottom (sticky), over the dock */
  body.class-v2 .desk > .answer { position: sticky; bottom: 0; z-index: 4; background: var(--wall); padding-top: 4px; }
  body.class-v2 .desk > .v2-keybar { position: sticky; bottom: 62px; z-index: 4; background: var(--wall); padding: 4px 0 2px; }
  body.class-v2 .v2-tools > .v2-tool:last-child { display: none; }   /* the drawer is in the dock on a phone */
  .v2-keybar { gap: 6px; }
  .v2-checkrow { gap: 6px; }
  .v2-verdict { font-size: 12px; }
  .v2-check { padding: 7px 11px 5px; font-size: 14px; }
  .v2-check-long { display: none; }
  .v2-check-short { display: inline; }
  .v2-key { height: 34px; min-width: 38px; font-size: 16px; }
  .v2-dockbtn { min-width: 64px; }
  .v2-dock { gap: 8px; }
  .v2-tools { margin-top: 2px; }
  .v2-drawer { width: 100vw; }
}
@media (min-width: 768px) { .v2-dock-drawer { display: none; } }

/* ── the camera on the device, presence, permissions ──────────────────────────────────────────────── */
.v2-local {
  position: absolute; top: 6px; left: 10px; z-index: 2; font-size: 10px; font-weight: 600; line-height: 1.2;
  padding: 2px 6px; border-radius: 999px; background: var(--q-listen); color: var(--q-on-accent); max-width: calc(100% - 8px);
}
.v2-local-short { display: none; }
@media (max-width: 767px) {
  .v2-local { top: 4px; left: 4px; padding: 1px 5px; white-space: nowrap; }
  .v2-local-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .v2-local-short { display: inline; }
}
body.class-v2 #me { position: relative; }
.v2-away { display: none; }
body.v2-is-away .v2-away {
  display: grid; place-items: center; position: absolute; inset: 0; z-index: 5; padding: 20px; text-align: center;
  background: var(--q-scrim); color: var(--q-scrim-text); font: 600 20px/1.4 var(--voice);
}
.v2-perms { border: 0; margin: 4px 0; padding: 12px 14px; border-radius: 16px; background: var(--paper); display: flex; flex-direction: column; gap: 10px; text-align: left; }
.v2-perms-title { font-weight: 600; padding: 0; }
.v2-perm[hidden] { display: none; }

/* ── classroom modes (R-018; chosen on the device, never sent) ───────────────────────────────────── */
.v2-assist { display: flex; flex-direction: column; gap: 6px; }
.v2-assist-opt { display: flex; gap: 8px; align-items: center; font-size: 15px; }
.v2-assist-note, .v2-speed-msg { color: var(--ink-2); font-size: 12px; }
/* blind or low vision: bigger everything, strong contrast */
body.class-v2[data-assist="lowvision"] { font-size: 20px; }
body.class-v2[data-assist="lowvision"] .entry .bl { font-size: 28px; }
body.class-v2[data-assist="lowvision"] .bubble { font-size: 24px; }
body.class-v2[data-assist="lowvision"] button:focus-visible, body.class-v2[data-assist="lowvision"] input:focus-visible { outline: 4px solid var(--marigold); outline-offset: 2px; }
/* deaf or hard of hearing: big live captions, what was heard shown, the voice's state always in words */
body.class-v2[data-assist="deaf"] .bubble { font-size: 24px; border: 3px solid var(--board); }
body.class-v2[data-assist="deaf"] .heard { font-size: 18px; }
body.class-v2[data-assist="deaf"] .v2-voice { font-size: 16px; }
/* hands-free: big targets */
body.class-v2[data-assist="motor"] .v2-talk { width: 84px; height: 84px; }
body.class-v2[data-assist="motor"] .v2-dockbtn, body.class-v2[data-assist="motor"] .v2-btn { min-height: 56px; }
/* dyslexia / ADHD focus: high contrast, more space, less movement, fewer distractions */
body.class-v2[data-assist="focus"] { --board: var(--q-bg); --chalk: var(--q-now); letter-spacing: 0.04em; word-spacing: 0.12em; }
body.class-v2[data-assist="focus"] .entry .bl, body.class-v2[data-assist="focus"] .bubble { line-height: 1.75; }
body.class-v2[data-assist="focus"] .entry:not(.current) { opacity: 0.55; }
body.class-v2[data-assist="focus"] .v2-wave i, body.class-v2[data-assist="focus"] .tile.is-listening { animation: none !important; }
body.class-v2[data-assist="focus"] .v2-stage:not(.is-active) { display: none; }
/* focus mode's choice (data-read, classroom.js): Lexend, a dyslexia-friendly font (SIL OFL, vendor/fonts), for Latin
   letters only. Devanagari isn't in it, so Hindi stays in its own font (Hind, or Mukta with the new brand). */
@font-face { font-family: "Lexend"; font-weight: 400; font-display: swap; src: url("/static/vendor/fonts/lexend-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lexend"; font-weight: 600; font-display: swap; src: url("/static/vendor/fonts/lexend-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
body.class-v2[data-assist="focus"][data-read="lexend"] {
  --ui: "Lexend", "Hind", "Noto Sans", "Noto Sans Devanagari", system-ui, sans-serif;
  --voice: "Lexend", "Baloo 2", "Hind", "Noto Sans Devanagari", system-ui, sans-serif;
}
:root[data-brand="v2"] body.class-v2[data-assist="focus"][data-read="lexend"] {
  --ui: "Lexend", "Mukta", "Plus Jakarta Sans", system-ui, sans-serif;
  --voice: "Lexend", "Mukta", "Plus Jakarta Sans", system-ui, sans-serif;
}
.v2-font-opt[hidden] { display: none; }

/* "Check my notebook" (GURVA_NOTEBOOK): its button beside "Check my step", and its sheet (notebook-check.js) */
.v2-nb { border: 0; border-radius: 999px; background: none; color: var(--board); box-shadow: inset 0 0 0 1.5px var(--board); padding: 8px 14px 6px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.v2-nb[hidden] { display: none; }
@media (max-width: 767px) { .v2-nb { padding: 7px 11px 5px; font-size: 14px; } }
.nb-body { gap: 12px; }
.nb-lead, .nb-note, .nb-said { margin: 0; font-size: 16px; line-height: 1.5; }
.nb-note { color: var(--ink-2); font-size: 14px; }
.nb-said { padding: 10px 12px; border-radius: 12px; background: var(--wall); font-weight: 600; }
.nb-photo-part { display: grid; gap: 6px; }
.nb-photo { border: 0; border-radius: 14px; padding: 14px 16px 12px; background: var(--board); color: var(--chalk); font-weight: 600; font-size: 17px; }
.nb-photo:disabled, .nb-go:disabled { opacity: 0.55; }
.nb-label { font-weight: 600; font-size: 15px; }
.nb-typed, .nb-line { width: 100%; box-sizing: border-box; border: 1.5px solid var(--rule); border-radius: 12px; padding: 10px 12px; background: var(--paper); color: var(--ink); font: 400 17px/1.45 var(--ui); }
.nb-typed { resize: vertical; min-height: 120px; }
.nb-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nb-row { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 4px 8px; align-items: center; }
.nb-row > small, .nb-row > .nb-mark { grid-column: 2; }
.nb-n { color: var(--ink-2); font-size: 14px; text-align: right; }
.nb-ask { font-weight: 600; font-size: 14px; }
.nb-read { color: var(--ink-2); font-size: 13px; }
.nb-row.is-unsure .nb-line { border-style: dashed; border-width: 2px; }
.nb-marked { padding: 8px 10px; border-radius: 12px; background: var(--wall); }
.nb-text { font-size: 17px; overflow-wrap: anywhere; }
.nb-mark { font-size: 14px; font-weight: 600; }
.nb-msg { margin: 0; padding: 0 22px; min-height: 1.4em; font-size: 15px; font-weight: 600; }
.nb-foot { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.nb-foot .nb-go { flex: 1 1 200px; }
/* room.css */
/* The live room as the Owner confirmed it (Gemini "/room — The Live 1-on-1 Classroom", 15 Oct; the project note
   ET-ORG/gurva/GEMINI-UI-SOURCE-OF-TRUTH-2026-10-18.md): a night room (#090D16) with a darker command bar, the teacher
   in an indigo column (30%) and the chalkboard in its own framed panel (70%), saffron for the one action.
   Loaded after class-v2.css (classroom.js) and only in the class and on its landing: every rule is scoped to them, so
   the start panel, the dashboard and the family screens keep their light look. Colours are the shared tokens. */

body.class-v2:has(#lesson:not([hidden])),
body.class-v2.v2-landing {
  --wall: var(--q-bg);
  --wall-2: var(--q-line);
  --paper: var(--q-surface);
  --ink: var(--q-text);
  --ink-2: var(--q-muted);
  --maroon: var(--accent-ink);
  --maroon-2: var(--accent-ink-hover);
  --pen: var(--q-text);
  background: var(--q-bg);
  color: var(--q-text);
  color-scheme: var(--q-scheme);
}

/* ── the command bar ─────────────────────────────────────────────────────────────────────── */
body.class-v2 #lesson { padding-top: 0; gap: 14px 18px; }
body.class-v2 .v2-bar {
  margin: 0 -20px; padding: max(8px, env(safe-area-inset-top)) 20px 8px;
  background: var(--q-bg); border-bottom: 1px solid var(--q-line);
}
[data-brand="v2"] body.class-v2 .v2-logo { background-image: var(--q-logo); width: 178px; height: 50px; }
@media (max-width: 767px) { [data-brand="v2"] body.class-v2 .v2-logo { width: 110px; height: 31px; } }
body.class-v2 .v2-chapter { background: var(--q-surface); border-color: var(--q-line); color: var(--q-text); border-radius: 10px; }
body.class-v2 .v2-chapter svg { fill: var(--q-muted); }
body.class-v2 .v2-btn { background: var(--q-surface); border-color: var(--q-line); color: var(--q-text); border-radius: 10px; }
body.class-v2 .v2-btn:hover, body.class-v2 .v2-chapter:hover { border-color: var(--accent); }
body.class-v2 .v2-locker { background: var(--q-surface); border-color: var(--q-line); color: var(--q-text); }
body.class-v2 .v2-stage { background: transparent; border: 1px solid var(--q-line); color: var(--q-muted); font-weight: 700; }
body.class-v2 .v2-stage.is-active { background: var(--q-raise); border-color: var(--q-faint); color: var(--q-text); }
body.class-v2 .v2-stage.is-active .v2-stage-dot { background: var(--q-faint); border-color: var(--q-faint); }
body.class-v2 .v2-stage.is-done { background: transparent; border-color: var(--q-line); color: var(--q-muted); }

/* ── 30%: the teacher's column ───────────────────────────────────────────────────────────── */
body.class-v2 #lesson > .side {
  background: var(--q-surface);
  border: 1px solid var(--q-line); border-radius: 22px; padding: 16px; min-height: 0;
}
body.class-v2 .side .tile { width: min(100%, 34vh); border-radius: 16px; border: 1px solid var(--q-line); }
body.class-v2 .side .bubble {
  background: transparent; color: var(--q-text); border: 0; border-left: 0;
  border-radius: 12px; box-shadow: none;
}
body.class-v2 .v2-voice { background: transparent; color: var(--q-muted); box-shadow: none; border-radius: 10px; }
body.class-v2 .v2-voice[data-state="speaking"] { color: var(--q-text); }
body.class-v2 .v2-voice[data-state="speaking"] .v2-vdot { background: var(--q-accent); }
body.class-v2 .v2-speed { background: var(--q-surface); color: var(--q-text); border-color: var(--q-line); }
body.class-v2 .v2-extra { background: transparent; padding: 10px 12px; border-radius: 12px; }
body.class-v2 .v2-meter i { background: var(--q-muted); }
body.class-v2 .v2-dockbtn { background: transparent; border-color: var(--q-line); color: var(--q-text); border-radius: 12px; }
body.class-v2 .v2-dockbtn svg { fill: var(--q-muted); }
body.class-v2 .v2-talk-label, body.class-v2 .v2-ptt { color: var(--q-muted); }
body.class-v2 .side .quiet, body.class-v2 .side .again { color: var(--q-muted); }
body.class-v2 .v2-another { background: transparent; border: 1px solid var(--q-line); border-radius: 10px; }

/* ── 70%: the chalkboard panel ───────────────────────────────────────────────────────────── */
body.class-v2 #lesson > .desk {
  background: var(--q-surface); border: 1px solid var(--q-line); border-radius: 22px; padding: 16px 20px;
}
body.class-v2 .desk .board { box-shadow: none; }
body.class-v2 .v2-keybar { background: transparent; border: 1px solid var(--q-line); border-radius: 16px; padding: 10px; }
body.class-v2 .v2-check { background: var(--q-raise); color: var(--q-text); border-color: var(--q-line); }
body.class-v2 .answer, body.class-v2 .answer textarea, body.class-v2 .answer input {
  background: var(--q-bg); color: var(--q-text); border-color: var(--q-line);
}

/* ── the landing: straight into the room, one tap ───────────────────────────────────────── */
body.class-v2.v2-landing .v2-land { background: var(--q-bg); }
body.class-v2.v2-landing .v2-land-card {
  background: var(--q-surface);
  border: 1px solid var(--q-line); color: var(--q-text);
}
body.class-v2.v2-landing .v2-land-note, body.class-v2.v2-landing .v2-perms small { color: var(--q-muted); }
body.class-v2.v2-landing .v2-land .quiet { color: var(--q-text); border-color: var(--q-line); }
body.class-v2.v2-landing .foot, body.class-v2.v2-landing #start { display: none; }

/* ── phone: a real teacher bar (not a thumbnail), the board under her ───────────────────── */
@media (max-width: 767px) {
  body.class-v2 #lesson > .side { padding: 10px; border-radius: 16px; }
  body.class-v2 .side .faces { width: 132px; }
  body.class-v2 .side .tile { width: 132px; border-radius: 14px; }
  body.class-v2 .side .me { width: 132px; }
  body.class-v2 #lesson > .desk { padding: 10px; border-width: 2px; border-radius: 16px; }
  body.class-v2 .v2-bar { margin: 0 -10px; padding-left: 10px; padding-right: 10px; }   /* the lesson's own 10 px gutter */
}

/* the landing card and the class picker in the room's chapter sheet */
body.class-v2.v2-landing .v2-land-card { padding: 24px 20px; border-radius: 22px; width: min(460px, 100%); }
body.class-v2.v2-landing .v2-land h1 { color: var(--q-text); }
.v2-classfield { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; }
.v2-classpick { font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--q-line); background: var(--q-bg); color: var(--q-text); }
.v2-course-group[hidden] { display: none; }
@media (max-width: 767px) {
  body.class-v2 #lesson > .side { grid-template-columns: 132px minmax(0, 1fr); max-height: 30dvh; }
}

/* never wider than the screen: no sideways scroll that cuts the panels' right edges (the Owner's phone, 18 Oct) */
body.class-v2:has(#lesson:not([hidden])), body.class-v2.v2-landing { overflow-x: hidden; }
body.class-v2 #lesson { max-width: 100vw; overflow-x: clip; }

/* the landing fits a phone: the card starts at the top when it is taller than the screen (never cut above), the
   teacher a little smaller, and the main button at most two lines, always in view at the bottom */
body.class-v2.v2-landing .v2-land { place-items: start center; top: var(--trial-bar, 0px); }
body.class-v2.v2-landing .v2-land-card { margin: auto 0; }
@media (max-width: 767px) {
  body.class-v2.v2-landing .v2-land { padding: 12px 12px 0; }
  body.class-v2.v2-landing .v2-land-card { padding: 16px 14px 0; gap: 10px; }
  body.class-v2.v2-landing .v2-land-tile { width: min(170px, 44vw); }
  body.class-v2.v2-landing .v2-land h1 { font-size: 24px; }
  body.class-v2.v2-landing .v2-land-go, body.class-v2.v2-landing .v2-land-pick.go {
    position: sticky; bottom: max(10px, env(safe-area-inset-bottom)); width: 100%; z-index: 1;
    font-size: 17px; line-height: 1.25; box-shadow: 0 6px 18px var(--q-shadow);
  }
  body.class-v2.v2-landing .v2-land-go { margin-bottom: 4px; }
  body.class-v2.v2-landing .v2-land-pick { margin-bottom: 12px; }
}

/* phone, the room's top and bottom (the Owner's phone, 18 Oct: "the bottom red box and top was also not clear"):
   - top: the chapter gets its own line beside the stage dots, so its name shows (not "1. …")
   - bottom: the board scrolls inside itself and the keys, the step line and the answer buttons sit under it in turn;
     nothing is laid over anything (the sticky step line used to cover the "Yes, let's start" button) */
@media (max-width: 767px) {
  body.class-v2 .v2-chapter { order: 3; flex: 1 1 120px; min-width: 0; max-width: none; padding-top: 3px; padding-bottom: 2px; }   /* too wide for the first line, fits the second beside the dots */
  body.class-v2 .v2-stagewrap { order: 4; flex: 0 0 auto; }
  body.class-v2 .v2-logo { flex: 1 1 auto; }
  body.class-v2 .board { flex: 1 1 0; min-height: 150px; overflow-y: auto; }
  body.class-v2 .desk > .answer, body.class-v2 .desk > .v2-keybar { position: static; }
  body.class-v2 .desk > .extras:not(:empty) { flex: none; }
  body.class-v2 .v2-talk { width: 54px; height: 54px; margin-bottom: 18px; }   /* its label stays on the screen */
}

/* the mic listening on its own: the big button turns green and breathes, so the student sees she can just speak */
body.class-v2 .v2-talk.on { background: var(--q-listen); border-color: var(--q-listen); box-shadow: 0 0 0 0 var(--q-listen-ring); animation: v2-hear 1.4s ease-out infinite; }
body.class-v2 .v2-talk.on + .v2-talk-label, body.class-v2 .v2-talk.on .v2-talk-label { color: var(--q-listen-text); }
@keyframes v2-hear { 0% { box-shadow: 0 0 0 0 var(--q-listen-ring); } 100% { box-shadow: 0 0 0 14px transparent; } }
@media (prefers-reduced-motion: reduce) { body.class-v2 .v2-talk.on { animation: none; box-shadow: 0 0 0 5px var(--q-listen-ring); } }

/* phone: the student's own camera is a small picture in the teacher's corner, not a second tile under her that pushes
   the panel past its height (the Owner's phone, 18 Oct: the camera cut off at the bottom of the teacher panel) */
@media (max-width: 767px) {
  body.class-v2 .side .faces { position: relative; }
  body.class-v2 .side .faces #me { position: absolute; right: 4px; bottom: 4px; top: auto; width: 64px; border-radius: 10px; z-index: 2; }
  body.class-v2 .side .faces .me .v2-local { font-size: 9px; }
  body.class-v2 .side .faces .me .me-state { font-size: 9px; padding: 1px 3px 0; }
}

/* a phone with less height (most phones once the browser's own bars are on screen, ~690 px): the symbol keys show
   while the student writes a step (the step line or a key in use), so the board keeps its room and the step line
   always fits above the dock */
@media (max-width: 767px) and (max-height: 780px) {
  body.class-v2 .desk:not(:focus-within) > .v2-keybar { display: none; }
  body.class-v2 .board { min-height: 120px; }
}

/* ── the Owner's trial class on his phone, 24 Oct ────────────────────────────────────────────────────────────────────
   "the chalkboard UI isn't clear in phone screens", "3 dots in the menu area near chapter name does what no idea",
   "nor the section what teacher speaks is clearly visible", the language a dropdown that fits a 360 px phone. */

/* the language she teaches in: one compact menu among the bar's actions */
body.class-v2 .v2-langwrap { display: inline-flex; align-items: center; flex: none; }
body.class-v2 .v2-lang {
  appearance: none; -webkit-appearance: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--q-text); cursor: pointer;
  background: var(--q-surface) var(--q-chevron) no-repeat right 8px center / 10px 7px;
  border: 1.5px solid var(--q-line); border-radius: 10px; padding: 6px 26px 5px 10px; min-height: 34px; max-width: 120px;
}
body.class-v2 .v2-lang:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
body.class-v2 .v2-lang option { color: var(--q-option-text); background: var(--q-option-bg); }

/* what she is saying now: marked, and kept in view in her bubble */
body.class-v2 .caption .cs { transition: color 160ms ease, background-color 160ms ease; border-radius: 6px; }
body.class-v2 .caption .cs.said { color: var(--q-faint); }
body.class-v2 .caption .cs.now { color: var(--q-now); background: var(--q-now-bg); box-shadow: 0 0 0 2px var(--q-now-bg);
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
@media (prefers-reduced-motion: reduce) { body.class-v2 .caption .cs { transition: none; } }

/* sheets in the night room: their quiet buttons readable (they were indigo on navy) */
body.class-v2 .v2-sheet .quiet, body.class-v2 .v2-drawer .quiet { color: var(--q-text); }
body.class-v2 .v2-sum-foot .quiet { border: 1.5px solid var(--q-line); border-radius: 12px; padding: 10px 14px 8px; }

/* the chapter's notes in the drawer */
.v2-drawer-notes { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--wall); }
.v2-drawer-notes-note { margin: 0; font-size: 13px; color: var(--ink-2); }
.v2-drawer-pdf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.v2-drawer-pdf svg { width: 20px; height: 20px; fill: currentColor; }
body.class-v2 .v2-drawer { color: var(--ink); }

@media (max-width: 767px) {
  /* the top bar: the actions and the language on the first line; the chapter and where the sitting is on the second.
     The sitting's steps were four dots (three of them blank): only the step it is on shows now, named. */
  body.class-v2 .v2-bar { row-gap: 6px; }
  body.class-v2 .v2-actions { gap: 5px; }
  body.class-v2 .v2-btn { padding: 6px 7px; min-height: 34px; }
  body.class-v2 .v2-lang { font-size: 13px; padding: 6px 22px 5px 8px; background-position: right 6px center; max-width: 96px; }
  body.class-v2 .v2-stage:not(.is-active) { display: none; }
  body.class-v2 .v2-stage.is-active { font-size: 12px; padding: 4px 10px 3px; }

  /* the teacher's bar: a smaller picture, more room for her words, which are bigger */
  body.class-v2 #lesson > .side { grid-template-columns: 96px minmax(0, 1fr); max-height: 27dvh; padding: 8px; }
  body.class-v2 .side .faces, body.class-v2 .side .tile, body.class-v2 .side .me { width: 96px; }
  body.class-v2 .side .bubble { max-height: calc(27dvh - 104px); font-size: 16.5px; line-height: 1.42; padding: 8px 12px 6px; }
  body.class-v2 .side .under { min-height: 0; }
  body.class-v2 .side .under { margin-top: 2px; }
  body.class-v2 .side .under .quiet { font-size: 13px; }
  body.class-v2 .v2-dock-label { white-space: nowrap; }
  body.class-v2 .v2-voice { padding: 2px 4px 2px 10px; }

  /* the chalkboard first: its header is one short line, the question one line (tap to see it all), and the lines on
     the board big, high-contrast chalk */
  body.class-v2 #lesson > .desk { padding: 8px; gap: 6px; }
  body.class-v2 .v2-course { display: none; }
  body.class-v2 .v2-head { display: flex; align-items: center; gap: 8px; padding: 4px 10px; }
  body.class-v2 .v2-head .v2-topicrow { flex: 1 1 auto; min-width: 0; }
  body.class-v2 .v2-tools { margin: 0 0 0 auto; flex: none; }
  body.class-v2 .question { padding: 6px 12px 5px; }
  body.class-v2 .q-text { font-size: 16px; line-height: 1.35; }
  body.class-v2 .board { flex: 1 0 auto; min-height: max(38dvh, 220px); }
  body.class-v2 .log { padding: 10px 12px 12px; gap: 10px; }
  body.class-v2 .entry .bl { font-size: 20px; line-height: 1.38; color: var(--q-text); }
  body.class-v2 .entry.teacher.current .bl:last-of-type { background: var(--q-hl); }
  /* the answers she offers: one row of smaller buttons, scrolled sideways if they don't fit */
  body.class-v2 .desk > .extras { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; padding-bottom: 2px; }
  body.class-v2 .desk > .extras button:not(.opt) { flex: none; font-size: 15px; padding: 7px 12px 6px; white-space: nowrap; }
  body.class-v2 .desk > .extras:has(.opts) { flex-wrap: wrap; overflow-x: visible; }
  body.class-v2 .desk > .extras .opts { flex: none; width: 100%; }
  /* the symbol keys show while a step is being written (the step line or a key in use) */
  body.class-v2 .desk:not(:focus-within) > .v2-keybar { display: none; }
}

/* the picker on the landing and in the chapter sheet, in the night room */
body.class-v2 .cp .field-name { color: var(--q-muted); }
body.class-v2.v2-landing .v2-land-pick { width: 100%; }
body.class-v2.v2-landing .v2-land .cp-practise { color: var(--q-text); }
@media (max-width: 767px) {
  body.class-v2.v2-landing .v2-land-pick .cp-start { position: sticky; bottom: max(10px, env(safe-area-inset-bottom)); z-index: 1; box-shadow: 0 6px 18px var(--q-shadow); }
}
/* the landing scrolls inside itself when it is taller than the screen (the page chrome's `main { overflow: visible }`
   must not reach it: with the picker on it, its Start button could otherwise be below the screen, out of reach) */
body.class-v2 > main#v2-land#v2-land:not([hidden]) { overflow-y: auto; }
/* class-calm.css */
/* The class screen, calm (the Owner's phone, 24 Oct: "layout still feels very clumsy — need more neat and clear concise
   look — too much colour feels overwhelming"). Loaded last (classroom.js), over class-v2.css and room.css, and only in
   the class and on its landing.

   - one neutral base, dark (the night room the Owner confirmed), in four steps: page, surface, raised, line;
   - ONE accent, the logo's saffron, used only for the mic (the one primary action), the Start button and the speaking
     or listening state. No orange/green/red/purple mix, no gradients, no glows;
   - one type family (the app's own: Hind, or the brand's) in three sizes: 14 px (labels), 17 px (the board, the notes) and 20 px
     (what she is saying now); equations stay large;
   - phone (< 768 px): a slim top bar (logo, chapter, trial timer, language, ⋮ menu), the teacher strip (a small
     picture and her words), the board, and a bottom bar with the mic between two quiet buttons and one status line
     above them. */

body.class-v2 {
  /* the colours (--q-bg, --q-surface, --q-raise, --q-line, --q-text, --q-muted, --q-faint, --q-accent …) are theme
     tokens on :root (theme.css): a dark set and a light set */
  --q-font: var(--ui);          /* the app's one UI family: Hind, or the brand's (Plus Jakarta Sans, Mukta), or Lexend in focus mode */
  --q-s: 14px;
  --q-m: 17px;
  --q-l: 20px;
}
body.class-v2:has(#lesson:not([hidden])), body.class-v2.v2-landing {
  --wall: var(--q-bg); --wall-2: var(--q-line); --paper: var(--q-surface); --ink: var(--q-text); --ink-2: var(--q-muted);
  --maroon: var(--q-accent); --maroon-2: var(--q-accent); --pen: var(--q-text); --chalk-2: var(--q-muted); --chalk-blue: var(--q-muted);
  --voice: var(--q-font);
  background: var(--q-bg); color: var(--q-text); font-family: var(--q-font);
}
body.class-v2 #lesson, body.class-v2 .v2-sheet, body.class-v2 .v2-drawer, body.class-v2 .v2-land, body.class-v2 .bubble,
body.class-v2 .caption, body.class-v2 .maths, body.class-v2 .entry .bl, body.class-v2 .v2-logo { font-family: var(--q-font); }

/* ── the top bar ─────────────────────────────────────────────────────────────────────────────── */
body.class-v2 .v2-bar { background: var(--q-bg); border-bottom: 1px solid var(--q-line); position: relative; }
body.class-v2 .v2-chapter, body.class-v2 .v2-btn, body.class-v2 .v2-locker, body.class-v2 .v2-lang, body.class-v2 .v2-more {
  background-color: var(--q-surface); border: 1px solid var(--q-line); color: var(--q-text); box-shadow: none; border-radius: 10px;
}
body.class-v2 .v2-btn:hover, body.class-v2 .v2-chapter:hover, body.class-v2 .v2-more:hover { border-color: var(--q-faint); }
body.class-v2 .v2-chapter svg, body.class-v2 .v2-btn svg { fill: var(--q-muted); }
body.class-v2 .v2-stage, body.class-v2 .v2-stage.is-active, body.class-v2 .v2-stage.is-done {
  background: transparent; border: 1px solid var(--q-line); color: var(--q-muted);
}
body.class-v2 .v2-stage.is-active { color: var(--q-text); border-color: var(--q-faint); }
body.class-v2 .v2-stage .v2-stage-dot, body.class-v2 .v2-stage.is-active .v2-stage-dot { background: var(--q-faint); border-color: var(--q-faint); }
body.class-v2 .v2-lang { background-color: var(--q-surface); font-size: var(--q-s); }
body.class-v2 .v2-lang option, body.class-v2 select option { color: var(--q-option-text); background: var(--q-option-bg); }

body.class-v2 .v2-more { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; flex: none; cursor: pointer; }
body.class-v2 .v2-more svg { width: 20px; height: 20px; fill: var(--q-text); }
body.class-v2 .v2-timer {
  flex: none; font-size: var(--q-s); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--q-text);
  padding: 6px 8px 5px; border-radius: 10px; border: 1px solid var(--q-line);
}
body.class-v2 .v2-timer[hidden] { display: none; }
/* in the class, the trial's time is in the bar: the page's own green bar stays out of the way */
body.class-v2:has(#lesson:not([hidden])):has(.v2-timer:not([hidden])) .trial-bar { display: none !important; }
body.class-v2:has(#lesson:not([hidden])):has(.v2-timer:not([hidden])) { padding-top: 0 !important; }

/* the ⋮ menu: every item named */
body.class-v2 .v2-menu {
  position: absolute; right: 8px; top: calc(100% + 6px); z-index: 45; min-width: 230px; padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--q-raise); border: 1px solid var(--q-line); border-radius: 12px; box-shadow: 0 10px 30px var(--q-shadow);
}
body.class-v2 .v2-menu[hidden] { display: none; }
body.class-v2 .v2-m-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--q-text); font-size: var(--q-m); text-align: left; cursor: pointer;
}
body.class-v2 .v2-m-item:hover, body.class-v2 .v2-m-item:focus-visible { background: var(--q-surface); outline: none; }
body.class-v2 .v2-m-item svg { width: 20px; height: 20px; fill: var(--q-muted); flex: none; }
body.class-v2 .v2-m-label { flex: 1 1 auto; }
body.class-v2 .v2-m-select {
  flex: none; font-size: var(--q-s); color: var(--q-text); background: var(--q-surface); border: 1px solid var(--q-line);
  border-radius: 8px; padding: 4px 6px;
}

/* ── the teacher ─────────────────────────────────────────────────────────────────────────────── */
body.class-v2 #lesson > .side { background: var(--q-surface); border: 1px solid var(--q-line); border-radius: 14px; }
body.class-v2 .side .tile { border: 1px solid var(--q-line); box-shadow: none; }
body.class-v2 .side .bubble {
  background: transparent; border: 0; box-shadow: none; color: var(--q-text); font-size: var(--q-l); line-height: 1.5; padding: 2px 4px;
}
body.class-v2 .side .bubble::before, body.class-v2 .side .bubble::after { display: none; }
/* what she is saying now: the sentence she's on is bright and marked; what she has said is quiet */
body.class-v2 .caption .cs { color: var(--q-muted); }
body.class-v2 .caption .cs.said { color: var(--q-faint); }
body.class-v2 .caption .cs.now {
  color: var(--q-now); background: var(--q-now-bg); box-shadow: none; border-radius: 4px;
  text-decoration: underline 2px var(--q-accent); text-underline-offset: 5px;
}
body.class-v2 .side .under .quiet, body.class-v2 .side .quiet, body.class-v2 .side .again { color: var(--q-muted); font-size: var(--q-s); }
body.class-v2 .side .under svg { fill: var(--q-muted); }
body.class-v2 .v2-voice { background: transparent; color: var(--q-muted); box-shadow: none; border: 0; }
body.class-v2 .v2-voice .v2-vdot { background: var(--q-faint); }
body.class-v2 .v2-voice[data-state="speaking"] .v2-vdot, body.class-v2 .v2-voice[data-state="listening"] .v2-vdot { background: var(--q-accent); }
body.class-v2 .v2-voice .v2-wave i { background: var(--q-faint); }
body.class-v2 .v2-voice[data-state="speaking"] .v2-wave i { background: var(--q-accent); }
body.class-v2 .v2-vlabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.class-v2 .v2-speed { background: var(--q-surface); color: var(--q-text); border: 1px solid var(--q-line); }
body.class-v2 .v2-mic { background: var(--q-raise); color: var(--q-text); border: 1px solid var(--q-line); box-shadow: none; }
body.class-v2 .v2-mic svg { fill: var(--q-text); }
body.class-v2 .v2-extra { background: transparent; padding: 0; }
body.class-v2 .v2-another { background: transparent; border: 1px solid var(--q-line); color: var(--q-text); }
body.class-v2 .v2-meter i { background: var(--q-muted); }

/* ── the board ──────────────────────────────────────────────────────────────────────────────── */
body.class-v2 #lesson > .desk { background: var(--q-surface); border: 1px solid var(--q-line); border-radius: 14px; }
body.class-v2 .desk .board { background: transparent; box-shadow: none; border: 0; }
body.class-v2 .v2-head { background: transparent; border-bottom: 1px solid var(--q-line); }
body.class-v2 .v2-topic, body.class-v2 .v2-course { color: var(--q-text); font-size: var(--q-m); }
body.class-v2 .v2-badge { background: transparent; border: 1px solid var(--q-line); color: var(--q-muted); }
body.class-v2 .v2-tool { background: transparent; border: 1px solid var(--q-line); color: var(--q-muted); box-shadow: none; }
body.class-v2 .question { background: transparent; border: 0; border-bottom: 1px solid var(--q-line); }
body.class-v2 .q-label { color: var(--q-muted); }
body.class-v2 .q-text { color: var(--q-text); }
body.class-v2 .log { background: transparent; }
body.class-v2 .entry .said { color: var(--q-muted); font-size: var(--q-m); line-height: 1.6; }
body.class-v2 .entry .bl { color: var(--q-text); font-size: 22px; line-height: 1.45; }
body.class-v2 .entry.teacher.current .bl:last-of-type { background: var(--q-hl); border-radius: 6px; }
/* the student's own words: quiet, and labelled "You" (in the class's language: --v2-you, classroom.js) */
body.class-v2 .entry.student { gap: 2px; }
body.class-v2 .entry.student::before {
  content: var(--v2-you, "You"); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--q-faint);
}
body.class-v2 .entry.student .said, body.class-v2 .entry.student .bl { color: var(--q-muted); opacity: 1; font-size: var(--q-m); }
body.class-v2 .v2-keybar { background: transparent; border: 1px solid var(--q-line); }
body.class-v2 .v2-keys button { background: var(--q-raise); border: 1px solid var(--q-line); color: var(--q-text); box-shadow: none; }
body.class-v2 .v2-check { background: var(--q-raise); color: var(--q-text); border: 1px solid var(--q-line); }
body.class-v2 .answer, body.class-v2 .answer .notebook { background: transparent; border: 0; box-shadow: none; }
body.class-v2 .answer textarea, body.class-v2 .answer input, body.class-v2 .answer .line {
  background: var(--q-bg); color: var(--q-text); border: 1px solid var(--q-line); border-radius: 10px; font-size: var(--q-m);
}
body.class-v2 .answer .send { background: var(--q-raise); color: var(--q-text); border: 1px solid var(--q-line); box-shadow: none; }
body.class-v2 .answer .send svg { fill: var(--q-text); }
body.class-v2 .heard { color: var(--q-muted); }
/* the answers she offers: quiet outlined chips, one look */
body.class-v2 .desk > .extras button, body.class-v2 .desk > .extras .opt {
  background: transparent; border: 1px solid var(--q-line); color: var(--q-text); box-shadow: none; border-radius: 999px; font-size: var(--q-s);
}
body.class-v2 .status { background: transparent; color: var(--q-muted); border: 0; }

/* ── the bottom bar: the mic, two quiet buttons, one status line ───────────────────────────── */
body.class-v2 .v2-talk { background: var(--q-accent); border: 0; color: var(--q-on-accent); box-shadow: none; animation: none; }
body.class-v2 .v2-talk svg { fill: var(--q-on-accent); }
body.class-v2 .v2-talk.on { background: var(--q-accent); box-shadow: 0 0 0 3px var(--q-bg), 0 0 0 5px var(--q-accent-soft); animation: none; }
body.class-v2 .v2-talk.held { background: var(--q-accent); }
body.class-v2 .v2-talk-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
body.class-v2 .v2-dockbtn {
  background: transparent; border: 1px solid var(--q-line); color: var(--q-text); box-shadow: none; border-radius: 12px; font-size: var(--q-s);
}
body.class-v2 .v2-dockbtn svg { fill: var(--q-muted); }
body.class-v2 .v2-status {
  margin: 8px 0 0; min-height: 22px; text-align: center; font-size: var(--q-s); line-height: 22px; color: var(--q-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.class-v2 .v2-status[data-state="speaking"], body.class-v2 .v2-status[data-state="listening"] { color: var(--q-accent-soft); }
body.class-v2 .v2-ptt { color: var(--q-faint); }

/* ── dialogs: the summary, the chapter picker, settings, the formulas ─────────────────────────── */
body.class-v2 .v2-sheet .sheet-card, body.class-v2 .v2-drawer {
  background: var(--q-surface); color: var(--q-text); border: 1px solid var(--q-line); box-shadow: 0 10px 40px var(--q-shadow);
}
body.class-v2 .v2-sheet .sheet-head, body.class-v2 .v2-sheet .sheet-foot { border-color: var(--q-line); background: transparent; }
body.class-v2 .v2-sheet h2, body.class-v2 .v2-drawer h2 { color: var(--q-text); font-size: var(--q-l); }
body.class-v2 .v2-sum-sec, body.class-v2 .v2-drawer-notes { background: var(--q-raise); border: 1px solid var(--q-line); box-shadow: none; }
body.class-v2 .v2-sum-sec h3, body.class-v2 .v2-sum-sec .v2-sum-label { color: var(--q-muted); }
body.class-v2 .v2-sheet .quiet, body.class-v2 .v2-drawer .quiet, body.class-v2 .v2-sum-foot .quiet {
  color: var(--q-text); background: transparent; border: 1px solid var(--q-line); border-radius: 10px;
}
body.class-v2 .go, body.class-v2 .cp-start { background: var(--q-accent-fill); color: var(--q-on-accent); border: 0; box-shadow: none; }

/* ── the landing and the picker ─────────────────────────────────────────────────────────────── */
body.class-v2.v2-landing .v2-land, body.class-v2 > main#v2-land#v2-land:not([hidden]) { background: var(--q-bg); }
body.class-v2.v2-landing .v2-land-card { background: var(--q-surface); border: 1px solid var(--q-line); box-shadow: none; }
body.class-v2.v2-landing .v2-land h1 { font-size: 24px; color: var(--q-text); }
body.class-v2.v2-landing .v2-land-note, body.class-v2.v2-landing .v2-perms small { color: var(--q-muted); }
body.class-v2 .v2-perms { border: 1px solid var(--q-line); background: transparent; }
body.class-v2 .cp { display: flex; flex-direction: column; gap: 10px; }
body.class-v2 .cp .field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
body.class-v2 .cp .field[hidden] { display: none; }
body.class-v2 .cp .field-name { color: var(--q-muted); font-size: var(--q-s); }
body.class-v2 .cp-select {
  appearance: none; -webkit-appearance: none; width: 100%; min-height: 46px; padding: 10px 36px 9px 12px; font-size: var(--q-m);
  color: var(--q-text); border: 1px solid var(--q-line); border-radius: 10px; box-shadow: none;
  background: var(--q-bg) var(--q-chevron) no-repeat right 12px center / 12px 8px;
}
body.class-v2 .cp-select:focus-visible { outline: 2px solid var(--q-accent-soft); outline-offset: 1px; }
body.class-v2 .cp-go { display: flex; gap: 8px; }
body.class-v2 .cp-start { flex: 1 1 auto; min-height: 50px; font-size: var(--q-m); font-weight: 600; border-radius: 12px; }
body.class-v2 .cp-practise { color: var(--q-text); border: 1px solid var(--q-line); background: transparent; border-radius: 12px; }

/* ── phone ───────────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  body.class-v2 { --v2-dock: 72px; --q-status: 26px; }
  body.class-v2 #lesson { padding-bottom: calc(var(--v2-dock) + var(--q-status) + max(8px, env(safe-area-inset-bottom))); gap: 8px; }

  /* the slim top bar, one line: logo, chapter, timer, language, ⋮ */
  body.class-v2 .v2-bar { flex-wrap: nowrap; gap: 6px; padding: max(6px, env(safe-area-inset-top)) 10px 6px; min-height: 48px; }
  [data-brand="v2"] body.class-v2 .v2-logo, body.class-v2 .v2-logo { width: 62px; height: 18px; flex: none; font-size: 17px; background-size: contain; background-repeat: no-repeat; }
  body.class-v2 .v2-chapter { order: 0; flex: 1 1 0; min-width: 0; padding: 7px 10px 6px; font-size: var(--q-s); }
  body.class-v2 .v2-chapter svg { display: none; }
  body.class-v2 .v2-chapter-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.class-v2 .v2-stagewrap { display: none; }
  body.class-v2 .v2-actions { gap: 6px; flex: none; }
  body.class-v2 .v2-actions .v2-pause, body.class-v2 .v2-actions .v2-pdf, body.class-v2 .v2-actions .v2-locker { display: none; }
  body.class-v2 .v2-lang { max-width: 92px; min-height: 36px; padding: 6px 22px 5px 8px; font-size: 13px; background-position: right 6px center; }
  body.class-v2 .v2-timer { padding: 7px 6px 6px; font-size: 13px; }

  /* the teacher strip: a small picture and her words, large */
  body.class-v2 #lesson > .side {
    grid-template-columns: 52px minmax(0, 1fr); grid-template-areas: "faces talk"; max-height: 24dvh; padding: 10px 10px 8px 10px; gap: 10px;
  }
  body.class-v2 .side .faces, body.class-v2 .side .tile { width: 52px; }
  body.class-v2 .side .tile { border-radius: 12px; }
  body.class-v2 .side .faces #me { width: 40px; right: -4px; bottom: -4px; }
  /* her live face (GURVA_LIVE_FACE): a little larger than the still, so her lips read on a phone; the strip stays calm */
  body.class-v2 #lesson > .side:has(.tile.is-live) { grid-template-columns: 72px 1fr; }
  body.class-v2 .side .faces:has(.tile.is-live), body.class-v2 .side .tile.is-live { width: 72px; }
  body.class-v2 .side .tile.is-live { height: 72px; aspect-ratio: auto; border-radius: 16px; cursor: pointer; }
  body.class-v2 .side .bubble { max-height: calc(24dvh - 44px); overflow-y: auto; font-size: var(--q-l); line-height: 30px; padding: 0 2px; }
  body.class-v2 .side .caption { line-height: 30px; margin: 0; }
  /* a whole number of lines tall (30 px each), so scrolled to its end it still starts on a line, never a slice of one */
  @supports (max-height: round(down, 100px, 30px)) {
    body.class-v2 .side .bubble { max-height: round(down, calc(24dvh - 44px), 30px); }
  }
  body.class-v2 .side .under { margin-top: 4px; }
  body.class-v2 .v2-voice, body.class-v2 .v2-extra, body.class-v2 .v2-ptt { display: none; }

  /* the board under her */
  body.class-v2 #lesson > .desk { padding: 6px 8px 8px; gap: 6px; }
  body.class-v2 .v2-head { padding: 4px 6px 6px; }
  body.class-v2 .v2-topic { font-size: var(--q-s); color: var(--q-muted); font-weight: 600; }
  body.class-v2 .log { padding: 8px 6px 10px; gap: 12px; }
  body.class-v2 .entry .said { font-size: var(--q-m); }
  body.class-v2 .entry .bl { font-size: 22px; }
  body.class-v2 .desk > .extras button:not(.opt) { font-size: var(--q-s); padding: 7px 12px 6px; }

  /* the bottom bar: the status line, then hand · mic · stuck */
  body.class-v2 .v2-dock {
    background: var(--q-bg); border-top: 0; box-shadow: none; gap: 14px; height: calc(var(--v2-dock) + env(safe-area-inset-bottom));
    padding: 4px 12px max(10px, env(safe-area-inset-bottom)); align-items: center;
  }
  body.class-v2 .v2-dock-drawer { display: none; }
  body.class-v2 .v2-talk { width: 60px; height: 60px; margin: 0; }
  body.class-v2 .v2-dockbtn { min-width: 0; flex: 1 1 0; max-width: 130px; height: 44px; padding: 0 10px; flex-direction: row; gap: 6px; }
  body.class-v2 .v2-dockbtn svg { width: 18px; height: 18px; }
  body.class-v2 .v2-dock-label { font-size: var(--q-s); white-space: nowrap; }
  body.class-v2 .v2-status {
    position: fixed; left: 0; right: 0; z-index: 20; margin: 0; padding: 4px 16px 0; height: var(--q-status);
    bottom: calc(var(--v2-dock) + env(safe-area-inset-bottom)); background: var(--q-bg); border-top: 1px solid var(--q-line);
  }
  body.class-v2 .v2-menu { right: 6px; left: auto; }
}

/* the landing's switches and the trial's bar before the class: the same calm base, the accent only when on */
body.class-v2 .knob, [data-brand="v2"] body.class-v2 .knob { background: var(--q-line); }
body.class-v2 .switch input:checked + .knob, [data-brand="v2"] body.class-v2 .switch input:checked + .knob { background: var(--q-accent); }
body.class-v2 .trial-bar { background: var(--q-surface) !important; color: var(--q-text) !important; border-bottom: 1px solid var(--q-line); }
body.class-v2 .cp-select:focus { border-color: var(--q-faint); box-shadow: none; }
body.class-v2 .side .tile, body.class-v2 .side .tile.is-speaking, body.class-v2 .side .tile.is-asking { background-color: var(--q-raise); }

/* phone: the symbol keys show while a step is being written (the step line or a key in focus), not when an answer chip
   is tapped: the keys appearing under a finger moved the chip away mid-tap ("Yes, let's start" didn't start) */
@media (max-width: 767px) {
  body.class-v2 .desk:not(:has(.answer :focus, .v2-keybar :focus)) > .v2-keybar { display: none; }
}
body.class-v2 .v2-logo { color: var(--q-text); }

/* phone landing: a smaller teacher, and Start (with Practise beside it) always on the screen, at its bottom when the
   picker runs past it (the row is sticky, not the button: a sticky button can't leave its own row) */
@media (max-width: 767px) {
  body.class-v2.v2-landing .v2-land-tile { width: min(112px, 30vw); }
  body.class-v2.v2-landing .v2-land h1 { font-size: 21px; }
  body.class-v2.v2-landing .v2-land-pick .cp-start { position: static; box-shadow: none; }
  body.class-v2.v2-landing .v2-land-pick .cp-go {
    position: sticky; bottom: 0; z-index: 2; margin: 0 -14px; padding: 10px 14px max(10px, env(safe-area-inset-bottom));
    background: var(--q-surface); border-top: 1px solid var(--q-line);
  }
}

/* ── her live face, video-call style (live-face.js Stage; the Owner, 24 Oct) ─────────────────────────────────────────
   No ring on the live face: her moving lips say she is speaking; a thin saffron line on the frame is the only cue. The
   still portrait (the fallback) keeps its ring. */
body.class-v2 .side .tile.is-live::before { box-shadow: none; }
body.class-v2 .side .tile.is-live.is-speaking { border-color: var(--q-accent); }
@media (min-width: 601px) and (max-width: 767px) {
  body.class-v2 #lesson > .side:has(.tile.is-live) { grid-template-columns: 120px 1fr; max-height: 30dvh; }
  body.class-v2 .side .faces:has(.tile.is-live), body.class-v2 .side .tile.is-live { width: 120px; height: 120px; }
}
@media (max-width: 600px) {
  /* the swap fades in, never slides: a sliding grid squeezed her words into a column a letter wide while it moved (the
     Owner's phone, 24 Oct) */
  body.class-v2.live-big #lesson > .side:has(.tile.is-live) { animation: lf-big 240ms ease-out; }
  body.class-v2:not(.live-big) #lesson > .side:has(.tile.is-live) { animation: lf-small 240ms ease-out; }
  /* large: her whole frame (head with room above the hair, down to the saree), about 40% of the screen, her sentence
     over the saree at its lower edge */
  body.class-v2.live-big #lesson > .side:has(.tile.is-live) { grid-template-columns: 100% 0fr; column-gap: 0; max-height: 44dvh; padding: 6px; }
  body.class-v2.live-big .side .faces:has(.tile.is-live), body.class-v2.live-big .side .tile.is-live { width: 100%; }
  body.class-v2.live-big .side .tile.is-live { height: 40dvh; border-radius: 12px; }
  body.class-v2.live-big .side .talk {
    grid-area: faces; align-self: end; z-index: 2; margin: 0 6px 4px; padding: 5px 10px; border-radius: 10px;
    background: var(--q-scrim); pointer-events: none;
  }
  /* two short lines at most, over her saree: never over her mouth or chin (the lowest quarter of the frame) */
  body.class-v2.live-big .side .bubble { max-height: 52px; overflow: hidden; font-size: var(--q-m); line-height: 26px; }
  body.class-v2.live-big .side .caption { line-height: 26px; }
  body.class-v2.live-big .side .caption:has(.cs.now) .cs:not(.now) { display: none; }
  body.class-v2.live-big .side .caption .cs.now { background: none; }
  body.class-v2.live-big .side .under, body.class-v2.live-big .side .faces #me { display: none; }
}
@keyframes lf-big { from { opacity: 0.35; } to { opacity: 1; } }
@keyframes lf-small { from { opacity: 0.35; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  body.class-v2 #lesson > .side { animation: none !important; }
}

/* the trial's end and the sheets' veil, in the theme (class-layout.css lays the card out) */
body.class-v2 .trial-over p { color: var(--q-muted); }
body.class-v2 .trial-over h2 { color: var(--q-text); }
body.class-v2 .trial-over a:not(.go) { color: var(--q-text); }
body.class-v2 .trial-over .quiet { color: var(--q-text); background: transparent; border: 1px solid var(--q-line); }
body.class-v2 .v2-sheet::backdrop, body.class-v2 .v2-drawer::backdrop { background: var(--q-veil); }
body.class-v2.live-big .side .caption .cs.now { color: var(--q-scrim-text); }

/* the "i" beside the picker's first label (picker.js infoTip): a quiet circle, the note over the page (no layout shift) */
body.class-v2 .cp .cp-label { display: inline-flex; align-items: center; gap: 6px; position: relative; min-width: 0; }
body.class-v2 .cp-info-wrap { position: static; display: inline-flex; align-items: center; }
body.class-v2 .cp-info {
  display: inline-grid; place-items: center; width: 24px; height: 24px; margin: -4px 0; padding: 0; border-radius: 50%;
  background: transparent; border: 0; color: var(--q-muted); cursor: pointer;
}
body.class-v2 .cp-info-i {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid currentColor;
  font: 700 12px/1 var(--q-font); font-style: normal;
}
body.class-v2 .cp-info:hover, body.class-v2 .cp-info[aria-expanded="true"] { color: var(--q-text); }
body.class-v2 .cp-info:focus-visible { outline: 2px solid var(--q-accent-soft); outline-offset: 1px; }
@media (pointer: coarse) {
  /* a finger's size, without moving the row: the button is 44 px, its margins give the extra back */
  body.class-v2 .cp-info { width: 44px; height: 44px; margin: -12px -10px; }
}
body.class-v2 .cp-info-tip {
  position: absolute; z-index: 60; top: calc(100% + 8px); left: 0; width: min(320px, calc(100vw - 48px)); box-sizing: border-box;
  padding: 12px 14px; border-radius: 12px; text-align: left; white-space: normal;
  background: var(--q-raise); color: var(--q-text); border: 1px solid var(--q-line); box-shadow: 0 10px 30px var(--q-shadow);
  font-size: var(--q-s); line-height: 1.45; font-weight: 400;
}
body.class-v2 .cp-info-tip[hidden] { display: none; }
body.class-v2 .cp-info-title { display: block; margin: 0 0 4px; color: var(--q-text); font-size: 15px; font-weight: 600; }
body.class-v2 .cp-info-body { margin: 0; color: var(--q-text); }
/* class-layout.css */
/* A layout of its own for each size of screen (the Owner, 25 Oct, from app.gurva.in on a 1836 px desktop: "it's mobile
   view added on big screens - feels so useless - each screen size should have its own design fit"). Loaded last
   (classroom.js), over class-v2.css, room.css and class-calm.css; only in the class and on its landing. No colours here:
   they are theme tokens (theme.css).

   - phone (< 600 px), and up to 767 px: the phone design as it is (class-calm.css): the slim bar, her strip or her large
     video-call face, the board, the thumb dock;
   - tablet, upright (768-1023 px wide, portrait): two zones, her and her words in a band on top (her face large beside
     the caption, the mic and the two quiet buttons under it), the board under them the full width;
   - laptop and desktop (>= 1024 px), and a tablet on its side: a classroom. Her video on the left, large, square, never
     cut; under it her words (the caption rail) and the controls docked at the column's foot; the board the wide main
     area, its reading text about 70 characters a line; the bar's actions a toolbar, as icons where it is narrow;
   - the landing / trial start (>= 760 px): two columns, who she is and the mic on one side, the chapter picker with Start
     on the other, Start in view without scrolling. */

/* ── laptop / desktop: the bar is a toolbar that fits ─────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  body.class-v2 .v2-bar { flex-wrap: nowrap; gap: 10px; min-width: 0; }
  body.class-v2 .v2-chapter { flex: 0 1 auto; min-width: 12ch; max-width: 40ch; }
  body.class-v2 .v2-actions { flex: none; gap: 8px; }
  body.class-v2 .v2-btn, body.class-v2 .v2-more, body.class-v2 .v2-lang, body.class-v2 .v2-timer, body.class-v2 .v2-chapter { min-height: 40px; }
  body.class-v2 .v2-more { width: 40px; height: 40px; }
}
/* narrower: the sitting's step shows only where it is, and the actions are icons (their names stay for screen readers
   and as tooltips: classroom.js gives each its title) */
@media (min-width: 768px) and (max-width: 1599px) {
  body.class-v2 .v2-stage:not(.is-active) { display: none; }
  body.class-v2 .v2-stagewrap { flex: 0 1 auto; }
  body.class-v2 .v2-pdf .v2-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body.class-v2 .v2-pdf { padding: 6px 10px; }
}
@media (min-width: 768px) and (max-width: 1279px) {
  body.class-v2 .v2-btn .v2-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  body.class-v2 .v2-btn { padding: 6px 10px; min-width: 44px; justify-content: center; }
  [data-brand="v2"] body.class-v2 .v2-logo { width: 132px; height: 37px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  body.class-v2 .v2-stagewrap { display: none; }
}

/* ── the classroom: laptop, desktop, a tablet on its side ─────────────────────────────────────────────────── */
@media (min-width: 1024px), (min-width: 768px) and (orientation: landscape) and (min-height: 521px) {
  body.class-v2 #lesson { height: 100dvh; grid-template-rows: auto minmax(0, 1fr); padding-bottom: 14px; }
  /* her column: the video, the voice row, her words (they scroll), and the controls at its foot */
  body.class-v2 #lesson > .side {
    display: flex; flex-direction: column; align-items: stretch; gap: 10px; min-height: 0; max-height: none; overflow: hidden;
    padding: 14px;
  }
  body.class-v2 .side .faces { flex: none; width: 100%; display: flex; justify-content: center; position: relative; }
  /* square (her whole 640 px frame, never zoomed or cut), as large as the column allows and leaves her words room */
  body.class-v2 .side .tile, body.class-v2 .side .tile.is-live {
    width: min(100%, 48dvh, calc(100dvh - 460px)); min-width: 160px; height: auto; aspect-ratio: 1 / 1; align-self: center; border-radius: 16px;
  }
  body.class-v2 .side .faces #me { position: absolute; right: 6px; bottom: 6px; top: auto; width: min(30%, 140px); z-index: 2; }
  body.class-v2 .v2-voice { flex: none; }
  body.class-v2 .side .talk { flex: 1 1 auto; min-height: 72px; display: flex; flex-direction: column; overflow: hidden; }
  body.class-v2 .side .bubble { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; font-size: var(--q-l); line-height: 1.5; }
  body.class-v2 .side .under, body.class-v2 .v2-extra { flex: none; }
  body.class-v2 .v2-status { flex: none; position: static; margin: 0; }
  body.class-v2 .v2-dock {
    flex: none; position: static; display: flex; align-items: center; justify-content: center; gap: 12px;
    height: auto; padding: 4px 0 0; background: none; border: 0; box-shadow: none;
  }
  body.class-v2 .v2-talk { width: 60px; height: 60px; margin: 0; }
  body.class-v2 .v2-dockbtn { flex: 1 1 0; max-width: 150px; min-width: 0; min-height: 52px; padding: 6px 10px; flex-direction: row; gap: 8px; }
  body.class-v2 .v2-dock-label { white-space: nowrap; }
  body.class-v2 .v2-ptt { flex: none; margin: 0; text-align: center; }

  /* the board: the wide main area; its text a comfortable line (about 70 characters), centred, never a wall */
  body.class-v2 #lesson > .desk { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
  body.class-v2 .desk .board { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  /* about 70 characters of the board's own lines (22 px) a line: wide enough to read as sentences, never a wall */
  body.class-v2 .desk .log { width: 100%; max-width: 58rem; margin-inline: auto; box-sizing: border-box; }
  body.class-v2 .desk .question, body.class-v2 .desk .v2-head { width: 100%; box-sizing: border-box; }
  body.class-v2 .desk .question .q-text { max-width: 74ch; }
  body.class-v2 .desk > .extras, body.class-v2 .desk > .v2-keybar, body.class-v2 .desk > .answer { flex: none; }
}
/* a laptop (1024-1279): the board takes a little more of the width, and its lines a little smaller, so they still run
   to about 70 characters */
@media (min-width: 1024px) and (max-width: 1279px) {
  body.class-v2 #lesson { grid-template-columns: minmax(0, 2.7fr) minmax(0, 7.3fr); }
  body.class-v2 .entry .bl { font-size: 20px; }
}
/* a large screen: her column a little wider, so she is large and her words read as lines, not a narrow strip */
@media (min-width: 1600px) {
  body.class-v2 #lesson { grid-template-columns: minmax(0, 3.2fr) minmax(0, 6.8fr); gap: 14px 24px; padding-inline: 24px; }
  body.class-v2 .side .tile, body.class-v2 .side .tile.is-live { width: min(100%, 52dvh, calc(100dvh - 460px)); }
  body.class-v2 .entry .said { font-size: 19px; }
  body.class-v2 .desk .log { max-width: 66rem; }
  body.class-v2 .entry .bl { font-size: 25px; }
}
/* a short laptop screen: the hint under the mic gives its line to her words */
@media (min-width: 1024px) and (max-height: 860px) {
  body.class-v2 .v2-ptt { display: none; }
}

/* ── tablet, upright: her band on top, the board under it ─────────────────────────────────────────────────── */
@media (min-width: 768px) and (max-width: 1023px) and (orientation: portrait) {
  body.class-v2 #lesson {
    height: 100dvh; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas: "bar" "side" "desk"; gap: 12px; padding: 0 16px max(14px, env(safe-area-inset-bottom));
  }
  body.class-v2 .v2-bar { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  body.class-v2 #lesson > .side {
    display: grid; grid-template-columns: clamp(200px, 30vw, 300px) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    grid-template-areas: "faces voice" "faces talk" "faces status" "faces dock" "faces ptt";
    gap: 8px 16px; max-height: 34dvh; padding: 14px; overflow: hidden; align-items: stretch;
  }
  body.class-v2 .side .faces { grid-area: faces; width: 100%; position: relative; align-self: start; }
  body.class-v2 .side .tile, body.class-v2 .side .tile.is-live { width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 16px; }
  body.class-v2 .side .faces #me { position: absolute; right: 6px; bottom: 6px; top: auto; width: 34%; z-index: 2; }
  body.class-v2 .v2-voice { grid-area: voice; display: flex; }
  body.class-v2 .side .talk { grid-area: talk; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  body.class-v2 .side .bubble { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; font-size: var(--q-l); line-height: 1.5; }
  body.class-v2 .v2-extra { display: none; }
  body.class-v2 .v2-status { grid-area: status; position: static; margin: 0; text-align: left; }
  body.class-v2 .v2-dock {
    grid-area: dock; position: static; display: flex; align-items: center; justify-content: flex-start; gap: 12px;
    height: auto; padding: 0; background: none; border: 0; box-shadow: none;
  }
  body.class-v2 .v2-talk { width: 60px; height: 60px; margin: 0; order: -1; }
  body.class-v2 .v2-dockbtn { flex: 0 1 auto; min-width: 0; min-height: 48px; padding: 6px 14px; flex-direction: row; gap: 8px; }
  body.class-v2 .v2-ptt { grid-area: ptt; margin: 0; }
  body.class-v2 #lesson > .desk { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
  body.class-v2 .desk .board { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  body.class-v2 .desk .log { width: 100%; max-width: 44rem; margin-inline: auto; box-sizing: border-box; }
}

/* ── the landing and the trial's start: two columns ──────────────────────────────────────────────────────── */
@media (min-width: 760px) {
  body.class-v2.v2-landing .v2-land { place-items: center; padding: 24px; }
  body.class-v2.v2-landing .v2-land-card {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(24px, 4vw, 56px); row-gap: 12px;
    align-items: start; justify-items: center; width: min(1040px, 100%); max-width: none; padding: clamp(24px, 3vw, 40px);
    margin: auto 0;
  }
  body.class-v2.v2-landing .v2-land-card > * { grid-column: 1; }
  body.class-v2.v2-landing .v2-land-card > .v2-land-pick, body.class-v2.v2-landing .v2-land-card > .v2-land-go {
    grid-column: 2; grid-row: 1 / span 8; align-self: center; justify-self: stretch; width: 100%; text-align: left;
  }
  body.class-v2.v2-landing .v2-land-tile { width: min(240px, 26vw, 34dvh); }
  body.class-v2.v2-landing .v2-land h1 { font-size: clamp(24px, 2.2vw, 30px); }
  body.class-v2.v2-landing .v2-land-note { max-width: 40ch; }
  body.class-v2.v2-landing .v2-perms { width: 100%; max-width: 420px; box-sizing: border-box; text-align: left; }
  /* the picker's own column: Start always on the screen (never sticky over the fields: there is room) */
  body.class-v2.v2-landing .v2-land-pick .cp-go { position: static; margin: 4px 0 0; padding: 0; border: 0; background: none; }
  body.class-v2.v2-landing .v2-land-pick .cp-start { position: static; box-shadow: none; }
  body.class-v2.v2-landing .v2-land-go { position: static; box-shadow: none; }
}
/* a short laptop screen (1366 x 768 and the like): the picture smaller, so the card fits without scrolling */
@media (min-width: 760px) and (max-height: 820px) {
  body.class-v2.v2-landing .v2-land-tile { width: min(200px, 30dvh); }
  body.class-v2.v2-landing .v2-land-card { padding-block: 22px; }
  body.class-v2.v2-landing .cp { gap: 8px; }
}

/* ── sheets: the summary and the chapter switch use the room on a big screen ─────────────────────────────── */
@media (min-width: 1024px) {
  body.class-v2 #v2-summary.sheet { width: min(880px, calc(100% - 64px)); }
  body.class-v2 #v2-summary .v2-sum-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  body.class-v2 #v2-summary .v2-sum-body > .v2-sum-msg { grid-column: 1 / -1; }
  /* "Spot Gurva's mistake" leads the summary across its width: her working and the rules read on one line each */
  body.class-v2 #v2-summary .v2-sum-body > .v2-mirror { grid-column: 1 / -1; }
  body.class-v2 #v2-switch.sheet { width: min(640px, calc(100% - 64px)); }
  body.class-v2 .v2-sum-foot { gap: 10px; }
  body.class-v2 .v2-sum-foot .go { flex: 0 1 auto; }
}

/* ── the trial's end: a card, not a page of loose links ──────────────────────────────────────────────────── */
body.class-v2 .trial-over { justify-items: center; }
body.class-v2 .trial-over > * { max-width: 46ch; margin: 0; }
body.class-v2 .trial-over h2 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.25; }
body.class-v2 .trial-over a.go {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; min-width: min(320px, 100%);
  padding: 10px 24px; border-radius: 12px; font-weight: 600; text-decoration: none;
}
body.class-v2 .trial-over .trial-notes { min-height: 44px; padding: 8px 18px; border-radius: 12px; }
body.class-v2 .trial-over a:not(.go) { min-height: 44px; display: inline-flex; align-items: center; text-underline-offset: 4px; }
