:root {
  --ink: #2f514f;
  --muted: #71837f;
  --paper: #fffdf8;
  --cream: #fff6df;
  --line: #ded8c2;
  --green: #5f9e82;
  --green-dark: #39745f;
  --green-pale: #e7f3eb;
  --yellow: #efc56a;
  --yellow-pale: #fff3c9;
  --coral: #d77a6c;
  --coral-pale: #fff0eb;
  --purple: #8977ae;
  --purple-pale: #f0ebf7;
  --blue: #6f9eb0;
  --shadow: 0 18px 48px rgba(52, 75, 67, 0.11);
}

* { box-sizing: border-box; }
.animal-portrait { display: block; width: 100%; height: auto; object-fit: contain; filter: drop-shadow(0 7px 7px rgba(49, 73, 65, .15)); }

html {
  min-width: 0;
  background: #f6f8ef;
  color: var(--ink);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 7% 8%, rgba(239, 197, 106, 0.22) 0 120px, transparent 121px),
    radial-gradient(circle at 94% 22%, rgba(137, 119, 174, 0.12) 0 105px, transparent 106px),
    linear-gradient(145deg, #f3f8f0 0%, #fffaf2 56%, #f5f0f8 100%);
}

button { font: inherit; }

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 4px solid rgba(84, 143, 174, 0.38);
  outline-offset: 3px;
}

.app {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 0 48px;
}

.topbar {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.brand {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  gap: 12px;
  padding: 4px;
  border: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 17px;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(71, 123, 101, 0.2);
  color: #fff;
}

.brand-mark i {
  font-size: 25px;
  font-style: normal;
  font-weight: 900;
}

.brand-mark b {
  position: absolute;
  top: 3px;
  right: 5px;
  color: var(--yellow);
  font-size: 12px;
}

.brand > span:last-child { min-width: 0; }
.brand strong,
.brand small { display: block; }
.brand strong { font-size: 19px; letter-spacing: -0.03em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }

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

.top-spark {
  color: var(--yellow);
  font-size: 24px;
}

.quiet-badge,
.back-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.8);
}

