/* Fonts are served from CHIM's own /fonts folder (no Google Fonts request),
   so the page never waits on an outside site and the fonts work offline. */
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/lora-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/lora-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/lora-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700 900; font-display: swap; src: url('fonts/ibm-plex-sans-latin-700-normal.woff2') format('woff2'); } /* v532 real bold for slide titles */
/* v146 Noto Sans: the student Notebook pages only (bars and accents sit on every letter, e.g. x̄, ȳ) */
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/noto-sans-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/noto-sans-greek-400-normal.woff2') format('woff2'); unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF; }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/noto-sans-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/noto-sans-greek-600-normal.woff2') format('woff2'); unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF; }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/noto-sans-latin-700-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Noto Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/noto-sans-greek-700-normal.woff2') format('woff2'); unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF; }
@font-face { font-family: 'Noto Sans'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/noto-sans-latin-400-italic.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --paper: #F6F1E4;
  --paper-2: #EFEAD8;
  --card: #F1EFE8;
  --ink: #232B3A;
  --ink-soft: #4B5567;
  --rule: #C9BFA0;
  --green: #3F6B4A;
  --green-bg: #EAF3DE;
  --green-text: #27500A;
  --amber: #854F0B;
  --amber-bg: #FAEEDA;
  --red: #A32D2D;
  --red-bg: #FCEBEB;
  --gold: #B8862E;
  --olive-deep: #4A5A28;
  --olive-base: #6B7A3D;
  --olive-soft: #96A369;
  --radius: 8px;
}

[data-theme="dark"] {
  --paper: #20261A;
  --paper-2: #2B3323;
  --card: #2B3323;
  --ink: #EAF0DE;
  --ink-soft: #9CA593;
  --rule: #3A4530;
  --green: #97C459;
  --green-bg: #3B4530;
  --green-text: #C0DD97;
  --amber: #FAC775;
  --amber-bg: #4A3F26;
  --red: #F0997B;
  --red-bg: #4A2C26;
  --gold: #FAC775;
  --olive-deep: #C0DD97;
  --olive-base: #97C459;
  --olive-soft: #639922;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Sans', sans-serif;
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
}

h1, h2, h3, .brand { font-family: 'Lora', serif; font-weight: 600; margin: 0; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* ---------- Gate screens ---------- */
.gate { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; }
.gate > .gate-card { margin: auto 0; }
.gate-card { width: 100%; max-width: 380px; text-align: center; }
.gate-card .wordmark-frame { width: 100%; max-width: 340px; margin: 0 auto 6px; }
/* The logo GIF (900 × 500) already holds the whole "chim ©" wordmark (v156: the app-icon sprout + soil; it plays once, then loading-sway.gif loops), so it is
   simply scaled to the card's width — it can never stick out of the card. */
.gate-card .wordmark-frame img.wordmark { display: block; width: 100%; height: auto; }
.gate-card .subtitle { color: var(--ink-soft); font-size: 0.85rem; margin-bottom: 28px; }
.gate-footer { color: var(--ink-soft); font-size: 0.72rem; margin-top: 28px; opacity: 0.8; }
.remember-me-row { display: flex; align-items: center; gap: 6px; justify-content: flex-start; font-size: 0.85rem; color: var(--ink-soft); font-weight: 400; margin: 4px 0 14px; }
.remember-me-row input { width: auto; margin: 0; }

.role-choice { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; text-align: left; }
.role-choice button {
  padding: 16px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  font-family: 'Lora', serif; font-size: 1.05rem; text-align: left; color: var(--ink);
}
.role-choice button span { display: block; font-family: 'IBM Plex Sans', sans-serif; font-size: 0.78rem; color: var(--ink-soft); margin-top: 2px; }
.role-choice button:hover { border-color: var(--olive-deep); }

label { display: block; font-size: 0.82rem; color: var(--ink-soft); margin: 16px 0 6px; text-align: left; }
input, select, textarea {
  width: 100%; padding: 10px 4px; font-size: 1rem; font-family: inherit;
  border: none; border-bottom: 1px solid var(--rule); background: transparent; color: var(--ink);
}
textarea { resize: vertical; padding: 10px; border: 1px solid var(--rule); border-radius: var(--radius); }
input:focus, select:focus, textarea:focus { outline: none; border-bottom: 2px solid var(--olive-deep); }
textarea:focus { border-color: var(--olive-deep); }

.btn-primary {
  margin-top: 26px; width: 100%; padding: 12px; background: var(--olive-deep); color: var(--paper);
  border: none; border-radius: var(--radius); font-size: 0.95rem;
}
.btn-primary:hover { opacity: 0.9; }
.error-msg { color: var(--red); font-size: 0.85rem; margin-top: 12px; min-height: 1.2em; text-align: left; }
.login-status { color: var(--ink-soft); font-size: 0.85rem; margin-top: 12px; min-height: 1.2em; text-align: left; }
.link-btn { background: none; border: none; color: var(--ink-soft); text-decoration: underline; font-size: 0.85rem; padding: 0; margin-top: 18px; }

/* ---------- App shell ---------- */
.app-shell { min-height: 100vh; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--rule); }
.topbar-brand { display: flex; align-items: center; gap: 12px; }
.topbar img.wordmark-sm { height: 70px; } /* 250% of the original 28px */
.topbar .greeting { font-family: 'Lora', serif; font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.topbar .who { font-size: 0.76rem; color: var(--ink-soft); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  background: var(--card); border: none; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--olive-deep);
}
.logout-btn { background: transparent; border: 1px solid var(--rule); border-radius: var(--radius); padding: 7px 14px; font-size: 0.82rem; color: var(--ink); }

.section-tabs { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 8px; padding: 14px 20px 0; }
.chip { background: var(--card); border: 1px solid var(--rule); border-radius: 20px; padding: 8px 10px; font-size: 0.82rem; color: var(--ink-soft); text-align: center; }
.chip.active { background: var(--olive-deep); color: var(--paper); border-color: var(--olive-deep); }

/* v238 ‹ Back — ONE back button for all of CHIM: an olive pill at the top-left of the page,
   44px tall (easy to tap), same on every phone. Made by chimBackBtn() / the .back-btn-xl class. */
.back-btn-xl {
  display: inline-flex; align-items: center; gap: 6px; width: auto; max-width: calc(100% - 32px); align-self: flex-start;
  margin: 12px 16px 4px; min-height: 44px; padding: 8px 18px 8px 14px; box-sizing: border-box;
  background: #FFFFFF; color: var(--olive-deep); border: 2px solid var(--olive-deep); border-radius: 999px;
  font-family: 'IBM Plex Sans', Arial, sans-serif; font-weight: 700; font-size: 1rem; line-height: 1.2; letter-spacing: 0;
  cursor: pointer; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 1px 3px rgba(0,0,0,.10); -webkit-tap-highlight-color: transparent;
}
.back-btn-xl:hover { background: var(--olive-deep); color: #FFFFFF; text-decoration: none; }
.back-btn-xl:active { transform: translateY(1px); }
.back-btn-xl:focus-visible { outline: 3px solid #F4B400; outline-offset: 2px; }
[data-theme="dark"] .back-btn-xl { background: #1F2616; color: #CFE8B0; border-color: #9DBB6E; }
[data-theme="dark"] .back-btn-xl:hover { background: #9DBB6E; color: #10150A; }

.offline-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: #4A5A28; color: #fff; text-align: center;
  font-size: 0.78rem; padding: 7px 14px; box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}
[data-theme="dark"] .offline-banner { background: #C0DD97; color: #1a2410; }
body.offline-mode { padding-top: 34px; }

.install-banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 999;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(0,0,0,0.18); padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  max-width: 480px; margin: 0 auto;
}
.install-banner img { width: 40px; height: 40px; flex-shrink: 0; }
.install-banner-text { flex: 1; display: flex; flex-direction: column; font-size: 0.82rem; color: var(--ink); min-width: 120px; }
.install-banner-text span { color: var(--ink-soft); font-size: 0.76rem; }
.install-banner-actions { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.install-banner-actions .btn-small { height: 34px; padding: 6px 12px; white-space: nowrap; }
.install-banner-actions .link-btn { margin: 0; font-size: 0.74rem; }
@media (max-width: 420px) {
  .install-banner { flex-wrap: wrap; }
  .install-banner-actions { flex-direction: row; align-items: center; width: 100%; justify-content: flex-end; }
}

.subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.subject-card {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 26px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  cursor: pointer; text-align: center; font-size: 0.95rem; font-weight: 600; color: var(--ink);
}
.subject-card:hover { border-color: var(--olive-deep); }
.subject-card .icon { font-size: 2.6rem; }
.coming-soon { text-align: center; padding: 40px 20px; color: var(--ink-soft); font-size: 0.9rem; }

.launchpad-category { margin-bottom: 20px; }
.launchpad-category h3 { margin: 0 0 4px; font-size: 0.95rem; color: var(--olive-deep); }
.launchpad-link-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--card); margin-bottom: 8px; text-decoration: none; color: var(--ink); font-weight: 600;
  width: 100%; font-family: inherit; font-size: 0.95rem; cursor: pointer; text-align: left;
}
.launchpad-link-row:hover { border-color: var(--olive-deep); }
.launchpad-link-row .arrow { color: var(--ink-soft); font-weight: 400; }

/* Launch Pad — "open inside CHIM" window-within-a-window overlay */
#lp-embed-overlay { position: fixed; inset: 0; z-index: 1100; }
html body.lp-embed-lock { overflow: hidden; }
.lp-embed-shell {
  height: 100%; background: var(--paper); display: flex; flex-direction: column;
  padding: 14px 16px; overflow-y: auto;
}
.lp-embed-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.lp-embed-category { font-size: 0.78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }
.lp-embed-title { font-size: 1.15rem; font-weight: 700; color: var(--ink); margin-top: 2px; }
.lp-embed-instructions {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 12px 14px; font-size: 0.88rem; color: var(--ink); margin-bottom: 10px; line-height: 1.5;
}
.lp-embed-toolbar { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.lp-embed-toolbar a.btn-small { text-decoration: none; }
.lp-embed-frame-wrap {
  flex: 1 1 auto; min-height: 320px; border: 2px solid var(--olive-deep); border-radius: var(--radius);
  background: var(--card); display: flex; flex-direction: column; overflow: hidden;
}
.lp-embed-iframe { flex: 1 1 auto; width: 100%; height: 100%; min-height: 300px; border: 0; background: #fff; }
.lp-embed-frame-note { font-size: 0.72rem; color: var(--ink-soft); padding: 6px 10px; border-top: 1px solid var(--rule); }
@media (max-width: 560px) {
  .lp-embed-shell { padding: 10px 12px; }
  .lp-embed-title { font-size: 1rem; }
  .lp-embed-frame-wrap { min-height: 260px; }
}

/* Data Privacy Notice — parent consent form + acknowledged "official record" copy (student/parent side) */
.dp-doc-card {
  border: 2px solid var(--olive-deep); border-radius: var(--radius); background: #fffdf6;
  color: #1c1c14; padding: 20px 20px 4px; position: relative; box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
html body.dark .dp-doc-card, [data-theme="dark"] .dp-doc-card { background: #fffdf6; color: #1c1c14; }
.dp-doc-seal {
  position: absolute; top: 10px; right: 14px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em;
  color: var(--olive-deep); border: 1px solid var(--olive-deep); border-radius: 4px; padding: 2px 6px;
}
.dp-doc-card h3 { color: #1c1c14; }
.dp-doc-card ul { color: #1c1c14; }
.dp-doc-signoff { margin: 10px 0 18px; }
.dp-doc-check { font-size: 0.9rem; margin-bottom: 12px; }
.dp-doc-line { border-top: 1px dashed #9a9a86; margin: 0 0 12px; }
.dp-doc-row { display: flex; justify-content: space-between; gap: 10px; font-size: 0.88rem; padding: 4px 0; border-bottom: 1px dotted #d8d6c6; }
.dp-doc-row span { color: #55543f; }

/* Data Privacy — teacher's parent consent records overlay */
#pc-overlay { position: fixed; inset: 0; z-index: 1100; }
html body.pc-overlay-lock { overflow: hidden; }
.pc-shell { height: 100%; background: var(--paper); padding: 16px; overflow-y: auto; }
.pc-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.pc-columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; align-items: start; }
.pc-col { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px; }
.pc-col h3 { margin: 0 0 10px; font-size: 0.95rem; color: var(--olive-deep); }
.pc-count { color: var(--ink-soft); font-weight: 400; font-size: 0.82rem; }
.pc-name-chip { padding: 8px 0; border-top: 1px solid var(--rule); }
.pc-name-chip:first-of-type { border-top: none; }
.pc-name { font-weight: 600; }
.pc-sub { font-size: 0.76rem; color: var(--ink-soft); margin-top: 1px; }

/* Arcade — per-section leaderboard (shown above the Study Guide toggle) */
.arcade-leaderboard-wrap { display: flex; flex-direction: column; align-items: center; margin: 0 0 18px; }
.arcade-leaderboard { border-collapse: separate; border-spacing: 0 6px; margin: 0 auto; width: 100%; max-width: 380px; }
.arcade-leaderboard-row td { padding: 8px 12px; background: var(--card); border: 1px solid var(--rule); }
.arcade-leaderboard-row td:first-child { border-radius: var(--radius) 0 0 var(--radius); border-right: none; text-align: center; width: 36px; font-size: 1.15rem; }
.arcade-leaderboard-row td:last-child { border-radius: 0 var(--radius) var(--radius) 0; border-left: none; }
.arcade-leaderboard-rank { font-weight: 700; width: 90px; }
.arcade-leaderboard-name { font-weight: 600; }
.arcade-leaderboard-score { text-align: right; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.arcade-leaderboard-row.gold td { border-color: #d8b23a; background: color-mix(in srgb, #d8b23a 12%, var(--card)); }
.arcade-leaderboard-row.silver td { border-color: #b9bec7; background: color-mix(in srgb, #b9bec7 12%, var(--card)); }
.arcade-leaderboard-row.bronze td { border-color: #b8794f; background: color-mix(in srgb, #b8794f 12%, var(--card)); }
.arcade-leaderboard-row.green-1 td { border-color: #4f9a52; background: color-mix(in srgb, #4f9a52 22%, var(--card)); }
.arcade-leaderboard-row.green-2 td { border-color: #4f9a52; background: color-mix(in srgb, #4f9a52 18%, var(--card)); }
.arcade-leaderboard-row.green-3 td { border-color: #4f9a52; background: color-mix(in srgb, #4f9a52 14%, var(--card)); }
.arcade-leaderboard-row.green-4 td { border-color: #4f9a52; background: color-mix(in srgb, #4f9a52 10%, var(--card)); }
.arcade-leaderboard-row.green-5 td { border-color: #4f9a52; background: color-mix(in srgb, #4f9a52 7%, var(--card)); }
.arcade-leaderboard-row.green-6 td { border-color: #4f9a52; background: color-mix(in srgb, #4f9a52 4%, var(--card)); }
@media (max-width: 480px) {
  .arcade-leaderboard { max-width: 100%; }
}

/* ---------- Arcade > Mastery quiz (Quizizz/Millionaire-style) ---------- */
.mq-quiz { max-width: 560px; margin: 0 auto; }
.mq-quiz-top { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 6px; }
.mq-timer-track { height: 8px; border-radius: 6px; background: var(--rule); overflow: hidden; margin-bottom: 18px; }
.mq-timer-fill { height: 100%; width: 100%; background: var(--olive-deep); border-radius: 6px; }
.mq-quiz-question {
  font-size: 1.15rem; font-weight: 600; text-align: center; padding: 18px 14px;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: 18px;
}
.mq-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .mq-tiles { grid-template-columns: 1fr; } }
.mq-tile {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 14px 16px; border: 2px solid var(--rule); border-radius: var(--radius);
  background: var(--card); color: var(--ink); font-size: 0.95rem; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.mq-tile:hover:not(:disabled) { border-color: var(--olive-deep); transform: translateY(-1px); }
.mq-tile:disabled { cursor: default; }
.mq-tile-letter {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--rule);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem;
}
.mq-tile-text { flex: 1; }
.mq-tile-correct { background: color-mix(in srgb, #4f9a52 30%, var(--card)); border-color: #4f9a52; }
.mq-tile-correct .mq-tile-letter { background: #4f9a52; color: #fff; }
.mq-tile-wrong { background: color-mix(in srgb, #c0392b 30%, var(--card)); border-color: #c0392b; }
.mq-tile-wrong .mq-tile-letter { background: #c0392b; color: #fff; }
.mq-quiz-result { text-align: center; padding: 40px 20px; }
.mq-quiz-result-emoji { font-size: 3rem; margin-bottom: 10px; }
.mq-quiz-result-score { font-size: 1.3rem; font-weight: 700; }
.mq-quiz-result-pct { color: var(--ink-soft); margin: 4px 0 20px; }

/* ---------- Line (messenger) ---------- */
/* Message area: white in light mode, olive green with white text in dark
   mode — a fixed olive rather than the theme's --olive-deep, which flips to
   a pale green in dark mode and would read poorly with white text. */
.line-messages {
  display: flex; flex-direction: column; gap: 4px; max-height: 55vh; overflow-y: auto; padding: 10px 8px;
  background: #ffffff; border: 1px solid var(--rule); border-radius: var(--radius);
}
[data-theme="dark"] .line-messages { background: #3F4F24; color: #fff; border-color: #4A5A28; }
.line-bubble-row { display: flex; align-items: flex-end; gap: 6px; max-width: 82%; }
.line-bubble-row.mine { align-self: flex-end; flex-direction: row-reverse; }
.line-bubble-row.theirs { align-self: flex-start; }
.line-bubble {
  background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 8px 12px;
  font-size: 0.9rem; position: relative; max-width: 100%; word-break: break-word;
}
.line-bubble-row.mine .line-bubble { background: #4A5A28; color: #fff; border-color: #4A5A28; }
[data-theme="dark"] .line-bubble-row.theirs .line-bubble { background: var(--paper); }
.line-bubble.deleted { font-style: italic; color: var(--ink-soft); background: transparent; }
.line-sender-name { font-size: 0.72rem; font-weight: 700; color: var(--olive-deep); margin-bottom: 2px; }
.line-cc-tag { font-size: 0.68rem; font-style: italic; opacity: 0.75; margin-bottom: 2px; }
.line-forwarded-label { font-size: 0.72rem; opacity: 0.8; margin-bottom: 2px; }
.line-body { white-space: pre-wrap; }
.line-meta { font-size: 0.68rem; opacity: 0.65; margin-top: 4px; text-align: right; }
.line-reactions { margin-top: 4px; }
.line-reaction-chip { display: inline-block; background: var(--paper); border-radius: 10px; padding: 1px 6px; font-size: 0.8rem; margin-right: 3px; }
.line-file-image { max-width: 200px; max-height: 200px; border-radius: 8px; display: block; margin-bottom: 4px; }
.line-file-chip { display: inline-block; padding: 4px 8px; border-radius: 8px; background: var(--paper); color: var(--ink); text-decoration: none; font-size: 0.85rem; margin-bottom: 4px; }
.line-bubble-row.mine .line-file-chip { color: var(--ink); }
.line-bubble-actions { display: flex; flex-direction: column; gap: 2px; opacity: 0; transition: opacity .15s; }
.line-bubble-row:hover .line-bubble-actions { opacity: 1; }
.line-action-btn { background: none; border: none; cursor: pointer; font-size: 0.9rem; padding: 2px; line-height: 1; }
.line-reaction-picker {
  position: absolute; z-index: 50; background: var(--card); border: 1px solid var(--rule); border-radius: 20px;
  padding: 4px 6px; display: flex; gap: 2px; box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.line-reaction-picker button { background: none; border: none; cursor: pointer; font-size: 1.1rem; padding: 2px 4px; }
.line-composer { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.line-composer input[type="text"] {
  flex: 1; background: #ffffff; border: 1px solid var(--rule); border-radius: 20px; padding: 10px 14px;
}
[data-theme="dark"] .line-composer input[type="text"] { background: #3F4F24; color: #fff; border-color: #4A5A28; }
[data-theme="dark"] .line-composer input[type="text"]::placeholder { color: #d9e6c8; }
.line-file-preview { font-size: 0.8rem; color: var(--ink-soft); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.line-file-preview button { background: none; border: none; cursor: pointer; color: var(--red); }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal-card { background: var(--paper); border-radius: var(--radius); padding: 18px; max-width: 380px; width: 100%; max-height: 70vh; overflow-y: auto; }
.line-forward-target {
  padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--radius); margin-bottom: 8px;
  cursor: pointer; background: var(--card);
}
.line-forward-target:hover { border-color: var(--olive-deep); }

/* ---------- Notebook ---------- */
.notebook-block-card { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); padding: 12px 14px; margin-bottom: 10px; }
.notebook-block-card .block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; gap: 8px; flex-wrap: wrap; }
.notebook-block-card .block-type-label { font-weight: 700; font-size: 0.85rem; color: var(--olive-deep); }
.notebook-block-card .block-actions { display: flex; gap: 6px; }
.notebook-block-card .block-actions button {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; cursor: pointer;
  font-size: 0.85rem; padding: 3px 8px; color: var(--ink);
}
.notebook-block-card .block-actions button:hover { border-color: var(--olive-deep); }
.notebook-block-card .block-actions .remove-block { color: var(--red); }
.notebook-image-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.notebook-image-chip { position: relative; width: 64px; height: 64px; border-radius: 6px; overflow: hidden; border: 1px solid var(--rule); }
.notebook-image-chip img { width: 100%; height: 100%; object-fit: cover; }
.notebook-image-chip .remove-img { position: absolute; top: 0; right: 0; background: rgba(0,0,0,0.6); color: #fff; border: none; width: 18px; height: 18px; font-size: 11px; line-height: 1; cursor: pointer; }

.notebook-chapter-group { margin-bottom: 18px; }
.notebook-chapter-group > .chapter-heading { font-family: 'Lora', serif; font-weight: 700; font-size: 1rem; margin-bottom: 8px; color: var(--ink); }
.notebook-lesson-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--card); margin-bottom: 8px; cursor: pointer;
}
.notebook-lesson-row:hover { border-color: var(--olive-deep); }
.notebook-lesson-row.drag-over { border-color: var(--gold); border-style: dashed; }
.notebook-chapter-group.drag-over { outline: 2px dashed var(--gold); outline-offset: 6px; border-radius: 10px; } /* v190: drop target chapter */
.notebook-lesson-row .drag-handle { flex: 0 0 auto; }
.notebook-lesson-row .lesson-name { font-weight: 600; flex: 1; }
.notebook-lesson-row .lesson-actions { display: flex; gap: 12px; font-size: 0.8rem; flex: 0 0 auto; }
.notebook-lesson-row .lesson-actions button { background: none; border: none; text-decoration: underline; cursor: pointer; }
.notebook-lesson-row .lesson-actions .edit-btn { color: var(--olive-deep); }
.notebook-lesson-row .lesson-actions .remove-btn { color: var(--red); }

/* Student notebook navigation (chapter/lesson pickers, reuses .subject-grid look) */
.notebook-crumb { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 10px; }
.notebook-crumb a { color: var(--olive-deep); text-decoration: underline; cursor: pointer; }
.notebook-crumb .back-btn-xl { margin: 0 0 4px; }

.notebook-page {
  background: var(--card, #fffdf7);
  background-image: repeating-linear-gradient(var(--card, #fffdf7) 0, var(--card, #fffdf7) 27px, var(--rule) 28px);
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 22px 22px 22px 40px; position: relative; font-family: 'Lora', serif; line-height: 28px;
}
.notebook-page::before {
  content: ''; position: absolute; left: 26px; top: 0; bottom: 0; width: 1px; background: var(--red, #c0504d); opacity: 0.35;
}
.notebook-page h3 { margin: 0 0 4px; font-family: 'Lora', serif; }
.notebook-page .notebook-body { white-space: pre-wrap; color: var(--ink); margin-bottom: 16px; }
.notebook-page .notebook-images { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; line-height: normal; }
.notebook-page .notebook-images img { max-width: 220px; max-height: 220px; border-radius: 6px; border: 1px solid var(--rule); }
.notebook-page table.notebook-table { border-collapse: collapse; margin-bottom: 16px; line-height: normal; font-family: 'Noto Sans', sans-serif; }
.notebook-page table.notebook-table th, .notebook-page table.notebook-table td { border: 1px solid var(--rule); padding: 6px 12px; font-size: 0.9rem; }
.notebook-page table.notebook-table th { background: var(--olive-deep); color: var(--paper); }

/* Inline PDF viewer (Notebook, student view). The expand/rotate button
   scales the viewer itself to a full-screen landscape overlay — the same
   rotate trick as a device orientation lock, but scoped to just this
   viewer instead of the whole app. */
.notebook-pdf-frame-wrap { position: relative; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; height: 420px; margin: 0 0 16px; background: var(--card); }
.notebook-pdf-frame { width: 100%; height: 100%; border: none; display: block; }
.pdf-expand-toggle {
  position: absolute; bottom: 10px; right: 10px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--rule); color: var(--ink);
  font-size: 1.15rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.notebook-pdf-frame-wrap.pdf-expanded {
  position: fixed; top: 0; left: 0; z-index: 1000; margin: 0; border-radius: 0;
  width: 100vh; height: 100vw;
  transform-origin: top left; transform: rotate(90deg) translateY(-100%);
}
html body.notebook-pdf-expand-lock { overflow: hidden; }

/* PDF.js canvas viewer — replaces the old iframe (mobile browsers/PWAs
   generally have no built-in PDF renderer for an <iframe>, so it used to
   just show a bare "Open" fallback instead of the page). */
.notebook-pdf-viewer { display: flex; flex-direction: column; height: 100%; }
.pdf-canvas-wrap {
  flex: 1; overflow: auto; display: flex; align-items: flex-start; justify-content: center;
  background: var(--card); padding: 10px;
}
.pdf-canvas-wrap canvas { max-width: 100%; height: auto; box-shadow: 0 1px 6px rgba(0,0,0,0.2); background: #fff; }
.pdf-canvas-status { color: var(--ink-soft); font-size: 0.85rem; padding: 30px 0; }
.pdf-page-nav {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 10px; border-top: 1px solid var(--rule); background: var(--paper); font-size: 0.82rem;
}
.pdf-page-nav button {
  background: var(--card); border: 1px solid var(--rule); border-radius: 20px; padding: 5px 12px;
  color: var(--ink); cursor: pointer; font-size: 0.8rem;
}
.pdf-page-nav button:disabled { opacity: 0.4; cursor: default; }
.pdf-page-input {
  width: 44px; text-align: center; border: 1px solid var(--rule); border-radius: 6px; padding: 3px 4px;
  background: var(--card); color: var(--ink); font-size: 0.82rem;
}
.pdf-page-input.pdf-page-input-flash { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,0.35); }

/* Read Aloud */
.read-aloud-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.btn-read-aloud {
  background: var(--olive-deep); color: var(--paper); border: none; border-radius: 20px;
  padding: 8px 16px; font-size: 0.85rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.btn-read-aloud.active { background: var(--red, #b33); }
.read-aloud-controls {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px;
}
.read-aloud-controls button {
  background: var(--card); border: 1px solid var(--rule); border-radius: 20px; padding: 6px 12px;
  font-size: 0.8rem; color: var(--ink); cursor: pointer;
}
.read-aloud-controls button:disabled { opacity: 0.4; cursor: default; }

/* Arcade: "tap the pie" fraction items */
.pie-tap-wrap { display: flex; justify-content: center; }
.pie-tap-svg { width: 200px; height: 200px; max-width: 60vw; max-height: 60vw; }
.pie-slice { fill: #A5D6A7; stroke: var(--paper); stroke-width: 2; cursor: pointer; transition: fill 0.12s; }
.pie-slice:hover { fill: #81C784; }
.pie-slice.selected { fill: #2E7D32; }
.pie-slice.selected:hover { fill: #2E7D32; }
[data-theme="dark"] .pie-slice { fill: #1B4020; }
[data-theme="dark"] .pie-slice:hover { fill: #234F29; }
[data-theme="dark"] .pie-slice.selected { fill: #A5D6A7; }
[data-theme="dark"] .pie-slice.selected:hover { fill: #A5D6A7; }

/* Working scientific calculator (student "Scientific Calculator" tab) */
.sci-calc-wrap { display: flex; justify-content: center; margin: 0 0 22px; }
.sci-calc { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px; }
.sci-calc-display { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; text-align: right; min-height: 68px; }
.sci-calc-mode-row { display: flex; justify-content: space-between; gap: 8px; font-size: 0.72rem; color: var(--ink-soft); letter-spacing: 0.04em; }
.sci-calc-mode-row .hidden { visibility: hidden; }
.sci-calc-shift-tag { color: var(--amber); }
.sci-calc-alpha-tag { color: var(--red); }
.sci-calc-expr { font-size: 0.95rem; color: var(--ink-soft); min-height: 1.3em; overflow-x: auto; white-space: nowrap; }
.sci-calc-result { font-size: 1.7rem; font-weight: 600; color: var(--ink); min-height: 1.3em; overflow-x: auto; white-space: nowrap; }
.sci-calc-result.sci-calc-error { color: var(--red); }
.sci-calc-grid { display: flex; flex-direction: column; gap: 5px; }
.sci-calc-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.sci-calc-btn {
  position: relative; font-family: inherit; font-size: 0.8rem; padding: 12px 2px 8px; border-radius: 6px; border: 1px solid var(--rule);
  background: var(--paper); color: var(--ink); cursor: pointer; transition: background 0.12s; line-height: 1.15;
}
.sci-calc-btn .sci-calc-btn-tag {
  position: absolute; top: 1px; left: 0; right: 0; font-size: 0.55rem; font-weight: 600; color: var(--amber);
  white-space: nowrap; overflow: hidden; text-overflow: clip;
}
.sci-calc-btn:hover { background: var(--paper-2); }
.sci-calc-btn:active { background: var(--rule); }
.sci-calc-btn.active { background: var(--olive-deep); color: var(--paper); border-color: var(--olive-deep); }
.sci-calc-btn.active .sci-calc-btn-tag { color: var(--paper); }
.sci-calc-ac { background: var(--red-bg); color: var(--red); border-color: var(--red-bg); }
.sci-calc-alpha-btn.active { background: var(--red); color: #fff; border-color: var(--red); }
.sci-calc-eq { grid-column: span 2; background: var(--olive-deep); color: var(--paper); border-color: var(--olive-deep); font-weight: 600; }
.sci-calc-eq:hover { opacity: 0.9; }

/* Full-screen calculator tool view (student Subjects > Scientific Calculator) */
.sci-calc-fullscreen {
  position: fixed; inset: 0; z-index: 1000; background: var(--paper);
  display: flex; flex-direction: column; align-items: center; padding: 16px; overflow-y: auto;
}
.sci-calc-fullscreen .back-btn-xl { align-self: flex-start; margin-bottom: 14px; }
.sci-calc-fullscreen .sci-calc-wrap { margin-top: 8px; }
html body.sci-calc-fullscreen-lock { overflow: hidden; }

/* Conference (Phase 1: camera/mic check-in), teacher and student both */
#conf-overlay { position: fixed; inset: 0; z-index: 1000; }
.conf-fullscreen { height: 100%; background: var(--paper); display: flex; flex-direction: column; padding: 16px; overflow-y: auto; }
html body.conf-fullscreen-lock { overflow: hidden; }
.conf-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.conf-header .back-btn-xl { margin: 0; }
.conf-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.conf-sub { font-size: 0.82rem; color: var(--ink-soft); margin-top: 2px; }

.conf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; align-content: start; }
/* Each cell stacks the camera box and the student's name label right below
   it (a small, tight gap), instead of overlaying the name on the video. */
.conf-tile-cell { display: flex; flex-direction: column; gap: 3px; }
.conf-tile {
  position: relative; aspect-ratio: 4 / 3; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; overflow: hidden; opacity: 0.5; transition: opacity 0.15s;
}
.conf-tile.joined { opacity: 1; }
.conf-tile-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.conf-tile-avatar {
  width: 78px; height: 78px; border-radius: 50%; background: var(--olive-deep); color: var(--paper);
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 700; font-family: 'Lora', serif;
}
.conf-tile-label {
  font-size: 0.72rem; color: var(--ink); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.15s;
}
/* Turns bold green once that student actually joins the conference. */
.conf-tile-label.joined { color: var(--olive-deep); font-weight: 700; }
.conf-tile-badges { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.conf-badge {
  width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,0.45); color: rgba(255,255,255,0.55);
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
}
.conf-badge.on { background: var(--olive-deep); color: var(--paper); }
.conf-tile-status { position: absolute; top: 6px; left: 6px; font-size: 0.72rem; color: var(--ink-soft); background: rgba(255,255,255,0.7); padding: 1px 6px; border-radius: 8px; }
[data-theme="dark"] .conf-tile-status { background: rgba(0,0,0,0.4); color: var(--ink); }

.conf-self-view {
  position: relative; width: 100%; max-width: 360px; aspect-ratio: 4 / 3; margin: 0 auto 18px; background: var(--card);
  border: 1px solid var(--rule); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; overflow: hidden;
  transition: max-width 0.15s, max-height 0.15s;
}
/* While a slide is being presented, the slide is the main thing to look at —
   shrink the student's own camera preview down to a small corner-sized box. */
.conf-self-view.conf-self-view-compact { max-width: 140px; margin: 0 0 14px; }
.conf-self-view video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.conf-self-placeholder { font-size: 0.85rem; color: var(--ink-soft); text-align: center; padding: 0 16px; }
.conf-controls { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.conf-toggle-btn {
  font-family: inherit; font-size: 0.85rem; padding: 10px 18px; border-radius: 20px; border: 1px solid var(--rule);
  background: var(--paper); color: var(--ink); cursor: pointer;
}
.conf-toggle-btn.active { background: var(--olive-deep); color: var(--paper); border-color: var(--olive-deep); }

/* Conference: Present Slides + live layout. The slide (+ chat, right under it)
   sits on the left, sized to its own natural content (never shrunk or
   cropped); the student camera grid sits to its right, stretched to match
   the slide column's height and scrolling internally within that height —
   only that "viewing window" gets its own scrollbar. If the slide+chat
   column is ever taller than the screen (very tall slide, lots of chat),
   the whole page scrolls as a normal, safe fallback — it is never clipped. */
.conf-fullscreen-teacher .conf-header { flex: 0 0 auto; }
.conf-fullscreen-teacher .conf-live-layout { flex: 1 1 auto; }
.conf-fullscreen-teacher .conf-grid-panel { display: flex; flex-direction: column; min-height: 0; }
.conf-fullscreen-teacher .conf-grid-panel .conf-grid,
.conf-fullscreen-teacher .conf-grid-panel .empty-state { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

.conf-live-layout { display: flex; align-items: stretch; gap: 16px; }
.conf-present-panel { flex: 1 1 62%; min-width: 0; margin-bottom: 18px; }
.conf-grid-panel { flex: 1 1 34%; min-width: 220px; max-width: 420px; }
@media (max-width: 860px) {
  .conf-live-layout { flex-direction: column; }
  .conf-grid-panel { max-width: 100%; width: 100%; }
  .conf-fullscreen-teacher .conf-grid-panel .conf-grid { max-height: 320px; }
}
.conf-present-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.conf-present-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.conf-present-stage, .conf-slide-wrap {
  position: relative; width: 100%; margin: 0 auto; border-radius: var(--radius); overflow: hidden;
}
.conf-present-stage { margin-bottom: 6px; }
#conf-present-canvas, .conf-slide-wrap img { width: 100%; display: block; border: 1px solid var(--rule); border-radius: var(--radius); background: #fff; }
#conf-present-annot-canvas, #conf-present-zoom-canvas, .conf-slide-wrap canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; touch-action: none;
}
#conf-present-zoom-canvas { cursor: crosshair; }
#conf-present-zoom-canvas.conf-pannable { cursor: grab; }
#conf-present-zoom-canvas.conf-panning { cursor: grabbing; }
#btn-conf-present-annotate.active { cursor: crosshair; }
#btn-conf-present-zoom.active { cursor: crosshair; }
.conf-present-zoom-back {
  position: absolute; top: 8px; left: 8px; z-index: 5; width: 34px; height: 34px; border-radius: 50%;
  border: none; background: rgba(0,0,0,0.55); color: #fff; font-size: 1.2rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.conf-slide-stage { margin-bottom: 18px; }
/* The teacher's own camera, shown small over the slide (both on the
   teacher's own screen and on every student's screen) — about a fifth of
   the stage height, tucked in the upper right so it never covers the content. */
.conf-teacher-cam-overlay {
  position: absolute; top: 8px; right: 8px; z-index: 4; height: 20%; max-height: 120px; min-height: 54px;
  aspect-ratio: 4 / 3; object-fit: cover; background: #000; border: 2px solid #fff; border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
/* Camera grid: sized to comfortably show many tiles (up to ~40) — it fills
   its side panel and scrolls internally there, never the whole page. */
/* Tiles sized 150% larger than the original compact grid (84px → 126px) so
   the teacher can clearly see each student's face. */
.conf-grid-panel .conf-grid { grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 10px; padding-right: 2px; }
.conf-grid-panel .conf-grid .conf-tile-label, .conf-grid-panel .conf-grid .conf-tile-status { font-size: 0.62rem; }

/* Conference: idle placeholder shown in the slide-viewing area whenever no
   slide is being presented (before starting, and again after "Stop
   Presenting") — the CHIM loading gif (a growing sprout), fit to the space. */
.conf-idle-frame {
  width: min(560px, 92%); aspect-ratio: 340 / 130; margin: 24px auto; overflow: hidden; position: relative;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
}
.conf-idle-frame img.conf-idle-gif { position: absolute; width: 164.7%; height: auto; left: -35.59%; top: -58.46%; }

/* Conference: comment/chat section, visible to everyone in the room */
.conf-chat { margin-top: 18px; border-top: 1px solid var(--rule); padding-top: 12px; }
.conf-chat-messages {
  max-height: 160px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px;
  padding: 8px 10px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); font-size: 0.85rem;
}
.conf-chat-msg { word-break: break-word; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.conf-chat-msg .conf-chat-text { flex: 1 1 auto; min-width: 0; word-break: break-word; }
.conf-chat-from { font-weight: 700; color: var(--olive-deep); }
/* Edit/delete icons — shown only in the teacher's own comment section, next
   to a message the teacher sent; never shown on the student's screen. */
.conf-chat-icon-btn {
  flex: 0 0 auto; background: none; border: none; cursor: pointer; font-size: 0.78rem; padding: 0 2px; opacity: 0.6;
}
.conf-chat-icon-btn:hover { opacity: 1; }
.conf-chat-reaction { font-style: italic; color: var(--ink-soft); text-align: center; font-size: 0.8rem; }
.conf-chat-input-row { display: flex; align-items: center; gap: 8px; position: relative; }
.conf-chat-input-row input[type="text"] {
  flex: 1; font-family: inherit; font-size: 0.85rem; padding: 10px 14px; border-radius: 20px; border: 1px solid var(--rule);
  background: var(--paper); color: var(--ink);
}
.conf-reaction-btn {
  flex: 0 0 auto; font-size: 1.1rem; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--rule);
  background: var(--paper); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.conf-reaction-picker {
  position: absolute; bottom: 48px; left: 0; display: flex; gap: 4px; background: var(--paper); border: 1px solid var(--rule);
  border-radius: 20px; padding: 6px 8px; box-shadow: 0 4px 14px rgba(0,0,0,0.15); z-index: 4;
}
.conf-reaction-picker button { font-size: 1.2rem; background: none; border: none; cursor: pointer; padding: 2px 4px; }

.attendance-layout { display: flex; gap: 24px; flex-wrap: wrap; }
.attendance-calendar-wrap { flex: 1 1 280px; max-width: 340px; }
.attendance-stats-wrap { flex: 1 1 260px; max-width: 320px; }
.cal-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
#cal-month-label { font-weight: 600; font-size: 0.92rem; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 0.72rem; color: var(--ink-soft); margin-bottom: 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day {
  aspect-ratio: 1; border: 1px solid var(--rule); background: var(--card); border-radius: 8px;
  font-size: 0.8rem; color: var(--ink); display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer;
}
.cal-day.empty { border: none; background: none; cursor: default; }
.cal-day.today { border-color: var(--gold); }
.cal-day.selected { background: var(--olive-deep); color: var(--paper); border-color: var(--olive-deep); }
.cal-day.has-data::after { content: ''; position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.cal-day.selected.has-data::after { background: var(--paper); }
.stat-box { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px; text-align: center; }
.stat-box .stat-pct { font-size: 2rem; font-weight: 700; color: var(--olive-deep); }
.stat-box .stat-sub { font-size: 0.78rem; color: var(--ink-soft); margin-top: 4px; }
.attendance-day-table th, .attendance-day-table td { text-align: center; }
.attendance-day-table td:first-child, .attendance-day-table th:first-child { text-align: left; }

/* One horizontal row, right below the Summary/Import/Export buttons —
   shrinks/scrolls sideways instead of wrapping onto a second line. */
.tick-list {
  display: flex; align-items: center; flex-wrap: nowrap; overflow-x: auto;
  gap: 8px; margin: 6px 0 4px; -webkit-overflow-scrolling: touch;
}
.tick-list label {
  display: flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--rule);
  border-radius: 20px; padding: 6px 14px 6px 10px; font-size: 0.82rem; color: var(--ink); cursor: pointer;
  margin: 0; white-space: nowrap; flex: 0 0 auto;
}
.tick-list input[type="checkbox"] { accent-color: var(--olive-deep); width: 15px; height: 15px; margin: 0; }
@media (max-width: 480px) {
  .tick-list label { font-size: 0.76rem; padding: 5px 10px 5px 8px; }
}

/* Section multiselect: a collapsed button that opens a tick-box panel
   (used in Class setup, one per subject entered). */
.section-multiselect { position: relative; max-width: 340px; }
.section-multiselect-btn {
  width: 100%; text-align: left; background: var(--card); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 10px 14px; font-size: 0.88rem; color: var(--ink);
  cursor: pointer; display: flex; align-items: center; justify-content: space-between;
}
.section-multiselect-btn:hover { border-color: var(--olive-deep); }
.section-multiselect-panel {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20;
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 8px; max-height: 220px; overflow-y: auto; box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.section-multiselect-panel label {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 0.85rem;
  color: var(--ink); cursor: pointer; border-radius: 6px;
}
.section-multiselect-panel label:hover { background: var(--card); }
.section-multiselect-panel input[type="checkbox"] { accent-color: var(--olive-deep); width: 15px; height: 15px; margin: 0; }

.setup-subject-block {
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card);
  padding: 14px 16px; margin-bottom: 14px;
}

.teacher-subject-switcher-wrap { margin-top: 6px; }
.teacher-subject-switcher-wrap select {
  font-size: 0.82rem; padding: 5px 10px; border-radius: 20px; border: 1px solid var(--rule);
  background: var(--card); color: var(--ink);
}

.tabs { display: flex; gap: 4px; padding: 10px 20px 0; flex-wrap: wrap; border-bottom: 1px solid var(--rule); overflow-x: auto; }
.tab-btn {
  background: none; border: none; padding: 8px 14px 10px; font-size: 0.86rem; color: var(--ink-soft);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 60px;
}
.tab-btn .tab-icon { font-size: 1.5rem; line-height: 1; }
.tab-btn .tab-label { font-size: 0.72rem; }
.tab-btn.active { color: var(--ink); border-bottom-color: var(--gold); font-weight: 600; }

/* Grid variant — used for every "sub icon" row app-wide (Grades
   Term/Category/Assessment pickers, subject sub-icons, Notebook term
   tabs, Arcade mastery section tabs, section tabs, and the teacher's home
   screen). Sized the same big "app launcher" way everywhere, so a sub-icon
   grid always fills the page the same way the teacher dashboard does. */
.tabs.tabs-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 16px; border-bottom: none; padding: 26px 20px;
}
.tabs.tabs-grid .tab-btn {
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card);
  padding: 28px 10px; margin-bottom: 0;
}
.tabs.tabs-grid .tab-btn.active { border-color: var(--gold); background: var(--card); }
.tabs.tabs-grid .tab-btn .tab-icon { font-size: 2.8rem; }
.tabs.tabs-grid .tab-btn .tab-label { font-size: 0.92rem; font-weight: 600; }

/* The teacher's home screen specifically: a fixed 5-across grid (2 rows for
   its 10 icons) instead of auto-fill, so it always reads as one deliberate
   block rather than reflowing to however many columns happen to fit. */
#teacher-top-tabs.tabs-grid {
  grid-template-columns: repeat(5, 1fr);
}
@media (max-width: 700px) {
  #teacher-top-tabs.tabs-grid { grid-template-columns: repeat(2, 1fr); }
}

/* The student/parent Subjects sub-icon grid: always exactly 2 across, so
   the icons read as fixed pairs of rows rather than reflowing by width. */
#subject-sub-tabs.tabs-grid {
  grid-template-columns: repeat(2, 1fr);
}

.content { padding: 20px; max-width: 900px; margin: 0 auto; }
.panel-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.panel-title h2 { font-size: 1.15rem; }

/* Sits clustered to the right of the "Attendance" heading, all three
   buttons in one row — shrinks/scrolls sideways instead of wrapping. */
.attendance-actions-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; overflow-x: auto;
  max-width: 100%; -webkit-overflow-scrolling: touch; padding-bottom: 2px;
}
.attendance-actions-row .btn-small { white-space: nowrap; flex: 0 0 auto; }
@media (max-width: 480px) {
  .attendance-actions-row .btn-small { font-size: 0.78rem; padding: 8px 10px; }
}

.ledger { width: 100%; border-collapse: collapse; }
.ledger th { text-align: left; font-size: 0.72rem; color: var(--ink-soft); font-weight: 500; padding: 8px 10px; border-bottom: 2px solid var(--ink); }
.ledger td { padding: 10px; border-bottom: 1px solid var(--rule); font-size: 0.9rem; }

/* Learner's Individual Record Card — a full-bordered rectangular grid, DepEd-style. */
.record-card-table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.record-card-table th, .record-card-table td {
  border: 1px solid var(--rule); padding: 8px 6px; text-align: center; font-size: 0.82rem;
}
.record-card-table tr:first-child th { font-family: 'Lora', serif; font-size: 1rem; font-weight: 700; padding: 12px 6px; background: var(--card); }
.record-card-table td.label { text-align: left; font-weight: 600; background: var(--card); }
.record-card-table tr:nth-child(4) th { background: var(--card); font-weight: 700; }
.record-card-table tr:nth-child(5) th { background: var(--paper-2); font-size: 0.76rem; }
.record-card-table tr:last-child td { font-weight: 700; }

.status-pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.78rem; }
.status-present { background: var(--green-bg); color: var(--green-text); }
.status-late     { background: var(--amber-bg); color: var(--amber); }
.status-absent   { background: var(--red-bg); color: var(--red); }
.status-excused  { background: var(--card); color: var(--ink-soft); }
.status-multimodal { background: #E7E3F5; color: #4B3E8E; }

[data-theme="dark"] .status-multimodal { background: #3A3560; color: #C9BFF0; }

.status-btn-row { display: flex; gap: 6px; flex-wrap: wrap; }
.status-btn { border: 1px solid var(--rule); background: var(--paper); border-radius: 20px; padding: 5px 12px; font-size: 0.78rem; color: var(--ink-soft); }
.status-btn.selected.present { background: var(--green); color: #fff; border-color: var(--green); }
.status-btn.selected.late    { background: var(--gold); color: #fff; border-color: var(--gold); }
.status-btn.selected.absent  { background: var(--red); color: #fff; border-color: var(--red); }
.status-btn.selected.excused { background: var(--ink-soft); color: #fff; border-color: var(--ink-soft); }
.status-btn.selected.multimodal { background: #6B5CB8; color: #fff; border-color: #6B5CB8; }

.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; padding: 14px; background: var(--card); border-radius: var(--radius); }
.inline-form .field { flex: 1; min-width: 120px; }
.inline-form label { margin: 0 0 4px; }
.btn-small {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; background: var(--olive-deep); color: var(--paper); border: none;
  border-radius: var(--radius); font-size: 0.85rem; height: 41px; cursor: pointer; text-align: center;
}
.btn-small.btn-outline { background: var(--card); color: var(--ink); border: 1px solid var(--rule); }

.empty-state { padding: 40px 10px; text-align: center; color: var(--ink-soft); font-size: 0.9rem; border: 1px dashed var(--rule); border-radius: var(--radius); }

.student-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.student-row .name { font-weight: 500; }
.student-row .meta { font-size: 0.78rem; color: var(--ink-soft); }
.remove-btn { background: none; border: none; color: var(--red); font-size: 0.8rem; text-decoration: underline; }

.summary-cards { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.summary-card { flex: 1; min-width: 130px; border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; background: var(--card); }
.summary-card .big { font-family: 'Lora', serif; font-size: 1.5rem; font-weight: 600; }
.summary-card .label { font-size: 0.76rem; color: var(--ink-soft); }

.download-bar { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.btn-outline { background: transparent; border: 1px solid var(--olive-deep); border-radius: var(--radius); padding: 9px 16px; font-size: 0.85rem; color: var(--olive-deep); }
.btn-outline:hover { background: var(--olive-deep); color: var(--paper); }

.feedback-note { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.feedback-note .date { font-size: 0.75rem; color: var(--ink-soft); margin-bottom: 4px; }

.category-block { margin-bottom: 18px; }
.category-title { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 8px; font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.category-title .avg { font-size: 0.78rem; color: var(--ink-soft); font-weight: 400; }

@media (max-width: 560px) {
  .ledger { font-size: 0.85rem; }
  .content { padding: 14px; }
}

/* Bottom-of-screen notice: offline score saved / synced */
.chim-toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 10050; transform: translate(-50%, 20px);
  max-width: min(92vw, 440px); padding: 12px 16px; border-radius: var(--radius);
  background: var(--olive-deep); color: var(--paper); font-size: 0.85rem; line-height: 1.4;
  box-shadow: 0 6px 24px rgba(0,0,0,0.22); opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.chim-toast.show { opacity: 1; transform: translate(-50%, 0); }
.arcade-save-note { color: var(--ink-soft); font-size: 0.85rem; margin-top: 12px; text-align: left; }

/* ---------- v31: shared page header (< Back left, Save right) ---------- */
.page-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }

/* Attendance: "All" row under each status */
.attendance-day-table tr.att-all-row td { background: var(--card); border-bottom: 2px solid var(--rule); }
.att-all-row input[type="checkbox"], .att-check { accent-color: var(--olive-deep); width: 18px; height: 18px; }

/* Attendance: Term Dates */
.termdates-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 10px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.termdates-row strong { min-width: 64px; }
.termdates-row .termdates-input { width: 132px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); font-variant-numeric: tabular-nums; }
.termdates-row .termdates-input:focus { border: 2px solid var(--olive-deep); padding: 7px 9px; }

/* Grades: Excel-like sheet */
.grade-sheet { border-collapse: collapse; }
.grade-sheet th, .grade-sheet td { border: 1px solid var(--rule); padding: 6px 8px; text-align: center; white-space: nowrap; }
.grade-sheet td:nth-child(2) { text-align: left; }
.grade-sheet td:has(> .grade-sheet-cell) { padding: 0; }
.grade-sheet .grade-sheet-cell {
  width: 58px; height: 34px; padding: 0 6px; border: none; border-radius: 0; background: transparent;
  text-align: center; font-variant-numeric: tabular-nums; font-size: 0.9rem;
}
.grade-sheet .grade-sheet-cell:focus { outline: 2px solid var(--olive-deep); outline-offset: -2px; background: var(--card); border: none; }
.grade-sheet .grade-sheet-cell::placeholder { color: var(--ink-soft); opacity: 0.55; }
.grade-sheet-hps-row td { background: var(--green-bg); color: var(--green-text); font-weight: 600; }
.grade-sheet-hps-row td:first-child { text-align: left; }
.grade-sheet-hps-row td:not(:first-child) { text-align: center; } /* v676 its 2nd cell is WW1 (the label spans 2 columns), not the Name column */
.grade-sheet-hps-row .grade-sheet-cell { font-weight: 600; color: var(--green-text); }
.hps-default { opacity: 0.55; font-weight: 400; }
.grade-sheet .cell-over { background: var(--amber-bg); color: var(--amber); }
.grade-sheet .cell-invalid { background: var(--red-bg); color: var(--red); }

/* Line: conference buttons + parent's invite ticks */
.line-thread-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.line-conf-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pconf-invite { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
.pconf-invite-title { font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
.pconf-invite .tick-list { margin-bottom: 10px; }
.pconf-invite-error { color: var(--red); font-size: 0.82rem; margin-left: 10px; }

/* Private conference: two remote cams side by side, own cam below with overlay controls */
.pconf-remote-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.pconf-remote-row .conf-tile { aspect-ratio: 4 / 3; }
.pconf-remote-row .conf-tile-label { font-size: 0.85rem; }
.pconf-not-invited { opacity: 0.45; }
.pconf-self {
  position: relative; width: 100%; max-width: 420px; aspect-ratio: 4 / 3; margin: 0 auto 6px;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pconf-self video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.pconf-self-name { position: absolute; top: 8px; left: 8px; font-size: 0.72rem; padding: 2px 8px; border-radius: 10px; background: rgba(0,0,0,0.45); color: #fff; }
.pconf-self-controls { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 12px; }
.pconf-ctl {
  width: 48px; height: 48px; border-radius: 50%; border: none; font-size: 1.2rem; cursor: pointer;
  background: rgba(0,0,0,0.55); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.pconf-ctl.active { background: var(--olive-deep); }
@media (max-width: 480px) { .pconf-remote-row { gap: 8px; } }

/* ---------- v32 ---------- */
.attendance-summary-table th, .attendance-summary-table td { text-align: center; }
.attendance-summary-table th:first-child, .attendance-summary-table td:first-child { text-align: left; }
.attendance-summary-table thead tr:first-child th[colspan] { border-bottom: 1px solid var(--rule); }
.attendance-summary-table td:nth-child(2n+2), .attendance-summary-table thead tr:last-child th:nth-child(odd) { border-left: 1px solid var(--rule); }
.student-row-actions { white-space: nowrap; }
.move-btn { background: none; border: 1px solid var(--olive-deep); color: var(--olive-deep); border-radius: 6px; padding: 3px 10px; font-size: 0.8rem; margin-right: 8px; cursor: pointer; }
.move-btn:hover { background: var(--olive-deep); color: var(--paper); }
.student-row-actions .move-section-select { width: auto; min-width: 90px; margin-right: 6px; }
.student-row-actions .move-confirm-btn { height: 32px; padding: 4px 12px; }

/* ---------- v33: Pod ---------- */
#pod-overlay { position: fixed; inset: 0; z-index: 1050; background: var(--paper); }
.pod-shell { height: 100%; display: flex; flex-direction: column; padding: 14px 16px; max-width: 980px; margin: 0 auto; }
.pod-header { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.pod-title { flex: 1; min-width: 180px; }
.pod-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pod-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pod-name-row { font-size: 0.78rem; color: var(--ink-soft); margin: 0 0 6px; }
.pod-messages { flex: 1; min-height: 160px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); }
[data-theme="dark"] .pod-messages { background: var(--card); }
.pod-msg { position: relative; display: flex; align-items: flex-end; gap: 4px; max-width: 82%; }
.pod-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.pod-msg.theirs { align-self: flex-start; }
.pod-bubble { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 8px 12px; font-size: 0.9rem; word-break: break-word; min-width: 90px; }
.pod-msg.mine .pod-bubble { background: #4A5A28; color: #fff; border-color: #4A5A28; }
.pod-msg.mine .pod-bubble a { color: #E6F0CF; }
.pod-bubble.deleted { background: transparent !important; color: var(--ink-soft) !important; font-style: italic; border-style: dashed; }
.pod-msg-actions { display: flex; flex-direction: column; gap: 2px; opacity: 0.35; transition: opacity .15s; }
.pod-msg:hover .pod-msg-actions, .pod-msg:focus-within .pod-msg-actions { opacity: 1; }
.pod-file-chip { display: flex; align-items: center; gap: 6px; margin: 4px 0; padding: 8px 10px; width: 100%; text-align: left; border-radius: 10px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); cursor: pointer; font: inherit; }
.pod-file-chip span { flex: 1; font-weight: 600; overflow-wrap: anywhere; }
.pod-file-chip small { color: var(--ink-soft); white-space: nowrap; }
.pod-reactions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.pod-react-chip { border: 1px solid var(--rule); background: var(--paper); color: var(--ink); border-radius: 12px; padding: 1px 8px; font-size: 0.8rem; cursor: pointer; }
.pod-react-chip.mine { border-color: var(--gold); background: var(--amber-bg); }
.pod-react-picker { z-index: 1150; }
.pod-send-status { font-size: 0.8rem; color: var(--ink-soft); margin-top: 4px; min-height: 1.1em; }
.pod-call-area { margin-bottom: 10px; padding: 10px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.pod-call-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.pod-call-grid .conf-tile { aspect-ratio: 4 / 3; }
.pod-call-self { max-width: 300px; }
.pod-sort-label { font-size: 0.85rem; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; margin: 0; }
.pod-sort-label select { width: auto; }
#pod-files-kinds { margin-bottom: 10px; }
#pod-files-kinds input[type="radio"] { accent-color: var(--olive-deep); }
.pod-files-table th .pod-sort-btn { background: none; border: none; padding: 0; font: inherit; font-weight: 600; color: var(--ink-soft); cursor: pointer; font-size: 0.72rem; }
.pod-file-name { background: none; border: none; padding: 0; font: inherit; color: var(--olive-deep); font-weight: 600; text-align: left; cursor: pointer; text-decoration: underline; overflow-wrap: anywhere; }
.pod-popup-card { text-align: center; }
.pod-popup-icon { font-size: 2.4rem; }
.pod-popup-name { margin: 6px 0 4px; font-size: 1rem; overflow-wrap: anywhere; }
.pod-popup-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
#pod-file-popup { z-index: 1100; }
@media (max-width: 560px) { .pod-shell { padding: 10px; } .pod-msg { max-width: 94%; } }

/* ---------- v34: FlashGrade ---------- */
.fg-icon { width: 2.9rem; height: 2.9rem; display: block; }
.fg-icon-sm { width: 1.6rem; height: 1.6rem; vertical-align: -0.35rem; margin-right: 4px; }
.fg-title { margin: 0 0 12px; font-size: 1.1rem; }
.tabs.tabs-grid .tab-btn.fg-tile { border-color: #6CC33A; }
.fg-sub { font-size: 0.76rem; color: var(--ink-soft); font-weight: 400; }
.fg-warn { color: var(--amber); font-weight: 600; }
.fg-note { font-size: 0.82rem; color: var(--ink-soft); margin: 6px 0 4px; }
.fg-list-table td { vertical-align: middle; }
.fg-row-actions { white-space: nowrap; }
.fg-row-actions .btn-small { height: 34px; padding: 6px 10px; font-size: 0.8rem; margin: 2px 2px 2px 0; }
.fg-form label { margin-top: 12px; }
.fg-key-text { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.12em; font-size: 1rem; text-transform: uppercase; }
.fg-key-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; margin-top: 10px; }
.fg-key-item { display: flex; align-items: center; gap: 3px; }
.fg-key-n { width: 22px; text-align: right; font-size: 0.78rem; color: var(--ink-soft); margin-right: 3px; font-variant-numeric: tabular-nums; }
.fg-key-btn { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); font-size: 0.72rem; font-weight: 700; cursor: pointer; padding: 0; }
.fg-key-btn.on { background: var(--olive-deep); border-color: var(--olive-deep); color: var(--paper); }
#fg-tags { font-size: 0.85rem; }
.fg-popup-card { max-width: 420px; }
.fg-popup-card select, .fg-popup-card input { margin-bottom: 4px; }
#fg-popup { z-index: 1200; }

/* Results */
.fg-results-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.fg-results-bar label { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 0.85rem; }
.fg-results-bar select { width: auto; }
.fg-h { font-size: 1rem; margin: 22px 0 8px; }
.fg-table th, .fg-table td { text-align: center; padding: 6px 8px; font-size: 0.84rem; }
.fg-table td.fg-tag, .fg-table th:nth-child(2) { text-align: left; }
.fg-narrow { max-width: 420px; }
.fg-ia td.fg-key-cell { background: var(--green-bg); font-weight: 700; }
.fg-total td { font-weight: 700; border-top: 2px solid var(--ink); }
.fg-mastery { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.74rem; font-weight: 600; white-space: nowrap; }
.fg-m5 { background: #D8F0C4; color: #2B5A12; }
.fg-m4 { background: #E8F5D8; color: #3F6B1E; }
.fg-m3 { background: #FFF1CC; color: #7A5A00; }
.fg-m2 { background: #FDE2CF; color: #8A3F0B; }
.fg-m1 { background: #F9D2D2; color: #8E1F1F; }
[data-theme="dark"] .fg-mastery { filter: brightness(0.85); }
.fg-two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }

/* Grade Now scanner */
#fg-scan-overlay { position: fixed; inset: 0; z-index: 1100; background: #10140c; color: #fff; }
.fg-scan-shell { height: 100%; display: flex; flex-direction: column; max-width: 900px; margin: 0 auto; }
.fg-scan-top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.fg-scan-top .back-btn-xl { background: transparent; color: #CFE8B0; border-color: #CFE8B0; }
.fg-scan-title { flex: 1; min-width: 0; }
.fg-scan-title .fg-sub { color: #B7C4A8; }
.fg-scan-top .icon-btn.active { background: #F6D34A; }
.fg-scan-view { position: relative; flex: 1; min-height: 0; background: #000; }
.fg-scan-view video, .fg-scan-view canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
#fg-scan-overlay .fg-scan-view video { object-fit: cover; } /* v189: camera fills the screen; line up the 4 boxes */
.fg-scan-view { overflow: hidden; }
.fg-scan-guide { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); background: rgba(0,0,0,0.55); padding: 4px 10px; border-radius: 12px; font-size: 0.74rem; color: #E8F0DD; white-space: nowrap; max-width: 94%; overflow: hidden; text-overflow: ellipsis; }
.fg-scan-status { padding: 10px 14px; font-size: 0.92rem; font-weight: 600; min-height: 2.6em; background: #1A2113; }
.fg-scan-status.good { background: #2E5A17; }
.fg-scan-status.warn { background: #3A3314; color: #F6E7A8; }
.fg-scan-status.bad { background: #5A1E1E; }
.fg-scan-bottom { display: flex; justify-content: center; gap: 10px; padding: 10px; background: #1A2113; }
.fg-scan-card { position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%); width: min(94vw, 620px); max-height: 62vh; overflow-y: auto; background: var(--paper); color: var(--ink); border-radius: 14px; padding: 14px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); z-index: 5; }
/* v199: 5-second score on the camera (tap to open the sheet) */
.fg-score-badge { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 22px; border: 3px solid #7CD34A; border-radius: 18px; background: rgba(20,40,12,0.88); color: #fff; font-family: inherit; cursor: pointer; box-shadow: 0 8px 30px rgba(0,0,0,0.5); max-width: 90%; }
.fg-score-badge.go { animation: fgSbIn 0.25s ease-out; }
.fg-sb-name { font-size: 1rem; font-weight: 700; max-width: 80vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg-sb-score { font-family: 'Lora', serif; font-size: 2.1rem; font-weight: 700; color: #B8F08F; white-space: nowrap; }
.fg-sb-note { font-size: 0.75rem; color: #F6E7A8; }
.fg-sb-tap { font-size: 0.7rem; color: #CFE3BE; opacity: 0.85; }
@keyframes fgSbIn { from { transform: translate(-50%, -50%) scale(0.8); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.fg-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.fg-card-score { font-family: 'Lora', serif; font-size: 2rem; font-weight: 700; color: var(--olive-deep); white-space: nowrap; }
.fg-card-score small { font-size: 1rem; color: var(--ink-soft); }
.fg-card-problems { margin: 8px 0; padding: 8px 10px; border-radius: 8px; background: var(--amber-bg); color: var(--amber); font-size: 0.84rem; line-height: 1.45; }
.fg-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
/* v181: scan settings, light meter, tap-to-focus, simulated answer sheet */
.fg-light-pill { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); padding: 4px 12px; border-radius: 14px; font-size: 0.78rem; font-weight: 700; background: rgba(0,0,0,0.55); color: #E8F0DD; white-space: nowrap; max-width: 94%; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.fg-light-pill:empty { display: none; }
.fg-light-pill.dark, .fg-light-pill.bright { background: rgba(150,30,30,0.85); color: #fff; }
.fg-light-pill.glare { background: rgba(160,120,10,0.9); color: #fff; }
.fg-focus-ring { position: absolute; width: 64px; height: 64px; margin: -32px 0 0 -32px; border: 2px solid #F6D34A; border-radius: 50%; pointer-events: none; }
.fg-focus-ring.go { animation: fgFocus 0.9s ease-out; }
@keyframes fgFocus { from { transform: scale(1.6); opacity: 0.4; } 40% { transform: scale(1); opacity: 1; } to { opacity: 0.2; } }
.fg-seg { display: flex; gap: 0; margin: 4px 0 6px; border: 1.5px solid var(--rule); border-radius: 10px; overflow: hidden; }
.fg-seg button { flex: 1; padding: 9px 6px; border: 0; border-right: 1px solid var(--rule); background: var(--paper); color: var(--ink); font-weight: 700; font-size: 0.86rem; cursor: pointer; }
.fg-seg button:last-child { border-right: 0; }
.fg-seg button.on { background: var(--olive-deep); color: #fff; }
.fg-check { display: flex !important; align-items: center; gap: 8px; font-weight: 600; margin: 8px 0; }
.fg-check input { width: auto; margin: 0; }
.fg-set-help { margin: 0 0 6px; font-size: 0.78rem; line-height: 1.4; }
.fg-sheet-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.fg-sheet-tools .fg-check { margin: 0; font-size: 0.85rem; }
.fg-sheet-zoombtns { display: inline-flex; gap: 4px; }
.fg-sheet-zoombtns .btn-small { min-width: 38px; padding: 4px 10px; font-size: 1.05rem; }
.fg-sheet-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 6px 0 2px; font-size: 0.74rem; color: var(--ink-soft); }
.fg-sheet-legend span { display: inline-flex; align-items: center; gap: 4px; }
.fg-sheet-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 1px solid #333; }
.fg-sheet-legend i.ring { background: #fff; border: 2px solid #1E9E3A; }
.fg-sheet-box { overflow: auto; border: 1px solid var(--rule); border-radius: 8px; background: #fff; max-height: 52vh; -webkit-overflow-scrolling: touch; }
.fg-sheet-zoom { min-width: 100%; }
.fg-sheet-svg { display: block; width: 100%; height: auto; }
.fg-sheet-svg .fg-hit { cursor: pointer; }
.fg-sheet-popup { max-width: 640px; width: 100%; }
.fg-sheet-popup .fg-sheet-box { max-height: 60vh; }
.fg-sheet-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.fg-sheet-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; padding: 10px 12px; border: 1.5px solid var(--rule); border-radius: 10px; background: var(--card); color: var(--ink); cursor: pointer; font: inherit; }
.fg-sheet-item:hover { border-color: var(--olive); }
.fg-sheet-item .fg-si-name { font-weight: 700; }
.fg-sheet-item .fg-sub { grid-column: 1; }
.fg-sheet-item .fg-si-score { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-family: 'Lora', serif; font-weight: 700; font-size: 1.15rem; color: var(--olive-deep); }
.fg-scan-card { max-height: 74vh; }
.fg-scan-card .fg-sheet-box { max-height: 40vh; }
.fg-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 3px; margin-top: 8px; }
.fg-strip-cell { display: flex; flex-direction: column; align-items: center; padding: 2px 0; border-radius: 5px; font-weight: 700; font-size: 0.82rem; background: var(--card); border: 1px solid var(--rule); }
.fg-strip-cell small { font-size: 0.58rem; font-weight: 400; color: var(--ink-soft); }
.fg-strip-cell.right { background: var(--green-bg); border-color: #9CC77A; }
.fg-strip-cell.wrong { background: var(--red-bg); border-color: #E3A3A3; }
.fg-strip-cell.unsure { background: #FFF1CC; border-color: #E0B94A; }

/* v35: Arcade score resets */
.score-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-small.btn-reset { background: transparent; color: var(--red); border: 1px solid var(--red); }
.btn-small.btn-reset:hover { background: var(--red); color: var(--paper); }
.btn-reset-row { background: transparent; color: var(--red); border: 1px solid transparent; border-radius: 8px; padding: 4px 8px; font-size: 0.78rem; cursor: pointer; white-space: nowrap; }
.btn-reset-row:hover { border-color: var(--red); }
.ledger td.reset-cell { width: 1%; text-align: right; }

/* v36: Attendance "Share to" sheet */
.share-sheet-overlay { position: fixed; inset: 0; background: rgba(20, 24, 16, 0.45); display: flex; align-items: flex-end; justify-content: center; z-index: 3000; padding: 16px; }
.share-sheet { background: var(--paper); border: 1px solid var(--rule); border-radius: 16px; width: 100%; max-width: 420px; padding: 18px 16px 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.share-sheet-title { font-family: 'Lora', serif; font-weight: 600; font-size: 1.05rem; color: var(--ink); margin-bottom: 14px; text-align: center; }
.share-sheet-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.share-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 4px; font-size: 0.78rem; color: var(--ink); cursor: pointer; }
.share-opt:hover { border-color: var(--olive-deep); }
.share-ico { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.share-ico-messenger { background: #E3ECFF; }
.share-ico-whatsapp { background: #DDF5E4; }
.share-ico-sms { background: #EAF3DE; }
.share-ico-email { background: #FAEEDA; }
.share-sheet-cancel { display: block; margin: 12px auto 0; }
@media (min-width: 700px) { .share-sheet-overlay { align-items: center; } }
.share-opt small { font-size: 0.66rem; color: var(--ink-soft); margin-top: -4px; }

/* v37: FlashGrade list (two rows per assessment) */
.fg-list { display: flex; flex-direction: column; gap: 10px; }
.fg-list-head, .fg-list-row1 { display: grid; grid-template-columns: minmax(0, 1fr) 64px 64px 84px 84px; gap: 8px; align-items: center; }
.fg-list-head { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); padding: 0 14px; }
.fg-list-head span:not(:first-child), .fg-list-row1 > div:not(:first-child) { text-align: center; }
.fg-list-item { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; }
.fg-list-desc { font-size: 0.82rem; color: var(--olive-deep); margin-top: 2px; }
.fg-list-row2 { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--rule); }
.fg-list-row2 .fg-del-btn { color: var(--red); border-color: var(--red); }
@media (max-width: 640px) {
  .fg-list-head { display: none; }
  .fg-list-row1 { grid-template-columns: repeat(4, 1fr); }
  .fg-list-row1 .fg-list-name { grid-column: 1 / -1; }
  .fg-list-row1 > div[data-label]::before { content: attr(data-label); display: block; font-size: 0.68rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }
}
/* Results pages */
.fg-page-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.fg-bar-spacer { flex: 1; }
.report-dl { display: flex; gap: 8px; flex-wrap: wrap; }

/* v37: Daily Journal */
.journal-new { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; max-width: 720px; }
.journal-new textarea, .journal-table textarea { width: 100%; font: inherit; }
.journal-entries-label { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.journal-entries-label::before, .journal-entries-label::after { content: ''; flex: 1; border-top: 1px dashed var(--rule); }
.journal-table td { vertical-align: top; }
.journal-table .journal-body { min-width: 220px; white-space: normal; }
.journal-actions { white-space: nowrap; text-align: right; }
.journal-actions .btn-small { margin: 0 4px 4px 0; }

/* v38: Master home + Admin report */
.admin-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.admin-bar .section-tabs { padding: 0; margin: 0; }
.admin-bar select { width: auto; }
.admin-bar2 { border-top: 1px dashed var(--rule); padding-top: 10px; }
.admin-scroll { overflow-x: auto; background: #fff; border-radius: 8px; padding: 6px; }
.admin-report { border-collapse: collapse; font-family: Arial, 'IBM Plex Sans', sans-serif; color: #111; min-width: 100%; }
.admin-report td { border: 1px solid #7F8FA6; padding: 6px 8px; text-align: center; font-size: 0.82rem; }
.admin-report .admin-info td { border: none; padding: 4px 6px; }
.admin-report .admin-lab { text-align: right; font-weight: 500; white-space: nowrap; }
.admin-report .admin-val { background: #DDD9C3 !important; border: 1px solid #BFB9A0 !important; font-weight: 700; font-style: italic; }
.admin-report .admin-title { background: #C9C9C9; font-weight: 700; font-size: 1rem; letter-spacing: 0.02em; }
.admin-report .admin-sec-head { background: #C27BA0; font-weight: 700; min-width: 90px; }
.admin-report .admin-band { color: #fff; font-weight: 700; font-size: 0.78rem; }
.admin-report .admin-subj { font-weight: 600; font-size: 0.74rem; min-width: 92px; }
.admin-report .admin-sec { color: #fff; font-weight: 700; white-space: nowrap; }
.admin-report .admin-cell { font-weight: 700; font-style: italic; cursor: pointer; position: relative; }
.admin-report .admin-cell:hover { outline: 2px solid var(--olive-deep); outline-offset: -2px; }
.admin-report .admin-off { background: #000 !important; }
.admin-report .admin-mps-lab { text-align: left; font-weight: 700; }
.admin-report .admin-mps { color: #38761D; font-weight: 700; font-size: 0.98rem; text-decoration: underline; }
.admin-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--olive-deep); margin-left: 4px; vertical-align: middle; }
.admin-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.admin-settings-grid label { font-size: 0.8rem; }
.admin-groups-list { max-height: 45vh; overflow-y: auto; border: 1px solid var(--rule); border-radius: 8px; }
.admin-group-row { display: grid; grid-template-columns: 1fr 110px 64px; gap: 8px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--rule); font-size: 0.85rem; }
.admin-group-row:last-child { border-bottom: none; }
.admin-group-row select, .admin-group-row input { margin: 0; }

/* v39: Skill game question bank */
.arcade-q-new { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; max-width: 760px; }
.arcade-q-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; }
.arcade-q-fields label { font-size: 0.8rem; }
.arcade-q-fields textarea, .arcade-q-left textarea { width: 100%; font: inherit; }
@media (max-width: 600px) { .arcade-q-fields { grid-template-columns: 1fr; } }
.arcade-q-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; max-width: 900px; }
.arcade-q-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; }
.arcade-q-num { font-weight: 700; color: var(--ink-soft); text-align: center; }
.arcade-q-text { font-weight: 600; }
.arcade-q-answer { font-size: 0.85rem; color: var(--ink-soft); margin-top: 2px; }
.arcade-q-left input { margin-top: 6px; }
.arcade-q-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 600px) { .arcade-q-row { grid-template-columns: 26px minmax(0, 1fr); } .arcade-q-actions { grid-column: 1 / -1; justify-content: flex-start; } }

/* v39: Mastery game form */
.mqf-icons { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.mqf-icon { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--rule); background: var(--card); font-size: 1.2rem; cursor: pointer; }
.mqf-icon.active { border: 2px solid var(--olive-deep); background: var(--paper); }
.mq-del-link { color: var(--red) !important; }

/* v39: Student barcode IDs */
.id-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.id-card-img { width: 100%; height: auto; border-radius: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.12); background: #fff; }
.arcade-q-actions button[disabled] { opacity: 0.4; cursor: not-allowed; }

/* v41: question cards (Mastery Questions, Tasks → Assignments) */
.mq-q-card, .asg-q-card { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.mq-q-card.editing, .asg-q-card.editing { border: 2px solid var(--olive-deep); background: var(--paper); }
.mq-q-card textarea { width: 100%; font: inherit; }
.mq-q-view-text, .asg-q-view-text { font-weight: 600; margin-bottom: 6px; }
.mq-q-view-choices { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px; }
.mq-q-view-choices li { border: 1px solid var(--rule); border-radius: 8px; padding: 6px 10px; font-size: 0.9rem; background: var(--paper); }
.mq-q-view-choices li.correct { border-color: #4f9a52; background: #EAF3DE; color: #27500A; }
.mq-choice-letter { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; background: var(--olive-deep); color: #fff; font-size: 0.75rem; font-weight: 700; margin-right: 4px; flex: none; }
.mq-choice-edit { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.mq-choice-edit input[type="text"] { flex: 1; margin: 0; }
.mq-q-actions, .asg-q-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.mq-saved-flag { color: #27500A; font-weight: 700; font-size: 0.85rem; }
.asg-q-card { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
.asg-q-no { font-weight: 700; color: var(--ink-soft); text-align: center; padding-top: 2px; }
.asg-q-view-answer { font-size: 0.9rem; color: var(--ink-soft); }
.asg-q-count { font-size: 0.82rem; color: var(--ink-soft); margin: 4px 0; }

/* v42: FlashGrade export menus */
.fg-export-wrap { position: relative; display: inline-block; }
.fg-export-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,0.18); padding: 12px 14px; width: 290px; }
.fg-export-title { font-weight: 600; font-size: 0.85rem; margin-bottom: 8px; color: var(--ink); }
.fg-export-opt { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; padding: 5px 0; margin: 0; cursor: pointer; }
.fg-export-opt input { width: auto; margin: 0; }
.fg-export-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 8px; }
.arcade-q-sample { background: var(--paper); border-style: dashed; }

/* v42: Join Code card */
.join-code-card { text-align: center; padding: 8px 4px; }
.join-code-lead { font-family: 'Lora', serif; font-size: 1.05rem; color: var(--ink); margin-bottom: 10px; }
.join-code-value { font-family: 'IBM Plex Sans', monospace; font-size: 2.2rem; font-weight: 700; letter-spacing: 0.12em; color: var(--olive-deep); background: var(--card); border: 2px dashed var(--olive-soft); border-radius: 14px; padding: 12px 18px; display: inline-block; user-select: all; }
@media (max-width: 700px) {
  .fg-export-menu { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; max-height: 70vh; overflow-y: auto; z-index: 3000; }
}

/* v43: attendance calendar — days with attendance taken are green */
.cal-day.has-data { background: #2E6B2A; color: #FFFFFF; border-color: #2E6B2A; flex-direction: column; gap: 1px; }
.cal-day.has-data::after, .cal-day.selected.has-data::after { display: none; }
.cal-day.selected.has-data { box-shadow: 0 0 0 3px var(--gold); }
.cal-day .cal-num { line-height: 1; }
.cal-day .cal-mark { font-size: 0.72rem; font-weight: 700; line-height: 1; }
.cal-day .cal-mark.word { font-size: 0.5rem; font-weight: 600; letter-spacing: -0.01em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
[data-theme="dark"] .cal-day.has-data { background: #A8D98A; color: #16240F; border-color: #A8D98A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cal-day.has-data { background: #A8D98A; color: #16240F; border-color: #A8D98A; } }
.taken-card { text-align: center; }
.taken-icon { font-size: 2rem; margin-bottom: 6px; }
/* The selected day without attendance is outlined, so it isn't mistaken for a green "taken" day. */
.cal-day.selected:not(.has-data) { background: var(--card); color: var(--ink); border: 2px solid var(--gold); font-weight: 700; }

/* v44: Summary page ticks + download menu; ID name list */
.summary-dl { align-items: center; }
.summary-tick { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; margin: 0; cursor: pointer; white-space: nowrap; }
.summary-tick input { width: auto; margin: 0; }
.summary-dl-opt { display: block; width: 100%; text-align: left; margin: 0 0 8px; }
.ids-name-list { max-height: 46vh; overflow-y: auto; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 4px 0; }
#ids-pdf-menu { width: 300px; }
.feedback-table td { vertical-align: top; }
.feedback-table td:last-child { min-width: 220px; white-space: normal; }

/* v44: Item Analysis per Student + scrolling table box */
.fg-h-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 8px; flex-wrap: wrap; }
.fg-h-row .fg-h { margin: 0; }
.fg-scroll-box { overflow-x: auto !important; overflow-y: visible !important; border: 1px solid var(--rule); border-radius: 10px; -webkit-overflow-scrolling: touch; }
.fg-scroll-box table { margin: 0; }
.fg-scroll-box thead th { position: sticky; top: 0; z-index: 2; background: var(--paper); }
.fg-ps td:nth-child(2), .fg-ps th:nth-child(2) { white-space: nowrap; }
.fg-ps th { min-width: 70px; }
.fg-low-cell { background: rgba(192, 57, 43, 0.14); color: #9B2C20; font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fg-low-cell { color: #F2A99F; background: rgba(242, 169, 159, 0.14); } }
:root[data-theme="dark"] .fg-low-cell { color: #F2A99F; background: rgba(242, 169, 159, 0.14); }

/* v44: Share pop-up (teacher tick list) */
.fg-popup-card { position: relative; }
.share-pop-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); font-size: 1rem; line-height: 1; cursor: pointer; padding: 0; }
.share-dd { position: relative; }
.share-dd-btn { width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; }
.share-dd-list { margin-top: 6px; border: 1px solid var(--rule); border-radius: 10px; padding: 8px 12px; max-height: 40vh; overflow-y: auto; background: var(--paper); }
.share-dd-list .fg-export-opt { align-items: flex-start; }
.share-dd-list .fg-export-opt input { margin-top: 3px; }
.share-pop-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.lesson-row-actions { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lesson-row-actions .btn-small { padding: 4px 10px; font-size: 0.78rem; height: auto; }
.page-bar { flex-wrap: wrap; }
.page-bar .back-btn-xl { flex-shrink: 0; white-space: nowrap; }

/* v45: grade sheet cells filled from FlashGrade */
.grade-sheet td.fg-filled, .grade-sheet td.fg-filled input { background: rgba(212, 160, 23, 0.16); }
.grade-sheet td.fg-filled input { cursor: not-allowed; font-weight: 600; }

/* v46: PETA See Responses */
.perf-resp-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 10px; }
.perf-resp-bar label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 0.85rem; }
.perf-resp-bar select { width: auto; margin: 0; }
.perf-resp-table th, .perf-resp-table td { font-size: 0.82rem; vertical-align: top; }
.perf-resp-table th { min-width: 90px; }
.perf-resp-table .nowrap { white-space: nowrap; }
.perf-q-sub { font-weight: 400; color: var(--ink-soft); font-size: 0.72rem; margin-top: 2px; }
.perf-q-key { font-weight: 600; color: var(--ink); font-size: 0.72rem; margin-top: 2px; }
.perf-sort-th { cursor: pointer; text-decoration: underline dotted; }
.perf-hps-row th { background: rgba(212, 160, 23, 0.16) !important; top: auto !important; position: static !important; }
.perf-pts { width: 64px; margin: 0; padding: 4px 6px; }
.perf-score-input { width: 64px; margin: 0; padding: 4px 6px; }
.perf-right { color: #2E6B2A; }
.perf-wrong { color: #9B2C20; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .perf-right { color: #A8D98A; } :root:not([data-theme="light"]) .perf-wrong { color: #F2A99F; } }
:root[data-theme="dark"] .perf-right { color: #A8D98A; }
:root[data-theme="dark"] .perf-wrong { color: #F2A99F; }

/* v46: Attendance Summary by month (day-by-day remarks) */
.att-month-head { display: flex; align-items: center; gap: 10px; margin: 14px 0 8px; flex-wrap: wrap; }
.att-month-head select { width: auto; margin: 0; }
.att-month-table th, .att-month-table td { text-align: center; padding: 5px 4px; font-size: 0.78rem; min-width: 24px; }
.att-month-table .att-name-col { text-align: left; min-width: 140px; white-space: nowrap; position: sticky; left: 0; background: var(--paper); z-index: 1; }
.att-month-table thead .att-name-col { z-index: 3; }
.att-weekend { background: rgba(120, 120, 120, 0.08); }
.att-code { font-weight: 700; }
.att-P, .att-L, .att-M { color: #2E6B2A; }
.att-A, .att-E { color: #9B2C20; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .att-P, :root:not([data-theme="light"]) .att-L, :root:not([data-theme="light"]) .att-M { color: #A8D98A; } :root:not([data-theme="light"]) .att-A, :root:not([data-theme="light"]) .att-E { color: #F2A99F; } }
:root[data-theme="dark"] .att-P, :root[data-theme="dark"] .att-L, :root[data-theme="dark"] .att-M { color: #A8D98A; }
:root[data-theme="dark"] .att-A, :root[data-theme="dark"] .att-E { color: #F2A99F; }
.tab-icon-img { width: 1.25em; height: 1.25em; display: inline-block; vertical-align: middle; margin: -0.12em 0; }

/* v47: By-month table: dark green border, grid lines and header */
.att-month-box { border: 2px solid #2E6B2A !important; border-radius: 10px; }
.att-month-table { border-collapse: collapse; }
.att-month-table th, .att-month-table td { border: 1px solid #2E6B2A !important; }
.att-month-table thead th { background: #2E6B2A !important; color: #FFFFFF !important; border-bottom: 2px solid #1F4A1C !important; }
.att-month-table thead th.att-weekend { background: #255A22 !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .att-month-box { border-color: #A8D98A !important; }
  :root:not([data-theme="light"]) .att-month-table th, :root:not([data-theme="light"]) .att-month-table td { border-color: #4F8A45 !important; }
}
:root[data-theme="dark"] .att-month-box { border-color: #A8D98A !important; }
:root[data-theme="dark"] .att-month-table th, :root[data-theme="dark"] .att-month-table td { border-color: #4F8A45 !important; }
/* v48: weekends (Sat, Sun) filled dark green, top to bottom */
.att-month-table td.att-weekend, .att-month-table thead th.att-weekend { background: #2E6B2A !important; color: #FFFFFF !important; }
.att-month-table thead th.att-weekend { background: #1F4A1C !important; }

/* v51: Master → Attendance Monitor */
.am-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.am-controls label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 0.88rem; font-weight: 600; }
.am-controls select, .am-controls input { width: auto; margin: 0; }
.am-box { border: 2px solid #2E6B2A !important; border-radius: 10px; }
.am-table { border-collapse: collapse; }
.am-table th, .am-table td { border: 1px solid #C9BFA0; text-align: center; font-size: 0.8rem; padding: 6px 8px; }
.am-table thead th { position: sticky; top: 0; z-index: 2; background: #2E6B2A; color: #fff; }
.am-table thead tr:nth-child(2) th { top: 30px; }
.am-table th.am-band { color: #fff; }
.am-table th.am-subj { color: #1D2330; min-width: 84px; }
.am-table .am-name { text-align: left; white-space: nowrap; }
.am-table .nowrap { white-space: nowrap; }
.am-table td.am-cell { color: #1D2330; font-weight: 600; }
.am-table td.am-off { background: #1D1D1D; }
.am-ver { color: #2E6B2A; font-size: 0.66rem; margin-left: 2px; }
.am-remark { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; white-space: nowrap; }
.am-r0 { background: #DDEFD6; color: #2E6B2A; }
.am-r1 { background: #FFF1C9; color: #7A5A00; }
.am-r2 { background: #FFDDBF; color: #8A4200; }
.am-r3 { background: #F8D2CC; color: #9B2C20; }
/* "absent elsewhere" warning */
.att-elsewhere { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #F8D2CC; color: #9B2C20; font-size: 0.7rem; font-weight: 700; }
.att-elsewhere.ok { background: #DDEFD6; color: #2E6B2A; }
.ae-list { max-height: 50vh; overflow-y: auto; }
.ae-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.ae-row .btn-small { flex-shrink: 0; }

/* v52: teacher offline saving */
.att-queue-note { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: #FFF1C9; color: #7A5A00; font-size: 0.85rem; font-weight: 600; }

/* v54: calendar tiles never grow wider than the calendar (long words like
   "Multimodal" used to push the grid over the boxes on its right) */
.cal-weekdays, .cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-day { min-width: 0; padding: 0; overflow: hidden; }
.cal-day .cal-mark.word { font-size: 0.48rem; }

/* v55: 🚨 Emergency */
.sub-back-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 12px; }
.btn-emergency { background: #C62828; color: #fff; border: none; border-radius: 12px; padding: 10px 18px; font-size: 1rem; font-weight: 800; cursor: pointer; box-shadow: 0 3px 0 #8E1B1B; white-space: nowrap; }
.btn-emergency:active { transform: translateY(2px); box-shadow: 0 1px 0 #8E1B1B; }
body.emg-lock { overflow: hidden; }
.emg-overlay { position: fixed; inset: 0; z-index: 5000; background: var(--paper); overflow-y: auto; }
.emg-shell { max-width: 640px; margin: 0 auto; padding: 18px 16px 40px; }
.emg-title { color: #C62828; margin: 0 0 6px; font-size: 1.7rem; }
.emg-q { font-weight: 700; font-size: 1.1rem; margin: 16px 0 10px; }
.emg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.emg-box { min-height: 72px; border-radius: 14px; border: 3px solid var(--rule); background: var(--card); color: var(--ink); font-size: 1.3rem; font-weight: 800; cursor: pointer; }
.emg-box.on { border-color: #C62828; background: #FDE3E1; color: #8E1B1B; box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.25); }
.emg-kinds .emg-box { min-height: 88px; font-size: 1.4rem; }
.emg-grid.emg-done .emg-box:not(.on) { opacity: 0.35; }
.emg-grid.emg-done .emg-box { pointer-events: none; }
.emg-warning { margin: 18px 0 12px; padding: 12px 14px; border-radius: 12px; background: #FFF1C9; color: #7A3E00; border: 2px solid #E0A100; font-weight: 700; }
.emg-send { width: 100%; min-height: 84px; border: none; border-radius: 18px; background: #C62828; color: #fff; font-size: 1.45rem; font-weight: 900; letter-spacing: 0.02em; cursor: pointer; box-shadow: 0 6px 0 #8E1B1B; }
.emg-send:disabled { opacity: 0.7; }
.emg-status { margin-top: 14px; font-size: 1rem; }
.emg-sent { padding: 14px; border-radius: 14px; background: #DDEFD6; color: #1F4A1C; font-size: 1.15rem; text-align: center; }
.emg-stack { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 6000; width: min(440px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 10px; }
.emg-alert { position: relative; background: #C62828; color: #fff; border-radius: 16px; padding: 16px 48px 16px 18px; box-shadow: 0 12px 32px rgba(0,0,0,0.35); animation: emg-pulse 1s ease-in-out infinite alternate; }
.emg-alert.emg-hotline { background: #FFFFFF; color: #1D2330; animation: none; border: 3px solid #C62828; }
@keyframes emg-pulse { from { box-shadow: 0 0 0 0 rgba(198,40,40,0.6), 0 12px 32px rgba(0,0,0,0.35); } to { box-shadow: 0 0 0 10px rgba(198,40,40,0), 0 12px 32px rgba(0,0,0,0.35); } }
.emg-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 2px solid currentColor; background: transparent; color: inherit; font-size: 1rem; cursor: pointer; padding: 0; }
.emg-alert-title { font-size: 1.35rem; font-weight: 900; }
.emg-alert-loc { font-size: 1.15rem; font-weight: 700; margin-top: 4px; }
.emg-alert-sub { font-size: 0.85rem; opacity: 0.9; margin-top: 6px; }
.emg-call { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: #2E6B2A; color: #fff !important; text-decoration: none; font-size: 1.05rem; }
.emg-call span { line-height: 1.25; }
.hotline-add { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.hotline-add .field { flex: 1 1 200px; margin: 0; }
.hotline-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-bottom: 1px solid var(--rule); padding: 4px 0 10px; }
.hotline-row .emg-call { flex: 1 1 240px; }
.hotline-actions { display: flex; gap: 8px; align-items: center; }

/* v56: Class Program */
.prog-table { border-collapse: collapse; width: 100%; min-width: 640px; }
.prog-table th, .prog-table td { border: 1px solid #2E6B2A; padding: 8px; text-align: center; vertical-align: middle; font-size: 0.85rem; }
.prog-table thead th { background: #2E6B2A; color: #fff; }
.prog-table th.prog-title { font-size: 1.05rem; font-weight: 900; letter-spacing: 0.06em; background: #1F4A1C; }
.prog-table .prog-time { font-weight: 700; white-space: nowrap; background: rgba(46,107,42,0.08); }
.prog-table .prog-break td { background: #FFF1C9; color: #7A5A00; font-weight: 800; letter-spacing: 0.08em; }
.prog-table .prog-class { line-height: 1.25; }
.prog-table .prog-class + .prog-class { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--rule); }
.prog-ed-top label { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; }
.prog-ed-top select { width: auto; margin: 0; }
.prog-card { border: 2px solid #2E6B2A; border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.prog-card-head { font-weight: 800; color: #2E6B2A; margin-bottom: 6px; }
.prog-entry { border-top: 1px dashed var(--rule); margin-top: 10px; padding-top: 10px; }
.prog-entry-sec { font-weight: 700; }
.prog-entry select { width: auto; margin: 4px 0; }
.prog-days { display: flex; gap: 12px; flex-wrap: wrap; font-size: 0.85rem; }
.prog-days label { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.prog-days input { width: auto; margin: 0; }
/* FAQ */
.faq-table td { vertical-align: top; text-align: left; }
.faq-table td:first-child { min-width: 200px; }
.faq-msg { border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; margin: 8px 0; background: var(--card); }
.faq-msg.answered { border-color: #2E6B2A; }
.faq-msg-head { cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.faq-msg-q { margin-top: 4px; cursor: pointer; }
.faq-msg-a { margin-top: 6px; color: #2E6B2A; font-weight: 600; white-space: pre-wrap; }
.faq-tag { font-size: 0.7rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: #FFF1C9; color: #7A5A00; }
.faq-tag.ok { background: #DDEFD6; color: #2E6B2A; }
.faq-reply, .faq-ask { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.faq-reply textarea, .faq-ask textarea { flex: 1; margin: 0; }
.pod-owner-replies { margin: 6px 0 10px; border: 2px solid #2E6B2A; border-radius: 12px; padding: 8px 12px; background: #F1F8EC; color: #1D2330; }
.pod-owner-replies summary { font-weight: 800; cursor: pointer; color: #2E6B2A; }
.emg-alert.emg-green { background: #2E7D32; animation: none; }
.emg-resolve-btns { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.emg-resolve-btns button { flex: 1 1 140px; min-height: 48px; border-radius: 12px; font-size: 1rem; font-weight: 800; cursor: pointer; }
.emg-yes { background: #fff; color: #1F4A1C; border: 2px solid #fff; }
.emg-no { background: transparent; color: #fff; border: 2px solid #fff; }
.emg-resolve { padding-right: 18px; }
.chim-update-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 4000; background: #2E6B2A; color: #fff; padding: 10px 14px; border-radius: 12px; box-shadow: 0 8px 22px rgba(0,0,0,0.3); font-weight: 600; display: flex; gap: 10px; align-items: center; max-width: calc(100vw - 32px); }
.chim-update-bar button { background: #fff; color: #1F4A1C; border: none; border-radius: 8px; padding: 6px 12px; font-weight: 800; cursor: pointer; }
.faq-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.reset-menu { width: 260px; }
.reset-sec-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.reset-sec-row .btn-small { padding: 4px 10px; font-size: 0.78rem; height: auto; }
.btn-reset-solid { background: #C62828 !important; color: #fff !important; border-color: #C62828 !important; }
.prog-entry-row { display: flex; gap: 10px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.prog-entry-btns { display: flex; gap: 6px; align-items: center; }
.prog-entry-btns .btn-small { padding: 5px 10px; font-size: 0.78rem; height: auto; }
.prog-entry-more { border-top: none; margin-top: 4px; padding-top: 4px; }
.admin-school-box { margin-top: 26px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); max-width: 720px; }

/* v57: Saturdays and Sundays are grey, no attendance */
.cal-day.weekend { background: #D9D6CF !important; color: #6B6B6B !important; border-color: #C8C4BA !important; }
.cal-day.weekend.selected { box-shadow: 0 0 0 2px var(--gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cal-day.weekend { background: #3A3A38 !important; color: #A3A39C !important; border-color: #4A4A46 !important; } }
:root[data-theme="dark"] .cal-day.weekend { background: #3A3A38 !important; color: #A3A39C !important; border-color: #4A4A46 !important; }
.arcade-leaderboard-row.green-7 td { border-color: #4f9a52; background: color-mix(in srgb, #4f9a52 2%, var(--card)); }

/* v59: Classroom Behavior */
.beh-bar { flex-wrap: wrap; gap: 10px; }
.beh-bar-left, .beh-bar-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.beh-date-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }
.beh-date-row label { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; margin: 0; }
.beh-date-row input { width: auto; margin: 0; }
.beh-box { border: 2px solid #2E6B2A !important; border-radius: 10px; }
.beh-table { border-collapse: collapse; width: 100%; min-width: 560px; }
.beh-table th, .beh-table td { border: 1px solid #2E6B2A; padding: 7px 8px; text-align: center; font-size: 0.85rem; }
.beh-table thead th { background: #2E6B2A; color: #fff; position: sticky; top: 0; z-index: 2; }
.beh-table thead tr:nth-child(2) th { top: 34px; }
.beh-table .beh-title { background: #1F4A1C; font-size: 0.95rem; letter-spacing: 0.05em; }
.beh-table .beh-sub { font-weight: 500; font-size: 0.78rem; opacity: 0.9; margin-left: 8px; letter-spacing: 0; }
.beh-table .beh-name { text-align: left; white-space: nowrap; }
.beh-table td.beh-cell { font-size: 1.05rem; font-weight: 800; color: #2E6B2A; }
.beh-table td.beh-cell.on { background: rgba(46, 107, 42, 0.12); }
.beh-table td.beh-cell input { width: 20px; height: 20px; margin: 0; }

/* ---------- Home — Quote of the Day + Mandaluyong weather ---------- */
.home-extras { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; margin: 18px 20px 4px; }
.home-extras.hidden { display: none; }
@media (max-width: 640px) { .home-extras { grid-template-columns: minmax(0, 1fr); } }
.quote-card {
  margin-top: 12px; padding: 12px 18px 14px; display: flex; flex-direction: column;
  border: 2px solid var(--olive-deep); border-radius: 2px; background: var(--card);
}
.quote-main { flex: 1; display: flex; align-items: center; gap: 16px; padding: 8px 0 2px; }
.quote-icon { font-size: 3.2rem; line-height: 1; flex: 0 0 auto; }
.quote-text { margin: 0; font-family: 'Bradley Hand', 'Bradley Hand ITC', 'Segoe Script', 'Apple Chancery', cursive; font-size: 1.3rem; line-height: 1.45; color: var(--ink); }
.weather-card {
  margin-top: 12px; padding: 12px 16px 14px; display: flex; flex-direction: column;
  border: 2px solid var(--olive-deep); border-radius: 2px; background: var(--card);
}
.weather-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--olive-deep); text-align: center; }
.weather-main { flex: 1; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 6px 0; }
.weather-icon { font-size: 3.4rem; line-height: 1; }
.weather-temp { font-size: 4.6rem; font-weight: 800; line-height: 1; color: var(--ink); letter-spacing: -0.03em; }
.weather-desc { font-size: 0.8rem; color: var(--ink-soft); text-align: center; }
[data-theme="dark"] .weather-label { color: var(--olive-soft); }
[data-theme="dark"] .quote-card, [data-theme="dark"] .weather-card { border-color: var(--olive-soft); }

/* ---------- Sign-in pages footer ---------- */
.chim-footer {
  width: 100%; max-width: 980px; margin-top: 28px; padding: 12px 8px 0; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 18px;
  font-size: 0.78rem; color: var(--ink-soft);
}
.chim-footer-brand { display: inline-flex; align-items: center; gap: 6px; }
.chim-footer-leaf { width: 18px; height: 18px; color: var(--olive-base); flex: 0 0 auto; }
.chim-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 12px; }
.chim-footer-link { background: none; border: 0; padding: 4px 2px; font: inherit; color: var(--ink-soft); cursor: pointer; }
.chim-footer-link:hover, .chim-footer-link:focus-visible { color: var(--green); text-decoration: underline; }
.chim-footer-page { text-align: left; font-size: 0.9rem; line-height: 1.5; max-height: 68vh; overflow: auto; padding-right: 4px; }
.chim-footer-page h3 { margin: 0 28px 10px 0; font-size: 1.05rem; }
.chim-footer-page p { margin: 0 0 10px; }
.chim-footer-page ul { margin: 0 0 10px; padding-left: 20px; }
.chim-footer-page li { margin-bottom: 4px; }
.chim-footer-x { position: absolute; top: 10px; right: 12px; }
.fg-popup-card { position: relative; }

/* ---------- Arcade → Mastery: TERM 1/2/3 boxes ---------- */
.mq-terms { display: flex; flex-direction: column; gap: 14px; }
.mq-term { border: 2px solid var(--olive-deep); border-radius: var(--radius); background: var(--card); }
.mq-term > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; font-weight: 700; }
.mq-term > summary::-webkit-details-marker { display: none; }
.mq-term > summary::before { content: '▸'; color: var(--olive-deep); transition: transform .15s; margin-right: 4px; }
.mq-term[open] > summary::before { transform: rotate(90deg); }
.mq-term-title { flex: 1; letter-spacing: 0.06em; color: var(--olive-deep); }
.mq-term-count { font-weight: 500; font-size: 0.8rem; color: var(--ink-soft); }
.mq-term-body { padding: 0 16px 16px; border-top: 1px solid var(--rule); }
.mq-term-body > [data-add-game] { margin: 12px 0; }
[data-theme="dark"] .mq-term { border-color: var(--olive-soft); }
[data-theme="dark"] .mq-term-title, [data-theme="dark"] .mq-term > summary::before { color: var(--olive-soft); }

/* ---------- FlashGrade answer key: laid out like the answer sheet ---------- */
.fg-key-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.fg-key-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.fg-sheet-key { display: grid; gap: 6px 28px; margin-top: 12px; padding: 14px 16px; border: 2px solid #111; border-radius: 4px; background: #fff; overflow-x: auto; max-width: 100%; }
.fg-sheet-col { display: flex; flex-direction: column; gap: 5px; }
.fg-bub-row { display: flex; align-items: center; gap: 6px; }
.fg-bub-n { width: 24px; text-align: right; font-size: 0.8rem; font-weight: 700; color: #111; font-variant-numeric: tabular-nums; margin-right: 2px; }
.fg-key-btn.fg-bub { width: 24px; height: 24px; border: 1.5px solid #222; background: #fff; color: #222; font-size: 0.66rem; }
.fg-key-btn.fg-bub.on { background: #111; border-color: #111; color: #fff; }
.fg-tos-table { width: 100%; border-collapse: collapse; }
.fg-tos-table th, .fg-scroll-box .fg-tos-table thead th { position: sticky; top: 0; background: var(--olive-deep); color: #fff; font-size: 0.8rem; padding: 7px 8px; text-align: left; border: 1px solid var(--olive-deep); }
.fg-tos-table td { border: 1px solid var(--rule); padding: 3px 6px; vertical-align: middle; }
.fg-tos-table td.fg-tos-n { width: 64px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.fg-tos-table input, .fg-tos-table select { width: 100%; margin: 0; padding: 5px 6px; font-size: 0.85rem; border: 0; background: transparent; }
.fg-tos-table td:last-child { width: 170px; }

/* Teacher header: "Signed in as …" sits beside the theme toggle and Log Out.
   v158: the student/parent header too — the name sits at the top right, before the 🔔. */
.topbar-actions .topbar-who { margin: 0 4px 0 0; text-align: right; max-width: 260px; overflow-wrap: anywhere; line-height: 1.25; }
@media (max-width: 640px) {
  .topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
  .topbar-actions .topbar-who { flex-basis: 100%; order: 3; max-width: none; margin: 4px 0 0; font-size: 0.72rem; }
}

/* ---------- Arcade Skill games (v65) ---------- */
.gm-frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; font-size: 0.9em; line-height: 1.05; margin: 0 2px; }
.gm-frac > span:first-child { border-bottom: 1.5px solid currentColor; padding: 0 3px; }
.gm-frac > span:last-child { padding: 0 3px; }
.gm-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gm-choice { padding: 14px 8px; border: 2px solid var(--rule); border-radius: var(--radius); background: var(--paper); color: var(--ink); font-size: 1.15rem; font-weight: 700; cursor: pointer; font-family: 'Lora', serif; }
.gm-choice:hover { border-color: var(--olive-base); }
.gm-choice.right { background: var(--green-bg); border-color: var(--green); color: var(--green-text); }
.gm-choice.wrong { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.gm-nl-wrap { max-width: 640px; margin: 0 auto; }
.gm-nl-svg { width: 100%; height: auto; }
.gm-nl-axis, .gm-nl-tick { stroke: var(--ink); stroke-width: 2; }
.gm-nl-tick.zero { stroke-width: 3; }
.gm-nl-arrow { fill: var(--ink); }
.gm-nl-lbl { font-size: 13px; text-anchor: middle; fill: var(--ink); font-family: inherit; }
.gm-nl-lbl.zero { font-weight: 700; }
.gm-nl-marker { fill: var(--red); }
.gm-nl-range { width: 100%; max-width: 640px; margin: 6px auto 0; display: block; accent-color: var(--olive-deep); height: 28px; }
.gm-nl-val { margin-top: 4px; }
.pm-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; margin-bottom: 12px; }
.pm-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: min(92vw, 380px); margin: 0 auto; padding: 8px; background: #bbada0; border-radius: 10px; touch-action: none; outline: none; }
.pm-tile { aspect-ratio: 1; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: clamp(1rem, 6vw, 1.8rem); background: #cdc1b4; color: #776e65; }
.pm-v2 { background: #eee4da; } .pm-v4 { background: #ede0c8; }
.pm-v8 { background: #f2b179; color: #fff; } .pm-v16 { background: #f59563; color: #fff; } .pm-v32 { background: #f67c5f; color: #fff; } .pm-v64 { background: #f65e3b; color: #fff; }
.pm-v128 { background: #edcf72; color: #fff; font-size: clamp(.9rem, 5vw, 1.5rem); } .pm-v256 { background: #edcc61; color: #fff; font-size: clamp(.9rem, 5vw, 1.5rem); } .pm-v512 { background: #edc850; color: #fff; font-size: clamp(.9rem, 5vw, 1.5rem); }
.pm-v1024, .pm-v2048, .pm-v4096 { background: #3F6B4A; color: #fff; font-size: clamp(.8rem, 4.2vw, 1.25rem); }
.pm-pad { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 12px 0 6px; }
.pm-pad > div { display: flex; gap: 6px; }
.pm-pad button { width: 54px; height: 44px; border-radius: 8px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); font-size: 1.1rem; cursor: pointer; }
.pm-msg { text-align: center; }
.gl-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 560px; margin: 0 auto 10px; }
.gl-levels button { height: auto; padding: 12px 6px; line-height: 1.3; }
.gl-board { display: grid; width: min(94vw, 460px); margin: 0 auto; border: 3px solid var(--ink); background: var(--ink); gap: 1px; }
.gl-cell { aspect-ratio: 1; border: 0; background: var(--paper); color: var(--olive-deep); font-size: clamp(1rem, 5vw, 1.6rem); font-weight: 700; padding: 0; cursor: pointer; }
.gl-n9 .gl-cell { font-size: clamp(.9rem, 4.2vw, 1.3rem); }
.gl-cell.given { color: var(--ink); background: var(--paper-2); cursor: default; }
.gl-cell.er { box-shadow: 2px 0 0 var(--ink); } .gl-cell.eb { box-shadow: 0 2px 0 var(--ink); } .gl-cell.er.eb { box-shadow: 2px 0 0 var(--ink), 0 2px 0 var(--ink), 2px 2px 0 var(--ink); }
.gl-cell.same { background: var(--green-bg); }
.gl-cell.sel { background: #FFF3C4; outline: 2px solid var(--gold); outline-offset: -2px; }
.gl-cell.wrong { color: var(--red); }
.gl-pad { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 12px auto 6px; max-width: 460px; }
.gl-pad button { min-width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); font-size: 1.1rem; font-weight: 700; cursor: pointer; }
.mc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.mc-score { display: flex; gap: 6px; flex-wrap: wrap; }
.mc-status { text-align: center; min-height: 1.5em; margin: 6px 0 10px; font-weight: 600; }
.mc-board { display: grid; width: min(94vw, 480px); margin: 0 auto; border: 3px solid #5b4a2f; border-radius: 4px; }
.mc-sq { position: relative; aspect-ratio: 1; border: 0; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.mc-sq.light { background: #f0d9b5; } .mc-sq.dark { background: #b58863; }
.mc-sq.sel { box-shadow: inset 0 0 0 4px #2E6B2A; }
.mc-sq.target { box-shadow: inset 0 0 0 3px #FFD54F; }
.mc-sq.target.light { background: #fbe9a8; } .mc-sq.target.dark { background: #d9b45a; }
.mc-sq.last::after { content: ''; position: absolute; inset: 0; background: rgba(46, 107, 42, 0.18); pointer-events: none; }
.mc-pc { font-size: clamp(1.4rem, 8vw, 2.4rem); line-height: 1; }
.mc-pc.mine { color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.mc-pc.theirs { color: #111; }
.mc-prob { font-size: clamp(.55rem, 2.6vw, .8rem); font-weight: 800; color: #1c1c1c; background: rgba(255, 255, 255, 0.8); border-radius: 4px; padding: 0 3px; margin-top: 2px; white-space: nowrap; }
.mc-ask { margin: 12px auto 0; max-width: 420px; text-align: center; padding: 14px; border: 2px solid var(--olive-deep); border-radius: var(--radius); background: var(--card); }
.mc-ask-q { font-family: 'Lora', serif; font-size: 1.6rem; font-weight: 700; margin-bottom: 10px; }
.mc-mates { display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.mc-mate { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); }
.mc-wait { text-align: center; padding: 30px 10px; }
.mc-overlay { position: fixed; inset: 0; z-index: 3000; background: var(--paper); overflow: auto; padding: 16px; }
.mc-overlay-inner { max-width: 640px; margin: 0 auto; }

/* ---------- Notebook-style math (mathfig.js) ---------- */
.mf-frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 0.12em; line-height: 1.1; font-size: 0.92em; }
.mf-frac > .mf-num { border-bottom: 0.09em solid currentColor; padding: 0 0.2em 0.05em; }
.mf-frac > .mf-den { padding: 0.05em 0.2em 0; }
.mf-root { display: inline-flex; align-items: stretch; vertical-align: middle; white-space: nowrap; }
.mf-root > .mf-idx { font-size: 0.6em; align-self: flex-start; margin-right: -0.35em; margin-top: -0.1em; }
.mf-root > .mf-rad { font-size: 1.15em; line-height: 1; transform: scaleY(1.12); transform-origin: bottom; }
.mf-root > .mf-under { border-top: 0.08em solid currentColor; padding: 0.08em 0.15em 0 0.1em; margin-left: -0.02em; }
.mf-bar { text-decoration: overline; }
.mf-blank { letter-spacing: 0.05em; }
sup, sub { font-size: 0.7em; }
/* figures */
.mf-fig { margin: 10px auto 4px; max-width: 360px; text-align: center; }
.mf-svg { width: 100%; height: auto; max-height: 260px; }
.mf-svg text { font-family: inherit; }
.mf-t { font-size: 13px; fill: var(--ink); } .mf-small { font-size: 10px; } .mf-bold { font-weight: 700; }
.mf-face { fill: #dfe9cf; stroke: #2E4A1F; stroke-width: 2; }
.mf-face2 { fill: #eef3e4; stroke: #2E4A1F; stroke-width: 2; }
.mf-face3 { fill: #c9d9b3; stroke: #2E4A1F; stroke-width: 2; }
.mf-hidden { fill: none; stroke: #2E4A1F; stroke-width: 1.4; stroke-dasharray: 5 4; }
.mf-dim { stroke: #B3261E; stroke-width: 1.6; }
.mf-dot { fill: #1f2a18; } .mf-open { fill: #fff; stroke: #1f2a18; stroke-width: 2; }
.mf-map { fill: #f3efe0; stroke: #9a8f6a; stroke-width: 1.5; } .mf-river { fill: none; stroke: #7fb3d5; stroke-width: 9; opacity: 0.7; }
.mf-road { fill: none; stroke: #cbbd92; stroke-width: 6; } .mf-route { stroke: #B3261E; stroke-width: 2.4; stroke-dasharray: 7 5; } .mf-pin { fill: #B3261E; stroke: #fff; stroke-width: 2; }
.mf-plan { fill: #f7f4ea; stroke: #2E4A1F; stroke-width: 4; }
.mf-tick { stroke: #333; stroke-width: 1.4; } .mf-hand-h { stroke: #1f2a18; stroke-width: 5; stroke-linecap: round; } .mf-hand-m { stroke: #1f2a18; stroke-width: 3; stroke-linecap: round; }
.mf-merc { fill: #d13b2f; } .mf-fib { fill: #f0f5e6; stroke: #2E4A1F; stroke-width: 2; }
.mf-arrow { stroke: #2E4A1F; stroke-width: 1.6; }
.mf-grid { stroke: #d9d4c3; stroke-width: 1; } .mf-axis { stroke: #333; stroke-width: 1.6; } .mf-curve { fill: none; stroke: #2E6B2A; stroke-width: 2.6; } .mf-vline { stroke: #B3261E; stroke-width: 1.8; stroke-dasharray: 6 4; }
.mf-table { margin: 8px auto; border-collapse: collapse; font-size: 0.9rem; background: var(--paper); }
.mf-table th { background: var(--olive-deep); color: #fff; padding: 5px 10px; border: 1px solid var(--olive-deep); }
.mf-table td { border: 1px solid var(--rule); padding: 4px 10px; text-align: center; }
[data-theme="dark"] .mf-svg { background: #f6f3ea; border-radius: 8px; }
[data-theme="dark"] .mf-svg .mf-t { fill: #232B3A; }
.mq-quiz-fig { margin: -4px auto 12px; }
.mq-q-preview { margin: 4px 0 8px; padding: 6px 10px; background: var(--paper-2); border-radius: 6px; font-size: 0.95rem; min-height: 1.4em; }
.mq-q-extra { display: grid; grid-template-columns: 150px 1fr; gap: 10px; margin-top: 8px; }
.mq-q-extra label { font-size: 0.8rem; }
.mq-q-extra input { width: 100%; margin-top: 4px; }
.mq-q-card.builtin { border-style: dashed; }
@media (max-width: 560px) { .mq-q-extra { grid-template-columns: 1fr; } }
/* chapters inside a TERM box */
.mq-chapter { margin: 14px 0 6px; }
.mq-ch-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-bottom: 2px solid var(--olive-soft); margin-bottom: 10px; }
.mq-ch-title { font-weight: 800; color: var(--olive-deep); font-size: 0.95rem; }
.mq-ch-launch { height: auto; padding: 5px 10px; font-size: 0.78rem; }
.mq-ch-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.mq-ch-row > .subject-card { flex: 0 0 170px; scroll-snap-align: start; }
[data-theme="dark"] .mq-ch-title { color: var(--olive-soft); }
.mf-svg .mf-t { paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.mq-choice-edit input[type="radio"] { width: auto; flex: 0 0 auto; margin: 0; }
.mq-choice-edit input[type="text"] { min-width: 0; width: auto; }
.mq-choice-edit .mq-choice-letter { flex: 0 0 auto; }
.mf-curve2 { fill: none; stroke: #B3261E; stroke-width: 2.4; stroke-dasharray: 6 4; }
.mf-rt { fill: none; stroke: #2E4A1F; stroke-width: 1.6; }
.mf-trunk { fill: #8a5a2b; } .mf-leaf { fill: #7fae5a; stroke: #2E4A1F; stroke-width: 1.5; } .mf-win { fill: #bcd6ea; }
.mf-stick { stroke: #1f2a18; stroke-width: 2.2; stroke-linecap: round; } .mf-sight { stroke: #B3261E; stroke-width: 2; stroke-dasharray: 6 4; }
.mf-arc { fill: none; stroke: #1f5aa6; stroke-width: 2; } .mf-car { fill: #1f5aa6; }
.mf-compass { fill: #f7f4ea; stroke: #2E4A1F; stroke-width: 2; } .mf-grid2 { stroke: #b9b2a0; stroke-width: 1.2; stroke-dasharray: 3 3; }
.mf-ray { stroke: #B3261E; stroke-width: 2.4; } .mf-path { fill: none; stroke: #1f5aa6; stroke-width: 2.6; }
.mf-shade { fill: rgba(46, 107, 42, 0.35); } .mf-bar { fill: #7fae5a; stroke: #2E4A1F; stroke-width: 1.2; }

/* ---------- Tasks: TERM boxes, drafts / posted ---------- */
.task-badge { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.task-badge.posted { background: var(--green-bg); color: var(--green-text); }
.task-badge.draft { background: var(--amber-bg); color: var(--amber); }
.task-badge.none { background: var(--paper-2); color: var(--ink-soft); }
.tasks-row > .task-card { flex: 0 0 190px; }
.asg-term-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
.asg-term-tools .btn-small { height: auto; padding: 6px 12px; }
.asg-lesson-card { cursor: pointer; }
.asg-add-lesson { border-style: dashed; background: transparent; cursor: pointer; font: inherit; color: var(--ink-soft); justify-content: center; }
.mq-ch-row > .asg-add-lesson { flex: 0 0 130px; }
.asg-quiz-question { text-align: left; }
.mf-bar { text-decoration: none; display: inline-block; border-top: 0.075em solid currentColor; line-height: 1.05; padding-top: 0.04em; }
.mf-arrowhead { fill: #B3261E; }
/* v220 College Gate figures */
.mf-vu { fill: #fbfaf4; stroke: #2E4A1F; stroke-width: 1.6; } .mf-vc { fill: none; stroke: #2E4A1F; stroke-width: 2.2; } .mf-vsh { fill: rgba(46, 107, 42, 0.38); } .mf-vn { font-size: 15px; font-weight: 700; } .mf-arc { fill: none; stroke: #B3261E; stroke-width: 1.8; } .mf-q { fill: #7a7a6a; }

/* ---------- v70: Arcade sort toggle + new Skill games (games2.js) ---------- */
.arcade-backbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; margin: 0 0 14px; }
.arcade-backbar .back-btn-xl { margin: 0; }
.arcade-sort { display: flex; gap: 6px; flex-wrap: wrap; }
.arcade-sort .chip { cursor: pointer; font-family: inherit; }
.arcade-backbar .back-btn-xl.hidden + .arcade-sort { display: none; }
.arcade-backbar:has(> .back-btn-xl.hidden) { margin: 0; }

.dg-help { margin: 0 0 10px; color: var(--ink-soft); font-size: 0.9rem; text-align: center; }
.dg-msg { text-align: center; font-size: 1.1rem; padding: 18px 10px; border: 2px solid var(--olive-deep); border-radius: var(--radius); background: var(--card); line-height: 1.6; }
.dg-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dg-opt { display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; padding: 12px 8px; border: 2px solid var(--rule); border-radius: var(--radius); background: var(--paper); color: var(--ink); font-weight: 700; cursor: pointer; font-family: inherit; font-size: 0.95rem; }
.dg-opt:hover:not(:disabled) { border-color: var(--olive-base); }
.dg-opt.chosen { border-color: var(--olive-deep); background: var(--card); }
.dg-opt:disabled:not(.chosen) { opacity: 0.55; }
.dg-p { font-weight: 400; font-size: 0.82rem; color: var(--ink-soft); }
.dg-roll { margin-top: 14px; text-align: center; }
.dg-roll .btn-small { margin-top: 8px; }
.dg-die { display: inline-block; font-size: 3.4rem; line-height: 1; margin: 0 4px; }
.dg-result { font-weight: 700; padding: 8px 12px; border-radius: var(--radius); text-align: center; margin: 8px 0; }
.dg-result.ok { background: var(--green-bg); color: var(--green-text); }
.dg-result.no { background: var(--red-bg); color: var(--red); }

.cc-deck { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.cc-back { font-size: 3rem; line-height: 1; display: flex; flex-direction: column; align-items: center; color: var(--olive-deep); }
.cc-back small { display: block; margin-top: 6px; font-size: 0.75rem; line-height: 1.2; color: var(--ink-soft); }
.cc-counts { display: flex; gap: 8px; flex-wrap: wrap; }
.cc-count { padding: 4px 10px; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); font-weight: 700; }
.cc-count.red, .cc-card.red, .cc-big.red { color: #C0392B; }
.cc-count.black, .cc-card.black, .cc-big.black { color: var(--ink); }
.cc-drawn { text-align: center; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 8px; }
.cc-card { display: inline-block; padding: 1px 5px; margin: 2px; border: 1px solid var(--rule); border-radius: 5px; background: #fff; font-weight: 700; }
.cc-big { font-size: 2.4rem; font-weight: 700; padding: 10px 18px; border: 2px solid var(--rule); border-radius: 10px; background: #fff; display: inline-block; }

.vt-door { text-align: center; margin: 0 auto 12px; padding: 14px; max-width: 360px; border: 3px solid var(--olive-deep); border-radius: 14px; background: var(--card); }
.vt-door.open { font-size: 3rem; border-style: dashed; }
.vt-wheel { font-size: 2rem; }
.vt-slots { display: flex; gap: 8px; justify-content: center; margin: 8px 0 4px; }
.vt-slot { width: 42px; height: 52px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 700; border: 2px solid var(--rule); border-radius: 8px; background: var(--paper); color: var(--ink-soft); font-family: 'Lora', serif; }
.vt-slot.on { border-color: var(--olive-deep); color: var(--ink); background: var(--green-bg); }
.vt-room { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.vt-clue { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border: 2px dashed var(--olive-base); border-radius: var(--radius); background: var(--paper); color: var(--ink); cursor: pointer; font-family: inherit; font-weight: 700; font-size: 0.85rem; }
.vt-clue.done { border-style: solid; border-color: var(--green); background: var(--green-bg); color: var(--green-text); cursor: default; }
.vt-icon { font-size: 2rem; }
.vt-enter { margin: 14px auto 0; max-width: 320px; text-align: center; }
.vt-enter label { display: block; font-weight: 700; margin-bottom: 6px; }
.vt-code { text-align: center; font-size: 1.4rem; letter-spacing: 6px; }

.ms-prompt { text-align: center; margin: 6px 0 14px; }
.ms-sym { display: inline-block; font-size: 4rem; font-weight: 700; line-height: 1.1; font-family: 'Lora', serif; }
.ms-name { font-size: 1.5rem; font-weight: 700; font-family: 'Lora', serif; }
.gm-choice.small { font-size: 0.92rem; }

.pw-time { text-align: center; font-weight: 700; margin-bottom: 8px; }
.pw-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pw-cols > div { display: flex; flex-direction: column; gap: 8px; }
.pw-card { padding: 12px 6px; border: 2px solid var(--rule); border-radius: var(--radius); background: var(--paper); color: var(--ink); font-weight: 700; cursor: pointer; font-family: inherit; font-size: 0.95rem; }
.pw-card.sel { border-color: var(--olive-deep); background: var(--card); box-shadow: 0 0 0 2px var(--olive-base); }
.pw-card.ok { border-color: var(--green); background: var(--green-bg); color: var(--green-text); }
.pw-card.bad { border-color: var(--red); background: var(--red-bg); }

.tt-track { display: flex; gap: 4px; justify-content: center; margin-bottom: 12px; }
.tt-cp { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--rule); background: var(--paper); }
.tt-cp.on { background: var(--olive-deep); border-color: var(--olive-deep); }
.tt-cp.now { border-color: var(--olive-deep); box-shadow: 0 0 0 3px var(--green-bg); }
.tt-q { text-align: center; font-weight: 700; font-size: 1.05rem; margin-bottom: 10px; }
.tt-body .mf-fig { display: flex; justify-content: center; margin-bottom: 10px; }
.tt-digital { font-family: 'Courier New', monospace; background: #111; color: #5CFF7A; padding: 2px 8px; border-radius: 6px; letter-spacing: 2px; }
.tt-fb { text-align: center; margin-top: 8px; color: var(--red); font-weight: 700; }

.pt-wrap { display: flex; justify-content: center; }
.pt-grid { display: grid; grid-template-columns: 18px repeat(8, minmax(0, 40px)); gap: 3px; width: 100%; max-width: 360px; }
.pt-cell { aspect-ratio: 1; border: 1px solid var(--rule); border-radius: 6px; background: #EAF3DA; font-size: 1.15rem; line-height: 1; padding: 0; display: flex; align-items: center; justify-content: center; cursor: default; }
.pt-cell.fog { background: repeating-linear-gradient(45deg, #9AA39A, #9AA39A 4px, #A8B0A8 4px, #A8B0A8 8px); border-color: #8A928A; }
.pt-cell.me { background: #FFE9A8; border: 2px solid var(--olive-deep); }
.pt-cell.adj { cursor: pointer; box-shadow: inset 0 0 0 2px var(--olive-base); }
.pt-cell.adj:hover { box-shadow: inset 0 0 0 3px var(--olive-deep); }
.pt-cell.hint { box-shadow: inset 0 0 0 3px #D4A017; }
.pt-xlab, .pt-ylab { font-size: 0.7rem; color: var(--ink-soft); display: flex; align-items: center; justify-content: center; }
.pt-pos { text-align: center; margin: 8px 0 4px; }
.pt-msg { text-align: center; font-weight: 700; min-height: 1.4em; margin: 4px 0; }
.pt-ask .mc-ask-q { font-size: 1.3rem; }

/* v71: pages opened from a Skill game (Study Guide): < Back left, actions right */
.arcade-page-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.arcade-page-actions { display: flex; gap: 8px; align-items: center; }
.arcade-page-actions .btn-small { min-width: 96px; }

/* v71: Grid Warp */
.gw-kind { text-align: center; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-soft); font-weight: 700; }
.gw-inst { text-align: center; font-family: 'Lora', serif; font-weight: 700; font-size: 1.15rem; margin: 4px 0 2px; }
.gw-pts { text-align: center; margin-bottom: 8px; }
.gw-wrap { display: flex; justify-content: center; }
.gw-svg { width: 100%; max-width: 420px; height: auto; touch-action: none; user-select: none; -webkit-user-select: none; background: #fff; border: 1px solid var(--rule); border-radius: 10px; cursor: crosshair; }
.gw-gl { stroke: #E3E6DC; stroke-width: 1; }
.gw-gl.ax { stroke: #4A4A4A; stroke-width: 1.6; }
.gw-num { font-size: 8px; fill: #777; text-anchor: middle; font-family: sans-serif; }
.gw-axl { font-size: 11px; font-style: italic; fill: #333; font-family: serif; }
.gw-lab { font-size: 10px; font-weight: 700; font-family: sans-serif; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.gw-orig { fill: rgba(52, 110, 190, 0.25); stroke: #2E64B5; stroke-width: 2; }
.gw-orig-v { fill: #2E64B5; } .gw-orig-t { fill: #2E64B5; }
.gw-good, .gw-key { fill: rgba(46, 150, 80, 0.22); stroke: #2E9650; stroke-width: 2.4; }
.gw-key { stroke-dasharray: 6 4; }
.gw-good-v, .gw-key-v { fill: #2E9650; } .gw-good-t, .gw-key-t { fill: #1E7A3C; }
.gw-mirror { stroke: #C0392B; stroke-width: 1.8; stroke-dasharray: 7 5; }
.gw-center { fill: #C0392B; stroke: #fff; stroke-width: 2; }
.gw-stroke { fill: none; stroke: #E67E22; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.gw-tap { fill: #E67E22; stroke: #fff; stroke-width: 2; }
.gw-tap-t { fill: #B35900; }
.gw-help { text-align: center; margin: 8px 0; }
.gw-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.gw-fb { text-align: center; margin-top: 8px; }

/* v72: welcome greeting on the sign-in page, above the CHIM logo */
.gate-greeting { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; margin: 0 0 10px; }
.gate-hi { font-family: 'Lora', serif; font-weight: 700; font-size: 2.2rem; color: var(--olive-deep); line-height: 1.15; }
.gate-welcome { font-size: 0.95rem; color: var(--ink-soft); letter-spacing: 0.5px; }
.gate-wave { display: inline-block; transform-origin: 70% 70%; animation: gate-wave 2.4s ease-in-out 0.4s 2; }
@keyframes gate-wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { .gate-wave { animation: none; } }

/* v73: Arcade sounds + effects (sfx.js) */
.fx-dot { position: fixed; width: 8px; height: 8px; border-radius: 50%; pointer-events: none; z-index: 9999; transform: translate(-50%, -50%); animation: fx-dot 0.65s ease-out forwards; }
@keyframes fx-dot { to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.3); opacity: 0; } }
.fx-pop { animation: fx-pop 0.45s ease-out; }
@keyframes fx-pop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
.fx-shake { animation: fx-shake 0.42s ease-in-out; }
@keyframes fx-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.fx-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9998; overflow: hidden; }
.fx-confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fx-fall 2.6s ease-in forwards; }
@keyframes fx-fall { to { transform: translate(var(--drift), 105vh) rotate(var(--rot)); opacity: 0.9; } }
.fx-mute { background: var(--card); border: 1px solid var(--rule); border-radius: 50%; width: 38px; height: 38px; font-size: 1.1rem; cursor: pointer; flex: 0 0 auto; }
.fx-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.fx-head h3 { margin: 0; }
@media (prefers-reduced-motion: reduce) { .fx-pop, .fx-shake { animation: none; } }

/* v73: Plot Twist modes, lobby and online game */
.pt-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 720px; }
@media (max-width: 560px) { .pt-modes { grid-template-columns: 1fr; } }
.pt-modes .subject-card .fg-sub { margin-top: 4px; }
.ptl-room { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); margin-bottom: 8px; }
.ptl-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ptm-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ptm-team { border: 2px solid var(--rule); border-radius: var(--radius); padding: 8px 10px; background: var(--card); margin-bottom: 8px; }
.ptm-team.t1 { border-color: #2E64B5; } .ptm-team.t2 { border-color: #C0392B; }
.ptm-team-h { display: flex; justify-content: space-between; gap: 6px; font-weight: 700; margin-bottom: 4px; }
.ptm-team.t1 .ptm-team-h { color: #2E64B5; } .ptm-team.t2 .ptm-team-h { color: #C0392B; }
.ptm-team .btn-small { margin-top: 6px; }
.ptm-pl { font-size: 0.88rem; padding: 2px 0; }
.ptm-pl.out { text-decoration: line-through; opacity: 0.6; }
.ptm-board-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.ptm-board-col { flex: 1 1 320px; min-width: 0; }
.ptm-side { flex: 0 1 240px; min-width: 200px; }
@media (max-width: 640px) { .ptm-side { flex-basis: 100%; } }
.ptm-tok { display: inline-flex; align-items: center; justify-content: center; width: 1.35em; height: 1.35em; border-radius: 50%; color: #fff; font-size: 0.72em; font-weight: 800; font-family: sans-serif; }
.ptm-tok.t1 { background: #2E64B5; } .ptm-tok.t2 { background: #C0392B; }
.ptm-tok.rival { box-shadow: 0 0 0 2px #FFD54F; }
.pt-cell.ptm-rival { background: #FDE2DE; }
.ptm-log { font-size: 0.8rem; color: var(--ink-soft); }
.ptm-log-row { padding: 3px 0; border-bottom: 1px dashed var(--rule); }
.ptm-banner { text-align: center; font-weight: 700; padding: 8px 10px; border-radius: var(--radius); background: #FFF4D6; border: 1px solid #F1C40F; margin-bottom: 8px; color: #6B4E00; }
.ptm-banner.win { background: var(--green-bg); border-color: var(--green); color: var(--green-text); }
.ptm-banner.lose { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.ptm-duel-box { border-color: #C0392B; margin-bottom: 10px; }
.ptm-duel-h { font-weight: 800; color: #C0392B; font-size: 1.1rem; }
.ptm-chat { margin-top: 14px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); padding: 10px; }
.ptm-chat-title { font-weight: 700; margin-bottom: 6px; }
.ptm-chat-list { max-height: 160px; min-height: 60px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.ptm-msg-row { align-self: flex-start; max-width: 85%; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 4px 10px; font-size: 0.88rem; overflow-wrap: anywhere; }
.ptm-msg-row.mine { align-self: flex-end; background: var(--green-bg); }
.ptm-who { display: block; font-size: 0.7rem; font-weight: 700; color: var(--ink-soft); }
.ptm-chat-form { display: flex; gap: 8px; }
.ptm-chat-form input { flex: 1; min-width: 0; }
.ptm-end { margin-top: 12px; }

/* v74: games with their own page, opened full screen */
body.arcade-web-open { overflow: hidden; }
.arcade-web-overlay { position: fixed; inset: 0; z-index: 9000; background: #0f1630; }
.arcade-web-overlay iframe { width: 100%; height: 100%; border: 0; display: block; }
.arcade-web-toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 9001; background: rgba(20, 24, 40, 0.92); color: #fff; padding: 8px 16px; border-radius: 99px; font-size: 0.9rem; font-weight: 600; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); max-width: calc(100% - 32px); text-align: center; }

/* v74: bedtime (12 AM – 6 AM PH time, students only) */
.arcade-bedtime { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px 0; }
.arcade-sleeping { position: relative; width: 150px; cursor: default; filter: grayscale(1); opacity: 0.55; }
.arcade-sleeping .icon { font-size: 3.2rem; }
.arcade-zzz { position: absolute; top: 8px; right: 12px; font-weight: 700; color: var(--ink-soft); font-size: 0.8rem; letter-spacing: 2px; animation: zzz 2.4s ease-in-out infinite; }
@keyframes zzz { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(-5px); opacity: 1; } }
.arcade-bed-msg { font-family: 'Lora', serif; font-size: 1.15rem; font-weight: 700; color: var(--ink-soft); text-align: center; margin: 0; }
@media (prefers-reduced-motion: reduce) { .arcade-zzz { animation: none; } }

/* v75: app background palette (Master → Control), light mode only */
html[data-palette]:not([data-theme="dark"]):not([data-screen="gate"]) { --paper: var(--pal-paper, #F6F1E4); --paper-2: var(--pal-paper-2, #EFEAD8); --card: var(--pal-card, #F1EFE8); }

/* v75: sign-in page — pastel background, falling snow behind the card */
html[data-screen="gate"] body { background: linear-gradient(180deg, var(--login-bg, #E3F0FB) 0%, var(--login-bg-2, #D3E6F6) 100%); background-attachment: fixed; }
#season-fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; display: none; } /* behind all page content */
html[data-titlebar]:not([data-theme="dark"]) .topbar { background: var(--titlebar); }
.ctl-seasons { display: grid; gap: 6px; }
.ctl-season { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 14px; align-items: center; padding: 6px 8px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.ctl-season label { margin: 0 !important; }
.ctl-season .ctl-where { font-size: 0.8rem; }
.ctl-season.off .ctl-where { opacity: 0.45; }
@media (max-width: 480px) { .ctl-season { grid-template-columns: 1fr 1fr; } .ctl-season > label:first-child { grid-column: 1 / -1; } }
.gate { position: relative; z-index: 1; }
.gate-card { background: #F6F1E4; /* same cream as the CHIM logo */ border-radius: 20px; padding: 26px 22px; box-shadow: 0 12px 34px rgba(40, 70, 110, 0.14); max-width: 420px; position: relative; z-index: 2; }
.gate-footer, .gate > :not(.gate-card) { position: relative; z-index: 2; }

/* v75: full-screen game — CHIM's own close bar on top, always available */
.arcade-web-overlay { display: flex; flex-direction: column; }
.arcade-web-bar { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 6px 10px; padding-top: max(6px, env(safe-area-inset-top)); background: #0b1024; color: #fff; }
.arcade-web-x.back-btn-xl { margin: 0; }
.arcade-web-title { font-weight: 600; font-size: 0.92rem; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arcade-web-overlay iframe { flex: 1 1 auto; height: auto; min-height: 0; }

/* v75: Control page */
.ctl-card { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); padding: 14px; margin-bottom: 14px; }
.ctl-card h3 { margin: 0 0 10px; font-size: 1.05rem; }
.ctl-card label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 8px; }
.ctl-card label input:not([type="checkbox"]):not([type="radio"]), .ctl-card label select { display: block; width: 100%; margin-top: 4px; }
.ctl-row { display: grid; grid-template-columns: 1fr 120px; gap: 10px; }
.ctl-times { grid-template-columns: 1fr 1fr; margin: 4px 0 8px 26px; }
.ctl-times input:disabled { opacity: 0.5; }
.ctl-check { display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; color: var(--ink) !important; cursor: pointer; }
.ctl-check input { width: auto; margin: 0; }
.ctl-label { font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.ctl-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.ctl-swatch { display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 5px; border: 2px solid var(--rule); border-radius: 99px; background: var(--paper); color: var(--ink); font-size: 0.8rem; }
.ctl-swatch span { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--sw), var(--sw2)); border: 1px solid rgba(0, 0, 0, 0.12); }
.ctl-swatch.on { border-color: var(--olive-deep); box-shadow: 0 0 0 2px var(--olive-soft); font-weight: 700; }
.ctl-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ctl-prev-login, .ctl-prev-app { height: 150px; border-radius: 10px; border: 1px solid var(--rule); position: relative; overflow: hidden; }
.ctl-prev-login { background: linear-gradient(180deg, var(--pl), var(--pl2)); display: flex; align-items: center; justify-content: center; }
.ctl-preview.snow .ctl-prev-login { background-image: radial-gradient(circle, #fff 1.4px, transparent 1.6px), radial-gradient(circle, #fff 2.6px, transparent 2.8px), linear-gradient(180deg, var(--pl), var(--pl2)); background-size: 22px 22px, 47px 47px, auto; background-position: 3px 5px, 12px 20px, 0 0; }
.ctl-prev-card { background: #F6F1E4; border-radius: 10px; padding: 8px 10px; width: 70%; text-align: center; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
.ctl-prev-hi { font-family: 'Lora', serif; font-weight: 700; color: #4A5A28; font-size: 0.95rem; }
.ctl-prev-wel { font-size: 0.62rem; color: #4B5567; margin-bottom: 4px; }
.ctl-prev-btn { font-size: 0.6rem; border: 1px solid #C9BFA0; border-radius: 5px; padding: 2px; margin-top: 3px; background: #F1EFE8; }
.ctl-prev-app { background: var(--pa); padding: 10px; }
.ctl-prev-bar { height: 16px; border-radius: 4px; background: var(--pbar, var(--pa2)); margin-bottom: 10px; }
.ctl-prev-tile { display: inline-block; width: 44%; height: 60px; margin-right: 4%; border-radius: 8px; background: var(--pc); border: 1px solid #C9BFA0; }
@media (max-width: 480px) { .ctl-row { grid-template-columns: 1fr 96px; } }

/* ---------- v77: Life & Career Skills games ---------- */
/* 🧭 Crossroads */
.cr-scene { position: relative; max-width: 420px; margin: 0 auto; }
.cr-road { display: block; width: 100%; height: auto; background: linear-gradient(180deg, #CFE9FF 0%, #E9F7D9 45%, #C9E6A8 100%); border-radius: 14px; }
.cr-sign { position: absolute; top: 4%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 8px; border: 3px solid #6D4C2F; border-radius: 10px; background: #FFF6E0; color: #4E342E; font-weight: 800; font-size: 0.78rem; box-shadow: 0 4px 0 #6D4C2F; cursor: pointer; min-width: 84px; }
.cr-sign span { font-size: 1.5rem; line-height: 1; }
.cr-sign:active { transform: translateY(3px); box-shadow: 0 1px 0 #6D4C2F; }
.cr-l { left: 2%; } .cr-m { left: 50%; transform: translateX(-50%); } .cr-m:active { transform: translate(-50%, 3px); } .cr-r { right: 2%; }
.cr-walker { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); font-size: 2.4rem; transition: transform 0.5s ease-in, opacity 0.5s; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.25)); }
.cr-walker.go-P { transform: translate(-190%, -120%) scale(0.7); opacity: 0.3; }
.cr-walker.go-S { transform: translate(-50%, -190%) scale(0.7); opacity: 0.3; }
.cr-walker.go-E { transform: translate(90%, -120%) scale(0.7); opacity: 0.3; }
.cr-card-wrap { max-width: 420px; margin: 10px auto 0; touch-action: pan-y; }
.cr-card { background: #fff; border: 2px solid #FFB300; border-radius: 14px; padding: 14px 16px; min-height: 76px; font-weight: 700; font-size: 1.02rem; text-align: center; color: #263238; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1); display: flex; align-items: center; justify-content: center; }
.cr-card.cr-in { animation: cr-in 0.35s ease-out; }
@keyframes cr-in { from { transform: translateY(18px) scale(0.96); opacity: 0; } }
.cr-track { margin: 8px 0 0; height: 6px; }
.cr-why { text-align: center; min-height: 2.6em; margin-top: 6px; }
.cr-start { text-align: center; margin-top: 10px; }

/* 🎒 Career Journey */
.cj-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cj-who { display: flex; align-items: center; gap: 10px; }
.cj-avatar { font-size: 2.4rem; background: #FFF3E0; border-radius: 50%; width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; border: 3px solid #FF7043; }
.cj-meter { flex: 1 1 180px; max-width: 260px; }
.cj-meter-lab { font-size: 0.8rem; margin-bottom: 3px; }
.cj-meter-bar { height: 14px; border-radius: 99px; background: var(--rule); overflow: hidden; }
.cj-meter-fill { height: 100%; width: 0; background: linear-gradient(90deg, #FF7043, #FFCA28, #66BB6A); transition: width 0.6s ease; border-radius: 99px; }
.cj-map { display: flex; align-items: center; margin: 4px 0 14px; }
.cj-stop { display: flex; flex-direction: column; align-items: center; min-width: 60px; opacity: 0.55; }
.cj-stop span { font-size: 1.4rem; width: 42px; height: 42px; border-radius: 50%; background: var(--card); border: 2px dashed var(--rule); display: flex; align-items: center; justify-content: center; }
.cj-stop small { font-size: 0.66rem; text-align: center; margin-top: 3px; font-weight: 700; }
.cj-stop.now { opacity: 1; } .cj-stop.now span { border: 3px solid #FF7043; background: #FFF3E0; animation: cj-pulse 1.4s ease-in-out infinite; }
.cj-stop.done { opacity: 1; } .cj-stop.done span { border: 2px solid #66BB6A; background: #E8F5E9; }
@keyframes cj-pulse { 50% { transform: scale(1.1); } }
.cj-path { flex: 1; height: 0; border-top: 3px dotted var(--rule); margin-bottom: 18px; }
.cj-title { margin: 0 0 6px; }
.cj-traits { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.cj-trait { border: 2px solid var(--rule); border-radius: 12px; padding: 10px; background: var(--card); }
.cj-trait.ok { border-color: var(--green); } .cj-trait.no { border-color: var(--red); }
.cj-trait-t { font-weight: 700; margin-bottom: 8px; font-size: 0.92rem; }
.cj-bins { display: flex; gap: 6px; flex-wrap: wrap; }
.cj-bin { flex: 1; padding: 6px 4px; border-radius: 8px; border: 1px solid var(--rule); background: var(--paper); font-size: 0.78rem; font-weight: 700; color: var(--ink); }
.cj-bin.right, .cj-f.right, .cj-item.right { background: var(--green-bg); border-color: var(--green); color: var(--green-text); }
.cj-bin.wrong, .cj-f.wrong, .cj-item.wrong { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.cj-why { margin-top: 6px; }
.cj-profile { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.cj-profile div { background: #FFF8E1; border: 2px solid #FFCA28; border-radius: 10px; padding: 8px; text-align: center; color: #3E2723; }
.cj-profile span { display: block; font-size: 0.72rem; font-weight: 700; opacity: 0.8; }
@media (max-width: 480px) { .cj-profile { grid-template-columns: 1fr; } }
.cj-items { display: flex; flex-wrap: wrap; gap: 8px; }
.cj-item { padding: 8px 12px; border-radius: 99px; border: 2px solid var(--rule); background: var(--paper); color: var(--ink); font-size: 0.85rem; font-weight: 600; }
.cj-item.sel { border-color: #FF7043; background: #FFF3E0; }
.cj-item.missed { border-style: dashed; border-color: var(--green); }
.cj-backpack { margin: 10px 0; font-weight: 700; }
.cj-event { background: #E3F2FD; border: 2px solid #42A5F5; border-radius: 12px; padding: 12px; font-weight: 700; margin-bottom: 8px; color: #0D47A1; }
.cj-factors { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.cj-acts .gm-choice, .cj-career { font-size: 0.9rem; }
.cj-acts { display: grid; gap: 8px; }
.cj-next { margin-top: 12px; }
.cj-msg { margin-top: 8px; }

/* 💰 Career Millionaire */
.mil { background: radial-gradient(ellipse 60% 45% at 20% 0%, rgba(255, 236, 150, 0.95), transparent 70%), radial-gradient(ellipse 60% 45% at 80% 0%, rgba(255, 190, 235, 0.9), transparent 70%), radial-gradient(ellipse 80% 50% at 50% 105%, rgba(160, 220, 255, 0.9), transparent 70%), linear-gradient(180deg, #FFF8E1 0%, #FFFFFF 45%, #F3EEFF 100%); color: #1E1450; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 3px #FFD54F, 0 0 26px rgba(255, 196, 0, 0.55); }
.mil-top { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: rgba(0, 0, 0, 0.25); }
.mil > .mil-top { background: linear-gradient(90deg, #7C4DFF, #E040FB 50%, #FF9100); }
.mil > .mil-top .mil-brand { color: #fff; text-shadow: 0 1px 3px rgba(60, 0, 90, 0.5); }
.mil-top .fx-mute { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.mil-x { background: #fff; color: #150C45; border: 0; border-radius: 99px; padding: 6px 14px; font-weight: 800; }
.mil-brand { flex: 1; font-weight: 800; letter-spacing: 0.5px; color: #FFD54F; }
.mil-stage { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 10px; padding: 18px 12px 12px; position: relative; }
.mil-stage::before { content: ''; position: absolute; left: 0; right: 0; top: 4px; height: 10px; background: radial-gradient(circle, #FFF59D 0 3px, #FFB300 3.5px 4.5px, transparent 5px) 0 0 / 22px 10px repeat-x; filter: drop-shadow(0 0 4px #FFD54F); animation: mil-bulbs 1.2s steps(2) infinite; pointer-events: none; }
@keyframes mil-bulbs { 50% { background-position: 11px 0; } }
@media (max-width: 640px) { .mil-stage { grid-template-columns: 1fr; } .mil-ladder { order: -1; display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 4px; } .mil-ladder li { flex: 0 0 auto; } }
.mil-lights { position: absolute; inset: 0; pointer-events: none; display: flex; justify-content: space-around; opacity: 0.75; overflow: hidden; }
.mil-lights i { width: 26px; background: linear-gradient(180deg, rgba(255, 213, 79, 0.75), rgba(255, 213, 79, 0) 80%); clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%); transform-origin: top; animation: mil-sweep 5s ease-in-out infinite alternate; }
.mil-lights i:nth-child(3n+2) { background: linear-gradient(180deg, rgba(255, 128, 200, 0.6), rgba(255, 128, 200, 0) 80%); }
.mil-lights i:nth-child(3n) { background: linear-gradient(180deg, rgba(100, 200, 255, 0.6), rgba(100, 200, 255, 0) 80%); }
.mil-lights i:nth-child(odd) { animation-delay: -2.5s; }
@keyframes mil-sweep { from { transform: rotate(-18deg); } to { transform: rotate(18deg); } }
.mil-main { position: relative; z-index: 1; }
.mil-lifelines { display: flex; gap: 8px; align-items: center; justify-content: center; margin-bottom: 8px; }
.mil-life { width: 52px; height: 36px; border-radius: 50%; border: 2px solid #FFB300; background: radial-gradient(#FFFFFF, #FFF3C4); color: #4A2FB0; font-weight: 800; font-size: 0.85rem; box-shadow: 0 0 10px rgba(255, 179, 0, 0.5); }
.mil-life:disabled { opacity: 0.35; text-decoration: line-through; }
.mil-timer { position: relative; width: 44px; height: 44px; margin-left: 8px; }
.mil-timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.mil-tt { fill: #fff; stroke: rgba(30, 20, 80, 0.15); stroke-width: 3.5; }
.mil-tf { fill: none; stroke: #FF9100; stroke-width: 3.5; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.mil-sec { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.mil-for { text-align: center; color: #B45309; font-weight: 700; font-size: 0.85rem; margin-bottom: 6px; }
.mil-q { background: #FFFFFF; color: #1E1450; border: 3px solid #FFC107; border-radius: 40px; padding: 16px 22px; text-align: center; font-weight: 700; font-size: 1.05rem; min-height: 70px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.7), 0 0 26px rgba(255, 193, 7, 0.6); }
.mil-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
@media (max-width: 520px) { .mil-answers { grid-template-columns: 1fr; } }
.mil-a { text-align: left; padding: 12px 16px; border-radius: 30px; border: 2px solid #9575FF; background: linear-gradient(180deg, #FFFFFF, #F1ECFF); color: #1E1450; font-size: 0.95rem; transition: background 0.2s; box-shadow: 0 2px 10px rgba(124, 77, 255, 0.2); }
.mil-a b { color: #7C4DFF; margin-right: 4px; }
.mil-a:hover:not(:disabled) { background: linear-gradient(180deg, #FFFDE7, #FFF3C4); border-color: #FFB300; }
.mil-a.final { background: linear-gradient(180deg, #FFB300, #F57C00); color: #1a1030; border-color: #FFE082; }
.mil-a.final b { color: #1a1030; }
.mil-a.right { background: linear-gradient(180deg, #43A047, #1B5E20); border-color: #A5D6A7; color: #fff; animation: mil-flash 0.4s 3; }
.mil-a.wrong { background: linear-gradient(180deg, #E53935, #8E0000); border-color: #EF9A9A; color: #fff; }
.mil-a.right b, .mil-a.wrong b { color: #FFF59D; }
.mil-a.gone { visibility: hidden; }
@keyframes mil-flash { 50% { filter: brightness(1.6); } }
.mil-help { margin-top: 10px; }
.mil-poll, .mil-call { background: rgba(255, 255, 255, 0.9); border: 1px solid #FFD54F; border-radius: 12px; padding: 10px; font-size: 0.9rem; }
.mil-bar { display: grid; grid-template-columns: 20px 1fr 40px; gap: 6px; align-items: center; margin-top: 5px; }
.mil-bar i { display: block; height: 12px; background: #FFB300; border-radius: 6px; }
.mil-actions { text-align: center; margin-top: 12px; }
.mil-walk { background: #fff; color: #B45309; border: 2px solid #FFB300; border-radius: 99px; padding: 6px 16px; font-weight: 700; }
.mil-walk:disabled { opacity: 0.4; }
.mil-ladder { list-style: none; margin: 0; padding: 8px; background: rgba(255, 255, 255, 0.85); box-shadow: 0 0 14px rgba(255, 193, 7, 0.35); border-radius: 12px; font-size: 0.82rem; position: relative; z-index: 1; }
.mil-ladder li { display: flex; gap: 8px; padding: 3px 8px; border-radius: 6px; color: #C2410C; font-weight: 700; }
.mil-ladder li span { width: 20px; text-align: right; color: rgba(30, 20, 80, 0.5); }
.mil-ladder li.safe { color: #5B21B6; }
.mil-ladder li.won { color: rgba(30, 20, 80, 0.35); }
.mil-ladder li.now { background: #FFB300; color: #1a1030; }
.mil-ladder li.now span { color: #1a1030; }
.mil-end { text-align: center; padding: 26px 10px; }
.mil-end-t { font-size: 1.3rem; font-weight: 800; color: #B45309; }
.mil-prize { font-size: 2.4rem; font-weight: 900; margin: 8px 0; color: #5B21B6; text-shadow: 0 0 18px rgba(255, 193, 7, 0.9); }
.mil-end-s { opacity: 0.9; }
.mil .arcade-save-note, .feud .arcade-save-note { color: #fff; margin-top: 8px; }
.mil .arcade-save-note { color: #1E1450; }
.mil-done { margin-top: 14px; background: #FFD54F; color: #1a1030; border: 0; border-radius: 99px; padding: 10px 28px; font-weight: 800; }

/* 🎯 Career Feud */
.feud { background: radial-gradient(ellipse at 50% 0%, #1976D2 0%, #0D3B7A 60%, #061A3A 100%); color: #fff; border-radius: 16px; overflow: hidden; padding-bottom: 8px; }
.feud-top { background: rgba(0, 0, 0, 0.3); }
.feud-top .mil-brand { color: #FFC107; }
.feud-score { display: flex; justify-content: space-between; padding: 8px 14px; font-weight: 800; }
.feud-total { color: #FFC107; }
.feud-body { padding: 0 12px; }
.feud-q { text-align: center; font-weight: 800; font-size: 1.1rem; margin: 4px 0 12px; padding: 12px; background: rgba(0, 0, 0, 0.25); border-radius: 12px; border: 2px solid #FFC107; }
.feud-board { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; border-radius: 14px; background: linear-gradient(180deg, #0B2E63, #071E44); border: 4px solid #FFC107; box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5); }
@media (max-width: 480px) { .feud-board { grid-template-columns: 1fr; } }
.feud-slot { display: grid; grid-template-columns: 32px 1fr 44px; align-items: center; gap: 8px; min-height: 42px; padding: 6px 10px; border-radius: 8px; background: linear-gradient(180deg, #2A62C9, #163D86); border: 2px solid #5E92F3; font-weight: 800; text-transform: uppercase; font-size: 0.85rem; }
.feud-num { width: 28px; height: 28px; border-radius: 50%; background: #0B2E63; border: 2px solid #FFC107; display: flex; align-items: center; justify-content: center; color: #FFC107; }
.feud-slot.got, .feud-slot.shown { animation: feud-flip 0.5s ease-out; }
.feud-slot.got { background: linear-gradient(180deg, #FFD54F, #FFA000); color: #3E2723; border-color: #FFF59D; }
.feud-slot.shown { background: linear-gradient(180deg, #546E7A, #37474F); border-color: #90A4AE; }
.feud-pts { text-align: right; }
@keyframes feud-flip { 0% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
.feud-strikes { display: flex; justify-content: center; gap: 12px; margin: 10px 0; font-size: 1.6rem; }
.feud-strikes span { opacity: 0.2; filter: grayscale(1); transition: all 0.2s; }
.feud-strikes span.on { opacity: 1; filter: none; transform: scale(1.2); }
.feud-form { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.feud-form input { flex: 1 1 200px; max-width: 320px; }
.feud-msg { text-align: center; margin-top: 8px; color: #E3F2FD; min-height: 1.4em; }
.feud-next { display: block; margin: 12px auto 0; }
.feud-fm-time { text-align: center; font-size: 1.4rem; font-weight: 800; color: #FFC107; margin-bottom: 6px; }
.feud-fm-q { text-align: center; font-weight: 700; margin-bottom: 8px; min-height: 1.4em; }
.feud-fm-row { display: grid; grid-template-columns: 1fr auto 40px; gap: 8px; padding: 6px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.15); font-size: 0.85rem; }
.feud-fm-row em { text-align: right; font-style: normal; font-weight: 800; }
.feud-fm-row em.ok { color: #FFC107; }
.feud-fm-total { text-align: right; padding: 8px; font-size: 1.1rem; }
.feud-note { text-align: center; font-size: 0.7rem; opacity: 0.6; margin: 10px 0 0; }
.feud .fg-sub { color: #E3F2FD; }
/* Feud editor (teacher) */
.fd-edit-head, .fd-edit-row { display: grid; grid-template-columns: 1.3fr 70px 1.6fr; gap: 6px; margin-bottom: 6px; }
.fd-edit-head { font-size: 0.72rem; font-weight: 700; color: var(--ink-soft); }
.fd-view { margin: 6px 0; padding-left: 22px; }
.fd-view li { margin: 2px 0; }
.fd-view li strong { margin-left: 8px; color: var(--olive-deep); }
.fd-view li em { margin-left: 8px; font-size: 0.78rem; color: var(--ink-soft); }

/* v81: math-style game icons */
.ai-math { display: inline-block; font-family: 'Lora', 'Times New Roman', serif; font-style: italic; font-weight: 700; color: var(--olive-deep); font-size: 0.92em; line-height: 1; letter-spacing: 0.5px; }
.ai-box { display: inline-flex; align-items: center; justify-content: center; width: 1.25em; height: 1.25em; background: #2B2B2B; color: #fff; border: 4px solid #D9D9D9; outline: 2px solid #2B2B2B; border-radius: 6px; font-family: 'Lora', serif; font-weight: 700; font-size: 0.8em; }
.ai-svg { width: 1.2em; height: 1.2em; vertical-align: middle; }
.ai-knight { display: inline-block; font-size: 1.1em; color: #2D3436; line-height: 1; }
.ptm-rejoin { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px; margin: 0 0 12px; border: 2px solid var(--olive-deep); border-radius: var(--radius); background: var(--green-bg); font-weight: 700; }
.ptm-end-btn { margin-left: 4px; }

/* v81: 🎲 Dice & Vines */
.dv-setup { text-align: center; }
.dv-title { font-family: 'Lora', serif; font-weight: 700; font-size: 1.6rem; color: #2E7D32; margin-bottom: 4px; }
.dv-row { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.dv-row > span { font-weight: 700; font-size: 0.85rem; min-width: 70px; text-align: right; margin-right: 4px; }
.dv-pick { padding: 7px 12px; border-radius: 99px; border: 2px solid var(--rule); background: var(--paper); color: var(--ink); font-weight: 700; font-size: 0.85rem; }
.dv-pick.on { background: #2E7D32; color: #fff; border-color: #2E7D32; }
.dv-players { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 12px 0; text-align: left; }
.dv-player { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; gap: 2px 8px; align-items: center; border: 2px solid var(--pc); border-radius: 12px; padding: 8px; background: var(--card); }
.dv-avatar { grid-row: span 2; font-size: 1.8rem; width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--pc) 18%, #fff); display: flex; align-items: center; justify-content: center; }
.dv-cname { font-size: 0.72rem; font-weight: 800; color: var(--pc); }
.dv-name { padding: 4px 6px; font-size: 0.85rem; }
.dv-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.dv-turn { display: flex; align-items: center; gap: 8px; }
.dv-turn-av { font-size: 1.8rem; width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--pc); background: #fff; display: flex; align-items: center; justify-content: center; animation: cj-pulse 1.4s ease-in-out infinite; }
.dv-dice { display: flex; align-items: center; gap: 8px; }
.dv-die { font-size: 2.4rem; line-height: 1; }
.dv-board-wrap { display: flex; justify-content: center; }
.dv-board { width: 100%; max-width: 480px; height: auto; border: 4px solid #6D4C2F; border-radius: 12px; background: #E6F4D2; }
.dv-num { fill: #5D7A45; font-family: sans-serif; font-weight: 700; }
.dv-token.now circle { animation: dv-glow 1s ease-in-out infinite; }
@keyframes dv-glow { 50% { stroke-width: 1.4; } }
.dv-msg { text-align: center; font-weight: 700; min-height: 1.4em; margin: 8px 0; }
.dv-legend { text-align: center; margin: 6px 0; }
.dv-scores { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.dv-chip { border: 2px solid var(--pc); border-radius: 99px; padding: 3px 10px; font-size: 0.8rem; background: var(--card); }
.dv-chip.now { background: var(--pc); color: #fff; }

/* 🌱 Original-game banner (arcade intro) */
.orig-banner { margin: 12px auto 0; max-width: 420px; text-align: center; font-size: 0.85rem; font-weight: 600; color: #2E7D32; background: #E8F5E9; border: 1px dashed #81C784; border-radius: 99px; padding: 6px 14px; }
[data-theme="dark"] .orig-banner { background: rgba(129, 199, 132, 0.12); color: #A5D6A7; }

/* ⚫ Charcoal grey (Master → Control → Background colors): a dark page with light
   text, so it gets the dark-mode tweaks too (its colors are grey, not green). */
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) {
  --paper: #36393F; --paper-2: #2E3136; --card: #43474E;
  --ink: #ECEEF1; --ink-soft: #AEB4BD; --rule: #565B63;
  --green: #97C459; --green-bg: #3B4530; --green-text: #C0DD97;
  --amber: #FAC775; --amber-bg: #4A3F26; --red: #F0997B; --red-bg: #4A2C26; --gold: #FAC775;
  --olive-deep: #C0DD97; --olive-base: #97C459; --olive-soft: #8DB255;
}
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .offline-banner { background: #C0DD97; color: #1a2410; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .dp-doc-card { background: #fffdf6; color: #1c1c14; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .line-messages { background: #3F4F24; color: #fff; border-color: #4A5A28; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .line-bubble-row.theirs .line-bubble { background: var(--paper); }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .line-composer input[type="text"] { background: #3F4F24; color: #fff; border-color: #4A5A28; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .line-composer input[type="text"]::placeholder { color: #d9e6c8; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .pie-slice { fill: #1B4020; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .pie-slice:hover { fill: #234F29; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .pie-slice.selected { fill: #A5D6A7; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .pie-slice.selected:hover { fill: #A5D6A7; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .conf-tile-status { background: rgba(0,0,0,0.4); color: var(--ink); }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .status-multimodal { background: #3A3560; color: #C9BFF0; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .pod-messages { background: var(--card); }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .fg-mastery { filter: brightness(0.85); }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .cal-day.has-data { background: #A8D98A; color: #16240F; border-color: #A8D98A; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .fg-low-cell { color: #F2A99F; background: rgba(242, 169, 159, 0.14); }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .perf-right { color: #A8D98A; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .perf-wrong { color: #F2A99F; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .att-P, html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .att-L, html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .att-M { color: #A8D98A; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .att-A, html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .att-E { color: #F2A99F; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .att-month-box { border-color: #A8D98A !important; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .att-month-table th, html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .att-month-table td { border-color: #4F8A45 !important; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .cal-day.weekend { background: #3A3A38 !important; color: #A3A39C !important; border-color: #4A4A46 !important; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .weather-label { color: var(--olive-soft); }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .quote-card, html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .weather-card { border-color: var(--olive-soft); }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .mq-term { border-color: var(--olive-soft); }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .mq-term-title, html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .mq-term > summary::before { color: var(--olive-soft); }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .mf-svg { background: #f6f3ea; border-radius: 8px; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .mf-svg .mf-t { fill: #232B3A; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .mq-ch-title { color: var(--olive-soft); }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .orig-banner { background: rgba(129, 199, 132, 0.12); color: #A5D6A7; }
/* Charcoal sign-in page: light text for what sits on the dark background (the card stays cream) */
html[data-screen="gate"][data-login="charcoal"] .gate > :not(.gate-card) { --ink: #ECEEF1; --ink-soft: #C4C9D0; --olive-deep: #C0DD97; --rule: #6A7079; color: var(--ink); }
/* Charcoal title bar: light text and a brighter logo */
html[data-titlebar="charcoal"]:not([data-theme="dark"]) .topbar { --ink: #ECEEF1; --ink-soft: #C4C9D0; --olive-deep: #C0DD97; color: var(--ink); }
/* v155: on the charcoal title bar, a copy of the logo with light-green letters (the sprout keeps its own colors) */
html[data-titlebar="charcoal"]:not([data-theme="dark"]) .topbar .wordmark-sm { content: url("assets/logo-wordmark-light.png"); }
/* In-app greeting (same as the sign-in greeting) */
.topbar .greeting .tb-hi { display: block; }
.topbar .greeting .tb-welcome { display: block; font-family: 'IBM Plex Sans', sans-serif; font-weight: 500; font-size: 0.78rem; color: var(--ink-soft); letter-spacing: 0.3px; }
@media (max-width: 480px) { .topbar .greeting { font-size: 1rem; } .topbar .greeting .tb-welcome { font-size: 0.7rem; } }

/* 🔳 Tile transparency (Master → Control, default 50%): only the tile
   background fades — icons, text and borders stay fully visible, and the
   Seasons effects show through. --tile-solid = 100% − transparency (look.js). */
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  .subject-card,
  .tabs.tabs-grid .tab-btn, .tabs.tabs-grid .tab-btn.active,
  .quote-card, .weather-card { background: color-mix(in srgb, var(--card) var(--tile-solid, 50%), transparent); }
}

/* Control (v84): greeting visibility, teacher names, tiles, quote */
.ctl-greet { display: grid; gap: 6px; }
.ctl-greet-row { padding: 6px 8px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.ctl-greet-row label { margin: 0 !important; }
.ctl-greet-row .ctl-sub { margin: 4px 0 0 26px !important; font-size: 0.82rem; }
.ctl-greet-row .ctl-sub.off { opacity: 0.45; }
.ctl-greet-prev { display: grid; gap: 6px; }
.ctl-greet-prev-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: var(--radius); background: var(--paper-2); }
.ctl-greet-who { flex: 0 0 64px; font-size: 0.75rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.ctl-greet-prev .greeting { font-family: 'Lora', serif; font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.ctl-greet-prev .greeting .tb-hi { display: block; }
.ctl-greet-prev .greeting .tb-welcome { display: block; font-family: 'IBM Plex Sans', sans-serif; font-weight: 500; font-size: 0.75rem; color: var(--ink-soft); }
.ctl-tnames-table { width: 100%; }
.ctl-tnames-table input { width: 100%; min-width: 140px; }
.ctl-tiles-prev { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; padding: 14px; border-radius: 10px; border: 1px solid var(--rule);
  background: radial-gradient(circle, var(--olive-soft) 2px, transparent 2.5px) 0 0 / 18px 18px, linear-gradient(135deg, var(--paper), var(--paper-2)); }
.ctl-tiles-prev .subject-card { padding: 16px 8px; cursor: default; }
.ctl-tiles-prev .subject-card .icon { font-size: 2rem; }
.ctl-card label textarea { display: block; width: 100%; margin-top: 4px; font: inherit; font-weight: 400; color: var(--ink); resize: vertical; }
.ctl-quote-custom { margin: 2px 0 0 26px; }
.ctl-quote-custom.off { opacity: 0.45; pointer-events: none; }
.ctl-quote-prev { margin-top: 0; }
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  .ctl-prev-tile { background: color-mix(in srgb, var(--pc) var(--tile-solid, 50%), transparent); }
}

/* ⚡ FlashSched (Class setup, owner only) */
.fs-title { margin: 4px 0 4px; display: flex; align-items: center; gap: 6px; }
.fs-blurb { margin: 0 0 10px; font-size: 0.86rem; }
.fs-hours { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .fs-hours { grid-template-columns: 1fr 1fr; } }
.fs-actions-top { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.fs-rows { width: 100%; border-collapse: collapse; min-width: 640px; }
.fs-rows th { text-align: left; font-size: 0.78rem; color: var(--ink-soft); padding: 4px 6px; border-bottom: 1px solid var(--rule); }
.fs-rows td { padding: 4px 6px; border-bottom: 1px dashed var(--rule); vertical-align: middle; }
.fs-rows td input, .fs-rows td select { width: 100%; margin: 0; }
.fs-rows td:nth-child(5) { width: 88px; }
.fs-rows .fs-n { width: 28px; color: var(--ink-soft); font-size: 0.8rem; text-align: center; }
.fs-make-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 4px 0 14px; }
.fs-make { background: linear-gradient(180deg, #FF9A33, #F26B0F); color: #fff; border: 2px solid #C2570C; border-radius: 99px; padding: 12px 26px; font-size: 1.05rem; font-weight: 800; box-shadow: 0 3px 12px rgba(242, 107, 15, 0.35); cursor: pointer; }
.fs-make:hover:not(:disabled) { filter: brightness(1.06); }
.fs-make:disabled { opacity: 0.7; cursor: wait; }
.fs-summary { border: 2px solid #F59E42; background: rgba(255, 179, 92, 0.12); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 12px; font-size: 0.9rem; }
.fs-sum-top { font-size: 0.95rem; margin-bottom: 4px; }
.fs-ok { color: var(--green); font-weight: 600; }
.fs-warn { color: var(--red); font-weight: 600; }
.fs-stale { color: var(--amber); font-weight: 600; }
.fs-note { color: var(--ink-soft); font-size: 0.84rem; }
.fs-view-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.fs-view-bar select { width: auto; margin: 0; min-width: 200px; }
.fs-seg { display: inline-flex; border: 2px solid #F26B0F; border-radius: 99px; overflow: hidden; }
.fs-seg button { background: transparent; border: 0; padding: 6px 14px; font-weight: 700; color: #C2570C; cursor: pointer; }
.fs-seg button.on { background: #F26B0F; color: #fff; }
.fs-grid-wrap { overflow-x: auto; margin-bottom: 14px; }
.fs-table th, .fs-table td { border-color: #C2570C; }
.fs-table thead th { background: #E8680F; }
.fs-table th.prog-title { background: #A8470A; }
.fs-table .prog-time { background: rgba(242, 107, 15, 0.08); }
.fs-hrs { font-weight: 600; font-size: 0.78rem; letter-spacing: 0; opacity: 0.85; margin-left: 6px; }
[data-theme="dark"] .fs-seg button { color: #FFB35C; }
[data-theme="dark"] .fs-seg button.on { color: #fff; }

/* FlashSched: Sections handled drop-down with tick boxes */
.fs-secs-btn { width: 100%; min-width: 150px; text-align: left; padding: 7px 10px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); color: var(--ink); font: inherit; font-size: 0.9rem; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-secs-btn:hover { border-color: #F26B0F; }
.fs-secs-btn b { color: #C2570C; }
.fs-secs-ph { color: var(--ink-soft); }
.fs-secs-menu { position: absolute; z-index: 1000; background: var(--card); color: var(--ink); border: 2px solid #F59E42; border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.22); padding: 10px; display: grid; gap: 8px; }
.fs-secs-top { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; gap: 8px; }
.fs-secs-top .link-btn { margin: 0; padding: 0; font-size: 0.8rem; }
.fs-secs-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 4px 10px; max-height: 220px; overflow-y: auto; padding: 2px; }
.fs-secs-opt { display: flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 600; cursor: pointer; padding: 3px 2px; margin: 0; }
.fs-secs-opt input { width: auto; margin: 0; accent-color: #F26B0F; }
.fs-secs-add { display: flex; gap: 6px; }
.fs-secs-add input { flex: 1; min-width: 0; margin: 0; }
.fs-secs-add .btn-small { margin: 0; white-space: nowrap; }
.fs-secs-done { justify-self: end; margin: 0; }

/* ---------- v89: Life & Career Skills, Sessions 3–4 ---------- */
/* 🧩 Four Sides */
.f4-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 760px; margin: 0 auto; }
@media (min-width: 760px) { .f4-wrap { grid-template-columns: 1fr 1fr; align-items: start; } }
.f4-picbox { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 8px; transition: box-shadow 0.3s; }
.f4-picbox.f4-done { box-shadow: 0 0 0 4px #FFD54F, 0 0 26px rgba(255, 213, 79, 0.8); }
.f4-pic { display: block; width: 100%; height: auto; border-radius: 10px; }
.f4-cover { transition: opacity 0.5s ease, transform 0.5s ease; transform-box: fill-box; transform-origin: center; }
.f4-cover.off { opacity: 0; transform: scale(0.6); }
.f4-cover-ic { opacity: 0.55; transition: opacity 0.4s; pointer-events: none; }
.f4-cover-ic.off { opacity: 0; }
.f4-center { opacity: 0; transition: opacity 0.4s; }
.f4-done .f4-center { opacity: 1; }
.f4-count { text-align: center; font-size: 0.85rem; font-weight: 700; color: var(--ink-soft); margin-top: 6px; }
.f4-card, .nm-card { background: #fff; color: #263238; border: 2px solid #7E57C2; border-radius: 14px; padding: 14px 16px; min-height: 76px; font-weight: 700; font-size: 1.02rem; text-align: center; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1); max-width: 560px; margin: 0 auto; }
.f4-card.cr-in, .nm-card.cr-in { animation: cr-in 0.35s ease-out; }
.f4-ask, .nm-ask { text-align: center; font-weight: 700; margin: 10px 0 6px; }
.f4-btns, .nm-btns { display: grid; gap: 8px; max-width: 560px; margin: 0 auto; }
.f4-four { grid-template-columns: 1fr 1fr; }
.f4-two, .nm-two { grid-template-columns: 1fr 1fr; }
.nm-six { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 420px) { .nm-six { grid-template-columns: 1fr 1fr; } }
.f4-b { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border: 2px solid var(--rule); border-radius: 12px; background: var(--card); color: var(--ink); font-weight: 700; font-size: 0.9rem; cursor: pointer; box-shadow: 0 3px 0 var(--rule); }
.f4-b span { font-size: 1.5rem; line-height: 1.1; }
.f4-b:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--rule); }
.f4-b:disabled { opacity: 0.45; cursor: default; }
.f4-b kbd { position: absolute; top: 4px; right: 6px; font-size: 0.65rem; opacity: 0.5; font-family: inherit; }
@media (hover: none) { .f4-b kbd { display: none; } }
.f4-P { border-color: #9575CD; } .f4-S { border-color: #FF8A65; } .f4-M { border-color: #FBC02D; } .f4-E { border-color: #66BB6A; }
.f4-O, .nm-good { border-color: #43A047; background: color-mix(in srgb, #43A047 12%, var(--card)); }
.f4-C, .nm-fix { border-color: #E53935; background: color-mix(in srgb, #E53935 10%, var(--card)); }
.f4-why, .nm-why { text-align: center; min-height: 2.6em; margin-top: 8px; max-width: 560px; margin-left: auto; margin-right: auto; }
.f4-start, .nm-start { text-align: center; margin-top: 10px; }

/* 🚶 Next Move */
.nm-road { max-width: 560px; margin: 0 auto 10px; background: linear-gradient(180deg, #E3F2FD, #E8F5E9); border: 1px solid var(--rule); border-radius: 14px; padding: 8px 10px 12px; color: #263238; }
.nm-goalname { text-align: center; font-size: 0.9rem; margin-bottom: 6px; }
.nm-track { position: relative; display: flex; gap: 3px; padding-top: 34px; }
.nm-tile { flex: 1; height: 14px; border-radius: 4px; background: #CFD8DC; display: flex; align-items: center; justify-content: center; transition: background 0.3s; }
.nm-tile.done { background: #26A69A; }
.nm-tile.nm-flag { background: transparent; height: 26px; margin-top: -12px; font-size: 1.4rem; flex: 1.2; }
.nm-walker { position: absolute; top: 0; left: 0; width: 34px; text-align: center; font-size: 1.8rem; line-height: 1; transition: left 0.5s ease; }
.nm-walker .nm-av { display: inline-block; animation: nm-bob 0.9s ease-in-out infinite; }
@keyframes nm-bob { 50% { transform: translateY(-3px); } }
.nm-walker .nm-block { display: none; position: absolute; left: 26px; top: 2px; font-size: 1.2rem; }
.nm-walker.blocked .nm-av { animation: none; filter: grayscale(0.6); }
.nm-walker.blocked .nm-block { display: block; animation: cr-in 0.3s ease-out; }
.nm-card { border-color: #26A69A; }

/* 🖼️ Bigger Picture · 🏗️ Career Builder (shared quiz layout) */
.lq { max-width: 980px; margin: 0 auto; }
.lq-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.lq-x { border: 1px solid var(--rule); background: var(--card); color: var(--ink); border-radius: 10px; padding: 6px 10px; cursor: pointer; }
.lq-brand { flex: 1; font-weight: 800; font-size: 1.05rem; }
.lq-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 860px) { .lq-body { grid-template-columns: 1fr 1fr; align-items: start; } .lq-side { position: sticky; top: 10px; } }
.lq-why { text-align: center; min-height: 2.4em; margin-top: 10px; }
.lq-end { text-align: center; padding: 10px 6px 20px; }
.lq-end-t { font-weight: 800; font-size: 1.1rem; margin-bottom: 6px; }
.bp-pic { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 8px; }
.bp-pic svg { display: block; width: 100%; height: auto; border-radius: 10px; }
.bp-tile { fill: #D7CFBD; stroke: #EFE9DC; stroke-width: 0.8; transition: opacity 0.6s ease; }
.bp-tile.off { opacity: 0; }
.bp-tile.off.late { transition-duration: 1.6s; }
.bp-cap { text-align: center; font-weight: 700; font-size: 0.85rem; color: var(--ink-soft); margin-top: 6px; }
.cb-plan { background: #FFFDF6; color: #263238; border: 2px solid #5C6BC0; border-radius: 14px; padding: 10px 12px; }
.cb-head { font-weight: 800; text-align: center; margin-bottom: 8px; }
.cb-who { font-weight: 600; font-size: 0.85rem; color: #5C6BC0; }
.cb-part { --built: 0; border: 1px dashed #B0BEC5; border-radius: 10px; padding: 6px 8px; margin-bottom: 6px; background: linear-gradient(90deg, rgba(92, 107, 192, 0.12) calc(var(--built) * 100%), transparent 0); transition: border-color 0.3s; }
.cb-part.now { border: 2px solid #FF7043; }
.cb-part.built { border-style: solid; border-color: #5C6BC0; }
.cb-ph { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-weight: 700; font-size: 0.9rem; }
.cb-pips { display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.cb-pips i { width: 8px; height: 8px; border-radius: 2px; background: #CFD8DC; }
.cb-pips i.on { background: #66BB6A; }
.cb-txt { font-size: 0.85rem; margin-top: 4px; filter: blur(4px); opacity: 0.35; transition: filter 0.6s, opacity 0.6s; user-select: none; }
.cb-part.built .cb-txt { filter: blur(calc((1 - var(--built)) * 3px)); opacity: calc(0.45 + var(--built) * 0.55); }
.cb-plan.cb-final .cb-part .cb-txt { filter: none; opacity: 1; }
@media (max-width: 859px) { .cb-plan:not(.cb-final) .cb-part:not(.now) .cb-txt { display: none; } .cb-part { padding: 4px 8px; margin-bottom: 4px; } }
.cb-final { box-shadow: 0 0 0 4px #FFD54F; }
.cb-sum { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 460px; margin: 10px auto; }

/* ---------- v102 🎒 Backpack (student) + swipeable notebook ---------- */
.bp-head { display: flex; align-items: baseline; gap: 8px; font-size: 1.3rem; margin-bottom: 12px; }
.bp-head b { font-family: 'Lora', serif; }
.bp-head span { font-size: 0.8rem; color: var(--ink-soft); }
.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.bp-book { position: relative; aspect-ratio: 3 / 4; border: none; border-radius: 6px 14px 14px 6px; background: var(--cv); color: #fff; cursor: pointer; padding: 0; overflow: hidden;
  box-shadow: inset -6px 0 0 rgba(255,255,255,.18), 4px 6px 0 rgba(0,0,0,.18), 0 10px 18px rgba(0,0,0,.15); transition: transform .15s; text-align: left; }
.bp-book:hover { transform: translateY(-3px) rotate(-1deg); }
.bp-book.empty { filter: saturate(.35) brightness(1.1); }
.bp-spine { position: absolute; left: 0; top: 0; bottom: 0; width: 16px; background: repeating-linear-gradient(180deg, rgba(0,0,0,.35) 0 6px, transparent 6px 14px); border-right: 2px solid rgba(0,0,0,.2); }
.bp-label { position: absolute; left: 26px; right: 12px; top: 22%; padding: 10px; border-radius: 8px; background: #FFFDF7; color: #263238; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 2px 0 rgba(0,0,0,.15); }
.bp-label small { font-size: 0.6rem; letter-spacing: .14em; color: #78909C; font-weight: 800; }
.bp-label b { font-family: 'Lora', serif; font-size: 1.25rem; }
.bp-label em { font-style: normal; font-size: 0.72rem; color: #607D8B; }
.bp-tool { aspect-ratio: 3 / 4; border: 2px dashed #B0BEC5; border-radius: 14px; background: #FAFAFA; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; text-align: center; transition: transform .15s; }
.bp-tool:hover { transform: translateY(-3px); border-color: var(--olive-deep); }
.bp-calc { font-size: 3rem; } .bp-tool b { font-size: 0.95rem; } .bp-tool em { font-style: normal; font-size: 0.72rem; color: var(--ink-soft); }

.nb-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; font-size: 0.85rem; }
.nb-back:not(.back-btn-xl) { color: var(--olive-deep); text-decoration: underline; cursor: pointer; }
.nb-back.back-btn-xl { margin: 0; }
.nb-where { color: var(--ink-soft); font-weight: 700; }
.nb-stage { position: relative; perspective: 1600px; touch-action: pan-y; padding-left: 12px; }
.nb-rings { position: absolute; left: 0; top: 14px; bottom: 14px; width: 24px; z-index: 3; pointer-events: none;
  background: radial-gradient(circle at 12px 50%, #9E9E9E 0 5px, #ECEFF1 5.5px 7px, transparent 7.5px) 0 0 / 24px 34px repeat-y; }
.nb-sheet { min-height: 62vh; transform-origin: left center; will-change: transform; box-shadow: 0 1px 0 #ddd, 0 4px 0 -1px #f3efe4, 0 5px 0 -1px #ddd, 0 8px 0 -2px #f3efe4, 0 9px 0 -2px #ddd, 0 12px 20px rgba(0,0,0,.08); padding-left: 44px !important; padding-bottom: 46px !important; user-select: none; -webkit-user-select: none; }
.nb-sheet::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(90deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.6)); opacity: var(--shade, 0); }
.nb-page-tag { font-family: 'IBM Plex Sans', sans-serif; font-size: 0.72rem; font-weight: 800; letter-spacing: .06em; color: var(--ink-soft); text-transform: uppercase; }
.nb-folio { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-size: 0.8rem; color: var(--ink-soft); }
.nb-corner { position: absolute; right: 0; bottom: 0; width: 44px; height: 44px; border: none; padding: 0; cursor: pointer; background: linear-gradient(315deg, transparent 50%, #E8E2CF 50%, #F7F2E2 70%); border-top-left-radius: 6px; box-shadow: -2px -2px 4px rgba(0,0,0,.08); }
.nb-corner:hover { width: 54px; height: 54px; }
.nb-toc { list-style: none; padding: 0; margin: 6px 0 12px; }
.nb-toc li { display: flex; align-items: baseline; gap: 6px; cursor: pointer; padding: 0 2px; border-radius: 4px; }
.nb-toc li:hover { background: rgba(85,139,47,.08); }
.nb-toc li span { flex: 0 1 auto; }
.nb-toc li i { flex: 1; border-bottom: 2px dotted #B0BEC5; transform: translateY(-6px); min-width: 16px; }
.nb-toc li b { font-family: 'IBM Plex Sans', sans-serif; font-size: 0.85rem; color: var(--olive-deep); }
.nb-hint { font-family: 'IBM Plex Sans', sans-serif; font-size: 0.78rem; color: var(--ink-soft); }
.nb-table-scroll { overflow-x: auto; max-width: 100%; }
.nb-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 6px; }
.nb-btn { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--olive-deep); background: var(--card, #fffdf7); color: var(--olive-deep); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.nb-btn:disabled { opacity: .3; cursor: default; }
.nb-dots { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.nb-dots i { width: 8px; height: 8px; border-radius: 50%; background: #CFD8DC; }
.nb-dots i.on { background: var(--olive-deep); transform: scale(1.3); }
/* page turning */
.nb-sheet.nb-out-next { animation: nbOutNext .3s ease-in forwards; transform-origin: left center; }
.nb-sheet.nb-out-prev { animation: nbOutPrev .3s ease-in forwards; }
.nb-sheet.nb-in-next { animation: nbInNext .28s ease-out; }
.nb-sheet.nb-in-prev { animation: nbInPrev .38s ease-out; transform-origin: left center; }
@keyframes nbOutNext { to { transform: rotateY(-100deg); opacity: .2; } }
@keyframes nbOutPrev { to { transform: translateX(30px) scale(.97); opacity: 0; } }
@keyframes nbInNext { from { transform: scale(.97); filter: brightness(.88); } to { transform: none; filter: none; } }
@keyframes nbInPrev { from { transform: rotateY(-100deg); opacity: .3; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .nb-sheet.nb-out-next, .nb-sheet.nb-out-prev, .nb-sheet.nb-in-next, .nb-sheet.nb-in-prev { animation-duration: .01s; } }
.nb-toc li.nb-toc-ch { cursor: default; font-family: 'IBM Plex Sans', sans-serif; font-size: 0.75rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); }
.nb-toc li.nb-toc-ch:hover { background: none; }

/* ---------- v103 notebook pages (one fixed page at a time) ---------- */
.nbp-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.nbp-colors { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 10px; margin-bottom: 10px; border-radius: 12px; background: var(--card, #fffdf7); border: 1px solid var(--rule); }
.nbp-swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #CFD8DC; cursor: pointer; }
.nbp-swatch.on { border-color: var(--olive-deep); box-shadow: 0 0 0 3px rgba(85,107,47,.25); }
.nbp-stage { display: flex; justify-content: center; padding: 6px 0 10px 14px; perspective: 1800px; touch-action: pan-y; }
.nbp-sheet { position: relative; width: var(--pw); height: var(--ph); box-sizing: border-box; border-radius: 4px 14px 14px 4px; padding: 0 calc(var(--pw) * .07) 0 calc(var(--pw) * .1);
  border: 1px solid #D8D2C4; box-shadow: 3px 4px 0 #C9C2B2, 0 14px 30px rgba(0,0,0,.14); font-family: 'Noto Sans', sans-serif; color: #2B2B2B; line-height: 1.55;
  display: flex; flex-direction: column; transform-origin: left center; will-change: transform; user-select: none; -webkit-user-select: none; transition: background-color .25s; }
.nbp-sheet::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(90deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.6)); opacity: var(--shade, 0); }
.nbp-coil { position: absolute; left: -17px; top: 2.2%; bottom: 2.2%; width: 34px; pointer-events: none; z-index: 2;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='34' height='26' viewBox='0 0 34 26'><circle cx='24' cy='14' r='3.2' fill='%23555'/><path d='M24 14 C12 3 1 6 4 13 C6 18 15 18 21 15' fill='none' stroke='%23444' stroke-width='3.4' stroke-linecap='round'/><path d='M24 14 C12 3 1 6 4 13 C6 18 15 18 21 15' fill='none' stroke='%23B8B8B8' stroke-width='1.6' stroke-linecap='round'/></svg>") 0 0 / 34px calc(var(--ph) * .044) repeat-y; }
.nbp-head { flex: none; display: flex; justify-content: space-between; align-items: center; height: calc(var(--ph) * .075); border-bottom: 1px solid rgba(0,0,0,.08); margin-bottom: .5em; }
.nbp-logo { height: 46%; width: auto; opacity: .9; }
.nbp-num { font-family: 'Noto Sans', sans-serif; font-size: .78em; font-weight: 700; color: #6D6A60; }
.nbp-body { flex: 1; min-height: 0; overflow: hidden; margin-bottom: calc(var(--ph) * .085); }
.nbp-p { margin: 0 0 .15em; white-space: pre-wrap; }
.nbp-gap { height: .7em; margin: 0; }
.nbp-tag { font-family: 'Noto Sans', sans-serif; font-size: .68em; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #7A766B; }
.nbp-title { margin: .1em 0 .5em; font-family: 'Noto Sans', sans-serif; font-weight: 700; font-size: 1.32em; line-height: 1.25; }
.nbp-hint { font-family: 'Noto Sans', sans-serif; font-size: .75em; color: #7A766B; margin-top: .8em; }
.nbp-toc-ch { font-family: 'Noto Sans', sans-serif; font-size: .7em; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #7A766B; margin: .7em 0 .1em; }
.nbp-toc { display: flex; align-items: baseline; gap: 6px; cursor: pointer; padding: .12em .2em; border-radius: 6px; }
.nbp-toc:hover { background: rgba(0,0,0,.05); }
.nbp-toc i { flex: 1; border-bottom: 2px dotted #B0BEC5; min-width: 14px; transform: translateY(-.3em); }
.nbp-toc::after { content: '›'; color: var(--olive-deep); font-weight: 700; }
.nbp-table { border-collapse: collapse; margin: .3em 0 .7em; font-family: 'Noto Sans', sans-serif; font-size: .82em; line-height: 1.3; }
.nbp-table th, .nbp-table td { border: 1px solid #CFC8B8; padding: .3em .7em; }
.nbp-table th { background: var(--olive-deep); color: #fff; }
.nbp-img { height: calc(var(--ph) * .3); margin: .3em 0 .6em; display: flex; justify-content: center; }
.nbp-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; border: 1px solid rgba(0,0,0,.1); }
.nbp-body .nbp-pdf { height: 100%; }
.nbp-body .nbp-pdf .notebook-pdf-viewer { height: 100%; overflow: auto; }
.nbp-sheet .nb-corner { right: 0; bottom: 0; border-bottom-right-radius: 14px; }
/* full screen: just the page */
body.nbp-fs-lock { overflow: hidden; }
.nbp-fs { position: fixed; inset: 0; z-index: 9000; background: radial-gradient(circle at 50% 30%, #4E5A63, #1F262B); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.nbp-fs-top { position: absolute; top: 0; left: 0; right: 0; height: 40px; display: flex; justify-content: space-between; align-items: center; padding: 0 10px; color: #ECEFF1; font-size: .8rem; z-index: 3; }
.nbp-fs-top > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.nbp-tool { width: 36px; height: 36px; border-radius: 50%; border: none; background: rgba(255,255,255,.14); color: #fff; font-size: 1.05rem; cursor: pointer; margin-left: 6px; }
.nbp-fs .nbp-colors { position: absolute; top: 44px; right: 10px; z-index: 4; }
.nbp-fs .nbp-stage { padding: 0 0 0 14px; }
.nbp-side { position: absolute; top: 50%; left: 6px; transform: translateY(-50%); width: 44px; height: 64px; border: none; border-radius: 12px; background: rgba(255,255,255,.12); color: #fff; font-size: 2rem; cursor: pointer; z-index: 3; }
.nbp-side.right { left: auto; right: 6px; }
.nbp-side:disabled { opacity: .15; cursor: default; }
@media (hover: none) and (max-width: 700px) { .nbp-side { background: rgba(255,255,255,.08); width: 34px; } }
.nbp-fs-bottom { position: absolute; bottom: 6px; left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 10px; color: #CFD8DC; font-size: .75rem; }
.nbp-fs-bottom .nb-dots i { background: rgba(255,255,255,.3); } .nbp-fs-bottom .nb-dots i.on { background: #fff; }
.nbp-sheet.nb-out-next { animation: nbOutNext .3s ease-in forwards; transform-origin: left center; }
.nbp-sheet.nb-out-prev { animation: nbOutPrev .3s ease-in forwards; }
.nbp-sheet.nb-in-next { animation: nbInNext .28s ease-out; }
.nbp-sheet.nb-in-prev { animation: nbpInPrev .42s cubic-bezier(.2,.7,.3,1); transform-origin: left center; backface-visibility: hidden; }
/* v147: the previous page comes back solid (no see-through), swinging in from the coil like a real sheet */
@keyframes nbpInPrev { from { transform: perspective(1400px) rotateY(-96deg); filter: brightness(.78); } 70% { filter: brightness(.97); } to { transform: none; filter: none; } }
.nbp-sheet { flex: none; }
/* v147: the page that stays underneath while the previous page flips back over it */
.nbp-sheet.nb-under { animation: nbUnder .42s ease-out forwards; }
@keyframes nbUnder { to { filter: brightness(.9); } }
@media (prefers-reduced-motion: reduce) { .nbp-sheet.nb-under { animation: none; display: none; } }

/* ---------- v104 🖍️ highlighter + calculator manual pages ---------- */
.nbp-hlbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; margin-bottom: 10px; border-radius: 12px; background: #263238; }
.nbp-pen { width: 34px; height: 34px; border-radius: 10px 10px 10px 2px; border: 2px solid rgba(255,255,255,.3); background: var(--pen); cursor: pointer; transform: rotate(-12deg); }
.nbp-pen.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.35); transform: rotate(-12deg) translateY(-3px); }
.nbp-eraser { background: #ECEFF1; font-size: 1rem; line-height: 1; }
.nbp-hlbar .nbp-hl-done { margin-left: auto; background: #fff; }
.nbp-hl-tip { flex-basis: 100%; font-size: .75rem; color: #CFD8DC; }
.nbp-tools .nbp-hl.on, .nbp-tool.nbp-hl.on { background: #FFEB3B; color: #263238; border-color: #FBC02D; }
.nbp-fs .nbp-hlbar { position: absolute; top: 44px; left: 10px; right: 10px; z-index: 4; }
.nbp-mark { color: inherit; border-radius: 3px; padding: 0 1px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.nbp-hl-on .nbp-body { touch-action: none; cursor: text; }
.nbp-hl-on { box-shadow: 0 0 0 3px #FFEB3B, 3px 4px 0 #C9C2B2, 0 14px 30px rgba(0,0,0,.14); }
.nbp-sec { font-family: 'Noto Sans', sans-serif; font-weight: 700; font-size: .95em; color: #33402A; margin-top: .2em; }
.nbp-ex { color: #4E4A40; padding-left: .6em; }
.nbp-tools .btn-small { padding: 6px 10px; font-size: .8rem; }

/* ---------- v105 FlashSched teacher considerations ---------- */
.fs-rule { border: 1px solid var(--rule); border-radius: 12px; padding: 10px; margin-bottom: 10px; background: var(--card, #fffdf7); }
.fs-rule-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fs-rule-top input { flex: 1 1 160px; min-width: 0; }
.fs-rule-lbl { font-size: .78rem; font-weight: 700; color: var(--ink-soft); margin: 8px 0 4px; }
.fs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fs-chip { border: 1.5px solid var(--rule); background: #fff; border-radius: 999px; padding: 5px 10px; font-size: .78rem; cursor: pointer; }
.fs-chip b { margin-right: 2px; }
.fs-chip.on { background: #C62828; border-color: #C62828; color: #fff; }
.fs-rule-reason { margin-top: 8px; width: 100%; box-sizing: border-box; }

/* ---------- v105 Tasks (Term icons, folds, Booster) + School Policies ---------- */
.tasks-h { margin: 0 0 12px; font-family: 'Lora', serif; }
.booster-card { position: relative; }
.booster-badge { position: absolute; top: 8px; right: 10px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #E53935; color: #fff; font-size: .75rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.task-fold { border: 1px solid var(--rule); border-radius: 12px; background: var(--card, #fffdf7); margin-bottom: 10px; overflow: hidden; }
.task-fold > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; font-weight: 700; }
.task-fold > summary::-webkit-details-marker { display: none; }
.task-fold > summary::before { content: '▸'; color: var(--olive-deep); transition: transform .15s; }
.task-fold[open] > summary::before { transform: rotate(90deg); }
.task-fold > summary span { flex: 1; }
.task-fold > summary em { font-style: normal; font-size: .78rem; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.task-fold-body { padding: 0 14px 12px; }
.task-fold.task-lesson { margin: 8px 0 0; background: #fff; }
.task-fold.task-lesson > summary { padding: 10px 12px; font-weight: 600; }
/* The lesson card stays white in dark mode too, so its text is dark green-black (readable in both). */
.task-fold.task-lesson, .task-fold.task-lesson .task-line, .task-fold.task-lesson .task-line b, .task-fold.task-lesson > summary span { color: #1B2A12; }
.task-fold.task-lesson > summary em { color: #3E4A2E; }
.task-fold.task-lesson > summary::before { color: #4A5A28; }
.task-line { margin: 4px 0 8px; font-size: .9rem; }
.booster-ch { font-size: .8rem; font-weight: 800; color: var(--ink-soft); margin: 10px 0 6px; }
.booster-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: #fff; border: 1px solid var(--rule); margin-bottom: 8px; }
.booster-item.done { background: #F1F8E9; }
.booster-ic { font-size: 1.8rem; width: 44px; text-align: center; flex: none; }
.booster-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.booster-txt small { color: var(--ink-soft); font-size: .76rem; }
.booster-note { color: #6A1B9A !important; }
.booster-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 860px) { .booster-grid { grid-template-columns: 1fr 1fr; } }
.booster-students input[type="search"] { width: 100%; box-sizing: border-box; margin: 8px 0; }
.booster-tick-tools { font-size: .8rem; margin-bottom: 6px; }
#booster-student-list { max-height: 340px; overflow-y: auto; border: 1px solid var(--rule); border-radius: 10px; padding: 4px 8px; }
.booster-stu { display: flex; align-items: center; gap: 8px; padding: 6px 2px; border-bottom: 1px dashed var(--rule); cursor: pointer; }
.booster-stu small { margin-left: auto; color: var(--ink-soft); font-size: .75rem; }
.booster-form label { display: block; font-size: .82rem; font-weight: 700; margin: 8px 0 2px; }
.booster-form select, .booster-form input[type="text"], .booster-form input:not([type]) { width: 100%; box-sizing: border-box; }
.booster-kind { display: flex; gap: 14px; }
.booster-kind label { display: flex; align-items: center; gap: 6px; font-weight: 600; margin: 0; }
.nbp-li { padding-left: 1.1em; text-indent: -1.1em; }
.nbp-img.nbp-img-tall { height: calc(var(--ph) * .74); }
.pol-edit-row { display: flex; gap: 8px; margin-bottom: 8px; }
.pol-edit-row input:not(.pol-icon) { flex: 1; min-width: 0; }
.pol-icon { width: 54px; text-align: center; font-size: 1.1rem; }
.pol-part textarea { width: 100%; box-sizing: border-box; font-family: 'IBM Plex Sans', sans-serif; font-size: .88rem; line-height: 1.45; }
.pol-part-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pol-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pol-img { position: relative; } .pol-img img { height: 90px; border: 1px solid var(--rule); border-radius: 6px; }
.pol-img .remove-btn { position: absolute; top: 2px; right: 2px; background: #fff; }
.pol-read { font-family: 'Lora', serif; line-height: 1.55; }
.pol-h { font-family: 'IBM Plex Sans', sans-serif; font-weight: 800; color: #33402A; margin: 10px 0 4px; }
.pol-li { padding-left: 1.1em; text-indent: -1.1em; margin: 2px 0; }
.pol-p { margin: 4px 0; } .pol-gap { height: 8px; }
.pol-read-img { max-width: 100%; border: 1px solid var(--rule); border-radius: 6px; margin: 8px 0; }
.fs-rule-top input[type="text"] { width: auto; flex: 1 1 180px; margin: 0; }
.fs-rule-top select { width: auto; flex: 0 0 auto; margin: 0; }
.fs-rule-top .remove-btn { flex: 0 0 auto; }
.booster-stu { display: flex !important; flex-direction: row; align-items: center; margin: 0; font-weight: 500; }
.booster-stu input[type="checkbox"], .booster-kind input[type="radio"] { width: auto !important; margin: 0 !important; flex: none; }
.booster-kind label { display: flex !important; flex-direction: row; white-space: nowrap; }
.nbp-tocbtn:disabled { opacity: .45; cursor: default; }

/* ---------- v106 Booster goals ---------- */
.booster-item, .booster-item .booster-txt b { color: #263238; }
.booster-item .booster-txt small { color: #546E7A; }
.booster-prog { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.booster-bar { position: relative; display: block; height: 10px; border-radius: 5px; background: #ECEFF1; overflow: visible; }
.booster-bar i { display: block; height: 100%; border-radius: 5px; background: #FFB300; }
.booster-prog.ok .booster-bar i { background: #43A047; }
.booster-bar b { position: absolute; top: -3px; width: 3px; height: 16px; background: #C62828; border-radius: 2px; transform: translateX(-1px); }
.booster-prog.ok small { color: #2E7D32 !important; font-weight: 700; }

/* ---------- v107 📊 Statistics and 🌳 Your Tree (student Arcade) ---------- */
.ast-title { margin: 6px 0 2px; }
.ast-sub { margin: 0 0 12px; }
.ast-offline { background: var(--amber-bg); color: var(--amber); border-radius: var(--radius); padding: 8px 12px; margin: 0 0 12px; font-size: .9rem; }
.ast-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 760px) { .ast-cols { grid-template-columns: 1fr; } }
.ast-col { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); padding: 10px; min-width: 0; }
.ast-col > h3 { margin: 0 0 8px; font-size: 1.1rem; }
.ast-cat { font-size: .74rem; font-weight: 800; letter-spacing: .04em; color: var(--olive-deep); margin: 12px 0 6px; border-bottom: 1px dashed var(--rule); padding-bottom: 3px; }
.ast-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; padding: 9px; border-radius: var(--radius); background: var(--paper); margin-bottom: 7px; border: 1px solid var(--rule); }
.ast-row.none { opacity: .7; }
.ast-game { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ast-ic { font-size: 1.25rem; width: 1.6rem; text-align: center; }
.ast-n { margin-left: auto; font-size: .76rem; color: var(--ink-soft); }
.ast-att { display: flex; flex-direction: column; font-size: .88rem; min-width: 0; }
.ast-att .ast-k { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.ast-att small { color: var(--ink-soft); font-size: .76rem; }
.ast-full { grid-column: 1 / -1; justify-self: start; }
.ast-full[disabled] { opacity: .5; cursor: default; }
body.ast-lock { overflow: hidden; }
.ast-full-ov { position: fixed; inset: 0; z-index: 9000; background: var(--paper); color: var(--ink); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ast-full-top { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 10px 14px; background: var(--paper); border-bottom: 1px solid var(--rule); z-index: 1; }
.ast-full-body { max-width: 860px; margin: 0 auto; padding: 12px 16px 40px; }
.ast-full-body h2 { margin: 4px 0 2px; }
.ast-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 12px; }
@media (max-width: 560px) { .ast-tiles { grid-template-columns: repeat(2, 1fr); } }
.ast-tiles > div { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px; text-align: center; }
.ast-tiles b { display: block; font-size: 1.25rem; }
.ast-tiles span { font-size: .74rem; color: var(--ink-soft); }
.ast-trend { width: 100%; max-width: 520px; height: auto; display: block; color: var(--ink); }
.ast-sw { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .ast-sw { grid-template-columns: 1fr; } }
.ast-sw > div { border-radius: var(--radius); padding: 10px 12px; }
.ast-sw h3 { margin: 0 0 6px; font-size: 1rem; }
.ast-sw ul { margin: 0; padding-left: 18px; }
.ast-sw li { margin: 3px 0; font-size: .9rem; }
.ast-good { background: var(--green-bg); color: var(--green-text); }
.ast-weak { background: var(--amber-bg); color: var(--amber); }
.ast-table-wrap { overflow-x: auto; }
.ast-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.ast-table th, .ast-table td { border: 1px solid var(--rule); padding: 6px 8px; text-align: left; white-space: nowrap; }
.ast-table th { background: var(--olive-deep); color: #fff; }
[data-theme="dark"] .ast-table th { color: #1c2410; }
.ast-table tbody tr:nth-child(even) td { background: var(--card); }

.tree-quote { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--rule); border-left: 4px solid var(--olive-base); border-radius: var(--radius); padding: 10px 12px; margin: 8px 0 12px; }
.tree-q-icon { font-size: 1.5rem; line-height: 1; }
.tree-q-text { font-style: italic; font-size: 1rem; }
.tree-q-who { font-size: .82rem; color: var(--ink-soft); margin-top: 3px; }
.tree-stage { max-width: 520px; margin: 0 auto; border-radius: 14px; overflow: hidden; border: 1px solid var(--rule); box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.tree-svg { display: block; width: 100%; height: auto; }
.tree-sky-note { text-align: center; margin: 6px 0 4px; }
.tree-msg { text-align: center; font-weight: 700; margin: 8px auto; max-width: 520px; }
.tree-note { text-align: center; max-width: 520px; margin: 10px auto 0; padding: 9px 12px; border-radius: var(--radius); background: var(--green-bg); color: var(--green-text); font-size: .92rem; }
.tree-sun-rays line { stroke: #FFC107; stroke-width: 3; stroke-linecap: round; }
.tree-sun-rays { animation: tree-spin 18s linear infinite; }
.tree-star { fill: #FFFDE7; animation: tree-twinkle 2.6s ease-in-out infinite; }
.tree-cloud { animation: tree-drift 9s ease-in-out infinite alternate; }
.tree-cloud.slow { animation-duration: 14s; }
.tree-rain line { stroke: #CFE3F7; stroke-width: 1.6; stroke-linecap: round; opacity: 0; animation: tree-rain .9s linear infinite; }
.tree-flash { opacity: 0; animation: tree-flash 7s linear infinite; }
.tree-crown { transform-box: fill-box; transform-origin: 50% 100%; animation: tree-sway 5s ease-in-out infinite; }
.tree-seed-glow { animation: tree-glow 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.tree-bird { animation: tree-bird 16s linear infinite; }
.tree-bird.b2 { animation-duration: 21s; animation-delay: -7s; }
.tree-fly { animation: tree-butterfly 12s ease-in-out infinite; }
.tree-wing { transform-box: fill-box; transform-origin: 100% 50%; animation: tree-flap .22s ease-in-out infinite alternate; }
.tree-wing.r { transform-origin: 0% 50%; }
@keyframes tree-spin { to { transform: rotate(360deg); } }
@keyframes tree-twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes tree-drift { from { translate: -10px 0; } to { translate: 12px 0; } }
@keyframes tree-rain { 0% { opacity: 0; transform: translate(0, 0); } 10% { opacity: .9; } 100% { opacity: .6; transform: translate(-14px, 170px); } }
@keyframes tree-flash { 0%, 90%, 93%, 100% { opacity: 0; } 91%, 94% { opacity: .55; } }
@keyframes tree-sway { 0%, 100% { transform: rotate(-1.4deg); } 50% { transform: rotate(1.4deg); } }
@keyframes tree-glow { 0%, 100% { opacity: .3; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes tree-bird { 0% { transform: translate(-30px, 110px); } 25% { transform: translate(75px, 92px); } 50% { transform: translate(180px, 82px); } 75% { transform: translate(290px, 94px); } 100% { transform: translate(400px, 100px); } }
@keyframes tree-butterfly {
  0% { transform: translate(110px, 200px); } 20% { transform: translate(140px, 150px); } 40% { transform: translate(250px, 170px); }
  60% { transform: translate(230px, 120px); } 80% { transform: translate(120px, 140px); } 100% { transform: translate(110px, 200px); }
}
@keyframes tree-flap { from { transform: scaleX(1); } to { transform: scaleX(.25); } }
@media (prefers-reduced-motion: reduce) {
  .tree-sun-rays, .tree-star, .tree-cloud, .tree-crown, .tree-seed-glow, .tree-bird, .tree-bird path, .tree-fly, .tree-wing, .tree-flash { animation: none; }
  .tree-bird { transform: translate(90px, 90px); } .tree-fly { transform: translate(240px, 160px); }
}

.tq-row { display: grid; grid-template-columns: 190px 1fr; gap: 8px; align-items: start; margin-bottom: 8px; }
@media (max-width: 600px) { .tq-row { grid-template-columns: 1fr; gap: 3px; } }
.tq-row label { margin: 6px 0 0 !important; }
.tq-row textarea { width: 100%; resize: vertical; font: inherit; font-size: .9rem; padding: 6px 8px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); color: var(--ink); }
.tq-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.tq-add input { width: auto !important; flex: none; padding: 6px 8px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); color: var(--ink); }
.tq-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tq-card { margin-top: 18px; }

/* v109: cartoon calculator icon */
.calc-ico { width: 1em; height: 1.25em; display: inline-block; vertical-align: middle; }
.bp-calc .calc-ico { width: 4.4rem; height: 5.5rem; }
.subject-card .icon .calc-ico { width: 3rem; height: 3.75rem; }
/* v109: realistic Your Tree scene */
.tree-sun-glow { transform-box: fill-box; transform-origin: center; animation: tree-glowpulse 4s ease-in-out infinite; }
.tree-splash ellipse { fill: none; stroke: #DCEBF8; stroke-width: .8; opacity: 0; transform-box: fill-box; transform-origin: center; animation: tree-splash .9s ease-out infinite; }
@keyframes tree-glowpulse { 0%, 100% { transform: scale(.94); opacity: .85; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes tree-splash { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.6); } }
@media (prefers-reduced-motion: reduce) { .tree-sun-glow, .tree-splash ellipse { animation: none; } }

/* v110: 🍎 fruits you can tap + 🏅 Certificate of Mastery */
.tree-fruit { cursor: pointer; outline: none; }
.tree-fruit .tree-fruit-ball { transition: filter .15s; }
.tree-fruit:hover .tree-fruit-ball, .tree-fruit:focus-visible .tree-fruit-ball { filter: brightness(1.18) drop-shadow(0 0 3px #FFE082); }
.cert-ov { position: fixed; inset: 0; z-index: 9100; background: #2b2f25; display: flex; flex-direction: column; }
.cert-top { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 14px; background: rgba(0,0,0,.25); }
.cert-top .cert-x { min-width: 40px; font-size: 1.05rem; background: #fff; color: #232B3A; }
.cert-stage { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 8px; }
.cert-scale { position: relative; flex: none; }
.cert-scale > .cert { position: absolute; top: 0; left: 0; transform-origin: top left; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.cert { width: 1000px; height: 625px; box-sizing: border-box; background: #fff; border-radius: 34px; padding: 14px; background: #4A5A28; color: #232B3A; font-family: 'Lora', serif; }
.cert-in { position: relative; height: 100%; box-sizing: border-box; background: #FFFDF6; border-radius: 22px; border: 2px solid #B8862E; text-align: center; padding: 22px 60px 0; overflow: hidden; }
.cert-in2 { position: absolute; inset: 6px; border: 1.5px solid #C9A45E; border-radius: 16px; pointer-events: none; }
.cert-wm { position: absolute; left: 0; right: 0; top: 215px; font: 800 250px/1 'IBM Plex Sans', sans-serif; color: #4A5A28; opacity: .055; letter-spacing: -6px; pointer-events: none; }
.cert-logo { width: 60px; height: 60px; display: block; margin: 0 auto 2px; position: relative; }
/* v125 🔳 QR code: top right of the certificate, in the Mastered list and its popup */
.cert-qr { position: absolute; top: 30px; right: 40px; width: 140px; display: flex; flex-direction: column; align-items: center; z-index: 1; }
.cert-qr small { display: block; margin-top: 4px; font: 400 9.5px/1.25 'IBM Plex Sans', sans-serif; color: #5A6273; letter-spacing: .2px; }
.cert-qr small b { display: block; font: 700 10.5px/1.3 'IBM Plex Mono', 'IBM Plex Sans', monospace; color: #2A2F3A; letter-spacing: .8px; }
.cert-qr-img { position: relative; display: inline-block; vertical-align: middle; background: #fff; border: 1px solid #D9CFA8; border-radius: 6px; overflow: hidden; box-sizing: border-box; }
.cert-qr-img > img { display: block; width: 100%; height: 100%; }
.cert-qr-logo { position: absolute; left: 37%; top: 37%; width: 26%; height: 26%; background: #fff; border-radius: 22%; box-sizing: border-box; padding: 2%; }
.cert-qr-logo img { display: block; width: 100%; height: 100%; }
.cert-qr-btn { background: none; border: 0; padding: 0; cursor: pointer; line-height: 0; border-radius: 6px; }
.cert-qr-btn:focus-visible { outline: 3px solid #7CB342; outline-offset: 2px; }
.cert-qr-pop { text-align: center; }
.cert-qr-code { margin-top: 8px; font: 700 16px/1.3 'IBM Plex Mono', monospace; letter-spacing: 1.5px; color: #2A2F3A; }
.cert-school { position: relative; font: 600 17px/1.3 'IBM Plex Sans', sans-serif; letter-spacing: 3.5px; color: #1F2D5C; }
.cert-hub { position: relative; font: 400 12px/1.4 'IBM Plex Sans', sans-serif; letter-spacing: 2px; color: #5A6273; margin-top: 2px; }
.cert-title { position: relative; font: 700 46px/1.12 'Lora', serif; color: #1F2D5C; margin-top: 6px; }
.cert-rule { display: flex; align-items: center; justify-content: center; gap: 0; margin: 6px auto 4px; width: 400px; }
.cert-rule span { flex: 1; height: 2px; background: #B8862E; } .cert-rule i { width: 12px; height: 12px; margin: 0 3px; background: no-repeat center/contain url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M9 0 L18 9 L9 18 L0 9 Z' fill='%23B8862E'/%3E%3C/svg%3E"); }
.cert-pres { position: relative; font: italic 400 19px/1.3 'Lora', serif; color: #5A6273; }
.cert-name { position: relative; display: inline-block; min-width: 580px; font: 700 42px/1.18 'Lora', serif; color: #2A2F3A; border-bottom: 2px solid #B8862E; padding: 0 20px 4px; margin-top: 4px; }
.cert-sec { position: relative; font: 600 14px/1.3 'IBM Plex Sans', sans-serif; letter-spacing: 3px; color: #1F2D5C; margin-top: 8px; }
.cert-body { position: relative; font: 400 16.5px/1.6 'Lora', serif; color: #2A2F3A; margin: 10px auto 0; max-width: 840px; }
.cert-body .cert-game { color: #1F2D5C; }
.cert-date { position: relative; font: italic 400 14.5px/1.3 'Lora', serif; color: #5A6273; margin-top: 6px; }
.cert-foot { position: absolute; left: 70px; right: 70px; bottom: 30px; display: flex; align-items: flex-end; justify-content: space-between; }
.cert-sign { width: 300px; display: flex; flex-direction: column; align-items: center; }
.cert-line { width: 100%; height: 1.5px; background: #2A2F3A; margin-bottom: 8px; }
.cert-sign b { font: 700 17px/1.2 'Lora', serif; color: #2A2F3A; letter-spacing: .3px; }
.cert-sign small { font: 400 12.5px/1.4 'IBM Plex Sans', sans-serif; color: #5A6273; margin-top: 3px; }
.cert-seal { width: 100px; height: 100px; margin-bottom: -4px; }
.cert-rotate { display: none; text-align: center; padding: 0 12px 14px; }
.cert-rotate .btn-small { background: #fff; color: #232B3A; }
.cert-scale { transition: transform .3s ease; }
@media (orientation: portrait) and (max-width: 700px) { .cert-rotate { display: block; } }

/* v115 🔖 Bookmark + 🌟 Stickers in the notebook */
.nbp-tools .nbp-bm.on, .nbp-tools .nbp-stkbtn.on, .nbp-tool.nbp-bm.on, .nbp-tool.nbp-stkbtn.on { background: var(--olive-deep); color: #fff; border-color: var(--olive-deep); }
.nbp-bmbar, .nbp-stkbar, .nbp-musicbar { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 10px; margin: 0 0 10px; }
.nbp-fs .nbp-bmbar, .nbp-fs .nbp-stkbar, .nbp-fs .nbp-musicbar { position: absolute; top: 56px; left: 50%; transform: translateX(-50%); z-index: 30; width: min(560px, calc(100vw - 24px)); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.nbp-bm-styles, .nbp-stk-list { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; -webkit-overflow-scrolling: touch; }
.nbp-bm-style { flex: none; width: 38px; height: 74px; padding: 2px; border: 2px solid transparent; border-radius: 8px; background: #fff; cursor: pointer; }
.nbp-bm-style img { width: 100%; height: 100%; object-fit: contain; display: block; }
.nbp-bm-style.on, .nbp-stk-pick.on { border-color: var(--olive-deep); box-shadow: 0 0 0 2px rgba(74,90,40,.25); }
.nbp-bm-sep { flex: none; width: 1px; background: var(--rule); margin: 4px 4px; }
.nbp-stk-pick { flex: none; width: 56px; height: 56px; padding: 3px; border: 2px solid transparent; border-radius: 12px; background: #fff; cursor: pointer; }
.nbp-stk-pick img { width: 100%; height: 100%; display: block; }
.nbp-bm-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nbp-decor { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; border-radius: inherit; }
.nbp-stk { position: absolute; pointer-events: none; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.12)); }
.nbp-stk-on { cursor: copy; }
.nbp-stk-on .nbp-stk { pointer-events: auto; cursor: pointer; }
.nbp-stk-on .nbp-stk:hover { outline: 2px dashed #E53935; outline-offset: 2px; border-radius: 50%; }
.nbp-ribbon { position: absolute; top: -8px; right: 4%; pointer-events: auto; cursor: pointer; filter: drop-shadow(0 3px 3px rgba(0,0,0,.25)); }
img.nbp-ribbon { width: auto; }
.nbp-ribbon-toc { background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; }
.nbp-ribbon-toc img { width: auto; display: block; }
.nbp-ribbon-toc span { margin-top: 2px; max-width: 9em; font: 700 .55em/1.2 'Noto Sans', sans-serif; color: #fff; background: var(--olive-deep); border-radius: 6px; padding: 3px 6px; text-align: center; }
.nbp-toc-badges { display: inline-flex; gap: 2px; align-items: center; flex: none; }
.nbp-toc-badges img { width: 1.25em; height: 1.25em; }
.nbp-toc-badges img.nbp-toc-bm { width: auto; height: 1.5em; }
.nbp-fs-top { gap: 8px; }
.nbp-fs-top > span:first-child { flex: 1; min-width: 0; }
.nbp-fs-top > span:last-child { flex: none; display: flex; white-space: nowrap; }
@media (max-width: 520px) { .nbp-fs-top .nbp-tool { width: 32px; height: 32px; font-size: .95rem; margin-left: 3px; } }
@media (max-width: 380px) { .nbp-fs-top > span:first-child { display: none; } }
.nbp-ribbon-toc span { font-size: .62em; white-space: nowrap; max-width: none; }
.cert-rule .cert-rule-dia { width: 12px; height: 12px; margin: 0 3px; flex: none; }

/* v122 multiple-choice assignments */
.asg-mc-choices { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.asg-mc-choice-btn { text-align: left; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--rule); background: var(--card); color: var(--ink); font: inherit; font-size: 1rem; cursor: pointer; }
.asg-mc-choice-btn b { margin-right: 6px; color: var(--olive-deep); }
.asg-mc-choice-btn:hover:not(:disabled) { border-color: var(--olive-base); }
.asg-mc-choice-btn.right { border-color: #43A047; background: #E8F5E9; color: #1B5E20; }
.asg-mc-choice-btn.wrong { border-color: #E53935; background: #FFEBEE; color: #B71C1C; }
.asg-mc-choice-btn:disabled { cursor: default; }
.asg-mc-edit-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.asg-mc-edit-row input[type="text"] { flex: 1; }
.asg-mc-view { margin: 6px 0 4px; padding-left: 22px; }
.asg-mc-view li { margin: 2px 0; }
.asg-mc-view li.ok { color: #2E7D32; font-weight: 700; }
.asg-mc-skill { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .03em; color: var(--olive-deep); background: var(--green-bg); border-radius: 999px; padding: 2px 8px; margin-bottom: 4px; }
.asg-pt3-final { white-space: normal; }
.asg-mc-edit-row input[type="radio"] { width: 18px !important; height: 18px; flex: none; margin: 0; }
.asg-mc-edit-row b { flex: none; width: 1.4em; }
.asg-mc-edit-row input[type="text"] { flex: 1; min-width: 0; width: auto !important; }

/* ---------- v127 ⛺ Numeracy Camp (numeracy-camp.js) ---------- */
.camp-card .icon { filter: drop-shadow(0 2px 2px rgba(0,0,0,.15)); }
.nc-wrap { max-width: 720px; margin: 0 auto; }
.nc-pb { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.nc-pb span { background: var(--card); border: 1px solid var(--rule); border-radius: 20px; padding: 6px 12px; font-size: .85rem; }
.nc-map { width: 100%; max-width: 420px; display: block; margin: 0 auto 12px; border-radius: 16px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.nc-node { cursor: pointer; transition: transform .15s; }
.nc-node { outline: none; } .nc-node:hover, .nc-node:focus-visible { filter: brightness(1.08) drop-shadow(0 0 4px rgba(255,255,255,.9)); }
.nc-node.locked { cursor: default; }
.nc-node.locked circle { stroke-dasharray: 6 5; } .nc-node.locked .nc-emo, .nc-node.locked .nc-lbl { opacity: .6; }
.nc-map .nc-lbl { paint-order: stroke; stroke: rgba(255,255,255,.9); stroke-width: 4px; stroke-linejoin: round; }
.nc-worlds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.nc-world { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: 14px; border: 2px solid var(--wc); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.nc-world.locked { opacity: .55; cursor: default; border-style: dashed; }
.nc-wi { font-size: 2rem; } .nc-wn { font-weight: 800; } .nc-ws { font-size: .78rem; color: var(--ink-soft); }
.nc-badge { font-size: .8rem; background: #FFF3C4; color: #7A5B00; border-radius: 12px; padding: 2px 8px; vertical-align: middle; }
.nc-badge-won { margin: 10px 0; padding: 10px; border-radius: 12px; background: #FFF3C4; color: #5C4400; font-size: 1rem; }
.nc-checkin { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 12px; background: #FFF8E1; color: #4E3B00; border: 1px solid #F3D57A; margin-bottom: 12px; }
.nc-stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.nc-station { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: 14px; border: 1px solid var(--rule); border-top: 5px solid var(--wc); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; text-align: center; }
.nc-station.done { background: var(--green-bg); }
.nc-si { font-size: 2rem; } .nc-sn { font-weight: 800; font-size: .92rem; } .nc-sl { font-size: .76rem; color: var(--ink-soft); }
.nc-ss { color: #F4B400; font-size: .7rem; letter-spacing: -1px; }
.nc-dim { opacity: .25; }
.nc-levels { display: flex; flex-direction: column; gap: 8px; }
.nc-level { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--rule); background: var(--card); }
.nc-level.beat { background: var(--green-bg); }
.nc-level.locked { opacity: .55; }
.nc-li { font-size: 1.6rem; width: 36px; text-align: center; flex: none; }
.nc-lt { flex: 1; min-width: 0; display: flex; flex-direction: column; } .nc-lt small { color: var(--ink-soft); font-size: .76rem; }
.nc-lst { color: #F4B400; white-space: nowrap; }
.nc-playbar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: 12px; background: #263238; color: #FFF8E1; font-size: .85rem; margin-bottom: 12px; }
.nc-q { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 14px; }
.nc-stem { font-size: 1.02rem; line-height: 1.5; margin-bottom: 10px; }
.nc-steps { margin: 10px 0; padding: 10px 12px; border-left: 4px solid #F4B400; background: rgba(244,180,0,.08); border-radius: 0 10px 10px 0; font-family: 'Lora', serif; }
.nc-steps div { margin: 2px 0; }
.nc-blank { display: inline-block; min-width: 34px; text-align: center; border-bottom: 3px solid #E53935; color: #E53935; }
.nc-table { border-collapse: collapse; margin: 8px 0; } .nc-table th, .nc-table td { border: 1px solid var(--rule); padding: 4px 14px; text-align: center; } .nc-table th { background: var(--paper-2); }
.nc-fig { width: 100%; max-width: 360px; display: block; margin: 8px 0; }
.nc-bar { margin: 10px 0; padding: 8px 8px 6px; border: 1px solid #E3D3A8; border-radius: 12px; background: #FFFBEF; color: #3A2E10; }
.nc-bar-tag { font-size: .8rem; font-weight: 700; margin: 0 0 4px 2px; }
.nc-bq-tag { color: #C62828; }
.nc-bar-svg { width: 100%; max-width: 420px; display: block; }
.nc-bq { fill: #C62828; }
.nc-bq.on { fill: #1B7F3B; }
.nc-bar-key { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .78rem; margin: 4px 2px 0; }
.nc-bar-key i { display: inline-block; width: 12px; height: 12px; border: 1px solid #555; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.nc-hint .nc-bar { margin-bottom: 0; }
.nc-model-btn { margin: 0 0 8px; }
.nc-model-ov { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.nc-model-box { background: #FFFDF6; color: #1c1c14; border-radius: 16px; padding: 16px; width: 100%; max-width: 920px; max-height: 100%; overflow: auto; }
.nc-model-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.nc-model-fig .nc-bar-svg { max-width: 100%; }
.nc-model-say { font-size: 1.15rem; font-weight: 600; margin: 10px 0; min-height: 1.5em; }
.nc-model-btns { display: flex; gap: 8px; flex-wrap: wrap; }
[data-theme="dark"] .nc-bar { background: #2B2718; border-color: #5A4D28; color: #F3E9C8; }
.nc-frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; line-height: 1.15; margin: 0 2px; }
.nc-frac > span:first-child { border-bottom: 1.5px solid currentColor; padding: 0 3px 1px; }
.nc-frac > span:last-child { padding: 1px 3px 0; }
.nc-tries { font-size: .8rem; color: #E53935; margin-bottom: 6px; letter-spacing: 2px; }
.nc-hint-btn { font-size: .85rem; margin-bottom: 6px; }
.nc-hint { margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: #E8F4FD; color: #0D3C61; font-size: .9rem; }
.nc-choices { display: flex; flex-direction: column; gap: 8px; }
.nc-choice { text-align: left; font: inherit; font-size: .95rem; padding: 12px; border-radius: 12px; border: 1.5px solid var(--rule); background: #fff; color: #232B3A; cursor: pointer; line-height: 1.5; }
.nc-choice:hover:not(:disabled) { border-color: var(--olive-deep); }
.nc-choice.ok { background: #E3F4DA; border-color: #3F8A2E; }
.nc-choice.no { background: #FCE4E4; border-color: #C0392B; text-decoration: line-through; opacity: .75; }
.nc-choice:disabled { cursor: default; }
.nc-fb { margin-top: 10px; }
.nc-res { font-weight: 700; margin-bottom: 6px; } .nc-res.ok { color: var(--green); } .nc-res.no { color: var(--red); }
.nc-exp { padding: 8px 10px; border-radius: 10px; background: var(--paper-2); font-size: .9rem; margin-bottom: 8px; }
.nc-next { max-width: 240px; }
.nc-result { text-align: center; padding: 20px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--rule); }
.nc-big { font-size: 3.4rem; } .nc-stars { font-size: 2.2rem; color: #F4B400; letter-spacing: 4px; }
.nc-result-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; } .nc-result-btns .btn-primary { max-width: 220px; }
[data-theme="dark"] .nc-choice { background: #F7F5EE; }
[data-theme="dark"] .nc-checkin { background: #4A3F26; color: #FAEEDA; border-color: #7A6332; }
[data-theme="dark"] .nc-hint { background: #22394C; color: #D6ECFF; }
/* teacher */
.camp-tools { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.camp-level { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.camp-level label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; width: auto; }
.camp-level input[type="radio"] { width: auto; margin: 0; }
#camp-legend .btn-small { white-space: nowrap; }
.camp-tool-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.camp-grid-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 10px; }
.camp-grid { margin: 0; min-width: 100%; }
.camp-grid th, .camp-grid td { text-align: center; padding: 4px; white-space: nowrap; }
.camp-grid .camp-name { text-align: left; position: sticky; left: 0; background: var(--card); z-index: 1; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.camp-th { display: flex; flex-direction: column; align-items: center; font-size: 1.2rem; line-height: 1.1; }
.camp-th small { font-size: .62rem; max-width: 70px; white-space: normal; } .camp-th em { font-size: .58rem; color: var(--ink-soft); font-style: normal; }
.camp-cell { width: 34px; height: 30px; border-radius: 8px; border: 1px solid var(--rule); font: inherit; font-weight: 800; cursor: pointer; background: #fff; color: #555; }
.camp-cell.n1 { background: #FDECEA; color: #A33; } .camp-cell.n2 { background: #FFF3E0; color: #9A5A00; } .camp-cell.n3 { background: #FFF9C4; color: #6B5D00; }
.camp-cell.n4 { background: #E3F2FD; color: #1559A0; } .camp-cell.n5 { background: #E3F4DA; } .camp-cell.nc { background: #E3F4DA; }
/* v128 Numeracy Camp Phase 2: piecewise rule */
.nc-pw { display: flex; width: fit-content; align-items: center; gap: 6px; margin: 10px 0; font-family: 'Lora', serif; font-size: 1.02rem; }
.nc-pw .nc-brace { font-size: 3.2rem; line-height: 1; font-weight: 300; transform: scaleX(.7); }
.nc-pw > span:last-child { display: grid; grid-template-columns: auto auto; gap: 4px 18px; }
/* v129 Numeracy Camp Phase 3: map animation, celebrations, certificates, teacher grid */
.nc-wrap { position: relative; }
.nc-trail { animation: nc-march 1.6s linear infinite; }
@keyframes nc-march { to { stroke-dashoffset: -18; } }
.nc-trail-done { stroke-dasharray: 1; stroke-dashoffset: 1; animation: nc-draw 1s ease-out forwards; }
@keyframes nc-draw { to { stroke-dashoffset: 0; } }
.nc-pulse { transform-box: fill-box; transform-origin: center; animation: nc-pulse 1.8s ease-out infinite; }
@keyframes nc-pulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.55); opacity: 0; } }
.nc-hiker text { animation: nc-hop 1.2s ease-in-out infinite; }
@keyframes nc-hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.nc-flag-wave { transform-box: fill-box; transform-origin: left center; animation: nc-wave 1s ease-in-out infinite alternate; }
@keyframes nc-wave { from { transform: skewY(-6deg) scaleX(.92); } to { transform: skewY(6deg) scaleX(1.05); } }
.nc-summit-msg { text-align: center; margin: 0 0 12px; padding: 10px; border-radius: 12px; background: #FFF3C4; color: #5C4400; }
.nc-next-hint { text-align: center; margin: -4px 0 12px; }
.nc-certlink { margin-top: 6px; font-size: .78rem; font-weight: 700; color: #7A5B00; background: #FFF3C4; border-radius: 12px; padding: 3px 10px; cursor: pointer; }
.nc-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.nc-confetti span { position: absolute; top: -30px; animation-name: nc-fall; animation-timing-function: ease-in; animation-fill-mode: forwards; }
@keyframes nc-fall { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(620px) rotate(320deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .nc-trail, .nc-pulse, .nc-hiker text, .nc-flag-wave { animation: none; } .nc-trail-done { animation: none; stroke-dashoffset: 0; } }
[data-theme="dark"] .nc-summit-msg { background: #4A3F26; color: #FAEEDA; }
.camp-grid-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0; }
.camp-grid-tools label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin: 0; width: auto; }
.camp-grid-tools select { width: auto; }
.camp-grid-tools .chip { cursor: pointer; font-family: inherit; }
.camp-cell.stuck { box-shadow: 0 0 0 2px #E53935; }
.camp-help-row .camp-name { color: #B71C1C; }
[data-theme="dark"] .camp-help-row .camp-name { color: #F0997B; }
.camp-grid tfoot td { border-top: 2px solid var(--rule); background: var(--paper-2); }
.camp-sum { line-height: 1.1; } .camp-sum small { display: block; font-size: .62rem; color: var(--ink-soft); } .camp-sum .camp-sum-help { color: #C62828; }
.camp-cert-btn { font-size: 1.2rem; background: #FFF3C4; border: 1px solid #E8C65A; border-radius: 8px; padding: 2px 6px; cursor: pointer; }
.camp-leg-btns { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.camp-leg-btns .btn-small { white-space: nowrap; }
/* v130 camp map: living background */
.nc-cloud { animation-name: nc-drift; animation-timing-function: linear; animation-iteration-count: infinite; }
@keyframes nc-drift { from { transform: translateX(-80px); } to { transform: translateX(440px); } }
.nc-birds { animation-name: nc-fly; animation-timing-function: linear; animation-iteration-count: infinite; }
@keyframes nc-fly { 0% { transform: translate(380px, 0); } 50% { transform: translate(170px, -10px); } 100% { transform: translate(-60px, 4px); } }
.nc-flow { animation: nc-flow 1.4s linear infinite; }
@keyframes nc-flow { to { stroke-dashoffset: 22; } }
.nc-sway { transform-box: fill-box; transform-origin: bottom center; animation: nc-sway 4s ease-in-out infinite alternate; }
@keyframes nc-sway { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }
.nc-sun { transform-box: fill-box; transform-origin: center; animation: nc-pulse 3.5s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .nc-cloud, .nc-birds, .nc-wing, .nc-flow, .nc-sway, .nc-sun { animation: none; } .nc-cloud { transform: translateX(120px); } .nc-birds { transform: translate(200px, 0); } }

/* ---------- v135 🔔 Notifications ---------- */
.notif-bell { position: relative; }
.notif-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #E53935; color: #fff; font-size: .68rem; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--paper); }
.notif-panel { position: fixed; top: 64px; right: 12px; width: min(400px, calc(100vw - 24px)); max-height: min(70vh, 560px); display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--rule); border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.25); z-index: 1200; overflow: hidden; }
.notif-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.notif-head b { flex: 1; font-size: 1.02rem; }
.notif-x { border: 0; background: transparent; font-size: 1.1rem; cursor: pointer; color: var(--ink); }
.notif-push { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: .84rem; background: var(--amber-bg); color: var(--ink); border-bottom: 1px solid var(--rule); }
.notif-push.ok { background: var(--green-bg); }
.notif-push .btn-small { flex: none; white-space: nowrap; }
.notif-list { overflow-y: auto; padding: 6px; }
.notif-list .empty-state { margin: 8px; }
.notif-item { display: flex; gap: 10px; width: 100%; text-align: left; align-items: flex-start; padding: 10px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; position: relative; }
.notif-item:hover { background: var(--paper-2); }
.notif-item.unread { background: var(--green-bg); }
.notif-ic { font-size: 1.5rem; width: 34px; text-align: center; flex: none; }
.notif-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.notif-txt b { font-size: .9rem; line-height: 1.3; }
.notif-txt small { font-size: .8rem; color: var(--ink-soft); }
.notif-txt em { font-style: normal; font-size: .72rem; color: var(--ink-soft); }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; background: #1E88E5; flex: none; margin-top: 6px; }
.notif-banner { position: fixed; top: 10px; left: 50%; transform: translate(-50%, -140%); width: min(460px, calc(100vw - 24px)); display: flex; align-items: stretch; background: #263238; color: #FFF8E1; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35); z-index: 1300; transition: transform .35s cubic-bezier(.2,.9,.3,1.2); }
.notif-banner.show { transform: translate(-50%, 0); }
.notif-banner-main { flex: 1; display: flex; gap: 10px; align-items: center; padding: 12px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.notif-banner-main span:last-child { display: flex; flex-direction: column; gap: 2px; }
.notif-banner-main small { color: #CFD8DC; font-size: .8rem; }
.notif-banner-x { border: 0; background: transparent; color: #CFD8DC; font-size: 1rem; padding: 0 14px; cursor: pointer; }
.notif-permit { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; margin: 0 0 14px; border-radius: 14px; background: #FFF8E1; color: #4E3B00; border: 1px solid #F3D57A; }
.notif-permit > div:nth-child(2) { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.notif-permit small { font-size: .82rem; }
.notif-permit-ic { font-size: 1.8rem; }
.notif-permit-btns { display: flex; gap: 8px; }
[data-theme="dark"] .notif-permit { background: #4A3F26; color: #FAEEDA; border-color: #7A6332; }
@media (prefers-reduced-motion: reduce) { .notif-banner { transition: none; } }
/* v136: night shade, rain, clouds and birds never block taps — only the fruits are tappable */
.tree-svg * { pointer-events: none; }
.tree-svg .tree-fruit, .tree-svg .tree-fruit * { pointer-events: auto; }

/* v137 Notebook sharing (owner 📤 Share · teachers 📥 shared notes) */
.nb-share-bar { margin: 22px 0 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1.5px dashed var(--line, #d9d3bf); border-radius: 12px; background: var(--paper, #fffdf6); }
.nb-share-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.nb-share-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.notebook-lesson-row .lesson-actions .nb-share-btn, .nb-share-btn { font: inherit; text-decoration: none; font-weight: 600; font-size: .8rem; padding: 4px 10px; border-radius: 999px; border: 1.5px solid #9CB57A; background: transparent; color: #4A5A28; cursor: pointer; }
.notebook-lesson-row .lesson-actions .nb-share-btn.on, .nb-share-btn.on { background: #4A5A28; border-color: #4A5A28; color: #fff; }
.nb-share-btn:disabled { opacity: .6; }
.nb-from-owner { font-size: .72rem; font-weight: 600; color: #5C7A2E; background: #EEF5E2; border-radius: 999px; padding: 1px 8px; margin-left: 6px; white-space: nowrap; }
.nb-pick-list { max-height: 52vh; overflow: auto; text-align: left; border: 1px solid var(--line, #e4dcc0); border-radius: 10px; padding: 8px 10px; }
.nb-pick-term { font-weight: 800; margin: 8px 0 4px; color: #4A5A28; }
.nb-pick-ch { margin: 0 0 8px; }
.nb-pick-row { display: flex; gap: 8px; align-items: flex-start; padding: 5px 2px 5px 22px; font-size: .9rem; cursor: pointer; line-height: 1.35; }
.nb-pick-row input { width: auto; margin-top: 3px; flex: none; }
.nb-pick-chrow { padding-left: 2px; }
.nb-pick-row.done { color: var(--ink-soft, #777); cursor: default; }
.nb-pick-added { font-size: .75rem; color: #2E7D32; font-weight: 700; white-space: nowrap; }

/* v140 🔊/🔇 on the Numeracy Camp screens (top right, beside Back) */
.nc-sound { position: absolute; top: 0; right: 0; z-index: 2; }

/* v141 🎵 Notebook focus music picker */
.nbp-musicbar.hidden { display: none; }
.nbp-music-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.nbp-music-opt { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--rule); background: var(--card, #fffdf7); color: inherit; font: inherit; cursor: pointer; }
.nbp-music-opt b { font-size: .92rem; }
.nbp-music-opt small { font-size: .75rem; color: var(--ink-soft); }
.nbp-music-opt.on { border-color: var(--olive-deep, #4A5A28); box-shadow: 0 0 0 1px var(--olive-deep, #4A5A28) inset; }
.nbp-music-opt:focus-visible { outline: 3px solid #7CB342; outline-offset: 2px; }

/* v142 🎵 background music on/off (top bar) */
.music-btn { position: relative; }
.music-btn.off { opacity: .55; }
.music-btn.off::after { content: ''; position: absolute; left: 22%; right: 22%; top: 50%; height: 2.5px; border-radius: 2px; background: currentColor; transform: rotate(-40deg); pointer-events: none; }

/* v147 📊 Notebook Reading grid (teacher) */
.nbr-bar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
.nbr-legend { font-size:.8rem; color:var(--ink-soft); }
.nbr-tools { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:6px 0 4px; }
.nbr-tools select { max-width:100%; min-width:0; flex:1 1 200px; padding:7px 9px; border-radius:10px; border:1px solid var(--rule); background:var(--card); color:inherit; font:inherit; font-size:.85rem; }
.nbr-tools #nbr-filter { flex:0 1 160px; }
.nbr-status { font-size:.82rem; color:var(--ink-soft); min-height:1.2em; margin:4px 0 8px; }
.nbr-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; border:1px solid var(--rule); border-radius:12px; max-width:100%; }
.nbr-grid { border-collapse:separate; border-spacing:0; font-size:.82rem; min-width:100%; }
.nbr-grid th, .nbr-grid td { padding:6px 8px; text-align:center; border-bottom:1px solid var(--rule); white-space:nowrap; vertical-align:middle; }
.nbr-grid small { display:block; font-size:.68rem; color:var(--ink-soft); font-weight:400; margin-top:2px; }
.nbr-grid thead th { background:var(--paper); font-weight:700; max-width:110px; overflow:hidden; text-overflow:ellipsis; }
.nbr-grid .nbr-name { position:sticky; left:0; z-index:1; text-align:left; background:var(--card); min-width:130px; max-width:170px; overflow:hidden; text-overflow:ellipsis; box-shadow:1px 0 0 var(--rule); }
.nbr-grid thead .nbr-name, .nbr-grid tfoot .nbr-name { background:var(--paper); }
.nbr-grid tfoot th, .nbr-grid tfoot td { background:var(--paper); font-weight:700; border-bottom:0; }
.nbr-grid td.nbr-done { background:var(--green-bg); }
.nbr-grid td.nbr-open { background:var(--amber-bg); }
.nbr-grid .nbr-sel { outline:2px solid rgba(80,130,220,.45); outline-offset:-2px; }
.nbr-grid .nbr-empty { text-align:center; padding:14px; color:var(--ink-soft); }
.bp-reading-note { font-size:.78rem; color:var(--ink-soft); margin:6px 2px 10px; }
.nbr-count { font-size:.78rem; color:var(--ink-soft); margin:0 0 8px; }
.nbr-secs { margin:0 0 8px; }

/* v149 Grade Sheet tools */
.gs-tools { margin: 0 0 10px; }
.gs-tools-row { display:flex; flex-wrap:wrap; gap:8px; }
.gs-weights { margin-top:6px; }
.gs-mq-list { display:flex; flex-direction:column; gap:6px; margin-top:10px; max-height:40vh; overflow:auto; }
.gs-mq-item { display:flex; align-items:flex-start; gap:8px; font-weight:400; margin:0; }
.gs-mq-item input { width:auto; margin-top:3px; }
.gs-w-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:8px; }
.gs-w-grid label { font-size:.82rem; margin:0; }

/* v150 📊 Assignment Scores */
.asg-card-btns { display:flex; gap:6px; margin-top:8px; }
.asg-card-btns .btn-small { flex:1; padding-left:6px; padding-right:6px; }
.asg-scores-summary { display:flex; flex-wrap:wrap; gap:6px 14px; font-size:.85rem; margin:10px 0 0; }
.asg-scores-grid td, .asg-scores-grid th { vertical-align:middle; }
.asg-scores-grid .asg-sc-name { text-align:left; min-width:140px; }
.asg-scores-grid .asg-sc-name .fg-sub { display:block; font-size:.72rem; }
.asg-scores-grid tr.asg-low td { background:var(--red-bg); }
.asg-scores-grid .btn-small { padding:5px 10px; white-space:nowrap; }
.asg-scores-grid .asg-sc-score .fg-sub { display:block; font-size:.7rem; white-space:nowrap; }
.asg-scores-grid .asg-sc-name { min-width:110px; }

/* v153 🛟 Recovery Plan */
.rcv-title { margin: 14px 0 4px; font-family: var(--display, inherit); }
.rcv-tools { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 4px; }
.rcv-status { min-height:1.2em; margin:4px 0 8px; }
.rcv-summary { display:flex; flex-wrap:wrap; gap:6px 16px; font-size:.86rem; margin:4px 0 10px; }
.rcv-add-bar { display:flex; flex-wrap:wrap; gap:8px 14px; align-items:center; justify-content:space-between; }
.rcv-add-grp { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.rcv-add-grp input[type=date], .rcv-plan-bar input[type=date] { width:auto; padding:6px 8px; margin:0; }
.rcv-check { display:flex; align-items:flex-start; gap:8px; font-weight:400; margin:0; font-size:.86rem; }
.rcv-check input { width:auto; margin-top:3px; }
.linklike { background:none; border:0; padding:0; color:var(--olive-deep, inherit); text-decoration:underline; cursor:pointer; font:inherit; }
.rcv-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; max-width:100%; }
.rcv-grid td, .rcv-grid th, .rcv-task-grid td, .rcv-task-grid th { vertical-align:middle; }
.rcv-grid .rcv-name, .rcv-task-grid .rcv-name { text-align:left; min-width:130px; }
.rcv-grid small, .rcv-task-grid small, .rcv-plan small { display:block; font-size:.7rem; color:var(--ink-soft); font-weight:400; }
.rcv-grid tr.rcv-fail td { background:var(--red-bg); }
.rcv-grid tr.rcv-in td { background:var(--amber-bg); }
.rcv-whys { text-align:left; min-width:170px; }
.rcv-why { display:inline-block; font-size:.7rem; padding:2px 8px; border-radius:99px; margin:2px 4px 2px 0; background:var(--paper); border:1px solid var(--rule); white-space:nowrap; }
.rcv-why.miss { border-color:var(--red, #c62828); }
.rcv-why.low { border-color:var(--amber, #b7791f); }
.rcv-pill { display:inline-block; font-size:.74rem; font-weight:700; padding:2px 8px; border-radius:99px; background:var(--green-bg); color:var(--green-text, inherit); }
.rcv-empty { text-align:center; padding:14px; color:var(--ink-soft); }
.rcv-stu-head { display:flex; flex-wrap:wrap; gap:10px 20px; align-items:center; justify-content:space-between; }
.rcv-grades { display:flex; align-items:center; gap:10px; background:var(--paper); border:1px solid var(--rule); border-radius:12px; padding:8px 14px; width:fit-content; max-width:100%; }
.rcv-grades small { display:block; font-size:.68rem; color:var(--ink-soft); }
.rcv-grades b { font-size:1.25rem; font-variant-numeric:tabular-nums; }
.rcv-grades b.ok { color:var(--green-text, #2e7d32); }
.rcv-arrow { color:var(--ink-soft); font-size:1.2rem; }
.rcv-warn { color:var(--red, #c62828); font-size:.84rem; }
.rcv-plan-bar { display:flex; flex-wrap:wrap; gap:8px 14px; align-items:center; margin:8px 0; font-size:.86rem; }
.rcv-h { margin:16px 0 6px; }
.rcv-comps { display:flex; flex-direction:column; gap:4px; }
.rcv-comp { display:flex; gap:10px; align-items:flex-start; font-size:.82rem; padding:4px 8px; border-radius:8px; background:var(--paper); }
.rcv-comp.low { background:var(--red-bg); }
.rcv-comp small { display:block; font-size:.7rem; color:var(--ink-soft); }
.rcv-comp-pct { font-weight:700; min-width:3.2em; font-variant-numeric:tabular-nums; }
.rcv-st { display:inline-block; font-size:.72rem; padding:2px 8px; border-radius:99px; background:var(--paper); border:1px solid var(--rule); white-space:nowrap; }
.rcv-st.done { background:var(--green-bg); border-color:transparent; }
.rcv-st.sub { background:var(--amber-bg); border-color:transparent; }
.rcv-acts { white-space:nowrap; }
.rcv-acts .btn-small { padding:5px 9px; }
.rcv-task-head { display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; }
.rcv-task-card, .rcv-s-task { display:flex; gap:10px; align-items:center; padding:10px 12px; border:1px solid var(--rule); border-radius:12px; margin:8px 0; background:var(--card); }
.rcv-s-task.done { opacity:.85; }
.rcv-task-ic { font-size:1.4rem; }
.rcv-task-txt { flex:1; min-width:0; }
.rcv-task-txt small { display:block; font-size:.74rem; color:var(--ink-soft); }
.rcv-task-acts { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.rcv-pick-list { display:flex; flex-direction:column; gap:6px; max-height:45vh; overflow:auto; }
.rcv-answer { background:var(--paper); border:1px solid var(--rule); border-radius:10px; padding:10px 12px; font-size:.88rem; max-height:40vh; overflow:auto; margin:6px 0 10px; }
.rcv-rubric td small { display:block; font-size:.7rem; color:var(--ink-soft); }
.rcv-rubric input { width:70px; display:inline-block; margin:0; padding:5px 6px; }
.rcvf-row { display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); gap:10px; }
.rcvf-q { display:flex; gap:8px; align-items:flex-start; border:1px solid var(--rule); border-radius:10px; padding:8px; margin:6px 0; }
.rcvf-q-n { font-weight:700; min-width:1.4em; }
.rcvf-q-f { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; }
.rcvf-q-f textarea, .rcvf-q-f input { margin:0; }
.rcvf-q-head { display:flex; justify-content:space-between; gap:8px; align-items:center; flex-wrap:wrap; margin-top:8px; }
.rcvf-q-head select { width:auto; max-width:100%; margin:0; }
.rcvf-rb { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1.6fr) 70px auto; gap:6px; margin:4px 0; }
.rcvf-rb input { margin:0; }
@media (max-width:520px) { .rcvf-rb { grid-template-columns:minmax(0,1fr) 70px auto; } .rcvf-rb input[data-rd] { grid-column:1 / -1; grid-row:2; } }
.rcvi-preview { font-size:.84rem; margin-top:8px; }
.rcvi-map { display:flex; flex-direction:column; gap:6px; max-height:40vh; overflow:auto; margin-top:6px; }
.rcvi-map div { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; padding:6px; border-bottom:1px solid var(--rule); font-size:.76rem; }
.rcvi-map b { font-weight:600; color:var(--olive-deep, inherit); }
.rcv-card .fg-sub { font-size:.72rem; }
.rcv-s-plan { border:1px solid var(--rule); border-radius:14px; padding:12px 14px; margin:12px 0; background:var(--card); }
.rcv-s-head { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.rcv-s-head h3 { margin:0; }
.rcv-progress { height:10px; border-radius:99px; background:var(--paper); border:1px solid var(--rule); overflow:hidden; margin:10px 0 4px; }
.rcv-progress div { height:100%; background:var(--olive-base, #6b8e23); }
.rcv-s-comps { margin:8px 0; font-size:.84rem; }
.rcv-s-comps summary { cursor:pointer; font-weight:600; }
.rcv-paper { white-space:nowrap; }
.rcvq-form { display:flex; flex-direction:column; gap:12px; }
.rcvq-q { border:1px solid var(--rule); border-radius:12px; padding:10px 12px; margin:0; }
.rcvq-q legend { font-weight:600; padding:0 4px; }
.rcvq-choice { display:flex; gap:8px; align-items:flex-start; font-weight:400; margin:6px 0; padding:8px; border-radius:8px; background:var(--paper); }
.rcvq-choice input { width:auto; margin-top:3px; }
.grade-sheet td.grade-sheet-rcv { font-weight:700; background:var(--amber-bg); }
/* v153 📲 Install Link + 🌱 About the Logo */
.inst-link { display:flex; gap:8px; }
.inst-link input { flex:1; min-width:0; margin:0; font-weight:600; }
.sprout-about { text-align:left; }
.sprout-logo { display:block; width:72px; height:72px; margin:0 auto 6px; border-radius:18px; }
.sprout-about h3 { text-align:center; margin:4px 0 10px; }
.sprout-about h4 { margin:14px 0 4px; color:var(--olive-deep, inherit); }
.sprout-about p { margin:0 0 6px; }
.sprout-quote { margin:16px 0 4px; padding:10px 14px; border-left:4px solid var(--olive-base, #6b8e23); background:var(--paper); font-style:italic; border-radius:0 10px 10px 0; }

/* v154 🎯 Guided tasks + 🚩 leaving the task */
.gd-dots { display:inline-flex; gap:4px; vertical-align:middle; margin:2px 0; }
.gd-dots i { width:10px; height:10px; border-radius:50%; background:var(--paper); border:1.5px solid var(--olive-base, #6b8e23); display:inline-block; }
.gd-dots i.on { background:var(--olive-base, #6b8e23); }
.gd-card .gd-dots { display:flex; margin:4px 0; }
.gd-steps { display:grid; grid-template-columns:repeat(5, minmax(0,1fr)); gap:6px; margin:10px 0 14px; }
.gd-step { display:flex; flex-direction:column; align-items:center; gap:2px; padding:8px 4px; border-radius:12px; border:1px solid var(--rule); background:var(--card); color:var(--ink); font:inherit; cursor:pointer; min-width:0; }
.gd-step span { font-size:1.2rem; }
.gd-step small { font-size:.66rem; text-align:center; line-height:1.15; color:var(--ink-soft); }
.gd-step.done { background:var(--green-bg); border-color:transparent; }
.gd-step.cur { outline:2px solid var(--olive-base, #6b8e23); outline-offset:1px; }
.gd-step:disabled { opacity:.5; cursor:default; }
.gd-body { display:flex; flex-direction:column; gap:10px; }
.gd-problem { background:var(--paper); border:1px solid var(--rule); border-radius:12px; padding:12px 14px; font-size:1rem; line-height:1.5; }
.gd-ex-steps { margin:0; padding-left:1.4em; display:flex; flex-direction:column; gap:8px; }
.gd-ex-steps li b { font-weight:600; }
.gd-ex-steps li small { display:block; color:var(--ink-soft); font-size:.8rem; }
.gd-answer { font-size:1rem; }
.gd-hint { margin:0; padding:8px 10px; border-radius:10px; background:var(--amber-bg); font-size:.88rem; }
.gd-hints { display:flex; flex-direction:column; gap:6px; }
.gd-fb { padding:10px 12px; border-radius:10px; font-size:.92rem; }
.gd-fb.ok { background:var(--green-bg); }
.gd-fb.no { background:var(--red-bg); }
.gd-fb small { display:block; margin-top:4px; color:var(--ink-soft); }
.gd-choices { display:flex; flex-direction:column; }
.gd-review { padding-left:1.2em; display:flex; flex-direction:column; gap:6px; font-size:.86rem; }
.gd-review small { display:block; color:var(--ink-soft); }
.gd-body input[type=text] { max-width:320px; }
.gs-card { border:1px solid var(--rule); border-radius:12px; padding:10px 12px; margin:10px 0; background:var(--card); display:flex; flex-direction:column; gap:8px; }
.gs-card-head { display:flex; justify-content:space-between; gap:8px; align-items:flex-start; flex-wrap:wrap; }
.gs-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:8px; }
.gs-grid label { font-size:.8rem; margin:0; }
.gs-grid select { margin:2px 0 0; width:100%; }
.focus-flag { display:inline-block; margin-top:3px; font-size:.7rem; font-weight:700; color:var(--red, #c62828); white-space:nowrap; }
td .focus-flag { display:block; }
.rcvq-choice.gd-right { background:var(--green-bg); } .rcvq-choice.gd-wrong { background:var(--red-bg); }

/* v157 📊 Data Detective (individualized Performance Task) */
.dpt-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 12px; font-size: .9rem; }
.dpt-h { margin: 18px 0 8px; font-size: 1rem; color: var(--olive-deep, #4A5A28); }
.dpt-data { width: auto; min-width: 260px; }
.dpt-data input { width: 100%; min-width: 90px; box-sizing: border-box; padding: 6px 8px; font-size: 1rem; }
.dpt-field input, .dpt-field textarea { width: 100%; box-sizing: border-box; }
.dpt-field input[inputmode="decimal"] { max-width: 220px; }
.dpt-bad { border-color: #C0392B !important; background: #FDECEA !important; }
.dpt-errs { background: #FDECEA; color: #8E2A1F; border-radius: 10px; padding: 10px 12px; margin: 10px 0; font-size: .9rem; }
.dpt-status { margin: 8px 0; font-size: .9rem; }
.dpt-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0 6px; }
.dpt-latebox { background: #FCEFD2; color: #6B4700; border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; font-size: .9rem; }
.dpt-late { display: inline-block; background: #C0392B; color: #fff; border-radius: 6px; padding: 0 6px; font-size: .75rem; font-weight: 700; }
.dpt-note { background: var(--card, #FFFDF6); border: 1px solid var(--rule, #DED6BF); border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; }
.dpt-qa { border: 1px solid var(--rule, #DED6BF); border-radius: 10px; padding: 10px 12px; margin: 0 0 8px; }
.dpt-qa > div { margin-top: 4px; white-space: pre-wrap; }
.dpt-pts { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 600; font-size: .9rem; }
.dpt-pts input { width: 70px; padding: 4px 6px; }
.dpt-flag { color: #8A5A00; font-size: .78rem; font-weight: 600; }
.dpt-sample { margin: 0 0 12px; }
.dpt-sample summary { cursor: pointer; font-weight: 600; }
.dpt-sample table { width: auto; margin: 8px 0 4px; }
.dpt-check-grid { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(280px, 2fr); gap: 16px; }
@media (max-width: 720px) { .dpt-check-grid { grid-template-columns: 1fr; } }
.dpt-tpl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.dpt-edit { border: 1px dashed var(--rule, #DED6BF); border-radius: 12px; padding: 12px; margin: 0 0 16px; }
.dpt-edit-h { font-weight: 700; margin-bottom: 4px; }
.dpt-list td { vertical-align: top; }

/* v159 🗓 sections & deadlines, late work */
.task-post-tbl { width: auto; }
.task-post-tbl input[type="datetime-local"] { min-width: 200px; }
.task-late { display: inline-block; background: #FCE4E1; color: #A3271B; border-radius: 6px; padding: 0 6px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.task-late.waived { background: #E8EDD8; color: #4A5A28; }
.task-waive { font-size: .75rem; }

/* ---------- v160 🏠 Home refresh: compact header, olive accent, Today strip, tile badges ---------- */
.topbar { padding: 10px 24px; border-bottom: 3px solid var(--olive-deep); }
.topbar img.wordmark-sm { height: 64px; }
.topbar-hello { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.topbar-hello .teacher-subject-switcher-wrap { margin: 0; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule); border-radius: 999px; padding: 2px 4px 2px 12px; background: var(--card); }
.topbar-hello .teacher-subject-switcher-wrap.hidden { display: none; }
.topbar-hello .teacher-subject-switcher-wrap label { font-size: 0.76rem; color: var(--ink-soft); margin: 0; font-weight: 400; white-space: nowrap; }
.topbar-hello .teacher-subject-switcher-wrap select { border: 0; background: transparent; padding: 4px 6px; font-size: 0.84rem; font-weight: 600; }
@media (max-width: 640px) { .topbar { padding: 8px 14px; } .topbar img.wordmark-sm { height: 48px; } }

/* Today strip */
.home-today { margin: 18px 20px 0; }
.home-today.hidden { display: none; }
.home-today .today-h { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; }
.home-today .today-h h2 { margin: 0; font-size: 0.8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--olive-deep); }
.home-today .today-h span { font-size: 0.82rem; color: var(--ink-soft); }
.today-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.today-card { display: flex; gap: 12px; align-items: flex-start; text-align: left; font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 12px 14px; min-width: 0; }
button.today-card { cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
button.today-card:hover, button.today-card:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(74, 90, 40, .16); border-color: var(--olive-base); }
.today-card .ic { font-size: 1.6rem; line-height: 1; flex: none; }
.today-card .k { font-size: 0.75rem; color: var(--ink-soft); }
.today-card .v { font-size: 1.2rem; font-weight: 600; margin: 2px 0; }
.today-card .s { font-size: 0.75rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.today-card.warn { border-color: #F0C77A; background: #FFFBF1; } .today-card.warn .v { color: var(--amber); }
.today-card.alert { border-color: #F2B8B3; background: #FFF8F7; } .today-card.alert .v { color: var(--red); }
.today-card.ok .v { color: var(--green); }
[data-theme="dark"] .today-card.warn { background: rgba(240, 199, 122, .12); border-color: rgba(240, 199, 122, .5); }
[data-theme="dark"] .today-card.alert { background: rgba(242, 184, 179, .1); border-color: rgba(242, 184, 179, .45); }
[data-theme="dark"] .today-card.warn .v { color: #F2C46B; } [data-theme="dark"] .today-card.alert .v { color: #F2A99F; }
@media (max-width: 900px) { .today-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
@media (max-width: 480px) { .home-today { margin: 12px 12px 0; } .today-card { padding: 9px 10px; gap: 8px; } .today-card .ic { font-size: 1.25rem; } .today-card .v { font-size: 1rem; } .today-card .k, .today-card .s { font-size: 0.7rem; } }

/* Tiles: one rounded style everywhere, olive lift on hover/press, live badges */
.tabs.tabs-grid .tab-btn, .subject-card { position: relative; border-radius: 14px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.tabs.tabs-grid .tab-btn:hover, .tabs.tabs-grid .tab-btn:focus-visible, .subject-card:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(74, 90, 40, .18); border-color: var(--olive-base); }
.tabs.tabs-grid .tab-btn:active, .subject-card:active { transform: translateY(-1px); }
.tabs.tabs-grid .tab-btn.active { border-color: var(--olive-deep); }
#teacher-top-tabs.tabs-grid { gap: 12px; padding: 16px 20px; }
#teacher-top-tabs.tabs-grid .tab-btn { padding: 22px 10px; }
.tile-badge { position: absolute; top: 8px; right: 8px; font-size: 0.68rem; font-weight: 600; line-height: 1.5; border-radius: 999px; padding: 1px 8px; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-badge.red { background: var(--red); color: #fff; }
.tile-badge.amber { background: var(--amber-bg); color: var(--amber); }
.tile-badge.green { background: var(--green-bg); color: var(--green-text); }
.tile-badge.grey { background: rgba(120, 130, 145, .14); color: var(--ink-soft); }
@media (prefers-reduced-motion: reduce) { .tabs.tabs-grid .tab-btn, .subject-card, button.today-card { transition: none; } .tabs.tabs-grid .tab-btn:hover, .subject-card:hover, button.today-card:hover { transform: none; } }

/* Quote of the Day + weather: one slim line under the tiles (teacher home) */
#teacher-home-extras { margin: 4px 20px 16px; gap: 12px; }
#teacher-home-extras .quote-card, #teacher-home-extras .weather-card { margin-top: 0; padding: 8px 14px; flex-direction: row; align-items: center; gap: 10px; border: 1px solid var(--rule); border-radius: 12px; }
#teacher-home-extras .weather-label { display: none; }
#teacher-home-extras .quote-main { padding: 0; gap: 10px; }
#teacher-home-extras .quote-icon { font-size: 1.15rem; }
#teacher-home-extras .quote-text { font-family: 'IBM Plex Sans', sans-serif; font-style: italic; font-size: 0.88rem; line-height: 1.4; }
#teacher-home-extras .weather-main { flex: none; padding: 0; gap: 6px; }
#teacher-home-extras .weather-icon { font-size: 1.15rem; }
#teacher-home-extras .weather-temp { font-size: 1rem; font-weight: 700; letter-spacing: 0; }
#teacher-home-extras .weather-desc { text-align: left; font-size: 0.8rem; }
#teacher-home-extras .weather-desc::before { content: 'Mandaluyong City · '; }
.home-today .today-h h2 { font-family: 'IBM Plex Sans', sans-serif; }
@media (max-width: 640px) {
  .topbar-hello .teacher-subject-switcher-wrap label { display: none; }
  .topbar-hello .teacher-subject-switcher-wrap { padding: 0 2px 0 6px; }
  .topbar-hello .teacher-subject-switcher-wrap select { max-width: 46vw; }
}
@media (max-width: 700px) {
  #teacher-top-tabs.tabs-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; }
  #teacher-top-tabs.tabs-grid .tab-btn { padding: 16px 4px 12px; }
  #teacher-top-tabs.tabs-grid .tab-btn .tab-icon { font-size: 2.1rem; }
  #teacher-top-tabs.tabs-grid .tab-btn .tab-label { font-size: 0.8rem; }
  #teacher-top-tabs .tile-badge { top: 4px; right: 4px; font-size: 0.62rem; padding: 0 6px; }
  #teacher-home-extras { margin: 4px 12px 14px; }
}
/* v160 phones: row 1 = logo, greeting, subject; row 2 = signed-in name + buttons */
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; row-gap: 6px; }
  .topbar > div:first-child { flex: 1 1 100%; }
  .topbar-actions { flex: 1 1 100%; flex-wrap: nowrap; justify-content: flex-end; }
  .topbar-actions .topbar-who { flex: 1 1 auto; order: 0; max-width: none; margin: 0; text-align: left; font-size: 0.72rem; }
  .topbar-hello .teacher-subject-switcher-wrap label { display: inline; }
  .topbar-hello .teacher-subject-switcher-wrap select { max-width: 52vw; }
}
.topbar .logout-btn { white-space: nowrap; }

/* v161 🔁 Performance Task retakes */
.pt-retake-box { background: var(--green-bg, #EAF3DE); color: var(--green-text, #27500A); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; font-size: .9rem; }
.pt-retake-box .fg-sub { color: inherit; opacity: .85; }
.pt-retaking { margin: 12px 0; padding: 10px 12px; border: 1px dashed var(--rule); border-radius: 12px; }
.pt-retaking-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--rule); }
.pt-retaking-row:first-of-type { border-top: 0; }
[data-theme="dark"] .pt-retake-box { background: rgba(169, 199, 106, .14); color: #CFE3A6; }

/* v162 💬 Line: waiting for your reply */
.line-wait-chip { display: inline-block; margin-left: 6px; font-size: .7rem; font-weight: 700; color: var(--red); background: var(--red-bg); border-radius: 999px; padding: 0 8px; vertical-align: middle; }
.notebook-lesson-row.line-waiting { border-left: 4px solid var(--red); }
.line-wait-list { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow-y: auto; }
.line-wait-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.line-wait-item:hover { border-color: var(--olive-base); }
.line-wait-msg { display: block; font-size: .85rem; color: var(--ink-soft); margin-top: 2px; overflow-wrap: anywhere; }
[data-theme="dark"] .line-wait-chip { background: rgba(242, 169, 159, .16); color: #F2A99F; }

/* v163 🏠 student / parent home */
.student-today { margin: 0 0 18px; }
.stu-sec-h { font-size: 0.8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--olive-deep); margin: 0 0 10px; }
.subject-card .subject-meta { font-size: 0.72rem; font-weight: 400; color: var(--ink-soft); margin-top: -4px; }
#subject-sub-tabs .tab-btn { position: relative; }

/* v164 ↻ Refresh button */
.refresh-btn { font-size: 1.15rem; line-height: 1; font-weight: 700; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.refresh-btn.spinning { animation: chim-refresh-spin .8s linear infinite; }
.refresh-btn:disabled { opacity: 1; cursor: progress; }
@keyframes chim-refresh-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .refresh-btn.spinning { animation-duration: 2.4s; } }

/* v166 📢 post the owner's lesson (view-only popup) */
.asg-ro-post { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }

/* ---------- v167 ∑ formulas (MathLive) ---------- */
body { --keyboard-zindex: 10100; }
.chim-tex { display: inline-block; vertical-align: middle; max-width: 100%; overflow-x: auto; overflow-y: hidden; padding: 2px 1px; line-height: normal; }
.chim-tex .ML__latex { font-size: 1.08em; }
.nbp-p .chim-tex { vertical-align: middle; }
.fx-bar { margin: 4px 0 2px; }
.fx-btn { background: var(--olive-deep); color: #fff; border: 0; border-radius: 8px; padding: 5px 11px; font-weight: 700; font-size: 0.8rem; cursor: pointer; line-height: 1.2; }
.fx-btn:hover { background: var(--olive-base); }
.fx-btn.fx-mini { flex: 0 0 auto; padding: 6px 9px; font-size: 0.95rem; margin: 0 4px; }
.fx-btn.fx-kb { margin-top: 6px; background: var(--paper-2); color: var(--olive-deep); border: 1.5px solid var(--olive-soft); }
.fx-prev { margin-top: 6px; border: 1.5px dashed var(--rule); border-radius: 10px; padding: 8px 12px; background: var(--card); line-height: 2; color: var(--ink); overflow-x: auto; }
.fx-prev small { display: block; color: var(--ink-soft); font-size: 0.7rem; line-height: 1.2; margin-bottom: 2px; }
.fx-chip { cursor: pointer; border-radius: 6px; outline: 2px solid transparent; transition: outline-color .15s, background .15s; }
.fx-chip:hover, .fx-chip:focus { outline-color: var(--gold); background: rgba(224,165,38,0.15); }
.fx-overlay { z-index: 10050; align-items: flex-start; padding-top: 4vh; }
.fx-overlay.fx-student { align-items: flex-start; }
.fx-card { max-width: 720px; width: 100%; max-height: 92vh; position: relative; }
.fx-grp { font-size: 0.68rem; color: var(--ink-soft); margin: 8px 0 3px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.fx-tb { display: flex; flex-wrap: wrap; gap: 5px; }
.fx-tool { min-width: 44px; height: 42px; border: 1.5px solid var(--rule); background: var(--card); color: var(--ink); border-radius: 9px; padding: 0 6px; cursor: pointer; font-size: 13px; }
.fx-tool:hover { border-color: var(--olive-base); }
.fx-tool.fx-txt { font-size: 0.78rem; font-weight: 600; }
.fx-tool .ML__latex { font-size: 14px; }
math-field.fx-mf { display: block; font-size: 24px; border: 2px solid var(--gold); border-radius: 10px; padding: 8px 10px; background: #fffdf6; color: #1c1c14; min-height: 56px; margin-top: 10px; }
.fx-hint { font-size: 0.75rem; color: var(--ink-soft); margin: 6px 0 4px; }
@media (max-width: 640px) {
  .fx-tool { min-width: 40px; height: 38px; }
  math-field.fx-mf { font-size: 21px; }
}

/* ---------- v168 ✍️ rich boxes: formulas typed in place ---------- */
.rbx-src-hidden { display: none !important; }
.rbx { white-space: pre-wrap; overflow-wrap: anywhere; outline: none; cursor: text; color: var(--ink); line-height: 1.85; font-size: 1rem; text-align: left; position: relative; }
.rbx-line { padding: 8px 4px; border-bottom: 1px solid var(--rule); min-height: 2.2em; }
.rbx-line:focus { border-bottom: 2px solid var(--olive-deep); }
.rbx-area { padding: 10px; border: 1px solid var(--rule); border-radius: var(--radius); resize: vertical; overflow: auto; }
.rbx-area:focus { border-color: var(--olive-deep); }
.rbx-blank::before { content: attr(data-ph); color: var(--ink-soft); opacity: 0.75; pointer-events: none; }
.line-composer .rbx { flex: 1; min-width: 0; background: #ffffff; border: 1px solid var(--rule); border-radius: 20px; padding: 6px 14px; max-height: 40vh; overflow-y: auto; }
[data-theme="dark"] .line-composer .rbx { background: #3F4F24; color: #fff; border-color: #4A5A28; }
html[data-palette="charcoal"]:not([data-theme="dark"]):not([data-screen="gate"]) .line-composer .rbx { background: #3F4F24; color: #fff; border-color: #4A5A28; }
.asg-mc-edit-row .rbx, .mq-choice-edit .rbx { flex: 1; min-width: 0; }
.rbx-f { display: inline-block; vertical-align: middle; cursor: pointer; border-radius: 6px; padding: 0 2px; line-height: normal; max-width: 100%; overflow-x: auto; }
.rbx-f:hover { background: rgba(224, 165, 38, 0.15); }
.rbx-f.editing { outline: 2px solid var(--gold); background: #fff8e3; color: #1c1c14; }
.rbx-f-empty { color: var(--ink-soft); font-size: 1.1em; }
.rbx-pop { position: absolute; z-index: 10040; background: var(--paper); border: 2px solid var(--olive-deep); border-radius: 12px; padding: 8px; box-shadow: 0 10px 28px rgba(0,0,0,0.22); width: max-content; max-width: min(580px, calc(100vw - 16px)); }
.rbx-pop .fx-tb { gap: 4px; }
.rbx-pop .fx-tool { min-width: 38px; height: 36px; font-size: 12px; }
.rbx-pop .fx-tool .ML__latex { font-size: 13px; }
.rbx-pop math-field.rbx-mfield { display: block; font-size: 22px; border: 2px solid var(--gold); border-radius: 8px; padding: 6px 8px; background: #fffdf6; color: #1c1c14; margin-top: 6px; min-width: 240px; }
.fx-btn.fx-code { background: var(--paper-2); color: var(--olive-deep); border: 1.5px solid var(--olive-soft); margin-left: 6px; }
.fx-btn.fx-code.fx-mini { margin-left: 0; font-size: 0.75rem; }
.fx-bar { display: flex; flex-wrap: wrap; gap: 0; align-items: center; }

/* ---------- v169 ---------- */
.stu-sex-gap td { padding: 2px 0 !important; border: 0 !important; background: var(--paper-2); }
.draft-sex-cell { width: 76px; }
.draft-sex-cell input { text-transform: uppercase; text-align: center; }
.focus-cut { display: inline-block; font-size: 0.75rem; font-weight: 700; color: var(--red); background: var(--red-bg); border-radius: 10px; padding: 1px 7px; margin-top: 2px; }
.focus-cut.waived { color: var(--ink-soft); background: var(--paper-2); text-decoration: line-through; }

/* v170 ✅ "Are you sure your response is final?" */
.pt-final-overlay { z-index: 10060; }
.pt-final-card { text-align: center; max-width: 360px; }
.pt-final-card h3 { margin: 4px 0 6px; font-family: 'Lora', Georgia, serif; }
.pt-final-icon { font-size: 2rem; }
.pt-final-btns { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.pt-final-btns button { min-width: 110px; width: auto; margin: 0; }

/* ---------- v171 📥 inbox · ✏️ customize Data Detective · 🗑 delete ---------- */
.pt-inbox { border: 2px solid var(--gold); background: var(--amber-bg); border-radius: 12px; padding: 10px 12px; margin: 0 0 14px; }
.pt-inbox-h { font-weight: 800; color: var(--amber); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.pt-inbox-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 8px 10px; margin-top: 6px; }
.pt-inbox-t { display: flex; flex-direction: column; min-width: 180px; flex: 1; }
.pt-inbox-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.pt-inbox-btns .btn-small { width: auto; margin: 0; }
.pt-prev-card { max-width: 640px; }
.pt-slot { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 0.95rem; color: var(--ink); }
.pt-slot input { width: auto; }
.pt-del-btn { color: var(--red) !important; border-color: var(--red) !important; }
.dpt-edit-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.dpt-edit-acts .btn-small { width: auto; margin: 0; }
.dpt-custom { margin-top: 10px; border-top: 1px dashed var(--rule); padding-top: 6px; }
.dpt-cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 12px; }
.dpt-cgrid label { margin: 0; font-size: 0.78rem; }
.dpt-cm { display: flex; align-items: center; gap: 6px; }
.dpt-cm span { flex: 1; display: flex; align-items: center; gap: 4px; color: var(--ink); font-size: 0.85rem; }
.dpt-cm input[type="checkbox"] { width: auto; }
.dpt-cm input[type="number"] { width: 64px; }
.dpt-cq { display: flex; gap: 6px; align-items: flex-start; margin: 4px 0; }
.dpt-cq textarea { flex: 1; }
.dpt-cq input { width: 70px; }
.dpt-cq .btn-small { width: auto; margin: 0; }

/* ---------- v172 ✍️ score each item (Life & Career Skills) ---------- */
#perf-responses-view.pti-on .pti-wrap { width: calc(100vw - 32px); margin-left: calc(50% - 50vw + 16px); }
.pti-wrap { background: #fff; border: 1.5px solid var(--rule); border-radius: 12px; overflow: visible; }
[data-theme="dark"] .pti-wrap { background: var(--paper); }
.pti-table { border-collapse: separate; border-spacing: 0; font-size: 0.82rem; }
.pti-table th, .pti-table td { border-bottom: 1px solid var(--rule); border-right: 1px solid rgba(201,191,160,0.5); padding: 7px 9px; vertical-align: top; background: var(--paper); color: var(--ink); text-align: left; }
.pti-table thead th { position: sticky; top: 0; z-index: 2; background: var(--paper-2); }
.pti-q { position: sticky; left: 0; z-index: 1; min-width: 240px; max-width: 260px; background: var(--card) !important; box-shadow: 2px 0 0 var(--rule); }
.pti-table thead .pti-q, .pti-table tfoot .pti-q { z-index: 3; }
.pti-q b { color: var(--olive-deep); }
.pti-pts { display: inline-block; background: var(--amber-bg); color: var(--amber); border-radius: 10px; padding: 0 7px; font-size: 0.7rem; font-weight: 700; margin-left: 3px; }
.pti-key { margin-top: 5px; font-size: 0.74rem; color: var(--green-text); background: var(--green-bg); border-radius: 6px; padding: 4px 6px; }
.pti-stu { min-width: 260px; font-size: 0.8rem; }
.pti-stu span { display: block; font-weight: 500; color: var(--ink-soft); font-size: 0.7rem; }
.pti-resp { min-width: 190px; max-width: 230px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.pti-blank { color: var(--ink-soft); font-style: italic; }
.pti-sc { min-width: 62px; text-align: center !important; }
.pti-sc input { width: 48px; text-align: center; border: 1.5px solid var(--rule); border-radius: 6px; padding: 5px 2px; font-size: 0.95rem; background: #fff; color: #1c1c14; }
.pti-sc input.done { border-color: var(--olive-deep); background: var(--green-bg); }
.pti-sc small { display: block; color: var(--ink-soft); font-size: 0.66rem; margin-top: 2px; }
.pti-table tfoot td { position: sticky; bottom: 0; background: var(--paper-2); font-weight: 800; border-top: 2px solid var(--olive-deep); }
.pti-tot b { font-size: 1rem; color: var(--olive-deep); }
.pti-count { margin: 0 0 6px; }
/* v173 🔁 retake row in the item view */
.pti-rt-row td { position: static; background: var(--paper) !important; border-top: 0; font-weight: 500; }
.pti-rt { text-align: center !important; }
.pti-rt .btn-small { width: auto; margin: 0 0 4px; }
.pti-rt span { display: block; font-size: 0.7rem; }

/* ---------- v174 📊 Students menu · Student Monitoring ---------- */
.students-menu { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.students-menu .subject-card .fg-sub { font-weight: 400; margin-top: 4px; }
.smon-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.smon-dl { position: relative; }
.smon-dl > .btn-small { width: auto; margin: 0; }
.smon-dl-menu { position: absolute; right: 0; top: calc(100% + 4px); background: var(--paper); border: 1.5px solid var(--rule); border-radius: 10px; box-shadow: 0 8px 22px rgba(0,0,0,0.18); z-index: 30; display: flex; flex-direction: column; min-width: 140px; overflow: hidden; }
.smon-dl-menu button { background: none; border: 0; text-align: left; padding: 10px 14px; font-size: 0.9rem; color: var(--ink); cursor: pointer; }
.smon-dl-menu button:hover { background: var(--paper-2); }
.smon-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 8px; }
.smon-bar label { margin: 0; display: flex; align-items: center; gap: 6px; }
.smon-bar select { width: auto; }
.smon-sub { margin-bottom: 6px; }
#students-monitor-view .smon-wrap { width: calc(100vw - 32px); margin-left: calc(50% - 50vw + 16px); }
.smon-wrap { overflow: visible; border: 1.5px solid var(--rule); border-radius: 12px; background: var(--paper); }
.smon-table { border-collapse: separate; border-spacing: 0; font-size: 0.82rem; width: 100%; }
.smon-table th, .smon-table td { padding: 7px 9px; border-bottom: 1px solid var(--rule); border-right: 1px solid rgba(201,191,160,0.45); white-space: nowrap; text-align: center; color: var(--ink); background: var(--paper); }
.smon-table thead th { position: sticky; top: 0; z-index: 2; background: var(--paper-2); font-size: 0.74rem; }
.smon-table .smon-name { text-align: left; position: sticky; left: 0; z-index: 1; background: var(--card); min-width: 190px; white-space: normal; }
.smon-table thead th:nth-child(2) { position: sticky; left: 0; z-index: 3; text-align: left; }
.smon-name span { display: block; font-size: 0.7rem; color: var(--ink-soft); }
.smon-table td.smon-ok { color: var(--green-text); background: var(--green-bg); font-weight: 700; }
.smon-table td.smon-part { color: var(--amber); background: var(--amber-bg); font-weight: 700; }
.smon-table td.smon-no { color: var(--red); background: var(--red-bg); font-weight: 700; }
.smon-table td.smon-na { color: var(--ink-soft); }
.smon-table td.smon-grey { background: #5b5f66; color: #d8d8d8; }
.smon-gap td { padding: 2px 0 !important; background: var(--paper-2) !important; border: 0 !important; }
.smon-notify .btn-small { width: auto; margin: 0; padding: 5px 10px; }
.smon-notify span { display: block; font-size: 0.66rem; margin-top: 2px; }
/* v175 Notify All */
.smon-table th .smon-all { width: auto; margin: 4px 0 0; padding: 4px 8px; font-size: 0.72rem; }

/* ---------- v175 📝 To Do List (student / parent Home) ---------- */
#student-today .today-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.todo-box { margin-top: 14px; background: var(--card); border: 1.5px solid var(--rule); border-radius: 14px; padding: 10px 12px; }
.todo-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.todo-h h3 { margin: 0; font-family: 'Lora', Georgia, serif; font-size: 1.05rem; color: var(--olive-deep); }
.todo-empty { padding: 8px 2px; color: var(--green-text); font-weight: 600; }
.todo-scroll { max-height: 360px; overflow: auto; }
.todo-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.todo-table th { text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); padding: 4px 6px; border-bottom: 1.5px solid var(--rule); position: sticky; top: 0; background: var(--card); }
.todo-table td { padding: 7px 6px; border-bottom: 1px solid rgba(201,191,160,0.5); vertical-align: middle; color: var(--ink); }
.todo-table td:first-child { display: flex; gap: 8px; align-items: flex-start; }
.todo-table td small { display: block; color: var(--ink-soft); font-size: 0.72rem; }
.todo-ic { font-size: 1.15rem; line-height: 1.2; }
.todo-due { white-space: nowrap; font-size: 0.8rem; }
.todo-over td { background: var(--red-bg); }
.todo-over .todo-due { color: var(--red); font-weight: 700; }
.todo-do { width: auto; margin: 0; padding: 5px 12px; white-space: nowrap; }
@media (max-width: 640px) {
  .todo-table th:nth-child(2), .todo-due { font-size: 0.72rem; white-space: normal; }
}

/* ---------- v176 ---------- */
/* Student / parent Home: 4 small tiles (2 × 2 on phones) so the subjects show below */
#student-today .today-card { padding: 9px 11px; gap: 9px; }
#student-today .today-card .ic { font-size: 1.3rem; }
#student-today .today-card .v { font-size: 1.02rem; }
#student-today .today-card .s { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 640px) {
  #student-today .today-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  #student-today .today-card { padding: 7px 8px; gap: 6px; border-radius: 12px; }
  #student-today .today-card .ic { font-size: 1.05rem; }
  #student-today .today-card .k { font-size: 0.64rem; }
  #student-today .today-card .v { font-size: 0.9rem; margin: 1px 0; }
  #student-today .today-card .s { font-size: 0.64rem; }
}
.stu-todo-hid { display: none !important; }
.student-todo-page .todo-box { margin-top: 0; }
.student-todo-page .todo-scroll { max-height: none; }
/* Teacher Today: 5 cards (✅ To Do added) */
#teacher-today .today-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { #teacher-today .today-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { #teacher-today .today-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Teacher ✅ To Do page */
.todo-add { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.todo-add #todo-new-text { flex: 1 1 260px; min-width: 0; }
.todo-add #todo-new-due { flex: 0 0 auto; width: auto; }
.todo-add .btn-small, .todo-tools .btn-small { width: auto; margin: 0; }
.todo-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tt-table { background: var(--card); border: 1.5px solid var(--rule); border-radius: 12px; overflow: hidden; }
.tt-table td:first-child { display: table-cell; }
.tt-table .tt-h { width: 30px; text-align: center; padding-left: 4px; padding-right: 0; }
.tt-table .tt-x { width: 1%; white-space: nowrap; text-align: right; }
.tt-grip { cursor: grab; touch-action: none; user-select: none; font-size: 1.15rem; color: var(--ink-soft); padding: 4px; display: inline-block; }
.tt-dragging td { background: var(--paper-2) !important; box-shadow: inset 0 0 0 2px var(--olive-base); }
.tt-text { cursor: text; overflow-wrap: anywhere; }
.tt-xbtn { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--rule); background: var(--card); color: var(--red); font-weight: 700; cursor: pointer; }
.tt-xbtn:hover { background: var(--red-bg); border-color: var(--red); }
.tt-in { width: 100%; min-width: 0; margin: 0; }
.tt-edit .btn-small { width: auto; margin: 0; padding: 5px 10px; }
.tt-done { margin-top: 14px; }
.tt-done summary { cursor: pointer; color: var(--ink-soft); font-weight: 600; }
.tt-done-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 6px 2px; border-bottom: 1px solid rgba(201,191,160,0.5); }
/* Line: 🔍 search, new messages, Mark as read / unread, Seen ✓ */
.line-roster-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.line-roster-top .btn-small { width: auto; margin: 0; }
.line-search { flex: 0 1 280px; min-width: 0; margin: 0; }
.line-roster-tools { display: flex; justify-content: flex-end; margin: 0 0 6px; }
.line-unread .lesson-name { font-weight: 800; }
.line-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--red); margin-right: 6px; vertical-align: middle; }
.line-prev { font-weight: 400; font-size: 0.78rem; color: var(--ink-soft); }
.line-unread .line-prev { color: var(--ink); font-weight: 600; }
.line-row-end { display: flex; align-items: center; gap: 10px; flex: none; }
.line-mark { font-size: 0.76rem; white-space: nowrap; }
.line-seen { text-align: right; font-size: 0.7rem; color: var(--ink-soft); margin: -4px 6px 6px; }
.line-stu-tools { display: flex; justify-content: flex-end; margin: 4px 0 6px; }
.notif-line { cursor: default; }
.notif-line-btns { display: flex; gap: 6px; margin-top: 6px; }
.notif-line-btns .btn-small { width: auto; margin: 0; padding: 4px 10px; font-size: 0.75rem; }
@media (max-width: 640px) { .line-search { flex: 1 1 100%; } }
.line-roster-tools .link-btn, .line-mark, .line-stu-tools .link-btn, .tt-done-row .link-btn { margin: 0; cursor: pointer; }
.line-mark { color: var(--olive-deep); }
.beh-undo { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 9999; display: flex; align-items: center; gap: 12px; background: #232B3A; color: #fff; padding: 10px 14px; border-radius: 12px; box-shadow: 0 8px 22px rgba(0,0,0,.25); font-size: 0.9rem; max-width: calc(100vw - 32px); }
.beh-undo .btn-small { width: auto; margin: 0; background: #fff; color: #232B3A; }

/* ================= v177 ================= */
/* 🧭 breadcrumbs */
.chim-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 10px 20px 0; font-size: 0.82rem; color: var(--ink-soft); }
.chim-crumbs button { background: none; border: 0; padding: 4px 2px; font: inherit; color: var(--olive-deep); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }
.chim-crumbs span[aria-current] { color: var(--ink); font-weight: 700; }
.chim-crumbs i { font-style: normal; opacity: .6; }
#student-crumbs { margin: 0 0 8px; }
@media (max-width: 640px) { .chim-crumbs { margin: 8px 12px 0; font-size: 0.76rem; } #student-crumbs { margin: 0 0 6px; } }

/* #8 teacher tile groups */
#teacher-top-tabs.tabs-grid.tile-groups { display: flex; flex-wrap: wrap; gap: 14px; grid-template-columns: none; }
.tile-group { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.tile-group-h { font-size: 0.7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); padding-left: 2px; }
.tile-group-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; }
.tile-group-grid .tab-btn.hidden { display: none; }
@media (max-width: 1000px) { .tile-group { flex-basis: calc(50% - 7px); } }
@media (max-width: 700px) {
  #teacher-top-tabs.tabs-grid.tile-groups { gap: 10px; }
  .tile-group { flex-basis: 100%; }
  .tile-group-grid { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto; gap: 8px; }
}
/* #7 home search */
.home-search { position: relative; margin: 14px 20px 0; }
.home-search input { width: 100%; margin: 0; font-size: 0.95rem; padding: 10px 14px; border: 1.5px solid var(--rule); border-radius: 12px; background: var(--card); }
.home-search-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 50; background: var(--card); border: 1.5px solid var(--rule); border-radius: 12px; box-shadow: 0 10px 26px rgba(0,0,0,.14); max-height: 60vh; overflow: auto; padding: 6px; }
.hs-h { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); padding: 8px 8px 4px; }
.hs-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 8px 10px; font: inherit; color: var(--ink); cursor: pointer; }
.hs-item:hover, .hs-item:focus-visible { background: var(--paper-2); }
.hs-item small { display: block; color: var(--ink-soft); font-size: 0.74rem; }
.hs-empty { padding: 10px; color: var(--ink-soft); }
.hs-flash { animation: hsflash 2s ease 1; }
@keyframes hsflash { 0%, 60% { box-shadow: 0 0 0 3px var(--gold, #F4B400); } 100% { box-shadow: none; } }
@media (max-width: 640px) { .home-search { margin: 10px 12px 0; } }

/* #13 outline buttons look different from main buttons */
.btn-small.btn-outline { background: transparent; color: var(--olive-deep); border: 1.5px solid var(--olive-deep); }
.btn-small.btn-outline:hover:not(:disabled) { background: var(--green-bg); color: var(--olive-deep); }
[data-theme="dark"] .btn-small.btn-outline { color: #C0DD97; border-color: #C0DD97; }
/* #12 bigger tap targets for small text links on phones */
@media (max-width: 640px), (pointer: coarse) {
  .link-btn, .line-mark, .notif-line-btns .btn-small { min-height: 36px; padding: 6px 10px; }
  .line-mark, .line-roster-tools .link-btn, .line-stu-tools .link-btn, .tt-done-row .link-btn { border: 1.5px solid var(--rule); border-radius: 18px; text-decoration: none; background: var(--card); }
}
/* #11 one color meaning + legend */
.status-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 8px 0 2px; font-size: 0.74rem; color: var(--ink-soft); }
.status-legend span::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; border: 1px solid rgba(0,0,0,.08); }
.status-legend .lg-ok::before { background: var(--green-bg); } .status-legend .lg-part::before { background: var(--amber-bg); }
.status-legend .lg-no::before { background: var(--red-bg); } .status-legend .lg-grey::before { background: #5b5f66; }
/* #14 loading outline + next step in empty states */
.chim-skel { display: flex; flex-direction: column; gap: 9px; align-items: stretch; text-align: left; }
.chim-skel span { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--paper-2) 25%, var(--card) 50%, var(--paper-2) 75%); background-size: 200% 100%; animation: skel 1.2s linear infinite; }
.chim-skel span:nth-child(2) { width: 82%; } .chim-skel span:nth-child(3) { width: 64%; }
.chim-skel em { font-style: normal; font-size: 0.72rem; color: var(--ink-soft); }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .chim-skel span { animation: none; } }
.es-act { margin-top: 10px; } .es-act .btn-small { width: auto; margin: 0; }

/* 📐 tables: own scroll box, tools, sticky header + name column, zoom, full screen, cards */
.tbl-box { margin: 6px 0 10px; max-width: 100%; }
.tbl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 0.78rem; }
.tbl-tools button, .tbl-cardnav button { background: var(--card); border: 1.5px solid var(--rule); border-radius: 8px; min-width: 34px; min-height: 32px; padding: 3px 9px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
.tbl-tools button:hover, .tbl-cardnav button:hover { border-color: var(--olive-base); }
.tbl-grp { display: inline-flex; align-items: center; gap: 4px; }
.tbl-grp.hidden, .tbl-tools .hidden, .tbl-cardnav.hidden, .tbl-hint.hidden { display: none; }
.tbl-pct { min-width: 40px; text-align: center; font-weight: 700; color: var(--ink-soft); }
.tbl-tools select, .tbl-cardnav select { width: auto; max-width: 220px; margin: 0; padding: 5px 8px; font-size: 0.8rem; min-height: 32px; }
/* v223: one scroll bar — the page scrolls up and down; a table scrolls sideways only when it is wider than the screen */
.tbl-wrap { overflow: visible; max-width: 100%; border-radius: 10px; }
.tbl-wrap.tbl-x { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; overscroll-behavior-x: contain; }
.tbl-wrap > table { margin: 0; }
.tbl-wrap .tbl-head { position: sticky; top: 0; z-index: 3; }
.tbl-wrap .tbl-stick { position: sticky; left: 0; z-index: 2; box-shadow: 2px 0 0 var(--rule); }
.tbl-wrap .tbl-head.tbl-stick { z-index: 4; }
.tbl-wrap .tbl-bg { background-color: var(--card); }
.tbl-wrap .tbl-head.tbl-bg { background-color: var(--paper-2); }
.tbl-wrap .tbl-colhide { display: none; }
.tbl-cardnav { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.tbl-cardnav select { flex: 1; max-width: none; }
.tbl-hint { font-size: 0.78rem; color: var(--ink-soft); margin: 0 0 6px; }
.tbl-box.tbl-full { position: fixed; inset: 0; z-index: 9000; margin: 0; padding: 10px 12px; background: var(--paper); display: flex; flex-direction: column; }
.tbl-box.tbl-full .tbl-wrap { flex: 1; max-height: none; overflow: auto; }
.tbl-box.tbl-full .tbl-x { background: var(--olive-deep); color: #fff; border-color: var(--olive-deep); margin-left: auto; }
body.tbl-full-lock { overflow: hidden; }
/* 📇 one student at a time */
table.tbl-cards, table.tbl-cards tbody { display: block; width: 100% !important; zoom: 1 !important; }
table.tbl-cards thead, table.tbl-cards tfoot, table.tbl-cards tbody tr { display: none; }
table.tbl-cards tbody tr.tbl-cur { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; padding: 4px 0; }
table.tbl-cards tbody tr.tbl-cur > td { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; text-align: left; border: 1px solid var(--rule); border-radius: 10px; padding: 8px 10px; position: static; box-shadow: none; min-width: 0; white-space: normal; }
table.tbl-cards tbody tr.tbl-cur > td::before { content: attr(data-tlabel); font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
table.tbl-cards tbody tr.tbl-cur > td.tbl-cardname { grid-column: 1 / -1; font-size: 1.05rem; font-weight: 800; background: var(--paper-2); }
table.tbl-cards tbody tr.tbl-cur > td.tbl-colhide { display: none; }
table.tbl-cards input[type="number"], table.tbl-cards input[type="text"] { max-width: 100%; }
/* popups: scroll inside; their buttons stay at the bottom */
.modal-card { max-height: min(86vh, 86dvh); overscroll-behavior: contain; }
.modal-card .dpt-actions:last-child { position: sticky; bottom: -18px; margin: 12px -18px -18px; padding: 10px 18px 14px; background: var(--paper); border-top: 1px solid var(--rule); z-index: 5; }
@media (max-width: 640px) { .modal-overlay { padding: 10px; } .modal-card { max-width: 100%; } }
.prof-card { max-width: 560px; }
.prof-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.prof-head .share-pop-x { position: static; }
.prof-sec { border-top: 1px solid var(--rule); padding: 10px 0; }
.prof-sec h4 { margin: 0 0 6px; font-size: 0.95rem; }
.prof-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.prof-chip { border: 1.5px solid var(--rule); border-radius: 16px; padding: 3px 10px; font-size: 0.8rem; background: var(--card); }
.prof-chip b { font-size: 0.95rem; }
.pc-present, .pb-engaged, .pb-attentive { background: var(--green-bg); } .pc-absent, .pb-disruptive { background: var(--red-bg); } .pc-late, .pb-distracted, .pb-passive { background: var(--amber-bg); }
.prof-cal { margin: 8px 0; } .prof-cal b { font-size: 0.8rem; }
.prof-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-top: 4px; max-width: 320px; }
.prof-cal-grid i { font-style: normal; font-size: 0.66rem; color: var(--ink-soft); text-align: center; }
.prof-cal-grid span { text-align: center; font-size: 0.72rem; padding: 4px 0; border-radius: 6px; background: var(--paper-2); }
.prof-cal-grid span:empty { background: none; }
.prof-cal-grid .pc-present, .prof-cal-grid .pc-multimodal { background: var(--green-bg); color: var(--green-text); font-weight: 700; }
.prof-cal-grid .pc-absent { background: var(--red-bg); color: var(--red); font-weight: 700; }
.prof-cal-grid .pc-late, .prof-cal-grid .pc-excused { background: var(--amber-bg); color: var(--amber); font-weight: 700; }
.prof-list { max-height: 180px; overflow: auto; font-size: 0.82rem; } .prof-list div { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dashed var(--rule); }
.smon-prof { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--olive-deep); text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
/* ⬇ save for offline */
.subject-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.subject-title-row .btn-small { width: auto; margin: 0 0 12px; }
.so-pics { display: flex; gap: 8px; align-items: center; font-size: 0.86rem; margin: 0 0 8px; }
.so-pics input { width: auto; margin: 0; }
.so-list { font-size: 0.84rem; display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.so-done { margin-top: 6px; font-weight: 700; color: var(--green-text); }
/* v178 notebook download */
.nbx-opts { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; font-size: 0.88rem; }
.nbx-opts label { display: flex; gap: 8px; align-items: flex-start; }
.nbx-opts input { width: auto; margin: 3px 0 0; }
/* v179 📖 notebook like a real book: chapter title pages + page numbers in the Contents */
.nbp-pn { flex: none; font-family: 'Noto Sans', sans-serif; font-weight: 700; font-size: .85em; color: #5A6B3A; min-width: 1.6em; text-align: right; }
.nbp-toc-ch { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.nbp-toc-ch .nbp-pn { font-size: 1em; color: #7A766B; }
.nbp-chpage { text-align: center; padding: 1.2em 0 .8em; }
.nbp-ch-kicker { font-family: 'Noto Sans', sans-serif; font-size: .78em; font-weight: 800; letter-spacing: .22em; color: #7A766B; }
.nbp-ch-title { font-family: 'Lora', Georgia, serif; font-size: 1.65em; line-height: 1.2; margin: .35em 0 .2em; color: #3B4A1F; }
.nbp-ch-rule { width: 40%; margin: .8em auto 0; border-top: 2px solid #C9BFA0; }
.nbp-ch-row { margin: .25em 0; }
/* v180 ✏️ rename a chapter */
.chapter-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.chapter-heading .nb-ch-rename { width: auto; margin: 0; padding: 4px 10px; font-size: 0.78rem; }

/* v183: barcode attendance — late time line, repeat scan flash */
.scan-late-line { margin: 0 0 10px; padding: 7px 10px; border-radius: 8px; background: var(--amber-bg); color: var(--ink); font-size: 0.82rem; line-height: 1.45; }
.scan-late-line .link-btn { font-size: 0.82rem; }
.att-again { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 8px; background: var(--green-bg); color: var(--olive-deep); font-weight: 700; font-size: 0.74rem; }
.att-flash { animation: attFlash 1.4s ease-out; }
@keyframes attFlash { 0%, 30% { background: #FFE98A; } 100% { background: transparent; } }
.scan-late-line .link-btn { margin: 0 0 0 4px; color: var(--olive-deep); font-weight: 700; }
/* v186: two-player game modes "Coming soon" */
.subject-card.mode-soon[disabled] { opacity: 0.55; cursor: not-allowed; filter: grayscale(0.6); }

/* v191 teacher's own best score on game cards */
.tgs-best { margin-top: 6px; font-size: 0.75rem; color: var(--olive-deep); background: color-mix(in srgb, var(--gold) 14%, transparent); border-radius: 999px; padding: 2px 8px; display: inline-block; }
.tgs-card .label { font-size: 0.7rem; }

/* ===== v193 General Science games (gensci-games.js) ===== */
.gs-root { max-width: 640px; margin: 0 auto; }
.gs-intro .gs-lesson { font-weight: 800; color: var(--olive-deep); margin-bottom: 8px; }
.gs-how { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 10px 14px; font-size: 0.92rem; line-height: 1.5; }
.gs-how ul { margin: 6px 0 0; padding-left: 18px; }
.gs-levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.gs-level { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 6px; border: 2px solid var(--rule); border-radius: 14px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; text-align: center; }
.gs-level:hover, .gs-level:focus-visible { border-color: var(--olive-deep); }
.gs-lv-icon { font-size: 1.6rem; }
.gs-level small { font-size: 0.74rem; color: var(--ink-soft); line-height: 1.3; }
.gs-level em { font-style: normal; font-size: 0.72rem; font-weight: 700; color: var(--olive-deep); }
.gs-hud { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 10px; }
.gs-hud .chip { padding: 6px 10px; }
.gs-card { background: var(--card); border: 2px solid var(--rule); border-radius: 16px; padding: 16px; text-align: center; box-shadow: 0 3px 10px rgba(0,0,0,0.06); }
.gs-emoji { font-size: 2.6rem; line-height: 1.1; margin-bottom: 6px; }
.gs-text { font-size: 1.05rem; line-height: 1.45; }
.gs-q { text-align: center; font-weight: 700; margin: 12px 0 8px; }
.gs-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-top: 8px; }
.gs-choices.two { grid-template-columns: 1fr 1fr; }
.gs-btn { min-height: 52px; padding: 10px; border: 2px solid var(--rule); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; font-weight: 700; font-size: 0.95rem; cursor: pointer; line-height: 1.3; }
.gs-btn small { font-weight: 500; font-size: 0.74rem; color: var(--ink-soft); }
.gs-btn:active { transform: scale(0.98); }
.gs-btn:disabled { opacity: 0.45; cursor: default; }
.gs-btn.gs-go { background: var(--olive-deep); color: #fff; border-color: var(--olive-deep); }
.gs-feedback { min-height: 2.6em; margin-top: 10px; padding: 8px 10px; border-radius: 10px; font-size: 0.9rem; line-height: 1.45; background: var(--paper-2, #f4f1e8); }
.gs-feedback:empty { background: none; }
.gs-pen { font-weight: 800; color: #B3452C; }
.gs-note { font-size: 0.78rem; color: var(--ink-soft); text-align: center; margin: 6px 0; }
.gs-result { text-align: center; }
.gs-stars { font-size: 2.4rem; letter-spacing: 4px; }
.gs-result-line { margin: 6px 0 10px; }
.gs-why { text-align: left; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 10px 14px; font-size: 0.88rem; }
.gs-why ol { margin: 6px 0 0; padding-left: 20px; }
.gs-why li { margin-bottom: 10px; }
.gs-why-q { font-weight: 700; }
.gs-why-your { color: #B3452C; }
.gs-why-right { color: #2E6B1F; font-weight: 700; }
.gs-why-exp { color: var(--ink-soft); }
.gs-perfect { text-align: center; font-weight: 700; }
.gs-root sub { font-size: 0.7em; }
/* Type Tank */
.gs-tank-sky { position: relative; height: 190px; border-radius: 14px; background: linear-gradient(#EAF4FB, #F7FBF1); border: 1px solid var(--rule); overflow: hidden; }
.gs-drop { position: absolute; left: 50%; top: 0; transform: translate(-50%, -110%); width: min(92%, 420px); background: #fff; border: 2px solid var(--olive-deep); border-radius: 12px; padding: 8px 10px; text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.gs-drop.falling { animation-name: gsFall; animation-timing-function: linear; animation-fill-mode: forwards; }
@keyframes gsFall { from { transform: translate(-50%, -110%); } to { transform: translate(-50%, 92px); } }
.gs-eq { font-size: 1.1rem; font-weight: 700; }
.gs-eq-w { font-size: 0.78rem; color: var(--ink-soft); margin-top: 3px; }
.gs-tanks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.gs-tank { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 76px; padding: 8px 4px; border: 2px solid var(--rule); border-radius: 12px 12px 18px 18px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; }
.gs-tank span { font-size: 1.4rem; }
.gs-tank b { font-size: 0.72rem; line-height: 1.2; }
.gs-tank small { font-size: 0.62rem; color: var(--ink-soft); }
@media (max-width: 480px) { .gs-tanks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Atom Balancer */
.gs-eqrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 4px 0 8px; }
.gs-term { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; align-items: center; gap: 2px 6px; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 6px 8px; }
.gs-term .gs-pm:first-child { grid-column: 1; grid-row: 1; }
.gs-term .gs-coef { grid-column: 1; grid-row: 2; }
.gs-term .gs-pm:nth-of-type(2) { grid-column: 1; grid-row: 3; }
.gs-term .gs-formula { grid-column: 2; grid-row: 1 / span 3; font-size: 1.25rem; font-weight: 700; }
.gs-pm { width: 40px; height: 34px; border-radius: 10px; border: 2px solid var(--rule); background: var(--paper); font: inherit; font-size: 1.2rem; font-weight: 800; cursor: pointer; color: var(--ink); }
.gs-coef { text-align: center; font-size: 1.3rem; font-weight: 800; color: var(--olive-deep); }
.gs-plus, .gs-arrow { font-size: 1.3rem; font-weight: 800; }
.gs-seesaw { position: relative; height: 54px; margin: 6px auto; max-width: 340px; }
.gs-beam { position: absolute; left: 0; right: 0; top: 10px; height: 14px; border-radius: 7px; background: #C9B98C; display: flex; justify-content: space-between; padding: 0 10px; font-size: 0.66rem; font-weight: 800; line-height: 14px; transition: transform 0.3s; }
.gs-beam.ok { background: #8BC34A; color: #fff; }
.gs-pivot { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); font-size: 1.4rem; color: #8a7a52; }
.gs-atoms { margin: 0 auto 6px; border-collapse: collapse; font-size: 0.9rem; }
.gs-atoms th, .gs-atoms td { border: 1px solid var(--rule); padding: 4px 10px; text-align: center; }
.gs-atoms tr.ok td { background: #EAF6E0; }
/* Energy Loop */
.gs-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; font-size: 0.82rem; margin-bottom: 8px; }
.gs-meters > div { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 6px 8px; }
.gs-bar { display: block; height: 7px; border-radius: 4px; background: #E5E1D4; margin-top: 4px; overflow: hidden; }
.gs-bar i { display: block; height: 100%; background: var(--olive-deep); }
.gs-atp .gs-bar i { background: #E0A100; }
.gs-orgs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 520px) { .gs-orgs { grid-template-columns: 1fr; } }
.gs-org { border: 2px solid var(--rule); border-radius: 14px; padding: 8px; background: var(--card); }
.gs-org.chloro { border-color: #7CB342; }
.gs-org.mito { border-color: #E0A100; }
.gs-org-title { font-weight: 800; }
.gs-org-sub { font-size: 0.74rem; color: var(--ink-soft); }
.gs-slots { display: flex; gap: 4px; margin: 6px 0; flex-wrap: wrap; }
.gs-slot { flex: 1; min-width: 56px; text-align: center; padding: 6px 2px; border: 2px dashed var(--rule); border-radius: 8px; font-size: 0.78rem; font-weight: 700; color: var(--ink-soft); }
.gs-slot.on { border-style: solid; border-color: var(--olive-deep); color: var(--ink); background: #EAF6E0; }
.gs-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.gs-chip { flex: 1 1 30%; min-height: 38px; border: 1px solid var(--rule); border-radius: 18px; background: var(--paper); font: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; color: var(--ink); }
.gs-org .gs-btn { width: 100%; min-height: 44px; }
/* Build or Break */
.gs-swipe { touch-action: pan-y; }
.gs-swipe-card { cursor: grab; user-select: none; transition: transform 0.15s; }
.gs-hint { font-size: 0.74rem; color: var(--ink-soft); margin-top: 6px; }
/* v194 Unit 2 games */
.gs-task { text-align: left; font-size: 0.95rem; }
.gs-pour { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; margin: 16px 0 10px; }
.gs-beaker { position: relative; width: 110px; height: 130px; border: 3px solid #8aa; border-top: 0; border-radius: 0 0 18px 18px; background: rgba(230,240,245,0.6); overflow: hidden; }
.gs-water { position: absolute; left: 0; right: 0; bottom: 0; height: 80%; background: rgba(120,180,230, calc(0.25 + var(--warm) * 0.15)); }
.gs-water i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.15); }
.gs-pile { position: absolute; left: 10%; right: 10%; bottom: 0; background: #f4f0e2; border: 1px solid #c9bf9b; border-radius: 40% 40% 4px 4px; }
.gs-pour-read { font-size: 0.86rem; line-height: 1.6; }
.gs-state { font-weight: 800; color: var(--olive-deep); }
.gs-slider { display: block; margin: 8px 0; font-weight: 600; font-size: 0.9rem; }
.gs-slider input { width: 100%; height: 34px; }
.gs-label { border: 2px dashed #b9a76a; border-radius: 12px; padding: 10px; background: #fffdf5; }
.gs-label-brand { font-weight: 800; font-size: 1.1rem; }
.gs-label-small { font-size: 0.72rem; font-weight: 700; color: var(--ink-soft); margin: 6px 0 4px; }
.gs-ings { display: flex; flex-wrap: wrap; gap: 6px; }
.gs-ing { min-height: 42px; padding: 6px 10px; border: 2px solid var(--rule); border-radius: 10px; background: #fff; font: inherit; font-size: 0.88rem; cursor: pointer; color: var(--ink); }
.gs-ing.ok { border-color: #2E6B1F; background: #EAF6E0; }
.gs-ing.no { border-color: #B3452C; background: #FBE9E5; }
.gs-ing:disabled { cursor: default; }
.gs-haz { letter-spacing: 1px; color: #B3452C; }
.gs-round-name { text-align: center; font-weight: 800; margin-bottom: 6px; }
.gs-river { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: 0.8rem; padding: 8px; border-radius: 12px; background: linear-gradient(#cfe8f5, #9fcbe3); margin-bottom: 8px; }
.gs-river .gs-fish { grid-column: 1 / -1; text-align: center; font-size: 1.3rem; min-height: 1.6rem; }
.gs-bar.algae i { background: #6B8E23; } .gs-bar.oxy i { background: #3A87C8; } .gs-bar.fish i { background: #E08A2E; }
.gs-chain { text-align: center; font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; }
.gs-pots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 10px 0; }
.gs-pot { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); font-size: 0.78rem; }
.gs-pot-ico { font-size: 1.6rem; }
.gs-pot select { width: 100%; font-size: 0.8rem; padding: 4px 2px; }
.gs-salt-table td, .gs-salt-table th { padding: 4px 6px; }
.gs-graph { display: block; width: 100%; max-width: 420px; margin: 6px auto; background: #fff; border: 1px solid var(--rule); border-radius: 10px; }

/* v197 Spot the Change scenes */
.gs-spot-head { text-align: center; font-size: 1.02rem; margin-bottom: 8px; padding: 8px 10px; border-radius: 12px; background: #FFF6D8; border: 1px solid #E8C96A; }
.gs-scene { position: relative; height: min(66vh, 500px); min-height: 400px; border-radius: 16px; overflow: hidden; border: 2px solid var(--rule); }
.gs-scene.kitchen { background: #EADBC3 url("assets/spot-kitchen.webp") center / cover no-repeat; } /* v212: the teacher's pictures */
.gs-scene.lab { background: #DDE3E8 url("assets/spot-lab.webp") center / cover no-repeat; }
.gs-scene-name { position: absolute; left: 8px; top: 6px; font-size: 0.78rem; font-weight: 800; background: rgba(255,255,255,0.85); padding: 2px 8px; border-radius: 10px; z-index: 1; }
.gs-obj { position: absolute; translate: -50% -100%; /* kept separate from tap animations */ width: min(22.5%, 120px); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border: 2px solid transparent; border-radius: 14px; background: rgba(255,255,255,0.72); cursor: pointer; font: inherit; color: var(--ink); }
.gs-obj:active { transform: scale(0.96); }
.gs-obj-e { font-size: 1.7rem; line-height: 1.1; white-space: nowrap; }
.gs-obj-t { font-size: 0.68rem; font-weight: 700; line-height: 1.2; text-align: center; }
.gs-obj-hide { display: none; }
.gs-obj-tag { font-size: 0.62rem; font-weight: 800; border-radius: 8px; padding: 1px 5px; background: #fff; }
.gs-obj.ok { border-color: #2E6B1F; background: #E3F4D6; }
.gs-obj.no { border-color: #9AA3AA; background: #EEF0F2; opacity: 0.85; }
.gs-obj.missed { border-color: #E0A100; background: #FFF1C4; }
.gs-obj:disabled { cursor: default; }
@media (max-width: 420px) { .gs-obj-e { font-size: 1.45rem; } .gs-obj-t { font-size: 0.62rem; } }

/* v198: announcement message grows with its text */
#headsup-message { width: 100%; min-height: 4.6em; resize: vertical; overflow: hidden; line-height: 1.5; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 10px; font: inherit; background: var(--paper); color: var(--ink); box-sizing: border-box; }
.ann-msg { white-space: pre-wrap; overflow-wrap: anywhere; } /* v198: line breaks in announcements show for teachers, students and parents */

/* v238: the on-screen ‹ Back now shows on ALL phones (v199 hid it on Android). */

/* v199: Master List — number of students on top */
.master-counts { margin: 0 0 14px; }
.master-count-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.mct { background: var(--paper, #fff); border: 1.5px solid var(--rule, #d9d2bf); border-radius: 12px; padding: 10px; text-align: center; }
.mct b { display: block; font-family: 'Lora', serif; font-size: 1.7rem; color: var(--olive-deep, #3d4a1f); }
.mct span { font-size: 0.8rem; color: var(--ink-soft, #666); }
.mct.male b { color: #1A66D9; } .mct.female b { color: #C2367A; }
.master-count-table td, .master-count-table th { text-align: center; }
.master-count-table td:first-child, .master-count-table th:first-child { text-align: left; }
.master-count-table tr.on td { background: var(--amber-bg, #fff6d8); font-weight: 700; }
/* v658 one small card per section, all in one line across the page (wraps only on narrow screens) */
.msec-cards { display: grid; grid-template-columns: repeat(var(--n, 11), minmax(0, 1fr)); gap: 6px; }
.msec-card { all: unset; box-sizing: border-box; cursor: pointer; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 3px; text-align: center;
  background: var(--paper, #fff); border: 1.5px solid var(--rule, #d9d2bf); border-radius: 10px; font-size: clamp(.62rem, .78vw, .8rem); line-height: 1.25; color: var(--ink-soft, #555); }
.msec-card:hover { border-color: var(--olive, #6b7a35); }
.msec-card:focus-visible { outline: 2px solid var(--olive, #6b7a35); outline-offset: 1px; }
.msec-card.on { background: var(--amber-bg, #fff6d8); border-color: #d9a400; }
.msec-card b { font-size: 1.12em; color: var(--olive-deep, #3d4a1f); white-space: nowrap; }
.msec-mf { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 6px; }
.msec-mf em { font-style: normal; white-space: nowrap; } .msec-mf .m { color: #1A66D9; } .msec-mf .f { color: #C2367A; }
.msec-t { font-weight: 700; color: var(--ink, #333); white-space: nowrap; }
@media (max-width: 900px) { .msec-cards { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); } .msec-card { font-size: .74rem; } }

/* v199 🧮 Calculator */
.calc-fab { position: fixed; right: 14px; bottom: 86px; z-index: 900; width: 54px; height: 54px; border-radius: 50%; border: 2px solid #fff; background: #3D4A1F; color: #fff; font-size: 1.6rem; line-height: 1; box-shadow: 0 6px 18px rgba(0,0,0,0.3); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.calc-fab.on { background: #6B7F2E; }
.calc-fab { cursor: grab; user-select: none; -webkit-user-select: none; }
.calc-fab.dragging { cursor: grabbing; transform: scale(1.08); box-shadow: 0 10px 26px rgba(0,0,0,0.4); }
.calc-fab:active { transform: scale(0.94); }
.calc-panel { position: fixed; right: 14px; bottom: 150px; z-index: 950; width: 340px; max-width: calc(100vw - 20px); max-height: calc(100vh - 170px); overflow-y: auto; background: #1E2416; color: #F2F5EA; border-radius: 18px; box-shadow: 0 14px 40px rgba(0,0,0,0.45); padding: 10px 10px 12px; font-family: inherit; }
@media (max-width: 600px) { .calc-panel { left: 8px; right: 8px; width: auto; bottom: 148px; max-height: calc(100vh - 160px); } }
.calc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.calc-tabs { display: flex; gap: 4px; flex: 1; background: rgba(255,255,255,0.08); border-radius: 10px; padding: 3px; }
.calc-tabs button, .calc-seg button { flex: 1; border: 0; background: transparent; color: #DDE5CC; padding: 7px 6px; border-radius: 8px; font-weight: 700; font-size: 0.86rem; cursor: pointer; }
.calc-tabs button.on, .calc-seg button.on { background: #F2F5EA; color: #1E2416; }
.calc-x { border: 0; background: rgba(255,255,255,0.12); color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 1rem; cursor: pointer; }
.calc-screen { background: #E8EED8; color: #1E2416; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; text-align: right; font-family: 'Courier New', ui-monospace, monospace; }
.calc-expr { font-size: 1.05rem; min-height: 1.4em; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.calc-out { font-size: 1.7rem; font-weight: 700; min-height: 1.3em; word-break: break-all; }
.calc-out.prev { color: #7A8566; font-size: 1.2rem; }
.calc-out.err { color: #B3261E; }
.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.calc-k { border: 0; border-radius: 10px; padding: 11px 0; font-size: 1.12rem; font-weight: 700; background: #3A4530; color: #fff; cursor: pointer; font-family: inherit; }
.calc-k:active { filter: brightness(1.25); }
.calc-k.k-fn { background: #2B3322; color: #CFE3A6; font-size: 0.98rem; }
.calc-k.k-op { background: #6B7F2E; }
.calc-k.k-red { background: #8C2F24; }
.calc-k.k-eq { background: #E0A526; color: #1E2416; }
.calc-seg { display: flex; gap: 4px; background: rgba(255,255,255,0.08); border-radius: 10px; padding: 3px; margin-bottom: 8px; }
.calc-lbl { display: block; font-size: 0.8rem; color: #CBD5B5; margin: 2px 0 4px; }
.calc-data { width: 100%; box-sizing: border-box; border-radius: 10px; border: 0; padding: 8px; font-size: 1rem; font-family: inherit; background: #F2F5EA; color: #1E2416; resize: vertical; }
.calc-freq-box { max-height: 210px; overflow-y: auto; border-radius: 10px; background: #F2F5EA; }
.calc-freq { width: 100%; border-collapse: collapse; color: #1E2416; font-size: 0.85rem; }
.calc-freq th { position: sticky; top: 0; background: #DDE5CC; padding: 4px; text-align: left; }
.calc-freq td { padding: 2px 4px; }
.calc-freq td:first-child { color: #7A8566; width: 22px; }
.calc-freq input { width: 100%; box-sizing: border-box; border: 1px solid #C9D1B5; border-radius: 6px; padding: 5px 6px; font-size: 0.95rem; margin: 0; background: #fff; color: #1E2416; }
.calc-del { border: 0; background: transparent; color: #8C2F24; font-size: 0.9rem; cursor: pointer; }
.calc-row-btns { display: flex; gap: 6px; margin: 6px 0 8px; }
.calc-mini { border: 1px solid rgba(255,255,255,0.3); background: transparent; color: #F2F5EA; border-radius: 8px; padding: 5px 10px; font-size: 0.82rem; cursor: pointer; }
.calc-res { width: 100%; border-collapse: collapse; background: #F2F5EA; color: #1E2416; border-radius: 10px; overflow: hidden; font-size: 0.86rem; }
.calc-res th { text-align: left; font-weight: 600; padding: 5px 8px; border-bottom: 1px solid #DDE5CC; }
.calc-res td { padding: 5px 8px; border-bottom: 1px solid #DDE5CC; text-align: right; font-weight: 700; }
.calc-res td.calc-sym { text-align: center; font-family: 'Times New Roman', serif; font-style: italic; color: #4A5A28; width: 30px; font-weight: 700; }
.calc-na { color: #7A8566; font-weight: 400; font-size: 0.78rem; }
.calc-empty { color: #CBD5B5; font-size: 0.85rem; padding: 6px 2px; }
.calc-warn { background: #F6E7A8; color: #5A4500; border-radius: 8px; padding: 5px 8px; font-size: 0.8rem; margin-bottom: 6px; }
/* the switch on each Performance Task / Assignment / Mastery card */
.calc-sw { display: block; width: 100%; margin-top: 8px; border: 1.5px solid #6B7F2E; background: #F1F5E6; color: #3D4A1F; border-radius: 999px; padding: 5px 8px; font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.calc-sw.off { border-color: #B3452C; background: #FBE9E5; color: #8C2F24; }
.calc-setup-list { max-height: 50vh; overflow-y: auto; }
@media print { .calc-fab, .calc-panel { display: none !important; } }

/* v199: parent To Do List grouped by subject */
.todo-subj { border: 1.5px solid var(--rule, #d9d2bf); border-radius: 12px; margin: 0 0 10px; background: var(--paper, #fff); overflow: hidden; }
.todo-subj > summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 700; cursor: pointer; list-style: none; background: var(--amber-bg, #fff6d8); }
.todo-subj > summary::-webkit-details-marker { display: none; }
.todo-subj > summary::after { content: '▾'; margin-left: 6px; transition: transform .2s; }
.todo-subj:not([open]) > summary::after { transform: rotate(-90deg); }
.todo-subj > summary > span:first-child { flex: 1; }
.todo-subj-n { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft, #666); }
.todo-subj-over { color: #B3452C; }
.todo-subj .todo-scroll { margin: 0; }
/* v199: announcement tables (rows typed with |) */
.ann-table-wrap { overflow-x: auto; margin: 6px 0; }
.ann-table { border-collapse: collapse; font-size: 0.9rem; white-space: normal; min-width: 50%; }
.ann-table th, .ann-table td { border: 1px solid var(--rule, #cfc7b0); padding: 5px 9px; text-align: left; vertical-align: top; }
.ann-table th { background: var(--amber-bg, #fff6d8); font-weight: 700; }
.ann-text:empty { display: none; }

/* v202 👀 Numeracy Camp — View as a Student */
.campview-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; max-width: 420px; margin: 0 auto 10px; padding: 8px 12px; border-radius: 12px; background: #E8F3FF; border: 1.5px solid #9CC3EA; font-size: 0.85rem; }
.campview-bar > span { flex: 1 1 100%; }
.campview-bar select { width: auto; margin: 0 0 0 4px; padding: 3px 6px; }

/* v203: Numeracy Camp night sky — twinkling stars */
.nc-star { animation: nc-twinkle 2.6s ease-in-out infinite alternate; }
@keyframes nc-twinkle { from { opacity: .25; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .nc-star { animation: none; } }

/* v204 Numeracy Camp: flowing river, fish, jumping fish, bonfire */
.nc-ripple { animation: nc-flowdn linear infinite; }
@keyframes nc-flowdn { to { stroke-dashoffset: -26; } }
.nc-glint { animation-name: nc-glint; }
@keyframes nc-glint { to { stroke-dashoffset: -40; } }
.nc-fish { animation: nc-wiggle .45s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes nc-wiggle { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
.nc-jumper { opacity: 0; transform-box: view-box; animation: nc-jump 18s linear infinite; }
@keyframes nc-jump {
  0% { opacity: 0; transform: translate(-7px, 2px) rotate(-55deg); }
  0.5% { opacity: 1; }
  2.5% { transform: translate(0, -11px) rotate(0deg); }
  4.5% { opacity: 1; transform: translate(8px, 2px) rotate(55deg); }
  5% , 100% { opacity: 0; transform: translate(8px, 2px) rotate(55deg); }
}
.nc-splash { opacity: 0; transform-box: fill-box; transform-origin: center; animation: nc-splash 18s ease-out infinite; }
.nc-splash2 { animation-name: nc-splash2; }
@keyframes nc-splash { 0% { opacity: .9; transform: scale(.3); } 3% { opacity: 0; transform: scale(1.6); } 100% { opacity: 0; } }
@keyframes nc-splash2 { 0%, 4.4% { opacity: 0; transform: scale(.3); } 4.6% { opacity: .9; transform: scale(.3); } 7.5% { opacity: 0; transform: scale(1.6); } 100% { opacity: 0; } }
.nc-flame { transform-box: fill-box; transform-origin: 50% 100%; animation: nc-flick .35s ease-in-out infinite alternate; }
.nc-f2 { animation-duration: .27s; animation-delay: -.1s; }
.nc-f3 { animation-duration: .22s; animation-delay: -.05s; }
@keyframes nc-flick { from { transform: scale(.88, 1.08) skewX(-4deg); } to { transform: scale(1.06, .9) skewX(5deg); } }
.nc-fireglow { transform-box: fill-box; transform-origin: center; animation: nc-glow 1.1s ease-in-out infinite alternate; }
@keyframes nc-glow { from { opacity: .55; transform: scale(.92); } to { opacity: 1; transform: scale(1.1); } }
.nc-spark { opacity: 0; animation: nc-spark 2.1s ease-out infinite; }
@keyframes nc-spark { 0% { opacity: 1; transform: translate(0, 0); } 100% { opacity: 0; transform: translate(3px, -16px); } }
@media (prefers-reduced-motion: reduce) { .nc-ripple, .nc-fish, .nc-jumper, .nc-splash, .nc-flame, .nc-fireglow, .nc-spark { animation: none; } }

/* v205 🧮 KK-82MS-style calculator (floating panel, 🎒 Backpack, teacher Notebook) */
.kk-body { background: linear-gradient(180deg, #343B58, #262C44); border-radius: 18px; padding: 10px 10px 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 4px 14px rgba(0,0,0,.35); color: #fff; user-select: none; -webkit-user-select: none; }
.kk-brand { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px 6px; }
.kk-brand b { color: #F2A640; font-weight: 900; letter-spacing: .5px; font-size: .95rem; }
.kk-brand span { color: #E8ECF5; font-weight: 800; font-size: .78rem; }
.kk-screen { background: linear-gradient(180deg, #C7D2B8, #B5C1A4); color: #1C2418; border-radius: 8px; border: 3px solid #1D2135; padding: 3px 8px 5px; min-height: 76px; font-family: 'Courier New', ui-monospace, monospace; margin-bottom: 10px; }
.kk-ind { display: flex; gap: 6px; min-height: 12px; font-size: .62rem; font-weight: 700; font-family: Arial, sans-serif; }
.kk-ind i { font-style: normal; }
.kk-l1 { font-size: 1.05rem; white-space: nowrap; overflow-x: auto; scrollbar-width: none; min-height: 1.35em; position: relative; }
.kk-l1::-webkit-scrollbar { display: none; }
.kk-cur { display: inline-block; width: 2px; height: 1.05em; background: #1C2418; vertical-align: -2px; text-decoration: none; animation: kkblink 1s steps(1) infinite; }
@keyframes kkblink { 50% { opacity: 0; } }
.kk-l2 { text-align: right; font-size: 1.75rem; font-weight: 700; min-height: 1.2em; line-height: 1.2; white-space: nowrap; overflow: hidden; }
.kk-l2 .kk-lbl { float: left; font-size: 1rem; font-weight: 700; margin-top: .5em; }
.kk-x10 { font-size: .85rem; margin-left: 4px; } .kk-x10 sup { font-size: .8rem; }
.kk-err { font-size: 1.15rem; }
.kk-menuh { font-size: .8rem; font-weight: 700; } .kk-menuh small { font-weight: 400; }
.kk-menu { display: flex; justify-content: space-around; gap: 6px; padding-top: 4px; }
.kk-menu span { display: flex; flex-direction: column; align-items: center; font-size: 1rem; }
.kk-menu b { font-weight: 700; } .kk-menu em { font-style: normal; font-size: .75rem; }
.kk-menu1 { text-align: left; font-size: 1.2rem; }
.kk-top { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px 5px; margin-bottom: 8px; }
.kk-bot { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px 7px; }
.kk-cell { display: flex; flex-direction: column; align-items: stretch; }
.kk-lab { display: flex; justify-content: space-between; font-size: .56rem; font-weight: 700; min-height: 11px; line-height: 11px; padding: 0 1px; white-space: nowrap; overflow: hidden; }
.kk-sh { color: #F2A640; } .kk-al { color: #FF6B6B; margin-left: auto; }
.kk { border: 0; border-radius: 7px; background: linear-gradient(180deg, #2A2F45, #171A28); color: #fff; font-family: Arial, sans-serif; font-weight: 700; font-size: .78rem; padding: 7px 0; cursor: pointer; box-shadow: 0 2px 0 #0B0D16, inset 0 1px 0 rgba(255,255,255,.14); line-height: 1; touch-action: manipulation; }
.kk:active, .kk.on { transform: translateY(1px); box-shadow: 0 1px 0 #0B0D16; filter: brightness(1.25); }
.kk sup, .kk sub { font-size: .6em; }
.kk.k-pill { border-radius: 999px; background: linear-gradient(180deg, #F4F5F8, #C9CDD6); color: #262C44; font-size: .58rem; padding: 6px 0; box-shadow: 0 2px 0 #7F8596; }
.kk.k-shift.on { background: #F2A640; color: #fff; } .kk.k-alpha.on { background: #FF6B6B; color: #fff; }
.kk.k-num { background: linear-gradient(180deg, #EEF0F4, #C3C8D2); color: #2B3046; font-size: 1.12rem; padding: 9px 0; box-shadow: 0 2px 0 #7A8091, inset 0 1px 0 #fff; }
.kk.k-red { background: linear-gradient(180deg, #E5534B, #B7302A); color: #fff; font-size: .95rem; padding: 9px 0; box-shadow: 0 2px 0 #6E1A16; }
.kk-pad { display: flex; align-items: center; justify-content: center; }
.kk-replay { position: relative; width: 86px; height: 58px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #F7F8FB, #C3C8D3); box-shadow: 0 2px 0 #7A8091; }
.kk-replay > span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .5rem; font-weight: 800; color: #6B7184; pointer-events: none; }
.kk-ar { position: absolute; border: 0; background: transparent; color: #4A5068; font-size: .62rem; padding: 4px 8px; cursor: pointer; }
.kk-ar.up { top: 0; left: 50%; transform: translateX(-50%); } .kk-ar.down { bottom: 0; left: 50%; transform: translateX(-50%); }
.kk-ar.left { left: 0; top: 50%; transform: translateY(-50%); } .kk-ar.right { right: 0; top: 50%; transform: translateY(-50%); }
.kk-ar:active { color: #000; }
.calc-panel .kk-body { margin: 0 -2px; }
.calc-panel { width: 360px; }
@media (max-width: 600px) { .calc-panel { left: 6px; right: 6px; width: auto; } }
/* the calculator on a page (🎒 Backpack, teacher Notebook) */
.calc-inline { max-width: 380px; margin: 0 auto; background: #1E2416; color: #F2F5EA; border-radius: 18px; padding: 10px; }
.calc-inline .kk { font-size: .82rem; }

/* v205: float switch + teacher Notebook calculator beside the manual */
.calc-float-sw { display: flex; flex-direction: column; gap: 4px; align-self: stretch; max-width: 760px; margin: 0 auto 12px; padding: 10px 12px; border-radius: 12px; background: #EEF5E4; border: 1.5px solid #B9CF9A; font-size: .9rem; }
.calc-float-sw label { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 0; cursor: pointer; }
.calc-float-sw input { width: auto; margin: 0; }
.calc-float-sw.off { background: #F3F1EA; border-color: #D9D2BF; color: var(--ink-soft, #666); }
.nbc-tabs { display: none; gap: 8px; margin: 0 0 12px; }
.nbc-grid { display: grid; grid-template-columns: minmax(330px, 390px) 1fr; gap: 18px; align-items: start; }
.nbc-calc { position: sticky; top: 8px; }
@media (max-width: 760px) {
  .nbc-tabs { display: flex; }
  .nbc-grid { display: block; }
  .nbc-grid[data-show="calc"] .nbc-manual, .nbc-grid[data-show="manual"] .nbc-calc { display: none; }
}
.sci-calc-fullscreen #bp-calc { width: 100%; max-width: 400px; }

/* v206 Life & Career Skills Lessons 3–6 games */
.lc-take { display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; margin-bottom: 8px; }
.lc-take .lc-bar { flex: 1; }
.lc-bar { height: 12px; border-radius: 999px; background: #E6E1D3; overflow: hidden; }
.lc-bar i { display: block; height: 100%; background: linear-gradient(90deg, #6FBF4A, #2E8B3A); border-radius: 999px; transition: width .4s; }
.lc-bar.low i { background: linear-gradient(90deg, #F2A640, #D9534F); }
.lc-slip { background: #FFFDF6; border: 2px dashed #B9A779; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; font-family: 'Courier New', ui-monospace, monospace; }
.lc-slip-h { font-weight: 800; text-align: center; border-bottom: 1px solid #D8CBA5; padding-bottom: 6px; margin-bottom: 2px; font-size: .9rem; }
.lc-line { text-align: left; border: 2px solid transparent; background: #fff; border-radius: 8px; padding: 8px 10px; font: inherit; font-size: .9rem; cursor: pointer; color: var(--ink); }
.lc-line.on { border-color: #D9534F; background: #FDECEA; }
.lc-line.ok { border-color: #2E8B3A; background: #E7F5E2; }
.lc-line.miss { border-color: #E0A526; background: #FFF6D8; }
.lc-line.no { border-color: #D9534F; background: #FDECEA; text-decoration: line-through; }
.lc-meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.lc-meter span { display: block; font-size: .75rem; font-weight: 700; margin-bottom: 3px; }
.lc-col { grid-template-columns: 1fr !important; }
.gs-btn.ok { border-color: #2E8B3A; background: #E7F5E2; }
.gs-btn.no { border-color: #D9534F; background: #FDECEA; }
.gs-tank.ok { border-color: #2E8B3A; background: #E7F5E2; }
.gs-tank.no { border-color: #D9534F; background: #FDECEA; }
.lc-bins .gs-tank { min-height: 58px; }
.lc-benefit .gs-text { font-size: 1.15rem; }
.lc-ladder-wrap { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: start; }
.lc-ladder { display: flex; flex-direction: column; border-left: 6px solid #8B5A2B; border-right: 6px solid #8B5A2B; border-radius: 4px; background: #F7F1E3; }
.lc-rung { position: relative; height: 30px; border-bottom: 5px solid #A0703D; font-size: .66rem; font-weight: 800; color: #6B4423; display: flex; align-items: center; justify-content: center; }
.lc-rung.goal { background: #FFF2C2; }
.lc-rung.me { background: #E7F5E2; }
.lc-climber { position: absolute; right: 4px; font-size: 1.2rem; }
@media (max-width: 480px) { .lc-ladder-wrap { grid-template-columns: 80px 1fr; } .lc-meters { gap: 5px; } }

/* v207 📊 Stat → x,y (Paired) */
.calc-seg button { font-size: .8rem; padding: 7px 4px; }
.calc-paste { margin: 0 0 8px; display: flex; flex-direction: column; gap: 6px; }
.calc-paste textarea { width: 100%; box-sizing: border-box; border-radius: 10px; border: 0; padding: 8px; font-size: .9rem; background: #F2F5EA; color: #1E2416; font-family: ui-monospace, monospace; }
.calc-pair-key { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 6px; }
.calc-pair-key div { background: #F2F5EA; color: #1E2416; border-radius: 10px; padding: 6px; text-align: center; }
.calc-pair-key span { display: block; font-size: .75rem; font-style: italic; font-family: 'Times New Roman', serif; }
.calc-pair-key b { font-size: 1.15rem; }
.calc-words, .calc-line-eq { background: #2B3322; border-radius: 8px; padding: 6px 8px; font-size: .86rem; margin-bottom: 6px; }
.calc-scatter { width: 100%; height: auto; background: #F2F5EA; border-radius: 10px; margin-bottom: 8px; display: block; }
.calc-res td small { font-weight: 400; font-size: .72rem; color: #556; }
.calc-predict { background: #F2F5EA; color: #1E2416; border-radius: 10px; padding: 8px; margin: 8px 0; font-size: .86rem; line-height: 2; }
.calc-predict .calc-lbl { color: #4A5A28; margin: 0; line-height: 1.3; font-weight: 700; }
.calc-predict input { width: 76px; padding: 3px 6px; margin: 0 4px 0 0; border-radius: 6px; border: 1px solid #C9D1B5; font-size: .9rem; background: #fff; color: #1E2416; }
.calc-pv { font-weight: 700; font-family: ui-monospace, monospace; font-size: .8rem; }
.calc-solbtn { width: 100%; margin-bottom: 6px; }
.calc-sol { background: #F2F5EA; color: #1E2416; border-radius: 10px; padding: 8px; font-size: .8rem; overflow-x: auto; }
.calc-sol .calc-lbl { color: #4A5A28; font-weight: 700; }
.calc-soltab { border-collapse: collapse; width: 100%; margin: 4px 0 8px; font-size: .78rem; }
.calc-soltab th, .calc-soltab td { border: 1px solid #C9D1B5; padding: 3px 5px; text-align: center; white-space: nowrap; }
.calc-soltab thead th { background: #DDE5CC; }
.calc-soltab tfoot th { background: #FFF6D8; font-size: .72rem; }
.calc-step { margin: 6px 0 10px; line-height: 1.55; overflow-wrap: anywhere; }

/* v208 🪜 Scaffolded test (Recovery Plan) */
.sc-dots { display: flex; gap: 4px; margin: 8px 0 12px; }
.sc-dots span { flex: 1; height: 8px; border-radius: 4px; background: #E6E1D3; }
.sc-dots span.cur { background: #9CC3EA; } .sc-dots span.ok { background: #2E8B3A; } .sc-dots span.mid { background: #E0A526; } .sc-dots span.no { background: #D9534F; }
.sc-card { background: var(--card); border: 2px solid var(--rule); border-radius: 14px; padding: 14px; }
.sc-level { font-size: .78rem; font-weight: 700; color: var(--olive-deep); margin-bottom: 6px; }
.sc-q { font-size: 1.05rem; line-height: 1.5; margin-bottom: 10px; }
.sc-steps { margin: 0 0 8px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.sc-steps li { line-height: 1.5; }
.sc-steps li small { display: block; color: var(--ink-soft); font-size: .78rem; }
.sc-steps li.given { color: var(--olive-deep); }
.sc-steps li.ok .sc-in { border-color: #2E8B3A; background: #E7F5E2; }
.sc-steps li.shown .sc-in { border-color: #E0A526; background: #FFF6D8; }
.sc-st { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; font-weight: 700; }
.sc-in { width: 110px; padding: 6px 8px; margin: 0 4px; border: 2px solid var(--rule); border-radius: 8px; font-size: 1rem; }
.sc-row { display: flex; gap: 8px; align-items: center; }
.sc-row .sc-in { width: 160px; margin: 0; }
.sc-ask { font-weight: 700; margin: 6px 0 4px; }
.sc-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-try { font-size: .85rem; margin-top: 4px; color: #8a5a00; }
.sc-fb { margin-top: 10px; line-height: 1.5; }
.sc-fb .sc-next { margin-top: 8px; }
.sc-review { text-align: left; padding-left: 22px; font-size: .88rem; }
.sc-review li { margin-bottom: 8px; padding: 4px 6px; border-radius: 8px; }
.sc-review li.ok { background: #EEF7EA; } .sc-review li.mid { background: #FFF6D8; } .sc-review li.no { background: #FDECEA; }
.sc-review small { display: block; color: var(--ink-soft); }
.sc-att { border: 1px solid var(--rule); border-radius: 10px; padding: 6px 10px; margin-bottom: 8px; }

/* v209 Recovery Plan: tick several Mastery games; competencies by chapter and lesson */
.rcvf-mq-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 6px; }
.rcvf-mq-tools input[type="search"] { flex: 1 1 180px; margin: 0; }
.rcvf-mq-list { max-height: 34vh; overflow-y: auto; border: 1px solid var(--rule); border-radius: 10px; padding: 6px 10px; background: var(--paper); }
.rcvf-mq-gh { font-size: .76rem; font-weight: 800; color: var(--olive-deep); margin: 8px 0 2px; text-transform: uppercase; letter-spacing: .3px; }
.rcvf-mq-list .rcv-check { display: flex; gap: 8px; align-items: center; padding: 3px 0; }
.rcv-lowtag { color: #B3452C; font-weight: 700; }
.rcv-play-many { display: flex; flex-direction: column; gap: 4px; }
.rcv-lowonly { margin: 4px 0 8px; font-size: .85rem; }
.rcv-chap { border: 1px solid var(--rule); border-radius: 12px; padding: 6px 10px; margin: 0 0 8px; background: var(--paper); }
.rcv-chap > summary { display: flex; justify-content: space-between; gap: 8px; cursor: pointer; font-weight: 700; padding: 4px 0; }
.rcv-chap-meta { font-weight: 600; font-size: .85rem; white-space: nowrap; }
.rcv-chap-meta b.low { color: #B3452C; } .rcv-chap-meta em { color: #B3452C; font-style: normal; }
.rcv-lesson { font-size: .82rem; font-weight: 800; color: var(--olive-deep); margin: 8px 0 4px; }

/* ---------- v210 Notebook: 🎯 competencies · 👁 page colors · 🔊 reading mark · 💬 Ask · 🔗 merged cells · 💬 Questions ---------- */
.nbp-comps { margin: .1em 0 .7em; padding: .45em .7em .5em; border: 1px solid rgba(85,107,47,.35); border-left: 4px solid var(--olive-deep, #556B2F); border-radius: 8px; background: rgba(85,107,47,.07); font-size: .8em; line-height: 1.4; }
.nbp-comps-h { font-weight: 800; color: #3E5222; margin-bottom: .2em; }
.nbp-comps ul { margin: 0; padding-left: 1.1em; }
.nbp-comps li { margin: .12em 0; }
.nbp-comps li b { color: #556B2F; font-weight: 700; margin-right: .2em; white-space: nowrap; }
.nb-comps-field { margin-top: 12px; border: 1px solid var(--rule); border-radius: 12px; padding: 8px 12px; background: var(--card); }
.nb-comps-field summary { cursor: pointer; font-size: .9rem; font-weight: 600; }
.nb-comps-sugg { display: inline-block; font-size: .72rem; font-weight: 600; padding: 1px 7px; border-radius: 10px; background: #FFF3CD; color: #7A5B00; }
.nb-comps-list { display: flex; flex-direction: column; gap: 4px; max-height: 340px; overflow-y: auto; margin-top: 6px; }
.nb-comp-tick { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 6px 8px; border-radius: 8px; font-size: .82rem; color: var(--ink); cursor: pointer; }
.nb-comp-tick:hover { background: rgba(0,0,0,.04); }
.nb-comp-tick input { margin-top: 3px; flex: none; }
.nb-comp-tick b { color: var(--olive-deep, #556B2F); }
.nb-comps-chip { display: inline-block; margin-left: 6px; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: #E2F0D5; color: #33502A; }
.nb-comps-chip.sugg { background: #FFF3CD; color: #7A5B00; }
.nb-comps-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.nb-comps-all { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
.nb-comps-lesson { border: 1px solid var(--rule); border-radius: 10px; padding: 6px 10px; }
.nb-comps-lesson summary { cursor: pointer; display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; font-weight: 600; }
.nb-comps-n { font-weight: 400; font-size: .76rem; color: var(--ink-soft); white-space: nowrap; }

.nbp-colors { flex-direction: column; gap: 6px; }
.nbp-colrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nbp-colhead { flex-basis: 100%; font-size: .74rem; font-weight: 700; color: var(--ink-soft); }
.nbp-sheet.nbp-dark { color: #E6E3DA; border-color: #1E2024; box-shadow: 3px 4px 0 #17181B, 0 14px 30px rgba(0,0,0,.3); }
.nbp-dark .nbp-head { border-bottom-color: rgba(255,255,255,.12); }
.nbp-dark .nbp-logo { filter: brightness(0) invert(.88); }
.nbp-dark .nbp-num, .nbp-dark .nbp-tag, .nbp-dark .nbp-hint, .nbp-dark .nbp-toc-ch { color: #B5B1A6; }
.nbp-dark .nbp-sec { color: #CFE3B4; }
.nbp-dark .nbp-ex { color: #D6D2C8; }
.nbp-dark .nbp-table th, .nbp-dark .nbp-table td { border-color: #55585F; }
.nbp-dark .nbp-table th { background: #3F5428; }
.nbp-dark .nbp-toc:hover { background: rgba(255,255,255,.07); }
.nbp-dark .nbp-comps { background: rgba(160,190,120,.1); border-color: rgba(160,190,120,.35); }
.nbp-dark .nbp-comps-h, .nbp-dark .nbp-comps li b { color: #CFE3B4; }
.nbp-dark .nbp-mark { color: #1A1A1A; }
.nbp-dark .nbp-img img { border-color: rgba(255,255,255,.15); }

::highlight(ra-now) { background-color: rgba(255, 213, 79, .65); color: inherit; }
.nbp-ra-now { background: rgba(255, 213, 79, .45); border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.nbp-dark .nbp-ra-now { background: rgba(255, 213, 79, .3); }

.nbp-tools .nbp-askbtn.on, .nbp-tool.nbp-askbtn.on { background: var(--olive-deep); color: #fff; border-color: var(--olive-deep); }
.nbp-askbar { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 10px; margin: 0 0 10px; }
.nbp-fs .nbp-askbar { position: absolute; top: 56px; left: 50%; transform: translateX(-50%); z-index: 30; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 80px); overflow-y: auto; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.nba-form { display: flex; gap: 6px; }
.nba-form .nba-q { flex: 1; min-width: 0; border: 1px solid var(--rule); border-radius: 10px; padding: 9px 10px; font-size: .9rem; background: var(--paper, #fff); color: var(--ink); }
.nba-res { display: flex; flex-direction: column; gap: 8px; }
.nba-hit { border: 1px solid var(--rule); border-radius: 10px; padding: 8px 10px; background: var(--paper, #fff); }
.nba-where { font-size: .74rem; font-weight: 700; color: var(--olive-deep, #556B2F); margin-bottom: 3px; }
.nba-line { font-size: .88rem; color: var(--ink); line-height: 1.45; }
.nba-next { font-size: .82rem; color: var(--ink-soft); margin-top: 3px; padding-left: 8px; border-left: 2px solid var(--rule); }
.nba-hit mark { background: #FFF176; color: inherit; border-radius: 3px; padding: 0 1px; }
.nba-hit .btn-small { margin-top: 6px; }
.nba-none, .nba-note { margin: 0; font-size: .82rem; color: var(--ink-soft); }
.nba-mine summary { cursor: pointer; font-size: .85rem; font-weight: 600; }
.nba-new { background: #E53935; color: #fff; font-size: .7rem; padding: 1px 7px; border-radius: 10px; }
.nba-q-item { border-top: 1px dashed var(--rule); padding: 6px 0; font-size: .84rem; }
.nba-q-text small, .nba-reply small { display: block; font-size: .7rem; color: var(--ink-soft); }
.nba-reply { margin-top: 4px; padding: 6px 8px; border-radius: 8px; background: rgba(85,107,47,.09); }
.nba-wait { font-size: .76rem; color: var(--ink-soft); }
.nbp-askbar .nbp-hl-tip { color: var(--ink-soft); }

.nb-merge { margin-top: 8px; border: 1px dashed var(--rule); border-radius: 10px; padding: 6px 8px; }
.nb-merge-scroll { overflow-x: auto; }
.nb-merge-table { border-collapse: collapse; font-size: .82rem; margin: 4px 0 8px; }
.nb-merge-table td { border: 1px solid #B9B3A5; padding: 6px 10px; min-width: 44px; cursor: pointer; background: var(--paper, #fff); text-align: center; }
.nb-merge-table td:hover { background: #F4F1E6; }
.nb-merge-table td.nb-mg-sel { background: #CFE3B4; outline: 2px solid var(--olive-deep, #556B2F); outline-offset: -2px; }
.nb-merge-table tr:first-child td { font-weight: 700; }
.nb-merge-acts { display: flex; gap: 6px; flex-wrap: wrap; }

.nb-preview-note { margin: 0 0 10px; }
.nb-preview-wrap { max-width: 640px; }
.nbq-badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #E53935; color: #fff; font-size: .7rem; line-height: 18px; }
.nbq-switch { margin-bottom: 12px; }
.nbq-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.nbq-item { border: 1px solid var(--rule); border-left: 4px solid #F9A825; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: var(--card); }
.nbq-item.done { border-left-color: var(--olive-deep, #556B2F); }
.nbq-who { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .85rem; }
.nbq-who span { color: var(--ink-soft); font-size: .76rem; }
.nbq-q { margin: 6px 0 4px; font-size: .92rem; }
.nbq-found { font-size: .74rem; color: var(--ink-soft); }
.nbq-found.none { color: #B26A00; }
.nbq-reply { margin: 6px 0; padding: 6px 8px; border-radius: 8px; background: rgba(85,107,47,.09); font-size: .86rem; }
.nbq-reply small { display: block; font-size: .7rem; color: var(--ink-soft); }
.nbq-form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.nbq-form textarea { width: 100%; box-sizing: border-box; }
.nbq-form .btn-small { align-self: flex-end; }

/* v212 💡 Feedback by lesson */
.fb-review { margin-top: 6px; padding: 6px 8px; border-radius: 8px; background: #FFF6D8; border: 1px solid #E8C96A; font-size: .8rem; }
.fb-act { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.fb-act span { font-weight: 700; margin-right: 2px; }
.fb-act .btn-small { padding: 3px 10px; font-size: .76rem; width: auto; height: 30px; min-height: 0; flex: none; margin: 0; }
.fb-act span { min-width: 64px; }

/* v212 🔍 Spot the Change: scattered cards, sort each one */
.gs-scene .gs-obj { translate: -50% -50%; background: rgba(255,255,255,0.9); box-shadow: 0 3px 8px rgba(0,0,0,.22); border-color: rgba(0,0,0,.08); transition: rotate .2s, box-shadow .2s; }
.gs-scene .gs-obj.sel { border-color: #1565C0; box-shadow: 0 0 0 3px rgba(21,101,192,.35), 0 6px 14px rgba(0,0,0,.3); rotate: 0deg; z-index: 2; }
.gs-scene .gs-obj.ok.chem { border-color: #2E6B1F; background: #E3F4D6; }
.gs-scene .gs-obj.ok.phys { border-color: #1565C0; background: #DCEBFA; }
.gs-scene .gs-obj.no { border-color: #C62828; background: #FBE3E3; opacity: .92; }
.gs-scene .gs-obj.missed { border-color: #E0A100; background: #FFF1C4; }
.gs-choice { display: flex; gap: 8px; margin-top: 8px; }
.gs-choice .gs-pick { flex: 1; height: auto; padding: 11px 8px; font-size: .92rem; font-weight: 700; border-radius: 12px; }
.gs-choice .gs-pick.chem { background: #2E6B1F; border-color: #2E6B1F; color: #fff; }
.gs-choice .gs-pick.phys { background: #1565C0; border-color: #1565C0; color: #fff; }
.gs-choice .gs-pick:disabled { opacity: .4; }

/* v213 🔗 game link + QR · Mastery tiles without letters */
.gshare-qr { display: flex; justify-content: center; margin: 6px 0 10px; }
.gshare-qr > img, .gshare-qr-img > img { display: block; width: min(260px, 70vw); height: auto; image-rendering: pixelated; border: 1px solid var(--rule); border-radius: 10px; }
.gshare-link { display: flex; gap: 6px; }
.gshare-link input { flex: 1; min-width: 0; font-size: .8rem; padding: 8px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper, #fff); color: var(--ink); }
.gshare-warn { margin: 0 0 8px; padding: 6px 10px; border-radius: 8px; background: #FFF3CD; color: #7A5B00; font-size: .82rem; }
.mq-tile .mq-tile-text { width: 100%; text-align: center; }

/* v213 📐 Triangle Detective */
.td-case { padding: 10px 12px; border-radius: 12px; background: #FFF6D8; border: 1px solid #E8C96A; line-height: 1.45; }
.td-step { margin: 10px 0 6px; font-size: .9rem; }
.td-board { position: relative; max-width: 420px; margin: 0 auto; }
.td-svg { display: block; width: 100%; height: auto; }
.td-svg .td-v { font: 800 18px sans-serif; fill: #263238; }
.td-svg .td-90 { font: 700 11px sans-serif; fill: #BF360C; }
.td-slot { position: absolute; translate: -50% -50%; min-width: 46px; min-height: 30px; padding: 2px; border: 2px dashed #90A4AE; border-radius: 10px; background: rgba(255,255,255,.75); color: #607D8B; font-size: .7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.td-slot.filled { border-style: solid; border-color: #546E7A; background: #fff; }
.td-slot.good { border-color: #2E7D32; background: #E3F4D6; }
.td-slot.shown { border-color: #E0A100; background: #FFF1C4; }
.td-slot.td-area { min-width: 56px; }
.td-tray { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; min-height: 44px; padding: 8px; margin-top: 8px; border-radius: 12px; background: var(--card); border: 1px dashed var(--rule); }
.td-chip { padding: 6px 12px; border-radius: 10px; border: 2px solid #1565C0; background: #E3F2FD; color: #0D47A1; font: inherit; font-weight: 800; font-size: .9rem; cursor: grab; touch-action: none; user-select: none; }
.td-slot .td-chip { padding: 3px 7px; font-size: .8rem; }
.td-chip.td-q { border-color: #C62828; background: #FFEBEE; color: #B71C1C; }
.td-chip.sel { box-shadow: 0 0 0 3px rgba(255,193,7,.8); }
.td-ghost { position: fixed; z-index: 9999; translate: -50% -50%; pointer-events: none; opacity: .9; }
.td-acts { display: flex; justify-content: center; margin-top: 8px; }
.td-acts .btn-small { height: auto; padding: 10px 18px; }
.td-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.td-rulebtn { padding: 9px 6px; border-radius: 10px; border: 2px solid var(--rule); background: var(--paper, #fff); color: var(--ink); font: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; }
.td-rulebtn.ok { border-color: #2E7D32; background: #E3F4D6; }
.td-rulebtn.no { border-color: #C62828; background: #FBE3E3; }
.gshare-qr-img { position: relative; display: inline-block; line-height: 0; }
.gshare-qr-img .cert-qr-logo { position: absolute; left: 39%; top: 39%; width: 22%; height: 22%; padding: 1.5%; border: 2px solid #2E9E58; }
.gshare-qr-img .cert-qr-logo img { display: block; width: 100%; height: 100%; border: 0; border-radius: 0; image-rendering: auto; }

/* v218 Arcade: closed sections (one open at a time) + 🔍 search */
.arcade-sec { grid-column: 1 / -1; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); }
.arcade-sec > summary.arcade-cat { list-style: none; cursor: pointer; margin: 0; padding: 12px 14px; user-select: none; }
.arcade-sec > summary.arcade-cat::-webkit-details-marker { display: none; }
.arcade-sec > summary.arcade-cat::before { content: '▸'; color: var(--olive-deep); transition: transform .15s; }
.arcade-sec[open] > summary.arcade-cat::before { transform: rotate(90deg); }
.arcade-sec[open] > summary.arcade-cat { border-bottom: 1px solid var(--rule); }
.arcade-sec-grid { padding: 14px; }
.arcade-search-wrap { flex: 1 1 200px; display: flex; min-width: 160px; }
.arcade-search { width: 100%; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 20px; background: var(--card); color: var(--ink); font: inherit; font-size: .85rem; }
.arcade-search:focus { outline: 2px solid var(--olive-soft); }
@media (max-width: 640px) { .arcade-search-wrap { flex-basis: 100%; } }
.af-hide { display: none !important; }
.af-none { grid-column: 1 / -1; }
.mq-find-bar { display: flex; margin: 0 0 12px; }
.arcade-cat .n { white-space: nowrap; }
.arcade-backbar .arcade-sort { flex: 1 1 auto; justify-content: flex-end; align-items: center; }

/* v219 Scanned Sheets: flags, ⚠️ filter, Back/Next */
.fg-sheet-item.fg-sheet-flag { background: #FDE7E7; border-color: #E8A0A0; }
.fg-sheet-item .fg-si-flag { grid-column: 1; font-size: .78rem; font-weight: 700; color: #B3261E; }
[data-theme="dark"] .fg-sheet-item.fg-sheet-flag { background: #4A2424; border-color: #9C4A4A; }
[data-theme="dark"] .fg-sheet-item .fg-si-flag { color: #FFB4AB; }
.fg-flag-switch { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: .88rem; color: var(--ink); cursor: pointer; }
.fg-sp-flag { margin-top: 3px; font-size: .8rem; font-weight: 700; color: #B3261E; }
.fg-sp-nav { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; margin-left: auto; }
.fg-sp-nav .btn-small { height: 34px; padding: 4px 12px; }
.fg-sp-nav .fg-sub { white-space: nowrap; font-size: .75rem; }
.fg-unsaved { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #FFF6D8; border: 1px solid #E8C96A; color: #3d2f00; }
.fg-unsaved p { margin: 0 0 8px; font-size: .88rem; }
.fg-unsaved div { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 560px) { .fg-sheet-popup .fg-card-head { flex-wrap: wrap; } .fg-sp-nav { order: 3; width: 100%; justify-content: center; margin-left: 0; } }
.fg-flag-switch { display: flex !important; flex-wrap: nowrap; width: fit-content; max-width: 100%; margin: 0 0 10px !important; }
.fg-flag-switch input { width: 18px !important; height: 18px; flex: none; margin: 0; padding: 0; accent-color: #B3261E; }

/* ============ v220 🏛️ COLLEGE GATE ============ */
.cg-bldg { display: block; }
.cg-tile-ico { width: 3.7rem; height: 3.1rem; margin: 0 auto; }
.subject-card.cg-tile { background: linear-gradient(180deg, #E8F4FF 0%, var(--card) 70%); border-color: #E3B07C; }
.cg-view { position: fixed; inset: 0; z-index: 1100; background: var(--paper); color: var(--ink); overflow-y: auto; -webkit-overflow-scrolling: touch; }
body.cg-open { overflow: hidden; }
body.cg-open .calc-fab { z-index: 1150; }
body.cg-open .calc-panel { z-index: 1160; }
.cg-top { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 16px; background: var(--paper); border-bottom: 1px solid var(--rule); }
.cg-back:not(.back-btn-xl) { border: 1px solid var(--rule); background: var(--card); color: var(--ink); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: .9rem; cursor: pointer; }
.cg-back.back-btn-xl { margin: 0; }
.cg-top-title { font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cg-body { max-width: 780px; margin: 0 auto; padding: 14px 16px 110px; }
.cg-hero { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: 18px; background: linear-gradient(180deg, #CFE8FF 0%, #F4FAFF 75%, #E9F5E1 100%); border: 1px solid #C8DDEE; color: #22301A; }
.cg-hero-bldg { width: 170px; flex: 0 0 auto; filter: drop-shadow(0 6px 10px rgba(0,0,0,.15)); }
.cg-hero h2 { margin: 0; font-size: 1.7rem; color: #1E5E27; letter-spacing: .5px; }
.cg-sub { margin: 0 0 6px; font-weight: 700; color: #B35F1E; text-transform: uppercase; letter-spacing: 1.5px; font-size: .82rem; }
.cg-lead { margin: 0; font-size: .92rem; color: #3A4A32; }
@media (max-width: 560px) { .cg-hero { flex-direction: column; text-align: center; } .cg-hero-bldg { width: 150px; } }
.cg-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 14px 0 4px; }
.cg-switch { display: inline-flex !important; align-items: center; gap: 8px; margin: 0 !important; padding: 8px 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card); font-weight: 600; cursor: pointer; }
.cg-switch input { width: 18px !important; height: 18px; margin: 0 !important; accent-color: #2E7D32; }
.cg-save.done { background: #2E7D32; border-color: #2E7D32; color: #fff; }
.cg-save-note { margin: 4px 0 10px; font-size: .8rem; color: var(--ink-soft); }
.cg-teacher-note { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: #FFF6E0; color: #6B4E00; font-size: .85rem; }
.cg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; margin-top: 6px; }
.cg-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px 14px; border-radius: 16px; border: 2px solid color-mix(in srgb, var(--cg) 35%, transparent); border-top: 6px solid var(--cg); background: var(--card); color: var(--ink); cursor: pointer; text-align: center; font: inherit; }
.cg-card:hover, .cg-card:focus-visible { border-color: var(--cg); transform: translateY(-1px); }
.cg-card-ico { font-size: 2.1rem; line-height: 1; color: var(--cg); font-weight: 800; }
.cg-card-name { font-weight: 700; font-size: .95rem; }
.cg-card-meta { font-size: .76rem; color: var(--ink-soft); }
.cg-branch-head { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 16px; border-left: 6px solid var(--cg); background: var(--card); }
.cg-branch-head h2 { margin: 0 0 4px; font-size: 1.25rem; }
.cg-branch-head p { margin: 0; font-size: .88rem; color: var(--ink-soft); }
.cg-branch-ico { font-size: 2.4rem; line-height: 1; color: var(--cg); font-weight: 800; min-width: 2.6rem; text-align: center; }
.cg-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
@media (max-width: 520px) { .cg-actions { grid-template-columns: 1fr; } }
.cg-act { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; padding: 14px 16px; border-radius: 16px; border: 0; background: var(--cg); color: #fff; cursor: pointer; font: inherit; box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.cg-act span { grid-row: 1 / 3; font-size: 2rem; }
.cg-act b { font-size: 1.1rem; }
.cg-act small { opacity: .92; font-size: .8rem; }
.cg-h3 { margin: 6px 0 8px; font-size: 1rem; }
.cg-lessons { display: grid; gap: 8px; }
.cg-lesson { display: flex; gap: 8px; align-items: baseline; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--rule); background: var(--card); color: var(--ink); cursor: pointer; font: inherit; font-size: .92rem; }
.cg-lesson i { margin-left: auto; font-style: normal; font-size: .75rem; color: var(--ink-soft); white-space: nowrap; }
.cg-book { margin-top: 4px; }
.cg-quiz-intro { text-align: center; padding: 24px 12px; }
.cg-quiz-intro ul { text-align: left; max-width: 420px; margin: 10px auto 18px; line-height: 1.7; }
.cg-qi-ico { font-size: 3rem; }
.cg-start { max-width: 260px; margin: 0 auto; }
.cg-quiz .mq-quiz-top { align-items: center; }
.cg-quiz .mq-timer-fill { background: var(--cg); }
.cg-quiz .fx-mute { margin-left: 6px; }
.cg-clock { font-weight: 800; font-variant-numeric: tabular-nums; padding: 2px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--rule); }
.cg-clock.low { color: #fff; background: #C62828; border-color: #C62828; }
.cg-lesson-tag { display: inline-block; font-size: .74rem; font-weight: 700; color: var(--cg); background: color-mix(in srgb, var(--cg) 12%, transparent); padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }
.cg-quiz .mq-quiz-question { text-align: left; }
.cg-quiz .mq-tile { min-height: 56px; }
.cg-fb { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--rule); }
.cg-fb-v { font-weight: 800; font-size: 1.05rem; margin-bottom: 4px; }
.cg-fb-v.ok { color: #2E7D32; } .cg-fb-v.no { color: #C62828; }
.cg-fb-a { margin-bottom: 4px; }
.cg-fb-s { font-size: .9rem; color: var(--ink-soft); margin-bottom: 10px; line-height: 1.5; }
.cg-next { max-width: 240px; }
.cg-result { text-align: center; padding: 18px 4px; }
.cg-result-pct { font-size: 2.6rem; font-weight: 800; color: var(--cg); }
.cg-save-line { font-size: .88rem; color: var(--ink-soft); }
.cg-per { width: 100%; border-collapse: collapse; margin: 10px 0 16px; text-align: left; font-size: .88rem; }
.cg-per th, .cg-per td { padding: 7px 8px; border-bottom: 1px solid var(--rule); }
.cg-per tr.miss td:first-child { color: #B3261E; font-weight: 600; }
.cg-per td:nth-child(2) { white-space: nowrap; font-weight: 700; }
.cg-result-acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; align-items: center; }
.cg-result-acts .btn-primary { max-width: 220px; }
/* minibook lines */
.nbp-p.cgx-h { font-family: 'Noto Sans', sans-serif; font-weight: 800; font-size: .9em; color: #2E5D1F; margin-top: .55em; border-bottom: 1.5px solid rgba(46,93,31,.25); }
.nbp-p.cgx-h.nbp-cont { border-bottom: 0; }
.nbp-p.cgx-f { background: rgba(255, 236, 179, .45); border-left: 3px solid #E0A526; padding: .1em .45em; margin: .12em 0; border-radius: 3px; }
.nbp-p.cgx-s { padding-left: 1.1em; text-indent: -1.1em; }
.nbp-p.cgx-q { font-weight: 700; margin-top: .45em; color: #23315C; }
.nbp-p.cgx-w { padding-left: 1em; color: #4E4A40; }
.nbp-p.cgx-a { padding-left: 1em; font-weight: 700; color: #1B6B2A; }
.nbp-p.cgx-k { padding-left: 1em; font-style: italic; color: #7A5A00; }
.nbp-fig { margin: .3em 0; }
.nbp-fig .mf-fig { margin: 4px auto; max-width: 300px; }
.nbp-fig .mf-svg { max-height: 200px; }
.nbp-dark .nbp-p.cgx-h { color: #CFE3B4; border-bottom-color: rgba(207,227,180,.3); }
.nbp-dark .nbp-p.cgx-f { background: rgba(255, 214, 102, .14); }
.nbp-dark .nbp-p.cgx-q { color: #BFD2FF; } .nbp-dark .nbp-p.cgx-w { color: #D6D2C8; } .nbp-dark .nbp-p.cgx-a { color: #9EE2A8; } .nbp-dark .nbp-p.cgx-k { color: #F2D27A; }
.nbp-dark .nbp-fig .mf-svg { background: #f6f3ea; border-radius: 8px; }
/* teacher: Class setup → College Gate */
.cg-setup-head { display: flex; gap: 14px; align-items: center; margin: 6px 0 14px; }
.cg-setup-bldg { width: 96px; flex: 0 0 auto; }
.cg-setup-card { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.cg-setup-h { font-weight: 700; margin-bottom: 8px; }
.cg-sw-row { display: flex !important; align-items: center; gap: 10px; padding: 8px 4px; margin: 0 !important; border-bottom: 1px solid var(--rule); cursor: pointer; }
.cg-sw-row input { width: 18px !important; height: 18px; margin: 0 !important; accent-color: #2E7D32; }
.cg-sw-row small { color: var(--ink-soft); font-weight: 400; }
.cg-sw-row em { margin-left: auto; font-style: normal; font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.cg-setup-card #cg-preview { margin-top: 10px; }
.cg-score-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.cg-score-bar select { width: auto; margin: 0; }
.cg-sec-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.cg-score-table { border-collapse: collapse; width: 100%; font-size: .84rem; }
.cg-score-table th, .cg-score-table td { border: 1px solid var(--rule); padding: 5px 6px; text-align: center; }
.cg-score-table th small { font-weight: 500; font-size: .68rem; }
.cg-score-table td:first-child { text-align: left; white-space: nowrap; }
.cg-score-table td.cg-hi { background: #E3F4E1; color: #1B5E20; font-weight: 700; }
.cg-score-table td.cg-lo { background: #FDECEA; color: #B3261E; font-weight: 700; }
.cg-score-table td.cg-na { color: var(--ink-soft); }
[data-theme="dark"] .cg-score-table td.cg-hi { background: #1F3A22; color: #A5E3AC; }
[data-theme="dark"] .cg-score-table td.cg-lo { background: #3E2020; color: #F4B4AE; }
[data-theme="dark"] .cg-hero { color: #22301A; }
.cg-setup-card .table-scroll { overflow-x: auto; max-width: 100%; }
.cg-per .btn-small { white-space: nowrap; }
.cg-next { display: block; margin: 0 auto; }
.mf-dotp { fill: #4F7F35; stroke: #2E4A1F; stroke-width: 1; } .mf-picked { fill: #E0761F; stroke: #9C4A0B; } .mf-mark { fill: #B3261E; }
.nb-fig-ed textarea { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; }
.nb-fig-ed select { margin: 0 0 6px; width: auto; max-width: 100%; }
.nb-fig-prev { background: #fff; border: 1px dashed var(--rule); border-radius: 10px; padding: 6px; margin: 6px 0; min-height: 40px; }
.nb-fig-prev .mf-fig { max-width: 320px; }
.zt-pop { z-index: 9600; }
.zt-card { max-width: 640px; width: calc(100vw - 24px); max-height: calc(100vh - 24px); overflow-y: auto; position: relative; }
.zt-find { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.zt-find label { display: flex !important; gap: 8px; align-items: center; margin: 0 !important; font-weight: 600; }
.zt-find input { width: 150px !important; margin: 0 !important; }
.zt-ans { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; background: #F1F7EA; border-radius: 12px; padding: 6px 10px; margin-bottom: 8px; line-height: 1.6; }
.zt-ans .mf-fig { margin: 0; max-width: 260px; }
@media (max-width: 520px) { .zt-ans { grid-template-columns: 1fr; } }
.zt-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.zt-scroll { overflow: auto; max-height: 55vh; border: 1px solid var(--rule); border-radius: 10px; }
.zt-table { border-collapse: collapse; font-size: .78rem; font-variant-numeric: tabular-nums; width: 100%; }
.zt-table th, .zt-table td { padding: 4px 6px; border-bottom: 1px solid var(--rule); text-align: center; white-space: nowrap; }
.zt-table thead th { position: sticky; top: 0; background: var(--olive-deep); color: #fff; z-index: 1; }
.zt-table tbody th { position: sticky; left: 0; background: var(--card); font-weight: 700; }
.zt-table td.zt-hit { background: #FFE082; font-weight: 800; outline: 2px solid #E0A526; }
[data-theme="dark"] .zt-ans { background: #26331F; }
.fg-h-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.tbl-tools .fg-nyt-btn { min-height: 32px; padding: 3px 10px; font-size: .78rem; }
.fg-nyt-card { max-width: 620px !important; }
.fg-nyt-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.fg-nyt-h { margin: 10px 0 4px; font-size: .95rem; }
.fg-nyt-wrap { overflow-x: auto; }
.fg-nyt-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.fg-nyt-table th, .fg-nyt-table td { padding: 6px 8px; border-bottom: 1px solid var(--rule); text-align: left; }
.fg-nyt-table td:last-child { text-align: right; white-space: nowrap; }

/* v223 🧮 Grade Sheet columns & sources · 📌 Give to students */
.asg-card-btns { flex-wrap: wrap; }
.asg-card-btns .asg-give-btn { flex-basis: 100%; }
.gs-c-counts { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:10px; }
.gs-c-counts label { display:flex; flex-direction:column; gap:4px; font-weight:600; font-size:.86rem; }
.gs-c-counts select { width:auto; min-width:90px; }
.gs-c-list { display:flex; flex-direction:column; gap:8px; max-height:48vh; overflow-y:auto; padding-right:4px; }
.gs-c-row { display:grid; grid-template-columns: 52px 1fr; gap:8px; align-items:start; padding:8px; border:1px solid var(--rule); border-radius:10px; background: var(--card, transparent); }
.gs-c-row > b { padding-top:8px; }
.gs-c-pick { display:flex; flex-direction:column; gap:6px; min-width:0; }
.gs-c-pick select { width:100%; }
.gs-c-more { display:flex; flex-direction:column; gap:4px; }
.gs-c-more summary { cursor:pointer; font-size:.86rem; font-weight:600; }
.give-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap:10px; }
.give-grid label { display:flex; flex-direction:column; gap:4px; font-weight:600; font-size:.86rem; margin:0; }
.give-col { display:flex; gap:6px; }
.give-col select { flex:1; min-width:0; }
#gv-list { max-height:38vh; overflow-y:auto; }
.given-card { position: relative; }
.given-item { display:flex; gap:10px; align-items:center; justify-content:space-between; padding:10px 12px; border:1px solid var(--rule); border-radius:12px; margin-bottom:8px; flex-wrap:wrap; }
.given-item.done { opacity:.8; }
.given-txt { display:flex; flex-direction:column; gap:2px; min-width:0; flex:1 1 220px; }
.given-txt small { color: var(--ink-soft); }
.given-act { display:flex; gap:8px; align-items:center; }

/* v224 🎮 Arcade teacher tiles: small, same on every device (2 per row on phones) */
.arcade-sec-grid:has(.arc-tile), .mq-ch-row.arc-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; overflow: visible; }
.mq-ch-row.arc-row > .subject-card { flex: none; }
.subject-card.arc-tile { padding: 12px 8px 10px; gap: 4px; font-size: 0.86rem; justify-content: flex-start; min-width: 0; }
.subject-card.arc-tile .icon { font-size: 2rem; line-height: 1; height: 2.4rem; display: flex; align-items: center; justify-content: center; }
.subject-card.arc-tile .icon .ai-svg { width: 1.15em; height: 1.15em; }
.subject-card.arc-tile .ai-skill { font-size: 0.7rem; margin-top: 1px; }
.subject-card.arc-tile .arc-sub { margin: 0; font-size: 0.7rem; }
.subject-card.arc-tile .arc-launch { margin-top: 4px; width: 100%; height: auto; min-height: 0; padding: 5px 4px; font-size: 0.75rem; }
.arc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 0 4px; width: 100%; margin-top: 2px; }
.arc-btns .link-btn { margin: 0; min-height: 30px; font-size: 0.78rem; padding: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.subject-card.arc-tile .tgs-best { margin-top: 2px; font-size: 0.7rem; padding: 1px 8px; }
.subject-card.arc-tile .calc-switch, .subject-card.arc-tile [class*="calc-sw"] { margin-top: 2px; font-size: 0.72rem; }
@media (max-width: 420px) { .arcade-sec-grid:has(.arc-tile), .mq-ch-row.arc-row { grid-template-columns: 1fr 1fr; } }
.arc-offline { margin-top: 14px; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px; border: 1px dashed var(--rule); border-radius: 12px; }
.arc-off-txt { font-size: 0.82rem; color: var(--ink-soft); flex: 1 1 200px; }
/* v234 section chips show the subject */
.chip .sec-subj { font-size: 0.72em; opacity: 0.8; font-weight: 500; }

/* v235 🔍 similar responses */
.sim-badge { margin-top: 4px; font-size: 0.72rem; font-weight: 500; line-height: 1.3; padding: 3px 7px; border-radius: 8px; white-space: normal; text-transform: none; letter-spacing: 0; }
.sim-badge b { font-weight: 700; }
.sim-mini { display: inline-block; margin-top: 4px; font-size: 0.68rem; font-weight: 600; padding: 1px 6px; border-radius: 999px; white-space: nowrap; }
.sim-red { background: #FDE2E1; color: #9B1C1C; border: 1px solid #F5B5B2; }
.sim-org { background: #FFF1D6; color: #8A5300; border: 1px solid #F2D29A; }
.pti-resp .sim-mini { display: table; }

/* v236 ✍️ Life & Career Skills item view: every answer in a same-size box (about 8 lines); long answers scroll inside */
.pti-resp { width: 230px; min-width: 230px; max-width: 230px; }
.pti-ans { height: calc(1.45em * 8); overflow-y: auto; overflow-x: hidden; padding-right: 4px; scrollbar-width: thin; }
.pti-ans:focus { outline: 2px solid var(--olive); outline-offset: 2px; border-radius: 4px; }
.pti-table td.pti-resp { vertical-align: top; }

/* v236 🎓 Grade 12 */
.g12-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0; }
.g12-secs { margin-top: 10px; }
.g12-list { max-width: 820px; }
.g12-arcade-list { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow-y: auto; }
.cp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 6px 0 12px; }
.cp-stats > div { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 10px; text-align: center; }
.cp-stats b { display: block; font-size: 1.2rem; }
.cp-stats small { color: var(--ink-soft); }
.cp-world { border: 1px solid var(--rule); border-radius: 12px; margin-bottom: 8px; background: var(--card); }
.cp-world > summary { cursor: pointer; padding: 10px 12px; }
.cp-stations { display: flex; flex-direction: column; gap: 6px; padding: 0 12px 12px; }
.cp-st { display: grid; grid-template-columns: 1fr 110px auto; gap: 8px; align-items: center; font-size: 0.86rem; }
.cp-st small { color: var(--ink-soft); white-space: nowrap; }
.cp-bar { height: 8px; border-radius: 99px; background: var(--rule); overflow: hidden; }
.cp-bar i { display: block; height: 100%; background: var(--olive); }
.cp-st.done .cp-bar i { background: #D4A72C; }

/* v238 🏠 Home — appears at the top-right on inner pages when the breadcrumbs are off the screen */
.chim-home-fab { position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); right: 12px; z-index: 9000; width: 48px; height: 48px; border-radius: 50%;
  background: #FFFFFF; border: 2px solid var(--olive-deep); font-size: 1.35rem; line-height: 1; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,.18); -webkit-tap-highlight-color: transparent; }
.chim-home-fab:active { transform: scale(.96); }
[data-theme="dark"] .chim-home-fab { background: #1F2616; border-color: #9DBB6E; }
body.nbp-fs-lock .chim-home-fab { z-index: 100001; }
.chim-crumbs button { min-height: 40px; padding: 6px 4px; }

/* v239 🏅 My Scores: class comparison (teacher only) */
.tgs-cmp { white-space: nowrap; font-size: .86rem; }
.tgs-cmp-line { line-height: 1.35; }
.tgs-cmp-line + .tgs-cmp-line { margin-top: 2px; }
.tgs-cmp small { display: inline; }
.tgs-up { color: #2E7D32; }
.tgs-down { color: #A35A00; }
[data-theme="dark"] .tgs-up { color: #9FD3A8; } [data-theme="dark"] .tgs-down { color: #F3C27A; }

/* v239 🔄 Attendance across subjects */
.across-range { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 6px; }
.across-range label { display: inline-flex; gap: 6px; align-items: center; font-size: .9rem; }
.across-range input[type=date] { padding: 6px 8px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; }
.across-table td, .across-table th { text-align: center; white-space: nowrap; }
.across-table td:first-child, .across-table th:first-child { text-align: left; }
.across-n { display: inline-block; padding: 1px 6px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.across-present { background: #E3F2E1; color: #2E6B2A; } .across-late { background: #FFF1D6; color: #8A5A00; }
.across-absent { background: #FBE1E1; color: #9B2C2C; } .across-excused { background: #E5ECF8; color: #2F4F86; }
body.across-open #teacher-section-tabs { display: none !important; }
body:not(.across-open) #attendance-across-view { display: none; }
.fg-popup-card.tgs-wide { max-width: min(1080px, 96vw); width: 96vw; }
.tgs-table td, .tgs-table th { vertical-align: top; }

/* v240 📤 share / 📥 load attendance */
.att-share-sw { display: block; margin: 0 0 10px; }
.att-load-row { margin: 0 0 8px; }
.ls-src { border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; }
.ls-names { margin: 6px 0 8px; padding-left: 20px; font-size: .9rem; }
.att-copied { font-size: .75rem; padding: 1px 6px; border-radius: 999px; background: #E5ECF8; color: #2F4F86; white-space: nowrap; }
[data-theme="dark"] .att-copied { background: #22394C; color: #D6ECFF; }

/* v241 sign-up: join code */
.reg-code-row { display: flex; flex-direction: column; gap: 4px; }
#register-code { text-transform: uppercase; letter-spacing: .08em; }
#register-code-status { min-height: 1.2em; }

/* v242 👥 Master → Teachers */
.tch-code-card { border: 1px solid var(--rule); border-radius: 14px; padding: 14px 16px; background: var(--card, #fff); max-width: 560px; }
.tch-code-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 10px; }
.tch-pause { display: block; }
.tch-removed td { opacity: .6; }
.tch-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 700; margin-right: 6px; }
.tch-badge.on { background: #E3F2E1; color: #2E6B2A; } .tch-badge.off { background: #FBE1E1; color: #9B2C2C; }

/* v243 forgot password / owner help */
.login-help-row { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pw-row { display: flex; gap: 6px; align-items: center; }
.pw-row input { flex: 1 1 auto; min-width: 0; }
.pw-eye { font-size: 1.1rem; text-decoration: none; }
.tch-help { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.tch-help .btn-small { white-space: nowrap; }
.tch-loglist { margin: 0; padding-left: 18px; font-size: .9rem; }

/* v244 ⚙️ My Account */
.fg-popup-card.acct-card { max-width: 560px; }
.acct-sec { border-top: 1px solid var(--rule); padding: 12px 0 6px; }
.acct-sec h4 { margin: 0 0 6px; font-size: 1rem; }
.acct-sec label { display: block; margin: 8px 0 2px; font-size: .85rem; }
.acct-sec input { width: 100%; box-sizing: border-box; }
.acct-grid { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: .9rem; }
.acct-grid > span { color: var(--ink-soft); }
.acct-ok { color: #2E7D32 !important; }
.acct-pending { background: #FFF6E0; border: 1px solid #F0D58A; border-radius: 10px; padding: 8px 10px; margin: 0 0 8px; font-size: .88rem; color: #5A4300; }

/* v245 login: 4 cards in 2 × 2, the growing-sprout logo, fits a desktop screen (100% zoom) with the footer showing */
.gate { min-height: 100dvh; box-sizing: border-box; }
#gate-role .gate-card { max-width: 560px; padding: 22px 24px 20px; }
#gate-role .gate-greeting { margin-bottom: 4px; }
#gate-role .wordmark-frame { max-width: 300px; margin: 6px auto 4px; }
#gate-role .wordmark-frame img.wordmark { aspect-ratio: 640 / 268; }
#gate-role .subtitle { margin-bottom: 14px; }
.role-choice.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.role-grid button { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; padding: 14px 10px 12px; min-height: 104px; cursor: pointer; transition: border-color .15s, transform .1s, box-shadow .15s; }
.role-grid button i { font-style: normal; font-size: 1.9rem; line-height: 1; margin-bottom: 6px; }
.role-grid button span { margin-top: 4px; line-height: 1.3; }
.role-grid button:hover { box-shadow: 0 4px 14px rgba(40, 70, 110, .12); transform: translateY(-1px); }
.role-grid #btn-choose-admin { border-style: dashed; }
@media (max-height: 760px) {
  .gate { padding: 12px 16px; }
  #gate-role .gate-hi { font-size: 1.7rem; }
  #gate-role .wordmark-frame { max-width: 230px; }
  .role-grid button { min-height: 88px; padding: 10px 8px; }
  .role-grid button i { font-size: 1.5rem; margin-bottom: 4px; }
}
@media (max-width: 420px) {
  #gate-role .gate-card { padding: 18px 14px; }
  .role-grid { gap: 10px; }
  .role-grid button { font-size: .98rem; }
  .role-grid button span { font-size: .72rem; }
}

/* v245 🛡️ Admin mode (same account as Teacher) */
body:not(.chim-admin) #master-tab-btn { display: none !important; }
body.chim-admin #teacher-top-tabs, body.chim-admin #teacher-home-extras, body.chim-admin #teacher-home-search,
body.chim-admin #teacher-section-tabs, body.chim-admin #teacher-toolbar, body.chim-admin #teacher-subject-switcher-wrap { display: none !important; }
body.chim-admin #app-teacher .app-header { box-shadow: inset 0 -3px 0 #8A6D1F; }
body.chim-admin-viewer #master-home #btn-open-hotline, body.chim-admin-viewer #master-home #btn-open-control, body.chim-admin-viewer #master-home #btn-open-admin-cg, body.chim-admin-viewer #master-home #btn-open-admin-fs { display: none !important; }
/* v399 view-only Admin home: 6 tiles, 2 rows × 3 columns (desktop) / 3 rows × 2 columns (phone), filling the page */
body.chim-admin-viewer #master-home .subject-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 16px; height: calc(100vh - 250px); height: calc(100dvh - 250px); min-height: 340px; }
body.chim-admin-viewer #master-home .subject-card { margin: 0; width: auto; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
body.chim-admin-viewer #master-home .subject-card .icon { font-size: clamp(2.4rem, 8vh, 4.4rem); }
body.chim-admin-viewer #master-home .subject-card .subj-ic { height: clamp(52px, 12vh, 96px); width: auto; }
/* v658 Admin tiles follow the A–Z order of index.html (no CSS order) */
@media (max-width: 700px) { body.chim-admin-viewer #master-home .subject-grid { grid-template-columns: repeat(2, 1fr); height: calc(100vh - 230px); height: calc(100dvh - 230px); gap: 12px; } }
/* view-only: nothing can be changed in these pages */
body.chim-admin-viewer #teachers-view .tch-code-card, body.chim-admin-viewer #teachers-view table button, body.chim-admin-viewer #teachers-view .tch-coord, body.chim-admin-viewer #teachers-view .tch-help, body.chim-admin-viewer #teachers-view #tch-log,
body.chim-admin-viewer #advisers-view .adv-save, body.chim-admin-viewer #btn-master-import-trigger, body.chim-admin-viewer #btn-policies-edit,
body.chim-admin-viewer #master-list [data-md-restore], body.chim-admin-viewer #master-list [data-md-purge] { display: none !important; }
body.chim-admin-viewer #advisers-view .adv-pick, body.chim-admin-viewer #advisers-view .adv-name { pointer-events: none; opacity: .85; }
body.chim-admin-viewer #btn-admin-import, body.chim-admin-viewer #btn-admin-sample, body.chim-admin-viewer #btn-admin-settings,
body.chim-admin-viewer .admin-school-box { display: none !important; }
#btn-admin-switch { white-space: nowrap; }
.tch-badge.view { background: #E5ECF8; color: #2F4F86; }

/* v246: 👁 inside the password / PIN box — tap to show, tap again to hide */
.pw-in { position: relative; display: block; }
.pw-in > input { width: 100%; padding-right: 44px !important; box-sizing: border-box; }
.pw-eye-in { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: transparent; border-radius: 50%; cursor: pointer; font-size: 1.15rem; line-height: 1; padding: 0; opacity: .75; }
.pw-eye-in:hover, .pw-eye-in:focus-visible { opacity: 1; background: rgba(0,0,0,.06); }
.pw-eye-in[aria-pressed="true"] { opacity: 1; }
.pw-in > input::-ms-reveal, .pw-in > input::-ms-clear { display: none; } /* Edge has its own eye — use only CHIM's */

/* v247 phones: the teacher's email moves into ⚙️ My Account; the buttons sit in one neat row */
@media (max-width: 640px) {
  #teacher-who { display: none !important; }
  #app-teacher .topbar-actions { justify-content: flex-end; gap: 6px; flex-wrap: nowrap; }
  #app-teacher .topbar-actions .icon-btn { flex: 0 0 auto; }
  #app-teacher .topbar-actions .logout-btn { white-space: nowrap; flex: 0 0 auto; }
}
@media (max-width: 380px) {
  #app-teacher .topbar-actions { gap: 4px; }
  #app-teacher .topbar-actions .logout-btn { padding-left: 10px; padding-right: 10px; }
}
.acct-who { margin: 0 0 10px; font-size: .9rem; overflow-wrap: anywhere; }

/* v248: Grade 12 and College Gate are General Mathematics tools */
body.chim-not-gm #students-open-g12, body.chim-no-gm #setup-open-cg { display: none !important; }
body.chim-no-fx #btn-notebook-add-fig { display: none !important; } /* v248: 📈 Drawn graph (math figures) — Gen Math / Gen Science only */

/* v249: teacher Home = 6 group tiles (Class, Connect, Learn, Arcade, Grades, Tools); the Today cards are gone */
#teacher-top-tabs > .tile-group:not([data-group="main"]) { display: none !important; }
#teacher-top-tabs > .tile-group[data-group="main"] { flex-basis: 100%; }
.chim-grp-grid { grid-auto-flow: row !important; grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
@media (max-width: 1000px) { .chim-grp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
#teacher-today { display: none !important; }
.grp-grid .subject-card { position: relative; font: inherit; color: inherit; cursor: pointer; }
.grp-ic-img { width: 1.1em; height: 1.1em; vertical-align: middle; }
#setup-open-cg { display: none !important; } /* now in 🛡️ Admin */
body:not(.chim-admin) #btn-open-admin-cg, body:not(.chim-admin) #btn-open-admin-policies, body:not(.chim-admin) #btn-open-admin-fs, body:not(.chim-admin) #btn-open-reach { display: none !important; }

/* v250 desktop teacher Home: 3 × 2 tiles on the left fill the screen; weather (big) and the quote stacked on the right */
@media (min-width: 900px) {
  .teacher-home-main { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr); gap: 18px; margin: 16px 20px 16px; height: var(--home-h, auto); min-height: 360px; }
  .teacher-home-main > #teacher-top-tabs.hidden ~ #teacher-home-extras, .teacher-home-main:has(> #teacher-top-tabs.hidden) { display: none; }
  .teacher-home-main #teacher-top-tabs.tabs-grid.tile-groups { padding: 0; margin: 0; height: 100%; }
  .teacher-home-main #teacher-top-tabs > .tile-group[data-group="main"] { height: 100%; }
  .teacher-home-main .chim-grp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; grid-template-rows: repeat(2, minmax(0, 1fr)); height: 100%; gap: 18px; }
  .teacher-home-main .chim-grp-grid .tab-btn { height: 100%; padding: 12px; }
  .teacher-home-main .chim-grp-grid .tab-icon { font-size: clamp(3rem, 7vh, 5.5rem) !important; }
  .teacher-home-main .chim-grp-grid .tab-icon img { width: 1em; height: 1em; }
  .teacher-home-main .chim-grp-grid .tab-label { font-size: clamp(1.05rem, 2.2vh, 1.5rem) !important; margin-top: 8px; }
  .teacher-home-main .chim-grp-grid .tile-badge { font-size: 0.85rem; top: 12px; right: 12px; }
  .teacher-home-main #teacher-home-extras { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 3fr) minmax(0, 2fr); gap: 18px; height: 100%; }
  .teacher-home-main #teacher-home-extras.hidden { display: none; }
  .teacher-home-main #teacher-home-extras .weather-card { order: 1; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 16px; gap: 6px; }
  .teacher-home-main #teacher-home-extras .quote-card { order: 2; flex-direction: column; justify-content: center; align-items: flex-start; padding: 16px 20px; gap: 8px; }
  .teacher-home-main #teacher-home-extras .weather-label { display: block; font-size: 0.75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
  .teacher-home-main #teacher-home-extras .weather-label::before { content: none; }
  .teacher-home-main #teacher-home-extras .weather-main { flex-direction: column; align-items: center; gap: 4px; }
  .teacher-home-main #teacher-home-extras .weather-icon { font-size: clamp(4rem, 12vh, 8rem); line-height: 1; }
  .teacher-home-main #teacher-home-extras .weather-icon img { width: 1em; height: 1em; }
  .teacher-home-main #teacher-home-extras .weather-temp { font-size: clamp(2rem, 5vh, 3.2rem); font-weight: 700; }
  .teacher-home-main #teacher-home-extras .weather-desc { text-align: center; font-size: 0.95rem; }
  .teacher-home-main #teacher-home-extras .weather-desc::before { content: none; }
  .teacher-home-main #teacher-home-extras .quote-main { flex-direction: column; align-items: flex-start; gap: 8px; }
  .teacher-home-main #teacher-home-extras .quote-icon { font-size: 2rem; }
  .teacher-home-main #teacher-home-extras .quote-text { font-size: clamp(1rem, 2.1vh, 1.25rem); line-height: 1.45; }
}
.teacher-home-main.hidden { display: none !important; }
@media (min-width: 900px) {
  .teacher-home-main .chim-grp-grid .tab-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; }
  .teacher-home-main #teacher-home-extras .quote-card { justify-content: center; }
}

/* v251: a laptop touchpad's sideways two-finger swipe must not act as the browser's Back */
html, body { overscroll-behavior-x: none; }

/* v252 📡 Reach */
.reach-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.reach-bar .reach-lbl { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin-right: 2px; }
.reach-bar select, .reach-bar input { margin: 0; width: auto; min-width: 160px; }
.reach-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.reach-table th, .reach-table td { padding: 7px 10px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.reach-table th { position: sticky; top: 0; background: var(--paper-2, var(--card)); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.reach-table td.ok { color: var(--green-text, #2E7D32); font-weight: 800; text-align: center; }
.reach-table td.no { color: var(--red, #C62828); font-weight: 800; text-align: center; }
.reach-table small.act { display: block; color: var(--ink-soft); font-size: .72rem; }
.reach-table .role { display: inline-block; font-size: .7rem; padding: 0 6px; border-radius: 999px; background: rgba(120,130,145,.14); color: var(--ink-soft); margin-left: 6px; }
.reach-total { margin-top: 10px; padding: 10px 12px; border: 1.5px solid var(--rule); border-radius: 12px; background: var(--card); font-size: .92rem; line-height: 1.6; }
.reach-total b.big { font-size: 1.1rem; }

/* v253 📲 install bar on the login card (phones that aren't using the installed app) */
.gate-install { display: block; margin: 10px auto 0; text-align: center; font-weight: 700; font-size: .9rem; color: var(--olive-deep, #4B5A2A); text-decoration: none; border: 1.5px dashed var(--rule); border-radius: 12px; padding: 8px 12px; }
.gate-install.hidden { display: none; }

/* ===== v254 teacher Home layout =====
   Row under the header: 🔍 search (left) + Now viewing (right), 50/50 (phones: Now viewing on top).
   Home: computer = 4 × 2 equal boxes (Class Connect Learn Weather / Arcade Grades Tools Quote);
         phone = Weather | Quote on top, then the 6 tiles in 2 columns × 3 rows; all fill the screen. */
.teacher-subrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin: 16px 20px 0; align-items: stretch; }
.teacher-subrow:not(:has(> :not(.hidden))) { display: none; }
.teacher-subrow > .home-search { margin: 0; order: 1; }
.teacher-subrow > .home-search.hidden ~ *, .teacher-subrow:has(> .home-search.hidden) > .teacher-subject-switcher-wrap { grid-column: 1 / -1; }
.teacher-subrow > .teacher-subject-switcher-wrap { order: 2; margin: 0; display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--rule); border-radius: 12px; padding: 0 6px 0 14px; background: var(--card); min-height: 44px; }
.teacher-subrow > .teacher-subject-switcher-wrap.hidden { display: none; }
.teacher-subrow > .teacher-subject-switcher-wrap label { font-size: 0.85rem; color: var(--ink-soft); margin: 0; font-weight: 400; white-space: nowrap; }
.teacher-subrow > .teacher-subject-switcher-wrap select { flex: 1 1 auto; min-width: 0; width: auto; max-width: none; border: 0; background: transparent; padding: 8px 6px; margin: 0; font-size: 0.98rem; font-weight: 700; }
.teacher-subrow .home-search input { height: 100%; min-height: 44px; }
@media (max-width: 899px) {
  .teacher-subrow { grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 12px 12px 0; }
  .teacher-subrow > .teacher-subject-switcher-wrap { order: 0; }
}

#teacher-home-main { display: grid; gap: 18px; margin: 16px 20px; height: var(--home-h, auto); grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
#teacher-home-main.hidden { display: none !important; }
#teacher-home-main > #teacher-top-tabs:not(.hidden), #teacher-home-main > #teacher-top-tabs > .tile-group[data-group="main"], #teacher-home-main .chim-grp-grid, #teacher-home-main > #teacher-home-extras:not(.hidden) { display: contents !important; }
#teacher-home-main .grp-btn { margin: 0; height: auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px; position: relative; overflow: hidden; }
#teacher-home-main .grp-btn[data-grp="class"] { grid-area: 1 / 1; } #teacher-home-main .grp-btn[data-grp="connect"] { grid-area: 1 / 2; }
#teacher-home-main .grp-btn[data-grp="learn"] { grid-area: 1 / 3; } #teacher-home-main .grp-btn[data-grp="arcade"] { grid-area: 2 / 1; }
#teacher-home-main .grp-btn[data-grp="grades"] { grid-area: 2 / 2; } #teacher-home-main .grp-btn[data-grp="tools"] { grid-area: 2 / 3; }
#teacher-home-main .weather-card { grid-area: 1 / 4; } #teacher-home-main .quote-card { grid-area: 2 / 4; }
#teacher-home-main .grp-btn .tab-icon { font-size: clamp(3.6rem, 13vh, 9rem) !important; line-height: 1; }
#teacher-home-main .grp-btn .tab-icon img { width: 1em; height: 1em; }
#teacher-home-main .grp-btn .tab-label { font-size: clamp(1.05rem, 2.4vh, 1.6rem) !important; margin-top: 10px; }
#teacher-home-main .grp-btn .tile-badge { font-size: 0.85rem; top: 12px; right: 12px; }
#teacher-home-main .weather-card, #teacher-home-main .quote-card { margin: 0; min-height: 0; overflow: hidden; border: 1px solid var(--rule); border-radius: 18px; background: var(--card); display: flex; flex-direction: column; justify-content: center; }
#teacher-home-main .weather-card { align-items: center; text-align: center; padding: 14px; gap: 4px; }
#teacher-home-main .quote-card { align-items: flex-start; padding: 16px 20px; gap: 8px; }
#teacher-home-main .weather-label { display: block; font-size: 0.75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
#teacher-home-main .weather-main { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; flex: none; }
#teacher-home-main .weather-icon { font-size: clamp(3.6rem, 12vh, 8rem); line-height: 1; }
#teacher-home-main .weather-icon img { width: 1em; height: 1em; }
#teacher-home-main .weather-temp { font-size: clamp(1.8rem, 5vh, 3.2rem); font-weight: 700; letter-spacing: 0; }
#teacher-home-main .weather-desc { text-align: center; font-size: 0.95rem; }
#teacher-home-main .weather-desc::before { content: none; }
#teacher-home-main .quote-main { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 0; min-height: 0; overflow: hidden; }
#teacher-home-main .quote-icon { font-size: 2rem; }
#teacher-home-main .quote-text { font-family: 'IBM Plex Sans', sans-serif; font-style: italic; font-size: var(--q-fs, clamp(1rem, 2.1vh, 1.3rem)); line-height: 1.4; margin: 0; }
@media (max-width: 899px) {
  #teacher-home-main { margin: 12px; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(96px, 1fr)); }
  #teacher-home-main .weather-card { grid-area: 1 / 1; padding: 8px; gap: 2px; } #teacher-home-main .quote-card { grid-area: 1 / 2; padding: 10px 12px; gap: 4px; }
  #teacher-home-main .grp-btn[data-grp="class"] { grid-area: 2 / 1; } #teacher-home-main .grp-btn[data-grp="connect"] { grid-area: 2 / 2; }
  #teacher-home-main .grp-btn[data-grp="learn"] { grid-area: 3 / 1; } #teacher-home-main .grp-btn[data-grp="arcade"] { grid-area: 3 / 2; }
  #teacher-home-main .grp-btn[data-grp="grades"] { grid-area: 4 / 1; } #teacher-home-main .grp-btn[data-grp="tools"] { grid-area: 4 / 2; }
  #teacher-home-main .grp-btn .tab-icon { font-size: clamp(2.6rem, 8vh, 5rem) !important; }
  #teacher-home-main .grp-btn .tab-label { font-size: clamp(0.95rem, 2vh, 1.2rem) !important; margin-top: 6px; }
  #teacher-home-main .grp-btn .tile-badge { font-size: 0.68rem; top: 6px; right: 6px; }
  #teacher-home-main .weather-label { font-size: 0.62rem; letter-spacing: .04em; }
  #teacher-home-main .weather-icon { font-size: clamp(2.2rem, 6vh, 3.6rem); }
  #teacher-home-main .weather-temp { font-size: clamp(1.3rem, 3.4vh, 1.9rem); }
  #teacher-home-main .weather-desc { font-size: 0.72rem; line-height: 1.25; }
  #teacher-home-main .quote-icon { font-size: 1.3rem; }
  #teacher-home-main .weather-label, #teacher-home-main .quote-card .weather-label { font-size: 0.62rem; }
  #teacher-home-main .quote-text { font-size: var(--q-fs, 0.95rem); line-height: 1.3; }
}

/* v255: Weather and Quote boxes on the teacher Home — charcoal grey with white text */
#teacher-home-main .weather-card, #teacher-home-main .quote-card { background: #2F3337 !important; border-color: #2F3337 !important; color: #fff !important; }
#teacher-home-main .weather-card *, #teacher-home-main .quote-card * { color: #fff !important; }
#teacher-home-main .weather-label, #teacher-home-main .quote-card .weather-label { color: rgba(255,255,255,.75) !important; }

/* v256 teacher inner pages: [🏠 Home › … › page  ‹ Back] (left) · [Now viewing] (right) */
.teacher-subrow > .crumb-cell { order: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; min-width: 0; }
.teacher-subrow > .crumb-cell.hidden { display: none; }
.teacher-subrow > .crumb-cell .chim-crumbs { margin: 0; }
.teacher-subrow:has(> .teacher-subject-switcher-wrap.hidden) > .crumb-cell { grid-column: 1 / -1; }
.row-back { font: inherit; font-weight: 800; font-size: 1.05rem; color: var(--olive-deep, #4B5A2A); background: var(--card); border: 2.5px solid var(--olive-deep, #4B5A2A); border-radius: 999px; padding: 8px 22px; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.08); white-space: nowrap; }
.row-back:hover { background: var(--olive-deep, #4B5A2A); color: #fff; }
.row-back.hidden { display: none; }
/* the page's own Back is tucked away (still there for the phone's Back key and the row's ‹ Back) */
body.chim-rowback #app-teacher .tab-panel .back-btn-xl:not(.modal-overlay *), body.chim-rowback #app-teacher .tab-panel .nb-back, body.chim-rowback #btn-teacher-back-home, body.chim-rowback #app-teacher .tab-panel #btn-asg-back-complete {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: 0 !important; border: 0 !important; overflow: hidden !important; clip-path: inset(50%) !important; opacity: 0 !important; pointer-events: none !important; }
@media (max-width: 899px) {
  .teacher-subrow > .crumb-cell { order: 1; }
  .row-back { font-size: 0.95rem; padding: 6px 16px; }
}
.teacher-subrow:has(> .crumb-cell:not(.hidden)) > .teacher-subject-switcher-wrap { grid-column: auto; }
@media (max-width: 899px) { .teacher-subrow:has(> .crumb-cell:not(.hidden)) > .teacher-subject-switcher-wrap { grid-column: 1 / -1; } }

/* v257: Quote of the Day box — label, icon and quote centered */
#teacher-home-main .quote-card { align-items: center !important; text-align: center !important; justify-content: center !important; }
#teacher-home-main .quote-card .weather-label { width: 100%; text-align: center; }
#teacher-home-main .quote-main { align-items: center !important; text-align: center !important; width: 100%; }
#teacher-home-main .quote-text { text-align: center; }
#teacher-home-main .quote-main { flex: 0 0 auto !important; justify-content: center; }

/* v258 Attendance (teacher): tools | calendar (+ Summary · Import · Export) | sections, rate and event */
.att-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.att-side > button { width: 100%; margin: 0; justify-content: center; text-align: center; white-space: normal !important; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.att-side > button.hidden { display: none; }
.att-under-cal { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; justify-content: center; }
.att-title-right { display: none; }
#att-chips-slot:empty { display: none; }
.att-pc { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.att-pc span { font-size: .82rem; font-weight: 800; border-radius: 999px; padding: 2px 10px; }
.att-pc .p { background: #E3F4E1; color: #2E7D32; } .att-pc .a { background: #FDE4E4; color: #C62828; }
.att-pc .l { background: #FFF1D6; color: #B26A00; } .att-pc .e { background: #E1ECFB; color: #1E5BB8; } .att-pc .m { background: #ECEEF1; color: #455A64; }
@media (min-width: 900px) {
  .attendance-layout.att3 { display: grid; grid-template-columns: minmax(190px, 230px) minmax(0, auto) minmax(300px, 1fr); gap: 24px; align-items: start; flex-wrap: nowrap; }
  .att-side { grid-template-columns: minmax(0, 1fr); }
  #panel-attendance #attendance-head { display: none !important; }
  .att-title-right { display: block; margin: 4px 0 10px; }
  #att-chips-slot .section-tabs { padding: 0; margin: 0 0 8px; justify-content: flex-start; }
}
@media (min-width: 900px) {
  .content:has(> #panel-attendance:not(.hidden) #attendance-main:not(.hidden)) { max-width: 1500px; }
  .attendance-layout.att3 { grid-template-columns: minmax(190px, 240px) minmax(380px, 1.2fr) minmax(320px, 1fr); }
  #stat-range-ticks { flex-wrap: wrap; }
}
@media (min-width: 900px) {
  .attendance-layout.att3 > * { width: 100%; min-width: 0; max-width: none; flex: none; }
  .attendance-layout.att3 .tick-list { display: flex; gap: 8px; }
  .attendance-layout.att3 .tick-list label { flex: 1 1 0; justify-content: center; white-space: nowrap; }
}
@media (min-width: 900px) {
  .attendance-layout.att3 { grid-template-columns: minmax(190px, 240px) minmax(340px, 470px) minmax(320px, 1fr); }
  .attendance-layout.att3 .tick-list label { display: inline-flex; align-items: center; gap: 8px; }
  .attendance-layout.att3 .tick-list label input { margin: 0; }
}
@media (min-width: 900px) { .attendance-layout.att3 .tick-list label { justify-content: center !important; } .attendance-layout.att3 .tick-list label input { flex: none !important; width: auto !important; } }

/* v259: Daily Journal and Classroom Behavior live in 🏫 Class only (hidden here; the Class tiles still open them) */
.att-side #btn-attendance-journal, .att-side #btn-classroom-behavior { display: none !important; }
.att-title-left { display: none; margin: 0 0 4px; }
@media (min-width: 900px) {
  .att-title-left { display: block; }
  .att-title-right { display: none !important; }
}

/* v260: the six Home tiles use CHIM's own icons */
.grp-btn .tab-icon img.grp-ic { width: 1em !important; height: 1em !important; object-fit: contain; display: block; }
#teacher-home-main .grp-btn .tab-icon { font-size: clamp(4.4rem, 17vh, 11rem) !important; }
@media (max-width: 899px) { #teacher-home-main .grp-btn .tab-icon { font-size: clamp(3.2rem, 10vh, 6rem) !important; } }

/* v261: 🏫 Class page tiles use CHIM's own icons */
.grp-grid .subject-card .icon img.grp-tile-img { width: 84px; height: 84px; object-fit: contain; display: block; margin: 0 auto; }
@media (max-width: 640px) { .grp-grid .subject-card .icon img.grp-tile-img { width: 64px; height: 64px; } }

/* v262: Weather and Quote boxes on the teacher Home — light olive green with black text */
/* v379 the two Home cards take the header's color (🛡️ Admin → Look), text dark or white to stay readable */
#teacher-home-main .weather-card, #teacher-home-main .quote-card { background: var(--head-card-bg, #D7E3B5) !important; border-color: var(--head-card-line, #BFCF92) !important; color: var(--head-card-ink, #111) !important; }
#teacher-home-main .weather-card *, #teacher-home-main .quote-card * { color: var(--head-card-ink, #111) !important; }
#teacher-home-main .weather-label, #teacher-home-main .quote-card .weather-label { color: var(--head-card-ink, #2B3318) !important; opacity: .8; }
#teacher-home-main .wx-dots span { background: var(--head-card-ink, #111) !important; opacity: .25; }
#teacher-home-main .wx-dots span.on { opacity: .7; }

/* v263 Attendance (computer): the calendar's last row ends on the same line as the left buttons and
   Today's Event; Summary · Import · Export sit under the calendar; month name as big as "Attendance" */
@media (min-width: 900px) {
  .attendance-layout.att3 { grid-template-rows: auto auto; row-gap: 14px; }
  .attendance-layout.att3 > .att-side { grid-area: 1 / 1; }
  .attendance-layout.att3 > .attendance-calendar-wrap { grid-area: 1 / 2; }
  .attendance-layout.att3 > .att-under-cal { grid-area: 2 / 2; margin-top: 0; }
  .attendance-layout.att3 > .attendance-stats-wrap { grid-area: 1 / 3; }
  .attendance-layout.att3.att-fit { align-items: stretch; }
  .attendance-layout.att3.att-fit > .att-side { display: flex; flex-direction: column; gap: 8px; }
  .attendance-layout.att3.att-fit > .att-side > button:not(.hidden):not(#btn-attendance-journal):not(#btn-classroom-behavior) { flex: 1 1 0; }
  .attendance-layout.att3.att-fit > .attendance-stats-wrap { display: flex; flex-direction: column; }
  .attendance-layout.att3.att-fit > .attendance-stats-wrap #attendance-events-box { flex: 1 1 auto; margin-bottom: 0; }
  .attendance-layout.att3 .cal-grid.att-sized, .attendance-layout.att3 .cal-weekdays.att-sized { width: calc(7 * var(--cal-cell) + 24px); margin-left: auto; margin-right: auto; }
  .attendance-layout.att3 .cal-nav.att-sized { width: calc(7 * var(--cal-cell) + 24px); margin-left: auto; margin-right: auto; }
}

/* v264 group pages fill the screen on a computer (Class 4 × 2 · Connect/Learn 4 · Arcade one row · Tools 3 × 2 · Grades one row) */
@media (min-width: 900px) {
  .content:has(> #panel-group:not(.hidden)), .content:has(> #panel-grades:not(.hidden) #grades-term-tabs.grp-fit:not(.hidden)) { max-width: none; }
  #grp-grid.grp-fit { display: grid; gap: 16px; }
  #grp-grid.grp-fit .subject-card { height: 100%; min-height: 0; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-size: clamp(1rem, 1.9vh, 1.35rem); }
  #grp-grid.grp-fit .subject-card .icon { font-size: var(--grp-ic, 84px); line-height: 1; margin: 0; }
  #grp-grid.grp-fit .subject-card .icon img.grp-tile-img, #grp-grid.grp-fit .subject-card .icon img { width: var(--grp-ic, 84px); height: var(--grp-ic, 84px); }
  #grades-term-tabs.grp-fit:not(.hidden) { display: grid !important; gap: 16px; padding: 0 !important; }
  #grades-term-tabs.grp-fit .tab-btn { height: 100%; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
  #grades-term-tabs.grp-fit .tab-btn .tab-icon { font-size: var(--grp-ic, 84px) !important; line-height: 1; }
  #grades-term-tabs.grp-fit .tab-btn .tab-icon img { width: 1em; height: 1em; }
  #grades-term-tabs.grp-fit .tab-btn .tab-label { font-size: clamp(1rem, 1.9vh, 1.35rem) !important; margin-top: 10px; }
}
/* small 3D icon next to titles and in the breadcrumbs */
img.title-ic { width: 1.35em; height: 1.35em; object-fit: contain; vertical-align: -0.3em; margin-right: 0.3em; }
.chim-crumbs img.title-ic { width: 1.3em; height: 1.3em; vertical-align: -0.32em; margin-right: 0.2em; }

/* v265 Weather box (teacher Home): icon | temperature side by side; tap the temperature for °C ↔ °F;
   line 1 = weather · wind, line 2 = as of … */
#teacher-home-main .weather-main { flex-direction: row !important; align-items: center !important; justify-content: center; gap: 14px !important; }
#teacher-home-main .weather-temp { cursor: pointer; user-select: none; border-radius: 10px; padding: 0 6px; }
#teacher-home-main .weather-temp:hover { background: rgba(0,0,0,.06); }
#teacher-home-main .weather-desc .wd-1, #teacher-home-main .weather-desc .wd-2 { display: block; }
#teacher-home-main .weather-desc .wd-2 { opacity: .8; font-size: .92em; }
#teacher-home-extras .weather-desc::before { content: none !important; }
@media (max-width: 899px) { #teacher-home-main .weather-main { gap: 8px !important; } #teacher-home-main .weather-icon { font-size: clamp(2rem, 5vh, 3rem) !important; } }
.grp-grid .subject-card .icon img.grp-tile-img { object-fit: contain; }

/* v268 3D icons on the Grades tiles (Term 1-3, Recovery Plan, FlashGrade) on every screen size */
#grades-term-tabs .tab-btn .tab-icon img { width: 1em; height: 1em; object-fit: contain; display: block; margin: 0 auto; }
@media (max-width: 640px) { #grades-term-tabs:not(.grp-fit) .tab-btn .tab-icon img { width: 64px; height: 64px; } }

/* v269 login: pictures on the 4 role cards (no descriptions). Wide screens: 1 row of 4, as big as the screen
   allows with no scrolling at 100% zoom. Phones and upright tablets: 2 × 2. */
.role-grid button { justify-content: center; gap: 8px; }
.role-grid button img.role-pic { display: block; width: auto; max-width: 100%; height: var(--role-pic, 96px); object-fit: contain; margin: 0 auto; pointer-events: none; -webkit-user-drag: none; }
#gate-role .role-grid { --role-pic: clamp(72px, min(20vw, calc(100dvh - 560px)), 150px); }
@media (min-width: 900px) and (orientation: landscape) {
  #gate-role .gate-card { max-width: 900px; }
  #gate-role .role-choice.role-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  #gate-role .role-grid { --role-pic: clamp(100px, calc(100dvh - 470px), 210px); }
  #gate-role .role-grid button { padding: 16px 10px 14px; font-size: 1.1rem; }
}
@media (max-width: 420px) { #gate-role .role-grid { --role-pic: clamp(64px, min(24vw, calc(100dvh - 520px)), 110px); } }

/* v273 weather and Quote of the Day pictures (the same 3D design on every device) */
.weather-icon img.emo-pic, .quote-icon img.emo-pic { width: 1em; height: 1em; object-fit: contain; display: block; -webkit-user-drag: none; user-select: none; }
img.emo-inline { width: 1.25em; height: 1.25em; object-fit: contain; vertical-align: -0.3em; }
.ctl-qpic-label { font-size: .85rem; font-weight: 600; margin: 10px 0 6px; }
.ctl-qpics { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 6px; }
.ctl-qpic { display: flex; align-items: center; justify-content: center; padding: 5px; border: 2px solid transparent; border-radius: 10px; background: rgba(255,255,255,.55); cursor: pointer; }
.ctl-qpic img.emo-pic { width: 34px; height: 34px; object-fit: contain; display: block; }
.ctl-qpic:hover { border-color: var(--rule, #C9BE9C); }
.ctl-qpic.on { border-color: var(--olive-deep, #4A5A23); background: #E8EFD3; }

/* v275 Grades: a tile opens its page (the 5 tiles hide again, as before v264). The section chips show inside the
   pages (Term 1-3, Recovery Plan, FlashGrade), not above the 5 tiles. */
body:has(#panel-grades:not(.hidden) #grades-term-tabs:not(.hidden)) #teacher-section-tabs { display: none !important; }

/* v276 🙋 Classroom Behavior on one page. Computer: title + tools on the left (one column), section chips and
   the table on the right (the table scrolls inside, so the page barely scrolls). Phone: tools in 2 columns. */
#attendance-behavior-view .beh-bar { margin-bottom: 4px; }
.beh-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.beh-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: start; }
.beh-title-left { grid-column: 1 / -1; margin: 0 0 4px; }
.beh-side > button, .beh-side > .beh-pick, .beh-side .beh-dl-wrap > button { width: 100%; margin: 0; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-align: center; white-space: normal; }
.beh-side .beh-dl-wrap { position: relative; }
.beh-side .beh-dl-wrap .fg-export-menu { left: 0; right: auto; }
.beh-side > button.on, .beh-side > .beh-pick.on { background: var(--olive-deep, #4A5A23); color: #fff; border-color: var(--olive-deep, #4A5A23); }
.beh-side > button:disabled { opacity: .45; cursor: not-allowed; }
.beh-pick { position: relative; cursor: pointer; font-weight: 600; }
.beh-pick input[type="date"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; padding: 0; border: 0; cursor: pointer; pointer-events: none; }
.beh-period { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; align-items: center; padding: 8px 10px; border: 1px solid var(--rule, #C9BE9C); border-radius: 12px; background: rgba(255, 255, 255, .5); }
.beh-period > label { grid-column: 1 / -1; margin: 0; font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.beh-period select, .beh-period input { width: 100%; margin: 0; min-height: 36px; }
.beh-period #behsum-pick { display: block; min-width: 0; }
.behsum-sy { display: block; font-weight: 700; font-size: .9rem; text-align: center; }
.beh-main { min-width: 0; }
#beh-chips-slot #teacher-section-tabs { margin: 0 0 10px; }
#beh-status:empty { display: none; }
#beh-status { margin: 0 0 8px; }
.beh-table th.beh-x, .beh-table td.beh-x { background: #F1F6E6; }
.beh-table thead th.beh-x { background: #3E7A39; }
.beh-table .beh-xp { display: block; font-weight: 500; font-size: .7rem; opacity: .9; }
@media (min-width: 900px) {
  .beh-layout { grid-template-columns: minmax(200px, 240px) minmax(0, 1fr); gap: 24px; align-items: start; }
  .beh-side { grid-template-columns: minmax(0, 1fr); }
  .beh-period { grid-template-columns: minmax(0, 1fr); }
  .content:has(> #panel-attendance:not(.hidden) #attendance-behavior-view:not(.hidden)) { max-width: none; }
}
@media (min-width: 900px) {
  .beh-layout { grid-template-columns: minmax(230px, 260px) minmax(0, 1fr); }
  .beh-title-left { font-size: clamp(1.25rem, 2.6vh, 1.6rem); white-space: nowrap; margin-bottom: 2px; }
  .beh-side { gap: 6px; }
  .beh-side > button, .beh-side > .beh-pick, .beh-side .beh-dl-wrap > button { min-height: clamp(34px, 5vh, 46px); padding-top: 4px; padding-bottom: 4px; }
  .beh-period { padding: 6px 8px; gap: 4px; }
  .beh-period select, .beh-period input { min-height: 30px; padding-top: 2px; padding-bottom: 2px; }
}
.beh-side > button.on, .beh-side > .beh-pick.on, .beh-side > button.on:hover, .beh-side > button.on:focus { background: var(--olive-deep, #4A5A23) !important; color: #fff !important; border-color: var(--olive-deep, #4A5A23) !important; }

/* v277 page head: the title on the left, the section chips centered under Now viewing (computers);
   Classroom Behavior's table and Daily Journal's Entries start on the same line as the left column */
.pg-head { display: block; margin: 0 0 10px; }
.pg-head .pg-chips:empty { display: none; }
.pg-chips #teacher-section-tabs { margin: 0 !important; justify-content: center; }
.jr-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
#journal-status:empty { display: none; }
.jr-main .journal-entries-label { margin-top: 0; }
.jr-dl-wrap { position: relative; display: inline-block; }
.jr-dl-wrap .fg-export-menu { right: 0; left: auto; }
@media (min-width: 900px) {
  .pg-head { display: flex; align-items: center; gap: 16px; min-height: 52px; }
  .pg-head > :first-child { flex: 1 1 auto; min-width: 0; }
  .pg-head .pg-chips { flex: none; margin-left: auto; }
  .pg-head:has(.pg-chips:not(:empty)) > :first-child { flex: 0 1 auto; }
  .pg-head .beh-title-left { margin: 0; }
  .jr-layout { grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }
  .jr-layout .journal-new { margin: 0; }
  .content:has(> #panel-attendance:not(.hidden) #attendance-journal-view:not(.hidden)) { max-width: none; }
}
@media (min-width: 900px) {
  .pg-head { position: relative; }
  .pg-head .pg-chips { position: absolute; top: 50%; transform: translateY(-50%); margin: 0; display: flex; justify-content: center; }
}

/* v278 Daily Journal: the note sits under the Add entry card, justified to the card's width */
.jr-note { margin: 0; text-align: justify; text-align-last: justify; font-size: .9rem; }
@media (min-width: 900px) {
  .jr-layout { grid-template-rows: auto 1fr; }
  .jr-layout > .journal-new { grid-column: 1; grid-row: 1; }
  .jr-layout > .jr-note { grid-column: 1; grid-row: 2; align-self: start; margin-top: -12px; }
  .jr-layout > .jr-main { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 899px) { .jr-layout > .jr-note { margin-top: -8px; text-align-last: auto; } }

/* v278 📋 Class List: title + chips row; tools and counts on the left (phones: 2 columns), table on the right */
.cl-title { margin: 0; }
.cl-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.cl-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: start; }
.cl-side > button, .cl-side .cl-dl-wrap > button { width: 100%; margin: 0; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.cl-side .cl-dl-wrap { position: relative; }
.cl-side .cl-dl-wrap .fg-export-menu { left: 0; right: auto; }
.cl-count { grid-column: 1 / -1; border: 1px solid var(--rule, #C9BE9C); border-radius: 12px; background: rgba(255, 255, 255, .55); padding: 10px 12px; font-size: .92rem; }
.cl-count-h { font-weight: 700; margin-bottom: 6px; }
.cl-count-row { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dashed var(--rule, #D9D2BC); }
.cl-count-row.cl-total { border-bottom: 0; font-size: 1rem; }
.cl-adv { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rule, #C9BE9C); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; }
.cl-adv > b { text-align: right; }
.cl-adv-hint { flex-basis: 100%; font-size: .78rem; }
.cl-main { min-width: 0; }
.cl-old-actions { display: none !important; }
.cl-edit-grp { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.cl-edit-grp button.on { background: #FFF1E0; }
.cl-edit-grp .cl-save-btn { background: var(--olive-deep, #4A5A23); color: #fff; border-color: var(--olive-deep, #4A5A23); }
.cl-edit-fallback { margin-bottom: 8px; }
@media (min-width: 900px) {
  .cl-layout { grid-template-columns: minmax(220px, 250px) minmax(0, 1fr); gap: 24px; align-items: start; }
  .cl-side { grid-template-columns: minmax(0, 1fr); }
  .content:has(> #panel-students:not(.hidden) #students-classlist-view:not(.hidden)) { max-width: none; }
}
/* 🧑‍🏫 Admin → Advisers */
.adv-list { display: flex; flex-direction: column; gap: 8px; max-width: 980px; }
.adv-row { display: grid; grid-template-columns: 140px minmax(160px, 1fr) minmax(180px, 1.4fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--rule, #C9BE9C); border-radius: 12px; background: rgba(255, 255, 255, .55); }
.adv-row select, .adv-row input { margin: 0; width: 100%; }
.adv-sec { display: flex; flex-direction: column; }
.adv-msg { grid-column: 1 / -1; min-height: 0; }
.adv-msg:empty { display: none; }
@media (max-width: 700px) { .adv-row { grid-template-columns: 1fr; } }
@media (min-width: 900px) { #students-list .tbl-wrap, #journal-list .tbl-wrap, #beh-table .tbl-wrap { overflow: auto; } }
#students-import-status:empty { display: none; }
#students-list > .tbl-box:first-child, #journal-list > .tbl-box:first-child { margin-top: 0; }
.jr-note { text-align-last: auto !important; hyphens: auto; }

/* v279 Student Monitoring: title + chips row; Period and Download in the table's tool bar; one-line footer */
.smon-title { margin: 0; }
.smon-park { margin: 0 0 8px; }
.smon-park:empty { display: none; }
#smon-status:empty { display: none; }
.smon-tools { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.smon-period-lbl { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: .85rem; font-weight: 600; }
.smon-period-lbl select { width: auto; margin: 0; min-height: 34px; padding-top: 2px; padding-bottom: 2px; }
.smon-tools .smon-dl > .btn-small { margin: 0; }
.smon-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 8px; font-size: .82rem; color: var(--ink-soft); }
.smon-foot .status-legend { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; }
.smon-sep { color: var(--rule, #C9BE9C); }
#students-monitor-view .tbl-tools { flex-wrap: wrap; }
@media (min-width: 900px) {
  #smon-table .tbl-wrap { overflow: auto; }
  #students-monitor-view .pg-head { margin-bottom: 10px; }
}
@media (max-width: 899px) { #smon-table .tbl-tools .smon-tools { flex-basis: 100%; } }
/* College Gate question editor */
.cged-branches { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.cged-n { background: var(--olive-deep, #4A5A23); color: #fff; border-radius: 999px; padding: 0 6px; font-size: .72rem; margin-left: 4px; }
.chip.active .cged-n { background: #fff; color: var(--olive-deep, #4A5A23); }
.cged-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.cged-bar select, .cged-bar input { width: auto; flex: 1 1 200px; margin: 0; }
.cged-bar .btn-small { margin: 0; }
.cged-count { margin-bottom: 8px; }
.cged-list { display: flex; flex-direction: column; gap: 8px; }
.cged-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--rule, #C9BE9C); border-radius: 12px; background: rgba(255, 255, 255, .6); }
.cged-row.is-hidden { opacity: .55; }
.cged-no { font-weight: 800; display: flex; flex-direction: column; } .cged-no small { font-weight: 500; color: var(--ink-soft); }
.cged-qt { margin-bottom: 4px; }
.cged-ans { font-size: .88rem; }
.cged-tags { display: flex; gap: 6px; margin-top: 4px; }
.cged-tag { font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.t-add { background: #E3F2E1; color: #2E6B2A; } .t-ed { background: #FFF1D6; color: #8A5A00; } .t-hid { background: #ECECEC; color: #555; }
.cged-acts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.cged-acts .btn-small { margin: 0; }
.cged-form { border: 2px solid var(--olive-deep, #4A5A23); border-radius: 12px; padding: 12px 14px; background: #FBFAF4; display: flex; flex-direction: column; gap: 8px; }
.cged-form-h { font-weight: 800; }
.cged-form label { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: .85rem; font-weight: 600; }
.cged-form textarea, .cged-form input[type="text"], .cged-form select { width: 100%; margin: 0; font: inherit; }
.cged-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cged-ok input { border-color: #2E7D32 !important; background: #F1F8EE; }
.cged-nof { flex-direction: row !important; align-items: center; }
.cged-prev { border: 1px dashed var(--rule, #C9BE9C); border-radius: 10px; padding: 8px 10px; background: #fff; }
.cged-form-acts { display: flex; gap: 8px; } .cged-form-acts .btn-small { margin: 0; }
@media (max-width: 640px) { .cged-row { grid-template-columns: 40px minmax(0, 1fr); } .cged-acts { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; } .cged-choices { grid-template-columns: 1fr; } }
@media (min-width: 900px) { .content:has(> #panel-students:not(.hidden) #students-monitor-view:not(.hidden)) { max-width: none; } #students-monitor-view .smon-wrap { width: auto; margin-left: 0; } }
/* v280 Multimodal: ✔ in the list; tick it in ✏️ Edit this Class */
.stu-mm-yes { color: #2E6B2A; font-size: 1.05rem; }
td.stu-mm-cell { text-align: center; }
td.stu-mm-cell input.draft-mm { width: 20px; height: 20px; margin: 0; }

/* v281 🪑 Seat Plan: section chips next to < Back; title + Setup on the left (about 40%), the seat plan on the right */
.seat-chips-slot { display: flex; align-items: center; min-width: 0; }
.seat-chips-slot .sp-secs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.seat-chips-slot .sp-secs .chip { margin: 0; }
.sp-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.sp-title { margin: 0 0 8px; }
.sp-left .sp-setup { margin-top: 0; }
.sp-right { min-width: 0; }
.sp-right .sp-tools { margin-top: 0; }
@media (max-width: 899px) { #teacher-crumb-cell:has(.seat-chips-slot:not(.hidden)) { flex-wrap: wrap; } .seat-chips-slot { flex-basis: 100%; margin-top: 6px; } }
@media (min-width: 900px) {
  .sp-layout { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px; align-items: start; }
  .content:has(> #panel-setup:not(.hidden) #setup-seat-view:not(.hidden)) { max-width: none; }
  .sp-left .sp-table-wrap { overflow-x: auto; }
}
/* v282 search: more result groups */
.home-search-results { max-height: min(70vh, 560px); overflow-y: auto; }

/* v283 City Weather ⇄ Air Quality (swipe or ‹ ›) and the Quote of the Day history */
.weather-card { position: relative; }
.weather-card .hidden { display: none !important; }
.wx-page { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; flex: 1 1 auto; min-height: 0; }
.wx-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 44px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .45); font-size: 1.4rem; font-weight: 700; line-height: 1; cursor: pointer; padding: 0; z-index: 2; }
.wx-nav:hover { background: rgba(255, 255, 255, .8); }
.wx-prev { left: 6px; } .wx-next { right: 6px; }
.wx-dots { display: flex; gap: 6px; justify-content: center; margin-top: 4px; }
.wx-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(0, 0, 0, .22); }
.wx-dots span.on { background: rgba(0, 0, 0, .6); }
.aq-ring .aq-svg { width: 1em; height: 1em; display: block; }
.aq-num { font-size: clamp(1.8rem, 5vh, 3.2rem); font-weight: 700; line-height: 1; display: flex; flex-direction: column; align-items: center; }
.aq-num small { font-size: .32em; font-weight: 700; letter-spacing: .08em; opacity: .75; margin-top: 2px; }
#wx-page-aq .weather-desc .wd-1, #wx-page-aq .weather-desc .wd-2 { display: block; }
#wx-page-aq .weather-desc .wd-2 { opacity: .8; font-size: .92em; }
#teacher-home-main #wx-page-aq .weather-main { flex-direction: row !important; align-items: center !important; justify-content: center; gap: 14px !important; }
.quote-card { cursor: pointer; position: relative; }
.q-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 8px; width: 100%; }
.q-nav.hidden { display: none !important; }
.q-btn { border: 1px solid rgba(0, 0, 0, .25); background: rgba(255, 255, 255, .55); border-radius: 999px; padding: 4px 12px; font-size: .82rem; font-weight: 700; cursor: pointer; }
.q-btn:disabled { opacity: .35; cursor: default; }
.q-date { font-size: .8rem; font-weight: 700; min-width: 90px; text-align: center; }
.quote-card.q-tomorrow .quote-text { font-style: normal; }
@media (max-width: 899px) { .wx-nav { width: 24px; height: 36px; font-size: 1.1rem; } .q-btn { padding: 3px 8px; font-size: .74rem; } }
.wx-page { padding: 0 34px; box-sizing: border-box; }
#wx-page-aq .weather-desc { font-size: .88rem; line-height: 1.3; }
@media (max-width: 899px) { .wx-page { padding: 0 24px; } #wx-page-aq .weather-desc { font-size: .66rem; line-height: 1.2; } #wx-page-aq .weather-desc .wd-2 { font-size: .95em; } }
.wx-dots { position: absolute; left: 0; right: 0; bottom: 6px; margin: 0; }
#teacher-home-main .weather-card { padding-bottom: 18px; }
@media (min-width: 900px) { #wx-page-aq .weather-desc { font-size: .8rem; } #wx-page-aq .aq-ring { font-size: clamp(3rem, 10vh, 6.5rem) !important; } #wx-page-aq .aq-num { font-size: clamp(1.6rem, 4.4vh, 2.8rem); } }

/* v284 3D subject pictures (as tall as the text; big on tiles), College Gate building, School Policies scroll */
img.subj-ic { width: 1.2em; height: 1.2em; object-fit: contain; vertical-align: -0.25em; display: inline-block; -webkit-user-drag: none; }
.subject-card .icon img.subj-ic { width: 1em; height: 1em; display: block; margin: 0 auto; vertical-align: 0; }
.sec-subj img.subj-ic { width: 1.25em; height: 1.25em; margin-right: 2px; vertical-align: -0.3em; }
.teacher-subject-switcher-wrap { align-items: center; }
img.subj-switch-ic { width: 1.35em; height: 1.35em; margin: 0 2px 0 4px; flex: none; vertical-align: middle; }
img.subj-switch-ic.hidden { display: none; }
img.cg-bldg { object-fit: contain; height: auto; aspect-ratio: 1 / 1; }
.cg-tile-ico { height: 3.4rem !important; width: 3.4rem !important; }

/* v285 phones: short weather / air quality text that fits the box */
.weather-desc .wd-short { display: none; }
@media (max-width: 899px) {
  .weather-desc .wd-long { display: none; }
  .weather-desc .wd-short { display: inline; }
  #teacher-home-main .weather-desc { font-size: .7rem; line-height: 1.2; }
  #teacher-home-main #wx-page-aq .weather-desc { font-size: .7rem; }
  #teacher-home-main .wx-page { overflow: hidden; }
  #teacher-home-main .wx-page .weather-label { margin-bottom: 0; }
}
#teacher-home-main .wx-page { overflow: hidden; min-height: 0; }
@media (max-width: 380px) { #teacher-home-main .aq-num { font-size: 1.55rem !important; } #teacher-home-main #wx-page-aq .weather-main { gap: 6px !important; } #teacher-home-main .weather-temp { font-size: 1.45rem !important; } }

/* v286 🎡 Random Picker */
.pk-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.pk-title { margin: 0; }
.pk-sec { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; }
.pk-sec select { width: auto; margin: 0; }
.pk-modes { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pk-opts { display: flex; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 12px; font-size: .9rem; }
.pk-opts label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.pk-spin { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: center; }
.pk-wheel { max-width: 460px; width: 100%; margin: 0 auto; }
.pk-svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 14px rgba(0,0,0,.15)); }
.pk-side { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.pk-go { max-width: 240px; font-size: 1.15rem; }
.pk-win { min-height: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pk-win small { color: var(--ink-soft); font-size: .85rem; }
.pk-win b { font-size: clamp(1.4rem, 4vw, 2.2rem); line-height: 1.15; color: var(--olive-deep, #4A5A23); }
.pk-gset { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.pk-radio { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; }
.pk-radio input[type="number"] { width: 80px; margin: 0; }
.pk-gbtns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pk-gbtns .btn-small { margin: 0; }
.pk-dl-wrap { position: relative; }
.pk-glist { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.pk-gcard { border: 2px solid var(--pk); border-radius: 14px; background: #fff; overflow: hidden; }
.pk-gh { background: var(--pk); color: #fff; font-weight: 800; padding: 6px 12px; display: flex; justify-content: space-between; }
.pk-gcard ol { margin: 8px 0 10px; padding-left: 30px; font-size: .92rem; }
.pk-big { position: fixed; inset: 0; z-index: 9000; background: #F6F1E4; overflow: auto; padding: 18px; }
.pk-big-top { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; font-size: 1.3rem; }
.pk-big-top b { flex: 1; }
.pk-big .pk-glist { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.pk-big .pk-gh { font-size: 1.4rem; padding: 10px 16px; }
.pk-big .pk-gcard ol { font-size: 1.25rem; line-height: 1.5; }
@media (min-width: 900px) { .pk-spin { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } .pk-wheel { max-width: min(460px, calc(100vh - 320px)); } }
/* v286 📄 Text Extractor */
.ext-title { margin: 0 0 4px; }
.ext-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; border: 2px dashed var(--rule, #C9BE9C); border-radius: 14px; background: rgba(255,255,255,.55); cursor: pointer; text-align: center; margin: 0 0 12px; }
.ext-drop.over { border-color: var(--olive-deep, #4A5A23); background: #EEF4DD; }
.ext-drop input { display: none; }
.ext-drop-ic { font-size: 2rem; }
.ext-all { display: flex; gap: 8px; margin-bottom: 10px; } .ext-all .btn-small { margin: 0; }
.ext-list { display: flex; flex-direction: column; gap: 12px; }
.ext-item { border: 1px solid var(--rule, #C9BE9C); border-radius: 12px; padding: 10px 12px; background: #fff; }
.ext-item.is-err { background: #FFF6F2; }
.ext-ih { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.ext-ih small { color: var(--ink-soft); }
.ext-text { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: .82rem; margin: 0 0 8px; }
.ext-err { color: #8A3B12; font-size: .9rem; }
.ext-acts { display: flex; gap: 8px; } .ext-acts .btn-small { margin: 0; }
.pk-svg { filter: none !important; }
.pk-wheel { border-radius: 50%; box-shadow: 0 6px 16px rgba(0,0,0,.14); }
.pk-rot { will-change: transform; }
.pk-opts label, .pk-radio { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 8px; width: auto !important; }
.pk-opts input[type="checkbox"], .pk-radio input[type="radio"] { width: 18px !important; height: 18px; margin: 0 !important; flex: none; }
.pk-radio input[type="number"] { width: 80px !important; flex: none; }
.pk-gset { align-items: flex-start; }

/* v287 FlashPick: title + section chips row; left = modes + wheel (Spin at its top right) or group settings; right = tick list / groups table */
.pk-head { margin-bottom: 10px; }
.pk-head .pk-title { margin: 0; }
.pk-secs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.pk-secs .chip { margin: 0; }
.pk-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.pk-spinbox { position: relative; max-width: 460px; margin: 0 auto; }
.pk-spinbox .pk-go { position: absolute; top: 0; right: -6px; z-index: 2; width: auto; max-width: none; padding: 10px 18px; font-size: 1rem; }
.pk-left .pk-win { margin-top: 8px; text-align: center; }
.pk-left .pk-count { text-align: center; }
.pk-list-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pk-list-bar b { margin-right: auto; }
.pk-list-bar .btn-small { margin: 0; }
.pk-list { overflow: auto; border: 1px solid var(--rule, #C9BE9C); border-radius: 12px; background: #fff; }
.pk-table { width: 100%; margin: 0; }
.pk-table td, .pk-table th { padding: 6px 10px; }
.pk-table input.pk-tick { width: 18px !important; height: 18px; margin: 0 !important; }
.pk-table tr.pk-off td { color: #9CA3AF; }
.pk-table tr.pk-latest td { background: #FFF6D6; font-weight: 700; }
.pk-abs { color: #B45309; font-size: .72rem; font-weight: 700; }
.pk-gcell { border-left: 6px solid var(--pk) !important; vertical-align: top; white-space: nowrap; }
.pk-table tr.pk-gstart td { border-top: 2px solid var(--rule, #C9BE9C); }
@media (min-width: 900px) {
  .pk-layout { grid-template-columns: minmax(0, 1.15fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
  .content:has(> #panel-setup:not(.hidden) #setup-picker-view:not(.hidden)), .content:has(> #panel-setup:not(.hidden) #setup-extract-view:not(.hidden)) { max-width: none; }
  .pk-spinbox { max-width: min(460px, calc(100vh - 330px)); }
}
@media (max-width: 899px) { .pk-head .pg-chips { margin-top: 8px; } .pk-secs { justify-content: flex-start; } }
/* v287 Text Extractor: files on the left, text on the right (computers) */
.ext-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.ext-right { min-width: 0; }
.ext-empty { margin: 0; }
@media (min-width: 900px) { .ext-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; } .ext-right { overflow: auto; padding-right: 4px; } }
@media (min-width: 900px) { .pk-head .pg-chips { position: static !important; transform: none !important; margin-left: auto; } }

/* v288 FlashPick: ↺ at the wheel's top left, Spin at its top right, picked name pops up over the wheel */
.pk-reset { position: absolute; top: 0; left: -6px; z-index: 2; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--olive-deep, #4A5A23); background: #fff; color: var(--olive-deep, #4A5A23); font-size: 1.5rem; font-weight: 700; cursor: pointer; line-height: 1; }
.pk-reset:hover { background: #EEF4DD; }
.pk-norep { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px; margin: 0; font-size: .85rem; width: auto !important; }
.pk-norep input { width: 18px !important; height: 18px; margin: 0 !important; }
.pk-cnt { font-weight: 500; color: var(--ink-soft); font-size: .9em; }
.pk-pop { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; min-width: 60%; max-width: 92%; padding: 18px 22px; border: 3px solid var(--olive-deep, #4A5A23); border-radius: 18px; background: #FFFDF5; box-shadow: 0 12px 30px rgba(0,0,0,.25); display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; animation: pkPop .25s ease-out; }
.pk-pop small { font-size: .95rem; color: var(--ink-soft); }
.pk-pop b { font-size: clamp(1.4rem, 3.4vw, 2.3rem); line-height: 1.15; color: var(--olive-deep, #4A5A23); text-align: center; }
.pk-pop em { font-size: .75rem; color: var(--ink-soft); font-style: normal; }
@keyframes pkPop { from { transform: translate(-50%, -50%) scale(.7); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.pk-list-bar { flex-wrap: nowrap; }
.pk-list-bar b { white-space: nowrap; font-size: .95rem; }
.pk-list-bar .btn-small { padding: 6px 10px; font-size: .82rem; white-space: nowrap; min-height: 0; }
.pk-norep { white-space: nowrap; font-size: .8rem; }
@media (max-width: 1200px) { .pk-list-bar { flex-wrap: wrap; } }
/* v289 students/parents: 3D icons on the subject tiles and the pages inside */
#app-student .tab-btn .tab-icon img.stu-tile-ic, #app-student .subject-card .icon img.stu-tile-ic { width: 1em; height: 1em; display: block; margin: 0 auto; object-fit: contain; }

/* v290 students/parents on computers: subject tiles fill the screen (parents 1x5, students 2x4) */
@media (min-width: 900px) {
  #subject-sub-tabs.stu-fit { display: grid !important; gap: 16px; }
  #subject-sub-tabs.stu-fit .tab-btn { height: 100%; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
  #subject-sub-tabs.stu-fit .tab-btn .tab-icon { font-size: var(--stu-ic, 84px) !important; line-height: 1; }
  #subject-sub-tabs.stu-fit .tab-btn .tab-label { font-size: clamp(1rem, 1.9vh, 1.35rem) !important; margin-top: 10px; }
  .content:has(#subject-sub-tabs.stu-fit) { max-width: none; }
}
/* Backpack: the calculator as a picture with its name (no box), like the notebooks */
.bp-tool.bp-tool-pic { border: none !important; background: transparent !important; justify-content: center; gap: 8px; }
.bp-calc-pic { width: 78%; max-width: 160px; height: auto; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.15)); }

/* v291 elective group picker in Class Setup */
.setup-eg-row { display: flex; align-items: center; gap: 10px; }
.setup-eg-row .setup-eg-pic { width: 44px; height: 44px; object-fit: contain; flex: none; }
.setup-eg-row select { flex: 1; min-width: 0; }
/* v292 Faculty → Teachers: coordinator ticks */
.tch-coord { display: flex; flex-direction: column; gap: 4px; white-space: nowrap; }
.tch-coord label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 600; }
.tch-coord input { width: 18px; height: 18px; margin: 0; flex: none; }
/* v294 Quote of the Day: ‹ › on the sides like City Weather; the date small under the quote */
.quote-card { cursor: default; }
#teacher-home-main .quote-card { padding-left: 46px !important; padding-right: 46px !important; }
.wx-nav:disabled { opacity: .35; cursor: default; }
.quote-card .q-nav { margin-top: 2px; }
.quote-card .q-date { font-size: .72rem; font-weight: 600; opacity: .75; min-width: 0; }
@media (max-width: 899px) { #teacher-home-main .quote-card { padding-left: 34px !important; padding-right: 34px !important; } .quote-card .q-date { font-size: .62rem; } }
/* v295 College Gate ✕ Close / ‹ Back: wide enough for its text */
.cg-top .cg-back.back-btn-xl { width: auto !important; min-width: max-content !important; max-width: none !important; overflow: visible; flex-shrink: 0; justify-content: center; }
/* v295 Recovery Plan: section dropdown next to ↻ Refresh */
.rcv-sec-pick { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 700; }
.rcv-sec-pick select { width: auto; min-width: 120px; margin: 0; }
/* v298 Skill games: 🚀 Launch all in each branch header */
.arcade-cat .arc-sec-launch { order: 2; flex: none; padding: 4px 12px; font-size: .82rem; min-height: 0; letter-spacing: 0; font-weight: 700; }
.arcade-cat:has(.arc-sec-launch)::after { order: 1; min-width: 8px; }
@media (max-width: 640px) { .arcade-cat .arc-sec-launch { padding: 3px 8px; font-size: .72rem; } .arcade-cat:has(.arc-sec-launch) .n { font-size: .7rem; } }
/* v299 Student Monitoring: CHIM / this subject time under Active */
.smon-act-t { display: block; font-weight: 500; opacity: .8; font-size: .78em; line-height: 1.25; margin-top: 2px; }
/* v300 ↻ Refresh: a drawn icon whose circle is the button's center; only the icon spins (no wobble) */
.refresh-btn { padding: 0 !important; }
.refresh-btn .rf-ic { width: 18px; height: 18px; display: block; transform-origin: 50% 50%; transform-box: view-box; }
.refresh-btn.spinning { animation: none !important; }
.refresh-btn.spinning .rf-ic { animation: chim-refresh-spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .refresh-btn.spinning .rf-ic { animation-duration: 2.4s; } }
/* v304 Class Program: tools next to ⛶; Share menu with ticks */
#prog-table .tbl-tools .prog-tools { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prog-tools .btn-small { margin: 0; }
.prog-tools .report-dl, .prog-tools .fg-export-wrap { position: relative; display: inline-block; }
.prog-tools .fg-export-menu { left: 0; right: auto; }
.prog-tools .fg-export-menu .fg-export-title, .prog-share-menu .fg-export-title { display: block; margin-bottom: 6px; }
.prog-tools .fg-export-menu .summary-dl-opt { display: block; width: 100%; margin: 4px 0 0; }
.prog-share-wrap { position: relative; display: inline-block; }
.prog-share-menu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 60; background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.18); padding: 12px 14px; width: 270px; max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.prog-share-menu.hidden { display: none; }
.prog-sh-opt { display: flex !important; align-items: center; gap: 8px; margin: 0 !important; font-weight: 600; cursor: pointer; }
.prog-sh-opt input { width: 18px !important; height: 18px; margin: 0 !important; flex: none; }
.prog-sh-all { border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
.prog-teacher-lbl { display: inline-flex !important; align-items: center; gap: 8px; margin: 0 !important; font-weight: 700; }
.prog-teacher-lbl.hidden { display: none !important; }
.prog-teacher-lbl select { width: auto; min-width: 140px; margin: 0; }
@media (max-width: 899px) { #prog-table .tbl-tools .prog-tools { flex-basis: 100%; } .prog-share-menu { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; z-index: 3000; } }
/* v304 Now viewing: one size (never stretched by a tall breadcrumb) */
.teacher-subrow > .teacher-subject-switcher-wrap { align-self: start; height: auto; max-height: 56px; }
/* v306 Seat Plan / Cleaners Today: the saved copy shows first while the fresh data loads */
.chim-updating { display: inline-block; margin: 4px 0 8px; padding: 3px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--rule); font-size: .8rem; font-weight: 600; color: var(--ink-soft, #555); }

/* ===== v307 Mabisang Komunikasyon Skill games (mk-games.js) ===== */
.mk-root { --mk-ink: #f5f3ff; --mk-card: #fffaf0; --mk-cink: #2a2140; --mk-acc: #ffcf3f; --mk-accink: #2a1a00; border-radius: 20px; overflow: hidden; color: var(--mk-ink); font-family: "Nunito", "Segoe UI", system-ui, sans-serif; }
.mk-audience { --mk-bg: linear-gradient(rgba(26,18,64,.78), rgba(26,18,64,.92)), url(assets/mk/bg-church.webp); }
.mk-listen { --mk-bg: linear-gradient(rgba(8,40,40,.72), rgba(8,30,30,.92)), url(assets/mk/bg-beach.webp); --mk-acc: #ffd166; }
.mk-graph { --mk-bg: linear-gradient(rgba(11,21,48,.74), rgba(11,21,48,.92)), url(assets/mk/bg-terraces.webp); --mk-acc: #38bdf8; --mk-accink: #03202e; }
.mk-words { --mk-bg: linear-gradient(rgba(60,28,8,.74), rgba(43,19,6,.92)), url(assets/mk/bg-mayon.webp); --mk-acc: #f59e0b; --mk-accink: #2b1306; }
.mk-stage { background: var(--mk-bg); background-size: cover; background-position: center; min-height: min(78vh, 760px); padding: 16px clamp(12px, 3vw, 28px) 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mk-stage > * { width: min(860px, 100%); }
.mk-intro { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.mk-lesson { font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.mk-title { font-family: "Baloo 2", "Trebuchet MS", system-ui, sans-serif; font-size: clamp(1.4rem, 3.4vw, 2rem); margin: 0; color: var(--mk-ink); }
.mk-how { background: rgba(0,0,0,.35); border-radius: 16px; padding: 12px 16px; line-height: 1.5; backdrop-filter: blur(4px); width: 100%; }
.mk-how ol { margin: 6px 0 0; padding-left: 20px; } .mk-how li { margin: 4px 0; }
.mk-meta { font-weight: 700; opacity: .9; }
.mk-go { border: 0; border-radius: 14px; padding: 12px 22px; background: var(--mk-acc); color: var(--mk-accink); font-weight: 900; font-size: 1.05rem; cursor: pointer; box-shadow: 0 5px 0 rgba(0,0,0,.25); }
.mk-go:active { transform: translateY(2px); box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.mk-next { align-self: center; margin-top: 4px; }
.mk-hud { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.mk-pill { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.16); font-weight: 800; font-size: .88rem; white-space: nowrap; backdrop-filter: blur(4px); }
.mk-area { display: flex; flex-direction: column; gap: 12px; }
.mk-card { background: var(--mk-card); color: var(--mk-cink); border-radius: 18px; padding: 14px 18px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.mk-graph .mk-card { background: #0f1d3d; color: #eef4ff; }
.mk-lbl { font-size: .76rem; font-weight: 800; letter-spacing: .07em; opacity: .75; text-transform: uppercase; }
.mk-big { font-family: "Baloo 2", "Trebuchet MS", system-ui, sans-serif; font-size: clamp(1.1rem, 2.6vw, 1.4rem); font-weight: 800; line-height: 1.3; margin-top: 4px; }
.mk-big.mk-sm { font-size: clamp(1rem, 2.2vw, 1.2rem); } .mk-quote { font-style: italic; font-weight: 700; }
.mk-note { margin: 0; text-align: center; opacity: .92; }
.mk-choices { display: grid; gap: 10px; }
.mk-c { display: flex; gap: 10px; align-items: flex-start; text-align: left; border-radius: 14px; padding: 12px 14px; background: rgba(0,0,0,.38); border: 2px solid rgba(255,255,255,.22); color: var(--mk-ink); font-weight: 700; font-size: 1rem; line-height: 1.35; cursor: pointer; backdrop-filter: blur(4px); width: 100%; }
.mk-c b { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--mk-acc); color: var(--mk-accink); }
.mk-c:hover:not(:disabled) { border-color: var(--mk-acc); } .mk-c:disabled { cursor: default; }
.mk-c.right { border-color: #3ddc84; background: rgba(61,220,132,.22); } .mk-c.wrong { border-color: #ff5d73; background: rgba(255,93,115,.2); }
.mk-c.sel { border-color: var(--mk-acc); background: rgba(255,255,255,.18); }
.mk-sm .mk-c { padding: 9px 12px; font-size: .94rem; }
.mk-fb { border-radius: 14px; padding: 10px 14px; font-weight: 700; background: rgba(0,0,0,.4); border-left: 6px solid #ff5d73; }
.mk-fb.ok { border-left-color: #3ddc84; }
.mk-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.mk-tag { padding: 4px 10px; border-radius: 999px; font-weight: 800; font-size: .85rem; background: var(--mk-acc); color: var(--mk-accink); }
.mk-tag.no { background: rgba(255,93,115,.85); color: #fff; }
.mk-deck { display: flex; gap: 10px; }
.mk-dc { flex: 1; border-radius: 16px; padding: 10px 12px; font-weight: 800; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 6px 0 rgba(0,0,0,.25); background: linear-gradient(160deg,#ff8a5b,#e6457a); color: #fff; }
.mk-dc small { font-weight: 700; opacity: .92; } .mk-dc1 { background: linear-gradient(160deg,#44c4a1,#2a7fd6); } .mk-dc2 { background: linear-gradient(160deg,#a78bfa,#6d4ad8); }
.mk-dc.on { outline: 4px solid var(--mk-acc); transform: translateY(-3px); } .mk-dc.done { opacity: .55; }
.mk-player { display: flex; align-items: center; gap: 14px; background: rgba(0,0,0,.35); border-radius: 18px; padding: 12px 16px; backdrop-filter: blur(4px); }
.mk-play { flex: none; width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--mk-acc); font-size: 1.5rem; cursor: pointer; box-shadow: 0 4px 0 rgba(0,0,0,.25); }
.mk-play.on { animation: mk-pulse 1s ease-in-out infinite; } .mk-play:disabled { opacity: .55; cursor: default; }
@keyframes mk-pulse { 50% { transform: scale(1.08); } }
.mk-pl-body { flex: 1; min-width: 0; } .mk-pl-t { font-weight: 900; } .mk-pl-sub { font-size: .82rem; opacity: .85; margin-top: 2px; }
.mk-wave { height: 30px; margin-top: 4px; border-radius: 6px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.28) 0 3px, transparent 3px 7px); position: relative; overflow: hidden; }
.mk-wave i { position: absolute; inset: 0 auto 0 0; width: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.95) 0 3px, transparent 3px 7px); }
.mk-nb { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mk-box { background: #fffdf4; color: #1d2b2a; border-radius: 14px; padding: 10px 12px; border-top: 6px solid var(--mk-acc); min-height: 64px; }
.mk-box.on { outline: 3px solid var(--mk-acc); } .mk-box.done { border-top-color: #3ddc84; }
.mk-box-t { font-weight: 900; font-size: .86rem; } .mk-box-a { font-size: .8rem; color: #2a7fd6; font-weight: 700; margin-top: 4px; }
.mk-fix { display: flex; flex-direction: column; gap: 6px; }
.mk-key { margin: 4px 0; line-height: 1.35; }
.mk-lv { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.mk-lv span { padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.14); font-weight: 800; font-size: .8rem; }
.mk-lv span.on { background: var(--mk-acc); color: var(--mk-accink); } .mk-lv span.done { background: rgba(61,220,132,.35); }
.mk-chart { position: relative; background: #fff; border-radius: 16px; padding: 10px; color: #1f2937; }
.mk-svg { width: 100%; height: auto; display: block; font-family: "Nunito", "Segoe UI", sans-serif; }
.mk-cover { position: absolute; inset: 0; border-radius: 16px; background: #0b1530; color: #eef4ff; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; font-weight: 900; font-size: 1.1rem; }
.mk-cover.hidden { display: none; }
.mk-peek { border: 0; border-radius: 12px; padding: 10px 16px; background: var(--mk-acc); color: var(--mk-accink); font-weight: 900; cursor: pointer; } .mk-peek:disabled { opacity: .5; cursor: default; }
.mk-count { position: absolute; top: 8px; right: 12px; background: rgba(15,23,42,.85); color: #fff; border-radius: 999px; padding: 3px 10px; font-weight: 800; font-size: .82rem; }
.mk-count:empty { display: none; }
.mk-ready { align-self: center; }
.mk-word { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.mk-word span { width: clamp(30px, 6vw, 44px); height: clamp(38px, 7vw, 54px); border-radius: 10px; background: #fff4e8; color: #3b2410; display: grid; place-items: center; font-family: "Baloo 2", sans-serif; font-size: clamp(1.1rem, 3vw, 1.6rem); font-weight: 900; box-shadow: 0 5px 0 rgba(0,0,0,.3); }
.mk-ladder { display: flex; flex-direction: column; gap: 8px; }
.mk-rung { border-radius: 14px; padding: 10px 14px; background: rgba(0,0,0,.35); border-left: 6px solid var(--mk-acc); font-weight: 700; line-height: 1.35; backdrop-filter: blur(4px); }
.mk-rung.lock { opacity: .5; border-left-color: #9ca3af; } .mk-p { float: right; margin-left: 10px; font-weight: 900; color: #fcd34d; }
.mk-inp { display: flex; gap: 10px; }
.mk-inp input { flex: 1; min-width: 0; margin: 0; border-radius: 12px; border: 0; padding: 12px 14px; font-weight: 800; font-size: 1.05rem; background: #fff; color: #3b2410; }
.mk-tries { text-align: center; font-weight: 700; color: #fecaca; min-height: 1em; }
.mk-result { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.mk-stars { font-size: 3rem; letter-spacing: 6px; } .mk-stars span { color: rgba(255,255,255,.25); } .mk-stars span.on { color: #fcd34d; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.mk-result-line { font-size: 1.1rem; text-align: center; }
.mk-why { background: rgba(0,0,0,.4); border-radius: 16px; padding: 12px 16px; width: 100%; backdrop-filter: blur(4px); }
.mk-why ol { margin: 6px 0 0; padding-left: 20px; } .mk-why li { margin: 8px 0; }
.mk-why-q { font-weight: 800; } .mk-why-your { color: #fecaca; } .mk-why-ok { color: #bbf7d0; font-weight: 700; } .mk-why-w { opacity: .85; font-size: .9rem; }
.mk-perfect { text-align: center; font-weight: 800; }
@media (max-width: 640px) { .mk-nb { grid-template-columns: 1fr 1fr; } .mk-deck { flex-direction: column; } .mk-stage { min-height: 70vh; } }
.mk-chart .mk-count { position: static; display: block; width: max-content; margin: 6px auto 0; }
/* v308 Numeracy Camp: Status column */
.camp-grid td.camp-status { white-space: nowrap; font-weight: 700; }
.camp-grid td.camp-status.on { color: #1f7a3a; background: #e8f6ec; }
.camp-grid td.camp-status.off { color: #8a5a00; background: #fff6e0; }
.camp-grid td.camp-status.none { color: #8b1d1d; background: #fdecec; }
/* v311 Mabisang Komunikasyon: Puna Pro · Nagulong Pananaliksik · Research Builder · Sipi Patrol · Bihisan ang Datos */
.mk-puna { --mk-bg: linear-gradient(rgba(20,24,52,.72), rgba(16,18,40,.92)), url(assets/mk/bg-seminar.webp); --mk-acc: #ffcf3f; }
.mk-proseso { --mk-bg: linear-gradient(rgba(10,42,24,.70), rgba(8,32,18,.92)), url(assets/mk/bg-path.webp); --mk-acc: #a3e635; --mk-accink: #1a2e05; }
.mk-builder { --mk-bg: linear-gradient(rgba(10,30,70,.72), rgba(8,22,52,.93)), url(assets/mk/bg-blueprint.webp); --mk-acc: #fbbf24; --mk-accink: #2b1d02; }
.mk-sipi { --mk-bg: linear-gradient(rgba(44,26,10,.72), rgba(30,18,8,.93)), url(assets/mk/bg-detective.webp); --mk-acc: #f59e0b; --mk-accink: #2b1306; }
.mk-stages { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; }
.mk-stg { flex: 1 1 130px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border-radius: 14px; padding: 10px 12px; border: 2px solid rgba(255,255,255,.25); background: rgba(0,0,0,.38); color: var(--mk-ink); cursor: pointer; text-align: left; font-weight: 800; }
.mk-stg small { font-weight: 700; opacity: .85; } .mk-stg.on { border-color: var(--mk-acc); background: rgba(255,255,255,.16); } .mk-stg:disabled { opacity: .5; cursor: default; }
.mk-unlock-note { font-size: .88rem; }
.mk-raw { border-collapse: collapse; margin-top: 8px; width: 100%; } .mk-raw td, .mk-raw th { border: 1px solid rgba(255,255,255,.25); padding: 5px 9px; text-align: left; }
.mk-rawq { margin: 8px 0 0; padding-left: 20px; line-height: 1.5; }
.mk-fmts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.mk-fmt { display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 14px; padding: 10px 8px; border: 2px solid rgba(255,255,255,.22); background: rgba(0,0,0,.38); color: var(--mk-ink); font-weight: 800; cursor: pointer; }
.mk-fmt span { font-size: 1.6rem; } .mk-fmt:hover:not(:disabled) { border-color: var(--mk-acc); } .mk-fmt:disabled { cursor: default; }
.mk-fmt.right { border-color: #3ddc84; background: rgba(61,220,132,.22); } .mk-fmt.alt { border-color: #fcd34d; } .mk-fmt.wrong { border-color: #ff5d73; background: rgba(255,93,115,.2); }
.mk-build { display: flex; flex-direction: column; gap: 10px; }
.mk-sent { font-size: 1.05rem; line-height: 1.7; font-weight: 700; }
.mk-blank { display: inline-block; min-width: 90px; padding: 0 8px; border-bottom: 3px dashed currentColor; cursor: pointer; } .mk-blank.on { border-bottom-style: solid; color: #0b6b3a; }
.mk-graph .mk-blank.on { color: #7dd3fc; }
.mk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-chip { border-radius: 999px; padding: 7px 12px; border: 2px solid rgba(0,0,0,.15); background: rgba(255,255,255,.9); color: #1f2937; font-weight: 700; cursor: pointer; text-align: left; line-height: 1.3; }
.mk-chip.sel { background: var(--mk-acc); color: var(--mk-accink); border-color: var(--mk-acc); } .mk-chip:disabled { cursor: default; opacity: .85; }
.mk-chips2 .mk-chip { background: #e0f2fe; }
.mk-screen { background: #fff; color: #1e293b; border-radius: 14px; padding: 14px 18px; border: 8px solid #1f2937; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.mk-scr-top { font-size: .8rem; font-weight: 800; color: #64748b; } .mk-scr-h { font-family: "Baloo 2", sans-serif; font-size: 1.3rem; font-weight: 800; margin: 4px 0; color: #1d4ed8; }
.mk-screen ul { margin: 0; padding-left: 20px; line-height: 1.5; font-weight: 600; }
.mk-roles { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.mk-roles span { padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.14); font-weight: 800; font-size: .85rem; opacity: .6; } .mk-roles span.on { background: var(--mk-acc); color: var(--mk-accink); opacity: 1; }
.mk-aud { border-left: 6px solid var(--mk-acc); }
.mk-anal summary { cursor: pointer; } .mk-anal[open] summary { margin-bottom: 6px; }
.mk-crit { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mk-cp { border-radius: 12px; padding: 8px; background: rgba(0,0,0,.35); border-top: 5px solid rgba(255,255,255,.3); font-size: .85rem; min-height: 46px; } .mk-cp small { display: block; font-size: .72rem; opacity: .85; margin-top: 3px; line-height: 1.25; max-height: 3.8em; overflow: hidden; }
.mk-cp.on { border-top-color: var(--mk-acc); background: rgba(255,255,255,.16); } .mk-cp.done { border-top-color: #3ddc84; }
.mk-trail { display: flex; flex-direction: column; gap: 8px; position: relative; }
.mk-mile { display: flex; gap: 10px; align-items: center; text-align: left; border-radius: 14px; padding: 10px 12px; border: 2px solid rgba(255,255,255,.22); background: rgba(0,0,0,.42); color: var(--mk-ink); cursor: pointer; }
.mk-mile:hover:not(:disabled) { border-color: var(--mk-acc); } .mk-mile:disabled { cursor: default; }
.mk-mile.right { border-color: #3ddc84; background: rgba(61,220,132,.2); } .mk-mile.wrong { border-color: #ff5d73; background: rgba(255,93,115,.2); }
.mk-mile-n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--mk-acc); color: var(--mk-accink); font-weight: 900; }
.mk-mile-b { display: flex; flex-direction: column; } .mk-mile-b small { opacity: .9; font-weight: 600; line-height: 1.3; }
.mk-slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mk-slot { border-radius: 10px; padding: 8px; border: 2px dashed rgba(0,0,0,.25); font-weight: 800; font-size: .86rem; } .mk-slot.on { border-style: solid; border-color: #16a34a; background: #ecfdf5; cursor: pointer; }
.mk-meter { background: rgba(0,0,0,.4); border-radius: 14px; padding: 10px 14px; }
.mk-meter-bar { position: relative; height: 14px; border-radius: 999px; background: linear-gradient(90deg, #ef4444, #f59e0b 30%, #22c55e 45%, #22c55e 55%, #f59e0b 70%, #ef4444); }
.mk-meter-bar i { position: absolute; top: -6px; width: 6px; height: 26px; margin-left: -3px; border-radius: 3px; background: #fff; box-shadow: 0 0 0 2px #111; transition: left .3s; }
.mk-meter-l { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; margin-top: 6px; } .mk-meter-l b { font-size: .95rem; }
.mk-lims { display: flex; flex-direction: column; gap: 10px; }
.mk-lim { background: rgba(0,0,0,.35); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.mk-strike { text-decoration: line-through; text-decoration-color: #ef4444; opacity: .8; }
.mk-check { display: flex; flex-wrap: wrap; gap: 6px 14px; background: rgba(0,0,0,.4); border-radius: 14px; padding: 10px 14px; font-weight: 700; }
.mk-sorts { display: flex; flex-direction: column; gap: 8px; }
.mk-sort { background: rgba(0,0,0,.4); border-radius: 14px; padding: 10px 12px; border-left: 6px solid rgba(255,255,255,.3); display: flex; flex-direction: column; gap: 6px; }
.mk-sort-t { font-weight: 700; } .mk-sort.right { border-left-color: #3ddc84; } .mk-sort.wrong { border-left-color: #ff5d73; } .mk-sort-ok { color: #bbf7d0; font-weight: 700; font-size: .9rem; }
.mk-sort .mk-chip { padding: 5px 10px; font-size: .85rem; }
.mk-evid { border-left: 6px solid var(--mk-acc); }
.mk-paper { background: #fffdf5; color: #2b2116; border-radius: 6px; padding: 16px 18px; box-shadow: 0 10px 28px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 4px; font-family: Georgia, "Times New Roman", serif; }
.mk-paper-t { font-weight: 800; font-size: 1.05rem; margin-bottom: 4px; } .mk-paper-t small { font-weight: 400; color: #7c6a55; }
.mk-paper-h { font-weight: 800; margin-top: 8px; }
.mk-seg { text-align: left; border: 2px solid transparent; background: transparent; color: inherit; font: inherit; line-height: 1.5; padding: 4px 6px; border-radius: 8px; cursor: pointer; }
.mk-seg:hover:not(:disabled) { background: #fef3c7; } .mk-seg.ref { padding-left: 30px; text-indent: -24px; font-size: .92rem; }
.mk-seg.sel { background: #fde68a; border-color: #d97706; } .mk-seg.right { background: #dcfce7; border-color: #16a34a; } .mk-seg.wrong { background: #fee2e2; border-color: #dc2626; } .mk-seg.missed { border-color: #dc2626; border-style: dashed; }
.mk-seg:disabled { cursor: default; }
.mk-para { display: inline-block; font-weight: 800; color: #9a7b55; margin-right: 6px; font-size: .85rem; }
.mk-src { font-size: .95rem; line-height: 1.5; }
.mk-pollset summary { cursor: pointer; }
.mk-pollrow { display: flex; align-items: center; gap: 8px; margin: 4px 0; } .mk-pollrow span { flex: 1; } .mk-pollrow input { width: 76px; margin: 0; padding: 6px 8px; border-radius: 8px; border: 0; font-weight: 800; }
.mk-peer { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; } .mk-print { font-size: .95rem; }
@media (max-width: 640px) { .mk-crit { grid-template-columns: repeat(2, 1fr); } .mk-slots { grid-template-columns: 1fr; } .mk-fmts { grid-template-columns: repeat(2, 1fr); } }
.mk-cp.bad { border-top-color: #ff5d73; }
/* v312 Seat Plan: Setup | section chips | seat plan (computer) · Cleaners Today: two columns · less space under the breadcrumbs */
@media (min-width: 900px) {
  .sp-layout { grid-template-columns: minmax(0, 1fr) 160px minmax(0, 1fr); gap: 18px; }
  .sp-mid { position: sticky; top: 12px; align-self: start; }
  .sp-mid .sp-secs { display: flex; flex-direction: column; gap: 8px; margin: 46px 0 0; }
  .sp-mid .sp-secs .chip { margin: 0; width: 100%; justify-content: center; text-align: center; white-space: normal; }
  .content:has(> #panel-setup:not(.hidden) #setup-clean-view:not(.hidden)) { max-width: none; }
  .cln-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .cln-right .cln-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) { .sp-mid { display: none; } }
#app-teacher:has(#teacher-crumb-cell:not(.hidden)) .content { padding-top: 3px; }
/* v313 🗓️ Class Program: per term · other schedules · the program and the Edit panel side by side (computer) */
.prog-table th.prog-title .prog-term { margin: 0 0 0 10px; width: auto; padding: 3px 8px; border-radius: 8px; border: 0; font-weight: 800; font-size: .9rem; background: #fff; color: #1F4A1C; letter-spacing: 0; vertical-align: middle; }
.prog-table .prog-other td { background: #E6F0FF; color: #1d3a7a; font-weight: 800; letter-spacing: 0.04em; }
.prog-table .prog-other td.prog-time { background: #E6F0FF; }
.prog-oth { color: #1d3a7a; font-weight: 800; }
.prog-ed-term { border: 2px dashed #2E6B2A; border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.prog-ed-term .fg-sub { flex-basis: 100%; }
.prog-cur { background: #FFF1C9; color: #7A5A00; border-radius: 999px; padding: 3px 10px; font-weight: 800; font-size: .85rem; }
.prog-others { border-color: #2a5bd7; }
.prog-oth-row { border-top: 1px dashed #c7d2e5; padding: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.prog-oth-row:first-of-type { border-top: 0; }
.prog-x-times { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; } .prog-x-times label { flex: 1; min-width: 120px; }
@media (min-width: 900px) {
  .content:has(> #panel-setup:not(.hidden) #setup-program-view:not(.hidden)) { max-width: none; }
  .prog-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
  .prog-layout.editing { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .prog-layout.editing #prog-editor { overflow-y: auto; padding-right: 6px; }
  .prog-layout.editing #prog-editor .prog-card:first-of-type, .prog-layout.editing #prog-editor .prog-ed-term { margin-top: 0; }
}
/* v313 Cleaners Today: 2 groups at a time with ‹ › (computer) */
.cln-pager, .cln-page-n { display: none; }
@media (min-width: 900px) {
  .cln-right.cln-paged { position: relative; padding: 0 44px; }
  .cln-right.cln-paged .cln-pager { display: grid; place-items: center; position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 56px; border-radius: 12px; border: 1px solid var(--rule, #ccc); background: var(--card, #fff); font-size: 1.4rem; font-weight: 900; cursor: pointer; color: inherit; }
  .cln-right.cln-paged .cln-pager:disabled { opacity: .35; cursor: default; }
  .cln-right.cln-paged .cln-prev { left: 0; } .cln-right.cln-paged .cln-next { right: 0; }
  .cln-right.cln-paged .cln-group.cln-off { display: none; }
  .cln-right.cln-paged .cln-page-n { display: block; text-align: center; font-size: .82rem; opacity: .75; margin-top: -6px; }
}
/* v313 🔍 Student › page */
.hs-back b { color: var(--accent, #2E6B2A); }
g.sp-seat.hs-flash rect { stroke: #F4B400; stroke-width: 5; }
@media (min-width: 900px) { .prog-main { min-width: 0; overflow: hidden; } }
.prog-table { table-layout: fixed; }
/* v314 🔍 Diagnostics */
.diag-title { margin: 4px 0 8px; }
.diag-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 10px; }
.diag-chips { display: flex; flex-wrap: wrap; gap: 6px; } .diag-chips .chip { margin: 0; }
.diag-term select { width: auto; margin: 0 0 0 4px; padding: 4px 8px; }
#diag-exc.active { background: #fee2e2; border-color: #dc2626; color: #991b1b; }
.diag-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 900px) {
  .content:has(> #panel-grades:not(.hidden) #grades-diag-view:not(.hidden)) { max-width: none; }
  .diag-layout { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
  .diag-right { position: sticky; top: 12px; }
}
.diag-wrap { overflow: auto; border: 1px solid var(--rule, #ddd); border-radius: 12px; background: var(--card, #fff); }
.diag-table { margin: 0; border-collapse: separate; border-spacing: 0; min-width: 100%; }
.diag-table th, .diag-table td { padding: 4px 6px; text-align: center; white-space: nowrap; }
.diag-table thead th { position: sticky; top: 0; z-index: 2; background: var(--card, #f8f5ec); vertical-align: top; }
.diag-table .diag-name { text-align: left; position: sticky; left: 0; z-index: 1; background: var(--card, #fff); min-width: 190px; cursor: pointer; }
.diag-table thead .diag-name { z-index: 3; }
.diag-table tr.diag-sel td.diag-name { background: #e0f2fe; font-weight: 800; }
.diag-qh { min-width: 112px; } .diag-qh small { display: block; font-weight: 500; opacity: .75; font-size: .72rem; white-space: normal; }
.diag-qbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 800; color: inherit; cursor: pointer; text-decoration: underline dotted; white-space: normal; }
.diag-ww { margin-top: 4px; border: 1px solid var(--rule, #ccc); background: transparent; border-radius: 999px; padding: 2px 8px; font-size: .74rem; font-weight: 800; cursor: pointer; color: inherit; }
.diag-ww.ready { background: #dcfce7; border-color: #16a34a; color: #166534; } .diag-ww.on { display: inline-block; background: #e0e7ff; border-color: #4f46e5; color: #3730a3; cursor: default; }
.diag-c input { width: 64px; margin: 0; padding: 4px 6px; text-align: center; border-radius: 8px; border: 1px solid #d6d3c4; background: #fff; font-weight: 700; }
.diag-c.ok input { background: #ecfdf5; border-color: #22c55e; color: #166534; } .diag-c.no input { background: #fef2f2; border-color: #ef4444; color: #991b1b; }
.diag-excb { width: 64px; border: 1px dashed #94a3b8; background: #f1f5f9; color: #475569; border-radius: 8px; padding: 4px 0; font-weight: 800; font-size: .74rem; cursor: pointer; }
.diag-table tfoot td { font-weight: 800; background: var(--card, #f8f5ec); } .diag-table tfoot tr:first-child td { border-top: 2px solid var(--rule, #ccc); }
.diag-table tfoot td:first-child { text-align: left; position: sticky; left: 0; z-index: 1; }
.diag-chart-tabs { display: flex; gap: 6px; margin-bottom: 8px; } .diag-chart-tabs .chip { margin: 0; }
.diag-chart { background: #fff; color: #1f2937; border: 1px solid var(--rule, #ddd); border-radius: 14px; padding: 10px; }
.diag-svg { width: 100%; height: auto; display: block; font-family: inherit; }
.diag-legend { margin-top: 4px; }
.diag-pop-row { display: flex; gap: 10px; flex-wrap: wrap; } .diag-pop-row label { flex: 1; min-width: 120px; }
.diag-warn { background: #fff7ed; border: 1px solid #fdba74; color: #9a3412; border-radius: 10px; padding: 8px 10px; margin: 0 0 8px; font-weight: 700; }
.diag-ok { background: #ecfdf5; border: 1px solid #86efac; color: #166534; border-radius: 10px; padding: 8px 10px; margin: 0 0 8px; font-weight: 700; }
#panel-grades:has(#grades-diag-view:not(.hidden)) > .panel-title { display: none; }
/* v316 💬 Line (computer): title under the breadcrumbs, section chips under Now viewing, names left + chat right */
.line-pick-hint, .line-desk-only { display: none; }
@media (min-width: 900px) {
  .content:has(> #panel-line:not(.hidden)) { max-width: none; }
  #panel-line > .subtitle { font-size: .9rem; margin-bottom: 10px !important; }
  .line-layout { display: grid; grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.6fr); gap: 22px; align-items: start; }
  #line-roster-view { display: block !important; }
  .line-roster-top { flex-wrap: nowrap; }
  .line-roster-top .btn-emergency { margin: 0; }
  .line-roster-top .line-search { flex: 1 1 120px; }
  #line-roster-list { overflow-y: auto; padding-right: 4px; }
  #line-roster-list .notebook-lesson-row { padding: 9px 12px; margin-bottom: 6px; cursor: pointer; }
  #line-roster-list .line-prev, #line-roster-list .line-wait-chip, #line-roster-list .lesson-name br { display: none; }
  #line-roster-list .line-mark { font-size: .78rem; margin-right: 6px; white-space: nowrap; }
  #panel-line > .panel-title { width: fit-content; margin-bottom: 10px; }
  #line-roster-list .line-unread .lesson-name { font-weight: 900; }
  #line-roster-list .line-sel { border-color: var(--accent, #2E6B2A); background: #E7F2E1; box-shadow: inset 4px 0 0 var(--accent, #2E6B2A); }
  .line-pick-hint:not(.hidden) { display: grid; place-items: center; min-height: 50vh; border: 2px dashed var(--rule, #ccc); border-radius: 16px; color: var(--ink-soft); font-size: 1.1rem; font-weight: 700; }
  #btn-line-thread-back { display: none; }
  #line-thread-view:not(.hidden) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; }
  #line-thread-view .line-thread-head { grid-column: 1; margin: 0 0 8px; justify-content: flex-start; }
  #line-thread-view #line-cc-ticks { grid-column: 2; margin: 0 0 8px !important; }
  #line-thread-view .line-thread-head, #line-thread-view #line-cc-ticks { grid-row: 1; }
  #line-thread-view > :not(.line-thread-head):not(#line-cc-ticks) { grid-column: 1 / -1; }
  #line-thread-view .line-messages { overflow-y: auto; max-height: none; }
  .line-desk-only { display: inline-flex; }
  /* 🚨 Emergency: locations 3 per row on the left; kind + Send on the right */
  .emg-overlay .emg-shell { max-width: 1280px; padding: 14px 24px 20px; }
  .emg-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .emg-left .emg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(52px, calc((100vh - 230px) / 4 - 12px)); }
  .emg-left .emg-box { min-height: 0; }
  .emg-right .emg-q:first-child, .emg-right #emg-kind-wrap .emg-q { margin-top: 16px; }
  .emg-pick-hint { margin-top: 52px; min-height: 160px; display: grid; place-items: center; border: 2px dashed var(--rule, #ccc); border-radius: 16px; color: var(--ink-soft); font-weight: 800; font-size: 1.1rem; }
  .emg-pick-hint.hidden { display: none; }
  .emg-right .emg-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .emg-right .emg-kinds .emg-box { min-height: 120px; }
}
@media (max-width: 899px) { .emg-pick-hint { display: none; } }

/* v317 🫛 Pod page: CHIM header on top, breadcrumbs + ‹ Back (left) · 📁 Pod Files / Sort (right),
   the title, then messages (left) + teachers (right) on a computer; one above the other on phones */
body.pod-open #app-teacher > :not(.topbar):not(#pod-overlay) { display: none !important; }
#pod-overlay.pod-page { position: static; inset: auto; z-index: auto; background: transparent; }
.pod-subrow { display: flex; align-items: center; justify-content: space-between; gap: 10px 18px; flex-wrap: wrap; margin: 16px 20px 0; }
.pod-crumbcell { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; min-width: 0; }
.pod-crumbcell .chim-crumbs { margin: 0; }
.pod-subright { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.pod-subright #btn-pod-files { min-height: 44px; padding: 0 18px; }
.pod-subright .pod-sort-label { min-height: 44px; border: 1.5px solid var(--rule); border-radius: 12px; padding: 0 6px 0 14px; background: var(--card); }
.pod-subright .pod-sort-label select { border: 0; background: transparent; font-weight: 700; margin: 0; }
.pod-subright .hidden, #pod-files-kinds.hidden { display: none !important; }
.pod-body { padding: 14px 20px 8px; }
.pod-title-row { margin-bottom: 10px; align-items: baseline; justify-content: flex-start; gap: 4px 14px; }
.pod-title-row .conf-sub.hidden { display: none; }
.pod-private-tag { font-size: .72rem; font-weight: 600; color: var(--ink-soft); margin-left: 8px; font-family: inherit; }
.pod-layout { display: flex; flex-direction: column; gap: 14px; }
.pod-layout.hidden { display: none; }
.pod-left { display: flex; flex-direction: column; min-width: 0; }
.pod-right { border: 1.5px solid var(--rule); border-radius: 14px; background: var(--card); padding: 10px; min-width: 0; }
.pod-people-h { font-weight: 800; font-size: .9rem; margin: 2px 4px 8px; }
.pod-people { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; max-height: 45vh; padding-right: 2px; }
.pod-person { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); cursor: pointer; }
.pod-person:hover { border-color: var(--olive-deep, #4B5A2A); }
.pod-person.sel { border-color: var(--accent, #2E6B2A); background: #E7F2E1; box-shadow: inset 4px 0 0 var(--accent, #2E6B2A); }
[data-theme="dark"] .pod-person.sel { background: rgba(46, 107, 42, .28); }
.pod-person.unread .pod-pname { font-weight: 900; }
.pod-av { position: relative; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #4A5A28; color: #fff; font-weight: 800; }
.pod-person-all .pod-av { background: #E7F2E1; font-size: 1.1rem; }
.pod-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #B8B8B8; border: 2px solid var(--card); }
.pod-dot.on { background: #2FA84F; }
.pod-pname { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.pod-pname small { display: block; font-weight: 600; color: var(--ink-soft); font-size: .74rem; }
.pod-pname small.pod-calling { color: #B3261E; }
.pod-unread { background: #D93025; color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 800; padding: 1px 7px; min-width: 20px; text-align: center; }
.pod-mark { font-size: .74rem; margin: 0; white-space: nowrap; }
.pod-setup-note { margin-top: 8px; font-size: .8rem; color: var(--ink-soft); border: 1px dashed var(--rule); border-radius: 10px; padding: 8px 10px; }
.pod-composer #btn-pod-call { white-space: nowrap; }
.pod-composer #btn-pod-call.hidden { display: none; }
.pod-call-label { font-weight: 800; margin-bottom: 8px; }
.pod-files-table .pod-dl { padding: 4px 12px; font-size: .8rem; text-decoration: none; white-space: nowrap; display: inline-block; }
#pod-files-kinds { margin-bottom: 10px; }
@media (min-width: 900px) {
  .pod-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, .7fr); gap: 22px; align-items: start; }
  .pod-people { max-height: none; }
  .pod-left .pod-messages { flex: none; min-height: 0; }
}
@media (max-width: 899px) {
  .pod-subrow { margin: 12px 12px 0; }
  .pod-body { padding: 10px 12px 8px; }
  .pod-left .pod-messages { flex: none; }
  .pod-composer { flex-wrap: nowrap; gap: 6px; }
  .pod-composer #pod-text-input { flex: 1 1 auto; min-width: 0; }
  .pod-composer .btn-small { padding-left: 10px; padding-right: 10px; }
}
.line-note { font-size: .85rem; margin: 10px 0 0 !important; }

/* v318 📣 Announcements · 💡 Feedback · 💬 Line chips and 🚨 · 📁 Pod Files (computer) */
.ann-sort-row { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.ann-sort-row label { margin: 0; font-size: .85rem; color: var(--ink-soft); white-space: nowrap; }
.ann-sort-row select { width: auto; max-width: 100%; margin: 0; }
.ann-group-h { font-weight: 800; font-size: .9rem; color: var(--olive-deep, #4B5A2A); margin: 14px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--rule); }
.ann-group-h:first-child { margin-top: 0; }
.ann-card { border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.ann-card .date { font-size: .82rem; }
.ann-card .date b { color: var(--ink); font-size: .95rem; }
.ann-f-bottom { display: flex; align-items: flex-end; gap: 10px; flex: 1 1 100%; }
.ann-f-bottom .field { flex: 0 1 220px; margin: 0; }
.fb-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; margin-bottom: 6px; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); font-weight: 700; cursor: pointer; }
.fb-row:hover { border-color: var(--olive-deep, #4B5A2A); }
.fb-row.sel { border-color: var(--accent, #2E6B2A); background: #E7F2E1; box-shadow: inset 4px 0 0 var(--accent, #2E6B2A); }
[data-theme="dark"] .fb-row.sel { background: rgba(46, 107, 42, .28); }
.line-chips-slot:empty { display: none; }
.line-chips-slot #teacher-section-tabs { margin: 0 0 10px !important; padding: 0 !important; justify-content: flex-start; }
#pod-files-table { overflow: auto; }
@media (max-width: 899px) { .fb-roster { display: none; } }
@media (min-width: 900px) {
  .content:has(> #panel-headsup:not(.hidden) #updates-ann-view:not(.hidden)), .content:has(> #panel-headsup:not(.hidden) #updates-fb-view:not(.hidden)) { max-width: none; }
  .ann-layout, .fb-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .ann-form { flex-direction: column; flex-wrap: nowrap; align-items: stretch; margin-bottom: 12px; }
  .ann-form > .field { flex: none !important; min-width: 0; width: 100%; margin: 0; }
  .ann-form textarea { resize: none; overflow-y: auto; }
  .ann-left #headsup-also-wrap { margin: 0 !important; }
  #headsup-list { overflow-y: auto; padding-right: 4px; }
  .fb-pick { display: none !important; }
  .fb-roster { overflow-y: auto; padding-right: 4px; }
  .fb-right { overflow-y: auto; padding-right: 4px; }
  .fb-right .feedback-table { table-layout: fixed; width: 100%; }
  .fb-right .feedback-table th:nth-child(1) { width: 24%; }
  .fb-right .feedback-table th:nth-child(2) { width: 15%; }
  .fb-right .feedback-table th:nth-child(3) { width: 13%; }
  .fb-right .feedback-table td { overflow-wrap: anywhere; }
  .fb-right .tbl-box, .fb-right .fg-table-wrap { overflow-x: hidden; }
  /* 💬 Line: 🚨 Emergency left of Now viewing */
  .teacher-subrow:has(> .emg-in-row) { grid-template-columns: minmax(0, 1fr) auto minmax(0, .9fr); }
  .teacher-subrow:has(> .emg-in-row) > .crumb-cell { grid-column: auto !important; }
  .teacher-subrow > .btn-emergency.emg-in-row { order: 1; align-self: center; margin: 0; }
  .teacher-subrow:has(> .emg-in-row) > .teacher-subject-switcher-wrap { order: 2; }
  /* 📁 Pod Files: the table fits the page; it scrolls inside, the header row stays */
  .pod-files-table { table-layout: fixed; width: 100%; }
  .pod-files-table th:nth-child(1) { width: 31%; }
  .pod-files-table th:nth-child(2) { width: 14%; }
  .pod-files-table th:nth-child(3) { width: 18%; }
  .pod-files-table th:nth-child(4) { width: 11%; }
  .pod-files-table th:nth-child(5) { width: 11%; }
  .pod-files-table thead th { position: sticky; top: 0; z-index: 1; background: var(--paper); }
  .pod-files-table td { overflow-wrap: anywhere; }
}

/* v319 standard space under the breadcrumbs (computer inner pages) */
@media (min-width: 900px) {
  #app-teacher:has(#teacher-crumb-cell:not(.hidden)) #teacher-toolbar { margin-top: 4px !important; }
  #app-teacher:has(#teacher-crumb-cell:not(.hidden)) .content > .tab-panel > .panel-title,
  #app-teacher:has(#teacher-crumb-cell:not(.hidden)) .content > .tab-panel > div > .panel-title { margin-top: 0; }
  .pg-head { min-height: 44px; }
}

/* v319 📓 Notebook (computer): left = note · Term buttons · lessons (stays in place) · right = the lesson form */
.nb-side-list:empty { display: none; }
.nb-edit-head.hidden { display: none !important; }
.nb-caret { display: none; }
.nbm-tools { display: flex; gap: 8px; margin: 0 0 12px; }
.nbm-list { display: flex; flex-direction: column; gap: 6px; }
.nbm-part { border: 1px solid var(--rule); border-radius: 12px; background: var(--card); }
.nbm-part > summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; font-weight: 700; list-style: none; }
.nbm-part > summary::-webkit-details-marker { display: none; }
.nbm-part > summary::before { content: '▸'; color: var(--ink-soft); }
.nbm-part[open] > summary::before { content: '▾'; }
.nbm-part .nbm-t { flex: 1; min-width: 0; }
.nbm-part .nbm-ed { padding: 3px 10px; font-size: .78rem; height: auto; }
.nbm-drag { cursor: grab; color: var(--ink-soft); font-size: 1.1rem; }
.nbm-editing .nbm-part > summary::before { display: none; }
.nbm-part.dragging { opacity: .45; }
.nbm-part.drop-on { box-shadow: 0 -3px 0 var(--accent, #2E6B2A); }
.nbm-body { padding: 0 14px 12px 32px; font-size: .95rem; }
.nbm-body p { margin: 0 0 8px; }
.nbm-ex ul { margin: 4px 0 0; padding-left: 18px; }
.nbc-part-editor { border: 1.5px solid var(--rule); border-radius: 14px; background: var(--card); padding: 14px; }
.nbc-part-editor.hidden, #nbc-calc.hidden { display: none !important; }
.nbm-row { display: flex; gap: 10px; }
.nbm-ed-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
#panel-notebook.nb-calc-on .nb-note { display: none; }
@media (min-width: 900px) {
  .content:has(> #panel-notebook.nb-desk), .content:has(> #panel-notebook.nb-calc-on) { max-width: none; }
  #panel-notebook.nb-desk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
  #panel-notebook.nb-desk > .panel-title { grid-column: 1 / -1; }
  #panel-notebook.nb-desk > .nb-side { grid-column: 1; position: sticky; top: 12px; }
  #panel-notebook.nb-desk > #notebook-entries-view { grid-column: 2; grid-row: 2; }
  #panel-notebook.nb-desk > :not(.panel-title):not(.nb-side):not(#notebook-entries-view) { grid-column: 1 / -1; }
  #panel-notebook.nb-desk #notebook-term-tabs { justify-content: flex-start; margin-bottom: 10px !important; }
  #panel-notebook.nb-desk #notebook-entries-list { margin-top: 0 !important; overflow-y: auto; padding-right: 4px; }
  #panel-notebook.nb-desk .notebook-lesson-row { flex-wrap: wrap; }
  #panel-notebook.nb-desk .nb-caret { display: inline-block; width: 1em; color: var(--ink-soft); font-style: normal; }
  #panel-notebook.nb-desk .nb-caret::before { content: '▾'; }
  #panel-notebook.nb-desk .nb-ch-closed .nb-caret::before { content: '▸'; }
  #panel-notebook.nb-desk .chapter-heading { cursor: pointer; }
  #panel-notebook.nb-desk .nb-ch-closed .notebook-lesson-row { display: none; }
  #panel-notebook.nb-desk .nb-ed-row { border-color: var(--accent, #2E6B2A); background: #E7F2E1; box-shadow: inset 4px 0 0 var(--accent, #2E6B2A); }
  [data-theme="dark"] #panel-notebook.nb-desk .nb-ed-row { background: rgba(46, 107, 42, .28); }
  #panel-notebook.nb-desk .nb-edit-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 10px; border-radius: 12px; background: #FFF6D8; border: 1.5px solid #E5C766; }
  [data-theme="dark"] #panel-notebook.nb-desk .nb-edit-head { background: rgba(229, 199, 102, .15); }
  #panel-notebook.nb-desk .nb-edit-btns { display: flex; gap: 8px; }
  #panel-notebook.nb-desk:not(:has(#btn-cancel-notebook-edit:not(.hidden))) #notebook-comps-field { display: none !important; }
  #panel-notebook.nb-desk #nb-actions { flex-wrap: nowrap; }
  #panel-notebook.nb-desk #nb-actions > .btn-small { white-space: nowrap; }
  #panel-notebook.nb-desk #nb-actions .nb-share-bar { margin: 0 0 0 auto; padding: 0; border: 0; background: none; display: flex; }
  #panel-notebook.nb-desk #nb-actions .nb-share-bar .nb-share-info { display: none; }
  #panel-notebook.nb-desk #nb-actions .nb-share-actions { display: flex; gap: 8px; margin: 0; }
  #panel-notebook.nb-desk #nb-actions .nb-share-actions .btn-small { white-space: nowrap; }
  /* 🧮 Scientific Calculator: float switch + manual (left) · the calculator (right, fits the screen) */
  #notebook-calculator-view:not(.hidden) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
  #notebook-calculator-view #nbc-float { grid-column: 1; grid-row: 1; max-width: none; margin: 0 0 12px; align-self: start; }
  #notebook-calculator-view .nbc-tabs { display: none !important; }
  #notebook-calculator-view .nbc-grid { display: contents; }
  #notebook-calculator-view .nbc-manual { grid-column: 1; grid-row: 2; display: block !important; }
  #notebook-calculator-view .nbc-calc { grid-column: 2; grid-row: 1 / span 2; display: flex !important; flex-direction: column; align-items: center; position: sticky; top: 8px; }
  #notebook-calculator-view .nbc-part-editor { align-self: stretch; }
  #notebook-calculator-read { overflow-y: auto; padding-right: 4px; }
}

/* v320 📓 Notebook (computer): no note, Term buttons in one row, Rename beside the chapter title */
@media (min-width: 900px) {
  #panel-notebook.nb-desk .nb-note { display: none; }
  #panel-notebook.nb-desk #notebook-term-tabs { flex-wrap: nowrap; gap: 6px; }
  #panel-notebook.nb-desk #notebook-term-tabs > * { padding: 5px 10px; font-size: .8rem; white-space: nowrap; min-height: 0; }
  #panel-notebook.nb-desk .nb-drag-note { display: none; }
  #panel-notebook.nb-desk .chapter-heading { justify-content: flex-start; gap: 12px; flex-wrap: nowrap; }
  #panel-notebook.nb-desk .chapter-heading .nb-ch-rename { flex: none; padding: 3px 10px; font-size: .78rem; height: auto; }
}

/* v320 📝 Performance Tasks / 📚 Assignments (computer): the list (left) · Edit / Responses / Scores (right) */
.tk-pick-hint.hidden { display: none !important; }
.pt-retaking.pt-rt-float { display: none; }
.pt-retaking.pt-rt-float.open { display: block; position: fixed; z-index: 1200; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(620px, 92vw); max-height: 70vh; overflow-y: auto; background: var(--card); border: 1.5px solid var(--rule); border-radius: 16px; padding: 18px 18px 14px; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.pt-rt-x { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 1.1rem; cursor: pointer; color: var(--ink-soft); }
@media (min-width: 900px) {
  .content:has(> #panel-launchpad.tk-desk) { max-width: none; }
  #panel-launchpad > .subtitle { max-width: 50%; }
  #panel-launchpad.tk-desk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
  #panel-launchpad.tk-desk > * { grid-column: 1; }
  #panel-launchpad.tk-desk > .subtitle { max-width: none; }
  #panel-launchpad.tk-desk { grid-template-rows: auto auto 1fr; }
  #panel-launchpad.tk-desk > .panel-title { grid-row: 1; }
  #panel-launchpad.tk-desk > .subtitle { grid-row: 2; }
  #panel-launchpad.tk-desk > .tk-left { grid-row: 3; }
  #panel-launchpad.tk-desk > .tk-right, #panel-launchpad.tk-desk > #tk-pick-hint { grid-column: 2; grid-row: 1 / span 3; margin-top: 0 !important; overflow: auto; padding-right: 4px; }
  #panel-launchpad.tk-desk > .tk-left { margin-top: 6px !important; overflow-y: auto; padding-right: 4px; }
  #panel-launchpad.tk-desk > #tk-pick-hint:not(.hidden) { display: grid; place-items: center; min-height: 50vh; border: 2px dashed var(--rule, #ccc); border-radius: 16px; color: var(--ink-soft); font-size: 1.1rem; font-weight: 700; }
  /* each PETA / lesson = one row with small buttons */
  #panel-launchpad.tk-desk .tk-left .mq-ch-row { display: flex; flex-direction: column; gap: 6px; }
  #panel-launchpad.tk-desk .tk-left .task-card { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 8px; width: auto; flex: none !important; min-height: 0 !important; height: auto !important; aspect-ratio: auto !important; justify-content: flex-start; padding: 8px 10px; text-align: left; margin: 0; }
  #panel-launchpad.tk-desk .tk-left .task-card > .icon { font-size: 1.2rem; margin: 0; width: auto; height: auto; }
  #panel-launchpad.tk-desk .tk-left .task-card > div:not(.icon):not(.asg-card-btns) { margin: 0 !important; }
  #panel-launchpad.tk-desk .tk-left .task-card > div:nth-child(2) { flex: 1 1 140px; min-width: 0; }
  #panel-launchpad.tk-desk .tk-left .task-card .btn-small { width: auto !important; margin: 0 !important; padding: 4px 9px; font-size: .74rem; height: auto; white-space: nowrap; }
  #panel-launchpad.tk-desk .tk-left .asg-card-btns { display: flex !important; flex-wrap: nowrap; gap: 6px; margin: 0 !important; width: auto !important; }
  #panel-launchpad.tk-desk .tk-left .asg-card-btns > * { flex: none !important; grid-column: auto !important; }
  #panel-launchpad.tk-desk .tk-left .task-card .calc-sw, #panel-launchpad.tk-desk .tk-left .task-card [class*="calc-switch"] { margin: 0; font-size: .74rem; }
  #panel-launchpad.tk-desk .tk-left .asg-add-lesson { flex-direction: row; justify-content: center; padding: 6px 10px; }
  #panel-launchpad.tk-desk .tk-left .asg-term-tools { display: flex; flex-wrap: wrap; gap: 6px; }
  #panel-launchpad.tk-desk .tk-left .asg-term-tools .btn-small { padding: 4px 9px; font-size: .74rem; height: auto; }
}

/* v321 🎮 Arcade (computer) */
.ar-chips:empty { display: none; }
.ar-play-side { display: none; }
.arc-sc-tools { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.arc-sc-hi-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.arc-medal-btn { border: 0; background: none; font-size: 1.25rem; cursor: pointer; line-height: 1; }
.arc-medal-th { text-align: center; }
.arc-medal-cell { text-align: center; }
.cert-ov.cert-with-qr .cert-stage { margin-right: 300px; }
.cert-side-qr { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); width: 260px; background: #fff; color: #1D2330; border-radius: 16px; padding: 16px; text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.cert-side-h { font-weight: 800; }
@media (max-width: 899px) { .arc-sc-cols { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 14px; } .arc-sc-col { flex: 1 1 260px; min-width: 260px; } .arc-sc-mastered, .arc-sc-att { flex-basis: 100%; } .arc-medal-th, .arc-medal-cell { display: none; } }
@media (min-width: 900px) {
  .content:has(> #panel-practice.ar-desk) { max-width: none; }
  /* lists: My Scores + search · note · categories (left); sort chips + the picked category's games (right) */
  #panel-practice.ar-desk[data-ar="skill-list"] #arcade-skill-view, #panel-practice.ar-desk[data-ar="mq-list"] #mq-topics-view { position: relative; margin-top: 0 !important; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
  #panel-practice.ar-desk[data-ar="skill-list"] #arcade-skill-view > *, #panel-practice.ar-desk[data-ar="mq-list"] #mq-topics-view > * { grid-column: 1; }
  #panel-practice.ar-desk[data-ar="skill-list"] #ar-chips { grid-column: 2; grid-row: 1; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-self: start; }
  #panel-practice.ar-desk[data-ar="skill-list"] .arcade-backbar { justify-content: flex-start; flex-wrap: nowrap; margin-bottom: 10px; }
  #panel-practice.ar-desk[data-ar="skill-list"] .arcade-backbar .arcade-sort { flex: 1 1 auto; justify-content: stretch; }
  #panel-practice.ar-desk[data-ar="skill-list"] .arcade-backbar .arcade-sort > * { flex: 1 1 auto; }
  #panel-practice.ar-desk[data-ar="mq-list"] #mq-topics-view > div:first-child { flex-wrap: nowrap; }
  #panel-practice.ar-desk[data-ar="mq-list"] #mq-find-bar { flex: 1 1 auto; margin: 0; }
  #panel-practice.ar-desk[data-ar="skill-list"] #arcade-skills-grid, #panel-practice.ar-desk[data-ar="mq-list"] #mq-topics-grid { display: block; overflow-y: auto; padding-right: 4px; }
  #panel-practice.ar-desk details.arcade-sec, #panel-practice.ar-desk[data-ar="mq-list"] details.mq-term { margin-bottom: 8px; }
  #panel-practice.ar-desk details.arcade-sec[open] > summary, #panel-practice.ar-desk[data-ar="mq-list"] details.mq-term[open] > summary { background: #E7F2E1; box-shadow: inset 4px 0 0 var(--accent, #2E6B2A); }
  [data-theme="dark"] #panel-practice.ar-desk details.arcade-sec[open] > summary, [data-theme="dark"] #panel-practice.ar-desk details.mq-term[open] > summary { background: rgba(46, 107, 42, .28); }
  #panel-practice.ar-desk details.arcade-sec[open] > :not(summary), #panel-practice.ar-desk[data-ar="mq-list"] details.mq-term[open] > :not(summary) {
    position: absolute; left: calc(50% + 14px); right: 0; top: var(--ar-top, 0); max-height: var(--ar-h, 70vh); overflow-y: auto; margin: 0; padding: 4px 4px 4px 0; background: var(--paper); z-index: 2; }
  #panel-practice.ar-desk[data-ar="skill-list"] #arcade-skill-view::after, #panel-practice.ar-desk[data-ar="mq-list"] #mq-topics-view::after { content: '👉 Pick a category on the left to see its games here.'; position: absolute; left: calc(50% + 14px); right: 0; top: var(--ar-top, 0); height: min(var(--ar-h, 60vh), 50vh); display: grid; place-items: center; border: 2px dashed var(--rule, #ccc); border-radius: 16px; color: var(--ink-soft); font-weight: 700; z-index: 1; }
  #panel-practice.ar-desk[data-ar="mq-list"] #mq-topics-view::after { content: '👉 Pick a term on the left to see its games here.'; }
  /* game page: details left · the game right */
  #panel-practice.ar-desk[data-ar="skill-play"] #arcade-play-view, #panel-practice.ar-desk[data-ar="mq-play"] #mq-play-view { margin-top: 0 !important; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
  #panel-practice.ar-desk .ar-play-side { display: flex; flex-direction: column; grid-column: 2; grid-row: 1 / span 3; height: var(--ar-h, 70vh); min-height: 320px; }
  .ar-play-tools { display: none; justify-content: flex-end; margin-bottom: 6px; }
  .ar-play-side.ar-playing .ar-play-tools { display: flex; }
  .ar-play-hint { flex: 1; display: grid; place-items: center; border: 2px dashed var(--rule, #ccc); border-radius: 16px; color: var(--ink-soft); font-weight: 700; }
  .ar-play-side.ar-playing .ar-play-hint { display: none; }
  .ar-play-right { flex: 1; overflow: auto; min-height: 0; }
  .ar-play-side:not(.ar-playing) .ar-play-right { display: none; }
  .ar-play-side.ar-full { position: fixed; inset: 0; z-index: 1150; height: auto !important; background: var(--paper); padding: 12px 18px; }
  #panel-practice.ar-desk[data-ar="skill-play"] #arcade-play-wrap { grid-column: 1; display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: 12px; }
  #panel-practice.ar-desk[data-ar="skill-play"] #arcade-play-wrap > * { flex: 1 1 100%; }
  #panel-practice.ar-desk[data-ar="skill-play"] #arcade-play-wrap > #btn-arcade-study-toggle { order: 1; flex: 0 0 auto; margin: 0 0 14px !important; }
  #panel-practice.ar-desk[data-ar="skill-play"] #arcade-play-wrap > #btn-start-arcade { order: 2; flex: 0 0 auto; margin: 0 0 14px; width: 200px; }
  #panel-practice.ar-desk[data-ar="skill-play"] #arcade-play-wrap > #arcade-study-block { order: 3; }
  #panel-practice.ar-desk[data-ar="skill-play"] #arcade-play-wrap > .summary-cards { order: 4; }
  #panel-practice.ar-desk[data-ar="skill-play"] #arcade-play-wrap > .feedback-note { order: 5; }
  #panel-practice.ar-desk[data-ar="skill-play"] #arcade-play-wrap > :not(#btn-arcade-study-toggle):not(#btn-start-arcade):not(#arcade-study-block):not(.summary-cards):not(.feedback-note) { order: 6; }
  #panel-practice.ar-desk[data-ar="mq-play"] #mq-play-wrap { grid-column: 1; }
  .ar-intro-btns { display: flex; gap: 12px; align-items: center; }
  /* scores: section buttons + Download under Now viewing; Leaderboard · Highest scores · Every attempt */
  #panel-practice.ar-desk[data-ar$="-scores"] #arcade-mastery-view, #panel-practice.ar-desk[data-ar$="-scores"] #mq-scores-view { margin-top: 0 !important; }
  #panel-practice.ar-desk[data-ar$="-scores"] .arc-sc-head h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #panel-practice.ar-desk[data-ar$="-scores"] .arc-sc-head { justify-content: flex-end; margin: 0 0 10px; }
  #panel-practice.ar-desk[data-ar$="-scores"] .arc-sc-head .score-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
  #panel-practice.ar-desk[data-ar$="-scores"] .arc-sc-head .section-tabs { padding: 0 !important; margin: 0; }
  #panel-practice.ar-desk .arc-sc-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: start; }
  #panel-practice.ar-desk .arc-sc-cols.arc-sc-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #panel-practice.ar-desk .arc-sc-lb { grid-column: 1; grid-row: 1; }
  #panel-practice.ar-desk .arc-sc-hi { grid-column: 2; grid-row: 1; }
  #panel-practice.ar-desk .arc-sc-att { grid-column: 3; grid-row: 1; }
  #panel-practice.ar-desk .arc-sc-mastered { display: none; }
  #panel-practice.ar-desk .arc-sc-box { overflow: auto; padding-right: 4px; }
  #panel-practice.ar-desk .arc-sc-lb .arcade-leaderboard td { padding: 4px 8px !important; font-size: .8rem !important; }
  #panel-practice.ar-desk .arc-sc-lb .arcade-leaderboard img, #panel-practice.ar-desk .arc-sc-lb .arcade-leaderboard svg { max-width: 22px; max-height: 22px; }
  #panel-practice.ar-desk .arc-sc-box .ledger td, #panel-practice.ar-desk .arc-sc-box .ledger th { padding: 6px 8px; font-size: .82rem; }
  #panel-practice.ar-desk .arc-sc-tools .btn-small { padding: 4px 10px; font-size: .78rem; height: auto; }
  /* Study Guide / Question Bank / Questions: floating windows */
  #panel-practice .ar-float { position: fixed; z-index: 1100; top: 6vh; left: max(3vw, calc(50vw - 460px)); right: max(3vw, calc(50vw - 460px)); max-height: 88vh; overflow-y: auto; margin: 0 !important; background: var(--card); border-radius: 18px; padding: 16px 22px 20px; box-shadow: 0 0 0 100vmax rgba(20, 24, 18, .45), 0 20px 60px rgba(0,0,0,.3); }
  .ar-float-bar { position: sticky; top: -16px; z-index: 3; display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: -16px -22px 8px; padding: 10px 14px; background: var(--card); border-bottom: 1px solid var(--rule); }
  .ar-float-x { border: 0; background: none; font-size: 1.25rem; cursor: pointer; color: var(--ink-soft); padding: 2px 8px; }
  .ar-float-bar .fg-export-menu { right: 0; left: auto; }
}
@media (min-width: 900px) {
  #panel-practice.ar-desk:not([data-ar="skill-list"]) #arcade-skill-view { display: none !important; }
  #panel-practice.ar-desk[data-ar="skill-play"] #arcade-play-wrap > .ladder-speeds, #panel-practice.ar-desk[data-ar="skill-play"] #arcade-play-wrap .lad-speed-grid { order: 5; }
}
@media (min-width: 900px) {
  #panel-practice.ar-desk[data-ar="skill-play"] #arcade-play-wrap > .sg-modes-pick, #panel-practice.ar-desk[data-ar="skill-play"] #arcade-play-wrap > .category-title { order: 5; }
}
@media (min-width: 900px) {
  #panel-practice.ar-desk #arcade-skill-view:has(details.arcade-sec[open])::after, #panel-practice.ar-desk #mq-topics-view:has(details.mq-term[open])::after { display: none; }
}
@media (min-width: 900px) {
  #panel-launchpad.tk-desk #asg-scores-view.tk-right > .page-bar { justify-content: flex-end; gap: 10px; align-items: center; }
  #panel-launchpad.tk-desk #asg-scores-view.tk-right > .page-bar #asg-scores-sections { padding: 0 !important; margin: 0; }
}

/* v322 🚀 Booster · ⛺ Numeracy Camp (computer) */
.booster-chips-slot:empty { display: none; }
@media (min-width: 900px) {
  .content:has(> #panel-launchpad.tk-own) { max-width: none; }
  #panel-launchpad.tk-own #booster-view, #panel-launchpad.tk-own #camp-view { margin-top: 0 !important; }
  #panel-launchpad.tk-own .booster-h, #panel-launchpad.tk-own #camp-main > h3:first-of-type { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  /* Booster: the note, then Students · Game · Assigned */
  #booster-view:not(.hidden) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 20px; align-items: start; }
  #booster-view > * { grid-column: 1 / -1; }
  #booster-view > .booster-chips-slot { grid-column: 1 / -1; display: flex; justify-content: flex-end; margin-bottom: 4px; }
  #booster-view > .booster-chips-slot .section-tabs { margin: 0; padding: 0; justify-content: flex-end; }
  #booster-view > .booster-grid { display: contents; }
  #booster-view .booster-students { grid-column: 1; }
  #booster-view .booster-form { grid-column: 2; overflow-y: auto; }
  #booster-view .booster-assigned-col { grid-column: 3; }
  #booster-view .booster-students, #booster-view .booster-form, #booster-view .booster-assigned-col { margin: 0; }
  #booster-view .booster-assigned-col > h3 { margin-top: 0 !important; }
  #booster-student-list, #booster-assigned { overflow-y: auto; padding-right: 4px; }
  /* Numeracy Camp: left = note · LiNK level · Stations; right = sections · camps · the table */
  #camp-main:not(.hidden) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: 26px; align-items: start; }
  #camp-main > * { grid-column: 1; }
  #camp-main > .subtitle { grid-row: 1; }
  #camp-main > .camp-tools { grid-row: 2; }
  #camp-main > h3:last-of-type { grid-row: 3; }
  #camp-main > #camp-legend { grid-row: 4; overflow-y: auto; padding-right: 4px; }
  #camp-main > #camp-sec-tabs { grid-column: 2; grid-row: 1; align-self: start; justify-content: flex-end; margin: 0; }
  #camp-main > #camp-world-tabs { grid-column: 2; grid-row: 1; align-self: end; justify-content: flex-start; margin: 0 0 8px !important; }
  #camp-main > #camp-grid { grid-column: 2; grid-row: 2 / span 3; overflow: auto; font-size: .8rem; }
  #camp-main > #camp-grid td, #camp-main > #camp-grid th { padding: 4px 6px !important; }
  #camp-main > #camp-grid button { padding: 2px 6px; min-height: 0; font-size: .78rem; }
  #camp-main > #camp-legend td, #camp-main > #camp-legend th { padding: 6px 8px; font-size: .85rem; }
  #camp-main .camp-tools { margin: 0 0 12px; }
  /* 👀 View as a Student: details + camps (left) · the camp map (right) */
  #camp-preview.cv-desk .campview-bar { max-width: 50%; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="map"] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 26px; align-items: start; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="map"] > * { grid-column: 1; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="map"] > .nc-map { grid-column: 2; grid-row: 1 / span 8; width: auto; max-width: 100%; height: auto; justify-self: center; }
  #camp-preview.cv-desk .nc-wrap.nc-desk, #camp-preview.cv-desk .campview-bar { max-width: none; margin-left: 0; margin-right: 0; }
  #camp-preview.cv-desk .campview-bar { max-width: calc(50% - 13px) !important; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="map"] > h3.tasks-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="map"] > .nc-worlds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 26px; align-items: start; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] > * { grid-column: 1; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] > .nc-right { grid-column: 2; grid-row: 1 / span 6; min-height: 60vh; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] .nc-stations { grid-template-columns: 1fr; }
  #camp-preview.cv-desk .nc-station.sel { outline: 3px solid var(--accent, #2E6B2A); outline-offset: 2px; }
  .nc-pick { min-height: 50vh; display: grid; place-items: center; border: 2px dashed var(--rule, #ccc); border-radius: 16px; color: var(--ink-soft); font-weight: 700; }
  .nc-wrap.nc-pane { margin: 0; }
}
@media (min-width: 900px) {
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] .nc-station { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "i n l" "i s s"; align-items: center; text-align: left; gap: 2px 12px; padding: 10px 14px; min-height: 0; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] .nc-station .nc-si { grid-area: i; font-size: 1.6rem; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] .nc-station .nc-sn { grid-area: n; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] .nc-station .nc-sl { grid-area: l; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] .nc-station .nc-ss { grid-area: s; }
}

/* v323 web games in the right side · one Back · game rows · Numeracy Camp tidier */
.arcade-web-bar { display: none !important; } /* the game's own ‹ Back is the only one */
.arcade-web-pane { position: relative; display: flex; flex-direction: column; height: 100%; min-height: 0; background: #0f1630; border-radius: 14px; overflow: hidden; }
.arcade-web-pane iframe { flex: 1 1 auto; width: 100%; min-height: 0; border: 0; display: block; }
.ar-play-right:has(.arcade-web-pane) { overflow: hidden; display: flex; flex-direction: column; }
.ar-play-right:has(.arcade-web-pane) > .arcade-web-pane { flex: 1 1 auto; }
@media (min-width: 900px) {
  #panel-practice.ar-desk details[open] > .subject-grid, #panel-practice.ar-desk details[open] .mq-ch-row, #panel-practice.ar-desk details[open] .subject-grid { display: flex !important; flex-direction: column; gap: 6px; overflow: visible; }
  #panel-practice.ar-desk .arc-tile.arc-rowed { display: flex; flex-direction: row; align-items: center; gap: 12px; width: auto; max-width: none; min-height: 0; height: auto; padding: 8px 12px; text-align: left; flex: none; }
  .arc-row-left { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; }
  .arc-row-left > .icon { font-size: 1.6rem; margin: 0; width: 2.2rem; height: 2.2rem; flex: none; display: grid; place-items: center; }
  .arc-row-left > .icon img, .arc-row-left > .icon svg { max-width: 2.2rem; max-height: 2.2rem; }
  .arc-row-info { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-weight: 700; }
  .arc-row-info .ai-skill { display: inline; margin-left: 6px; font-weight: 500; }
  .arc-row-info .tgs-best { margin: 0; font-weight: 500; font-size: .78rem; }
  .arc-row-info .arc-sub { flex-basis: 100%; margin: 0; }
  .arc-row-btns { flex: none; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
  .arc-row-line { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
  .arc-row-line > * { margin: 0 !important; }
  .arc-row-line .btn-small { padding: 3px 10px; font-size: .76rem; height: auto; width: auto !important; flex: none; }
  .arc-row-line { flex-wrap: nowrap !important; }
  .ar-play-tools-left { display: inline-flex; margin-left: 4px; }
  .arc-row-line .link-btn { font-size: .78rem; }
  .arc-row-line .arc-period { font-size: .74rem; }
  .arc-row-line .calc-sw { font-size: .72rem; padding: 2px 8px; }
  .ar-play-hint > span { text-align: center; }
  /* Numeracy Camp */
  #panel-launchpad.tk-own #camp-main > .subtitle { display: none; }
  #btn-camp-preview, #btn-tgs-camp, #btn-camp-refresh { display: none !important; }
  #camp-main:not(.hidden) { grid-template-rows: auto auto 1fr; }
  #camp-main > .camp-tools { grid-row: 1; }
  #camp-main > h3:last-of-type { grid-row: 2; }
  #camp-main > #camp-legend { grid-row: 3; }
  #camp-main > .camp-right { grid-column: 2; grid-row: 1 / -1; display: flex; flex-direction: column; min-width: 0; }
  .camp-top-row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
  .camp-top-row .section-tabs { margin: 0 !important; padding: 0; }
  .camp-top-row #btn-camp-viewstudent { padding: 6px 12px; }
  .camp-right #camp-world-tabs { margin: 0 0 8px !important; justify-content: flex-start; }
  .camp-right #camp-grid { overflow: auto; font-size: .8rem; }
  .camp-right #camp-grid td, .camp-right #camp-grid th { padding: 4px 6px !important; }
  .camp-right #camp-grid button { padding: 2px 6px; min-height: 0; font-size: .78rem; }
  /* LiNK level box: 3 parts side by side, each label above its control */
  #camp-main .camp-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; align-items: start; }
  #camp-main .camp-tools > * { margin: 0 !important; }
  #camp-main .camp-tools .camp-level { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
  #camp-main .camp-tools .camp-tool-btns:nth-of-type(2) label { flex-direction: column; align-items: flex-start !important; }
  #camp-main .camp-tools .camp-tool-btns:nth-of-type(3) { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
  #camp-main .camp-tools .camp-tool-btns:nth-of-type(4) { display: none; }
  #camp-main .camp-tools #camp-status { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  .ar-play-side .ar-play-tools { display: none !important; }
  #panel-practice.ar-desk[data-ar="skill-play"] #arcade-play-wrap > .ar-play-full { order: 2 !important; flex: 0 0 auto !important; margin: 0 0 14px; align-self: center; }
  .ar-play-side.ar-full .ar-play-right { height: 100%; }
}
@media (min-width: 900px) { .ar-play-side.ar-full .ar-play-tools { display: flex !important; } }

/* v324 ✔ Check / ✏️ Re-check: icon and word on one line, smaller text that fits the button */
.btn-small.chk-btn { display: inline-flex !important; flex-direction: row !important; align-items: center; justify-content: center; gap: 4px; white-space: nowrap !important; font-size: .74rem !important; line-height: 1.2; padding: 4px 9px !important; width: auto !important; min-width: max-content; height: auto !important; min-height: 0; }
td:has(> .chk-btn), .rcv-acts { white-space: nowrap; }

/* v326 📝 PETA rows (computer): "PETA 1" + buttons under it (left) · details + Posted (right) */
@media (min-width: 900px) {
  #panel-launchpad.tk-desk .tk-left .task-card.tk-rowed { flex-wrap: nowrap; align-items: center; gap: 12px; }
  .tk-pt-left { flex: 1 1 auto; min-width: 0; display: flex; align-items: flex-start; gap: 10px; }
  .tk-pt-left > .icon { flex: none; }
  .tk-pt-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
  .tk-pt-main > strong { font-size: 1rem; }
  .tk-pt-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  .tk-pt-right { flex: 0 1 auto; margin-left: auto; display: flex; align-items: center; gap: 10px; text-align: right; min-width: 0; }
  .tk-pt-right .fg-sub { margin: 0; max-width: 220px; }
  .tk-pt-right > div { margin: 0 !important; white-space: nowrap; }
}
@media (min-width: 900px) { .tk-pt-left > .icon { font-size: 1.6rem; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; margin: 0; } }

/* v328 PETA rows: one top line (PETA 1 · title … · Posted) + one row of smaller buttons */
@media (min-width: 900px) {
  .tk-pt-left { width: 100%; }
  .tk-pt-main { flex: 1 1 auto; min-width: 0; gap: 6px; }
  .tk-pt-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .tk-pt-top > strong { flex: none; font-size: 1rem; }
  .tk-pt-top .tk-pt-title { flex: 0 1 auto; min-width: 0; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tk-pt-top .tk-pt-badge { flex: none; margin: 0 !important; }
  .tk-pt-btns { flex-wrap: nowrap !important; gap: 5px; min-width: 0; }
  .tk-pt-btns > .btn-small, .tk-pt-btns > .calc-sw { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 3px 8px !important; font-size: .72rem !important; }
}

/* v329 game rows (name · topic + best), assignment rows */
@media (min-width: 900px) {
  .arc-row-info { flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: 2px; }
  .arc-row-name { font-weight: 700; }
  .arc-row-name .ai-skill { display: none; }
  .arc-row-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-weight: 500; font-size: .8rem; color: var(--ink-soft); }
  .arc-row-sub .ai-skill { display: inline !important; margin: 0 !important; font-size: .8rem; }
  #panel-launchpad.tk-desk .tk-left .asg-lesson-card.tk-rowed { flex-direction: column; align-items: stretch; gap: 6px; }
  .tk-asg-r1 { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .tk-asg-r1 > .icon { flex: none; font-size: 1.3rem; margin: 0; }
  .tk-asg-r1 strong { font-size: .98rem; }
  .tk-asg-r2 { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-width: 0; padding-left: 2px; }
  .tk-asg-r2 .asg-card-btns { flex: none; }
  .tk-asg-r2 .tk-asg-detail { flex: 1 1 auto; min-width: 0; margin: 0 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .76rem; text-align: right; }
  .tk-asg-r2 .tk-asg-badge { flex: none; margin: 0 !important; }
  .tk-asg-r2 .calc-sw { flex: none; font-size: .72rem; padding: 2px 8px; }
}
@media (min-width: 900px) {
  .tk-asg-r1, .tk-asg-r2 { flex: none !important; }
  #panel-launchpad.tk-desk .tk-left .asg-lesson-card.tk-rowed { height: auto !important; min-height: 0 !important; }
}

/* v330 ⛺ Numeracy Camp: Stations list (Play beside the name · Booster fits) · 👀 View as a Student */
#camp-legend .camp-play-in { display: none; }
#camp-legend .camp-leg-stin { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#camp-legend .camp-leg-boost .btn-small { white-space: normal !important; text-align: left; line-height: 1.25; height: auto; max-width: 100%; }
#camp-legend table.tbl-cards .camp-play-in { display: inline-flex; }
#camp-legend table.tbl-cards tbody tr.tbl-cur > td.camp-leg-play, #camp-legend table.tbl-cards tbody tr.tbl-cur > td.camp-leg-none { display: none; }
#camp-legend table.tbl-cards tbody tr.tbl-cur { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
#camp-legend table.tbl-cards tbody tr.tbl-cur > td.camp-leg-boost { justify-content: center; }
#camp-legend table.tbl-cards tbody tr.tbl-cur > td.camp-leg-boost::before { display: none; }
#camp-legend table.tbl-cards tbody tr.tbl-cur > td.camp-leg-boost .btn-small { width: 100%; }
#camp-legend .tbl-wrap { overflow-x: hidden; }
#camp-legend .tbl-wrap.tbl-x { overflow-x: auto; }
#camp-main > h3:last-of-type { margin-top: 0 !important; }
@media (min-width: 900px) {
  #camp-main .camp-tools { margin: 0 0 8px !important; }
  #camp-legend td.camp-leg-boost { min-width: 130px; }
  /* 👀 View as a Student */
  #camp-preview.cv-desk .nc-wrap.nc-desk { position: relative; }
  #camp-preview.cv-desk .nc-wrap.nc-desk > .nc-sound { right: 8px; }
  #camp-preview.cv-desk .campview-bar { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 6px 12px; }
  #camp-preview.cv-desk .campview-bar > span:first-child { grid-column: 1 / 4; grid-row: 1; }
  #camp-preview.cv-desk .campview-bar > label { grid-column: 1; grid-row: 2; }
  #camp-preview.cv-desk .campview-bar > #campview-reset { grid-column: 2; grid-row: 2; justify-self: start; }
  #camp-preview.cv-desk .campview-bar > .nc-pb { grid-column: 4; grid-row: 1 / 3; display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin: 0; }
  #camp-preview.cv-desk .campview-bar > .nc-pb span { padding: 3px 10px; font-size: .78rem; white-space: nowrap; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="map"] > .nc-worlds { gap: 8px; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="map"] .nc-world { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "i n" "i s"; align-items: center; justify-items: start; text-align: left; gap: 0 10px; padding: 8px 12px; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="map"] .nc-world .nc-wi { grid-area: i; font-size: 1.6rem; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="map"] .nc-world .nc-wn { grid-area: n; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="map"] .nc-world .nc-ws { grid-area: s; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="map"] .nc-world .nc-certlink { grid-column: 2; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] > .nc-right { min-height: 0; overflow: auto; }
}
.nc-cv-title { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0 !important; }
#camp-legend .camp-play-in::before { content: '▶ Play'; }

/* v330 📄 Responses: one look everywhere (and in ⛶ full screen at any zoom) — black text on the light page colour;
   dark mode: white text on dark green. A score box under each answer. 📇 One at a time = top tile · question rows · bottom tile. */
#perf-responses-view { --pq-ink: #111; --pq-bg: var(--card); --pq-head: var(--paper-2); --pq-line: var(--rule); }
:root[data-theme="dark"] #perf-responses-view, html[data-palette="charcoal"]:not([data-screen="gate"]) #perf-responses-view { --pq-ink: #fff; --pq-bg: #20261A; --pq-head: #2B3323; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #perf-responses-view { --pq-ink: #fff; --pq-bg: #20261A; --pq-head: #2B3323; } }
#perf-responses-view .tbl-box.tbl-full { background: var(--pq-bg); }
.perf-resp-table, .perf-resp-table th, .perf-resp-table td, .perf-resp-table td *, .perf-resp-table th *:not(input), .prq-card, .prq-card * { color: var(--pq-ink); }
.perf-resp-table td, .perf-resp-table tbody tr, .perf-resp-table .tbl-bg { background-color: var(--pq-bg) !important; }
.perf-resp-table thead th, .perf-resp-table .tbl-head { background-color: var(--pq-head) !important; }
.perf-resp-table .perf-hps-row th { background-color: var(--pq-head) !important; }
.perf-resp-table ::selection, .prq-card ::selection { background: #BFDBFE; color: #111; }
.perf-resp-table .sim-badge, .perf-resp-table .sim-mini, .prq-card .sim-badge, .prq-card .sim-mini { color: #111 !important; }
.perf-resp-table .sim-badge *, .perf-resp-table .sim-mini *, .prq-card .sim-badge *, .prq-card .sim-mini * { color: #111 !important; }
.perf-resp-table .perf-q-sub { color: var(--pq-ink); opacity: .85; max-width: 220px; white-space: normal; }
.perf-resp-table .prq-th { min-width: 170px; }
.prq-mark { font-weight: 800; }
.prq-mark.ok { color: #2E7D32 !important; } .prq-mark.no { color: #C62828 !important; }
.perf-resp-table .prq-cell { min-width: 170px; max-width: 260px; white-space: normal; }
.prq-sc { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; white-space: nowrap; }
.prq-sc input.prq-in { width: 3.6em; min-width: 0; padding: 3px 6px; margin: 0; font-size: .85rem; text-align: center; border: 1.5px solid var(--olive-base, #6B7A3D); border-radius: 8px; background: var(--pq-bg); color: var(--pq-ink); height: auto; }
.prq-sc input.prq-in.done { border-color: var(--olive-deep, #4A5A28); font-weight: 700; }
.prq-sc small { font-size: .78rem; }
#perf-responses-list .tbl-wrap { overflow: auto; }
.tbl-box.tbl-full .tbl-wrap { max-height: none !important; }
.prq-card-btn { font: inherit; }
.tbl-box.prq-card-on [data-z] { opacity: .45; }
.prq-card { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; overflow: auto; }
.tbl-box.tbl-full .prq-card { flex: 1; min-height: 0; }
.prq-top, .prq-bot { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.prq-bot { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.prq-top > div, .prq-bot > div { border: 1px solid var(--pq-line); border-radius: 10px; padding: 8px 10px; background: var(--pq-bg); min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.prq-top span, .prq-bot > div > span { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
.prq-top b { font-size: .95rem; overflow-wrap: anywhere; }
.prq-qtable { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--pq-line); border-radius: 10px; overflow: hidden; background: var(--pq-bg); }
.prq-qtable th { background: var(--pq-head); text-align: left; font-size: .78rem; padding: 6px 10px; }
.prq-qtable td { padding: 8px 10px; border-top: 1px solid var(--pq-line); vertical-align: top; font-size: .88rem; background: var(--pq-bg); }
.prq-qtable th:first-child, .prq-qtable td.prq-q { width: 38%; }
.prq-qtable th:last-child, .prq-qtable td.prq-scc { width: 7.5em; white-space: nowrap; }
.prq-qtable .prq-sc { margin: 0; }
.prq-bot .prq-tot .prq-tot-n { font-size: 1.15rem; }
@media (max-width: 640px) { .prq-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } .prq-bot { grid-template-columns: 1fr; } .prq-qtable th:first-child, .prq-qtable td.prq-q { width: 34%; } }
.prq-card { width: 100%; box-sizing: border-box; text-align: left; }
.prq-card .prq-qtable td, .prq-card .prq-qtable th { text-align: left; }

/* v333 👀 View as a Student (computer): a camp's stations / a level — no camp title or "Viewing as a student" box;
   stations in 2 columns of short tiles; a slim Quick Check-in */
@media (min-width: 900px) {
  #panel-launchpad:has(#camp-preview.cv-desk:not(.hidden) .nc-wrap.nc-desk:not([data-v="map"])) > .panel-title { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0 !important; }
  #camp-preview.cv-desk:has(.nc-wrap.nc-desk:not([data-v="map"])) > .campview-bar { display: none !important; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] > h3.tasks-h { margin: 0 0 8px; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] .nc-stations { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; overflow-y: auto; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] .nc-station { padding: 6px 10px !important; gap: 0 8px !important; grid-template-columns: auto 1fr !important; grid-template-areas: "i n" "i l" "i s" !important; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] .nc-station .nc-si { font-size: 1.3rem !important; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] .nc-station .nc-sn { font-size: .9rem; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] .nc-station .nc-sl { font-size: .72rem; justify-self: start; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] .nc-station .nc-ss { font-size: .62rem; letter-spacing: -1px; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] .nc-checkin { padding: 6px 10px; gap: 10px; margin-bottom: 8px; font-size: .8rem; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] .nc-checkin br { display: none; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] .nc-checkin b { margin-right: 6px; }
  #camp-preview.cv-desk .nc-wrap.nc-desk[data-v="world"] .nc-checkin .btn-small { padding: 4px 12px; flex: none; }
}

/* v335 number pad (every game that uses it) — smaller keys on a computer · Numeracy Camp: Next / See results / Finish
   sits under ✓ Check, with the remark and the solution on its left */
@media (min-width: 900px) {
  body .sg-kp { gap: 5px; }
  body .sg-kp button { font-size: 1.05rem; padding: 6px 0; border-radius: 10px; }
  body .sg-kp .sg-kp-ok { font-size: .95rem; padding: 6px 12px; }
  body .sg-kp-show { min-height: 40px; font-size: 1.35rem; margin-bottom: 6px; padding: 2px 12px; border-radius: 10px; }
  body .sg-kp-pre, body .sg-kp-suf { font-size: 1rem; }
  .nc-fb:has(> .nc-next) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 5px; align-items: start; }
  .nc-fb:has(> .nc-next) > :not(.nc-next) { grid-column: 1; }
  .nc-fb:has(> .nc-next) > .nc-next { grid-column: 2; grid-row: 1 / span 4; max-width: none; width: 100%; margin: 0; }
}

/* v337 ⏹ Stop in a Mastery game · Start row lined up (Mastery and Skill game pages) */
.mq-quiz-top:has(.mq-stop) { display: flex; align-items: center; gap: 12px; }
.mq-quiz-top:has(.mq-stop) .mq-quiz-progress { margin-right: auto; }
.mq-stop { font: inherit; font-weight: 800; font-size: .85rem; padding: 4px 12px; border-radius: 999px; border: 2px solid #C62828; background: #fff; color: #C62828; cursor: pointer; flex: none; line-height: 1.2; }
.mq-stop:hover { background: #C62828; color: #fff; }
.ar-play-side:has(> .mq-stop-float) { position: relative; }
.mq-stop-float { position: absolute; top: 8px; right: 8px; z-index: 5; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
@media (min-width: 900px) {
  #panel-practice.ar-desk .ar-intro-btns { align-items: stretch; flex-wrap: nowrap; }
  #panel-practice.ar-desk .ar-intro-btns > button, #panel-practice.ar-desk #btn-start-arcade, #panel-practice.ar-desk #btn-arcade-study-toggle, #panel-practice.ar-desk .ar-play-full.ar-play-tools-left { margin-top: 0 !important; margin-bottom: 0 !important; min-height: 46px; height: 46px; box-sizing: border-box; align-self: flex-start !important; display: inline-flex; align-items: center; justify-content: center; }
  #panel-practice.ar-desk .ar-play-full.ar-play-tools-left { margin-left: 0 !important; }
}

/* v338 ＋ Add Game under the TERM boxes (Mastery list, computer) */
@media (min-width: 900px) {
  #panel-practice.ar-desk #mq-topics-grid .mq-term-body > [data-add-game] { display: none !important; }
  .mq-add-desk { margin-top: 14px; align-self: flex-start; justify-self: start; width: auto !important; max-width: max-content; padding: 10px 22px; display: block; }
}

/* v339 🧮 Grade 11 / 🎓 Grade 12 page (computer): left = note · buttons · Camp chart; right = section tiles / learners / Camp Progress */
@media (min-width: 900px) {
  #g12-root.g12-desk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 26px; align-items: start; }
  .g12-left { min-width: 0; display: flex; flex-direction: column; }
  .g12-left > .subtitle { margin-bottom: 10px !important; }
  .g12-left .g12-tools { display: flex; flex-direction: column; align-items: stretch; gap: 8px; max-width: 360px; }
  .g12-left .g12-tools > button { margin: 0 !important; text-align: left; }
  .g12-left > .fg-sub { margin: 6px 0 6px !important; }
  .g12-right { min-width: 0; display: flex; flex-direction: column; min-height: 0; }
  .g12-tiles { overflow-y: auto; min-height: 0; flex: 1 1 auto; padding: 2px 4px 2px 2px; }
  .g12-tiles .subject-grid.g12-secs { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 10px; }
  .g12-tiles .subject-card { width: auto !important; max-width: none !important; min-height: 0 !important; padding: 10px 8px !important; }
  .g12-tiles .subject-card .icon { font-size: 1.6rem; margin-bottom: 2px; }
  .g12-tiles > h3 { margin: 12px 0 6px !important; font-size: 1rem; }
  .g12-r-title { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0 !important; }
  .g12-scroll { overflow: auto; min-height: 0; border-radius: 10px; }
  .g12-scroll table { width: 100%; }
  .g12-scroll thead th { position: sticky; top: 0; z-index: 1; background: var(--paper-2); }
  .g12-line-btn { padding: 2px 10px !important; }
  .g12-camp-host { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
  .g12-camp-host #camp-sec-tabs { display: grid !important; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin: 0 0 8px !important; padding: 0; }
  .g12-camp-host #camp-sec-tabs .chip { margin: 0; text-align: center; padding: 5px 4px; font-size: .82rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .g12-camp-host #camp-world-tabs { margin: 0 0 8px !important; padding: 0; }
  .g12-camp-host #camp-grid { overflow: auto; min-height: 0; flex: 1 1 auto; font-size: .8rem; }
  .g12-camp-host #camp-grid td, .g12-camp-host #camp-grid th { padding: 4px 6px !important; }
  .g12-camp-host #camp-grid button { padding: 2px 6px; min-height: 0; font-size: .78rem; }
}
.g12-stats { margin-top: 12px; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); padding: 10px 12px; display: flex; flex-direction: column; min-height: 0; }
.g12-stats-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; }
.g12-stats-big { font-weight: 800; color: #2E7D32; }
.g12-stat-tabs { margin: 0 0 8px !important; padding: 0 !important; }
.g12-stats-body { overflow-y: auto; min-height: 0; }
.g12-chart { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.g12-pie { flex: none; }
.g12-legend { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 200px; font-size: .88rem; }
.g12-legend > div { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; }
.g12-legend i { width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0,0,0,.12); }
.g12-legend small { color: var(--ink-soft); font-size: .75rem; }
.g12-bar-world { font-weight: 800; margin: 8px 0 2px; font-size: .85rem; }
.g12-bar { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr) auto auto; align-items: center; gap: 8px; font-size: .8rem; margin: 2px 0; }
.g12-bar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g12-bar-t { position: relative; height: 10px; border-radius: 6px; background: var(--paper-2); overflow: hidden; }
.g12-bar-t i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: #2E7D32; }
.g12-bar-t i.tried { background: #A5D6A7; }
.g12-bar small { color: var(--ink-soft); }
.g12-line-card { width: min(520px, 94vw); display: flex; flex-direction: column; }
.g12-line-msgs { height: min(52vh, 460px); overflow-y: auto; border: 1px solid var(--rule); border-radius: 12px; padding: 8px; background: var(--paper); }
.g12-line-type { display: flex; gap: 8px; margin-top: 8px; }
.g12-line-type input { flex: 1; margin: 0; }
@media (min-width: 900px) { .content:has(#students-g12-view:not(.hidden) #g12-root.g12-desk) { max-width: none; } }
@media (min-width: 900px) { #g12-root.g12-desk .g12-r-back { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: 0 !important; border: 0 !important; overflow: hidden !important; clip-path: inset(50%) !important; opacity: 0 !important; } }

/* v340 Grade 11/12 (computer): the 4 (or 6) buttons in one even row · chart: sections in 2 columns with a remark; camps in 2 columns · ✕ on the learner list */
@media (min-width: 900px) {
  .g12-left .g12-tools { display: grid !important; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; max-width: none !important; }
  .g12-left .g12-tools > button { text-align: center !important; padding: 7px 4px !important; font-size: .8rem !important; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 0; }
  .g12-r-bar { display: flex; align-items: center; gap: 10px; padding: 0 0 6px; }
  .g12-r-bar .g12-r-x { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--rule); background: var(--card); color: var(--ink); font-size: 1rem; cursor: pointer; flex: none; }
  .g12-r-bar .g12-r-x:hover { background: var(--olive-deep, #4A5A28); color: #fff; }
}
.g12-chart-sec { align-items: flex-start; }
.g12-legend2 { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px !important; }
.g12-legend2 > div { grid-template-columns: 12px minmax(0, 1fr) auto !important; grid-template-areas: "c n b" "c s s" "c r r"; row-gap: 0 !important; }
.g12-legend2 > div > i { grid-area: c; align-self: start; margin-top: 4px; }
.g12-legend2 .g12-lg-n { grid-area: n; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g12-legend2 > div > b { grid-area: b; }
.g12-legend2 > div > small { grid-area: s; }
.g12-remark { grid-area: r; font-style: normal; font-size: .75rem; font-weight: 700; }
.g12-bar-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.g12-bar-cols .g12-bar { grid-template-columns: minmax(0, 46%) minmax(0, 1fr) auto auto; gap: 5px; }

/* v341 Per section: one line per section (2 columns) · slice label at the pointer · Grade 12 buttons wrap to 2 lines */
.g12-legend1 { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 14px !important; font-size: .8rem !important; }
.g12-legend1 > div { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto !important; align-items: center; gap: 6px; white-space: nowrap; }
.g12-legend1 > div > i { width: 10px !important; height: 10px !important; }
.g12-legend1 .g12-lg-n { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.g12-legend1 .g12-lg-c { font-variant-numeric: tabular-nums; }
.g12-lg-dot { cursor: help; font-size: .8rem; }
.g12-pie [data-tip] { cursor: pointer; transition: opacity .12s; }
.g12-pie:hover [data-tip]:not(.on) { opacity: .55; }
.g12-tip { position: fixed; z-index: 9500; pointer-events: none; background: #263238; color: #fff; font-size: .78rem; font-weight: 600; padding: 5px 9px; border-radius: 8px; box-shadow: 0 3px 10px rgba(0,0,0,.25); max-width: 320px; }
.g12-tip.hidden { display: none; }
@media (min-width: 900px) {
  .g12-left .g12-tools > button { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; display: flex !important; align-items: center; justify-content: center; }
  .g12-left .g12-tools:has(> button:nth-child(5)) > button { font-size: .74rem !important; padding: 5px 3px !important; }
}

/* v342 the header (CHIM logo) stays at the top while the page scrolls — computers and phones (slimmer on phones) */
.app-shell > .topbar { position: sticky; top: 0; z-index: 800; background-color: var(--paper); }
.topbar img.wordmark-sm { width: auto; object-fit: contain; }
@media (max-width: 640px) { .app-shell > .topbar { padding: 4px 12px; } .topbar img.wordmark-sm { height: 40px; } }
.chim-home-fab { top: calc(var(--chim-head-h, 0px) + 10px + env(safe-area-inset-top, 0px)) !important; }

/* v343 ⛺ Numeracy Camp (teacher, computer): no Now viewing — View as a Student, the sections, camps and table move up */
@media (min-width: 900px) {
}

/* v344 🧭 Now viewing shows only on the pages ticked in Admin → Control (body.nv-hide = this page is unticked) */
body.nv-hide #teacher-subject-switcher-wrap { display: none !important; }
body.nv-hide #teacher-crumb-cell { grid-column: 1; }
@media (max-width: 899px) { body.nv-hide #teacher-crumb-cell { grid-column: 1 / -1; } }
.ctl-nowview { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 18px; }
.ctl-nv-grp { display: flex; flex-direction: column; gap: 2px; }
.ctl-nv-grp > b { margin: 4px 0 2px; }

/* v346 📊 Grade Sheet (computer): title row under the breadcrumbs, chips under Now viewing, tools above the table, the table fits */
.gs-ir, .gs-chips-slot:empty { display: none; }
@media (min-width: 900px) {
  #panel-grades.gs-desk > .panel-title { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0 !important; }
  #panel-grades.gs-desk #grades-sheet-view .page-bar { display: flex; align-items: baseline; gap: 10px; flex-wrap: nowrap; margin: 0 0 8px; }
  #panel-grades.gs-desk #grades-term-title { font-size: 1.35rem; white-space: nowrap; }
  #panel-grades.gs-desk .gs-ir { display: inline; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
  #panel-grades.gs-desk .gs-chips-slot { display: flex; margin-left: auto; justify-content: flex-end; }
  #panel-grades.gs-desk .gs-chips-slot .section-tabs { margin: 0 !important; padding: 0 !important; justify-content: flex-end; flex-wrap: nowrap; }
  #panel-grades.gs-desk .gs-weights, #panel-grades.gs-desk #grades-sheet-tools, #panel-grades.gs-desk .gs-save-row { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0 !important; }
  #panel-grades.gs-desk #grades-sheet-table { overflow: visible !important; }
  #panel-grades.gs-desk #grades-sheet-table .tbl-wrap { overflow: auto; }
  .gs-px-wrap { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; flex-wrap: wrap; }
  .gs-px-wrap .btn-small { margin: 0; }
  .gs-px-st { font-size: .8rem; }
}
@media (min-width: 900px) { .content:has(> #panel-grades.gs-desk) { max-width: none; } }

/* v347 ⚡ FlashGrade (computer) */
.fg-title-tag { font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #FFF3CD; color: #6B4E00; vertical-align: middle; font-family: inherit; }
@media (min-width: 900px) {
  #panel-grades.fg-desk > .panel-title { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0 !important; }
  .content:has(> #panel-grades.fg-desk) { max-width: none; }
  #panel-grades.fg-desk #grades-flashgrade-view { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; }
  #panel-grades.fg-desk #grades-flashgrade-view > .page-bar { display: contents; }
  #panel-grades.fg-desk #grades-flashgrade-view > .page-bar > div { grid-column: 2; grid-row: 1; justify-content: flex-start !important; }
  #panel-grades.fg-desk #grades-flashgrade-view > #fg-title { grid-column: 1; grid-row: 1; margin: 0 0 8px; font-size: 1.35rem; white-space: nowrap; }
  #panel-grades.fg-desk #grades-flashgrade-view > #fg-body { grid-column: 1 / -1; grid-row: 2; min-width: 0; align-self: start; }
  /* list: one compact row per assessment */
  #panel-grades.fg-desk .fg-list { gap: 6px; }
  #panel-grades.fg-desk .fg-list-body { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding-right: 4px; }
  #panel-grades.fg-desk .fg-list-head { grid-template-columns: minmax(0, 1fr) 56px 56px 72px 72px 470px; }
  #panel-grades.fg-desk .fg-list-item { display: grid; grid-template-columns: minmax(0, 1fr) 470px; align-items: center; column-gap: 8px; padding: 10px 14px; }
  #panel-grades.fg-desk .fg-list-row1 { grid-template-columns: minmax(0, 1fr) 56px 56px 72px 72px; }
  #panel-grades.fg-desk .fg-list-row2 { margin: 0; padding: 0; border: 0; flex-wrap: nowrap; justify-content: flex-end; }
  #panel-grades.fg-desk .fg-list-item > .fg-sub { grid-column: 1 / -1; }
  /* ✏️ Edit: left = details · sections · keys · bubbles; right = Save/Cancel/Delete and the skills table */
  #panel-grades.fg-desk .fg-form:has(> .fg-ed-left) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 22px; align-items: start; }
  #panel-grades.fg-desk .fg-ed-left { overflow-y: auto; min-width: 0; padding-right: 6px; }
  #panel-grades.fg-desk .fg-ed-left .inline-form { gap: 8px 12px; margin-bottom: 6px; padding: 10px 12px !important; }
  #panel-grades.fg-desk .fg-ed-left .inline-form .field { min-width: 0 !important; }
  #panel-grades.fg-desk .fg-ed-left .inline-form label { margin: 0 0 2px; font-size: .78rem; }
  #panel-grades.fg-desk .fg-ed-left .inline-form input, #panel-grades.fg-desk .fg-ed-left .inline-form select { padding: 4px 6px; font-size: .9rem; }
  #panel-grades.fg-desk .fg-ed-left > label { margin-top: 6px; }
  #panel-grades.fg-desk .fg-ed-left #fg-version-tabs { padding: 6px 0 2px !important; }
  #panel-grades.fg-desk .fg-ed-left .fg-sheet-key { margin-top: 6px; }
  #panel-grades.fg-desk .fg-ed-right { min-width: 0; display: flex; flex-direction: column; }
  #panel-grades.fg-desk .fg-ed-right > div:first-child { margin: 0 0 8px !important; }
  #panel-grades.fg-desk .fg-ed-right > label { margin-top: 0; }
  #panel-grades.fg-desk .fg-ed-right > .fg-scroll-box { overflow: auto !important; }
}
@media (min-width: 900px) {
  #panel-grades.fg-desk .fg-list-head { grid-template-columns: minmax(0, 1fr) 56px 56px 72px 72px var(--fg-btns, 520px); }
  #panel-grades.fg-desk .fg-list-item { grid-template-columns: minmax(0, 1fr) var(--fg-btns, 520px); }
  #panel-grades.fg-desk .fg-list-row2 .btn-small { white-space: nowrap; }
  #panel-grades.fg-desk .fg-ed-row { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin: 4px 0; }
  #panel-grades.fg-desk .fg-ed-row > label { margin: 0; }
  #panel-grades.fg-desk .fg-ed-row .tick-list { margin: 0; }
  #panel-grades.fg-desk .fg-ed-row #fg-version-tabs { padding: 0 !important; margin: 0 0 0 auto; }
}

/* v348 ⚡ FlashGrade Results (computer) */
@media (min-width: 900px) {
  #panel-grades.fg-desk #grades-flashgrade-view[data-v="results"] #btn-fg-export { display: none !important; }
  #panel-grades.fg-desk .fg-results-bar #fg-nyt { margin: 0; }
  #panel-grades.fg-desk .fg-page-buttons.fg-pages-docked { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 0 0 0 6px; padding: 0; border: 0; }
  #panel-grades.fg-desk .fg-h-row > .fg-page-buttons.fg-pages-docked { margin-left: auto; }
  #panel-grades.fg-desk #grades-flashgrade-view[data-v="results"] #fg-body .tbl-wrap { overflow: auto; }
}

/* v349 ⚡ FlashGrade Results (computer): 📇 One at a time = one row of tiles sized to their text · smaller Class Summary */
@media (min-width: 900px) {
  #panel-grades.fg-desk #grades-flashgrade-view[data-v="results"] #fg-body table.tbl-cards tbody tr.tbl-cur { display: flex !important; flex-wrap: nowrap; gap: 6px; align-items: stretch; }
  #panel-grades.fg-desk #grades-flashgrade-view[data-v="results"] #fg-body table.tbl-cards tbody tr.tbl-cur > td { flex: 1 1 auto; width: auto !important; min-width: 0; grid-column: auto !important; font-size: .85rem; padding: 6px 8px; background: var(--card); overflow-wrap: anywhere; }
  #panel-grades.fg-desk #grades-flashgrade-view[data-v="results"] #fg-body table.tbl-cards tbody tr.tbl-cur > td::before { font-size: .62rem; white-space: nowrap; }
  #panel-grades.fg-desk #grades-flashgrade-view[data-v="results"] #fg-body table.tbl-cards tbody tr.tbl-cur > td.tbl-cardname { font-size: .9rem; background: var(--paper-2); }
  #panel-grades.fg-desk #grades-flashgrade-view[data-v="results"] #fg-body table.tbl-cards tbody tr.tbl-cur > td:last-child { flex: 0 0 auto; justify-content: center; }
  #panel-grades.fg-desk #grades-flashgrade-view[data-v="results"] #fg-body table.tbl-cards tbody tr.tbl-cur > td:last-child::before { display: none; }
  /* smaller Class Summary + tighter spacing */
  #panel-grades.fg-desk #grades-flashgrade-view[data-v="results"] .fg-h { margin: 6px 0 4px; font-size: 1rem; }
  #panel-grades.fg-desk #grades-flashgrade-view[data-v="results"] .summary-cards { gap: 6px; margin: 0 0 6px; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
  #panel-grades.fg-desk #grades-flashgrade-view[data-v="results"] .summary-card { padding: 5px 10px; min-height: 0; border-radius: 10px; }
  #panel-grades.fg-desk #grades-flashgrade-view[data-v="results"] .summary-card .big { font-size: 1.1rem; line-height: 1.2; }
  #panel-grades.fg-desk #grades-flashgrade-view[data-v="results"] .summary-card .label { font-size: .7rem; }
  #panel-grades.fg-desk #grades-flashgrade-view[data-v="results"] .fg-results-bar { margin-bottom: 4px; gap: 8px; }
  #panel-grades.fg-desk #grades-flashgrade-view[data-v="results"] .fg-h-row { margin: 4px 0 2px; }
  #panel-grades.fg-desk #grades-flashgrade-view[data-v="results"] #fg-body .tbl-box { margin: 2px 0 0; }
  #panel-grades.fg-desk #grades-flashgrade-view[data-v="results"] #fg-title { margin-bottom: 4px; }
}

/* v350 🔍 Diagnostics (teacher, computer): title + Term · Add quiz · Excused · 👀 Show in one row, sections on the right under Now viewing;
   📈 Student · 📊 Section + the name above the graph; the table and the graph fill the screen */
.diag-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 8px; }
.diag-head .diag-title { margin: 0; }
.diag-head .diag-bar { margin: 0; }
.diag-share { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; margin: 0; cursor: pointer; }
.diag-share input { width: auto; margin: 0; }
.diag-chart-tabs { align-items: center; flex-wrap: wrap; }
.diag-chart-name { font-weight: 800; font-size: .92rem; margin-left: 6px; }
.diag-stu-term { margin-bottom: 14px; }
@media (min-width: 900px) {
  #panel-grades:has(#grades-diag-view.diag-desk:not(.hidden)) > .panel-title { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0 !important; }
  .content:has(> #panel-grades #grades-diag-view.diag-desk:not(.hidden)) { max-width: none; }
  #grades-diag-view.diag-desk .diag-head { flex-wrap: nowrap; }
  #grades-diag-view.diag-desk .diag-head .diag-title { font-size: 1.35rem; white-space: nowrap; }
  #grades-diag-view.diag-desk .diag-head .diag-chips { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
  #grades-diag-view.diag-desk .diag-head .diag-chips .chip { margin: 0; }
  #grades-diag-view.diag-desk .diag-right { position: static; display: flex; flex-direction: column; }
  #grades-diag-view.diag-desk .diag-chart { display: flex; align-items: center; justify-content: center; }
  #grades-diag-view.diag-desk .diag-chart .diag-svg { width: 100%; height: 100%; }
  #grades-diag-view.diag-desk .diag-chart { flex-direction: column; }
  #grades-diag-view.diag-desk .diag-chart .diag-svg { flex: 1 1 auto; min-height: 0; }
}
@media (min-width: 900px) { #grades-diag-view.diag-desk { margin-top: 0 !important; } #grades-diag-view.diag-desk > .page-bar { margin: 0 !important; } }
.diag-chart .diag-share { display: flex; justify-content: center; margin: 4px 0 2px; color: #1f2937; flex: none; }
.chim-focus-pop { z-index: 99999; display: flex; align-items: center; justify-content: center; }
.chim-focus-pop .modal-card { max-width: 440px; text-align: center; }

/* v352 🧹 Cleaners Today (computer): buttons + group cards on the left, sections · Setup · today's table on the right */
@media (min-width: 900px) {
  .cln-layout.cln-swap > .cln-right { order: 1; }
  .cln-layout.cln-swap > .cln-left { order: 2; }
  .cln-layout.cln-swap > .cln-right > .cln-tools { margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
  .cln-layout.cln-swap > .cln-left > .sp-secs { margin-top: 0; justify-content: flex-end; }
}
@media (min-width: 900px) { .cln-layout.cln-swap > .cln-right.cln-paged > .cln-tools { margin: 0 -44px 10px; } }

/* v353 Notebook: 🎯 Check competencies (with a count) and 📤 Share all of Term in one row */
.nb-comps-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nb-comps-bar .nb-share-actions { display: inline-flex; gap: 8px; margin: 0; flex-wrap: wrap; }
.nb-cc-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #E8590C; color: #fff; font-size: .72rem; font-weight: 800; margin-left: 4px; }

/* v354 Cleaners Today (computer): the notify button / confirmed note beside ⛶ */
@media (min-width: 900px) {
  .cln-foot.cln-foot-docked { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 0 auto; padding: 0; border: 0; flex: 0 1 auto; min-width: 0; }
  .cln-foot.cln-foot-docked #cln-confirm { max-width: none !important; width: auto; padding: 5px 12px; font-size: .8rem; min-height: 0; height: auto; margin: 0; white-space: nowrap; }
  .cln-foot.cln-foot-docked #cln-status { font-size: .78rem; white-space: nowrap; }
  .cln-foot.cln-foot-docked #cln-status:empty { display: none; }
}
@media (min-width: 900px) { .tbl-tools .cln-foot.cln-foot-docked #cln-confirm { background: var(--olive-deep, #4A5A28) !important; color: #fff !important; border-color: var(--olive-deep, #4A5A28) !important; font-weight: 700; } }

/* v355 🪑 Seat Plan Setup (computer): one compact row — Rows · Columns | 🪑 Generate (+ chairs note); smaller note */
@media (min-width: 900px) {
  .sp-setup.sp-desk .sp-dims { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); gap: 4px 12px; align-items: end; }
  .sp-setup.sp-desk .sp-dims > label { margin: 0; font-size: .8rem; }
  .sp-setup.sp-desk .sp-dims input { padding: 2px 6px; height: 32px; min-height: 0; font-size: .95rem; margin: 2px 0 0; }
  .sp-setup.sp-desk .sp-dims .sp-actions { margin: 0; display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
  .sp-setup.sp-desk .sp-dims #sp-gen { max-width: none !important; width: 100%; font-size: .88rem; padding: 7px 10px; min-height: 0; height: auto; }
  .sp-setup.sp-desk .sp-dims #sp-cap, .sp-setup.sp-desk .sp-dims #sp-gen-note { font-size: .74rem; margin: 0; text-align: center; }
  .sp-setup.sp-desk .sp-dims #sp-gen-note:empty { display: none; }
  .sp-setup.sp-desk > p.fg-sub { font-size: .74rem; line-height: 1.3; margin: 4px 0 !important; }
}

/* v357 Seat Plan Setup: Rows / Columns narrow (¼ together), Generate wide; labels on two lines */
.sp-dl b { font-weight: 700; } .sp-dl small { font-size: .78em; opacity: .8; }
@media (min-width: 900px) {
  .sp-setup.sp-desk .sp-dims { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 6fr) !important; }
  .sp-setup.sp-desk .sp-dl { display: flex; flex-direction: column; line-height: 1.2; }
  .sp-setup.sp-desk .sp-dl small { white-space: nowrap; font-size: .68rem; }
}

/* v358 Seat Plan Setup: each number box as wide as its label */
@media (min-width: 900px) {
  .sp-setup.sp-desk .sp-dims > label { min-width: 0; }
  .sp-setup.sp-desk .sp-dims > label input { width: 100% !important; max-width: 100%; min-width: 0; box-sizing: border-box; }
}

/* v358 Scientific Calculator (computer): the 📌 Floating 🧮 switch beside ✏️ Edit · ➕ Add */
@media (min-width: 900px) {
  .nbm-tools { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
  .nbm-tools .calc-float-sw.nbc-float-mini { margin: 0 0 0 4px !important; padding: 5px 10px !important; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: flex-start !important; text-align: left; border-radius: 10px; }
  .nbm-tools .nbc-float-mini label { margin: 0; font-size: .8rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
  .nbm-tools .nbc-float-mini label input { margin: 0; width: auto; }
  .nbm-tools .nbc-float-mini .fg-sub { font-weight: 400; font-size: .74rem; }
}
@media (min-width: 900px) { #notebook-calculator-view:has(.nbc-float-mini) .nbc-manual { grid-row: 1 / span 2; } }

/* v362 🎮 Skill game pages (computer, teacher and student): small one-row stat boxes · speed tiles with
   the icon beside the name · Power Match timer + Next round in the top row · Time Travel clock | choices */
.pw-next-slot:empty { display: none; }
.pw-next-slot .dg-next { margin: 0; }
@media (min-width: 900px) {
  .summary-cards.ar-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px !important; }
  .summary-cards.ar-stats .summary-card { min-width: 0; min-height: 0; padding: 6px 10px; border-radius: 10px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
  .summary-cards.ar-stats .summary-card .big { font-size: 1.05rem !important; line-height: 1.25; margin: 0; }
  .summary-cards.ar-stats .summary-card .label { font-size: .7rem !important; line-height: 1.2; margin: 0; }
  .sg-modes-pick .sg-mode-card { display: grid; grid-template-columns: 1fr auto auto 1fr; align-items: center; column-gap: 6px; row-gap: 2px; padding: 7px 8px; }
  .sg-modes-pick .sg-mode-card .ic { font-size: 1.25rem; grid-column: 2; grid-row: 1; }
  .sg-modes-pick .sg-mode-card > b { grid-column: 3; grid-row: 1; text-align: left; font-size: 1rem; }
  .sg-modes-pick .sg-mode-card > small { grid-column: 1 / -1; font-size: .7rem; line-height: 1.3; }
  .pw-cols .pw-card { padding: 9px 6px; }
  .tt-side { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: center; }
  .tt-side .tt-fig .mf-fig, .tt-side .tt-fig { display: flex; justify-content: center; margin: 0; }
  .tt-side .tt-choices { grid-template-columns: 1fr; gap: 8px; }
  .tt-choices .tt-choice { padding: 8px 8px; font-size: 1.02rem; }
}

/* v364 📄 Generate SF2 window */
.sf2-tools { text-align: right; margin-bottom: 6px; font-size: .85rem; }
.sf2-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; max-height: 46vh; overflow-y: auto; }
.sf2-m { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1.5px solid var(--rule); border-radius: 10px; background: var(--card); cursor: pointer; flex-wrap: wrap; }
.sf2-m:has(input:checked) { border-color: var(--olive-base); background: var(--green-bg); }
.sf2-m.off { opacity: .5; cursor: default; }
.sf2-m .fg-sub { margin-left: auto; font-size: .74rem; }
.sf2-rem { margin-top: 10px; }
.sf2-rem summary { cursor: pointer; font-weight: 700; font-size: .88rem; }
.sf2-rem-list { display: grid; gap: 4px; max-height: 30vh; overflow-y: auto; margin-top: 6px; }
.sf2-rem-list label { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 8px; align-items: center; font-size: .8rem; }
.sf2-rem-list input { padding: 4px 8px; font-size: .8rem; }

/* v370 ✏️ edit learners (Grade 11/12 lists · Master List) */
.se-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }
.se-bar .se-acts { margin-left: auto; display: flex; gap: 6px; }
.se-bar .chip.se-miss { border-color: #E0A100; }
.se-bar .chip.se-miss.active { background: #FFF3CD; color: #7A5600; }
.se-msg:empty { display: none; }
.se-in { font: inherit; font-size: .85rem; padding: 3px 6px; border: 1.5px solid var(--rule); border-radius: 6px; background: var(--paper); color: var(--ink); width: 100%; min-width: 0; }
.se-in.se-sex { width: auto; min-width: 54px; }
.se-in.se-no { max-width: 130px; }
.se-name-wrap { display: flex; align-items: center; gap: 4px; }
.se-del { border: 1px solid var(--rule); background: var(--card); border-radius: 6px; cursor: pointer; padding: 2px 6px; font-size: .85rem; flex: none; }
.se-del:hover { border-color: var(--red); background: var(--red-bg); }
.md-forever { color: var(--red); border-color: var(--red); }

/* v374 🖥️ landscape pop-ups (computers): long windows grow wide instead of scrolling */
@media (min-width: 900px) and (orientation: landscape) {
  .modal-card.pop-wide, .share-sheet.pop-wide, .pc-shell.pop-wide, .emg-shell.pop-wide, .mc-overlay-inner.pop-wide, .lp-embed-shell.pop-wide { width: min(92vw, 1280px) !important; max-width: min(92vw, 1280px) !important; max-height: 88vh; }
  #panel-practice .ar-float.pop-wide { left: 4vw !important; right: 4vw !important; top: 5vh !important; max-height: 90vh !important; }
  .pop-wide .sf2-months, .pop-wide .sf2-rem-list, .pop-wide .g12-arcade-list { max-height: none !important; }
}
.sf2-m { flex-wrap: nowrap; } .sf2-m .fg-sub { white-space: nowrap; }

/* v376 📷 Score Scanner on computers: camera on the left (fits the screen height), status and scans on the right */
@media (min-width: 900px) and (orientation: landscape) {
  .qs-overlay { align-items: center; }
  .qs-overlay .qs-card { width: min(1100px, 92vw); max-height: 90vh; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr); grid-template-rows: auto auto auto auto minmax(0, 1fr); column-gap: 16px; overflow: hidden; }
  .qs-overlay .qs-card > .qs-bar, .qs-overlay .qs-card > p { grid-column: 1 / -1; }
  .qs-overlay .qs-card > .qs-cam { grid-column: 1; grid-row: 3 / span 3; width: min(100%, calc((90vh - 150px) * 4 / 3)); justify-self: center; align-self: start; }
  .qs-overlay .qs-card > .qs-status { grid-column: 2; grid-row: 3; }
  .qs-overlay .qs-card > .qs-tools { grid-column: 2; grid-row: 4; }
  .qs-overlay .qs-card > .qs-list { grid-column: 2; grid-row: 5; overflow-y: auto; min-height: 0; }
}
/* v377 📷 Scan Barcode (Attendance) on computers: camera left (fits the screen height), status and log right */
@media (min-width: 900px) and (orientation: landscape) {
  #scan-barcode-modal .modal-card { max-width: min(1000px, 92vw) !important; width: min(1000px, 92vw); max-height: 90vh; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr); grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto; column-gap: 16px; overflow: hidden; }
  #scan-barcode-modal .modal-card > h3, #scan-barcode-modal .modal-card > p { grid-column: 1 / -1; }
  #scan-barcode-modal #scan-barcode-video { grid-column: 1; grid-row: 3 / span 5; max-height: calc(90vh - 170px) !important; height: calc(90vh - 170px); object-fit: cover; }
  #scan-barcode-modal #scan-barcode-late { grid-column: 2; grid-row: 3; }
  #scan-barcode-modal #scan-barcode-status { grid-column: 2; grid-row: 4; margin-top: 0 !important; }
  #scan-barcode-modal #scan-barcode-queue { grid-column: 2; grid-row: 5; }
  #scan-barcode-modal #scan-barcode-log { grid-column: 2; grid-row: 6; max-height: none !important; min-height: 0; }
  #scan-barcode-modal #btn-scan-barcode-close { grid-column: 2; grid-row: 7; }
}

/* v378 the new page appears only once its layout is in place (the header stays visible) */
html.chim-settling .app-shell:not(.hidden) > :not(.topbar):not(.modal-overlay) { opacity: 0 !important; transition: none !important; }

/* v380 a thinner header on every page: less space above and below, the logo about 75% of before,
   slightly smaller greeting text (the buttons keep their size) */
.app-shell > .topbar { padding-top: 3px !important; padding-bottom: 3px !important; }
.topbar img.wordmark-sm { height: 48px !important; margin: -5px 0 -7px; }
.topbar .greeting { font-size: 1.02rem; }
.topbar .who, .topbar-actions .topbar-who { font-size: 0.7rem; line-height: 1.2; }
.topbar-hello { gap: 2px; }
@media (max-width: 640px) {
  .app-shell > .topbar { padding-top: 2px !important; padding-bottom: 2px !important; }
  .topbar img.wordmark-sm { height: 32px !important; margin: -3px 0 -5px; }
  .topbar .greeting { font-size: 0.92rem; }
}

/* v383 ⛺ Numeracy Camp questions on computers: the question, hint and bar model / graph on the left (⅔);
   the tries, the answer (smaller number pad or the choices), ✓ Check, feedback and Next on the right (⅓) */
@media (min-width: 900px) and (orientation: landscape) {
  .nc-q.nc-q2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(200px, 1fr); gap: 14px; align-items: start; }
  .nc-q2 .nc-qL { min-width: 0; }
  .nc-q2 .nc-qL svg, .nc-q2 .nc-qL img, .nc-q2 .nc-qL canvas { max-width: 100%; height: auto; max-height: 52vh; }
  .nc-q2 .nc-qR { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
  .nc-q2 .nc-qR .sg-kp-show { min-height: 40px; font-size: 1.15rem; }
  .nc-q2 .nc-qR .sg-kp { gap: 4px; }
  .nc-q2 .nc-qR .sg-kp button { font-size: 1rem; padding: 6px 0; border-radius: 9px; }
  .nc-q2 .nc-qR .sg-kp-ok { padding: 8px 10px; font-size: .95rem; }
  .nc-q2 .nc-qR .nc-choices { display: grid; grid-template-columns: 1fr; gap: 6px; }
  .nc-q2 .nc-qR .nc-choice { padding: 8px 10px; font-size: .95rem; }
  .nc-q2 .nc-qR .nc-fb { font-size: .9rem; }
  .nc-q2 .nc-qR .nc-fb .nc-next { width: 100%; padding: 8px 10px; }
  .nc-q2 .nc-qR .nc-fb:has(.nc-next) ~ *, .nc-q2 .nc-qR:has(.nc-next) .sg-kp { display: none; } /* answered: Next takes the keypad's place */
}

/* v383 🧮 the floating calculator on computers: no scroll bar (it's sized to 80% of the screen height by zoom) */
.calc-panel.calc-desk { max-height: none !important; overflow: visible !important; bottom: auto; }


/* v385 🌙 DARK MODE: light boxes get dark colors (generated from every light background without a dark version).
   Notes (cream/yellow) → dark green a little lighter than the page; status tints keep their hue (deep green / red / blue);
   white game boards, cards, certificates, QR codes and paper sheets stay light with dark text. Light mode is unchanged. */
html[data-theme="dark"] .acct-pending,
html[data-theme="dark"] .across-late,
html[data-theme="dark"] .att-queue-note,
html[data-theme="dark"] .camp-cell.n2,
html[data-theme="dark"] .camp-cell.n3,
html[data-theme="dark"] .camp-cert-btn,
html[data-theme="dark"] .camp-grid td.camp-status.off,
html[data-theme="dark"] .cln-me.on,
html[data-theme="dark"] .cln-mon-tag,
html[data-theme="dark"] .cln-mrow.on,
html[data-theme="dark"] .cln-shared,
html[data-theme="dark"] .diag-warn,
html[data-theme="dark"] .dpt-latebox,
html[data-theme="dark"] .emg-warning,
html[data-theme="dark"] .faq-tag,
html[data-theme="dark"] .fb-review,
html[data-theme="dark"] .fg-title-tag,
html[data-theme="dark"] .fg-unsaved,
html[data-theme="dark"] .gshare-warn,
html[data-theme="dark"] .mm-tag,
html[data-theme="dark"] .nb-comps-chip.sugg,
html[data-theme="dark"] .nb-comps-sugg,
html[data-theme="dark"] .nc-badge,
html[data-theme="dark"] .nc-badge-won,
html[data-theme="dark"] .nc-certlink,
html[data-theme="dark"] .prog-cur,
html[data-theme="dark"] .se-bar .chip.se-miss.active,
html[data-theme="dark"] .smon-mm-key,
html[data-theme="dark"] .stu-mm-bar.on,
html[data-theme="dark"] .t-ed,
html[data-theme="dark"] td.smon-name.smon-mm,
html[data-theme="dark"] tr.stu-mm td:first-child { background: #34432A !important; border-color: #5C7547 !important; color: #F1F4EA !important; }
html[data-theme="dark"] .acct-pending :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .across-late :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .att-queue-note :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .camp-cell.n2 :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .camp-cell.n3 :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .camp-cert-btn :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .camp-grid td.camp-status.off :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .cln-me.on :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .cln-mon-tag :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .cln-mrow.on :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .cln-shared :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .diag-warn :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .dpt-latebox :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .emg-warning :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .faq-tag :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .fb-review :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .fg-title-tag :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .fg-unsaved :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .gshare-warn :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .mm-tag :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .nb-comps-chip.sugg :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .nb-comps-sugg :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .nc-badge :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .nc-badge-won :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .nc-certlink :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .prog-cur :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .se-bar .chip.se-miss.active :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .smon-mm-key :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .stu-mm-bar.on :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .t-ed :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] td.smon-name.smon-mm :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] tr.stu-mm td:first-child :is(.btn-small, .btn-outline, .link-btn, a) { color: #F1F4EA !important; border-color: rgba(241,244,234,.45) !important; background: rgba(255,255,255,.06) !important; }
html[data-theme="dark"] #line-roster-list .line-sel,
html[data-theme="dark"] .across-present,
html[data-theme="dark"] .asg-mc-choice-btn.right,
html[data-theme="dark"] .att-elsewhere.ok,
html[data-theme="dark"] .beh-table td.beh-x,
html[data-theme="dark"] .beh-table th.beh-x,
html[data-theme="dark"] .booster-item.done,
html[data-theme="dark"] .camp-cell.n5,
html[data-theme="dark"] .camp-cell.nc,
html[data-theme="dark"] .camp-grid td.camp-status.on,
html[data-theme="dark"] .cln-chk:has(input:checked),
html[data-theme="dark"] .diag-ok,
html[data-theme="dark"] .diag-ww.ready,
html[data-theme="dark"] .emg-sent,
html[data-theme="dark"] .faq-tag.ok,
html[data-theme="dark"] .mq-q-view-choices li.correct,
html[data-theme="dark"] .nb-comps-chip,
html[data-theme="dark"] .nb-from-owner,
html[data-theme="dark"] .nc-choice.ok,
html[data-theme="dark"] .pod-person-all .pod-av,
html[data-theme="dark"] .t-add,
html[data-theme="dark"] .task-late.waived,
html[data-theme="dark"] .tch-badge.on { background: #23442C !important; border-color: #3F7A4C !important; color: #F1F4EA !important; }
html[data-theme="dark"] #line-roster-list .line-sel :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .across-present :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .asg-mc-choice-btn.right :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .att-elsewhere.ok :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .beh-table td.beh-x :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .beh-table th.beh-x :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .booster-item.done :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .camp-cell.n5 :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .camp-cell.nc :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .camp-grid td.camp-status.on :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .cln-chk:has(input:checked) :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .diag-ok :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .diag-ww.ready :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .emg-sent :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .faq-tag.ok :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .mq-q-view-choices li.correct :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .nb-comps-chip :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .nb-from-owner :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .nc-choice.ok :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .pod-person-all .pod-av :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .t-add :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .task-late.waived :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .tch-badge.on :is(.btn-small, .btn-outline, .link-btn, a) { color: #F1F4EA !important; border-color: rgba(241,244,234,.45) !important; background: rgba(255,255,255,.06) !important; }
html[data-theme="dark"] #diag-exc.active,
html[data-theme="dark"] .across-absent,
html[data-theme="dark"] .asg-mc-choice-btn.wrong,
html[data-theme="dark"] .att-elsewhere,
html[data-theme="dark"] .camp-cell.n1,
html[data-theme="dark"] .camp-grid td.camp-status.none,
html[data-theme="dark"] .cln-ab,
html[data-theme="dark"] .dpt-bad,
html[data-theme="dark"] .dpt-errs,
html[data-theme="dark"] .emg-box.on,
html[data-theme="dark"] .nc-choice.no,
html[data-theme="dark"] .task-late,
html[data-theme="dark"] .tch-badge.off { background: #4A2427 !important; border-color: #8A4045 !important; color: #F1F4EA !important; }
html[data-theme="dark"] #diag-exc.active :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .across-absent :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .asg-mc-choice-btn.wrong :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .att-elsewhere :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .camp-cell.n1 :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .camp-grid td.camp-status.none :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .cln-ab :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .dpt-bad :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .dpt-errs :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .emg-box.on :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .nc-choice.no :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .task-late :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .tch-badge.off :is(.btn-small, .btn-outline, .link-btn, a) { color: #F1F4EA !important; border-color: rgba(241,244,234,.45) !important; background: rgba(255,255,255,.06) !important; }
html[data-theme="dark"] .across-excused,
html[data-theme="dark"] .att-pc .e,
html[data-theme="dark"] .camp-cell.n4,
html[data-theme="dark"] .campview-bar,
html[data-theme="dark"] .cln-mm,
html[data-theme="dark"] .diag-table tr.diag-sel td.diag-name,
html[data-theme="dark"] .diag-ww.on,
html[data-theme="dark"] .prog-table .prog-other td.prog-time,
html[data-theme="dark"] .tch-badge.view { background: #22344A !important; border-color: #41638C !important; color: #F1F4EA !important; }
html[data-theme="dark"] .across-excused :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .att-pc .e :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .camp-cell.n4 :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .campview-bar :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .cln-mm :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .diag-table tr.diag-sel td.diag-name :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .diag-ww.on :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .prog-table .prog-other td.prog-time :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"] .tch-badge.view :is(.btn-small, .btn-outline, .link-btn, a) { color: #F1F4EA !important; border-color: rgba(241,244,234,.45) !important; background: rgba(255,255,255,.06) !important; }
html[data-theme="dark"] #conf-present-canvas,
html[data-theme="dark"] .admin-scroll,
html[data-theme="dark"] .am-r0,
html[data-theme="dark"] .am-r1,
html[data-theme="dark"] .am-r2,
html[data-theme="dark"] .am-r3,
html[data-theme="dark"] .booster-bar,
html[data-theme="dark"] .booster-item,
html[data-theme="dark"] .bp-label,
html[data-theme="dark"] .bp-tool,
html[data-theme="dark"] .bs-cut,
html[data-theme="dark"] .calc-data,
html[data-theme="dark"] .calc-float-sw,
html[data-theme="dark"] .calc-float-sw.off,
html[data-theme="dark"] .calc-freq-box,
html[data-theme="dark"] .calc-pair-key div,
html[data-theme="dark"] .calc-paste textarea,
html[data-theme="dark"] .calc-predict,
html[data-theme="dark"] .calc-res,
html[data-theme="dark"] .calc-scatter,
html[data-theme="dark"] .calc-screen,
html[data-theme="dark"] .calc-sol,
html[data-theme="dark"] .calc-sw,
html[data-theme="dark"] .calc-sw.off,
html[data-theme="dark"] .calc-warn,
html[data-theme="dark"] .camp-cell,
html[data-theme="dark"] .cb-plan,
html[data-theme="dark"] .cc-big,
html[data-theme="dark"] .cc-card,
html[data-theme="dark"] .cert,
html[data-theme="dark"] .cert-in,
html[data-theme="dark"] .cert-qr-img,
html[data-theme="dark"] .cert-qr-logo,
html[data-theme="dark"] .cert-side-qr,
html[data-theme="dark"] .cert-top .cert-x,
html[data-theme="dark"] .cg-teacher-note,
html[data-theme="dark"] .cged-form,
html[data-theme="dark"] .cged-prev,
html[data-theme="dark"] .chip.active .cged-n,
html[data-theme="dark"] .cj-avatar,
html[data-theme="dark"] .cj-event,
html[data-theme="dark"] .cj-item.sel,
html[data-theme="dark"] .cj-profile div,
html[data-theme="dark"] .cj-stop.done span,
html[data-theme="dark"] .cj-stop.now span,
html[data-theme="dark"] .cln-mon-box,
html[data-theme="dark"] .conf-slide-wrap img,
html[data-theme="dark"] .cr-card,
html[data-theme="dark"] .cr-sign,
html[data-theme="dark"] .ctl-prev-btn,
html[data-theme="dark"] .ctl-prev-card,
html[data-theme="dark"] .ctl-qpic.on,
html[data-theme="dark"] .diag-chart,
html[data-theme="dark"] .diag-excb,
html[data-theme="dark"] .dv-board,
html[data-theme="dark"] .dv-turn-av,
html[data-theme="dark"] .emg-alert.emg-hotline,
html[data-theme="dark"] .emg-yes,
html[data-theme="dark"] .er-floor,
html[data-theme="dark"] .er-floor.g,
html[data-theme="dark"] .er-floor.pick,
html[data-theme="dark"] .ext-drop.over,
html[data-theme="dark"] .ext-item,
html[data-theme="dark"] .ext-item.is-err,
html[data-theme="dark"] .f4-card,
html[data-theme="dark"] .fg-key-btn.fg-bub,
html[data-theme="dark"] .fg-m1,
html[data-theme="dark"] .fg-m2,
html[data-theme="dark"] .fg-m3,
html[data-theme="dark"] .fg-m4,
html[data-theme="dark"] .fg-m5,
html[data-theme="dark"] .fg-sheet-box,
html[data-theme="dark"] .fg-sheet-key,
html[data-theme="dark"] .fg-sheet-legend i.ring,
html[data-theme="dark"] .fg-strip-cell.unsure,
html[data-theme="dark"] .fs-chip,
html[data-theme="dark"] .gate-card,
html[data-theme="dark"] .gc-tray,
html[data-theme="dark"] .gl-cell.sel,
html[data-theme="dark"] .gs-bar,
html[data-theme="dark"] .gs-btn.no,
html[data-theme="dark"] .gs-btn.ok,
html[data-theme="dark"] .gs-drop,
html[data-theme="dark"] .gs-graph,
html[data-theme="dark"] .gs-ing,
html[data-theme="dark"] .gs-ing.no,
html[data-theme="dark"] .gs-ing.ok,
html[data-theme="dark"] .gs-label,
html[data-theme="dark"] .gs-obj-tag,
html[data-theme="dark"] .gs-obj.missed,
html[data-theme="dark"] .gs-obj.no,
html[data-theme="dark"] .gs-obj.ok,
html[data-theme="dark"] .gs-pile,
html[data-theme="dark"] .gs-scene .gs-obj.missed,
html[data-theme="dark"] .gs-scene .gs-obj.no,
html[data-theme="dark"] .gs-scene .gs-obj.ok.chem,
html[data-theme="dark"] .gs-scene .gs-obj.ok.phys,
html[data-theme="dark"] .gs-scene.kitchen,
html[data-theme="dark"] .gs-scene.lab,
html[data-theme="dark"] .gs-slot.on,
html[data-theme="dark"] .gs-spot-head,
html[data-theme="dark"] .gs-tank.no,
html[data-theme="dark"] .gs-tank.ok,
html[data-theme="dark"] .gw-svg,
html[data-theme="dark"] .gx-opt,
html[data-theme="dark"] .gx-opt.picked,
html[data-theme="dark"] .id-card-img,
html[data-theme="dark"] .lc-bar,
html[data-theme="dark"] .lc-ladder,
html[data-theme="dark"] .lc-line,
html[data-theme="dark"] .lc-line.miss,
html[data-theme="dark"] .lc-line.no,
html[data-theme="dark"] .lc-line.ok,
html[data-theme="dark"] .lc-line.on,
html[data-theme="dark"] .lc-rung.goal,
html[data-theme="dark"] .lc-rung.me,
html[data-theme="dark"] .lc-slip,
html[data-theme="dark"] .ll-q,
html[data-theme="dark"] .lp-embed-iframe,
html[data-theme="dark"] .mc-bar,
html[data-theme="dark"] .mc-cat,
html[data-theme="dark"] .mc-class,
html[data-theme="dark"] .mc-cross,
html[data-theme="dark"] .mc-rx,
html[data-theme="dark"] .mc-sq.light,
html[data-theme="dark"] .mc-sq.target.light,
html[data-theme="dark"] .mc-tm,
html[data-theme="dark"] .mil-q,
html[data-theme="dark"] .mil-walk,
html[data-theme="dark"] .mil-x,
html[data-theme="dark"] .mk-box,
html[data-theme="dark"] .mk-chart,
html[data-theme="dark"] .mk-chips2 .mk-chip,
html[data-theme="dark"] .mk-paper,
html[data-theme="dark"] .mk-screen,
html[data-theme="dark"] .mk-seg.right,
html[data-theme="dark"] .mk-seg.sel,
html[data-theme="dark"] .mk-seg.wrong,
html[data-theme="dark"] .mk-seg:hover:not(:disabled),
html[data-theme="dark"] .mk-slot.on,
html[data-theme="dark"] .mk-word span,
html[data-theme="dark"] .mq-stop,
html[data-theme="dark"] .nb-fig-prev,
html[data-theme="dark"] .nb-merge-table td.nb-mg-sel,
html[data-theme="dark"] .nb-merge-table td:hover,
html[data-theme="dark"] .nbp-bm-style,
html[data-theme="dark"] .nbp-eraser,
html[data-theme="dark"] .nbp-fs-bottom .nb-dots i.on,
html[data-theme="dark"] .nbp-hlbar .nbp-hl-done,
html[data-theme="dark"] .nbp-steps,
html[data-theme="dark"] .nbp-steps.done,
html[data-theme="dark"] .nbp-stk-pick,
html[data-theme="dark"] .nbp-tool.nbp-hl.on,
html[data-theme="dark"] .nbp-tools .nbp-hl.on,
html[data-theme="dark"] .nc-model-box,
html[data-theme="dark"] .nm-card,
html[data-theme="dark"] .pdf-canvas-wrap canvas,
html[data-theme="dark"] .pk-big,
html[data-theme="dark"] .pk-gcard,
html[data-theme="dark"] .pk-list,
html[data-theme="dark"] .pk-pop,
html[data-theme="dark"] .pk-reset,
html[data-theme="dark"] .pk-reset:hover,
html[data-theme="dark"] .pl-expr .pl-hit,
html[data-theme="dark"] .pl-tile,
html[data-theme="dark"] .pl-tile.sel,
html[data-theme="dark"] .pm-v2,
html[data-theme="dark"] .pm-v4,
html[data-theme="dark"] .pod-owner-replies,
html[data-theme="dark"] .pol-img .remove-btn,
html[data-theme="dark"] .pq-box,
html[data-theme="dark"] .pq-card,
html[data-theme="dark"] .pq-chip.low,
html[data-theme="dark"] .pq-float,
html[data-theme="dark"] .pq-float.low,
html[data-theme="dark"] .pq-qr,
html[data-theme="dark"] .prog-table th.prog-title .prog-term,
html[data-theme="dark"] .pt-cell,
html[data-theme="dark"] .pt-cell.me,
html[data-theme="dark"] .pt-cell.ptm-rival,
html[data-theme="dark"] .ptm-banner,
html[data-theme="dark"] .qb-betrow,
html[data-theme="dark"] .qb-mark,
html[data-theme="dark"] .qb-pickbtn,
html[data-theme="dark"] .qb-pickbtn:first-child,
html[data-theme="dark"] .qb-pod,
html[data-theme="dark"] .qb-special,
html[data-theme="dark"] .qb-team,
html[data-theme="dark"] .qs-row.error,
html[data-theme="dark"] .qs-row.waiting,
html[data-theme="dark"] .qs-status.no,
html[data-theme="dark"] .qs-status.ok,
html[data-theme="dark"] .rbx-f.editing,
html[data-theme="dark"] .rbx-pop math-field.rbx-mfield,
html[data-theme="dark"] .re-in,
html[data-theme="dark"] .rr-ctrl,
html[data-theme="dark"] .rr-ctrl.locked,
html[data-theme="dark"] .rr-rect,
html[data-theme="dark"] .rr-side.u,
html[data-theme="dark"] .stb-t,
html[data-theme="dark"] .stb-t.in,
html[data-theme="dark"] .sc-dots span,
html[data-theme="dark"] .sc-review li.mid,
html[data-theme="dark"] .sc-review li.no,
html[data-theme="dark"] .sc-review li.ok,
html[data-theme="dark"] .sc-steps li.ok .sc-in,
html[data-theme="dark"] .sc-steps li.shown .sc-in,
html[data-theme="dark"] .sg-card,
html[data-theme="dark"] .sg-fb.near,
html[data-theme="dark"] .sg-fb.no,
html[data-theme="dark"] .sg-fb.ok,
html[data-theme="dark"] .sg-hint,
html[data-theme="dark"] .sg-hint-box,
html[data-theme="dark"] .sg-kp button.sg-kp-op,
html[data-theme="dark"] .sg-next,
html[data-theme="dark"] .sg-step.now,
html[data-theme="dark"] .sg-streak,
html[data-theme="dark"] .sh-tag,
html[data-theme="dark"] .share-ico-email,
html[data-theme="dark"] .share-ico-messenger,
html[data-theme="dark"] .share-ico-sms,
html[data-theme="dark"] .share-ico-whatsapp,
html[data-theme="dark"] .sim-org,
html[data-theme="dark"] .sim-red,
html[data-theme="dark"] .sp-board,
html[data-theme="dark"] .st-chip,
html[data-theme="dark"] .st-trow,
html[data-theme="dark"] .st-val,
html[data-theme="dark"] .st-val.picked,
html[data-theme="dark"] .stg-ans,
html[data-theme="dark"] .stg-hint-tag,
html[data-theme="dark"] .stg-pick.on,
html[data-theme="dark"] .stg-prob,
html[data-theme="dark"] .stg-step.hint,
html[data-theme="dark"] .stg-tag,
html[data-theme="dark"] .t-hid,
html[data-theme="dark"] .task-fold.task-lesson,
html[data-theme="dark"] .td-card,
html[data-theme="dark"] .td-card.no,
html[data-theme="dark"] .td-card.ok,
html[data-theme="dark"] .td-case,
html[data-theme="dark"] .td-chip,
html[data-theme="dark"] .td-chip.td-q,
html[data-theme="dark"] .td-cloud,
html[data-theme="dark"] .td-rulebtn.no,
html[data-theme="dark"] .td-rulebtn.ok,
html[data-theme="dark"] .td-slot.filled,
html[data-theme="dark"] .td-slot.good,
html[data-theme="dark"] .td-slot.shown,
html[data-theme="dark"] .vv-clue,
html[data-theme="dark"] .vv-clue.done,
html[data-theme="dark"] .vv-clue.open,
html[data-theme="dark"] .vv-q,
html[data-theme="dark"] .zt-table td.zt-hit,
html[data-theme="dark"] math-field.fx-mf { color: #1E2416; }

/* v386 Seasons: ticks for each place (sign-in · title bar · Home · Class … Tools · other pages) */
.ctl-season { grid-template-columns: minmax(170px, auto) minmax(0, 1fr) !important; }
.ctl-wheres { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: flex-end; }
@media (max-width: 640px) { .ctl-season { grid-template-columns: 1fr !important; } .ctl-wheres { justify-content: flex-start; } }

/* v387 🌙 Dark mode color: Midnight blue (🛡️ Admin → Control → Look). Bluish black page, dark blue-gray cards,
   lighter blue-gray for lighter parts, steel blue accents and a very small touch of gold on thin outlines.
   Status colors (correct / wrong / absent / excused) keep their meaning. Generated from every dark rule:
   olive / dark-green shades → blue shades. */
html[data-theme="dark"][data-dark="midnight"] {
  --paper: #0B1018; --paper-2: #17202C; --card: #17202C; --ink: #E6EDF5; --ink-soft: #93A3B8; --rule: #2A3A4E;
  --green: #6FCF7F; --green-bg: #1E3A2A; --green-text: #A8E2B2; --amber: #E3B54A; --amber-bg: #3A2F17;
  --red: #F08A7B; --red-bg: #3E2222; --gold: #D4A73A; --olive-deep: #7CC4F5; --olive-base: #3FA9F5; --olive-soft: #2C6EA6;
  --mid-gold: #D4A73A; --mid-light: #243142;
}
html[data-theme="dark"][data-dark="midnight"] .back-btn-xl { background:#151B22; color:#9CB7DB; border-color:#6484AD; }
html[data-theme="dark"][data-dark="midnight"] .back-btn-xl:hover { background:#6484AD; color:#0A0E13; }
html[data-theme="dark"][data-dark="midnight"] .offline-banner { background:#87A6CF; color:#101720; }
html body.dark .dp-doc-card, html[data-theme="dark"][data-dark="midnight"] .dp-doc-card { color:#131619; }
html[data-theme="dark"][data-dark="midnight"] .line-messages { background:#243346; border-color:#28394F; }
html[data-theme="dark"][data-dark="midnight"] .line-composer input[type="text"] { background:#243346; border-color:#28394F; }
html[data-theme="dark"][data-dark="midnight"] .line-composer input[type="text"]::placeholder { color:#B4C3D8; }
html[data-theme="dark"][data-dark="midnight"] .cal-day.has-data { background:#7C9ECB; color:#0F1620; border-color:#7C9ECB; }
:root[data-theme="dark"][data-dark="midnight"] .perf-right { color:#7C9ECB; }
:root[data-theme="dark"][data-dark="midnight"] .att-P, :root[data-theme="dark"][data-dark="midnight"] .att-L, :root[data-theme="dark"][data-dark="midnight"] .att-M { color:#7C9ECB; }
:root[data-theme="dark"][data-dark="midnight"] .att-month-box { border-color:#7C9ECB !important; }
html[data-palette]:not(html[data-theme="dark"][data-dark="midnight"]):not([data-screen="gate"]) { --paper-2:var(--pal-paper-2, #C1CFE2); }
html[data-palette="charcoal"]:not(html[data-theme="dark"][data-dark="midnight"]):not([data-screen="gate"]) { --green:#517CB5; --green-bg:#2E353E; --green-text:#87A6CF; --olive-deep:#87A6CF; --olive-base:#517CB5; --olive-soft:#5274A0; }
html[data-palette="charcoal"]:not(html[data-theme="dark"][data-dark="midnight"]):not([data-screen="gate"]) .offline-banner { background:#87A6CF; color:#101720; }
html[data-palette="charcoal"]:not(html[data-theme="dark"][data-dark="midnight"]):not([data-screen="gate"]) .dp-doc-card { color:#131619; }
html[data-palette="charcoal"]:not(html[data-theme="dark"][data-dark="midnight"]):not([data-screen="gate"]) .line-messages { background:#243346; border-color:#28394F; }
html[data-palette="charcoal"]:not(html[data-theme="dark"][data-dark="midnight"]):not([data-screen="gate"]) .line-composer input[type="text"] { background:#243346; border-color:#28394F; }
html[data-palette="charcoal"]:not(html[data-theme="dark"][data-dark="midnight"]):not([data-screen="gate"]) .line-composer input[type="text"]::placeholder { color:#B4C3D8; }
html[data-palette="charcoal"]:not(html[data-theme="dark"][data-dark="midnight"]):not([data-screen="gate"]) .cal-day.has-data { background:#7C9ECB; color:#0F1620; border-color:#7C9ECB; }
html[data-palette="charcoal"]:not(html[data-theme="dark"][data-dark="midnight"]):not([data-screen="gate"]) .perf-right { color:#7C9ECB; }
html[data-palette="charcoal"]:not(html[data-theme="dark"][data-dark="midnight"]):not([data-screen="gate"]) .att-P, html[data-palette="charcoal"]:not(html[data-theme="dark"][data-dark="midnight"]):not([data-screen="gate"]) .att-L, html[data-palette="charcoal"]:not(html[data-theme="dark"][data-dark="midnight"]):not([data-screen="gate"]) .att-M { color:#7C9ECB; }
html[data-palette="charcoal"]:not(html[data-theme="dark"][data-dark="midnight"]):not([data-screen="gate"]) .att-month-box { border-color:#7C9ECB !important; }
html[data-titlebar="charcoal"]:not(html[data-theme="dark"][data-dark="midnight"]) .topbar { --olive-deep:#87A6CF; }
html[data-theme="dark"][data-dark="midnight"] .ast-table th { color:#101720; }
html[data-theme="dark"][data-dark="midnight"] .nc-bar { background:#171E26; }
html[data-theme="dark"][data-dark="midnight"] .pt-retake-box { color:#94B0D6; }
html[data-theme="dark"][data-dark="midnight"] .line-composer .rbx { background:#243346; border-color:#28394F; }
html[data-palette="charcoal"]:not(html[data-theme="dark"][data-dark="midnight"]):not([data-screen="gate"]) .line-composer .rbx { background:#243346; border-color:#28394F; }
html[data-theme="dark"][data-dark="midnight"] .btn-small.btn-outline { color:#87A6CF; border-color:#87A6CF; }
html[data-theme="dark"][data-dark="midnight"] .cg-hero { color:#19212B; }
html[data-theme="dark"][data-dark="midnight"] .zt-ans { background:#1E252E; }
html[data-theme="dark"][data-dark="midnight"] .chim-home-fab { background:#151B22; border-color:#6484AD; }
:root[data-theme="dark"][data-dark="midnight"] #perf-responses-view, html[data-palette="charcoal"]:not([data-screen="gate"]) #perf-responses-view { --pq-bg:#191D22; --pq-head:#21272E; }
html[data-theme="dark"][data-dark="midnight"] .acct-pending,
html[data-theme="dark"][data-dark="midnight"] .across-late,
html[data-theme="dark"][data-dark="midnight"] .att-queue-note,
html[data-theme="dark"][data-dark="midnight"] .camp-cell.n2,
html[data-theme="dark"][data-dark="midnight"] .camp-cell.n3,
html[data-theme="dark"][data-dark="midnight"] .camp-cert-btn,
html[data-theme="dark"][data-dark="midnight"] .camp-grid td.camp-status.off,
html[data-theme="dark"][data-dark="midnight"] .cln-me.on,
html[data-theme="dark"][data-dark="midnight"] .cln-mon-tag,
html[data-theme="dark"][data-dark="midnight"] .cln-mrow.on,
html[data-theme="dark"][data-dark="midnight"] .cln-shared,
html[data-theme="dark"][data-dark="midnight"] .diag-warn,
html[data-theme="dark"][data-dark="midnight"] .dpt-latebox,
html[data-theme="dark"][data-dark="midnight"] .emg-warning,
html[data-theme="dark"][data-dark="midnight"] .faq-tag,
html[data-theme="dark"][data-dark="midnight"] .fb-review,
html[data-theme="dark"][data-dark="midnight"] .fg-title-tag,
html[data-theme="dark"][data-dark="midnight"] .fg-unsaved,
html[data-theme="dark"][data-dark="midnight"] .gshare-warn,
html[data-theme="dark"][data-dark="midnight"] .mm-tag,
html[data-theme="dark"][data-dark="midnight"] .nb-comps-chip.sugg,
html[data-theme="dark"][data-dark="midnight"] .nb-comps-sugg,
html[data-theme="dark"][data-dark="midnight"] .nc-badge,
html[data-theme="dark"][data-dark="midnight"] .nc-badge-won,
html[data-theme="dark"][data-dark="midnight"] .nc-certlink,
html[data-theme="dark"][data-dark="midnight"] .prog-cur,
html[data-theme="dark"][data-dark="midnight"] .se-bar .chip.se-miss.active,
html[data-theme="dark"][data-dark="midnight"] .smon-mm-key,
html[data-theme="dark"][data-dark="midnight"] .stu-mm-bar.on,
html[data-theme="dark"][data-dark="midnight"] .t-ed,
html[data-theme="dark"][data-dark="midnight"] td.smon-name.smon-mm,
html[data-theme="dark"][data-dark="midnight"] tr.stu-mm td:first-child { background:#28313C !important; border-color:#445468 !important; color:#D3DBE5 !important; }
html[data-theme="dark"][data-dark="midnight"] .acct-pending :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .across-late :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .att-queue-note :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .camp-cell.n2 :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .camp-cell.n3 :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .camp-cert-btn :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .camp-grid td.camp-status.off :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .cln-me.on :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .cln-mon-tag :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .cln-mrow.on :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .cln-shared :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .diag-warn :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .dpt-latebox :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .emg-warning :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .faq-tag :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .fb-review :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .fg-title-tag :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .fg-unsaved :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .gshare-warn :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .mm-tag :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .nb-comps-chip.sugg :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .nb-comps-sugg :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .nc-badge :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .nc-badge-won :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .nc-certlink :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .prog-cur :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .se-bar .chip.se-miss.active :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .smon-mm-key :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .stu-mm-bar.on :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .t-ed :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] td.smon-name.smon-mm :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] tr.stu-mm td:first-child :is(.btn-small, .btn-outline, .link-btn, a) { color:#D3DBE5 !important; }
html[data-theme="dark"][data-dark="midnight"] #line-roster-list .line-sel,
html[data-theme="dark"][data-dark="midnight"] .across-present,
html[data-theme="dark"][data-dark="midnight"] .asg-mc-choice-btn.right,
html[data-theme="dark"][data-dark="midnight"] .att-elsewhere.ok,
html[data-theme="dark"][data-dark="midnight"] .beh-table td.beh-x,
html[data-theme="dark"][data-dark="midnight"] .beh-table th.beh-x,
html[data-theme="dark"][data-dark="midnight"] .booster-item.done,
html[data-theme="dark"][data-dark="midnight"] .camp-cell.n5,
html[data-theme="dark"][data-dark="midnight"] .camp-cell.nc,
html[data-theme="dark"][data-dark="midnight"] .camp-grid td.camp-status.on,
html[data-theme="dark"][data-dark="midnight"] .cln-chk:has(input:checked),
html[data-theme="dark"][data-dark="midnight"] .diag-ok,
html[data-theme="dark"][data-dark="midnight"] .diag-ww.ready,
html[data-theme="dark"][data-dark="midnight"] .emg-sent,
html[data-theme="dark"][data-dark="midnight"] .faq-tag.ok,
html[data-theme="dark"][data-dark="midnight"] .mq-q-view-choices li.correct,
html[data-theme="dark"][data-dark="midnight"] .nb-comps-chip,
html[data-theme="dark"][data-dark="midnight"] .nb-from-owner,
html[data-theme="dark"][data-dark="midnight"] .nc-choice.ok,
html[data-theme="dark"][data-dark="midnight"] .pod-person-all .pod-av,
html[data-theme="dark"][data-dark="midnight"] .t-add,
html[data-theme="dark"][data-dark="midnight"] .task-late.waived,
html[data-theme="dark"][data-dark="midnight"] .tch-badge.on { color:#D3DBE5 !important; }
html[data-theme="dark"][data-dark="midnight"] #line-roster-list .line-sel :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .across-present :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .asg-mc-choice-btn.right :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .att-elsewhere.ok :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .beh-table td.beh-x :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .beh-table th.beh-x :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .booster-item.done :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .camp-cell.n5 :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .camp-cell.nc :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .camp-grid td.camp-status.on :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .cln-chk:has(input:checked) :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .diag-ok :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .diag-ww.ready :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .emg-sent :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .faq-tag.ok :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .mq-q-view-choices li.correct :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .nb-comps-chip :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .nb-from-owner :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .nc-choice.ok :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .pod-person-all .pod-av :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .t-add :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .task-late.waived :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .tch-badge.on :is(.btn-small, .btn-outline, .link-btn, a) { color:#D3DBE5 !important; }
html[data-theme="dark"][data-dark="midnight"] #diag-exc.active,
html[data-theme="dark"][data-dark="midnight"] .across-absent,
html[data-theme="dark"][data-dark="midnight"] .asg-mc-choice-btn.wrong,
html[data-theme="dark"][data-dark="midnight"] .att-elsewhere,
html[data-theme="dark"][data-dark="midnight"] .camp-cell.n1,
html[data-theme="dark"][data-dark="midnight"] .camp-grid td.camp-status.none,
html[data-theme="dark"][data-dark="midnight"] .cln-ab,
html[data-theme="dark"][data-dark="midnight"] .dpt-bad,
html[data-theme="dark"][data-dark="midnight"] .dpt-errs,
html[data-theme="dark"][data-dark="midnight"] .emg-box.on,
html[data-theme="dark"][data-dark="midnight"] .nc-choice.no,
html[data-theme="dark"][data-dark="midnight"] .task-late,
html[data-theme="dark"][data-dark="midnight"] .tch-badge.off { color:#D3DBE5 !important; }
html[data-theme="dark"][data-dark="midnight"] #diag-exc.active :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .across-absent :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .asg-mc-choice-btn.wrong :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .att-elsewhere :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .camp-cell.n1 :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .camp-grid td.camp-status.none :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .cln-ab :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .dpt-bad :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .dpt-errs :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .emg-box.on :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .nc-choice.no :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .task-late :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .tch-badge.off :is(.btn-small, .btn-outline, .link-btn, a) { color:#D3DBE5 !important; }
html[data-theme="dark"][data-dark="midnight"] .across-excused,
html[data-theme="dark"][data-dark="midnight"] .att-pc .e,
html[data-theme="dark"][data-dark="midnight"] .camp-cell.n4,
html[data-theme="dark"][data-dark="midnight"] .campview-bar,
html[data-theme="dark"][data-dark="midnight"] .cln-mm,
html[data-theme="dark"][data-dark="midnight"] .diag-table tr.diag-sel td.diag-name,
html[data-theme="dark"][data-dark="midnight"] .diag-ww.on,
html[data-theme="dark"][data-dark="midnight"] .prog-table .prog-other td.prog-time,
html[data-theme="dark"][data-dark="midnight"] .tch-badge.view { color:#D3DBE5 !important; }
html[data-theme="dark"][data-dark="midnight"] .across-excused :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .att-pc .e :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .camp-cell.n4 :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .campview-bar :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .cln-mm :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .diag-table tr.diag-sel td.diag-name :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .diag-ww.on :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .prog-table .prog-other td.prog-time :is(.btn-small, .btn-outline, .link-btn, a),
html[data-theme="dark"][data-dark="midnight"] .tch-badge.view :is(.btn-small, .btn-outline, .link-btn, a) { color:#D3DBE5 !important; }
html[data-theme="dark"][data-dark="midnight"] #conf-present-canvas,
html[data-theme="dark"][data-dark="midnight"] .admin-scroll,
html[data-theme="dark"][data-dark="midnight"] .am-r0,
html[data-theme="dark"][data-dark="midnight"] .am-r1,
html[data-theme="dark"][data-dark="midnight"] .am-r2,
html[data-theme="dark"][data-dark="midnight"] .am-r3,
html[data-theme="dark"][data-dark="midnight"] .booster-bar,
html[data-theme="dark"][data-dark="midnight"] .booster-item,
html[data-theme="dark"][data-dark="midnight"] .bp-label,
html[data-theme="dark"][data-dark="midnight"] .bp-tool,
html[data-theme="dark"][data-dark="midnight"] .bs-cut,
html[data-theme="dark"][data-dark="midnight"] .calc-data,
html[data-theme="dark"][data-dark="midnight"] .calc-float-sw,
html[data-theme="dark"][data-dark="midnight"] .calc-float-sw.off,
html[data-theme="dark"][data-dark="midnight"] .calc-freq-box,
html[data-theme="dark"][data-dark="midnight"] .calc-pair-key div,
html[data-theme="dark"][data-dark="midnight"] .calc-paste textarea,
html[data-theme="dark"][data-dark="midnight"] .calc-predict,
html[data-theme="dark"][data-dark="midnight"] .calc-res,
html[data-theme="dark"][data-dark="midnight"] .calc-scatter,
html[data-theme="dark"][data-dark="midnight"] .calc-screen,
html[data-theme="dark"][data-dark="midnight"] .calc-sol,
html[data-theme="dark"][data-dark="midnight"] .calc-sw,
html[data-theme="dark"][data-dark="midnight"] .calc-sw.off,
html[data-theme="dark"][data-dark="midnight"] .calc-warn,
html[data-theme="dark"][data-dark="midnight"] .camp-cell,
html[data-theme="dark"][data-dark="midnight"] .cb-plan,
html[data-theme="dark"][data-dark="midnight"] .cc-big,
html[data-theme="dark"][data-dark="midnight"] .cc-card,
html[data-theme="dark"][data-dark="midnight"] .cert,
html[data-theme="dark"][data-dark="midnight"] .cert-in,
html[data-theme="dark"][data-dark="midnight"] .cert-qr-img,
html[data-theme="dark"][data-dark="midnight"] .cert-qr-logo,
html[data-theme="dark"][data-dark="midnight"] .cert-side-qr,
html[data-theme="dark"][data-dark="midnight"] .cert-top .cert-x,
html[data-theme="dark"][data-dark="midnight"] .cg-teacher-note,
html[data-theme="dark"][data-dark="midnight"] .cged-form,
html[data-theme="dark"][data-dark="midnight"] .cged-prev,
html[data-theme="dark"][data-dark="midnight"] .chip.active .cged-n,
html[data-theme="dark"][data-dark="midnight"] .cj-avatar,
html[data-theme="dark"][data-dark="midnight"] .cj-event,
html[data-theme="dark"][data-dark="midnight"] .cj-item.sel,
html[data-theme="dark"][data-dark="midnight"] .cj-profile div,
html[data-theme="dark"][data-dark="midnight"] .cj-stop.done span,
html[data-theme="dark"][data-dark="midnight"] .cj-stop.now span,
html[data-theme="dark"][data-dark="midnight"] .cln-mon-box,
html[data-theme="dark"][data-dark="midnight"] .conf-slide-wrap img,
html[data-theme="dark"][data-dark="midnight"] .cr-card,
html[data-theme="dark"][data-dark="midnight"] .cr-sign,
html[data-theme="dark"][data-dark="midnight"] .ctl-prev-btn,
html[data-theme="dark"][data-dark="midnight"] .ctl-prev-card,
html[data-theme="dark"][data-dark="midnight"] .ctl-qpic.on,
html[data-theme="dark"][data-dark="midnight"] .diag-chart,
html[data-theme="dark"][data-dark="midnight"] .diag-excb,
html[data-theme="dark"][data-dark="midnight"] .dv-board,
html[data-theme="dark"][data-dark="midnight"] .dv-turn-av,
html[data-theme="dark"][data-dark="midnight"] .emg-alert.emg-hotline,
html[data-theme="dark"][data-dark="midnight"] .emg-yes,
html[data-theme="dark"][data-dark="midnight"] .er-floor,
html[data-theme="dark"][data-dark="midnight"] .er-floor.g,
html[data-theme="dark"][data-dark="midnight"] .er-floor.pick,
html[data-theme="dark"][data-dark="midnight"] .ext-drop.over,
html[data-theme="dark"][data-dark="midnight"] .ext-item,
html[data-theme="dark"][data-dark="midnight"] .ext-item.is-err,
html[data-theme="dark"][data-dark="midnight"] .f4-card,
html[data-theme="dark"][data-dark="midnight"] .fg-key-btn.fg-bub,
html[data-theme="dark"][data-dark="midnight"] .fg-m1,
html[data-theme="dark"][data-dark="midnight"] .fg-m2,
html[data-theme="dark"][data-dark="midnight"] .fg-m3,
html[data-theme="dark"][data-dark="midnight"] .fg-m4,
html[data-theme="dark"][data-dark="midnight"] .fg-m5,
html[data-theme="dark"][data-dark="midnight"] .fg-sheet-box,
html[data-theme="dark"][data-dark="midnight"] .fg-sheet-key,
html[data-theme="dark"][data-dark="midnight"] .fg-sheet-legend i.ring,
html[data-theme="dark"][data-dark="midnight"] .fg-strip-cell.unsure,
html[data-theme="dark"][data-dark="midnight"] .fs-chip,
html[data-theme="dark"][data-dark="midnight"] .gate-card,
html[data-theme="dark"][data-dark="midnight"] .gc-tray,
html[data-theme="dark"][data-dark="midnight"] .gl-cell.sel,
html[data-theme="dark"][data-dark="midnight"] .gs-bar,
html[data-theme="dark"][data-dark="midnight"] .gs-btn.no,
html[data-theme="dark"][data-dark="midnight"] .gs-btn.ok,
html[data-theme="dark"][data-dark="midnight"] .gs-drop,
html[data-theme="dark"][data-dark="midnight"] .gs-graph,
html[data-theme="dark"][data-dark="midnight"] .gs-ing,
html[data-theme="dark"][data-dark="midnight"] .gs-ing.no,
html[data-theme="dark"][data-dark="midnight"] .gs-ing.ok,
html[data-theme="dark"][data-dark="midnight"] .gs-label,
html[data-theme="dark"][data-dark="midnight"] .gs-obj-tag,
html[data-theme="dark"][data-dark="midnight"] .gs-obj.missed,
html[data-theme="dark"][data-dark="midnight"] .gs-obj.no,
html[data-theme="dark"][data-dark="midnight"] .gs-obj.ok,
html[data-theme="dark"][data-dark="midnight"] .gs-pile,
html[data-theme="dark"][data-dark="midnight"] .gs-scene .gs-obj.missed,
html[data-theme="dark"][data-dark="midnight"] .gs-scene .gs-obj.no,
html[data-theme="dark"][data-dark="midnight"] .gs-scene .gs-obj.ok.chem,
html[data-theme="dark"][data-dark="midnight"] .gs-scene .gs-obj.ok.phys,
html[data-theme="dark"][data-dark="midnight"] .gs-scene.kitchen,
html[data-theme="dark"][data-dark="midnight"] .gs-scene.lab,
html[data-theme="dark"][data-dark="midnight"] .gs-slot.on,
html[data-theme="dark"][data-dark="midnight"] .gs-spot-head,
html[data-theme="dark"][data-dark="midnight"] .gs-tank.no,
html[data-theme="dark"][data-dark="midnight"] .gs-tank.ok,
html[data-theme="dark"][data-dark="midnight"] .gw-svg,
html[data-theme="dark"][data-dark="midnight"] .gx-opt,
html[data-theme="dark"][data-dark="midnight"] .gx-opt.picked,
html[data-theme="dark"][data-dark="midnight"] .id-card-img,
html[data-theme="dark"][data-dark="midnight"] .lc-bar,
html[data-theme="dark"][data-dark="midnight"] .lc-ladder,
html[data-theme="dark"][data-dark="midnight"] .lc-line,
html[data-theme="dark"][data-dark="midnight"] .lc-line.miss,
html[data-theme="dark"][data-dark="midnight"] .lc-line.no,
html[data-theme="dark"][data-dark="midnight"] .lc-line.ok,
html[data-theme="dark"][data-dark="midnight"] .lc-line.on,
html[data-theme="dark"][data-dark="midnight"] .lc-rung.goal,
html[data-theme="dark"][data-dark="midnight"] .lc-rung.me,
html[data-theme="dark"][data-dark="midnight"] .lc-slip,
html[data-theme="dark"][data-dark="midnight"] .ll-q,
html[data-theme="dark"][data-dark="midnight"] .lp-embed-iframe,
html[data-theme="dark"][data-dark="midnight"] .mc-bar,
html[data-theme="dark"][data-dark="midnight"] .mc-cat,
html[data-theme="dark"][data-dark="midnight"] .mc-class,
html[data-theme="dark"][data-dark="midnight"] .mc-cross,
html[data-theme="dark"][data-dark="midnight"] .mc-rx,
html[data-theme="dark"][data-dark="midnight"] .mc-sq.light,
html[data-theme="dark"][data-dark="midnight"] .mc-sq.target.light,
html[data-theme="dark"][data-dark="midnight"] .mc-tm,
html[data-theme="dark"][data-dark="midnight"] .mil-q,
html[data-theme="dark"][data-dark="midnight"] .mil-walk,
html[data-theme="dark"][data-dark="midnight"] .mil-x,
html[data-theme="dark"][data-dark="midnight"] .mk-box,
html[data-theme="dark"][data-dark="midnight"] .mk-chart,
html[data-theme="dark"][data-dark="midnight"] .mk-chips2 .mk-chip,
html[data-theme="dark"][data-dark="midnight"] .mk-paper,
html[data-theme="dark"][data-dark="midnight"] .mk-screen,
html[data-theme="dark"][data-dark="midnight"] .mk-seg.right,
html[data-theme="dark"][data-dark="midnight"] .mk-seg.sel,
html[data-theme="dark"][data-dark="midnight"] .mk-seg.wrong,
html[data-theme="dark"][data-dark="midnight"] .mk-seg:hover:not(:disabled),
html[data-theme="dark"][data-dark="midnight"] .mk-slot.on,
html[data-theme="dark"][data-dark="midnight"] .mk-word span,
html[data-theme="dark"][data-dark="midnight"] .mq-stop,
html[data-theme="dark"][data-dark="midnight"] .nb-fig-prev,
html[data-theme="dark"][data-dark="midnight"] .nb-merge-table td.nb-mg-sel,
html[data-theme="dark"][data-dark="midnight"] .nb-merge-table td:hover,
html[data-theme="dark"][data-dark="midnight"] .nbp-bm-style,
html[data-theme="dark"][data-dark="midnight"] .nbp-eraser,
html[data-theme="dark"][data-dark="midnight"] .nbp-fs-bottom .nb-dots i.on,
html[data-theme="dark"][data-dark="midnight"] .nbp-hlbar .nbp-hl-done,
html[data-theme="dark"][data-dark="midnight"] .nbp-steps,
html[data-theme="dark"][data-dark="midnight"] .nbp-steps.done,
html[data-theme="dark"][data-dark="midnight"] .nbp-stk-pick,
html[data-theme="dark"][data-dark="midnight"] .nbp-tool.nbp-hl.on,
html[data-theme="dark"][data-dark="midnight"] .nbp-tools .nbp-hl.on,
html[data-theme="dark"][data-dark="midnight"] .nc-model-box,
html[data-theme="dark"][data-dark="midnight"] .nm-card,
html[data-theme="dark"][data-dark="midnight"] .pdf-canvas-wrap canvas,
html[data-theme="dark"][data-dark="midnight"] .pk-big,
html[data-theme="dark"][data-dark="midnight"] .pk-gcard,
html[data-theme="dark"][data-dark="midnight"] .pk-list,
html[data-theme="dark"][data-dark="midnight"] .pk-pop,
html[data-theme="dark"][data-dark="midnight"] .pk-reset,
html[data-theme="dark"][data-dark="midnight"] .pk-reset:hover,
html[data-theme="dark"][data-dark="midnight"] .pl-expr .pl-hit,
html[data-theme="dark"][data-dark="midnight"] .pl-tile,
html[data-theme="dark"][data-dark="midnight"] .pl-tile.sel,
html[data-theme="dark"][data-dark="midnight"] .pm-v2,
html[data-theme="dark"][data-dark="midnight"] .pm-v4,
html[data-theme="dark"][data-dark="midnight"] .pod-owner-replies,
html[data-theme="dark"][data-dark="midnight"] .pol-img .remove-btn,
html[data-theme="dark"][data-dark="midnight"] .pq-box,
html[data-theme="dark"][data-dark="midnight"] .pq-card,
html[data-theme="dark"][data-dark="midnight"] .pq-chip.low,
html[data-theme="dark"][data-dark="midnight"] .pq-float,
html[data-theme="dark"][data-dark="midnight"] .pq-float.low,
html[data-theme="dark"][data-dark="midnight"] .pq-qr,
html[data-theme="dark"][data-dark="midnight"] .prog-table th.prog-title .prog-term,
html[data-theme="dark"][data-dark="midnight"] .pt-cell,
html[data-theme="dark"][data-dark="midnight"] .pt-cell.me,
html[data-theme="dark"][data-dark="midnight"] .pt-cell.ptm-rival,
html[data-theme="dark"][data-dark="midnight"] .ptm-banner,
html[data-theme="dark"][data-dark="midnight"] .qb-betrow,
html[data-theme="dark"][data-dark="midnight"] .qb-mark,
html[data-theme="dark"][data-dark="midnight"] .qb-pickbtn,
html[data-theme="dark"][data-dark="midnight"] .qb-pickbtn:first-child,
html[data-theme="dark"][data-dark="midnight"] .qb-pod,
html[data-theme="dark"][data-dark="midnight"] .qb-special,
html[data-theme="dark"][data-dark="midnight"] .qb-team,
html[data-theme="dark"][data-dark="midnight"] .qs-row.error,
html[data-theme="dark"][data-dark="midnight"] .qs-row.waiting,
html[data-theme="dark"][data-dark="midnight"] .qs-status.no,
html[data-theme="dark"][data-dark="midnight"] .qs-status.ok,
html[data-theme="dark"][data-dark="midnight"] .rbx-f.editing,
html[data-theme="dark"][data-dark="midnight"] .rbx-pop math-field.rbx-mfield,
html[data-theme="dark"][data-dark="midnight"] .re-in,
html[data-theme="dark"][data-dark="midnight"] .rr-ctrl,
html[data-theme="dark"][data-dark="midnight"] .rr-ctrl.locked,
html[data-theme="dark"][data-dark="midnight"] .rr-rect,
html[data-theme="dark"][data-dark="midnight"] .rr-side.u,
html[data-theme="dark"][data-dark="midnight"] .stb-t,
html[data-theme="dark"][data-dark="midnight"] .stb-t.in,
html[data-theme="dark"][data-dark="midnight"] .sc-dots span,
html[data-theme="dark"][data-dark="midnight"] .sc-review li.mid,
html[data-theme="dark"][data-dark="midnight"] .sc-review li.no,
html[data-theme="dark"][data-dark="midnight"] .sc-review li.ok,
html[data-theme="dark"][data-dark="midnight"] .sc-steps li.ok .sc-in,
html[data-theme="dark"][data-dark="midnight"] .sc-steps li.shown .sc-in,
html[data-theme="dark"][data-dark="midnight"] .sg-card,
html[data-theme="dark"][data-dark="midnight"] .sg-fb.near,
html[data-theme="dark"][data-dark="midnight"] .sg-fb.no,
html[data-theme="dark"][data-dark="midnight"] .sg-fb.ok,
html[data-theme="dark"][data-dark="midnight"] .sg-hint,
html[data-theme="dark"][data-dark="midnight"] .sg-hint-box,
html[data-theme="dark"][data-dark="midnight"] .sg-kp button.sg-kp-op,
html[data-theme="dark"][data-dark="midnight"] .sg-next,
html[data-theme="dark"][data-dark="midnight"] .sg-step.now,
html[data-theme="dark"][data-dark="midnight"] .sg-streak,
html[data-theme="dark"][data-dark="midnight"] .sh-tag,
html[data-theme="dark"][data-dark="midnight"] .share-ico-email,
html[data-theme="dark"][data-dark="midnight"] .share-ico-messenger,
html[data-theme="dark"][data-dark="midnight"] .share-ico-sms,
html[data-theme="dark"][data-dark="midnight"] .share-ico-whatsapp,
html[data-theme="dark"][data-dark="midnight"] .sim-org,
html[data-theme="dark"][data-dark="midnight"] .sim-red,
html[data-theme="dark"][data-dark="midnight"] .sp-board,
html[data-theme="dark"][data-dark="midnight"] .st-chip,
html[data-theme="dark"][data-dark="midnight"] .st-trow,
html[data-theme="dark"][data-dark="midnight"] .st-val,
html[data-theme="dark"][data-dark="midnight"] .st-val.picked,
html[data-theme="dark"][data-dark="midnight"] .stg-ans,
html[data-theme="dark"][data-dark="midnight"] .stg-hint-tag,
html[data-theme="dark"][data-dark="midnight"] .stg-pick.on,
html[data-theme="dark"][data-dark="midnight"] .stg-prob,
html[data-theme="dark"][data-dark="midnight"] .stg-step.hint,
html[data-theme="dark"][data-dark="midnight"] .stg-tag,
html[data-theme="dark"][data-dark="midnight"] .t-hid,
html[data-theme="dark"][data-dark="midnight"] .task-fold.task-lesson,
html[data-theme="dark"][data-dark="midnight"] .td-card,
html[data-theme="dark"][data-dark="midnight"] .td-card.no,
html[data-theme="dark"][data-dark="midnight"] .td-card.ok,
html[data-theme="dark"][data-dark="midnight"] .td-case,
html[data-theme="dark"][data-dark="midnight"] .td-chip,
html[data-theme="dark"][data-dark="midnight"] .td-chip.td-q,
html[data-theme="dark"][data-dark="midnight"] .td-cloud,
html[data-theme="dark"][data-dark="midnight"] .td-rulebtn.no,
html[data-theme="dark"][data-dark="midnight"] .td-rulebtn.ok,
html[data-theme="dark"][data-dark="midnight"] .td-slot.filled,
html[data-theme="dark"][data-dark="midnight"] .td-slot.good,
html[data-theme="dark"][data-dark="midnight"] .td-slot.shown,
html[data-theme="dark"][data-dark="midnight"] .vv-clue,
html[data-theme="dark"][data-dark="midnight"] .vv-clue.done,
html[data-theme="dark"][data-dark="midnight"] .vv-clue.open,
html[data-theme="dark"][data-dark="midnight"] .vv-q,
html[data-theme="dark"][data-dark="midnight"] .zt-table td.zt-hit,
html[data-theme="dark"][data-dark="midnight"] math-field.fx-mf { color:#151A20; }

/* gold, only on thin details */
html[data-theme="dark"][data-dark="midnight"] .app-shell > .topbar { background-color: #1C1F24 !important; border-bottom-color: var(--mid-gold) !important; }
html[data-theme="dark"][data-dark="midnight"] .tab-panel h2, html[data-theme="dark"][data-dark="midnight"] .panel-title h2, html[data-theme="dark"][data-dark="midnight"] .topbar .greeting { color: #E9D49A; }
html[data-theme="dark"][data-dark="midnight"] .chip.active, html[data-theme="dark"][data-dark="midnight"] .section-tabs .chip.active { box-shadow: 0 0 0 1.5px var(--mid-gold); }
html[data-theme="dark"][data-dark="midnight"] .subject-card:hover, html[data-theme="dark"][data-dark="midnight"] .grp-tile:hover { border-color: var(--mid-gold) !important; }
html[data-theme="dark"][data-dark="midnight"] input:focus, html[data-theme="dark"][data-dark="midnight"] select:focus, html[data-theme="dark"][data-dark="midnight"] textarea:focus { outline-color: #3FA9F5; border-color: #3FA9F5; }
html[data-theme="dark"][data-dark="midnight"] .btn-outline:hover { background-color: var(--mid-light); }

/* v387 dark mode: a soft light glow keeps the dark "chim" letters of the header logo readable */
html[data-theme="dark"] .topbar img.wordmark-sm { filter: drop-shadow(0 0 1.5px rgba(255,255,255,.7)) drop-shadow(0 0 8px rgba(255,255,255,.25)); }

/* v389 🎵 / 🔊 volume panel under the header buttons */
.vol-pop { position: fixed; z-index: 9000; width: 220px; padding: 10px 12px; border-radius: 14px; background: var(--card, #fff); color: var(--text, #2B2B2B); border: 1px solid rgba(0,0,0,.12); box-shadow: 0 10px 28px rgba(0,0,0,.22); font-size: .9rem; }
.vol-pop .vol-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; margin-bottom: 8px; }
.vol-pop .vol-toggle { min-width: 52px; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(0,0,0,.18); background: #ddd; color: #333; font-weight: 700; cursor: pointer; }
.vol-pop .vol-toggle.on { background: #4A5A28; border-color: #4A5A28; color: #fff; }
.vol-pop .vol-row { display: flex; align-items: center; gap: 8px; }
.vol-pop .vol-range { flex: 1; accent-color: #4A5A28; }
.vol-pop .vol-range:disabled { opacity: .4; }
.vol-pop .vol-num { min-width: 28px; text-align: right; font-variant-numeric: tabular-nums; }
html[data-theme="dark"] .vol-pop { background: #2B3323; color: #EEE; border-color: rgba(255,255,255,.14); }
html[data-theme="dark"][data-dark="midnight"] .vol-pop { background: #1C1F24; border-color: #D4A73A; }
html[data-theme="dark"][data-dark="midnight"] .vol-pop .vol-toggle.on { background: #243142; border-color: #D4A73A; color: #E9D49A; }
html[data-theme="dark"][data-dark="midnight"] .vol-pop .vol-range { accent-color: #D4A73A; }

/* v390 🌳 Trees (teacher → Arcade → Skill): certificates (left) · one student's tree (right) */
.trees-cols { display: flex; flex-direction: column; gap: 18px; }
.trees-left, .trees-right { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.trees-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.trees-dl-wrap { position: relative; }
.trees-dl-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; min-width: 240px; display: flex; flex-direction: column; }
.trees-dl-menu button:disabled { opacity: .45; cursor: default; }
.trees-sum { margin: 0; }
.trees-by { display: flex; gap: 6px; flex-wrap: wrap; }
.trees-pick, .trees-who select { width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--rule); background: var(--card); color: var(--ink); font: inherit; }
.trees-prev { display: flex; align-items: center; gap: 8px; }
.trees-cert { flex: 1; min-width: 0; aspect-ratio: 1000 / 625; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 14px; background: rgba(0,0,0,.04); }
[data-theme="dark"] .trees-cert { background: rgba(255,255,255,.04); }
.trees-cert-btn { border: 0; padding: 0; background: none; cursor: zoom-in; display: block; border-radius: 12px; }
.trees-cert-btn .cert-scale > .cert { box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.trees-none { text-align: center; color: var(--ink-soft); padding: 18px; font-weight: 600; }
.trees-arrow { flex: none; width: 40px; height: 64px; border-radius: 12px; border: 1px solid var(--rule); background: var(--card); color: var(--ink); font-size: 1.7rem; line-height: 1; cursor: pointer; }
.trees-arrow.sm { width: 38px; height: 38px; font-size: 1.3rem; }
.trees-arrow:disabled { opacity: .35; cursor: default; }
.trees-arrow:not(:disabled):hover { border-color: var(--accent, #4A5A28); }
.trees-cap { text-align: center; font-size: .9rem; min-height: 1.3em; }
.trees-secs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 !important; }
.trees-who { display: flex; align-items: center; gap: 8px; }
.trees-who select { flex: 1; min-width: 0; }
.trees-stage { max-width: 520px; width: 100%; margin: 0 auto; }
.trees-tree-msg { text-align: center; }
@media (min-width: 900px) {
  #panel-practice.ar-desk[data-ar="skill-trees"] #arcade-trees-view { margin-top: 0 !important; }
  .trees-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
  .trees-left, .trees-right { overflow: hidden; }
  .trees-prev { flex: 1 1 auto; min-height: 0; }
  .trees-cert { aspect-ratio: auto; height: 100%; }
  .trees-secs { justify-content: flex-end; }
  .trees-stage { flex: none; max-width: none; }
}
.trees-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; } /* the breadcrumb reads it; "Trees" shows as the page title */
.trees-dl-menu { gap: 4px; }
.trees-dl-menu button { text-align: left; padding: 8px 10px; border-radius: 8px; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.trees-dl-menu button:not(:disabled):hover { background: rgba(74, 90, 40, .12); }
@media (max-width: 899px) {
  .trees-right { display: contents; }
  .trees-secs { order: -1; }
  .trees-who { order: 1; } .trees-stage { order: 2; } .trees-tree-msg { order: 3; }
}

/* v391 Student subject page: 5 tiles (Class, Connect, Learn, Arcade, Grades) + the two slim banners */
#subject-sub-tabs.stu-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px 0; }
#subject-sub-tabs.stu-tiles .tab-btn { padding: 18px 8px 14px; }
#subject-sub-tabs.stu-tiles .tab-icon { font-size: 2.4rem; }
#subject-sub-tabs.stu-tiles .tab-icon img { width: 1em; height: 1em; object-fit: contain; display: block; margin: 0 auto; }
#subject-sub-tabs.stu-tiles .tab-label { font-size: 1rem; font-weight: 700; }
.stu-banner-cell { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; }
.stu-banners { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 14px; }
.stu-banner { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 14px; border: 1px solid var(--rule); background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; min-height: 52px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.stu-banner:hover, .stu-banner:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(74, 90, 40, .18); border-color: var(--olive-base); }
.stu-banner .stb-ic { flex: none; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; }
.stu-banner .stb-ic img, .stu-banner .stb-ic svg { width: 34px; height: 34px; object-fit: contain; }
.stu-banner .stb-t { font-weight: 700; font-size: 1rem; display: flex; flex-direction: column; line-height: 1.2; }
.stu-banner .stb-t small { font-weight: 500; color: var(--ink-soft); font-size: .78rem; }
@media (min-width: 600px) { .stu-banners { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) {
  #subject-sub-tabs.stu-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  #subject-sub-tabs.stu-tiles .tab-btn { padding: 26px 10px 20px; min-height: 170px; }
  #subject-sub-tabs.stu-tiles .tab-icon { font-size: 3.6rem; }
  #subject-sub-tabs.stu-tiles .tab-label { font-size: 1.15rem; }
  /* the 6th place (row 2, last column) is split into the two slim banners */
  #subject-sub-tabs.stu-tiles .stu-banner-cell { grid-column: auto; justify-content: center; }
  #subject-sub-tabs.stu-tiles .stu-banner-cell .stu-banner { flex: 1 1 0; max-height: 120px; }
  #subject-sub-tabs.stu-tiles.stu-leaves { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
[data-theme="dark"] .stu-banner { background: var(--card); }

/* v393 ✏️ encoding tables: own scroll box, frozen label row + name column, lit name + label for the selected cell */
.xh-box { overflow: auto !important; max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.xh-enc thead th.xh-hd { position: sticky; top: 0; z-index: 5; }
.xh-enc .xh-fz { position: sticky; left: 0; z-index: 3; box-shadow: 2px 0 0 var(--rule); }
.xh-enc thead th.xh-hd.xh-fz { z-index: 6; }
.xh-enc tfoot .xh-fz { z-index: 3; }
.xh-enc td.xh-fz.xh-bg, .xh-enc tbody th.xh-fz.xh-bg { background-color: var(--card); }
.xh-enc thead .xh-bg { background-color: var(--paper-2); }
.xh-on, .xh-enc .xh-on { background-color: #FFE27A !important; color: #1b1b1b !important; font-weight: 800; box-shadow: inset 0 0 0 2px #D9A400; transition: background-color .12s; }
html[data-theme="dark"] .xh-on, html[data-theme="dark"] .xh-enc .xh-on { background-color: #6E8A2E !important; color: #fff !important; box-shadow: inset 0 0 0 2px #B5D36A; }
html[data-theme="dark"][data-dark="midnight"] .xh-on, html[data-theme="dark"][data-dark="midnight"] .xh-enc .xh-on { background-color: #3D6CAE !important; color: #fff !important; box-shadow: inset 0 0 0 2px #9CB7DB; }

/* v395 real flying: birds (side view) flap their wings up and down; butterflies are slanted, one seen from the side */
.bd-wing { transform-box: view-box; transform-origin: 0 0; animation: bd-flap .4s ease-in-out infinite alternate; }
.bd-wing.far { animation-delay: -.07s; }
.bd-bob { animation: bd-bob .8s ease-in-out infinite alternate; }
@keyframes bd-flap { from { transform: rotate(4deg); } to { transform: rotate(-112deg); } }
@keyframes bd-bob { from { transform: translateY(1.4px); } to { transform: translateY(-1.4px); } }
.bf-wing { transform-box: view-box; transform-origin: 0 0; animation: bf-flap .34s ease-in-out infinite alternate; }
.bf-wing.far { animation-delay: -.05s; opacity: .82; }
@keyframes bf-flap { from { transform: rotate(-12deg); } to { transform: rotate(-112deg); } }
.bf-sway { animation: bf-sway 2.4s ease-in-out infinite alternate; }
@keyframes bf-sway { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
.tree-fly.s2 { animation: tree-butterfly2 15s ease-in-out infinite; animation-delay: -5s; }
@keyframes tree-butterfly2 { 0% { transform: translate(300px, 210px); } 25% { transform: translate(235px, 150px); } 50% { transform: translate(120px, 185px); } 75% { transform: translate(55px, 130px); } 100% { transform: translate(300px, 210px); } }
@media (prefers-reduced-motion: reduce) { .bd-wing, .bd-bob, .bf-wing, .bf-sway, .tree-fly.s2 { animation: none; } .tree-fly.s2 { transform: translate(150px, 170px); } }

/* v396 teacher's own floating-calculator tick, beside the students' one */
.nbc-teacher-sw { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin: 0 0 0 14px; cursor: pointer; }
.nbc-teacher-sw input { width: auto; margin: 0; }
.nbm-tools .calc-float-sw.nbc-float-mini { flex-direction: row !important; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.nbm-tools .nbc-float-mini .nbc-teacher-sw { margin: 0; }

/* v396 ❓ Help: floating button, top-bar ?, manual and tour */
.help-fab { position: fixed; left: 14px; bottom: 86px; z-index: 880; width: 46px; height: 46px; }
.help-fab-main { width: 46px; height: 46px; border-radius: 50%; border: 2px solid #fff; background: #3D4A1F; color: #fff; font-size: 1.35rem; font-weight: 800; box-shadow: 0 6px 16px rgba(0,0,0,.3); cursor: pointer; padding: 0; line-height: 1; }
.help-fab-main:active { transform: scale(.94); }
.help-fab-x { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #fff; background: #C62828; color: #fff; font-size: .62rem; line-height: 1; padding: 0; cursor: pointer; display: grid; place-items: center; }
.help-bar-btn { font-weight: 800; font-size: 1.15rem; }
.help-overlay { position: fixed; inset: 0; z-index: 2100; background: rgba(15,20,10,.55); display: flex; align-items: center; justify-content: center; padding: 14px; }
.help-card { width: min(720px, 100%); max-height: min(88vh, 760px); display: flex; flex-direction: column; background: var(--card, #fff); color: var(--ink, #222); border-radius: 18px; box-shadow: 0 18px 50px rgba(0,0,0,.4); overflow: hidden; }
.help-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--rule, #ddd); }
.help-head h2 { margin: 0; font-size: 1.25rem; } .help-head span { font-size: .8rem; color: var(--ink-soft, #666); }
.help-x { border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; color: inherit; padding: 2px 6px; }
.help-body { padding: 12px 16px; overflow: auto; flex: 1 1 auto; min-height: 0; }
.help-body h3 { margin: 16px 0 6px; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft, #666); }
.help-tour-btn { width: 100%; margin-bottom: 4px; }
.help-basics { display: grid; gap: 6px; } .help-basics div { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; background: var(--paper-2, #f3f1ea); } .help-basics span { font-size: .88rem; color: var(--ink-soft, #555); }
.help-grp { border: 1px solid var(--rule, #ddd); border-radius: 12px; margin: 6px 0; background: var(--paper-2, #faf8f2); }
.help-grp summary { display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer; list-style: none; } .help-grp summary::-webkit-details-marker { display: none; }
.help-grp summary small { display: block; color: var(--ink-soft, #666); font-size: .82rem; }
.help-grp ul, .help-kids { list-style: none; margin: 0; padding: 0 10px 10px; display: grid; gap: 8px; }
.help-grp li, .help-kids li { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.help-ic { flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center; } .help-ic img { width: 100%; height: 100%; object-fit: contain; }
.help-ic.sm { width: 32px; height: 32px; } .help-ic.big { width: 84px; height: 84px; }
.help-tour-top { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; } .help-tour-top p { margin: 0; font-size: 1rem; }
.help-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--rule, #ddd); }
.help-btns { display: flex; gap: 8px; }
.help-dots { display: flex; gap: 4px; flex-wrap: wrap; max-width: 45%; } .help-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--rule, #cfcfc4); } .help-dots i.on { background: #6B7F2E; }
.help-pref { display: grid; gap: 8px; } .help-pref label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; } .help-pref input { width: auto; margin-top: 3px; } .help-pref small { color: var(--ink-soft, #666); }
body.cg-open .help-fab { z-index: 1150; }
@media print { .help-fab, .help-overlay { display: none !important; } }
@media (max-width: 600px) { .help-fab { bottom: 92px; } .help-tour-top { flex-direction: column; text-align: center; } }
.help-btns button { white-space: nowrap; width: auto; min-width: 84px; }

/* v397 Diagnostics: 📝 Formative | 🏋️ Practice beside ⛶ */
.diag-kind { display: inline-flex; gap: 6px; margin-left: 6px; flex-wrap: wrap; }
.diag-kind .chip { padding: 4px 10px; font-size: .85rem; white-space: nowrap; }
.help-fab-main { touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.help-fab.dragging .help-fab-main { cursor: grabbing; transform: scale(1.08); box-shadow: 0 10px 26px rgba(0,0,0,.4); }
body.chim-admin-viewer #panel-master, body.chim-admin-viewer #master-home { max-width: none; width: 100%; }
body.chim-admin-viewer #master-home > .subtitle { display: none; }
body.chim-admin-viewer #app-teacher .content:has(#master-home:not(.hidden)) { max-width: 1400px; }

/* v400 page sound switch (Trees, Numeracy Camp) */
.trees-stage { position: relative; }
.ps-in { position: absolute; top: 8px; right: 8px; z-index: 3; box-shadow: 0 2px 8px rgba(0,0,0,.25); }

/* v410 Calculator-allowed button only as wide as its words (assignments, tasks) */
.tk-asg-r2 .calc-sw, #panel-launchpad.tk-desk .tk-left .task-card .calc-sw, .asg-lesson-card .calc-sw, .tk-pt-btns > .calc-sw { width: auto !important; max-width: 100%; display: inline-block; flex: none !important; white-space: nowrap; padding: 3px 12px; align-self: center; }
.asg-lesson-card:not(.tk-rowed) .calc-sw { display: block; margin: 8px auto 0; }
/* v410 foldable chapters in Assignments */
details.mq-chapter.asg-ch > summary.mq-ch-head { cursor: pointer; list-style: none; }
details.mq-chapter.asg-ch > summary.mq-ch-head::-webkit-details-marker { display: none; }
details.mq-chapter.asg-ch > summary.mq-ch-head::before { content: "▸"; color: var(--olive-deep); font-size: .95rem; margin-right: 2px; transition: transform .15s; }
details.mq-chapter.asg-ch[open] > summary.mq-ch-head::before { transform: rotate(90deg); }
details.mq-chapter.asg-ch > summary .mq-ch-title { flex: 1 1 auto; }
details.mq-chapter.asg-ch .asg-ch-n { font-size: .78rem; color: var(--ink-soft); font-weight: 600; }
/* v411 ☑ Manually Check (PETA editor) */
.perf-manual-box { margin: 0 0 16px; padding: 10px 12px; border: 1.5px dashed var(--line, #c9c2a8); border-radius: 12px; }
.perf-manual-tick { display: flex; gap: 8px; align-items: center; font-size: 1rem; margin: 0; }
.perf-manual-tick input, .perf-manual-sub input { width: 20px; height: 20px; margin: 0; flex: none; }
.perf-manual-sub { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px 28px; }
.perf-manual-sub label { display: flex; gap: 8px; align-items: center; margin: 0; }
.prq-allans { margin: 0 0 4px; }
.prq-allcell { min-width: 220px; max-width: 360px; }
.prq-allbox { border: 1px solid var(--pq-line); border-radius: 10px; padding: 8px 10px; margin: 8px 0; background: var(--pq-bg); }

/* v412 📓 Daily Journal calendar */
#attendance-journal-view .jr-layout { display: block !important; }
#jr-chips-slot { display: none !important; }
.jrc-table { border-collapse: collapse; table-layout: fixed; width: 100%; min-width: 720px; color: #111; }
.jrc-table th, .jrc-table td { border: 1px solid #9a9a9a; }
.jrc-table .jrc-title { background: #0f9ed8; color: #111; font-size: 1.15rem; text-align: center; padding: 8px; }
.jrc-table .jrc-dow th { background: #3fb3e6; color: #111; text-align: center; padding: 3px; font-size: .85rem; }
.jrc-date { background: #93dcf7; color: #111; font-weight: 800; padding: 4px 6px; }
.jrc-date.out { background: #ff0000; color: #111; }
.jrc-tl { background: var(--card, #fff); color: var(--ink, #222); font-size: .72rem; text-align: right; padding: 2px 6px; white-space: nowrap; }
.jrc-slot td { height: 34px; vertical-align: top; background: #fff; color: #111; font-size: .78rem; padding: 3px 5px; }
.jrc-slot.alt td { background: #d9d9d9; }
.jrc-slot td.jrc-tl { background: var(--card, #fff); color: var(--ink, #222); }
.jrc-slot.brk td { border-bottom: 3px double #111; }
.jrc-slot td.jrc-off { background: repeating-linear-gradient(45deg, #efefef, #efefef 6px, #e2e2e2 6px, #e2e2e2 12px); }
.jrc-cell, .jrc-dcell { cursor: pointer; }
.jrc-cell:hover { outline: 2px solid #0f9ed8; outline-offset: -2px; }
.jrc-cell:not(.has) .jrc-sec { opacity: .45; }
.jrc-sec { font-size: .7rem; font-weight: 800; color: #0b6f99; }
.jrc-dcell { background: #fff; color: #111; vertical-align: top; height: 96px; padding: 4px 6px; font-size: .8rem; white-space: normal; }
.jrc-dcell:hover { outline: 2px solid #0f9ed8; outline-offset: -2px; }
.jrc-dcell.out { background: #f1f1f1; }
.jrc-dn { font-weight: 800; background: #93dcf7; margin: -4px -6px 4px; padding: 2px 6px; }
.jrc-dcell.out .jrc-dn { background: #ff0000; }
.jrc-hr { border: 0; border-top: 1px dashed #aaa; margin: 4px 0; }
.jr-day-item { margin-bottom: 4px; }
#journal-list .tbl-card-btn, #journal-list .tbl-colsel { display: none !important; }
/* v413 🌐 Online tests */
.fg-online-btn { vertical-align: middle; margin-left: 8px; }
.onl-title { margin: 4px 0 10px; }
.onl-pgbar { display: flex; gap: 8px; margin: 0 0 12px; }
.onl-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 900px) { .onl-grid { grid-template-columns: 42% 1fr; align-items: start; } }
.onl-card { background: var(--card, #fff); border: 1px solid var(--line, #d9d2bb); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.onl-card h4 { margin: 0 0 8px; }
.onl-sec { margin-bottom: 10px; }
.onl-sec-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.onl-stu { display: flex; gap: 8px; align-items: center; padding: 3px 0; border-bottom: 1px dashed var(--line, #ddd); }
.onl-stu label { flex: 1; display: flex; gap: 6px; align-items: center; margin: 0; min-width: 0; }
.onl-stu input[type=checkbox] { width: 18px; height: 18px; flex: none; }
.onl-stat { font-size: .8rem; color: var(--ink-soft, #666); white-space: nowrap; }
.onl-tick { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.onl-tos-row { display: grid; grid-template-columns: 1fr 1fr 70px auto; gap: 6px; margin-bottom: 6px; }
@media (max-width: 640px) { .onl-tos-row { grid-template-columns: 1fr 70px auto; } .onl-tos-row select:first-child { grid-column: 1 / -1; } }
.onl-q { border-bottom: 1px solid var(--line, #e2dcc6); padding: 8px 0; }
.onl-q-h { display: flex; gap: 6px; align-items: flex-start; }
.onl-q-t { flex: 1; }
.onl-q-tools { display: flex; gap: 4px; }
.onl-ch { display: flex; gap: 8px; align-items: baseline; padding: 2px 6px; border-radius: 8px; margin: 2px 0; }
.onl-ch.ok { background: rgba(60, 160, 90, .16); font-weight: 600; }
.onl-L { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; background: var(--chip, #e8e2cf); font-weight: 800; font-size: .8rem; flex: none; }
.onl-own-c { display: flex; gap: 6px; align-items: center; margin: 4px 0; }
.onl-own-c .onl-oc { flex: 1; }
.onl-dl { position: relative; margin: 0 0 10px; }
.onl-dl .fg-export-menu { position: absolute; z-index: 5; margin-top: 4px; }
.onl-table td, .onl-table th { white-space: nowrap; }
.onl-s-card { display: flex; gap: 10px; align-items: center; justify-content: space-between; border: 1px solid var(--line, #d9d2bb); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; background: var(--card, #fff); }
.onl-s-res { text-align: right; }
/* the test the student is taking */
body.onl-lock { overflow: hidden; }
.onl-take { position: fixed; inset: 0; z-index: 10000; background: var(--bg, #f6f1e1); overflow: auto; padding: 12px; }
.onl-wrap { max-width: 760px; margin: 0 auto; }
.onl-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; position: sticky; top: 0; background: var(--bg, #f6f1e1); padding: 6px 0; z-index: 2; }
.onl-ttl { font-weight: 800; }
.onl-time { font-size: 1.4rem; }
.onl-warn { margin: 0 0 8px; }
.onl-qn { font-size: .85rem; color: var(--ink-soft, #666); margin-bottom: 8px; }
.onl-qtext { font-size: 1.2rem; line-height: 1.6; margin-bottom: 14px; }
.onl-choices { display: grid; gap: 8px; }
.onl-choice { display: flex; gap: 10px; align-items: center; text-align: left; font-size: 1.05rem; padding: 10px 12px; border: 2px solid var(--line, #cfc7ad); border-radius: 12px; background: transparent; color: inherit; cursor: pointer; }
.onl-choice.on { border-color: #2f7a3e; background: rgba(60, 160, 90, .15); }
.onl-nav { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 10px; }
.onl-dots { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; flex: 1; }
.onl-dot { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line, #bbb); background: transparent; color: inherit; font-size: .8rem; cursor: pointer; }
.onl-dot.ans { background: rgba(60, 160, 90, .25); }
.onl-dot.cur { outline: 2px solid #0f9ed8; }
.onl-done { text-align: center; padding: 24px; }
.onl-big { font-size: 3rem; font-weight: 800; }
.onl-big small { font-size: 1.2rem; }
.onl-card .inline-form .field { flex: 1 1 130px; min-width: 0; }
.onl-card .inline-form .field input { width: 100%; }
.onl-tick { width: auto; }
.onl-tick input { width: 18px; height: 18px; flex: none; }
.tbl-dl { white-space: nowrap; }

/* v417 Online test calculator */
.onl-calc { position: fixed; right: 12px; bottom: 12px; z-index: 10010; width: min(320px, calc(100vw - 24px)); background: var(--card, #fff); color: var(--ink, #222); border: 1px solid var(--line, #ccc); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.3); padding: 10px; }
.onl-calc-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.onl-calc-h b { flex: 1; font-size: .9rem; }
.onl-calc-h button { border: 1px solid var(--line, #ccc); background: transparent; color: inherit; border-radius: 8px; padding: 3px 9px; cursor: pointer; font-weight: 700; }
.onl-calc-disp { background: rgba(127,127,127,.12); border-radius: 8px; padding: 6px 10px; text-align: right; min-height: 52px; }
.onl-calc-expr { font-size: 1rem; word-break: break-all; min-height: 1.3em; }
.onl-calc-res { font-size: 1.4rem; font-weight: 800; }
.onl-calc-keys { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-top: 8px; }
.onl-calc-keys button { padding: 9px 0; border-radius: 8px; border: 1px solid var(--line, #ccc); background: rgba(127,127,127,.1); color: inherit; font-size: .95rem; cursor: pointer; }
.onl-calc-keys button.n { background: rgba(127,127,127,.2); font-weight: 700; }
.onl-calc-keys button.c { background: #c0392b; color: #fff; border-color: #c0392b; }
.onl-calc-keys button.eq { background: #1f7a4d; color: #fff; border-color: #1f7a4d; font-weight: 800; }
.onl-time { display: flex; align-items: center; white-space: nowrap; }
.onl-ttl { min-width: 0; }

/* v418 Pod pictures */
.pod-img-btn { display: block; border: 0; padding: 0; background: none; cursor: pointer; margin: 4px 0; }
.pod-img { display: block; max-width: min(260px, 100%); max-height: 260px; border-radius: 10px; background: rgba(127,127,127,.15); min-height: 60px; min-width: 90px; }

/* v421 ☁ upload button */
.cloud-btn { position: relative; border: 1px solid var(--line, #ccc); background: transparent; color: inherit; border-radius: 999px; padding: 4px 10px; cursor: pointer; font-size: 1rem; }
.cloud-btn.has { border-color: #c9892b; background: rgba(201,137,43,.15); }
.cloud-btn.spinning { opacity: .6; animation: pulse 1s infinite; }
.cloud-btn .cloud-n { font-size: .7rem; font-weight: 800; margin-left: 3px; }
.cloud-btn .cloud-n:empty { display: none; }
#btn-cloud-teacher { width: auto; }

/* v422 « header menu */
.topbar-more-wrap { position: relative; display: inline-flex; }
.topbar-more-btn { font-weight: 800; font-size: 1.1rem; }
.topbar-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 400; display: flex; flex-direction: column; gap: 4px; min-width: 190px; padding: 8px; background: var(--card, #fff); color: var(--ink, #222); border: 1px solid var(--rule, #ccc); border-radius: 14px; box-shadow: 0 10px 28px rgba(0,0,0,.25); }
.topbar-menu.hidden { display: none; }

/* v423 « slides the buttons back to where they were; » hides them */
.topbar-more-wrap { display: inline-flex; align-items: center; gap: 8px; }
.topbar-menu { position: static; display: flex; flex-direction: row; align-items: center; gap: 8px; min-width: 0; padding: 0; background: none; border: 0; box-shadow: none; animation: topbarSlide .18s ease-out; }
.topbar-menu.hidden { display: none; }
@keyframes topbarSlide { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }

.topbar-menu .cloud-btn { padding: 4px 10px; }

/* v424 small SVG certificate preview */
.trees-cert-btn { width: 100%; height: 100%; }
.trees-cert-btn .cert-mini { border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }

/* v426 text style bar */
.fmt-bar { display: flex; gap: 4px; margin: 0 0 4px; flex-wrap: wrap; }
.fmt-bar button { min-width: 32px; padding: 3px 8px; border: 1px solid var(--line, #ccc); background: transparent; color: inherit; border-radius: 8px; cursor: pointer; font-size: .85rem; }
.fmt-bar button:hover { background: rgba(127,127,127,.15); }

/* v427 save for offline */
.saveoff-btn { border: 1px solid var(--line, #ccc); background: transparent; border-radius: 999px; padding: 4px 10px; cursor: pointer; font-size: 1rem; }
.saveoff-ov { position: fixed; inset: 0; z-index: 10050; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; }
.saveoff-box { background: var(--card, #fff); color: var(--ink, #222); border-radius: 16px; padding: 22px 26px; text-align: center; width: min(340px, 86vw); display: flex; flex-direction: column; gap: 8px; }
.saveoff-bar { height: 8px; border-radius: 6px; background: rgba(127,127,127,.25); overflow: hidden; }
.saveoff-bar i { display: block; height: 100%; width: 0; background: #1f7a4d; transition: width .3s; }

/* v429 merge mode toggle */
.dm-mode { display: inline-flex; border: 1px solid var(--line, #ccc); border-radius: 10px; overflow: hidden; }
.dm-mode button { border: 0; background: transparent; color: inherit; padding: 6px 12px; cursor: pointer; font: inherit; font-size: .9rem; }
.dm-mode button.on { background: #4A5A28; color: #fff; font-weight: 700; }

/* v432 Text Extractor on top of the notebook editor */
.ext-ov { position: fixed; inset: 0; z-index: 9000; background: var(--paper); color: var(--ink); overflow-y: auto; padding: 14px 16px 90px; }
.ext-ov-box { max-width: 1100px; margin: 0 auto; }
/* v433 phone: when « is open the 6 buttons take their own row above « / shield / gear / Log Out, so nothing is pushed off the screen */
@media (max-width: 640px) {
  #app-teacher .topbar-actions, #app-student .topbar-actions { flex-wrap: wrap !important; row-gap: 6px; }
  .topbar-more-wrap { display: contents; }
  .topbar-menu { order: -1; flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .topbar-menu .icon-btn, .topbar-menu .cloud-btn { flex: 0 0 auto; }
  .topbar-actions .topbar-who { order: 0; }
  .app-shell { overflow-x: hidden; }
}
/* v435 advisers row: Save / Remove / Trace */
.adv-row .adv-remove, .adv-row .adv-trace { white-space: nowrap; }
.adv-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
/* v436 "Not saved yet" notice: the page's buttons are locked so nothing is created from an empty-looking list */
#chim-miss { position: sticky; top: 0; z-index: 790; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 0; padding: 10px 14px; background: var(--amber-bg, #FAEEDA); color: var(--amber, #854F0B); border-bottom: 2px solid var(--amber, #854F0B); font-size: .9rem; }
/* v452 only make/change buttons are locked */
.chim-miss-lock { pointer-events: none !important; opacity: .4 !important; }

/* v438 Parent Feedback */
.pf-card { border: 1px solid var(--line, #E3DCCB); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: var(--card, #fff); }
.pf-h { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.pf-score { font-weight: 700; }
.pf-msg { width: 100%; box-sizing: border-box; resize: vertical; }
.pf-ack { display: flex; gap: 6px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.pf-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pf-t-stu { margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line, #E3DCCB); }
.pf-t-item { margin: 6px 0 0 8px; padding-left: 8px; border-left: 3px solid var(--line, #E3DCCB); }
.pf-t-item.unread { border-left-color: #C0392B; }
.pf-t-msg { white-space: pre-wrap; margin: 2px 0; }

/* v441 daily attendance: Load / Save live in the table toolbar */
#attendance-day-view.att-day-px .att-load-row, #attendance-day-view.att-day-px #btn-save-attendance { display: none; }
#attendance-day-view .tbl-box { margin-top: 4px; }

/* v441b daily attendance on a computer/tablet: full width, no page scrolling (the table has its own scroll bars) */
@media (min-width: 700px) {
  .content:has(> #panel-attendance.att-day-desk) { max-width: none; }
  #panel-attendance.att-day-desk { overflow: hidden; }
  #attendance-day-view .pg-head { margin: 0 0 6px; }
  #attendance-day-view #attendance-list, #attendance-day-view .tbl-box { width: 100%; max-width: none; }
  #attendance-day-view .tbl-wrap { overflow: auto; }
}
/* v443 daily attendance: tighter gaps (breadcrumb row → title/pills → toolbar) */
@media (min-width: 700px) {
  .content:has(> #panel-attendance.att-day-desk) { padding-top: 6px; }
  #attendance-day-view.att-day-px .page-bar { display: none; }
  #attendance-day-view .pg-head { margin: 0 0 4px !important; min-height: 0; }
  #attendance-day-view .tbl-box { margin-top: 0; }
  #attendance-day-view .tbl-tools { margin-top: 0; }
}

/* v445 notebook questions: Edit reply / Remove / Restore / Delete in one row */
.nbq-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.nbq-acts:empty { display: none; }

/* v446 scanner speed meter */
.fg-scan-speed { position: absolute; left: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 5; background: rgba(0,0,0,.55); color: #fff; font-size: .78rem; padding: 3px 8px; border-radius: 999px; pointer-events: none; }

/* v447 📊 Notebook → Reading: left half = title, note, terms, pickers, buttons, legend; right half = section pills + table */
.nbr-picks, .nbr-btns { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; }
.nbr-picks select { flex: 1 1 200px; }
@media (min-width: 900px) {
  .content:has(> #panel-notebook.nbr-desk) { max-width: none; }
  #panel-notebook.nbr-desk { display: block !important; }
  #panel-notebook.nbr-desk > .nb-side { display: none !important; }
  #panel-notebook.nbr-desk #notebook-reading-view:not(.hidden) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; align-items: start; }
  #panel-notebook.nbr-desk .nbr-left { position: sticky; top: 12px; }
  #panel-notebook.nbr-desk .nbr-tools { flex-direction: column; align-items: stretch; }
  #panel-notebook.nbr-desk .nbr-btns > * { flex: 1 1 0; }
  #panel-notebook.nbr-desk .nbr-legend { margin: 6px 0 8px; }
  #panel-notebook.nbr-desk .nbr-secs { justify-content: center; margin: 0 0 8px; }
  #panel-notebook.nbr-desk .nbr-wrap { overflow: visible; border: 0; }
  #panel-notebook.nbr-desk .nbr-right .tbl-wrap { overflow: auto; }
}
/* the Class row stays at the bottom, the header at the top, "Student"/"Class" on the left */
.nbr-grid thead th { position: sticky; top: 0; z-index: 2; }
.nbr-grid tfoot th, .nbr-grid tfoot td { position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -1px 0 var(--rule); }
.nbr-grid thead .nbr-name, .nbr-grid tfoot .nbr-name { z-index: 3; left: 0; }

/* v448 Reading: left 30% · right 70%, pickers and buttons one per line, narrow lesson columns, table at 100% with its own scroll bars */
.nbr-title { display: none; }
.nbr-grid thead th:not(.nbr-name) { width: 92px; min-width: 92px; max-width: 92px; }
.nbr-grid thead th small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 88px; }
@media (min-width: 900px) {
  .content:has(> #panel-notebook.nbr-desk) { padding-top: 6px; }
  #panel-notebook.nbr-desk > .panel-title { display: none; }
  #panel-notebook.nbr-desk .nbr-title { display: block; margin: 0 0 8px; }
  #panel-notebook.nbr-desk #notebook-reading-view:not(.hidden) { grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); }
  #panel-notebook.nbr-desk .nbr-picks, #panel-notebook.nbr-desk .nbr-btns { flex-direction: column; }
  #panel-notebook.nbr-desk .nbr-picks select, #panel-notebook.nbr-desk .nbr-btns > * { flex: none; width: 100%; max-width: none; }
  #panel-notebook.nbr-desk .nbr-secs { justify-content: flex-start; margin: 0 0 6px; }
  #panel-notebook.nbr-desk .nbr-right .tbl-wrap { overflow: auto !important; }
}
/* v449 Reading on a computer: only the table scrolls (the page itself stays still) */
@media (min-width: 900px) {
  #panel-notebook.nbr-desk .nbr-right .tbl-box { overflow: visible; }
  #panel-notebook.nbr-desk .nbr-right .tbl-wrap { overscroll-behavior: contain; }
}
/* v453 ⏱ Other Tools: Timer (left) + FlashPick (right) */
.ot-title { margin: 4px 0 10px; }
/* v482 Teach Mode: FlashPick fills the page (wheel 60% · list 40%); the five buttons sit at the top right */
.ot-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px 20px; flex-wrap: wrap; margin: 0 0 12px; }
.ot-head .ot-title { margin: 4px 0 0; }
.ot-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-left: auto; max-width: 820px; }
.ot-tools .ot-bar { justify-content: flex-end; gap: 8px; margin: 0; }
.ot-tools .ot-bar .btn-small { margin: 0; }
.ot-note { text-align: right; font-size: .8rem; max-width: 640px; }
/* v482b cleaner Teach Mode: smaller buttons, one-line note, no title row on computers, two-line bar above the list */
.ot-tools .ot-bar .btn-small { padding: 7px 12px; font-size: .86rem; min-height: 0; white-space: nowrap; }
.ot-tools .ot-bar { flex-wrap: nowrap; }
.ot-note { white-space: nowrap; }
.pk-head { display: flex !important; align-items: center; gap: 10px 14px; flex-wrap: wrap; min-height: 0 !important; }
.pk-head > .pk-title { flex: 0 0 auto !important; }
.pk-head .pk-modes { margin: 0 auto 0 6px; }
.ot-pick .pk-wheel { max-width: none !important; }
.pk-bar2 { justify-content: space-between; }
.pk-bar2 .pk-secs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.pk-bar2 .pk-secs .chip { margin: 0; padding: 5px 12px; }
.pk-ticks { display: inline-flex; gap: 6px; margin-left: auto; }
.pk-list-bar .pk-norep { margin-left: auto; }
@media (min-width: 900px) {
  #setup-picker-view .ot-head .ot-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; } /* kept for the breadcrumbs */
  .ot-pick .pk-spinbox { margin: 0 auto 0 0; } /* v484 the wheel sits at the left */
  #setup-picker-view .ot-head { margin-bottom: 8px; }
}
@media (max-width: 1200px) { .ot-tools .ot-bar { flex-wrap: wrap; } .ot-note { white-space: normal; } }
body:has(#setup-picker-view:not(.hidden)) #teacher-subject-switcher-wrap { display: none !important; }
.ot-pick .pk-secs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
.ot-pick .pk-secs .chip { margin: 0; }
.pk-gleft { overflow: auto; margin-top: 4px; }
.pk-gleft .pk-glist { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
@media (min-width: 900px) {
  .content:has(> #panel-setup #setup-picker-view:not(.hidden)) { max-width: none; }
  .ot-pick .pk-layout { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) !important; gap: 22px; align-items: start; }
  .ot-pick .pk-left, .ot-pick .pk-right { width: auto !important; max-width: none !important; min-width: 0; }
  .ot-pick .pk-spinbox { max-width: none; }
}
@media (max-width: 899px) {
  .ot-tools { align-items: stretch; margin-left: 0; max-width: none; }
  .ot-tools .ot-bar { justify-content: flex-start; }
  .ot-note { text-align: left; }
}
.ot-timer, .ot-pick { background: var(--card); border: 1px solid var(--rule); border-radius: 18px; padding: 14px 16px; min-width: 0; }
.pk-title { display: flex; align-items: center; gap: 8px; margin: 0; }
.pk-float { margin-left: 6px; font-size: .85rem; }
.tm-box { color: var(--ink); }
.tm-tabs { display: flex; gap: 6px; align-items: center; border-bottom: 2px solid var(--rule); margin-bottom: 10px; }
.tm-tabs button { border: 0; background: none; padding: 6px 10px; color: var(--ink-soft); font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -2px; cursor: pointer; font: inherit; font-weight: 700; }
.tm-tabs button.on { color: var(--green, #4a5a28); border-color: var(--green, #4a5a28); }
.tm-tabs .tm-float { margin-left: auto; border: 2px solid #4a5a28; border-radius: 10px; margin-bottom: 4px; padding: 4px 12px; color: #4a5a28; }
.tm-pre { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 4px 0 10px; }
.tm-pre button { border: 1px solid var(--rule); background: var(--paper); border-radius: 999px; padding: 6px 14px; cursor: pointer; font: inherit; color: inherit; }
.tm-pre button.on { background: #4a5a28; color: #fff; border-color: #4a5a28; }
.tm-main { display: flex; align-items: center; justify-content: center; gap: 12px; }
.tm-ring { width: 48px; height: 48px; flex: none; }
.tm-digits { display: flex; align-items: center; cursor: text; }
.tm-page .tm-dg { width: 44px; height: 78px; margin: 0 2px; } .tm-page .tm-cl { width: 14px; height: 78px; }
.tm-pm { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #4a5a28; background: var(--paper); color: #4a5a28; font-size: 1.4rem; font-weight: 700; line-height: 1; padding: 0; cursor: pointer; }
.tm-ctl { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.tm-go { background: #4a5a28; color: #fff; border: 0; border-radius: 999px; padding: 9px 26px; font-weight: 700; cursor: pointer; font: inherit; font-weight: 700; }
.tm-rs, .tm-test { border: 1px solid var(--rule); background: var(--paper); color: inherit; border-radius: 999px; padding: 8px 14px; cursor: pointer; font: inherit; }
.tm-ctl select { border: 1px solid var(--rule); border-radius: 999px; padding: 7px 10px; background: var(--paper); color: inherit; font: inherit; }
.tm-in { width: 84px; font: 700 2.4rem system-ui, sans-serif; text-align: center; border: 2px solid #4a5a28; border-radius: 10px; }
/* v482 presets 1m · 5m · 10m stacked at the right of the clock; editing keeps the digital look */
.tm-main { position: relative; }
.tm-key { position: absolute !important; left: 0; top: 0; width: 1px !important; height: 1px !important; opacity: 0; border: 0 !important; padding: 0 !important; pointer-events: none; }
.tm-main .tm-pre { flex-direction: column; gap: 4px; margin: 0 0 0 4px; flex-wrap: nowrap; }
.tm-main .tm-pre button { padding: 3px 12px; font-size: .85rem; font-weight: 700; }
.tm-part { display: inline-flex; border-radius: 6px; }
.tm-editing .tm-part { opacity: .55; }
.tm-editing .tm-part.tm-ed-on { opacity: 1; color: #4a5a28; box-shadow: inset 0 -4px 0 #4a5a28; animation: tmed 1s steps(2) infinite; }
@keyframes tmed { 50% { box-shadow: inset 0 -4px 0 transparent; } }
.tm-inc { font: 700 2.4rem system-ui, sans-serif; margin: 0 6px; }
.tm-done .tm-digits { animation: tmfl .6s steps(2) infinite; } @keyframes tmfl { 50% { opacity: .25; } }
.tm-bar { display: none; }
.tm-ctl select { width: auto !important; flex: none; max-width: 200px; }
.tm-go, .tm-rs { white-space: nowrap; }
/* v456 🛟 safety copies */
.sv-card { border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; background: var(--card); }
.sv-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 6px; }
/* v457 Teach Mode bar */
.ot-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.ot-bar .fg-sub { flex: 1 1 300px; }
/* v458 🃏 Answer Cards scanner */
.ac-ov { position: fixed; inset: 0; z-index: 9800; background: var(--paper); color: var(--ink); display: flex; flex-direction: column; }
.ac-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-bottom: 2px solid var(--rule); }
.ac-top select { width: auto; }
.ac-key { display: inline-flex; gap: 4px; align-items: center; font-size: .9rem; }
.ac-key button { border: 1px solid var(--rule); background: var(--card); border-radius: 8px; padding: 4px 10px; font-weight: 700; cursor: pointer; color: inherit; }
.ac-key button.on { background: #4a5a28; color: #fff; border-color: #4a5a28; }
.ac-count { font-weight: 700; }
.ac-body { flex: 1; display: grid; grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr); min-height: 0; }
@media (max-width: 760px) { .ac-body { grid-template-columns: 1fr; grid-template-rows: 55vh 1fr; } }
.ac-cam { position: relative; background: #000; min-height: 0; }
.ac-cam video, .ac-cam canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ac-tip { position: absolute; left: 10px; bottom: 10px; background: rgba(0,0,0,.6); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: .85rem; }
.ac-list { overflow: auto; padding: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; align-content: start; }
.ac-st { border: 1px solid var(--rule); border-radius: 8px; padding: 4px 8px; font-size: .85rem; display: flex; gap: 6px; align-items: center; background: var(--card); }
.ac-st b { min-width: 22px; color: var(--ink-soft); } .ac-st span { margin-left: auto; font-weight: 800; }
.ac-st.got { background: #e3f4d5; border-color: #9ccc65; } .ac-st.ok span { color: #27500a; } .ac-st.no { background: #fde2e0; border-color: #f19c94; }
.ac-res { grid-column: 1 / -1; padding: 18px; max-width: 760px; }
.ac-bar { display: grid; grid-template-columns: 30px 1fr 40px; gap: 8px; align-items: center; margin: 6px 0; }
.ac-bar span { height: 26px; background: #9aa6bd; border-radius: 6px; min-width: 4px; } .ac-bar.key span { background: #4a5a28; } .ac-bar em { font-style: normal; font-weight: 700; }
.ac-new { outline: 2px solid #4a5a28; }
/* v459 🖥 Teach Screen */
body.ts-on .app-shell > .topbar, body.ts-on #teacher-toolbar, body.ts-on .chim-crumbs, body.ts-on #chim-home-fab, body.ts-on .home-fab { display: none !important; }
body.ts-on .content { zoom: var(--ts-z, 1.15); padding-bottom: 80px; }
#ts-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000; display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); background: #232b3a; color: #fff; box-shadow: 0 -4px 14px #0003; }
#ts-bar button { border: 0; background: transparent; color: #fff; font: inherit; font-weight: 700; padding: 6px 10px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
#ts-bar button span { font-size: 1.3rem; }
#ts-bar button.on { background: #4a5a28; }
#ts-bar button:hover { background: #ffffff1f; }
.ts-tabs, .ts-right { display: flex; gap: 2px; flex-wrap: wrap; }
#ts-exit { background: #e2453c !important; }
.ts-panel { position: fixed; inset: 0 0 56px 0; z-index: 8900; background: var(--paper); color: var(--ink); display: grid; place-items: center; overflow: auto; zoom: var(--ts-z, 1.15); }
.ts-hi { text-align: center; padding: 24px; max-width: 1100px; }
.ts-date { font-size: 1.4rem; color: var(--ink-soft); }
.ts-greet { font: 800 3.4rem/1.15 Georgia, serif; margin: 14px 0 8px; outline: none; }
.ts-sub { font-size: 1.3rem; color: var(--ink-soft); }
.ts-cl { font-size: 1.4rem; margin-top: 22px; }
.ts-secs { margin-top: 18px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.ts-big { font-size: 1.15rem; padding: 12px 22px; }
@media (max-width: 760px) { #ts-bar button { padding: 6px 7px; font-size: .8rem; } #ts-bar button span { font-size: 1.1rem; } .ts-greet { font-size: 2.2rem; } }
/* v460 📖 Lesson slides (Teach Screen) */
.nb-slide-tick { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; margin-right: 6px; cursor: pointer; white-space: nowrap; }
.ts-panel.sl-wrap { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 10px 70px; zoom: 1; }
.sl-bar { display: flex; gap: 8px; align-items: center; width: 100%; max-width: 1400px; margin-bottom: 8px; }
.sl-bar select { width: auto; max-width: 60vw; }
.sl-bar button { border: 1px solid var(--rule); background: var(--card); border-radius: 10px; padding: 6px 10px; cursor: pointer; color: inherit; font: inherit; }
.sl-count { font-weight: 700; color: var(--ink-soft); }
.sl-stage { width: min(calc(100vw - 150px), calc((100vh - 150px) * 16 / 9)); aspect-ratio: 16 / 9; background: #fff; color: #1f2937; border-radius: 14px; box-shadow: 0 10px 30px #0002; overflow: hidden; position: relative; container-type: inline-size; }
.sl-stage.sl-dark { background: #14213d; color: #eef2ff; }
.sl-shot { position: fixed; left: -99999px; top: 0; width: 1600px; aspect-ratio: auto; height: 900px; border-radius: 0; box-shadow: none; }
.sl { position: absolute; inset: 0; padding: 4.5cqw 5cqw 4cqw; display: flex; flex-direction: column; font-size: 2.3cqw; line-height: 1.35; }
.sl-head { font-size: 1.6cqw; font-weight: 700; opacity: .55; margin-bottom: 1.6cqw; }
.sl-title { justify-content: center; text-align: center; }
.sl-title h1 { font: 800 5.4cqw/1.1 Georgia, serif; margin: 1cqw 0; }
.sl-kicker, .sl-sub { font-size: 2.2cqw; opacity: .7; }
.sl-body { flex: 1; min-height: 0; display: flex; gap: 3cqw; }
.sl-two > * { flex: 1 1 0; min-width: 0; }
.sl-text { overflow: hidden; }
.sl-center { align-items: center; justify-content: center; }
.sl-fig { display: flex; align-items: center; justify-content: center; }
.sl-fig svg, .sl-figbig svg { width: 100%; height: auto; max-height: 100%; }
.sl-figbig { padding: 0 8cqw; }
.sl-table { font-size: 2cqw; } .sl-table th, .sl-table td { padding: .6cqw 1.2cqw; }
.sl-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sl-steps-t { font-size: 1.8cqw; font-weight: 800; margin: -.8cqw 0 1cqw; }
.sl-prob { font-weight: 600; margin-bottom: 1.2cqw; }
.sl-ol { margin: 0; padding-left: 3cqw; } .sl-ol li { opacity: 0; transition: opacity .25s; margin: .6cqw 0; } .sl-ol li.on { opacity: 1; }
.sl-ol li b { margin-right: 1cqw; } .sl-math { display: inline-block; }
.sl-ans { margin-top: 1.2cqw; font-weight: 800; color: #27500a; } .sl-dark .sl-ans { color: #b9f27c; }
.sl-sk { position: absolute; right: 1cqw; bottom: 1cqw; border: 0; background: #0000000f; border-radius: 8px; padding: 4px 8px; cursor: pointer; font-size: 14px; }
.sl-nav { position: fixed; top: 50%; transform: translateY(-50%); z-index: 8950; width: 48px; height: 80px; border: 0; border-radius: 12px; background: #232b3a99; color: #fff; font-size: 1.6rem; cursor: pointer; }
.sl-nav:disabled { opacity: .25; cursor: default; } /* v513 the first / last page */
.sl-prev { left: 10px; } .sl-next { right: 10px; }
.ts-mpop { position: fixed; right: 10px; bottom: 64px; z-index: 9100; background: var(--card); color: var(--ink); border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 6px 20px #0003; }
#ts-music.on { background: #4a5a28; }
.sl .mf-fig { max-width: none !important; width: 100%; margin: 0; }
.sl .mf-fig svg { width: 100%; height: auto; max-height: 34cqw; }
.sl-figbig .mf-fig svg { max-height: 40cqw; }
.sl-logo { position: absolute; left: 2cqw; bottom: 1.6cqw; height: 2.6cqw; opacity: .55; }
.sl-dark .sl-logo { filter: brightness(1.8); }
/* v462 Teach Screen colors, seat plan, slide editor, formulas */
body.ts-on { --ts-bg: #fbf6ea; --ts-slide: #ffffff; --ts-fg: #1f2937; }
body.ts-th-blue { --ts-bg: #e6f0fb; --ts-slide: #f7fbff; --ts-fg: #1e2a3a; }
body.ts-th-green { --ts-bg: #e7f4e4; --ts-slide: #f8fdf6; --ts-fg: #1f2d1f; }
body.ts-th-purple { --ts-bg: #efe9fa; --ts-slide: #fbf9ff; --ts-fg: #2a2140; }
body.ts-th-charcoal { --ts-bg: #1c1f24; --ts-slide: #2a2f37; --ts-fg: #fdf6d8; }
body.ts-on .ts-panel { background: var(--ts-bg); color: var(--ts-fg); }
body.ts-on .ts-panel .fg-sub, body.ts-on .ts-panel .ts-sub, body.ts-on .ts-panel .ts-date { color: var(--ts-fg); opacity: .75; }
body.ts-on .sl-stage { background: var(--ts-slide); color: var(--ts-fg); }
body.ts-th-charcoal .sl-ans { color: #b9f27c; }
body.ts-th-charcoal .sl-logo { filter: brightness(2); }
body.ts-th-charcoal .ts-panel select, body.ts-th-charcoal .sl-bar button { background: #2a2f37; color: var(--ts-fg); border-color: #444; }
.ts-tbtn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--rule); background: var(--card); border-radius: 8px; padding: 6px 10px; cursor: pointer; color: inherit; font: inherit; }
.ts-tbtn span { width: 18px; height: 18px; border-radius: 50%; border: 1px solid #0003; } .ts-tbtn.on { outline: 2px solid #4a5a28; }
.sl { font-size: calc(2.3cqw * var(--sl-fs, 1)); }
.sl-formula { flex-direction: column; justify-content: center; align-items: center; gap: 2cqw; text-align: center; }
.sl-fbig { font-size: 2em; }
.sl-syms { list-style: none; padding: 0; margin: 0; text-align: left; } .sl-syms li { margin: .5cqw 0; }
.sl-prob-sm { font-size: .75em; opacity: .75; }
.ts-panel.tss-wrap { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 10px 18px; zoom: 1; }
.tss-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.tss-bar select { width: auto; font-size: 1.1rem; } .tss-n { font-weight: 700; font-size: 1.1rem; }
.tss-board { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.tss-board svg { width: 100%; height: 100%; max-height: calc(100vh - 140px); }
.sle-ov .sle-body { overflow: auto; padding: 14px 18px 40px; max-width: 980px; margin: 0 auto; width: 100%; }
.sle-blk { border: 1px solid var(--rule); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; background: var(--card); } .sle-blk.off { opacity: .45; }
.sle-h { display: flex; gap: 8px; align-items: center; font-weight: 700; margin-bottom: 6px; cursor: pointer; }
.sle-line { padding: 2px 0; }
.sle-cut { display: block; width: 100%; border: 0; border-top: 1px dashed transparent; background: transparent; color: #b3a98f; font-size: .75rem; text-align: left; padding: 0 4px; height: 12px; line-height: 12px; cursor: pointer; }
.sle-cut:hover { border-top-color: #d93025; color: #d93025; }
.sle-cut.on { border-top: 2px solid #d93025; color: #d93025; font-weight: 800; height: 18px; line-height: 18px; }
.sle-fig .mf-fig { max-width: 240px; margin: 0; }
.sle-pick { display: block; width: 100%; text-align: left; border: 1px solid var(--rule); background: var(--card); border-radius: 8px; padding: 8px 10px; margin: 0 0 6px; cursor: pointer; color: inherit; font: inherit; }
/* v463 Teach Screen: Mastery / Check questions, Skill bar */
.tq-body { gap: 3cqw; }
.tq-q { flex: 0 0 63%; min-width: 0; display: flex; flex-direction: column; gap: 1.5cqw; overflow: hidden; }
.tq-qt { font-size: 1.15em; font-weight: 600; }
.tq-fig { flex: 1; min-height: 0; } .tq-fig .mf-fig svg { max-height: 22cqw; }
.tq-ch { flex: 1; display: flex; flex-direction: column; gap: 1cqw; justify-content: center; overflow: hidden; }
.tq-c { display: flex; gap: 1.2cqw; align-items: center; text-align: left; border: 2px solid #0002; border-radius: 1cqw; background: #ffffff66; padding: .9cqw 1.2cqw; font: inherit; font-size: .95em; color: inherit; cursor: pointer; }
.tq-c b { flex: none; width: 2.6cqw; height: 2.6cqw; border-radius: 50%; background: #4a5a28; color: #fff; display: grid; place-items: center; font-size: .8em; }
.tq-c.ok { border-color: #3b8f2a; background: #e3f4d5; color: #1f3d10; } .tq-c.no { border-color: #d93025; background: #fde2e0; color: #6b1a14; }
.tq-note { font-size: .85em; margin-top: .6cqw; } .tq-why { margin-top: .4cqw; opacity: .85; }
.tss-skill { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 8950; display: flex; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 6px 10px; box-shadow: 0 4px 14px #0002; max-width: 96vw; flex-wrap: wrap; }
.tss-skill select { width: auto; }
body.ts-on #arcade-play-view :is(.gl-time, .chim-ask-timer, .ga-timer, .game-timer, [class*="timer"]) { visibility: hidden !important; }
.tc-setup { width: min(1000px, 94vw); background: var(--ts-slide, #fff); color: var(--ts-fg, inherit); border-radius: 16px; padding: 18px 22px; box-shadow: 0 10px 30px #0002; }
.tc-setup select { width: auto; max-width: 100%; }
.tc-list { margin: 12px 0; padding-left: 24px; } .tc-list li { margin: 8px 0; }
.tc-scan { background: #4a5a28 !important; color: #fff !important; font-weight: 700; }
/* v464 question on top, the 4 choices below in 2 × 2, everything fits */
.tq-body { flex-direction: column !important; gap: 1.6cqw !important; }
.tq-q { flex: 0 1 auto !important; max-height: 46%; flex-direction: row !important; align-items: flex-start; gap: 2cqw !important; }
.tq-q .tq-qt { flex: 1; } .tq-q .tq-fig { flex: 0 0 34%; } .tq-fig .mf-fig svg { max-height: 16cqw !important; }
.tq-ch { flex: 1 1 0 !important; display: grid !important; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(0, 1fr); gap: 1.2cqw !important; min-height: 0; align-content: stretch; }
.tq-c { min-height: 0; overflow: hidden; align-items: center; }
.tq-c span { overflow: hidden; max-height: 100%; }
.tq-note { grid-column: 1 / -1; margin: 0 !important; }
#tq-go { width: 4.2em; padding: 2px 4px; text-align: center; }
#tq-sk { width: auto; max-width: 22vw; }
.tq-ch { grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); grid-auto-rows: auto !important; }
.tq-c b { flex: 0 0 auto; line-height: 1 !important; display: inline-grid; place-items: center; }
/* v465 Teach Screen: 🧰 Prepare, one-row Mastery bar, Skill full size, Cleaners today only, bigger Greeting, slide styles */
#ts-panel .sl-bar { flex-wrap: nowrap; min-width: 0; }
#ts-panel .sl-bar select { flex: 1 1 0; min-width: 0; max-width: none; width: auto; }
#ts-panel .sl-bar > :not(select) { flex: 0 0 auto; }
#ts-panel .sl-bar #tq-cat { flex-grow: 1.2; } #ts-panel .sl-bar #tq-sk { flex-grow: 1.4; max-width: none; }
.tq-cnt { white-space: nowrap; }
.tq-menu { min-width: 220px; } .tq-menu .sv-row { margin: 0; }
.tss-skill { top: 0; left: 0; right: 0; transform: none; max-width: none; border-radius: 0; justify-content: center; flex-wrap: nowrap; padding: 6px 12px; }
.tss-skill select { flex: 0 1 320px; min-width: 0; }
.tss-skill button { border: 1px solid var(--rule); background: var(--card); color: inherit; font: inherit; font-weight: 700; border-radius: 10px; padding: 6px 12px; cursor: pointer; white-space: nowrap; }
.tss-skill button.on { background: #4a5a28; color: #fff; border-color: #4a5a28; }
body.ts-game #panel-practice > :not(#arcade-play-view) { display: none !important; }
body.ts-game #arcade-play-view { margin-top: 0 !important; }
body.ts-game .content { padding-top: 52px; }
body.ts-on #panel-practice #arcade-play-view [class*="timer"] { visibility: visible !important; }
body.ts-clean #setup-clean-view > .page-bar, body.ts-clean .cln-right, body.ts-clean .cln-tools, body.ts-clean .cln-setup, body.ts-clean .sp-secs, body.ts-clean #cln-week-box, body.ts-clean .cln-shared, body.ts-clean .cln-left > .fg-sub, body.ts-clean .chim-updating, body.ts-clean .cln-left > .off-note { display: none !important; }
body.ts-clean .cln-layout { display: block !important; max-width: 1200px; margin: 0 auto; }
body.ts-clean .cln-left { margin-top: 0 !important; width: 100% !important; max-width: none !important; }
body.ts-clean #setup-clean-view > h2 { text-align: center; font-size: 2rem; }
body.ts-clean .cln-table { font-size: 1.15rem; } body.ts-clean .cln-table input[type="checkbox"] { width: 24px; height: 24px; }
.ts-hi-big { width: 100%; max-width: none; padding: 2vh 4vw; }
.ts-hi-big .ts-date { font-size: clamp(1.2rem, 2.6vw, 2.4rem); }
.ts-hi-big .ts-greet { font-size: clamp(2.4rem, 6.2vw, 6.5rem); overflow-wrap: anywhere; }
.ts-hi-big .ts-sub { font-size: clamp(1.1rem, 2.3vw, 2.2rem); }
.ts-hi-big .ts-cl { font-size: clamp(1.2rem, 2.5vw, 2.4rem); line-height: 1.35; overflow-wrap: anywhere; }
.ts-hi-big .ts-secs .chip { font-size: clamp(1rem, 1.9vw, 1.8rem); padding: .35em .9em; }
.sl-head, .sl-title h1 { color: var(--sla, inherit); } .sl-head { opacity: .8; }
.sl-below { flex-direction: column; } .sl-below > .sl-text { flex: 0 1 auto; } .sl-below > .sl-fig { flex: 1 1 0; min-height: 0; }
.sl-pic img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 1cqw; }
.sl-two > .sl-pic { display: flex; align-items: center; justify-content: center; min-height: 0; }
.sl-sw { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--rule); background: var(--card); color: inherit; font: inherit; font-size: .82rem; border-radius: 8px; padding: 3px 8px 3px 3px; cursor: pointer; margin: 2px; }
.sl-sw span { display: inline-grid; place-items: center; width: 30px; height: 22px; border-radius: 5px; border: 1px solid #0002; font-weight: 800; font-size: .8rem; }
.sl-sw.on { outline: 2px solid #4a5a28; }
.sle-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px 18px; border-bottom: 1px solid var(--rule); background: var(--card); position: sticky; top: 0; z-index: 2; }
.sle-grp { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.sle-grp > button[data-slm] { min-width: 36px; height: 34px; border: 1px solid var(--rule); background: var(--paper); color: inherit; border-radius: 8px; cursor: pointer; font: inherit; font-size: 1rem; }
.sle-grp > .sle-col { min-width: 26px !important; width: 26px; border-radius: 50% !important; height: 26px !important; }
.sle-sn { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 4px; padding: 4px 8px; background: #4a5a2814; border-left: 4px solid #4a5a28; border-radius: 6px; font-size: .9rem; }
.sle-pb { border: 1px solid var(--rule); background: var(--card); border-radius: 8px; padding: 3px 10px; cursor: pointer; color: inherit; font: inherit; font-size: .85rem; }
.sle-th { display: inline-flex; align-items: center; gap: 4px; background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 2px 4px; }
.sle-th img { height: 34px; border-radius: 4px; } .sle-th button { border: 0; background: transparent; cursor: pointer; color: #d93025; }
.prep-ov .prep-body { overflow: auto; padding: 14px 18px 40px; width: 100%; max-width: 1100px; margin: 0 auto; }
.prep-ov .ac-top select { width: auto; }
.prep-tabs { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.prep-card { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 14px 18px; }
.prep-card h3 { margin: 0 0 10px; } .prep-card select { width: auto; max-width: 100%; }
.prep-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.prep-prev { width: min(100%, 720px); margin-top: 12px; box-shadow: 0 4px 16px #0002; }
.prep-check .tc-setup { width: 100%; box-shadow: none; border: 1px solid var(--rule); }
.pm-list { margin-top: 10px; max-height: 58vh; overflow: auto; border: 1px solid var(--rule); border-radius: 10px; }
.pm-row { display: grid; grid-template-columns: 26px 34px 1fr auto; gap: 8px; align-items: center; padding: 7px 10px; border-bottom: 1px solid var(--rule); cursor: pointer; }
.pm-row.on { background: #4a5a2812; } .pm-k { font-weight: 800; color: var(--ink-soft); } .pm-row small { max-width: 220px; text-align: right; }
body.ts-clean #panel-setup > :not(#setup-clean-view) { display: none !important; }
/* v467 Data Detective check: Task 1 under the data, with room for the ✏️ points */
.dpt-check-grid { grid-template-columns: 1fr !important; }
.dpt-t1-table { width: 100%; }
.dpt-t1-table input.dpt-p1 { font-size: 1.05rem; padding: 4px 6px; border: 2px solid #4a5a28; border-radius: 8px; background: #fffbe6; text-align: center; }
/* v468 Edit slides: one continuous page; 🔀 Arrange slides */
.sle-ov .sle-body { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; margin-top: 12px; margin-bottom: 30px; }
.sle-blk { border: 0 !important; border-radius: 0 !important; margin: 0 !important; padding: 0 !important; background: transparent !important; }
.sle-h { display: inline-flex !important; flex-direction: row !important; width: auto !important; gap: 6px !important; align-items: center !important; margin: 6px 0 2px !important; font-size: .78rem; font-weight: 700; color: var(--ink-soft); }
.sle-h input { width: auto !important; margin: 0 !important; }
.sle-blk + .sle-blk { border-top: 1px dotted var(--rule) !important; }
.sle-modes { display: inline-flex; gap: 6px; margin-left: 10px; }
.sla-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; padding: 14px 18px 40px; overflow: auto; }
.sla-card { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 8px; cursor: grab; display: flex; flex-direction: column; gap: 6px; }
.sla-card.fixed { cursor: default; } .sla-card.drag { opacity: .4; } .sla-card.over { outline: 3px dashed #4a5a28; }
.sla-top { display: flex; justify-content: space-between; align-items: center; }
.sla-top button { border: 1px solid var(--rule); background: var(--paper); border-radius: 6px; cursor: pointer; padding: 1px 8px; color: inherit; }
.sla-top button:disabled { opacity: .35; cursor: default; }
.sla-th { width: 100%; pointer-events: none; }
.sla-put { font-size: .82rem; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.sla-put select { width: auto; max-width: 100%; font-size: .82rem; padding: 2px 4px; }
/* v469 Edit slides: editing on the left, the slide on the right; text alignment */
.sle-ov { display: flex; flex-direction: column; }
.sle-split { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 16px; padding: 10px 16px 12px; }
.sle-split > .sle-body { max-width: none !important; margin: 0 !important; height: 100%; overflow: auto; padding: 10px 16px 30px; }
.sle-prev { display: flex; flex-direction: column; min-height: 0; justify-content: flex-start; }
.sle-prev .sl-stage { width: 100%; max-height: calc(100% - 70px); box-shadow: 0 6px 20px #0002; }
.sle-pbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.sle-pbar > button, .sle-al { border: 1px solid var(--rule); background: var(--card); color: inherit; font: inherit; font-size: .88rem; border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.sle-al.on { background: #4a5a28; color: #fff; border-color: #4a5a28; }
.sle-all { display: inline-flex !important; gap: 4px; align-items: center; font-size: .82rem; width: auto !important; }
.sle-all input { width: auto !important; margin: 0 !important; }
.sle-sn.cur { background: #4a5a2833; border-left-color: #d9a400; }
.sle-sn { cursor: pointer; }
@media (max-width: 900px) { .sle-split { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); } .sle-prev { order: -1; } .sle-prev .sl-stage { max-width: 520px; } }
.sl-al-center .sl-text, .sl-al-center .sl-fbig, .sl-al-center .sl-syms, .sl-al-center .sl-prob, .sl-al-center .sl-head { text-align: center; }
.sl-al-right .sl-text, .sl-al-right .sl-fbig, .sl-al-right .sl-syms, .sl-al-right .sl-prob, .sl-al-right .sl-head { text-align: right; }
.sl-al-justify .sl-text, .sl-al-justify .sl-prob { text-align: justify; }
.sl-al-center .sl-syms, .sl-al-right .sl-syms { list-style-position: inside; }
/* v470 slide-only text, line tools, slide backgrounds */
.sle-line { position: relative; border-radius: 6px; padding: 2px 34px 2px 6px !important; }
.sle-line.cur { background: #f3e2a3aa; box-shadow: inset 3px 0 0 #d9a400; }
.sle-ed1 { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); border: 1px solid var(--rule); background: var(--card); border-radius: 6px; font-size: .8rem; padding: 1px 5px; cursor: pointer; opacity: 0; }
.sle-line:hover .sle-ed1, .sle-line.cur .sle-ed1 { opacity: 1; }
.sle-lt > button { min-width: 34px; height: 34px; border: 1px solid var(--rule); background: var(--paper); color: inherit; border-radius: 8px; cursor: pointer; font: inherit; font-size: .92rem; padding: 0 8px; }
.sle-edit { border: 2px solid #d9a400; border-radius: 10px; padding: 8px; margin: 4px 0; background: var(--card); }
.sle-edit textarea { width: 100%; font: inherit; font-family: ui-monospace, Consolas, monospace; font-size: .95rem; }
.sle-edpv { padding: 6px 8px; margin: 6px 0; background: var(--paper); border-radius: 8px; min-height: 1.6em; }
.sle-own { font-size: .82rem; color: #8a6d00; display: flex; gap: 8px; align-items: center; margin: 4px 0; }
#sle-bg { width: auto; }
.sl-fxc { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.sl-hasfx > .sl { inset: 4.6cqw 5.6cqw; background: var(--slbox, #ffffffee); border-radius: 3.2cqw; box-shadow: 0 1cqw 3cqw #0003; z-index: 1; padding: 3.4cqw 4cqw 3cqw; }
.sl-ln { min-height: 1.2em; }
/* v471 edit a line like PowerPoint */
.sle-wbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; font-size: 14px; }
.sle-wbar button { border: 1px solid var(--rule); background: var(--card); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; border-radius: 8px; padding: 4px 10px; cursor: pointer; line-height: 1.3; }
.sle-wbar button.ok { background: #4a5a28; color: #fff; border-color: #4a5a28; }
.sle-wed { min-height: 1.6em; padding: 6px 8px; border: 2px solid #d9a400; border-radius: 8px; background: #fffef6; color: #1f2937; outline: none; white-space: pre-wrap; text-align: inherit; }
.sle-mx { display: inline-block; padding: 0 3px; margin: 0 1px; border-radius: 5px; cursor: pointer; background: #eef4ff; box-shadow: inset 0 0 0 1px #9db7e6; vertical-align: middle; }
.sle-mx:hover { background: #dce8ff; }
.sle-whint { font-size: 12px; color: var(--ink-soft); margin-top: 4px; font-weight: 400; text-align: left; line-height: 1.3; }
.sle-tap { cursor: text; border-radius: .3em; }
.sle-tap:hover { box-shadow: 0 0 0 2px #d9a40088; background: #fff6d6aa; }
.sle-inplace { position: relative; z-index: 3; background: #fff; border-radius: 10px; padding: 6px; box-shadow: 0 6px 20px #0003; }
/* v472 formulas on slides never get a slider: they shrink with the slide text */
.sl-stage .chim-tex { overflow: hidden !important; max-width: none; }
.sl-stage .sl-text, .sl-stage .sl-ln, .sl-stage .sl-fbig { overflow: hidden; }
.sl-stage .sl-ln { max-width: 100%; }
.sl-stage .ML__container, .sl-stage .katex-display { overflow: visible !important; }
/* v473 Edit slides: one screen like PowerPoint */
.sle2 .sle-rib { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--rule); background: var(--card); }
.sle2 .sle-rib .sle-grp { display: inline-flex; gap: 4px; align-items: center; padding-right: 12px; border-right: 1px solid var(--rule); }
.sle2 .sle-rib .sle-grp:last-child { border-right: 0; }
.sle2 .sle-rib button { min-width: 36px; height: 36px; border: 1px solid var(--rule); background: var(--paper); color: inherit; border-radius: 8px; cursor: pointer; font: inherit; font-size: .95rem; padding: 0 9px; white-space: nowrap; }
.sle2 .sle-rib button:hover { background: #4a5a2818; }
.sle2 .sle-rib .sle-col { min-width: 24px !important; width: 24px; height: 24px !important; border-radius: 50% !important; padding: 0 !important; }
.sle2 #sle-bg { width: auto; height: 36px; }
.sle-main { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 210px minmax(0, 1fr); }
.sle-strip { overflow: auto; padding: 10px 10px 30px; border-right: 1px solid var(--rule); background: #00000008; display: flex; flex-direction: column; gap: 10px; }
.sle-tn { border: 2px solid transparent; border-radius: 10px; padding: 4px; cursor: pointer; background: var(--card); }
.sle-tn.on { border-color: #d9a400; box-shadow: 0 0 0 2px #d9a40044; }
.sle-tn.hid .sle-tth { opacity: .35; filter: grayscale(1); }
.sle-tn.drag { opacity: .4; } .sle-tn.over { border-color: #4a5a28; border-style: dashed; }
.sle-tnh { display: flex; align-items: center; gap: 6px; font-size: .8rem; margin-bottom: 3px; }
.sle-tnh span { margin-left: auto; display: inline-flex; gap: 2px; }
.sle-tnh button { border: 0; background: transparent; cursor: pointer; font-size: .9rem; padding: 0 4px; border-radius: 5px; color: inherit; }
.sle-tnh button:hover { background: #0001; }
.sle-tth { width: 100% !important; pointer-events: none; border-radius: 6px !important; box-shadow: none !important; }
.sle-center { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 20px; min-height: 0; overflow: auto; }
.sle-center .sl-stage { width: min(100%, calc((100vh - 230px) * 16 / 9)); box-shadow: 0 8px 26px #0003; }
.sle-cap { margin-top: 10px; font-size: .88rem; color: var(--ink-soft); text-align: center; }
.sle-sel { box-shadow: 0 0 0 2px #d9a400; }
.sle-hidnote { position: absolute; left: 50%; bottom: 3cqw; transform: translateX(-50%); z-index: 5; background: #222c; color: #fff; padding: .4em .9em; border-radius: 99px; font-size: 1.5cqw; }
.sle-pop { position: fixed; z-index: 9800; min-width: 240px; max-width: 360px; max-height: 70vh; overflow: auto; }
.sle-pp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 4px; font-size: .9rem; }
.sle-pp select { width: auto; padding: 2px 4px; }
.sle-sws { display: flex; flex-wrap: wrap; gap: 4px; }
.sle-pk { display: flex !important; gap: 6px; align-items: center; font-size: .85rem; padding: 3px 4px; width: auto !important; }
.sle-pk input { width: auto !important; margin: 0 !important; } .sle-pk small { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sle-show { position: fixed; inset: 0; z-index: 9900; background: #111; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.sle-show .sl-stage { width: min(96vw, calc((100vh - 80px) * 16 / 9)); }
.sle-shbar { display: flex; gap: 10px; align-items: center; color: #fff; }
.sle-shbar button { border: 1px solid #fff5; background: #fff1; color: #fff; border-radius: 8px; padding: 6px 14px; cursor: pointer; font: inherit; }
@media (max-width: 800px) { .sle-main { grid-template-columns: 110px minmax(0, 1fr); } .sle-tnh { font-size: .7rem; } }
.sle2 #sle-bg { height: 36px; padding: 2px 8px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); font-size: .92rem; }
/* v479 nothing cut off: list numbers inside, formula lines on one line, pictures that can be sized */
.sl-stage .sl-ol { padding-left: 2.4em; }
.sl-stage .sl-ol li::marker { font-weight: 700; }
.sl-stage .sl-ln, .sl-stage .sl-ol li, .sl-stage .sl-prob, .sl-stage .sl-syms li { overflow: hidden; }
.sl-fig[style*="--imgz"] .sl-img, .sl-fig[style*="--imgz"] svg { width: var(--imgz) !important; height: auto !important; max-width: 100% !important; max-height: 100% !important; }
.sl-table.sl-nohead tr:first-child > * { font-weight: inherit; background: transparent; border-bottom-width: 1px; }
.sl-table { border-collapse: collapse; }
.sl-table td, .sl-table th { border: 1px solid #0003; padding: .25em .6em; }
.tbe-wrap { max-height: 50vh; overflow: auto; border: 1px solid var(--rule); border-radius: 8px; }
.tbe { border-collapse: collapse; min-width: 100%; }
.tbe td { border: 1px solid #c9c2ad; min-width: 90px; padding: 6px 8px; background: #fff; color: #1f2937; outline: none; }
.tbe td:focus { box-shadow: inset 0 0 0 2px #1a73e8; }
.tbe td.h { background: #eef2e4; font-weight: 700; }
.tbe-head { display: inline-flex !important; gap: 6px; align-items: center; width: auto !important; font-size: .9rem; }
.tbe-head input { width: auto !important; margin: 0 !important; }
.sle-picbar { display: inline-flex; gap: 6px; align-items: center; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 4px 10px; color: var(--ink); }
.sle-picbar button { border: 1px solid var(--rule); background: var(--paper); border-radius: 6px; min-width: 28px; cursor: pointer; font: inherit; }
/* v479 pop-ups opened from Edit slides show above it (picture place, table) */
body:has(#sle-ov) #fg-popup { z-index: 9700; }
body:has(#sle-ov) #fg-popup .modal-card { max-width: min(900px, 94vw); max-height: 88vh; }
.sl-stage .sl-ol { padding-left: 0 !important; } .sl-stage .sl-ol li { list-style-position: inside; }
/* v481 📱 Grades tables for students / parents: zoom, Fit, Full screen (turns sideways on a phone) */
.stt-box { margin-top: 6px; }
.stt-bar, .stt-ovbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.stt-bar button, .stt-ovbar button { border: 1px solid var(--rule); background: var(--card); color: var(--ink); font: inherit; font-weight: 700; border-radius: 8px; padding: 5px 11px; cursor: pointer; min-width: 36px; }
.stt-pct { min-width: 3.2em; text-align: center; }
.stt-view { overflow: hidden; position: relative; }
.stt-inner { transform-origin: 0 0; }
.stt-ov { position: fixed; inset: 0; z-index: 9100; background: var(--paper, #f7f3e8); display: flex; flex-direction: column; }
.stt-ovbar { padding: 8px 10px; margin: 0; border-bottom: 1px solid var(--rule); background: var(--card); }
.stt-stage { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 6px; min-height: 0; }
.stt-scale { transform-origin: center center; background: var(--card); }
.stt-rot { display: none; text-align: center; padding: 6px 12px 12px; }
@media (orientation: portrait) and (max-width: 700px) { .stt-rot { display: block; } }

/* v484 sections above the count; ☑ Tick all · ☐ Untick all inside the table, after "Name" */
.pk-bar2 { justify-content: flex-start; margin-bottom: 6px; }
.pk-nameh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pk-nameh .pk-ticks { margin-left: 14px; display: inline-flex; gap: 6px; }
.pk-nameh .pk-ticks .btn-small { margin: 0; padding: 3px 9px; font-size: .78rem; min-height: 0; font-weight: 600; white-space: nowrap; }

/* v486 Attendance Summary → All months: one table, a column pair per month */
.att-all-table th, .att-all-table td { text-align: center; white-space: nowrap; }
.att-all-table .att-name-col { text-align: left; }
.att-all-table .att-all-p { font-weight: 600; color: #2c6a2c; }
.att-all-table .att-all-a { color: #b3261e; }

/* v488 Attendance Summary → All months: Status (20% absences) */
.att-all-table .att-st { font-weight: 600; white-space: nowrap; text-align: left; }
.att-st-green { color: #2c6a2c; }
.att-st-amber { color: #8a5a00; background: #fdf1d6; }
.att-st-red { color: #b3261e; background: #fde7e4; }

/* v493 FlashGrade 🔗 Merge note on a row */
.fg-merge-note { margin: 4px 0 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fg-merge-note .fg-unmerge { padding: 2px 10px; font-size: .78rem; min-height: 0; }

/* v495 Grade Sheet: tappable ⚡ column names + the short note */
th.gs-src { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
th.gs-src:hover { background: #efe6c6; }
.gs-more { border: 1px solid var(--line, #c9c2a8); background: transparent; border-radius: 999px; padding: 1px 10px; font: inherit; font-size: .78rem; cursor: pointer; color: inherit; margin-left: 4px; }

/* v496 / v501 🧩 Tile notes: shown inside the tile, covering its picture (computers only) */
.tn-host { position: relative; }
.tile-flip { position: absolute; inset: 0; z-index: 3; border-radius: inherit; background: var(--card, #f3efe4); display: flex; flex-direction: column; gap: 3px; padding: 5% 6% 6%; pointer-events: none; animation: tnflip .25s ease-out; overflow: hidden; text-align: left; color: #34421c; white-space: normal; text-transform: none; letter-spacing: 0; }
@keyframes tnflip { from { opacity: 0; transform: rotateY(70deg); } to { opacity: 1; transform: none; } }
.tf-title { flex: 0 0 auto; display: block; text-align: center; font-size: clamp(.8rem, 1.15vw, 1.05rem); font-weight: 800; line-height: 1.15; color: #2f3a1c; border-bottom: 1px solid #c9c2a8; padding-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-grid { flex: 1 1 0; min-height: 0; display: grid; grid-template-columns: repeat(var(--tn-cols, 3), minmax(0, 1fr)); grid-template-rows: repeat(var(--tn-rows, 2), minmax(0, 1fr)); gap: 4px; }
.tf-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; min-height: 0; }
.tf-ic { flex: 1 1 0; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; font-size: clamp(1.2rem, 2.4vw, 2.2rem); line-height: 1; }
.tf-ic img { max-width: 100%; max-height: 100%; width: auto !important; height: auto !important; object-fit: contain; }
.tf-t { flex: 0 0 auto; font-size: clamp(.6rem, .85vw, .82rem); font-weight: 600; line-height: 1.1; text-align: center; color: #34421c; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; max-width: 100%; }
.tf-list { margin: 4px 0 0; padding-left: 1.15em; font-size: clamp(.8rem, 1.2vw, 1.1rem); font-weight: 600; line-height: 1.25; }
.tf-list li { margin: 0; }
.tf-text { margin: auto 0; font-size: clamp(.8rem, 1.15vw, 1.05rem); font-weight: 600; line-height: 1.3; text-align: center; }

/* v501 🔢 Step numbers and notes in the task editors */
.stp { display: inline-flex; align-items: center; justify-content: center; width: 1.45em; height: 1.45em; border-radius: 50%; background: #5a6b2a; color: #fff; font-size: .78rem; font-weight: 800; line-height: 1; margin-right: 6px; vertical-align: middle; cursor: help; flex: 0 0 auto; user-select: none; }
.stp.stp-btn { margin-right: -4px; align-self: center; }
.stp-off .stp, .stp-off .stp-head, .stp-off .stp-last { display: none !important; }
.stp-host { cursor: help; }
.stp-head { font-weight: 700; margin-bottom: 6px; }
.stp-last { margin-top: 10px; }
.stp-tip { position: fixed; z-index: 9000; max-width: 300px; background: #2f3a1c; color: #fff; border-radius: 12px; padding: 9px 13px; font-size: .88rem; line-height: 1.35; box-shadow: 0 8px 24px #0004; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.stp-tip.on { opacity: 1; transform: none; }
.stp-tip b { display: block; font-size: .8rem; opacity: .85; margin-bottom: 2px; }
.stp-switch { display: flex; gap: 8px; align-items: center; cursor: pointer; }

/* v497 ＋ Add PETA (up to 5 per term) */
.task-card.pt-add { border-style: dashed; cursor: pointer; opacity: .85; font: inherit; color: inherit; }
.task-card.pt-add:hover { opacity: 1; }

/* v498 Assignment item formats: the type picker, the student's item screens, the teacher's To check list */
.asg-type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; max-height: 60vh; overflow: auto; }
.asg-type-btn { display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line, #c9c2a8); background: transparent; border-radius: 12px; padding: 8px 12px; font: inherit; color: inherit; cursor: pointer; }
.asg-type-btn:hover { background: #efe6c6; }
.asg-type-btn .at-ic { font-size: 1.4rem; width: 30px; text-align: center; }
.asg-type-btn small { display: block; font-size: .78rem; opacity: .8; }
.asg-it-type { text-align: center; font-size: .82rem; opacity: .75; margin: 4px 0; }
.asg-it-hint { text-align: center; margin: 4px 0; }
.asg-it-row { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 10px 0; }
.asg-it-in { font: inherit; font-size: 1.05rem; padding: 8px 10px; border: 2px solid var(--line, #c9c2a8); border-radius: 10px; background: #fff; color: #1f2937; min-width: 0; }
.asg-it-unit { font-weight: 600; }
.asg-it-blanks { line-height: 2.2; }
.asg-it-blank { width: 130px; padding: 4px 8px; margin: 0 4px; text-align: center; }
.asg-mu.picked { background: #e3ecc9; border-color: #4a5a28; }
.asg-it-match { display: flex; flex-direction: column; gap: 8px; max-width: 640px; margin: 10px auto; }
.asg-it-mrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; align-items: center; }
.asg-it-mrow select { font: inherit; padding: 8px; border-radius: 10px; border: 2px solid var(--line, #c9c2a8); max-width: 100%; }
.asg-it-order { display: flex; flex-direction: column; gap: 6px; max-width: 640px; margin: 10px auto; }
.asg-it-orow { display: grid; grid-template-columns: 30px minmax(0, 1fr) 40px 40px; gap: 6px; align-items: center; border: 1px solid var(--line, #c9c2a8); border-radius: 10px; padding: 6px 8px; background: #fff; color: #1f2937; }
.asg-it-orow button { border: 1px solid var(--line, #c9c2a8); background: #f4f0e2; border-radius: 8px; padding: 6px 0; cursor: pointer; }
.asg-it-on { font-weight: 700; text-align: center; }
.asg-it-table { margin: 10px auto; width: auto; }
.asg-it-table input { width: 120px; text-align: center; }
.asg-it-step { max-width: 680px; margin: 8px auto; text-align: left; }
.asg-it-step label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 2px; }
.asg-it-step textarea, .asg-it-essay { width: 100%; font: inherit; padding: 8px 10px; border: 2px solid var(--line, #c9c2a8); border-radius: 10px; background: #fff; color: #1f2937; box-sizing: border-box; }
.asg-it-step input { width: 100%; box-sizing: border-box; }
.asg-it-ans { font-weight: 500; margin-top: 4px; color: #1f2937; }
.asg-check-box { border: 2px solid #c9a227; border-radius: 12px; padding: 8px 12px; margin: 0 0 12px; background: #fdf8e6; color: #1f2937; }
.asg-check-box > summary { cursor: pointer; font-size: 1rem; }
.asg-chk { border-top: 1px solid #e3d9b0; padding: 10px 0; }
.asg-chk-q { font-size: .88rem; opacity: .85; margin: 2px 0 6px; }
.asg-chk-a { background: #fff; border: 1px solid #e3d9b0; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; overflow-wrap: anywhere; }
.asg-chk-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.asg-chk-row .btn-small { padding: 4px 12px; min-height: 0; margin: 0; }
.asg-chk-note { flex: 1 1 200px; font: inherit; padding: 5px 8px; border: 1px solid #c9c2a8; border-radius: 8px; }
.asg-steps-view { margin: 0 0 4px; padding-left: 22px; }
.asg-link { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.asg-link-note { font-size: .85rem; padding: 4px 10px; border-radius: 999px; }
.asg-link-note.ok { background: #e3f1dc; color: #23551f; }
.asg-link-note.warn { background: #fdecc8; color: #7a4b00; }

/* v499 Performance Tasks: essay / link answers and the checklist table */
.perf-ck-table th, .perf-ck-table td { vertical-align: middle; }
.perf-ck-table input.perf-ck { width: 22px; height: 22px; cursor: pointer; }
.asg-essay-view { white-space: normal; max-width: 420px; }

/* v500 👥 Peer rating: the task settings, the student's list, the teacher's table */
.perf-peer-set { margin: 6px 0 0 26px; display: flex; flex-direction: column; gap: 6px; }
.perf-peer-sec { border: 1px solid var(--line, #c9c2a8); border-radius: 10px; padding: 8px 10px; margin-top: 6px; }
.perf-peer-sech { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.perf-peer-g { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pp-chip { display: inline-flex; gap: 4px; align-items: center; border: 1px solid var(--line, #c9c2a8); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: .82rem; background: #fff; color: #1f2937; }
.pp-chip select { border: 0; background: transparent; font: inherit; font-size: .78rem; padding: 0; max-width: 84px; }
.peer-list { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.peer-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 2px solid var(--line, #c9c2a8); border-radius: 12px; padding: 12px 14px; background: #fff; color: #1f2937; font: inherit; cursor: pointer; text-align: left; }
.peer-row em { font-style: normal; font-weight: 600; color: #4a5a28; white-space: nowrap; }
.peer-row.done { border-color: #9bbf8a; background: #f1f8ec; }

/* v502 Lesson slides: one text size (35 on a wide PowerPoint slide) and 8 lines; the text area is the same with or without the season box */
.sl.sl-fix { font-size: 3.646cqw; line-height: 1.2; }
.sl-fix .sl-head { margin-bottom: .9cqw; }
.sl-stage:not(.sl-hasfx) > .sl.sl-fix { padding: 8cqw 9.6cqw 7.6cqw; }
.sl-fix .sl-steps-t { font-size: 1.6cqw; margin: -.5cqw 0 .4cqw; }
.sl-fix .sl-ol li { margin: 0; }
.sl-fix .sl-math { display: inline; }
.sl-fix .sl-prob { margin-bottom: .3cqw; }
.sl-fix .sl-ans { margin-top: .2cqw; }
.sl-x { align-items: center; justify-content: center; text-align: center; gap: 1.2cqw; }
.sl-x .slx-date { font-size: 2.2cqw; opacity: .7; }
.sl-x .slx-big { font: 800 5.4cqw/1.15 Georgia, serif; }
.sl-x .slx-sub { font-size: 2.4cqw; opacity: .8; }
.sl-x .slx-names { font-size: 3.2cqw; font-weight: 600; line-height: 1.35; }
.sl-x .slx-seat { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.sl-x .slx-seat svg { width: 100%; height: 100%; }
.sld-parts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 10px; }
.sld-parts label { display: inline-flex; gap: 5px; align-items: center; cursor: pointer; }
.sld-parts label.off { opacity: .5; cursor: default; }
.sl-shot .tq-sl { padding-bottom: 6.5cqw; }

/* v503 rows of at most 40 characters, a formula-only row centered, the repeated problem of a Step Guide in grey italics */
.sl-row { display: block; max-width: 100%; }
.sl-row-c { text-align: center; }
.sl-stage .sl-row { overflow: hidden; }
.sl-prob-cont { color: #8a8f98; font-style: italic; font-weight: 500; }
.sl-fix .sl-below > .sl-text { max-height: 50%; flex: 0 0 auto; }
.sl-prob-cont .sl-row, .sl-prob-cont { padding-right: .25em; }
.sl-fix .sl-fbig { max-width: 100%; font-size: 1.5em; }
.sl-fix .sl-formula { min-width: 0; }

/* ---------- v504 Teach Screen ---------- */
/* title slide: bigger small lines (28 on the 35 ruler), the lesson title in the term's color */
.sl-title .sl-kicker, .sl-title .sl-sub { font-size: 2.92cqw; }
.sl-title.sl-term1 h1 { color: #556b2f; } .sl-title.sl-term2 h1 { color: #191970; } .sl-title.sl-term3 h1 { color: #800000; }
.sl-darkbg .sl-title.sl-term1 h1, .sl-dark .sl-title.sl-term1 h1, body.ts-th-charcoal .sl-stage:not([style*="color"]) .sl-title.sl-term1 h1 { color: #c5d98a; }
.sl-darkbg .sl-title.sl-term2 h1, .sl-dark .sl-title.sl-term2 h1, body.ts-th-charcoal .sl-stage:not([style*="color"]) .sl-title.sl-term2 h1 { color: #a9b8ff; }
.sl-darkbg .sl-title.sl-term3 h1, .sl-dark .sl-title.sl-term3 h1, body.ts-th-charcoal .sl-stage:not([style*="color"]) .sl-title.sl-term3 h1 { color: #ffa3a3; }
/* Mastery / Check / Wellness choices: a bigger letter circle in the upper-left corner */
.tq-c { position: relative; padding: 1.4cqw 1.4cqw 1.2cqw 5.4cqw !important; align-items: center; }
.tq-c b { position: absolute; left: .9cqw; top: .9cqw; width: 3.5cqw !important; height: 3.5cqw !important; font-size: 2cqw !important; font-weight: 800; line-height: 1 !important; display: grid !important; place-items: center; }
.wl-c { cursor: default; } .wl-c span { flex: 1; outline: none; }
.wl-n { flex: none; font-style: normal; font-weight: 800; font-size: 1.3em; min-width: 2.2em; text-align: center; padding: .1em .35em; border-radius: .5em; background: #4a5a28; color: #fff; }
#wl-q { outline: none; }
.wl-log { border-top: 1px solid var(--rule); padding: 8px 0; } .wl-log ul { margin: 4px 0 0; padding-left: 20px; }
/* Greeting */
.ts-hi-big .ts-date, .ts-hi-big .ts-sub { font-size: 2.5vw; }
.ts-hi-big .ts-secs { gap: 1vw; margin-top: 3vh; } .ts-hi-big .ts-secs .chip { font-size: 2.7vw; padding: .5vw 2vw; border-radius: 999px; cursor: pointer; font-family: inherit; }
.ts-hi-big .ts-secs .chip.active { background: #4a5a28; color: #fff; border-color: transparent; }
/* no page scrolling while a part fits the screen */
html.ts-noscroll, html.ts-noscroll body { overflow: hidden !important; }
/* Cleaners: the sheet is scaled to the page */
body.ts-clean .content { zoom: 1 !important; padding: 0 !important; }
body.ts-clean .tbl-tools, body.ts-clean .tbl-hint, body.ts-clean .tbl-cardnav { display: none !important; }
body.ts-clean .sp-table-wrap, body.ts-clean .tbl-wrap, body.ts-clean .tbl-box { max-height: none !important; overflow: visible !important; }
body.ts-clean #setup-clean-view { margin: 0 auto !important; padding: 6px 0 0 !important; }
/* Skill: a 5-level game in three columns */
body.ts-game .ar-play-side { display: none !important; }
body.ts-game #panel-practice, body.ts-game #arcade-play-view, body.ts-game #arcade-play-wrap { display: block !important; padding: 0 !important; margin: 0 !important; max-width: none !important; width: 100% !important; }
body.ts-game .content:has(.sg-ts) { zoom: 1 !important; padding: 52px 0 0 !important; max-width: none !important; }
body.ts-game .fx-head:has(+ #sg-root .sg-ts), body.ts-game .sg-ts .sg-timer, body.ts-game .sg-ts .sg-modes, body.ts-game .sg-ts .sg-back { display: none !important; }
body.ts-game .sg.sg-ts { max-width: none; width: 100%; margin: 0; display: grid; grid-template-columns: 18% 64% 18%; overflow: hidden; }
.sg-ts .sg-left, .sg-ts .sg-right { padding: .9vw; display: flex; flex-direction: column; min-height: 0; }
.sg-ts .sg-ladder { display: flex; flex-direction: column; gap: .75vw; flex: 1; margin: 0; min-height: 0; }
.sg-ts .sg-step { flex: 1 1 0; min-height: 0; flex-direction: row; justify-content: flex-start; align-items: center; gap: .7vw; padding: 0 1vw; border-radius: .9vw; border-width: 3px; }
.sg-ts .sg-step-ic { font-size: 2vw; line-height: 1; } .sg-ts .sg-step-l { font-size: 1.3vw; font-weight: 800; flex: 1; text-align: left; }
.sg-ts .sg-step-dots { display: flex; gap: .36vw; } .sg-ts .sg-step-dots i { width: .86vw !important; height: .86vw !important; }
.sg-ts .sg-top { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: .75vw; flex: 1; margin: 0; min-height: 0; }
.sg-ts .sg-top > * { flex: 1 1 0; min-height: 0; display: flex; align-items: center; justify-content: center; font-size: 1.7vw; border-radius: .9vw; }
.sg-ts .sg-mid { min-width: 0; min-height: 0; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; padding-top: 6px; }
.sg-ts .sg-mid-in { width: 620px; flex: none; transform-origin: top center; }
.sg-ts .sg-top > * { margin: 0 !important; align-self: stretch; width: auto; }
.sg-ts .sg-top > .hidden { display: none !important; }
/* v635 Teach Screen: side columns about 2/3 as wide (18% · 64% · 18%); the question text 1.5x bigger */
.sg-ts .sg-step { gap: .5vw; padding: 0 .7vw; } .sg-ts .sg-step-l { font-size: 1.12vw; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sg-ts .sg-step-ic { font-size: 1.8vw; } .sg-ts .sg-step-dots { flex: none; } .sg-ts .sg-step-dots i { width: .7vw !important; height: .7vw !important; }
.sg-ts .sg-card .sg-prompt { font-size: 1.62rem; line-height: 1.35; }
/* v636 Teach Screen: the middle fills its width (no fixed 620px); words left · picture right; choices 2 x 2; the Hint and explanation on the right */
.sg-ts .sg-prompt.sg-tsp { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: center; }
.sg-ts .sg-tsp-t { min-width: 0; }
.sg-ts .sg-tsp-f { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.sg-ts .sg-tsp-f > * { max-width: 100%; margin-left: auto; margin-right: auto; }
.sg-ts .sg-tsp-f svg:not(.katex svg) { max-width: 100%; height: auto; }
.sg-ts .gx-opts.sg-ts-grid .gx-opt { font-size: 1.3rem; min-height: 64px; padding: 12px 10px 12px 28px; }
.sg-ts .gx-opts.sg-ts-grid .gx-opt i { font-size: .75rem; }
.sg-ts .sg-right { gap: .75vw; }
.sg-ts .sg-top { flex: none; }
.sg-ts .sg-top > * { flex: none; padding: .55vw .6vw; }
.sg-ts .sg-tsx { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; gap: .6vw; overflow: auto; background: #fff; color: #263238; border: 3px solid #FFE082; border-radius: .9vw; padding: .8vw; }
.sg-ts .sg-tsx-hint:empty { display: none; }
.sg-ts .sg-tsx .sg-hint { width: 100%; font-size: max(13px, 1.1vw); padding: .5vw .8vw; }
.sg-ts .sg-tsx .sg-fb { margin: 0; min-height: 0; line-height: 1.35; overflow-wrap: anywhere; }
.sg-ts .sg-tsx .sg-fb:empty { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; }
.sg-ts .sg-tsx .sg-fb:empty::before { content: 'Explanation shows here'; opacity: .4; font-style: italic; }
.sg-ts .sg-tsx .sg-explain, .sg-ts .sg-tsx .sg-hint-box { font-size: 1em; }
.sg-ts .sg-tsx .sg-fb img, .sg-ts .sg-tsx .sg-fb svg:not(.katex svg), .sg-ts .sg-tsx .sg-fb table { max-width: 100%; height: auto; }
.sg-ts:has(.sg-card.hidden) .sg-tsx { visibility: hidden; }
html[data-theme="dark"] .sg-ts .sg-tsx { background: #1e2530; color: #e8eef5; border-color: #8d7a2e; }

/* ---------- v505 ---------- */
.pk-list-bar .pk-opts { margin-left: auto; display: inline-flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pk-list-bar .pk-opts .pk-norep { margin-left: 0; }
/* Teach Screen bar: icons only; the name shows on hover, on a long press, and on the open part */
#ts-bar .ts-tabs button { padding: 6px 9px; gap: 0; }
#ts-bar .ts-tabs button span { font-size: 1.55rem; line-height: 1; }
#ts-bar .ts-tl { font-style: normal; max-width: 0; overflow: hidden; opacity: 0; white-space: nowrap; transition: max-width .2s ease, opacity .2s ease, margin .2s ease; }
#ts-bar .ts-tabs button.on .ts-tl, #ts-bar .ts-tabs button.peek .ts-tl { max-width: 14em; opacity: 1; margin-left: 7px; }
@media (hover: hover) { #ts-bar .ts-tabs button:hover .ts-tl { max-width: 14em; opacity: 1; margin-left: 7px; } }
.ts-tabs { flex-wrap: nowrap; }
/* typed slides: Objectives, Ways Forward, Reminders */
.tn-sl .sl-head { font-size: 2.2cqw; font-weight: 800; }
.tn-text { outline: none; white-space: pre-wrap; overflow: hidden; height: 100%; cursor: text; }
.tn-sl .sl-body { flex: 1; min-height: 0; } .tn-sl .sl-text { flex: 1; min-height: 0; }
/* Tasks & Links */
.tl-sl { padding: 3.4cqw 4cqw 3cqw; display: flex; flex-direction: column; }
.tl-sl .sl-head { font-size: 2.2cqw; font-weight: 800; }
.tl-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 58% 1fr; gap: 3cqw; }
.tl-col { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.tl-h { font-size: 2.4cqw; font-weight: 800; margin-bottom: .8cqw; }
.tl-note { font-size: 2cqw; opacity: .7; }
.tl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6cqw; }
.tl-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 1cqw; align-items: center; font-size: 2.2cqw; padding: .7cqw 1cqw; border: 1px solid #0002; border-radius: 1cqw; background: #ffffff66; }
.tl-list .tl-t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tl-list .tl-d { font-size: 1.7cqw; opacity: .8; white-space: nowrap; }
.tl-list li.late .tl-d { color: #b3261e; font-weight: 700; }
.tl-chim { margin-top: auto; display: flex; align-items: center; gap: 1.4cqw; font-size: 1.8cqw; padding-left: 9cqw; }
.tl-qr { background: #fff; padding: .4cqw; border-radius: .6cqw; } .tl-chim .tl-qr { width: 9cqw; height: 9cqw; }
.tl-links { flex: 1; min-height: 0; display: grid; gap: 1.2cqw; grid-template-columns: 1fr 1fr; } .tl-links.n1 { grid-template-columns: 1fr; }
.tl-link { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5cqw; min-height: 0; text-align: center; }
.tl-link .tl-qr { width: auto; height: auto; max-width: 100%; max-height: calc(100% - 4.2cqw); aspect-ratio: 1; flex: 1 1 0; min-height: 0; object-fit: contain; }
.tl-link a { font-size: 1.8cqw; font-weight: 700; color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
/* v512 Tasks & Links: the list on the left half, the QR code of the clicked item on the right half */
.tl-sl .tl-body { grid-template-columns: 1fr 1fr; gap: 3cqw; }
.tl-left { --tl-k: 1; display: flex; flex-direction: row; align-items: stretch; gap: 1.6cqw; overflow: hidden; font-size: calc(var(--tl-k) * 1cqw); }
.tl-left .tl-c { flex: 1 1 0; min-width: 0; min-height: 0; overflow: hidden; }
.tl-left .tl-c:empty { display: none; }
.tl-grp { margin-bottom: 1.1em; }
.tl-left .tl-h { font-size: 2.1em; margin-bottom: .4em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-left .tl-note { font-size: 1.6em; }
.tl-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .7em; align-items: center; width: 100%; text-align: left; font: inherit; font-size: 1.9em; color: inherit; padding: .35em .7em; margin: 0 0 .35em; border: 1px solid #0002; border-radius: .6em; background: #ffffff66; cursor: pointer; }
.tl-item:hover { border-color: #4a5a28; }
.tl-item.on { background: #4a5a28; color: #fff; border-color: #4a5a28; }
.tl-item .tl-tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.tl-item .tl-t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tl-item .tl-d { font-size: .72em; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-item.late .tl-d { color: #b3261e; font-weight: 700; } .tl-item.on.late .tl-d { color: #ffd2cc; }
.tl-item .tl-x { font-size: .8em; opacity: 0; padding: 0 .3em; } .tl-item:hover .tl-x { opacity: .7; }
.tl-right { display: flex; align-items: center; justify-content: center; }
.tl-qrbox { display: flex; flex-direction: column; align-items: center; gap: 1cqw; width: 100%; height: 100%; min-height: 0; text-align: center; }
.tl-qrwrap { position: relative; display: block; flex: 1 1 0; min-height: 0; aspect-ratio: 1; max-width: 100%; }
.tl-bigqr { display: block; width: 100%; height: 100%; background: #fff; border-radius: 1cqw; }
.tl-qrwrap .cert-qr-logo { left: 39%; top: 39%; width: 22%; height: 22%; padding: 1.5%; border: 2px solid #2E9E58; }
.tl-qt { font-size: 2.3cqw; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-qs { font-size: 1.6cqw; opacity: .75; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* v512 the Teach Screen covers the whole page above its bar at any text size; the page under it is hidden */
.ts-panel { --ts-pz: var(--ts-z, 1.15); bottom: calc(var(--ts-barh, 56px) / var(--ts-pz)); }
.ts-panel.sl-wrap, .ts-panel.tss-wrap { --ts-pz: 1; }
body.ts-on:has(#ts-panel) .app-shell .content { visibility: hidden; }
.tl-link button { position: absolute; top: 0; right: 0; border: 0; background: #0001; border-radius: 50%; width: 2.4cqw; height: 2.4cqw; font-size: 1.2cqw; cursor: pointer; opacity: 0; } .tl-link:hover button { opacity: 1; }

/* v506 🧰 math tools on the Teach Screen */
.ts-tools-menu { position: fixed; z-index: 9550; background: #1b2540; border: 2px solid #f5a00c; border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 12px 34px rgba(0,0,0,.45); }
.ts-tools-menu button { font: inherit; font-weight: 700; color: #fff; background: transparent; border: 0; border-radius: 10px; padding: 8px 14px 8px 8px; display: flex; align-items: center; gap: 10px; cursor: pointer; text-align: left; white-space: nowrap; min-height: 46px; }
.ts-tools-menu button:hover { background: #ffffff1f; }
.ts-tools-menu img { width: 34px; height: 34px; border-radius: 8px; background: #fff; }
body.ts-on .calc-panel { z-index: 9560; bottom: 76px; }
/* ================= v514 Teach Screen in ILAW order ================= */
/* the bar: 6 phases; the open phase shows its parts */
#ts-bar .ts-tabs { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; }
#ts-bar .ts-ph { display: inline-flex; align-items: center; gap: 2px; border-radius: 12px; flex: 0 0 auto; }
#ts-bar .ts-ph.on { background: #ffffff14; padding-right: 4px; }
#ts-bar .ts-ph.on > button { background: #4a5a28; }
#ts-bar .ts-ph.on > button .ts-tl { max-width: 0; opacity: 0; margin: 0; } /* the parts say where you are */
#ts-bar .ts-parts { display: inline-flex; gap: 2px; align-items: center; }
#ts-bar .ts-chip { padding: 5px 9px; font-size: .92rem; font-weight: 700; opacity: .8; border-radius: 9px; }
#ts-bar .ts-chip i { font-style: normal; font-size: 1.15rem; line-height: 1; }
#ts-bar .ts-chip b { font-weight: 700; }
#ts-bar .ts-chip.on { opacity: 1; background: #ffffff2e; box-shadow: inset 0 -3px 0 #a7c957; }
#ts-bar.tight .ts-chip:not(.on) b { display: none; } /* a narrow screen: the icons, and the name of the open part */
#ts-bar.tight .ts-chip.peek b { display: inline; }
@media (hover: hover) { #ts-bar.tight .ts-chip:hover b { display: inline; } }
#ts-bar .ts-right { flex: 0 0 auto; flex-wrap: nowrap; }
/* ◀ ▶ belong to the Teach Screen now (they step pages, then parts, then phases) */
body.ts-on #ts-panel .sl-nav { display: none; }
#ts-fnav.hidden { display: none; }
#ts-fnav.faint .sl-nav { opacity: .35; width: 34px; } #ts-fnav.faint .sl-nav:hover { opacity: 1; }
#ts-fnav .sl-nav.flow-end { opacity: .25; }
/* 🚦 Classroom Signals */
.ts-sig { width: 100%; text-align: center; padding: 2vh 3vw; }
.ts-sig-h { font: 800 clamp(2rem, 5vw, 4.6rem)/1.1 Georgia, serif; color: #e08a2c; margin-bottom: 5vh; }
.ts-sig-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3vw; }
.ts-sig-c { display: flex; flex-direction: column; align-items: center; gap: 1.2vh; }
.ts-sig-i { font-size: clamp(3rem, 9vw, 9rem); line-height: 1; font-weight: 900; }
.ts-sig-c b { font-size: clamp(1.2rem, 2.6vw, 2.6rem); letter-spacing: .04em; }
.ts-sig-c span { font-size: clamp(.9rem, 1.5vw, 1.5rem); opacity: .75; max-width: 18em; }
.ts-sigov { position: fixed; inset: 0; z-index: 9700; background: #fbf6eaf7; color: #1f2937; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3vh; cursor: pointer; }
body.ts-th-charcoal .ts-sigov { background: #23272ef7; color: #eef0f3; }
/* 👋 the teacher's name on the Greeting */
.ts-me { font-size: clamp(1rem, 2vw, 2rem); font-weight: 700; margin-top: 1vh; outline: none; min-height: 1.2em; }
.ts-me.empty::before { content: attr(data-ph); opacity: .35; font-weight: 400; font-size: .8em; }
/* ✍️ slides you type */
.ts-panel.sl-wrap .sl-bar #td-file { display: none; }
.sl.td-sl { padding: 4.2cqw 5.4cqw 4cqw; font-size: 2.9cqw; line-height: 1.3; }
.td-title { font: 800 4.2cqw/1.15 Georgia, serif; color: var(--sla, #e08a2c); margin-bottom: 2cqw; outline: none; min-height: 1em; }
.td-body { flex: 1; min-height: 0; display: flex; gap: 2.4cqw; }
.td-text { outline: none; white-space: pre-wrap; overflow: hidden; cursor: text; min-width: 0; }
.td-text:empty::before { content: attr(data-ph); opacity: .35; }
.td-pics { min-width: 0; min-height: 0; display: grid; gap: 1.2cqw; grid-template-columns: repeat(var(--tdc, 1), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); }
.td-pics.n2 { --tdc: 2; } .td-pics.n3, .td-pics.n4 { --tdc: 2; } .td-pics.n5, .td-pics.n6 { --tdc: 3; } .td-pics.n7, .td-pics.n8, .td-pics.n9 { --tdc: 3; }
.td-pic { position: relative; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; }
.td-pic img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: .8cqw; display: block; }
.td-x { position: absolute; top: 2px; right: 2px; border: 0; border-radius: 50%; width: 2.6cqw; height: 2.6cqw; min-width: 22px; min-height: 22px; background: #000a; color: #fff; font-size: 1.2cqw; cursor: pointer; opacity: 0; transition: opacity .15s; }
.td-pic:hover .td-x, .td-lk:hover .td-x { opacity: 1; }
.lay-text .td-text { flex: 1; }
.lay-side .td-body { flex-direction: row; } .lay-side .td-text { flex: 1 1 55%; } .lay-side .td-pics { flex: 1 1 45%; }
.lay-below .td-body { flex-direction: column; } .lay-below .td-text { flex: 0 1 auto; max-height: 45%; } .lay-below .td-pics { flex: 1 1 0; grid-template-columns: repeat(var(--tdb, 3), minmax(0, 1fr)); }
.lay-below .td-pics.n1 { --tdb: 1; } .lay-below .td-pics.n2 { --tdb: 2; } .lay-below .td-pics.n4 { --tdb: 4; }
.lay-pics .td-pics { flex: 1; }
.td-center .td-title { text-align: center; } .td-center .td-text { text-align: center; } .td-center.lay-text .td-body { justify-content: center; }
.td-links { display: flex; flex-wrap: wrap; gap: 1.2cqw; margin-top: 1.4cqw; }
.td-lk { position: relative; }
.td-lb { border: 0; border-radius: 1cqw; background: #4a5a28; color: #fff; font: inherit; font-size: 2.2cqw; font-weight: 700; padding: .7cqw 2cqw; cursor: pointer; }
.td-timer { position: absolute; top: 2cqw; right: 2.4cqw; background: #232b3a; color: #fff; font-weight: 800; font-size: 2.6cqw; padding: .5cqw 1.6cqw; border-radius: 99px; font-variant-numeric: tabular-nums; }
.td-timer.done { background: #e2453c; font-size: 4cqw; top: 40%; right: 50%; transform: translate(50%, -50%); padding: 1cqw 4cqw; }
.td-timer.hidden { display: none; }
/* 🧰 Prepare → 🧭 Flow */
.pf-wrap { max-width: 1200px; }
.pf-phases { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.pf-ph { border: 1px solid var(--rule); border-radius: 12px; padding: 8px; background: var(--card); }
.pf-h { font-weight: 800; margin: 2px 4px 8px; }
.pf-row { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--rule); border-radius: 9px; margin-bottom: 5px; background: var(--paper); }
.pf-row.off { opacity: .5; } .pf-row.drag { opacity: .4; outline: 2px dashed #4a5a28; }
.pf-row label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.pf-grip { cursor: grab; opacity: .6; font-size: 1.1rem; }
.pf-mv { border: 1px solid var(--rule); background: transparent; border-radius: 6px; padding: 1px 7px; cursor: pointer; color: inherit; } .pf-mv:disabled { opacity: .3; cursor: default; }
.lay-side .td-pics.n2 { --tdc: 1; }
.td-center .td-body { flex-direction: column; justify-content: center; align-items: center; }
.td-center.lay-text { justify-content: center; } .td-center.lay-text .td-title { font-size: 5.4cqw; } .td-center.lay-text .td-text { flex: 0 1 auto; max-height: 100%; }
.td-center.lay-side .td-body { flex-direction: row; }
.pf-row { flex-wrap: nowrap; padding: 4px 8px; }
.pf-row label { display: flex !important; flex-direction: row !important; align-items: center; gap: 6px; margin: 0 !important; font-weight: 600; white-space: nowrap; min-width: 0; }
.pf-row input[type="checkbox"] { width: auto !important; height: auto; margin: 0 !important; flex: 0 0 auto; }
.pf-row .pf-mv { flex: 0 0 auto; margin: 0; }
/* ================= v515 Release 2 ================= */
/* 🎟️ Exit Ticket results */
.sl.ex-sl { padding: 3.4cqw 4.4cqw 3.4cqw; font-size: 1.9cqw; display: flex; flex-direction: column; gap: 2cqw; }
.ex-top { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.4cqw; }
.ex-stat { border: 1px solid #0001; border-radius: 1.2cqw; padding: 1.1cqw 1.2cqw; background: #f6f7f2; text-align: center; }
.ex-stat b { display: block; font-size: 3.6cqw; line-height: 1.1; } .ex-stat b small { font-size: .5em; opacity: .6; } .ex-stat span { font-size: 1.35cqw; opacity: .75; }
.ex-stat.ex-enh { background: #e5f3d6; } .ex-stat.ex-rem { background: #fde7d9; }
.ex-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.25fr 1fr; gap: 3cqw; }
.ex-col { min-height: 0; display: flex; flex-direction: column; gap: .8cqw; }
.ex-h { font-weight: 800; font-size: 2cqw; }
.ex-item { display: grid; grid-template-columns: 4cqw 1fr 5.2cqw; grid-template-rows: auto auto; column-gap: 1cqw; align-items: center; }
.ex-item b { font-size: 1.8cqw; } .ex-item em { font-style: normal; font-weight: 800; text-align: right; }
.ex-item small { grid-column: 2 / 4; display: flex; gap: 1.4cqw; font-size: 1.25cqw; opacity: .8; } .ex-item small i { font-style: normal; } .ex-item small i.key { font-weight: 800; color: #3f6212; }
.ex-track { height: 2.2cqw; background: #eef0ea; border-radius: 99px; overflow: hidden; } .ex-fill { display: block; height: 100%; border-radius: 99px; }
.ex-fill.hi, .ex-legend i.hi { background: #6aa84f; } .ex-fill.mid, .ex-legend i.mid { background: #f1b434; } .ex-fill.lo, .ex-legend i.lo { background: #e06650; }
.ex-legend { margin-top: auto; font-size: 1.25cqw; opacity: .8; display: flex; gap: .8cqw; align-items: center; } .ex-legend i { display: inline-block; width: 1.4cqw; height: 1.4cqw; border-radius: 3px; margin-left: .8cqw; }
.ex-dist { flex: 1; min-height: 0; display: flex; align-items: flex-end; gap: 1cqw; border-bottom: 2px solid #0002; padding-top: 2.4cqw; }
.ex-dcol { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.ex-dcol span { width: 100%; border-radius: .8cqw .8cqw 0 0; min-height: 2px; } .ex-dcol.enh span { background: #6aa84f; } .ex-dcol.rem span { background: #e8a07f; }
.ex-dcol em { font-style: normal; font-weight: 800; font-size: 1.7cqw; } .ex-dcol b { position: absolute; bottom: -2.6cqw; font-size: 1.6cqw; }
.ex-col .ex-sub, .ex-sub { font-size: 1.35cqw; opacity: .7; margin-top: 2.8cqw; }
.ex-empty { margin: auto; text-align: center; font-size: 2.6cqw; } .ex-empty .ex-big { font-size: 7cqw; } .ex-empty .ex-sub { margin-top: 1cqw; font-size: 1.7cqw; }
.ex-who { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; max-height: 60vh; overflow: auto; }
.ex-who-col h4 { margin: 4px 0 6px; } .ex-who-col > div { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; border-bottom: 1px dashed var(--rule); }
.ex-paper { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 14px; max-height: 58vh; overflow: auto; }
.ex-paper label { display: flex !important; flex-direction: row !important; align-items: center; justify-content: space-between; gap: 8px; margin: 0 !important; }
.ex-paper input { width: 70px !important; text-align: center; }
/* 🧭 Enhancement / Remediation badge */
.td-badge { align-self: flex-start; font-size: 1.9cqw; font-weight: 700; padding: .5cqw 1.6cqw; border-radius: 99px; background: #eef0ea; margin: -1cqw 0 1.4cqw; }
.td-badge.enh { background: #e5f3d6; color: #2f5d12; } .td-badge.rem { background: #fde7d9; color: #8a3b12; }
.td-center .td-badge { align-self: center; }
/* 🚦 Signals with cards */
.ts-sig-l { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; background: #232b3a; color: #fff; font-size: .7em; vertical-align: middle; }
.ts-sig-bar { width: 60%; height: 12vh; display: flex; align-items: flex-end; background: #0000000d; border-radius: 8px; overflow: hidden; margin-top: 1vh; }
.ts-sig-bar i { display: block; width: 100%; background: #4a5a28; border-radius: 8px 8px 0 0; }
.ts-sig-c:nth-child(2) .ts-sig-bar i { background: #3b82f6; } .ts-sig-c:nth-child(3) .ts-sig-bar i { background: #f1b434; } .ts-sig-c:nth-child(4) .ts-sig-bar i { background: #e2453c; }
.ts-sig-n { font-style: normal; font-weight: 800; font-size: clamp(1.4rem, 3vw, 3rem); }
.ts-sig-act { margin-top: 4vh; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
/* 🔗 Links: nothing chosen yet */
.tl-empty { margin: auto 0; font-size: calc(var(--tl-k, 1) * 1cqw); } .tl-empty .tl-note { margin-top: .6em; }
/* v515 CHIM's pop-ups open above the Teach Screen, 🧰 Prepare and the card scanner (they were behind them) */
body.ts-on #fg-popup, body:has(.ac-ov) #fg-popup { z-index: 9800; }
.ex-legend { margin-top: 1.4cqw; }
.ts-sig-bar { height: 9vh; }
.pf-row .pl-lab { flex: 1 1 auto; min-width: 0; white-space: normal; }
.pl-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.pl-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-t small { opacity: .65; font-weight: 400; }
#pl-n { align-self: center; }
/* ================= v516 Release 3 ================= */
/* icons only: 6 phases; the open one shows its part icons */
#ts-bar .ts-ph { background: transparent; padding: 0; }
#ts-bar .ts-ph > .ts-pb { padding: 6px 9px; }
#ts-bar .ts-ph.cur > .ts-pb { background: #4a5a28; }
#ts-bar .ts-ph.open { background: #ffffff14; padding-right: 4px; }
#ts-bar .ts-ph.open > .ts-pb { box-shadow: inset 0 -3px 0 #a7c957; }
#ts-bar .ts-chip { padding: 5px 7px; opacity: .75; }
#ts-bar .ts-chip i { font-size: 1.4rem; }
#ts-bar .ts-chip.on { opacity: 1; }
#ts-bar .ts-parts { animation: tsPartsIn .18s ease; } @keyframes tsPartsIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.ts-tip { position: fixed; z-index: 9900; pointer-events: none; background: #111827; color: #fff; font-weight: 700; font-size: .95rem; padding: 6px 12px; border-radius: 8px; box-shadow: 0 6px 18px #0005; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; white-space: nowrap; }
.ts-tip.on { opacity: 1; transform: none; }
.ts-tip::after { content: ''; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: #111827; }
/* 🧑‍🤝‍🧑 Activities: Rubric · Scoring · Feedback */
.sl.ta-sl { padding: 3.2cqw 4.2cqw 3.6cqw; font-size: 1.8cqw; display: flex; flex-direction: column; gap: 1.4cqw; overflow: hidden; }
.ta-h { font: 800 3.2cqw/1.1 Georgia, serif; color: var(--sla, #e08a2c); }
.ta-rub { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 1.6cqw; }
.ta-rub th, .ta-rub td { border: 1px solid #0002; padding: .9cqw; text-align: center; vertical-align: middle; }
.ta-rub thead th { background: #4a5a28; color: #fff; font-size: 1.9cqw; } .ta-rub thead th:first-child { width: 20%; }
.ta-rub tbody th { text-align: left; background: #f3f5ee; }
.ta-score { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.15fr 1fr; gap: 2.6cqw; }
.ta-left { min-width: 0; display: flex; flex-direction: column; gap: .8cqw; }
.ta-tab { width: 100%; border-collapse: separate; border-spacing: .5cqw; font-size: 1.6cqw; }
.ta-tab th { font-size: 1.35cqw; font-weight: 800; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.ta-tab tbody th { text-align: left; white-space: nowrap; }
.ta-cell { text-align: center; font-weight: 800; font-size: 2.2cqw; border-radius: .8cqw; padding: .5cqw 0; cursor: pointer; background: #eef0ea; }
.ta-cell.empty { color: #9aa; } .ta-cell:hover { outline: 2px solid #4a5a28; }
.ta-cell.v5 { background: #cfe8bd; } .ta-cell.v4 { background: #e3f1d6; } .ta-cell.v3 { background: #fbecc4; } .ta-cell.v2 { background: #fbdcc8; } .ta-cell.v1 { background: #f6c6bc; }
.ta-tot { text-align: center; font-weight: 800; font-size: 2.2cqw; } .ta-tot small { font-size: .55em; opacity: .6; }
.ta-note { font-size: 1.2cqw; opacity: .6; }
.ta-right { min-width: 0; display: flex; flex-direction: column; gap: .8cqw; }
.ta-gh { font-weight: 800; font-size: 1.7cqw; }
.ta-bars { flex: 1; min-height: 8cqw; display: flex; align-items: flex-end; gap: 1cqw; border-bottom: 2px solid #0002; padding-top: 2.4cqw; margin-bottom: 2.6cqw; }
.ta-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.ta-bar span { width: 100%; border-radius: .8cqw .8cqw 0 0; background: #ccd; min-height: 2px; } .ta-bar span.hi { background: #6aa84f; } .ta-bar span.mid { background: #f1b434; } .ta-bar span.lo { background: #e06650; }
.ta-bar em { font-style: normal; font-weight: 800; font-size: 1.6cqw; } .ta-bar b { position: absolute; bottom: -2.4cqw; font-size: 1.4cqw; }
.ta-avg { display: grid; grid-template-columns: 13cqw 1fr 4cqw; gap: 1cqw; align-items: center; font-size: 1.5cqw; }
.ta-avg b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ta-avg em { font-style: normal; font-weight: 800; text-align: right; }
.ta-avg.low b::after { content: ' ⬅ lowest'; color: #c2410c; font-size: .8em; }
.ta-fb { flex: 1; min-height: 0; display: grid; gap: 1.4cqw; grid-template-columns: repeat(2, 1fr); align-content: start; }
.ta-fb.n5, .ta-fb.n6, .ta-fb.n7, .ta-fb.n8, .ta-fb.n9 { grid-template-columns: repeat(3, 1fr); }
.ta-card { border: 1px solid #0002; border-radius: 1.2cqw; padding: 1.2cqw 1.5cqw; background: #f8f9f4; display: flex; flex-direction: column; gap: .6cqw; }
.ta-ch { display: flex; justify-content: space-between; font-size: 2cqw; } .ta-ch span { font-weight: 800; }
.ta-rate { font-size: 2.1cqw; font-weight: 800; } .ta-rate small { font-weight: 400; font-size: .6em; opacity: .7; }
.ta-tip { font-size: 1.6cqw; line-height: 1.3; }
.ta-pick { position: fixed; z-index: 9850; display: flex; gap: 4px; background: #232b3a; padding: 6px; border-radius: 12px; box-shadow: 0 8px 24px #0006; }
.ta-pick button { width: 46px; height: 46px; border: 0; border-radius: 9px; background: #ffffff1f; color: #fff; font: 800 1.3rem/1 system-ui; cursor: pointer; }
.ta-pick button.on, .ta-pick button:hover { background: #a7c957; color: #1f2937; }
.ta-edcard { max-width: 720px !important; }
.ta-edrow { border: 1px solid var(--rule); border-radius: 10px; padding: 8px; margin-bottom: 8px; }
.ta-edrow .sv-row input { flex: 1; font-weight: 700; }
.ta-edlv { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 6px; }
.ta-edlv label { display: flex !important; flex-direction: column !important; gap: 2px; margin: 0 !important; font-size: .85rem; } .ta-edlv input { width: 100% !important; }
.ta-ptb { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; border: 1px solid var(--rule); background: var(--card); border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; cursor: pointer; color: inherit; font: inherit; }
.ta-ptb:hover { border-color: #4a5a28; } .ta-ptb small { opacity: .7; }
.ta-gname { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; margin: 0 0 4px !important; } .ta-gname input { flex: 1; }
.ta-avg { grid-template-columns: 18cqw 1fr 4cqw; }
/* ================= v517 🎬 video on a typed slide ================= */
.td-vid { background: #000; border-radius: .8cqw; overflow: hidden; aspect-ratio: 16 / 9; max-height: 100%; max-width: 100%; align-self: center; justify-self: center; width: 100%; }
.td-pics.has-vid.n1 .td-vid { height: 100%; width: auto; }
.td-vid iframe, .td-vid video { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.td-vnote { color: #fff; text-align: center; font-size: 1.6cqw; padding: 2cqw; line-height: 1.4; }
.td-vnote .btn-small { margin-top: 1cqw; }
.td-vtools { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; z-index: 2; }
.td-vid:hover .td-vtools { opacity: 1; }
.td-vtools button { border: 0; border-radius: 8px; background: #000b; color: #fff; padding: 4px 8px; font-size: 1rem; cursor: pointer; }
.td-vtrim { position: absolute; left: 6px; top: 6px; background: #000b; color: #fff; font-size: .8rem; padding: 2px 8px; border-radius: 99px; z-index: 2; pointer-events: none; }
.td-vyt { position: absolute; right: 8px; bottom: 6px; color: #fff; font-size: .75rem; background: #000a; padding: 2px 8px; border-radius: 99px; text-decoration: none; opacity: 0; z-index: 2; } .td-vid:hover .td-vyt { opacity: 1; }
.td-vid.td-vfull { position: fixed !important; inset: 0 0 var(--ts-barh, 56px) 0; z-index: 9550; width: auto !important; height: auto !important; max-width: none; max-height: none; aspect-ratio: auto; border-radius: 0; }
.td-vback { position: absolute; top: 12px; left: 12px; z-index: 3; border: 0; border-radius: 99px; background: #fff; color: #111; font-weight: 800; padding: 8px 16px; cursor: pointer; box-shadow: 0 4px 14px #0006; }
.td-vid:fullscreen { width: 100vw !important; height: 100vh !important; max-width: none; max-height: none; border-radius: 0; aspect-ratio: auto; display: flex; align-items: center; justify-content: center; }
.td-vid .td-vback { display: none; } .td-vid:fullscreen .td-vback, .td-vid.td-vfull .td-vback { display: block; }
.td-pics.has-vid { align-items: center; }
.td-pics.has-vid .td-vid, .td-pics.has-vid.n1 .td-vid { width: 100%; height: auto; max-height: 100%; aspect-ratio: 16 / 9; }
/* ================= v518 🎨 Layout of a typed slide page ================= */
.sl.td-sl { font-size: calc(2.9cqw * var(--td-fs, 1) * var(--sl-fs, 1)); }
.td-text { line-height: var(--td-lh, 1.3); }
.td-bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; z-index: 0; }
.td-bg.fit { background-size: contain; }
.td-tint { position: absolute; inset: 0; z-index: 0; }
.td-sl > .td-title, .td-sl > .td-body, .td-sl > .td-links, .td-sl > .td-badge { position: relative; z-index: 1; }
.td-sl > .td-timer { z-index: 3; }
.td-ondark .td-text, .td-ondark .td-text:empty::before { color: #fff; } .td-ondark .td-title { text-shadow: 0 2px 10px #0008; }
.td-hasbg .td-text { text-shadow: 0 1px 2px #fff8; } .td-ondark .td-text { text-shadow: 0 1px 4px #0009; }
/* text position */
.td-al-left .td-title, .td-al-left .td-text { text-align: left; }
.td-al-center .td-title, .td-al-center .td-text { text-align: center; }
.td-al-right .td-title, .td-al-right .td-text { text-align: right; }
.td-al-justify .td-text { text-align: justify; } .td-al-justify .td-title { text-align: left; }
.td-sl.td-va-middle .td-body { align-items: center; } .td-sl.td-va-bottom .td-body { align-items: flex-end; }
.td-sl.td-va-middle.lay-below .td-body, .td-sl.td-va-middle.lay-text .td-body { justify-content: center; }
.td-sl.td-va-bottom.lay-below .td-body { justify-content: flex-end; }
.td-sl.td-va-middle .td-text, .td-sl.td-va-bottom .td-text { max-height: 100%; }
.td-sl.td-va-middle.lay-text .td-body, .td-sl.td-va-bottom.lay-text .td-body { flex-direction: column; } .td-sl.td-va-middle.lay-text .td-text, .td-sl.td-va-bottom.lay-text .td-text { flex: 0 1 auto; width: 100%; }
/* margins (Normal = as before) */
.sl-stage > .sl.td-sl.td-mg-narrow { padding: 3cqw 3.6cqw 3cqw !important; }
.sl-stage > .sl.td-sl.td-mg-wide { padding: 9cqw 15cqw 8cqw !important; }
/* columns */
.td-cols2 .td-text { column-count: 2; column-gap: 4cqw; } .td-cols3 .td-text { column-count: 3; column-gap: 3cqw; }
/* the 🎨 panel */
.td-laypop { min-width: 380px; max-width: min(560px, 96vw); display: flex; flex-direction: column; gap: 6px; }
.td-laypop .tl-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 8px; }
.td-laypop .tl-row > span:first-child { opacity: .75; font-size: .9rem; }
.td-laypop .tl-btns { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.td-laypop .ts-tbtn { padding: 4px 10px; } .td-laypop .ts-tbtn.on { background: #4a5a28; color: #fff; }
.td-laypop em { font-style: normal; font-weight: 800; min-width: 3em; text-align: center; }
.td-laypop input[type="range"] { width: 100%; }
.td-laypop .tl-range { flex-wrap: nowrap; } .td-laypop .tl-range input { flex: 1; }
.td-ondark .sl-logo { filter: brightness(0) invert(1); opacity: .75; } .td-hasbg .sl-logo { z-index: 1; }
/* ================= v519 small term-colored titles · ➖ Text · the video bar · ▣ Fill the slide ================= */
:root { --ts-term: #191970; }
.td-small .td-title { font: 800 2.083cqw/1.2 var(--font-body, system-ui), system-ui, sans-serif; color: var(--ts-term); text-align: left !important; margin-bottom: 1.8cqw; letter-spacing: .01em; }
.sl-stage:not(.sl-hasfx) > .sl.sl-fix.td-small { padding-top: 3.4cqw; }
.td-small.td-ondark .td-title { color: #fff; text-shadow: 0 1px 6px #000a; }
body.ts-on .sl-head { color: var(--ts-term); opacity: 1; }
/* the video: a small bar above it */
.td-pic.td-vwrap { flex-direction: column; align-items: stretch; justify-content: center; gap: .6cqw; width: 100%; min-height: 0; background: transparent; }
.td-vwrap > .td-vid { position: relative; width: 100%; height: auto; max-height: calc(100% - 3.4cqw); aspect-ratio: 16 / 9; background: #000; border-radius: .8cqw; overflow: hidden; margin: 0 auto; display: flex; align-items: center; justify-content: center; }
.td-pics.has-vid .td-vwrap > .td-vid { width: 100%; }
.td-vbar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: max(11px, 1.05cqw); }
.td-vbar button { border: 1px solid #0002; background: #f3f4ef; color: #1f2937; border-radius: 99px; padding: 2px 10px; font: inherit; font-weight: 700; cursor: pointer; }
.td-vbar button:hover { background: #4a5a28; color: #fff; }
.td-vbar .td-vtrim { position: static; background: none; color: inherit; padding: 0; font-weight: 700; opacity: .75; }
.td-ondark .td-vbar .td-vtrim { color: #fff; }
.td-vwrap:fullscreen { background: #000; padding: 0; display: flex; }
.td-vwrap:fullscreen .td-vbar { display: none; }
.td-vwrap:fullscreen > .td-vid { flex: 1; max-height: none; aspect-ratio: auto; border-radius: 0; height: 100%; }
.td-vwrap .td-vback { display: none; } .td-vwrap:fullscreen .td-vback, .td-vwrap.td-vfull .td-vback { display: block; position: absolute; top: 14px; left: 14px; z-index: 5; }
.td-vwrap.td-vfull { position: fixed !important; inset: 0 0 var(--ts-barh, 56px) 0; z-index: 9550; background: #000; }
/* ▣ the video fills the slide (the small title and the logo stay) */
.sl-stage > .sl.td-sl.td-vfillon { padding: 2.6cqw 3cqw 5.4cqw !important; }
.td-vfillon .td-body { flex: 1; } .td-vfillon .td-pics { flex: 1; }
.td-vfillon .td-vwrap > .td-vid { max-height: calc(100% - 3.2cqw); width: auto; height: calc(100% - 3.2cqw); }
.sl-stage > .sl.td-sl.td-vfillon { padding: 2.6cqw 3cqw 6.6cqw !important; }
.td-vfillon .td-vwrap > .td-vid { max-height: calc(100% - 3.6cqw); height: calc(100% - 3.6cqw); }
.td-sl.td-vfillon .td-pics.has-vid .td-vwrap { height: 100%; }
.td-sl.td-vfillon .td-pics.has-vid .td-vwrap > .td-vid { width: auto; max-width: 100%; height: calc(100% - 3.6cqw); max-height: calc(100% - 3.6cqw); }
/* v519 the video takes the space it has (never past the slide) */
.td-pics.has-vid { min-height: 0; overflow: hidden; }
.td-pics.has-vid .td-vwrap { height: 100%; min-height: 0; justify-content: flex-start; }
.td-pics.has-vid .td-vwrap > .td-vid, .td-pics.has-vid.n1 .td-vwrap > .td-vid { width: auto; max-width: 100%; height: auto; flex: 1 1 0; min-height: 0; max-height: none; aspect-ratio: 16 / 9; }
.lay-below .td-text:empty { flex: 0 0 auto; }
/* ▣ the bar goes up beside the title; the video gets the rest (the logo stays) */
.sl-stage > .sl.td-sl.td-vfillon { padding: 2.6cqw 3cqw 4.2cqw !important; }
.td-vfillon .td-vbar { position: absolute; top: 2.4cqw; right: 3cqw; z-index: 2; }
.td-sl.td-vfillon .td-pics.has-vid .td-vwrap > .td-vid { height: auto; max-height: none; flex: 1 1 0; }
.td-vfillon .td-vbar { top: -3.9cqw; right: 0; }
.td-vfillon .td-pics.has-vid, .td-vfillon .td-body { overflow: visible; }
/* v520 ⛶ only the slide: the toolbar above it hides and the slide grows */
body.ts-present #ts-panel .sl-bar, body.ts-present #ts-panel .tss-bar, body.ts-present #tss-skill .tss-bar { display: none !important; }
body.ts-present .ts-panel.sl-wrap { padding: 8px 70px; justify-content: center; }
body.ts-present .sl-stage { width: min(calc(100vw - 150px), calc((100vh - var(--ts-barh, 56px) - 24px) * 16 / 9)); }
#ts-full.on { background: #4a5a28 !important; }
/* v522 🔔 Greeting sound button · the 🎵 pop-up's tick box beside its words */
#ts-greet.off { opacity: .6; }
.ts-mpop .ts-mrow { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; margin: 0 !important; font-weight: 700; cursor: pointer; }
.ts-mpop .ts-mrow input { width: auto !important; margin: 0 !important; }
/* v523 🌱 CHIM's moving logo on the Greeting (in place of 🌞) */
.ts-hi-logo { display: block; height: clamp(90px, 17vh, 190px); width: auto; margin: 1vh auto 1.4vh; pointer-events: none; }
.ts-hi-logo { height: clamp(150px, 28vh, 300px); margin: -1vh auto -1vh; }
.ts-hi-logo { height: clamp(110px, 20vh, 230px); margin: 1.2vh auto 1.6vh; }

/* v527 Greeting logo at half size (10% of the screen height, 55–115 px); the rest moves closer together */
.ts-hi-logo { height: clamp(55px, 10vh, 115px); margin: 0.8vh auto 1vh; }

/* v528 🎞 the video box takes the video's own shape (a phone video is tall: no black sides). YouTube stays 16:9. */
.td-vwrap:not(:fullscreen):not(.td-vfull) > .td-vid:not(:fullscreen):not(.td-vfull) { aspect-ratio: var(--td-ar, 16 / 9) !important; }
.td-vid video { object-fit: contain; }
/* v528 Text beside a video: the video is as tall as the slide's body, its side as wide as the video; the text takes the rest */
.td-vbeside.lay-side .td-text { flex: 1 1 0; min-width: 0; }
.td-vbeside.lay-side .td-pics.has-vid { align-items: stretch; justify-items: center; }
.td-vbeside.lay-side .td-pics.has-vid .td-vwrap { height: 100%; justify-content: flex-start; }
.td-vbeside.lay-side .td-pics.has-vid .td-vwrap > .td-vid { width: auto !important; max-width: 100%; height: auto; flex: 1 1 0; min-height: 0; max-height: none; margin: 0 auto; }
.td-vbeside.lay-side .td-vbar { flex-wrap: nowrap; justify-content: flex-end; overflow: visible; white-space: nowrap; } /* the buttons stay on one line; a narrow video lets them reach into the gap beside it */
.td-vbeside.lay-side .td-vbar > span[style*="flex:1"] { display: none; }

/* v529 🌱 CHIM's video bar: the playhead is the sprout on its mound (about 2.5× the browser's dot); it sways while playing */
.cv-host { position: relative; --cv-sz: clamp(28px, 2.3vw, 46px); }
.cv-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; align-items: center; gap: .55em; padding: calc(var(--cv-sz) * .55) .8em .45em; font: 600 clamp(12px, .95vw, 17px)/1 system-ui, sans-serif; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.72)); transition: opacity .35s; user-select: none; }
.cv-host.cv-idle .cv-bar { opacity: 0; pointer-events: none; } .cv-host.cv-idle { cursor: none; }
.cv-b { background: none; border: 0; color: #fff; font-size: 1.25em; line-height: 1; padding: .2em .25em; cursor: pointer; border-radius: 6px; min-width: 1.6em; }
.cv-b:hover { background: rgba(255,255,255,.16); }
.cv-time { font-variant-numeric: tabular-nums; white-space: nowrap; opacity: .95; }
.cv-seek { position: relative; flex: 1 1 auto; min-width: 60px; height: calc(var(--cv-sz) * .55); display: flex; align-items: center; cursor: pointer; touch-action: none; margin: 0 calc(var(--cv-sz) * .45); }
.cv-track { position: relative; width: 100%; height: 5px; border-radius: 99px; background: rgba(255,255,255,.35); overflow: hidden; }
.cv-done { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #7cc142; }
.cv-head { position: absolute; left: 0; bottom: calc(50% - var(--cv-sz) * .13); width: calc(var(--cv-sz) * .87); height: var(--cv-sz); transform: translateX(-50%); pointer-events: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.55)); }
.cv-sprout { display: block; width: 100%; height: 100%; overflow: visible; }
.cv-plant { transform-box: view-box; transform-origin: 20px 40px; }
.cv-playing .cv-plant { animation: cvSway 1.7s ease-in-out infinite alternate; }
.cv-drag .cv-head { transform: translateX(-50%) scale(1.12); }
@keyframes cvSway { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .cv-playing .cv-plant { animation: none; } }
.cv-vol { width: clamp(50px, 5vw, 90px); accent-color: #7cc142; cursor: pointer; }
.cv-host .td-vyt { bottom: auto; top: 8px; } /* "Open on YouTube" moves to the top */
.cv-host iframe { pointer-events: auto; }
.cv-host.cv-yt-wait .cv-bar { opacity: .55; }
.cv-trimhost { position: relative; border-radius: 8px; overflow: hidden; background: #000; }
.cv-trimhost video { display: block; width: 100%; max-height: 38vh; }
.cv-trimhost:fullscreen video { max-height: none; height: 100%; }
.td-vwrap:fullscreen .cv-host, .td-vwrap.td-vfull .cv-host { --cv-sz: clamp(34px, 2.6vw, 54px); }
.cv-ic { width: 1.15em; height: 1.15em; display: block; } .cv-play { display: grid; place-items: center; }
.cv-narrow .cv-bar { flex-wrap: wrap; row-gap: .15em; padding-top: calc(var(--cv-sz) * .75); }
.cv-narrow .cv-seek { order: -1; flex: 1 0 calc(100% - var(--cv-sz) * .9); }
.cv-narrow .cv-time { flex: 1 1 auto; }
.cv-narrow .cv-vol { width: clamp(44px, 22%, 80px); }
.cv-narrow .cv-vol { width: 48px; } .cv-narrow .cv-time { min-width: 0; font-size: .92em; } .cv-narrow .cv-bar { gap: .35em; }

/* v530 ⛶ full screen: the video always takes the whole screen height (a tall phone video has black sides); the bar runs along the bottom */
.td-sl .td-pics .td-vwrap.td-vwrap:fullscreen > .td-vid, .td-sl .td-pics .td-vwrap.td-vwrap.td-vfull > .td-vid { flex: 1 1 auto !important; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; aspect-ratio: auto !important; border-radius: 0; }
.td-vwrap:fullscreen, .td-vwrap.td-vfull { flex-direction: column; }
/* v530 presenting (bottom ⛶): the video's editing tools hide; beside text the video is as tall as the slide, centered in the 2nd column */
body.ts-present .td-vbar { display: none !important; }
.td-vtall .td-pics.has-vid { display: flex !important; align-items: center; justify-content: center; overflow: visible; }
.td-vtall .td-pics.has-vid .td-vwrap { height: 100%; width: 100%; justify-content: center; align-items: center; }
.td-vtall .td-title { overflow-wrap: anywhere; }



/* ================================================================
   v532 Teach Screen slides: titles in IBM Plex Sans bold, in the term colour (T1 dark olive green · T2 midnight blue · T3 maroon);
   margins about 40 px on a 1080p screen (2.36% of the slide width), the text stops above the logo; the logo shows everywhere
   ================================================================ */
.td-sl .td-title, body.ts-on .sl-head, body.ts-on .sl-title h1, .ts-hi-big .ts-greet { font-family: 'IBM Plex Sans', system-ui, sans-serif !important; font-weight: 700 !important; letter-spacing: 0; }
.td-sl .td-title { color: var(--ts-term, #556b2f); margin-top: 0; margin-bottom: 1.2cqw; }
body.ts-on .sl-head, body.ts-on .sl-title h1, .ts-hi-big .ts-greet { color: var(--ts-term, #556b2f); }
body.ts-on .sl-head { opacity: 1; }
/* on a dark background the term colour is lightened so it can be read */
.td-ondark .td-title, body.ts-th-charcoal .td-sl:not(.td-hasbg) .td-title, body.ts-on .sl-dark .sl-head, body.ts-on .sl-darkbg .sl-head { color: color-mix(in srgb, var(--ts-term, #556b2f) 35%, #fff); }
/* where the title sits: top left; top right when the text is ➡ Right; ✋ Thank you stays centred */
.td-sl .td-title, .td-sl.td-center .td-title { text-align: left; }
.td-sl.td-al-right .td-title, .td-small.td-al-right .td-title { text-align: right !important; }
.td-sl.td-p-bye .td-title { text-align: center !important; }
/* margins: Normal about 40 px; Narrow about 20 px; Wide = the old Normal. The bottom keeps about 80 px so text never touches the logo */
.sl-stage > .sl.td-sl.td-sl { padding: 2.36cqw 2.36cqw 4.72cqw !important; }
.sl-stage > .sl.td-sl.td-sl.td-mg-narrow { padding: 1.2cqw 1.2cqw 4.72cqw !important; }
.sl-stage > .sl.td-sl.td-sl.td-mg-wide { padding: 8cqw 9.6cqw 7.6cqw !important; }
body.ts-on #ts-panel .sl-stage > .sl:not(.td-sl) { padding: 2.36cqw 2.36cqw 4.72cqw !important; }
/* the logo: bottom left inside the margin, clearly visible; a soft white glow on a picture or a dark background */
.td-sl .sl-logo, body.ts-on #ts-panel .sl-logo { left: 2.36cqw; bottom: 1.3cqw; height: 2.6cqw; opacity: .9; z-index: 3; }
.td-hasbg .sl-logo, .td-ondark .sl-logo, body.ts-on .sl-dark .sl-logo, body.ts-on .sl-darkbg .sl-logo, body.ts-th-charcoal #ts-panel .sl-logo { filter: drop-shadow(0 0 .15cqw #fff) drop-shadow(0 0 .45cqw rgba(255,255,255,.95)) !important; opacity: 1; }
/* every other Teach Screen view (games, Mastery, Signals, Attendance, Check…) gets the logo bottom left; not where a slide or the Greeting already shows it */
#ts-logo { display: none; }
body.ts-on #ts-logo { display: block; position: fixed; left: 14px; bottom: calc(var(--ts-barh, 56px) + 12px); height: clamp(22px, 2.2vw, 40px); z-index: 9560; pointer-events: none; opacity: .92;
  filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 6px rgba(255,255,255,.9)); }
body.ts-on:has(#ts-panel .sl-logo) #ts-logo, body.ts-on:has(.ts-hi-logo) #ts-logo { display: none; }
body.ts-on:has(.ac-ov) #ts-logo { bottom: 14px; }
/* a video in full screen: the logo above the bar, bottom left */
.td-vlogo { display: none; }
.td-vwrap:fullscreen .td-vlogo, .td-vwrap.td-vfull .td-vlogo { display: block; position: absolute; left: 18px; bottom: calc(var(--cv-sz, 40px) * 2.2); height: clamp(26px, 2.4vw, 46px); z-index: 6; pointer-events: none;
  filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 7px rgba(255,255,255,.95)); }

/* ================================================================
   v533 Greeting, Seat Plan and Signals on the slide card (sizes follow the card, so a phone looks like the laptop);
   💾 Save at the top right of the seat plan while presenting; 📱↻ landscape on phones and tablets
   ================================================================ */
.ts-card { flex: 0 0 auto; }
.ts-card .ts-card-in { position: absolute; inset: 0; padding: 2.36cqw 2.36cqw 4.72cqw; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.ts-card .sl-logo { position: absolute; left: 2.36cqw; bottom: 1.3cqw; height: 2.6cqw; opacity: .9; z-index: 3; }
/* 👋 Greeting */
.ts-card .ts-hi-big { padding: 0; width: 100%; max-width: none; }
.ts-card .ts-hi-big .ts-date { font-size: 2.3cqw; }
.ts-card .ts-hi-big .ts-greet { font-size: 6cqw; margin: .6cqw 0 .4cqw; line-height: 1.12; }
.ts-card .ts-hi-logo { height: 7.5cqw !important; margin: .8cqw auto 1cqw !important; }
.ts-card .ts-hi-big .ts-sub { font-size: 2.3cqw; }
.ts-card .ts-hi-big .ts-me { font-size: 1.9cqw; }
.ts-card .ts-hi-big .ts-secs { margin-top: 2cqw; gap: 1cqw; }
.ts-card .ts-hi-big .ts-secs .chip { font-size: 2.3cqw; padding: .5cqw 1.8cqw; }
/* 🚦 Signals: the title top left like every slide title */
.ts-card-sig .ts-sig { padding: 0; width: 100%; }
.ts-card-sig .ts-sig-h { position: absolute; top: 2.36cqw; left: 2.36cqw; margin: 0; font: 700 4.2cqw/1.15 'IBM Plex Sans', system-ui, sans-serif; color: var(--ts-term, #556b2f); text-align: left; }
.ts-card-sig .ts-sig-row { gap: 2.4cqw; margin-top: 4cqw; }
.ts-card-sig .ts-sig-c { gap: .8cqw; }
.ts-card-sig .ts-sig-i { font-size: 7cqw; }
.ts-card-sig .ts-sig-c b { font-size: 2.6cqw; }
.ts-card-sig .ts-sig-c span { font-size: 1.8cqw; line-height: 1.3; }
.ts-card-sig .ts-sig-bar { height: 7cqw; margin-top: .6cqw; }
.ts-card-sig .ts-sig-n { font-size: 2.4cqw; }
.ts-card-sig .ts-sig-act { margin-top: 2.4cqw; gap: 1cqw; }
.ts-card-sig .ts-sig-act .ts-sub { font-size: 1.8cqw; }
.ts-card-sig .ts-sig-act .btn-small { font-size: 1.9cqw; padding: .6cqw 1.6cqw; }
/* 🪑 Seat Plan / Attendance */
.ts-panel.tss-wrap > .ts-card { align-self: center; }
.ts-card-seat .ts-card-in { padding: 1.4cqw 1.4cqw 4.4cqw; }
.ts-card-seat .tss-board { width: 100%; height: 100%; flex: 1 1 auto; min-height: 0; }
.ts-card-seat .tss-board svg { width: 100%; height: 100%; max-height: none; }
.tss-fsave { display: none; }
body.ts-present .tss-fsave { display: flex; position: absolute; right: 1.6cqw; top: var(--tss-fy, 8%); transform: translateY(-50%); align-items: center; gap: 1cqw; z-index: 4; font-size: 1.5cqw; }
body.ts-present .tss-fsave .tss-n { font-size: 1.5cqw; font-weight: 700; }
body.ts-present .tss-fsave .btn-small { font-size: 1.7cqw; padding: .5cqw 1.4cqw; }
.tss-fst { font-size: 1.3cqw; max-width: 18cqw; }
/* 📱↻ only on touch screens */
#ts-bar #ts-rot { display: none; }
@media (pointer: coarse) { #ts-bar #ts-rot { display: inline-flex; } }
/* the Teach Screen turned sideways by CHIM itself (iPhone, or when the phone will not lock the screen) */
html.ts-rot, html.ts-rot body { overflow: hidden; }
html.ts-rot body { position: fixed; top: 0; left: 0; width: 100vh !important; height: 100vw !important; min-height: 0 !important; max-width: none !important; margin: 0 !important; transform-origin: top left; transform: translate(100vw, 0) rotate(90deg); }
html.ts-rot .sl-stage { width: min(calc(100vh - 150px), calc((100vw - var(--ts-barh, 56px) - 70px) * 16 / 9)); }
html.ts-rot body.ts-present .sl-stage { width: min(calc(100vh - 150px), calc((100vw - var(--ts-barh, 56px) - 24px) * 16 / 9)); }
.ts-card .btn-small { min-height: 0 !important; min-width: 0 !important; line-height: 1.2; height: auto; }
.ts-card-sig .ts-sig-act .btn-small { font-size: 2.2cqw; padding: .7cqw 1.8cqw; }

/* v534 "Next: …" — small, at the top right of the slide, inside its 40 px margin */
.ts-nextnote { position: fixed; z-index: 8960; pointer-events: none; font: 600 clamp(11px, .8vw, 15px)/1.2 'IBM Plex Sans', system-ui, sans-serif; color: #fff; background: rgba(35, 43, 58, .72); padding: 4px 10px; border-radius: 99px; white-space: nowrap; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 4px #0003; }
.ts-nextnote.hidden { display: none; }
body:not(.ts-on) .ts-nextnote { display: none; }
#td-voice { white-space: nowrap; }

/* ================================================================
   v535 🎮 Skill and 🧹 Cleaners on the slide card; a game is played inside the card too
   ================================================================ */
.ts-card .ts-card-h { position: absolute; top: 2.36cqw; left: 2.36cqw; right: 2.36cqw; margin: 0; font: 700 4.2cqw/1.15 'IBM Plex Sans', system-ui, sans-serif; color: var(--ts-term, #556b2f); text-align: left; }
.ts-card-skill .ts-skill-tip { font-size: 2.6cqw; line-height: 1.4; text-align: center; color: var(--ts-fg, #374151); opacity: .85; }
.ts-card-clean .ts-cl-grp { font: 700 2.4cqw/1.2 'IBM Plex Sans', system-ui, sans-serif; opacity: .7; margin-bottom: 1.6cqw; }
.ts-card-clean .ts-cl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: .9cqw 5cqw; font-size: 3.4cqw; line-height: 1.2; text-align: left; }
.ts-card-clean .ts-cl-list.two { grid-template-columns: 1fr 1fr; font-size: 2.7cqw; }
.ts-card-clean .ts-cl-list li::before { content: '🧹 '; font-size: .8em; }
.ts-card-clean .ts-cl-none { font-size: 2.8cqw; text-align: center; line-height: 1.4; }
.ts-card-clean .ts-cl-none small { font-size: .65em; opacity: .7; }
/* the game itself: inside a 16:9 card below the game bar (it scrolls inside the card if a game is taller) */
body.ts-game #arcade-play-view { width: min(calc(100vw - 150px), calc((100vh - 64px - var(--ts-barh, 56px) - 20px) * 16 / 9)) !important; aspect-ratio: 16 / 9; margin: 16px auto 0 !important;
  background: #fff url('assets/logo-wordmark.png') no-repeat left 1.4% bottom 1.6% / auto 4.6%; border-radius: 14px; box-shadow: 0 10px 30px #0002; overflow: auto; position: relative; padding: 1.2% 1.4% 3.2% !important; box-sizing: border-box; }
body.ts-on.ts-th-charcoal.ts-game #arcade-play-view { background-color: #2a2f37; }
body.ts-game #ts-logo { display: none !important; }
body.ts-game .content { zoom: 1 !important; } /* the card is sized for the screen; the page zoom would make it too big */
.ts-panel.ts-skillpick .sl-stage, body.ts-present .ts-panel.ts-skillpick .sl-stage { width: min(calc(100vw - 150px), calc((100vh - var(--ts-barh, 56px) - 110px) * 16 / 9)) !important; }
body.ts-present .ts-panel.ts-skillpick { justify-content: flex-start !important; }
/* v535 📅 weekend note on the seat plan */
.tss-wk { font-weight: 700; color: #92400e; background: #fef3c7; border-radius: 99px; padding: 3px 10px; font-size: .95rem; }
.tss-wkcard { position: absolute; bottom: 1.1cqw; left: 50%; transform: translateX(-50%); white-space: nowrap; z-index: 4; font: 700 1.5cqw/1.2 'IBM Plex Sans', system-ui, sans-serif; color: #92400e; background: #fef3c7; border-radius: 99px; padding: .4cqw 1.1cqw; }

/* ================================================================
   v537 Teach Screen editing bars: icons only (like the bottom panel); the name shows below on hover
   ================================================================ */
.ts-tip.below::after { bottom: auto; top: -5px; border: 5px solid transparent; border-top: 0; border-bottom-color: #111827; }
#ts-panel .sl-bar, #ts-panel .tss-bar { gap: 6px; flex-wrap: wrap; }
#ts-panel .sl-bar .tsi-btn, #ts-panel .tss-bar .tsi-btn { position: relative; min-width: 44px; height: 44px; padding: 0 8px !important; display: inline-grid; place-items: center; font-size: 1.35rem; line-height: 1; }
#ts-panel .tsi { font-size: 1.35rem; line-height: 1; }
#ts-panel .tsi-badge { position: absolute; right: 3px; bottom: 2px; font: 800 .62rem/1 'IBM Plex Sans', system-ui, sans-serif; font-style: normal; background: #4a5a28; color: #fff; border-radius: 4px; padding: 1px 3px; }
#ts-panel .sl-bar .tsi-b, #ts-panel .tss-bar .tss-sec { font-size: 1.35rem; cursor: default; padding: 0 4px; }
#ts-panel .tsi-hide { display: none !important; }
#ts-panel .tsi-count { font-weight: 700; opacity: .7; min-width: 2.5em; text-align: center; }

/* v538 ⤵ a joined slide: text lines on the left, formulas centered, in order; shrinks to fit (not below 60%) */
.sl-joined .sl-jbody { flex-direction: column; justify-content: center; }
.sl-joined .sl-text { font-size: calc(1em * var(--sl-jk, 1)); display: flex; flex-direction: column; gap: .5em; width: 100%; }
.sl-joined .sl-jt { text-align: left; }
.sl-joined .sl-jf { display: flex; flex-direction: column; align-items: center; text-align: center; }
.sl-joined .sl-jf .sl-fbig { font-size: 1.7em; }
.sle-tn .sle-jck { width: 18px; height: 18px; margin: 0 6px; accent-color: #4a5a28; }
.sle-tn.jpick { outline: 3px solid #4a5a28; outline-offset: -3px; }
.sle-rib .sle-on { background: #4a5a28 !important; color: #fff !important; }
.sle-tn { touch-action: pan-y; }

/* v539 ✏️ Edit slides: the ribbon is icons only and stays on one line; the name shows below on hover */
.sle2 .sle-rib { flex-wrap: nowrap !important; overflow-x: auto; overflow-y: hidden; gap: 6px 10px; scrollbar-width: thin; }
.sle2 .sle-rib .sle-grp { flex: 0 0 auto; padding-right: 10px; }
.sle2 .sle-rib .sle-ic { min-width: 40px; font-size: 1.15rem; padding: 0 8px; }
.sle2 .sle-rib .sle-bgw { position: relative; display: inline-grid; place-items: center; width: 40px; height: 36px; border: 1px solid var(--rule); background: var(--paper); border-radius: 8px; cursor: pointer; }
.sle2 .sle-rib .sle-bgw:hover { background: #4a5a2818; }
.sle2 .sle-rib .sle-bgi { font-size: 1.1rem; pointer-events: none; }
.sle2 .sle-rib .sle-bgw select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* v540 ▥ a picture / graph / table on the other side, or on top */
.sl-two.sl-rev { flex-direction: row-reverse; }
.sl-below.sl-rev { flex-direction: column-reverse; }
.sle-lay { display: flex; flex-direction: column; gap: 6px; min-width: 260px; }
.sle-lay .sle-lay-row { display: grid; grid-template-columns: 1fr; gap: 4px; }
.sle-lay .sle-lay-w { display: flex; gap: 6px; }
.sle-lay .sle-lay-w .ts-tbtn { flex: 1; justify-content: center; font-size: 1.1rem; }
.sle-lay .ts-tbtn.on { background: #4a5a28; color: #fff; }
.sle-lay .ts-tbtn span { font-size: 1.2rem; }
/* v540 the ribbon keeps its full height (it was squeezed) and gets 3 px more above and below */
.sle2 .sle-rib { flex: 0 0 auto !important; min-height: 58px; padding-top: 11px !important; padding-bottom: 11px !important; box-sizing: border-box; }
.sle2 .sle-rib button, .sle2 .sle-rib .sle-bgw { flex: 0 0 auto; }

/* v542 🎯 Learning Objectives box in the Notebook (General Mathematics lessons whose notes have none) */
.nbp-obj ol { margin: 4px 0 0; padding-left: 1.4em; }
.nbp-obj ol li { margin: 3px 0; }
.nbp-obj .nbp-obj-p { margin: 2px 0 2px; font-style: italic; opacity: .85; }

/* v543 a slide's text box is as wide as the slide (not as wide as its longest line), so ↔ centers a line on the slide */
.sl-fix > .sl-body:not(.sl-two):not(.sl-below) > .sl-text { flex: 1 1 auto; width: 100%; min-width: 0; }
.sle-wbar .sle-wal { display: inline-flex; gap: 3px; margin: 0 4px; padding: 0 4px; border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); }
.sle-wbar .sle-wal button.on { background: #4a5a28; color: #fff; }

/* v544 🪑 full screen: the count and 💾 Save sit at the bottom right of the slide, level with the CHIM logo (bottom left) */
body.ts-present .ts-card-seat .tss-fsave { top: auto !important; bottom: 1.3cqw; right: 2.36cqw; height: 2.6cqw; transform: none !important; align-items: center; }
body.ts-present .ts-card-seat .tss-fsave .btn-small { height: 100%; display: inline-flex; align-items: center; padding: 0 1.4cqw; }
body.ts-present .ts-card-seat .tss-fst:empty { display: none; }

/* v545 Font row in 🎨 Layout: B · I · U and the colours */
.td-laypop .tl-font { flex-wrap: wrap; gap: 4px; }
.td-laypop .tl-font .ts-tbtn { min-width: 2.1em; font-size: 1em; }
.td-laypop .tl-sw { width: 1.9em; height: 1.9em; min-width: 1.9em !important; padding: 0; border-radius: 50%; background: var(--sw) !important; border: 2px solid #fff; box-shadow: 0 0 0 1px #0003; }
.td-laypop .tl-sw0 { background: #fff !important; color: #222; font-size: .9em; }
.td-laypop .tl-hint em { font-size: .8em; opacity: .7; font-style: normal; }
.td-text u { text-decoration-thickness: .06em; text-underline-offset: .12em; }

/* v546 🖍 Color Fill · A− A+ · Aa (Teach Screen and Edit slides) */
.sl-hl, .td-text span[style*="background"], .sle-wed span[style*="background"] { padding: 0 .12em; border-radius: .18em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.td-laypop .tl-fill { border-radius: 4px !important; }
.chim-fillpop { position: fixed; z-index: 100000; display: grid; grid-template-columns: repeat(6, 30px); gap: 6px; padding: 8px; background: var(--card, #fff); border: 1px solid #0002; border-radius: 10px; box-shadow: 0 8px 24px #0003; }
.chim-fillpop button { width: 30px; height: 30px; border-radius: 6px; border: 2px solid #fff; box-shadow: 0 0 0 1px #0003; cursor: pointer; padding: 0; }
.chim-fillpop button.nofill { background: #fff; font-size: 16px; color: #666; }
.chim-fillpop button:hover { transform: scale(1.1); }
.sle-wbar .sle-wst { display: inline-flex; gap: 4px; padding: 0 4px; border-left: 1px solid #0002; border-right: 1px solid #0002; }

/* v547 ⚙️ Settings and ✍️ Annotate drawers; the annotation layer */
.ts-drawer { position: fixed; z-index: 9150; display: flex; flex-direction: column; gap: 4px; padding: 8px; background: #232b3a; border-radius: 14px; box-shadow: 0 8px 24px #0005; min-width: 190px; }
.ts-drawer.hidden { display: none; }
.ts-drawer button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: #fff; font: inherit; font-size: 1.25rem; font-weight: 700; cursor: pointer; text-align: left; }
.ts-drawer button::after { content: attr(data-lbl); font-size: .95rem; font-weight: 600; color: #dfe5ee; }
.ts-drawer button:hover { background: #ffffff1a; }
.ts-drawer button.off { opacity: .85; }
#ts-bar #ts-set.open, #ts-bar #ts-ink.open, #ts-bar #ts-ink.on { background: #4a5a28; border-radius: 10px; }
#ts-bar #ts-tools.hidden { display: none !important; }
.ts-inkic { vertical-align: -0.18em; }
#ts-ink-layer { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; z-index: 8990; pointer-events: none; }
#ts-ink-layer canvas { position: absolute; inset: 0; width: 100vw; height: 100vh; }
#ts-ink-lz { pointer-events: none; }
#ts-ink-layer:not(.ink-off) #ts-ink-cv { pointer-events: auto; touch-action: none; }
#ts-ink-layer.ink-pen #ts-ink-cv, #ts-ink-layer.ink-hl #ts-ink-cv { cursor: crosshair; }
#ts-ink-layer.ink-text #ts-ink-cv { cursor: text; }
#ts-ink-layer.ink-erase #ts-ink-cv { cursor: cell; }
#ts-ink-layer.ink-laser #ts-ink-cv { cursor: none; }
#ts-ink-tx { position: absolute; inset: 0; pointer-events: none; }
#ts-laserdot { position: fixed; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #ff2a1f; box-shadow: 0 0 10px 5px #ff2a1f88, 0 0 24px 10px #ff2a1f44; pointer-events: none; }
#ts-laserdot.hidden { display: none; }
.ts-inktxt { position: absolute; pointer-events: auto; font-family: 'IBM Plex Sans', sans-serif; font-weight: 600; line-height: 1.2; white-space: pre-wrap; min-width: 1em; padding: 2px 6px; border: 2px dashed transparent; border-radius: 6px; }
.ts-inktxt:focus-within, .ink-text .ts-inktxt:hover { border-color: #2f3fe099; background: #ffffffaa; }
.ts-inked { outline: none; display: inline-block; min-width: .6em; }
.ts-inkmv { position: absolute; left: -1.1em; top: 0; font-size: .6em; cursor: move; color: #555; background: #fff; border-radius: 4px; padding: 0 3px; opacity: 0; }
.ts-inktxt:focus-within .ts-inkmv, .ts-inktxt:hover .ts-inkmv { opacity: 1; }
.ink-erase .ts-inktxt { cursor: cell; }
#ts-inkpal { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--ts-barh, 56px) + 10px); z-index: 9150; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fff; border: 1px solid #0002; border-radius: 12px; box-shadow: 0 6px 18px #0003; }
#ts-inkpal button { border: 0; background: transparent; cursor: pointer; padding: 0; display: grid; place-items: center; }
#ts-inkpal .ip-c { width: 28px; height: 28px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px #0003 inset; }
#ts-inkpal .ip-c.on { outline: 3px solid #4f6bff; outline-offset: 2px; }
#ts-inkpal .ip-w { width: 34px; height: 28px; border-radius: 8px; }
#ts-inkpal .ip-w i { display: block; width: 24px; background: #3a4150; border-radius: 4px; }
#ts-inkpal .ip-w.on { background: #e6ebff; }
#ts-inkpal .ip-sep { width: 1px; align-self: stretch; background: #0002; margin: 0 4px; }

/* v548 ⌨️ Tab indent · x² x₂ · table text size */
.sl-ind { display: block; margin-left: calc(var(--ind, 0) * 1.5em); }
.sl sup, .sl sub, .td-text sup, .td-text sub, .sle-wed sup, .sle-wed sub { font-size: .62em; line-height: 0; }
.tbe-sz { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.tbe-sz b { min-width: 3.2em; text-align: center; }

/* v549 ◀ ▶ 📅 attendance dates · Answer Cards sections */
.att-day-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.att-day-nav h2 { margin-right: 6px; }
.att-nav-btn { font: inherit; font-size: 1rem; font-weight: 800; min-width: 38px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1.5px solid var(--line, #d8d2c2); background: var(--card, #fff); color: var(--ink, #222); cursor: pointer; }
.att-nav-btn:hover { background: var(--olive-50, #eef3e3); }
.att-pick-wrap { position: relative; display: inline-flex; }
.att-pick-in { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.att-month-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.att-month-head h4 { margin-right: 6px !important; }
.ac-sec-row { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ac-sec-chk { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.ac-sec-chk { white-space: nowrap; }
.ac-sec-chk input { width: auto !important; margin: 0; }

/* v551 Seasons: a night or sea sky on the sign-in page → light words outside the card; the "night sky" tag in Control › Look */
html[data-screen="gate"][data-fxsky="night"] .gate-footer, html[data-screen="gate"][data-fxsky="sea"] .gate-footer { color: #e8eefc; opacity: .9; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.ctl-night { font-size: .72rem; padding: 1px 6px; border-radius: 999px; background: #1d2450; color: #dfe6ff; margin-left: 4px; white-space: nowrap; }

/* v552 🎵 music genre chips (header 🎵 panel and Teach Screen music) */
.mg-row { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 6px; }
.mg-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(122,139,74,.45); background: transparent; color: inherit; font-size: .8rem; cursor: pointer; white-space: nowrap; }
.mg-chip.on { background: var(--olive, #4A5A28); border-color: var(--olive, #4A5A28); color: #fff; }
.vol-pop { max-width: min(320px, calc(100vw - 16px)); }
.ts-mpop .mg-row { max-width: 260px; }
.vol-pop[data-kind="music"] { width: 262px; }

/* ===== v553 ✍️ Writer ===== */
html.wr-open, html.wr-open body { overflow: hidden; }
.wr-app { position: fixed; inset: 0; z-index: 9500; display: flex; flex-direction: column; background: #e9eae4; color: #1f2328; font-family: 'IBM Plex Sans', system-ui, sans-serif; }
.wr-app button { font: inherit; color: inherit; }
.wr-top { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #3f4f22; color: #fff; flex-wrap: wrap; }
.wr-top .wr-close { background: rgba(255,255,255,.15); border: 0; border-radius: 8px; width: 32px; height: 32px; cursor: pointer; color: #fff; }
.wr-logo { font-weight: 700; white-space: nowrap; }
.wr-name { flex: 1 1 160px; min-width: 120px; max-width: 420px; padding: 5px 9px !important; border-radius: 8px; border: 1px solid rgba(255,255,255,.3) !important; background: rgba(255,255,255,.12) !important; color: #fff !important; font-size: .95rem; margin: 0 !important; }
.wr-quick { display: flex; gap: 2px; }
.wr-quick button { background: transparent; border: 0; border-radius: 6px; width: 32px; height: 30px; cursor: pointer; color: #fff; font-size: 1rem; }
.wr-quick button:hover { background: rgba(255,255,255,.15); }
.wr-saved { font-size: .78rem; opacity: .85; margin-left: auto; white-space: nowrap; }
.wr-tabs { display: flex; gap: 2px; padding: 0 8px; background: #f7f7f3; border-bottom: 1px solid #d9dacd; overflow-x: auto; }
.wr-tabs button { border: 0; background: transparent; padding: 7px 14px; cursor: pointer; border-bottom: 3px solid transparent; font-weight: 600; font-size: .88rem; color: #444; white-space: nowrap; }
.wr-tabs button.on { border-bottom-color: #4A5A28; color: #2f3d14; }
.wr-ribbon { background: #fff; border-bottom: 1px solid #d9dacd; padding: 6px 8px; }
.wr-panel { display: none; align-items: center; gap: 4px; flex-wrap: wrap; }
.wr-panel.on { display: flex; }
.wr-panel > button, .wr-shapes button, .wr-tbl-tools button { border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 4px 8px; min-width: 30px; height: 32px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font-size: .9rem; white-space: nowrap; }
.wr-panel > button span { font-size: .8rem; }
.wr-panel > button:hover, .wr-shapes button:hover, .wr-tbl-tools button:hover { background: #eef1e6; border-color: #d4dbc2; }
.wr-panel > button.on { background: #dfe7cc; border-color: #b9c79a; }
.wr-panel select, .wr-panel input[type=number] { height: 30px; padding: 2px 6px !important; border-radius: 6px; border: 1px solid #ccd0c0 !important; background: #fff !important; color: #222 !important; font-size: .85rem; margin: 0 !important; width: auto !important; }
.wr-panel .wr-font { width: 150px !important; } .wr-panel .wr-size { width: 64px !important; } .wr-panel .wr-style { width: 110px !important; }
.wr-panel label { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; color: #444; }
.wr-sep { width: 1px; height: 24px; background: #dadccf; margin: 0 4px; display: inline-block; }
.wr-color { position: relative; cursor: pointer; display: inline-flex; align-items: center; padding: 0 6px; height: 32px; border-radius: 6px; }
.wr-color:hover { background: #eef1e6; }
.wr-color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100% !important; height: 100%; padding: 0 !important; }
.wr-cA { font-weight: 800; border-bottom: 4px solid #c00000; line-height: 1.1; }
.wr-cH { border-bottom: 4px solid #ffff00; line-height: 1.1; }
.wr-mute { color: #777; font-size: .8rem; }
.wr-chk input { width: auto !important; margin: 0 !important; }
.wr-tbl-tools { display: inline-flex; align-items: center; gap: 2px; flex-wrap: wrap; font-size: .82rem; }
.wr-ruler { height: 20px; background: #f3f3ee; border-bottom: 1px solid #d9dacd; overflow: hidden; display: flex; justify-content: center; }
.wr-ruler.hidden { display: none; }
.wr-ruler-in { position: relative; height: 100%; background: #fff; }
.wr-ruler-in b { position: absolute; top: 2px; font-size: 9px; font-weight: 400; color: #777; transform: translateX(-50%); }
.wr-ruler-in b::after { content: ''; position: absolute; left: 50%; top: 12px; width: 1px; height: 5px; background: #999; }
.wr-rm { position: absolute; top: 0; bottom: 0; background: #d9dbd0; }
.wr-scroll { flex: 1; overflow: auto; padding: 18px 12px 60px; -webkit-overflow-scrolling: touch; }
.wr-zoom { width: max-content; margin: 0 auto; }
.wr-sheet { position: relative; background: #fff; color: #000; box-shadow: 0 1px 3px rgba(0,0,0,.18), 0 6px 22px rgba(0,0,0,.08); }
.wr-hdr, .wr-ftr { outline: none; font-family: Arial, sans-serif; font-size: 9pt; color: #555; box-sizing: border-box; }
.wr-hdr { border-bottom: 1px dashed transparent; } .wr-ftr { border-top: 1px dashed transparent; }
.wr-hdr:hover, .wr-hdr:focus, .wr-ftr:hover, .wr-ftr:focus { border-color: #b9c79a; background: #fbfcf7; }
.wr-hdr:empty::before, .wr-ftr:empty::before { content: attr(data-ph); color: #bbb; }
.wr-body { outline: none; font-family: Arial, sans-serif; font-size: 11pt; line-height: 1.15; box-sizing: border-box; overflow-wrap: break-word; caret-color: #000; }
.wr-body p, .wr-body li, .wr-tbox-in p { margin: 0 0 8pt; }
.wr-body h1 { font-size: 26pt; margin: 0 0 10pt; font-weight: 700; line-height: 1.15; }
.wr-body h2 { font-size: 18pt; margin: 14pt 0 6pt; font-weight: 700; line-height: 1.15; }
.wr-body h3 { font-size: 15pt; margin: 12pt 0 4pt; font-weight: 700; line-height: 1.15; }
.wr-body h4 { font-size: 13pt; margin: 10pt 0 4pt; font-weight: 700; line-height: 1.15; }
.wr-body ul, .wr-body ol { margin: 0 0 8pt; padding-left: 0.5in; }
.wr-body a { color: #0563c1; text-decoration: underline; }
.wr-body table.wr-tbl, .wr-body table { border-collapse: collapse; width: 100%; margin: 0 0 8pt; table-layout: fixed; }
.wr-body td, .wr-body th { border: 1px solid #808080; padding: 3px 6px; vertical-align: top; min-width: 20px; }
.wr-body td > p:last-child, .wr-body th > p:last-child { margin-bottom: 0; }
.wr-body img { max-width: 100%; height: auto; }
.wr-shape { display: inline-block; vertical-align: middle; line-height: 0; }
.wr-shape svg { display: block; }
.wr-eq { display: inline-block; padding: 0 2px; cursor: pointer; }
.wr-tbox { border: 1.5px solid #1f3864; padding: 6px 9px; margin: 4px 0 6px 12px; box-sizing: border-box; background: #fff; float: right; }
.wr-tbox[data-pos="left"] { float: left; margin: 4px 12px 6px 0; } .wr-tbox[data-pos="center"] { float: none; margin: 6px auto; }
.wr-tbox-in { outline: none; min-height: 1.2em; }
.wr-cols { column-gap: 0.5in; } .wr-cols[data-n="2"] { column-count: 2; } .wr-cols[data-n="3"] { column-count: 3; }
.wr-body .wr-cols { outline: 1px dotted #c9d2b4; outline-offset: 2px; }
.wr-pb { border-top: 2px dashed #8aa05b; margin: 10px 0; height: 0; text-align: center; user-select: none; }
.wr-pb span { position: relative; top: -10px; background: #fff; padding: 0 8px; font: 600 10px Arial, sans-serif; color: #6b7d43; }
.wr-sel { outline: 2px solid #3b82f6 !important; outline-offset: 2px; }
.wr-lines { position: absolute; inset: 0; pointer-events: none; }
.wr-pl { position: absolute; left: 0; right: 0; border-top: 1.5px dashed #b4b9a5; }
.wr-pl span { position: absolute; right: 6px; top: -9px; background: #e9eae4; color: #6b6f60; font: 600 10px Arial, sans-serif; padding: 1px 6px; border-radius: 8px; }
.wr-status { display: flex; gap: 18px; padding: 4px 12px; background: #3f4f22; color: #e8eedc; font-size: .78rem; }
.wr-st-z { margin-left: auto; }
.wr-float { position: fixed; z-index: 9600; display: flex; gap: 2px; align-items: center; background: #fff; border: 1px solid #cfd5bf; border-radius: 10px; padding: 3px; box-shadow: 0 6px 18px rgba(0,0,0,.18); font-size: .82rem; }
.wr-float.hidden { display: none; }
.wr-float button { border: 0; background: transparent; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.wr-float button:hover { background: #eef1e6; }
.wr-fsz { min-width: 46px; text-align: center; color: #555; }
.wr-ov { position: fixed; inset: 0; z-index: 9700; background: rgba(20,24,12,.42); display: flex; align-items: flex-start; justify-content: center; padding: 60px 12px 12px; overflow: auto; }
.wr-pop { position: relative; background: #fff; color: #1f2328; border-radius: 14px; padding: 16px 18px; width: min(440px, 100%); box-shadow: 0 16px 40px rgba(0,0,0,.25); }
.wr-pop-wide { width: min(940px, 100%); }
.wr-pop h3 { margin: 0 0 10px; padding-right: 30px; font-size: 1.05rem; }
.wr-pop-x { position: absolute; top: 10px; right: 10px; border: 0; background: #f0f2ea; border-radius: 8px; width: 30px; height: 30px; cursor: pointer; }
.wr-btn { border: 1px solid #b9c79a; background: #4A5A28; color: #fff !important; border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: .88rem; }
.wr-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.wr-acts label { display: inline-flex; gap: 4px; align-items: center; font-size: .85rem; } .wr-acts input { width: 64px !important; margin: 0 !important; }
.wr-f { display: flex; flex-direction: column; gap: 3px; font-size: .85rem; margin-bottom: 8px; } .wr-f input { margin: 0 !important; }
.wr-list { max-height: 50vh; overflow: auto; margin: 10px 0; display: flex; flex-direction: column; gap: 4px; }
.wr-li { display: flex; gap: 4px; } .wr-li button[data-open] { flex: 1; text-align: left; border: 1px solid #e0e3d6; background: #fafbf6; border-radius: 8px; padding: 7px 10px; cursor: pointer; display: flex; flex-direction: column; }
.wr-del { border: 0; background: transparent; cursor: pointer; padding: 0 8px; }
.wr-grid { display: grid; grid-template-columns: repeat(10, 22px); gap: 3px; margin: 4px 0; }
.wr-grid i { width: 22px; height: 18px; border: 1px solid #ccd2bd; border-radius: 3px; cursor: pointer; } .wr-grid i.on { background: #cfdcab; border-color: #8aa05b; }
.wr-sym { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 4px; max-height: 50vh; overflow: auto; }
.wr-sym button { border: 1px solid #e0e3d6; background: #fafbf6; border-radius: 6px; height: 36px; font-size: 1.1rem; cursor: pointer; }
.wr-wc { width: 100%; border-collapse: collapse; } .wr-wc td { padding: 5px 4px; border-bottom: 1px solid #eee; } .wr-wc td:last-child { text-align: right; font-weight: 700; }
.wr-prev { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 12px; max-height: 70vh; overflow: auto; background: #e9eae4; padding: 14px; border-radius: 10px; }
.wr-prev-pg { box-shadow: 0 2px 10px rgba(0,0,0,.2); background: #fff; overflow: hidden; flex: none; }
.wr-pp .wr-body-print { font-family: Arial, sans-serif; font-size: 11pt; line-height: 1.15; }
.wr-pp .wr-pp-h, .wr-pp .wr-pp-f { font-family: Arial, sans-serif; font-size: 9pt; color: #555; }
#wr-print { display: none; }
@media (max-width: 700px) {
  .wr-panel { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .wr-panel > button span { display: none; }
  .wr-saved { width: 100%; text-align: right; }
  .wr-logo { display: none; }
}
.wr-body-print .wr-pb { visibility: hidden; } .wr-body-print .wr-cols { outline: none; } .wr-body-print .wr-sel { outline: none !important; }
@media print { #wr-print .wr-pp { box-shadow: none; } }
.wr-body h1, .wr-body h2, .wr-body h3, .wr-body h4, .wr-tbox-in h1, .wr-tbox-in h2 { font-family: Arial, sans-serif; color: inherit; letter-spacing: normal; text-transform: none; }
.wr-shapes { display: inline-flex; flex-wrap: nowrap; }

/* v554 🪪 Instruction Cards picker · 📋 Copy in the Class List */
.idc-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.idc-list { max-height: 46vh; overflow: auto; border: 1px solid var(--line, #E3DCCB); border-radius: 10px; padding: 4px 8px; display: flex; flex-direction: column; }
.idc-row { display: flex; align-items: center; gap: 8px; padding: 4px 2px; font-weight: 400; cursor: pointer; border-bottom: 1px solid rgba(0,0,0,.05); }
.idc-row input { width: auto !important; margin: 0 !important; }
.cl-copy { white-space: nowrap; padding: 3px 9px; font-size: .8rem; }
.cl-copy.on { background: var(--olive, #4A5A28); color: #fff; }
.se-acts { display: inline-flex; gap: 6px; flex-wrap: wrap; }
#btn-cl-cards { width: 100%; }

/* v556 🌨 Seasons on every Teach Screen part: the words on a white box; words-only pages get a box that fits them */
.sl-stage.ts-fxon > .sl, .sl-stage.ts-fxon > .ts-card-in { color: #1f2937; }
.sl-stage.ts-fxon > .sl.td-sl.td-shrink { inset: auto !important; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: max-content; min-width: 34%; max-width: 86%; height: auto; max-height: 84%; padding: 3.2cqw 4.6cqw 4.4cqw !important; }
.sl-stage.ts-fxon > .sl.td-sl.td-shrink .td-body { min-height: 0; flex: 0 1 auto; }
.sl-stage.ts-fxon > .sl.td-sl.td-shrink .td-text { min-height: 1.3em; }
.sl-stage.ts-fxon.ts-card > .ts-card-in { inset: 4.6cqw 5.6cqw; background: var(--slbox, #ffffffee); border-radius: 3.2cqw; box-shadow: 0 1cqw 3cqw #0003; z-index: 1; }
.sl-stage.ts-fxon.ts-card-hi > .ts-card-in, .sl-stage.ts-fxon.ts-card-skill > .ts-card-in, .sl-stage.ts-fxon.ts-card-clean > .ts-card-in { inset: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); width: max-content; min-width: 40%; max-width: 86%; max-height: 88%; padding: 3cqw 4.5cqw 4.8cqw; }
.ts-fxpop { max-height: 70vh; overflow: auto; }
.ts-fxpop .ts-fxh { display: block; padding: 4px 6px 6px; font-size: .9rem; }
.td-laypop .tl-sfx { max-width: 230px; }
/* ---------- v559 🧰 Prepare: phases down the left, the part editor on the right ---------- */
.prep2-ov .prep-top { gap: 8px; }
.prep-lab { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 700; color: var(--ink-soft); }
.prep-lab select { max-width: 280px; }
.prep-sch { font-size: 1rem; }
.prep2 { flex: 1; min-height: 0; display: flex; }
.prep-nav { flex: 0 0 210px; display: flex; flex-direction: column; gap: 4px; padding: 12px 10px; border-right: 1px solid var(--rule); background: var(--paper-2, var(--card)); overflow: auto; }
.prep-nav hr { width: 100%; border: 0; border-top: 1px dashed var(--rule); margin: 6px 0; }
.prep-ph { display: flex; align-items: center; gap: 8px; text-align: left; width: 100%; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.prep-ph span { font-size: 1.15rem; width: 1.5em; text-align: center; }
.prep-ph:hover { background: var(--card); }
.prep-ph.on { background: var(--card); border-color: var(--rule); box-shadow: 0 1px 4px #0001; color: var(--olive-deep, var(--ink)); }
.prep-main { flex: 1; min-width: 0; overflow: auto; padding: 14px 20px 60px; }
.pp-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.pp-head h2 { margin: 0; font-size: 1.3rem; }
.pp-parts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pp-part { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 8px; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); }
.pp-part.on { border-color: var(--olive-base, #6b8e23); box-shadow: 0 0 0 2px color-mix(in srgb, var(--olive-base, #6b8e23) 25%, transparent); }
.pp-part.off .pp-go { opacity: .5; text-decoration: line-through; }
.pp-go { display: flex; flex-direction: column; align-items: flex-start; border: 0; background: none; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; padding: 2px 4px; line-height: 1.15; }
.pp-go small { font-weight: 500; font-size: .7rem; color: var(--ink-soft); }
.pp-mv { display: inline-flex; flex-direction: column; }
.pp-mv button { border: 0; background: none; font-size: .62rem; line-height: 1; padding: 1px 3px; cursor: pointer; color: var(--ink-soft); }
.pp-mv button:disabled { opacity: .25; cursor: default; }
.pp-edit { max-width: 1100px; }
.pp-typed { position: relative; width: 100%; }
.pp-typed .sl-bar { position: static; flex-wrap: wrap; }
.pp-typed .sl-stage { width: min(100%, 960px); margin: 10px 0 0; box-shadow: 0 4px 16px #0002; }
.ps-list { display: flex; flex-direction: column; gap: 6px; max-width: 980px; }
.ps-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); }
.ps-t { flex: 1; min-width: 200px; font-weight: 700; }
.ps-dr { color: #b45309; font-weight: 600; }
.ps-b { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.psc-pop .share-pop-card, .psc-pop > div { max-width: 640px; }
.psc-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.psc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.psc-dn { text-align: center; font-size: .72rem; font-weight: 800; color: var(--ink-soft); }
.psc-d { min-height: 58px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 4px 5px; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.psc-d small { font-size: .62rem; line-height: 1.1; color: var(--olive-deep, #3f5a1a); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.psc-d.has { background: color-mix(in srgb, var(--olive-base, #6b8e23) 14%, var(--card)); }
.psc-d.today { border: 2px solid var(--gold, #d4a017); }
.psc-d.pick { outline: 3px solid var(--olive-base, #6b8e23); }
.psc-pick { margin-top: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.psc-pick select { max-width: 100%; }
.ts-skill-go { display: inline-flex; align-items: center; gap: 12px; margin: 18px auto 6px; padding: 16px 28px; border: 0; border-radius: 18px; background: var(--olive-base, #4c7a2a); color: #fff; font: inherit; font-size: 1.6em; font-weight: 900; cursor: pointer; box-shadow: 0 6px 18px #0003; }
.ts-skill-go span { font-size: 1.2em; }
@media (max-width: 760px) { .prep2 { flex-direction: column; } .prep-nav { flex: 0 0 auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--rule); } .prep-ph { width: auto; white-space: nowrap; } .prep-nav hr { display: none; } }
.prep2-ov .prep-top { flex-wrap: wrap; row-gap: 6px; padding: 8px 12px; }
.prep2-ov .prep-top .btn-small { padding: 6px 10px; }
.prep-lab select { max-width: 200px; padding-top: 4px; padding-bottom: 4px; }
.pp-part { padding: 3px 4px 3px 8px; }
.pp-part input[type=checkbox] { width: auto; margin: 0 2px 0 0; flex: none; }
.pp-go { min-height: 0; width: auto; flex-direction: column; padding: 4px 6px; font-size: .92rem; box-shadow: none; }
.pp-go small { display: block; }
.ad-colw[hidden], .tg-colw[hidden], .tg-namew[hidden] { display: none !important; } /* v560 */
.pp-actdest { margin-bottom: 12px; } .pp-actdest input[type=text] { width: 260px; max-width: 100%; }
/* v561 ☑ several slides selected in Edit slides */
.sle-tn.msel { outline: 3px solid #2f7de1; outline-offset: -1px; background: color-mix(in srgb, #2f7de1 12%, var(--card)); }
.sle-selbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px; margin: 0 0 6px; border-radius: 10px; background: #2f7de1; color: #fff; font-size: .82rem; position: sticky; top: 0; z-index: 3; }
.sle-selbar b { flex: 1; min-width: 90px; }
.sle-selbar button { border: 0; border-radius: 8px; padding: 4px 8px; background: #fff; color: #1d4f91; font: inherit; font-weight: 700; cursor: pointer; }
/* ---------- v562 ✥ Move & resize: boxes placed in % of the slide ---------- */
.sl-free > .sl-body, .sl-free .td-body { position: static !important; display: block !important; }
.sl-free [data-fp] { position: absolute !important; margin: 0 !important; flex: none !important; max-width: none !important; max-height: none !important; min-width: 0 !important; box-sizing: border-box; overflow: hidden; }
.sl-free .sl-fig[data-fp] { display: flex; align-items: center; justify-content: center; }
.sl-free .sl-fig[data-fp] img, .sl-free .sl-fig[data-fp] svg { max-width: 100%; max-height: 100%; object-fit: contain; }
.sl-free .td-pics[data-fp] { display: grid; }
.fr-layer { position: absolute; inset: 0; z-index: 30; pointer-events: none; }
.fr-box { position: absolute; box-sizing: border-box; border: 2px dashed #2f7de1; background: rgba(47, 125, 225, .05); pointer-events: auto; cursor: move; touch-action: none; border-radius: 4px; }
.fr-box:hover, .fr-box.drag { background: rgba(47, 125, 225, .12); border-style: solid; }
.fr-lab { position: absolute; top: -1.9em; left: -2px; font: 700 12px/1 system-ui, sans-serif; color: #fff; background: #2f7de1; padding: 4px 7px; border-radius: 6px 6px 6px 0; white-space: nowrap; pointer-events: none; }
.fr-h { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid #2f7de1; border-radius: 3px; box-sizing: border-box; }
.fr-nw { left: -8px; top: -8px; cursor: nwse-resize; } .fr-ne { right: -8px; top: -8px; cursor: nesw-resize; }
.fr-sw { left: -8px; bottom: -8px; cursor: nesw-resize; } .fr-se { right: -8px; bottom: -8px; cursor: nwse-resize; }
.fr-n { left: calc(50% - 7px); top: -8px; cursor: ns-resize; } .fr-s { left: calc(50% - 7px); bottom: -8px; cursor: ns-resize; }
.fr-e { right: -8px; top: calc(50% - 7px); cursor: ew-resize; } .fr-w { left: -8px; top: calc(50% - 7px); cursor: ew-resize; }
#td-free.on { background: #2f7de1; color: #fff; }
.fr-noselect, .fr-noselect * { user-select: none !important; -webkit-user-select: none !important; }
/* ---------- v563 🌨 the Season behind every Teach Screen part ---------- */
.ts-panel.ts-fxpanel { isolation: isolate; }
.ts-panel.ts-fxpanel > .sl-fxc { position: fixed; z-index: -1; }
body.ts-game.ts-gfx #arcade-play-view { padding: 3px !important; background: var(--gfx-bg) !important; overflow: hidden !important; isolation: isolate; }
body.ts-game.ts-gfx #arcade-play-view > .sl-fxc { z-index: -1; border-radius: inherit; }
body.ts-game.ts-gfx #arcade-play-wrap { position: relative; height: 100% !important; overflow: auto; border-radius: 11px; background: #fff url('assets/logo-wordmark.png') no-repeat left 1.4% bottom 1.6% / auto 4.6%; padding: 1.2% 1.4% 3.2% !important; box-sizing: border-box; }
body.ts-on.ts-th-charcoal.ts-game.ts-gfx #arcade-play-wrap { background-color: #2a2f37; }
.td-pic .td-x.td-upl { left: 2px; right: auto; width: auto; min-width: 26px; padding: 0 6px; border-radius: 12px; background: #000a !important; font-size: 14px; line-height: 22px; } /* v563 ☁️ Put online */
.td-pic img.td-elsewhere { background: repeating-linear-gradient(45deg, #eee 0 10px, #f7f7f7 10px 20px); min-height: 60px; }
/* v564 the Teach Screen menus (🎨 Layout, 🎬 Video, ⏱ Timer…) open on top of 🧰 Prepare, below the button */
body:has(#prep-ov) .ts-mpop { z-index: 9700; max-height: calc(100vh - 24px); overflow: auto; }
/* ---------- v565 🧰 Prepare: ☰ drawer of phases (one opens at a time), title bar, one toolbar row, pages pane ---------- */
.prep3-ov .prep-navbtn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--rule); background: var(--card); color: var(--ink); font-size: 1.1rem; cursor: pointer; flex: none; }
.prep3-ov .prep-navbtn.on { background: var(--olive-base, #4c7a2a); color: #fff; border-color: transparent; }
.prep-tbar { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-bottom: 1px solid var(--rule); background: var(--card); }
.prep-title { font-weight: 800; font-size: 1.05rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prep-title .pt-ph { color: var(--ink-soft); font-weight: 600; }
.prep-title small { font-weight: 500; color: var(--ink-soft); font-size: .75rem; margin-left: 6px; }
.prep2.nav-off .prep-nav { display: none; }
.pa-nav { flex: 0 0 260px !important; gap: 2px !important; }
.pa-h { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 10px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; text-align: left; min-height: 0; box-shadow: none; }
.pa-h:hover, .pa-ph.open > .pa-h, .pa-h.cur { background: var(--card); border-color: var(--rule); }
.pa-ic { width: 1.6em; text-align: center; font-size: 1.1rem; } .pa-t { flex: 1; } .pa-ar { color: var(--ink-soft); font-size: .8rem; }
.pa-parts { display: flex; flex-direction: column; gap: 3px; padding: 4px 0 8px 10px; }
.pa-row { display: flex; align-items: center; gap: 4px; padding: 2px 4px 2px 6px; border-radius: 9px; border: 1px solid transparent; }
.pa-row.cur { background: var(--card); border-color: var(--olive-base, #6b8e23); }
.pa-row.off .pa-go { opacity: .5; }
.pa-row input[type=checkbox] { width: auto; margin: 0; flex: none; }
.pa-go { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; border: 0; background: none; font: inherit; font-weight: 700; font-size: .9rem; color: var(--ink); cursor: pointer; padding: 4px; line-height: 1.15; text-align: left; min-height: 0; box-shadow: none; }
.pa-go small { font-weight: 500; font-size: .68rem; color: var(--ink-soft); }
.pp-blank { height: 100%; min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink-soft); text-align: center; }
.pp-blank div { font-size: 3rem; opacity: .5; }
.prep3-ov .prep-main { padding: 10px 14px 14px; display: flex; flex-direction: column; }
.prep3-ov .pp-typed { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.pt-tools { display: flex; flex-direction: column; gap: 6px; }
.pt-row { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.pt-row[hidden] { display: none; }
.pt-row > button { flex: none; white-space: nowrap; }
.pt-dots { font-weight: 900; letter-spacing: 1px; min-width: 42px; }
.pt-dots.on { background: var(--olive-base, #4c7a2a) !important; color: #fff !important; }
.pt-work { flex: 1; min-height: 0; display: flex; gap: 8px; align-items: flex-start; }
.pt-thumbs { flex: 0 0 180px; max-height: calc(100vh - 220px); overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 6px; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); }
.pt-work.thumbs-off .pt-thumbs { display: none; }
.pt-th-h { display: flex; align-items: center; gap: 4px; position: sticky; top: -6px; background: var(--card); padding: 2px 0 4px; z-index: 2; }
.pt-th-h button { min-height: 0; padding: 3px 8px; }
.pt-th-list { display: flex; flex-direction: column; gap: 8px; }
.pt-th { position: relative; display: block; width: 100%; padding: 0; border: 2px solid var(--rule); border-radius: 8px; background: none; cursor: pointer; overflow: hidden; min-height: 0; box-shadow: none; }
.pt-th.on { border-color: #e0a800; box-shadow: 0 0 0 2px #e0a80055; }
.pt-n { position: absolute; left: 4px; top: 2px; z-index: 3; font: 800 11px/1 system-ui, sans-serif; background: #000a; color: #fff; padding: 2px 5px; border-radius: 6px; }
.pt-mini { display: block; width: 100%; pointer-events: none; }
.pt-thx { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--ink); }
.pt-thtog { flex: none; align-self: center; width: 22px; height: 60px; padding: 0; border-radius: 8px; min-height: 0; }
.pt-stagewrap { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.prep3-ov .pt-stagewrap .sl-stage { width: min(100%, calc((100vh - 230px) * 16 / 9)) !important; margin: 0 !important; box-shadow: 0 4px 16px #0002; }
.pp-actdest { padding: 6px 14px !important; margin-bottom: 8px; } .pp-actdest summary { cursor: pointer; } .prep3-ov .pt-tools button { min-height: 32px; padding: 4px 10px; font-size: .88rem; }
/* ---------- v566 ✏️ the slide editor inside 🧰 Prepare ---------- */
.pp-sle { flex: 1; min-height: 0; display: flex; }
.sle-ov.sle-embed { position: relative !important; inset: auto !important; z-index: auto !important; flex: 1; min-height: 0; width: 100%; background: transparent; }
.sle-embed > .ac-top { display: none !important; }
.sle-embed .sle-rib.sle-rib2 { display: flex; flex-direction: column; gap: 6px; padding: 0 0 8px; border: 0; background: transparent; }
.sle-embed .sle-rib2 .pt-row { gap: 4px; }
.sle-embed .sle-rib2 .pt-row > * { flex: none; }
.sle-embed .sle-main { display: flex !important; gap: 8px; min-height: 0; flex: 1; }
.sle-embed .sle-strip { flex: 0 0 190px; border: 1px solid var(--rule); border-radius: 12px; max-height: calc(100vh - 230px); }
.sle-embed .sle-main.strip-off .sle-strip { display: none; }
.sle-embed .sle-stog { align-self: center; }
.sle-embed .sle-center { flex: 1; min-width: 0; padding: 0 !important; }
.sle-embed #sle-stage { width: min(100%, calc((100vh - 260px) * 16 / 9)) !important; margin: 0 auto; }
.sle-embed .sle-rib.sle-rib2 { align-items: stretch; } .sle-embed .sle-rib2 .pt-row { justify-content: flex-start; }
/* ---------- v567 🎨 live parts as slides you style ---------- */
.sk-objs { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.sk-o { position: absolute; box-sizing: border-box; }
.sk-txt { overflow: hidden; line-height: 1.2; white-space: pre-wrap; word-break: break-word; font-family: inherit; outline: none; }
.sk-img { object-fit: contain; }
.sk-emo { display: flex; align-items: center; justify-content: center; line-height: 1; }
.sk-shape { overflow: visible; }
.sk-bg { position: absolute; inset: 0; z-index: 0; background: center / cover no-repeat; }
.sl-stage.sk-on > .ts-card-in, .sl-stage.sk-on > .sl { z-index: 2; }
.sk-on .ts-card-h, .sk-on .ts-greet, .sk-on .sl-head, .sk-on .ta-h, .sk-on .tl-h, .sk-on h1, .sk-on h2 { color: var(--sk-tc, inherit) !important; zoom: var(--sk-tz, 1); }
.sk-on > .ts-card-in, .sk-on > .sl { color: var(--sk-xc, inherit); }
.sk-on > .ts-card-in > *:not(.ts-card-h), .sk-on > .sl > .sl-body, .sk-on > .sl > .tl-body, .sk-on > .sl > .tq-body { zoom: var(--sk-xz, 1); }
.sl-free > .ts-card-in[data-fp], .sl-free > .sl[data-fp] { right: auto !important; bottom: auto !important; transform: none !important; inset: auto; }
/* in 🧰 Prepare: the real part, in the space below the tools */
.ts-panel.ts-inprep { position: relative !important; inset: auto !important; zoom: 1 !important; z-index: auto !important; width: 100%; flex: 1; min-height: 0; display: flex; align-items: flex-start; justify-content: center; overflow: visible; padding: 0 !important; background: transparent !important; }
.ts-inprep .sl-stage { width: min(100%, calc((100vh - 270px) * 16 / 9)) !important; margin: 0 auto; }
.ts-inprep .sk-objs { pointer-events: none; } .ts-inprep .sk-o { pointer-events: auto; cursor: pointer; }
.ts-inprep .sk-o.sel { outline: 2px dashed #2f7de1; outline-offset: 2px; }
.ts-inprep .sl-nav, .ts-inprep .ts-next-pill { display: none !important; }
.sk-host { flex: 1; min-height: 0; display: flex; margin-top: 8px; }
.sk-tools .pt-row > label.sk-lab { display: inline-flex; align-items: center; gap: 4px; flex: none; font-weight: 700; }
.sk-tools select { width: auto; max-width: 180px; padding-top: 3px; padding-bottom: 3px; }
.sk-tools button.on { background: var(--olive-base, #4c7a2a); color: #fff; }
.sk-drawer { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 10px; background: var(--card); }
.sk-drawer[hidden] { display: none; }
.sk-drawer button { min-height: 30px; padding: 3px 9px; }
.sk-sw { width: 26px; height: 26px; min-height: 0 !important; padding: 0 !important; border-radius: 50% !important; border: 2px solid #0003 !important; }
.sk-sw.on { outline: 3px solid #2f7de1; outline-offset: 1px; }
.sk-emb { font-size: 1.2rem; padding: 2px 6px !important; }
.sk-sep { width: 1px; height: 22px; background: var(--rule); margin: 0 4px; }
.pp-sw { display: inline-flex; gap: 4px; margin-bottom: 8px; }
.pp-sw button { min-height: 32px; padding: 4px 14px; border-radius: 999px; }
.pp-sw button.on { background: var(--olive-base, #4c7a2a); color: #fff; }
.pp-swb { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* v569 🙏 ▶ / ⏸ the prayer, bottom right of the Prayer slide (Space does the same). In full screen it fades away until the mouse moves. */
.ts-pray { position: fixed; z-index: 8965; display: flex; flex-direction: row-reverse; align-items: center; gap: 0; height: 44px; min-width: 44px; padding: 0; border: 0; border-radius: 99px; background: rgba(123, 30, 46, .88); color: #fff; font: 600 14px/1 'IBM Plex Sans', system-ui, sans-serif; cursor: pointer; box-shadow: 0 2px 8px #0004; transition: opacity .35s, transform .15s; }
.ts-pray > span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #E8B931; color: #5a1220; font-size: 18px; letter-spacing: -2px; }
.ts-pray > em { font-style: normal; white-space: nowrap; max-width: 0; overflow: hidden; transition: max-width .3s, padding .3s; }
.ts-pray:hover > em, .ts-pray:focus-visible > em, .ts-pray.ask > em { max-width: 320px; padding: 0 10px 0 14px; }
.ts-pray:hover { transform: scale(1.04); }
.ts-pray.on > span { background: #fff3cf; }
.ts-pray.ask > span { animation: tsPrayAsk 1.2s ease-in-out infinite; }
@keyframes tsPrayAsk { 50% { box-shadow: 0 0 0 8px rgba(232, 185, 49, .35); } }
body:not(.ts-on) .ts-pray { display: none; }
body.ts-present .ts-pray { opacity: 0; }
body.ts-present.ts-mouse .ts-pray, body.ts-present .ts-pray:hover, body.ts-present .ts-pray.ask { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .ts-pray.ask > span { animation: none; } }
/* v570 the round button alone (no maroon edge); the maroon pill only when its words show · 📷 sits lower, under the answer boxes */
.ts-pray { background: transparent; box-shadow: none; }
.ts-pray > span { box-shadow: 0 2px 8px #0004; }
.ts-pray:hover, .ts-pray:focus-visible, .ts-pray.ask { background: rgba(123, 30, 46, .88); box-shadow: 0 2px 8px #0004; }

/* ================= v571 🖥 Presenter View ================= */
/* the projector (main window): only the slide */
body.pv-on #ts-bar, body.pv-on #ts-fnav, body.pv-on .ts-pray, body.pv-on #ts-nextnote, body.pv-on .ts-drawer, body.pv-on #ts-setdrw, body.pv-on #ts-inkdrw { display: none !important; }
body.pv-on .ts-panel { bottom: 0; }
.pv-badge { position: fixed; z-index: 9600; top: 14px; left: 50%; transform: translateX(-50%); background: rgba(123, 30, 46, .92); color: #fff; font: 700 clamp(15px, 1.4vw, 26px)/1.2 'IBM Plex Sans', system-ui, sans-serif; padding: 10px 22px; border-radius: 99px; box-shadow: 0 4px 16px #0004; pointer-events: none; }
.pv-ask { position: fixed; z-index: 9900; left: 50%; bottom: 84px; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); background: #fff; color: #1f2937; border: 2px solid #7B1E2E; border-radius: 16px; padding: 16px 18px; box-shadow: 0 10px 40px #0005; font: 15px/1.45 'IBM Plex Sans', system-ui, sans-serif; }
.pv-ask b { font-size: 17px; color: #7B1E2E; }
.pv-ask p { margin: 6px 0 12px; }
.pv-ask-r { display: flex; gap: 8px; flex-wrap: wrap; }
.tq-c .pv-cnt { margin-left: auto; }

/* the presenter window (your laptop) */
body.pv-win { margin: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; background: #1b1f27; color: #eef0f3; font: 15px/1.4 'IBM Plex Sans', system-ui, sans-serif; }
.pv-top { display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: #7B1E2E; color: #fff; flex: none; }
.pv-brand { font-size: 16px; white-space: nowrap; }
.pv-sec { opacity: .85; white-space: nowrap; }
.pv-sp { flex: 1; }
.pv-clock { font-weight: 700; font-size: 18px; color: #E8B931; white-space: nowrap; }
.pv-tm { display: inline-flex; align-items: center; gap: 4px; background: #0003; border-radius: 99px; padding: 2px 4px 2px 12px; }
.pv-tm b { font-size: 18px; font-variant-numeric: tabular-nums; min-width: 52px; }
.pv-tm button, .pv-end { border: 0; border-radius: 99px; background: #fff2; color: #fff; font: 600 14px/1 inherit; font-family: inherit; padding: 7px 11px; cursor: pointer; }
.pv-tm button:hover, .pv-end:hover { background: #fff4; }
.pv-end { background: #fff; color: #7B1E2E; }
.pv-end:hover { background: #fde8ec; }
.pv-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); gap: 12px; padding: 12px 14px 8px; }
.pv-nowc, .pv-side { min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.pv-h { font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: #E8B931; }
.pv-h em { font-style: normal; text-transform: none; letter-spacing: 0; color: #cfd5de; font-weight: 600; margin-left: 6px; }
.pv-now { position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: 12px; background: #000; box-shadow: 0 0 0 3px #E8B931; isolation: isolate; }
.pv-scale { position: absolute; transform-origin: 0 0; overflow: hidden; pointer-events: none; background: var(--ts-bg, #fbf6ea); }
.pv-scale .sl-nav, .pv-scale .sl-bar, .pv-scale .tss-bar, .pv-scale .td-x { display: none !important; }
.pv-ph { display: grid; place-items: center; height: 100%; min-height: 80px; background: #222; color: #fff; font-size: 22px; text-align: center; }
.pv-ph-big { position: absolute; inset: 0; font-size: 26px; line-height: 1.5; }
.pv-ph small { font-size: 15px; opacity: .8; }
.pv-ctl { display: flex; align-items: center; gap: 10px; flex: none; }
.pv-acts { flex: 1; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pv-nav, .pv-act { border: 0; border-radius: 12px; font: 700 16px/1 inherit; font-family: inherit; padding: 13px 20px; cursor: pointer; background: #2d3340; color: #fff; }
.pv-nav:hover, .pv-act:hover { background: #3a4252; }
.pv-go { background: #E8B931; color: #4a1019; }
.pv-go:hover { background: #f2c94c; }
.pv-act { background: #7B1E2E; }
.pv-act:hover { background: #932537; }
.pv-next { display: flex; align-items: center; gap: 12px; background: #262b35; border-radius: 12px; padding: 12px 14px; font-size: 17px; font-weight: 600; min-height: 56px; }
.pv-next small { display: block; font-size: 12px; font-weight: 500; color: #9aa3b2; }
.pv-nxi { font-size: 28px; }
#pv-notes { flex: 1; min-height: 120px; resize: none; border: 0; border-radius: 12px; padding: 12px 14px; background: #fffdf6; color: #1f2937; font: 19px/1.5 'IBM Plex Sans', system-ui, sans-serif; }
#pv-notes:disabled { background: #2a2f39; color: #9aa3b2; }
.pv-tip { font-size: 12px; color: #9aa3b2; }
.pv-strip { flex: none; display: flex; gap: 6px; overflow-x: auto; padding: 8px 14px 12px; background: #151920; }
.pv-pt { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 78px; border: 2px solid transparent; border-radius: 10px; background: #262b35; color: #dfe3ea; padding: 6px 8px; cursor: pointer; font-family: inherit; }
.pv-pt span { font-size: 22px; line-height: 1.1; }
.pv-pt small { font-size: 11px; white-space: nowrap; }
.pv-pt:hover { background: #313847; }
.pv-pt.on { border-color: #E8B931; background: #3a2a14; color: #fff; }
.pv-toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); background: #fff; color: #1f2937; padding: 10px 16px; border-radius: 10px; box-shadow: 0 6px 24px #0007; max-width: 80vw; z-index: 10; }
body.pv-win .ac-ov { z-index: 50; }
@media (max-width: 900px) { .pv-main { grid-template-columns: 1fr; } .pv-side { max-height: 40vh; } }

/* 🧰 Prepare: 📝 Notes under the part */
.pp-notes { margin-top: 10px; }
.ppn-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.pp-notes textarea { width: 100%; box-sizing: border-box; min-height: 64px; resize: vertical; border: 1px solid var(--line, #d8d2c4); border-radius: 10px; padding: 8px 10px; font: 15px/1.45 'IBM Plex Sans', system-ui, sans-serif; background: #fffdf6; color: #1f2937; }

/* ================= v572 🧰 Prepare, the new look ================= */
.prep3-ov .prep-top { flex-wrap: nowrap; gap: 10px; padding: 8px 14px; }
.prep3-ov .prep-top .prep-lab select { max-width: 220px; }
.prep-subj1 { font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.prep-col { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.prep-col > .prep-title { padding: 10px 16px 2px; flex: none; }
.prep-col > .prep-main { flex: 1; min-height: 0; }
.prep3-ov .prep-main { overflow: hidden; }
.prep3-ov .pp-typed, .prep3-ov .pp-sle, .prep3-ov .pp-swb { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.prep3-ov .pp-swb > .pt-tools ~ .pt-work, .prep3-ov .prep-main > .pt-work { flex: 1; min-height: 0; }
/* the toolbar: two lines of icons */
.pu-bar { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); flex: none; }
.pu-row { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.pu-sep { flex: none; width: 1px; height: 24px; background: var(--rule); margin: 0 4px; }
.pu-bar .pu-b, .pu-bar button.pu-b { flex: none; width: 38px; height: 38px; min-height: 0; padding: 0; display: inline-grid; place-items: center; border: 1px solid var(--rule); border-radius: 9px; background: #f3f1ec; color: var(--ink); font: 600 17px/1 'IBM Plex Sans', system-ui, sans-serif; cursor: pointer; box-shadow: none; white-space: nowrap; overflow: hidden; position: relative; }
.pu-bar .pu-b:hover:not(:disabled):not(.pu-off) { background: #e9e5da; }
.pu-bar .pu-b.on, .pu-bar .pu-b.sle-on, .pu-bar .pu-b.open { background: var(--olive-base, #4c7a2a); color: #fff; border-color: transparent; }
.pu-bar .pu-b:disabled, .pu-bar .pu-b.pu-off { opacity: .32; cursor: default; filter: grayscale(1); }
.pu-bar .pu-b .tsi { font-size: 17px; line-height: 1; }
.pu-bar .pu-b .tsi-badge { display: none; }
.pu-dot { width: 20px; height: 20px; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #0003; display: block; }
.pu-b[data-pu="color"]::after { content: '▾'; position: absolute; right: 2px; bottom: 0; font-size: 9px; color: var(--ink-soft); }
.pu-b[data-pu="season"]::after { content: '▾'; position: absolute; right: 2px; bottom: 0; font-size: 9px; color: var(--ink-soft); }
.pu-tb { display: grid; place-items: center; width: 20px; height: 17px; border: 2px solid currentColor; border-radius: 3px; font: 800 12px/1 Georgia, serif; }
.pu-stash { display: none !important; }
.pu-pop { position: fixed; z-index: 9800; background: #fff; color: #1f2937; border: 1px solid var(--rule, #ddd); border-radius: 12px; box-shadow: 0 10px 30px #0003; padding: 10px; max-width: min(460px, 92vw); }
.pu-cols { display: grid; grid-template-columns: repeat(5, 32px); gap: 8px; }
.pu-cols button, .pu-sw { width: 32px !important; height: 32px !important; min-height: 0 !important; padding: 0 !important; border-radius: 50% !important; border: 0 !important; box-shadow: inset 0 0 0 1px #0002 !important; cursor: pointer; }
.pu-cols button:hover { transform: scale(1.1); }
.pu-colrows { display: flex; flex-direction: column; gap: 10px; }
.pu-colrow { display: flex; flex-direction: column; gap: 6px; }
.pu-colrow b, .pu-sizes b { font-size: 13px; }
.pu-sizes { display: flex; flex-direction: column; gap: 8px; }
.pu-sizes > div { display: flex; align-items: center; gap: 8px; }
.pu-sizes b { min-width: 72px; }
.pu-sizes button, .pu-wide { min-height: 0; padding: 5px 10px; border: 1px solid var(--rule, #ddd); border-radius: 8px; background: #f3f1ec; cursor: pointer; font-weight: 700; }
.pu-pop .sle-bgw, .pu-pop .sk-lab { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.pu-pop .sle-bgw select, .pu-pop .sk-lab select { max-width: 240px; }
.sle-embed .sle-rib.pu-host { padding: 0 0 8px; border: 0; background: transparent; display: block; }
.sk-tools { position: relative; flex: none; }
.sk-tools > .sk-drawer { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; max-width: 100%; box-shadow: 0 10px 28px #0003; }
/* the slide as big as on the Teach Screen, made smaller to fit */
.pt-work { margin-top: 8px; align-items: stretch !important; }
.pt-thumbs { max-height: none !important; align-self: stretch; }
.sle-embed .sle-strip { max-height: none !important; align-self: stretch; }
.pt-th .pt-lab { display: block; padding: 22px 8px 14px; font-weight: 700; font-size: 13px; text-align: center; }
.pfx-box { position: relative; flex: 1; min-width: 0; min-height: 200px; overflow: hidden; border-radius: 12px; background: var(--ts-bg, #fbf6ea); box-shadow: inset 0 0 0 1px var(--rule, #0001); }
.pfx-cv { position: absolute; left: 0; top: 0; transform-origin: 0 0; overflow: hidden; }
.pfx-panel { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.pfx-cv .sl-stage, .prep3-ov .pfx-cv .sl-stage, .prep3-ov .pt-stagewrap.pfx-box .sl-stage, .pfx-cv .ts-inprep .sl-stage, .sle-embed .pfx-cv #sle-stage { width: var(--pfx-sw) !important; aspect-ratio: 16 / 9 !important; height: auto !important; max-height: none !important; margin: 0 !important; flex: none !important; }
.pfx-cv .ts-panel.ts-inprep { position: absolute !important; inset: 0 !important; width: auto !important; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 70px !important; overflow: hidden; }
.sle-embed .sle-center { display: flex; flex-direction: column; min-height: 0; }
.sle-embed .sle-center > .pfx-box { flex: 1; }
.sle-embed .sle-cap { flex: none; font-size: 13px; padding: 4px 6px 0; }
.sk-host.pfx-panel { margin: 0 !important; }
/* 📝 Notes: a floating window */
.pn-win { position: fixed; z-index: 9700; width: 340px; height: 210px; min-width: 240px; min-height: 140px; resize: both; overflow: hidden; display: flex; flex-direction: column; background: #fffbe8; border: 1px solid #e6d58a; border-radius: 12px; box-shadow: 0 12px 34px #0004; }
.pn-h { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: #E8B931; color: #4a1019; font-weight: 700; font-size: 14px; cursor: move; user-select: none; flex: none; }
.pn-h span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-x { border: 0; background: transparent; color: #4a1019; font-size: 16px; font-weight: 800; cursor: pointer; min-height: 0; padding: 0 4px; }
.pn-win textarea { flex: 1; resize: none; border: 0; outline: 0; background: transparent; padding: 10px 12px; font: 16px/1.5 'IBM Plex Sans', system-ui, sans-serif; color: #1f2937; }
.pn-win textarea:disabled { color: #8a8f99; }
.sle-embed .sle-center > .pfx-box { align-self: stretch; width: 100%; }
.sle-embed .sle-center { align-items: stretch !important; }
.pu-bar .pu-b, .pu-bar button.pu-b { width: clamp(28px, 2.6vw, 38px); height: clamp(28px, 2.6vw, 38px); font-size: clamp(13px, 1.15vw, 17px); border-radius: clamp(7px, .6vw, 9px); }
.pu-row { gap: clamp(2px, .3vw, 5px); }
.pu-sep { margin: 0 clamp(1px, .25vw, 4px); }
.pu-bar .pu-b .tsi { font-size: clamp(13px, 1.15vw, 17px); }
.pu-dot { width: clamp(15px, 1.35vw, 20px); height: clamp(15px, 1.35vw, 20px); }
/* v573 */
.pu-row[hidden] { display: none !important; }
.prep3-ov .prep-col > .prep-main { padding-top: 2px; }
.prep-col > .prep-title { padding-bottom: 0; }
.prep3-ov .prep-top .prep-lab select { max-width: 360px; }
/* v573 Teach Screen: no editing tools above the slide; ⋯ at the slide's top right holds the class tools */
body.ts-on #ts-panel:not(.ts-inprep) > .sl-bar, body.ts-on #ts-panel:not(.ts-inprep) .tss-bar { display: none !important; }
.ts-ctools { position: fixed; z-index: 8966; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(35, 43, 58, .62); color: #fff; font: 800 20px/1 system-ui, sans-serif; cursor: pointer; box-shadow: 0 2px 8px #0003; transition: opacity .35s; }
.ts-ctools:hover { background: rgba(123, 30, 46, .9); }
body:not(.ts-on) .ts-ctools, body.pv-on .ts-ctools { display: none; }
body.ts-present .ts-ctools { opacity: 0; }
body.ts-present.ts-mouse .ts-ctools, body.ts-present .ts-ctools:hover { opacity: 1; }
.pu-list { display: flex; flex-direction: column; gap: 4px; min-width: 220px; }
.pu-list button { text-align: left; border: 0; border-radius: 8px; background: transparent; padding: 8px 10px; font: 600 15px/1.2 'IBM Plex Sans', system-ui, sans-serif; color: #1f2937; cursor: pointer; }
.pu-list button:hover, .pu-list button.on { background: #f3ecd9; }
/* lesson slides in Prepare: the whole text box at once */
.sle-embed .sle-wbar { display: none !important; }
.sle-box { outline: 2px solid #E8B931; outline-offset: 4px; border-radius: 4px; min-height: 1.4em; cursor: text; white-space: normal; }
.sle-box > div { min-height: 1.35em; }
.sl-text.sle-boxhost, .sl-jt.sle-boxhost { overflow: visible !important; }
/* Presenter View */
body.pv-on { --ts-barh: 0px; }
body.pv-on .sl-stage { width: min(calc(100vw - 150px), calc((100vh - 24px) * 16 / 9)); }
.pv-nowwrap { flex: 1; min-height: 0; display: grid; place-items: center; }
.pv-now { flex: none !important; cursor: pointer; }
.pv-mir, .pv-ink { position: absolute; inset: 0; }
.pv-ink { pointer-events: none; z-index: 5; }
.pv-mir .pv-scale { position: absolute; left: 0; top: 0; }
.pv-hint { float: right; font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; color: #9aa3b2; }
.pv-bottom { flex: none; display: flex; align-items: stretch; gap: 8px; background: #151920; padding: 6px 10px 8px; }
.pv-bottom .pv-strip { flex: 1; min-width: 0; display: flex; gap: 4px; overflow: hidden; padding: 0; background: transparent; }
.pv-bottom .pv-pt { flex: 1 1 0; min-width: 0; padding: 4px 2px; gap: 1px; border-radius: 8px; }
.pv-bottom .pv-pt span { font-size: clamp(14px, 1.4vw, 20px); }
.pv-bottom .pv-pt small { font-size: clamp(8px, .72vw, 11px); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pv-tools { flex: none; display: flex; gap: 4px; align-items: center; padding-left: 8px; border-left: 1px solid #2d3340; }
.pv-tools button { width: 40px; height: 40px; border: 0; border-radius: 10px; background: #262b35; color: #fff; font-size: 19px; cursor: pointer; }
.pv-tools button:hover { background: #313847; }
.pv-tools button.on { background: #7B1E2E; }
.pv-more { background: #2d3340 !important; }
body.pv-win .pu-pop { position: fixed; z-index: 60; }
/* ================= v574 📱 Phone camera ================= */
#ts-cam.cam-live, [data-pvt="cam"].cam-live, #prep-cam.cam-live { background: #1f7a4d !important; color: #fff !important; }
#ts-cam.cam-wait, [data-pvt="cam"].cam-wait { box-shadow: inset 0 0 0 2px #E8B931; }
#prep-cam.cam-live .pa-t::after { content: ' · linked'; font-size: .8em; font-weight: 600; }
.cam-pan { position: fixed; inset: 0; z-index: 9850; background: #0007; display: grid; place-items: center; padding: 16px; }
.cam-card { width: min(760px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; color: #1f2937; border-radius: 16px; padding: 16px 18px; box-shadow: 0 16px 50px #0006; font: 15px/1.45 'IBM Plex Sans', system-ui, sans-serif; }
.cam-h { display: flex; align-items: center; gap: 10px; }
.cam-h b { font-size: 18px; color: #7B1E2E; }
.cam-st { flex: 1; font-weight: 600; font-size: 14px; }
.cam-x { border: 0; background: transparent; font-size: 20px; cursor: pointer; }
.cam-sw { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 10px; font-size: 16px; }
.cam-sw input { width: 22px; height: 22px; }
.cam-main { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.cam-main.hidden, .cam-off.hidden { display: none; }
.cam-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 300px; text-align: center; }
.cam-qrbox svg { width: 280px; height: 280px; display: block; }
.cam-off { display: flex; flex-direction: column; gap: 6px; }
.cam-vbox { background: #111; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; }
.cam-vbox video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
@media (max-width: 640px) { .cam-main { grid-template-columns: 1fr; } }
.cam-ph { position: fixed; inset: 0; z-index: 9900; background: #000; color: #fff; display: flex; flex-direction: column; font-family: 'IBM Plex Sans', system-ui, sans-serif; }
.cam-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #7B1E2E; }
.cam-top button { border: 0; border-radius: 10px; background: #fff2; color: #fff; padding: 8px 12px; font: 600 14px/1 inherit; font-family: inherit; }
.cam-st2 { font-size: 13px; opacity: .9; }
.cam-body { position: relative; flex: 1; min-height: 0; }
.cam-body video, .cam-body canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-big { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); background: #000b; padding: 10px 18px; border-radius: 14px; font-size: 20px; text-align: center; max-width: 92%; }
.cam-big:empty { display: none; }
.cam-big b { font-size: 34px; color: #E8B931; }
.cam-ans { position: absolute; inset: 12px; background: #fff; color: #1f2937; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 14px; text-align: center; }
.cam-ans.hidden { display: none; }
.cam-ans svg { width: min(78vw, 60vh); height: auto; }
.ac-cam-phone { background: #1b1f27 !important; }
.ac-cam-phone .ac-tip { font-size: 20px; top: 50%; bottom: auto; left: 50%; transform: translate(-50%, -50%); }
/* v576 ✅ Practice · Exit Ticket: numbered items; short choices in one row of 4, formulas 2 × 2 and bigger, a figure on the right half */
.tq-num { display: inline-grid; place-items: center; min-width: 1.4em; height: 1.4em; padding: 0 .16em; box-sizing: border-box; border: .1em solid #7B1E2E; border-radius: 999px; color: #7B1E2E; font-weight: 800; line-height: 1; margin-right: .4em; vertical-align: middle; }
.tq-sl:is(.tq-k-row, .tq-k-fx) .tq-q { flex: 1 1 auto !important; max-height: none !important; min-height: 0; }
.tq-sl:is(.tq-k-row, .tq-k-fx) .tq-ch { flex: 0 0 auto !important; grid-template-rows: none !important; grid-auto-rows: auto !important; align-content: end; }
.tq-sl.tq-k-row .tq-ch { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tq-sl:is(.tq-k-row, .tq-k-fx) .tq-c { padding: 4px 1.2cqw 4px 5cqw !important; min-height: calc(3.5cqw + 8px); }
.tq-sl:is(.tq-k-row, .tq-k-fx) .tq-c b { top: 4px !important; }
.tq-sl:is(.tq-k-row, .tq-k-fx) .tq-c > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; max-height: none; font-size: var(--tqz); line-height: 1.2; }
.tq-z1 { --tqz: 5cqw; } .tq-z2 { --tqz: 3.6cqw; } .tq-z3 { --tqz: 2.6cqw; } .tq-k-fx { --tqz: 3.8cqw; }
/* v578 the drawing / table fills the right half, top to bottom */
.tq-sl.tq-hasfig .tq-q { align-items: stretch !important; }
.tq-sl.tq-hasfig .tq-q .tq-fig { flex: 0 0 50% !important; align-self: stretch; display: flex; justify-content: center; align-items: center; min-height: 0; overflow: hidden; }
.tq-sl.tq-hasfig .tq-fig .mf-fig { width: 100%; height: 100%; margin: 0 !important; display: flex; align-items: center; justify-content: center; }
.tq-sl.tq-hasfig .tq-fig .mf-fig svg { width: 100%; height: 100%; max-height: none !important; }
.tq-sl.tq-hasfig .tq-fig .mf-table { margin: 0 auto; width: auto; } .tq-sl.tq-hasfig .tq-fig .mf-table :is(th, td) { padding: .3em .6em; }
/* v578 👥 the student picker (every section) · extra tasks · who gets this */
.spk-box { max-height: 52vh; overflow: auto; border: 1px solid var(--rule); border-radius: 10px; padding: 8px 10px; background: var(--paper); }
.spk-all { display: flex; align-items: center; gap: 8px; padding: 4px 2px 8px; border-bottom: 1px solid var(--rule); margin-bottom: 6px; }
.spk-sec { margin: 4px 0; } .spk-sec > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 2px; list-style: revert; }
.spk-sec > summary label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.spk-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; padding: 2px 0 6px 22px; }
.tp-who { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; margin: 0 0 10px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); }
.tp-who label { display: flex; align-items: baseline; gap: 6px; cursor: pointer; }
.pt-extras { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--rule); }
.pt-extras-h { font-weight: 700; margin-bottom: 8px; }
.task-card.pt-extra { border-style: dashed; }
.spk-box input[type=checkbox], .tp-who input[type=radio] { width: auto !important; flex: none; margin: 0; min-height: 0; }
.spk-all, .spk-sec > summary label, .tp-who label, .spk-box .rcv-check { display: flex !important; justify-content: flex-start !important; align-items: center; gap: 7px; width: auto !important; text-align: left; margin: 0 !important; font-weight: inherit; text-transform: none; letter-spacing: 0; white-space: normal; }
.spk-sec > summary label { white-space: nowrap; }
.tp-who label small, .spk-all small { margin-left: 2px; }
/* v579 📱↻ in 🧰 Prepare (phones and tablets only) */
.prep-rot { display: none !important; }
@media (pointer: coarse) { .prep-rot { display: inline-flex !important; } }
.prep-rot.on { background: var(--olive, #4b6125) !important; color: #fff !important; }
/* v581 ✍️ Writer Home: one line, tighter buttons, Line spacing / Spacing / Indent as icons */
.wr-panel[data-p="Home"] { flex-wrap: nowrap; gap: 1px; overflow-x: auto; scrollbar-width: thin; }
.wr-panel[data-p="Home"] > button { padding: 4px 5px; min-width: 28px; }
.wr-panel[data-p="Home"] .wr-sep { margin: 0 2px; }
.wr-panel[data-p="Home"] .wr-font { width: 128px !important; } .wr-panel[data-p="Home"] .wr-style { width: 96px !important; } .wr-panel[data-p="Home"] .wr-size { width: 56px !important; }
.wr-panel select.wr-isel { width: 44px !important; padding: 2px 2px !important; text-align: center; font-size: 1rem; flex: none; }
/* v582 🔒 Admin → Data Privacy: 👁 Show */
.apc-show { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.apc-show label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; margin: 0; }
.apc-show select { width: auto !important; min-width: 200px; }
/* v582 📽️ a Slide file shown in a Teach Screen part */
.ts-sfstage { display: flex; align-items: center; justify-content: center; }
.ts-sfstage .sd-tsbox { position: relative; width: 100%; max-height: 100%; overflow: hidden; border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.18); background: #fff; }
.ps-sf .sf-part { width: auto !important; max-width: 220px; }
/* v585 🧰 Prepare on an upright phone: the top bar wraps, the list of phases stacks on top (it folds away when a part opens; ☰ brings it back) */
@media (max-width: 760px) {
  .prep3-ov .prep-top { flex-wrap: wrap !important; row-gap: 6px; gap: 8px; padding: 8px 10px; }
  .prep3-ov .prep-top > b { font-size: 1rem; }
  .prep3-ov .prep-top .prep-subj1, .prep3-ov .prep-top #prep-subj { min-width: 0; max-width: calc(100vw - 190px); overflow: hidden; text-overflow: ellipsis; }
  .prep3-ov .prep-top .prep-lab { order: 5; flex: 1 1 100%; min-width: 0; }
  .prep3-ov .prep-top .prep-lab select { flex: 1; min-width: 0; max-width: none !important; }
  .prep3-ov .prep-top > span[style*="flex:1"] { display: none; }
  .prep3-ov .prep-top .btn-small { order: 6; padding: 6px 8px; font-size: .82rem; min-height: 34px; }
  .prep3-ov .prep-top #prep-x { margin-left: auto; }
  .prep3-ov .prep2 { flex-direction: column; }
  .prep3-ov .pa-nav { flex: 0 1 auto !important; flex-direction: column !important; overflow-x: hidden !important; overflow-y: auto !important; max-height: 46vh; border-right: 0 !important; border-bottom: 1px solid var(--rule); padding: 6px 8px; }
  .prep3-ov .pa-nav hr { display: block !important; }
  .prep3-ov .pa-h { white-space: normal; padding: 8px 10px; }
  .prep3-ov .prep-col { flex: 1; min-height: 0; }
  .prep3-ov .prep-title { white-space: normal; padding: 8px 12px 2px !important; }
  .prep3-ov .pp-blank { min-height: 180px; padding: 0 16px; }
}
/* v586 🃏 windows opened from 🧰 Prepare (Answer Cards, …) show above it, not behind it */
body:has(#prep-ov) #fg-popup { z-index: 9850; }

/* v604 💾 Saved slides: the page scrolls; ⬇ Download ▾ menu */
.prep3-ov .prep-main.pp-scroll { overflow-y: auto !important; display: block !important; -webkit-overflow-scrolling: touch; }
.ps-dd { position: fixed; z-index: 9900; min-width: 210px; padding: 6px; border-radius: 12px; background: var(--card, #fff); border: 1px solid var(--rule, #ddd); box-shadow: 0 10px 28px #0003; display: flex; flex-direction: column; gap: 2px; }
.ps-dd button { text-align: left; padding: 9px 12px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.ps-dd button:hover:not(:disabled) { background: var(--olive-pale, #eef3e4); }
.ps-dd button:disabled { opacity: .5; cursor: wait; }
.ps-dd .ps-dd-more { font-weight: 500; font-size: .88rem; border-top: 1px solid var(--rule, #ddd); border-radius: 0 0 8px 8px; }
.ps-dd-msg:empty { display: none; } .ps-dd-msg { padding: 4px 10px 6px; font-size: .82rem; color: var(--muted, #666); }

/* v606 💾 Saved slides as a table: Title of the slide | Last edit | Options (smaller text, one line per lesson) */
.ps-tab { max-width: 1180px; gap: 4px; }
.ps-tab .ps-hd, .ps-tab .ps-row { display: grid; grid-template-columns: minmax(0, 1fr) 176px auto; align-items: center; gap: 12px; }
.ps-tab .ps-hd { padding: 2px 12px 4px; font-size: .74rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #6b6b6b); border-bottom: 1px solid var(--rule); }
.ps-tab .ps-hd span:last-child { min-width: 286px; }
.ps-tab .ps-row { padding: 5px 8px 5px 12px; border-radius: 8px; font-size: .9rem; flex-wrap: nowrap; }
.ps-tab .ps-t { min-width: 0; display: flex; align-items: center; gap: 6px; font-weight: 700; }
.ps-tab .ps-tt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-tab .ps-dr { flex: none; font-size: .74rem; }
.ps-tab .ps-when { font-size: .82rem; color: var(--muted, #6b6b6b); white-space: nowrap; }
.ps-tab .ps-b { flex-wrap: nowrap; gap: 5px; }
.ps-tab .ps-b .btn-small { padding: 5px 11px; min-height: 30px; font-size: .84rem; }
.ps-tab .ps-row:hover { border-color: var(--olive-base, #4c7a2a); }
@media (max-width: 760px) { /* upright phone: the date under the title, the buttons below */
  .ps-tab .ps-hd { display: none; }
  .ps-tab .ps-row { grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 8px 10px; }
  .ps-tab .ps-when { font-size: .76rem; }
  .ps-tab .ps-b { flex-wrap: wrap; }
}

/* v607 Teach Screen: the game is chosen in Prepare (no dropdowns on top); the 🎮 Skill slide is as big as the others; ✕ Close game is a small button */
.ts-panel.ts-skillpick .sl-stage, body.ts-present .ts-panel.ts-skillpick .sl-stage { width: min(calc(100vw - 150px), calc((100vh - var(--ts-barh, 56px) - 24px) * 16 / 9)) !important; }
body.ts-present .ts-panel.ts-skillpick { justify-content: center !important; padding-top: 8px !important; }
.tss-skill.tss-skill-x { left: auto; right: 10px; top: 8px; transform: none; padding: 0; border: 0; background: none; box-shadow: none; }
.tss-skill.tss-skill-x button { padding: 5px 12px; font-size: .85rem; background: var(--card); box-shadow: 0 2px 8px #0002; }
body.ts-game #arcade-play-view { width: min(calc(100vw - 150px), calc((100vh - 24px - var(--ts-barh, 56px) - 20px) * 16 / 9)) !important; margin-top: 12px !important; }

/* v607 🃏 scanning: the class sees only who answered (✓, no colours); the key is chosen after ✅ Done; A–D cards with their counts */
.ac-top .ac-key { display: none !important; }
.ac-st.got, .ac-st.ok, .ac-st.no { background: var(--card); border-color: var(--rule); }
.ac-st .ac-chk { margin-left: auto; font-weight: 900; color: var(--ink); }
.ac-rkey { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.ac-rkey button { border: 1px solid var(--rule); background: var(--card); color: inherit; border-radius: 8px; padding: 6px 14px; font-weight: 800; cursor: pointer; }
.ac-rkey button.on { background: #4a5a28; color: #fff; border-color: #4a5a28; }
.ac-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 4px 0 8px; max-width: 720px; }
.ac-ch { position: relative; overflow: hidden; border: 2px solid var(--rule); border-radius: 14px; background: var(--card); padding: 12px 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 120px; justify-content: center; }
.ac-ch b { font-size: 1.6rem; line-height: 1; z-index: 1; } .ac-ch em { font-style: normal; font-size: 2rem; font-weight: 900; line-height: 1.1; z-index: 1; } .ac-ch small { color: var(--ink-soft); z-index: 1; }
.ac-ch span { position: absolute; left: 0; right: 0; bottom: 0; background: #9aa6bd33; }
.ac-ch.key { border-color: #4a5a28; box-shadow: 0 0 0 2px #4a5a2833; } .ac-ch.key span { background: #4a5a2833; } .ac-ch.key b::after { content: ' ✓'; color: #4a5a28; }
/* v607 a page that scrolls (🔗 Links ⚙ Setup …): its boxes grow with their content */
.prep3-ov .prep-main.pp-scroll .pp-swb, .prep3-ov .prep-main.pp-scroll .pp-typed { flex: none !important; display: block !important; min-height: 0; overflow: visible !important; }

/* v608 ⬜ Whiteboard: a page over the slide (under the pens), five papers, its own bar on top */
.ts-wb { position: fixed; left: 0; right: 0; top: 0; bottom: var(--ts-barh, 56px); z-index: 8980; background-color: #fff; }
.ts-wb.wb-grid, .ts-wb.wb-graph { --s: max(18px, 2.5vw); background-image: linear-gradient(#cfe0f5 1px, transparent 1px), linear-gradient(90deg, #cfe0f5 1px, transparent 1px); background-size: var(--s) var(--s); }
.ts-wb.wb-graph { background-image: linear-gradient(#334155, #334155), linear-gradient(#334155, #334155), linear-gradient(#cfe0f5 1px, transparent 1px), linear-gradient(90deg, #cfe0f5 1px, transparent 1px);
  background-size: 100% 2px, 2px 100%, var(--s) var(--s), var(--s) var(--s); background-position: 0 50%, 50% 0, 0 0, 0 0; background-repeat: no-repeat, no-repeat, repeat, repeat; }
.ts-wb.wb-lined { --s: max(18px, 2.5vw); background-image: linear-gradient(90deg, transparent calc(var(--s) * 2.4 - 1px), #f4a3a3 calc(var(--s) * 2.4 - 1px), #f4a3a3 calc(var(--s) * 2.4 + 1px), transparent calc(var(--s) * 2.4 + 1px)), linear-gradient(transparent calc(var(--s) * 1.3 - 1px), #bcd3ee calc(var(--s) * 1.3 - 1px)); background-size: 100% 100%, 100% calc(var(--s) * 1.3); background-position: 0 0, 0 calc(var(--s) * 0.7); }
.ts-wb.wb-dots { --s: max(18px, 2.5vw); background-image: radial-gradient(circle, #9fb2c8 1.6px, transparent 2px); background-size: var(--s) var(--s); }
#ts-wbbar { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 9100; display: flex; align-items: center; gap: 4px; padding: 5px 8px; background: #232b3a; color: #fff; border-radius: 12px; box-shadow: 0 6px 18px #0004; max-width: calc(100vw - 16px); overflow-x: auto; }
#ts-wbbar > b { font-size: .9rem; white-space: nowrap; padding: 0 4px; }
#ts-wbbar button { border: 0; background: transparent; color: #fff; border-radius: 8px; padding: 4px 8px; font: inherit; font-size: .95rem; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; min-width: 34px; }
#ts-wbbar button small { font-size: .6rem; opacity: .8; }
#ts-wbbar button:hover:not(:disabled), #ts-wbbar button.on { background: #ffffff26; } #ts-wbbar button.on { box-shadow: inset 0 0 0 2px #f5a00c; }
#ts-wbbar button:disabled { opacity: .35; cursor: default; }
#ts-wbbar .wb-x { background: #e53935; font-weight: 700; flex-direction: row; } #ts-wbbar .wb-pg { font-weight: 700; padding: 0 4px; white-space: nowrap; }
#ts-wbbar .wb-sep { width: 1px; align-self: stretch; background: #ffffff33; margin: 2px 4px; }
/* v608 ❄️ Season: this slide or all slides */
.pu-fxask { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.pu-fxask button { border: 1px solid var(--rule); background: var(--card); color: var(--ink); border-radius: 8px; padding: 7px 10px; font: inherit; font-weight: 700; cursor: pointer; text-align: left; }
.pu-fxask button:hover { border-color: var(--olive-base, #4c7a2a); }
/* v608 🖥 the Presenter View card can always be closed */
.pv-ask { position: fixed; } .pv-ask-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 1.1rem; cursor: pointer; color: inherit; }
/* v608 📐 Protractor · 📏 Ruler: see-through, above the slide, the whiteboard and Graph!t */
.mz { position: fixed; left: 0; top: 0; z-index: 9700; touch-action: none; user-select: none; -webkit-user-select: none; }
.mz-svg { display: block; overflow: visible; filter: drop-shadow(0 4px 10px #0003); }
.mz-body { fill: rgba(225, 240, 255, .42); stroke: #1d5fa8; stroke-width: 1.5; cursor: grab; }
.mz-locked .mz-body { cursor: default; pointer-events: none; fill: rgba(225, 240, 255, .3); }
.mz-locked .mz-knob { pointer-events: none; }
.mz-inner { fill: none; stroke: #1d5fa855; stroke-width: 1; pointer-events: none; }
.mz-t { stroke: #1e3a5f; stroke-width: .9; pointer-events: none; } .mz-t10 { stroke-width: 1.6; }
.mz-n, .mz-n2, .mz-unit { font: 700 13px 'IBM Plex Sans', system-ui, sans-serif; fill: #1e3a5f; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.mz-n2 { font-size: 10px; fill: #c0392b; font-weight: 600; } .mz-unit { font-size: 12px; fill: #1e3a5f99; }
.mz-base { stroke: #1e3a5f; stroke-width: 1.6; pointer-events: none; }
.mz-cross { stroke: #c0392b; stroke-width: 1.6; pointer-events: none; } .mz-dot { fill: #c0392b; pointer-events: none; }
.mz-arm { stroke: #c0392b; stroke-width: 2.4; stroke-linecap: round; pointer-events: none; }
.mz-knob { fill: #c0392b; stroke: #fff; stroke-width: 2; cursor: grab; }
.mz-read { font: 900 34px 'IBM Plex Sans', system-ui, sans-serif; fill: #c0392b; text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: #ffffffcc; stroke-width: 4px; }
.mz-read2 { font: 700 15px 'IBM Plex Sans', system-ui, sans-serif; fill: #1e3a5f; text-anchor: middle; pointer-events: none; }
.mz-bar { position: absolute; transform: translateX(-50%); display: flex; gap: 3px; padding: 3px; background: #232b3aee; border-radius: 10px; box-shadow: 0 4px 12px #0004; white-space: nowrap; }
.mz-bar button { border: 0; background: transparent; color: #fff; border-radius: 7px; padding: 3px 8px; font: 700 14px system-ui, sans-serif; cursor: pointer; touch-action: none; }
.mz-bar button:hover, .mz-bar button.on { background: #ffffff26; } .mz-bar button small { font-weight: 500; opacity: .85; }
.mz-bar [data-drag] { cursor: grab; }
.ts-tools-menu .ttm-ic { font-size: 1.6rem; width: 40px; text-align: center; display: inline-block; }

/* v609 ➕ Text box · ⬛ Shape · 😀 Emoji · 🖼 Picture on every slide */
.ob-layer { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.ob-edit .ob-layer .sk-o { pointer-events: auto; cursor: move; touch-action: none; }
.ob-edit .ob-layer .sk-o:hover { outline: 1px dashed #2f7de1aa; }
.ob-layer .sk-txt[contenteditable="true"] { cursor: text; outline: none; user-select: text; -webkit-user-select: text; }
.ob-sel { z-index: 40; }
.ob-sel.typing { pointer-events: none; background: transparent; border-style: solid; }
.ob-sel.typing .fr-h { pointer-events: auto; }
.ob-mini { position: absolute; z-index: 41; display: flex; gap: 2px; padding: 3px; background: #fff; border: 1px solid #c9d6e8; border-radius: 9px; box-shadow: 0 4px 14px #0003; pointer-events: auto; font: 600 13px/1 system-ui, sans-serif; color: #1f2937; white-space: nowrap; margin-top: 6px; }
.ob-mini { transform-origin: left top; margin-top: 0; }
.ob-sel .fr-h { transform: scale(var(--obk, 1)); }
.ob-mini button { min-width: 28px; height: 28px; padding: 0 6px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; font: inherit; color: inherit; display: inline-flex; align-items: center; justify-content: center; }
.ob-mini button:hover, .ob-mini button.on { background: #e8f0fc; }
.ob-mini .pu-dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1px solid #0003; }
.ob-pick { display: grid; grid-template-columns: repeat(6, auto); gap: 4px; max-width: 330px; }
.ob-pick button { border: 1px solid #d5deea; background: #fff; border-radius: 8px; padding: 6px; font-size: 20px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ob-pick button small { font-size: 10px; color: #555; }
.ob-pick button:hover { background: #eef4fd; }
.ob-pick:has([data-s]) { grid-template-columns: repeat(3, 1fr); }
@media (prefers-color-scheme: dark) { .ob-mini { background: #1e2633; color: #e8edf5; border-color: #3a4658; } .ob-mini button:hover, .ob-mini button.on { background: #2c3a50; } .ob-pick button { background: #1e2633; border-color: #3a4658; } .ob-pick button small { color: #b8c2d0; } }

/* v613 📋 the pages still waiting to go online */
.tsd-list { margin: 8px 0 0; padding: 8px 10px 8px 26px; max-height: 200px; overflow: auto; background: #ffffffaa; border: 1px solid #d5deea; border-radius: 8px; font-size: 13px; line-height: 1.5; }
.tsd-list small { color: #666; }
.tsd-list li { margin-bottom: 6px; }
.tsd-why { font-size: 12px; color: #a3320b; }
.tsd-why.ok { color: #667; }

/* v616 ⬜ whiteboard tools */
#ts-ink-layer.ink-ob #ts-ink-cv { cursor: crosshair; }
#ts-ink-layer.ink-sel #ts-ink-cv { cursor: default; }
#ts-wbbar { flex-wrap: wrap; justify-content: center; width: max-content; max-width: 98vw; }
#ts-wbpop { position: fixed; z-index: 9150; background: #232b3a; color: #fff; border-radius: 12px; padding: 8px; box-shadow: 0 8px 24px #0005; max-width: 94vw; }
#ts-wbpop .wbp-grid { display: grid; grid-template-columns: repeat(3, auto); gap: 4px; }
#ts-wbpop .wbp-grid.wbp-4 { grid-template-columns: repeat(4, auto); }
#ts-wbpop .wbp-grid.wbp-sym { grid-template-columns: repeat(8, 40px); }
#ts-wbpop button { border: 0; background: #ffffff14; color: #fff; border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 1.15rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 40px; }
#ts-wbpop button small { font-size: .62rem; opacity: .85; white-space: nowrap; }
#ts-wbpop button:hover, #ts-wbpop button.on { background: #ffffff30; } #ts-wbpop button.on { box-shadow: inset 0 0 0 2px #f5a00c; }
#ts-wbpop .wbp-note { display: block; font-size: .75rem; opacity: .85; margin-top: 6px; max-width: 260px; }
#ts-obbar { position: fixed; z-index: 9120; display: flex; gap: 4px; padding: 4px; background: #232b3a; border-radius: 10px; box-shadow: 0 4px 14px #0004; }
#ts-obbar button { border: 0; background: #ffffff14; color: #fff; border-radius: 7px; min-width: 34px; height: 32px; font-size: 1rem; cursor: pointer; }
#ts-obbar button:hover { background: #ffffff30; }
.ts-inkfx { padding: 4px 8px; }
.ts-inkfx .ts-fxm { display: inline-block; }
.ts-inkfx .ts-fxb { position: absolute; right: -4px; top: -30px; display: none; gap: 2px; }
.ts-inkfx:hover .ts-fxb { display: flex; }
.ts-inkfx .ts-fxb button { border: 0; background: #232b3a; color: #fff; border-radius: 6px; font: 700 12px system-ui, sans-serif; padding: 4px 6px; cursor: pointer; }
.ts-inkfx:hover { border-color: #2f3fe099; background: #ffffffaa; }

/* v617 🏠 my advisory section: the gold button (Class pages, Seat Plan, Cleaners, FlashPick…) */
.chip.chip-adv, .chip:has(> .sec-adv) { background: #fff6d6; border-color: #d4a017; color: #6b4e00; font-weight: 700; }
.chip.chip-adv.active, .chip.active:has(> .sec-adv) { background: #d4a017; border-color: #b8860b; color: #fff; }
.chip.chip-adv.active .sec-subj, .chip.active:has(> .sec-adv) .sec-subj { color: #fff; }
.adv-subrow { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 3px 8px; border-left: 3px solid #d4a017; background: #fffbea; border-radius: 0 10px 10px 0; }
.chip.chip-sm { padding: 3px 10px; font-size: .82rem; }
.adv-guide { margin: 0 0 8px; padding: 8px 10px; background: #fffbea; border: 1px solid #ecd27a; border-radius: 10px; font-size: .88rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.adv-marks { margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px; }
.adv-m { font-size: .72rem; font-weight: 600; padding: 1px 6px; border-radius: 999px; background: #eef2f7; color: #334155; }
.adv-m.adv-absent { background: #fde2e2; color: #9b1c1c; } .adv-m.adv-late { background: #fff1d6; color: #8a5300; } .adv-m.adv-excused { background: #e6effd; color: #1e4e9b; } .adv-m.adv-present { background: #e3f6e8; color: #1d6b37; }
.prog-class.prog-adv { background: #fff6d6; border-radius: 6px; box-shadow: inset 0 0 0 2px #d4a017; }
/* v618 ⬇ Get online copy (next to ☁️) */
.pu-getonl .tsi { font-weight: 800; color: #2f7de1; }
/* v619 ⛺ a camp message keeps its lines (English, then Filipino for parents) */
.notif-txt small, .notif-banner-main small { white-space: pre-line; }

/* v622 📝 scan-only sections (term exam) */
.chip.chip-scan { background: transparent; border: 1.5px dashed #7a6bb0; color: #5b4c95; }
.chip.chip-scan.active { background: #7a6bb0; border-style: solid; color: #fff; }
.cl-scan-note { margin: 0 0 8px; padding: 8px 10px; border: 1.5px dashed #7a6bb0; border-radius: 10px; background: #f4f1fb; font-size: .9rem; }
.prog-scan-lbl { margin-top: 8px; display: block; }
/* v637 Teach Screen skill games: no scroll bar (the game is fitted inside the 16:9 card); 📋 Review your answers floats above the slide */
body.ts-game #arcade-play-view:has(.sg-ts), body.ts-game.ts-gfx #arcade-play-wrap:has(.sg-ts) { overflow: hidden !important; }
.ts-review { position: fixed; inset: 0; z-index: 100000; background: #0006; display: flex; align-items: center; justify-content: center; padding: 3vh 3vw; }
.ts-review-card { width: min(1200px, 84vw); max-height: 88vh; display: flex; flex-direction: column; background: #fff; color: #263238; border-radius: 16px; box-shadow: 0 18px 50px #0005; overflow: hidden; }
.ts-review-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 2px solid #FFE082; font-size: 1.35rem; }
.ts-review-x { width: 44px; height: 44px; border-radius: 50%; border: 2px solid #CFD8DC; background: #fff; color: #37474F; font-size: 1.3rem; font-weight: 800; cursor: pointer; flex: none; }
.ts-review-x:hover { background: #FFEBEE; border-color: #E57373; color: #B71C1C; }
.ts-review-list { overflow: auto; padding: 12px 16px 16px; display: grid; gap: 8px; font-size: 1.05rem; line-height: 1.4; text-align: left; }
.ts-review-list .sg-rev { margin: 0; font-size: 1em; padding: 9px 12px; }
html[data-theme="dark"] .ts-review-card { background: #1e2530; color: #e8eef5; }
html[data-theme="dark"] .ts-review-x { background: #2a3340; color: #e8eef5; border-color: #4a5568; }
/* v639 Teach Screen: Cloudburst, Math Escape, Sleigh the Order, Math Run, XY Maze, New Year New Mean and Case Closed
   play inside the slide card: name + goal (left 18%) · the game (64%) · live numbers (right 18%) */
body.ts-game #arcade-play-view:has(.ts-web) { overflow: hidden !important; }
body.ts-game #arcade-play-wrap:has(> .ts-web) { height: 100% !important; overflow: hidden !important; }
.arcade-web-pane.ts-web { display: grid; grid-template-columns: 18% 64% 18%; height: 100%; background: none; border-radius: 0; overflow: hidden; }
.ts-web-l, .ts-web-r { padding: .9vw; display: flex; flex-direction: column; gap: .75vw; min-height: 0; min-width: 0; }
.ts-web-m { position: relative; min-width: 0; min-height: 0; padding: .4vw 0; }
.ts-web-m iframe { width: 100%; height: 100%; border: 0; display: block; border-radius: .9vw; background: #0f1630; box-shadow: 0 4px 14px #0002; }
.ts-web-info { background: #fff; color: #263238; border: 3px solid #FFE082; border-radius: .9vw; padding: 1vw; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4vw; }
.ts-web-ic { font-size: 3.2vw; line-height: 1; }
.ts-web-info b { font-size: 1.45vw; line-height: 1.15; }
.ts-web-info p { margin: 0; font-size: 1.05vw; line-height: 1.35; color: #455A64; }
.ts-web-stats { display: flex; flex-direction: column; gap: .75vw; }
.ts-web-stat { background: #fff; color: #263238; border: 2px solid #E0D6BE; border-radius: .9vw; padding: .5vw .8vw; display: flex; flex-direction: column; align-items: center; text-align: center; }
.ts-web-stat small { font-size: .85vw; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .03em; }
.ts-web-stat span { font-size: 1.75vw; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ts-web-stat i { font-style: normal; }
.ts-web-stat.low { border-color: #E57373; background: #FFEBEE; color: #B71C1C; }
.ts-web-acts { margin-top: auto; display: flex; flex-direction: column; gap: .6vw; }
.ts-web-acts button { font: inherit; font-weight: 800; font-size: 1.15vw; padding: .9vw .6vw; border-radius: .9vw; border: 2px solid #4a4060; background: #2b2540; color: #fff; cursor: pointer; }
.ts-web-acts button[data-tsw-act="hideBtn"] { background: #9ef0c7; color: #0b3b24; border-color: #6fd6a5; }
.ts-web-acts button:disabled { opacity: .45; cursor: default; }
.ts-web-acts kbd { font: inherit; font-size: .75em; opacity: .6; margin-left: .3em; }
.ts-web-pad { margin-top: auto; align-self: center; display: grid; grid-template-columns: repeat(3, 4.2vw); grid-template-rows: repeat(3, 4.2vw); gap: .35vw; touch-action: none; }
.ts-web-pad button { font-size: 1.6vw; border-radius: .8vw; border: 2px solid #4a4060; background: #2b2540; color: #fff; cursor: pointer; touch-action: none; user-select: none; }
.ts-web-pad button.on { background: #5d4f86; }
.ts-web-pad .up { grid-column: 2; grid-row: 1; } .ts-web-pad .lt { grid-column: 1; grid-row: 2; } .ts-web-pad .rt { grid-column: 3; grid-row: 2; } .ts-web-pad .dn { grid-column: 2; grid-row: 3; }
.ts-web-pad .ctr { grid-column: 2; grid-row: 2; display: grid; place-items: center; font-size: .75vw; font-weight: 800; color: #8a80a0; }
.ts-web .arcade-web-toast { position: absolute; left: 50%; bottom: 1vw; transform: translateX(-50%); }
html[data-theme="dark"] .ts-web-info, html[data-theme="dark"] .ts-web-stat { background: #1e2530; color: #e8eef5; border-color: #4a5568; }
html[data-theme="dark"] .ts-web-info p { color: #b8c4d2; }
/* v640 ✕ Close game sits inside the slide (top of the right panel), so the slide's edge stays in view */
body.ts-game:has(#arcade-play-view .ts-close) #tss-skill { display: none !important; }
.ts-close { flex: none; align-self: stretch; font: inherit; font-weight: 800; font-size: max(13px, 1vw); padding: .45vw .8vw; border-radius: 999px; border: 2px solid #CFD8DC; background: #fff; color: #37474F; cursor: pointer; }
.ts-close:hover { background: #FFEBEE; border-color: #E57373; color: #B71C1C; }
html[data-theme="dark"] .ts-close { background: #2a3340; color: #e8eef5; border-color: #4a5568; }
/* Case Closed: the Detective's notebook in the left panel */
.ts-web-notes { flex: 1 1 auto; min-height: 0; overflow: auto; background: #fbf6ea; color: #2b2118; border-radius: .9vw; padding: .8vw 1vw; background-image: repeating-linear-gradient(#fbf6ea 0 1.8vw, #cfe0ef 1.8vw calc(1.8vw + 1px)); border: 2px solid #E0D6BE; }
.ts-web-notes h4 { margin: 0 0 .3vw; font-size: .95vw; letter-spacing: .08em; text-transform: uppercase; color: #8a5a2b; }
.ts-web-notes ol { margin: 0; padding-left: 1.3vw; font-family: 'Courier New', monospace; font-size: .95vw; line-height: 1.8vw; }
.ts-web-notes .empty { margin: 0; font-family: 'Courier New', monospace; font-size: .95vw; line-height: 1.8vw; color: #8b7a66; }
.ts-web-notes h4 { background: #fbf6ea; line-height: 1.25; padding-bottom: .2vw; }
/* v645 a game with ✕ Close game inside its card: fixed on the screen, as big as fits above the Teach bar and centred there
   (nothing above it can push it down, in the normal and the ⛶ full-screen view) */
body.ts-game #arcade-play-view:has(.ts-close) { --tsg-w: min(calc(100vw - 150px), calc((100vh - var(--ts-barh, 56px) - 20px) * 16 / 9));
  position: fixed !important; width: var(--tsg-w) !important; left: calc((100vw - var(--tsg-w)) / 2) !important;
  top: max(6px, calc((100vh - var(--ts-barh, 56px) - var(--tsg-w) * 9 / 16) / 2)) !important; margin: 0 !important; }
/* v642 a Season on a words-only page with ✥ moved words: the words go back in order in the small white box that fits them
   (the moves are kept, and used again when the page has no Season) */
.sl-stage.ts-fxon > .sl.td-sl.td-shrink.sl-free .td-body { display: flex !important; }
.sl-stage.ts-fxon > .sl.td-sl.td-shrink.sl-free [data-fp] { position: relative !important; left: auto !important; top: auto !important; width: auto !important; height: auto !important; overflow: visible; }
.sl-stage.ts-fxon > .sl.td-sl.td-shrink.sl-free .td-text[data-fp] { flex: 1 1 auto !important; max-height: 100% !important; overflow: hidden; }
/* v642 🧰 Prepare's slide frame wears the Teach Screen's look: its theme, title fonts and colours, the logo, the lesson-slide padding */
.ts-look { --ts-bg: #fbf6ea; --ts-slide: #ffffff; --ts-fg: #1f2937; }
.ts-look.ts-th-blue { --ts-bg: #e6f0fb; --ts-slide: #f7fbff; --ts-fg: #1e2a3a; }
.ts-look.ts-th-green { --ts-bg: #e7f4e4; --ts-slide: #f8fdf6; --ts-fg: #1f2d1f; }
.ts-look.ts-th-purple { --ts-bg: #efe9fa; --ts-slide: #fbf9ff; --ts-fg: #2a2140; }
.ts-look.ts-th-charcoal { --ts-bg: #1c1f24; --ts-slide: #2a2f37; --ts-fg: #fdf6d8; }
.ts-look .sl-stage { background: var(--ts-slide); color: var(--ts-fg); }
.ts-look .sl-head, .ts-look .sl-title h1 { font-family: 'IBM Plex Sans', system-ui, sans-serif !important; font-weight: 700 !important; letter-spacing: 0; color: var(--ts-term, #556b2f); opacity: 1; }
.ts-look .sl-dark .sl-head, .ts-look .sl-darkbg .sl-head, .ts-look.ts-th-charcoal .td-sl:not(.td-hasbg) .td-title { color: color-mix(in srgb, var(--ts-term, #556b2f) 35%, #fff); }
.ts-look .sl-stage > .sl:not(.td-sl) { padding: 2.36cqw 2.36cqw 4.72cqw !important; }
.ts-look .sl-logo { left: 2.36cqw; bottom: 1.3cqw; height: 2.6cqw; opacity: .9; z-index: 3; }
.ts-look .sl-dark .sl-logo, .ts-look .sl-darkbg .sl-logo, .ts-look.ts-th-charcoal .sl-logo { filter: drop-shadow(0 0 .15cqw #fff) drop-shadow(0 0 .45cqw rgba(255,255,255,.95)); }
.ts-look.ts-th-charcoal .sl-ans { color: #b9f27c; }
.ts-look.ts-th-charcoal .sl-stage:not([style*="color"]) .sl-title.sl-term1 h1 { color: #c5d98a; }
.ts-look.ts-th-charcoal .sl-stage:not([style*="color"]) .sl-title.sl-term2 h1 { color: #a9b8ff; }
.ts-look.ts-th-charcoal .sl-stage:not([style*="color"]) .sl-title.sl-term3 h1 { color: #ffa3a3; }
.ts-look .sl-stage.ts-fxon > .sl, .ts-look .sl-stage.ts-fxon > .ts-card-in { color: #1f2937; }
/* v643 🧰 Prepare: the slide editor's menus (⚙ Settings, ↺, slide colour…) open above Prepare, not behind it */
body:has(#prep-ov) .ts-mpop.sle-pop { z-index: 9850; }
/* v645 Term Drop: the card the falling item will land on (laptop ← →); its ✅/❌ line in the right card on the Teach Screen */
.td-b.td-aim { box-shadow: 0 0 0 4px #FFD54F, 0 6px 16px rgba(255, 193, 7, .45); transform: translateY(-3px); }
.td-card { transition: left .12s ease-out; }
.sg-ts .sg-tsx .td-why { text-align: left; min-height: 0; margin: 0; }
.sg-ts:has(.td-field.hidden) .sg-tsx { visibility: hidden; }
/* v646 ⏹ End game */
.ag-end { font: inherit; font-weight: 800; border-radius: 999px; border: 2px solid #E57373; background: #FFEBEE; color: #B71C1C; padding: 6px 14px; cursor: pointer; margin-left: 8px; }
.ag-end:hover { background: #E53935; color: #fff; }
.ts-close.ag-end { margin: 0; border-color: #E57373; background: #FFEBEE; color: #B71C1C; }
.ts-close.ag-end:hover { background: #E53935; color: #fff; }
.tss-skill .ag-end { margin-left: 6px; box-shadow: 0 2px 8px #0002; }
html[data-theme="dark"] .ag-end { background: #3a1f22; color: #ffb4b4; border-color: #b85a5a; }
/* v646 💡 suggested games (Prepare) · a ▶ Play button for each ticked game (Teach Screen) */
.pg-sugs { margin-top: 14px; }
.pg-sug-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin: 6px 0 8px; }
.pg-sug { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 12px; background: var(--card); cursor: pointer; }
.pg-sug input { width: 20px !important; height: 20px; margin: 0 !important; flex: none; }
.pg-sug:has(input:checked) { border-color: var(--olive, #4A5A28); background: color-mix(in srgb, var(--olive, #4A5A28) 10%, var(--card)); }
.pg-sug-ic { font-size: 1.5rem; line-height: 1; }
.pg-sug b { display: block; } .pg-sug small { display: block; color: var(--ink-soft); font-size: .8rem; }
.ts-skill-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2cqw; }
.ts-skill-list.many .ts-skill-go { margin: 0; font-size: .82em; padding: 1.2cqw 2.4cqw; }
/* v648 🖥️ board games on the Teach Screen (Card Chance, Dice & Vines, Math Chess, Plot Twist, …): name · game · numbers */
.ts-bg .ts-bg-m { overflow: hidden; display: flex; justify-content: center; align-items: flex-start; padding: .4vw 0; }
.ts-bg .ts-bg-in { flex: none; transform-origin: top center; }
.ts-bg-in > .fx-head, .ts-bg-in > h3, .ts-bg-in > .back-btn-xl, .ts-bg-in > .mc-head, .ts-bg-in #btn-bg-quit { display: none !important; }
.ts-bg-in .pm-top > .chip, .ts-bg-in .gs-hud, .ts-bg-in .mk-hud, .ts-bg-in .dv-scores { display: none !important; }
.ts-bg-in .pm-top:not(:has(> :not(.chip):not(:empty))) { display: none; }
.ts-bg .ts-web-stat.now { border-width: 4px; box-shadow: 0 0 0 3px #FFE08288; }
.ts-bg .ts-web-stats { overflow: hidden; min-height: 0; }
.sg-ts .sg-left.sg-left-info { justify-content: flex-start; }
.sg-ts.sg-clinic .sg-mid-in .sg-top { display: none; }
.ts-web-stat.long span { font-size: 1.15vw; }
/* v648 🩺 Math Clinic on the Teach Screen */
.sg-ts.sg-clinic .mc-wrap.mc-ts-open { display: grid; grid-template-columns: 24fr 40fr; gap: 16px; }
.sg-ts.sg-clinic .sg-mid-in:has(.mc-ts-open) { display: flex; flex-direction: column; }
.sg-ts.sg-clinic .sg-mid-in:has(.mc-ts-open) > .mc-wrap { flex: 1; }
.mc-ts-l, .mc-ts-r { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mc-ts-l .mc-start { margin-top: auto; }
.mc-ts-l .mc-hero, .mc-ts-l .mc-class, .mc-ts-r .mc-h { margin: 0; }
.mc-ts-r .mc-chart { grid-template-columns: 1fr 1fr; margin: 0; }
.mc-ts-r .qb-tip { margin: 0; }
.sg-ts.sg-clinic .sg-mid-in .mc-treat, .sg-ts.sg-clinic .sg-mid-in .sg-fb:not(.sg-fb-copy) { display: none !important; }
.sg-ts.sg-clinic.mc-ts-sess .sg-left > .ts-web-info { display: none; }
.sg-ts.sg-clinic .mc-treat-copy:empty { display: none; }
.mc-treat-copy { display: flex; flex-direction: column; gap: .6vw; flex: 1; min-height: 0; }
.mc-treat-copy .mc-tm { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3vw; background: var(--card, #fff); border: 2px solid #E0D6BE; border-radius: .9vw; padding: .4vw .6vw; opacity: .75; }
.mc-treat-copy .mc-tm > span:first-child { font-size: 1.8vw; line-height: 1; }
.mc-treat-copy .mc-tm small { font-size: 1vw; font-weight: 800; text-align: center; }
.mc-treat-copy .mc-tm .mc-bar { width: 90%; height: .7vw; }
.mc-treat-copy .mc-tm.now { opacity: 1; border-color: #FFB300; background: #FFF8E1; box-shadow: 0 0 0 3px #FFB30040; }
.mc-treat-copy .mc-tm.hit { opacity: 1; }
.ts-review-list table { width: 100%; border-collapse: collapse; } .ts-review-list td, .ts-review-list th { padding: 6px 8px; border-bottom: 1px solid #e5e7eb; text-align: left; }
.sg-ts.sg-clinic:has(.mc-ts-open) .sg-tsx { visibility: hidden; }
.mc-ts-r .mc-row { grid-template-columns: minmax(0, 1fr) 26% 6.6em; }
.mc-ts-l .mc-class { flex: 1 1 auto; }
.mc-ts-r .mc-chart { flex: 1 1 auto; grid-auto-rows: 1fr; }
.mc-ts-r .mc-cat { display: flex; flex-direction: column; justify-content: space-around; padding: 8px 10px; }
.mc-ts-r .mc-cat-h { font-size: .85rem; }
.mc-ts-r .mc-row { font-size: .92rem; }
.mc-ts-r .mc-v { font-size: .8rem; }
.ts-review-list table { font-size: 1.05rem; }
.mc-ts-r .mc-row { grid-template-columns: minmax(0, 1fr) 17% 5.4em; gap: 5px; font-size: .86rem; padding: 3px 0; }
.mc-ts-r .mc-v { font-size: .7rem; grid-template-columns: 1fr 2.2em; }
.mc-ts-r .mc-cat { justify-content: flex-start; }
/* v648 🎲 Dice & Vines: players by Student No. */
.dv-player .dv-no { padding: 4px 6px; font-size: .9rem; grid-column: 2; }
.dv-player .dv-stw { grid-column: 1 / -1; }
.dv-st { font-size: .78rem; color: #607D8B; } .dv-st.ok { color: #2E7D32; font-weight: 700; } .dv-st.no { color: #C62828; font-weight: 700; } .dv-st.off { color: #8D6E63; }
.dv-st small { font-weight: 400; opacity: .8; }
.dv-dup { color: #C62828; font-weight: 700; margin: 4px 0; }
.dv-start:disabled { opacity: .5; cursor: not-allowed; }
.dv-res { margin: 6px auto 0; border-collapse: collapse; } .dv-res td { padding: 2px 8px; text-align: left; }
.dv-board { overflow: visible; }
/* v648 🩺 Math Clinic's opening page covers the whole slide (no side panels): 24 : 20 : 20 — the banner, Class check-up and
   Start · the patient chart's two columns. ✕ Close game stays in the top-right corner. The check-up itself keeps the 3 panels. */
body.ts-game .sg.sg-ts.sg-clinic:has(.mc-ts-open) { grid-template-columns: 100%; position: relative; }
.sg-ts.sg-clinic:has(.mc-ts-open) .sg-left { display: none; }
.sg-ts.sg-clinic:has(.mc-ts-open) .sg-right { position: absolute; top: 0; right: 0; width: auto; padding: .4vw; z-index: 3; }
.sg-ts.sg-clinic:has(.mc-ts-open) .sg-right > :not(.ts-xrow) { display: none !important; }
.sg-ts.sg-clinic:has(.mc-ts-open) .sg-right > .ts-xrow { width: auto; }
.sg-ts.sg-clinic .mc-wrap.mc-ts-open { padding-right: 1px; }
.sg-ts.sg-clinic .mc-ts-r .mc-h { padding-right: 9vw; }
/* v648 🛡️ Admin home fills the page: owner 10 tiles = 2 rows × 5 (phones 5 × 2); view-only admin 6 tiles = 2 × 3 (phones 3 × 2, Reach hidden) */
body.chim-admin-viewer #master-home #btn-open-reach { display: none !important; }
body.chim-admin:not(.chim-admin-viewer) #panel-master, body.chim-admin:not(.chim-admin-viewer) #master-home { max-width: none; width: 100%; }
body.chim-admin:not(.chim-admin-viewer) #app-teacher .content:has(#master-home:not(.hidden)) { max-width: 1600px; }
body.chim-admin:not(.chim-admin-viewer) #master-home .subject-grid { display: grid; grid-template-columns: repeat(5, 1fr); grid-auto-rows: 1fr; gap: 16px; height: calc(100vh - 270px); height: calc(100dvh - 270px); min-height: 340px; }
body.chim-admin:not(.chim-admin-viewer) #master-home .subject-card { margin: 0; width: auto; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
body.chim-admin:not(.chim-admin-viewer) #master-home .subject-card .icon { font-size: clamp(2.4rem, 8vh, 4.4rem); }
body.chim-admin:not(.chim-admin-viewer) #master-home .subject-card .subj-ic { height: clamp(52px, 12vh, 96px); width: auto; }
@media (max-width: 700px) {
  body.chim-admin:not(.chim-admin-viewer) #master-home .subject-grid { grid-template-columns: repeat(2, 1fr); height: calc(100vh - 230px); height: calc(100dvh - 230px); gap: 10px; min-height: 520px; }
  body.chim-admin:not(.chim-admin-viewer) #master-home .subject-card .icon { font-size: clamp(1.8rem, 5vh, 3rem); }
  body.chim-admin:not(.chim-admin-viewer) #master-home .subject-card .subj-ic { height: clamp(36px, 6vh, 60px); }
  body.chim-admin:not(.chim-admin-viewer) #master-home .subject-card { min-height: 0; padding: 6px; font-size: .9rem; }
  body.chim-admin:not(.chim-admin-viewer) #master-home .subject-card .subject-meta { font-size: .7rem; }
}
/* v649 👁️ View-only Admin: every page inside a tile uses the whole width (no blank sides; scrolling is fine), and a page of
   tiles (e.g. 🏫 Faculty) fills the page like the Admin home */
body.chim-admin-viewer #app-teacher .content:has(> #panel-master:not(.hidden)) { max-width: none !important; }
body.chim-admin-viewer #panel-master > div { max-width: none; }
body.chim-admin-viewer #panel-master > div:not(#master-home) > .subject-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); grid-auto-rows: 1fr; gap: 16px; height: calc(100vh - 250px); height: calc(100dvh - 250px); min-height: 300px; }
body.chim-admin-viewer #panel-master > div:not(#master-home) > .subject-grid > .subject-card { margin: 0; width: auto; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-size: 1.25rem; }
body.chim-admin-viewer #panel-master > div:not(#master-home) > .subject-grid .icon { font-size: clamp(2.4rem, 9vh, 5rem); }
body.chim-admin-viewer #panel-master > div:not(#master-home) > .subject-grid .subj-ic { height: clamp(56px, 14vh, 120px); width: auto; }
@media (max-width: 700px) { body.chim-admin-viewer #panel-master > div:not(#master-home) > .subject-grid { grid-template-columns: 1fr; height: calc(100dvh - 230px); gap: 12px; } }
body.chim-admin-viewer #panel-master > div:not(#master-home) > .subject-grid > .subject-card > div:not(.icon):not(.subject-meta) { font-size: clamp(1.05rem, 2.4vh, 1.5rem); font-weight: 800; }
body.chim-admin-viewer #panel-master > div:not(#master-home) > .subject-grid > .subject-card .subject-meta { font-size: clamp(.8rem, 1.7vh, 1.05rem); }
/* v650 🛡️ Owner Admin, like the view-only Admin: every page inside a tile uses the whole width (scrolling is fine), and a
   page of tiles (Faculty, Control) fills the page — one row on a laptop, 2 columns on a phone */
body.chim-admin #app-teacher .content:has(> #panel-master:not(.hidden)) { max-width: none !important; }
body.chim-admin #panel-master > div { max-width: none; }
body.chim-admin:not(.chim-admin-viewer) #panel-master > div:not(#master-home) > .subject-grid:not(.hidden) { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); grid-auto-rows: 1fr; gap: 16px; height: calc(100vh - 290px); height: calc(100dvh - 290px); min-height: 300px; }
body.chim-admin:not(.chim-admin-viewer) #panel-master > div:not(#master-home) > .subject-grid > .subject-card { margin: 0; width: auto; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
body.chim-admin:not(.chim-admin-viewer) #panel-master > div:not(#master-home) > .subject-grid .icon { font-size: clamp(2.4rem, 9vh, 5rem); }
body.chim-admin:not(.chim-admin-viewer) #panel-master > div:not(#master-home) > .subject-grid .subj-ic { height: clamp(56px, 14vh, 120px); width: auto; }
body.chim-admin:not(.chim-admin-viewer) #panel-master > div:not(#master-home) > .subject-grid > .subject-card > div:not(.icon):not(.subject-meta) { font-size: clamp(1.05rem, 2.4vh, 1.5rem); font-weight: 800; }
body.chim-admin:not(.chim-admin-viewer) #panel-master > div:not(#master-home) > .subject-grid > .subject-card .subject-meta { font-size: clamp(.8rem, 1.7vh, 1.05rem); }
@media (max-width: 700px) { body.chim-admin:not(.chim-admin-viewer) #panel-master > div:not(#master-home) > .subject-grid:not(.hidden) { grid-template-columns: repeat(2, 1fr); grid-auto-rows: minmax(150px, 1fr); height: auto; min-height: calc(100dvh - 260px); gap: 10px; } }
/* v650 👨‍👩‍👧 Students and parents on a laptop: the whole width — the subject tiles fill the page below Today, every page inside
   a subject uses the full width, a page of tiles fills the page; reading text (announcements, the Data Privacy letter)
   stays in an easy-to-read column of about 1100 px, centred */
@media (min-width: 900px) {
  #app-student > .content { max-width: none; }
  #spanel-subjects:not(.hidden) { display: flex; flex-direction: column; min-height: calc(100vh - 150px); min-height: calc(100dvh - 150px); }
  #spanel-subjects #subject-grid { flex: 1 1 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); grid-auto-rows: minmax(170px, 1fr); gap: 16px; }
  #spanel-subjects #subject-grid > .subject-card, #electives-grid > .subject-card { margin: 0; width: auto; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
  #spanel-subjects #subject-grid > .subject-card .icon { font-size: clamp(2.6rem, 8vh, 4.6rem); }
  #spanel-subjects #subject-grid > .subject-card .icon img { height: clamp(56px, 11vh, 104px); width: auto; }
  #spanel-subjects #subject-grid > .subject-card > div:not(.icon) { font-size: clamp(1rem, 2.1vh, 1.35rem); }
  #subject-sub-panels > .subject-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); grid-auto-rows: 1fr; gap: 16px; height: calc(100vh - 300px); height: calc(100dvh - 300px); min-height: 280px; }
  #subject-sub-panels > .subject-grid > .subject-card { margin: 0; width: auto; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-size: clamp(1.05rem, 2.3vh, 1.4rem); }
  #subject-sub-panels > .subject-grid > .subject-card .icon { font-size: clamp(2.6rem, 9vh, 5rem); }
  #app-student .feedback-note .ann-msg, #app-student .feedback-note > p { max-width: 1100px; }
  #app-student .feedback-note:has(.ann-msg) { padding-left: max(16px, calc((100% - 1100px) / 2)); padding-right: max(16px, calc((100% - 1100px) / 2)); }
  #data-privacy-content > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
}
body.chim-admin-viewer #faculty-view #btn-open-admin-fs { display: none !important; } /* v650 view-only admins: no FlashSched (the v399 rule pointed at the Admin home, where this tile is not) */
@media (min-width: 900px) { #spanel-subjects #subject-grid[style*="--stu-cols"] { grid-template-columns: repeat(var(--stu-cols), minmax(0, 1fr)); } }
/* v651 ✕ (close game) and ⏹ (end game) as icons, side by side on one line — Teach Screen slide and the Skill Arcade */
.ts-xrow { display: flex; gap: .6vw; justify-content: center; flex: none; }
.ts-xrow .ts-close { flex: 1 1 0; max-width: 5vw; min-width: 40px; align-self: auto; aspect-ratio: 1.4; padding: 0; display: grid; place-items: center; font-size: max(18px, 1.6vw); line-height: 1; border-radius: 999px; }
.ts-xrow .ts-close.ag-end { font-size: max(16px, 1.35vw); }
.ag-end { padding: 4px 12px; font-size: 1.15rem; line-height: 1.2; min-width: 44px; }
.ts-xrow .ts-close.ag-end { font-size: max(20px, 1.8vw); }
/* v654 📱 Phone camera linking */
.cam-vbox { position: relative; }
.cam-vmsg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; color: #fff; background: #0009; font-weight: 700; font-size: .95rem; }
.cam-vmsg.hidden { display: none; }
.cam-vrow { display: flex; justify-content: flex-end; margin-top: 6px; }
.cam-row .cam-sw { margin: 0; }
.cam-ans svg { filter: brightness(.88); } /* a little less glare for the laptop's camera */
.cam-ans small { display: block; font-weight: 400; opacity: .8; }
.admin-nyt { color: #C62828; font-weight: 800; } /* v655 Score Details: Not Yet Taken above 0 */
.admin-secs-list { display: flex; flex-wrap: wrap; gap: 6px 14px; } /* v656 Report settings → Sections */
.admin-sec-pick { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
/* v658 Admin → Data Privacy: one block per section */
.apc-sec { margin: 0 0 14px; }
.apc-sec-h { margin: 6px 0 6px; font-size: 1.05rem; color: var(--olive-deep, #3d4a1f); }
.apc-sec-h span { font-weight: 500; color: var(--ink-soft, #666); font-size: .92rem; }
.apc-none { padding: 10px; }
/* v658 School Policies: per-part edits; the owner sees what an Admin changed */
.pol-stamp { font-size: .8rem; color: #8a5a00; background: var(--amber-bg, #fff6d8); border-radius: 8px; padding: 4px 8px; margin: 0 0 8px; display: inline-block; }
.pol-badge { font-size: .7rem; font-weight: 600; color: #8a5a00; background: var(--amber-bg, #fff6d8); border-radius: 999px; padding: 1px 7px; margin-left: 6px; }
.pol-part.pol-editing { outline: 2px solid var(--olive, #6b7a35); }
.pol-log { margin-bottom: 10px; }
/* v661 🫛 Pod inside Admin → Faculty for view-only Admins: Teachers · Advisers · Pod — one line on a laptop, one above the other on a phone */
#btn-open-admin-pod { display: none; }
body.chim-admin-viewer #faculty-view #btn-open-admin-pod { display: flex; }
@media (min-width: 701px) { body.chim-admin-viewer #faculty-view > .subject-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* v662 📱 FlashGrade scanner fits the phone: room for the notch, and a compact view on small screens so the camera gets the space */
#fg-scan-overlay .fg-scan-top { padding-top: max(10px, env(safe-area-inset-top)); }
#fg-scan-overlay .fg-scan-bottom { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
#fg-scan-overlay .fg-scan-title strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#fg-scan-overlay .fg-scan-title .fg-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#fg-scan-overlay.fg-compact .fg-scan-top { gap: 8px; padding: max(6px, env(safe-area-inset-top)) 10px 6px; }
#fg-scan-overlay.fg-compact .fg-scan-top .back-btn-xl { font-size: 1rem !important; padding: 4px 10px; }
#fg-scan-overlay.fg-compact .fg-scan-top .icon-btn, #fg-scan-overlay.fg-compact .fg-scan-top .cloud-btn { width: 34px; height: 34px; font-size: .95rem; }
#fg-scan-overlay.fg-compact .fg-scan-title strong { font-size: .9rem; }
#fg-scan-overlay.fg-compact .fg-scan-title .fg-sub { font-size: .72rem; }
#fg-scan-overlay.fg-compact .fg-scan-guide { display: none; }
#fg-scan-overlay.fg-compact .fg-scan-status { padding: 6px 10px; font-size: .8rem; min-height: 0; line-height: 1.3; }
#fg-scan-overlay.fg-compact .fg-scan-bottom { gap: 6px; padding: 6px 8px max(6px, env(safe-area-inset-bottom)); }
#fg-scan-overlay.fg-compact .fg-scan-bottom .btn-small { padding: 5px 10px; font-size: .78rem; }
#fg-scan-overlay.fg-compact .fg-light-pill { font-size: .68rem; padding: 2px 9px; top: 4px; }
#fg-scan-overlay.fg-tiny .fg-scan-title .fg-sub, #fg-scan-overlay.fg-tiny .fg-scan-speed { display: none; }
/* v663 Pod: Admins in "Teachers in your school" */
.pod-admin { color: #191970; font-weight: 700; font-size: .85em; }
:root[data-theme="dark"] .pod-admin { color: #9DB2FF; }
/* v664 🙈 FlashGrade Hide Scores */
.fg-hidden-note { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--amber-bg, #FAEEDA); color: var(--amber, #854F0B); font-size: .82rem; line-height: 1.35; }
.fg-hide-btn:not(.btn-outline) { background: #8a5a00; border-color: #8a5a00; color: #fff; }
.admin-hid { font-size: .75em; margin-left: 3px; }

/* v666 FlashGrade cards (laptop): Download / Sheets, Grade / Now, Hide / Scores on two lines so 5 buttons fit
   beside the Checked count; on phones the labels stay on one line (the buttons wrap there) */
.fg-2l .fg-br { display: none; }
@media (min-width: 700px) {
  #panel-grades.fg-desk { --fg-btns: 470px; }
  #panel-grades.fg-desk .fg-list-row2 .btn-small { padding-left: 10px; padding-right: 10px; }
  #panel-grades.fg-desk .fg-list-row2 .fg-2l { display: inline-flex; align-items: center; gap: 6px; line-height: 1.12; text-align: left; padding-top: 4px; padding-bottom: 4px; }
  #panel-grades.fg-desk .fg-list-row2 .fg-2l .fg-br { display: inline; }
  #panel-grades.fg-desk .fg-list-row2 .fg-2l .fg-sp { display: none; }
  #panel-grades.fg-desk .fg-list-row2 { gap: 6px; }
  #panel-grades.fg-desk .fg-list-item > .fg-hidden-note { grid-column: 1 / -1; }
}
/* v666 Results → Learner Scores: ▲ ▼ under each header */
.fg-sort { display: flex; justify-content: center; gap: 2px; margin-top: 3px; }
.fg-sort-btn { all: unset; cursor: pointer; font-size: .68rem; line-height: 1; padding: 2px 5px; border-radius: 5px; color: var(--ink-soft, #777); border: 1px solid transparent; }
.fg-sort-btn:hover { border-color: var(--rule, #ccc); }
.fg-sort-btn.on { background: var(--olive, #4b5a2a); color: #fff; }
.fg-sort-btn:focus-visible { outline: 2px solid var(--olive, #4b5a2a); }
/* v668 FlashGrade cards (laptop): the buttons always sit on the first line beside Checked; notes
   (🔗 Made by… then 🔗 Highest/Average of… Unmerge) go below, each on its own full-width line */
@media (min-width: 900px) {
  #panel-grades.fg-desk .fg-list-item > .fg-list-row1 { grid-row: 1; grid-column: 1; }
  #panel-grades.fg-desk .fg-list-item > .fg-list-row2 { grid-row: 1; grid-column: 2; }
  #panel-grades.fg-desk .fg-list-item > .fg-sub, #panel-grades.fg-desk .fg-list-item > .fg-hidden-note { grid-column: 1 / -1; }
  #panel-grades.fg-desk .fg-list-item > .fg-merge-note { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin: 4px 0 0; }
  #panel-grades.fg-desk .fg-merge-note .fg-unmerge { padding: 1px 10px !important; font-size: .78rem !important; min-height: 0 !important; height: auto !important; line-height: 1.5 !important; }
}
/* v669 Teach Screen seat plan: hold / right-click menu (Absent · Late · Excused · Present) */
.tss-menu { position: fixed; z-index: 99999; display: flex; flex-direction: column; gap: 4px; padding: 6px; background: var(--card, #fff); border: 1px solid var(--rule, #ccc); border-radius: 12px; box-shadow: 0 8px 24px #0003; }
.tss-menu button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 8px; font: 700 1rem/1.2 system-ui, sans-serif; color: var(--c); border-left: 4px solid var(--c); }
.tss-menu button:hover, .tss-menu button:focus-visible { background: color-mix(in srgb, var(--c) 12%, transparent); }
.tss-menu kbd { margin-left: auto; font: 600 .72rem/1 system-ui; color: var(--ink-soft, #666); border: 1px solid var(--rule, #ccc); border-radius: 4px; padding: 2px 5px; }
/* v670 Teach Screen seat plan (presenting): one footer under the seats, two lines that never overlap —
   line 1: the counts as pills (left) + 💾 Save (right) · line 2: 📅 weekend note + save status */
body.ts-present .ts-card-seat .tss-fsave { display: flex !important; flex-direction: column; align-items: stretch; gap: .55cqw; left: 13cqw; right: 2.36cqw; top: auto !important; bottom: 1.1cqw; height: auto !important; transform: none !important; }
body.ts-present .ts-card-seat .tss-f1 { display: flex; align-items: center; justify-content: space-between; gap: 1cqw; }
body.ts-present .ts-card-seat .tss-pills { display: flex; gap: .7cqw; flex-wrap: nowrap; }
body.ts-present .ts-card-seat .tss-pill { font: 700 1.4cqw/1 'IBM Plex Sans', system-ui, sans-serif; padding: .45cqw 1cqw; border-radius: 99px; white-space: nowrap; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); border: .12cqw solid var(--c); }
body.ts-present .ts-card-seat .tss-pill b { font-size: 1.2em; }
body.ts-present .ts-card-seat .tss-f1 .btn-small { height: auto !important; font-size: 1.6cqw; padding: .5cqw 1.6cqw !important; }
body.ts-present .ts-card-seat .tss-f2 { display: flex; align-items: center; gap: 1cqw; }
body.ts-present .ts-card-seat .tss-f2:not(:has(.tss-wkn)):has(.tss-fst:empty) { display: none; }
body.ts-present .ts-card-seat .tss-wkn { font: 700 1.3cqw/1.2 'IBM Plex Sans', system-ui, sans-serif; color: #92400e; background: #fef3c7; border-radius: 99px; padding: .35cqw 1cqw; white-space: nowrap; }
body.ts-present .ts-card-seat .tss-fst { font-size: 1.25cqw; max-width: none; }

/* v672 ⚡ FlashGrade sharing: 📥 Shared box, terms folded, 🗂 Hidden */
.fg-shared-box { background: var(--amber-bg, #FAEEDA); border: 1px solid rgba(133, 79, 11, 0.25); border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; }
.fg-shared-h { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 0 0 4px; }
.fg-shared-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.fg-shared-txt { min-width: 0; flex: 1 1 220px; }
.fg-shared-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.fg-term { display: flex; flex-direction: column; }
.fg-term > summary { cursor: pointer; font-weight: 700; padding: 6px 4px; list-style-position: inside; user-select: none; }
.fg-term[open] > summary { margin-bottom: 2px; }
.fg-term > .fg-list-item { margin-top: 8px; }
.fg-term > .fg-list-item:first-of-type { margin-top: 0; }
.fg-hidden-fold { opacity: 0.92; border-top: 1px dashed var(--rule); padding-top: 6px; margin-top: 4px; }
.fg-hidden-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 10px; margin-top: 6px; background: var(--card); }
.fg-share-line { margin: 4px 0 0; }

/* v673 term colours: Term 1 light olive green · Term 2 light blue · Term 3 light pink */
#panel-grades .fg-list-item.fg-t1, .fg-shared-item.fg-t1, .fg-mv-target.fg-t1 { background: #EEF4E2; border-color: #CFDDB3; }
#panel-grades .fg-list-item.fg-t2, .fg-shared-item.fg-t2, .fg-mv-target.fg-t2 { background: #E8F1FB; border-color: #BFD5EE; }
#panel-grades .fg-list-item.fg-t3, .fg-shared-item.fg-t3, .fg-mv-target.fg-t3 { background: #FBEBEF; border-color: #EBC3CC; }
[data-theme="dark"] #panel-grades .fg-list-item.fg-t1, [data-theme="dark"] .fg-shared-item.fg-t1, [data-theme="dark"] .fg-mv-target.fg-t1 { background: #2F3A22; border-color: #4A5C33; }
[data-theme="dark"] #panel-grades .fg-list-item.fg-t2, [data-theme="dark"] .fg-shared-item.fg-t2, [data-theme="dark"] .fg-mv-target.fg-t2 { background: #23303C; border-color: #3A5066; }
[data-theme="dark"] #panel-grades .fg-list-item.fg-t3, [data-theme="dark"] .fg-shared-item.fg-t3, [data-theme="dark"] .fg-mv-target.fg-t3 { background: #3A272C; border-color: #5E3B44; }
.fg-term-chip { display: inline-block; font: 700 .72rem/1.2 'IBM Plex Sans', system-ui, sans-serif; padding: 2px 8px; border-radius: 999px; vertical-align: middle; white-space: nowrap; letter-spacing: 0; text-transform: none; }
.fg-tc1 { background: #DCEBC4; color: #3E5A12; }
.fg-tc2 { background: #CFE2F7; color: #1D4C80; }
.fg-tc3 { background: #F6D3DB; color: #7A1F33; }
.fg-scan-title .fg-term-chip { font-size: .8rem; }
.fg-mv-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px; }
.fg-mv-cell { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.fg-mv-cell input { width: 18px; height: 18px; accent-color: var(--green, #3B6D11); }
.fg-mv-target { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 10px; margin: 6px 0; cursor: pointer; }
.fg-mv-target input { margin-top: 4px; }

/* v675 🔊 the login pages' sound switch */
.gate-card { position: relative; }
.gate-card > .gate-snd { position: absolute; top: 8px; right: 8px; z-index: 5; width: 34px; height: 34px; font-size: 1rem; opacity: 0.85; }

/* v677 Recovery Plan (computer): the page uses the whole width; the top part keeps its reading width on the left,
   and the tables stretch across. Tick + Student columns stay put when a table scrolls sideways (app.js rcvFreeze). */
@media (min-width: 900px) {
  .content:has(> #panel-grades:not(.hidden) #grades-recovery-view:not(.hidden)) { max-width: none; }
  /* v680: the two-column layout below replaces the 900 px top part */
  #grades-recovery-view .rcv-wrap table.rcv-grid, #grades-recovery-view .rcv-wrap table.rcv-task-grid { width: 100%; }
}
.rcv-grid .rcv-fz { position: sticky; z-index: 2; background-color: var(--card); }
.rcv-grid thead .rcv-fz { z-index: 4; background-color: var(--paper); }
.rcv-grid .rcv-fz2 { box-shadow: 2px 0 0 var(--rule); }
.rcv-grid tr.rcv-fail td.rcv-fz { background-color: var(--red-bg); }
.rcv-grid tr.rcv-in td.rcv-fz { background-color: var(--amber-bg); }
/* v679 Recovery tasks: ticked games on top, other terms folded, who has each task */
.rcvf-mq-picked { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 8px; }
.rcvf-mq-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; padding: 3px 4px 3px 10px; border-radius: 99px; background: var(--green-bg); color: var(--green-text, inherit); }
.rcvf-mq-chip small { font-size: .68rem; opacity: .75; }
.rcvf-mq-chip button { border: 0; background: transparent; cursor: pointer; font-size: .8rem; padding: 0 6px; color: inherit; min-height: 0; }
.rcvf-mq-list .rcv-check:has(input:checked) span { font-weight: 700; }
.rcvf-mq-other > summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.rcvf-given { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.rcvf-given .rcv-given, .rcv-given-list .rcv-given { display: block; font-size: .8rem; }
.rcv-given-list { margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.rcv-given small { display: inline !important; font-size: .72rem; color: var(--ink-soft); }
/* v678 ⬇ Download: beside 🛟 Add to Recovery Plan its menu opens to the left; in its own place (left side) to the right */
@media (min-width: 701px) {
  #grades-recovery-view .fg-export-wrap:not(.rcv-dl-moved) .fg-export-menu { left: 0; right: auto; }
  #grades-recovery-view .rcv-dl-moved .fg-export-menu { right: 0; left: auto; }
}

/* v680 🛟 Recovery Plan: left panel (choices) + right page; on a computer it fits the screen and only the table scrolls */
#panel-grades:has(> #grades-recovery-view:not(.hidden)) > .panel-title { display: none; }
.rcv-layout { display: flex; flex-direction: column; gap: 12px; }
.rcv-side { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 10px 12px; }
.rcv-side-sum { cursor: pointer; font-weight: 700; list-style: none; padding: 4px 2px; }
.rcv-side-sum::-webkit-details-marker { display: none; }
.rcv-side-in { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.rcv-side .rcv-title { margin: 0; }
.rcv-desc { font-size: .8rem; color: var(--ink-soft); margin-top: 4px; }
.rcv-lbl { font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 4px; }
.rcv-seg { display: flex; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.rcv-seg button { flex: 1; border: 0; border-right: 1px solid var(--rule); background: var(--paper); padding: 7px 4px; font: inherit; font-size: .85rem; cursor: pointer; color: var(--ink); min-height: 0; border-radius: 0; }
.rcv-seg button:last-child { border-right: 0; }
.rcv-seg button.on { background: var(--olive-deep); color: #fff; font-weight: 700; }
.rcv-side select { width: 100%; margin: 0; }
.rcv-views { display: flex; flex-direction: column; gap: 6px; }
.rcv-views button { text-align: left; border: 1px solid var(--rule); background: var(--paper); border-radius: 9px; padding: 8px 10px; font: inherit; font-size: .9rem; cursor: pointer; color: var(--ink); min-height: 0; }
.rcv-views button.on { background: var(--green-bg); border-color: var(--olive-base, #9DB06A); font-weight: 700; }
.rcv-views small { font-weight: 400; color: var(--ink-soft); }
.rcv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rcv-chip { border: 1px solid var(--rule); background: var(--paper); border-radius: 99px; padding: 5px 10px; font: inherit; font-size: .8rem; cursor: pointer; color: var(--ink); min-height: 0; }
.rcv-chip.on { background: var(--olive-deep); border-color: var(--olive-deep); color: #fff; font-weight: 700; }
.rcv-info { background: var(--paper); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; font-size: .8rem; }
.rcv-info .rcv-status { margin: 0; min-height: 0; }
.rcv-side-foot { display: flex; gap: 6px; align-items: center; margin-top: auto; }
.rcv-side .fg-export-menu { left: 0; right: auto; }
.rcv-main { min-width: 0; }
.rcv-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; background: var(--green-bg); border: 1px solid var(--rule); border-radius: 12px 12px 0 0; font-size: .88rem; }
.rcv-act .rcv-add-grp { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rcv-act input[type=date] { width: auto; margin: 0; padding: 6px 8px; }
.rcv-sp { flex: 1; }
.rcv-tblbox { overflow: auto; border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 12px 12px; background: var(--card); }
.rcv-tblbox table.rcv-grid { width: 100%; margin: 0; }
.rcv-grid thead th { position: sticky; top: 0; z-index: 3; background: var(--paper); }
.rcv-grid .c { text-align: center; }
.rcv-sort { border: 0; background: transparent; font: inherit; font-weight: 700; color: inherit; cursor: pointer; padding: 0; min-height: 0; white-space: nowrap; }
.rcv-sort.on { color: var(--olive-deep); }
.rcv-tick-h { width: 34px; }
.rcv-stack .rcv-why, .rcv-stack .rcv-tline { display: block; width: fit-content; margin: 2px 0; }
.rcv-tline { font-size: .8rem; white-space: nowrap; }
.rcv-tname { color: var(--ink); }
.rcv-st { display: inline-block; font-size: .74rem; padding: 2px 8px; border-radius: 99px; white-space: nowrap; background: var(--paper); border: 1px solid var(--rule); }
.rcv-st.done { background: #DCEBC4; border-color: transparent; color: #2f4a0e; }
.rcv-st.prog { background: #CFE2F7; border-color: transparent; color: #1D4C80; }
.rcv-st.chk { background: var(--amber-bg); border-color: transparent; }
.rcv-st.late { background: #F6D3DB; border-color: transparent; color: #7A1F33; font-weight: 700; }
.rcv-pbar { width: 110px; height: 8px; background: var(--rule); border-radius: 99px; overflow: hidden; }
.rcv-pbar i { display: block; height: 100%; background: var(--green, #5B8A1F); }
.rcv-recov { color: var(--ink); } .rcv-recov.ok { color: var(--green-text, #2e7d32); }
.rcv-prog small, .rcv-grid td small { display: block; }
.rcv-last { font-size: .78rem; color: var(--ink-soft); }
.rcv-rem-prev { border: 1px solid var(--rule); border-radius: 8px; padding: 8px 10px; margin: 8px 0 4px; background: var(--paper); font-size: .85rem; }
#rcv-rem-own { width: 100%; margin: 8px 0 0; }
@media (min-width: 900px) {
  #grades-recovery-view.rcv-desk .rcv-pbar-page { display: none; }
  #grades-recovery-view.rcv-desk .rcv-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: start; }
  #grades-recovery-view.rcv-desk .rcv-side { overflow-y: auto; display: flex; flex-direction: column; }
  #grades-recovery-view.rcv-desk .rcv-side > .rcv-side-sum { display: none; }
  #grades-recovery-view.rcv-desk .rcv-side-in { flex: 1; margin-top: 0; }
  #grades-recovery-view.rcv-desk .rcv-main { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
  #grades-recovery-view.rcv-desk #rcv-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; }
  #grades-recovery-view.rcv-desk[data-v="list"] #rcv-body, #grades-recovery-view.rcv-desk[data-v="progress"] #rcv-body { overflow: hidden; }
  #grades-recovery-view.rcv-desk .rcv-tblbox { flex: 1; min-height: 0; }
}

/* v682 🧮 the plan and "why each task" (one student) */
.rcv-plan-sum { background: var(--green-bg); border-radius: 10px; padding: 8px 12px; margin: 4px 0 8px; font-size: .88rem; line-height: 1.6; }
.rcv-plan-sum .ok, .rcv-why-tbl .ok { color: var(--green-text, #2e7d32); }
.rcv-why-tbl { width: 100%; font-size: .85rem; }
.rcv-why-tbl th, .rcv-why-tbl td { text-align: center; vertical-align: middle; }
.rcv-why-tbl .l { text-align: left; }
.rcv-why-tbl tr.rcv-low td { background: var(--amber-bg); }
.rcv-why-tbl tr.rcv-miss td { background: var(--red-bg); }

/* v684 Student Monitoring: ⚠️ Not complete · 🧮 Columns · 🛟 Remediation list; invitations (Remediation, Numeracy Camp) */
#smon-table .tbl-tools .tbl-dl { display: none; } /* one ⬇ Download ▾ (it follows the screen) */
.smon-xtools { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: 6px; }
.smon-colw { position: relative; display: inline-block; }
.smon-col-menu { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; min-width: 190px; }
.smon-col-menu.hidden { display: none; }
.smon-col-menu label { display: flex; gap: 8px; align-items: center; font-size: .85rem; white-space: nowrap; cursor: pointer; }
.smon-col-menu input { width: auto; margin: 0; }
.smon-rem-card { max-width: min(1100px, 96vw) !important; width: 96vw; }
.smon-rem-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.smon-rem-tools .smon-dl { position: relative; }
.smon-rem-box { max-height: 58vh; overflow: auto; }
.smon-rem-tbl { width: 100%; font-size: .88rem; }
.smon-rem-tbl th, .smon-rem-tbl td { text-align: center; vertical-align: middle; }
.smon-rem-tbl .l { text-align: left; }
.smon-rem-tbl td small { display: block; font-size: .72rem; color: var(--ink-soft); }
.inv-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--green-bg); border-radius: 10px; padding: 8px 12px; margin: 6px 0; }
.inv-bar input { width: auto; margin: 0; padding: 6px 8px; }
.inv-bar input[type=text] { min-width: 180px; }
.camp-nr { width: 100%; }
.camp-nr td, .camp-nr th { text-align: center; } .camp-nr .camp-name { text-align: left; }

/* v686 🙈 Hide / 🗑 Delete a subject */
.subj-rm-row { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line, #ddd); }
.subj-rm-row:first-of-type { border-top: 0; }
.subj-rm-row .onl-tick { display: flex; align-items: flex-start; gap: 8px; line-height: 1.35; }
.subj-rm-row .onl-tick > input { margin-top: 3px; flex: 0 0 auto; }
.subj-rm-row .onl-tick > span { flex: 1 1 auto; }

/* v688 📝 scan-only sections in sight */
.prog-scan-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.prog-scan-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; border: 1.5px dashed var(--line, #bbb); font-weight: 700; font-size: .9rem; }
.prog-scan-chip small { font-weight: 600; opacity: .8; }
.prog-scan-chip.is-saved { border-color: #4b6b2a; background: rgba(75,107,42,.08); }
.prog-scan-chip.is-new { border-color: #c9892b; background: rgba(201,137,43,.12); }
.prog-scan-chip.is-gone { border-color: #b23b3b; color: #b23b3b; padding-right: 10px; }
.prog-scan-x { border: 0; background: transparent; cursor: pointer; font-size: .85rem; padding: 2px 4px; color: inherit; opacity: .7; }
.prog-scan-x:hover { opacity: 1; }

/* v689 🛟 Students table fits its box: 5 columns, no sideways scrolling, short rows */
.rcv-grid.rcv-fit { table-layout: fixed; width: 100%; }
.rcv-grid.rcv-fit col.rcv-c-tick { width: 38px; }
.rcv-grid.rcv-fit col.rcv-c-stu { width: 24%; }
.rcv-grid.rcv-fit col.rcv-c-ir { width: 11%; }
.rcv-grid.rcv-fit col.rcv-c-plan { width: 22%; }
.rcv-grid.rcv-fit th, .rcv-grid.rcv-fit td { padding: 5px 8px; line-height: 1.3; overflow-wrap: anywhere; }
.rcv-grid.rcv-fit .rcv-name { min-width: 0; font-size: .9rem; }
.rcv-grid.rcv-fit th .rcv-sort { white-space: nowrap; }
.rcv-grid.rcv-fit .rcv-whys { line-height: 1.2; }
.rcv-grid.rcv-fit .rcv-why { white-space: normal; margin: 1px 3px 1px 0; padding: 1px 7px; }
.rcv-grid.rcv-fit .rcv-plan { font-size: .85rem; }
.rcv-grid.rcv-fit .rcv-plan small { margin: 1px 0 3px; }
.rcv-grid.rcv-fit .rcv-open-btn { padding: 3px 10px; font-size: .8rem; margin: 0; }
.rcv-grid.rcv-fit td.c small { font-size: .7rem; }
.rcv-grid.rcv-fit .rcv-open-btn { float: right; min-height: 0; height: auto; line-height: 1.3; padding: 3px 10px; margin: 0 0 2px 6px; }
.rcv-grid.rcv-fit .rcv-plan .rcv-pill { margin-bottom: 2px; }

/* v690 🛟 Remediation list: 🔎 Show ▾ terms / sections */
.rem-show-menu { left: 0; right: auto; min-width: 200px; padding: 6px 0; display: flex; flex-direction: column; }
.rem-show-menu.hidden { display: none; }
.rem-show-menu label { display: flex; align-items: center; gap: 8px; padding: 6px 14px; cursor: pointer; font-size: .9rem; white-space: nowrap; }
.rem-show-menu label:hover { background: var(--paper-2); }
.rem-show-menu label input { margin: 0; }
.rem-show-menu small { color: var(--ink-soft); }
.rem-show-h { font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); padding: 6px 14px 2px; }
.smon-rem-tools .rem-show-menu label { justify-content: flex-start; margin: 0; padding: 5px 14px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.smon-rem-tools .rem-show-menu label input[type=checkbox] { width: 16px; height: 16px; flex: 0 0 auto; padding: 0; }

/* v691 ✅ auto-checked recovery PT · 🗓️ Given tasks · deficient records */
.rcva-part { border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; margin: 10px 0; background: var(--card); }
.rcva-part h4 { margin: 0 0 6px; }
.rcva-intro { font-size: .9rem; line-height: 1.45; background: var(--paper); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.rcva-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 220px); gap: 4px 10px; align-items: center; padding: 4px 0; border-top: 1px dashed var(--rule); }
.rcva-item label { margin: 0; font-size: .9rem; }
.rcva-item label small { color: var(--ink-soft); }
.rcva-item input, .rcva-item select { margin: 0; width: 100%; }
@media (max-width: 600px) { .rcva-item { grid-template-columns: 1fr; } }
.rcva-res { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin: 8px 0 12px; font-size: .78rem; }
.rcva-res span { border-radius: 99px; padding: 2px 8px; background: var(--paper); border: 1px solid var(--rule); }
.rcva-res span.bad { border-color: var(--red, #c62828); }
.rcv-auto-card { max-width: 760px; }
.rcv-auto-box { max-height: 46vh; overflow: auto; margin-bottom: 8px; }
.rcv-auto-tbl { width: 100%; font-size: .82rem; }
.rcv-auto-tbl td.l { text-align: left; }
.rcv-auto-tbl tr.ok td { background: var(--green-bg); }
.rcv-auto-tbl tr.bad td { background: var(--red-bg); }
.rcv-auto-tbl tr.rcv-auto-part td { font-weight: 800; background: var(--paper); text-align: left; }
.rcv-rec { display: inline-block; font-size: .72rem; border: 1px solid var(--rule); border-radius: 99px; padding: 0 6px; margin: 1px 2px; color: var(--ink-soft); }
.rcv-rec.bad { border-color: var(--red, #c62828); color: var(--red, #c62828); font-weight: 700; }
.rcv-given-tbl td { font-size: .85rem; }
.rcv-given-tbl td.l small { display: block; }
/* v693 👁 preview */
.rcv-auto-intro { font-size: .8rem; line-height: 1.4; background: var(--paper); }
.rcv-auto-box.compact { max-height: 36vh; }
.rcv-auto-tbl td small { display: block; color: var(--ink-soft); font-weight: 400; }
.rcv-prev-q li { margin: 6px 0; } .rcv-prev-q small { display: block; color: var(--ink-soft); }
