:root {
  --ink: #26362f;
  --muted: #66736d;
  --paper: #fffaf0;
  --paper-2: #f4ecd9;
  --coral: #d76149;
  --coral-soft: #f8dfd4;
  --green: #315f52;
  --green-soft: #deeee7;
  --gold: #d4a13d;
  --sky: #dcecf2;
  --line: #dbcdb5;
  --shadow: 0 14px 34px rgba(61, 47, 31, .14);
  --radius: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(215,97,73,.12), transparent 26rem),
    radial-gradient(circle at 90% 5%, rgba(49,95,82,.12), transparent 25rem),
    #f8f1e3;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  line-height: 1.75;
  overflow-x: hidden;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
.skip-link { position: fixed; left: 10px; top: -80px; z-index: 999; background: #fff; padding: 10px 14px; border-radius: 10px; }
.skip-link:focus { top: 10px; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  min-height: 64px; padding: 8px max(14px, env(safe-area-inset-left)) 8px max(14px, env(safe-area-inset-right));
  background: rgba(255,250,240,.92); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(109,86,57,.12);
}
.back-link { justify-self: start; text-decoration: none; font-weight: 800; font-size: .88rem; color: var(--green); }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand-mark { font-size: 1.55rem; }
.brand strong { display: block; font-size: .95rem; white-space: nowrap; }
.brand small { display: block; color: var(--muted); font-size: .68rem; }
.sound-button {
  justify-self: end; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink);
  padding: 8px 12px; font-weight: 800; cursor: pointer; min-height: 42px;
}
.sound-button[aria-pressed="true"] { background: var(--green); color: #fff; border-color: var(--green); }
.intro { max-width: 820px; margin: 0 auto; padding: 56px 20px 28px; text-align: center; }
.eyebrow { margin: 0 0 6px; font-size: .8rem; font-weight: 900; letter-spacing: .12em; color: var(--coral); text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2.3rem, 9vw, 4.8rem); line-height: 1.08; letter-spacing: .01em; }
.lead { margin: 18px auto 0; max-width: 650px; font-size: clamp(1rem, 3.5vw, 1.18rem); }
.intro-actions { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 24px; }
.start-button, .primary-link {
  border: 0; border-radius: 999px; background: var(--coral); color: white; font-weight: 900; padding: 13px 22px;
  box-shadow: 0 8px 20px rgba(215,97,73,.25); cursor: pointer; text-decoration: none;
}
.start-button:active, .primary-link:active { transform: translateY(1px) scale(.99); }
.quiet-link { font-weight: 800; color: var(--green); text-underline-offset: 4px; }
.sound-note { font-size: .78rem; color: var(--muted); margin: 14px auto 0; }
.game-shell { width: min(100% - 24px, 960px); margin: 0 auto 56px; scroll-margin-top: 80px; }
.hud {
  position: sticky; top: 66px; z-index: 30; padding: 12px 14px 10px; border: 1px solid rgba(112,88,57,.14); border-radius: 18px;
  background: rgba(255,250,240,.96); box-shadow: 0 8px 24px rgba(63,48,30,.08); backdrop-filter: blur(12px);
}
.hud-top { display: flex; justify-content: space-between; gap: 12px; align-items: end; }
.hud-top > div { display: grid; gap: 2px; }
.next-box { text-align: right; min-width: 0; }
.hud-label { color: var(--muted); font-size: .66rem; font-weight: 900; letter-spacing: .11em; }
#score-text, #next-text { font-size: .88rem; line-height: 1.3; }
.stamp-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-top: 10px; }
.stamp { display: grid; place-items: center; height: 32px; border: 1px dashed #cbbda8; border-radius: 10px; background: #f1e9db; filter: grayscale(1); opacity: .48; transition: .35s ease; }
.stamp.is-done { background: #fff; border-style: solid; border-color: var(--gold); filter: none; opacity: 1; transform: translateY(-2px) rotate(-3deg); box-shadow: 0 4px 9px rgba(101,77,45,.12); }
.progress-track { height: 7px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: #e7dece; }
.progress-bar { width: 0%; height: 100%; background: linear-gradient(90deg, var(--coral), var(--gold), var(--green)); border-radius: inherit; transition: width .55s cubic-bezier(.22,.72,.2,1); }
.guide-line { display: flex; gap: 12px; align-items: center; margin: 14px auto; padding: 11px 14px; border-radius: 16px; background: #fff; border: 1px solid #e3d9c8; }
.guide-face { display: grid; place-items: center; flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 900; transition: .3s ease; }
.guide-line p { margin: 0; font-size: .9rem; }
.guide-face.is-happy { transform: translateY(-4px) rotate(4deg); background: #fff1c9; }
.venue {
  position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  padding: 58px 12px 18px; border: 2px solid #d4c3a9; border-radius: 28px;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(128,99,62,.08) 49.5%, rgba(128,99,62,.08) 50.5%, transparent 50.5%),
    linear-gradient(180deg, var(--sky) 0 38%, #efe3ca 38% 100%);
  box-shadow: var(--shadow); overflow: hidden;
}
.venue::before { content: ""; position: absolute; inset: 38% 0 auto; height: 2px; background: rgba(83,71,53,.18); }
.venue-title { position: absolute; top: 11px; left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-weight: 900; color: #3d504a; }
.venue-title small { font-size: .68rem; color: var(--muted); font-weight: 700; }
.spot {
  position: relative; min-height: 158px; padding: 12px 10px 10px; overflow: hidden;
  border: 1px solid rgba(70,58,39,.17); border-radius: 18px; background: rgba(255,255,255,.88); color: var(--ink);
  cursor: pointer; box-shadow: 0 7px 16px rgba(62,48,29,.08); transition: transform .2s ease, box-shadow .2s ease, background .35s ease;
  touch-action: manipulation;
}
.spot:hover, .spot:focus-visible { transform: translateY(-3px); box-shadow: 0 12px 22px rgba(62,48,29,.14); outline: 3px solid rgba(215,97,73,.38); outline-offset: 2px; }
.spot:active { transform: scale(.985); }
.spot.is-done { background: #fffdf7; border-color: rgba(49,95,82,.45); box-shadow: 0 8px 22px rgba(49,95,82,.12); }
.spot.is-done::after { content: "できた ✓"; position: absolute; top: 8px; right: 8px; background: var(--green); color: #fff; border-radius: 999px; padding: 3px 7px; font-size: .62rem; font-weight: 900; }
.spot-kicker { display: block; color: var(--coral); font-size: .68rem; font-weight: 900; letter-spacing: .08em; }
.spot-icon { display: grid; place-items: center; height: 72px; margin: 1px auto 3px; font-size: 2.25rem; }
.spot strong { display: block; font-size: .95rem; }
.spot small { display: block; margin-top: 1px; font-size: .7rem; color: var(--muted); line-height: 1.4; }
.shelf-visual { grid-template-columns: repeat(4, 10px); align-items: end; justify-content: center; gap: 5px; padding-top: 12px; border-bottom: 5px solid #8c6b45; }
.book { width: 10px; height: 34px; border-radius: 2px 2px 0 0; background: #d7d0c2; transform: translateY(17px); opacity: .18; transition: .45s cubic-bezier(.2,.7,.2,1); }
.b2 { height: 45px; }.b3 { height: 29px; }.b4 { height: 40px; }
.spot-shelf.is-done .book { opacity: 1; transform: translateY(0); }
.spot-shelf.is-done .b1 { background: var(--coral); }.spot-shelf.is-done .b2 { background: #dca64d; }.spot-shelf.is-done .b3 { background: #65988a; }.spot-shelf.is-done .b4 { background: #657da0; }
.note-visual { display: flex; justify-content: center; gap: 4px; }
.note-visual span { display: grid; place-items: center; width: 34px; height: 30px; border-radius: 4px; background: #eee4d3; color: #a69781; transform: translateY(9px) rotate(-4deg); transition: .45s ease; }
.note-visual span:nth-child(2) { transform: translateY(14px) rotate(6deg); }
.note-visual span:nth-child(3) { transform: translateY(5px) rotate(2deg); }
.spot-message.is-done .note-visual span { background: #fff2a8; color: #8e532f; transform: translateY(0) rotate(-7deg) scale(1.06); }
.spot-message.is-done .note-visual span:nth-child(2) { transform: translateY(-7px) rotate(5deg) scale(1.06); }
.spot-message.is-done .note-visual span:nth-child(3) { transform: translateY(1px) rotate(8deg) scale(1.06); }
.chair-visual { position: relative; transform: translateX(16px); transition: .5s cubic-bezier(.22,.75,.2,1); }
.cushion { position: absolute; right: 5px; bottom: 10px; color: #b8ad9e; font-size: 1rem; opacity: 0; transform: scale(.4); transition: .4s ease .12s; }
.spot-chair.is-done .chair-visual { transform: translateX(-3px); }
.spot-chair.is-done .cushion { color: var(--coral); opacity: 1; transform: scale(1); }
.guide-visual { display: flex; gap: 9px; justify-content: center; }
.sign-arrow { display: inline-block; opacity: .2; transform: translateX(-14px); transition: .45s ease; color: var(--green); }
.spot-guide.is-done .sign-arrow { opacity: 1; transform: translateX(0); }
.bridge-visual { display: flex; align-items: center; justify-content: center; gap: 0; }
.env { opacity: .6; transition: .45s ease; }
.env-a { transform: translateX(19px) rotate(-10deg); }.env-b { transform: translateX(-19px) rotate(10deg); }
.bridge-line { width: 0; height: 3px; border-radius: 99px; background: linear-gradient(90deg, var(--coral), var(--gold)); transition: width .55s ease .12s; }
.spot-bridge.is-done .bridge-line { width: 44px; }
.spot-bridge.is-done .env { opacity: 1; transform: translateX(0) rotate(0); }
.nature-visual { position: relative; }
.paw { position: absolute; opacity: 0; color: #6d7f61; font-size: 1.3rem; transition: .35s ease; }
.p1 { left: 25%; top: 42%; }.p2 { left: 39%; top: 29%; }.p3 { left: 53%; top: 17%; }
.spot-nature.is-done .p1 { opacity: 1; transition-delay: .05s; }.spot-nature.is-done .p2 { opacity: 1; transition-delay: .2s; }.spot-nature.is-done .p3 { opacity: 1; transition-delay: .35s; }
.kindness-sparkles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.sparkle { position: absolute; font-size: 1.2rem; animation: sparkle 1.4s ease-out forwards; }
@keyframes sparkle { 0% { opacity: 0; transform: translateY(15px) scale(.4) rotate(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-80px) scale(1.15) rotate(20deg); } }
.discovery { margin-top: 14px; padding: 16px 18px; border-radius: 18px; background: #fff; border-left: 5px solid var(--coral); box-shadow: 0 8px 18px rgba(62,48,29,.08); }
.discovery-label { margin: 0; color: var(--coral); font-weight: 900; font-size: .72rem; letter-spacing: .08em; }
.discovery h2 { margin: 2px 0 4px; font-size: 1.08rem; }
.discovery p:last-child { margin: 0; font-size: .88rem; }
.discovery.pop { animation: discoveryPop .35s ease; }
@keyframes discoveryPop { 0% { transform: scale(.98); } 55% { transform: scale(1.015); } 100% { transform: scale(1); } }
.route-result { margin-top: 16px; padding: 22px 18px; border-radius: 22px; background: linear-gradient(135deg,#fff 0%,#fff8de 100%); border: 2px solid rgba(212,161,61,.55); box-shadow: var(--shadow); text-align: center; }
.result-badge { display: inline-block; padding: 5px 10px; border-radius: 999px; background: #fff0b4; color: #765822; font-size: .75rem; font-weight: 900; }
.route-result h2 { margin: 7px 0 3px; font-size: 1.35rem; }
.route-result > p { margin: 0 auto 14px; max-width: 650px; font-size: .9rem; }
.route-cards { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.route-card { padding: 12px 10px; border-radius: 14px; background: #fff; border: 1px solid #e7d9bf; text-align: left; }
.route-card strong { display: block; color: var(--green); font-size: .9rem; }
.route-card span { display: block; margin-top: 2px; font-size: .76rem; color: var(--muted); line-height: 1.5; }
.result-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.reset-button { border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--green); padding: 11px 16px; font-weight: 900; cursor: pointer; }
.learning { max-width: 960px; margin: 0 auto; padding: 20px 20px 64px; }
.learning h2, .adult-card h2 { margin: 4px 0 18px; font-size: clamp(1.5rem, 5vw, 2.2rem); line-height: 1.35; }
.learning-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.learning-grid article { padding: 17px; border-radius: 18px; background: rgba(255,255,255,.83); border: 1px solid #e4d8c5; }
.learning-grid article > span { font-size: 1.8rem; }
.learning-grid h3 { margin: 3px 0 2px; }
.learning-grid p { margin: 0; font-size: .86rem; }
.adult-section { padding: 0 16px 76px; }
.adult-card { max-width: 900px; margin: 0 auto; padding: clamp(20px,5vw,38px); border-radius: 28px; background: var(--green); color: #fff; box-shadow: var(--shadow); }
.adult-card .eyebrow { color: #ffd9a0; }
.adult-card p { font-size: .93rem; }
.adult-card ol { margin: 18px 0; padding-left: 1.3rem; }
.adult-card li { margin: 8px 0; font-size: .91rem; }
.guardrails { display: flex; flex-wrap: wrap; gap: 7px; margin: 17px 0; }
.guardrails span { padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); font-size: .73rem; font-weight: 800; }
.adult-note { padding: 12px; border-radius: 14px; background: rgba(0,0,0,.13); }
.secondary-link { display: inline-block; margin-top: 8px; padding: 10px 14px; border-radius: 999px; background: #fff; color: var(--green); text-decoration: none; font-weight: 900; }
footer { padding: 30px max(20px, env(safe-area-inset-left)) calc(30px + env(safe-area-inset-bottom)); text-align: center; background: #253b34; color: #fff; }
footer p { margin: 2px 0; }
.footer-small { margin-top: 9px; opacity: .72; font-size: .72rem; }
@media (min-width: 680px) {
  .venue { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 64px 18px 22px; gap: 15px; }
  .spot { min-height: 183px; }
  .spot-icon { height: 88px; font-size: 2.7rem; }
  .spot strong { font-size: 1.05rem; }
  .spot small { font-size: .75rem; }
  .route-cards { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (max-width: 520px) {
  .site-header { grid-template-columns: auto 1fr auto; }
  .brand small { display: none; }
  .brand strong { font-size: .8rem; }
  .brand-mark { display: none; }
  .sound-button { padding: 7px 9px; font-size: .75rem; }
  .intro { padding-top: 36px; }
  .venue-title { align-items: start; }
  .venue-title small { max-width: 42%; text-align: right; }
  .spot { min-height: 151px; }
  .route-cards, .learning-grid { grid-template-columns: 1fr; }
}
@media (max-width: 359px) {
  .game-shell { width: min(100% - 14px, 960px); }
  .venue { gap: 7px; padding-left: 7px; padding-right: 7px; }
  .spot { padding-left: 5px; padding-right: 5px; min-height: 146px; }
  .spot-icon { height: 64px; font-size: 2rem; }
  .spot small { font-size: .64rem; }
  #next-text { font-size: .76rem; }
}
@media (orientation: landscape) and (max-height: 560px) {
  .site-header { position: relative; }
  .hud { top: 6px; }
  .intro { padding-top: 26px; }
  .venue { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}