:root {
  --ink: #3b2a1a;
  --paper: #f6e7c3;
  --paper-dark: #e6cf98;
  --wood: #a8733f;
  --wood-dark: #6e4723;
  --green: #4caf3a;
  --green-dark: #2f7a25;
  --orange: #f0a030;
  --orange-dark: #b86e12;
  --cream: #fff8e6;
  --sky: #bfe6ff;
  color-scheme: light;
}

* { box-sizing: border-box; }

/* Anything marked hidden stays hidden, whatever display rule its class sets. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: #2f6b2a;
  color: var(--ink);
  font: 18px/1.35 ui-rounded, "SF Pro Rounded", "Nunito", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

#app { position: fixed; inset: 0; overflow: hidden; }

button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #ffd94a; outline-offset: 2px; }

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  overflow: hidden;
}
.screen.paper {
  background: radial-gradient(circle at 50% 30%, #fff4d6, var(--paper) 60%, var(--paper-dark));
  overflow-y: auto;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
.backdrop { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- Icons ---------- */
.ico { display: inline-block; width: 28px; height: 28px; flex: none; background: center / contain no-repeat; }
.ico-map { background-image: url(assets/icons/map.svg); }
.ico-maze { background-image: url(assets/icons/maze.svg); }
.ico-pack { background-image: url(assets/icons/chest.svg); }
.ico-back { background-image: url(assets/icons/back.svg); }
.ico-key { background-image: url(assets/icons/key.svg); }
.ico-star { background-image: url(assets/icons/star.svg); }
.ico-bulb { background-image: url(assets/icons/bulb.svg); }
.ico-speaker { background-image: url(assets/icons/speaker.svg); }
.ico-chest { background-image: url(assets/icons/chest.svg); }
.ico-bridge { background-image: url(assets/icons/bridge.svg); }
.ico-lock { background-image: url(assets/icons/lock.svg); }
.ico-tower { background-image: url(assets/icons/tower.svg); }
.ico-shirt { background-image: url(assets/icons/shirt.svg); }
.ico-go { background-image: url(assets/icons/go.svg); }

