:root {
  --ink: #172126;
  --muted: #637174;
  --line: #d8e0df;
  --paper: #f7f7f2;
  --panel: #ffffff;
  --field: #f1f4f3;
  --accent: #006b54;
  --wrong: #cf3f36;
  --right: #11835d;
  --shadow: 0 18px 46px rgba(23, 33, 38, 0.14);
  --app-height: 100vh;
  --visual-viewport-left: 0px;
  --visual-viewport-top: 0px;
  --visual-viewport-width: 100vw;
  --panel-side-gap: 20px;
  --panel-bottom-gap: max(20px, calc(20px + env(safe-area-inset-bottom)));
}

@supports (height: 100dvh) {
  :root {
    --app-height: 100dvh;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  min-height: var(--app-height);
}

body.practice-active {
  overflow: hidden;
}

body.practice-active .practice-view {
  height: var(--app-height);
  left: var(--visual-viewport-left);
  overflow: hidden;
  position: fixed;
  top: var(--visual-viewport-top);
  width: var(--visual-viewport-width);
}

body > main {
  transition: opacity 110ms ease-out;
}

body.app-booting > main,
body.page-leaving > main {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  body > main {
    transition: none;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.home-view {
  display: grid;
  gap: 26px;
  margin: 0 auto;
  max-width: 1040px;
  min-height: var(--app-height);
  padding: 38px 24px 56px;
}

.home-hero {
  max-width: 760px;
}

.daily-home-link {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(101, 116, 122, 0.28);
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.2;
  padding: 9px 11px;
  position: absolute;
  right: max(24px, calc((100vw - 1040px) / 2 + 24px));
  top: 28px;
  z-index: 600;
}

.daily-home-link:hover {
  border-color: rgba(0, 107, 84, 0.38);
  color: var(--accent);
  text-decoration: none;
}

.daily-home-link:focus-visible {
  outline: 3px solid rgba(0, 107, 84, 0.2);
  outline-offset: 3px;
}

.home-hero h1 {
  font-size: clamp(2.4rem, 7vw, 5rem);
  letter-spacing: 0;
  line-height: 0.95;
  margin: 0 0 18px;
  max-width: 820px;
}

.home-hero p {
  color: var(--muted);
  font-size: 1.15rem;
  margin: 0;
}

.course-section {
  display: grid;
  gap: 14px;
}

.section-heading {
  align-items: end;
  display: flex;
  justify-content: flex-start;
  gap: 20px;
}

.route-picker {
  display: grid;
  gap: 6px;
  min-width: min(360px, 100%);
}

.route-select-shell {
  position: relative;
}

.section-label,
.section-progress,
.route-picker span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.route-progress-wrap {
  display: grid;
  gap: 8px;
}

.progress-meter {
  background: #dfe7e4;
  border-radius: 999px;
  display: block;
  height: 10px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  background: linear-gradient(90deg, #006b54, #39a36f);
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 180ms ease;
  width: 0%;
}

.route-progress {
  max-width: 420px;
}

.route-select-button {
  background:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%) calc(100% - 24px) 50% / 7px 7px no-repeat,
    linear-gradient(135deg, var(--ink) 50%, transparent 50%) calc(100% - 18px) 50% / 7px 7px no-repeat,
    #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(23, 33, 38, 0.08);
  color: var(--ink);
  font: inherit;
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1;
  min-height: 68px;
  outline: 0;
  padding: 4px 54px 6px 14px;
  text-align: left;
  width: 100%;
}

.route-select-button:focus {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px rgba(0, 107, 84, 0.13),
    0 8px 24px rgba(23, 33, 38, 0.08);
}

.route-select-menu {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  display: grid;
  left: 0;
  max-height: min(320px, 58vh);
  overflow: auto;
  padding: 6px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 700;
}

.route-select-menu button {
  background: transparent;
  border-radius: 4px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  min-height: 42px;
  padding: 9px 10px;
  text-align: left;
}

.route-select-menu button:hover,
.route-select-menu button:focus {
  background: var(--field);
  outline: 0;
}

.route-select-menu button[aria-selected="true"] {
  background: #e4f3ed;
  color: #004b3b;
}

.native-route-select {
  display: none;
}

.section-heading h2 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  letter-spacing: 0;
  line-height: 1;
  margin: 4px 0 0;
}

.lesson-card {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(23, 33, 38, 0.08);
  display: grid;
  gap: 18px;
  grid-template-columns: 52px 1fr auto;
  min-height: 104px;
  padding: 22px;
}

.active-lesson {
  border-color: rgba(0, 107, 84, 0.28);
}

.active-lesson:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.lesson-number {
  align-items: center;
  border: 2px solid var(--line);
  border-radius: 999px;
  display: flex;
  font-size: 1.2rem;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.active-lesson .lesson-number {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.lesson-copy {
  display: grid;
  gap: 6px;
}

.lesson-copy strong {
  font-size: 1.35rem;
  line-height: 1.15;
}

.lesson-copy span {
  color: var(--muted);
}

.lesson-progress-summary {
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.lesson-progress {
  margin-top: 2px;
  max-width: 360px;
}

.lesson-action {
  background: var(--ink);
  border-radius: 6px;
  color: #ffffff;
  font-weight: 900;
  padding: 12px 18px;
}

.lesson-action.muted {
  background: var(--field);
  color: var(--muted);
}

.locked-lesson {
  opacity: 0.74;
}

.map-shell {
  height: var(--app-height);
  min-width: 0;
  position: relative;
}

.lesson-back {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  font-weight: 900;
  left: 54px;
  padding: 10px 12px;
  position: absolute;
  top: 12px;
  z-index: 520;
}

.map-review-back {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 10px 12px;
  position: absolute;
  right: 20px;
  top: 12px;
  z-index: 520;
}

.map-review-back:hover {
  transform: translateY(-1px);
}

.map-review-back:focus-visible {
  outline: 3px solid rgba(0, 107, 84, 0.24);
  outline-offset: 3px;
}

.map-feedback {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  left: 50%;
  max-width: min(620px, calc(100vw - 28px));
  padding: 12px 16px;
  position: absolute;
  text-align: center;
  top: 14px;
  transition:
    opacity 120ms ease,
    visibility 120ms ease;
  transform: translateX(-50%);
  width: max-content;
  z-index: 1200;
}

.map-feedback .feedback-status {
  display: block;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.feedback-stack {
  display: grid;
  gap: 6px;
  text-align: left;
}

.feedback-row {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
}

.feedback-stack .feedback-row {
  justify-content: flex-start;
}

.feedback-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  margin-right: 4px;
  text-transform: uppercase;
}

.feedback-place {
  color: #176b8f;
  font-weight: 950;
}

.feedback-side {
  color: var(--muted);
  font-weight: 750;
}

.map-feedback.success {
  border-color: rgba(17, 131, 93, 0.42);
}

.map-feedback.success .feedback-status {
  color: var(--right);
}

.map-feedback.error {
  border-color: rgba(207, 63, 54, 0.42);
}

.map-feedback.error .feedback-status {
  color: var(--wrong);
}

.map-feedback.info {
  border-color: rgba(0, 107, 84, 0.28);
}

.map-feedback.attention {
  animation: feedback-pop 640ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

@keyframes feedback-pop {
  0% {
    box-shadow: 0 0 0 rgba(23, 33, 38, 0);
    transform: translateX(-50%) translateY(-8px) scale(0.96);
  }

  50% {
    box-shadow:
      var(--shadow),
      0 0 0 7px rgba(17, 131, 93, 0.12);
    transform: translateX(-50%) translateY(0) scale(1.045);
  }

  100% {
    box-shadow: var(--shadow);
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

#map {
  height: 100%;
  width: 100%;
  z-index: 1;
}

.quiz-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  bottom: var(--panel-bottom-gap);
  box-shadow: var(--shadow);
  left: max(var(--panel-side-gap), env(safe-area-inset-left));
  max-height: calc(var(--app-height) - var(--panel-bottom-gap) - var(--panel-side-gap));
  max-width: min(500px, calc(100vw - (var(--panel-side-gap) * 2)));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 16px;
  position: absolute;
  -webkit-overflow-scrolling: touch;
  z-index: 520;
}

.brand-mini {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.kicker {
  color: var(--accent);
  display: block;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.answer-note,
.answer-feedback {
  color: var(--muted);
  font-size: 0.9rem;
}

.study-card {
  display: grid;
  gap: 12px;
  max-height: calc(var(--app-height) - var(--panel-bottom-gap) - 54px);
  min-height: 0;
}

.prompt {
  font-size: 1.16rem;
  font-weight: 900;
  line-height: 1.25;
}

.variant-badge {
  background: #e4f3ed;
  border: 2px solid #006b54;
  border-radius: 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  color: #004b3b;
  display: inline;
  padding: 0 6px;
}

.options {
  display: grid;
  gap: 8px;
}

.typed-answer input {
  background: #ffffff;
  border: 2px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  outline: 0;
  padding: 10px 12px;
  width: 100%;
}

.typed-answer input:focus {
  border-color: var(--ink);
}

.typed-answer input.correct {
  background: #dff3e9;
  border-color: var(--right);
}

.typed-answer input.wrong {
  background: #f8d8d3;
  border-color: var(--wrong);
}

.option {
  background: var(--field);
  border-radius: 6px;
  color: var(--ink);
  min-height: 42px;
  padding: 10px 12px;
  text-align: left;
}

.option.selected {
  outline: 3px solid var(--ink);
}

.option.correct {
  background: #dff3e9;
  color: #064c37;
  outline-color: var(--right);
}

.option.wrong {
  background: #f8d8d3;
  color: #83251d;
  outline-color: var(--wrong);
}

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

.quiz-actions button {
  background: var(--ink);
  border-radius: 6px;
  color: #ffffff;
  font-weight: 850;
  min-height: 42px;
  padding: 0 16px;
}

.quiz-actions button:disabled {
  cursor: default;
  opacity: 0.42;
}

.quiz-actions .secondary {
  background: transparent;
  color: var(--muted);
}

.quiz-actions .small {
  font-size: 0.86rem;
  min-height: 34px;
  padding: 0 8px;
}

.answer-feedback strong {
  color: var(--ink);
}

.mastery-actions {
  flex-wrap: wrap;
}

.mastery-list {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: block;
  font-size: 0.86rem;
  height: 148px;
  line-height: 1.35;
  margin: 0;
  max-height: min(148px, 22vh);
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 8px 0 0 28px;
}

.mastery-list li {
  display: list-item;
  line-height: 1.35;
  min-height: 1.35em;
  overflow: hidden;
  padding-right: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mastery-recent {
  align-items: baseline;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: none;
  gap: 8px;
  min-width: 0;
  padding-top: 8px;
}

.mastery-recent span {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.mastery-recent strong {
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mastery-result {
  display: grid;
  gap: 8px;
  min-height: 0;
}

.mastery-result-table {
  border-top: 1px solid var(--line);
  max-height: min(360px, 42vh);
  min-height: 0;
  overflow: auto;
}

.mastery-result table {
  border-collapse: collapse;
  font-size: 0.78rem;
  width: 100%;
}

.mastery-result th,
.mastery-result td {
  border-bottom: 1px solid var(--line);
  padding: 5px 4px;
  text-align: left;
  vertical-align: top;
}

.mastery-result th {
  background: rgba(255, 255, 255, 0.98);
  position: sticky;
  top: 0;
  z-index: 1;
}

.mastery-result p {
  margin: 0;
}

.daily-view {
  align-content: start;
  display: grid;
  gap: 28px;
  margin: 0 auto;
  max-width: 920px;
  min-height: var(--app-height);
  padding: 38px 20px 56px;
}

.daily-header {
  display: grid;
  gap: 24px;
}

.daily-home-link {
  color: var(--ink);
}

.daily-header h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  letter-spacing: 0;
  line-height: 0.94;
  margin: 0;
}

.daily-header p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.5;
  margin: 0;
  max-width: 620px;
}

.daily-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.daily-form,
.daily-result {
  display: grid;
  gap: 18px;
}

.daily-progress {
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: space-between;
  padding-bottom: 16px;
}

.daily-progress strong {
  font-size: 1.1rem;
}

.daily-progress span,
.daily-share-feedback {
  color: var(--muted);
}

.daily-questions {
  display: grid;
  gap: 14px;
}

.daily-question {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 16px;
}

.daily-question legend {
  display: grid;
  gap: 6px;
  padding: 0 4px;
}

.daily-question legend span,
.daily-score span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.daily-question legend strong {
  font-size: 1.08rem;
  line-height: 1.3;
}

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

.daily-options label {
  min-width: 0;
}

.daily-options input {
  position: absolute;
  opacity: 0;
}

.daily-options span {
  align-items: center;
  background: var(--field);
  border: 2px solid transparent;
  border-radius: 6px;
  display: flex;
  font-weight: 800;
  min-height: 48px;
  padding: 10px 12px;
}

.daily-options input:focus-visible + span {
  border-color: var(--ink);
}

.daily-options input:checked + span {
  background: #e4f3ed;
  border-color: var(--accent);
  color: #004b3b;
}

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

.daily-actions button,
.daily-secondary {
  background: var(--ink);
  border-radius: 6px;
  color: #ffffff;
  font-weight: 900;
  min-height: 44px;
  padding: 12px 16px;
}

.daily-actions button:disabled {
  cursor: default;
  opacity: 0.42;
}

.daily-secondary {
  background: var(--field);
  color: var(--ink);
}

.daily-score {
  display: block;
}

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

.daily-grid button {
  align-content: center;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 6px;
  box-shadow:
    inset 0 -4px 0 rgba(0, 0, 0, 0.16),
    0 4px 0 rgba(23, 33, 38, 0.12);
  color: #ffffff;
  cursor: pointer;
  display: grid;
  gap: 4px;
  justify-items: center;
  min-height: 70px;
  padding: 14px 8px;
  position: relative;
  text-align: center;
  transition:
    box-shadow 140ms ease,
    transform 140ms ease,
    filter 140ms ease;
}

.daily-grid button:hover {
  box-shadow:
    inset 0 -4px 0 rgba(0, 0, 0, 0.2),
    0 7px 0 rgba(23, 33, 38, 0.16);
  filter: saturate(1.06);
  transform: translateY(-2px);
}

.daily-grid button:active {
  box-shadow:
    inset 0 -2px 0 rgba(0, 0, 0, 0.2),
    0 2px 0 rgba(23, 33, 38, 0.16);
  transform: translateY(2px);
}

.daily-grid button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.daily-result-status {
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.daily-result-review {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
  padding: 4px 7px;
  text-transform: uppercase;
}

.daily-grid .correct {
  background: var(--right);
}

.daily-grid .wrong {
  background: var(--wrong);
}

.daily-grid .wrong .daily-result-review {
  background: #ffffff;
  color: #9e241e;
}

.daily-share-feedback {
  margin: 0;
  white-space: pre-line;
}

.daily-round-status {
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
}

.daily-round-status span {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.daily-round-status strong {
  color: var(--muted);
  font-size: 0.86rem;
}

.daily-review-eyebrow {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.leaflet-container {
  background:
    linear-gradient(rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.54)),
    linear-gradient(90deg, rgba(23, 33, 38, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(23, 33, 38, 0.055) 1px, transparent 1px),
    #e4eeea;
  background-size:
    auto,
    96px 96px,
    96px 96px,
    auto;
}

.leaflet-route-pane,
.leaflet-stop-pane,
.leaflet-stop-label-pane,
.leaflet-current-stop-pane {
  pointer-events: none;
}

.leaflet-route-pane {
  z-index: 450 !important;
}

.leaflet-stop-pane {
  z-index: 680 !important;
}

.leaflet-stop-click-pane {
  z-index: 700 !important;
}

.leaflet-stop-label-pane {
  z-index: 820 !important;
}

.leaflet-current-stop-pane {
  z-index: 780 !important;
}

.stop-name-label {
  pointer-events: none;
  text-align: center;
}

.stop-name-label span {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(23, 33, 38, 0.24);
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(23, 33, 38, 0.15);
  color: var(--ink);
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.1;
  max-width: 158px;
  overflow: hidden;
  padding: 3px 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-number-label {
  pointer-events: none;
  text-align: center;
}

.order-number-label span {
  align-items: center;
  background: #11835d;
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(23, 33, 38, 0.22);
  color: #ffffff;
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.mastery-user-marker,
.mastery-pending-marker,
.mastery-actual-marker {
  pointer-events: none;
  text-align: center;
}

.mastery-user-marker span,
.mastery-pending-marker span,
.mastery-actual-marker span {
  align-items: center;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(23, 33, 38, 0.24);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 950;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.mastery-user-marker span {
  background: #172126;
  border: 2px solid #ffffff;
  color: #ffffff;
}

.mastery-pending-marker span {
  background: #ffffff;
  border: 3px solid #006b54;
  color: #006b54;
}

.mastery-actual-marker span {
  background: #11835d;
  border: 2px solid #ffffff;
  color: #ffffff;
}

@media (max-width: 700px) {
  :root {
    --panel-side-gap: 12px;
    --panel-bottom-gap: max(12px, calc(12px + env(safe-area-inset-bottom)));
  }

  .home-view {
    gap: 20px;
    padding: 34px 14px;
  }

  .daily-home-link {
    right: 14px;
    top: 16px;
  }

  .lesson-card {
    grid-template-columns: 42px 1fr;
    padding: 16px;
  }

  .section-heading {
    align-items: stretch;
    display: grid;
  }

  .lesson-action {
    grid-column: 2;
    justify-self: start;
    padding: 10px 14px;
  }

  .lesson-number {
    height: 38px;
    width: 38px;
  }

  .lesson-back {
    left: 52px;
    top: 10px;
  }

  .map-review-back {
    right: 12px;
    top: 10px;
  }

  .map-feedback {
    font-size: 0.9rem;
    top: 74px;
  }

  .practice-view:has(.quiz-panel input:focus) .map-feedback {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }

  .quiz-panel {
    max-height: calc(var(--app-height) - var(--panel-bottom-gap) - var(--panel-side-gap));
    max-width: calc(100vw - 24px);
    padding: 14px;
  }

  .study-card {
    max-height: calc(var(--app-height) - var(--panel-bottom-gap) - 40px);
  }

  .mastery-result-table {
    max-height: min(310px, 38vh);
  }

  .mastery-list {
    display: none;
  }

  .mastery-recent:not([hidden]) {
    display: flex;
  }

  .daily-view {
    padding: 28px 14px 40px;
  }

  .daily-card {
    padding: 14px;
  }

  .daily-options {
    grid-template-columns: 1fr;
  }

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

  .daily-question {
    padding: 14px;
  }

}
