:root {
  --bg: #fff8e8;
  --paper: #ffffff;
  --ink: #16223a;
  --ink-soft: #5a6479;
  --border: #d9deea;
  --accent: #2c5cff;
  --accent-soft: #ebf0ff;
  --good: #1f8a3a;
  --good-soft: #d6f3dd;
  --warn: #c4521a;
  --warn-soft: #fcebd9;
  --bad: #b3261e;
  --pop: #ff5ba9;
  --shadow: 0 4px 14px rgba(20, 35, 60, 0.08), 0 1px 3px rgba(20, 35, 60, 0.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 15px/1.55 ui-rounded, system-ui, -apple-system, "Segoe UI Rounded", "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(circle at 10% -10%, #d6f4ff 0, transparent 40%),
    radial-gradient(circle at 90% 110%, #ffe9f4 0, transparent 50%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button {
  font: inherit;
  cursor: pointer;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  padding: 0.55rem 1rem;
  border-radius: 0.7rem;
  font-weight: 600;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform 0.06s ease, background 0.12s;
}
button:hover { background: #f0f2f8; transform: translateY(-1px); }
button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
button.primary { background: var(--accent); color: #fff; border-color: var(--ink); }
button.primary:hover { background: #1f49d6; }
button.danger { color: var(--bad); border-color: var(--ink); }
button.danger:hover { background: #fbeae9; }
button.ghost { background: transparent; border-color: transparent; color: var(--ink-soft); box-shadow: none; font-weight: 500; }
button.ghost:hover { background: #eef0f6; color: var(--ink); transform: none; }
button.small { padding: 0.3rem 0.7rem; font-size: 13px; box-shadow: 0 2px 0 var(--ink); }
input, textarea, select {
  font: inherit;
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 2px solid var(--border);
  border-radius: 0.7rem;
  background: var(--paper);
  color: var(--ink);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 4px; font-weight: 500; }

.shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }

.topbar {
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 3px 0 rgba(20, 35, 60, 0.08);
}
.topbar .brand { flex: none; white-space: nowrap; font-weight: 800; font-size: 18px; color: var(--ink); text-decoration: none; }
.topbar a.brand:hover { text-decoration: none; }
.topbar .spacer { flex: 1; }
.topbar .who {
  min-width: 0;
  max-width: min(36vw, 24rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-soft);
  font-size: 13px;
}
.topbar > button { flex: none; white-space: nowrap; }
@media (max-width: 640px) {
  .topbar { padding: 0.55rem 0.75rem; gap: 0.4rem; }
  .topbar .brand { font-size: 16px; }
  .topbar .who { display: none; }
  .topbar > button { padding: 0.4rem 0.55rem; font-size: 13px; }
}

.page { padding: 2rem 1.5rem; max-width: 880px; margin: 0 auto; width: 100%; }
.page h1 { margin: 0 0 0.4rem; font-size: 24px; font-weight: 800; }
.page h2 { font-size: 17px; margin: 1.5rem 0 0.6rem; color: var(--ink); font-weight: 700; }
.page p.lead { color: var(--ink-soft); margin: 0 0 1.5rem; font-size: 15px; }

.card {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 0 rgba(20, 35, 60, 0.12);
  margin-bottom: 1rem;
}
.card h3 { margin: 0 0 0.5rem; font-size: 16px; font-weight: 700; }

.field { margin-bottom: 0.85rem; }
.row { display: flex; gap: 0.75rem; align-items: end; flex-wrap: wrap; }
.row > * { flex: 1 1 200px; }
.actions { display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }

/* Auth + onboarding */
.auth-card {
  max-width: 24rem;
  margin: 4rem auto;
  background: var(--paper);
  padding: 2rem;
  border: 2px solid var(--ink);
  border-radius: 1.25rem;
  box-shadow: 0 6px 0 rgba(20, 35, 60, 0.12);
}
.auth-card h1 { margin: 0 0 0.4rem; font-size: 22px; font-weight: 800; }
.auth-card p { color: var(--ink-soft); margin: 0 0 1.25rem; font-size: 14px; }
.auth-card .field { margin-bottom: 0.85rem; }
.auth-card .err { color: var(--bad); font-size: 13px; min-height: 16px; margin: 0.3rem 0; }
.auth-card .switch { text-align: center; margin-top: 1rem; font-size: 13px; color: var(--ink-soft); }
.password-row { position: relative; }
.password-row input { padding-right: 3.5rem; }
.password-row .toggle {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
}
.password-row .toggle:hover { background: var(--accent-soft); color: var(--accent); transform: translateY(-50%); }

/* Wizard */
.wizard {
  max-width: 40rem;
  margin: 3rem auto;
  padding: 0 1.25rem;
  width: 100%;
}
/* The reading-levels step renders a compact multi-column grid; inside the default
   40rem wizard its number inputs shrink to ~65px and 3-digit values clip.
   Give that step room whenever the desktop grid layout is active. */
.wizard.wizard-wide { max-width: 56rem; }
@media (max-width: 640px) {
  .wizard { margin: 1.4rem auto 2rem; padding: 0 0.75rem; }
  .wizard-progress { margin-bottom: 0.8rem; }
  .wizard h1 { margin-bottom: 1.2rem; font-size: 22px; line-height: 1.2; }
  .wizard .card { padding: 1rem; }
}
.wizard-progress {
  height: 8px;
  background: rgba(20, 35, 60, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 0 auto 1.25rem;
  max-width: 22rem;
  border: 2px solid var(--ink);
  box-shadow: 0 2px 0 rgba(20, 35, 60, 0.10);
}
.wizard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--pop));
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.wizard-step-label {
  text-align: center;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}
.wizard h1 {
  text-align: center;
  margin: 0 0 2rem;
  font-size: 26px;
  font-weight: 800;
}
.card-subhead {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.3rem;
  line-height: 1.35;
}
.card-subhead .lede-emoji {
  display: inline-block;
  margin-right: 0.4rem;
  font-size: 18px;
}
.grade-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1rem 0 0.5rem;
}
.grade-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 0.9rem;
  border: 2px solid var(--border);
  border-radius: 0.8rem;
  background: #fafbff;
  cursor: pointer;
  font-weight: 700;
}
.grade-option:hover { border-color: var(--accent); background: var(--accent-soft); }
.grade-option input { width: 18px; height: 18px; margin: 0; padding: 0; }
@media (max-width: 560px) { .grade-options { grid-template-columns: 1fr 1fr; } }
@media (max-width: 360px) { .grade-options { grid-template-columns: 1fr; } }

/* Supporting copy under a wizard step title — informative but visually
   subordinate: smaller, softer, and clearly not part of the form itself. */
.step-intro {
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.55;
  max-width: 44rem;
}

/* Onboarding finish: the daily student routine at a glance. Light icon+text
   rows (no boxes) so the boxed link cards below stay the visual anchors. */
.routine-steps { display: flex; flex-direction: column; gap: 0.8rem; margin: 1rem 0 0.4rem; }
.routine-step { display: grid; grid-template-columns: 34px 1fr; gap: 0.75rem; align-items: start; }
.routine-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 15px;
  box-shadow: 0 2px 0 rgba(20, 35, 60, 0.12);
}
.routine-copy strong { display: block; font-size: 14px; }
.routine-copy p { margin: 0.15rem 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.finish-section-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-top: 1.3rem;
}

/* Onboarding finish: the two hand-off items (Student link vs optional board) */
.finish-steps { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.9rem; }
.finish-section-label + .finish-steps { margin-top: 0.45rem; }
.finish-step {
  padding: 0.85rem 1rem;
  background: #fafbff;
  border: 2px solid var(--border);
  border-radius: 0.8rem;
}
.finish-step strong { display: block; font-size: 14px; }
.finish-step p { margin: 0.25rem 0 0.6rem; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.finish-step .share-btn { min-height: 40px; }

/* Links stay locked (no copyable URL) until story generation is fully ready */
.finish-step-locked { opacity: 0.75; }
.finish-step-locked .share-btn { box-shadow: none; cursor: not-allowed; }
.finish-step-ready { border-color: var(--accent); background: var(--accent-soft); }
.finish-lock {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 600;
}

/* First-stories generation: real progress checklist (server counts, no fake
   percent). Rows: pending dot → active spinner → done check. */
.gen-intro { margin: 1.1rem 0 1rem; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.gen-progress {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  margin: 0 0 1rem;
  background: #fafbff;
  border: 2px solid var(--border);
  border-radius: 0.8rem;
}
.gen-row-main {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.gen-row-icon {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #fff;
  box-sizing: border-box;
}
.gen-row.active .gen-row-icon {
  border-color: var(--accent-soft);
  border-top-color: var(--accent);
  animation: genSpin 0.9s linear infinite;
}
.gen-row.done .gen-row-icon {
  border-color: var(--good);
  background: var(--good) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12"><path d="M2.5 6.5l2.5 2.5 4.5-5" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') center / 10px 10px no-repeat;
}
@keyframes genSpin { to { transform: rotate(360deg); } }
.gen-row-label { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.gen-row.active .gen-row-label { color: var(--ink); }
.gen-row.done .gen-row-label { color: var(--ink); }
.gen-row-count {
  margin-left: auto;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  white-space: nowrap;
}
.gen-row.done .gen-row-count { color: var(--good); font-weight: 700; }
.gen-row-warn {
  margin: 0.2rem 0 0 calc(16px + 0.55rem);
  font-size: 12px;
  line-height: 1.45;
  color: #8a5a00;
}
.gen-row-warn:empty { display: none; }
.gen-status { margin: 0.6rem 0 0; font-size: 13px; color: var(--ink-soft); min-height: 18px; }
.gen-ready {
  padding: 0.9rem 1rem;
  margin: 0 0 0.5rem;
  background: var(--good-soft);
  border: 2px solid var(--good);
  border-radius: 0.8rem;
}
.gen-ready-head { font-size: 15px; font-weight: 800; }
.gen-ready-p { margin: 0.3rem 0 0.75rem; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.gen-ready .actions { margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .gen-row.active .gen-row-icon { animation: none; border-color: var(--accent); border-top-color: var(--accent); }
}
/* display:flex on these blocks would otherwise defeat the hidden attribute */
.gen-progress[hidden], .gen-ready[hidden], .actions[hidden], .gen-intro[hidden] { display: none; }

/* Quick access (top of dashboard): three matching tiles — label, one line of
   supporting copy, then actions. The hint flexes so action rows line up across
   tiles regardless of copy length. */
.share-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.share-block {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.9rem 1rem 1rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 0.9rem;
  box-shadow: 0 3px 0 rgba(20, 35, 60, 0.12);
}
.share-block-label {
  font-size: 15px;
  color: var(--ink);
  font-weight: 700;
}
.share-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.share-btn { padding: 0.4rem 0.85rem; font-size: 13px; box-shadow: 0 2px 0 var(--ink); min-height: 38px; }
.share-block-hint { flex: 1; font-size: 12px; color: var(--ink-soft); line-height: 1.45; }
@media (max-width: 760px) {
  .share-bar { grid-template-columns: 1fr; gap: 0.6rem; }
  .share-block { padding: 0.8rem 0.9rem 0.9rem; }
  .share-btn { min-height: 44px; }
}

/* Student list */
.student-list { display: flex; flex-direction: column; gap: 0.5rem; }
.student-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 0.6rem;
  align-items: end;
  padding: 0.5rem 0.7rem;
  border-radius: 0.7rem;
  background: #fafbff;
  border: 2px solid var(--border);
}
.student-row:hover { border-color: var(--accent-soft); }
.student-row .avatar { width: 40px; height: 40px; border-radius: 50%; background: #e9edf6; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 2px solid var(--ink); cursor: pointer; flex-shrink: 0; align-self: end; }
.student-row .avatar img { width: 100%; height: 100%; }
.student-row .avatar-empty { color: var(--ink); font-size: 14px; font-weight: 700; letter-spacing: 0.02em; }
.student-row > input { padding: 0.4rem 0.7rem; font-size: 14px; border-width: 1px; }
.student-row select { padding: 0.35rem 0.55rem; font-size: 12px; border-width: 1px; box-shadow: none; max-width: 9rem; }
.student-row button { padding: 0.3rem 0.6rem; font-size: 13px; box-shadow: 0 2px 0 var(--ink); align-self: end; }
.student-row-fields { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: end; }
.student-row-field { display: flex; flex-direction: column; gap: 0.2rem; }
.student-row-field-label { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; padding-left: 0.2rem; }
.student-row-name { font-weight: 600; align-self: center; }
.student-row-onboarding .avatar { align-self: center; }
.student-row-onboarding button { align-self: center; }
@media (max-width: 760px) {
  .student-row { grid-template-columns: auto 1fr auto auto; }
  .student-row-fields { grid-column: 1 / -1; }
  /* Keep wrapped action buttons at their natural size instead of
     stretching to fill a grid track. */
  .student-row button { justify-self: start; min-height: 38px; }
  .student-row button.danger { justify-self: end; min-width: 44px; }
}

/* Settings — label editor */
.profile-row {
  display: grid;
  grid-template-columns: 1.35fr repeat(4, 0.68fr) 40px;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.4rem;
}
.profile-row.heading {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
  font-weight: 700;
}
.profile-row.heading > * { text-align: center; }
.profile-row.heading > *:first-child { text-align: left; padding-left: 0.5rem; }
.profile-field { min-width: 0; }
.profile-field-label { display: none; }
/* Slimmer horizontal padding than the 0.85rem global input default so
   3-4 digit Lexile/word values stay fully visible in the compact grid. */
.profile-field input { width: 100%; padding-left: 0.6rem; padding-right: 0.6rem; }
.profile-row input.invalid { border-color: var(--bad); box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.12); }
.profile-row-head { display: none; }
.profile-row .remove-btn .remove-btn-text { display: none; }
/* Shared remove-button base. This must come BEFORE the mobile media block
   below: the media rules have the same specificity, so they only win by
   source order. */
.label-row .remove-btn,
.profile-row .remove-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  color: var(--bad);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 0.55rem;
  box-shadow: 0 2px 0 var(--ink);
}
.label-row .remove-btn:hover:not(:disabled),
.profile-row .remove-btn:hover:not(:disabled) {
  background: #fbeae9;
}
.label-row .remove-btn:disabled,
.profile-row .remove-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  color: var(--ink-soft);
  box-shadow: 0 2px 0 var(--border);
  border-color: var(--border);
}
@media (max-width: 800px) {
  .profile-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    padding: 0.85rem 0.9rem 0.9rem;
    border: 2px solid var(--border);
    border-radius: 0.9rem;
    background: #fafbff;
    margin-bottom: 0.9rem;
  }
  .profile-row.heading { display: none; }
  .profile-row-head {
    display: block;
    grid-column: 1 / -1;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--border);
  }
  .profile-row .profile-field-name { grid-column: 1 / -1; }
  .profile-field-label {
    display: block;
    margin: 0 0 0.2rem 0.2rem;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
  }
  .profile-row .remove-btn {
    grid-column: 1 / -1;
    width: auto;
    height: auto;
    min-height: 44px;
    min-width: 44px;
    max-width: 100%;
    justify-self: end;
    align-self: center;
    margin-top: 0.2rem;
    padding: 0.4rem 0.8rem;
    gap: 0.3rem;
    font-size: 13px;
    font-weight: 700;
  }
  .profile-row .remove-btn .remove-btn-x { font-size: 16px; }
  .profile-row .remove-btn .remove-btn-text { display: inline; }
}
.label-row {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 0.7fr 70px 40px;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.4rem;
}
.label-row.heading {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
  font-weight: 700;
}
.label-row.heading > * { text-align: center; }
.label-row.heading > *:first-child { text-align: left; padding-left: 0.5rem; }
.label-row .default-mark {
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.label-row .default-mark input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  cursor: pointer;
  accent-color: var(--accent);
}
.label-row input.invalid {
  border-color: var(--bad);
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.12);
}
.label-row input { padding: 0.4rem 0.7rem; font-size: 14px; border-width: 1px; }

/* Settings entry card (dashboard) */
.settings-entry-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.settings-entry .meta { font-size: 12px; color: var(--ink-soft); font-weight: 500; margin-top: 0.2rem; }
.settings-entry button { flex: none; min-height: 40px; }

/* Settings page header: compact top save next to the title */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin: 0.6rem 0 1.1rem;
}
.page-head h1 { margin: 0; }
.page-head button { flex: none; }

