﻿:root {
  --ink: #263238;
  --muted: #607d8b;
  --line: #d9e2e7;
  --paper: #fffdf8;
  --panel: #ffffff;
  --sky: #e8f4ff;
  --mint: #dff6ea;
  --sun: #ffe9a8;
  --coral: #ff8066;
  --blue: #3a7bd5;
  --green: #2f9d70;
  --gold: #d99b20;
  font-family: "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f5fbff 0%, #fff8ea 100%);
}

button, input, select {
  font: inherit;
}

rt {
  font-size: .48em;
  font-weight: 800;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff;
  background: var(--blue);
  border-radius: 8px;
  font-size: 24px;
  font-weight: 800;
}

.brand-title {
  display: block;
  font-size: 20px;
  font-weight: 800;
}

.brand-subtitle {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.mode-tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  background: #edf4f7;
  border-radius: 8px;
}

.tab {
  min-width: 72px;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.tab.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 8px rgba(38, 50, 56, .12);
}

main {
  padding: clamp(18px, 4vw, 42px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(320px, 1.2fr);
  gap: clamp(20px, 4vw, 52px);
  align-items: center;
}

.hero-copy {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(18px, 4vw, 44px);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255,255,255,.78), rgba(255,255,255,.78)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='640' viewBox='0 0 900 640'%3E%3Crect fill='%23e8f4ff' width='900' height='640'/%3E%3Cpath fill='%23ffe9a8' d='M0 498c126-63 234-82 360-41 139 45 267 37 540-57v240H0z'/%3E%3Ccircle cx='718' cy='142' r='76' fill='%23ffcf5a'/%3E%3Crect x='142' y='292' width='140' height='164' rx='8' fill='%23ffffff'/%3E%3Crect x='174' y='252' width='76' height='56' rx='8' fill='%23ff8066'/%3E%3Crect x='176' y='332' width='28' height='28' fill='%233a7bd5'/%3E%3Crect x='222' y='332' width='28' height='28' fill='%232f9d70'/%3E%3Crect x='176' y='382' width='28' height='28' fill='%23d99b20'/%3E%3Crect x='222' y='382' width='28' height='28' fill='%23ff8066'/%3E%3Ccircle cx='498' cy='350' r='84' fill='%23ffffff'/%3E%3Ccircle cx='498' cy='350' r='72' fill='%23fffdf8' stroke='%23263238' stroke-width='8'/%3E%3Cpath d='M498 350V298M498 350l46 34' stroke='%23263238' stroke-width='10' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-weight: 800;
}

h1, h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 12ch;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
}

.hero-copy p:last-child {
  max-width: 28em;
  font-size: 19px;
  line-height: 1.8;
}

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

.category-card {
  min-height: 260px;
  padding: clamp(20px, 4vw, 34px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  text-align: left;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(38, 50, 56, .12);
}

.category-card:hover,
.category-card:focus-visible {
  border-color: var(--blue);
}

.category-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  font-size: 40px;
}

.calendar-card .category-icon {
  background: var(--mint);
}

.clock-card .category-icon {
  background: var(--sun);
}

.category-card strong {
  font-size: clamp(30px, 5vw, 48px);
}

.category-card span:last-child {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.mode-card {
  min-height: 132px;
  padding: 18px;
  display: grid;
  grid-template-columns: 56px 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px 14px;
  align-items: center;
  text-align: left;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 22px rgba(38, 50, 56, .10);
}

.mode-card:hover,
.mode-card:focus-visible {
  border-color: var(--blue);
}

.mode-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background: var(--sky);
  border-radius: 8px;
  font-size: 30px;
}

.mode-card strong {
  font-size: 20px;
}

.mode-card span:last-child {
  color: var(--muted);
}

.hidden { display: none !important; }

.mode-menu, .work-view, .settings-view {
  max-width: 1180px;
  margin: 0 auto;
}

.menu-heading {
  display: flex;
  align-items: end;
  gap: 18px;
  margin-bottom: 20px;
}

.menu-heading h1 {
  font-size: clamp(36px, 6vw, 64px);
}

.work-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.work-header h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.work-actions {
  display: flex;
  gap: 10px;
}

.icon-button {
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 24px;
}

.question-row {
  display: grid;
  grid-template-columns: 1fr minmax(220px, .35fr);
  gap: 14px;
  margin-bottom: 18px;
}

.question, .feedback {
  min-height: 70px;
  display: flex;
  align-items: center;
  padding: 16px 18px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 800;
}

.feedback {
  color: var(--green);
  font-size: 19px;
}

.feedback.is-empty {
  display: none;
}

.question-row:has(.feedback.is-empty) {
  grid-template-columns: 1fr;
}

