/* Subject learning workspace (public/workspace.js), laid out as
   docs/master/APPROVED_NOVA_LESSON_REFERENCE.png: a navy header with the SchoolTutor brand and
   Home / Progress / Tests / Parent; a calm light page with white rounded cards; the lesson column
   as a conversation workspace, Nova's column (the timer, her window, the chapter's topics) and the
   chapters sidebar. Mobile first (360 px): one screen-high column with Nova and the timer as a
   compact strip at the top and the composer at the bottom, the sidebar as a drawer; three
   columns from 1024 px.
   The lesson column (RC2) is a grid with fixed rows: context | conversation (the only row that
   grows, scrolling on its own) | the pinned question | the dock (help row, quiet line, the one
   composer). Writing, photos and the working area open as a sheet over the conversation rows and
   take no permanent space. Starting voice changes colours and words only, never a size.
   Lesson screens are deliberately calmer than the homepage (design spec "Lesson screens").
   Logical properties throughout so right-to-left works. Status colours follow the Okabe–Ito
   colour-blind-safe palette and always come with a symbol and a word, never colour alone. No
   external assets or fonts. */

.ws {
  --ws-navy: #12204f;
  --ws-navy-2: #1b2c66;
  --ws-blue-ui: #2a4fd8;
  --ws-blue-ui-deep: #1d3bb0;
  --ws-page: #eef1fa;
  --ws-card: #ffffff;
  --ws-line: #dfe3f3;
  --ws-violet: #5b3fd6;
  --ws-violet-deep: #3b2391;
  --ws-ink: #17183a;
  --ws-ink-soft: #4a4d6e;
  --ws-lavender: #eef0ff;
  --ws-lavender-2: #d9defa;
  --ws-gold: #f2b632;
  --ws-gold-ink: #6b4500;
  --ws-radius: 20px;
  --ws-radius-sm: 14px;
  --ws-touch: 44px;
  --ws-shadow: 0 8px 24px rgba(18, 32, 79, 0.08);
  /* Okabe–Ito */
  --ws-blue: #0072b2;
  --ws-orange: #e69f00;
  --ws-orange-ink: #7a4b00;
  --ws-green: #009e73;
  --ws-green-ink: #00624a;
  --ws-vermillion: #d55e00;
  --ws-grey: #6b6680;

  /* One screen high: the page itself never scrolls; the conversation (and the side columns)
     scroll on their own, so the composer stays at the foot of the screen. */
  display: flex;
  flex-direction: column;
  block-size: 100dvh;
  min-block-size: 0;
  overflow: hidden;
  padding: 0; /* full-bleed header, whatever frame the shell gives (student.css .st-workspace) */
  color: var(--ws-ink);
  font-family: "Noto Sans Malayalam", ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.45;
  background: var(--ws-page);
}

