/* Scoped teaching aids; no changes to existing material boards or annotations. */
.classroom-support, .cs-practice { --cs-ink: #26165c; --cs-purple: #5731b7; --cs-line: #e2dcee; --cs-muted: #655d77; color: var(--cs-ink); }
.cs-launch { position: fixed; right: 26px; bottom: 24px; z-index: 70; display: flex; align-items: center; gap: 10px; padding: 14px 20px; border: 1px solid #412382; border-radius: 40px; background: #321c74; color: white; font: inherit; font-weight: 750; box-shadow: 0 7px 20px #26165c28; cursor: pointer; }
.cs-launch span { font-size: 12px; font-weight: 500; opacity: .85; }
.cs-dialog, .cs-presentation { color: #26165c; background: #fff; border: 1px solid #e2dcee; border-radius: 24px; padding: 28px; margin: auto; box-shadow: 0 18px 70px #16102538; max-height: 92dvh; overflow: auto; }
.cs-dialog:not([open]), .cs-presentation:not([open]), .classroom-support [hidden], .cs-practice [hidden] { display: none !important; }
.cs-dialog { width: min(920px, calc(100vw - 32px)); }
.cs-dialog::backdrop { background: #160c35b8; }
/* Screen sharing must not reveal private notes through a translucent backdrop. */
.cs-presentation::backdrop { background: #160c35; }
.cs-header { display: flex; justify-content: space-between; gap: 22px; align-items: flex-start; }
.cs-header h2 { font-size: clamp(24px, 3vw, 34px); line-height: 1.15; margin: 7px 0 10px; }
.cs-header p { margin: 0; color: #655d77; }
.cs-eyebrow { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; font-weight: 800; color: #5731b7; }
.cs-close { flex: 0 0 42px; min-height: 42px; border-radius: 50%; border: 1px solid #e2dcee; background: white; font-size: 28px; line-height: 1; cursor: pointer; }
.cs-editorial { border-left: 3px solid #c08a21; padding: 8px 12px; background: #fff9e9; font-size: 12px; color: #725012; margin: 18px 0; }
.cs-filters { display: grid; grid-template-columns: 1fr 220px; gap: 14px; }
.cs-filters label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.cs-dialog input[type="search"], .cs-dialog select { width: 100%; border: 1px solid #c9bfdc; border-radius: 10px; padding: 11px 12px; min-height: 44px; font: inherit; color: #26165c; background: #fff; }
.cs-role-hint, .cs-muted { font-size: 12px; color: #655d77; line-height: 1.5; }
.cs-phrase-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; max-height: 28dvh; overflow-y: auto; padding: 3px; }
.cs-phrase { display: flex; align-items: center; gap: 9px; text-align: left; padding: 12px 10px; border: 1px solid #e2dcee; border-radius: 12px; background: #faf8ff; color: #26165c; cursor: pointer; min-height: 60px; font: inherit; font-size: 13px; font-weight: 650; }
.cs-phrase > span { min-width: 0; }
.cs-phrase small { display: block; margin-top: 4px; color: #655d77; font-size: 11px; font-weight: 400; }
.cs-phrase[aria-pressed="true"] { background: #eee7ff; border: 2px solid #6841bf; padding: 11px 9px; }
.cs-selected { display: grid; grid-template-columns: 1fr 1.3fr; gap: 6px 16px; align-items: center; border-top: 1px solid #e2dcee; margin-top: 16px; padding-top: 12px; }
.cs-phrase-card { text-align: center; }

.cs-phrase-card h3 { font-size: 25px; margin: 6px 0; }
.cs-polish { display: block; color: #655d77; margin: 7px 0 12px; }
.cs-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cs-button { display: inline-flex; align-items: center; justify-content: center; padding: 11px 16px; min-height: 44px; border: 1px solid #cec3e4; border-radius: 12px; color: #321c74; background: white; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.cs-primary { background: #5731b7; color: white; border-color: #5731b7; }
.cs-button:disabled { color: #77717f; border-color: #ddd9e3; background: #f3f1f5; cursor: not-allowed; }
.cs-status { font-size: 12px; line-height: 1.5; color: #655d77; margin: 12px 0 0; }
.cs-selected .cs-status { text-align: center; grid-column: 1 / -1; margin-top: 2px; }
.classroom-support button:focus-visible, .classroom-support input:focus-visible, .classroom-support select:focus-visible, .cs-practice :is(input, button):focus-visible { outline: 3px solid #9c79f0; outline-offset: 3px; }
.cs-presentation { width: min(1400px, calc(100vw - 24px)); min-height: min(760px, 92dvh); display: flex; flex-direction: column; }
.cs-present-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; color: #655d77; }
.cs-present-controls label { display: flex; gap: 8px; align-items: center; }
.cs-present-content { flex: 1; display: grid; place-items: center; padding: 45px 24px; }
.cs-present-content h2 { font-size: clamp(30px, 4.8vw, 66px); line-height: 1.15; margin: 20px 0; max-width: 1050px; text-wrap: balance; }
.cs-present-content .cs-polish { font-size: clamp(22px, 2.6vw, 38px); }
.cs-practice { background: #fff; border: 1px solid #e2dcee; border-radius: 20px; padding: 24px; margin: 20px 0; }
.cs-practice-summary { cursor: pointer; font-size: 17px; min-height: 44px; }
.cs-practice-summary > span { display: inline-block; vertical-align: middle; }
.cs-practice-summary .cs-polish { font-size: 13px; margin: 4px 0 0; }
.cs-summary-hint { font-size: 12px; color: #655d77; margin: 8px 0 8px 22px; }
.cs-practice-summary:focus-visible { outline: 3px solid #9c79f0; outline-offset: 5px; border-radius: 6px; }
.cs-practice-body { border-top: 1px solid #e2dcee; padding-top: 22px; margin-top: 16px; }
.cs-scene-reference { max-width: 900px; margin: 18px auto; }
.cs-scene-reference summary { cursor: pointer; font-size: 13px; color: #655d77; padding: 10px; }
.cs-scene-reference figure { margin: 12px 0 0; }
.cs-scene-reference img { width: 100%; height: auto; border-radius: 16px; }
.cs-scene-reference figcaption, .cs-present-content .cs-scene-reference .cs-polish { font-size: 12px; line-height: 1.5; }
.cs-choices .cs-choice-word { display: flex; flex-direction: column; justify-content: center; }
.cs-practice-preview + .cs-practice-actions { margin-top: 18px; }
.cs-practice-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.cs-practice-heading h2 { font-size: 23px; margin: 5px 0 8px; }
.cs-practice-heading p { margin: 0 0 6px; }
.cs-badge { font-size: 11px; font-weight: 800; background: #e9f5dc; color: #346116; padding: 9px 12px; border-radius: 20px; white-space: nowrap; }
.cs-mode-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 18px 0; }
.cs-mode-buttons button { padding: 14px; min-height: 70px; border: 1px solid #d8d0e7; background: #faf8ff; border-radius: 12px; color: #26165c; text-align: left; cursor: pointer; }
.cs-mode-buttons strong { display: block; font-size: 16px; margin-bottom: 4px; }
.cs-mode-buttons span { font-size: 12px; color: #655d77; }
.cs-mode-buttons [aria-pressed="true"] { background: #eee7ff; border: 2px solid #6841bf; padding: 13px; }
.cs-practice-preview { padding: 22px; background: #faf8ff; border-radius: 16px; }
.cs-practice-card { text-align: center; width: 100%; }
.cs-practice-card h2 { line-height: 1.25; margin: 12px auto; }
.cs-model { background: #eee7ff; padding: 16px; border-radius: 14px; font-size: clamp(22px, 3.6vw, 44px); font-weight: 750; }
.cs-choices { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin: 18px auto 0; }
.cs-choices > div { min-width: 120px; padding: 12px 20px; border: 1px solid #e2dcee; border-radius: 16px; background: white; }

.cs-choices strong { font-size: 17px; }
.cs-present-content .cs-choices strong { font-size: clamp(22px, 2.5vw, 32px); }
.cs-open-response { font-size: 28px; font-weight: 750; margin: 20px; }
.cs-practice-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 16px; }
.cs-practice-footer p { max-width: 720px; font-size: 13px; line-height: 1.5; }
.cs-practice-footer button { flex-shrink: 0; }
@media (max-width: 700px) {
  .cs-launch { right: 14px; bottom: 100px; font-size: 13px; padding: 12px 16px; }
  .cs-dialog, .cs-presentation { padding: 18px; border-radius: 18px; }
  .cs-filters { grid-template-columns: 1fr; }
  .cs-phrase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-selected { grid-template-columns: 1fr; }
  .cs-selected .cs-phrase-card { display: grid; grid-template-columns: auto 1fr; text-align: left; column-gap: 12px; }
  .cs-selected .cs-illustration { grid-row: span 2; align-self: center; width: 100px; }
  .cs-selected h3 { font-size: 20px; }
  .cs-selected .cs-polish { margin: 0; }
  .cs-selected .cs-actions { margin-top: 4px; }
  .cs-practice { padding: 16px; }
  .cs-practice-heading { flex-direction: column; }
  .cs-mode-buttons button { padding: 10px; }
  .cs-mode-buttons [aria-pressed="true"] { padding: 9px; }
  .cs-mode-buttons .cs-mode-description { display: none; }
  .cs-practice-preview { padding: 14px; }
  .cs-practice-footer { flex-direction: column; align-items: stretch; gap: 8px; }
  .cs-present-content { padding: 24px 0; }
  .cs-present-controls { align-items: flex-start; }
  .cs-choices { gap: 8px; }
  .cs-choices > div { min-width: 90px; padding: 12px; }
}
@media print { .classroom-support { display: none; } }

/* Image sources are attached only for the open activity/dialog. */
.cs-image-shell { position: relative; display: block; width: 160px; aspect-ratio: 1; border-radius: 12px; margin: 0 auto 12px; background: #fffaf0; overflow: hidden; }
.cs-image-shell .cs-illustration { display: block; width: 100%; height: 100%; aspect-ratio: 1; object-fit: contain; margin: 0; }
.cs-image-shell:not([data-cs-image-state="loaded"]) .cs-illustration { visibility: hidden; }
.cs-image-status { position: absolute; inset: 0; display: grid; place-content: center; gap: 5px; padding: 8px; font-size: 11px; line-height: 1.4; color: #655d77; text-align: center; }
.cs-image-status[hidden] { display: none; }
.cs-phrase .cs-image-shell { width: 52px; flex: 0 0 52px; margin: 0; border-radius: 8px; }
.cs-phrase .cs-image-status { font-size: 8px; padding: 2px; }
.cs-selected .cs-image-shell { width: 140px; }
.cs-present-content .cs-phrase-card .cs-image-shell { width: min(320px, 50vw); }
.cs-present-content .cs-choices .cs-image-shell { width: clamp(100px, 16vw, 200px); }
.cs-symbol-visual { display: block; position: relative; width: fit-content; margin: auto; }
.cs-visual-symbol { position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%); border-radius: 8px; padding: 0 8px; background: #fffaf0f0; color: #26165c; font-size: 40px; font-weight: 800; }
.cs-count-visual { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-content: center; gap: 2px; width: 160px; min-height: 160px; margin: 0 auto 12px; }
.cs-count-visual .cs-image-shell, .cs-present-content .cs-count-visual .cs-image-shell { width: 100%; margin: 0; border-radius: 3px; }
.cs-count-visual .cs-image-status { font-size: 0; padding: 0; }
.cs-count-visual [data-cs-image-state="error"]::after { content: "×"; position: absolute; inset: 0; color: #655d77; }
.cs-choices strong { display: block; }
.cs-choices .cs-polish { font-size: 15px; margin-bottom: 0; }
.cs-mode-buttons .cs-mode-pl { font-weight: 650; font-size: 14px; margin: 0 0 10px; }
.cs-mode-description { display: block; line-height: 1.4; }
.cs-mode-buttons .cs-polish.cs-mode-description { margin-top: 3px; }
.cs-language-toggle { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; margin-top: 18px; }
.cs-language-toggle span { color: #655d77; }
.cs-language-toggle input, .cs-present-controls input { width: 18px; height: 18px; accent-color: #5731b7; }
.cs-practice-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.cs-practice-footer { flex-wrap: wrap; }
.cs-practice-footer > p { flex: 1 1 300px; }
.cs-practice-heading > div { min-width: 0; }
.cs-badge .cs-polish { font-size: 10px; color: #346116; margin: 3px 0 0; }
.cs-eyebrow .cs-polish { letter-spacing: normal; text-transform: none; font-weight: 500; }
.cs-model p { margin: 0; }
.cs-model .cs-polish { font-size: .56em; font-weight: 500; margin: 8px 0 0; }
.cs-instruction-pl { font-size: 18px; }
.cs-present-content { padding: 24px 12px; }
.cs-present-content h2 { font-size: clamp(28px, 3.8vw, 52px); margin: 12px 0; }
.cs-present-content .cs-model .cs-polish, .cs-present-content .cs-choices .cs-polish { font-size: clamp(16px, 1.8vw, 24px); }
.cs-present-content .cs-eyebrow .cs-polish { font-size: 14px; }
.cs-presentation-audio { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid #e2dcee; padding-top: 12px; }
.cs-presentation-audio .cs-status { flex: 1 1 200px; margin: 0; }
@media (max-width: 700px) {
  .cs-launch { flex-direction: column; gap: 2px; }
  .cs-phrase { flex-direction: column; align-items: flex-start; }
  .cs-phrase .cs-image-shell { width: 60px; flex-basis: auto; }
  .cs-choices > div { min-width: 0; padding: 10px; flex: 1 1 85px; }
  .cs-choices .cs-image-shell { width: 100%; max-width: 130px; }
  .cs-count-visual { width: 100%; min-height: 130px; }
  .cs-selected .cs-image-shell { grid-row: span 2; align-self: center; width: 100px; }
  .cs-selected .cs-image-shell .cs-illustration { width: 100%; }
  .cs-visual-symbol { font-size: 28px; }
  .cs-choices strong { font-size: 15px; overflow-wrap: anywhere; }
  .cs-choices .cs-polish { font-size: 13px; }
  .cs-mode-buttons strong { font-size: 14px; }
  .cs-mode-buttons .cs-mode-pl { font-size: 12px; margin-bottom: 0; }
  .cs-practice-actions { justify-content: flex-start; }
  .cs-practice-footer > p { flex-basis: auto; }
  .cs-present-controls { flex-wrap: wrap; }
  .cs-present-controls label { flex-wrap: wrap; }
}