.stage {
  min-height: 520px;
  padding: clamp(14px, 3vw, 28px);
  background: rgba(255,255,255,.74);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.weekday-road {
  display: grid;
  grid-template-columns: repeat(7, minmax(90px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.day-tile, .answer-card, .calendar-day, .schedule-row, .flow-step {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.day-tile {
  position: relative;
  min-height: 142px;
  padding: 12px;
  text-align: center;
}

.day-tile.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(58, 123, 213, .16);
}

.day-tile.target-hint, .calendar-day.target-hint, .answer-card.target-hint {
  border-color: var(--gold);
  box-shadow: 0 0 0 5px rgba(217, 155, 32, .22);
}

.day-symbol {
  display: block;
  font-size: 34px;
}

.day-label {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 800;
}

.mascot {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  transition: left .25s ease;
}

.asset-icon {
  display: inline-block;
  width: 42px;
  height: 42px;
  object-fit: contain;
  vertical-align: middle;
}

.character-sprite {
  display: inline-block;
  width: 52px;
  height: 82px;
  background-image: url("./assets/student-cutout.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center bottom;
  vertical-align: middle;
}

.sprite-happy {
  width: 58px;
  height: 58px;
  background-image: url("./assets/student-happy-cutout.png");
  background-size: contain;
  background-position: center bottom;
}

.sprite-teacher {
  width: 52px;
  height: 82px;
  background-image: url("./assets/okojo-guide-cutout.png");
  background-size: contain;
  background-position: center bottom;
}

.sprite-boy {
  width: 50px;
  height: 82px;
  background-image: url("./assets/boy-cutout.png");
  background-size: contain;
  background-position: center bottom;
}

.sprite-guide {
  width: 52px;
  height: 82px;
  background-image: url("./assets/okojo-guide-cutout.png");
  background-size: contain;
  background-position: center bottom;
}

.sprite-teacher,
.sprite-guide,
.menu-guide,
.question-guide {
  filter:
    drop-shadow(0 0 1px rgba(77, 42, 22, .95))
    drop-shadow(0 5px 4px rgba(77, 42, 22, .24));
}

.schedule-row .character-sprite,
.flow-step .character-sprite {
  width: 38px;
  height: 42px;
  background-size: contain;
  background-position: center bottom;
}

.flow-step .sprite-teacher {
  background-size: contain;
  background-position: center bottom;
}

.control-row, .answers {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.primary, .secondary, .answer-card {
  min-height: 56px;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 800;
}

.primary {
  color: #fff;
  background: var(--blue);
  border: 0;
}

.secondary, .answer-card {
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
}

.answer-card {
  min-width: 150px;
  font-size: 20px;
}

.image-answer {
  display: inline-grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  text-align: left;
}

.calendar-layout, .split-layout {
  display: grid;
  grid-template-columns: minmax(310px, .95fr) minmax(300px, 1.05fr);
  gap: 18px;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-head, .calendar-day {
  min-height: 58px;
  display: grid;
  place-items: center;
}

.calendar-head {
  color: var(--muted);
  font-weight: 800;
}

.calendar-day {
  position: relative;
  font-size: 20px;
  font-weight: 800;
}

.calendar-day.muted {
  opacity: .35;
}

.calendar-day.selected {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.calendar-month-title.lesson-focus,
.calendar-head.lesson-focus,
.calendar-day.lesson-date-focus,
.calendar-day.lesson-today-focus,
.calendar-badge.lesson-focus {
  position: relative;
  z-index: 1;
  color: #11364d;
  background: #e8fbff;
  box-shadow:
    0 0 0 4px #ffffff,
    0 0 0 8px #2db7e5,
    0 0 26px rgba(45, 183, 229, .82);
}

.calendar-month-title.lesson-focus {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 12px;
}

.calendar-day.lesson-date-focus {
  border-color: #2db7e5;
}

.calendar-day.lesson-today-focus {
  border-color: #2db7e5;
  background: #e8fbff;
}

.calendar-day.lesson-event-focus {
  border-color: #2db7e5;
  background: #e8fbff;
}

.calendar-search-package {
  gap: 18px;
}

.calendar-learning-layout,
.calendar-summary-layout {
  display: grid;
  grid-template-columns: minmax(430px, 1.05fr) minmax(360px, .95fr);
  gap: 22px;
  align-items: start;
}

.calendar-study-card {
  padding: 18px;
  border: 5px solid #8b4c24;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff8dc, #f3d391);
  box-shadow: 0 8px 0 rgba(83, 40, 17, .22), inset 0 0 0 3px rgba(255,255,255,.45);
}

.calendar-guide-list,
.calendar-mini-tasks {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.calendar-guide-list span,
.calendar-mini-tasks div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 12px;
  border: 3px solid #d8b175;
  border-radius: 14px;
  background: #fffdf7;
  color: #4b260f;
  font-weight: 950;
}

.calendar-guide-list b {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f0b33e;
  color: white;
  font-size: 16px;
}

.calendar-focus-list span {
  grid-template-columns: auto 1fr;
  font-size: 18px;
  line-height: 1.35;
}

.calendar-lesson-controls {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.calendar-lesson-controls .primary,
.calendar-lesson-controls .secondary {
  min-width: 0;
  min-height: 54px;
  padding: 8px;
  font-size: 26px;
}

.calendar-lesson-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.calendar-lesson-progress span {
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 6px;
  border: 3px solid #d8b175;
  border-radius: 14px;
  background: #fffdf7;
  color: #5b351b;
  font-weight: 950;
}

.calendar-lesson-progress span.active {
  border-color: #3a7bd5;
  background: #edf5ff;
  box-shadow: 0 0 0 4px rgba(58, 123, 213, .16);
}

.calendar-symbol-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.calendar-symbol-card {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 104px;
  padding: 12px;
  border: 4px solid #d8b175;
  border-radius: 18px;
  background: #fffdf7;
  color: #4b260f;
  font-weight: 950;
}

.calendar-symbol-card span {
  font-size: 34px;
}

.calendar-symbol-card.active {
  border-color: #2db7e5;
  background: #e8fbff;
  box-shadow: 0 0 0 4px #fff, 0 0 0 8px #2db7e5;
}

.calendar-mini-tasks div {
  grid-template-columns: 1fr auto;
}

.calendar-mini-tasks strong {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-mini-tasks .character-sprite,
.calendar-target-card .character-sprite {
  width: 40px;
  height: 54px;
}

.calendar-badge {
  position: absolute;
  right: 5px;
  bottom: 4px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #fffdf7;
  border: 2px solid #d8b175;
  font-size: 16px;
  line-height: 1;
}

.calendar-badge .asset-icon {
  width: 24px;
  height: 24px;
}

.calendar-badge .character-sprite {
  width: 24px;
  height: 24px;
  background-size: contain;
  background-position: center bottom;
}

.panel-title {
  margin: 0 0 12px;
  font-size: 22px;
}

.schedule-list, .flow-list {
  display: grid;
  gap: 8px;
}

.schedule-row, .flow-step {
  min-height: 64px;
  display: grid;
  grid-template-columns: 46px 84px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.schedule-row strong, .flow-step strong {
  font-size: 20px;
}

.schedule-package .weekday-print-layout {
  grid-template-columns: minmax(260px, 320px) minmax(720px, 1fr);
  padding-bottom: 120px;
}

.schedule-story-layout,
.schedule-match-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1.12fr) minmax(360px, .88fr);
  gap: 22px;
  align-items: start;
}

.schedule-board,
.schedule-story-card {
  position: relative;
  padding: 22px;
  border: 6px solid #8b4c24;
  border-radius: 28px;
  background: linear-gradient(180deg, #fff8dc, #f0cf88);
  box-shadow: 0 8px 0 rgba(83, 40, 17, .2), inset 0 0 0 3px rgba(255,255,255,.45);
}

.lunch-table {
  display: grid;
  grid-template-columns: 1fr .7fr 2fr;
  gap: 8px;
}

.lunch-head {
  padding: 10px;
  border-radius: 12px;
  background: #8b4c24;
  color: #fff7cf;
  font-size: 18px;
  font-weight: 950;
  text-align: center;
}

.lunch-cell-row {
  display: contents;
}

.lunch-cell-row > span,
.lunch-cell-row > strong,
.lunch-cell-row .lunch-menu {
  min-height: 84px;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 4px solid #d8b175;
  border-radius: 16px;
  background: #fffdf7;
  color: #4b260f;
  font-size: 20px;
  font-weight: 950;
}

.lunch-cell-row .lunch-menu {
  grid-template-columns: 58px 1fr;
  justify-items: start;
  gap: 10px;
}

.lunch-menu .asset-icon {
  width: 54px;
  height: 54px;
}

.lunch-table.is-focused .lunch-cell-row:not(.focused) > span,
.lunch-table.is-focused .lunch-cell-row:not(.focused) > strong,
.lunch-table.is-focused .lunch-cell-row:not(.focused) .lunch-menu {
  opacity: .28;
  filter: grayscale(.35);
}

.lunch-table.story-focus {
  position: relative;
}

.lunch-cell-row.focused > span,
.lunch-cell-row.focused > strong,
.lunch-cell-row.focused .lunch-menu {
  border-color: #2db7e5;
  background: #e8fbff;
  box-shadow: 0 0 0 5px rgba(45, 183, 229, .22);
}

.lunch-table.story-focus .lunch-cell-row.focused > span,
.lunch-table.story-focus .lunch-cell-row.focused > strong,
.lunch-table.story-focus .lunch-cell-row.focused .lunch-menu {
  border-color: #d8b175;
  background: #fffdf7;
  box-shadow: none;
}

.lunch-table.story-focus[data-focus-part="date"] .lunch-cell-row.focused .lunch-date-cell,
.lunch-table.story-focus[data-focus-part="weekday"] .lunch-cell-row.focused .lunch-weekday-cell,
.lunch-table.story-focus[data-focus-part="menu"] .lunch-cell-row.focused .lunch-menu-cell {
  border-color: #2db7e5;
  background: #e8fbff;
  box-shadow: 0 0 0 5px rgba(45, 183, 229, .28), 0 0 22px rgba(45, 183, 229, .5);
  transform: translateY(-2px);
}

.schedule-magnifier {
  position: absolute;
  right: 20px;
  bottom: 10px;
  display: flex;
  align-items: end;
  gap: 4px;
  color: #4b260f;
  font-size: 42px;
  font-weight: 950;
}

.schedule-magnifier .character-sprite {
  width: 70px;
  height: 104px;
}

.lunch-zoom-card,
.lunch-target-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 20px;
  border: 5px solid #8b4c24;
  border-radius: 24px;
  background: #fffdf7;
  color: #4b260f;
  font-weight: 950;
}

.lunch-zoom-card .asset-icon,
.lunch-target-card .asset-icon {
  width: 150px;
  height: 130px;
}

.lunch-target-card strong,
.lunch-zoom-card span {
  font-size: 30px;
}

.schedule-look-points {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.schedule-look-points button {
  padding: 10px 12px;
  border: 3px solid #d8b175;
  border-radius: 14px;
  background: #fffdf7;
  color: #4b260f;
  font-size: 18px;
  font-weight: 950;
  text-align: left;
  cursor: pointer;
}

.schedule-look-points button.active {
  border-color: #2db7e5;
  background: #e8fbff;
  box-shadow: 0 0 0 4px rgba(45, 183, 229, .18);
}

.print-lunch-table {
  display: grid;
  grid-template-columns: 1fr .7fr 2fr;
  border: 3px solid #4b260f;
}

.print-lunch-table > div {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #4b260f;
  font-size: 20px;
  font-weight: 850;
}

.print-lunch-table .asset-icon {
  width: 36px;
  height: 36px;
}

.schedule-print-questions {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.schedule-print-questions h2 {
  margin: 0 0 2px;
}

.schedule-print-question {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  align-items: end;
  padding: 10px 0;
  border-bottom: 2px solid #d8b175;
}

.schedule-print-question p {
  margin: 0;
  font-size: 22px;
  font-weight: 850;
}

.schedule-print-answer {
  height: 42px;
  border-bottom: 3px solid #4b260f;
}

.clock-layout {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(300px, 1.1fr);
  gap: 22px;
  align-items: center;
}

.clock-face {
  position: relative;
  width: min(72vw, 330px);
  aspect-ratio: 1;
  margin: 0 auto;
  border: 10px solid var(--ink);
  border-radius: 50%;
  background: #fffdf8;
  box-shadow: inset 0 0 0 6px #f0f4f6;
}

.tick {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  margin: -17px;
  display: grid;
  place-items: center;
  font-weight: 900;
  transform: rotate(var(--a)) translateY(-135px) rotate(calc(-1 * var(--a)));
}

.hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 8px;
  border-radius: 8px;
  transform-origin: bottom center;
  background: var(--ink);
}

.hand.hour {
  height: 82px;
}

.hand.minute {
  height: 112px;
  width: 5px;
  background: var(--coral);
}

.clock-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--blue);
}

.clock-face-draggable {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.clock-face-draggable:active {
  cursor: grabbing;
}

.minute-drag-handle {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: 34px;
  height: 34px;
  border: 5px solid #e74a36;
  border-radius: 50%;
  background: #fff8dc;
  box-shadow: 0 4px 0 rgba(83, 40, 17, .18);
  pointer-events: none;
}

.clock-package .clock-face {
  animation: clock-pop .55s ease both;
}

.clock-package .hand.hour {
  height: 72px;
  background: #5b351b;
}

.clock-package .hand.minute {
  height: 122px;
  width: 6px;
  background: #e74a36;
}

.clock-face-guide {
  overflow: visible;
  box-shadow:
    inset 0 0 0 6px #f0f4f6,
    0 0 0 10px rgba(255, 216, 95, .28);
}

.hour-reach {
  position: absolute;
  left: 50%;
  bottom: 50%;
  z-index: 1;
  width: 16px;
  height: 136px;
  border-radius: 999px 999px 8px 8px;
  transform-origin: bottom center;
  background: linear-gradient(180deg, rgba(255, 196, 56, .95), rgba(255, 196, 56, .18) 62%, transparent 63%);
  filter: drop-shadow(0 3px 0 rgba(91, 53, 27, .22));
  animation: hour-reach-grow 1.2s ease-in-out infinite alternate;
  pointer-events: none;
}

.hour-reach::after {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 26px;
  height: 26px;
  transform: translateX(-50%);
  border: 4px solid #ffc438;
  border-radius: 50%;
  background: rgba(255, 253, 248, .92);
}

.clock-guide-label {
  position: absolute;
  z-index: 4;
  max-width: 9em;
  padding: 8px 10px;
  border: 3px solid #8b4c24;
  border-radius: 14px;
  background: #fff7cf;
  color: #5b351b;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.25;
  box-shadow: 0 4px 0 rgba(83, 40, 17, .18);
}

.clock-guide-label.hour-label {
  left: -34px;
  top: 22px;
}

.clock-guide-label.minute-label {
  right: -30px;
  bottom: 46px;
  background: #ffe7df;
}

.clock-lesson,
.clock-summary {
  display: grid;
  grid-template-columns: minmax(360px, .95fr) minmax(360px, 1.05fr);
  gap: 22px;
  align-items: start;
}

.clock-story-single {
  grid-template-columns: minmax(760px, 1100px);
  justify-content: center;
}

.clock-demo-card,
.clock-rule-card,
.clock-mini-grid > div {
  padding: 22px;
  border: 5px solid #8b4c24;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff8dc, #f3d391);
  box-shadow: 0 8px 0 rgba(83, 40, 17, .22), inset 0 0 0 3px rgba(255,255,255,.45);
}

.clock-demo-note {
  margin: 0 0 14px;
  color: #5b351b;
  font-size: 20px;
  font-weight: 950;
  text-align: center;
}

.elapsed-reference-clocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

#elapsedStoryClock {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.elapsed-reference-clocks > div {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px 10px;
  border: 2px solid rgba(75, 38, 15, .24);
  border-radius: 8px;
  background: #fffaf0;
}

.elapsed-reference-clocks .clock-face {
  width: 160px;
}

.elapsed-reference-clocks .tick {
  transform: rotate(var(--a)) translateY(-64px) rotate(calc(-1 * var(--a)));
}

.elapsed-reference-clocks .hand.hour {
  height: 45px;
}

.elapsed-reference-clocks .hand.minute {
  height: 62px;
}

.elapsed-reference-clocks strong {
  font-size: 20px;
  font-weight: 900;
}

.clock-character {
  display: flex;
  justify-content: center;
  margin: -4px 0 8px;
}

.clock-character .character-sprite {
  width: 68px;
  height: 112px;
}

.clock-hand-legend {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  font-size: 18px;
  font-weight: 900;
}

.clock-hand-legend span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clock-hand-legend b {
  width: 34px;
  height: 8px;
  border-radius: 999px;
  background: #5b351b;
}

.clock-hand-legend .legend-minute {
  background: #e74a36;
}

.clock-learn-card {
  display: grid;
  gap: 14px;
}

.clock-learn-display {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(280px, .9fr);
  gap: 28px;
  align-items: center;
}

.clock-learn-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.clock-hand-slider {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: #5b351b;
  font-size: 18px;
  font-weight: 950;
  text-align: center;
}

.clock-hand-slider input {
  width: 100%;
  accent-color: #e74a36;
}

.clock-digital-study {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 22px;
  border: 5px solid #263238;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #e8f4ff);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.7), 0 7px 0 rgba(38,50,56,.18);
}

.clock-digital-study .digital {
  margin-top: 0;
  width: min(32vw, 360px);
  font-size: clamp(54px, 6vw, 86px);
}

.clock-digital-study strong {
  color: #263238;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 950;
}

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

.clock-choice-card {
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 14px;
  border: 5px solid #d8b175;
  border-radius: 20px;
  background: #fffdf7;
  box-shadow: 0 6px 0 rgba(83, 40, 17, .16);
}

.clock-choice-card:hover,
.clock-choice-card:focus-visible {
  border-color: #2db7e5;
  background: #e8fbff;
  transform: translateY(-2px);
}

.clock-choice-card .clock-face {
  width: min(31vw, 190px);
  border-width: 7px;
}

.clock-choice-card .tick {
  width: 26px;
  height: 26px;
  margin: -13px;
  font-size: 13px;
  transform: rotate(var(--a)) translateY(-76px) rotate(calc(-1 * var(--a)));
}

.clock-choice-card .hand.hour {
  height: 48px;
}

.clock-choice-card .hand.minute {
  height: 66px;
}

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

.clock-digital-choice {
  padding: 14px;
  border: 5px solid #d8b175;
  border-radius: 20px;
  background: #fffdf7;
  box-shadow: 0 6px 0 rgba(83, 40, 17, .16);
}

.clock-digital-choice:hover,
.clock-digital-choice:focus-visible {
  border-color: #2db7e5;
  background: #e8fbff;
  transform: translateY(-2px);
}

.clock-digital-choice .digital {
  margin-top: 0;
  width: min(28vw, 260px);
}

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

.clock-mini-grid .clock-face {
  width: min(32vw, 190px);
  border-width: 7px;
}

.clock-mini-grid .tick {
  width: 26px;
  height: 26px;
  margin: -13px;
  font-size: 13px;
  transform: rotate(var(--a)) translateY(-76px) rotate(calc(-1 * var(--a)));
}

.clock-mini-grid .hand.hour {
  height: 48px;
}

.clock-mini-grid .hand.minute {
  height: 66px;
}

.clock-mini-grid .digital {
  width: min(32vw, 170px);
  font-size: 28px;
}

.clock-mini-grid strong {
  display: block;
  margin-top: 12px;
  font-size: 20px;
  text-align: center;
}

.clock-print-sheet .clock-face {
  width: 104px;
  border-width: 4px;
}

.clock-print-sheet .tick {
  width: 16px;
  height: 16px;
  margin: -8px;
  font-size: 8px;
  transform: rotate(var(--a)) translateY(-41px) rotate(calc(-1 * var(--a)));
}

.clock-print-sheet .hand.hour {
  height: 27px;
}

.clock-print-sheet .hand.minute {
  height: 37px;
}

.clock-print-sheet .digital {
  width: 132px;
  margin: 0;
  font-size: 24px;
}

.clock-print-sheet .clock-period-pill {
  min-width: 52px;
  min-height: 23px;
  margin-bottom: 4px;
  font-size: 13px;
}

.clock-print-page {
  page-break-after: always;
  break-after: page;
}

.clock-print-question-list,
.clock-print-write-list,
.clock-print-paste-list {
  display: grid;
  gap: 8px;
}

.clock-print-choice-question {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 7px;
  border: 2px solid #4b260f;
  border-radius: 8px;
}

.clock-print-target {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.clock-print-target > span:first-child,
.clock-print-write-question > span:first-child,
.clock-print-paste-box > span:first-child {
  font-size: 20px;
  font-weight: 950;
}

.elapsed-print-question-head {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  font-weight: 950;
}

.elapsed-print-question-head span {
  font-size: 20px;
}

.elapsed-print-question-head strong {
  max-width: 120px;
  color: #5b351b;
  font-size: 18px;
  line-height: 1.1;
  white-space: nowrap;
}

.clock-print-choice-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  min-width: 0;
}

.clock-print-option,
.clock-print-cut-card {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 74px;
  padding: 6px;
  border: 2px solid #4b260f;
  border-radius: 8px;
}

.clock-print-option .digital,
.clock-print-cut-card .digital {
  width: 100%;
  max-width: 132px;
}

.clock-print-option b {
  font-size: 18px;
}

.clock-print-write-list {
  grid-template-columns: repeat(2, 1fr);
}

.clock-print-write-question {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 218px;
  padding: 9px;
  border: 2px solid #4b260f;
  border-radius: 8px;
}

.clock-print-write-line {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 6px;
  align-items: end;
  width: 100%;
  font-size: 18px;
  font-weight: 850;
}

.clock-print-write-line b {
  min-height: 28px;
  border-bottom: 3px solid #4b260f;
}

.clock-print-paste-list {
  grid-template-columns: repeat(2, 1fr);
}

.clock-print-paste-box {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 190px;
  padding: 8px;
  border: 2px solid #4b260f;
  border-radius: 8px;
}

.clock-print-paste-target {
  display: grid;
  place-items: center;
  width: 142px;
  min-height: 46px;
  border: 3px dashed #4b260f;
  border-radius: 8px;
  color: #6e523b;
  font-weight: 850;
}

.clock-print-cut-area {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 3px dashed #4b260f;
}

.clock-print-cut-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@keyframes clock-pop {
  from { transform: scale(.96); opacity: .72; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes hour-reach-grow {
  from {
    height: 86px;
    opacity: .72;
  }
  to {
    height: 136px;
    opacity: 1;
  }
}

.digital {
  margin: 16px auto 0;
  width: min(72vw, 300px);
  padding: 12px;
  border-radius: 8px;
  background: #263238;
  color: #e9fff4;
  text-align: center;
  font-size: clamp(34px, 7vw, 52px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.digital span {
  display: block;
  margin-bottom: 4px;
  font-size: .38em;
  line-height: 1;
}

.digital b {
  display: block;
  font: inherit;
}

.digital.period-am,
.clock-period-pill.period-am {
  background: #d94a38;
  color: #fff8f2;
}

.digital.period-pm,
.clock-period-pill.period-pm {
  background: #2f69c7;
  color: #eef7ff;
}

.clock-period-pill {
  display: inline-grid;
  place-items: center;
  min-width: 76px;
  min-height: 34px;
  margin: 0 auto 10px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 20px;
  font-weight: 950;
  box-shadow: 0 4px 0 rgba(83, 40, 17, .18);
}

.flow-list {
  position: relative;
}

.flow-step {
  grid-template-columns: 46px 72px 1fr;
}

.flow-step.active {
  border-color: var(--blue);
  background: var(--sky);
}

.settings-panel {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.settings-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.settings-grid select,
.settings-grid input[type="date"] {
  min-height: 48px;
  padding: 8px 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.check-row {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 48px;
}

.check-row input {
  width: 22px;
  height: 22px;
}

@media (max-width: 900px) {
  .topbar, .work-header, .question-row {
    align-items: stretch;
    flex-direction: column;
  }
  .hero, .calendar-layout, .split-layout, .clock-layout, .question-row {
    grid-template-columns: 1fr;
  }
  .category-grid, .mode-grid {
    grid-template-columns: 1fr;
  }
  .menu-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .weekday-road {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
  .mode-tabs {
    width: 100%;
  }
  .tab {
    flex: 1;
  }
}

@media (max-width: 560px) {
  main {
    padding: 12px;
  }
  .brand-subtitle {
    display: none;
  }
  .weekday-road {
    grid-template-columns: 1fr;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .clock-face {
    width: min(88vw, 290px);
  }
  .tick {
    transform: rotate(var(--a)) translateY(-118px) rotate(calc(-1 * var(--a)));
  }
}

/* Classroom adventure layout */
body {
  min-height: 100vh;
  overflow-x: hidden;
  color: #4b260f;
  background: #f6d9b9;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  padding: 112px 32px 112px 146px;
  overflow: hidden;
}

.classroom-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(184,105,54,.1)),
    linear-gradient(180deg, #f6ddc4 0 58%, #d69a68 58% 100%);
}

.classroom-bg::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 29%;
  opacity: .62;
  background:
    repeating-linear-gradient(90deg, transparent 0 140px, rgba(112,58,31,.22) 141px 144px),
    linear-gradient(180deg, #b86d40, #d8935e);
  border-top: 10px solid rgba(99,51,28,.4);
}

.chalkboard {
  position: absolute;
  left: 17%;
  right: 16%;
  top: 22%;
  height: 39%;
  border: 14px solid #945a39;
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 40%, rgba(255,255,255,.045), transparent 18%),
    linear-gradient(135deg, #39706b, #245650);
  box-shadow: inset 0 0 0 5px rgba(54,31,20,.34), 0 10px 0 rgba(93,49,30,.24);
}

.classroom-window {
  position: absolute;
  top: 15%;
  width: 15%;
  height: 45%;
  border: 10px solid #a96c4a;
  background:
    linear-gradient(90deg, transparent 47%, rgba(132,89,68,.8) 48% 52%, transparent 53%),
    linear-gradient(transparent 47%, rgba(132,89,68,.8) 48% 52%, transparent 53%),
    linear-gradient(150deg, #cfecf8, #f4fbff);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.68);
}

.window-left { left: -3%; }
.window-right { right: -3%; }

.wall-clock {
  position: absolute;
  top: 13%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  transform: translateX(-50%);
  border: 6px solid #9b765d;
  border-radius: 50%;
  background: #fff9eb;
  font-size: 44px;
  box-shadow: 0 3px 0 rgba(85,49,30,.22);
}

.garland {
  position: absolute;
  top: 25%;
  left: 26%;
  right: 24%;
  overflow: hidden;
  color: #f7c354;
  letter-spacing: 12px;
  white-space: nowrap;
  text-shadow: 18px 4px #e96f66, 36px -2px #67add4, 54px 3px #78b967;
}

.topbar {
  position: fixed;
  top: 14px;
  left: 150px;
  right: 28px;
  z-index: 8;
  display: flex;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.brand {
  gap: 14px;
  text-align: center;
  filter: drop-shadow(0 5px 0 rgba(102,52,24,.18));
}

.brand-title {
  color: #d76632;
  font-size: clamp(30px, 4vw, 56px);
  font-weight: 950;
  letter-spacing: .04em;
  line-height: 1;
  -webkit-text-stroke: 8px #fff;
  paint-order: stroke fill;
  text-shadow: 0 5px 0 #7f371d;
}

.title-star {
  color: #ffc94f;
  font-size: clamp(26px, 3vw, 44px);
  -webkit-text-stroke: 5px #fff;
  paint-order: stroke fill;
  text-shadow: 0 3px 0 #b56a26;
}

.mobile-break {
  display: none;
}

.date-rail {
  position: fixed;
  top: 136px;
  left: 18px;
  z-index: 7;
  width: 112px;
  padding: 8px;
  border: 5px solid #743a1f;
  border-radius: 28px;
  background: rgba(255,250,236,.96);
  box-shadow: 0 7px 0 rgba(90,44,24,.18);
  text-align: center;
}

.date-card {
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
}

.date-card strong,
.date-card span,
.date-card small {
  display: block;
}

.date-card strong {
  padding: 6px 2px;
  color: #fff;
  font-size: 18px;
}

.today-card strong { background: #ed7a3d; }
.tomorrow-card strong { background: #54ae67; }

.date-card span {
  padding-top: 9px;
  color: #562b18;
  font-size: 23px;
  font-weight: 950;
}

.date-card small {
  padding: 3px 0 10px;
  color: #562b18;
  font-size: 17px;
  font-weight: 900;
}

.rail-icon {
  margin: 7px 0 0;
  font-size: 40px;
}

.rail-label {
  display: block;
  margin-bottom: 8px;
  color: #5b321e;
  font-size: 16px;
  font-weight: 950;
}

.bottom-dock {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-top: 6px solid #9a512b;
  background: linear-gradient(180deg, #c66d37, #a9532b);
  box-shadow: 0 -7px 16px rgba(91,48,26,.18);
}

.mode-tabs {
  gap: clamp(6px, 2vw, 18px);
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.tab {
  min-width: 96px;
  min-height: 62px;
  padding: 6px 14px;
  color: #fff2de;
  border: 3px solid transparent;
  border-radius: 17px;
  background: transparent;
  font-size: 15px;
  text-shadow: 0 2px #743719;
}

.tab span {
  display: block;
  margin: 0 0 2px;
  font-size: 25px;
}

.tab.active {
  color: #5d2e17;
  border-color: #fff1c2;
  background: #ffb63f;
  box-shadow: 0 4px 0 #7e3c1d, inset 0 2px rgba(255,255,255,.48);
  text-shadow: none;
}

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px;
}

.hero {
  grid-template-columns: minmax(420px, 1fr) minmax(390px, .92fr);
  gap: 26px;
  max-width: 1220px;
}

.hero-copy {
  min-height: 585px;
  border: 7px solid #7d4023;
  border-radius: 42px;
  background:
    radial-gradient(circle at 82% 12%, #f6d05c 0 42px, transparent 43px),
    linear-gradient(150deg, rgba(255,255,255,.98), rgba(255,255,255,.92));
  box-shadow: 0 10px 0 rgba(109,56,29,.22);
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 19px;
  border: 3px dashed rgba(214,139,76,.36);
  border-radius: 28px;
  pointer-events: none;
}

.hero-text {
  padding: 18px;
}

.hero-text .eyebrow {
  color: #dc713d;
  font-size: 20px;
}

.hero-text h1 {
  color: #502813;
  font-size: clamp(44px, 5vw, 72px);
  line-height: 1.08;
}

.hero-copy p:last-child {
  max-width: 19em;
  color: #6a4938;
  font-size: 18px;
  font-weight: 800;
}

.hero-character-group {
  height: 350px;
}

.hero-student {
  left: 12%;
  width: 178px;
  height: 350px;
}

.hero-boy {
  right: 7%;
  width: 145px;
  height: 322px;
}

.speech-bubble {
  right: 21%;
  top: -44px;
  border: 4px solid #743a1f;
  border-radius: 23px 23px 23px 5px;
  color: #673219;
  background: #fffdf5;
  font-size: 16px;
}

.category-grid {
  grid-template-columns: 1fr;
  gap: 18px;
}

.category-card {
  min-height: 270px;
  padding: 24px 30px;
  border: 7px solid #7a3c1f;
  border-radius: 34px;
  box-shadow: 0 10px 0 rgba(109,56,29,.22);
}

.calendar-card {
  background: linear-gradient(135deg, #fffbed, #ffe1a3);
}

.clock-card {
  background: linear-gradient(135deg, #fffbed, #ffd6a1);
}

.category-card:hover,
.category-card:focus-visible {
  border-color: #e67d38;
  box-shadow: 0 12px 0 rgba(109,56,29,.18);
}

.category-kicker {
  color: #bd6738;
  font-size: 17px;
}

.category-icon {
  width: 74px;
  height: 74px;
  border: 4px solid rgba(144,82,39,.22);
  border-radius: 22px;
  background: #fff8dc !important;
  font-size: 42px;
}

.category-card strong {
  color: #512713;
  font-size: clamp(35px, 5vw, 54px);
}

.category-card span:last-child {
  color: #75452c;
  font-weight: 800;
}

.card-arrow b {
  background: #66b447;
  box-shadow: 0 3px 0 #3b772e;
}

.mode-menu,
.work-view,
.settings-view {
  max-width: 1200px;
}

.menu-heading,
.settings-panel {
  border: 7px solid #783d21;
  border-radius: 34px;
  background: rgba(255,251,239,.97);
  box-shadow: 0 10px 0 rgba(109,56,29,.2);
}

.menu-heading {
  min-height: 154px;
  padding: 22px 190px 22px 24px;
}

.menu-heading h1,
.settings-panel h2 {
  color: #552a16;
}

.menu-heading h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.eyebrow {
  color: #d56f3a;
}

.secondary,
.primary {
  border-width: 4px;
  border-color: #a7663d;
  background: #fff8e5;
  color: #68351d;
  box-shadow: 0 4px 0 rgba(114,59,30,.2);
}

.primary {
  border: 4px solid #438235;
  background: #66b44d;
  color: #fff;
}

.mode-grid {
  gap: 16px;
}

.mode-card {
  min-height: 145px;
  border: 6px solid #7d4327;
  border-radius: 27px;
  background: rgba(255,251,239,.98);
  box-shadow: 0 8px 0 rgba(109,56,29,.18);
}

.mode-card:hover,
.mode-card:focus-visible {
  border-color: #e68442;
  box-shadow: 0 10px 0 rgba(109,56,29,.16);
}

.mode-icon {
  background: #fff0bd;
}

.work-header {
  margin-bottom: 12px;
  padding: 8px 16px;
  border: 5px solid #7c4124;
  border-radius: 22px;
  background: rgba(255,249,232,.94);
  box-shadow: 0 5px 0 rgba(109,56,29,.16);
}

.work-header h2 {
  color: #582b16;
}

.icon-button {
  border: 4px solid #9d633c;
  background: #fff8de;
  box-shadow: 0 3px 0 rgba(113,57,30,.2);
}

.question-row {
  grid-template-columns: minmax(0, 1fr) minmax(240px, .35fr);
  gap: 14px;
}

.question,
.feedback {
  border: 6px solid #763b20;
  border-radius: 34px;
  background: rgba(255,255,250,.98);
  box-shadow: 0 7px 0 rgba(109,56,29,.18);
}

.question {
  min-height: 116px;
  padding: 20px 84px 20px 104px;
  color: #512713;
  font-size: clamp(23px, 3vw, 34px);
}

.question-guide {
  left: 17px;
  width: 78px;
  height: 96px;
}

.question-speak {
  position: absolute;
  right: 16px;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 4px solid #fff3ac;
  border-radius: 50%;
  background: #ffb746;
  box-shadow: 0 4px 0 #b66b25;
  font-size: 25px;
}

.feedback {
  color: #4f9839;
  font-size: 18px;
}

.stage {
  min-height: 480px;
  border: 7px solid #7b4023;
  border-radius: 34px;
  background: rgba(255,251,239,.97);
  box-shadow: 0 10px 0 rgba(109,56,29,.18);
}

.day-tile,
.answer-card,
.calendar-day,
.schedule-row,
.flow-step {
  border-width: 4px;
  border-color: #d4a16d;
  border-radius: 19px;
  background: #fffdf7;
}

.answer-card {
  border-color: #b17b51;
  color: #5b2e18;
  background: #fff7df;
  box-shadow: 0 4px 0 rgba(120,68,35,.16);
}

.answer-card:hover,
.answer-card:focus-visible {
  border-color: #f0a22e;
  background: #fff0ad;
}

.clock-face {
  border-color: #8c461f;
  background: #fff5d7;
  box-shadow: inset 0 0 0 7px #f3b747, 0 0 0 10px #f29438;
}

.clock-face.clock-face-guide {
  box-shadow:
    inset 0 0 0 7px #f3b747,
    0 0 0 10px #f29438,
    0 0 0 18px rgba(255, 216, 95, .32);
}

.digital {
  border: 5px solid #8d491f;
  border-radius: 16px;
  background: #d9e8ca;
  color: #552817;
  box-shadow: 0 4px 0 rgba(109,56,29,.18);
}

@media (max-width: 900px) {
  .app-shell {
    padding: 98px 14px 98px;
  }

  .topbar {
    left: 16px;
    right: 16px;
  }

  .date-rail {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: 520px;
  }

  .question-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .app-shell {
    padding-top: 82px;
    padding-bottom: 82px;
  }

  main {
    padding: 6px;
  }

  .brand-title {
    font-size: 28px;
    -webkit-text-stroke-width: 5px;
  }

  .title-star {
    font-size: 22px;
    -webkit-text-stroke-width: 3px;
  }

  .mobile-break {
    display: block;
  }

  .bottom-dock {
    min-height: 72px;
    padding: 5px;
  }

  .mode-tabs {
    width: 100%;
    gap: 3px;
  }

  .tab {
    min-height: 56px;
    padding: 4px 2px;
    font-size: 11px;
  }

  .tab span {
    font-size: 20px;
  }

  .hero-copy {
    min-height: 485px;
    padding: 16px;
    border-width: 5px;
  }

  .hero-text {
    padding: 5px;
  }

  .hero-text .eyebrow {
    font-size: 15px;
  }

  .hero-text h1 {
    font-size: 42px;
  }

  .hero-copy p:last-child {
    font-size: 15px;
  }

  .hero-character-group {
    height: 300px;
  }

  .hero-student {
    left: 2%;
    width: 145px;
    height: 300px;
  }

  .hero-boy {
    right: -2%;
    width: 124px;
    height: 270px;
  }

  .speech-bubble {
    right: 11%;
    top: -32px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .category-card {
    min-height: 230px;
    border-width: 5px;
  }

  .menu-heading {
    min-height: 132px;
    padding: 15px 112px 15px 15px;
    border-width: 5px;
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .question {
    padding: 14px 66px 14px 78px;
    border-width: 5px;
    font-size: 22px;
  }

  .question-guide {
    left: 8px;
    width: 62px;
    height: 78px;
  }

  .question-speak {
    right: 9px;
    width: 46px;
    height: 46px;
  }

  .stage {
    min-height: 380px;
    padding: 12px;
    border-width: 5px;
  }
}

/* Friendly classroom theme */
:root {
  --ink: #3d4650;
  --muted: #71808a;
  --line: #dfe8e6;
  --paper: #fffdf7;
  --sky: #eaf6ff;
  --mint: #e4f7eb;
  --sun: #fff0bd;
  --coral: #f47f72;
  --blue: #4b91c8;
  --green: #43a079;
  --gold: #d99731;
}

body {
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 220, 151, .34) 0 90px, transparent 91px),
    radial-gradient(circle at 88% 20%, rgba(169, 221, 240, .28) 0 130px, transparent 131px),
    linear-gradient(180deg, #f9fcf7 0%, #fff9ed 100%);
}

.topbar {
  padding: 12px clamp(16px, 4vw, 44px);
  background: rgba(255, 255, 255, .88);
}

.brand-mark {
  border-radius: 16px;
  background: linear-gradient(135deg, #63a8d8, #4785bb);
}

.mode-tabs {
  border-radius: 18px;
  background: #f0f6f3;
}

.tab {
  border-radius: 14px;
}

.tab span {
  display: inline-block;
  margin-right: 5px;
}

.hero {
  grid-template-columns: minmax(420px, 1fr) minmax(360px, .9fr);
  gap: clamp(18px, 3vw, 34px);
  max-width: 1320px;
  margin: 0 auto;
}

.hero-copy {
  position: relative;
  min-height: 600px;
  justify-content: flex-start;
  overflow: hidden;
  border-radius: 38px;
  background:
    radial-gradient(circle at 82% 16%, rgba(255, 214, 106, .96) 0 48px, transparent 49px),
    linear-gradient(155deg, #dff2ff 0%, #effaff 56%, #caeacb 56%, #e6f4d5 100%);
  box-shadow: 0 18px 42px rgba(63, 103, 116, .14);
}

.hero-text {
  position: relative;
  z-index: 2;
}

.hero-character-group {
  position: absolute;
  inset: auto 0 0;
  height: 430px;
}

.hero-student,
.hero-boy,
.menu-guide,
.question-guide {
  display: block;
  background-repeat: no-repeat;
}

.hero-student {
  position: absolute;
  left: 12%;
  bottom: -8px;
  width: 190px;
  height: 420px;
  background-image: url("./assets/student-cutout.png");
  background-size: contain;
  background-position: center bottom;
}

.hero-boy {
  position: absolute;
  right: 5%;
  bottom: -12px;
  width: 165px;
  height: 390px;
  background-image: url("./assets/boy-cutout.png");
  background-size: contain;
  background-position: center bottom;
}

.speech-bubble {
  position: absolute;
  right: 22%;
  top: 4px;
  padding: 12px 16px;
  color: #527184;
  border-radius: 22px 22px 22px 4px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 7px 18px rgba(66, 107, 120, .1);
  font-weight: 800;
  line-height: 1.45;
}

.category-grid {
  gap: 18px;
}

.category-card {
  position: relative;
  min-height: 286px;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 14px 30px rgba(70, 99, 98, .13);
  transition: transform .2s ease, box-shadow .2s ease;
}

.category-card:hover,
.category-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 20px 34px rgba(70, 99, 98, .18);
}

.category-icon {
  border-radius: 20px;
}

.category-kicker {
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.card-arrow {
  align-self: end;
  color: var(--blue) !important;
  font-size: 15px !important;
  font-weight: 800;
}

.card-arrow b {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-left: 6px;
  color: #fff;
  border-radius: 50%;
  background: var(--blue);
}

.mode-card,
.day-tile,
.answer-card,
.calendar-day,
.schedule-row,
.flow-step,
.primary,
.secondary,
.icon-button {
  border-radius: 16px;
}

.mode-card {
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(58, 88, 84, .1);
  transition: transform .18s ease, box-shadow .18s ease;
}

.mode-card:hover,
.mode-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 14px 24px rgba(58, 88, 84, .14);
}

.mode-icon {
  border-radius: 18px;
}

.menu-heading {
  position: relative;
  min-height: 142px;
  margin-bottom: 26px;
  padding: 18px 180px 18px 18px;
  border-radius: 28px;
  background: linear-gradient(115deg, rgba(255,255,255,.94), rgba(233,248,255,.9));
  box-shadow: 0 10px 26px rgba(63, 103, 116, .1);
}

.menu-lead,
.settings-lead {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.menu-guide {
  position: absolute;
  right: 28px;
  bottom: 0;
  width: 138px;
  height: 138px;
  background-image: url("./assets/okojo-guide-cutout.png");
  background-size: contain;
  background-position: center bottom;
}

.question,
.feedback {
  border-radius: 22px;
}

.question {
  position: relative;
  min-height: 94px;
  padding-left: 92px;
  font-size: clamp(20px, 2.7vw, 30px);
}

.question-guide {
  position: absolute;
  left: 14px;
  bottom: 0;
  width: 72px;
  height: 84px;
  background-image: url("./assets/okojo-guide-cutout.png");
  background-size: contain;
  background-position: center bottom;
}

.stage,
.settings-panel {
  border-radius: 26px;
  box-shadow: 0 9px 24px rgba(63, 103, 116, .08);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: 560px;
  }
}

@media (max-width: 560px) {
  .mode-tabs {
    gap: 2px;
  }

  .tab {
    min-width: 0;
    padding: 6px 4px;
    font-size: 12px;
  }

  .tab span {
    display: block;
    margin: 0 0 2px;
  }

  .hero-copy {
    min-height: 530px;
    padding: 22px;
    border-radius: 28px;
  }

  h1 {
    font-size: 45px;
  }

  .hero-student {
    left: 2%;
  }

  .hero-boy {
    right: -5%;
  }

  .speech-bubble {
    right: 17%;
  }

  .menu-heading {
    padding: 16px 112px 16px 16px;
  }

  .menu-guide {
    right: 0;
    width: 112px;
  }
}

/* Readability and layout corrections */
body[data-view]:not([data-view="home"]) .date-rail {
  display: none;
}

body[data-view]:not([data-view="home"]) .app-shell {
  padding-left: 32px;
}

.hero {
  align-items: stretch;
}

.hero-copy {
  min-height: 585px;
  justify-content: flex-start;
  padding: 34px;
  border: 7px solid #7d4023;
  border-radius: 42px;
  background: rgba(255, 252, 239, .98);
  box-shadow: 0 10px 0 rgba(109, 56, 29, .22);
}

.hero-text {
  max-width: 100%;
  padding: 0;
  text-align: center;
}

.hero-text .eyebrow {
  color: #9a4c24;
  font-size: 19px;
  font-weight: 950;
}

.hero-text h1 {
  max-width: none;
  color: #4e260f;
  font-size: clamp(42px, 4.4vw, 64px);
  line-height: 1.1;
  text-shadow: 0 2px 0 #fff;
}

.hero-copy p:last-child {
  max-width: none;
  color: #5d3a27;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.7;
}

.hero-character-group {
  inset: auto 16px 0;
  height: 322px;
}

.hero-student {
  left: 12%;
  width: 142px;
  height: 286px;
}

.hero-boy {
  right: 12%;
  width: 122px;
  height: 270px;
}

.speech-bubble {
  display: none;
}

.category-card,
.mode-card,
.stage,
.question,
.feedback,
.menu-heading,
.settings-panel {
  color: #4b260f;
  background-color: rgba(255, 253, 245, .98);
}

.category-card span:last-child,
.mode-card span:last-child,
.menu-lead,
.settings-lead {
  color: #63402e;
  font-weight: 850;
}

.question,
.answer-card,
.day-label,
.schedule-row,
.flow-step,
.calendar-day,
.calendar-head {
  color: #4b260f;
  font-weight: 900;
}

.feedback {
  color: #2e783d;
  font-weight: 900;
}

@media (max-width: 900px) {
  body[data-view] .app-shell {
    padding-left: 14px;
  }

  .hero-copy {
    min-height: 520px;
  }
}

@media (max-width: 560px) {
  .hero-copy {
    min-height: 470px;
    padding: 20px;
  }

  .hero-text .eyebrow {
    font-size: 14px;
  }

  .hero-text h1 {
    font-size: 38px;
  }

  .hero-copy p:last-child {
    font-size: 14px;
  }

  .hero-character-group {
    height: 268px;
  }

  .hero-student {
    left: 4%;
    width: 116px;
    height: 242px;
  }

  .hero-boy {
    right: 4%;
    width: 102px;
    height: 222px;
  }

}

/* Weekday activity lesson */
.weekday-package {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.weekday-step-road {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}

.weekday-step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 68px;
  padding: 10px 12px;
  border: 3px solid #d8b175;
  border-radius: 8px;
  background: #fff9e6;
  color: #5b351b;
  font-weight: 950;
  text-align: left;
}

.weekday-step span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #f0b33e;
  color: white;
  font-size: 22px;
}

.weekday-step strong {
  font-size: 17px;
}

.weekday-step small {
  padding: 4px 7px;
  border-radius: 999px;
  background: #e5f7d5;
  color: #3f7b25;
  font-size: 12px;
}

.weekday-step.active {
  border-color: #3a7bd5;
  background: #edf5ff;
  box-shadow: 0 0 0 4px rgba(58, 123, 213, .16);
}

.weekday-step.done span {
  background: #56a832;
}

.weekday-story-view,
.weekday-challenge,
.weekday-print-layout {
  display: grid;
  grid-template-columns: minmax(430px, 1.05fr) minmax(0, .95fr);
  gap: 22px;
  align-items: start;
}

.weekday-print-maker .weekday-print-layout,
.calendar-search-package .weekday-print-layout {
  grid-template-columns: minmax(260px, 320px) minmax(720px, 1fr);
  padding-bottom: 120px;
}

.clock-package .weekday-print-layout {
  grid-template-columns: minmax(260px, 320px) minmax(820px, 1fr);
  padding-bottom: 120px;
}

.clock-print-sheet-stack {
  display: grid;
  gap: 22px;
  justify-items: start;
  min-width: 0;
}

.weekday-story-side {
  min-width: 0;
  overflow: visible;
}

.weekday-story-full {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.weekday-story-full .weekday-scene-card {
  width: min(100%, 980px);
  margin: 0 auto;
}

.weekday-story-full .weekday-scene-image {
  height: min(62vh, 610px);
  min-height: 470px;
}

.weekday-story-full .weekday-story-side {
  width: min(100%, 980px);
  margin: 0 auto;
}

.weekday-story-controls {
  justify-content: center;
  margin: 14px 0 0;
}

.weekday-wide-action {
  width: 100%;
  justify-content: center;
  margin-top: 14px;
  font-size: 20px;
}

.weekday-lesson {
  display: grid;
  grid-template-columns: minmax(480px, 1.1fr) minmax(430px, .9fr);
  gap: 22px;
  align-items: start;
}

.weekday-match-two,
.weekday-challenge-text {
  display: grid;
  grid-template-columns: minmax(430px, 1.05fr) minmax(360px, .95fr);
  gap: 22px;
  align-items: start;
}

.weekday-two-choice,
.weekday-text-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.weekday-choice-card,
.weekday-text-choice {
  min-height: 190px;
  padding: 20px 14px;
  border: 5px solid #8b4c24;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff8dc, #f0c979);
  color: #2b1609;
  box-shadow: 0 8px 0 rgba(83, 40, 17, .24), inset 0 0 0 3px rgba(255,255,255,.45);
  font-weight: 950;
  transition: transform .18s ease, box-shadow .18s ease;
}

.weekday-choice-card:hover,
.weekday-choice-card:focus-visible,
.weekday-text-choice:hover,
.weekday-text-choice:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 12px 0 rgba(83, 40, 17, .2), 0 0 26px rgba(255, 218, 88, .74), inset 0 0 0 3px rgba(255,255,255,.55);
}

.weekday-choice-card .choice-symbol {
  display: block;
  margin-bottom: 10px;
  font-size: 64px;
  line-height: 1;
}

.weekday-choice-card.symbol-only {
  min-height: 210px;
  display: grid;
  place-items: center;
}

.weekday-choice-card.symbol-only .choice-symbol {
  margin: 0;
  font-size: clamp(76px, 8vw, 128px);
}

.weekday-choice-card strong {
  display: block;
  color: #2b1609;
  font-size: clamp(24px, 3vw, 36px);
}

.weekday-choice-card small {
  display: block;
  margin-top: 8px;
  color: #5d3a22;
  font-size: 15px;
  font-weight: 900;
}

.weekday-text-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 22px;
}

.weekday-text-choice {
  display: grid;
  place-items: center;
  min-height: 118px;
  font-size: clamp(25px, 3.2vw, 42px);
  line-height: 1.15;
}

.weekday-text-choice span {
  display: grid;
  place-items: center;
  min-height: 1.8em;
  line-height: 1.15;
  text-align: center;
}

.weekday-text-choice ruby {
  display: inline-grid;
  justify-items: center;
  line-height: 1.05;
}

.weekday-text-choice rt {
  line-height: 1;
}

.choice-hint-symbol {
  margin-right: 12px;
  padding: 8px 10px;
  border: 3px solid rgba(91, 40, 18, .32);
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  font-size: .9em;
  line-height: 1;
}

.weekday-text-choice.symbol-answer {
  font-size: clamp(58px, 6vw, 96px);
}

.weekday-challenge-image {
  display: block;
  width: min(100%, 520px);
  height: 290px;
  margin: 18px auto 10px;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255,255,255,.56);
}

.weekday-challenge-word {
  margin: 34px auto 20px;
  padding: 18px 24px;
  width: min(88%, 520px);
  border: 5px solid #8b4c24;
  border-radius: 18px;
  background: #fff7dc;
  color: #2b1609;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.5), 0 7px 0 rgba(83,40,17,.2);
  font-size: clamp(34px, 5vw, 68px);
  font-weight: 950;
  text-align: center;
}

.weekday-result {
  margin: 18px 0 12px;
  padding: 14px 16px;
  border: 4px solid #4f8a2b;
  border-radius: 16px;
  background: #eaffdc;
  color: #25520f;
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 950;
  text-align: center;
}

.weekday-result.is-wrong {
  border-color: #b15b26;
  background: #fff0df;
  color: #7a2f10;
}

.weekday-result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.weekday-result-actions .primary,
.weekday-result-actions .secondary {
  justify-content: center;
  min-height: 58px;
  font-size: 18px;
}

.correct-choice {
  outline: 7px solid rgba(87, 173, 47, .78);
  box-shadow: 0 0 28px rgba(111, 212, 72, .72), 0 8px 0 rgba(83, 40, 17, .24) !important;
}

.picked-choice {
  outline: 7px solid rgba(240, 163, 46, .76);
  box-shadow: 0 0 22px rgba(240, 163, 46, .56), 0 8px 0 rgba(83, 40, 17, .18) !important;
}

.weekday-quiz-count {
  margin: 12px 0 0;
  color: #6d3a19;
  font-size: 19px;
  font-weight: 950;
}

.weekday-scene-card {
  position: relative;
  overflow: hidden;
  border: 5px solid #9a5a32;
  border-radius: 26px;
  background: #fff8e8;
  box-shadow: 0 6px 0 rgba(109, 56, 29, .16);
  text-align: center;
}

.weekday-story-moon .weekday-scene-card { background: linear-gradient(180deg, #eef2ff 0%, #fff8e8 54%); }
.weekday-story-fire .weekday-scene-card { background: linear-gradient(180deg, #fff0dc 0%, #fff8e8 56%); }
.weekday-story-water .weekday-scene-card { background: linear-gradient(180deg, #e7f7ff 0%, #fff8e8 56%); }
.weekday-story-tree .weekday-scene-card { background: linear-gradient(180deg, #eef8df 0%, #fff8e8 56%); }
.weekday-story-gold .weekday-scene-card { background: linear-gradient(180deg, #fff0ad 0%, #fff8e8 58%); }
.weekday-story-soil .weekday-scene-card { background: linear-gradient(180deg, #f4ead8 0%, #fff8e8 56%); }
.weekday-story-sun .weekday-scene-card { background: linear-gradient(180deg, #fff7c4 0%, #fff8e8 56%); }

.scene-kicker,
.answer-prompt {
  margin: 0;
  color: #71351b;
  font-weight: 950;
}

.scene-kicker {
  padding: 12px 10px;
  background: #ffd16a;
  font-size: 20px;
}

.weekday-story-symbol {
  display: none;
  position: absolute;
  z-index: 2;
  top: 52px;
  right: 16px;
  min-width: 78px;
  padding: 8px 10px;
  border: 3px solid rgba(113, 53, 27, .22);
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 4px 0 rgba(109, 56, 29, .14);
  font-size: 42px;
  line-height: 1;
}

.scene-fire-eyes .weekday-story-symbol {
  animation: fireEyes 1s infinite alternate ease-in-out;
}

.scene-treasure .weekday-story-symbol {
  animation: treasureGlow 1.2s infinite alternate ease-in-out;
}

.weekday-scene-image {
  display: block;
  width: 100%;
  height: min(58vh, 520px);
  min-height: 390px;
  object-fit: contain;
  object-position: center;
  background: rgba(255, 255, 255, .48);
}

.weekday-activity {
  margin: 0;
  padding: 12px 10px 2px;
  color: #4f270f;
  font-size: 25px;
  font-weight: 950;
}

.weekday-mood-label {
  display: inline-block;
  margin: 8px 0 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: #ffe39c;
  color: #67350f;
  font-size: 16px;
  font-weight: 950;
}

.weekday-scene-text {
  margin: 0;
  padding: 4px 14px 14px;
  color: #684630;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.65;
}

.weekday-answer-panel {
  min-width: 0;
}

.answer-prompt {
  margin-bottom: 14px;
  font-size: 29px;
  text-align: center;
}

.weekday-mode-note {
  margin: -6px 0 14px;
  color: #725136;
  font-size: 16px;
  font-weight: 850;
  text-align: center;
}

.weekday-lesson .weekday-road {
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  gap: 11px;
  margin: 0;
}

.weekday-lesson .day-tile {
  min-height: 112px;
  padding: 10px 5px;
  border-color: #d19b64;
  background: #fffdf6;
  box-shadow: 0 4px 0 rgba(119, 68, 35, .12);
}

.day-tile.today {
  animation: todayPulse 1.8s infinite ease-in-out;
}

.day-tile.weekday-moon { background: #f4f3ff; }
.day-tile.weekday-fire { background: #fff1e4; }
.day-tile.weekday-water { background: #eaf8ff; }
.day-tile.weekday-tree { background: #eff9e7; }
.day-tile.weekday-gold { background: #fff4b9; }
.day-tile.weekday-soil { background: #f7eddd; }
.day-tile.weekday-sun { background: #fff7cf; }

.weekday-lesson .day-tile:hover,
.weekday-lesson .day-tile:focus-visible {
  border-color: #f0a22e;
  background: #fff0ad;
}

.weekday-lesson .day-symbol {
  font-size: 38px;
}

.weekday-lesson .day-label {
  color: #512713;
  font-size: 17px;
}

.day-mood {
  display: block;
  margin-top: 4px;
  color: #7b593f;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.weekday-lesson .mascot {
  bottom: -16px;
  transform: translateX(-50%) scale(.54);
  pointer-events: none;
}

.weekday-challenge-card,
.weekday-print-controls {
  overflow: hidden;
  border: 5px solid #9a5a32;
  border-radius: 26px;
  background: #fff8e8;
  box-shadow: 0 6px 0 rgba(109, 56, 29, .16);
  text-align: center;
}

.weekday-challenge-big {
  margin: 22px 0 8px;
  color: #71351b;
  font-size: 34px;
  font-weight: 950;
}

.weekday-mini-story {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 8px;
  padding: 0 18px 12px;
}

.weekday-mini-story img {
  width: min(100%, 360px);
  height: 230px;
  object-fit: contain;
  border-radius: 8px;
  background: white;
}

.weekday-mini-story strong {
  color: #4f270f;
  font-size: 28px;
}

.weekday-mini-story span {
  font-size: 48px;
}

.package-placeholder {
  display: grid;
  place-items: center;
  min-height: 420px;
}

.package-placeholder .weekday-challenge-card {
  width: min(720px, 100%);
}

.package-placeholder-icon {
  margin: 24px 0 6px;
  font-size: 86px;
  line-height: 1;
}

.mode-package-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 230px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.mode-package-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
}

.mode-package-head strong,
.mode-package-head span {
  display: block;
}

.mode-package-head strong {
  color: #1f2d3d;
  font-size: 24px;
  font-weight: 950;
}

.mode-package-head span:last-child {
  margin-top: 3px;
  color: #6d7c8d;
  font-size: 16px;
  font-weight: 800;
}

.mode-package-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.mode-package-steps button {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 104px;
  padding: 10px 6px;
  border: 3px solid #d7ae63;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff8dc, #f3d693);
  color: #563014;
  font-weight: 950;
  box-shadow: 0 4px 0 rgba(104, 63, 24, .18);
}

.mode-package-steps b {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #d98a24;
  color: #fff;
  font-size: 23px;
}

.mode-package-steps span {
  font-size: 14px;
  line-height: 1.2;
}

.mode-package-steps button:hover,
.mode-package-steps button:focus-visible {
  border-color: #3a7bd5;
  background: #edf5ff;
  transform: translateY(-2px);
}

.weekday-print-controls {
  padding: 22px;
  text-align: left;
}

.weekday-print-controls h3 {
  margin: 0 0 8px;
  color: #71351b;
  font-size: 25px;
}

.weekday-print-controls p {
  color: #684630;
  font-weight: 800;
  line-height: 1.6;
}

.weekday-print-controls .primary,
.weekday-print-controls .secondary {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
}

.print-control-field {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  color: #5b351b;
  font-size: 16px;
  font-weight: 900;
}

.print-control-field select {
  width: 100%;
  padding: 10px 12px;
  border: 3px solid #9d633c;
  border-radius: 8px;
  background: #fff8de;
  color: #4b260f;
  font-weight: 900;
}

.print-control-check {
  margin-top: 12px;
  color: #5b351b;
  font-weight: 900;
}

/* Today, tomorrow, yesterday */
.relative-day-package .weekday-print-layout {
  grid-template-columns: minmax(260px, 320px) minmax(720px, 1fr);
  padding-bottom: 120px;
}

.relative-story-stage,
.relative-match-stage,
.relative-challenge-stage {
  display: grid;
  grid-template-columns: minmax(520px, 1.2fr) minmax(360px, .8fr);
  gap: 22px;
  align-items: start;
}

.relative-road-wrap {
  position: relative;
  min-height: 430px;
  padding: 98px 18px 108px;
  border: 6px solid #79441f;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 24%, rgba(255,255,255,.58) 0 18px, transparent 19px),
    linear-gradient(180deg, #dff5ff 0%, #fff0bd 68%, #d7b878 100%);
  box-shadow: 0 8px 0 rgba(92, 54, 25, .18), inset 0 0 0 4px rgba(255,255,255,.38);
}

.relative-road-wrap.night-to-morning {
  background:
    radial-gradient(circle at 72% 18%, #ffe66f 0 34px, transparent 35px),
    linear-gradient(180deg, #9fe3ff 0%, #fff0bd 68%, #d7b878 100%);
}

.relative-road-wrap.morning-to-night {
  background:
    radial-gradient(circle at 74% 18%, #fff6a6 0 24px, transparent 25px),
    linear-gradient(180deg, #14204f 0%, #415a9e 52%, #6a5338 100%);
}

.relative-road-wrap.today-to-tomorrow {
  animation: relative-today-tomorrow 2.4s ease-in-out infinite alternate;
}

.relative-road-wrap.time-rewind {
  animation: relative-rewind-bg 2.4s linear infinite;
}

.relative-sky {
  position: absolute;
  inset: 0 0 auto;
  min-height: 92px;
  display: grid;
  place-items: center;
  color: #fff7cf;
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 950;
  text-shadow: 0 3px 0 rgba(68, 35, 17, .32);
}

.relative-sky.morning {
  background: linear-gradient(90deg, #15224e, #6ca8ff 52%, #ffe483);
}

.relative-sky.rewind {
  background: repeating-linear-gradient(-45deg, #2c315e 0 18px, #49518d 18px 36px);
}

.relative-road-wrap .weekday-road.relative-road {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 38px 0 18px;
  border: 0;
  background: transparent;
  box-shadow: none;
  max-width: 720px;
  margin-inline: auto;
}

.relative-road-wrap .weekday-road.relative-road::before {
  display: none;
}

.relative-road-wrap .weekday-road.relative-road::after {
  display: none;
}

.relative-day-tile {
  position: relative;
  background: linear-gradient(180deg, #fffdf4, #ffe6a6) !important;
}

.relative-caption {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 12px;
  border: 3px solid #8b4c24;
  border-radius: 999px;
  background: #fff7cf;
  color: #5b351b;
  font-size: 18px;
  font-weight: 950;
  white-space: nowrap;
}

.relative-road-wrap .day-tile.today-base {
  border-color: #2274d6;
  box-shadow: 0 0 0 6px rgba(58, 123, 213, .22), 0 5px 0 rgba(119, 68, 35, .16);
}

.relative-road-wrap .day-tile.target-day {
  border-color: #f0a22e;
}

.relative-arrows {
  position: absolute;
  bottom: 42px;
  left: 50%;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 184px;
  transform: translateX(-50%);
  pointer-events: none;
}

.relative-arrow {
  display: inline-grid;
  place-items: center;
  z-index: 6;
  min-width: 142px;
  padding: 10px 16px;
  border: 5px solid #8b4c24;
  border-radius: 999px;
  background: #fff35e;
  color: #673411;
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 950;
  white-space: nowrap;
  box-shadow: 0 0 0 7px rgba(255, 235, 59, .22), 0 5px 0 rgba(91, 53, 27, .2);
  opacity: .6;
  pointer-events: none;
}

.relative-arrow.active {
  opacity: 1;
  animation: relative-arrow-pulse .75s ease-in-out infinite alternate;
}

.relative-guide {
  --relative-step: 130px;
  --from-offset: 0;
  --to-offset: 0;
  --from-scale: 1;
  --to-scale: 1;
  position: absolute;
  z-index: 5;
  bottom: 34px;
  left: calc(50% - 43px);
  width: 86px;
  height: 120px;
  pointer-events: none;
  transform: translateX(calc(var(--to-offset) * var(--relative-step))) scaleX(var(--to-scale));
}

.relative-guide .character-sprite {
  width: 86px;
  height: 120px;
}

.relative-guide.guide-moving {
  animation: relative-guide-move 1.35s cubic-bezier(.22, .72, .18, 1) both;
}

.symbol-only-road .day-tile {
  min-height: 142px;
}

.symbol-only-road .day-symbol {
  font-size: clamp(42px, 6vw, 72px);
}

.relative-print-sheet .print-relative-note {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.6;
}

.relative-day-package .weekday-text-choice {
  font-size: clamp(24px, 2.7vw, 38px);
}

.relative-day-package .weekday-text-options {
  gap: 14px;
}

.relative-day-package .weekday-text-choice span,
.relative-day-package .weekday-text-choice ruby {
  white-space: nowrap;
}

.relative-print-task-list {
  display: grid;
  gap: 14px;
}

.relative-print-task {
  position: relative;
  padding: 14px;
  border: 3px solid #4b260f;
  border-radius: 8px;
}

.relative-print-choice-list {
  display: grid;
  gap: 12px;
}

.relative-print-choice-task {
  position: relative;
  padding: 12px 12px 12px 54px;
  border: 3px solid #4b260f;
  border-radius: 8px;
  background: #fffef8;
}

.relative-print-choice-task .print-number {
  left: 12px;
  top: 12px;
}

.relative-print-choice-task p {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 850;
}

.relative-print-choice-task .print-choice-list {
  justify-content: flex-start;
}

.relative-print-write-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: end;
  margin-top: 8px;
  font-size: 20px;
  font-weight: 850;
}

.relative-print-write-line b {
  display: block;
  min-height: 34px;
  border-bottom: 3px solid #4b260f;
}

.relative-print-write-line em {
  font-style: normal;
}

.relative-print-mini-road {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0 10px;
}

.relative-print-mini-box {
  min-height: 74px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 6px;
  border: 2px dashed #6b3a1d;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.relative-print-mini-box.today {
  border: 4px solid #6b3a1d;
  background: #fff1b6;
}

.relative-print-mini-box.target {
  border-style: solid;
  background: #eef7ff;
}

.relative-print-mini-box strong {
  font-size: 15px;
}

.relative-print-mini-box b {
  font-size: 18px;
}

.relative-print-mini-box .hidden-answer {
  width: 86%;
  min-height: 24px;
  border-bottom: 2px solid #9d633c;
}

.print-weekday-icon {
  display: inline-block;
  margin-right: 6px;
  font-size: 1.15em;
  line-height: 1;
  vertical-align: middle;
}

.relative-print-today-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: -4px 0 8px;
  border: 2px solid #d8b175;
  border-radius: 50%;
  background: #fff8de;
  font-size: 25px;
}

.relative-paper-road {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.relative-paper-box {
  min-height: 88px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 3px solid #4b260f;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.relative-paper-box.today {
  border-width: 5px;
  background: #fff1b6;
}

.relative-paper-box.blank {
  border-style: dashed;
}

.relative-paper-box strong,
.relative-paper-box b {
  font-size: 20px;
}

.relative-paper-box span {
  font-size: 32px;
  font-weight: 950;
}

.relative-print-task > .print-choice-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: calc((100% - 20px) / 3 * 2 + 10px);
}

.relative-print-task > .print-choice-list .print-word-card {
  min-height: 88px;
  padding: 8px;
  border: 3px solid #4b260f;
  font-size: 20px;
}

.relative-print-task > .print-choice-list .print-word-card .print-weekday-icon {
  font-size: 1.15em;
}

@keyframes relative-today-tomorrow {
  from {
    background:
      radial-gradient(circle at 28% 18%, #ffe66f 0 28px, transparent 29px),
      linear-gradient(180deg, #b9ecff 0%, #fff0bd 68%, #d7b878 100%);
  }
  to {
    background:
      radial-gradient(circle at 72% 18%, #ffe66f 0 34px, transparent 35px),
      linear-gradient(180deg, #8edcff 0%, #fff7ce 68%, #d7b878 100%);
  }
}

@keyframes relative-rewind-bg {
  from { filter: hue-rotate(0deg); }
  to { filter: hue-rotate(-32deg); }
}

@keyframes relative-guide-move {
  from {
    transform: translateX(calc(var(--from-offset) * var(--relative-step))) scaleX(var(--from-scale));
  }
  to {
    transform: translateX(calc(var(--to-offset) * var(--relative-step))) scaleX(var(--to-scale));
  }
}

@keyframes relative-arrow-pulse {
  from { transform: scale(.96); }
  to { transform: scale(1.04); }
}

@media (max-width: 1050px) {
  .relative-story-stage,
  .relative-match-stage,
  .relative-challenge-stage,
  .relative-day-package .weekday-print-layout {
    grid-template-columns: 1fr;
  }

  .relative-day-package .weekday-print-layout {
    padding-bottom: 120px;
  }
}

@media (max-width: 620px) {
  .relative-road-wrap {
    min-height: 390px;
    padding: 90px 10px 100px;
  }

  .relative-arrows {
    bottom: 36px;
    gap: 110px;
  }

  .relative-arrow {
    min-width: 108px;
    padding: 8px 10px;
    font-size: 20px;
  }

  .relative-guide {
    bottom: 24px;
    --relative-step: 78px;
  }

  .relative-paper-road {
    grid-template-columns: 1fr;
  }

}

/* Adventure map treatment for weekday learning */
.question-row .question {
  border: 5px solid #7b4a24;
  border-radius: 22px;
  background:
    radial-gradient(circle at 14% 22%, rgba(126, 78, 31, .14), transparent 18%),
    radial-gradient(circle at 86% 72%, rgba(126, 78, 31, .12), transparent 16%),
    linear-gradient(135deg, #fff0bd, #f1d28b 50%, #ffe6a0);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.44), 0 7px 0 rgba(95, 55, 24, .18);
  color: #542b10;
  font-family: "UD Digi Kyokasho N-R", "Yu Gothic UI", "Meiryo", sans-serif;
  font-weight: 950;
  text-shadow: 0 2px 0 rgba(255,255,255,.74);
}

.weekday-package .weekday-road,
.weekday-story-side .weekday-road,
.weekday-answer-panel .weekday-road,
.stage > .weekday-road {
  position: relative;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin: 42px 0 24px;
  padding: 40px 12px 18px;
  border: 5px solid #8e6338;
  border-radius: 26px;
  background:
    radial-gradient(circle at 12% 24%, rgba(84, 131, 55, .25) 0 8px, transparent 9px),
    radial-gradient(circle at 76% 72%, rgba(133, 91, 45, .22) 0 7px, transparent 8px),
    linear-gradient(135deg, #d5bd82, #b8d48c 46%, #ead7a2);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.35), 0 8px 0 rgba(92, 63, 34, .2);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.weekday-package .weekday-road::before,
.weekday-story-side .weekday-road::before,
.weekday-answer-panel .weekday-road::before,
.stage > .weekday-road::before {
  content: "";
  position: absolute;
  left: 46px;
  right: 46px;
  top: 50%;
  border-top: 8px dotted rgba(87, 61, 36, .3);
  transform: translateY(-50%);
  pointer-events: none;
}

.weekday-package .weekday-road::after,
.weekday-story-side .weekday-road::after,
.weekday-answer-panel .weekday-road::after,
.stage > .weekday-road::after {
  content: "▶ ▶ ▶ ▶ ▶ ▶";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  display: flex;
  justify-content: space-between;
  color: rgba(87, 61, 36, .4);
  font-size: 16px;
  font-weight: 950;
  transform: translateY(-50%);
  pointer-events: none;
}

.weekday-package .day-tile,
.weekday-story-side .day-tile,
.weekday-answer-panel .day-tile,
.stage > .weekday-road .day-tile {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 116px;
  padding: 38px 4px 8px;
  border: 0;
  border-radius: 20px 20px 13px 13px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.5), transparent 42%),
    #d2aa6a;
  box-shadow:
    inset 0 -7px 0 rgba(96, 58, 25, .25),
    inset 0 0 0 3px rgba(255,255,255,.38),
    0 7px 0 rgba(82, 53, 25, .28);
  transition: transform .26s ease, filter .26s ease, box-shadow .26s ease;
}

.weekday-package .day-tile.active,
.weekday-story-side .day-tile.active,
.weekday-answer-panel .day-tile.active,
.stage > .weekday-road .day-tile.active {
  transform: translateY(-6px);
  filter: saturate(1.15);
  box-shadow:
    0 0 0 8px rgba(255, 239, 125, .72),
    0 0 28px rgba(255, 219, 68, .78),
    inset 0 -7px 0 rgba(96, 58, 25, .25),
    inset 0 0 0 3px rgba(255,255,255,.5),
    0 8px 0 rgba(82, 53, 25, .28);
  animation: activeAura 1.8s infinite ease-in-out;
}

.weekday-package .day-symbol,
.weekday-story-side .day-symbol,
.weekday-answer-panel .day-symbol,
.stage > .weekday-road .day-symbol,
.weekday-lesson .day-symbol {
  position: absolute;
  left: 50%;
  top: -30px;
  display: grid;
  place-items: center;
  width: 68px;
  min-height: 68px;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 7px 0 rgba(92, 63, 34, .16), 0 8px 22px rgba(77, 49, 26, .24);
  font-size: 38px;
  line-height: 1;
  transform: translateX(-50%);
  pointer-events: none;
}

.weekday-package .day-label,
.weekday-story-side .day-label,
.weekday-answer-panel .day-label {
  margin-top: 6px;
  color: #4d280f;
  font-family: "UD Digi Kyokasho N-R", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 13px;
  font-weight: 950;
}

.weekday-package .mascot,
.weekday-story-side .mascot,
.weekday-answer-panel .mascot,
.weekday-lesson .mascot {
  top: -82px;
  bottom: auto;
  z-index: 3;
  transform: translateX(-50%) scale(.58);
  filter: drop-shadow(0 8px 7px rgba(63, 37, 16, .26));
  transition: transform .28s ease, top .28s ease;
  pointer-events: none;
}

@keyframes activeAura {
  0%, 100% { box-shadow: 0 0 0 6px rgba(255, 239, 125, .55), 0 0 18px rgba(255, 219, 68, .55), inset 0 -7px 0 rgba(96, 58, 25, .25), inset 0 0 0 3px rgba(255,255,255,.48), 0 8px 0 rgba(82, 53, 25, .28); }
  50% { box-shadow: 0 0 0 11px rgba(255, 239, 125, .78), 0 0 34px rgba(255, 219, 68, .88), inset 0 -7px 0 rgba(96, 58, 25, .25), inset 0 0 0 3px rgba(255,255,255,.55), 0 8px 0 rgba(82, 53, 25, .28); }
}

.weekday-print-sheet {
  box-sizing: border-box;
  width: min(100%, 210mm);
  min-height: 297mm;
  padding: 12mm;
  border: 1px solid #ddd;
  background: white;
  color: #333;
  box-shadow: 0 4px 18px rgba(80, 70, 50, .18);
}

.weekday-print-sheet header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 3px solid #efb64e;
}

.weekday-print-sheet h1 {
  flex: 1;
  min-width: 0;
  max-width: none;
  margin: 0;
  color: #c06724;
  font-size: 24px;
  line-height: 1.15;
}

.calendar-print-sheet h1 {
  font-size: 22px;
}

.weekday-print-sheet h2 {
  margin: 12px 0 8px;
  color: #674599;
  font-size: 17px;
}

.print-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.print-name span {
  display: inline-block;
  width: 180px;
  height: 28px;
  border-bottom: 2px solid #444;
}

.print-match-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
}

.print-task-list {
  display: grid;
  gap: 6px;
}

.print-task-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 7px;
  align-items: stretch;
  break-inside: avoid;
}

.print-compact-list {
  grid-template-columns: 1fr;
}

.print-compact-list .print-task-row {
  grid-template-columns: 92px minmax(0, 1fr);
}

.print-picture-card,
.print-word-card,
.print-weekday-cards div {
  position: relative;
  min-width: 0;
  padding: 6px;
  border: 2px solid #d6b47a;
  border-radius: 8px;
  background: #fffdf7;
  text-align: center;
}

.print-picture-card {
  min-height: 96px;
}

.print-small-picture {
  min-height: 82px;
}

.print-picture-card img {
  width: 100%;
  height: 58px;
  object-fit: contain;
}

.print-small-picture img {
  height: 44px;
}

.print-picture-card small,
.print-word-card small,
.print-weekday-cards small {
  display: block;
  color: #6e523b;
  font-size: 10px;
  font-weight: 800;
}

.print-word-card {
  display: grid;
  place-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 950;
}

.print-choice-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 5px;
  min-width: 0;
}

.print-symbol-choice-list {
  align-items: center;
}

.print-choice-pill {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 4px;
  border: 2px solid #9ac8e8;
  border-radius: 8px;
  background: #f3fbff;
  color: #23435c;
  font-size: 22px;
  font-weight: 950;
  text-align: center;
  min-width: 0;
}

.print-choice-pill b {
  display: block;
  font-size: 21px;
  line-height: 1;
}

.print-number {
  position: absolute;
  left: 5px;
  top: 5px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #2d7ec5;
  color: white;
  font-size: 14px;
  font-weight: 950;
}

.print-calendar-task-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.print-calendar-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 7px;
  align-items: stretch;
  min-width: 0;
  padding: 6px;
  border: 2px solid #d6b47a;
  border-radius: 8px;
  background: #fffdf7;
  break-inside: avoid;
}

.print-calendar-date-list {
  grid-template-columns: 1fr;
}

.print-calendar-question {
  position: relative;
  min-width: 0;
}

.print-calendar-question .panel-title {
  margin: 0 0 6px 30px;
  font-size: 13px;
}

.print-calendar-mini .calendar {
  gap: 1px;
}

.print-calendar-mini .calendar-head,
.print-calendar-mini .calendar-day {
  min-height: 18px;
  padding: 0;
  border-width: 1px;
  border-radius: 4px;
  font-size: 9px;
  line-height: 1;
}

.print-calendar-mini .calendar-head rt,
.print-calendar-mini .calendar-day rt,
.print-choice-pill rt,
.print-word-card rt {
  font-size: .54em;
}

.print-calendar-mini .calendar-badge {
  right: 1px;
  bottom: 1px;
  min-width: 10px;
  height: 10px;
  font-size: 7px;
}

.print-calendar-mini .calendar-month-title.lesson-focus,
.print-calendar-mini .calendar-head.lesson-focus,
.print-calendar-mini .calendar-day.lesson-date-focus,
.print-calendar-mini .calendar-day.lesson-today-focus,
.print-calendar-mini .calendar-badge.lesson-focus,
.calendar-print-sheet .calendar-month-title.lesson-focus {
  box-shadow:
    0 0 0 2px #ffffff,
    0 0 0 4px #2db7e5,
    0 0 14px rgba(45, 183, 229, .72);
}

.print-calendar-icons {
  grid-template-columns: 1fr;
}

.calendar-print-sheet .print-word-card {
  min-height: 38px;
  font-size: 13px;
}

.print-weekday-cards {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
}

.print-weekday-cards strong {
  display: block;
  font-size: 31px;
}

.print-weekday-cards span {
  display: block;
  color: #4f270f;
  font-size: 15px;
  font-weight: 950;
}

@keyframes todayPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(217, 155, 32, .14), 0 4px 0 rgba(119, 68, 35, .12); }
  50% { box-shadow: 0 0 0 8px rgba(217, 155, 32, .24), 0 4px 0 rgba(119, 68, 35, .12); }
}

@keyframes fireEyes {
  from { transform: scale(1) rotate(-2deg); filter: drop-shadow(0 0 2px #ff7a00); }
  to { transform: scale(1.08) rotate(2deg); filter: drop-shadow(0 0 10px #ff4d00); }
}

@keyframes treasureGlow {
  from { transform: translateY(0); filter: drop-shadow(0 0 2px #d99b20); }
  to { transform: translateY(-3px); filter: drop-shadow(0 0 12px #ffcc33); }
}

@media (max-width: 1050px) {
  .weekday-lesson,
  .weekday-match-two,
  .weekday-challenge-text,
  .weekday-story-view,
  .weekday-challenge,
  .weekday-print-layout,
  .clock-lesson,
  .clock-summary,
  .calendar-learning-layout,
  .calendar-summary-layout {
    grid-template-columns: 1fr;
  }

  .weekday-scene-card {
    max-width: 760px;
    margin: 0 auto;
  }
}

@media (max-width: 620px) {
  .weekday-step-road {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }

  .weekday-scene-image {
    height: 320px;
    min-height: 320px;
  }

  .weekday-activity {
    font-size: 21px;
  }

  .weekday-scene-text {
    font-size: 14px;
  }

  .answer-prompt {
    font-size: 23px;
  }

  .weekday-lesson .weekday-road {
    grid-template-columns: repeat(2, minmax(112px, 1fr));
  }

  .print-match-grid,
  .print-weekday-cards,
  .print-compact-list,
  .print-calendar-task-list,
  .weekday-two-choice,
  .weekday-text-options,
  .clock-mini-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html,
  body {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: #fff;
  }

  body * {
    visibility: hidden !important;
  }

  .weekday-print-sheet,
  .weekday-print-sheet * {
    visibility: visible !important;
  }

  .app-shell,
  .weekday-mode,
  .weekday-activity,
  .weekday-package,
  .weekday-print-layout {
    display: block !important;
    width: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .weekday-print-controls {
    display: none !important;
  }

  .weekday-print-sheet {
    position: relative;
    inset: auto;
    box-sizing: border-box;
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    padding: 12mm;
    border: 0;
    box-shadow: none;
    page-break-after: always;
    break-after: page;
  }

  .weekday-print-sheet:last-of-type {
    page-break-after: auto;
    break-after: auto;
  }
}

/* Home adventure redesign */
body[data-view="home"] .classroom-bg {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(35, 20, 8, .2)),
    url("./assets/home-adventure-bg.png") center / cover no-repeat;
}

body[data-view="home"] .classroom-bg > * ,
body[data-view="home"] .classroom-bg::after {
  display: none;
}

body[data-view="home"] .topbar {
  background: transparent;
  border: 0;
  filter: drop-shadow(0 8px 0 rgba(79, 37, 15, .24));
}

body[data-view="home"] .app-shell {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

body[data-view="home"] main {
  height: calc(100vh - 74px);
  padding: 74px clamp(14px, 2vw, 28px) 76px;
  overflow: hidden;
}

body[data-view="home"] .topbar {
  top: 10px;
  left: 50%;
  right: auto;
  width: min(620px, 88vw);
  transform: translateX(-50%);
}

body[data-view="home"] .brand {
  width: min(620px, 88vw);
  justify-content: center;
  margin: 0 auto;
  padding: 7px 22px 9px;
  border: 4px solid rgba(139, 76, 36, .9);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 251, 232, .98), rgba(255, 231, 170, .96));
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.5), 0 5px 0 rgba(83, 40, 17, .2);
}

body[data-view="home"] .brand-title {
  color: #5b2812;
  font-family: "UD Digi Kyokasho N-R", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 950;
  line-height: 1.08;
  letter-spacing: .02em;
  -webkit-text-stroke: 0;
  text-shadow: none;
}

body[data-view="home"] .brand-title small {
  display: block;
  margin-top: 2px;
  font-size: .56em;
  letter-spacing: .01em;
}

body[data-view="home"] .hero {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-columns: 1fr;
  max-width: 1500px;
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: 0;
}

body[data-view="home"] .hero::after {
  content: "";
  position: absolute;
  right: 4%;
  bottom: 5%;
  z-index: 1;
  color: #ffe39a;
  font-size: clamp(28px, 4vw, 56px);
  letter-spacing: .2em;
  filter: drop-shadow(0 7px 4px rgba(63, 31, 13, .34));
  pointer-events: none;
}

body[data-view="home"] .hero-copy {
  position: relative;
  z-index: 3;
  width: min(760px, 94vw);
  min-height: 0;
  margin: 0 auto;
  padding: 6px 18px 8px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 250, 232, .88);
  box-shadow: 0 4px 0 rgba(83, 40, 17, .12);
  text-align: center;
  overflow: visible;
}

body[data-view="home"] .hero-copy::before {
  content: none;
}

body[data-view="home"] .hero-text h1,
body[data-view="home"] .hero-text .eyebrow,
body[data-view="home"] .hero-copy p:last-child {
  max-width: none;
  color: #4b260f;
  font-family: "UD Digi Kyokasho N-R", "Yu Gothic UI", "Meiryo", sans-serif;
  font-weight: 950;
  -webkit-text-stroke: 0;
  text-shadow: none;
}

body[data-view="home"] .hero-text .eyebrow {
  margin: 0 0 2px;
  color: #9b4f21;
  font-size: clamp(14px, 1.35vw, 18px);
}

body[data-view="home"] .hero-text h1 {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.05;
}

body[data-view="home"] .hero-copy p:last-child {
  margin: 3px 0 0;
  font-size: clamp(14px, 1.3vw, 18px);
  line-height: 1.35;
}

body[data-view="home"] .hero-character-group {
  display: none;
}

body[data-view="home"] .category-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(360px, 610px));
  justify-content: center;
  align-items: stretch;
  align-self: stretch;
  gap: clamp(18px, 3vw, 54px);
  width: min(1360px, 98vw);
  height: auto;
  min-height: 0;
  margin: clamp(6px, 1vh, 12px) auto 0;
}

body[data-view="home"] .category-card {
  position: relative;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  padding: clamp(20px, 2.2vw, 30px) clamp(24px, 2.6vw, 34px) clamp(24px, 2.7vw, 36px);
  overflow: hidden;
  border: 8px solid #7b3f1e;
  border-radius: 28px 34px 34px 24px;
  background:
    linear-gradient(90deg, rgba(84, 42, 19, .28), transparent 8%, transparent 92%, rgba(84, 42, 19, .22)),
    linear-gradient(135deg, #ffe7a6, #f0b668 45%, #cf763b);
  box-shadow:
    18px 20px 0 rgba(74, 35, 14, .34),
    inset 0 0 0 4px rgba(255, 246, 205, .55),
    inset -18px 0 0 rgba(100, 47, 20, .18);
  transform: rotate(-5deg);
  transition: transform .22s ease, filter .22s ease, box-shadow .22s ease;
}

body[data-view="home"] .clock-card {
  transform: rotate(5deg);
  background:
    radial-gradient(circle at 76% 20%, rgba(26, 43, 94, .55) 0 70px, transparent 71px),
    linear-gradient(90deg, rgba(84, 42, 19, .3), transparent 8%, transparent 92%, rgba(84, 42, 19, .24)),
    linear-gradient(135deg, #fff0b8, #37548f 42%, #1b2b58);
}

body[data-view="home"] .category-card::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 3px dashed rgba(122, 63, 30, .38);
  border-radius: 20px;
  pointer-events: none;
}

body[data-view="home"] .category-card::after {
  display: none;
}

body[data-view="home"] .calendar-card::after {
  content: none;
}

body[data-view="home"] .clock-card::after {
  content: none;
}

body[data-view="home"] .category-card:hover,
body[data-view="home"] .category-card:focus-visible {
  transform: translateY(-14px) rotate(0deg) scale(1.02);
  filter: drop-shadow(0 0 28px rgba(255, 229, 107, .85));
  box-shadow:
    18px 26px 0 rgba(74, 35, 14, .28),
    0 0 36px rgba(255, 226, 104, .8),
    inset 0 0 0 4px rgba(255, 246, 205, .65),
    inset -18px 0 0 rgba(100, 47, 20, .16);
}

body[data-view="home"] .category-kicker,
body[data-view="home"] .category-card strong,
body[data-view="home"] .category-card span:last-child,
body[data-view="home"] .card-arrow {
  position: relative;
  z-index: 1;
  color: #fff8dd;
  font-family: "UD Digi Kyokasho N-R", "Yu Gothic UI", "Meiryo", sans-serif;
  font-weight: 950;
  -webkit-text-stroke: 3px #5b2812;
  paint-order: stroke fill;
  text-shadow: 0 5px 0 rgba(59, 25, 9, .25);
}

body[data-view="home"] .category-card strong {
  font-size: clamp(48px, 5.6vw, 82px);
}

body[data-view="home"] .category-illustration {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: auto;
  max-height: min(46vh, 390px);
  overflow: hidden;
  border: 5px solid rgba(91, 40, 18, .42);
  border-radius: 22px;
  background: rgba(255, 248, 220, .92);
  box-shadow: 0 8px 0 rgba(81, 38, 16, .2);
}

body[data-view="home"] .category-illustration img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body[data-view="home"] .category-card span:last-child {
  font-size: clamp(18px, 1.8vw, 26px);
}

body[data-view="home"] .card-arrow {
  align-self: flex-start;
  margin-top: auto;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 244, 196, .92);
  color: #6c3317;
  -webkit-text-stroke: 0 !important;
  text-shadow: none !important;
}

body[data-view="home"] .card-arrow b {
  color: #6c3317;
  background: transparent;
  -webkit-text-stroke: 0;
  text-shadow: none;
}

body[data-view="home"] .category-card .category-kicker {
  color: #ffe4a6;
}

body[data-view="home"] .category-card > span:not(.category-kicker):not(.category-illustration):not(.card-arrow) {
  color: #fff6d7;
  -webkit-text-stroke: 2px #5b2812;
}

body[data-view="home"] .category-kicker,
body[data-view="home"] .category-card strong,
body[data-view="home"] .category-card > span:not(.category-illustration),
body[data-view="home"] .card-arrow,
body[data-view="home"] .card-arrow b {
  color: #2b1609 !important;
  -webkit-text-stroke: 0 !important;
  text-shadow: none !important;
}

.bottom-dock,
.mode-tabs {
  background: rgba(255, 247, 223, .94) !important;
}

.tab,
.tab span {
  color: #2b1609 !important;
  -webkit-text-stroke: 0 !important;
  text-shadow: none !important;
}

.tab.active {
  color: #2b1609 !important;
  background: linear-gradient(180deg, #ffd56a, #f5a83f) !important;
  box-shadow: 0 4px 0 rgba(92, 46, 17, .28);
}

/* Shared adventure background for mode and play screens */
body[data-view="modeMenu"] .classroom-bg,
body[data-view="work"] .classroom-bg,
body[data-view="settings"] .classroom-bg {
  background:
    linear-gradient(180deg, rgba(255, 248, 224, .2), rgba(38, 21, 9, .32)),
    url("./assets/home-adventure-bg.png") center / cover no-repeat;
}

body[data-view="modeMenu"] .classroom-bg > *,
body[data-view="work"] .classroom-bg > *,
body[data-view="settings"] .classroom-bg > *,
body[data-view="modeMenu"] .classroom-bg::after,
body[data-view="work"] .classroom-bg::after,
body[data-view="settings"] .classroom-bg::after {
  display: none;
}

body[data-view="modeMenu"] .topbar,
body[data-view="work"] .topbar,
body[data-view="settings"] .topbar {
  background: rgba(255, 244, 214, .86);
  border-bottom: 4px solid rgba(118, 65, 31, .46);
}

body[data-view="modeMenu"] .mode-menu,
body[data-view="work"] .work-view,
body[data-view="settings"] .settings-view {
  border: 6px solid #7b421f;
  border-radius: 26px;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 224, 132, .32), transparent 20%),
    linear-gradient(180deg, rgba(255, 252, 238, .96), rgba(247, 224, 174, .94));
  box-shadow: 0 12px 0 rgba(83, 40, 17, .28), 0 18px 38px rgba(38, 20, 8, .22);
}

body[data-view="modeMenu"] .menu-heading,
body[data-view="work"] .work-header,
body[data-view="settings"] .settings-panel {
  border-color: #7b421f;
  background:
    linear-gradient(180deg, rgba(255, 241, 187, .96), rgba(224, 154, 76, .94));
  box-shadow: inset 0 0 0 3px rgba(255, 246, 205, .45), 0 7px 0 rgba(83, 40, 17, .22);
}

body[data-view="modeMenu"] .mode-card,
body[data-view="modeMenu"] .mode-package-card {
  border: 5px solid #8b4c24;
  background:
    linear-gradient(90deg, rgba(84, 42, 19, .18), transparent 12%, transparent 90%, rgba(84, 42, 19, .16)),
    linear-gradient(135deg, #fff0b7, #e3a85d);
  box-shadow: 8px 9px 0 rgba(74, 35, 14, .2), inset 0 0 0 3px rgba(255, 246, 205, .5);
}

body[data-view="work"] .stage {
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 229, 132, .25), transparent 18%),
    linear-gradient(180deg, rgba(255, 253, 243, .96), rgba(248, 231, 190, .95));
  border: 5px solid #7b421f;
  box-shadow: 0 8px 0 rgba(83, 40, 17, .24);
}

@media (max-width: 900px) {
  body[data-view="home"] .category-grid {
    grid-template-columns: 1fr;
    width: min(540px, 94vw);
  }

  body[data-view="home"] .category-card,
  body[data-view="home"] .clock-card {
    transform: none;
  }
}

/* Global typography */
html,
body,
button,
input,
select,
textarea {
  font-family: "UD Digi Kyokasho N", "UD Digi Kyokasho NP", "UD Digi Kyokasho NK", "UD Digi Kyokasho N-R", "UD Digi Kyokasho NK-R", "UD デジタル 教科書体 N-R", "HG教科書体", "HGP教科書体", "HGS教科書体", "Yu Kyokasho", "BIZ UDPGothic", "Yu Gothic UI", "Meiryo", sans-serif !important;
}

*,
*::before,
*::after {
  font-family: "UD Digi Kyokasho N", "UD Digi Kyokasho NP", "UD Digi Kyokasho NK", "UD Digi Kyokasho N-R", "UD Digi Kyokasho NK-R", "UD デジタル 教科書体 N-R", "HG教科書体", "HGP教科書体", "HGS教科書体", "Yu Kyokasho", "BIZ UDPGothic", "Yu Gothic UI", "Meiryo", sans-serif !important;
}