.ws *, .ws *::before, .ws *::after { box-sizing: border-box; }
.ws [hidden] { display: none !important; }
.ws button { font: inherit; color: inherit; }
.ws :focus-visible { outline: 3px solid var(--ws-gold); outline-offset: 2px; }
.ws-vh { position: absolute !important; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.ws-icon { inline-size: 22px; block-size: 22px; fill: currentColor; flex: none; }
[dir="rtl"] .ws-send .ws-icon, [dir="rtl"] .ws-submit .ws-icon, [dir="rtl"] [data-ws="next-topic"] .ws-icon { transform: scaleX(-1); }

/* ---------- Buttons ---------- */

.ws-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-block-size: var(--ws-touch);
  min-inline-size: var(--ws-touch);
  padding-block: 8px;
  padding-inline: 16px;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  white-space: normal; /* longer translations wrap instead of overflowing */
}
.ws-btn:disabled { opacity: 0.55; cursor: progress; }
.ws-btn-primary { background: var(--ws-blue-ui); color: #fff; box-shadow: 0 6px 16px rgba(42, 79, 216, 0.28); }
.ws-btn-primary:hover:not(:disabled) { background: var(--ws-blue-ui-deep); }
.ws-btn-soft { background: var(--ws-lavender); color: var(--ws-blue-ui-deep); border: 2px solid var(--ws-lavender-2); }
.ws-btn-soft:hover:not(:disabled) { background: var(--ws-lavender-2); }
.ws-btn-outline { background: #fff; color: var(--ws-blue-ui-deep); border: 2px solid var(--ws-lavender-2); }
.ws-btn-ghost { background: rgba(255, 255, 255, 0.12); color: #fff; border: 1px solid rgba(255, 255, 255, 0.28); }

.ws-tool {
  display: inline-grid;
  place-items: center;
  inline-size: var(--ws-touch);
  block-size: var(--ws-touch);
  border: 0;
  border-radius: 50%;
  background: var(--ws-lavender);
  color: var(--ws-blue-ui-deep);
  cursor: pointer;
  flex: none;
}
.ws-tool[aria-pressed="true"] { background: var(--ws-blue-ui); color: #fff; }
.ws-file { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }

.ws-row { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 8px; }

/* ---------- Header ---------- */

.ws-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-block: 6px;
  padding-inline: 10px;
  color: #fff;
  background: linear-gradient(90deg, var(--ws-navy), var(--ws-navy-2));
  flex: none;
}
.ws-brand { display: flex; align-items: center; gap: 8px; min-inline-size: 0; flex: 1; }
.ws-logo { inline-size: 36px; block-size: 36px; flex: none; padding: 4px; border-radius: 10px; background: linear-gradient(135deg, #6a8cff, #a77bf3); }
.ws-brand-text p { margin: 0; }
.ws-brand-name { font-weight: 800; font-size: 1.1rem; line-height: 1.1; }
.ws-brand-tag { display: none; font-size: 0.8rem; opacity: 0.9; }
.ws-nav { display: flex; align-items: center; gap: 2px; flex: none; }
.ws-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-block-size: var(--ws-touch);
  min-inline-size: var(--ws-touch);
  justify-content: center;
  padding-inline: 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.ws-nav-btn:hover { background: rgba(255, 255, 255, 0.1); }
.ws-nav-label { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ws-top-end { display: flex; align-items: center; gap: 6px; flex: none; }
.ws-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-block: 4px;
  padding-inline: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.ws-stars { color: #fff3cf; }
.ws-stars::before { content: "\2605"; color: var(--ws-gold); }
.ws-ai { display: none; }
.ws-drawer-btn span:first-of-type { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ws-badge {
  padding-inline: 8px;
  border-radius: 999px;
  background: var(--ws-orange);
  color: #1f1300;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

/* ---------- Body ---------- */

.ws-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 12px;
  padding: 8px;
  flex: 1 1 auto;
  min-block-size: 0;
  inline-size: 100%;
}
.ws-stage { display: flex; flex-direction: column; gap: 8px; min-inline-size: 0; min-block-size: 0; }
.ws-stage:empty { display: none; } /* below 1024 px its parts move into the lesson and the drawer */
/* The lesson column: named rows, so every part keeps its place whatever is shown. Nova's strip and
   the timer are only in it below 1024 px (their rows are empty, so zero high, otherwise). Spacing
   is a margin on each part rather than a grid gap, so empty rows add nothing. */
.ws-main {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  grid-template-areas: "nova" "timer" "context" "conv" "qcard" "dock";
  min-inline-size: 0;
  min-block-size: 0;
}
.ws-main > .nova { grid-area: nova; margin-block-end: 6px; }
.ws-main > .ws-timer { grid-area: timer; margin-block-end: 6px; }
.ws-main > .ws-context { grid-area: context; margin-block-end: 6px; }
.ws-main > .ws-conv { grid-area: conv; }
.ws-main > .ws-qcard { grid-area: qcard; margin-block-start: 6px; }
.ws-main > .ws-dock { grid-area: dock; margin-block-start: 6px; }
.ws-notice { margin: 0; color: var(--ws-ink-soft); font-size: 0.78rem; }

/* The context header: Subject > Chapter > what we are doing, and the AI notice. */
.ws-context { display: flex; flex-direction: column; gap: 4px; }

/* Breadcrumb: Subject > Chapter > what we are doing. */
.ws-crumbs { padding-block: 8px; padding-inline: 14px; border-radius: var(--ws-radius-sm); background: var(--ws-lavender); }
.ws-crumbs-list { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; padding: 0; list-style: none; font-weight: 700; font-size: 0.92rem; }
.ws-crumb + .ws-crumb::before { content: "\203A"; margin-inline-end: 8px; color: var(--ws-ink-soft); }
[dir="rtl"] .ws-crumb + .ws-crumb::before { content: "\2039"; }
.ws-crumb[aria-current="page"] { color: var(--ws-blue-ui-deep); }

/* The open question, pinned just above the answer controls: compact, and scrollable itself when
   a long question or many options would push the controls off a small screen. */
.ws-qcard {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  max-block-size: 34dvh;
  overflow-y: auto;
  padding-block: 8px;
  padding-inline: 10px;
  border-radius: var(--ws-radius-sm);
  border: 2px solid var(--ws-blue-ui);
  background: var(--ws-card);
  box-shadow: var(--ws-shadow);
}
.ws-qcard-avatar { inline-size: 40px; block-size: 40px; border-radius: 50%; background: #2c1f5e; box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(18, 32, 79, 0.2); }
.ws-qcard-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 2px; font-size: 0.9rem; }
.ws-qcard-ai { padding-inline: 8px; border-radius: 999px; background: var(--ws-lavender); color: var(--ws-blue-ui-deep); font-size: 0.72rem; font-weight: 700; }
/* The pinned card's speech bubble (the child's bubble is styled with the conversation below). */
.ws-qcard .ws-bubble { padding-block: 6px; padding-inline: 10px; border-radius: 4px var(--ws-radius-sm) var(--ws-radius-sm) var(--ws-radius-sm); background: var(--ws-lavender); overflow-wrap: anywhere; }
[dir="rtl"] .ws-qcard .ws-bubble { border-radius: var(--ws-radius-sm) 4px var(--ws-radius-sm) var(--ws-radius-sm); }
.ws-qcard .ws-bubble p { margin: 0 0 4px; }
.ws-qcard .ws-bubble p:last-child { margin-block-end: 0; }
.ws-qcard .ws-bubble p:empty { display: none; }
.ws-qcard-intro { display: none; font-weight: 600; } /* shown from 640 px, where there is room */
.ws-qcard-text { font-size: 1.15rem; font-weight: 800; line-height: 1.3; }
.ws-qcard-how { color: var(--ws-ink-soft); font-size: 0.82rem; }
/* While the sheet is open it explains itself: the "how to answer" line goes. */
.ws:not([data-expanded="none"]) .ws-qcard-how { display: none; }

/* Answer options: large, two per row on phones. */
.ws-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-block: 8px; }
.ws-option {
  min-block-size: 52px;
  padding: 8px 10px;
  border-radius: var(--ws-radius-sm);
  border: 2px solid var(--ws-lavender-2);
  background: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
}
.ws-option[aria-pressed="true"] { border-color: var(--ws-blue-ui); background: #fff; box-shadow: inset 0 0 0 2px var(--ws-blue-ui); }

/* ---------- The sheet: Write on Screen, Notebook Photo, the working area ---------- */

/* Over the context, conversation and pinned-question rows (the dock and its composer stay below,
   still usable); it closes back to the chat and leaves no space behind. */
.ws-main > .ws-expand {
  grid-column: 1;
  grid-row: context-start / qcard-end;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-block-size: 0;
  max-block-size: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px;
  border-radius: var(--ws-radius);
  background: var(--ws-card);
  box-shadow: 0 -6px 28px rgba(18, 32, 79, 0.18);
}
.ws-expand-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
/* The open question, repeated at the top of the sheet (it covers the pinned card). */
.ws-sheet-q { margin: 0; padding-block: 6px; padding-inline: 10px; border-radius: var(--ws-radius-sm); background: var(--ws-lavender); font-weight: 800; overflow-wrap: anywhere; }
.ws-expand-title { margin: 0; font-weight: 800; color: var(--ws-blue-ui-deep); }
.ws-expand-close { padding-inline: 12px; font-size: 0.9rem; }
.ws-tabpanel { display: flex; flex-direction: column; gap: 8px; }
.ws-answer-status { margin-block: 0; }
.ws-answer-status:empty { display: none; }

/* Write on Screen: the tools beside the page, then Submit Answer. */
.ws-pad-host { overflow-wrap: normal; } /* RC8C P0-W2: the .ws-msg bubble's overflow-wrap:anywhere must not reach the pad's labels */
.ws-pad-host .wp-bar { order: -1; flex: 0 0 auto; }
.ws-pad-host .wp-submit { display: none; } /* the lesson's own Submit Answer button sends the page */
.ws-pad-host .wp-canvas { background: #fff; border-color: var(--ws-line); }
.ws-submit-row { display: flex; justify-content: flex-end; }
.ws-submit { min-inline-size: 11rem; }

/* The dock, last in the lesson column: the help row, Hear Nova, the quiet line and the composer. */
.ws-dock { display: flex; flex-direction: column; gap: 6px; min-inline-size: 0; }

/* The one composer: the icons, the text box and Send. On phones the icons sit on their own row
   above the text box, so the box keeps a comfortable width. */
.ws-composer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  border-radius: var(--ws-radius);
  background: var(--ws-card);
  box-shadow: 0 -4px 18px rgba(18, 32, 79, 0.08);
}
.ws-inputrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "tools tools" "input send";
  align-items: end;
  gap: 6px;
}
/* RC5 U: one line at rest (44 px), growing with its words to about five lines (field-sizing where
   the browser has it), then scrolling inside itself. 16 px text, so phones never zoom. The
   placeholder ("Ask Nova or enter your answer...", or the voice state) stays on one line and ends
   in an ellipsis rather than being cut off half-way; nothing is ever drawn over the box. */
.ws-input {
  grid-area: input;
  min-inline-size: 0;
  inline-size: 100%;
  min-block-size: 44px;
  max-block-size: calc(7em + 22px); /* 5 lines x 1.4 + padding and border */
  overflow-y: auto;
  padding-block: 9px;
  padding-inline: 12px;
  border-radius: 14px;
  border: 2px solid var(--ws-line);
  background: #fff;
  color: var(--ws-ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  resize: none;
}
.ws-input::placeholder { color: var(--ws-ink-soft); opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@supports (field-sizing: content) {
  .ws-input { field-sizing: content; }
  .ws-input::placeholder { white-space: normal; } /* the box grows to hold a long translation */
}
.ws-input:focus { border-color: var(--ws-blue-ui); outline: none; box-shadow: 0 0 0 3px rgba(42, 79, 216, 0.22); }
.ws-tools { grid-area: tools; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-block-end: 2px; }
/* The composer's icons: compact (40 px), the text box keeps the width. */
.ws-composer .ws-tool { inline-size: 40px; block-size: 40px; }
.ws-composer .ws-tool .ws-icon { inline-size: 20px; block-size: 20px; }
/* One send action in every mode (icon + "Send"): the same calm primary blue whether the words are
   an answer or a question (never a big green "Check answer"). */
.ws-send,
.ws-send[data-mode="answer"],
.ws-send[data-mode="ask"] {
  grid-area: send;
  min-block-size: 44px;
  min-inline-size: 44px;
  gap: 6px;
  padding-block: 6px;
  padding-inline: 12px 14px;
  border-radius: 12px;
  background: var(--ws-blue-ui);
  color: #fff;
  box-shadow: none;
  font-size: 0.95rem;
}
.ws-send:hover:not(:disabled) { background: var(--ws-blue-ui-deep); }
.ws-send .ws-icon { inline-size: 18px; block-size: 18px; }
.ws-send-label { white-space: nowrap; }
/* Busy: a readable label on a quiet fill (no faded white-on-pale). */
.ws-send:disabled { opacity: 1; background: var(--ws-lavender-2); color: var(--ws-blue-ui-deep); }
/* A composer icon whose area is open is filled; one that is not available here is dashed and
   faded (and says so in its label), never only a colour. */
.ws-tool[aria-expanded="true"] { background: var(--ws-blue-ui); color: #fff; box-shadow: 0 0 0 3px var(--ws-lavender-2); }
.ws-tool[aria-disabled="true"] { opacity: 0.6; background: #fff; border: 2px dashed var(--ws-grey); }

/* The microphone shows the conversation state (the placeholder says it in words): a pulsing ring
   while listening, Nova's violet with a wave mark while she speaks, gold dots while thinking, an
   outlined pause mark when paused. Colours and shadows only: its size never changes. */
.ws-mic { position: relative; }
.ws-mic::after { position: absolute; inset-block-end: -2px; inset-inline-end: -2px; font-size: 0.7rem; font-weight: 800; line-height: 1; }
.ws-mic[data-state="listening"] { background: var(--ws-blue); color: #fff; box-shadow: 0 0 0 4px rgba(0, 114, 178, 0.25); animation: ws-ring 1.6s ease-in-out infinite; }
.ws-mic[data-state="speaking"] { background: var(--ws-violet); color: #fff; box-shadow: 0 0 0 4px rgba(91, 63, 214, 0.22); }
.ws-mic[data-state="speaking"]::after { content: "\2248"; color: var(--ws-violet-deep); }
.ws-mic[data-state="thinking"] { background: var(--ws-gold); color: var(--ws-ink); }
.ws-mic[data-state="thinking"]::after { content: "\2026"; color: var(--ws-gold-ink); }
.ws-mic[data-state="paused"] { background: #fff; color: var(--ws-blue-ui-deep); box-shadow: inset 0 0 0 2px var(--ws-blue-ui); }
.ws-mic[data-state="paused"]::after { content: "\2016"; color: var(--ws-blue-ui-deep); }
@keyframes ws-ring { 50% { box-shadow: 0 0 0 7px rgba(0, 114, 178, 0.12); } }
/* The constant "microphone on" dot: shown exactly while the tracks are open, whatever the state
   colour (also while Nova speaks or thinks); its label says it in words. */
.ws-mic[data-capture="on"]::before {
  content: "";
  position: absolute;
  inset-block-start: 2px;
  inset-inline-end: 2px;
  inline-size: 10px;
  block-size: 10px;
  border-radius: 50%;
  background: var(--ws-vermillion);
  box-shadow: 0 0 0 2px #fff;
}
/* End: its place is always kept where voice exists, so the row never reflows when voice starts. */
.ws-mic-end { background: #fff; color: var(--ws-vermillion); border: 2px solid var(--ws-line); }
.ws-mic-end[data-shown="false"] { visibility: hidden; }
/* Nova speaking or thinking: the text box's border says so too (no size change). */
.ws-composer[data-conversation="listening"] .ws-input { border-color: var(--ws-blue); }
.ws-composer[data-conversation="speaking"] .ws-input { border-color: var(--ws-violet); }

.ws-modes { display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--ws-lavender); align-self: flex-start; }
.ws-seg { min-block-size: 36px; padding-inline: 14px; border: 0; border-radius: 999px; background: transparent; font-weight: 700; font-size: 0.88rem; cursor: pointer; }
.ws-seg[aria-pressed="true"] { background: #fff; color: var(--ws-blue-ui-deep); box-shadow: 0 2px 6px rgba(18, 32, 79, 0.15); }
/* 36 px segment + 3 px pill padding gives a 42 px hit row; extend the hit area to 44 px. */
.ws-seg { position: relative; }
.ws-seg::after { content: ""; position: absolute; inset: -4px 0; }

.ws-working { padding: 8px 10px; border-radius: var(--ws-radius-sm); background: #fff; border: 1px solid var(--ws-line); }
.ws-working-input { inline-size: 100%; min-block-size: 88px; padding: 8px; border-radius: 12px; border: 2px solid var(--ws-line); font: inherit; font-family: "Noto Sans Malayalam", ui-monospace, "SF Mono", Menlo, Consolas, monospace; resize: vertical; }
.ws-steps { margin: 6px 0; padding-inline-start: 0; list-style: none; }
.ws-steps li { padding-block: 2px; }
.ws-steps li[data-status="correct"]::before { content: "\2713 "; color: var(--ws-green-ink); font-weight: 800; }
.ws-steps li[data-status="wrong"]::before { content: "\25B2 "; color: var(--ws-orange-ink); }
.ws-steps li[data-status="unchecked"]::before { content: "\25CB "; color: var(--ws-grey); }

/* The compact help row in the dock: one line that scrolls sideways when the words are long (a
   longer translation never adds a row). */
.ws-actions {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  padding-block: 2px;
}
.ws-actions::-webkit-scrollbar { display: none; }
.ws-actions .ws-btn { flex: none; padding-inline: 12px; font-size: 0.88rem; white-space: nowrap; border-radius: 999px; }
.ws-actions .ws-btn-primary { order: -1; }

/* One quiet line in the conversation (what happens to the child's voice), never a panel. */
.ws-sysline {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  align-self: center;
  max-inline-size: 40rem;
  margin: 0;
  padding-block: 4px;
  padding-inline: 10px;
  border-radius: 999px;
  background: var(--ws-lavender);
  color: var(--ws-ink-soft);
  font-size: 0.78rem;
}
.ws-sysline .ws-icon { inline-size: 16px; block-size: 16px; margin-block-start: 1px; color: var(--ws-blue-ui); }
/* The older text "Edit" pill (and the confirm tick, which shares it): dark words on white, readable
   on the light student bubble (RC5: it was white on the old blue, invisible on lavender). */
.ws-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-block-size: var(--ws-touch);
  margin-block-start: 2px;
  padding-inline: 10px;
  border: 1px solid var(--ws-lavender-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ws-blue-ui-deep);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.ws-edit .ws-icon { inline-size: 16px; block-size: 16px; }
/* A low-confidence spoken answer: "Check this answer?" and a tick, under the bubble. */
.ws-confirm-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; flex: 1 0 100%; margin-block: 2px 0; color: var(--ws-ink-soft); font-size: 0.85rem; font-weight: 700; }
.ws-confirm { min-inline-size: var(--ws-touch); justify-content: center; font-size: 1rem; background: #fff; color: var(--ws-blue-ui-deep); }
.ws-student[data-pending="true"] { border: 0; }
.ws-student[data-pending="true"] > .ws-bubble,
.ws-student[data-pending="true"] > p:not([class]) { outline: 2px dashed var(--ws-grey); outline-offset: -2px; }
.ws-notice-voice { font-weight: 600; }

/* ---------- The conversation: fills the column and scrolls on its own ---------- */

.ws-main > .ws-conv { position: relative; display: flex; flex-direction: column; min-block-size: 6rem; }
.ws-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-block-size: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-block: 4px 12px;
  padding-inline: 2px;
  scroll-padding-block: 8px;
}
/* A short conversation sits at the foot, so the newest message is right above the controls. */
.ws-log > :first-child { margin-block-start: auto; }
/* Scrolled away from the end: a small button back to the newest message. */
.ws-jump {
  position: absolute;
  z-index: 2;
  inset-block-end: 10px;
  inset-inline: 0;
  inline-size: fit-content;
  margin-inline: auto;
  border-radius: 999px;
  font-size: 0.9rem;
}
.ws-msg {
  max-inline-size: 46rem;
  padding: 12px 14px;
  border-radius: var(--ws-radius-sm);
  background: var(--ws-card);
  border: 1px solid var(--ws-line);
  box-shadow: var(--ws-shadow);
  overflow-wrap: anywhere;
}
.ws-msg p { margin-block: 0 6px; }
.ws-msg p:last-child { margin-block-end: 0; }
.ws-tutor { align-self: flex-start; border-start-start-radius: 6px; }
/* RC5 U: the child's message is a full-width row aligned to the end edge (it mirrors itself in
   right-to-left): the bubble shrink-wraps its words, the small Edit icon (spoken messages) sits
   beside it, outside, and the confirm row (if any) goes under it. No "You" heading. */
.ws-student {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 2px 4px;
  align-self: stretch;
  inline-size: 100%;
  max-inline-size: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ws-ink);
}
.ws-student > .ws-author { display: none; }
/* The bubble: as wide as its words, never wider than 78% (88% on phones); long words, several lines
   and any script wrap inside it, never sideways off the screen. Dark navy on a light lavender. */
.ws-student > .ws-bubble,
.ws-student > p:not([class]) {
  flex: 0 1 auto;
  inline-size: fit-content;
  max-inline-size: 78%;
  margin: 0;
  padding-block: 8px;
  padding-inline: 13px;
  border-radius: 16px;
  border-end-end-radius: 5px; /* the tail corner, on the end side (mirrors in RTL) */
  background: #ecebf7;
  color: #1b1f3b;
  line-height: 1.4;
  text-align: start;
  unicode-bidi: plaintext;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
}
@media (max-width: 599px) {
  .ws-student > .ws-bubble,
  .ws-student > p:not([class]) { max-inline-size: 88%; }
}
/* Edit what Nova heard: a small, quiet icon beside the bubble (on its inner side), shown on hover or
   keyboard focus, always on touch screens; it reserves only its own 28 px. */
.ws-msg-edit {
  order: -1;
  align-self: center;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  inline-size: 28px;
  block-size: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ws-ink-soft);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.ws-msg-edit .ws-icon, .ws-msg-edit svg { inline-size: 16px; block-size: 16px; }
.ws-student:hover .ws-msg-edit,
.ws-student:focus-within .ws-msg-edit,
.ws-msg-edit:focus-visible { opacity: 1; }
.ws-msg-edit:hover { background: var(--ws-lavender); color: var(--ws-blue-ui-deep); }
.ws .ws-msg-edit:focus-visible { outline: 2px solid var(--ws-blue-ui); outline-offset: 1px; }
@media (hover: none) {
  .ws-msg-edit { opacity: 1; }
}
/* On a touch screen the hit area reaches 44 px without drawing anything bigger. */
@media (pointer: coarse) {
  .ws-msg-edit::after { content: ""; position: absolute; inset: -8px; }
}
.ws-author { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 700; color: var(--ws-ink-soft); }
.ws-author-name { color: var(--ws-ink); }
.ws-avatar { inline-size: 26px; block-size: 26px; border-radius: 50%; background: #2c1f5e; flex: none; }
.ws-msg-title { margin-block: 2px 6px; font-size: 1.1rem; line-height: 1.25; }

.ws-question { border: 2px solid var(--ws-blue-ui); }
.ws-question > p:not(.ws-author) { font-size: 1.15rem; font-weight: 700; }
.ws-correct { border-inline-start: 6px solid var(--ws-green); }
.ws-correct .ws-msg-title { color: var(--ws-green-ink); }
.ws-correct .ws-msg-title::before { content: "\2713  "; }
.ws-incorrect { border-inline-start: 6px solid var(--ws-orange); }
.ws-incorrect .ws-msg-title { color: var(--ws-orange-ink); }
.ws-incorrect .ws-msg-title::before { content: "\21BB  "; }
.ws-hint { border-inline-start: 6px solid var(--ws-gold); }
.ws-error { border-inline-start: 6px solid var(--ws-vermillion); }
.ws-badge-msg, .ws-badge { font-weight: 800; }
.ws-star { font-weight: 800; color: var(--ws-gold-ink); }
.ws-star::before { content: "\2605 "; color: var(--ws-gold); }
.ws-teach { margin-block-start: 8px; padding: 10px 12px; border-radius: var(--ws-radius-sm); background: #fff7e3; }
.ws-teach-title { font-weight: 800; }

.ws-typing { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--ws-ink-soft); }
.ws-dots { inline-size: 28px; block-size: 8px; background: radial-gradient(circle, var(--ws-blue-ui) 40%, transparent 42%) 0 0 / 10px 8px repeat-x; animation: ws-pulse 1.2s ease-in-out infinite; }
@keyframes ws-pulse { 50% { opacity: 0.35; } }

/* Labels: provenance and how it was checked. Text always, colour second. */
.ws-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 8px; }
.ws-chip { display: inline-block; padding-block: 2px; padding-inline: 8px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; border: 1px solid currentColor; }
.ws-chip-aligned { color: var(--ws-blue); }
.ws-chip-aligned::before { content: "\2713 "; }
.ws-chip-general { color: var(--ws-ink-soft); }
.ws-chip-check { color: var(--ws-green-ink); }

.ws-help { margin-block: 4px; font-size: 0.85rem; color: var(--ws-ink-soft); }
.ws-error-text { color: #8a2c00; font-weight: 700; }

/* ---------- Each question's thread: answers, verdicts, hints, all attached to it ---------- */

.ws-q-text { font-size: 1.15rem; font-weight: 700; }
.ws-thread { display: flex; flex-direction: column; gap: 8px; margin-block-start: 8px; }
.ws-thread:empty { display: none; }
.ws-thread > .ws-msg { max-inline-size: 100%; box-shadow: none; }
.ws-photo { border-inline-start: 6px solid var(--ws-blue); }
.ws-next-steps .ws-btn { flex: 1 1 10rem; }

/* "Hear Nova": one tap where the browser blocks speech until the page is used. */
.ws-hear-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ---------- The study timer (public/lesson-timer.js): counts up, never down ---------- */

.ws-timer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding-block: 6px;
  padding-inline: 12px;
  border-radius: var(--ws-radius-sm);
  background: var(--ws-card);
  border: 1px solid var(--ws-line);
}
.ws-timer-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 0; flex: 1 1 auto; min-inline-size: 0; }
.ws-timer-name { font-weight: 700; color: var(--ws-ink-soft); font-size: 0.9rem; }
.ws-timer-value { font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.ws-timer-state { font-size: 0.8rem; font-weight: 700; color: var(--ws-ink-soft); }
.ws-timer[data-state="paused"] .ws-timer-state::before { content: "\2016 "; }
.ws-timer-btn { min-block-size: var(--ws-touch); padding-inline: 12px; flex: none; }
.ws-timer-note { margin: 0; flex: 1 1 100%; font-size: 0.74rem; color: var(--ws-ink-soft); }

/* ---------- Chapter progress (left column) ---------- */

.ws-chapter[data-active="true"] { border: 2px solid var(--ws-blue-ui); }
.ws-chapter-pick {
  display: block;
  inline-size: 100%;
  min-block-size: var(--ws-touch);
  padding: 4px 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font-weight: 800;
  text-align: start;
  cursor: pointer;
}
.ws-chapter-pick:hover { background: var(--ws-lavender); }
.ws-chapter-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 0.8rem; color: var(--ws-ink-soft); }
.ws-chapter-active { padding-inline: 8px; border-radius: 999px; background: var(--ws-lavender); color: var(--ws-blue-ui-deep); font-weight: 700; }
.ws-chapter-active::before { content: "\25B6 "; }
[dir="rtl"] .ws-chapter-active::before { content: "\25C0 "; }
.ws-meter { inline-size: 48px; block-size: 8px; border-radius: 999px; background: var(--ws-line); position: relative; overflow: hidden; }
.ws-meter::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; inline-size: 0; background: var(--ws-green); }
.ws-meter[data-filled="1"]::after { inline-size: 25%; }
.ws-meter[data-filled="2"]::after { inline-size: 50%; }
.ws-meter[data-filled="3"]::after { inline-size: 75%; }
.ws-meter[data-filled="4"]::after { inline-size: 100%; }

/* The chosen chapter's topics (right column on wide screens, in the drawer otherwise). */
.ws-topics-box { display: flex; flex-direction: column; }
.ws-topics-title { margin: 0; font-size: 1.1rem; }

/* An answer method that cannot work here: an explanation, no controls that look usable. */
.ws-off { margin: 0; padding-block: 10px; padding-inline: 12px; border-radius: var(--ws-radius-sm); background: var(--ws-lavender); font-weight: 600; color: var(--ws-ink); }

/* ---------- Sidebar: Chapter Topics (a drawer on phones and tablets) ---------- */

.ws-panel {
  position: fixed;
  inset-block: 0;
  inset-inline-end: 0;
  z-index: 20;
  inline-size: min(88vw, 380px);
  padding: 12px;
  overflow-y: auto;
  background: #f8f9ff;
  box-shadow: -12px 0 32px rgba(18, 32, 79, 0.3);
  transform: translateX(105%);
  visibility: hidden;
  transition: transform 0.22s ease, visibility 0s linear 0.22s;
}
[dir="rtl"] .ws-panel, .ws[dir="rtl"] .ws-panel { transform: translateX(-105%); }
.ws-panel[data-open="true"] { transform: none; visibility: visible; transition: transform 0.22s ease; }
.ws-scrim { position: fixed; inset: 0; z-index: 19; background: rgba(12, 18, 50, 0.45); }
.ws-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ws-panel-title { margin: 0; font-size: 1.15rem; }
.ws-panel-sub { margin: 14px 0 0; font-size: 1rem; }
.ws-topics-chapter { margin: 8px 0 4px; font-weight: 700; color: var(--ws-ink-soft); font-size: 0.9rem; }

.ws-topics { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.ws-topic {
  display: flex;
  align-items: center;
  gap: 8px;
  inline-size: 100%;
  min-block-size: var(--ws-touch);
  padding-block: 6px;
  padding-inline: 8px;
  border: 0;
  border-block-end: 1px solid var(--ws-line);
  border-radius: 10px;
  background: transparent;
  text-align: start;
  cursor: pointer;
}
.ws-topic::before { content: "\25CB"; inline-size: 1.4em; flex: none; text-align: center; color: var(--ws-grey); font-weight: 800; }
.ws-topic[data-mark="done"]::before { content: "\2713"; color: #fff; background: var(--ws-green); border-radius: 50%; }
.ws-topic[data-mark="learning"]::before { content: "\25D0"; color: var(--ws-blue); }
.ws-topic[data-mark="weak"]::before { content: "\25B2"; color: var(--ws-orange-ink); }
.ws-topic[data-mark="current"] { background: var(--ws-lavender); color: var(--ws-blue-ui-deep); font-weight: 800; }
.ws-topic[data-mark="current"]::before { content: "\25B6"; color: var(--ws-blue-ui); }
[dir="rtl"] .ws-topic[data-mark="current"]::before { content: "\25C0"; }
.ws-topic-num { flex: none; color: var(--ws-ink-soft); font-variant-numeric: tabular-nums; }
.ws-topic-title { min-inline-size: 0; }

.ws-side-tools { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ws-side-tool {
  display: flex;
  align-items: center;
  gap: 10px;
  inline-size: 100%;
  min-block-size: 52px;
  padding: 8px 10px;
  border: 1px solid var(--ws-line);
  border-radius: 12px;
  background: #fff;
  text-align: start;
  cursor: pointer;
}
.ws-side-tool .ws-icon { color: var(--ws-blue-ui); }
.ws-side-text { display: flex; flex-direction: column; min-inline-size: 0; }
.ws-side-name { font-weight: 800; }
.ws-side-help { font-size: 0.8rem; color: var(--ws-ink-soft); }

.ws-chapters { display: flex; flex-direction: column; gap: 10px; margin-block-start: 8px; }
.ws-chapter, .ws-weak {
  padding: 10px;
  border-radius: var(--ws-radius-sm);
  background: #fff;
  border: 1px solid var(--ws-line);
}
.ws-weak { margin-block-start: 8px; border: 2px solid var(--ws-orange); background: #fff8ea; display: flex; flex-direction: column; gap: 6px; }
.ws-chapter-title { margin-block: 0 6px; font-size: 0.95rem; color: var(--ws-blue-ui-deep); }
.ws-concepts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ws-concept {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  inline-size: 100%;
  min-block-size: var(--ws-touch);
  padding-block: 6px;
  padding-inline: 12px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: var(--ws-lavender);
  text-align: start;
  cursor: pointer;
}
.ws-concept[aria-current="true"] { border-color: var(--ws-blue-ui); background: #fff; }
.ws-concept-title { font-weight: 700; min-inline-size: 0; }
.ws-concept-compact { inline-size: auto; }

.ws-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  padding-block: 1px;
  padding-inline: 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  border: 1.5px solid currentColor;
  background: #fff;
}
.ws-status[data-status="new"] { color: var(--ws-grey); }
.ws-status[data-status="new"]::before { content: "\25CB"; }
.ws-status[data-status="learning"] { color: var(--ws-blue); }
.ws-status[data-status="learning"]::before { content: "\25D0"; }
.ws-status[data-status="weak"] { color: var(--ws-orange-ink); background: #fff1cf; }
.ws-status[data-status="weak"]::before { content: "\25B2"; }
.ws-status[data-status="mastered"] { color: var(--ws-green-ink); }
.ws-status[data-status="mastered"]::before { content: "\2713"; }

/* On phones and tablets, while a question is open, Nova's strip keeps to her name, state and AI
   label: the question and its answer controls come first. */
@media (max-width: 1023px) {
  .ws[data-question="open"] .nova-caption, .ws[data-question="open"] .nova-actions { display: none; }
  /* The writing, photo or working sheet open: Nova keeps to her strip's first line too. */
  .ws:not([data-expanded="none"]) .nova-caption, .ws:not([data-expanded="none"]) .nova-actions { display: none; }
  /* The timer stays one compact line under Nova. */
  .ws-main > .ws-timer { padding-block: 2px; gap: 2px 8px; }
  .ws-main > .ws-timer .ws-timer-btn { min-block-size: 36px; position: relative; }
  .ws-main > .ws-timer .ws-timer-btn::after { content: ""; position: absolute; inset: -4px 0; } /* a 44 px hit area */
  .ws-main > .ws-timer .ws-timer-note { font-size: 0.7rem; }
}

/* ---------- Small phones (up to 400 px) ---------- */

@media (max-width: 400px) {
  .ws { font-size: 16px; }
  .ws-brand-name { font-size: 1rem; }
  .ws-logo { inline-size: 32px; block-size: 32px; }
  .ws-nav-btn { padding-inline: 4px; }
  .ws-qcard { grid-template-columns: 32px minmax(0, 1fr); padding-block: 6px; padding-inline: 8px; }
  .ws-qcard-avatar { inline-size: 32px; block-size: 32px; }
  .ws-qcard-text { font-size: 1.1rem; }
  .ws-notice { font-size: 0.72rem; }
  .ws-body { padding: 6px; }
  .ws-composer { padding: 6px; }
}

/* ---------- Tablet ---------- */

@media (min-width: 640px) {
  .ws { font-size: 18px; }
  .ws-brand-tag { display: block; }
  .ws-ai { display: inline-flex; }
  .ws-drawer-btn span:first-of-type { position: static; inline-size: auto; block-size: auto; clip-path: none; overflow: visible; }
  .ws-nav-label { position: static; inline-size: auto; block-size: auto; clip-path: none; overflow: visible; }
  .ws-nav-btn { padding-inline: 12px; }
  .ws-body { padding: 12px 16px; max-inline-size: 56rem; inline-size: 100%; margin-inline: auto; }
  /* One row: the icons beside the text box, then Send. */
  .ws-inputrow { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "tools input send"; }
  .ws-tools { flex-wrap: nowrap; }
  .ws-options { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .ws-qcard { grid-template-columns: 48px minmax(0, 1fr); padding-block: 10px; padding-inline: 12px; }
  .ws-qcard-avatar { inline-size: 48px; block-size: 48px; }
  .ws-qcard-intro { display: block; }
  .ws-pad-host .wp { flex-direction: row; align-items: stretch; }
  .ws-pad-host .wp-bar { flex-direction: column; flex-wrap: nowrap; }
  .ws-pad-host .wp-canvas { flex: 1 1 auto; min-inline-size: 0; }
}

/* ---------- Desktop: three columns, as the reference ---------- */

@media (min-width: 1024px) {
  .ws-top { padding-block: 10px; padding-inline: 24px; }
  .ws-logo { inline-size: 46px; block-size: 46px; }
  .ws-brand-name { font-size: 1.5rem; }
  .ws-brand-tag { font-size: 0.95rem; }
  .ws-nav { gap: 8px; margin-inline-end: 8px; }
  .ws-drawer-btn, .ws-panel-close, .ws-scrim { display: none !important; }
  .ws-body {
    /* Founder layout: chapters | the lesson | the timer, Nova and the chapter's topics. The DOM
       keeps the lesson first (reading order); the columns are placed explicitly. */
    grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.8fr) minmax(270px, 0.85fr);
    gap: 18px;
    padding-block: 18px;
    padding-inline: 24px;
    max-inline-size: 110rem;
    align-items: stretch;
  }
  .ws-panel { grid-column: 1; grid-row: 1; }
  .ws-main { grid-column: 2; grid-row: 1; }
  .ws-stage { grid-column: 3; grid-row: 1; }
  /* The side columns scroll on their own; the lesson column keeps its composer at the foot. */
  .ws-stage, .ws-panel { position: relative; inset: auto; max-block-size: 100%; overflow-y: auto; }
  .ws-panel {
    transform: none;
    visibility: visible;
    transition: none;
    inline-size: auto;
    padding: 14px;
    border-radius: var(--ws-radius);
    background: var(--ws-card);
    box-shadow: var(--ws-shadow);
  }
  [dir="rtl"] .ws-panel, .ws[dir="rtl"] .ws-panel { transform: none; }
  .ws-panel-head { padding-block-end: 8px; border-block-end: 1px solid var(--ws-line); }
  .ws-qcard-text { font-size: 1.3rem; }
}

/* Short phones in landscape: keep the question and the answer both on screen. */
@media (max-height: 480px) {
  .ws-notice { display: none; }
  .ws-pad-host .wp-canvas { height: 60vh; }
  .ws-main > .ws-conv { min-block-size: 4.5rem; }
  .ws-qcard { max-block-size: 26dvh; }
}

@media (prefers-reduced-motion: reduce) {
  .ws *, .ws *::before, .ws *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
  .ws-status, .ws-chip, .ws-option, .ws-concept, .ws-tool, .ws-topic, .ws-msg-edit, .ws-student > .ws-bubble { border: 1px solid CanvasText; }
}

/* RC6 section 6: the one-tap upload choice above the text box ("Check my answer" / "Learn from
   this page"); wraps for longer translations, large touch targets, logical properties only. */
.ws-upload-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block-end: 8px; }
.ws-upload-choice[hidden] { display: none; }
.ws-upload-choice .ws-btn { min-block-size: 44px; }
.ws-upload-ask { flex-basis: 100%; color: var(--ws-ink-soft); font-size: 0.95rem; }
/* What was read from a page: set apart from Nova's own words. */
.ws-page-reading { border-inline-start: 4px solid var(--ws-line); background: var(--ws-lavender); }
/* RC6 section 1: the "Saved question" chip in the context header. */
.ws-parked { min-block-size: 36px; padding-inline: 12px; border: 1px solid var(--ws-violet); color: var(--ws-violet-deep); background: var(--ws-card); border-radius: 999px; cursor: pointer; font: inherit; }
.ws-parked[hidden] { display: none; }
.ws-parked:focus-visible { outline: 3px solid var(--ws-blue-ui); outline-offset: 2px; }
/* RC7 section 1: a restored lesson (earlier turns, quieter), "Show earlier messages", and the
   calm notice when the lesson is open on another device. Logical properties only (RTL-ready). */
.ws-restored { opacity: 0.92; }
.ws-earlier { align-self: center; margin-block: 4px 8px; }
.ws-earlier[hidden] { display: none; }
.ws-owner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block-end: 8px; padding-block: 8px; padding-inline: 12px; border-radius: var(--ws-radius-sm); background: var(--ws-lavender); border: 2px solid var(--ws-lavender-2); color: var(--ws-ink); }
.ws-owner[hidden] { display: none; }
.ws-owner-text { flex: 1 1 12em; font-weight: 700; overflow-wrap: anywhere; }
.ws-owner .ws-btn { min-block-size: var(--ws-touch); }
/* RC7B: the whiteboard's help mode (wraps on a 360 px phone; the pressed one is marked by more than colour). */
.ws-wb-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-block-end: 6px; }
.ws-wb-modes[hidden] { display: none; }
.ws-wb-modes-label { flex-basis: 100%; font-size: 0.85rem; color: var(--ws-ink-soft); }
.ws-wb-mode { min-block-size: var(--ws-touch); overflow-wrap: anywhere; }
.ws-wb-mode[aria-pressed="true"] { background: var(--ws-blue-ui); color: #fff; border-color: var(--ws-blue-ui-deep); font-weight: 800; }
.ws-wb-mode[aria-pressed="true"]::before { content: "\2713 "; }
/* RC7 (failure 4.6): the child's own written answer stays visible in their message. */
.ws-ink { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ws-ink-img { max-inline-size: min(100%, 320px); max-block-size: 200px; border-radius: var(--ws-radius-sm); border: 1px solid var(--ws-line); background: #fff; }
