:root {
  --ink: #17202a;
  --muted: #61707f;
  --line: #d7dee5;
  --paper: #f8fbfd;
  --panel: #ffffff;
  --road: #33383f;
  --red: #d93832;
  --amber: #f5a524;
  --green: #1f9d63;
  --blue: #1867c9;
  --orange: #f28c28;
  --yellow: #ffd43b;
  --shadow: 8px 8px 0 rgba(23, 32, 42, 0.18);
  --pixel: 4px;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(122, 204, 242, 0.95), rgba(248, 251, 253, 0.96) 46%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: auto, 20px 20px, 20px 20px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0 36px, transparent 36px 64px) 12% 82px / 64px 18px no-repeat,
    linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0 48px, transparent 48px 72px) 72% 126px / 72px 18px no-repeat,
    linear-gradient(90deg, rgba(255, 255, 255, 0.86) 0 30px, transparent 30px 52px) 42% 56px / 52px 16px no-repeat;
}

button {
  font: inherit;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 92px minmax(0, 1fr);
  gap: 12px;
  height: 100vh;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 14px 0;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 0;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: var(--red);
  border: 4px solid #fff;
  box-shadow: 0 0 0 2px var(--red);
  font-weight: 900;
  transform: rotate(-8deg);
}

.badge-mark,
.license-plate,
.mode-btn,
.primary-btn,
.secondary-btn,
.option-btn,
.side-panel,
.play-panel,
.road-stage,
.visual-card,
.feedback,
.study-card,
.review-card,
.status-strip div,
.meters div {
  border-radius: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(1.7rem, 3vw, 2.65rem);
  line-height: 0.98;
  text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(23, 32, 42, 0.14);
  white-space: nowrap;
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  line-height: 1.08;
}

.status-strip,
.meters {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 8px;
}

.status-strip div,
.meters div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 4px 4px 0 rgba(23, 32, 42, 0.12);
}

.status-strip span,
.meters span {
  display: block;
  font-size: 1.25rem;
  font-weight: 900;
}

.status-strip small,
.meters small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
}

.road-stage {
  position: relative;
  height: 92px;
  overflow: hidden;
  border: 4px solid #17202a;
  background:
    linear-gradient(180deg, #74d0ff 0 52%, #60bf6d 52% 100%);
  box-shadow: var(--shadow);
  image-rendering: pixelated;
}

.skyline {
  position: absolute;
  inset: auto 0 44px;
  height: 26px;
  background:
    linear-gradient(90deg, transparent 0 3%, #fff 3% 8%, transparent 8% 12%, #fff 12% 18%, transparent 18% 25%, #fff 25% 34%, transparent 34% 44%, #fff 44% 52%, transparent 52% 61%, #fff 61% 69%, transparent 69% 78%, #fff 78% 85%, transparent 85%);
}

.road {
  position: absolute;
  inset: auto 0 0;
  height: 44px;
  background: var(--road);
  border-top: 4px solid #1c242d;
}

.road::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 45px, rgba(255, 255, 255, 0.22) 45px 48px);
  opacity: 0.55;
}

.lane-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 20px;
  height: 5px;
  background: repeating-linear-gradient(90deg, #fff 0 36px, transparent 36px 70px);
}

.car {
  position: absolute;
  left: 2%;
  bottom: 5px;
  transform: scale(0.86);
  transform-origin: left bottom;
  width: 76px;
  height: 36px;
  transition: left 450ms steps(8);
}

.car-top {
  position: absolute;
  left: 20px;
  top: 0;
  width: 34px;
  height: 18px;
  background: #f4fbff;
  border: 4px solid #101820;
  border-bottom: 0;
}

.car-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  height: 24px;
  background: #ffcf33;
  border: 4px solid #101820;
  box-shadow: inset -10px 0 0 #f28c28;
}

.wheel {
  position: absolute;
  bottom: 0;
  width: 17px;
  height: 17px;
  background: #101820;
  border: 4px solid #e7eef4;
}

.wheel.left {
  left: 11px;
}

.wheel.right {
  right: 11px;
}

.layout {
  display: grid;
  grid-template-columns: 265px minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
  height: 100%;
  margin-top: 0;
  overflow: hidden;
}

