* { box-sizing: border-box; }
body { margin: 0; color: #263e3a; background: #faf9f5; font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif; }
a { color: inherit; text-decoration: none; }
.skip-link { position: absolute; top: -60px; left: 12px; z-index: 10; background: #fff; padding: 10px; }
.skip-link:focus { top: 12px; }
.header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; padding: 0 max(20px, calc((100% - 860px) / 2)); border-bottom: 1px solid #e5e7df; background: #fff; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: #246052; font-size: 1.3rem; font-weight: 800; }
.brand-mark { font-size: 1.7rem; font-weight: 400; }
.back { color: #246052; font-size: .86rem; font-weight: 700; }
.back:hover { text-decoration: underline; }
.page { width: min(100% - 32px, 860px); margin: 30px auto 70px; }
.eyebrow { margin: 0; color: #307468; font-size: .72rem; font-weight: 800; letter-spacing: .15em; }
h1 { margin: 8px 0; font-size: clamp(1.8rem, 5vw, 2.7rem); line-height: 1.3; letter-spacing: -.04em; }
.intro { margin: 0 0 20px; color: #516b70; font-size: .95rem; line-height: 1.8; }
.game { overflow: hidden; border: 1px solid #d9e2d8; border-radius: 26px; background: #fff; padding: 12px; box-shadow: 0 12px 32px rgba(49,77,69,.06); }
.meadow { position: relative; isolation: isolate; overflow: hidden; height: clamp(460px, 63svh, 620px); border-radius: 19px; background: #b7dc85 url("/play/animal-art/meadow-v2.webp") center center / cover no-repeat; }
.animal-card { position: absolute; top: var(--lane, 50%); left: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 116px; min-height: 115px; border: 0; border-radius: 24px; background: transparent; color: #234d3f; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; animation: roam var(--duration, 18s) linear var(--delay, -6s) infinite; animation-direction: var(--direction, normal); will-change: transform; }
.animal-card:focus-visible, #sound-toggle:focus-visible, .parent-settings summary:focus-visible { outline: 3px solid #246052; outline-offset: 3px; }
.animal-figure { position: relative; display: block; width: 112px; height: 92px; filter: drop-shadow(1px 6px 1px #457c5033); }
.animal-art { position: absolute; top: 50%; left: 50%; display: block; width: 143px; height: 124px; object-fit: contain; transform: translate(-50%, -50%) rotateY(-24deg); transition: transform .2s ease-out; pointer-events: none; }
.animal-card.reverse .animal-art { transform: translate(-50%, -50%) rotateY(24deg) scaleX(-1); }
.bird .animal-figure { animation: flutter .7s ease-in-out infinite alternate; }
.pig .animal-figure, .elephant .animal-figure { animation: stroll 1s ease-in-out infinite alternate; }
.animal-say { position: absolute; z-index: 2; bottom: calc(100% - 5px); left: 50%; border-radius: 18px; background: #fff; padding: 8px 13px; color: #235c50; font-size: 1rem; font-weight: 800; white-space: nowrap; box-shadow: 0 5px 14px #244b3655; opacity: 0; transform: translate(-50%, 7px) scale(.85); pointer-events: none; }
.animal-say::after { content: ""; position: absolute; top: 100%; left: 50%; border: 8px solid transparent; border-top-color: #fff; transform: translateX(-50%); }
.animal-card.is-active { z-index: 3; animation-play-state: paused; }
.animal-card.is-active .animal-figure { animation: face-hop .48s ease-out; }
.animal-card.is-active .animal-art, .animal-card.is-active.reverse .animal-art { transform: translate(-50%, -50%) rotateY(0) scale(1.08); }
.animal-card.is-active .animal-say { opacity: 1; transform: translate(-50%, 0) scale(1); transition: opacity .15s, transform .15s; }
.callout { min-height: 1.6em; margin: 13px 4px 2px; color: #285e53; font-size: 1rem; font-weight: 700; text-align: center; }
.parent-prompt { margin: 18px 4px 0; border-left: 3px solid #83b2a8; padding: 4px 0 4px 12px; color: #3f6661; font-size: .88rem; line-height: 1.7; }
.parent-note { margin: 14px 4px 0; color: #697b7b; font-size: .83rem; line-height: 1.7; }
.parent-settings { margin: 16px 4px 0; border-top: 1px solid #dce5e3; padding-top: 13px; color: #516b70; font-size: .83rem; }
.parent-settings summary { width: fit-content; cursor: pointer; }
.parent-settings p { margin: 10px 0 0; color: #697b7b; font-size: .78rem; line-height: 1.6; }
.sound-setting { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
#sound-toggle { border: 1px solid #cadfdb; border-radius: 8px; background: #fff; color: #255a5a; padding: 8px 13px; font: inherit; cursor: pointer; }
@keyframes roam { from { transform: translateX(-130px); } to { transform: translateX(var(--travel, 800px)); } }
@keyframes flutter { from { transform: translateY(5px) rotate(-6deg); } to { transform: translateY(-9px) rotate(6deg); } }
@keyframes stroll { from { transform: translateY(2px) rotate(-2deg); } to { transform: translateY(-2px) rotate(2deg); } }
@keyframes face-hop { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-13px); } }
@media (max-width: 600px) { .header { min-height: 60px; padding: 0 16px; } .brand { font-size: 1.1rem; } .back { font-size: .78rem; } .page { width: calc(100% - 24px); margin: 25px auto 40px; } .intro { font-size: .85rem; } .game { border-radius: 22px; padding: 8px; } .meadow { height: clamp(450px, 63svh, 570px); } .animal-card { width: 108px; } }
@media (prefers-reduced-motion: reduce) { .animal-card { animation: none; transform: translateX(var(--rest-x, 30px)); } .bird .animal-figure, .pig .animal-figure, .elephant .animal-figure, .animal-card.is-active .animal-figure { animation: none; } .animal-art, .animal-card.is-active .animal-say { transition: none; } }
