:root {
  --ink: #294f4c;
  --muted: #6b817d;
  --paper: #fffdf7;
  --cream: #fff6dc;
  --line: #ded4b8;
  --green: #56a57d;
  --green-dark: #347b60;
  --yellow: #f0b944;
  --coral: #e97767;
  --blue: #65acd0;
  --shadow: 0 20px 42px rgba(94, 82, 48, .15), 0 9px 0 rgba(165, 146, 97, .19);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: #fff8e4; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
  background:
    radial-gradient(circle at 13% 9%, rgba(245, 196, 78, .18), transparent 24%),
    radial-gradient(circle at 88% 16%, rgba(101, 172, 208, .16), transparent 22%),
    linear-gradient(135deg, #fff9e8, #f7f6e7 54%, #fff8df);
}

button { color: inherit; font: inherit; }
button:not(:disabled) { cursor: pointer; }
button:disabled { cursor: default; }

.page-dots {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .62;
  background-image: radial-gradient(circle, rgba(255,255,255,.9) 0 3px, transparent 3.5px);
  background-size: 42px 42px;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 19px;
}

.brand,
.sound-button,
.book-button {
  min-height: 50px;
  border: 2px solid #d8cdaa;
  border-radius: 17px;
  background: rgba(255,253,247,.93);
  box-shadow: 0 5px 0 rgba(169,151,106,.22);
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 4px 7px;
  text-align: left;
}

.brand > span:first-child { width: 43px; height: 43px; flex: 0 0 43px; }
.brand svg { width: 100%; height: 100%; }
.brand > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.brand small, .eyebrow, .card-kicker span, .game-head small, .section-title small, .route-copy small {
  color: #a16e2b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
}
.brand strong { font-size: 15px; white-space: nowrap; }
.top-actions { display: flex; gap: 9px; }
.sound-button { width: 50px; padding: 0; font-size: 24px; }
.book-button { padding: 0 15px; font-size: 14px; font-weight: 900; white-space: nowrap; }

.hero,
.how-card,
.route-page,
.game-shell,
.result-page,
.book-page,
.detail-page {
  border: 2px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(410px, .95fr);
  overflow: hidden;
  border-radius: 42px;
}

.hero-copy { min-width: 0; z-index: 2; padding: 48px 28px 38px 52px; }
h1, h2, p { overflow-wrap: anywhere; }
h1, h2 { margin: 0; letter-spacing: -.035em; }
.hero h1,
.route-page h1,
.result-page h1,
.book-page h1,
.detail-page h1 {
  font-family: Georgia, "Times New Roman", serif;
}
.hero h1 { max-width: 590px; margin-top: 10px; font-size: clamp(46px,5vw,68px); line-height: 1.01; }
.hero-copy > p { max-width: 610px; margin: 21px 0 25px; color: var(--muted); font-size: 18px; line-height: 1.5; }

.hero-actions,
.result-actions,
.center { display: flex; flex-wrap: wrap; gap: 12px; }

.primary,
.secondary,
.hint-button,
.back-link {
  min-height: 54px;
  padding: 0 22px;
  border-radius: 17px;
  font-weight: 900;
}
.primary { border: 0; color: white; background: var(--green); box-shadow: 0 7px 0 var(--green-dark); }
.primary:hover:not(:disabled) { background: #64b089; transform: translateY(-1px); }
.primary:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 2px 0 var(--green-dark); }
.secondary, .back-link { border: 2px solid #d8cdaa; background: #fffaf0; box-shadow: 0 6px 0 rgba(169,151,106,.22); }
.secondary:hover:not(:disabled), .back-link:hover { background: #fff2cf; }
.compact { min-height: 46px; padding: 0 17px; }
button:focus-visible { outline: 4px solid rgba(98,172,214,.42); outline-offset: 3px; }

.hero-legend {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
  margin-top: 30px;
}
.legend-card {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 2px solid color-mix(in srgb, var(--group) 55%, #d7cfba);
  border-radius: 15px;
  background: color-mix(in srgb, var(--group) 12%, #fffdf7);
}
.legend-card > span {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--group);
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 900;
}
.legend-card b { min-width: 0; font-size: 12px; }

.hero-scene {
  min-width: 0;
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255,255,255,.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.45) 1px, transparent 1px),
    linear-gradient(145deg, #dcefdc, #c9e2dd);
  background-size: 30px 30px, 30px 30px, auto;
}
.hero-scene::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  left: 50%;
  top: 45%;
  border: 44px solid rgba(255,255,255,.28);
  border-radius: 50%;
  transform: translate(-50%,-50%);
}
.hero-plate {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 43%;
  width: 250px;
  height: 250px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  overflow: hidden;
  border: 10px solid #fffdf6;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 18px 30px rgba(49,78,67,.2);
  transform: translate(-50%,-50%) rotate(-4deg);
}
.hero-plate > span { display: flex; align-items: center; justify-content: center; border: 2px solid rgba(54,91,88,.16); }
.hero-plate .plate-half { grid-row: 1 / 3; flex-direction: column; background: #e8f4df; }
.hero-plate .grain { background: #fff0c7; }
.hero-plate .protein { background: #fce3dc; }
.hero-plate .food-svg { width: 76px; height: 76px; }
.hero-plate .plate-half .food-svg { width: 82px; height: 82px; margin: -9px 0; }
.hero-person { position: absolute; z-index: 2; bottom: -24px; width: 195px; height: 315px; object-fit: contain; }
.hero-person.left { left: -12px; }
.hero-person.right { right: -15px; }
.hero-water { position: absolute; z-index: 4; right: 18px; top: 26px; display: flex; align-items: center; gap: 3px; padding: 5px 10px 5px 4px; border-radius: 20px; background: rgba(255,255,255,.88); box-shadow: 0 6px 15px rgba(46,89,87,.16); }
.hero-water .food-svg { width: 52px; height: 52px; }
.hero-water b { font-size: 12px; }

.how-card {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 0;
  margin-top: 29px;
  padding: 22px 25px;
  border-radius: 29px;
}
.how-card > div { display: flex; align-items: center; gap: 13px; padding: 3px 19px; }
.how-card > div + div { border-left: 2px dashed #ddd3b6; }
.how-card span, .route-number, .book-route h2 span {
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--yellow);
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 900;
}
.how-card p { margin: 0; }
.how-card p b, .how-card p small { display: block; }
.how-card p small { margin-top: 3px; color: var(--muted); line-height: 1.35; }

.home-routes { margin-top: 40px; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-title h1, .section-title h2 { margin-top: 5px; font-size: 35px; }
.section-title > b { padding: 8px 13px; border-radius: 13px; color: var(--green-dark); background: #e3f1e6; white-space: nowrap; }
.route-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 17px; }
.route-card {
  min-width: 0;
  min-height: 305px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
  padding: 21px;
  border: 2px solid #d8cdb0;
  border-radius: 28px;
  text-align: left;
  background: #fffaf0;
  box-shadow: 0 8px 0 rgba(163,142,91,.18);
  transition: transform .16s ease, box-shadow .16s ease;
}
.route-card:hover { transform: translateY(-4px); box-shadow: 0 12px 0 rgba(163,142,91,.18); }
.route-1 { background: linear-gradient(145deg,#f1f7e8,#fffdf4); }
.route-2 { background: linear-gradient(145deg,#fff0dc,#fffdf4); }
.route-3 { background: linear-gradient(145deg,#e8f4f5,#fffdf4); }
.route-number { position: absolute; left: 17px; top: 16px; z-index: 2; }
.route-foods { width: 100%; height: 116px; display: flex; align-items: center; justify-content: center; padding-left: 24px; }
.route-foods .food-svg { width: 86px; height: 86px; margin-left: -24px; filter: drop-shadow(0 7px 5px rgba(55,74,62,.12)); }
.route-copy { display: flex; flex-direction: column; align-items: flex-start; }
.route-copy strong { margin: 5px 0 6px; font-family: Georgia,serif; font-size: 25px; }
.route-copy em { min-height: 45px; color: var(--muted); font-size: 14px; font-style: normal; line-height: 1.4; }
.route-copy b { margin-top: 14px; color: var(--green-dark); }
.adult-note { max-width: 850px; margin: 27px auto 0; padding: 15px 20px; border-radius: 18px; color: var(--muted); text-align: center; background: rgba(255,253,247,.72); }

.route-page, .book-page { padding: 36px; border-radius: 38px; }
.route-grid.large .route-card { min-height: 330px; }
.rule-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; margin-top: 28px; padding-top: 24px; border-top: 2px dashed #ddd3b6; }

.game-shell { overflow: hidden; border-radius: 38px; }
.game-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 27px 31px 23px; border-bottom: 2px dashed #ddd4bd; }
.game-head h1 { margin-top: 5px; font-family: Georgia,serif; font-size: 38px; }
.game-head p { margin: 4px 0 0; color: var(--muted); }
.progress { width: 322px; flex: 0 0 322px; display: grid; grid-template-columns: repeat(5,1fr); gap: 7px; }
.progress span { width: 28px; height: 28px; display: grid; place-items: center; justify-self: center; border-radius: 50%; color: #8a877b; background: #eeeade; font-size: 10px; font-weight: 900; }
.progress .active { color: white; background: var(--yellow); box-shadow: 0 4px 0 #d79c2e; }
.progress .done { color: white; background: var(--green); }
.game-layout { display: grid; grid-template-columns: 430px minmax(0,1fr); gap: 20px; padding: 23px; background: linear-gradient(135deg,#fffaf0,#f7f7ec); }
.meal-card, .question-card { min-width: 0; border: 2px solid #dfd5ba; border-radius: 29px; background: #fffdf8; box-shadow: 0 8px 18px rgba(89,76,44,.08); }
.meal-card { padding: 20px; }
.card-kicker { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-kicker strong { font-family: Georgia,serif; font-size: 23px; text-align: right; }

.plate-wrap { position: relative; width: min(355px,100%); margin: 19px auto 15px; padding-right: 52px; }
.meal-plate {
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  overflow: hidden;
  border: 11px solid #f7f0dd;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 2px #d6ccb0, 0 12px 20px rgba(72,82,59,.14);
}
.plate-slot { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 8px; border: 2px solid rgba(54,91,88,.12); background: color-mix(in srgb,var(--group) 17%,#fff); text-align: center; }
.plate-slot.produce { grid-row: 1 / 3; }
.plate-slot .food-svg { width: 80px; height: 80px; }
.plate-slot.produce .food-svg { width: 96px; height: 96px; }
.plate-slot b, .water-slot b { max-width: 110px; font-size: 11px; line-height: 1.15; }
.plate-slot em { padding: 2px 7px; border-radius: 10px; color: #9f4f41; background: #ffe1d9; font-size: 9px; font-style: normal; font-weight: 900; }
.empty-mark { width: 58px; height: 58px; display: grid; place-items: center; border: 3px dashed var(--group); border-radius: 50%; color: var(--group); font-family: Georgia,serif; font-size: 33px; font-weight: 900; background: rgba(255,255,255,.58); }
.water-slot { position: absolute; right: 0; bottom: 10px; width: 82px; min-height: 109px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px; border: 3px solid color-mix(in srgb,var(--group) 55%,#d7cfba); border-radius: 21px; background: color-mix(in srgb,var(--group) 14%,#fff); text-align: center; box-shadow: 0 7px 0 rgba(80,120,135,.13); }
.water-slot .food-svg { width: 59px; height: 59px; }
.water-slot .empty-mark { width: 48px; height: 48px; font-size: 27px; }
.guide { display: grid; grid-template-columns: 76px 1fr; align-items: center; overflow: hidden; border: 2px solid #cbdad3; border-radius: 18px; background: #eaf5f1; }
.guide img { width: 76px; height: 94px; object-fit: contain; align-self: end; }
.guide p { margin: 0; padding: 10px 12px; color: var(--muted); font-size: 12px; line-height: 1.45; }

.question-card { padding: 25px; }
.question-card h2 { margin-top: 7px; font-family: Georgia,serif; font-size: 28px; line-height: 1.15; }
.food-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; margin-top: 22px; }
.food-options.build-options { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-top: 14px; }
.food-card {
  min-width: 0;
  min-height: 151px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 6px;
  border: 2px solid color-mix(in srgb,var(--food-accent) 45%,#d6cdb5);
  border-radius: 21px;
  background: color-mix(in srgb,var(--food-accent) 9%,#fffdf7);
  box-shadow: 0 6px 0 rgba(142,122,75,.13);
  transition: transform .15s ease, box-shadow .15s ease;
}
.food-card:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 9px 0 rgba(142,122,75,.13); }
.food-card .food-svg { width: 78px; height: 78px; }
.food-card span { min-width: 0; text-align: center; }
.food-card strong, .food-card small { display: block; overflow-wrap: anywhere; }
.food-card strong { font-size: 14px; line-height: 1.12; }
.food-card small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.15; }
.food-card i { position: absolute; right: 7px; top: 7px; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); font-style: normal; font-weight: 900; }
.food-card.is-selected { border-color: var(--green); background: #e8f6eb; box-shadow: 0 0 0 3px rgba(86,165,125,.18), 0 6px 0 rgba(52,123,96,.2); }
.food-card.is-wrong { border-color: var(--coral); background: #fff0eb; animation: nudge .24s ease; }
.food-card.is-hint { border-color: var(--yellow); background: #fff4c8; box-shadow: 0 0 0 4px rgba(240,185,68,.24), 0 6px 0 rgba(177,126,31,.18); }
.clue-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; margin: 13px 0 0; padding: 0; counter-reset: clues; list-style: none; }
.clue-list li { min-height: 39px; display: flex; align-items: center; padding: 7px 9px 7px 35px; position: relative; border-radius: 12px; background: #f4f1e3; font-size: 12px; font-weight: 900; }
.clue-list li::before { counter-increment: clues; content: counter(clues); position: absolute; left: 8px; width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--yellow); font-size: 10px; }
.selection-count { margin-top: 10px; color: var(--muted); font-size: 13px; }
.selection-count b { color: var(--green-dark); }
.build-options .food-card { min-height: 112px; }
.build-options .food-card .food-svg { width: 58px; height: 58px; }
.build-options .food-card strong { font-size: 11px; }
.build-options .food-card small { display: none; }
.check-button { width: 100%; margin-top: 14px; }

.feedback-placeholder, .feedback { margin: 0 23px; border-radius: 18px; }
.feedback-placeholder { padding: 17px 19px; border: 2px dashed #ddd3b8; color: var(--muted); background: #fffaf0; }
.feedback { display: flex; align-items: center; gap: 13px; padding: 15px 18px; border: 2px solid transparent; }
.feedback > span { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 50%; color: white; font-size: 23px; font-weight: 900; }
.feedback strong, .feedback p { display: block; margin: 0; }
.feedback p { margin-top: 3px; line-height: 1.4; }
.feedback.success { border-color: #abd1b2; background: #dff1df; }
.feedback.success > span { background: var(--green); }
.feedback.error { border-color: #efbeb2; background: #fff0eb; }
.feedback.error > span { background: var(--coral); }
.feedback.hint { border-color: #e3c36e; background: #fff3c8; }
.feedback.hint > span { background: var(--yellow); }
.game-actions { display: flex; justify-content: space-between; gap: 14px; padding: 20px 23px 27px; }
.hint-button { border: 2px solid #d5b75f; background: #fff1b9; box-shadow: 0 6px 0 rgba(180,134,36,.24); }
.hint-button:disabled { opacity: .5; box-shadow: none; }

.result-page { padding: 44px 35px 38px; border-radius: 39px; text-align: center; }
.result-page h1 { margin-top: 8px; font-size: 55px; }
.result-page > p { color: var(--muted); font-size: 18px; }
.stars { margin: 20px 0 12px; }
.stars span { color: #d8d4c8; font-size: 52px; text-shadow: 0 5px 0 rgba(96,79,40,.11); }
.stars .filled { color: var(--yellow); }
.stats { width: min(620px,100%); display: grid; grid-template-columns: repeat(3,1fr); gap: 11px; margin: 22px auto; }
.stats > div { padding: 13px; border: 2px solid #ddd3b7; border-radius: 18px; background: #fffaf0; }
.stats b, .stats span { display: block; }
.stats b { font-size: 27px; }
.stats span { color: var(--muted); font-size: 12px; }
.result-groups { display: grid; grid-template-columns: repeat(4,1fr); gap: 11px; margin: 25px 0; }
.result-groups > div { min-height: 135px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 13px; border: 2px solid color-mix(in srgb,var(--group) 55%,#d6cdb5); border-radius: 22px; background: color-mix(in srgb,var(--group) 11%,#fff); }
.result-groups span { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--group); font-family: Georgia,serif; font-size: 24px; font-weight: 900; }
.result-groups b { margin-top: 7px; }
.result-groups small { margin-top: 3px; color: var(--muted); }
.field-strip { width: min(780px,100%); display: flex; align-items: center; justify-content: center; gap: 1px; margin: 22px auto 29px; padding: 8px 15px; border-radius: 25px; background: #e9f2df; }
.field-strip img { width: 82px; height: 82px; object-fit: contain; margin: 0 -7px; }
.field-strip span { margin-left: 14px; text-align: left; }
.field-strip b, .field-strip small { display: block; }
.field-strip small { margin-top: 3px; color: var(--muted); }
.result-actions { justify-content: center; }

.book-page { padding: 34px; }
.book-route + .book-route { margin-top: 30px; padding-top: 26px; border-top: 2px dashed #ddd3b6; }
.book-route h2 { display: flex; align-items: center; gap: 10px; font-family: Georgia,serif; font-size: 27px; }
.book-route h2 span { width: 35px; height: 35px; flex-basis: 35px; font-size: 17px; }
.book-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 11px; margin-top: 15px; }
.book-card { min-width: 0; min-height: 162px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px 7px 9px; border: 2px solid #ddd3b6; border-radius: 20px; background: #fffaf0; }
.book-card.is-open { box-shadow: 0 6px 0 rgba(141,120,71,.14); }
.book-card.is-open:hover { transform: translateY(-2px); background: #f3f8e9; }
.book-card i { position: absolute; left: 8px; top: 8px; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--green); font-size: 10px; font-style: normal; font-weight: 900; }
.book-card strong { margin-top: 8px; font-size: 12px; line-height: 1.2; text-align: center; }
.mini-plate { width: 100px; height: 88px; display: grid; grid-template-columns: repeat(2,1fr); padding: 6px; border: 5px solid #efe5cd; border-radius: 50%; background: white; }
.mini-plate .food-svg { width: 40px; height: 36px; }
.book-card.is-locked { color: #aaa493; background: #f3f0e6; }
.lock { width: 65px; height: 65px; display: grid; place-items: center; border: 3px dashed #c8c0ad; border-radius: 50%; font-family: Georgia,serif; font-size: 31px; }
.book-page .center { justify-content: center; margin-top: 31px; }

.detail-page { padding: 31px; border-radius: 38px; }
.back-link { border: 0; }
.detail-grid { display: grid; grid-template-columns: 400px minmax(0,1fr); gap: 30px; margin-top: 27px; }
.detail-visual { min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; overflow: hidden; border: 2px solid #d9d0b8; border-radius: 31px; background: linear-gradient(145deg,#f2f6e7,#fff8df); }
.detail-visual .plate-wrap { z-index: 2; }
.source-plant { width: 190px; height: 190px; margin-top: -65px; object-fit: contain; opacity: .9; }
.detail-copy h1 { margin: 8px 0 13px; font-size: 46px; }
.detail-copy > p { color: var(--muted); font-size: 17px; line-height: 1.55; }
.detail-foods { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin-top: 18px; }
.detail-foods > div { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px; border: 2px solid #ddd4bd; border-radius: 17px; background: #fffaf0; }
.detail-foods .food-svg { width: 58px; height: 58px; flex: 0 0 58px; }
.detail-foods b, .detail-foods small { display: block; }
.detail-foods small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.brain-note { display: flex; align-items: center; gap: 11px; margin-top: 18px; padding: 15px; border-radius: 18px; background: #e3f1e6; }
.brain-note span { color: var(--green-dark); font-size: 28px; }
.brain-note p { margin: 0; line-height: 1.45; }

@keyframes nudge { 0%,100%{transform:translateX(0)} 35%{transform:translateX(-5px)} 70%{transform:translateX(5px)} }

@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0,1fr) 380px; }
  .hero-copy { padding-left: 37px; }
  .hero-person { width: 170px; }
  .game-layout { grid-template-columns: 380px minmax(0,1fr); }
  .food-options { grid-template-columns: 1fr; }
  .food-card { min-height: 96px; flex-direction: row; justify-content: flex-start; padding: 7px 12px; }
  .food-card .food-svg { width: 70px; height: 70px; flex: 0 0 70px; }
  .food-card span { text-align: left; }
  .food-options.build-options { grid-template-columns: repeat(2,1fr); }
  .build-options .food-card { min-height: 84px; }
  .book-grid { grid-template-columns: repeat(4,1fr); }
  .detail-grid { grid-template-columns: 350px minmax(0,1fr); }
}

@media (max-width: 780px) {
  .app { width: min(100% - 20px,1120px); padding-top: 10px; }
  .topbar { gap: 7px; }
  .brand { padding-right: 8px; }
  .brand small { display: none; }
  .brand strong { font-size: 14px; }
  .brand > span:first-child { width: 40px; height: 40px; flex-basis: 40px; }
  .sound-button { width: 45px; min-height: 45px; }
  .book-button { min-height: 45px; padding: 0 9px; font-size: 12px; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 38px 27px 31px; }
  .hero h1 { font-size: 49px; }
  .hero-scene { min-height: 420px; }
  .hero-person { width: 200px; }
  .hero-person.left { left: 5%; }
  .hero-person.right { right: 5%; }
  .how-card { grid-template-columns: 1fr; }
  .how-card > div { padding: 12px 4px; }
  .how-card > div + div { border-left: 0; border-top: 2px dashed #ddd3b6; }
  .route-grid { grid-template-columns: 1fr; }
  .route-card { min-height: 0; display: grid; grid-template-columns: 125px 1fr; align-items: center; }
  .route-foods { height: 125px; padding-left: 19px; }
  .route-foods .food-svg { width: 70px; height: 70px; }
  .route-copy em { min-height: 0; }
  .section-title { align-items: flex-start; flex-direction: column; }
  .route-page, .book-page { padding: 25px 21px; }
  .rule-strip { grid-template-columns: repeat(2,1fr); }
  .game-head { align-items: flex-start; flex-direction: column; padding: 24px 21px; }
  .progress { width: 100%; flex-basis: auto; grid-template-columns: repeat(10,1fr); gap: 3px; }
  .game-layout { grid-template-columns: 1fr; padding: 17px; }
  .meal-card { display: grid; grid-template-columns: minmax(0,1fr) 170px; gap: 12px; align-items: center; }
  .card-kicker { grid-column: 1 / -1; }
  .guide { grid-template-columns: 68px 1fr; }
  .guide img { width: 68px; }
  .question-card { padding: 23px; }
  .food-options { grid-template-columns: repeat(3,1fr); }
  .food-card { min-height: 133px; flex-direction: column; justify-content: center; padding: 7px; }
  .food-card span { text-align: center; }
  .food-options.build-options { grid-template-columns: repeat(4,1fr); }
  .build-options .food-card { min-height: 105px; }
  .feedback-placeholder, .feedback { margin: 0 17px; }
  .game-actions { padding: 18px 17px 24px; }
  .result-groups { grid-template-columns: repeat(2,1fr); }
  .book-grid { grid-template-columns: repeat(3,1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-visual { min-height: 430px; }
}

@media (max-width: 540px) {
  .app { width: calc(100% - 16px); }
  .topbar { align-items: flex-start; }
  .brand { min-height: 52px; gap: 6px; }
  .brand > span:first-child { width: 37px; height: 37px; flex-basis: 37px; }
  .brand strong { width: 104px; white-space: normal; line-height: 1.05; }
  .top-actions { gap: 5px; }
  .sound-button { width: 43px; min-height: 43px; }
  .book-button { min-height: 43px; padding: 0 7px; font-size: 10px; }
  .hero, .game-shell, .route-page, .result-page, .book-page, .detail-page { border-radius: 27px; }
  .hero-copy { padding: 29px 19px 26px; }
  .hero h1 { font-size: 39px; }
  .hero-copy > p { margin: 16px 0 20px; font-size: 16px; }
  .hero-actions, .hero-actions button, .result-actions, .result-actions button { width: 100%; }
  .hero-legend { grid-template-columns: 1fr; margin-top: 24px; }
  .hero-scene { min-height: 350px; }
  .hero-plate { width: 210px; height: 210px; }
  .hero-plate .food-svg { width: 62px; height: 62px; }
  .hero-plate .plate-half .food-svg { width: 68px; height: 68px; }
  .hero-person { width: 145px; height: 245px; }
  .hero-person.left { left: -6px; }
  .hero-person.right { right: -6px; }
  .hero-water { right: 6px; top: 9px; }
  .hero-water b { display: none; }
  .how-card { padding: 15px 18px; }
  .section-title h1, .section-title h2 { font-size: 29px; }
  .route-page, .book-page { padding: 23px 13px; }
  .route-card { grid-template-columns: 96px 1fr; padding: 16px 13px; }
  .route-number { width: 34px; height: 34px; left: 9px; top: 9px; font-size: 16px; }
  .route-foods { width: 100px; height: 105px; }
  .route-foods .food-svg { width: 57px; height: 57px; margin-left: -20px; }
  .route-copy strong { font-size: 21px; }
  .route-copy em { font-size: 12px; }
  .route-copy b { font-size: 12px; }
  .rule-strip { grid-template-columns: 1fr; }
  .game-head h1 { font-size: 33px; }
  .progress span { width: 25px; height: 25px; font-size: 9px; }
  .game-layout { padding: 10px; }
  .meal-card { display: block; padding: 13px; }
  .card-kicker strong { font-size: 19px; }
  .plate-wrap { width: min(318px,100%); margin-top: 13px; padding-right: 62px; }
  .water-slot { width: 76px; min-height: 102px; }
  .plate-slot .food-svg { width: 65px; height: 65px; }
  .plate-slot.produce .food-svg { width: 78px; height: 78px; }
  .plate-slot b, .water-slot b { font-size: 10px; }
  .guide { margin-top: 12px; }
  .question-card { padding: 19px 13px; }
  .question-card h2 { font-size: 25px; }
  .clue-list { grid-template-columns: 1fr; }
  .food-options { grid-template-columns: 1fr; gap: 9px; }
  .food-card { min-height: 88px; flex-direction: row; justify-content: flex-start; padding: 6px 12px; }
  .food-card .food-svg { width: 68px; height: 68px; flex: 0 0 68px; }
  .food-card span { text-align: left; }
  .food-options.build-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .build-options .food-card { min-height: 92px; flex-direction: column; justify-content: center; padding: 6px; }
  .build-options .food-card .food-svg { width: 54px; height: 54px; flex-basis: 54px; }
  .build-options .food-card span { text-align: center; }
  .feedback { align-items: flex-start; padding: 13px; }
  .feedback p { font-size: 13px; }
  .game-actions { flex-direction: column; }
  .game-actions button { width: 100%; }
  .result-page { padding: 34px 14px 28px; }
  .result-page h1 { font-size: 38px; }
  .stats { grid-template-columns: 1fr; }
  .result-groups { gap: 8px; }
  .result-groups > div { min-height: 122px; padding: 9px; }
  .result-groups b { font-size: 13px; }
  .field-strip { flex-wrap: wrap; }
  .field-strip img { width: 66px; height: 66px; }
  .field-strip span { width: 100%; margin: 5px 0 0; text-align: center; }
  .book-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .book-card { min-height: 145px; }
  .detail-page { padding: 21px 12px; }
  .detail-visual { min-height: 390px; padding: 12px; }
  .detail-copy h1 { font-size: 36px; }
  .detail-foods { grid-template-columns: 1fr; }
}

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