/* Teacher progress overview */
.progress-card-head { display: flex; justify-content: space-between; gap: 0.85rem 1rem; align-items: flex-start; margin-bottom: 0.9rem; flex-wrap: wrap; }
.progress-card-head h3 { margin-bottom: 0.15rem; }
.progress-card-head .roster-edit-btn { flex: none; min-height: 40px; }
.roster-editor { margin-top: 0.2rem; }
.class-progress-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.class-progress-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.3fr) 72px 88px minmax(110px, 0.9fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.class-progress-row:last-child { border-bottom: none; }
.class-progress-student strong, .class-progress-student span { display: block; }
.class-progress-student span { color: var(--ink-soft); font-size: 12px; margin-top: 0.1rem; }
.class-progress-metric span, .class-progress-metric strong { display: block; }
.class-progress-metric span { color: var(--ink-soft); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.class-progress-metric strong { font-size: 15px; margin-top: 0.1rem; }
.metric-good { color: var(--good); }
/* View student/progress: a soft accent chip — clearly clickable and non-white
   against the row background, with dark-accent text for contrast (AA). */
button.progress-open {
  justify-self: end;
  white-space: nowrap;
  background: var(--accent-soft);
  color: #1f49d6;
  border: 2px solid transparent;
  border-radius: 0.65rem;
  box-shadow: none;
  font-weight: 700;
  min-height: 38px;
}
button.progress-open:hover { background: #dbe4ff; color: #16307f; transform: none; }
button.progress-open:active { transform: none; box-shadow: none; }
button.progress-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.progress-open:disabled { background: #eef0f6; color: var(--ink-soft); opacity: 1; }
.mini-trend { height: 38px; display: flex; align-items: flex-end; gap: 3px; min-width: 72px; padding-top: 3px; }
.mini-trend-bar { display: block; flex: 1 1 0; min-width: 4px; max-width: 12px; background: var(--warn); border-radius: 3px 3px 1px 1px; }
.mini-trend-bar.good { background: var(--good); }
.progress-no-data { color: var(--ink-soft); font-size: 12px; line-height: 1.4; }

/* Per-student progress and attempt review */
.progress-overview-card { padding: 1.1rem; }
.progress-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.65rem; }
.progress-stats > div { padding: 0.75rem; background: #fafbff; border: 1px solid var(--border); border-radius: 0.75rem; }
.progress-stats span, .progress-stats strong { display: block; }
.progress-stats span { color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.progress-stats strong { font-size: 22px; line-height: 1.2; margin-top: 0.25rem; }
.progress-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.progress-trend-panel, .progress-missed-panel { min-width: 0; padding: 0.8rem; border-top: 2px solid var(--ink); }
.progress-trend-panel > strong, .progress-missed-panel > strong { display: block; margin-bottom: 0.55rem; font-size: 13px; }
.progress-trend-panel .mini-trend { height: 80px; gap: 6px; }
.progress-trend-panel .mini-trend-bar { max-width: none; }
.missed-word-list { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.missed-word-list span { display: inline-block; padding: 0.25rem 0.55rem; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 12px; font-weight: 700; }
.attempts-heading { margin-top: 1.6rem !important; }
.attempt-card-list { display: flex; flex-direction: column; gap: 0.8rem; }
.attempt-card { background: var(--paper); border: 2px solid var(--ink); border-radius: 0.9rem; padding: 1rem 1.1rem; box-shadow: 0 3px 0 rgba(20,35,60,0.10); }
.attempt-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.8rem; }
.attempt-card-head strong, .attempt-card-head span { display: block; }
.attempt-card-head > div > span { color: var(--ink-soft); font-size: 12px; margin-top: 0.15rem; }
.attempt-card-summary { display: flex; gap: 0.8rem; flex-wrap: wrap; color: var(--ink-soft); font-size: 12px; margin-top: 0.55rem; }
.attempt-review { margin-top: 0.8rem; border-top: 1px solid var(--border); padding-top: 0.7rem; }
.attempt-review summary { cursor: pointer; color: var(--accent); font-weight: 700; font-size: 13px; }
.attempt-review summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.attempt-word-map { display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.9rem; margin-top: 0.8rem; background: #fafbff; border: 1px solid var(--border); border-radius: 0.7rem; line-height: 1.65; }
.attempt-word { padding: 0.05rem 0.18rem; border-radius: 0.28rem; font-family: Georgia, serif; font-size: 14px; }
.attempt-word.correct { color: #35405a; }
.attempt-word.missed { color: var(--bad); background: #fbeae9; text-decoration: underline; text-decoration-thickness: 2px; }
.attempt-misses, .attempt-tips, .attempt-audio { margin-top: 0.9rem; }
.attempt-misses > strong, .attempt-tips > strong, .attempt-audio > strong { display: block; font-size: 13px; margin-bottom: 0.45rem; }
.attempt-tips ul { margin: 0; padding-left: 1.2rem; color: var(--ink-soft); font-size: 13px; }
.attempt-audio audio { display: block; width: 100%; max-width: 30rem; height: 34px; }
.attempt-delete-row { display: flex; justify-content: flex-end; margin-top: 1rem; padding-top: 0.7rem; border-top: 1px solid var(--border); }

@media (max-width: 720px) {
  .class-progress-row { grid-template-columns: 1fr 1fr; gap: 0.55rem 1rem; padding: 0.85rem 0; }
  .class-progress-student { grid-column: 1 / -1; }
  .class-progress-student strong { font-size: 15px; }
  /* Keep the trend visible on phones — it's the fastest read of how a
     student is doing — just slightly shorter. */
  .class-progress-trend { grid-column: 1 / -1; }
  .class-progress-trend .mini-trend { height: 30px; max-width: 22rem; }
  button.progress-open {
    grid-column: 1 / -1;
    justify-self: stretch;
    min-height: 44px;
  }
  .progress-card-head .roster-edit-btn { min-height: 44px; }
  .progress-stats { grid-template-columns: 1fr 1fr; }
  .progress-detail-grid { grid-template-columns: 1fr; gap: 0.4rem; }
  .progress-trend-panel .mini-trend { height: 64px; }
  .attempt-review summary { padding: 0.5rem 0; }
  .attempt-delete-row button { min-height: 44px; border: 2px solid var(--border); border-radius: 0.65rem; }
  .attempt-audio audio { height: 40px; }
}
@media (max-width: 420px) {
  .progress-card, .progress-overview-card { padding: 0.9rem; }
  .progress-stats { gap: 0.45rem; }
  .progress-stats > div { padding: 0.65rem; }
  .progress-stats strong { font-size: 19px; }
  .attempt-card { padding: 0.85rem; }
  .attempt-card-head { align-items: stretch; flex-direction: column; }
  .attempt-card-head .pill { align-self: flex-start; }
  .attempt-word-map { padding: 0.7rem; }
  .attempt-delete-row { justify-content: stretch; }
  .attempt-delete-row button { width: 100%; }
}

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 0.7rem 1.2rem; border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); font-size: 14px; font-weight: 600; z-index: 99; opacity: 0; transition: opacity 0.2s; }
.toast.show { opacity: 1; }
.toast.err { background: var(--bad); }

/* Pills */
.pill { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 11px; font-weight: 700; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.muted { background: #eef0f6; color: var(--ink-soft); }

.empty { padding: 2rem 1rem; color: var(--ink-soft); text-align: center; font-size: 14px; }
.empty .empty-action { margin-top: 0.75rem; min-height: 44px; padding: 0.5rem 1.1rem; border: 2px solid var(--border); border-radius: 0.65rem; font-weight: 600; }

/* Today's stories — type tabs */
.story-tabs {
  display: flex;
  gap: 0.4rem;
  margin: 0 0 -2px;
  border-bottom: 2px solid var(--ink);
  padding: 0 0.25rem;
}
.story-tabs .story-tab {
  padding: 0.6rem 1rem;
  border: 2px solid var(--ink);
  /* Inactive tabs keep their bottom edge so the strip's underline runs as one
     continuous baseline at rest — selection is carried by the active fill. */
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink-soft);
  font-weight: 700;
  border-radius: 0.7rem 0.7rem 0 0;
  box-shadow: none;
  margin-bottom: -2px;
}
.story-tabs .story-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--ink);
  position: relative;
}
.story-display {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.story-display .story-text {
  font-size: 18px;
  line-height: 1.7;
  white-space: pre-wrap;
  color: var(--ink);
}
.story-display .story-meta {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
/* The reading-level (permutation) selector sits above the slot tabs — give
   it a little breathing room and a flatter look so the two tab rows read as
   a hierarchy, not one confusing strip. */
.perm-tabs {
  border-bottom: none;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.perm-tabs .story-tab {
  border-radius: 0.7rem;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 0;
  font-size: 13px;
  padding: 0.45rem 0.85rem;
}
.hint { font-size: 13px; color: var(--ink-soft); margin: 0.3rem 0 0.6rem; }

/* Avatar picker popover */
.avatar-popover {
  position: absolute;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(8, 36px);
  gap: 4px;
  padding: 8px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 0.7rem;
  box-shadow: 0 6px 0 rgba(20, 35, 60, 0.12);
}
.avatar-popover img { width: 36px; height: 36px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.avatar-popover img.picked { border-color: var(--accent); }
.avatar-popover img:hover { border-color: var(--accent-soft); }

/* Public landing page (signed-out home) */
.landing { width: 100%; overflow: hidden; }
.landing-hero {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 4.6rem 2rem 5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: center;
}
.landing-eyebrow {
  color: var(--accent);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.landing-hero h1 {
  font-size: clamp(33px, 4.8vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin: 0 0 1.2rem;
  max-width: 12em;
}
.landing-sub {
  color: var(--ink-soft);
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.62;
  margin: 0 0 1.5rem;
  max-width: 34rem;
}
.landing-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.landing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.65rem 1.1rem;
  border: 2px solid var(--ink);
  border-radius: 0.75rem;
  box-shadow: 0 3px 0 var(--ink);
  color: var(--ink);
  background: var(--paper);
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.12s ease;
}
.landing-button:hover { text-decoration: none; transform: translateY(-1px); }
.landing-button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.landing-button.primary { color: #fff; background: var(--accent); }
.landing-button.primary:hover { background: #1f49d6; }
.landing-button.secondary { background: rgba(255,255,255,0.55); }
.landing-button.light { color: var(--ink); background: #fff; flex: none; }
.landing-preview {
  position: relative;
  padding: 1.15rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 1.35rem;
  box-shadow: 10px 12px 0 #b8c8ff;
  transform: rotate(1.2deg);
}
.preview-top { display: flex; justify-content: flex-end; align-items: center; gap: 0.6rem; margin-bottom: 0.85rem; }
.preview-level { color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 0.2rem 0.5rem; font-size: 11px; font-weight: 800; }
.preview-student { display: flex; align-items: center; gap: 0.65rem; padding-bottom: 0.85rem; border-bottom: 1px solid var(--border); }
.preview-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: #ffd9eb; border: 2px solid var(--ink); font-weight: 900; }
.preview-student strong, .preview-student span, .preview-feedback strong, .preview-feedback span { display: block; }
.preview-student span { color: var(--ink-soft); font-size: 11px; }
.preview-score {
  margin-left: auto;
  color: var(--good);
  background: var(--good-soft);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.preview-story { margin: 0.9rem 0; padding: 1rem; background: #fffaf0; border: 1px solid #e8dcc5; border-radius: 0.8rem; }
.preview-story h3 { margin: 0 0 0.55rem; font-size: 15px; }
.preview-story p { margin: 0 0 0.55rem; color: #39435a; font-family: Georgia, serif; font-size: 13px; line-height: 1.65; }
.preview-story p:last-child { margin-bottom: 0; }
.preview-story .pw { padding: 0 0.08em; border-radius: 0.25em; }
.preview-story .pw.good { color: var(--good); box-shadow: inset 0 -2px 0 #8fd6a3; }
.preview-story .pw.miss { color: var(--warn); background: var(--warn-soft); box-shadow: inset 0 -2px 0 #e0995f; font-weight: 700; }
.preview-legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin-top: 0.75rem; }
.legend-item { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--ink-soft); font-size: 10.5px; font-weight: 700; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }
.legend-dot.good { background: #8fd6a3; }
.legend-dot.miss { background: #e0995f; }
.preview-feedback { display: grid; grid-template-columns: auto 1fr; gap: 0.65rem; align-items: start; padding: 0.7rem 0.8rem; color: #fff; background: var(--ink); border-radius: 0.75rem; }
.preview-mic { font-size: 20px; }
.preview-feedback strong { font-size: 12px; }
.preview-feedback span:not(.preview-mic) { color: #c3cbda; font-size: 11px; }
.preview-feedback-title { margin-bottom: 0.25rem; }
.preview-tip-list { margin: 0; padding-left: 1rem; color: #c3cbda; font-size: 11px; line-height: 1.45; }
.preview-tip-list strong { display: inline; color: #fff; font-size: inherit; }
.landing-how { color: #fff; background: var(--ink); padding: 4.2rem 2rem 4.6rem; }
.landing-how .landing-eyebrow { color: #91a9ff; }
.landing-section-head { width: min(1050px, 100%); margin: 0 auto 2rem; }
.landing-section-head h2, .teacher-view-copy h2, .landing-cta h2 { margin: 0; font-size: clamp(27px, 3.6vw, 42px); line-height: 1.12; letter-spacing: -0.025em; }
.landing-steps {
  width: min(1050px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #3b4863;
  border-radius: 1rem;
  background: #3b4863;
}
.landing-step { min-height: 210px; padding: 1.45rem; background: var(--ink); }
.step-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 2.1rem; }
.step-icon { color: #ffd96a; display: inline-flex; }
.step-icon svg { display: block; width: 26px; height: 26px; }
.step-number { color: #91a9ff; font-size: 12px; font-weight: 900; letter-spacing: 0.08em; }
.landing-step h3 { margin: 0 0 0.5rem; font-size: 18px; }
.landing-step p { margin: 0; color: #c3cbda; font-size: 14px; line-height: 1.6; }
.landing-teacher-view {
  width: min(1050px, calc(100% - 4rem));
  margin: 5rem auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: center;
}
.teacher-view-copy p { color: var(--ink-soft); font-size: 16px; line-height: 1.65; }
.teacher-view-points { border-top: 2px solid var(--ink); }
.teacher-view-points > div { padding: 1rem 0; border-bottom: 2px solid var(--ink); display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 1rem; }
.teacher-view-points strong { font-size: 14px; }
.teacher-view-points span { color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.landing-cta {
  width: min(1050px, calc(100% - 4rem));
  margin: 0 auto 4rem;
  padding: 2.1rem 2.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  color: #fff;
  background: var(--accent);
  border: 2px solid var(--ink);
  border-radius: 1.2rem;
  box-shadow: 0 5px 0 var(--ink);
}
.landing-cta p { margin: 0.45rem 0 0; color: #dce4ff; }
@media (max-width: 780px) {
  .landing-hero { grid-template-columns: 1fr; padding: 3rem 1.25rem 4rem; gap: 2.5rem; }
  .landing-hero h1 { max-width: 12em; }
  .landing-preview { width: min(440px, 100%); margin: 0 auto; transform: none; box-shadow: 7px 8px 0 #b8c8ff; }
  .landing-how { padding: 3.4rem 1.25rem 3.8rem; }
  .landing-steps { grid-template-columns: 1fr; }
  .landing-step { min-height: auto; }
  .step-top { margin-bottom: 0.9rem; }
  .landing-teacher-view { width: calc(100% - 2.5rem); margin: 3.5rem auto; grid-template-columns: 1fr; gap: 1.5rem; }
  .landing-cta { width: calc(100% - 2.5rem); margin-bottom: 2.75rem; align-items: flex-start; flex-direction: column; padding: 1.6rem; }
}
@media (max-width: 480px) {
  .landing-hero { padding: 2.4rem 0.9rem 3.25rem; }
  .landing-hero h1 { font-size: 33px; }
  .landing-sub { font-size: 15px; }
  .landing-actions { align-items: stretch; flex-direction: column; }
  .landing-button { width: 100%; }
  .landing-preview { padding: 0.85rem; }
  .preview-story { padding: 0.8rem; }
  .landing-how { padding-left: 0.9rem; padding-right: 0.9rem; }
  .landing-teacher-view, .landing-cta { width: calc(100% - 1.8rem); }
  .teacher-view-points > div { grid-template-columns: 1fr; gap: 0.3rem; }
}

/* ---- Stories page: story mode selector ---- */
.mode-card h3 { margin-bottom: 0.75rem; }
.mode-options { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.mode-option {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  text-align: left;
  padding: 0.85rem 0.95rem;
  background: var(--paper);
  border: 2px solid var(--border);
  border-radius: 0.85rem;
  box-shadow: none;
  cursor: pointer;
  font-weight: 500;
}
.mode-option:hover { border-color: var(--accent); background: var(--accent-soft); }
.mode-option.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.mode-radio {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 0.1rem;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}
.mode-option.active .mode-radio {
  border-color: var(--accent);
  background: radial-gradient(circle at center, var(--accent) 0 45%, #fff 50%);
}
.mode-copy { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.mode-copy strong { font-size: 14px; }
.mode-copy span { font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; font-weight: 500; }
@media (max-width: 640px) { .mode-options { grid-template-columns: 1fr; } }

.mode-note {
  margin: 0 0 1rem;
  padding: 0.6rem 0.9rem;
  border-radius: 0.7rem;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--border);
}
.mode-note.ok { background: var(--good-soft); color: var(--good); border-color: var(--good); }
.mode-note.warn { background: var(--warn-soft); color: #8a5a00; border-color: var(--warn); }

.slot-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 0.45rem;
  border-radius: 50%;
  background: var(--warn);
  vertical-align: 0.1em;
}
.slot-dot.done { background: var(--good); }

/* ---- Stories page: manual passage editor ---- */
.manual-textarea {
  width: 100%;
  min-height: 12rem;
  resize: vertical;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  line-height: 1.7;
  padding: 0.9rem 1rem;
}
.manual-status { margin-top: 0.5rem; font-size: 12.5px; color: var(--ink-soft); }
.manual-status.dirty { color: #8a5a00; font-weight: 600; }
.manual-editor-actions { display: flex; gap: 0.6rem; align-items: center; margin-top: 0.8rem; flex-wrap: wrap; }
.manual-editor-actions .danger { margin-left: auto; }
.manual-quiz-section { margin-top: 1.2rem; border-top: 1px solid var(--border); padding-top: 1rem; }

/* ---- Quiz preview (teacher-facing, answer key marked) ---- */
.quiz-preview { margin-top: 1.1rem; background: #fafbff; border: 1px solid var(--border); border-radius: 0.8rem; padding: 0.9rem 1rem; }
.manual-quiz-section .quiz-preview { margin-top: 0.8rem; }
.quiz-preview-head { display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; margin-bottom: 0.6rem; }
.quiz-preview-head strong { font-size: 13.5px; }
.quiz-preview-head span { font-size: 12px; color: var(--ink-soft); }
.quiz-q { padding: 0.45rem 0 0.35rem; border-top: 1px dashed var(--border); }
.quiz-q:first-of-type { border-top: none; }
.quiz-q-text { font-weight: 700; font-size: 13.5px; }
.quiz-choices { list-style: none; margin: 0.35rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.quiz-choices li { font-size: 13px; color: var(--ink-soft); padding-left: 1.4rem; position: relative; }
.quiz-choices li.correct { color: var(--good); font-weight: 700; }
.quiz-check { position: absolute; left: 0.2rem; }
.quiz-feedback { margin: 0.35rem 0 0; font-size: 12px; color: var(--ink-soft); font-style: italic; }
.quiz-empty { font-size: 13px; color: var(--ink-soft); line-height: 1.55; background: #fafbff; border: 1px dashed var(--border); border-radius: 0.7rem; padding: 0.7rem 0.9rem; }
.quiz-actions { display: flex; justify-content: flex-end; margin-top: 0.7rem; }

/* ---- Attempts: quiz + reading-rate reporting ---- */
.attempt-card-pills { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.attempt-quiz { margin-top: 0.9rem; }
.attempt-quiz > strong { display: block; font-size: 13px; margin-bottom: 0.45rem; }
.attempt-quiz-list { margin: 0; padding-left: 1.2rem; font-size: 13px; display: flex; flex-direction: column; gap: 0.4rem; }
.attempt-quiz-q { display: block; font-weight: 600; }
.attempt-quiz-a { display: block; color: var(--ink-soft); margin-top: 0.1rem; }
.attempt-quiz-list li.correct .attempt-quiz-a { color: var(--good); }
.attempt-quiz-list li.missed .attempt-quiz-a { color: var(--bad); }
.attempt-quiz-list li.missed .attempt-quiz-a em { color: var(--ink-soft); font-style: normal; }
.stat-unit { display: block; font-size: 10px; color: var(--ink-soft); font-style: normal; font-weight: 600; margin-top: 0.1rem; }
.mini-trend-bar.rate { background: var(--accent); }
.mini-trend-bar.nodata { background: var(--border); }
@media (max-width: 480px) {
  .attempt-card-pills { justify-content: flex-start; }
  .quiz-actions button { width: 100%; }
  .manual-editor-actions .danger { margin-left: 0; width: 100%; }
  .manual-editor-actions .primary { width: 100%; }
}
.progress-detail-grid .progress-missed-panel { grid-column: 1 / -1; }

/* ---- "A day in ClassReads" walkthrough (signed-out landing) ----
   Scene player: .dt-scene stacks absolutely inside .dt-stage; only .active is
   visible. Every animated element's BASE state is its final frame — the
   dtIn/dtPop/etc. keyframes only add the entrance. Under reduced motion all
   dt animations are disabled, so each scene renders as a complete still. */
.landing-day { width: min(1050px, calc(100% - 4rem)); margin: 4.75rem auto 1.25rem; }
.landing-day .landing-section-head { margin-bottom: 1.5rem; }
.landing-day-sub { margin: 0.65rem 0 0; color: var(--ink-soft); font-size: 15.5px; line-height: 1.6; max-width: 42rem; }

.dt-player {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 1.25rem;
  box-shadow: 8px 10px 0 #b8c8ff;
  overflow: hidden;
}
.dt-stage {
  position: relative;
  min-height: 430px;
  /* Deep brand gradient so the white mock UI pops off the stage. All scene
     text sits inside white .dt-mock / .dt-storycard surfaces, never on this. */
  background:
    radial-gradient(circle at 12% -8%, rgba(255, 255, 255, 0.2) 0, transparent 45%),
    radial-gradient(circle at 100% 112%, rgba(255, 91, 169, 0.4) 0, transparent 52%),
    linear-gradient(140deg, #2c5cff 0%, #4b3cf0 58%, #6d2fe8 100%);
  border-bottom: 2px solid var(--ink);
}
.dt-scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.4rem;
  opacity: 0;
  visibility: hidden;
}
.dt-scene.active { opacity: 1; visibility: visible; transition: opacity 0.3s ease; }

/* Caption: the accessible narration for each scene */
.dt-caption { margin: 0; padding: 1rem 1.4rem 0.35rem; min-height: 4.6rem; }
.dt-caption-title { display: block; font-size: 15.5px; margin-bottom: 0.2rem; }
.dt-caption-text { display: block; color: var(--ink-soft); font-size: 13.5px; line-height: 1.55; }

/* Controls */
.dt-controls {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding: 0.7rem 1.4rem 1rem;
}
.dt-play { min-width: 6.2rem; padding: 0.4rem 0.8rem; font-size: 13.5px; box-shadow: 0 2px 0 var(--ink); }
.dt-step { padding: 0.4rem 0.7rem; font-size: 13.5px; box-shadow: 0 2px 0 var(--ink); }
.dt-counter { color: var(--ink-soft); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dt-controls-spacer { flex: 1; }
.dt-replay { font-size: 13px; }

/* Scene progress dots (buttons — reset the global button chrome) */
.dt-dots { display: inline-flex; gap: 5px; align-items: center; padding: 0 0.2rem; }
.dt-dot {
  position: relative;
  width: 20px;
  height: 7px;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: #e6e9f2;
  box-shadow: none;
  overflow: hidden;
  cursor: pointer;
}
.dt-dot:hover { background: var(--accent-soft); transform: none; }
.dt-dot:active { transform: none; box-shadow: none; }
.dt-dot.past { background: var(--accent); border-color: var(--ink); }
.dt-dot.cur { background: var(--accent-soft); }
.dt-dot.cur::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
.dt-dots.playing .dt-dot.cur::after { animation: dtDotFill var(--dur, 6s) linear forwards; }
@keyframes dtDotFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Entrance primitives — base state IS the final frame */
@keyframes dtIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes dtPop { 0% { opacity: 0; transform: scale(0.4); } 70% { opacity: 1; transform: scale(1.12); } 100% { opacity: 1; transform: scale(1); } }
.dt-scene.active .dt-in { animation: dtIn 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both; animation-delay: var(--d, 0s); }
.dt-scene.active .dt-pop { animation: dtPop 0.45s cubic-bezier(0.2, 0.7, 0.3, 1.4) both; animation-delay: var(--d, 0s); }

/* Shared mock-UI card */
.dt-mock {
  width: min(560px, 100%);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 1rem;
  box-shadow: 0 6px 0 rgba(9, 14, 40, 0.45);
  padding: 1rem 1.1rem;
}
.dt-mock-wide { width: min(620px, 100%); }
.dt-mock.dt-center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.8rem; }
.dt-mock-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding-bottom: 0.55rem;
  margin-bottom: 0.7rem;
  border-bottom: 2px solid var(--border);
}
.dt-mock-head strong { font-size: 15px; }
.dt-mock-head span { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.dt-note { color: var(--ink-soft); font-size: 12.5px; line-height: 1.55; max-width: 30rem; }
.dt-note strong { color: var(--ink); }
.dt-note-div { margin-top: 0.75rem; padding-top: 0.65rem; border-top: 1px dashed var(--border); }
.dt-center-note { margin-top: 0.8rem; text-align: center; font-weight: 700; color: var(--ink); }

/* Roster scenes */
.dt-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0; }
.dt-init {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffd9eb;
  border: 2px solid var(--ink);
  font-weight: 900;
  font-size: 13px;
}
.dt-row-name { font-weight: 700; font-size: 14px; }
.dt-chip {
  margin-left: auto;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.16rem 0.55rem;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}
.dt-addrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--border);
}
.dt-fakeinput {
  flex: 1;
  max-width: 12rem;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 0.55rem;
  padding: 0.3rem 0.55rem;
  font-size: 13px;
  font-weight: 600;
  background: var(--paper);
}
.dt-caret { width: 1.5px; height: 1em; background: var(--ink); margin-left: 1px; opacity: 0; }
@keyframes dtBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.dt-scene.active .dt-caret { animation: dtBlink 1s step-end infinite; }

/* Reading-level settings scene — mirrors the real settings editor fields */
.dt-lvlrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.35rem; margin-top: 0.55rem; }
.dt-lvlname { grid-column: 1 / -1; font-size: 12.5px; }
.dt-fld { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dt-fld-label {
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dt-fld-val, .dt-fld-swap {
  display: block;
  border: 1.5px solid var(--border);
  border-radius: 0.45rem;
  padding: 0.18rem 0.4rem;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: #fafbff;
}
/* Edited field: base state is the final frame — new value shown, highlighted */
.dt-fld-edit .dt-fld-swap { border-color: var(--accent); background: var(--accent-soft); }
.dt-fld-swap { position: relative; }
.dt-swap-old { position: absolute; inset: 0.18rem 0.4rem auto; opacity: 0; }
.dt-swap-new { opacity: 1; }
@keyframes dtSwapHide { from { opacity: 1; } to { opacity: 0; } }
@keyframes dtSwapShow { from { opacity: 0; } to { opacity: 1; } }
@keyframes dtFldFlash { from { box-shadow: 0 0 0 0 rgba(44, 92, 255, 0.55); } to { box-shadow: 0 0 0 9px rgba(44, 92, 255, 0); } }
.dt-scene.active .dt-swap-old { animation: dtSwapHide 0.15s 1.9s both; }
.dt-scene.active .dt-swap-new { animation: dtSwapShow 0.15s 1.9s both; }
.dt-scene.active .dt-fld-edit .dt-fld-swap { animation: dtFldFlash 0.7s ease-out 1.9s; }

/* Teacher-dashboard overview scene — compact mirror of the real dashboard */
.dt-dashtiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; }
.dt-dashtile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  border: 1.5px solid var(--border);
  border-radius: 0.7rem;
  padding: 0.45rem 0.55rem;
}
.dt-dashtile strong { font-size: 12px; }
.dt-fakebtn-sm { padding: 0.14rem 0.45rem; font-size: 10.5px; box-shadow: 0 1.5px 0 var(--ink); border-width: 1.5px; white-space: nowrap; }
.dt-dashsettings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  border: 1.5px solid var(--border);
  border-radius: 0.7rem;
  padding: 0.45rem 0.6rem;
  margin-top: 0.5rem;
  font-size: 11.5px;
  color: var(--ink-soft);
}
.dt-dashsettings strong { color: var(--ink); font-size: 12px; }
.dt-dashprog-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.65rem; font-size: 12.5px; }
.dt-progrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto 54px;
  align-items: center;
  gap: 0.5rem;
  padding: 0.32rem 0;
  border-top: 1px solid var(--border);
  margin-top: 0.32rem;
  font-size: 12px;
}
.dt-prog-id strong { font-size: 12.5px; display: block; line-height: 1.25; }
.dt-prog-lvl { color: var(--ink-soft); font-size: 10.5px; font-weight: 700; }
.dt-prog-today { color: var(--ink-soft); font-weight: 800; white-space: nowrap; }
.dt-prog-today.good { color: var(--good); }
.dt-prog-avg { font-weight: 800; }
.dt-minitrend { display: flex; align-items: flex-end; gap: 2px; height: 22px; }
.dt-minitrend span { flex: 1; background: var(--good); border-radius: 2px 2px 0 0; }

/* Student-link scene */
.dt-badge {
  display: inline-block;
  color: #fff;
  background: var(--accent);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 0.22rem 0.75rem;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.09em;
}
.dt-linkpill {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: #fffaf0;
  border: 2px solid var(--ink);
  border-radius: 0.8rem;
  padding: 0.6rem 0.85rem;
}
.dt-linkurl { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14.5px; font-weight: 700; }
.dt-fakebtn {
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 0.55rem;
  box-shadow: 0 2px 0 var(--ink);
  padding: 0.22rem 0.65rem;
  font-size: 12.5px;
  font-weight: 800;
}
@keyframes dtPress { 0%, 100% { transform: none; box-shadow: 0 2px 0 var(--ink); } 50% { transform: translateY(2px); box-shadow: 0 0 0 var(--ink); } }
.dt-scene.active .dt-presses { animation: dtPress 0.4s ease 1.35s 1; }
.dt-minitoast {
  color: var(--good);
  background: var(--good-soft);
  border: 1.5px solid var(--good);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 12.5px;
  font-weight: 800;
}

/* Name-grid scene */
.dt-namegrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem; }
.dt-nametile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.6rem 0.3rem 0.5rem;
  border: 2px solid var(--border);
  border-radius: 0.8rem;
  background: var(--paper);
  font-weight: 800;
  font-size: 13px;
}
.dt-nametile img { width: 44px; height: 44px; }
.dt-nametile.dt-tapped { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
@keyframes dtTap { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.dt-scene.active .dt-tapped { animation: dtIn 0.5s both, dtTap 0.5s ease 1.1s 1; }

/* Two-fresh-stories scene */
.dt-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; width: min(560px, 100%); }
.dt-storycard {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: flex-start;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 0.9rem;
  box-shadow: 0 5px 0 rgba(9, 14, 40, 0.45);
  padding: 0.9rem 1rem;
}
.dt-storycard strong { font-size: 14.5px; }
.dt-newbadge {
  color: #8a5a00;
  background: #ffefc2;
  border: 1.5px solid #d9a514;
  border-radius: 999px;
  padding: 0.14rem 0.5rem;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.05em;
}
.dt-slot { color: var(--ink-soft); font-size: 12px; font-weight: 700; }

/* Read-aloud scene, word-by-word */
.dt-recpill { color: var(--bad); background: #fdeceb; border: 1.5px solid var(--bad); border-radius: 999px; padding: 0.14rem 0.55rem; font-size: 11.5px; font-weight: 800; }
/* Words are adjacent <span>s with no text between them — flex wrap supplies
   both the line breaking and the inter-word gaps. */
.dt-passage {
  margin: 0 0 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em 0.38em;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 15.5px;
  line-height: 1.35;
}
.dt-word { padding: 0 0.1em; border-radius: 0.25em; }
.dt-word.good { color: var(--good); box-shadow: inset 0 -2px 0 #8fd6a3; }
.dt-word.miss { color: var(--warn); background: var(--warn-soft); box-shadow: inset 0 -2px 0 #e0995f; font-weight: 700; }
@keyframes dtWordGood {
  from { color: var(--ink); box-shadow: inset 0 -2px 0 transparent; }
  to { color: var(--good); box-shadow: inset 0 -2px 0 #8fd6a3; }
}
@keyframes dtWordMiss {
  from { color: var(--ink); background: transparent; box-shadow: inset 0 -2px 0 transparent; }
  to { color: var(--warn); background: var(--warn-soft); box-shadow: inset 0 -2px 0 #e0995f; }
}
.dt-scene.active .dt-word.good { animation: dtWordGood 0.3s both; animation-delay: var(--d, 0s); }
.dt-scene.active .dt-word.miss { animation: dtWordMiss 0.3s both; animation-delay: var(--d, 0s); }
.dt-tip {
  display: block;
  color: var(--ink);
  background: #fafbff;
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0.55rem;
  padding: 0.4rem 0.7rem;
  font-size: 12.5px;
  margin-top: 0.45rem;
}

/* Feed-the-dragon scene: cookie (story 1) then milk (story 2) fly in */
.dt-dragonstage { position: relative; width: 210px; height: 150px; }
.dt-dragonimg { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 120px; height: 120px; }
@keyframes dtDragonBob { 0%, 100% { transform: translateX(-50%); } 50% { transform: translateX(-50%) translateY(-6px); } }
.dt-scene.active .dt-dragonimg { animation: dtDragonBob 2s ease-in-out 1.2s 2; }
.dt-flycookie { position: absolute; right: 8px; bottom: 44px; width: 46px; height: 46px; transform: rotate(14deg); }
@keyframes dtFly {
  0% { opacity: 0; transform: translate(-40px, -95px) rotate(-50deg) scale(0.6); }
  55% { opacity: 1; transform: translate(-10px, -35px) rotate(-12deg) scale(1.05); }
  100% { opacity: 1; transform: rotate(14deg) scale(1); }
}
.dt-scene.active .dt-flycookie { animation: dtFly 1.2s cubic-bezier(0.3, 0.6, 0.4, 1) 0.3s both; }
.dt-flymilk {
  position: absolute;
  left: 6px;
  bottom: 42px;
  width: 44px;
  height: 44px;
  transform: rotate(-10deg);
  filter: drop-shadow(0 1px 1px rgba(20, 35, 60, 0.35));
}
@keyframes dtFlyMilk {
  0% { opacity: 0; transform: translate(40px, -95px) rotate(45deg) scale(0.6); }
  55% { opacity: 1; transform: translate(10px, -35px) rotate(8deg) scale(1.05); }
  100% { opacity: 1; transform: rotate(-10deg) scale(1); }
}
.dt-scene.active .dt-flymilk { animation: dtFlyMilk 1.2s cubic-bezier(0.3, 0.6, 0.4, 1) 2.3s both; }
.dt-spark { position: absolute; right: 18px; bottom: 92px; font-size: 24px; }
.dt-spark2 { right: auto; left: 16px; bottom: 90px; }
.dt-treatrow { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.dt-treattag {
  border: 1.5px solid #d9a514;
  background: #ffefc2;
  color: #8a5a00;
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  font-size: 11.5px;
  font-weight: 800;
}
.dt-treattag-milk { border-color: #7aa7d9; background: #e9f3ff; color: #1c5a9e; }

/* Comprehension-quiz scene */
.dt-quizdots { display: flex; gap: 0.35rem; margin-bottom: 0.6rem; }
.dt-qdot { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.dt-qdot.now { background: var(--accent); }
.dt-quizq { margin: 0 0 0.6rem; font-weight: 800; font-size: 15px; }
.dt-choice {
  border: 2px solid var(--border);
  border-radius: 0.7rem;
  padding: 0.5rem 0.8rem;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 0.4rem;
}
.dt-choice.right { color: var(--good); border-color: var(--good); background: var(--good-soft); font-weight: 800; }

/* Completion-board scene */
.dt-boardgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.dt-btile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: 'av name streak' 'av bowls bowls';
  align-items: center;
  column-gap: 0.55rem;
  border: 2px solid var(--border);
  border-radius: 0.8rem;
  padding: 0.45rem 0.6rem;
}
.dt-btile-av { grid-area: av; width: 40px; height: 40px; }
.dt-btile strong { grid-area: name; font-size: 13.5px; }
.dt-streak { grid-area: streak; font-size: 11.5px; font-weight: 800; color: #a33c00; white-space: nowrap; }
.dt-streak-empty { color: var(--ink-soft); font-weight: 600; }
.dt-bowls { grid-area: bowls; display: flex; gap: 0.3rem; margin-top: 0.15rem; }
.dt-bowls img { width: 18px; height: 18px; }
.dt-bowls img.dim { opacity: 0.22; filter: grayscale(1); }
.dt-boardfoot {
  margin-top: 0.7rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--border);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

/* Private teacher-view scene */
.dt-lock { color: var(--accent); font-size: 11.5px; font-weight: 900; letter-spacing: 0.04em; }
.dt-statrow { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.dt-pill2 {
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  background: #fafbff;
  white-space: nowrap;
}
.dt-pill2.good { color: var(--good); background: var(--good-soft); border-color: var(--good); }
.dt-missrow { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.65rem; }
.dt-misslabel { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.dt-missword { color: var(--warn); background: var(--warn-soft); border-radius: 0.4rem; padding: 0.1rem 0.45rem; font-size: 12.5px; font-weight: 800; }
.dt-trend { display: flex; align-items: flex-end; gap: 5px; height: 72px; margin-top: 0.85rem; }
.dt-trendbar { flex: 1; max-width: 34px; border-radius: 4px 4px 0 0; background: var(--good); transform-origin: bottom; }
.dt-trendbar.low { background: #e0995f; }
@keyframes dtGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.dt-scene.active .dt-trendbar { animation: dtGrow 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both; animation-delay: var(--d, 0s); }

/* Tomorrow / teacher-controls scene */
.dt-moon { font-size: 40px; line-height: 1; }
.dt-tomorrowcard {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: var(--ink);
  color: #fff;
  border-radius: 0.9rem;
  border: 2px solid var(--ink);
  padding: 0.9rem 1.2rem;
  max-width: 26rem;
}
.dt-tomorrowcard strong { font-size: 14px; }
.dt-tomorrowcard span { color: #c3cbda; font-size: 13px; line-height: 1.5; }

@media (max-width: 780px) {
  .landing-day { width: calc(100% - 2.5rem); margin: 3.5rem auto 1rem; }
  .dt-stage { min-height: 470px; }
  .dt-scene { padding: 1.1rem 0.9rem; }
}
@media (max-width: 480px) {
  .landing-day { width: calc(100% - 1.8rem); }
  .dt-stage { min-height: 500px; }
  .dt-caption { padding: 0.85rem 1rem 0.3rem; min-height: 5.6rem; }
  .dt-controls { padding: 0.6rem 1rem 0.9rem; row-gap: 0.55rem; }
  .dt-controls-spacer { display: none; }
  .dt-replay { margin-left: auto; }
  /* Dots move to their own centered row so play/step/counter stay together */
  .dt-dots { order: 10; flex-basis: 100%; justify-content: center; }
  .dt-passage { font-size: 14px; line-height: 1.8; }
  .dt-duo { grid-template-columns: 1fr; }
  .dt-namegrid { gap: 0.4rem; }
  .dt-nametile img { width: 36px; height: 36px; }
  .dt-boardgrid { grid-template-columns: 1fr; }
  .dt-mock-head strong { font-size: 14px; }
  /* Dashboard tiles stack; each becomes a label/button row */
  .dt-dashtiles { grid-template-columns: 1fr; gap: 0.35rem; }
  .dt-dashtile { flex-direction: row; align-items: center; justify-content: space-between; }
  .dt-progrow { grid-template-columns: minmax(0, 1fr) auto auto 44px; gap: 0.4rem; font-size: 11px; }
  /* The third progress row doesn't fit the phone stage — two rows tell the story */
  .dt-prog-xtra { display: none; }
  .dt-lvlrow { gap: 0.3rem; }
  .dt-fld-label { font-size: 8.5px; letter-spacing: 0; }
}

/* Reduced motion: no autoplay (JS) and no animation — every scene is a
   complete still because base styles are final-frame styles. */
@media (prefers-reduced-motion: reduce) {
  .landing-day *, .landing-day *::before, .landing-day *::after {
    animation: none !important;
    transition: none !important;
  }
}