.side-panel,
.play-panel {
  border: 4px solid var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.side-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  padding: 16px;
}

.mode-buttons {
  display: grid;
  gap: 10px;
}

.mode-btn,
.primary-btn,
.secondary-btn,
.option-btn {
  min-height: 44px;
  cursor: pointer;
  border: 3px solid var(--ink);
  background: #fff;
  color: var(--ink);
}

.mode-btn {
  display: grid;
  gap: 3px;
  min-height: 48px;
  padding: 8px 10px;
  text-align: left;
}

.mode-btn span {
  font-weight: 900;
}

.mode-btn small {
  color: var(--muted);
  font-weight: 650;
}

.mode-btn.active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.25);
}

.mode-btn.active small {
  color: rgba(255, 255, 255, 0.78);
}

.topic-box {
  min-height: 0;
  margin-top: 18px;
  overflow: hidden;
}

.topic-box h2 {
  font-size: 0.95rem;
}

.topic-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
  overflow: hidden;
}

.topic-row {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.topic-row strong {
  overflow: hidden;
  font-size: 0.78rem;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-bar {
  height: 6px;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: #e4ebf1;
}

.topic-bar span {
  display: block;
  height: 100%;
  background: var(--green);
}

.play-panel {
  min-height: 0;
  overflow: hidden;
  padding: 28px;
}

.intro-view,
.result-view {
  display: grid;
  min-height: 0;
  height: 100%;
  gap: 18px;
}

.intro-view {
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.8fr);
  gap: 28px;
  align-items: center;
}

.intro-copy {
  display: grid;
  gap: 18px;
}

.result-view {
  align-content: center;
}

.intro-view p,
.result-view p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.license-plate {
  display: inline-grid;
  place-items: center;
  width: max-content;
  min-width: 164px;
  padding: 10px 18px;
  border: 4px solid #101820;
  background: #f6c945;
  color: #101820;
  font-size: 1.45rem;
  font-weight: 950;
  letter-spacing: 0;
  box-shadow: 6px 6px 0 rgba(23, 32, 42, 0.16);
}

.intro-actions,
.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quiz-actions {
  align-items: center;
  min-height: 48px;
}

.quiz-actions .secondary-btn,
.quiz-actions .primary-btn {
  min-height: 42px;
}

.intro-gameboard {
  display: grid;
  gap: 16px;
}

.mini-map {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 4px solid var(--ink);
  background:
    linear-gradient(180deg, #8bddff 0 36%, #77cf72 36% 100%);
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.34), 6px 6px 0 rgba(23, 32, 42, 0.14);
}

.mini-map::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 18%;
  height: 26px;
  background: repeating-linear-gradient(90deg, #fff 0 42px, transparent 42px 78px);
}

.map-road {
  position: absolute;
  background: var(--road);
  border: 4px solid #1c242d;
}

.map-road.horizontal {
  left: 8%;
  right: 8%;
  bottom: 42px;
  height: 54px;
}

.map-road.horizontal::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 22px;
  height: 5px;
  background: repeating-linear-gradient(90deg, #fff 0 34px, transparent 34px 66px);
}

.map-road.vertical {
  left: 46%;
  top: 70px;
  bottom: 42px;
  width: 54px;
}

.map-road.vertical::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 22px;
  width: 5px;
  background: repeating-linear-gradient(180deg, #fff 0 34px, transparent 34px 66px);
}

.map-car {
  position: absolute;
  left: 16%;
  bottom: 56px;
  width: 58px;
  height: 28px;
  background: #ffcf33;
  border: 4px solid var(--ink);
  box-shadow: inset -10px 0 0 var(--orange);
}

.map-car::before,
.map-car::after {
  content: "";
  position: absolute;
  bottom: -12px;
  width: 14px;
  height: 14px;
  background: #fff;
  border: 4px solid var(--ink);
}

.map-car::before {
  left: 8px;
}

.map-car::after {
  right: 8px;
}

.map-flag {
  position: absolute;
  right: 16%;
  bottom: 88px;
  width: 42px;
  height: 54px;
  border-left: 5px solid var(--ink);
  background:
    linear-gradient(90deg, var(--red) 0 50%, #fff 50% 100%) 0 0 / 18px 18px;
}

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

.checkpoint-card {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 14px;
  border: 3px solid var(--ink);
  background: #fff;
  box-shadow: 4px 4px 0 rgba(23, 32, 42, 0.12);
}

.checkpoint-card strong {
  font-size: 1rem;
}

.checkpoint-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
}

.primary-btn,
.secondary-btn {
  padding: 0 18px;
  font-weight: 900;
}

.primary-btn {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.2), 4px 4px 0 rgba(23, 32, 42, 0.18);
}

