/* Live coaching only. Lesson, schedule and XP behavior remains unchanged. */
body.teaching-mode-active {
  --teaching-mode-purple: var(--accent-violet);
  --teaching-mode-cyan: var(--accent-blue);
  background: radial-gradient(circle at 12% -8%,rgba(155,108,255,.17),transparent 31%),radial-gradient(circle at 88% -12%,rgba(69,200,255,.13),transparent 32%),#070a0f;
}
.teaching-mode-active .app-shell { display: block; min-height: 100vh; }
.teaching-mode-active .sidebar,.teaching-mode-active .topbar { display: none; }
.teaching-mode-active .workspace { width: 100%; max-width: none; margin: 0; padding: 24px max(24px,env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left)); }
.teaching-mode-active #view { max-width: 1440px; margin: 0 auto; }
/* Route specificity is intentional: later RPG, Light and typography rules own
   shared classes too. These rules must not change other Lesson surfaces. */
.teaching-mode-active #view .teaching-shell {
  min-width: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  color: var(--text-primary); font: 500 calc(1rem * var(--text-reading-scale))/1.6 var(--font-body);
  overflow-wrap: anywhere;
}
.teaching-mode-active #view .teaching-shell * { min-width: 0; box-sizing: border-box; }
.teaching-mode-active #view :is(h1,h2,h3) { font-family: var(--font-body); font-weight: 800; text-shadow: none; line-height: 1.2; letter-spacing: -.025em; }
.teaching-mode-active #view .teaching-header { margin: 0 0 24px; padding: 0 0 24px; border: 0; border-bottom: 1px solid var(--divider); border-radius: 0; background: none; box-shadow: none; }
.teaching-mode-active #view .teaching-header::before { display: none; }
.teaching-mode-active #view .teaching-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.teaching-mode-active #view .teaching-mode-label { display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: none; color: var(--text-primary); }
.teaching-mode-active #view .teaching-mode-label>span { display: grid; gap: 2px; }
.teaching-mode-active #view .teaching-mode-label strong { font: 800 calc(.875rem * var(--text-chrome-scale))/1.4 var(--font-body); }
.teaching-mode-active #view .teaching-mode-label small { color: var(--text-muted); font-size: calc(.75rem * var(--text-metadata-scale)); }
.teaching-mode-active #view .teaching-mode-label i { display: block; width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--accent-violet); }
.teaching-mode-active #view .teaching-exit { display: inline-flex; align-items: center; min-height: 48px; color: var(--text-secondary); font: 700 calc(.875rem * var(--text-chrome-scale))/1.4 var(--font-body); text-decoration: none; }
.teaching-mode-active #view .teaching-context { display: flex; align-items: flex-start; gap: 16px; margin-top: 16px; }
.teaching-mode-active #view .teaching-live-visual { flex: 0 0 40px; width: 40px; height: 40px; border: 0; border-radius: 0; background: url('assets/page-identity/live-class.png') center/contain no-repeat; box-shadow: none; }
.teaching-mode-active #view .teaching-context-copy { flex: 1 1 auto; }
.teaching-mode-active #view .teaching-context h1 { margin: 0; max-width: 50ch; font-size: calc(1.25rem * var(--text-display-scale)); }
.teaching-mode-active #view .teaching-context-copy>p:last-child { margin: 8px 0 0; font-size: calc(.875rem * var(--text-metadata-scale)); color: var(--text-muted); line-height: 1.5; }
.teaching-mode-active #view .teaching-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.teaching-mode-active #view .teaching-session-state { display: grid; justify-items: end; gap: 8px; flex: 0 1 260px; }
.teaching-mode-active #view .teaching-count { font: 700 calc(.875rem * var(--text-metadata-scale))/1.5 var(--font-body); color: var(--text-secondary); }
.teaching-mode-active #view .teaching-count b { color: inherit; }
.teaching-mode-active #view #teaching-mark-taught { background: var(--surface-secondary); color: var(--text-primary); border: 1px solid var(--border-primary); box-shadow: none; }
.teaching-mode-active #view .teaching-session-state small { max-width: 30ch; color: var(--text-muted); font-size: calc(.8125rem * var(--text-metadata-scale)); text-align: right; }
.teaching-mode-active #view .teaching-session-state small:empty { display: none; }
.teaching-mode-active #view .teaching-lesson-note { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px; margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--divider); color: var(--text-secondary); font-size: calc(.875rem * var(--text-reading-scale)); white-space: pre-line; }
.teaching-mode-active #view .teaching-lesson-note strong { color: var(--text-muted); }
.teaching-mode-active #view .teaching-stage { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,280px); align-items: start; gap: 32px; }
.teaching-mode-active #view .teaching-focus { min-width: 0; }
/* One useful Game surface; its children are open reading sections. */
.teaching-mode-active #view .teaching-game-card { position: relative; padding: 24px; border: 0; border-top: 3px solid var(--teaching-accent); border-radius: 0; background: var(--surface-primary); box-shadow: none; }
.teaching-mode-active #view .teaching-game-card::before,.teaching-mode-active #view .teaching-game-card::after { display: none; }
.teaching-mode-active #view .teaching-card-heading { display: grid; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--divider); }
.teaching-mode-active #view .teaching-card-heading h2 { max-width: 30ch; margin: 0; font-size: calc(2.25rem * var(--text-display-scale)); line-height: 1.15; }
.teaching-mode-active #view .teaching-game-metadata { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.teaching-mode-active #view .teaching-game-metadata :is(.tag,.teaching-lens-badge,.teaching-primary-tenet) { font: 700 calc(.8125rem * var(--text-metadata-scale))/1.5 var(--font-body); }
.teaching-mode-active #view :is(.teaching-lens-badge,.teaching-primary-tenet) { padding: 0; border: 0; border-radius: 0; background: none; }
.teaching-mode-active #view .teaching-lens-badge { color: var(--accent-violet); }
.teaching-mode-active #view .teaching-primary-tenet { color: var(--text-muted); }
.teaching-mode-active #view .teaching-field dt { margin: 0 0 8px; color: var(--text-muted); font: 700 calc(.8125rem * var(--text-metadata-scale))/1.5 var(--font-body); }
.teaching-mode-active #view .teaching-field dd { margin: 0; color: var(--text-primary); font-size: calc(1rem * var(--text-reading-scale)); line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.teaching-mode-active #view :is(.teaching-field.is-objective,.teaching-field.is-win) dd { font-size: calc(1.125rem * var(--text-reading-scale)); line-height: 1.5; }
.teaching-mode-active #view .teaching-start { margin: 24px 0; padding: 0; border: 0; background: none; }
.teaching-mode-active #view .teaching-start dd { max-width: 72ch; }
.teaching-mode-active #view .teaching-tasks { display: grid; gap: 24px; }
.teaching-mode-active #view .teaching-tasks.is-asymmetric { grid-template-columns: repeat(2,minmax(0,1fr)); }
.teaching-mode-active #view .teaching-task { padding: 0; border: 0; border-radius: 0; background: none; }
.teaching-mode-active #view .teaching-task+.teaching-task { padding-left: 24px; border-left: 1px solid var(--divider); }
.teaching-mode-active #view .teaching-task-heading { display: grid; gap: 4px; margin-bottom: 24px; padding: 0; border: 0; }
.teaching-mode-active #view .teaching-task-heading span { color: var(--text-muted); font: 700 calc(.8125rem * var(--text-metadata-scale))/1.5 var(--font-body); }
.teaching-mode-active #view .teaching-task-heading strong { color: var(--text-primary); font-size: calc(1.375rem * var(--text-display-scale)); line-height: 1.3; text-align: left; }
.teaching-mode-active #view .teaching-task dl { display: grid; gap: 20px; margin: 0; }
.teaching-mode-active #view .teaching-supporting { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--divider); }
.teaching-mode-active #view .teaching-supporting .teaching-field { padding: 0; border: 0; background: none; }
.teaching-mode-active #view .teaching-supporting .is-coaching-note { grid-column: 1/-1; border-left: 2px solid var(--accent-pink); padding-left: 16px; border-radius: 0; }
.teaching-mode-active #view .teaching-missing { padding: 24px 0; }
.teaching-mode-active #view .teaching-missing h2 { margin: 0 0 12px; font-size: calc(1.75rem * var(--text-display-scale)); }
.teaching-mode-active #view .teaching-missing p { color: var(--text-muted); }
/* Keep private notes and completion distinct from Game instructions. */
.teaching-mode-active #view .teaching-private-note { display: grid; gap: 12px; margin-top: 24px; padding: 20px 0; border: 0; border-top: 1px solid var(--divider); border-radius: 0; background: none; box-shadow: none; }
.teaching-mode-active #view .teaching-private-note header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.teaching-mode-active #view .teaching-private-note header>div { display: flex; align-items: center; gap: 12px; }
.teaching-mode-active #view .teaching-private-note header>div>span:last-child { display: grid; gap: 4px; }
.teaching-mode-active #view .teaching-private-note header strong { color: var(--text-primary); font-size: calc(1rem * var(--text-reading-scale)); }
.teaching-mode-active #view .teaching-private-note header small { color: var(--text-muted); font-size: calc(.8125rem * var(--text-metadata-scale)); }
.teaching-mode-active #view .teaching-private-note-icon { color: var(--accent-violet); font-size: 24px; }
.teaching-mode-active #view .teaching-private-note-preview { margin: 0; color: var(--text-primary); white-space: pre-wrap; }
.teaching-mode-active #view .teaching-private-note-editor { display: grid; gap: 12px; }
.teaching-mode-active #view .teaching-private-note-editor label { font-weight: 700; }
.teaching-mode-active #view .teaching-private-note-editor textarea { width: 100%; max-width: 100%; min-height: 140px; resize: vertical; padding: 12px; border: 1px solid var(--border-primary); border-radius: 6px; background: var(--surface-input); color: var(--text-primary); font: 500 calc(1.0625rem * var(--text-reading-scale))/1.6 var(--font-body); }
.teaching-mode-active #view .teaching-private-note-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--text-muted); font-size: calc(.8125rem * var(--text-metadata-scale)); }
.teaching-mode-active #view .teaching-private-note-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.teaching-mode-active #view .teaching-private-note-status { color: var(--text-muted); font-size: calc(.8125rem * var(--text-metadata-scale)); }
.teaching-mode-active #view .teaching-private-note-status:empty { display: none; }
.teaching-mode-active #view .teaching-private-note-status.is-error { color: var(--status-error); }
.teaching-mode-active #view .teaching-controls { position: sticky; z-index: 4; bottom: max(8px,env(safe-area-inset-bottom)); display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 16px; margin-top: 16px; padding: 12px; border: 1px solid var(--border-primary); border-radius: 6px; background: var(--surface-elevated); box-shadow: none; }
.teaching-mode-active #view .teaching-controls strong { padding: 0; border: 0; border-radius: 0; background: none; color: var(--text-secondary); font: 700 calc(.875rem * var(--text-metadata-scale))/1.5 var(--font-body); text-align: center; }
.teaching-mode-active #view .teaching-controls button { width: 100%; }
.teaching-mode-active #view .teaching-controls button:last-child:not(:disabled) { background: var(--accent-pink); border-color: transparent; color: var(--control-on-accent); }
.teaching-mode-active #view .teaching-picker { position: sticky; top: 24px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--text-primary); box-shadow: none; }
.teaching-mode-active #view .teaching-picker>.eyebrow { color: var(--text-muted); font: 700 calc(.8125rem * var(--text-metadata-scale))/1.5 var(--font-body); margin: 0 0 12px; }
.teaching-mode-active #view .teaching-picker-list { display: grid; gap: 0; }
.teaching-mode-active #view .teaching-picker-list button { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 6px 12px; width: 100%; padding: 16px 12px; border: 0; border-top: 1px solid var(--divider); border-left: 2px solid transparent; border-radius: 0; background: none; color: var(--text-primary); text-align: left; }
.teaching-mode-active #view .teaching-picker-list button>span { grid-row: 1/3; color: var(--text-muted); }
.teaching-mode-active #view .teaching-picker-list strong { white-space: normal; font-size: calc(.9375rem * var(--text-reading-scale)); }
.teaching-mode-active #view .teaching-picker-list small { color: var(--text-muted); white-space: normal; font-size: calc(.8125rem * var(--text-metadata-scale)); }
.teaching-mode-active #view .teaching-picker-list button.is-current { border-left-color: var(--accent-blue); background: var(--accent-blue-wash); }
.teaching-mode-active #view .teaching-picker-list button.is-current>span { color: var(--accent-blue); font-weight: 800; }
.teaching-mode-active #view .teaching-mobile-jump { display: none; }
.teaching-mode-active #view :is(button,select) { min-height: 48px; max-width: 100%; padding: 12px 16px; border: 1px solid var(--border-primary); border-radius: 6px; background: var(--surface-secondary); color: var(--text-primary); font: 700 calc(.9375rem * var(--text-chrome-scale))/1.5 var(--font-body); white-space: normal; cursor: pointer; clip-path: none; text-shadow: none; box-shadow: none; }
.teaching-mode-active #view button:hover:not(:disabled) { transform: none; }
.teaching-mode-active #view button:disabled { background: var(--surface-disabled); color: var(--text-disabled); border-color: var(--border-subtle); cursor: not-allowed; opacity: 1; }
.teaching-mode-active #view :is(button,a,select,textarea,input,#teaching-game-title):focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.teaching-mode-active #view .taught-games-dialog { width: min(620px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; margin: auto; border: 1px solid var(--border-primary); border-radius: 8px; background: var(--surface-elevated); color: var(--text-primary); }
.teaching-mode-active #view .taught-games-dialog::backdrop { background: var(--overlay); }
.teaching-mode-active #view .taught-games-dialog form { display: grid; gap: 16px; max-height: inherit; overflow: auto; overscroll-behavior: contain; padding: 24px; }
.teaching-mode-active #view .taught-games-dialog header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.teaching-mode-active #view .taught-games-dialog .eyebrow { color: var(--text-muted); margin: 0 0 8px; font: 700 calc(.75rem * var(--text-metadata-scale))/1.5 var(--font-body); }
.teaching-mode-active #view .taught-games-dialog h2 { margin: 0; font-size: calc(1.5rem * var(--text-display-scale)); }
.teaching-mode-active #view .taught-games-close { flex: 0 0 48px; width: 48px; padding: 0; font-size: 24px; }
.teaching-mode-active #view .taught-games-dialog p { color: var(--text-secondary); margin: 0; font-size: calc(.9375rem * var(--text-reading-scale)); }
.teaching-mode-active #view .taught-games-dialog fieldset { border: 0; padding: 0; margin: 0; }
.teaching-mode-active #view .taught-games-dialog legend { color: var(--text-muted); padding: 0 0 12px; font: 700 calc(.8125rem * var(--text-metadata-scale))/1.5 var(--font-body); }
.teaching-mode-active #view .taught-games-list { display: grid; gap: 0; }
.teaching-mode-active #view .taught-games-list label { display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; gap: 12px; min-height: 64px; padding: 16px 0; border: 0; border-top: 1px solid var(--divider); background: none; cursor: pointer; }
.teaching-mode-active #view .taught-games-list input { width: 24px; height: 24px; margin: 0; accent-color: var(--accent-blue); }
.teaching-mode-active #view .taught-games-list span { display: grid; gap: 4px; }
.teaching-mode-active #view .taught-games-list strong { font-size: calc(1rem * var(--text-reading-scale)); }
.teaching-mode-active #view .taught-games-list small { color: var(--text-muted); font-size: calc(.8125rem * var(--text-metadata-scale)); }
.teaching-mode-active #view .taught-games-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--divider); }
.teaching-mode-active #view .taught-games-actions button { flex: 1 1 180px; }
.teaching-mode-active #view #taught-games-confirm { background: var(--accent-pink); color: var(--control-on-accent); border-color: transparent; }
.teaching-mode-active #view #taught-games-status { color: var(--text-muted); font-size: calc(.8125rem * var(--text-metadata-scale)); }
.teaching-mode-active #view #taught-games-status:empty { display: none; }
@media(max-width: 899px) {
  .teaching-mode-active #view .teaching-stage { grid-template-columns: 1fr; }
  .teaching-mode-active #view .teaching-picker { display: none; }
  .teaching-mode-active #view .teaching-mobile-jump { display: grid; gap: 8px; margin-bottom: 24px; color: var(--text-muted); font: 700 calc(.8125rem * var(--text-metadata-scale))/1.5 var(--font-body); }
  .teaching-mode-active #view .teaching-mobile-jump select { width: 100%; background: var(--surface-input); color: var(--text-primary); font-size: calc(1rem * var(--text-reading-scale)); }
  .teaching-mode-active #view .teaching-context { flex-wrap: wrap; }
  .teaching-mode-active #view .teaching-context-copy { flex: 1 1 70%; }
  .teaching-mode-active #view .teaching-session-state { flex: 1 1 100%; grid-template-columns: 1fr auto; align-items: center; justify-items: start; }
  .teaching-mode-active #view .teaching-session-state small { grid-column: 1/-1; text-align: left; }
}
@media(max-width: 599px) {
  .teaching-mode-active .workspace { padding: 16px max(16px,env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); }
  .teaching-mode-active #view .teaching-toolbar { flex-wrap: wrap; gap: 8px 16px; }
  .teaching-mode-active #view .teaching-card-heading h2 { font-size: calc(1.875rem * var(--text-display-scale)); }
  .teaching-mode-active #view .teaching-game-card { padding: 20px 16px; }
  .teaching-mode-active #view .teaching-tasks.is-asymmetric,.teaching-mode-active #view .teaching-supporting { grid-template-columns: 1fr; }
  .teaching-mode-active #view .teaching-task+.teaching-task { padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--divider); }
  .teaching-mode-active #view .teaching-lesson-note { grid-template-columns: 1fr; gap: 4px; }
  .teaching-mode-active #view .teaching-private-note header { align-items: stretch; flex-direction: column; }
  .teaching-mode-active #view .teaching-controls { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; }
  .teaching-mode-active #view .teaching-controls strong { grid-row: 1; grid-column: 1/-1; }
  .teaching-mode-active #view .taught-games-dialog form { padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
}
html[data-text-scale-level="accessibility"] .teaching-mode-active #view .teaching-stage,
html[data-text-scale-level="accessibility"] .teaching-mode-active #view .teaching-tasks.is-asymmetric,
html[data-text-scale-level="accessibility"] .teaching-mode-active #view .teaching-supporting { grid-template-columns: 1fr; }
html[data-text-scale-level="accessibility"] .teaching-mode-active #view .teaching-task+.teaching-task { padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--divider); }
html[data-text-scale-level="accessibility"] .teaching-mode-active #view .teaching-context { flex-wrap: wrap; }
html[data-text-scale-level="accessibility"] .teaching-mode-active #view .teaching-session-state { flex-basis: 100%; justify-items: start; }
html[data-text-scale-level="accessibility"] .teaching-mode-active #view .teaching-session-state small { text-align: left; }
html[data-text-scale-level="accessibility"] .teaching-mode-active #view .teaching-controls { position: static; }
/* Existing schedule/session entry-point styles: retained verbatim, outside pilot. */
.schedule-card-actions{display:grid;gap:8px;padding-top:8px;border-top:1px solid #34434a}
.schedule-card-actions .schedule-edit-link{padding-top:0;border-top:0}
.schedule-teaching-link{display:inline-flex;align-items:center;min-height:44px;color:var(--accent-blue-soft);font-size:10px;font-weight:800;text-decoration:none}
.schedule-teaching-link:hover{color:var(--accent-blue)}
.session-heading-actions{display:flex;align-items:flex-end;flex-direction:column;gap:10px}
.session-heading-actions .secondary-button{display:inline-flex;align-items:center;min-height:44px;white-space:nowrap}

@media(max-width:599px){.session-heading-actions{align-items:stretch}.session-heading-actions .secondary-button{text-align:center}}
