:root {
  color-scheme: light;
  --canvas: #f5f9fc;
  --surface: #ffffff;
  --blue: #78b3e0;
  --blue-dark: #28668f;
  --pale-blue: #edf6fc;
  --ink: #243341;
  --heading: #101820;
  --secondary: #526576;
  --border: #d8e4ec;
  --warning: #fff7e8;
  --warning-border: #e8d8ae;
  --radius-large: 22px;
  --radius: 15px;
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: clip;
  background: var(--canvas);
}

body {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

button,
input,
select { font: inherit; }

button,
.button-link,
input[type="file"]::file-selector-button {
  min-width: 44px;
  min-height: 44px;
}

button,
.button-link {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
}

button:hover,
.button-link:hover {
  border-color: var(--blue);
  background: var(--pale-blue);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #101820;
  outline-offset: 3px;
}

a {
  color: #245f89;
  font-weight: 600;
}

h1,
h2,
h3,
strong { color: var(--heading); }

h1,
h2,
h3,
p { margin-top: 0; }

h1,
h2,
h3 { font-weight: 700; }

h1 {
  margin-bottom: 3px;
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 { font-size: 1.15rem; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  translate: 0 -150%;
  border-radius: 8px;
  background: var(--heading);
  color: var(--surface);
  padding: 10px 14px;
}

.skip-link:focus { translate: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.97);
}

.header-inner {
  display: flex;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 11px 24px;
  align-items: center;
  gap: 20px;
}

.brand-lockup {
  display: flex;
  min-width: max-content;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.brand-lockup > div {
  display: flex;
  flex-direction: column;
}

.brand-maker {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}

.brand-lockup strong {
  font-size: 1rem;
  line-height: 1.15;
}

.brand-lockup strong + span {
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 500;
}

.primary-nav {
  display: flex;
  min-width: 0;
  margin-left: auto;
  gap: 3px;
}

.primary-nav button {
  border-color: transparent;
  padding: 7px 13px;
  color: var(--secondary);
  white-space: nowrap;
}

.primary-nav button[aria-current="page"] {
  border-color: #a9cee9;
  background: var(--pale-blue);
  color: var(--heading);
}

#app-main {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 24px 24px 64px;
}

#app-main:focus { outline: none; }

.loading-card,
.empty-view,
.settings-grid > section,
.card,
.setup-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.loading-card,
.empty-view,
.setup-card {
  max-width: 680px;
  padding: 24px;
}

.welcome-view {
  display: grid;
  max-width: 980px;
  min-height: 560px;
  margin: 20px auto 0;
  overflow: hidden;
  align-items: center;
  grid-template-columns: minmax(280px, 1fr) minmax(300px, 0.9fr);
  border: 2px solid var(--heading);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 9px 10px 0 var(--heading);
}

.welcome-maker {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
}

.welcome-copy { padding: 42px; }

.welcome-copy h1 {
  margin-bottom: 14px;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 950;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.welcome-description {
  max-width: 34ch;
  margin-bottom: 24px;
  color: var(--secondary);
  font-size: 1.08rem;
}

.welcome-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.welcome-actions button { padding: 10px 18px; }

.setup-view {
  display: grid;
  width: min(100%, 980px);
  margin: 8px auto 0;
  grid-template-columns: minmax(190px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: start;
}

.setup-visual {
  position: sticky;
  top: 92px;
  overflow: hidden;
  min-height: 300px;
  border: 2px solid var(--heading);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: 5px 6px 0 var(--heading);
}

.setup-visual-image {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.setup-visual-caption {
  margin: 0;
  padding: 12px 15px;
  color: var(--secondary);
  font-size: 0.82rem;
  font-weight: 700;
}

.setup-content {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(150px, 0.72fr) minmax(0, 1.28fr);
  grid-template-areas:
    "rail current"
    "rail notice";
  gap: 12px;
  align-items: start;
}

.setup-rail {
  grid-area: rail;
  display: grid;
  margin: 0 0 12px;
  padding: 0;
  gap: 5px;
  list-style: none;
}

.setup-rail-item {
  display: grid;
  min-height: 44px;
  padding: 7px 10px;
  align-items: center;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--secondary);
}

.setup-rail-item.current {
  border-color: var(--heading);
  background: var(--lime);
  color: var(--heading);
  font-weight: 800;
}

.setup-rail-item.complete { border-color: #afd0e8; }

.setup-step-number {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 800;
}

.setup-step-label,
.setup-help-action,
.setup-primary-action { font-size: 0.75rem; }

.setup-step-state {
  color: var(--blue-dark);
  font-size: 0.72rem;
  font-weight: 800;
}

.setup-current-action,
.setup-help-panel {
  grid-area: current;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
}

.setup-current-action h1,
.setup-help-panel h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.setup-current-action > p,
.setup-help-panel > p { max-width: 62ch; }

.setup-current-action button,
.setup-help-panel button { margin: 5px 6px 0 0; }

.setup-demo-boundary,
.setup-disabled-explanation {
  max-width: 58ch;
  margin: 12px 0;
  padding: 11px 13px;
  border-left: 5px solid var(--lime);
  background: var(--soft-blue);
  color: var(--heading);
  font-weight: 700;
}

.setup-file-label {
  display: block;
  margin: 16px 0 5px;
  font-weight: 800;
}

.setup-current-action input[type="file"],
.setup-current-action input[type="text"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  margin-bottom: 8px;
}

.setup-current-action input[type="text"] {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.setup-email-auth { margin: 14px 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.setup-email-auth > summary { cursor: pointer; padding: 14px 16px; font-weight: 800; min-height: 44px; }
.setup-email-auth > summary:focus-visible { outline: 3px solid var(--blue-dark); outline-offset: 3px; }
.setup-email-form { padding: 0 16px 16px; }
.setup-email-form h2 { font-size: 1.1rem; margin: 8px 0; }
.setup-email-form input { box-sizing: border-box; display: block; width: 100%; min-height: 44px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: inherit; font: inherit; }
.setup-email-form [hidden] { display: none; }
.setup-email-hint { font-size: 0.85rem; }
.setup-email-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.setup-email-actions button { min-height: 44px; }

.setup-plan-summary,
.setup-account-summary,
.setup-complete-summary,
.setup-help-summary {
  display: grid;
  margin: 16px 0;
  gap: 7px;
}

.setup-summary-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.6fr) minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
}

.setup-summary-row dt { color: var(--secondary); font-weight: 700; }
.setup-summary-row dd { margin: 0; overflow-wrap: anywhere; font-weight: 700; }

.setup-warning-list {
  margin: 10px 0;
  padding: 10px 10px 10px 28px;
  border: 1px solid var(--warning-border);
  border-radius: 10px;
  background: var(--warning);
}

.setup-boundaries {
  display: grid;
  margin: 18px 0;
  gap: 10px;
}

.setup-boundary-card {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.setup-boundary-card h2 {
  margin-bottom: 7px;
  color: var(--blue-dark);
  font-size: 1rem;
}

.setup-boundary-list { margin: 0; padding-left: 22px; }
.setup-boundary-list li + li { margin-top: 4px; }
.setup-boundary-excluded { border-color: var(--warning-border); background: #fffdf7; }

.setup-invite-card {
  margin: 18px 0;
  padding: 16px;
  border: 2px solid var(--heading);
  border-radius: var(--radius);
  background: var(--pale-blue);
}

.setup-invite-card h2 { margin-bottom: 8px; }

.setup-invite-code {
  display: block;
  max-width: 100%;
  margin: 8px 0;
  padding: 12px;
  overflow-wrap: anywhere;
  border: 1px solid var(--blue-dark);
  border-radius: 10px;
  background: var(--surface);
  color: var(--heading);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.setup-sync-status,
.setup-status,
.setup-notice {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--blue-dark);
  border-radius: 10px;
  background: var(--pale-blue);
  color: var(--heading);
  font-weight: 800;
}

.setup-notice { grid-area: notice; }

.setup-notice-warning { border-color: var(--warning-border); background: var(--warning); }
.setup-notice-error { border-color: #9b3434; background: #fff2f2; }
.setup-complete-actions { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 620px) {
  .setup-view {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .setup-content {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "current"
      "rail"
      "notice";
  }

  .setup-visual {
    position: static;
    min-height: 0;
  }

  .setup-visual-image { height: 158px; }
  .setup-visual-caption { padding: 8px 12px; }
  .setup-current-action,
  .setup-help-panel { padding: 18px 15px; }
  .setup-current-action h1,
  .setup-help-panel h1 { font-size: clamp(1.9rem, 10vw, 2.7rem); }
  .setup-current-action button,
  .setup-help-panel button { width: 100%; margin-right: 0; }
  .setup-summary-row { grid-template-columns: minmax(100px, 0.7fr) minmax(0, 1fr); }
}

@media (max-width: 390px) {
  .setup-step-label,
  .setup-help-action,
  .setup-primary-action { font-size: 0.75rem; }
  .setup-rail-item { padding-inline: 7px; }
}

.preview-only-note {
  max-width: 36ch;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--blue-dark);
  border-radius: 12px;
  background: var(--pale-blue);
  color: var(--heading);
  font-weight: 800;
}

.setup-card h2 {
  margin-bottom: 20px;
  font-size: 1.35rem;
}

.page-heading {
  display: flex;
  margin-bottom: 16px;
  align-items: center;
  gap: 16px;
}

.page-heading > div:first-child { min-width: 0; }
.page-heading .board-button { margin-left: auto; }

.date-line {
  margin: 0;
  color: var(--secondary);
  font-size: 0.95rem;
  font-weight: 500;
}

.day-clock {
  display: flex;
  margin: 3px 0 0;
  align-items: center;
  gap: 8px;
  color: var(--secondary);
  font-size: 0.82rem;
  font-weight: 500;
}

.day-clock span + span::before {
  margin-right: 8px;
  content: "•";
}

.clock-value { font-variant-numeric: tabular-nums; }

.board-button,
.primary-action {
  border-color: #6aa8d7;
  background: var(--blue);
  color: var(--heading);
  padding: 8px 18px;
}

button:disabled {
  border-color: #9aa5b1;
  background: #d5dbe1;
  box-shadow: none;
  color: #29313a;
  cursor: not-allowed;
  opacity: 1;
}

.teacher-picker {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 3px;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.teacher-picker > span {
  margin-left: 9px;
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 500;
}

.teacher-picker button {
  border-color: transparent;
  padding: 6px 12px;
}

.teacher-picker button[aria-pressed="true"] {
  border-color: #a9cee9;
  background: var(--pale-blue);
  color: var(--heading);
}

.today-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
  gap: 16px;
  align-items: stretch;
}

.today-companions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.today-companions > :last-child:nth-child(odd) { grid-column: 1 / -1; }

.now-card,
.next-card,
.weather-card,
.duty-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
}

.now-card {
  display: flex;
  min-height: 258px;
  padding: 28px;
  flex-direction: column;
  justify-content: center;
  border-color: #acd0eb;
  background: var(--pale-blue);
}

.card-label {
  margin-bottom: 10px;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.now-card h2 {
  max-width: 16ch;
  margin-bottom: 20px;
  overflow-wrap: anywhere;
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
}

.now-timing {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--secondary);
  font-size: 0.95rem;
}

.now-timing strong {
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 700;
}

.next-card,
.duty-card { padding: 17px 18px; }

.next-card h2,
.duty-card h2 {
  margin-bottom: 5px;
  overflow-wrap: anywhere;
  font-size: 1.16rem;
  line-height: 1.15;
}

.card-meta {
  margin: 0;
  color: var(--secondary);
  font-size: 0.82rem;
}

.weather-card {
  display: flex;
  padding: 14px 16px;
  align-items: center;
  gap: 12px;
}

.weather-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  color: #3478aa;
}

.weather-icon-sun,
.weather-icon-partly-cloudy { color: #b86b00; }

.weather-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.weather-refresh {
  align-self: flex-start;
  min-height: 44px;
  max-width: 100%;
  margin-top: 6px;
  padding: 6px 8px;
  font-size: 0.75rem;
  line-height: 1.2;
  white-space: normal;
}

.weather-temp {
  font-size: 1.28rem;
  line-height: 1.05;
}

.weather-feels,
.weather-condition,
.weather-unavailable {
  color: var(--secondary);
  font-size: 0.8rem;
}

.weather-unavailable { margin: 0; }

.weather-card.stale {
  border-color: var(--warning-border);
  background: #fffdf7;
}

.weather-caveat {
  margin-top: 2px;
  color: #715b22;
  font-size: 0.72rem;
  font-weight: 600;
}

.duty-card.upcoming {
  border-color: var(--warning-border);
  background: var(--warning);
}

.duty-card.active {
  border-color: var(--heading);
  background: var(--heading);
  color: var(--surface);
}

.duty-card.active h2,
.duty-card.active .card-label,
.duty-card.active .card-meta { color: var(--surface); }

.special-banner {
  margin-top: 12px;
  padding: 11px 14px;
  border: 1px solid var(--warning-border);
  border-radius: 12px;
  background: var(--warning);
  color: #614b16;
  font-weight: 600;
}

.full-day { margin-top: 14px; }
.timeline-toggle { padding: 8px 16px; }

.timeline {
  display: flex;
  margin-top: 10px;
  flex-direction: column;
  gap: 6px;
}

.timeline-row {
  display: grid;
  min-width: 0;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  grid-template-columns: 120px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
  background: var(--surface);
}

.timeline-row.current,
.timeline-row.next {
  border-color: #b6d5eb;
  background: var(--pale-blue);
}

.timeline-time,
.timeline-state {
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 500;
}

.timeline-title {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--heading);
  font-weight: 600;
}

.timeline-state { text-align: right; }

.today-details {
  margin-top: 16px;
  color: var(--secondary);
  font-size: 0.82rem;
}

.today-details summary {
  width: max-content;
  min-height: 44px;
  padding: 11px 4px;
  cursor: pointer;
  font-weight: 600;
}

.today-details p { margin-bottom: 4px; }

.attribution-link,
.resource-link {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  max-width: 100%;
  padding: 10px 4px;
  align-items: center;
  overflow-wrap: anywhere;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.settings-grid > section,
.card { padding: 18px; }

.settings-grid input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 6px 0 12px;
}

.file-picker-label {
  display: block;
  margin-top: 12px;
  font-weight: 800;
}

.settings-grid input[type="file"]::file-selector-button {
  margin-right: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-weight: 600;
}

.import-message { white-space: pre-line; }

.button-link {
  display: inline-flex;
  padding: 8px 14px;
  align-items: center;
  text-decoration: none;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tool-card,
.legacy-library,
.private-resources,
.board-heading,
.board-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tool-card summary {
  min-height: 52px;
  padding: 15px 17px;
  cursor: pointer;
  color: var(--heading);
  font-weight: 650;
}

.tool-card > p,
.tool-card > ul {
  margin: 0;
  padding: 0 17px 17px;
}

.tool-card > ul { padding-left: 38px; }

.private-card { border-color: #b9d8ef; }

.legacy-library,
.private-resources {
  margin-top: 16px;
  padding: 20px;
}

.legacy-library p,
.private-resources p { color: var(--secondary); }

.plain-list {
  margin: 0;
  padding-left: 22px;
}

.plain-list li + li { margin-top: 7px; }

.status-note,
.empty-note { color: var(--secondary); }

.private-seed-recovery {
  display: grid;
  margin-top: 10px;
  border: 1px solid #ddc47d;
  border-radius: 10px;
  padding: 8px 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  background: #fff8e6;
  color: var(--secondary);
}

.private-seed-recovery p {
  margin: 0;
  font-size: 0.88rem;
}

.resource-row {
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.settings-row {
  display: grid;
  margin-top: 10px;
  grid-template-columns: minmax(130px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.settings-row input,
.settings-row select {
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.calendar-change-review {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #b9d8ef;
  border-radius: 12px;
  background: #f2f8fc;
}

.calendar-change-message {
  margin: 0;
  color: #294c61;
  line-height: 1.45;
}

.calendar-change-apply {
  justify-self: start;
  min-height: 48px;
}

.board-view {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.board-heading {
  grid-column: 1 / -1;
  padding: 24px;
  text-align: center;
}

.board-heading h1 { font-size: clamp(2rem, 7vw, 4.6rem); }

.board-lesson,
.board-process { color: var(--secondary); }

.board-countdown {
  display: block;
  margin: 12px 0;
  color: var(--heading);
  font-size: clamp(2rem, 8vw, 5rem);
}

.board-section { padding: 20px; }

.board-section h2 { color: var(--blue-dark); }

@media (max-width: 800px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .primary-nav {
    display: grid;
    width: 100%;
    margin-left: 0;
    grid-template-columns: repeat(4, minmax(44px, 1fr));
  }

  .primary-nav button {
    padding-inline: 4px;
    font-size: 0.8rem;
  }

  .today-overview,
  .settings-grid,
  .tool-grid,
  .board-view { grid-template-columns: minmax(0, 1fr); }

  .settings-row { grid-template-columns: minmax(0, 1fr); }

  .now-card { min-height: 200px; }
}

@media (max-width: 520px) {
  .site-header { position: static; }

  .header-inner { padding: 8px 14px 7px; }

  .primary-nav { gap: 0; }
  .primary-nav button { font-size: 0.7rem; }
  #app-main { padding: 12px 14px 44px; }

  .page-heading {
    margin-bottom: 11px;
    align-items: flex-start;
  }

  .page-heading .board-button {
    padding-inline: 12px;
    font-size: 0.78rem;
  }

  .date-line { font-size: 0.8rem; }
  .day-clock { font-size: 0.74rem; }
  .today-overview { gap: 9px; }

  .now-card {
    min-height: 170px;
    padding: 19px;
  }

  .now-card h2 {
    margin-bottom: 13px;
    font-size: clamp(1.8rem, 10vw, 2.6rem);
  }

  .now-timing {
    justify-content: space-between;
    font-size: 0.82rem;
  }

  .now-timing strong { font-size: 1.22rem; }
  .today-companions { gap: 8px; }

  .next-card,
  .duty-card { padding: 13px 14px; }

  .next-card h2,
  .duty-card h2 { font-size: 1rem; }

  .weather-card {
    padding: 10px 12px;
    gap: 8px;
  }

  .weather-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .weather-temp { font-size: 1.08rem; }
  .full-day { margin-top: 10px; }

  .timeline-row {
    grid-template-columns: 86px minmax(0, 1fr) 38px;
    gap: 7px;
    padding-inline: 10px;
  }

  .timeline-time,
  .timeline-state { font-size: 0.68rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { scroll-behavior: auto !important; }
}

/* Option 2: bright maker studio */
:root {
  --canvas: #f7fafc;
  --surface: #ffffff;
  --blue: #78b3e0;
  --blue-strong: #2686c3;
  --blue-dark: #185d8b;
  --lime: #dfff3f;
  --ink: #243341;
  --heading: #101820;
  --secondary: #526576;
  --border: #cfdce5;
  --soft-blue: #eaf5fc;
  --soft-lime: #f5ffd0;
  --shadow: 0 14px 34px rgba(22, 54, 78, 0.12);
}

.site-header {
  border-top: 5px solid var(--blue);
  border-bottom-color: #dbe5ec;
  box-shadow: 0 4px 16px rgba(25, 55, 78, 0.07);
}

.header-inner {
  min-height: 82px;
  padding-block: 7px;
}

.brand-lockup strong {
  color: var(--heading);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-lockup strong + span {
  color: var(--blue-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.primary-nav { gap: 2px; }

.primary-nav button {
  display: flex;
  min-width: 68px;
  min-height: 64px;
  padding: 5px 9px 4px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  border-bottom: 4px solid transparent;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--secondary);
  font-size: 0.74rem;
  font-weight: 750;
}

.primary-nav button img {
  width: 24px;
  height: 24px;
  opacity: 0.72;
}

.primary-nav button:hover {
  border-bottom-color: #b8d9ef;
  background: var(--soft-blue);
}

.primary-nav button[aria-current="page"] {
  border: 0;
  border-bottom: 4px solid var(--blue-strong);
  background: var(--soft-blue);
  color: var(--heading);
}

.primary-nav button[aria-current="page"] img { opacity: 1; }

#app-main {
  width: min(100%, 1100px);
  padding-top: 20px;
}

.page-heading { margin-bottom: 12px; }

.page-heading h1 {
  margin-bottom: 2px;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 900;
}

.page-heading .board-button {
  border-color: var(--heading);
  background: var(--heading);
  color: #ffffff;
}

.today-overview {
  margin-bottom: 18px;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 2fr);
  gap: 10px;
}

.today-companions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.today-companions > :last-child:nth-child(odd) { grid-column: auto; }

.now-card,
.next-card,
.weather-card,
.duty-card {
  border-radius: 15px;
  box-shadow: 0 5px 14px rgba(36, 66, 89, 0.07);
}

.now-card {
  min-height: 116px;
  padding: 17px 19px;
  justify-content: flex-start;
  border-color: #a8d0eb;
  background: var(--soft-blue);
}

.now-card h2 {
  max-width: none;
  margin-bottom: 9px;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.now-timing { margin-top: auto; }
.now-timing strong { font-size: 1.2rem; }

.next-card,
.duty-card,
.weather-card {
  min-height: 116px;
  padding: 14px;
}

.next-card h2,
.duty-card h2 { font-size: 1rem; }

.weather-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  opacity: 0.76;
}

.weather-temp { font-size: 1.12rem; }

.project-hero {
  position: relative;
  min-height: 510px;
  margin: 12px 0 38px;
  overflow: hidden;
  border: 2px solid var(--heading);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 9px 10px 0 var(--heading);
  isolation: isolate;
}

.project-hero-art {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.project-hero-copy {
  width: min(56%, 580px);
  margin: 42px 0 130px 42px;
  padding: 24px 26px 26px;
  border: 1px solid rgba(16, 24, 32, 0.13);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(16, 24, 32, 0.1);
}

.project-kicker,
.section-kicker {
  margin-bottom: 6px;
  color: var(--blue-dark);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-title {
  max-width: 7ch;
  margin-bottom: 10px;
  color: var(--heading);
  font-family: "Aptos Display", "Bahnschrift", "Segoe UI", sans-serif;
  font-size: clamp(3.7rem, 7vw, 5.8rem);
  font-weight: 950;
  line-height: 0.78;
  letter-spacing: -0.07em;
  text-transform: uppercase;
}

.project-strapline {
  margin-bottom: 22px;
  color: var(--blue-dark);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 850;
  line-height: 1.16;
}

.project-run-button {
  display: inline-flex;
  min-height: 52px;
  padding: 11px 17px 11px 20px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 2px solid var(--heading);
  border-radius: 12px;
  background: var(--blue);
  color: var(--heading);
  box-shadow: 4px 4px 0 var(--heading);
  font-size: 0.95rem;
  font-weight: 900;
}

.project-run-button:hover {
  background: #a4d4f1;
  border-color: var(--heading);
}

.project-launch-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.project-launch-actions .secondary-action {
  min-height: 52px;
  padding: 11px 17px;
  border: 2px solid var(--heading);
  border-radius: 12px;
  background: #ffffff;
  color: var(--heading);
  font-weight: 850;
}

.preview-launch {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.preview-only-note { margin: 0; font-weight: 850; }

.button-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
}

.project-quick-actions {
  position: absolute;
  z-index: 2;
  bottom: 30px;
  left: 42px;
  display: flex;
  gap: 10px;
}

.project-quick-button {
  display: inline-flex;
  min-height: 48px;
  padding: 9px 15px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--heading);
  border-radius: 10px;
  background: #ffffff;
  color: var(--heading);
  font-size: 0.82rem;
  font-weight: 850;
}

.independence-section,
.project-trail-section {
  margin: 0 0 34px;
  padding: 0 4px;
}

.independence-section > h2,
.project-trail-section h2 {
  margin-bottom: 20px;
  color: var(--heading);
  font-size: clamp(1.6rem, 3vw, 2.45rem);
  font-weight: 950;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.independence-path {
  display: grid;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
}

.independence-stage {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  color: var(--secondary);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
}

.independence-stage::after {
  position: absolute;
  z-index: -1;
  top: 22px;
  left: 50%;
  width: 100%;
  height: 3px;
  background: #d4e0e8;
  content: "";
}

.independence-stage:last-child::after { display: none; }

.stage-number {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 3px solid var(--heading);
  border-radius: 50%;
  background: #ffffff;
  color: var(--heading);
  font-size: 1rem;
  font-weight: 950;
}

.independence-stage.complete .stage-number { background: var(--blue); }

.independence-stage.active .stage-number {
  background: var(--lime);
  box-shadow: 0 0 0 5px rgba(223, 255, 63, 0.35);
}

.independence-stage.active .stage-label { color: var(--heading); }

.trail-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.trail-link {
  min-height: 44px;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: var(--blue-dark);
  text-decoration: underline;
}

.project-trail {
  display: flex;
  margin: 0;
  padding: 7px 4px 14px;
  overflow-x: auto;
  gap: 8px;
  list-style: none;
  scroll-snap-type: x proximity;
  scrollbar-color: var(--blue) #e9f0f5;
}

.project-trail li { scroll-snap-align: start; }

.project-trail-step {
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  padding: 0;
  border: 2px solid #98afbe;
  border-radius: 50%;
  background: #ffffff;
  color: var(--secondary);
  font-size: 0.8rem;
  font-weight: 850;
}

.project-trail-step.complete {
  border-color: var(--blue-dark);
  background: var(--blue);
  color: var(--heading);
}

.project-trail-step.current {
  border: 3px solid var(--heading);
  background: var(--lime);
  color: var(--heading);
  box-shadow: 0 4px 0 var(--heading);
}

.fast-finish-card {
  display: grid;
  min-height: 235px;
  margin: 0 0 32px;
  overflow: hidden;
  border: 2px solid var(--heading);
  border-radius: 20px;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  background: var(--lime);
  box-shadow: 7px 8px 0 var(--heading);
}

.fast-finish-art {
  width: 100%;
  height: 100%;
  min-height: 235px;
  object-fit: cover;
  border-right: 2px solid var(--heading);
  background: #ffffff;
}

.fast-finish-copy {
  display: flex;
  padding: 28px;
  justify-content: center;
  flex-direction: column;
}

.fast-finish-copy .section-kicker { color: #354100; }

.fast-finish-copy h2 {
  margin-bottom: 8px;
  font-size: clamp(1.6rem, 4vw, 2.7rem);
  font-weight: 950;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.fast-finish-copy p:last-child {
  max-width: 46ch;
  margin: 0;
  color: #253100;
  font-weight: 700;
}

.project-library {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.project-library-card {
  display: grid;
  min-height: 132px;
  padding: 17px;
  align-content: start;
  justify-items: start;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  color: var(--heading);
  box-shadow: 0 5px 13px rgba(33, 67, 91, 0.06);
  text-align: left;
}

.project-library-card:hover {
  translate: 0 -2px;
  border-color: var(--blue-dark);
  background: var(--soft-blue);
}

.project-library-number {
  margin-bottom: 9px;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.1em;
}

.project-library-title {
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.08;
}

.project-library-phase {
  margin-top: auto;
  padding-top: 10px;
  color: var(--secondary);
  font-size: 0.74rem;
  font-weight: 700;
}

.project-detail { max-width: 980px; margin: 0 auto; }

.project-detail-heading {
  margin-bottom: 18px;
  padding: 24px;
  border: 2px solid var(--heading);
  border-radius: 20px;
  background: var(--soft-blue);
  box-shadow: 6px 7px 0 var(--heading);
}

.project-detail-heading .detail-back { margin-bottom: 22px; }

.project-detail-heading h1 {
  margin-bottom: 8px;
  font-size: clamp(2.5rem, 7vw, 5.3rem);
  font-weight: 950;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.detail-back {
  min-height: 44px;
  padding: 7px 13px;
  border-color: var(--heading);
  background: #ffffff;
}

.project-detail-actions {
  display: flex;
  margin: 22px 0;
  gap: 10px;
  flex-wrap: wrap;
}

.project-detail-actions button {
  display: inline-flex;
  padding: 9px 16px;
  align-items: center;
  gap: 8px;
}

.project-detail-actions .progress-action {
  border-color: var(--heading);
  background: var(--lime);
  color: var(--heading);
  font-weight: 900;
}

.completion-undo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  padding: 12px 14px 12px 18px;
  border: 1px solid rgba(30, 83, 111, 0.2);
  border-radius: 16px;
  background: #eef8fc;
  color: var(--heading);
  box-shadow: 0 8px 20px rgba(30, 83, 111, 0.08);
}

.completion-undo p {
  margin: 0;
  font-weight: 800;
}

.completion-undo-action {
  min-height: 44px;
  min-width: 76px;
  border: 1px solid var(--heading);
  border-radius: 999px;
  background: #fff;
  color: var(--heading);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.project-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.project-detail-card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(31, 64, 88, 0.07);
}

.project-detail-card.wide { grid-column: 1 / -1; }

.project-detail-card h2 {
  color: var(--blue-dark);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-detail-card p:last-child { margin-bottom: 0; }
.fast-finish-detail { border-top: 7px solid var(--lime); }
.stretch-line { margin-top: 14px; color: var(--secondary); }

.progress-complete-note {
  margin: 0;
  padding: 12px 15px;
  border: 2px solid var(--heading);
  border-radius: 12px;
  background: var(--lime);
  color: var(--heading);
  font-weight: 900;
}

.project-student-view .board-heading {
  border: 3px solid var(--heading);
  background: var(--blue);
  box-shadow: 8px 9px 0 var(--heading);
}

.project-student-view .board-heading h1 { font-weight: 950; }
.project-student-view .board-section { box-shadow: 0 5px 16px rgba(31, 64, 88, 0.08); }
.board-exit-card { border-top: 8px solid var(--lime); }

@media (max-width: 800px) {
  .header-inner {
    align-items: center;
    flex-direction: row;
    gap: 12px;
  }

  .primary-nav {
    display: flex;
    width: auto;
    margin-left: auto;
  }

  .primary-nav button { min-width: 58px; }
  .today-overview { grid-template-columns: minmax(0, 1fr); }
  .today-companions { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .project-hero {
    min-height: 520px;
    box-shadow: 6px 7px 0 var(--heading);
  }

  .project-hero-copy {
    width: min(64%, 510px);
    margin: 28px 0 126px 28px;
  }

  .project-quick-actions { left: 28px; }
  .project-library { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .site-header { position: sticky; }

  .header-inner {
    min-height: 0;
    padding: 7px 10px 5px;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .brand-lockup {
    width: 100%;
    align-items: center;
    flex-direction: row;
    gap: 7px;
  }

  .brand-lockup strong { font-size: 1rem; }

  .brand-maker {
    width: 38px;
    height: 38px;
    border-radius: 9px;
  }

  .primary-nav {
    display: grid;
    width: 100%;
    margin: 0;
    grid-template-columns: repeat(4, minmax(44px, 1fr));
  }

  .primary-nav button {
    min-width: 44px;
    min-height: 51px;
    padding: 4px 2px 2px;
    font-size: 0.62rem;
  }

  .primary-nav button img { width: 20px; height: 20px; }
  #app-main { padding: 12px 12px 44px; }
  .page-heading .board-button { font-size: 0.72rem; }
  .today-overview {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 6px;
  }

  .today-companions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .today-companions > :last-child:nth-child(odd) { grid-column: auto; }

  .now-card,
  .next-card,
  .duty-card,
  .weather-card {
    min-height: 92px;
    padding: 9px;
  }

  .now-card h2,
  .next-card h2,
  .duty-card h2 {
    margin-bottom: 4px;
    overflow-wrap: normal;
    font-size: 0.86rem;
    word-break: normal;
  }

  .card-label {
    margin-bottom: 5px;
    font-size: 0.62rem;
  }

  .card-meta,
  .weather-feels,
  .weather-condition,
  .weather-unavailable {
    font-size: 0.64rem;
  }

  .now-timing {
    display: block;
    font-size: 0.66rem;
  }

  .now-timing strong {
    display: block;
    font-size: 0.82rem;
  }

  .weather-card {
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    text-align: center;
  }

  .weather-icon {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }

  .weather-temp { font-size: 0.86rem; }

  .project-hero {
    min-height: 620px;
    margin-top: 8px;
    border-radius: 19px;
  }

  .project-hero-art {
    height: 300px;
    inset: auto 0 0;
    object-position: 68% center;
  }

  .project-hero-copy {
    width: auto;
    margin: 0;
    padding: 25px 20px 18px;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
  }

  .project-title {
    max-width: none;
    overflow-wrap: normal;
    font-size: clamp(3.1rem, 14vw, 4.3rem);
    letter-spacing: -0.055em;
  }
  .project-launch-actions { display: grid; }
  .project-launch-actions .secondary-action,
  .project-run-button { width: 100%; }

  .project-quick-actions {
    position: absolute;
    right: 16px;
    bottom: 17px;
    left: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-quick-button {
    min-width: 0;
    padding-inline: 9px;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
  }

  .independence-section > h2,
  .project-trail-section h2 { font-size: 1.55rem; }

  .independence-path {
    grid-template-columns: repeat(5, minmax(56px, 1fr));
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .stage-label { font-size: 0.66rem; }
  .stage-number { width: 40px; height: 40px; }
  .independence-stage::after { top: 19px; }

  .fast-finish-card { grid-template-columns: minmax(0, 1fr); }

  .fast-finish-art {
    height: 190px;
    min-height: 190px;
    border-right: 0;
    border-bottom: 2px solid var(--heading);
  }

  .fast-finish-copy { padding: 22px; }
  .project-library { grid-template-columns: minmax(0, 1fr); }
  .project-library-card { min-height: 108px; }
  .project-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .project-detail-card.wide { grid-column: auto; }
  .project-detail-heading { padding: 19px; }
  .project-detail-heading h1 { font-size: clamp(2.35rem, 14vw, 4rem); }
  .project-student-view { grid-template-columns: minmax(0, 1fr); }

  .welcome-view {
    min-height: 0;
    margin-top: 6px;
    grid-template-columns: minmax(0, 1fr);
    box-shadow: 6px 7px 0 var(--heading);
  }

  .welcome-maker {
    height: auto;
    min-height: 0;
    aspect-ratio: 1;
  }

  .welcome-copy { padding: 26px 22px 30px; }
  .welcome-actions { align-items: stretch; flex-direction: column; }
  .welcome-actions button { width: 100%; }
}

@media (max-width: 390px) {
  .primary-nav button { font-size: 0.58rem; }
  .page-heading h1 { font-size: 1.45rem; }
  .date-line { max-width: 23ch; }
  .project-hero { min-height: 620px; }
  .project-quick-button { font-size: 0.7rem; }
}

.experience-runner {
  max-width: 1100px;
  margin: 0 auto;
}

/* Teacher-first visual repair. Keep this final block authoritative. */
:root {
  --circ-command-blue: #2b86c5;
  --circ-command-blue-dark: #155a87;
  --circ-command-blue-soft: #eaf5fc;
  --circ-success: #78a94d;
  --circ-success-soft: #eef6e7;
  --circ-danger: #9b283b;
}

/* Five plain destinations with a visible current location. */
.primary-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(72px, 1fr));
  align-items: stretch;
  gap: 4px;
}

.primary-nav button {
  min-width: 0;
  min-height: 48px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 4px solid transparent;
  border-radius: 9px 9px 0 0;
  background: transparent;
  color: #243746;
  font-weight: 800;
}

.primary-nav button:hover {
  background: var(--circ-command-blue-soft);
  color: var(--circ-command-blue-dark);
}

.primary-nav button[aria-current="page"] {
  border-bottom-color: var(--circ-command-blue);
  background: #fff;
  color: var(--circ-command-blue-dark);
  box-shadow: none;
}

/* Welcome: one obvious first move, then two smaller choices. */
.welcome-view {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  grid-template-areas: "copy art";
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 76px) clamp(20px, 4vw, 54px);
  border: 1px solid #d6e5ef;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(25, 74, 108, 0.12);
}

.welcome-copy {
  grid-area: copy;
  min-width: 0;
}

.welcome-copy h1 {
  max-width: 12ch;
  margin: 6px 0 14px;
  color: #12344a;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.welcome-description {
  max-width: 56ch;
  color: #455f70;
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  line-height: 1.6;
}

.welcome-maker {
  grid-area: art;
  width: min(100%, 520px);
  height: auto;
  justify-self: center;
  border-radius: 30px;
  object-fit: contain;
}

.welcome-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 610px;
  margin-top: 26px;
}

.welcome-actions button {
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 850;
}

.welcome-actions .welcome-primary {
  grid-column: 1 / -1;
  border-color: var(--circ-command-blue-dark);
  background: var(--circ-command-blue);
  color: #fff;
  box-shadow: 0 8px 18px rgba(43, 134, 197, 0.22);
}

.welcome-actions .welcome-secondary {
  border: 2px solid var(--circ-command-blue);
  background: #fff;
  color: var(--circ-command-blue-dark);
}

.welcome-actions .welcome-preview-action {
  border: 2px solid #c9dbe7;
  background: #f4f9fc;
  color: #24495f;
}

.welcome-privacy {
  margin: 14px 0 0;
  color: #5b7180;
  font-size: 0.88rem;
}

/* Optional planning stays quiet until the teacher asks for it. */
.today-plan-ahead {
  margin: 22px 0 0;
  overflow: clip;
  border: 1px solid #d4e3ec;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(28, 75, 105, 0.07);
}

.today-plan-ahead > summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 16px;
  color: #31566c;
  cursor: pointer;
  font-weight: 850;
}

.today-plan-ahead[open] > summary {
  border-bottom: 1px solid #dce8ef;
  background: #f5f9fc;
}

.today-plan-ahead > :not(summary) {
  margin-inline: 16px;
}

.today-plan-ahead > :last-child {
  margin-bottom: 16px;
}

/* Plain-language schedule builder. */
.schedule-route {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.schedule-teacher-switcher,
.schedule-editor-status {
  margin: 0 0 14px;
}

.schedule-editor {
  display: grid;
  gap: 22px;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid #d4e3ec;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(21, 69, 101, 0.1);
  color: #17384c;
}

.schedule-editor-header {
  padding-bottom: 18px;
  border-bottom: 1px solid #dce8ef;
}

.schedule-editor-header h1 {
  max-width: 18ch;
  margin: 4px 0 8px;
  color: #12344a;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
}

.schedule-editor-header > p:last-child {
  max-width: 62ch;
  margin: 0;
  color: #526a79;
  line-height: 1.55;
}

.schedule-editor-calendar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  border: 1px solid #dce8ef;
  border-radius: 16px;
  background: #f6fafc;
}

.schedule-editor-calendar h2 {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  color: #173f58;
  font-size: 1.25rem;
}

.schedule-editor-field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.schedule-editor-label {
  color: #294c61;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.3;
}

.schedule-editor-input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  border: 2px solid #bdd2df;
  border-radius: 10px;
  background: #fff;
  color: #142f40;
  font: inherit;
}

.schedule-editor-input:hover {
  border-color: #80afd0;
}

.schedule-editor-input:focus-visible {
  border-color: var(--circ-command-blue-dark);
  outline: 3px solid #bfe3f7;
  outline-offset: 1px;
}

.schedule-editor-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(72px, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid #cddfe9;
  border-radius: 14px;
  background: #edf5f9;
}

.schedule-editor-tab {
  min-width: 0;
  min-height: 48px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #31566c;
  font-weight: 850;
}

.schedule-editor-tab:hover {
  background: #fff;
}

.schedule-editor-tab.is-selected,
.schedule-editor-tab[aria-selected="true"] {
  border-color: var(--circ-command-blue-dark);
  background: var(--circ-command-blue);
  color: #fff;
  box-shadow: 0 5px 12px rgba(43, 134, 197, 0.18);
}

.schedule-editor-day-panel {
  display: grid;
  gap: 16px;
}

.schedule-editor-day-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.schedule-editor-day-heading h2 {
  margin: 0;
  color: #173f58;
  font-size: 1.5rem;
}

.schedule-editor-copy-controls {
  display: flex;
  align-items: end;
  gap: 8px;
}

.schedule-editor-copy-controls .schedule-editor-field {
  min-width: 150px;
}

.schedule-editor-copy {
  min-height: 48px;
  white-space: nowrap;
}

.schedule-editor-events {
  display: grid;
  gap: 12px;
}

.schedule-editor-event {
  display: grid;
  grid-template-columns: minmax(135px, 0.8fr) minmax(220px, 1.7fr) minmax(118px, 0.7fr) minmax(118px, 0.7fr) auto;
  align-items: end;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid #d3e1e9;
  border-radius: 14px;
  background: #fbfdfe;
}

.schedule-editor-event legend {
  grid-column: 1 / -1;
  padding: 0 4px;
  color: #173f58;
  font-weight: 900;
}

.schedule-editor-event-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.schedule-editor-row-action,
.schedule-editor-remove {
  min-height: 48px;
  white-space: nowrap;
}

.schedule-editor-remove {
  border: 2px solid #cc8994;
  background: #fff;
  color: var(--circ-danger);
  font-weight: 850;
}

.schedule-editor-remove:hover {
  border-color: var(--circ-danger);
  background: #fff3f5;
}

.schedule-editor-add-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
}

.schedule-editor-add {
  min-height: 48px;
  border-color: #9ec4dc;
  background: #f2f8fc;
  color: #214e69;
  font-weight: 850;
}

.schedule-editor-empty {
  padding: 24px;
  border: 2px dashed #aac8da;
  border-radius: 14px;
  background: #f6fafc;
  text-align: center;
}

.schedule-editor-empty h3 {
  margin: 0 0 6px;
  color: #173f58;
}

.schedule-editor-empty p {
  max-width: 62ch;
  margin: 0 auto;
  color: #526a79;
  line-height: 1.5;
}

.schedule-editor-errors {
  padding: 14px 16px;
  border: 2px solid #bd5a69;
  border-radius: 12px;
  background: #fff2f4;
  color: #711d2d;
}

.schedule-editor-errors :first-child {
  margin-top: 0;
}

.schedule-editor-errors :last-child {
  margin-bottom: 0;
}

.schedule-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid #dce8ef;
}

.schedule-editor-actions button {
  min-width: 150px;
  min-height: 50px;
}

.schedule-editor-actions .primary-action {
  border-color: var(--circ-command-blue-dark);
  background: var(--circ-command-blue);
  color: #fff;
}

.schedule-editor-advanced {
  overflow: clip;
  border: 1px solid #d5e2e9;
  border-radius: 12px;
  background: #f8fbfc;
}

.schedule-editor-advanced > summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 14px;
  color: #496373;
  cursor: pointer;
  font-weight: 800;
}

.schedule-editor-advanced[open] > summary {
  border-bottom: 1px solid #d5e2e9;
}

.schedule-editor-advanced-content {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.schedule-editor-file-label {
  font-weight: 800;
}

.schedule-editor-backup-input {
  min-height: 48px;
  max-width: 100%;
}

/* Live runner: timers and immediate controls are the whole command surface. */
.experience-runner {
  width: min(100%, 1160px);
  max-width: 1160px;
}

.experience-runner .runner-command-bar,
.runner-student-view .runner-command-bar {
  position: sticky;
  z-index: 40;
  top: calc(8px + env(safe-area-inset-top));
  display: grid;
  grid-template-columns: minmax(155px, 0.65fr) minmax(330px, 1.45fr) minmax(400px, 1.35fr);
  align-items: center;
  gap: clamp(14px, 2.2vw, 34px);
  width: 100vw;
  margin: 0 calc(50% - 50vw) 16px;
  padding: 12px max(18px, calc((100vw - 1160px) / 2 + 24px));
  border: 0;
  border-radius: 0;
  background: var(--circ-command-blue);
  color: #fff;
  box-shadow: 0 9px 24px rgba(13, 68, 103, 0.24);
}

.runner-command-step {
  min-width: 0;
  padding: 0;
  color: #eef9ff;
}

.runner-command-step span {
  display: block;
  margin-bottom: 3px;
  color: #d9effc;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.runner-command-step strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  line-height: 1.12;
  text-overflow: ellipsis;
}

.runner-command-timers {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 0;
}

.runner-command-bar .runner-timer-card {
  min-width: 0;
  padding: 0 clamp(14px, 2vw, 26px);
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  text-align: left;
}

.runner-command-bar .runner-timer-card:first-child {
  padding-left: 0;
}

.runner-command-bar .runner-timer-card + .runner-timer-card {
  border-left: 1px solid rgba(255, 255, 255, 0.42);
}

.runner-command-bar .runner-timer-label {
  color: #e5f4fc;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.runner-command-bar .runner-step-timer {
  border: 0;
  background: transparent;
  color: #fff;
}

.runner-command-bar .runner-timer-value,
.runner-command-bar [data-runner-timer="step"] {
  color: #fff;
  font-size: clamp(3.1rem, 5.2vw, 4.9rem);
  font-variant-numeric: tabular-nums;
  font-weight: 950;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.runner-command-bar [data-runner-timer="class"] {
  color: #fff;
  font-size: clamp(1.9rem, 3vw, 2.75rem);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.035em;
}

.runner-command-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(82px, 1fr));
  gap: 8px;
}

.runner-command-controls .runner-control,
.runner-command-controls .runner-primary-control,
.runner-command-controls .runner-next {
  min-width: 0;
  min-height: 52px;
  padding: 8px 10px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  background: #fff;
  color: #174a6c;
  box-shadow: 0 4px 10px rgba(13, 58, 88, 0.15);
  font-size: 0.88rem;
  font-weight: 900;
}

.runner-command-controls .runner-control:hover,
.runner-command-controls .runner-primary-control:hover,
.runner-command-controls .runner-next:hover {
  border-color: #d6effd;
  background: #eaf6fd;
  color: #113d5a;
  transform: none;
}

.runner-command-controls .runner-safe-landing {
  border-color: #d6effd;
  background: #f4faff;
}

.runner-heading {
  margin: 0 0 14px;
  border-color: #d5e3eb;
  background: #fff;
  box-shadow: 0 8px 24px rgba(22, 72, 104, 0.07);
}

.runner-heading h1 {
  color: #12344a;
}

.runner-schedule {
  border: 1px solid #bcd5e4;
  background: var(--circ-command-blue-soft);
  color: #174663;
}

.runner-focus-layout {
  grid-template-columns: minmax(350px, 0.82fr) minmax(480px, 1.18fr);
  align-items: stretch;
  gap: 16px;
}

.runner-step-card {
  border-color: #d1e0e9;
  background: #fff;
  box-shadow: 0 12px 32px rgba(23, 71, 101, 0.1);
}

.runner-step-card > h2 {
  color: #153d57;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  line-height: 1.08;
}

.runner-now-grid {
  gap: 12px;
}

.runner-cue {
  border-color: #d2e1ea;
  background: #f8fbfd;
}

.runner-cue h3 {
  color: #1c5f89;
}

.runner-student-card {
  border: 2px solid #8fbfdd;
  border-left-width: 7px;
  background: #eef7fc;
  color: #163b52;
  box-shadow: none;
}

.runner-student-card ol,
.runner-student-card ul,
.runner-student-card p {
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.5;
}

.runner-student-card li {
  margin-block: 8px;
}

.runner-student-card li::marker {
  color: var(--circ-command-blue-dark);
  font-weight: 950;
}

.runner-teacher-help,
.runner-more-context {
  border-color: #d1e0e9;
  background: #fff;
}

.runner-teacher-help > summary,
.runner-more-context > summary {
  min-height: 44px;
  color: #31566c;
}

.runner-focus-art {
  width: 100%;
  min-height: 470px;
  border: 1px solid #bcd2df;
  border-radius: 18px;
  background: #dcecf5;
  box-shadow: 0 12px 32px rgba(23, 71, 101, 0.13);
  object-fit: cover;
  object-position: center;
}

.runner-support-controls .runner-control {
  min-height: 48px;
  border-color: #9ec4dc;
  background: #f2f8fc;
  color: #214e69;
}

.runner-step-rail-wrap {
  border-color: #d1e0e9;
  background: #fff;
  box-shadow: 0 8px 24px rgba(22, 72, 104, 0.07);
}

.runner-step-rail-item {
  min-height: 70px;
  border-color: #d5e2e9;
  background: #f8fbfd;
}

.runner-step-rail-item.active,
.runner-step-rail-item.ended {
  border-color: var(--circ-command-blue);
  background: var(--circ-command-blue-soft);
  color: #173f58;
  box-shadow: inset 0 -4px 0 var(--circ-command-blue);
}

.runner-step-rail-item.complete {
  border-color: #bdd3aa;
  background: var(--circ-success-soft);
  color: #315623;
  box-shadow: inset 0 -4px 0 var(--circ-success);
}

/* Green is reserved for small progress and success cues. */
.setup-rail-item.current,
.project-trail-step.current {
  border-color: var(--circ-command-blue);
  background: var(--circ-command-blue-soft);
  color: #173f58;
  box-shadow: none;
}

.independence-stage.active .stage-number {
  background: var(--circ-success-soft);
  color: #315623;
  box-shadow: 0 0 0 3px rgba(120, 169, 77, 0.24);
}

.fast-finish-card {
  border-color: #b9d3e3;
  background: #fff;
  box-shadow: 0 9px 24px rgba(22, 72, 104, 0.08);
}

.project-detail-actions .progress-action {
  border-color: var(--circ-command-blue-dark);
  background: var(--circ-command-blue);
  color: #fff;
}

.progress-complete-note {
  border-color: #a9c78f;
  background: var(--circ-success-soft);
  color: #315623;
}

.artifact-status-complete,
.artifact-ready {
  background: var(--circ-success-soft);
  color: #315623;
}

@media (max-width: 1040px) {
  .schedule-editor-calendar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-editor-event {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-editor-event legend,
  .schedule-editor-event-actions {
    grid-column: 1 / -1;
  }

  .schedule-editor-add-actions {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .experience-runner .runner-command-bar,
  .runner-student-view .runner-command-bar {
    grid-template-columns: minmax(140px, 0.55fr) minmax(300px, 1.35fr);
  }

  .runner-command-controls {
    grid-column: 1 / -1;
  }

  .runner-focus-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .runner-focus-art {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 760px) {
  .primary-nav {
    width: 100%;
    grid-template-columns: repeat(5, minmax(44px, 1fr));
    gap: 0;
  }

  .primary-nav button {
    min-width: 44px;
    min-height: 48px;
    padding: 7px 3px;
    border-radius: 0;
    font-size: clamp(0.64rem, 2.7vw, 0.76rem);
  }

  .welcome-view {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "art";
    gap: 24px;
    padding: 28px 20px;
    border-radius: 20px;
  }

  .welcome-copy h1 {
    max-width: 11ch;
    font-size: clamp(2.35rem, 13vw, 3.8rem);
  }

  .welcome-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .welcome-actions .welcome-primary {
    grid-column: auto;
  }

  .welcome-maker {
    width: min(100%, 390px);
    max-height: 42vh;
  }

  .schedule-editor {
    gap: 18px;
    padding: 18px;
    border-radius: 18px;
  }

  .schedule-editor-calendar,
  .schedule-editor-event,
  .schedule-editor-add-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .schedule-editor-calendar h2,
  .schedule-editor-event legend,
  .schedule-editor-event-actions {
    grid-column: auto;
  }

  .schedule-editor-day-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-editor-copy-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-editor-copy-controls .schedule-editor-field {
    min-width: 0;
  }

  .schedule-editor-event-actions,
  .schedule-editor-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-editor-actions button {
    min-width: 0;
  }

  .experience-runner .runner-command-bar,
  .runner-student-view .runner-command-bar {
    top: calc(8px + env(safe-area-inset-top));
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    margin-bottom: 10px;
    padding: calc(9px + env(safe-area-inset-top)) 12px 10px;
  }

  .runner-command-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }

  .runner-command-step span {
    margin: 0;
    white-space: nowrap;
  }

  .runner-command-step strong {
    font-size: 1rem;
    white-space: nowrap;
  }

  .runner-command-timers {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  }

  .runner-command-bar .runner-timer-card {
    padding: 0 10px;
  }

  .runner-command-bar .runner-timer-value,
  .runner-command-bar [data-runner-timer="step"] {
    font-size: clamp(2.7rem, 15vw, 4rem);
  }

  .runner-command-bar [data-runner-timer="class"] {
    font-size: clamp(1.75rem, 9vw, 2.45rem);
  }

  .runner-command-controls {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .runner-command-controls .runner-control,
  .runner-command-controls .runner-primary-control,
  .runner-command-controls .runner-next {
    min-height: 48px;
  }

  .runner-heading {
    padding: 14px;
  }

  .runner-focus-layout {
    gap: 12px;
  }

  .runner-step-card {
    padding: 18px;
  }

  .runner-focus-art {
    border-radius: 14px;
  }
}

@media (max-width: 420px) {
  .schedule-editor-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
  }

  .schedule-editor-tab {
    min-width: 44px;
    padding-inline: 3px;
    font-size: 0.76rem;
  }

  .runner-command-bar .runner-timer-label {
    font-size: 0.64rem;
    letter-spacing: 0.05em;
  }

  .runner-command-controls .runner-control,
  .runner-command-controls .runner-primary-control,
  .runner-command-controls .runner-next {
    padding-inline: 5px;
    font-size: 0.8rem;
  }
}

/* Grade 6 announcement studio */
.announcements-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin: 0 0 22px;
  padding: clamp(20px, 4vw, 32px);
  border: 2px solid var(--circ-command-blue);
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff 0%, var(--circ-command-blue-soft) 100%);
  box-shadow: 0 10px 26px rgba(20, 83, 123, 0.1);
}

.announcements-feature h2 {
  margin-bottom: 7px;
  color: #123d59;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.announcements-feature p { max-width: 68ch; }

.announcements-feature-note {
  margin-bottom: 0;
  color: var(--secondary);
  font-size: 0.9rem;
}

.announcements-feature-actions {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.announcements-feature-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
}

.announcements-feature-actions a.secondary-action {
  border: 1px solid var(--border);
  background: #ffffff;
}

.announcements-feature-action {
  min-width: 210px;
  border-color: var(--circ-command-blue-dark);
  background: var(--circ-command-blue);
  color: #ffffff;
}

.announcements {
  display: grid;
  gap: 18px;
  width: min(100%, 1120px);
  margin: 0 auto;
}

.announcements-header,
.announcements-crew,
.announcements-details,
.announcements-script,
.announcements-workflow {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid #cfdee7;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 7px 20px rgba(25, 73, 102, 0.07);
}

.announcements-header {
  border: 2px solid var(--circ-command-blue);
  background: linear-gradient(135deg, #ffffff 0%, var(--circ-command-blue-soft) 100%);
}

.announcements-header > p:not(.eyebrow) { max-width: 75ch; }

.announcements-local-notice,
.announcements-local-status,
.announcements-review-status {
  margin: 12px 0 0;
  padding: 11px 13px;
  border: 1px solid #b8d2e2;
  border-radius: 12px;
  background: #f3f9fd;
  color: #214f6b;
  font-size: 0.9rem;
  font-weight: 700;
}

.announcements-local-status { margin: 0; }

.announcements-errors {
  padding: 16px 20px;
  border: 1px solid var(--warning-border);
  border-radius: 16px;
  background: var(--warning);
}

.announcements-errors h2 { margin-bottom: 7px; }
.announcements-errors ul { margin: 0; padding-left: 22px; }

.announcements-role-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.announcements-role {
  padding: 14px;
  border: 1px solid #cbdde8;
  border-radius: 14px;
  background: #f7fbfd;
}

.announcements-role h3 {
  margin-bottom: 5px;
  color: var(--circ-command-blue-dark);
  font-size: 0.95rem;
}

.announcements-role p {
  margin: 0;
  color: var(--secondary);
  font-size: 0.82rem;
}

.announcements-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.announcements-details h2 { grid-column: 1 / -1; }

.announcements-library > * { grid-column: 1 / -1; }
.announcements-library > p { margin: 0; }

.announcements-saved-dates {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.announcements-saved-dates li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 10px 12px;
  border: 1px solid #cfdee7;
  border-radius: 12px;
}

.announcements-saved-dates button { min-height: 44px; }

.announcements-script {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.announcements-script > h2,
.announcements-script > p,
.announcements-prepared,
.announcements-script-field:first-of-type,
.announcements-script-field:last-of-type {
  grid-column: 1 / -1;
}

.announcements-script > button {
  justify-self: start;
  align-self: start;
  min-height: 44px;
}

.announcements-prepared {
  padding: 16px;
  border: 1px solid #cfdee7;
  border-radius: 14px;
  background: #f4f9fc;
}

.announcements-prepared h3 { margin-top: 0; }

.announcements-prepared button {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  text-align: left;
}

.announcements-field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.announcements-label {
  color: #173f58;
  font-weight: 800;
}

.announcements-field small {
  color: var(--secondary);
  font-size: 0.8rem;
}

.announcements-input,
.announcements-textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid #aac6d7;
  border-radius: 11px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.announcements-textarea {
  min-height: 112px;
  resize: vertical;
}

.announcements-input:focus-visible,
.announcements-textarea:focus-visible {
  outline: 3px solid #101820;
  outline-offset: 3px;
}

.announcements-phase-line {
  color: var(--circ-command-blue-dark);
  font-weight: 850;
  word-spacing: 12px;
}

.announcements-workflow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.announcements-workflow > h2,
.announcements-workflow > p {
  grid-column: 1 / -1;
}

.announcements-phase {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid #bfd5e2;
  border-radius: 14px;
  background: #f8fbfd;
}

.announcements-phase legend {
  padding: 0 6px;
  color: var(--circ-command-blue-dark);
  font-weight: 900;
}

.announcements-check-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  margin: 8px 0;
  color: #27495e;
  font-size: 0.88rem;
}

.announcements-check {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--circ-command-blue-dark);
}

.announcements-check-row.is-locked {
  color: #75848e;
}

.announcements-review-status { grid-column: 1 / -1; }

.announcements-actions {
  position: sticky;
  z-index: 8;
  bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 12px;
  border: 1px solid #bad2e1;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(21, 72, 102, 0.14);
  backdrop-filter: blur(10px);
}

.announcements-go-live {
  margin-left: auto;
  border-color: var(--circ-command-blue-dark);
  background: var(--circ-command-blue);
  color: #ffffff;
}

.announcements-go-live[disabled] {
  border-color: #c8d1d7;
  background: #e8edf0;
  color: #6d7c85;
  cursor: not-allowed;
}

.announcements-live {
  display: grid;
  gap: 20px;
  width: min(100%, 1040px);
  min-height: calc(100vh - 48px);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 42px);
  border-radius: 24px;
  background: linear-gradient(145deg, #ffffff 0%, #edf7fc 100%);
  box-shadow: 0 14px 34px rgba(20, 74, 108, 0.12);
}

.announcements-live-header {
  padding-bottom: 18px;
  border-bottom: 3px solid var(--circ-command-blue);
}

.announcements-live-header h1 {
  font-size: clamp(2.1rem, 6vw, 4.6rem);
}

.announcements-live-script {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.announcements-live-section {
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid #bcd4e3;
  border-radius: 18px;
  background: #ffffff;
}

.announcements-live-section h2 {
  margin-bottom: 8px;
  color: var(--circ-command-blue-dark);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.announcements-live-section p {
  margin: 0;
  color: #12364d;
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.35;
  white-space: pre-wrap;
}

.announcements-live-opening,
.announcements-live-closing {
  grid-column: 1 / -1;
}

.announcements-live-exit {
  justify-self: start;
}

@media (max-width: 900px) {
  .announcements-role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .announcements-workflow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 660px) {
  .announcements-feature,
  .announcements-details,
  .announcements-script,
  .announcements-workflow,
  .announcements-live-script {
    grid-template-columns: minmax(0, 1fr);
  }

  .announcements-feature-action {
    width: 100%;
    min-width: 0;
  }

  .announcements-details h2,
  .announcements-script > h2,
  .announcements-script > p,
  .announcements-script-field:first-of-type,
  .announcements-script-field:last-of-type,
  .announcements-workflow > h2,
  .announcements-workflow > p,
  .announcements-review-status,
  .announcements-live-opening,
  .announcements-live-closing {
    grid-column: 1;
  }

  .announcements-actions {
    position: static;
    display: grid;
  }

  .announcements-actions button,
  .announcements-go-live {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 440px) {
  .announcements-role-grid { grid-template-columns: minmax(0, 1fr); }
  .announcements-header,
  .announcements-crew,
  .announcements-details,
  .announcements-script,
  .announcements-workflow { padding: 16px; }
  .announcements-live { padding: 17px; border-radius: 18px; }
}

.runner-heading {
  display: grid;
  margin: 14px 0;
  padding: 18px 20px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 18px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(26, 67, 96, 0.08);
}

.runner-heading h1 {
  margin: 0;
  grid-column: 1;
  color: var(--heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1;
}

.runner-heading .detail-back,
.runner-heading .project-kicker,
.runner-heading .runner-device-owner,
.runner-heading .runner-preview-label { grid-column: 1; }

.runner-heading .runner-student-action {
  grid-column: 2;
  grid-row: 1 / span 4;
}

.runner-student-action { min-height: 44px; }

.runner-preview-label {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 10px;
  border: 2px solid var(--heading);
  border-radius: 999px;
  background: #fff3b7;
  color: var(--heading);
  font-weight: 900;
}

.runner-schedule {
  display: flex;
  margin: 14px 0 0;
  padding: 11px 15px;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--heading);
}

.runner-schedule span { color: var(--secondary); font-weight: 800; }

.runner-command-bar {
  position: sticky;
  z-index: 18;
  top: calc(8px + env(safe-area-inset-top));
  display: grid;
  grid-template-columns: minmax(140px, 0.68fr) minmax(300px, 0.9fr) minmax(360px, 1.45fr);
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px;
  align-items: stretch;
  border: 2px solid #0d4569;
  border-radius: 18px;
  background: #185d8b;
  box-shadow: 0 12px 28px rgba(16, 24, 32, 0.2);
}

.runner-command-step {
  display: flex;
  min-width: 0;
  padding: 8px 10px;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
}

.runner-command-step span {
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.runner-command-step strong {
  overflow: hidden;
  color: #ffffff;
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.05;
  text-overflow: ellipsis;
}

.runner-command-timers {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.runner-command-bar .runner-timer-card {
  display: flex;
  min-width: 0;
  padding: 8px 12px;
  flex-direction: column;
  justify-content: center;
  border: 0;
  box-shadow: none;
}

.runner-command-bar .runner-timer-value {
  font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 4.2vw, 3.5rem);
}

.runner-command-bar [data-runner-timer="class"] {
  font-size: clamp(1.85rem, 3.4vw, 2.8rem);
  letter-spacing: -0.045em;
}

.runner-command-bar .runner-timer-label { color: #185d8b; }

.runner-command-bar.no-controls {
  grid-template-columns: minmax(160px, 0.65fr) minmax(320px, 1fr);
}

.runner-controls.runner-command-controls {
  display: grid;
  margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
  gap: 7px;
}

.runner-command-controls .runner-control:only-child { grid-column: 1 / -1; }

.runner-command-controls .runner-control {
  min-height: 54px;
  padding: 7px 8px;
  border: 2px solid #101820;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.05;
}

.runner-student-command-bar {
  top: calc(8px + env(safe-area-inset-top));
  grid-template-columns: minmax(160px, 0.65fr) minmax(320px, 1fr);
}

.runner-timer-bar {
  position: sticky;
  z-index: 4;
  top: 90px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 10px;
  margin: 16px 0;
}

.runner-timer-card {
  padding: 13px 16px;
  border: 2px solid var(--heading);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 4px 4px 0 var(--heading);
}

.runner-step-timer {
  background: var(--lime);
}

.runner-timer-label {
  margin: 0 0 3px;
  color: var(--blue-dark);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.runner-timer-value {
  display: block;
  color: var(--heading);
  font-size: clamp(2rem, 7vw, 4.8rem);
  font-variant-numeric: tabular-nums;
  line-height: 0.9;
}

.runner-expired {
  margin: 16px 0;
  padding: 14px 16px;
  border: 2px solid var(--heading);
  border-radius: 12px;
  background: #fff3b7;
  color: var(--heading);
  font-weight: 900;
}

.runner-detour {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.45fr);
  gap: 16px;
  margin: 16px 0;
  padding: 18px;
  align-items: center;
  border: 3px solid var(--heading);
  border-radius: 16px;
  background: #fff3b7;
  color: var(--heading);
}

.runner-detour h2,
.runner-detour p { margin: 0; }
.runner-detour h2 { margin-bottom: 6px; }
.runner-detour .section-kicker { margin-bottom: 5px; }
.runner-detour-timer { background: #ffffff; }

.runner-step-card {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.runner-step-card {
  padding: clamp(20px, 4vw, 34px);
}

.runner-step-card h2 {
  margin: 0 0 18px;
  color: var(--heading);
  font-size: clamp(1.75rem, 5vw, 3rem);
}

.runner-step-card h3 { margin: 0 0 10px; }

.runner-now-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.runner-focus-layout {
  display: grid;
  margin: 14px 0;
  overflow: hidden;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(22, 54, 78, 0.12);
}

.runner-focus-layout.no-art { grid-template-columns: minmax(0, 1fr); }

.runner-focus-art {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}

.runner-cue {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #ffffff;
}

.runner-cue h3 {
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.runner-cue p,
.runner-cue-list { margin: 0; }
.runner-cue-list { padding-left: 1.25rem; }
.runner-student-card {
  margin-top: 0;
  grid-column: 1 / -1;
  padding: 18px;
  border: 2px solid #b9d925;
  border-left: 10px solid var(--lime);
  background: var(--soft-lime);
}

.runner-student-card h3 { color: var(--heading); }
.runner-return-cue { grid-column: 1 / -1; background: var(--soft-blue); }

.runner-teacher-help {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #f7fafc;
}

.runner-teacher-help summary {
  color: var(--heading);
  font-weight: 850;
  cursor: pointer;
}

.runner-teacher-help-grid {
  display: grid;
  margin-top: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.runner-more-context {
  margin-top: 14px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #f7fafc;
}

.runner-more-context summary {
  color: var(--heading);
  font-weight: 900;
  cursor: pointer;
}

.runner-more-context section { margin-top: 16px; }

.runner-student-directions {
  margin: 0;
  padding-left: 1.75rem;
  color: var(--heading);
  font-size: clamp(1.05rem, 2.1vw, 1.28rem);
  font-weight: 750;
  line-height: 1.35;
}

.runner-student-directions li + li { margin-top: 10px; }

.runner-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 42px;
}

.runner-control {
  min-height: 48px;
  padding: 8px;
  border-color: var(--heading);
  background: #ffffff;
  color: var(--heading);
  font-weight: 900;
}

.runner-next {
  background: var(--blue);
}

.runner-primary-control { background: var(--lime); }
.runner-detour-control { background: #fff3b7; }
.runner-safe-landing { background: var(--blue); }

.runner-support-controls {
  display: flex;
  margin: 12px 0;
  justify-content: flex-end;
}

.runner-support-controls .runner-control {
  min-height: 48px;
  padding: 8px 16px;
  border-radius: 12px;
}

.runner-step-rail-wrap {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
}

.runner-step-rail-heading {
  display: flex;
  margin-bottom: 10px;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.runner-step-rail-heading p { margin: 0; }

.runner-step-rail {
  display: grid;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 7px;
  list-style: none;
}

.runner-step-rail-item {
  display: flex;
  min-width: 0;
  min-height: 86px;
  padding: 9px;
  align-items: flex-start;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f7fafc;
}

.runner-step-rail-item.complete {
  border-color: #96b8a1;
  background: #eef8f1;
}

.runner-step-rail-item.active {
  border: 3px solid var(--heading);
  background: var(--lime);
  box-shadow: 3px 3px 0 var(--heading);
}

.runner-step-rail-item.ended {
  border: 3px solid var(--heading);
  background: #fff3b7;
  box-shadow: 3px 3px 0 var(--heading);
}

.runner-step-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  object-fit: contain;
}

.runner-step-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.runner-step-copy strong {
  font-size: 0.7rem;
  line-height: 1.1;
}

.runner-step-copy span {
  color: var(--secondary);
  font-size: 0.64rem;
  font-weight: 750;
}

.runner-step-rail-item.active .runner-step-copy span,
.runner-step-rail-item.ended .runner-step-copy span { color: var(--heading); }

.runner-student-art {
  width: 100%;
  max-height: 260px;
  border: 2px solid var(--heading);
  border-radius: 16px;
  object-fit: cover;
}

.runner-student-timers { top: 8px; }

.shared-artifact-card {
  display: grid;
  gap: 0.7rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(89, 119, 103, 0.24);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(239, 248, 241, 0.96), rgba(247, 244, 226, 0.94));
  box-shadow: 0 12px 28px rgba(46, 73, 58, 0.08);
}

.artifact-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.artifact-heading h2,
.artifact-contribution { margin: 0; }

.artifact-status,
.artifact-class-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 750;
}

.artifact-status {
  color: #285844;
  background: rgba(111, 181, 137, 0.2);
}

.artifact-status-parked {
  color: #704f1b;
  background: rgba(220, 174, 78, 0.22);
}

.artifact-status-complete {
  color: #344d79;
  background: rgba(100, 142, 205, 0.2);
}

.artifact-contribution-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.artifact-contribution {
  font-size: 1.08rem;
  font-weight: 750;
}

.artifact-class-chip {
  color: #ffffff;
  background: #395f53;
}

.artifact-handoff-controls,
.artifact-confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.artifact-handoff {
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(57, 95, 83, 0.28);
  border-radius: 12px;
  color: #24463b;
  background: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.artifact-ready {
  color: #ffffff;
  background: #2f6f57;
}

.artifact-park {
  color: #704f1b;
  background: #fff4d8;
}

.artifact-confirmation {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem;
  border: 1px solid rgba(47, 111, 87, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.artifact-confirmation p {
  margin: 0;
  font-weight: 750;
}

@media (max-width: 900px) {
  .runner-command-bar,
  .runner-student-command-bar,
  .runner-command-bar.no-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .runner-command-step {
    display: grid;
    padding: 2px 6px;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }

  .runner-controls.runner-command-controls { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .runner-focus-layout { grid-template-columns: minmax(0, 1fr); }

  .runner-focus-art {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .runner-step-rail {
    overflow-x: auto;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(132px, 1fr);
    padding: 3px 3px 12px;
    scroll-snap-type: x proximity;
  }

  .runner-step-rail-item { scroll-snap-align: center; }
}

@media (max-width: 620px) {
  .runner-heading,
  .runner-step-card { padding: 18px; }

  .runner-heading {
    margin: 8px 0;
    padding: 11px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .runner-heading h1 {
    grid-column: 1 / -1;
    grid-row: 1;
    font-size: 1.35rem;
  }

  .runner-heading .project-kicker,
  .runner-heading .runner-device-owner,
  .runner-heading .runner-preview-label { display: none; }

  .runner-heading .detail-back {
    grid-column: 1;
    grid-row: 2;
  }

  .runner-heading .runner-student-action {
    grid-column: 2;
    grid-row: 2;
  }

  .runner-heading .detail-back,
  .runner-heading .runner-student-action {
    width: 100%;
    min-height: 44px;
    padding: 6px 8px;
    font-size: 0.76rem;
  }

  .runner-command-bar,
  .runner-student-command-bar {
    top: calc(8px + env(safe-area-inset-top));
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    padding: 8px;
    border-radius: 15px;
  }

  .runner-command-bar.no-controls { grid-template-columns: minmax(0, 1fr); }

  .runner-command-step {
    display: grid;
    padding: 2px 6px;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }

  .runner-command-step strong { font-size: 0.98rem; }

  .runner-command-bar .runner-timer-card { padding: 6px 10px; }
  .runner-command-bar .runner-timer-value { font-size: clamp(2rem, 11vw, 3rem); }
  .runner-command-controls { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .runner-command-controls .runner-control {
    min-width: 0;
    min-height: 48px;
    padding: 5px 3px;
    font-size: 0.8rem;
  }

  .runner-command-bar [data-runner-timer="class"] { font-size: clamp(1.75rem, 10vw, 2.6rem); }

  .runner-timer-bar {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 7px;
  }

  .runner-timer-card { padding: 11px; }
  .runner-timer-value { font-size: clamp(1.7rem, 12vw, 3.4rem); }
  .runner-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .runner-controls.runner-command-controls { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .runner-now-grid { grid-template-columns: minmax(0, 1fr); }
  .runner-teacher-help-grid { grid-template-columns: minmax(0, 1fr); }
  .runner-detour { grid-template-columns: minmax(0, 1fr); }
  .runner-return-cue { grid-column: auto; }
  .runner-schedule {
    display: grid;
    margin: 8px 0;
    padding: 8px 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    font-size: 0.68rem;
    line-height: 1.2;
    white-space: nowrap;
  }

  .runner-focus-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .runner-focus-art {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .runner-step-rail-wrap { padding: 13px; }
  .runner-step-rail {
    overflow-x: auto;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(132px, 1fr);
    padding: 3px 3px 12px;
    scroll-snap-type: x proximity;
  }

  .runner-step-rail-item { scroll-snap-align: center; }
}

/* Final runner overrides. These follow every legacy runner rule. */
.experience-runner {
  width: min(100%, 1160px);
  max-width: 1160px;
}

.experience-runner .runner-command-bar,
.runner-student-view .runner-command-bar {
  position: sticky;
  z-index: 40;
  top: calc(8px + env(safe-area-inset-top));
  display: grid;
  grid-template-columns: minmax(155px, 0.65fr) minmax(330px, 1.45fr) minmax(400px, 1.35fr);
  align-items: center;
  gap: clamp(14px, 2.2vw, 34px);
  width: 100vw;
  margin: 0 calc(50% - 50vw) 16px;
  padding: 12px max(18px, calc((100vw - 1160px) / 2 + 24px));
  border: 0;
  border-radius: 0;
  background: var(--circ-command-blue);
  color: #fff;
  box-shadow: 0 9px 24px rgba(13, 68, 103, 0.24);
}

.runner-command-step {
  min-width: 0;
  padding: 0;
  color: #eef9ff;
}

.runner-command-step span {
  display: block;
  margin-bottom: 3px;
  color: #d9effc;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.runner-command-step strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  line-height: 1.12;
  text-overflow: ellipsis;
}

.runner-command-timers {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 0;
}

.runner-command-bar .runner-timer-card {
  min-width: 0;
  padding: 0 clamp(14px, 2vw, 26px);
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  text-align: left;
}

.runner-command-bar .runner-timer-card:first-child {
  padding-left: 0;
}

.runner-command-bar .runner-timer-card + .runner-timer-card {
  border-left: 1px solid rgba(255, 255, 255, 0.42);
}

.runner-command-bar .runner-timer-label {
  color: #e5f4fc;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.runner-command-bar .runner-step-timer {
  border: 0;
  background: transparent;
  color: #fff;
}

.runner-command-bar .runner-timer-value,
.runner-command-bar [data-runner-timer="step"] {
  color: #fff;
  font-size: clamp(3.1rem, 5.2vw, 4.9rem);
  font-variant-numeric: tabular-nums;
  font-weight: 950;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.runner-command-bar [data-runner-timer="class"] {
  color: #fff;
  font-size: clamp(1.9rem, 3vw, 2.75rem);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.035em;
}

.runner-command-controls,
.runner-controls.runner-command-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(82px, 1fr));
  gap: 8px;
}

.runner-command-controls .runner-control,
.runner-command-controls .runner-primary-control,
.runner-command-controls .runner-next {
  min-width: 0;
  min-height: 52px;
  padding: 8px 10px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  background: #fff;
  color: #174a6c;
  box-shadow: 0 4px 10px rgba(13, 58, 88, 0.15);
  font-size: 0.88rem;
  font-weight: 900;
}

.runner-command-controls .runner-control:hover,
.runner-command-controls .runner-primary-control:hover,
.runner-command-controls .runner-next:hover {
  border-color: #d6effd;
  background: #eaf6fd;
  color: #113d5a;
  transform: none;
}

.runner-heading {
  margin: 0 0 14px;
  border-color: #d5e3eb;
  background: #fff;
  box-shadow: 0 8px 24px rgba(22, 72, 104, 0.07);
}

.runner-heading h1 {
  color: #12344a;
}

.runner-schedule {
  border: 1px solid #bcd5e4;
  background: var(--circ-command-blue-soft);
  color: #174663;
}

.runner-focus-layout {
  grid-template-columns: minmax(350px, 0.82fr) minmax(480px, 1.18fr);
  align-items: stretch;
  gap: 16px;
}

.runner-step-card {
  border-color: #d1e0e9;
  background: #fff;
  box-shadow: 0 12px 32px rgba(23, 71, 101, 0.1);
}

.runner-step-card > h2 {
  color: #153d57;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  line-height: 1.08;
}

.runner-now-grid {
  gap: 12px;
}

.runner-cue {
  border-color: #d2e1ea;
  background: #f8fbfd;
}

.runner-cue h3 {
  color: #1c5f89;
}

.runner-student-card {
  border: 2px solid #8fbfdd;
  border-left-width: 7px;
  background: #eef7fc;
  color: #163b52;
  box-shadow: none;
}

.runner-student-card ol,
.runner-student-card ul,
.runner-student-card p {
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.5;
}

.runner-student-card li {
  margin-block: 8px;
}

.runner-student-card li::marker {
  color: var(--circ-command-blue-dark);
  font-weight: 950;
}

.runner-teacher-help,
.runner-more-context {
  border-color: #d1e0e9;
  background: #fff;
}

.runner-teacher-help > summary,
.runner-more-context > summary {
  min-height: 44px;
  color: #31566c;
}

.runner-focus-art {
  width: 100%;
  min-height: 470px;
  border: 1px solid #bcd2df;
  border-radius: 18px;
  background: #dcecf5;
  box-shadow: 0 12px 32px rgba(23, 71, 101, 0.13);
  object-fit: cover;
  object-position: center;
}

.runner-support-controls .runner-control {
  min-height: 48px;
  border-color: #9ec4dc;
  background: #f2f8fc;
  color: #214e69;
}

.runner-step-rail-wrap {
  border-color: #d1e0e9;
  background: #fff;
  box-shadow: 0 8px 24px rgba(22, 72, 104, 0.07);
}

.runner-step-rail-item {
  min-height: 70px;
  border-color: #d5e2e9;
  background: #f8fbfd;
}

.runner-step-rail-item.active,
.runner-step-rail-item.ended {
  border-color: var(--circ-command-blue);
  background: var(--circ-command-blue-soft);
  color: #173f58;
  box-shadow: inset 0 -4px 0 var(--circ-command-blue);
}

.runner-step-rail-item.complete {
  border-color: #bdd3aa;
  background: var(--circ-success-soft);
  color: #315623;
  box-shadow: inset 0 -4px 0 var(--circ-success);
}

/* Green is reserved for small progress and success cues. */
.setup-rail-item.current,
.project-trail-step.current {
  border-color: var(--circ-command-blue);
  background: var(--circ-command-blue-soft);
  color: #173f58;
  box-shadow: none;
}

.independence-stage.active .stage-number {
  background: var(--circ-success-soft);
  color: #315623;
  box-shadow: 0 0 0 3px rgba(120, 169, 77, 0.24);
}

.fast-finish-card {
  border-color: #b9d3e3;
  background: #fff;
  box-shadow: 0 9px 24px rgba(22, 72, 104, 0.08);
}

.project-detail-actions .progress-action {
  border-color: var(--circ-command-blue-dark);
  background: var(--circ-command-blue);
  color: #fff;
}

.progress-complete-note {
  border-color: #a9c78f;
  background: var(--circ-success-soft);
  color: #315623;
}

@media (max-width: 1040px) {
  .experience-runner .runner-command-bar,
  .runner-student-view .runner-command-bar {
    grid-template-columns: minmax(140px, 0.55fr) minmax(300px, 1.35fr);
  }

  .runner-command-controls,
  .runner-controls.runner-command-controls {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(82px, 1fr));
  }

  .runner-focus-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .runner-focus-art {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 760px) {
  .experience-runner .runner-command-bar,
  .runner-student-view .runner-command-bar {
    top: calc(8px + env(safe-area-inset-top));
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    margin-bottom: 10px;
    padding: calc(9px + env(safe-area-inset-top)) 12px 10px;
    border-radius: 0;
  }

  .runner-command-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }

  .runner-command-step span {
    margin: 0;
    white-space: nowrap;
  }

  .runner-command-step strong {
    font-size: 1rem;
    white-space: nowrap;
  }

  .runner-command-timers {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  }

  .runner-command-bar .runner-timer-card {
    padding: 0 10px;
  }

  .runner-command-bar .runner-timer-value,
  .runner-command-bar [data-runner-timer="step"] {
    font-size: clamp(2.7rem, 15vw, 4rem);
  }

  .runner-command-bar [data-runner-timer="class"] {
    font-size: clamp(1.75rem, 9vw, 2.45rem);
  }

  .runner-command-controls,
  .runner-controls.runner-command-controls {
    grid-column: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .runner-command-controls .runner-control,
  .runner-command-controls .runner-primary-control,
  .runner-command-controls .runner-next {
    min-height: 48px;
  }

  .runner-heading {
    padding: 14px;
  }

  .runner-focus-layout {
    gap: 12px;
  }

  .runner-step-card {
    padding: 18px;
  }

  .runner-focus-art {
    border-radius: 14px;
  }
}

@media (max-width: 420px) {
  .runner-command-bar .runner-timer-label {
    font-size: 0.64rem;
    letter-spacing: 0.05em;
  }

  .runner-command-controls .runner-control,
  .runner-command-controls .runner-primary-control,
  .runner-command-controls .runner-next {
    padding-inline: 5px;
    font-size: 0.8rem;
  }
}


/* Explicit Tech Terrarium replica lesson choices */
.replica-lessons {
  margin: 20px 0;
  padding: clamp(18px, 3vw, 28px);
  border: 2px solid var(--circ-command-blue);
  border-radius: 20px;
  background: #f3f9fd;
}
.replica-lessons h2 { color: #123d59; }
.replica-lesson-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.replica-lesson-choice { min-width: 0; }
.replica-lesson-button {
  width: 100%;
  min-height: 64px;
  white-space: normal;
  text-align: left;
  overflow-wrap: anywhere;
}
.replica-lesson-choice p { margin-top: 10px; }
.replica-operation-notes { margin-top: 16px; }
.replica-operation-notes summary { cursor: pointer; font-weight: 700; }
@media (max-width: 760px) {
  .replica-lesson-choices { grid-template-columns: 1fr; }
}
/* Local CIRC identity and the prepared Day 5 teacher entry. */
.circ-brand-icon { flex: 0 0 72px; width: 72px; height: auto; object-fit: contain; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.day-five-start { padding: clamp(20px, 3vw, 32px); margin: 20px 0; border: 2px solid #167365; border-radius: 18px; background: #eef9f5; color: #123451; }
.day-five-start h2 { margin: 8px 0; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.day-five-start ol { padding-left: 24px; line-height: 1.65; }
.day-five-start li + li { margin-top: 8px; }
.day-five-start button { margin: 8px 12px 0 0; }
.crew-signup-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.crew-signup-assignment { border-top: 1px solid #dce4e8; padding: 8px 0; }
.crew-signup-assignment p { overflow-wrap: anywhere; }
/* Student production surface: public prompts, distinct from teacher backstage. */
#app-main:has(> .student-studio) { width: min(100%, 1450px); }
.student-studio { --studio-ink: #142c3b; --studio-lime: #d3f04a; max-width: 1380px; margin: 0 auto; padding: 24px 32px 40px; color: var(--studio-ink); font-family: "Aptos", "Segoe UI", system-ui, sans-serif; }
.student-studio h1, .student-studio h2, .student-studio h3 { font-family: "Aptos Display", "Franklin Gothic Medium", "Segoe UI", sans-serif; color: var(--studio-ink); }
.student-studio-masthead { display: flex; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 2px solid var(--studio-ink); }
.student-studio-masthead p { margin: 0; font-weight: 800; letter-spacing: .02em; }
.studio-view-label { color: #24433d; background: #e8f0e2; padding: 5px 8px; font-size: .68rem; font-weight: 850; letter-spacing: .08em; }
.studio-backstage-action { margin-left: auto; border: 0; border-radius: 0; background: none; color: #4a5d68; font-size: .8rem; font-weight: 600; padding: 8px; }
.student-studio-header { display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: 280px; margin-top: 24px; background: #fff; overflow: hidden; border: 1px solid #dae1df; }
.studio-hero-copy { padding: 30px 36px; }
.studio-kicker { font-size: .7rem; line-height: 1.4; letter-spacing: .13em; font-weight: 850; margin-bottom: 14px; }
.student-studio-header h1 { font-size: clamp(2.4rem, 4.4vw, 4.2rem); line-height: .99; font-weight: 900; letter-spacing: -.04em; max-width: 10ch; margin-bottom: 18px; }
.studio-hero-deck { font-size: 1.02rem; line-height: 1.5; max-width: 36ch; margin: 0; }
.studio-hero-image { display: block; width: 100%; height: 300px; object-fit: cover; object-position: 60% 50%; }
.student-studio-desks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 22px 0; gap: 14px; }
.studio-desk { display: flex; align-items: center; text-align: left; gap: 18px; padding: 20px; border: 1px solid #b4c1c5; border-radius: 3px; background: #fff; box-shadow: 0 3px 0 #dbe3e6; }
.studio-desk-number { align-self: flex-start; font-size: .7rem; font-weight: 850; letter-spacing: .07em; padding-top: 5px; }
.studio-desk strong { display: block; font-family: "Aptos Display", "Franklin Gothic Medium", sans-serif; font-size: 1.45rem; line-height: 1.2; }
.studio-desk small { display: block; margin-top: 5px; font-size: .83rem; font-weight: 500; }
.student-studio-desks [aria-pressed="true"] { background: var(--studio-ink); border-color: var(--studio-ink); color: #fff; box-shadow: 0 4px 0 var(--studio-lime); }
.studio-desk[aria-pressed="true"] strong { color: #fff; }
.studio-desk:hover { border-color: #142c3b; }
.student-studio-workspace { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, 1.8fr); gap: 24px; align-items: start; }
.studio-desk-tools { padding: 28px; border-top: 6px solid var(--studio-ink); background: #e8eff2; }
.studio-desk-tools h2 { font-size: 1.85rem; line-height: 1.1; margin-bottom: 18px; letter-spacing: -.03em; }
.studio-big-number { font-family: "Aptos Display", "Segoe UI", sans-serif; font-size: 4.5rem; font-weight: 850; letter-spacing: -.06em; line-height: 1; margin-bottom: 8px; }
.studio-shot-list { display: grid; gap: 12px; margin: 24px 0; }
.studio-shot { display: flex; align-items: center; gap: 14px; padding: 16px 14px; background: #fff; border: 1px solid #becbd2; }
.studio-shot > span { display: grid; place-items: center; min-width: 40px; height: 32px; border: 2px solid #69848c; color: #365965; font-weight: 800; font-size: .7rem; }
.studio-shot strong, .studio-shot small { display: block; }
.studio-shot strong { font-size: .98rem; }
.studio-shot small { margin-top: 3px; color: #4a5c68; }
.studio-small-note { font-size: .8rem; line-height: 1.6; margin-bottom: 0; color: #435968; }
.studio-pitch { padding: 2px 0 12px; }
.studio-pitch p { font-size: 1rem; padding: 14px 0; margin: 0; border-bottom: 1px solid #8aa0aa; font-style: italic; }
.studio-tools-weather { background: #e9efd9; }
.studio-source-note { font-size: .9rem; line-height: 1.5; }
.studio-tool-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; min-height: 48px; border: 1px solid #9bacab; color: #193642; background: #fff; text-decoration: none; font-size: .9rem; margin: 10px 0; }
.studio-tool-link::after { content: "↗"; font-size: 1.2rem; }
.studio-tool-link:hover { background: #edf5f6; border-color: #193642; }
.studio-tool-primary { background: #142c3b; border-color: #142c3b; color: #fff; }
.studio-tool-primary:hover { background: #294652; color: #fff; }
.studio-prompt-card { margin-top: 26px; padding-top: 20px; border-top: 1px solid #9aaa86; }
.studio-prompt-card h3 { font-size: 1.35rem; line-height: 1.2; }
.studio-prompt-card p:last-child { font-size: .9rem; line-height: 1.5; margin-bottom: 0; }
.student-studio-task { background: #fff; border: 1px solid #bccbd3; padding: 26px 32px; }
.studio-step-rail { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 24px; }
.studio-step { border: 0; border-bottom: 3px solid #d7e1e7; border-radius: 0; background: none; padding: 8px 12px; min-width: 88px; font-size: .85rem; color: #486271; }
.studio-step[aria-current="step"] { color: #142c3b; font-weight: 850; border-bottom-color: #142c3b; background: #e7f5a5; }
.student-studio-task h2 { font-size: clamp(1.8rem, 2.5vw, 2.5rem); margin: 0 0 22px; line-height: 1.05; letter-spacing: -.03em; }
.studio-action-list { list-style: none; counter-reset: studio-actions; display: grid; gap: 18px; margin: 0 0 26px; padding: 0; }
.studio-action-list li { display: flex; align-items: flex-start; gap: 14px; font-size: 1.1rem; line-height: 1.45; counter-increment: studio-actions; }
.studio-action-list li::before { content: counter(studio-actions, decimal-leading-zero); flex: 0 0 24px; margin-top: 3px; color: #597381; font-size: .75rem; font-weight: 850; }
.student-studio-output { border-left: 4px solid #a8c82d; background: #f0f5e3; padding: 14px 16px; font-size: .94rem; font-weight: 650; line-height: 1.5; margin-bottom: 20px; }
.student-studio-navigation { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 20px; }
.student-studio-navigation p { margin: 0; font-weight: 700; }
.studio-next { border: 1px solid #142c3b; border-radius: 3px; padding: 12px 24px; background: #142c3b; color: #fff; font-weight: 800; }
.studio-next:hover { background: #284853; color: #fff; }
.studio-previous { border: 0; border-radius: 0; background: none; font-weight: 500; padding: 12px 0; }
.student-studio-help { padding-top: 14px; border-top: 1px solid #dae3e6; font-size: .88rem; line-height: 1.6; color: #38515e; }
.student-studio-help summary { min-height: 44px; cursor: pointer; font-weight: 700; padding: 9px 0; }
.student-studio-help h3 { margin-top: 14px; }
.student-studio-help li + li { margin-top: 10px; }
.studio-story-bank { margin-top: 34px; }
.studio-story-bank h2 { font-size: 1.8rem; letter-spacing: -.03em; }
.studio-story-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.studio-story { align-self: start; border-top: 3px solid #496574; padding: 0 4px; }
.studio-story summary { cursor: pointer; padding: 14px 0; min-height: 80px; list-style: none; }
.studio-story summary span { display: block; font-size: .7rem; color: #597381; margin-bottom: 8px; }
.studio-story summary strong { font-size: 1rem; }
.studio-story summary strong::after { content: " +"; color: #6c8340; }
.studio-story[open] summary strong::after { content: " -"; }
.studio-story p { font-size: .85rem; line-height: 1.6; }
.studio-apple-help { margin-top: 20px; }
.studio-apple-help .studio-tool-link { display: inline-flex; margin-right: 10px; }
.studio-footer { margin-top: 28px; padding-top: 16px; border-top: 2px solid #142c3b; font-size: .8rem; font-weight: 650; color: #496170; }
.announcements-header .studio-backstage-label { display: inline-block; padding: 6px 9px; background: #142c3b; color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .09em; }
.studio-sv-mark { display: block; flex: 0 0 72px; width: 72px; height: auto; object-fit: contain; background: #fff; }
.announcements { font-family: "Aptos", "Segoe UI", system-ui, sans-serif; }
.announcements-header { border-radius: 4px; border: 1px solid #9eb7c6; border-top: 5px solid #142c3b; background: #fff; }
.announcements-header h1 { font-family: "Aptos Display", "Franklin Gothic Medium", sans-serif; font-size: clamp(2rem, 3.2vw, 3rem); margin: 6px 0 14px; }
.announcements-header .eyebrow { color: #48616e; font-size: .8rem; font-weight: 700; }
.announcements-header > button { border-radius: 3px; padding: 12px 18px; margin: 16px 12px 14px 0; }
.announcements-header > .primary-action { background: #142c3b; border-color: #142c3b; color: #fff; }
.crew-signup .announcements-details { grid-template-columns: 1fr; border-radius: 4px; }
.crew-signup .announcements-details > * { min-width: 0; }
.crew-signup-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.crew-signup .announcements-details > .primary-action { justify-self: start; padding: 12px 22px; border-radius: 3px; background: #142c3b; color: #fff; }
.crew-signup .announcements-crew { border-radius: 4px; }
.crew-signup .announcements-role { border-radius: 3px; border-top: 4px solid #769aab; }
.crew-signup .announcements-local-notice { border-radius: 3px; font-weight: 500; line-height: 1.6; }
@media (max-width: 800px) {
  .crew-signup-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-studio { padding: 16px; }
  .student-studio-header { min-height: 0; }
  .studio-hero-copy { padding: 24px; }
  .student-studio-header h1 { font-size: 2.6rem; }
  .studio-hero-image { height: 280px; }
  .studio-desk { padding: 16px 12px; gap: 10px; }
  .studio-desk strong { font-size: 1.25rem; }
  .studio-desk small { font-size: .75rem; }
  .student-studio-workspace { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .studio-desk-tools { padding: 22px; }
  .studio-shot-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .studio-shot { display: block; }
  .studio-shot > span { width: 40px; margin-bottom: 10px; }
  .studio-big-number { font-size: 3.5rem; }
  .studio-story-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .crew-signup-fields { grid-template-columns: 1fr; }
  .student-studio-masthead { flex-wrap: wrap; gap: 8px; }
  .student-studio-masthead p { font-size: .8rem; }
  .studio-backstage-action { flex-basis: 100%; margin: 0; text-align: left; padding: 0; }
  .student-studio-header { grid-template-columns: 1fr; margin-top: 16px; }
  .studio-hero-copy { padding: 24px; }
  .student-studio-header h1 { max-width: 12ch; font-size: 2.7rem; }
  .studio-hero-image { height: 170px; object-position: 60% 56%; }
  .student-studio-desks { gap: 7px; margin: 16px 0; }
  .studio-desk { display: block; padding: 12px 8px; min-height: 78px; }
  .studio-desk-number { display: block; padding: 0 0 5px; }
  .studio-desk strong { font-size: 1.05rem; }
  .studio-desk small { display: none; }
  .student-studio-task { padding: 22px 18px; }
  .studio-step-rail { gap: 4px; }
  .studio-step { min-width: 78px; padding: 8px; }
  .studio-action-list li { font-size: 1.03rem; gap: 10px; }
  .studio-shot-list { gap: 7px; }
  .studio-shot { padding: 12px 8px; }
  .studio-shot strong { font-size: .83rem; }
  .studio-shot small { font-size: .75rem; }
  .studio-story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Public FID entry, shared by the welcome screen and Playbooks. */
.fid-home-entry { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 18px; margin:18px 0; background:#eaf4fb; border:1px solid #bdd9eb; border-left:5px solid #5e9bc4; border-radius:14px; font-family:"Aptos","Segoe UI",system-ui,sans-serif; }
.fid-home-entry h2 { font-size:1.05rem; line-height:1.25; margin:0 0 4px; }
.fid-home-entry p { margin:0; max-width:660px; font-size:.9rem; color:#395b71; }
.fid-open-link { display:inline-flex; align-items:center; justify-content:center; min-height:46px; padding:12px 20px; white-space:nowrap; text-decoration:none; color:#fff; background:#225f87; border-color:#225f87; }
.fid-open-link:hover { color:#fff; background:#174c70; }
@media(max-width:680px) { .fid-home-entry { align-items:stretch; flex-direction:column; padding:14px; gap:10px; } .fid-open-link { white-space:normal; } }

/* Reuse the complete classroom illustration, with directions below the artwork. */
.welcome-view.welcome-terrarium {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "art" "copy" "fid";
  gap: 24px;
  min-height: 0;
  padding-block: 24px;
}
.welcome-terrarium .welcome-maker {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 1942 / 809;
  border-radius: 18px;
  object-fit: contain;
}
.welcome-terrarium > .fid-home-entry { grid-area: fid; margin: 0; }
.project-hero.project-hero-terrarium { min-height: 0; }
.project-hero-terrarium .project-hero-art {
  display: block;
  position: static;
  z-index: auto;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.project-hero-terrarium .project-hero-copy {
  width: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.project-hero-terrarium .project-quick-actions {
  position: static;
  flex-wrap: wrap;
  padding: 0 24px 24px;
}
.runner-focus-art.terrarium-maker-scene,
.runner-student-art.terrarium-maker-scene {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 1942 / 809;
  align-self: start;
  object-fit: contain;
}

/* Two clear entrances on the CIRC HQ splash.
   Choosing a doorway is not authorization. Teacher rights still come from the
   existing sign-in and the server-side rules. */
.welcome-entrances {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 640px;
  margin-top: 28px;
}

.entrance-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border: 2px solid #c9dbe7;
  border-radius: 20px;
  background: #f7fbfd;
}

.entrance-card h2 {
  margin: 0;
  color: #12344a;
  font-size: 1.24rem;
  font-weight: 850;
  line-height: 1.2;
}

.entrance-card p {
  margin: 0;
  flex: 1;
  color: #455f70;
  font-size: 0.97rem;
  line-height: 1.5;
}

.entrance-card .entrance-cta {
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 850;
}

.entrance-student {
  border-color: var(--circ-command-blue);
  background: #eef7fd;
}

.entrance-student .entrance-cta {
  border-color: var(--circ-command-blue-dark);
  background: var(--circ-command-blue);
  color: #fff;
  box-shadow: 0 8px 18px rgba(43, 134, 197, 0.22);
}

.entrance-teacher .entrance-cta {
  border: 2px solid var(--circ-command-blue);
  background: #fff;
  color: var(--circ-command-blue-dark);
}

.welcome-back {
  margin-top: 6px;
  border: 0;
  background: none;
  color: var(--circ-command-blue-dark);
  font-weight: 750;
  cursor: pointer;
  text-decoration: underline;
}

.student-waiting-card {
  max-width: 560px;
  margin-top: 22px;
  padding: 22px;
  border: 2px solid #c9dbe7;
  border-radius: 20px;
  background: #f7fbfd;
}

.student-waiting-card h2 {
  margin: 0 0 10px;
  color: #12344a;
  font-size: 1.15rem;
  font-weight: 850;
}

.student-waiting-card ol {
  margin: 0;
  padding-left: 20px;
  color: #455f70;
  line-height: 1.6;
}

.student-waiting-card li { margin-bottom: 6px; }

/* Teacher script: the selected lesson's actual step sequence. */
.lesson-sequence-note {
  margin: 0 0 14px;
  color: #5b7180;
  font-size: 0.92rem;
}

.lesson-sequence {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 16px;
}

.lesson-sequence-step { line-height: 1.55; }

.lesson-step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 8px;
}

.lesson-step-head strong {
  color: #12344a;
  font-size: 1.02rem;
  letter-spacing: .02em;
}

.lesson-step-minutes {
  padding: 2px 10px;
  border-radius: 999px;
  background: #e6f2fa;
  color: #24495f;
  font-size: 0.82rem;
  font-weight: 800;
}

.lesson-step-block { margin-bottom: 8px; }

.lesson-step-label {
  margin: 0 0 4px;
  color: #5b7180;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .welcome-entrances { grid-template-columns: 1fr; }
}

/* Student waiting entrance: one readable column, no empty art gutter. */
.welcome-student-entrance {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "copy";
  align-items: start;
}

.welcome-student-entrance .welcome-copy h1 {
  max-width: 22ch;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.08;
}

.welcome-student-entrance .welcome-description { max-width: 60ch; }

.welcome-student-entrance .welcome-actions {
  grid-template-columns: minmax(0, 220px);
  margin-top: 20px;
}

/* My week: the teacher's next school days in one place. */
.page-heading-actions {
  display: flex;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.page-heading .page-heading-actions .board-button { margin-left: 0; }

.page-heading .week-button {
  border-color: var(--blue-dark);
  background: var(--surface);
  color: var(--blue-dark);
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  align-items: start;
}

.week-day {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
}

.week-day[data-today="true"] {
  border-color: var(--blue-dark);
  box-shadow: 0 0 0 3px var(--pale-blue);
}

.week-day[data-school="false"] { background: var(--warning); border-color: var(--warning-border); }

.week-day-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.week-day-head h2 {
  margin: 0;
  color: var(--heading);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.2;
}

.week-day-date,
.week-day-count,
.week-day-note,
.week-footnote {
  margin: 2px 0 0;
  color: var(--secondary);
  font-size: 0.9rem;
}

.week-day-note { margin-top: 8px; color: var(--ink); font-weight: 600; }

.week-cycle {
  flex: none;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--heading);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.week-day[data-school="false"] .week-cycle { background: #8a6d1d; }

.week-blocks {
  display: grid;
  margin: 12px 0 0;
  padding: 0;
  gap: 5px;
  list-style: none;
}

.week-block {
  display: grid;
  padding: 7px 9px;
  grid-template-columns: 5.4em minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
  border-left: 5px solid var(--border);
  border-radius: 9px;
  background: var(--canvas);
  font-size: 0.93rem;
}

.week-block-time { color: var(--secondary); font-size: 0.84rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.week-block-title { overflow-wrap: break-word; color: var(--heading); font-weight: 700; }

.week-block[data-type="teach"] { border-left-color: var(--blue-dark); background: var(--pale-blue); }
.week-block[data-type="prep"] { border-left-color: #3f8f5b; background: #DFF0BF; }
.week-block[data-type="lunch"] { border-left-color: #c9694f; background: #fdf1ed; }
.week-block[data-type="support"] { border-left-color: #397892; background: #D5EBF5; }
.week-block[data-type="duty"] { border-left-color: var(--heading); }
.week-block[data-type="special"] { border-left-color: #7a55b5; background: #f4effb; }

.week-block[data-state="past"] { opacity: 0.55; }
.week-block[data-state="current"] { outline: 2px solid var(--blue-dark); outline-offset: 1px; }

.week-footnote { margin-top: 14px; }
.week-empty { display: grid; gap: 12px; justify-items: start; }

@media (max-width: 560px) {
  .page-heading:has(.page-heading-actions) { flex-wrap: wrap; }
  .page-heading-actions { margin-left: 0; justify-content: flex-start; }
}

@media print {
  .site-header,
  .live-status,
  .page-heading-actions,
  .week-footnote { display: none !important; }

  html,
  body { background: #ffffff; }

  [data-view="week"] .week-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  [data-view="week"] .week-day {
    padding: 7px;
    border-radius: 8px;
    box-shadow: none;
    break-inside: avoid;
  }

  [data-view="week"] .week-block {
    padding: 3px 5px;
    grid-template-columns: 1fr;
    gap: 0;
    font-size: 0.72rem;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  [data-view="week"] .week-block[data-state="past"] { opacity: 1; }
  [data-view="week"] .week-day-head h2 { font-size: 0.85rem; }
  [data-view="week"] .week-cycle { font-size: 0.68rem; padding: 2px 7px; }

  @page { size: letter landscape; margin: 0.4in; }
}

/* Settings > Advanced backup and restore: same padding and rhythm as the Schedule screen's box. */
.advanced-settings-body {
  display: grid;
  gap: 18px;
  padding: 14px;
}

.advanced-settings-body > section {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.advanced-settings-body h3 {
  margin: 0;
  color: var(--heading);
  font-size: 1.05rem;
  font-weight: 900;
}

.advanced-settings-body p { margin: 0; }
.classroom-year-guide {
  margin: 1rem 0 2rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 2px solid #537c47;
  border-radius: 1.25rem;
  background: #f4f8ee;
  color: #18332a;
}
.classroom-year-guide h2 { margin: .4rem 0; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.classroom-year-guide label { display: block; margin: 1rem 0 .4rem; font-weight: 700; }
.classroom-year-guide select { width: 100%; max-width: 50rem; min-height: 3rem; padding: .6rem; font: inherit; background: white; color: #18332a; border: 1px solid #537c47; border-radius: .5rem; }
.classroom-year-guide details { margin-top: 1rem; }
.classroom-year-downloads { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.classroom-year-guide summary { cursor: pointer; font-weight: 700; }
.classroom-year-guide li { margin: .4rem 0; }

/* Simple student side and teacher side, Playbooks A and B (September 29, 2026).
   Mobile first. Uses the existing CIRC tokens and 44px controls. */
a.primary-action,
a.secondary-action {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 18px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 750;
  text-decoration: none;
}

a.primary-action {
  border-color: var(--circ-command-blue-dark);
  background: var(--circ-command-blue-dark);
  color: #ffffff;
}

a.secondary-action {
  border: 2px solid var(--circ-command-blue);
  background: #ffffff;
  color: var(--circ-command-blue-dark);
}

.secondary-action.is-selected,
.pb-tab.is-selected {
  border-color: var(--circ-command-blue-dark);
  background: var(--soft-blue);
  color: var(--heading);
  box-shadow: inset 0 0 0 1px var(--circ-command-blue-dark);
}

.entrance-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--secondary);
  font-size: 0.92rem;
}

.welcome-entrances a.entrance-cta { text-decoration: none; }

/* Teacher home */
.th-home { display: grid; gap: 18px; margin-bottom: 22px; }

.th-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.th-card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(22, 54, 78, 0.07);
}

.th-card h2 {
  margin: 0;
  color: var(--heading);
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  font-weight: 900;
  line-height: 1.2;
}

.th-card h3 { margin: 6px 0 0; color: var(--heading); font-size: 1.1rem; }
.th-card h4 { margin: 6px 0 0; color: var(--blue-dark); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.04em; }
.th-card p { margin: 0; }

.th-next { border-top: 6px solid var(--circ-command-blue); }
.th-next-time { color: var(--heading); font-size: 1.35rem; font-weight: 850; font-variant-numeric: tabular-nums; }
.th-next-place { color: var(--blue-dark); font-weight: 750; }
.th-status { color: var(--ink); font-weight: 650; }
.th-duty,
.th-conflict {
  padding: 10px 12px;
  border: 1px solid var(--warning-border);
  border-radius: 10px;
  background: var(--warning);
  color: #3d2e05;
  font-weight: 700;
}

.th-class { border-top: 6px solid var(--circ-success); }

.th-class-pickers {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
}

.th-class-pickers label,
.student-picker label,
.dated-inputs label { color: var(--secondary); font-size: 0.85rem; font-weight: 750; }

.th-class-pickers select,
.student-picker select {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
}

.th-lesson { display: grid; gap: 6px; padding-top: 4px; }
.th-actions,
.pb-actions,
.pb-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.th-timer { border-top: 6px solid var(--blue); }
.th-timer-values { display: flex; flex-wrap: wrap; gap: 18px; }
.th-timer-values p { display: grid; }
.th-timer-values span { color: var(--secondary); font-size: 0.85rem; font-weight: 700; }
.th-timer-values strong { color: var(--heading); font-size: 2.2rem; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.05; }
.th-step { color: var(--blue-dark); font-weight: 750; }

.th-later { border-top: 6px solid #c9dbe7; }
.th-obligations { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.th-obligation {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfdfe;
}
.th-obligation.has-conflict { border-color: var(--warning-border); background: var(--warning); }
.th-time { color: var(--secondary); font-size: 0.88rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.th-title { color: var(--heading); font-weight: 800; }
.th-place:empty { display: none; }
.th-flags { color: #6b3a00; font-size: 0.88rem; font-weight: 800; }
.th-source,
.th-quiet { color: var(--secondary); font-size: 0.9rem; }
.th-source.is-stale { color: #6b3a00; font-weight: 750; }

.th-links { display: flex; flex-wrap: wrap; gap: 10px; }
.th-empty-card { max-width: 640px; }

.today-more-tools {
  margin-top: 8px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fbfdfe;
}

.today-more-tools > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--blue-dark);
  cursor: pointer;
  font-weight: 800;
}

.today-more-tools[open] > summary { margin-bottom: 14px; }

/* Playbook lesson and browser, shared by both sides */
.pb-teacher-layout { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }

.pb-lesson {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.pb-lesson-head { display: grid; gap: 10px; }
.pb-lesson h1,
.pb-lesson h2 {
  margin: 0;
  color: var(--heading);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 900;
  line-height: 1.15;
}
.pb-lesson h1:focus,
.pb-lesson h2:focus { outline: none; }
.pb-goal { margin: 0; color: var(--ink); font-size: clamp(1.05rem, 2.4vw, 1.25rem); line-height: 1.45; }
.pb-goal strong { color: var(--blue-dark); }
.pb-done,
.pb-meeting-note { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--soft-blue); color: var(--heading); font-weight: 650; }

.pb-tags { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.pb-chips,
.pb-stages { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pb-chip {
  display: inline-flex;
  min-height: 32px;
  padding: 4px 12px 4px 6px;
  align-items: center;
  gap: 6px;
  border: 1px solid #b9d7ea;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--heading);
  font-size: 0.88rem;
  font-weight: 750;
}
.pb-stage {
  padding: 4px 10px;
  border: 1px dashed #b7c6d1;
  border-radius: 8px;
  color: #5d6f7d;
  font-size: 0.82rem;
  font-weight: 700;
}
.pb-stage.is-on { border: 1px solid var(--circ-success); background: var(--circ-success-soft); color: #23401a; }

.pb-steps-section h3,
.pb-callout h3 { margin: 0 0 8px; color: var(--heading); font-size: 1.1rem; font-weight: 850; }

.pb-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pb-step {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left: 6px solid var(--blue);
  border-radius: 14px;
  background: #fbfdfe;
}
.pb-step-cleanup { border-left-color: #9fb3c2; }
.pb-step-exit { border-left-color: var(--circ-success); }
.pb-step-safety { border-left-color: #d89b2b; }
.pb-step-head { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.pb-step-head h4 { margin: 0; color: var(--heading); font-size: 1.05rem; font-weight: 850; }
.pb-step-number {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--circ-command-blue-dark);
  color: #ffffff;
  font-weight: 900;
}
.pb-step-icon { width: 30px; height: 30px; }
.pb-step-time { color: var(--secondary); font-size: 0.9rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pb-step-directions { margin: 0; padding-left: 20px; color: var(--ink); font-size: 1.02rem; }
.pb-step-directions li + li { margin-top: 3px; }
.pb-teacher-step summary { min-height: 44px; display: flex; align-items: center; color: var(--blue-dark); cursor: pointer; font-weight: 750; }

.pb-finish-grid,
.pb-prep-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.pb-callout {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fbfdfe;
}
.pb-callout p,
.pb-callout ul { margin: 0; }
.pb-callout ul { padding-left: 20px; }
.pb-turnin { border: 2px solid var(--circ-command-blue); background: var(--soft-blue); }
.pb-success { border-color: #b5d39c; background: var(--circ-success-soft); }
.pb-extension { border-color: #d8e87d; background: var(--soft-lime); }
.pb-safety { border-color: var(--warning-border); background: var(--warning); }
.pb-pairs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 12px; margin: 0; }
.pb-pairs dt { color: var(--blue-dark); font-weight: 800; }
.pb-pairs dd { margin: 0; }
.pb-teacher-notes summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 750; }

.pb-browser { display: grid; gap: 12px; }
.pb-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pb-tab {
  display: grid;
  min-height: 56px;
  padding: 8px 12px;
  justify-items: start;
  border-radius: 14px;
  text-align: left;
}
.pb-tab strong { color: var(--heading); font-size: 1.05rem; }
.pb-tab span { color: var(--secondary); font-size: 0.82rem; font-weight: 650; }
.pb-summary { margin: 0; color: var(--ink); }
.pb-capacity summary { min-height: 44px; display: flex; align-items: center; color: var(--blue-dark); cursor: pointer; font-weight: 750; }
.pb-capacity p { margin: 0 0 8px; color: var(--secondary); font-size: 0.92rem; }
.pb-unit-title { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin: 10px 0 6px; color: var(--heading); font-size: 1rem; font-weight: 850; }
.pb-unit-title small { color: var(--secondary); font-size: 0.82rem; font-weight: 700; }
.pb-meeting-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pb-meeting {
  display: grid;
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border-radius: 12px;
  text-align: left;
  font-weight: 650;
}
.pb-meeting.is-selected { border: 2px solid var(--circ-command-blue-dark); background: var(--soft-blue); }
.pb-meeting-number { color: var(--blue-dark); font-size: 1.05rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.pb-meeting-split { display: grid; gap: 2px; font-size: 0.92rem; }
.pb-badge { padding: 2px 8px; border-radius: 999px; background: var(--circ-success-soft); color: #23401a; font-size: 0.75rem; font-weight: 800; }
.pb-badge-flex { background: var(--soft-lime); color: #3b4300; }
.pb-guides { margin: 22px 0; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.pb-guides h2 { margin: 0 0 6px; font-size: 1.2rem; }
.pb-guides p { margin: 0; color: var(--secondary); }
.pb-more { margin-top: 12px; }
.pb-more > summary { min-height: 44px; display: flex; align-items: center; color: var(--blue-dark); cursor: pointer; font-weight: 800; }

/* Dated updates on the Schedule page */
.dated-updates-panel {
  display: grid;
  gap: 10px;
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}
.dated-updates-panel h2 { margin: 0; font-size: 1.3rem; }
.dated-updates-panel h2:focus { outline: none; }
.dated-updates-panel p { margin: 0; }
.dated-inputs { display: grid; gap: 6px; justify-items: start; }
.dated-inputs textarea {
  width: 100%;
  min-height: 120px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: 0.9rem/1.4 ui-monospace, Consolas, monospace;
}
.dated-preview { display: grid; gap: 8px; justify-items: start; padding: 12px 14px; border-radius: 12px; background: var(--soft-blue); }
.dated-preview.has-errors { border: 1px solid var(--warning-border); background: var(--warning); color: #3d2e05; }

/* Student side page */
.student-nav { display: flex; gap: 6px; }
.student-nav a {
  display: inline-flex;
  min-height: 44px;
  padding: 8px 14px;
  align-items: center;
  border-radius: 999px;
  color: var(--blue-dark);
  font-weight: 800;
  text-decoration: none;
}
.student-nav a:hover { background: var(--soft-blue); }

#student-main {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 20px 16px 56px;
}
#student-main:focus { outline: none; }

.student-welcome {
  display: grid;
  gap: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.student-welcome-art { width: 100%; height: auto; max-height: 260px; object-fit: cover; }
.student-welcome-copy { display: grid; gap: 12px; padding: 0 20px 22px; }
.student-welcome h1 { margin: 0; color: var(--heading); font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 900; line-height: 1.1; }
.student-welcome h1:focus { outline: none; }
.student-lead { margin: 0; font-size: 1.1rem; }
.student-picker { display: grid; gap: 4px 12px; grid-template-columns: minmax(0, 1fr); max-width: 520px; }
.student-grade-button { min-height: 52px; padding: 10px 22px; font-size: 1.05rem; }
.student-today { display: grid; gap: 12px; }
.student-grade-switch { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--secondary); font-weight: 750; }
.student-browse { margin-top: 30px; }
.student-browse h2 { margin: 0 0 6px; color: var(--heading); font-size: 1.5rem; }
.student-browse > p { margin: 0 0 12px; color: var(--secondary); }
.student-footer {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 0 16px 40px;
  color: var(--secondary);
  font-size: 0.9rem;
}
.student-footer a { display: inline-flex; min-height: 44px; align-items: center; color: var(--blue-dark); font-weight: 750; }

.student-side .pb-step-directions { font-size: 1.1rem; }

@media (min-width: 700px) {
  .th-class-pickers { grid-template-columns: max-content minmax(0, 1fr); }
  .pb-finish-grid,
  .pb-prep-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-picker { grid-template-columns: max-content minmax(0, 1fr); }
  .student-welcome-copy { padding: 0 28px 28px; }
}

@media (min-width: 980px) {
  .th-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pb-teacher-layout { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); align-items: start; }
  .pb-teacher-browser { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; padding-right: 4px; }
}

@media (max-width: 520px) {
  .pb-step-head { grid-template-columns: auto minmax(0, 1fr) auto; }
  .pb-step-icon { display: none; }
  .pb-meeting { grid-template-columns: 28px minmax(0, 1fr); }
  .pb-badge { grid-column: 2; justify-self: start; }
  .welcome-entrances { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .site-header,
  .student-browse,
  .student-grade-switch,
  .student-footer,
  .th-links { display: none; }
  .pb-lesson { box-shadow: none; border: 0; }
}

/* Review fixes: next obligation during class, preparation notes, paper path. */
.th-upcoming {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px solid #b9d7ea;
  border-radius: 12px;
  background: var(--soft-blue);
}
.th-upcoming h3 { margin: 0; color: var(--heading); font-size: 1.1rem; }
.th-upcoming .th-next-time { font-size: 1.05rem; }
.th-countdown { color: var(--blue-dark); font-weight: 800; }
.pb-prep-required { border: 2px solid var(--warning-border); background: var(--warning); color: #3d2e05; }
.pb-paper-path { display: grid; gap: 8px; border-style: dashed; }
.pb-paper-note,
.pb-practice-label { font-weight: 800; color: #3d2e05; }
.pb-practice-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pb-practice-table caption { padding-bottom: 6px; text-align: left; color: #3d2e05; font-weight: 800; }
.pb-practice-table th,
.pb-practice-table td { padding: 6px 8px; border: 1px solid var(--border); text-align: left; }
.pb-practice-table thead th { background: var(--soft-blue); }