/* ---------- Buttons ---------- */
.chunky {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 68px;
  min-width: 240px;
  padding: 10px 26px;
  border: 3px solid var(--ink);
  border-radius: 22px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.3px;
  box-shadow: 0 5px 0 var(--ink);
  transition: transform 80ms;
}
.chunky:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.chunky .ico { width: 40px; height: 40px; }
.chunky.green { background: linear-gradient(#6cc54a, var(--green)); color: #fff; text-shadow: 0 2px 0 var(--green-dark); }
.chunky.orange { background: linear-gradient(#ffd56a, #ffb02e); color: var(--ink); }
.chunky:disabled { cursor: default; transform: none; box-shadow: 0 5px 0 var(--ink); opacity: 0.85; }
.chunky.parchment { background: linear-gradient(#fff6dc, #ecd49c); color: var(--ink); }

.round-btn {
  width: 56px;
  height: 56px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: linear-gradient(#fff6dc, #ecd49c);
  box-shadow: 0 3px 0 var(--ink);
  padding: 0;
}
.round-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.round-btn .ico { width: 32px; height: 32px; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 2px solid rgba(59, 42, 26, 0.6);
  border-radius: 999px;
  background: rgba(255, 248, 230, 0.85);
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
}
.pill.dark { background: var(--wood); color: #fff; border-color: var(--ink); }
.pill.danger { background: #c0392b; color: #fff; border-color: var(--ink); }

/* ---------- Home ---------- */
.home-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 16px;
}
.sign {
  margin: 0;
  display: grid;
  justify-items: center;
  padding: 14px 30px 16px;
  border: 4px solid var(--ink);
  border-radius: 22px;
  background: linear-gradient(#c58a4e, #96612f);
  box-shadow: 0 6px 0 var(--ink), inset 0 2px 0 rgba(255, 255, 255, 0.3);
  color: #fff3c8;
  text-shadow: 0 3px 0 #5a3412;
  line-height: 1;
  transform: rotate(-2deg);
}
.sign-top { font-size: 46px; font-weight: 900; }
.sign-bottom { font-size: 30px; font-weight: 900; color: #ffe48a; }
.hello {
  margin: 0;
  min-height: 1.3em;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}
.home-buttons { display: grid; gap: 16px; }
.home-small { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* ---------- Bars ---------- */
.bar {
  width: 100%;
  max-width: 720px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}
.bar h2 { flex: 1; margin: 0; text-align: center; font-size: 28px; font-weight: 900; }
.bar-space { width: 56px; flex: none; }
.note { margin: 8px 20px; max-width: 420px; text-align: center; font-size: 20px; font-weight: 700; }

/* ---------- Map ---------- */
.map-list {
  list-style: none;
  margin: 0;
  padding: 10px 16px 30px;
  width: 100%;
  max-width: 520px;
  display: grid;
  gap: 6px;
}
.map-list li { display: flex; }
.map-list li:nth-child(4n + 2) { justify-content: center; }
.map-list li:nth-child(4n + 3) { justify-content: flex-end; }
.map-list li:nth-child(4n) { justify-content: center; }
.node {
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 150px;
  padding: 6px;
  border: 0;
  background: none;
}
.node-disc {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #8fdc6a, var(--green));
  box-shadow: 0 5px 0 var(--ink);
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  text-shadow: 0 2px 0 var(--green-dark);
}
.node.next .node-disc { animation: pulse 1.3s ease-in-out infinite; background: radial-gradient(circle at 40% 35%, #ffe07a, var(--orange)); text-shadow: 0 2px 0 var(--orange-dark); }
.node.locked { cursor: default; }
.node.locked .node-disc { background: #b8ab8c; box-shadow: 0 5px 0 #6d6250; border-color: #6d6250; }
.node.locked .node-disc .ico { width: 36px; height: 36px; opacity: 0.8; }
.node-name { font-size: 16px; font-weight: 900; text-align: center; line-height: 1.1; }
.node-stars { display: flex; gap: 2px; }
.node-stars .ico { width: 20px; height: 20px; }
.node-stars .ico.off { opacity: 0.25; filter: grayscale(1); }
@keyframes pulse { 50% { transform: scale(1.08); } }

/* ---------- Play ---------- */
.play { padding: 0; }
#world, #trace { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hud {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) 0 calc(10px + env(safe-area-inset-left));
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.objective {
  flex: 1;
  min-width: 0;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 16px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
  box-shadow: 0 3px 0 var(--ink);
  font-size: 19px;
  font-weight: 900;
  text-align: center;
  line-height: 1.15;
}
.objective .ico { width: 34px; height: 34px; }
.objective.static { justify-content: center; }
.objective.flash { animation: flash 900ms ease-out; }
@keyframes flash { 0% { transform: scale(1.12); background: #fff2a0; } 100% { transform: none; } }
.hud-right { display: flex; align-items: center; gap: 8px; }
.star-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 48px;
  padding: 0 12px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #3a4a5a;
  color: #fff;
  font-weight: 900;
  font-size: 18px;
}
.star-count .ico { width: 26px; height: 26px; }
.caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 2;
  width: fit-content;
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 16px;
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: var(--cream);
  box-shadow: 0 3px 0 var(--ink);
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  pointer-events: none;
}

.done-panel {
  position: absolute;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px 22px 20px;
  border: 4px solid var(--ink);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 6px 0 var(--ink);
  animation: pop 300ms ease-out;
}
.done-title { margin: 0; font-size: 34px; font-weight: 900; color: var(--green-dark); }
@keyframes pop { 0% { transform: translateX(-50%) scale(0.6); opacity: 0; } 100% { transform: translateX(-50%) scale(1); opacity: 1; } }

/* ---------- Overlays ---------- */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(10px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom));
  background: rgba(20, 40, 15, 0.35);
}
.quiz-card, .reward-card {
  width: min(680px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: 14px;
  border: 5px solid var(--wood-dark);
  border-radius: 26px;
  background: var(--paper);
  box-shadow: 0 8px 0 var(--ink), inset 0 0 0 3px #fff4d6;
  animation: rise 260ms ease-out;
}
@keyframes rise { 0% { transform: translateY(40px) scale(0.92); opacity: 0; } 100% { transform: none; opacity: 1; } }
.quiz-head { display: flex; align-items: center; gap: 10px; }
#quiz-portrait { width: 80px; height: 80px; flex: none; border: 3px solid var(--ink); border-radius: 50%; background: #cfe9a8; }
.quiz-text { flex: 1; margin: 0; font-size: 24px; font-weight: 900; line-height: 1.2; text-align: center; }
.speak { width: 64px; height: 64px; background: linear-gradient(#7fd0ff, #3a9be0); }
.speak .ico { width: 38px; height: 38px; }
.speak.talking { animation: pulse 0.6s ease-in-out infinite; }
.quiz-pic {
  margin: 10px auto 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 520px;
  font-size: 44px;
  line-height: 1.1;
}
.quiz-pic img { width: 140px; height: 140px; object-fit: cover; border: 4px solid var(--ink); border-radius: 18px; }
.quiz-pic .word { font-size: 40px; font-weight: 900; padding: 4px 16px; border: 3px solid var(--ink); border-radius: 14px; background: #fff; }
.quiz-pic .op { font-size: 40px; font-weight: 900; padding: 0 6px; }
.quiz-pic .gone { opacity: 0.3; position: relative; }
.quiz-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.quiz-choices.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 440px; margin-left: auto; margin-right: auto; }
.choice {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  align-items: center;
  gap: 6px;
  min-height: 150px;
  padding: 10px 6px 8px;
  border: 4px solid var(--ink);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 5px 0 var(--ink);
  transition: transform 100ms;
}
.choice:nth-child(3n + 1) { background: #e3f3ff; }
.choice:nth-child(3n + 2) { background: #f1e6ff; }
.choice:nth-child(3n + 3) { background: #ffe8ef; }
.choice.selected { transform: translateY(-4px) scale(1.04); outline: 5px solid #ffd94a; outline-offset: 2px; }
.choice.out { opacity: 0.35; filter: grayscale(1); pointer-events: none; }
.choice.right { outline: 6px solid var(--green); animation: pulse 0.5s ease-in-out 2; }
.choice.shake { animation: shake 380ms; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.choice .label { font-size: 19px; font-weight: 900; line-height: 1.1; text-align: center; }
.choice .mini-speaker { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 50%; background: #3a9be0 url(assets/icons/speaker.svg) center / 20px no-repeat; border: 2px solid var(--ink); }
.choice .art { display: grid; place-items: center; width: 100%; min-height: 90px; }
.choice .emoji { font-size: 64px; line-height: 1; }
.choice .num { font-size: 60px; font-weight: 900; line-height: 1; }
.choice .dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 110px; margin-top: 4px; }
.choice .dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--orange); border: 2px solid var(--ink); }
.choice .letter { font-size: 76px; font-weight: 900; line-height: 1; }
.choice .word { font-size: 28px; font-weight: 900; line-height: 1.1; text-align: center; word-break: break-word; }
.choice .swatch { display: flex; width: 90px; height: 70px; border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; }
.choice .swatch i { flex: 1; }
.choice img { width: 100%; max-width: 130px; aspect-ratio: 1; object-fit: cover; border: 3px solid var(--ink); border-radius: 14px; }
.choice .pix { width: 96px; height: 96px; image-rendering: pixelated; }
.choice.word-only { grid-template-rows: 1fr; }
.pick { display: flex; margin: 14px auto 2px; }

.quiz-spell { margin-top: 12px; display: grid; gap: 14px; }
.spell-slots { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.slot {
  width: 54px;
  height: 64px;
  display: grid;
  place-items: center;
  border-bottom: 5px solid var(--ink);
  font-size: 44px;
  font-weight: 900;
  color: rgba(59, 42, 26, 0.18);
}
.slot.filled { color: var(--green-dark); animation: pulse 0.4s; }
.slot.next { border-bottom-color: var(--orange); }
.spell-tiles { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.tile {
  width: 70px;
  height: 70px;
  border: 4px solid var(--ink);
  border-radius: 16px;
  background: linear-gradient(#fff, #ffe9b8);
  box-shadow: 0 4px 0 var(--ink);
  font-size: 42px;
  font-weight: 900;
}
.tile.used { visibility: hidden; }
.tile.shake { animation: shake 380ms; }

.reward-card { display: grid; justify-items: center; gap: 12px; width: min(620px, 100%); text-align: center; padding: 18px 16px 20px; }
.reward-title { margin: 0; font-size: 44px; line-height: 1; font-weight: 900; color: #b05a0a; }
.reward-sub { margin: 0; font-size: 26px; font-weight: 900; }
.reward-choices { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 14px; width: 100%; }
.reward-choice {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 10px 8px 14px;
  border: 4px solid var(--ink);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 5px 0 var(--ink);
  transition: transform 150ms, opacity 300ms;
}
.reward-choice:nth-child(1) { background: #e3f3ff; }
.reward-choice:nth-child(2) { background: #fff0d6; }
.reward-choice canvas { width: 100%; max-width: 200px; aspect-ratio: 1; }
.reward-choice.selected { transform: translateY(-4px) scale(1.03); outline: 6px solid #ffd94a; outline-offset: 2px; }
.reward-choice.chosen { outline: 6px solid var(--green); animation: pulse 0.5s ease-in-out 2; }
.reward-choice.gone { opacity: 0.25; filter: grayscale(1); pointer-events: none; }
.reward-choice .mini-speaker { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; background: #3a9be0 url(assets/icons/speaker.svg) center / 22px no-repeat; border: 2px solid var(--ink); }
.reward-name { font-size: 24px; font-weight: 900; line-height: 1.1; }
.reward-kind { font-size: 17px; font-weight: 800; color: #6a5236; }
.reward-stars { width: min(360px, 100%); }
.reward-card .chunky { min-width: 240px; }
.reward-nav { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; width: 100%; margin-top: 4px; }
.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 70px;
  border: 4px solid var(--ink);
  border-radius: 22px;
  background: linear-gradient(#fff6dc, #ecd49c);
  box-shadow: 0 5px 0 var(--ink);
  color: var(--ink);
  font-size: 26px;
  font-weight: 900;
}
.nav-btn.go { background: linear-gradient(#6cc54a, var(--green)); color: #fff; text-shadow: 0 2px 0 var(--green-dark); }
.nav-btn .ico { width: 38px; height: 38px; }
.nav-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }

/* ---------- Wardrobe ---------- */
#closet-kid { width: 180px; height: 180px; }
.closet-list { width: 100%; max-width: 680px; padding: 4px 16px 8px; }
.closet-kind { margin: 14px 4px 8px; font-size: 22px; font-weight: 900; }
.closet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.closet-item {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 6px;
  border: 4px solid var(--ink);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 4px 0 var(--ink);
  font-weight: 900;
  font-size: 16px;
}
.closet-item canvas { width: 90px; height: 90px; }
.closet-item.on { background: #fff2a0; outline: 4px solid var(--green); }

/* ---------- Grown-ups ---------- */
.hold { position: relative; overflow: hidden; margin-top: 20px; }
.hold-fill { position: absolute; inset: 0; width: 0; background: rgba(76, 175, 58, 0.5); }
.hold-label { position: relative; }
.parent { user-select: text; -webkit-user-select: text; }
.parent-body { width: 100%; max-width: 640px; padding: 0 16px; display: grid; gap: 14px; font-size: 17px; }
.privacy { margin: 0; padding: 10px 14px; border-radius: 12px; background: #e3f3d6; border: 2px solid #8fbf6a; font-weight: 700; }
fieldset { margin: 0; padding: 12px 14px 14px; border: 2px solid var(--wood); border-radius: 14px; background: rgba(255, 255, 255, 0.55); display: grid; gap: 10px; }
legend { padding: 0 6px; font-weight: 900; font-size: 19px; }
fieldset label { display: grid; gap: 4px; font-weight: 800; }
fieldset label.check { display: flex; align-items: center; gap: 8px; }
input[type="text"], select {
  width: 100%;
  min-height: 44px;
  padding: 6px 10px;
  border: 2px solid var(--wood);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  color: var(--ink);
}
input[type="checkbox"] { width: 22px; height: 22px; }
input[type="range"] { width: 100%; }
.hint { margin: 0; font-size: 15px; color: #6a5236; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.person { display: grid; grid-template-columns: 76px 1fr 40px; gap: 8px; align-items: center; padding: 8px; border-radius: 12px; background: #fff; border: 2px solid var(--paper-dark); }
.person .photo { width: 76px; height: 76px; padding: 0; border: 2px dashed var(--wood); border-radius: 12px; background: #fff8e6; overflow: hidden; display: grid; place-items: center; }
.person .photo img { width: 100%; height: 100%; object-fit: cover; }
.person .photo-plus { font-size: 13px; font-weight: 800; color: var(--wood-dark); }
.person-fields { display: grid; gap: 6px; }
.remove { width: 40px; height: 40px; border: 2px solid var(--wood); border-radius: 50%; background: #fff; font-size: 18px; }
.people, .custom { display: grid; gap: 8px; }
.cq { display: grid; gap: 6px; padding: 8px; border-radius: 12px; background: #fff; border: 2px solid var(--paper-dark); }
.cq-top, .cq-answer { display: flex; gap: 6px; }
.cq-emoji { flex: 0 0 64px; width: 64px !important; text-align: center; font-size: 22px !important; }
.file-btn { position: relative; overflow: hidden; display: inline-flex; justify-self: start; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
fieldset .pill { justify-self: start; }

@media (max-width: 420px) {
  .sign-top { font-size: 38px; }
  .sign-bottom { font-size: 26px; }
  .chunky { min-width: 220px; font-size: 23px; min-height: 62px; }
  .quiz-text { font-size: 20px; }
  .choice { min-height: 128px; }
  .choice .emoji { font-size: 50px; }
  .choice .letter { font-size: 60px; }
  .choice .num { font-size: 48px; }
  .choice .word { font-size: 21px; }
  .choice .label { font-size: 16px; }
  .choice .pix { width: 72px; height: 72px; }
  #quiz-portrait { width: 60px; height: 60px; }
  .speak { width: 54px; height: 54px; }
  .tile { width: 58px; height: 58px; font-size: 34px; }
  .slot { width: 40px; height: 52px; font-size: 34px; }
  .objective { font-size: 16px; padding: 4px 10px; }
  .objective .ico { width: 28px; height: 28px; }
  .round-btn { width: 50px; height: 50px; }
  .star-count { height: 44px; padding: 0 8px; font-size: 16px; }
}
@media (max-height: 560px) {
  .home-inner { gap: 10px; }
  .home-buttons { grid-auto-flow: column; }
  .chunky { min-width: 180px; min-height: 58px; font-size: 21px; }
  .choice { min-height: 118px; }
  .quiz-card { padding: 10px; }
}

/* ---------- Maze worlds ---------- */
.biome-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; width: 100%; max-width: 640px; padding: 8px 16px 24px; }
.biome {
  position: relative;
  display: grid;
  overflow: hidden;
  padding: 0 0 12px;
  border: 4px solid var(--ink);
  border-radius: 22px;
  background: var(--cream);
  box-shadow: 0 5px 0 var(--ink);
  text-align: center;
}
.biome:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.biome canvas { width: 100%; aspect-ratio: 8 / 5; display: block; border-bottom: 4px solid var(--ink); }
.biome-name { margin-top: 8px; font-size: 30px; font-weight: 900; }
.biome-count { font-size: 18px; font-weight: 800; color: #6a5236; }
.biome-ocean { background: #e3f3ff; }
.biome-nether { background: #f6d9d4; }
.biome-lava { background: #ffe6c9; }

/* Big screens: scale the cards and the top bar up so they read from across the room. */
@media (min-width: 1100px) and (min-height: 700px) {
  .quiz-card, .reward-card, .done-panel, .caption, .hud, .home-inner, .screen.paper > * { zoom: 1.3; }
}
@media (min-width: 1600px) and (min-height: 900px) {
  .quiz-card, .reward-card, .done-panel, .caption, .hud, .home-inner, .screen.paper > * { zoom: 1.6; }
}