.secondary-btn {
  background: #fff;
  box-shadow: 4px 4px 0 rgba(23, 32, 42, 0.12);
}

.quiz-view {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100%;
  gap: 12px;
  overflow: hidden;
}

.quiz-head,
.study-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.timer-track {
  height: 14px;
  overflow: hidden;
  border: 3px solid var(--ink);
  background: #e4ebf1;
}

#timer-bar {
  width: 100%;
  height: 100%;
  background: var(--amber);
  transform-origin: left center;
  transition: transform 180ms linear;
}

.question-grid {
  display: grid;
  grid-template-columns: minmax(170px, 0.55fr) minmax(0, 1.45fr);
  gap: 14px;
  min-height: 0;
  align-items: stretch;
}

.visual-card {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 14px;
  border: 4px solid var(--ink);
  background:
    linear-gradient(180deg, #8bddff 0 38%, #79cf73 38% 100%);
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.35);
}

.visual-card svg {
  width: min(100%, 190px);
  height: auto;
  filter: drop-shadow(8px 8px 0 rgba(23, 32, 42, 0.22));
  image-rendering: pixelated;
  shape-rendering: crispEdges;
}

.visual-card svg * {
  shape-rendering: crispEdges;
}

.question-copy {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.question-text {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 900;
  line-height: 1.14;
}

.options {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
}

.option-btn {
  position: relative;
  display: grid;
  min-height: 44px;
  align-items: center;
  padding: 8px 14px 8px 62px;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 780;
  line-height: 1.35;
  box-shadow: 4px 4px 0 rgba(23, 32, 42, 0.12);
}

.option-btn::before {
  content: attr(data-key);
  position: absolute;
  left: 18px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--ink);
  transform: translateY(-50%);
  font-size: 0.8rem;
  font-weight: 950;
}

.option-btn.correct {
  border-color: var(--green);
  background: rgba(31, 157, 99, 0.14);
}

.option-btn.wrong {
  border-color: var(--red);
  background: rgba(217, 56, 50, 0.12);
}

.option-btn:disabled {
  cursor: default;
}

.feedback {
  max-height: 76px;
  overflow: hidden;
  padding: 10px 14px;
  border: 3px solid var(--ink);
  background: #fff;
  line-height: 1.5;
}

.feedback strong {
  display: block;
  margin-bottom: 4px;
}

.study-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  gap: 12px;
  overflow: hidden;
}

.study-cards,
.review-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.study-card,
.review-card {
  padding: 12px;
  border: 3px solid var(--ink);
  background: #fff;
  box-shadow: 4px 4px 0 rgba(23, 32, 42, 0.12);
}

.study-card h3,
.review-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.study-card p,
.review-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.result-badge {
  display: inline-grid;
  place-items: center;
  width: max-content;
  min-width: 94px;
  padding: 8px 14px;
  color: #fff;
  background: var(--green);
  font-weight: 950;
  box-shadow: 5px 5px 0 rgba(23, 32, 42, 0.18);
}

.result-badge.fail {
  background: var(--red);
}

.hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-rows: auto 72px minmax(0, 1fr);
    gap: 7px;
    padding: 7px 0;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 5px;
    min-height: 0;
  }

  h1 {
    font-size: clamp(1.7rem, 6.8vw, 2.45rem);
    text-shadow: 3px 3px 0 #fff, 6px 6px 0 rgba(23, 32, 42, 0.14);
  }

  .quiz-head,
  .study-head {
    align-items: stretch;
    flex-direction: column;
  }

  .layout,
  .question-grid,
  .study-cards,
  .review-list {
    grid-template-columns: 1fr;
  }

  .layout {
    grid-template-rows: auto minmax(0, 1fr);
    gap: 7px;
  }

  .play-panel {
    order: 2;
  }

  .side-panel {
    order: 1;
    display: block;
    padding: 7px;
  }

  .mode-buttons {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  .mode-btn {
    min-height: 38px;
    padding: 5px;
    text-align: center;
  }

  .mode-btn span {
    overflow: hidden;
    font-size: 0.72rem;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mode-btn small,
  .topic-box {
    display: none;
  }

  .play-panel {
    padding: 12px;
  }

  .intro-view,
  .result-view {
    align-content: start;
    min-height: 0;
    padding-top: 0;
  }

  .intro-view {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .intro-copy {
    gap: 10px;
  }

  .intro-gameboard {
    gap: 10px;
  }

  .mini-map {
    min-height: 126px;
  }

  .mini-map::before {
    top: 16%;
    height: 18px;
    background-size: 58px 18px;
  }

  .map-road.horizontal {
    bottom: 24px;
    height: 38px;
  }

  .map-road.horizontal::after {
    top: 15px;
    height: 4px;
  }

  .map-road.vertical {
    top: 44px;
    bottom: 24px;
    width: 38px;
  }

  .map-road.vertical::after {
    left: 15px;
    width: 4px;
  }

  .map-car {
    bottom: 35px;
    transform: scale(0.78);
    transform-origin: left bottom;
  }

  .map-flag {
    bottom: 58px;
    transform: scale(0.75);
    transform-origin: right bottom;
  }

  .checkpoint-card {
    min-height: 58px;
    padding: 8px;
  }

  .visual-card {
    min-height: 130px;
  }

  .question-grid {
    grid-template-columns: minmax(140px, 0.7fr) minmax(0, 1.3fr);
  }

  .quiz-view {
    gap: 9px;
  }

  .option-btn {
    min-height: 46px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

@media (max-width: 520px) {
  .app-shell {
    grid-template-rows: auto 58px minmax(0, 1fr);
    width: calc(100% - 18px);
    gap: 6px;
    padding-top: 6px;
  }

  .brand-block {
    gap: 8px;
  }

  .badge-mark {
    width: 40px;
    height: 40px;
  }

  h1 {
    font-size: clamp(1.38rem, 7vw, 1.85rem);
  }

  .eyebrow {
    font-size: 0.64rem;
  }

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

  .status-strip div,
  .meters div {
    padding: 5px 6px;
    box-shadow: 3px 3px 0 rgba(23, 32, 42, 0.12);
  }

  .status-strip span,
  .meters span {
    font-size: 0.92rem;
  }

  .status-strip small,
  .meters small {
    font-size: 0.55rem;
  }

  .road-stage {
    height: 58px;
  }

  .road {
    height: 32px;
  }

  .skyline {
    inset: auto 0 32px;
    height: 16px;
  }

  .lane-line {
    top: 14px;
    height: 4px;
  }

  .car {
    bottom: 3px;
    transform: scale(0.68);
    transform-origin: left bottom;
  }

  .side-panel {
    padding: 6px;
  }

  .mode-buttons {
    gap: 4px;
  }

  .mode-btn {
    min-height: 34px;
    padding: 3px;
    border-width: 2px;
  }

  .mode-btn span {
    font-size: 0.58rem;
  }

  .play-panel {
    padding: 10px;
  }

  .intro-view,
  .result-view {
    gap: 12px;
    padding-top: 0;
  }

  .license-plate {
    min-width: 120px;
    padding: 7px 12px;
    font-size: 1.05rem;
  }

  .question-text {
    font-size: 1.03rem;
  }

  .intro-view p,
  .result-view p {
    font-size: 0.86rem;
    line-height: 1.35;
  }

  .mini-map {
    min-height: 104px;
  }

  .checkpoint-grid {
    gap: 6px;
  }

  .checkpoint-card {
    min-height: 48px;
    padding: 7px;
  }

  .checkpoint-card strong {
    font-size: 0.8rem;
  }

  .checkpoint-card span {
    font-size: 0.65rem;
  }

  .question-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 84px auto;
    align-content: start;
  }

  .quiz-view {
    grid-template-rows: auto auto auto auto auto;
    align-content: start;
  }

  .question-copy {
    grid-template-rows: auto auto;
  }

  .visual-card {
    min-height: 0;
    padding: 8px;
  }

  .visual-card svg {
    width: min(100%, 92px);
  }

  .options {
    gap: 6px;
  }

  .option-btn {
    min-height: 36px;
    padding: 6px 8px 6px 44px;
    font-size: 0.78rem;
  }

  .option-btn::before {
    left: 10px;
    width: 22px;
    height: 22px;
  }

  .feedback {
    max-height: 100px;
    padding: 8px 10px;
    font-size: 0.82rem;
    line-height: 1.3;
  }

  .quiz-actions {
    min-height: 0;
  }

  .quiz-actions .secondary-btn,
  .quiz-actions .primary-btn {
    min-height: 38px;
  }

  body[data-view="quiz"] .app-shell {
    grid-template-rows: auto minmax(0, 1fr);
    width: calc(100% - 12px);
    padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  }

  body[data-view="quiz"] .topbar,
  body:has(#quiz-view:not(.hidden)) .topbar {
    display: flex;
    align-items: center;
    min-height: 34px;
  }

  body[data-view="quiz"] .brand-block,
  body:has(#quiz-view:not(.hidden)) .brand-block {
    min-width: 0;
  }

  body[data-view="quiz"] .badge-mark,
  body:has(#quiz-view:not(.hidden)) .badge-mark {
    width: 30px;
    height: 30px;
    border-width: 3px;
    font-size: 0.78rem;
  }

  body[data-view="quiz"] h1,
  body:has(#quiz-view:not(.hidden)) h1 {
    font-size: 1.18rem;
    text-shadow: 2px 2px 0 #fff, 4px 4px 0 rgba(23, 32, 42, 0.14);
  }

  body[data-view="quiz"] .eyebrow,
  body[data-view="quiz"] .status-strip,
  body[data-view="quiz"] .road-stage,
  body[data-view="quiz"] .side-panel,
  body:has(#quiz-view:not(.hidden)) .topbar .eyebrow,
  body:has(#quiz-view:not(.hidden)) .status-strip,
  body:has(#quiz-view:not(.hidden)) .road-stage,
  body:has(#quiz-view:not(.hidden)) .side-panel {
    display: none;
  }

  body[data-view="quiz"] .layout,
  body:has(#quiz-view:not(.hidden)) .layout {
    display: block;
    min-height: 0;
    overflow: hidden;
  }

  body[data-view="quiz"] .play-panel,
  body:has(#quiz-view:not(.hidden)) .play-panel {
    height: 100%;
    padding: 8px;
    overflow: hidden;
  }

  body[data-view="quiz"] .quiz-view,
  body:has(#quiz-view:not(.hidden)) .quiz-view {
    grid-template-rows: auto auto auto auto auto;
    align-content: start;
    gap: 7px;
    height: 100%;
    overflow: hidden;
  }

  body[data-view="quiz"] .quiz-head {
    gap: 6px;
  }

  body[data-view="quiz"] .quiz-head h2 {
    font-size: 1.25rem;
  }

  body[data-view="quiz"] .meters div {
    padding: 4px 6px;
  }

  body[data-view="quiz"] .timer-track {
    height: 10px;
    border-width: 2px;
  }

  body[data-view="quiz"] .question-grid {
    grid-template-rows: 76px auto;
    gap: 8px;
  }

  body[data-view="quiz"] .question-text {
    font-size: 0.98rem;
    line-height: 1.12;
  }

  body[data-view="quiz"] .option-btn {
    min-height: 34px;
    font-size: 0.75rem;
    line-height: 1.2;
    padding-left: 44px;
  }

  body[data-view="quiz"] .feedback {
    max-height: 86px;
  }

  body:not([data-view="quiz"]) .checkpoint-card {
    min-height: 42px;
  }

  body:not([data-view="quiz"]) .mini-map {
    min-height: 96px;
  }
}
