:root {
  color-scheme: light;
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
  --ink: #294c4c;
  --muted: #687e7b;
  --paper: #fffdf6;
  --cream: #fbf6e8;
  --line: #d8d2ba;
  --green: #5d9f89;
  --green-dark: #38725f;
  --blue: #6689b5;
  --purple: #9a6f9f;
  --gold: #efc966;
  --coral: #d77a68;
  --shadow: 0 20px 52px rgba(48, 72, 67, .13);
}

* { 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;
  min-height: 100%;
  background: #f0f5ec;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 4% 8%, rgba(239, 201, 102, .24) 0 125px, transparent 127px),
    radial-gradient(circle at 95% 25%, rgba(102, 137, 181, .14) 0 110px, transparent 112px),
    linear-gradient(145deg, #eef6ec 0%, #fffaf0 57%, #f1eef6 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .2;
  background-image: linear-gradient(rgba(58, 94, 87, .09) 1px, transparent 1px), linear-gradient(90deg, rgba(58, 94, 87, .09) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
}

button { color: inherit; font: inherit; }
button:not(:disabled) { cursor: pointer; }
button:focus-visible { outline: 4px solid rgba(239, 201, 102, .8); outline-offset: 4px; }
h1, h2, p { margin-top: 0; }

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

.topbar,
.brand,
.top-actions,
.section-heading,
.mission-head,
.route-meter,
.question-block,
.decision-actions,
.feedback-card,
.fact-card,
.result-actions {
  display: flex;
  align-items: center;
}

.topbar {
  min-height: 62px;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.brand {
  min-height: 52px;
  gap: 12px;
  padding: 2px;
  border: 0;
  background: transparent;
  text-align: left;
}

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

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

.brand-mark b {
  position: absolute;
  top: 4px;
  right: 6px;
  color: var(--gold);
  font-size: 9px;
}

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

.top-actions { gap: 10px; }
.top-dot { color: var(--gold); font-size: 19px; }

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

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

.quiet-badge span { color: var(--blue); }
.back-button { width: 48px; padding: 0; font-size: 23px; font-weight: 900; }
.back-button:hover { border-color: var(--green); background: #fff; transform: translateY(-1px); }

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

.hero {
  display: grid;
  min-height: 500px;
  overflow: hidden;
  border: 3px solid var(--line);
  border-radius: 44px;
  background: rgba(255, 253, 246, .98);
  box-shadow: var(--shadow);
  grid-template-columns: .94fr 1.06fr;
}

.hero-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 54px 25px 48px 56px;
}

.hero h1 {
  margin-bottom: 20px;
  font-family: Georgia, serif;
  font-size: clamp(48px, 5.5vw, 68px);
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: .98;
}

.hero h1 span { color: var(--green); }
.hero-copy > p:not(.eyebrow) {
  max-width: 470px;
  margin-bottom: 27px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.52;
}

.primary-button,
.secondary-button,
.hint-button,
.next-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-weight: 900;
}

.primary-button,
.next-button {
  gap: 9px;
  padding: 0 21px;
  border: 0;
  background: var(--green);
  box-shadow: 0 7px 0 var(--green-dark);
  color: #fff;
}

.primary-button:hover,
.next-button:hover { filter: brightness(1.04); transform: translateY(-1px); }
.primary-button:active,
.next-button:active { box-shadow: 0 3px 0 var(--green-dark); transform: translateY(4px); }

.hero-stats {
  display: flex;
  gap: 28px;
  margin-top: 35px;
}

.hero-stats span { display: block; min-width: 56px; }
.hero-stats strong,
.hero-stats small { display: block; }
.hero-stats strong { font-family: Georgia, serif; font-size: 25px; }
.hero-stats small { margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; }

.hero-art {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 34px 36px 34px 15px;
  background: linear-gradient(145deg, #eef7f0 0%, #e8f0f5 100%);
}

.city-board {
  position: relative;
  width: 100%;
  max-width: 550px;
  min-height: 405px;
  overflow: hidden;
  border: 8px solid #fff;
  border-radius: 36px;
  background: linear-gradient(#dceff1 0 38%, #c8dca7 38% 100%);
  box-shadow: 0 20px 42px rgba(52, 84, 79, .22);
}

.city-sky span {
  position: absolute;
  top: 34px;
  right: 40px;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 14px rgba(255, 246, 190, .48);
}

.city-sky b,
.city-sky i {
  position: absolute;
  top: 53px;
  left: 48px;
  width: 75px;
  height: 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .8);
}

.city-sky b::before,
.city-sky i::before {
  position: absolute;
  left: 16px;
  bottom: 5px;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: inherit;
  content: "";
}

.city-sky i { top: 102px; left: 184px; width: 58px; }
.city-road { position: absolute; background: #d8c8a0; }
.road-one { right: -40px; bottom: 58px; left: -35px; height: 75px; transform: rotate(-8deg); }
.road-two { top: 125px; right: 170px; bottom: -20px; width: 62px; transform: rotate(21deg); }
.city-road::after { position: absolute; inset: 44% 0 auto; border-top: 4px dashed rgba(255, 255, 255, .8); content: ""; }

.city-buildings { position: absolute; inset: 0; }
.mini-building { position: absolute; width: 92px; }
.mini-building svg { display: block; width: 100%; height: auto; }
.mini-1 { left: 3%; bottom: 13%; }
.mini-2 { left: 20%; top: 22%; }
.mini-3 { left: 38%; bottom: 2%; }
.mini-4 { right: 26%; top: 12%; }
.mini-5 { right: 5%; bottom: 23%; }
.mini-6 { left: 8%; top: 4%; transform: scale(.78); }
.mini-7 { right: 37%; bottom: 30%; transform: scale(.8); }
.mini-8 { right: 4%; top: 2%; transform: scale(.72); }
.city-mark { position: absolute; right: 15px; bottom: 10px; width: 88px; filter: drop-shadow(0 8px 10px rgba(43, 75, 69, .18)); }
.city-mark svg { display: block; width: 100%; }

.idea-section,
.routes-section { margin-top: 48px; }
.section-heading { justify-content: space-between; gap: 30px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(32px, 4vw, 45px); letter-spacing: -.035em; }
.section-heading > p { max-width: 450px; margin: 0; color: var(--muted); font-size: 14px; font-weight: 800; line-height: 1.45; text-align: right; }

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}

.principles article {
  display: grid;
  min-height: 136px;
  align-items: center;
  grid-template-columns: 65px 1fr;
  gap: 16px;
  padding: 21px;
  border: 2px solid var(--line);
  border-radius: 25px;
  background: var(--paper);
}

.principle-icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 5px solid #fff;
  border-radius: 20px;
  box-shadow: 0 6px 13px rgba(61, 86, 79, .15);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 29px;
  font-weight: 900;
}

.principle-icon.green { background: var(--green); }
.principle-icon.blue { background: var(--blue); }
.principle-icon.purple { background: var(--purple); }
.principles p { margin: 0; }
.principles strong,
.principles small { display: block; }
.principles strong { margin-bottom: 7px; font-size: 18px; }
.principles small { color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.42; }

.routes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.route-card {
  display: flex;
  min-width: 0;
  min-height: 370px;
  flex-direction: column;
  padding: 23px;
  border: 3px solid var(--line);
  border-radius: 29px;
  background: var(--paper);
  box-shadow: 0 9px 0 #d7d2bd;
  text-align: left;
  transition: border-color .18s, transform .18s;
}

.route-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.route-head { display: flex; align-items: center; justify-content: space-between; }
.route-head > b {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border-radius: 14px;
  background: var(--pale);
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 16px;
}

.route-head i {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 21px;
  background: var(--accent);
  box-shadow: 0 8px 0 color-mix(in srgb, var(--accent) 75%, #294c4c);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 28px;
  font-style: normal;
  font-weight: 900;
}

.route-copy { display: block; margin-top: 26px; }
.route-copy small,
.route-copy strong,
.route-copy > span { display: block; }
.route-copy small { color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.route-copy strong { margin-top: 7px; font-family: Georgia, serif; font-size: 29px; letter-spacing: -.03em; }
.route-copy > span { min-height: 64px; margin-top: 10px; color: var(--muted); font-size: 13px; font-weight: 800; line-height: 1.45; }

.route-progress { display: grid; align-items: center; grid-template-columns: 1fr auto; gap: 11px; margin-top: auto; }
.route-progress > i { height: 9px; overflow: hidden; border-radius: 8px; background: #e9e6da; }
.route-progress > i b { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.route-progress > span { color: var(--muted); font-size: 10px; font-weight: 900; }
.route-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 15px; padding-top: 15px; border-top: 2px solid #ece8db; font-size: 12px; font-weight: 900; }
.route-footer > span { color: #d4a83a; letter-spacing: .04em; }
.route-footer b { color: var(--accent); }

.note-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
  padding: 20px 24px;
  border: 2px solid #d3d9cc;
  border-radius: 23px;
  background: rgba(240, 247, 238, .92);
}

.note-card > span,
.fact-card > span {
  display: grid;
  width: 47px;
  height: 47px;
  flex: 0 0 47px;
  place-items: center;
  border-radius: 15px;
  background: var(--green);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 900;
}

.note-card p { margin: 0; color: var(--muted); font-size: 13px; font-weight: 800; line-height: 1.5; }
.note-card strong { color: var(--ink); }

.game-shell,
.result-shell {
  overflow: hidden;
  border: 3px solid var(--line);
  border-radius: 40px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.game-shell { padding: 34px; }
.mission-head { justify-content: space-between; gap: 24px; }
.mission-head > div { min-width: 0; }
.mission-head h1 { margin-bottom: 7px; font-family: Georgia, serif; font-size: clamp(37px, 5vw, 52px); letter-spacing: -.04em; }
.mission-head > div > p:last-child { margin: 0; color: var(--muted); font-size: 14px; font-weight: 800; }

.step-badge {
  display: grid;
  min-width: 82px;
  height: 82px;
  place-items: center;
  align-content: center;
  border: 6px solid var(--pale);
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}

.step-badge b { font-family: Georgia, serif; font-size: 28px; line-height: 1; }
.step-badge small { margin-top: 4px; font-size: 9px; font-weight: 900; }

.route-meter {
  gap: 13px;
  margin: 22px 0 25px;
}

.route-meter i {
  height: 10px;
  flex: 1;
  overflow: hidden;
  border-radius: 10px;
  background: #e7e4d8;
}

.route-meter i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .25s ease;
}

.route-meter span { color: var(--muted); font-size: 11px; font-weight: 900; }

.play-layout {
  display: grid;
  align-items: start;
  grid-template-columns: .9fr 1.1fr;
  gap: 22px;
}

.scene-board {
  position: relative;
  min-height: 580px;
  overflow: hidden;
  border: 3px solid color-mix(in srgb, var(--accent) 34%, #d8d2ba);
  border-radius: 31px;
  background: linear-gradient(155deg, var(--pale), #fff8e8);
}

.scene-grid {
  position: absolute;
  inset: 0;
  opacity: .32;
  background-image: linear-gradient(var(--accent) 1px, transparent 1px), linear-gradient(90deg, var(--accent) 1px, transparent 1px);
  background-size: 30px 30px;
}

.scene-label,
.scene-step {
  position: absolute;
  z-index: 2;
  top: 20px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.scene-label { left: 20px; padding: 10px 13px; background: #fff; color: var(--accent); box-shadow: 0 5px 12px rgba(45, 72, 66, .11); }
.scene-step { right: 20px; padding: 10px 12px; background: var(--accent); color: #fff; }

.scene-building {
  position: absolute;
  top: 85px;
  right: 28px;
  left: 28px;
  height: 245px;
}

.building-roof {
  position: absolute;
  top: 0;
  right: 4%;
  left: 4%;
  height: 62px;
  border: 7px solid var(--ink);
  border-radius: 20px 20px 4px 4px;
  background: var(--accent);
}

.building-wall {
  position: absolute;
  inset: 54px 0 0;
  border: 7px solid var(--ink);
  border-radius: 10px 10px 23px 23px;
  background: #fffdf7;
}

.building-wall i {
  position: absolute;
  top: 30px;
  width: 54px;
  height: 58px;
  border: 5px solid var(--ink);
  border-radius: 7px;
  background: #a8d4db;
}

.building-wall i:first-child { left: 25px; }
.building-wall i:nth-child(2) { right: 25px; }
.building-wall b {
  position: absolute;
  bottom: -1px;
  left: calc(50% - 35px);
  width: 70px;
  height: 105px;
  border: 6px solid var(--ink);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: var(--pale);
}

.route-line {
  position: absolute;
  right: -30px;
  bottom: -50px;
  left: 50%;
  height: 65px;
  border: 6px solid var(--ink);
  border-radius: 14px 0 0 14px;
  background: repeating-linear-gradient(135deg, #f7d0c8 0 15px, #fff 15px 30px);
  transform: skewX(-16deg);
}

.route-line i {
  position: absolute;
  top: -28px;
  right: 8px;
  left: 8px;
  border-top: 6px dashed var(--ink);
  content: "";
}

.route-line b {
  position: absolute;
  top: 8px;
  left: 20px;
  transform: skewX(16deg);
  font-family: Georgia, serif;
  font-size: 31px;
}

.route-line.is-open { background: repeating-linear-gradient(135deg, #b8dfca 0 15px, #fff 15px 30px); }
.route-line.is-open b { color: var(--green-dark); }

.scene-character {
  position: absolute;
  z-index: 2;
  bottom: 113px;
  left: 22px;
  width: 146px;
  text-align: center;
}

.scene-character svg { display: block; width: 100%; }
.scene-character strong {
  display: inline-block;
  margin-top: -10px;
  padding: 7px 13px;
  border: 3px solid var(--ink);
  border-radius: 13px;
  background: #fff;
  font-size: 14px;
}

.scene-callout {
  position: absolute;
  z-index: 3;
  right: 17px;
  bottom: 17px;
  left: 140px;
  min-height: 128px;
  padding: 20px 18px 16px 43px;
  border: 3px solid var(--ink);
  border-radius: 22px;
  background: #fffdf7;
  box-shadow: 0 10px 20px rgba(43, 75, 69, .13);
}

.scene-callout > span {
  position: absolute;
  top: 10px;
  left: 14px;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 40px;
  font-weight: 900;
}

.scene-callout p { margin: 0; font-size: 13px; font-weight: 900; line-height: 1.48; }

.decision-panel {
  min-width: 0;
  padding: 26px;
  border: 3px solid #e0dccb;
  border-radius: 31px;
  background: #fffefa;
}

.question-block {
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
}

.question-block > span {
  display: grid;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  place-items: center;
  border: 5px solid var(--pale);
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 900;
}

.question-block small { display: block; margin: 3px 0 5px; color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.question-block h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(23px, 2.8vw, 31px); letter-spacing: -.025em; line-height: 1.1; }
.answers-list { display: grid; gap: 11px; }

.answer-card {
  display: grid;
  min-height: 82px;
  align-items: center;
  grid-template-columns: 53px 1fr 36px;
  gap: 13px;
  padding: 11px 13px;
  border: 3px solid #d9d5c4;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 5px 0 #d8d4c3;
  text-align: left;
}

.answer-card:not(:disabled):hover { border-color: var(--accent); transform: translateY(-1px); }
.answer-icon {
  display: grid;
  min-width: 53px;
  min-height: 53px;
  place-items: center;
  border-radius: 15px;
  background: var(--pale);
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

.answer-text { font-size: 14px; font-weight: 900; line-height: 1.35; }
.answer-state {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #f1efe6;
  color: var(--muted);
  font-size: 17px;
  font-weight: 900;
}

.answer-card.is-wrong { border-color: #d99587; background: #fff3ef; box-shadow: 0 5px 0 #e5b5aa; }
.answer-card.is-wrong .answer-state { background: var(--coral); color: #fff; }
.answer-card.is-correct { border-color: #6da78f; background: #eef8f1; box-shadow: 0 5px 0 #acd1bc; }
.answer-card.is-correct .answer-state { background: var(--green); color: #fff; }

.decision-actions {
  align-items: stretch;
  gap: 11px;
  margin-top: 18px;
}

.hint-button {
  gap: 8px;
  padding: 0 17px;
  border: 2px solid #dfc675;
  background: #fff5c9;
  color: #795d1d;
}

.hint-button span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: #e6be49;
  color: #fff;
}

.hint-button:disabled { opacity: .55; cursor: default; }
.next-button { flex: 1; background: var(--accent); box-shadow: 0 7px 0 color-mix(in srgb, var(--accent) 70%, var(--ink)); }

.feedback-card {
  align-items: flex-start;
  gap: 13px;
  min-height: 80px;
  margin-top: 17px;
  padding: 13px 15px;
  border: 2px solid #d9ded6;
  border-radius: 19px;
  background: #f5f7f2;
}

.feedback-card > span {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 14px;
  background: #fff;
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 900;
}

.feedback-card p { margin: 2px 0 0; }
.feedback-card strong,
.feedback-card small { display: block; }
.feedback-card small { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.42; }
.feedback-card.success { border-color: #9bc7ad; background: #edf8f0; }
.feedback-card.success > span { background: var(--green); color: #fff; }
.feedback-card.error { border-color: #e3aa9d; background: #fff1ed; }
.feedback-card.error > span { background: var(--coral); color: #fff; }
.feedback-card.hint { border-color: #e1c86f; background: #fff8d8; }
.feedback-card.hint > span { background: var(--gold); color: #705719; }

.fact-card {
  align-items: flex-start;
  gap: 13px;
  margin-top: 13px;
  padding: 14px 15px;
  border: 2px solid #d4ddec;
  border-radius: 19px;
  background: #edf3fa;
}

.fact-card > span { width: 43px; height: 43px; flex-basis: 43px; border-radius: 13px; background: var(--blue); font-size: 19px; }
.fact-card p { margin: 1px 0 0; }
.fact-card strong,
.fact-card small { display: block; }
.fact-card small { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.43; }

.result-shell {
  display: grid;
  min-height: 590px;
  grid-template-columns: .95fr 1.05fr;
}

.result-art {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--pale), #fff3d5);
}

.result-ring {
  position: absolute;
  top: 68px;
  left: calc(50% - 154px);
  width: 308px;
  height: 308px;
  border: 3px dashed var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(255, 255, 255, .45);
}

.result-mark { position: absolute; z-index: 2; top: 100px; left: calc(50% - 111px); width: 222px; filter: drop-shadow(0 16px 22px rgba(42, 74, 68, .18)); }
.result-mark svg { display: block; width: 100%; }
.result-animal { position: absolute; z-index: 3; bottom: -17px; width: 175px; }
.result-animal svg { display: block; width: 100%; }
.result-left { left: 20px; }
.result-right { right: 20px; }

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

.result-copy h1 { margin-bottom: 15px; font-family: Georgia, serif; font-size: clamp(42px, 5vw, 59px); letter-spacing: -.05em; line-height: 1; }
.result-copy > p:not(.eyebrow) { margin-bottom: 16px; color: var(--muted); font-size: 16px; font-weight: 800; line-height: 1.5; }
.result-stars { color: var(--gold); font-size: 39px; letter-spacing: 5px; text-shadow: 0 3px 0 #cc9c2d; }
.result-stars span { color: #dedbd0; text-shadow: none; }

.result-stats {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 25px 0;
}

.result-stats span { padding: 13px 8px; border: 2px solid #e2decf; border-radius: 17px; background: #faf8f0; text-align: center; }
.result-stats strong,
.result-stats small { display: block; }
.result-stats strong { font-family: Georgia, serif; font-size: 23px; }
.result-stats small { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.result-actions { flex-wrap: wrap; gap: 11px; }
.secondary-button { padding: 0 18px; border: 2px solid var(--line); background: #fff; }
.secondary-button:hover { border-color: var(--accent); }

.data-error { margin-top: 60px; padding: 30px; border: 3px solid #d99587; border-radius: 26px; background: #fff5f1; }

@media (max-width: 930px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { align-items: center; padding: 48px 45px 38px; text-align: center; }
  .hero-art { padding: 30px 45px 45px; }
  .city-board { min-height: 390px; }
  .routes-grid { grid-template-columns: 1fr; }
  .route-card { min-height: 260px; }
  .route-copy > span { min-height: 0; }
  .play-layout { grid-template-columns: 1fr; }
  .scene-board { min-height: 500px; }
  .scene-building { right: 13%; left: 13%; }
  .result-shell { grid-template-columns: 1fr; }
  .result-art { min-height: 480px; }
}

@media (max-width: 720px) {
  .app { width: min(1120px, calc(100% - 20px)); padding-top: 11px; }
  .topbar { min-height: 53px; margin-bottom: 12px; }
  .brand-mark { width: 46px; height: 46px; flex-basis: 46px; border-radius: 15px; }
  .brand strong { font-size: 18px; }
  .brand small,
  .quiet-badge { display: none; }
  .hero { border-radius: 31px; }
  .hero-copy { padding: 38px 22px 31px; }
  .hero h1 { font-size: 46px; }
  .hero-copy > p:not(.eyebrow) { font-size: 15px; }
  .hero-art { padding: 18px 15px 24px; }
  .city-board { min-height: 330px; border-width: 6px; border-radius: 27px; }
  .mini-building { width: 74px; }
  .city-mark { width: 70px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .section-heading > p { text-align: left; }
  .principles { grid-template-columns: 1fr; }
  .principles article { min-height: 115px; }
  .game-shell { padding: 20px 14px; border-radius: 28px; }
  .mission-head { align-items: flex-start; }
  .mission-head h1 { font-size: 36px; }
  .step-badge { min-width: 67px; height: 67px; border-width: 5px; }
  .step-badge b { font-size: 23px; }
  .scene-board { min-height: 470px; border-radius: 24px; }
  .scene-building { right: 6%; left: 6%; }
  .decision-panel { padding: 20px 14px; border-radius: 24px; }
  .question-block h2 { font-size: 25px; }
  .answer-card { min-height: 77px; grid-template-columns: 49px 1fr 32px; gap: 10px; padding: 10px; }
  .answer-icon { min-width: 49px; min-height: 49px; font-size: 18px; }
  .decision-actions { flex-direction: column; }
  .hint-button,
  .next-button { width: 100%; }
  .result-art { min-height: 410px; }
  .result-ring { top: 43px; left: calc(50% - 125px); width: 250px; height: 250px; }
  .result-mark { top: 65px; left: calc(50% - 95px); width: 190px; }
  .result-animal { width: 145px; }
  .result-copy { padding: 38px 23px; }
  .result-copy h1 { font-size: 43px; }
}

@media (max-width: 480px) {
  .hero-stats { width: 100%; justify-content: space-between; gap: 10px; }
  .hero-stats span { min-width: 0; }
  .city-board { min-height: 285px; }
  .mini-building { width: 63px; }
  .city-road { opacity: .8; }
  .idea-section,
  .routes-section { margin-top: 37px; }
  .section-heading h2 { font-size: 34px; }
  .principles article { grid-template-columns: 56px 1fr; padding: 17px; }
  .principle-icon { width: 54px; height: 54px; border-radius: 17px; }
  .route-card { min-height: 340px; padding: 20px; }
  .note-card { align-items: flex-start; padding: 17px; }
  .route-meter { margin: 16px 0 18px; }
  .mission-head > div > p:last-child { font-size: 12px; }
  .scene-board { min-height: 445px; }
  .scene-label,
  .scene-step { top: 13px; padding: 8px 9px; font-size: 8px; }
  .scene-label { left: 13px; }
  .scene-step { right: 13px; }
  .scene-building { top: 67px; right: 10px; left: 10px; height: 205px; }
  .building-roof { height: 52px; border-width: 6px; }
  .building-wall { top: 46px; border-width: 6px; }
  .building-wall i { width: 45px; height: 48px; }
  .building-wall i:first-child { left: 15px; }
  .building-wall i:nth-child(2) { right: 15px; }
  .route-line { bottom: -38px; height: 55px; }
  .scene-character { bottom: 119px; left: 10px; width: 122px; }
  .scene-callout { right: 10px; bottom: 10px; left: 105px; min-height: 128px; padding: 17px 12px 13px 35px; }
  .scene-callout > span { left: 10px; font-size: 33px; }
  .scene-callout p { font-size: 11px; }
  .question-block { gap: 10px; }
  .question-block > span { width: 44px; height: 44px; flex-basis: 44px; border-width: 4px; border-radius: 14px; }
  .question-block h2 { font-size: 22px; }
  .answer-text { font-size: 13px; }
  .result-art { min-height: 360px; }
  .result-animal { width: 120px; }
  .result-left { left: 4px; }
  .result-right { right: 4px; }
  .result-stats small { font-size: 8px; }
}

@media (max-width: 390px) {
  .app { width: min(1120px, calc(100% - 14px)); }
  .brand > span:last-child { max-width: 175px; }
  .hero-copy { padding-inline: 16px; }
  .hero h1 { font-size: 42px; }
  .primary-button { padding-inline: 16px; }
  .city-board { min-height: 270px; }
  .mini-building { width: 58px; }
  .route-copy strong { font-size: 27px; }
  .game-shell { padding-inline: 10px; }
  .mission-head { gap: 8px; }
  .mission-head h1 { font-size: 32px; }
  .step-badge { min-width: 61px; height: 61px; }
  .scene-board { min-height: 425px; }
  .decision-panel { padding-inline: 10px; }
  .answer-card { grid-template-columns: 46px 1fr 29px; gap: 8px; }
  .answer-icon { min-width: 46px; min-height: 46px; }
  .result-copy { padding-inline: 18px; }
}

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