/* HelioLearn Classroom — styles. Coral/cream theme matching heliolearn.com. */
:root {
  --coral: #ff6b4a;
  --coral-strong: #c4472b;   /* white text on this passes WCAG AA */
  --coral-soft: #fff0ea;
  --coral-line: #ffc9b8;
  --ink: #203f37;
  --ink-2: #3f5d54;
  --muted: #5f746a;
  --bg: #fffcf6;
  --card: #ffffff;
  --paper: #f6f1e6;
  --line: #e8e4d5;
  --line-2: #d8e0d6;
  --focus: #c06820;
  --ok: #146c43;
  --ok-bg: #e5f4ea;
  --bad: #b42318;
  --bad-bg: #fdecea;
  --amber-bg: #fdf3dc;
  --sky-bg: #eaf3fb;
  --radius: 16px;
  --topbar: 60px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 12px 30px rgba(23, 59, 37, .08);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; opacity: .45; }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 100; padding: 10px 16px; background: #fff; border-radius: 10px; box-shadow: var(--shadow); }
.skip-link:focus { top: 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.eyebrow { text-transform: uppercase; letter-spacing: .13em; font-size: 12px; font-weight: 600; color: #527764; margin-bottom: 8px; }

/* ---------- icons ---------- */
.icon { display: inline-flex; width: 22px; height: 22px; flex: none; }
.icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-xl { width: 48px; height: 48px; color: var(--coral); }

/* ---------- buttons ---------- */
.btn {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff;
  font-size: 15px; font-weight: 500; line-height: 1.2; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover:not(:disabled) { background: var(--coral-soft); border-color: var(--coral-line); }
.btn.primary { background: var(--coral-strong); border-color: var(--coral-strong); color: #fff; }
.btn.primary:hover:not(:disabled) { background: #a93a21; border-color: #a93a21; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover:not(:disabled) { background: var(--coral-soft); }
.btn.small { min-height: 40px; padding: 6px 12px; font-size: 14px; }
.btn[aria-pressed="true"], .btn[aria-expanded="true"] { background: var(--coral-soft); border-color: var(--coral); color: #8a2f19; }
.icon-btn {
  width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; border: 1px solid transparent; background: transparent;
}
.icon-btn:hover:not(:disabled) { background: var(--coral-soft); }
.icon-btn[aria-pressed="true"] { background: var(--coral-soft); border-color: var(--coral); color: #8a2f19; }
.icon-btn.danger:hover:not(:disabled), .tool.danger:hover:not(:disabled) { background: var(--bad-bg); color: var(--bad); }
.small-icon { width: 36px; height: 36px; }

/* ---------- top bar ---------- */
.topbar {
  height: var(--topbar); flex: none; display: flex; align-items: center; gap: 16px;
  padding: 0 12px 0 16px; background: #fff; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 19px; letter-spacing: -.03em; white-space: nowrap; }
.brand strong { font-weight: 600; color: var(--coral-strong); }
.brand-mark { position: relative; width: 32px; height: 32px; border-radius: 9px; background: var(--coral); flex: none; overflow: hidden; }
.brand-mark::before { content: ""; position: absolute; left: 50%; top: 7px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: #f6d763; }
.brand-mark::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 6px; height: 4px; border-radius: 4px; background: #fff; opacity: .9; }
.tabs { display: flex; gap: 4px; padding: 4px; margin: 0 auto; background: var(--paper); border-radius: 14px; }
.tab {
  min-height: 40px; min-width: 96px; padding: 6px 16px; border: 0; border-radius: 10px; background: transparent;
  font-size: 15px; font-weight: 500; color: var(--ink-2);
}
.tab:hover { color: var(--ink); background: #ffffffa0; }
.tab[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(32, 63, 55, .14); }
.tab[aria-selected="true"]::after { content: ""; display: block; height: 3px; margin: 2px 12px -4px; border-radius: 3px; background: var(--coral); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.toggle .icon { width: 18px; height: 18px; }
body[data-mode="board"] #annotate-toggle { visibility: hidden; }
.timer-chip {
  min-height: 36px; padding: 4px 12px; border-radius: 99px; border: 1px solid var(--coral-line);
  background: var(--coral-soft); color: #8a2f19; font-variant-numeric: tabular-nums; font-weight: 600;
}
.timer-chip.is-done { background: var(--coral-strong); color: #fff; }

/* ---------- shell ---------- */
.shell { flex: 1; min-height: 0; display: flex; }
.stage { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; outline: none; }
.panel { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }

/* ---------- tool rail ---------- */
.rail {
  width: 116px; flex: none; overflow-y: auto; overflow-x: hidden; background: #fff; border-left: 1px solid var(--line);
  padding: 10px 8px 16px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin;
}
.rail-group { display: grid; grid-template-columns: repeat(2, 46px); gap: 6px; justify-content: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.rail-group:last-child { border-bottom: 0; }
.tool {
  width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--ink);
  transition: background .12s, border-color .12s;
}
.tool:hover:not(:disabled) { background: var(--paper); }
.tool[aria-pressed="true"] { background: var(--coral-soft); border-color: var(--coral); color: #8a2f19; }
body:not([data-mode="board"]) .board-only { display: none !important; }
body.is-surface-off .tools .tool:not([data-tool="laser"]) { opacity: .75; }
.colors { grid-template-columns: repeat(3, 30px); gap: 5px; }
.swatch {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-2);
  padding: 0; position: relative;
}
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px #fff, 0 0 0 5px var(--ink); }
.swatch.custom { overflow: hidden; cursor: pointer; background: conic-gradient(#ff6b4a, #f59e0b, #16a34a, #2563eb, #7c3aed, #ff6b4a); display: block; }
.swatch.custom input { position: absolute; inset: -6px; width: 44px; height: 44px; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.swatch.custom:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.swatch.custom.is-active { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px #fff, 0 0 0 5px var(--ink); }
.width-btn { width: 46px; height: 40px; border-radius: 12px; border: 1px solid transparent; background: transparent; display: inline-flex; align-items: center; justify-content: center; }
.width-btn:hover { background: var(--paper); }
.width-btn[aria-pressed="true"] { background: var(--coral-soft); border-color: var(--coral); }
.dot { display: block; border-radius: 50%; background: currentColor; }
.dot.w1 { width: 4px; height: 4px; } .dot.w2 { width: 8px; height: 8px; } .dot.w3 { width: 13px; height: 13px; } .dot.w4 { width: 20px; height: 20px; }
.font-size select { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; padding: 0 2px; text-align: center; font-size: 14px; }
.zoom-reset { font-size: 12px; font-weight: 600; grid-column: span 2; width: 100%; height: 36px; font-variant-numeric: tabular-nums; }

/* ---------- status / toast ---------- */
.status-card {
  margin: auto; max-width: 520px; padding: 32px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
}
.status-card[data-kind="error"] { border-color: #f3c2bb; }
.status-title { font-size: 20px; font-weight: 600; }
.status-detail { color: var(--muted); font-size: 14px; word-break: break-word; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--coral-soft); border-top-color: var(--coral); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; max-width: min(560px, calc(100vw - 32px));
  padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 15px; box-shadow: var(--shadow);
}
.inline-status { margin: 8px 16px 0; padding: 10px 14px; border-radius: 12px; background: var(--sky-bg); font-size: 15px; }
.inline-status[data-kind="error"] { background: var(--bad-bg); color: var(--bad); }

/* ---------- lesson: picker ---------- */
.panel-lesson { overflow: auto; }
.lesson-picker { margin: auto; width: min(760px, calc(100% - 32px)); padding: clamp(20px, 4vw, 40px); }
.picker-title { font-size: clamp(26px, 3vw, 36px); margin-bottom: 20px; }
.picker-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field-wide { grid-column: span 3; }
.field-full { grid-column: 1 / -1; }
.field select, .field input, .inline-field input, .inline-field select, .board-name, .url-form input, .page-input {
  min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; font-size: 16px; font-weight: 400; color: var(--ink);
}
.field select:focus-visible, .field input:focus-visible { border-color: var(--focus); }
.lesson-picker .row { margin-top: 16px; }

/* ---------- lesson: view ---------- */
.lesson-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.lesson-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px 0; flex-wrap: wrap; }
.crumb { color: var(--muted); font-size: 14px; padding-left: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slide-wrap { position: relative; flex: 1; min-height: 0; display: flex; gap: 12px; padding: 8px 16px; }
.slide-frame { position: relative; flex: 1; min-width: 0; }
.slide {
  position: absolute; inset: 0; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 22px;
  padding: clamp(20px, 3.4vw, 48px); box-shadow: var(--shadow);
}
.overlay-host { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.slide-frame .overlay-host { border-radius: 22px; }
body.is-annotating .overlay-host { pointer-events: auto; }
body.is-annotating .slide-frame .slide { box-shadow: 0 0 0 3px var(--coral-line), var(--shadow); }
.slide-kicker { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--coral-strong); margin-bottom: 12px; }
.slide-h1 { font-size: clamp(30px, 3.8vw, 54px); margin-bottom: 20px; }
.slide-h2 { font-size: clamp(26px, 2.8vw, 40px); margin-bottom: 16px; }
.slide-q { font-size: clamp(24px, 2.6vw, 38px); margin-bottom: 22px; font-weight: 600; line-height: 1.25; }
.big { font-size: clamp(19px, 1.75vw, 26px); line-height: 1.5; }
.bigger { font-size: clamp(22px, 2.2vw, 32px); line-height: 1.45; }
.slide-title-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(20px, 3vw, 40px); align-items: center; min-height: 100%; }
.slide-title-layout.no-video { grid-template-columns: 1fr; max-width: 900px; }
.lesson-outline { margin: 0; padding-left: 1.4em; font-size: clamp(18px, 1.6vw, 24px); display: grid; gap: 8px; }
.slide-video video { width: 100%; max-height: 60vh; border-radius: 16px; background: #111; display: block; }
.slide-video figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.goal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-bottom: 16px; }
.callout { padding: clamp(16px, 2vw, 26px); border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.callout h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin-bottom: 10px; }
.callout-goal { background: var(--coral-soft); border-color: var(--coral-line); }
.callout-recap { background: #edf4eb; border-color: #dbe4d9; }
.callout-example { background: var(--sky-bg); border-color: #cfe0ef; }
.callout-watch { background: var(--amber-bg); border-color: #ede0c0; }
.callout-discuss { background: #edf4eb; border-color: #dbe4d9; }
.callout-hint { background: var(--amber-bg); border-color: #ede0c0; margin-top: 16px; font-size: clamp(17px, 1.5vw, 22px); }
.callout-why { background: var(--ok-bg); border-color: #bfe3cc; margin-top: 16px; font-size: clamp(17px, 1.5vw, 22px); }
.callout-why h3 { color: var(--ok); text-transform: none; letter-spacing: 0; font-size: clamp(18px, 1.6vw, 24px); }
.step-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(18px, 2.5vw, 36px); align-items: center; }
.step-layout.no-figure { grid-template-columns: 1fr; max-width: 900px; }
.step-figure { background: #f8fafc; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.frame-svg { display: block; width: 100%; height: auto; max-height: 64vh; }
.vocab { display: grid; gap: 12px; }
.vocab-row { display: grid; grid-template-columns: minmax(140px, 0.6fr) 2fr; gap: 18px; padding: 14px 18px; border-radius: 14px; background: var(--paper); font-size: clamp(18px, 1.6vw, 24px); }
.vocab dt { font-weight: 700; color: var(--coral-strong); }
.options { display: grid; gap: 12px; margin-bottom: 18px; }
.option {
  display: flex; align-items: center; gap: 16px; width: 100%; min-height: 64px; text-align: left; padding: 12px 18px;
  border-radius: 16px; border: 2px solid var(--line-2); background: #fff; font-size: clamp(18px, 1.7vw, 26px);
  transition: border-color .12s, background .12s;
}
.option:hover { border-color: var(--coral-line); background: #fffaf7; }
.option[aria-pressed="true"] { border-color: var(--coral); background: var(--coral-soft); }
.option-letter { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--paper); font-weight: 700; font-size: 18px; }
.option-text { flex: 1; }
.option-mark { flex: none; font-size: 14px; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.option.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.option.is-correct .option-letter { background: var(--ok); color: #fff; }
.option.is-correct .option-mark { background: var(--ok); color: #fff; }
.option.is-wrong { border-color: var(--bad); background: var(--bad-bg); }
.option.is-wrong .option-mark { background: var(--bad); color: #fff; }
.teacher-notes {
  width: 300px; flex: none; overflow: auto; background: #fffdf8; border: 1px dashed #d9c7a0; border-radius: 18px; padding: 16px;
  font-size: 15px; display: flex; flex-direction: column; gap: 8px;
}
.teacher-notes h3 { font-size: 18px; }
.teacher-notes h4 { font-size: 14px; margin-top: 8px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.teacher-notes ol { margin: 0; padding-left: 1.3em; }
.note-strong { font-weight: 700; color: var(--ok); }
.drawer {
  position: absolute; top: 8px; right: 16px; bottom: 8px; width: min(380px, calc(100% - 32px)); z-index: 6; overflow: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 48px rgba(23, 59, 37, .18); padding: 10px;
}
.drawer-list, .drawer-list ol { list-style: none; margin: 0; padding: 0; }
.drawer-group-title { display: block; padding: 10px 10px 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.drawer-item { width: 100%; min-height: 40px; text-align: left; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; font-size: 15px; }
.drawer-item:hover { background: var(--paper); }
.drawer-item[aria-current="true"] { background: var(--coral-soft); color: #8a2f19; font-weight: 600; }
.lesson-nav { display: flex; align-items: center; gap: 14px; padding: 4px 16px 12px; }
.nav-btn { min-width: 112px; min-height: 48px; font-size: 16px; }
.progress { flex: 1; display: flex; align-items: center; gap: 12px; }
.progress progress { flex: 1; height: 8px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 8px; background: var(--paper); overflow: hidden; }
.progress progress::-webkit-progress-bar { background: var(--paper); border-radius: 8px; }
.progress progress::-webkit-progress-value { background: var(--coral); border-radius: 8px; }
.progress progress::-moz-progress-bar { background: var(--coral); border-radius: 8px; }
.progress-text { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; min-width: 64px; text-align: right; }

/* ---------- toolbars (board + pdf) ---------- */
.toolbar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: #fffdf9; }
.bar-sep { width: 1px; height: 28px; background: var(--line); margin: 0 4px; }
.inline-field { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.inline-field select { min-height: 40px; padding: 4px 8px; }
.inline-field input { width: 80px; min-height: 40px; padding: 4px 8px; }
.board-name { width: 170px; min-height: 40px; padding: 4px 10px; }
.save-state { font-size: 13px; color: var(--muted); margin-left: auto; }

/* ---------- whiteboard ---------- */
.board-host { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #fff; }
.wb-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.wb-canvas:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.wb-canvas.is-panning { cursor: grabbing !important; }
.wb-text-editor {
  position: absolute; z-index: 4; margin: 0; padding: 2px 4px; border: 1.5px dashed var(--coral); border-radius: 4px;
  background: rgba(255, 255, 255, .25); font-family: var(--font); resize: none; overflow: hidden; white-space: pre; outline: none;
  min-width: 60px;
}
.page-bar { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-top: 1px solid var(--line); background: #fffdf9; }
.page-label { font-size: 14px; color: var(--ink-2); min-width: 86px; text-align: center; font-variant-numeric: tabular-nums; }
.page-thumbs { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px; scrollbar-width: thin; }
.page-thumb {
  flex: none; width: 96px; height: 58px; padding: 0; border-radius: 8px; border: 2px solid var(--line-2); background: #fff; overflow: hidden; position: relative;
}
.page-thumb canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.page-thumb span { position: absolute; left: 4px; bottom: 2px; font-size: 11px; font-weight: 700; color: var(--ink-2); background: #ffffffd0; border-radius: 4px; padding: 0 4px; }
.page-thumb[aria-current="true"] { border-color: var(--coral); box-shadow: 0 0 0 2px var(--coral-soft); }

/* ---------- pdf ---------- */
.url-form { display: inline-flex; gap: 6px; align-items: center; }
.url-form input { width: 190px; min-height: 40px; padding: 4px 10px; }
.page-input { width: 66px; min-height: 40px; padding: 4px 8px; text-align: center; }
.zoom-label { min-width: 52px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.pdf-title { margin-left: auto; font-size: 14px; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-body { flex: 1; min-height: 0; display: flex; }
.pdf-thumbs { width: 150px; flex: none; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; border-right: 1px solid var(--line); background: #fffdf9; }
.pdf-thumb { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border-radius: 10px; border: 2px solid transparent; background: transparent; font-size: 13px; color: var(--ink-2); }
.pdf-thumb canvas { width: 110px; height: auto; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.pdf-thumb:hover { background: var(--paper); }
.pdf-thumb[aria-current="page"] { border-color: var(--coral); background: var(--coral-soft); }
.pdf-scroller { scrollbar-gutter: stable both-edges; position: relative; flex: 1; min-width: 0; overflow: auto; padding: 16px; display: flex; background: var(--paper); }
.pdf-page { position: relative; margin: auto; flex: none; background: #fff; box-shadow: 0 6px 24px rgba(23, 59, 37, .16); }
.pdf-page > canvas { display: block; width: 100%; height: 100%; }
.pdf-empty { margin: auto; max-width: 460px; padding: 36px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pdf-empty h2 { font-size: 24px; }
.panel-pdf.is-dragover .pdf-scroller { outline: 3px dashed var(--coral); outline-offset: -10px; background: var(--coral-soft); }

/* ---------- floating class tools ---------- */
.float-panel { position: absolute; right: 16px; bottom: 16px; z-index: 20; width: 300px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
#picker-panel { bottom: auto; top: 16px; }
.float-head { display: flex; align-items: center; justify-content: space-between; }
.float-head h2 { font-size: 18px; }
.seg { display: flex; padding: 4px; gap: 4px; background: var(--paper); border-radius: 12px; }
.seg-btn { flex: 1; min-height: 38px; border: 0; border-radius: 9px; background: transparent; font-size: 14px; font-weight: 500; }
.seg-btn[aria-checked="true"] { background: #fff; box-shadow: 0 1px 4px rgba(32, 63, 55, .14); }
.timer-display { font-size: 56px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; }
.timer-display.is-done { color: var(--coral-strong); }
.timer-display.flash { animation: flash 1s ease-in-out 3; }
@keyframes flash { 50% { opacity: .25; } }
.timer-msg { min-height: 1.5em; font-weight: 600; color: var(--coral-strong); text-align: center; }
.pick-result { font-size: 72px; font-weight: 700; text-align: center; color: var(--coral-strong); line-height: 1.1; font-variant-numeric: tabular-nums; }
.pick-result.roll { animation: pop .35s ease-out; }
@keyframes pop { from { transform: scale(.6); opacity: .2; } to { transform: scale(1); opacity: 1; } }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--coral-strong); }

/* ---------- fullscreen ---------- */
:fullscreen body, body:fullscreen { background: var(--bg); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .teacher-notes { width: 250px; }
  .board-bar .btn .icon { display: none; }
  .pdf-bar .btn .icon { display: none; }
}
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .rail {
    width: auto; height: auto; flex-direction: row; overflow-x: auto; overflow-y: hidden; border-left: 0; border-top: 1px solid var(--line);
    padding: 6px 8px; gap: 8px; align-items: center;
  }
  .rail-group { grid-template-columns: none; grid-auto-flow: column; grid-template-rows: repeat(2, 44px); grid-auto-columns: 44px; padding: 0 8px 0 0; border-bottom: 0; border-right: 1px solid var(--line); }
  .rail-group:last-child { border-right: 0; }
  .tool, .font-size select { width: 44px; height: 44px; }
  .colors { grid-template-rows: repeat(2, 30px); grid-auto-columns: 30px; align-content: center; }
  .width-btn { width: 44px; height: 44px; }
  .zoom-reset { grid-column: auto; grid-row: span 2; width: 52px; height: 100%; }
  .zoom { grid-auto-columns: auto; }
  .step-layout, .slide-title-layout { grid-template-columns: 1fr; }
  .teacher-notes { position: absolute; right: 16px; top: 8px; bottom: 8px; z-index: 5; width: min(320px, calc(100% - 32px)); box-shadow: var(--shadow); }
  .tab { min-width: 0; padding: 6px 12px; }
  .float-panel { right: 12px; }
}
@media (max-width: 640px) {
  .brand-name { display: none; }
  .topbar { gap: 8px; padding: 0 8px; }
  .toggle span:last-child { display: none; }
  .picker-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .lesson-bar .btn span:last-child { display: none; }
  .nav-btn { min-width: 0; }
  .vocab-row { grid-template-columns: 1fr; gap: 4px; }
  .pdf-title { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .spinner { border-top-color: var(--coral); }
}
@media (forced-colors: active) {
  .tool[aria-pressed="true"], .btn[aria-pressed="true"], .tab[aria-selected="true"] { outline: 2px solid Highlight; }
}

.slide-concept { max-width: 1000px; margin: 12px auto 0; }
.slide-concept video { max-height: 62vh; }

.pen-panel { width: 340px; }
.pen-panel meter { width: 100%; height: 12px; }
.pen-panel .inline-field { justify-content: space-between; }
.pen-panel .inline-field select { min-width: 170px; }

.slide-stream { position: relative; aspect-ratio: 16 / 9; background: #10231f; border-radius: 16px; overflow: hidden; max-height: 62vh; margin: 0 auto; }
.slide-stream-play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: none; }
.slide-stream img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide-stream iframe { width: 100%; height: 100%; border: 0; display: block; }
.slide-stream-icon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 72px; height: 72px; border-radius: 50%; background: rgba(255, 107, 74, .94); color: #fff; font-size: 28px; line-height: 72px; text-align: center; padding-left: 5px; }
.slide-stream-error { position: absolute; left: 12px; right: 12px; bottom: 10px; margin: 0; color: #fff; font-size: 14px; }