.quiet-badge {
  gap: 8px;
  padding: 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.quiet-badge span { color: var(--coral); }

.back-button {
  width: 48px;
  padding: 0;
  color: var(--ink);
  font-size: 24px;
  cursor: pointer;
}

.back-button:hover { background: #fff; transform: translateY(-1px); }

.hero {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  min-height: 470px;
  overflow: hidden;
  border: 3px solid var(--line);
  border-radius: 44px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 58px 36px 52px 60px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-family: Georgia, serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1.35;
  text-transform: uppercase;
}

h1,
h2,
p { overflow-wrap: anywhere; }

.hero h1,
.game-header h1,
.result-copy h1 {
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.hero h1 { max-width: 520px; font-size: clamp(44px, 5.3vw, 70px); }

.hero-copy > p:not(.eyebrow) {
  max-width: 530px;
  margin: 22px 0 26px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.55;
}

.primary-button,
.secondary-button,
.hint-button {
  min-height: 52px;
  border-radius: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 22px;
  border: 0;
  background: var(--green);
  box-shadow: 0 8px 0 var(--green-dark);
  color: #fff;
}

.primary-button:hover { transform: translateY(-2px); }
.primary-button:active { transform: translateY(4px); box-shadow: 0 4px 0 var(--green-dark); }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.hero-facts span {
  display: flex;
  min-height: 48px;
  align-items: baseline;
  gap: 7px;
  padding: 9px 13px;
  border-radius: 15px;
  background: #f1f4ec;
}

.hero-facts strong { font-family: Georgia, serif; font-size: 21px; }
.hero-facts small { color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; }

.hero-art {
  position: relative;
  display: grid;
  min-width: 0;
  padding: 34px 42px 34px 0;
  place-items: center;
}

.hero-board {
  position: relative;
  width: min(100%, 455px);
  aspect-ratio: 1.08;
  overflow: hidden;
  border: 9px solid #fff;
  border-radius: 38px;
  background:
    radial-gradient(circle at 50% 30%, #fff6c8 0 23%, transparent 24%),
    linear-gradient(145deg, #e2f2e7 0%, #f7f1df 100%);
  box-shadow: 0 18px 38px rgba(55, 82, 72, 0.16);
}

.hero-board::before {
  position: absolute;
  right: 18px;
  bottom: 20px;
  left: 18px;
  height: 70px;
  border-radius: 50%;
  background: rgba(78, 117, 91, 0.12);
  content: "";
}

.hero-animal {
  position: absolute;
  bottom: -23px;
  width: 46%;
}

.hero-left { left: -6px; transform: rotate(2deg); }
.hero-right { right: -4px; transform: rotate(-2deg); }
.hero-shield { position: absolute; top: 22px; left: 50%; width: 36%; transform: translateX(-50%); }
.hero-shield svg { display: block; width: 100%; }

.hero-word {
  position: absolute;
  z-index: 3;
  display: grid;
  min-height: 36px;
  place-items: center;
  padding: 7px 12px;
  border: 3px solid #fff;
  border-radius: 14px;
  box-shadow: 0 6px 14px rgba(53, 76, 67, 0.14);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hero-no { top: 40%; left: 10%; background: var(--coral); transform: rotate(-5deg); }
.hero-help { top: 43%; right: 7%; background: var(--purple); transform: rotate(4deg); }

.how-section,
.levels-section { padding: 56px 0 0; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading h2 {
  max-width: 640px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.045em;
  line-height: 1.03;
}

.section-heading > p {
  max-width: 390px;
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  text-align: right;
}

.steps-grid,
.levels-grid {
  display: grid;
  gap: 14px;
}

.steps-grid { grid-template-columns: repeat(3, 1fr); }

.steps-grid article {
  display: flex;
  min-width: 0;
  min-height: 118px;
  align-items: center;
  gap: 16px;
  padding: 19px;
  border: 2px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.9);
}

.steps-grid article > b {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  place-items: center;
  border: 4px solid #fff;
  border-radius: 18px;
  box-shadow: 0 5px 12px rgba(54, 77, 69, 0.13);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 22px;
}

.step-green { background: var(--green); }
.step-yellow { background: #d69a42; }
.step-purple { background: var(--purple); }

.steps-grid strong,
.steps-grid small { display: block; }
.steps-grid strong { margin-bottom: 6px; font-size: 17px; }
.steps-grid small { color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.4; }

.levels-grid { grid-template-columns: repeat(3, 1fr); }

.level-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 352px;
  flex-direction: column;
  overflow: hidden;
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.level-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 16px 34px rgba(49, 76, 68, 0.12); }

.level-top,
.level-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.level-top b {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  background: var(--accent);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 16px;
}

.level-top small { color: var(--accent); font-size: 13px; font-weight: 900; }

.level-icon {
  position: relative;
  display: grid;
  height: 105px;
  margin: 12px 0 15px;
  place-items: center;
  overflow: hidden;
  border-radius: 20px;
  background: color-mix(in srgb, var(--accent) 18%, white);
}

.level-icon i {
  position: relative;
  z-index: 2;
  display: grid;
  width: 64px;
  height: 70px;
  place-items: center;
  border: 5px solid var(--accent);
  border-radius: 33px 33px 25px 25px;
  background: #fffdf8;
  color: var(--accent);
  font-size: 29px;
  font-style: normal;
  font-weight: 900;
}

.level-icon b {
  position: absolute;
  width: 180px;
  height: 35px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 24%, transparent);
  transform: translateY(36px);
}

.level-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.level-copy small { color: var(--accent); font-family: Georgia, serif; font-size: 10px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.level-copy strong { margin: 5px 0 8px; font-size: 23px; letter-spacing: -0.035em; }
.level-copy span { color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.45; }
.level-footer { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11px; font-weight: 900; }
.level-footer span { color: var(--muted); }
.level-footer b { color: var(--accent); }

.parent-note {
  display: flex;
  min-height: 88px;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 18px 23px;
  border: 2px solid #d4d7ca;
  border-radius: 24px;
  background: rgba(238, 243, 235, 0.94);
}

.parent-note > span {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 16px;
  background: var(--green);
  color: #fff;
  font-size: 22px;
}

.parent-note p { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.55; }
.parent-note strong { color: var(--ink); }

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 3px 12px;
}

.game-header h1 { font-size: clamp(37px, 5vw, 61px); }
.game-header > div > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 14px; font-weight: 800; }

.progress-number {
  display: grid;
  width: 92px;
  height: 92px;
  flex: 0 0 92px;
  place-items: center;
  align-content: center;
  border: 3px solid var(--line);
  border-radius: 29px;
  background: var(--paper);
}

.progress-number strong { font-family: Georgia, serif; font-size: 30px; line-height: 1; }
.progress-number small { margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 900; }

.progress-track {
  height: 12px;
  overflow: hidden;
  margin: 6px 0 14px;
  border-radius: 999px;
  background: #dfdfd3;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #82b99b);
  transition: width 0.28s ease;
}

.stage-banner {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 15px;
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: 23px;
  background: rgba(255, 253, 248, 0.88);
}

.stage-banner span {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 8px;
  border-radius: 16px;
  color: var(--muted);
  font-weight: 900;
}

.stage-banner span b {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: #e8e8de;
}

.stage-banner span.active { background: var(--green-pale); color: var(--green-dark); }
.stage-banner span.active b { background: var(--green); color: #fff; }
.stage-banner span.done { color: var(--green-dark); }
.stage-banner span.done b { background: var(--green-dark); color: #fff; }
.stage-banner i { color: #aaa99d; font-style: normal; font-weight: 900; }

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 16px;
}

.scene-card,
.decision-card {
  min-width: 0;
  border: 3px solid var(--line);
  border-radius: 34px;
  background: var(--paper);
  box-shadow: 0 12px 34px rgba(50, 75, 68, 0.08);
}

.scene-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 18px;
  background: linear-gradient(180deg, #f5fbf6 0%, #fffaf0 100%);
}

.place-label {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 18px;
  background: #fff;
}

.place-label > span {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 13px;
  background: var(--yellow-pale);
  color: #9a6b25;
  font-size: 20px;
}

.place-label small,
.place-label strong { display: block; }
.place-label small { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.place-label strong { margin-top: 3px; font-size: 15px; }

.scene-art {
  position: relative;
  min-height: 302px;
  flex: 1;
  overflow: hidden;
  margin: 12px 0;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 33%, rgba(255, 244, 191, 0.84) 0 90px, transparent 91px),
    linear-gradient(180deg, #deedf0 0 70%, #d8c29c 70% 100%);
}

.scene-art::after {
  position: absolute;
  right: 8%;
  bottom: 8%;
  left: 8%;
  height: 32px;
  border-radius: 50%;
  background: rgba(49, 86, 83, 0.13);
  content: "";
}

.scene-person {
  position: absolute;
  z-index: 2;
  bottom: -4px;
  width: 57%;
}

.scene-person svg { display: block; width: 100%; }
.main-person { left: -3%; }
.partner-person { right: -4%; transform: scale(0.78); transform-origin: bottom right; }

.boundary-ring {
  position: absolute;
  z-index: 1;
  bottom: 23px;
  left: 2%;
  width: 59%;
  aspect-ratio: 1;
  border: 4px dashed rgba(95, 158, 130, 0.62);
  border-radius: 50%;
}

.story-box {
  display: flex;
  min-height: 116px;
  gap: 10px;
  padding: 15px;
  border: 2px solid #e4ddc9;
  border-radius: 21px;
  background: #fffdf8;
}

.story-box > span { color: var(--green); font-family: Georgia, serif; font-size: 36px; font-weight: 900; line-height: 0.9; }
.story-box p { margin: 0; color: var(--ink); font-size: 14px; font-weight: 800; line-height: 1.48; }

.decision-card { padding: 24px; }

.decision-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.decision-heading h2 { max-width: 560px; margin: 0; font-size: clamp(28px, 3.4vw, 41px); letter-spacing: -0.045em; line-height: 1.04; }
.decision-heading > span {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  place-items: center;
  border-radius: 17px;
  background: var(--purple);
  box-shadow: 0 5px 0 #67568c;
  color: #fff;
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 900;
}

.answers-grid {
  display: grid;
  gap: 10px;
}

.answer-card {
  display: grid;
  min-width: 0;
  min-height: 76px;
  grid-template-columns: 42px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  border: 2px solid #dedacc;
  border-radius: 20px;
  background: #fffefa;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.answer-card:not(:disabled):hover { transform: translateX(3px); border-color: var(--green); background: #f7fbf7; }

.answer-letter {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: #eceee7;
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 900;
}

.answer-card > span:nth-child(2) { min-width: 0; font-size: 14px; font-weight: 900; line-height: 1.36; }
.answer-card > b { color: #aaa99c; font-size: 18px; text-align: center; }
.answer-card.wrong { border-color: #e4a79b; background: var(--coral-pale); color: #8d544e; }
.answer-card.wrong .answer-letter { background: var(--coral); color: #fff; }
.answer-card.wrong > b { color: var(--coral); }
.answer-card.correct { border-color: #76b091; background: var(--green-pale); color: var(--green-dark); }
.answer-card.correct .answer-letter { background: var(--green); color: #fff; }
.answer-card.correct > b { color: var(--green-dark); }
.answer-card:disabled { opacity: 1; cursor: default; }

.feedback {
  display: flex;
  min-height: 78px;
  align-items: center;
  gap: 12px;
  margin-top: 13px;
  padding: 13px 15px;
  border-radius: 20px;
}

.feedback > span {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border-radius: 15px;
  font-size: 22px;
  font-weight: 900;
}

.feedback strong,
.feedback small { display: block; }
.feedback strong { margin-bottom: 4px; font-size: 14px; }
.feedback small { font-size: 11px; font-weight: 800; line-height: 1.4; }
.neutral-feedback { background: #f0f2ec; color: var(--muted); }
.neutral-feedback > span { background: #fff; color: var(--green); }
.wrong-feedback { background: var(--coral-pale); color: #8c5952; }
.wrong-feedback > span { background: #fff; color: var(--coral); }
.hint-feedback { background: var(--yellow-pale); color: #806123; }
.hint-feedback > span { background: #fff; color: #c38b27; }
.correct-feedback { background: var(--green-pale); color: var(--green-dark); }
.correct-feedback > span { background: #fff; color: var(--green); }

.game-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 13px;
}

.hint-button,
.secondary-button {
  padding: 0 19px;
  border: 2px solid #e0bd62;
  background: var(--yellow-pale);
  color: #805f1f;
}

.hint-button:hover,
.secondary-button:hover { transform: translateY(-2px); }
.hint-button:disabled { cursor: default; opacity: 0.6; transform: none; }
.next-button { min-width: 238px; }

.result-card {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  min-height: 620px;
  overflow: hidden;
  border: 3px solid var(--line);
  border-radius: 42px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.result-art {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 34%, #fff2b7 0 130px, transparent 131px),
    linear-gradient(160deg, #dff1e6, #f6efd9);
}

.result-art::after {
  position: absolute;
  right: 10%;
  bottom: 8%;
  left: 10%;
  height: 55px;
  border-radius: 50%;
  background: rgba(49, 81, 79, 0.13);
  content: "";
}

.result-shield {
  position: absolute;
  z-index: 1;
  top: 40px;
  left: 50%;
  width: 46%;
  transform: translateX(-50%);
}

.result-shield svg,
.result-animal svg { display: block; width: 100%; }
.result-animal { position: absolute; z-index: 2; bottom: -8px; left: 50%; width: 60%; transform: translateX(-50%); }
.result-art > i,
.result-art > b { position: absolute; z-index: 3; color: var(--yellow); font-size: 35px; font-style: normal; }
.result-art > i { top: 23%; left: 9%; }
.result-art > b { top: 16%; right: 10%; }

.result-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
}

.result-copy h1 { font-size: clamp(42px, 5vw, 65px); }
.result-copy > p:not(.eyebrow) { margin: 20px 0 12px; color: var(--muted); font-size: 15px; font-weight: 700; line-height: 1.55; }
.stars { margin: 6px 0 14px; color: var(--yellow); font-size: 38px; letter-spacing: 0.08em; }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.result-stats span { min-width: 0; padding: 12px; border-radius: 17px; background: #f1f3ed; text-align: center; }
.result-stats strong,
.result-stats small { display: block; }
.result-stats strong { font-family: Georgia, serif; font-size: 24px; }
.result-stats small { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.result-copy blockquote { margin: 16px 0; padding: 14px 17px; border-left: 5px solid var(--green); border-radius: 0 16px 16px 0; background: var(--green-pale); color: var(--green-dark); font-size: 13px; font-weight: 900; line-height: 1.45; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.result-actions .secondary-button { border-color: var(--line); background: #f4f3ed; color: var(--ink); }

.fatal-error {
  margin-top: 80px;
  padding: 40px;
  border: 3px solid var(--coral);
  border-radius: 32px;
  background: var(--paper);
}

@media (max-width: 930px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 48px 44px 20px; }
  .hero-art { padding: 15px 44px 42px; }
  .hero-board { width: min(100%, 510px); }
  .steps-grid { grid-template-columns: 1fr; }
  .steps-grid article { min-height: 98px; }
  .levels-grid { grid-template-columns: 1fr; }
  .level-card { min-height: 230px; display: grid; grid-template-columns: 120px minmax(0, 1fr); column-gap: 18px; }
  .level-top { grid-column: 1 / -1; }
  .level-icon { height: 105px; margin: 10px 0; }
  .level-copy { align-self: center; }
  .level-footer { grid-column: 1 / -1; }
  .game-layout { grid-template-columns: 1fr; }
  .scene-card { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 12px; }
  .place-label { grid-column: 1 / -1; }
  .scene-art { min-height: 310px; margin: 0; }
  .story-box { min-height: 310px; align-items: center; }
  .result-card { grid-template-columns: 0.82fr 1.18fr; }
  .result-copy { padding: 35px; }
}

@media (max-width: 700px) {
  .app { width: min(1120px, calc(100% - 20px)); padding-top: 12px; }
  .topbar { margin-bottom: 10px; }
  .quiet-badge { width: 48px; padding: 0; font-size: 0; }
  .quiet-badge span { font-size: 18px; }
  .hero { border-radius: 32px; }
  .hero-copy { padding: 36px 25px 15px; }
  .hero-copy > p:not(.eyebrow) { font-size: 15px; }
  .hero-art { padding: 12px 24px 28px; }
  .section-heading { display: block; }
  .section-heading > p { max-width: none; margin-top: 10px; text-align: left; }
  .game-header { align-items: flex-start; }
  .progress-number { width: 72px; height: 72px; flex-basis: 72px; border-radius: 23px; }
  .progress-number strong { font-size: 24px; }
  .stage-banner { gap: 8px; }
  .stage-banner span { padding-right: 9px; }
  .scene-card { display: flex; }
  .scene-art { min-height: 300px; }
  .story-box { min-height: 0; align-items: flex-start; }
  .decision-card { padding: 18px; }
  .decision-heading h2 { font-size: 30px; }
  .result-card { grid-template-columns: 1fr; }
  .result-art { min-height: 360px; }
  .result-shield { width: 38%; }
  .result-animal { width: 48%; }
}

@media (max-width: 480px) {
  .brand { gap: 8px; }
  .brand-mark { width: 44px; height: 44px; flex-basis: 44px; border-radius: 15px; }
  .brand strong { font-size: 16px; }
  .brand small { font-size: 8px; }
  .top-actions { gap: 6px; }
  .back-button,
  .quiet-badge { width: 44px; min-height: 44px; border-radius: 14px; }
  .hero h1 { font-size: 45px; }
  .hero-copy { padding-inline: 20px; }
  .hero-copy .primary-button { width: 100%; }
  .hero-facts { width: 100%; }
  .hero-facts span { flex: 1; min-width: 82px; justify-content: center; }
  .hero-art { padding-inline: 16px; }
  .hero-board { border-width: 6px; border-radius: 29px; }
  .how-section,
  .levels-section { padding-top: 43px; }
  .section-heading h2 { font-size: 34px; }
  .steps-grid article { padding: 14px; }
  .level-card { display: flex; min-height: 340px; }
  .level-icon { height: 100px; }
  .parent-note { align-items: flex-start; padding: 16px; }
  .game-header h1 { font-size: 35px; }
  .game-header > div > p:last-child { font-size: 12px; }
  .progress-number { width: 66px; height: 66px; flex-basis: 66px; }
  .stage-banner span { min-width: 0; }
  .stage-banner span small { font-size: 10px; }
  .scene-card,
  .decision-card { border-radius: 27px; }
  .scene-art { min-height: 280px; }
  .story-box p { font-size: 13px; }
  .decision-heading > span { width: 48px; height: 48px; flex-basis: 48px; }
  .answer-card { min-height: 86px; grid-template-columns: 38px minmax(0, 1fr) 20px; gap: 9px; padding: 9px; }
  .answer-letter { width: 38px; height: 38px; }
  .answer-card > span:nth-child(2) { font-size: 13px; }
  .game-actions { display: grid; grid-template-columns: 1fr; }
  .game-actions button,
  .next-button { width: 100%; min-width: 0; }
  .result-art { min-height: 325px; }
  .result-shield { top: 24px; width: 42%; }
  .result-animal { width: 56%; }
  .result-copy { padding: 28px 20px; }
  .result-copy h1 { font-size: 43px; }
  .result-stats { gap: 5px; }
  .result-stats span { padding: 10px 5px; }
  .result-actions { display: grid; }
  .result-actions button { width: 100%; }
}

@media (max-width: 390px) {
  .app { width: calc(100% - 16px); }
  .brand span:last-child small { display: none; }
  .brand strong { font-size: 15px; }
  .hero-copy { padding-inline: 16px; }
  .hero h1 { font-size: 41px; }
  .hero-facts small { font-size: 8px; }
  .stage-banner { gap: 3px; padding-inline: 5px; }
  .stage-banner i { font-size: 11px; }
  .stage-banner span { gap: 5px; padding-left: 5px; padding-right: 6px; }
  .stage-banner span b { width: 30px; height: 30px; }
  .scene-card { padding: 12px; }
  .decision-card { padding: 14px 12px; }
  .decision-heading { gap: 10px; }
  .decision-heading h2 { font-size: 27px; }
  .answer-card > span:nth-child(2) { font-size: 12px; }
  .feedback { align-items: flex-start; padding: 12px; }
  .feedback > span { width: 42px; height: 42px; flex-basis: 42px; }
}

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