/* キーっこ（タイピング）：ポップ（紺の太い線＋ずらした影）。今風の見た目 */
:root { --navy: #2a2350; --cream: #fffaf0; --sky: #4cb8f5; --tomato: #ff6b4a; --sun: #ffc93c; --mint: #2fbf8f; --grape: #9b7ede; --pink: #ff8fb1; --ice: #e6f6ff; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: linear-gradient(180deg, #bfe6ff 0%, #e8f6ff 55%, #fff6e6 100%) fixed; color: var(--navy); font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "BIZ UDPGothic", "Yu Gothic UI", sans-serif; font-weight: 700; }
#app { max-width: 980px; margin: 0 auto; padding: 14px 16px 40px; }
[hidden] { display: none !important; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { text-decoration: none; background: #fff; border: 3px solid var(--navy); border-radius: 99px; padding: 4px 14px; box-shadow: 0 4px 0 var(--navy); font-weight: 900; font-size: 18px; transform: rotate(-2deg); white-space: nowrap; }
@media (max-width: 400px) { .brand { font-size: 14px; padding: 4px 10px; } }
.b1 { color: var(--sky); } .b2 { color: var(--tomato); }
.kb-note { font-size: 12px; background: var(--sun); border: 2px solid var(--navy); border-radius: 99px; padding: 2px 10px; }
.eyebrow { display: inline-block; margin: 22px 0 0; background: var(--sun); border: 3px solid var(--navy); border-radius: 99px; padding: 2px 12px; font-size: 14px; transform: rotate(-2deg); }
h1 { font-size: clamp(30px, 6vw, 48px); margin: 10px 0 18px; color: #fff; -webkit-text-stroke: 2px var(--navy); paint-order: stroke fill; text-shadow: 0 5px 0 var(--navy); letter-spacing: .04em; }
h2 { font-size: 26px; margin: 18px 0 12px; }
.modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.mode { display: block; text-decoration: none; color: var(--navy); background: #fff; border: 4px solid var(--navy); border-radius: 20px; padding: 16px 18px 14px; box-shadow: 0 6px 0 var(--navy); position: relative; overflow: hidden; transition: transform .08s; }
.mode::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 12px; background: var(--c, var(--sky)); }
.mode b { display: block; font-size: 22px; padding-left: 8px; } .mode small { display: block; font-size: 13px; color: #5d5780; padding-left: 8px; margin-top: 4px; }
a.mode:hover { transform: translateY(-2px); } a.mode:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--navy); }
.m-practice { --c: var(--mint); } .m-attack { --c: var(--tomato); } .m-exam { --c: var(--sun); } .m-battle { --c: var(--grape); } .m-story { --c: var(--sky); } .m-versus { --c: var(--pink); }
.mode.soon { opacity: .55; box-shadow: 0 3px 0 var(--navy); }
.titles { margin: 22px 0 10px; } .titles small { font-size: 13px; }
#title-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 13px; }
.badge { border: 2px solid var(--navy); border-radius: 99px; padding: 2px 10px; background: #eee; color: #8a86a0; }
.badge.on { background: var(--sun); color: var(--navy); }
.back { display: inline-block; margin-top: 16px; color: var(--navy); }
.lessons { display: block; }
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.lesson-group { margin: 16px 0 8px; font-size: 16px; } .lesson-group:first-child { margin-top: 0; }
.lesson-no { display: inline-grid; place-items: center; min-width: 26px; height: 26px; margin-right: 6px; border: 2px solid var(--navy); border-radius: 99px; background: var(--sun); font-size: 13px; vertical-align: 2px; }
.lesson.locked { background: #ecebf5; box-shadow: 0 3px 0 #b9b6cc; border-color: #b9b6cc; color: #8d88a8; cursor: default; } .lesson.locked .lesson-no { background: #fff; border-color: #b9b6cc; }
.lesson { font: inherit; text-align: left; background: #fff; border: 3px solid var(--navy); border-radius: 16px; padding: 12px 14px; box-shadow: 0 5px 0 var(--navy); cursor: pointer; color: var(--navy); }
.lesson b { display: block; font-size: 17px; } .lesson small { color: #5d5780; }
.lesson.done { background: #eafff5; } .lesson.done b::after { content: " ✓"; color: var(--mint); }
.hud { display: flex; justify-content: space-between; gap: 10px; margin: 14px 0; font-size: 16px; }
.hud span { background: #fff; border: 3px solid var(--navy); border-radius: 99px; padding: 3px 14px; box-shadow: 0 3px 0 var(--navy); }
.prompt { background: #fff; border: 4px solid var(--navy); border-radius: 22px; box-shadow: 0 7px 0 var(--navy); padding: 22px 18px; text-align: center; min-height: 170px; }
.p-show { font-size: clamp(26px, 5vw, 40px); min-height: 1.2em; }
.p-kana { font-size: 18px; color: #5d5780; min-height: 1.3em; margin-top: 2px; }
.p-roma { font-family: ui-monospace, "Consolas", monospace; font-size: clamp(22px, 4.4vw, 34px); letter-spacing: .06em; margin-top: 12px; word-break: break-all; }
#p-done { color: var(--sky); } #p-rest { color: #b8b3cf; }
#p-rest::first-letter { color: var(--navy); text-decoration: underline 3px var(--tomato); text-underline-offset: 6px; }
.kb { margin: 22px auto 0; display: grid; gap: 6px; justify-content: center; user-select: none; position: relative; padding-bottom: clamp(48px, 10vw, 86px); }
/* 手の絵（hands.js）。肌は半分すかして、下のキーの字が読めるように。影はぼかして右下へ */
.hands { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.hands .skin .fg-line { fill: none; stroke-linecap: round; }
.hands .skin .palm { stroke: none; opacity: .5; }
.hands .skin .fg-line { stroke: #ffd9bf; opacity: .78; }
.hands .skin .nail { fill: #fff3ea; opacity: .85; }
.hands .shadow { opacity: .16; }
.hands .shadow .palm, .hands .shadow .fg-line { fill: #2a2350; stroke: #2a2350; stroke-linecap: round; }
.hands .shadow .palm { stroke-width: 0; } .hands .shadow .nail { display: none; }
.hands .skin .fg.on .fg-line { stroke: #ffc0a0; opacity: .92; }
.hands .skin .fg.on { animation: press .9s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 0; }
.hands .press { fill: none; stroke: var(--sun); stroke-width: 3; opacity: 0; animation: ring .9s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes press { 0%, 100% { transform: none; } 45% { transform: translateY(1.5px) scaleY(.97); } }
@keyframes ring { 0%, 30% { opacity: 0; transform: scale(.6); } 50% { opacity: .9; } 100% { opacity: 0; transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .hands .skin .fg.on, .hands .press { animation: none; } .hands .press { opacity: .8; } }
.kb-row { display: flex; gap: 6px; } .kb-row.r1 { padding-left: 22px; } .kb-row.r2 { padding-left: 34px; } .kb-row.r3 { padding-left: 54px; } .kb-row.sp-row { justify-content: center; }
.key { width: clamp(26px, 6.4vw, 54px); height: clamp(28px, 6vw, 50px); display: grid; place-items: center; border: 3px solid var(--navy); border-radius: 10px; font-size: clamp(11px, 2.2vw, 17px); background: var(--fc, #fff); box-shadow: 0 3px 0 var(--navy); position: relative; }
.key.bump::after { content: ""; position: absolute; bottom: 5px; width: 30%; height: 3px; border-radius: 3px; background: var(--navy); }
.key.space { width: clamp(160px, 40vw, 320px); font-size: 12px; }
.f0, .f7 { --fc: #ffd9e4; } .f1, .f6 { --fc: #fff1c9; } .f2, .f5 { --fc: #d9f6e9; } .f3, .f4 { --fc: #d6eeff; }
.key.next { background: var(--sun); transform: translateY(-3px); box-shadow: 0 6px 0 var(--navy); }
.key.good { animation: good .18s; } .key.bad { animation: bad .3s; }
@keyframes good { 50% { background: var(--mint); } } @keyframes bad { 0%, 60% { background: var(--tomato); transform: translateX(-3px); } 30% { transform: translateX(3px); } }
.hint { text-align: center; font-size: 12px; color: #5d5780; }
.panel { background: var(--cream); border: 4px solid var(--navy); border-radius: 24px; box-shadow: 0 8px 0 var(--navy); padding: 22px 18px; max-width: 520px; margin: 30px auto; text-align: center; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 12px 0; }
.stats div { background: #fff; border: 3px solid var(--navy); border-radius: 14px; padding: 6px; } .stats small { display: block; font-size: 12px; color: #5d5780; } .stats b { font-size: 22px; }
.primary { font: inherit; font-size: 22px; font-weight: 900; color: #fff; background: var(--tomato); border: 4px solid var(--navy); border-radius: 18px; box-shadow: 0 6px 0 var(--navy); padding: 12px 20px; width: 100%; cursor: pointer; margin-top: 8px; }
.primary:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--navy); }
.text-button { display: inline-block; margin-top: 14px; color: var(--navy); }
/* ホームの「こえ」の欄（functions/api/voice.js へ送る） */
.voice { display: flex; gap: 12px; align-items: flex-start; margin: 22px 0 6px; background: #fff; border: 4px solid var(--navy); border-radius: 20px; box-shadow: 0 6px 0 var(--navy); padding: 14px; }
.voice-mochi { flex: none; }
.voice-body { flex: 1; min-width: 0; }
.voice-body > b { font-size: 18px; }
.voice-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.voice-kinds input { position: absolute; opacity: 0; pointer-events: none; }
.voice-kinds span { display: inline-block; border: 3px solid var(--navy); border-radius: 99px; padding: 3px 12px; font-size: 13px; cursor: pointer; background: #f3f0ff; }
.voice-kinds input:checked + span { background: var(--sun); }
.voice-kinds input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }
.voice textarea { width: 100%; font: inherit; font-size: 16px; border: 3px solid var(--navy); border-radius: 14px; padding: 8px 10px; resize: vertical; color: var(--navy); }
.voice .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.voice-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.voice-foot small { color: #5d5780; font-size: 12px; }
.voice-send { font: inherit; font-weight: 900; color: #fff; background: var(--mint); border: 3px solid var(--navy); border-radius: 14px; box-shadow: 0 4px 0 var(--navy); padding: 6px 18px; cursor: pointer; }
.voice-send:disabled { opacity: .5; cursor: default; }
.voice-msg { margin: 6px 0 0; min-height: 1.2em; font-size: 14px; }
.voice-msg.ok { color: var(--mint); } .voice-msg.ng { color: var(--tomato); }
@media (max-width: 480px) { .voice-mochi { width: 48px; height: 48px; } }

/* ───────── 段2〜5（けんてい・バトル・ストーリー・たいせん）とキャラ ───────── */
.home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.guide { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.bubble { position: relative; background: #fff; border: 3px solid var(--navy); border-radius: 18px; padding: 8px 14px; margin: 0; box-shadow: 0 4px 0 var(--navy); font-size: 15px; max-width: 260px; }
.bubble::before { content: ""; position: absolute; left: -12px; top: 50%; margin-top: -8px; border: 8px solid transparent; border-right-color: var(--navy); border-left: 0; }
.bubble.big { font-size: clamp(18px, 3.4vw, 24px); line-height: 1.6; max-width: 560px; padding: 16px 20px; }
.bubble.small { font-size: 13px; max-width: 170px; }
.bubble.pop { animation: pop .25s ease-out; }
@keyframes pop { from { transform: scale(.85); opacity: .3; } }
.mode .have { position: absolute; right: 10px; top: 10px; font-style: normal; font-size: 12px; background: var(--sun); border: 2px solid var(--navy); border-radius: 99px; padding: 1px 8px; }
.mode .have:empty { display: none; }
.badge { display: inline-flex; align-items: center; gap: 4px; }
.badge img { margin: -4px 0 -4px -6px; }
.lead { font-size: 15px; line-height: 1.7; max-width: 720px; }
.grades { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.grade { font: inherit; color: var(--navy); background: #fff; border: 3px solid var(--navy); border-radius: 16px; padding: 12px 10px; box-shadow: 0 5px 0 var(--navy); cursor: pointer; text-align: center; }
.grade b { display: block; font-size: 24px; } .grade small { display: block; font-size: 12px; color: #5d5780; }
.grade em { display: inline-block; margin-top: 6px; font-style: normal; font-size: 12px; background: var(--mint); color: #fff; border-radius: 99px; padding: 1px 8px; }
.grade.pass { background: #fff8de; }
.panel.wide { max-width: 760px; } .panel.left { text-align: left; max-width: none; margin: 10px 0 16px; }
.cert-canvas { width: 100%; height: auto; border: 3px solid var(--navy); border-radius: 12px; background: #fff; }
.cert-name { display: block; text-align: left; font-size: 13px; margin: 12px 0 4px; }
.cert-name input { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 18px; border: 3px solid var(--navy); border-radius: 12px; padding: 6px 10px; color: var(--navy); }
.as-link { display: block; text-decoration: none; box-sizing: border-box; }
.partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; margin-bottom: 8px; }
.partner { font: inherit; color: var(--navy); background: #fff; border: 4px solid var(--navy); border-radius: 20px; padding: 10px; box-shadow: 0 6px 0 var(--navy); cursor: pointer; text-align: center; }
.partner.on { background: color-mix(in srgb, var(--pc) 18%, #fff); outline: 4px solid var(--pc); outline-offset: 2px; }
.partner img { display: block; margin: 0 auto; width: 150px; height: 150px; object-fit: contain; }
.partner b { display: block; font-size: 20px; } .partner small { display: block; font-size: 12px; color: #5d5780; }
.expbar { display: block; height: 10px; border: 2px solid var(--navy); border-radius: 99px; overflow: hidden; margin: 6px 8px 2px; background: #eee; }
.expbar i { display: block; height: 100%; background: var(--sun); }
.chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.chapter { font: inherit; color: var(--navy); background: #fff; border: 3px solid var(--navy); border-radius: 16px; padding: 12px 14px; box-shadow: 0 5px 0 var(--navy); cursor: pointer; text-align: left; }
.chapter small { display: block; font-size: 12px; color: #5d5780; } .chapter b { display: block; font-size: 19px; margin: 2px 0; }
.chapter em { font-style: normal; font-size: 12px; background: var(--sky); color: #fff; border-radius: 99px; padding: 1px 8px; }
.chapter.done em { background: var(--mint); } .chapter.locked { opacity: .5; cursor: default; } .chapter.locked em { background: #aaa; }
.talk { max-width: 760px; margin: 30px auto; text-align: center; }
.talk-row { display: flex; align-items: center; gap: 16px; margin: 18px 0; text-align: left; }
.talk-row img { flex: none; }
.vs-modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.vs-card { background: #fff; border: 4px solid var(--navy); border-radius: 20px; box-shadow: 0 6px 0 var(--navy); padding: 16px; }
.vs-card b { font-size: 20px; } .vs-card p { font-size: 14px; line-height: 1.6; }
.vs-big { font-size: 22px; color: var(--tomato); }
.share { text-align: left; background: #fff; border: 3px solid var(--navy); border-radius: 14px; padding: 10px; margin: 10px 0; }
.share small { display: block; font-size: 12px; color: #5d5780; margin: 2px 0 6px; }
.share-row { display: flex; gap: 6px; } .share-row input { flex: 1; min-width: 0; font: inherit; font-size: 12px; border: 2px solid var(--navy); border-radius: 10px; padding: 4px 8px; }
.copy { font: inherit; font-size: 13px; background: var(--sun); border: 3px solid var(--navy); border-radius: 10px; cursor: pointer; padding: 2px 10px; color: var(--navy); }
.r-art { display: block; width: 130px; height: 130px; object-fit: contain; margin: -6px auto 0; }
/* 打つ画面：お題の横にもち／バトルの場 */
.prompt-row { display: flex; gap: 12px; align-items: center; }
.prompt-row .prompt { flex: 1; min-width: 0; }
.side { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.side .bubble::before { left: 50%; top: -12px; margin: 0 0 0 -8px; border: 8px solid transparent; border-bottom-color: var(--navy); border-top: 0; }
@media (max-width: 640px) { .side { display: none !important; } }
.arena { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; background: linear-gradient(180deg, #dff3ff, #fff); border: 4px solid var(--navy); border-radius: 22px; box-shadow: 0 6px 0 var(--navy); padding: 10px 18px 12px; margin-bottom: 14px; overflow: hidden; }
.fighter { width: min(40%, 220px); text-align: center; }
.fighter img, .foe-art img { display: block; width: clamp(96px, 18vw, 160px); height: clamp(96px, 18vw, 160px); margin: 0 auto; object-fit: contain; }
.fighter small { display: block; font-size: 13px; }
.bar { height: 14px; border: 3px solid var(--navy); border-radius: 99px; overflow: hidden; background: #eee; margin: 4px 0 2px; }
.bar i { display: block; height: 100%; background: var(--mint); transition: width .15s; } .foe-bar i { background: var(--tomato); }
.gauge { height: 10px; border: 2px solid var(--navy); border-radius: 99px; overflow: hidden; background: #fff; margin-top: 4px; }
.gauge i { display: block; height: 100%; background: var(--pc, var(--sun)); transition: width .1s; }
.arena .sp { font-size: 12px; color: #5d5780; }
.arena.ready .sp { color: var(--tomato); font-weight: 900; animation: blink .5s steps(2) infinite; }
.arena.ready .gauge { box-shadow: 0 0 0 3px var(--sun); }
@keyframes blink { 50% { opacity: .4; } }
.ar-fx { position: absolute; inset: 0; pointer-events: none; }
.fx { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); font-weight: 900; white-space: nowrap; animation: float 1.1s ease-out forwards; -webkit-text-stroke: 1px var(--navy); paint-order: stroke fill; }
.fx.dmg { left: 72%; color: #fff; font-size: 22px; } .fx.dmg.big { font-size: 30px; color: var(--sun); } .fx.dmg.huge { font-size: 46px; color: var(--sun); top: 25%; }
.fx.ouch { left: 25%; color: var(--tomato); font-size: 22px; } .fx.info { top: 18%; font-size: 15px; color: var(--navy); -webkit-text-stroke: 0; background: #fff; border: 2px solid var(--navy); border-radius: 99px; padding: 1px 10px; }
.fx.skill { top: 30%; font-size: clamp(26px, 5vw, 40px); color: var(--pc); -webkit-text-stroke: 2px var(--navy); }
@keyframes float { to { transform: translate(-50%, -40px); opacity: 0; } }
.hit { animation: hit .25s; } @keyframes hit { 30% { transform: translateX(8px) rotate(4deg); filter: brightness(1.6); } }
.hurt { animation: hurt .3s; } @keyframes hurt { 30% { transform: translateX(-8px); filter: drop-shadow(0 0 6px #ff6b4a); } }
.lunge { animation: lunge .35s; } @keyframes lunge { 40% { transform: translateX(-30px) scale(1.08); } }
.arena.special { animation: special .6s; } @keyframes special { 20% { background: var(--sun); } }
/* やめるボタン（キーボードの無い端末でも抜けられる）・認定証の画像ができるまで保存を押せない */
.quit { font: inherit; font-size: 14px; color: var(--navy); background: #fff; border: 3px solid var(--navy); border-radius: 99px; box-shadow: 0 3px 0 var(--navy); padding: 3px 14px; cursor: pointer; margin: 10px 6px 0 0; }
.as-link.wait { opacity: .5; pointer-events: none; }

/* D＝絵のまま動かす：足元を軸に息をする・体を左右にゆらす */
.idle { transform-origin: 50% 96%; animation: breathe 2.8s ease-in-out infinite; }
.foe-art .idle { animation-duration: 3.3s; animation-delay: -.9s; }
@keyframes breathe { 0%, 100% { transform: none; } 25% { transform: scale(1.018, .982) skewX(1.4deg); } 50% { transform: scale(.99, 1.028); } 75% { transform: scale(1.018, .982) skewX(-1.4deg); } }
@media (prefers-reduced-motion: reduce) { .idle { animation: none; } }
.evolve { animation: evolve 1.4s ease-out; } @keyframes evolve { 0% { filter: brightness(5) saturate(0); transform: scale(.55); } 35% { filter: brightness(3) saturate(.3) drop-shadow(0 0 24px #fff); transform: scale(1.12); } 100% { filter: none; transform: none; } }
/* 仲間の絵に重ねる動き（rigs.js）：まばたき・火の粉と炎のゆらぎ・氷のきらめき。位置は絵に対する％ */
.rig { position: relative; width: clamp(96px, 18vw, 160px); height: clamp(96px, 18vw, 160px); margin: 0 auto; }
.fighter .rig img { width: 100%; height: 100%; }
.rig .lid, .rig .emb, .rig .glow, .rig .spk { position: absolute; display: block; pointer-events: none; }
.rig .lid { border-radius: 50%; transform: scaleY(0); transform-origin: 50% 20%; box-shadow: inset 0 -2px 0 #2a2350; animation: lidblink 4.6s infinite; }
@keyframes lidblink { 0%, 92%, 100% { transform: scaleY(0); } 94.5% { transform: scaleY(1); } }
.rig .glow { width: 20%; height: 20%; border-radius: 50%; background: radial-gradient(rgba(255, 220, 110, .6), rgba(255, 120, 40, 0) 70%); mix-blend-mode: screen; transform: translate(-50%, -50%); animation: flick .45s ease-in-out infinite alternate; }
@keyframes flick { from { opacity: .45; transform: translate(-50%, -50%) scale(.88); } to { opacity: 1; transform: translate(-50%, -55%) scale(1.08); } }
.rig .emb { width: 6%; height: 6%; border-radius: 50%; background: radial-gradient(#fff6c0, #ffb02e 45%, rgba(255, 90, 30, 0) 72%); opacity: 0; animation: ember 1.7s ease-out infinite; }
@keyframes ember { 0% { opacity: 0; transform: translate(0, 0) scale(1); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx, 0), -320%) scale(.35); } }
.rig .spk { width: 6%; height: 6%; background: radial-gradient(#fff 0 18%, rgba(190, 235, 255, .9) 30%, rgba(190, 235, 255, 0) 62%); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); opacity: 0; animation: twinkle 2.3s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(45deg); } }
@media (prefers-reduced-motion: reduce) { .rig .lid, .rig .emb, .rig .glow, .rig .spk { animation: none; } .rig .glow { opacity: .7; } }
/* 狭いスマホ（〜400px）：キーボードがはみ出さないよう、キーと段のずれを小さく（360px で 4px はみ出していた） */
@media (max-width: 400px) {
  .kb, .kb-row { gap: 4px; } .key { width: clamp(22px, 7vw, 54px); border-width: 2px; border-radius: 8px; }
  .kb-row.r1 { padding-left: 12px; } .kb-row.r2 { padding-left: 18px; } .kb-row.r3 { padding-left: 28px; }
}
/* スマホ横（高さが低い）：バトルの絵を小さくして、お題が画面に入るように */
@media (orientation: landscape) and (max-height: 500px) {
  .arena { padding: 4px 14px 6px; margin-bottom: 8px; }
  .fighter img, .foe-art img, .rig { width: 70px; height: 70px; }
  .bar { height: 10px; margin: 2px 0 1px; } .gauge { height: 7px; margin-top: 2px; } .fighter small { font-size: 11px; }
  .prompt { min-height: 0; padding: 8px 14px; } .p-show { font-size: 22px; } .p-kana { font-size: 14px; } .p-roma { margin-top: 4px; font-size: 20px; }
  .hud { margin: 6px 0; }
}

/* 11-03 夜：残り時間のバー・れんぞく・点が飛ぶ・キーの印・勝ち抜き */
.tbar { position: relative; height: 22px; border: 3px solid var(--navy); border-radius: 99px; background: #fff; overflow: hidden; margin: -4px 0 12px; box-shadow: 0 3px 0 var(--navy); }
.tbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), #7ee0b8); transition: width .2s linear; }
.tbar.low i { background: linear-gradient(90deg, var(--tomato), #ff9a6b); animation: tlow .5s ease-in-out infinite alternate; }
.tbar b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: var(--navy); }
@keyframes tlow { to { opacity: .55; } }
.prompt { position: relative; }
.combo { position: absolute; top: 8px; right: 12px; font-weight: 900; color: var(--navy); font-size: 14px; opacity: 0; transition: opacity .2s; }
.combo.on { opacity: 1; } .combo b { font-size: 24px; color: var(--sky); } .combo.x2 b { color: var(--mint); } .combo.x3 b { color: var(--tomato); }
.combo em { font-style: normal; margin-left: 6px; padding: 1px 8px; border-radius: 99px; background: var(--sun); border: 2px solid var(--navy); }
.combo.x3 em { background: var(--tomato); color: #fff; }
.combo.up { animation: cup .5s ease-out; } @keyframes cup { 40% { transform: scale(1.5) rotate(-6deg); } }
.p-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 18px; }
.pf { position: absolute; top: 42%; font-weight: 900; font-size: 20px; animation: pf .7s ease-out forwards; -webkit-text-stroke: 1px var(--navy); paint-order: stroke fill; }
.pf.p1 { color: var(--sky); } .pf.p2 { color: var(--mint); font-size: 24px; } .pf.p3 { color: var(--sun); font-size: 30px; } .pf.minus { color: var(--tomato); }
@keyframes pf { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-60px); opacity: 0; } }
[data-k] { position: relative; }
.primary[data-k]::after, .text-button[data-k]::after, .mode[data-k]::after, .lesson[data-k]::after, .grade[data-k]::after, .chapter[data-k]::after, .partner[data-k]::after {
  content: attr(data-k); position: absolute; top: 6px; right: 8px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 6px; border: 2px solid var(--navy); background: #fff; color: var(--navy); font-size: 12px; font-weight: 900; line-height: 16px; text-align: center; box-shadow: 0 2px 0 var(--navy); }
.text-button[data-k]::after { position: static; display: inline-block; margin-left: 6px; vertical-align: middle; }
:is(.mode, .lesson, .grade, .chapter, .partner):focus-visible { outline: 4px solid var(--sun); outline-offset: 3px; }
@media (hover: none) { [data-k]::after { display: none !important; } }
.ladder { background: #fff; border: 3px solid var(--navy); border-radius: 18px; padding: 10px 12px; margin: 0 0 14px; box-shadow: 0 4px 0 var(--navy); }
.ladder .steps { display: flex; gap: 4px; justify-content: space-between; }
.ladder .steps span { flex: 1; aspect-ratio: 1; max-width: 56px; border-radius: 12px; background: #eef3f8; display: grid; place-items: center; filter: grayscale(1) opacity(.5); }
.ladder .steps span img { width: 90%; height: auto; }
.ladder .steps .won { filter: none; background: #e2f7ec; } .ladder .steps .now { filter: none; background: #fff3cf; outline: 3px solid var(--tomato); animation: cup 1.6s ease-in-out infinite; }
.ladder p { margin: 8px 0 0; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .tbar.low i, .combo.up, .pf, .ladder .steps .now { animation: none; } }
.mode[data-k]::after { top: auto; bottom: 8px; }

/* ホームの目次：キャラつき・動きつき */
.hero { position: relative; overflow: hidden; margin: 14px 0 18px; padding: 18px 16px 8px; border: 4px solid var(--navy); border-radius: 28px; box-shadow: 0 8px 0 var(--navy);
  background: radial-gradient(120% 90% at 50% 0%, #fff 0%, #d9f1ff 45%, #9fd8ff 100%); text-align: center; }
.hero-main { position: relative; z-index: 2; }
.logo { margin: 6px 0 4px; font-size: clamp(36px, 8vw, 66px); line-height: 1.05; }
.logo span { display: inline-block; animation: logo-in .7s cubic-bezier(.2, 1.6, .4, 1) both; }
.logo span + span { color: var(--sun); animation-delay: .12s; }
@keyframes logo-in { from { transform: translateY(-40px) scale(.6) rotate(-8deg); opacity: 0; } }
.hero .guide { justify-content: center; margin: 0; }
.mochi-bob { animation: bob 2.4s ease-in-out infinite; transform-origin: 50% 100%; filter: drop-shadow(0 6px 0 rgba(42, 35, 80, .15)); }
@keyframes bob { 0%, 100% { transform: translateY(0) scale(1, 1); } 45% { transform: translateY(-10px) scale(.97, 1.03); } 55% { transform: translateY(-10px) scale(.97, 1.03); } 90% { transform: translateY(0) scale(1.05, .95); } }
.hero-side { position: absolute; bottom: -6px; width: clamp(90px, 18vw, 170px); height: auto; z-index: 1; animation: peek 3.2s ease-in-out infinite; }
.hero-side.l { left: 2%; } .hero-side.r { right: 2%; animation-delay: -1.6s; }
@keyframes peek { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
.snow i { position: absolute; top: -10px; width: 8px; height: 8px; border-radius: 50%; background: #fff; opacity: .9; animation: fall 7s linear infinite; }
.snow i:nth-child(1) { left: 5%; animation-delay: -1s; } .snow i:nth-child(2) { left: 14%; animation-delay: -4s; width: 5px; height: 5px; } .snow i:nth-child(3) { left: 23%; animation-delay: -2.5s; }
.snow i:nth-child(4) { left: 32%; animation-delay: -6s; width: 6px; height: 6px; } .snow i:nth-child(5) { left: 41%; animation-delay: -3s; } .snow i:nth-child(6) { left: 50%; animation-delay: -5.5s; width: 5px; height: 5px; }
.snow i:nth-child(7) { left: 59%; animation-delay: -.5s; } .snow i:nth-child(8) { left: 68%; animation-delay: -3.7s; width: 6px; height: 6px; } .snow i:nth-child(9) { left: 77%; animation-delay: -2s; }
.snow i:nth-child(10) { left: 86%; animation-delay: -6.5s; width: 5px; height: 5px; } .snow i:nth-child(11) { left: 94%; animation-delay: -4.6s; } .snow i:nth-child(12) { left: 72%; animation-delay: -1.4s; width: 4px; height: 4px; }
@keyframes fall { to { transform: translate(30px, 330px); } }
.modes { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.mode { min-height: 112px; padding-right: 110px; animation: card-in .4s cubic-bezier(.2, 1.4, .4, 1) backwards; /* both だと 終わった後も transform が 残り、別の層のまま＝全体の画面写しで 札が 消えた（11-12 本社） */ animation-delay: calc(var(--i, 0) * 45ms + .05s); }
.mode.big { grid-column: span 1; min-height: 150px; background: linear-gradient(135deg, #fff 55%, color-mix(in srgb, var(--c, var(--sky)) 22%, #fff)); }
.mode.big b { font-size: 28px; }
@media (min-width: 700px) { .modes { grid-template-columns: repeat(6, 1fr); } .mode { grid-column: span 2; } .mode.big { grid-column: span 3; } }
@keyframes card-in { from { transform: translateY(30px) scale(.94); opacity: 0; } }
.mode-art { position: absolute; right: 8px; bottom: 6px; width: 96px; height: 96px; object-fit: contain; transition: transform .25s cubic-bezier(.2, 1.6, .4, 1); }
.mode.big .mode-art { width: 132px; height: 132px; right: 10px; bottom: 4px; }
.mode-art.duo { display: flex; align-items: flex-end; width: 104px; } .mode-art.duo img { width: 54px; height: 54px; }
a.mode:hover .mode-art, a.mode:focus-visible .mode-art { transform: translateY(-6px) rotate(-6deg) scale(1.08); }
a.mode:hover { transform: translateY(-3px); box-shadow: 0 9px 0 var(--navy); }
@media (max-width: 420px) { .mode { padding-right: 92px; } .mode-art { width: 80px; height: 80px; } .mode.big .mode-art { width: 100px; height: 100px; } .hero-side { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .logo span, .mochi-bob, .hero-side, .snow i, .mode { animation: none; } .snow { display: none; } }

/* 指の図（手の絵の代わり）：左右の手を5本の丸い指で。打つ指が持ち上がって黄色に光る */
.fguide { display: flex; justify-content: center; align-items: flex-end; gap: clamp(10px, 4vw, 40px); margin: 10px auto 0; }
.fguide[hidden] { display: none; }
.gh { display: flex; align-items: flex-end; gap: 5px; padding: 0 10px 10px; border-bottom: 14px solid #ffd9bf; border-radius: 0 0 26px 26px; }
.gf { display: block; width: 18px; border-radius: 10px 10px 6px 6px; border: 3px solid var(--navy); background: var(--fc, #fff); transition: transform .12s, background .12s; }
.gf.g0, .gf.g7 { height: 34px; --fc: #ffd9e4; } .gf.g1, .gf.g6 { height: 46px; --fc: #fff1c9; } .gf.g2, .gf.g5 { height: 52px; --fc: #d9f6e9; } .gf.g3, .gf.g4 { height: 46px; --fc: #d6eeff; }
.gf.th { height: 26px; width: 22px; --fc: #f0e6ff; transform: rotate(var(--tr, 28deg)); transform-origin: 50% 100%; margin: 0 2px; } .gh.l .gf.th { --tr: 28deg; } .gh.r .gf.th { --tr: -28deg; }
.gf.on { background: var(--sun); transform: translateY(-10px); box-shadow: 0 0 0 4px rgba(255, 201, 60, .45); }
.gf.th.on { transform: rotate(var(--tr)) translateY(-8px); }
#fg-name { min-width: 7.5em; text-align: center; font-size: 15px; background: #fff; border: 3px solid var(--navy); border-radius: 99px; padding: 3px 10px; margin-bottom: 16px; }
#fg-name:empty { visibility: hidden; }
.hand-mode { font: inherit; font-size: 12px; background: #fff; border: 2px solid var(--navy); border-radius: 99px; padding: 2px 10px; color: var(--navy); cursor: pointer; }
@media (max-height: 500px) and (orientation: landscape) { .fguide { display: none; } }
@media (max-width: 420px) { .hero-side { display: none; } .gf { width: 14px; } #fg-name { min-width: 6em; font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .gf { transition: none; } }

#play.battle .fguide { display: none; }
@media (max-height: 820px) { .fguide { margin-top: 4px; } .gf { width: 14px; } .gf.g0, .gf.g7 { height: 24px; } .gf.g1, .gf.g6 { height: 32px; } .gf.g2, .gf.g5 { height: 36px; } .gf.g3, .gf.g4 { height: 32px; } .gf.th { height: 18px; } .gh { border-bottom-width: 9px; padding-bottom: 6px; } #fg-name { margin-bottom: 8px; font-size: 13px; } }
.combo { top: -15px; right: 14px; background: #fff; border: 3px solid var(--navy); border-radius: 99px; padding: 0 10px; line-height: 1.5; }
.combo b { font-size: 18px; }
.pf { top: auto; bottom: 8px; }

/* 低い画面（ノートPC）：打つ画面を画面の高さに合わせて縮める＝キーボードが下に切れない */
.kb:not(.with-hands) { padding-bottom: 0; }
@media (min-width: 701px) and (max-height: 900px) {
  #app { padding-top: 8px; padding-bottom: 12px; }
  #play .hud { margin: 6px 0; } #play .tbar { height: 18px; margin: 0 0 8px; }
  #play .arena { padding-top: 4px; padding-bottom: 6px; margin-bottom: 8px; }
  #play .fighter img, #play .foe-art img, #play .rig { width: min(150px, 13vh); height: min(150px, 13vh); }
  #play .prompt { min-height: 0; padding: 1.4vh 18px; }
  #play .p-show { font-size: min(40px, 4.6vh); } #play .p-kana { font-size: min(18px, 2.4vh); } #play .p-roma { font-size: min(34px, 4.2vh); margin-top: .8vh; }
  #play .kb { margin-top: 1.6vh; gap: .7vh; } #play .kb-row { gap: .7vh; }
  #play .key { height: min(50px, 5.4vh); width: min(54px, 6vh, 6.4vw); border-radius: 8px; }
  #play .key.space { width: min(320px, 36vh); }
  #play .hint { margin: 6px 0 0; }
}

/* キーは白で落ち着かせ、指の色は下の縁だけ（光るキーが目立つように） */
.key { background: #fff; box-shadow: inset 0 -5px 0 color-mix(in srgb, var(--fc, #fff) 85%, #8a84b8), 0 3px 0 var(--navy); color: #4a4470; }
.key.next { background: var(--sun); color: var(--navy); box-shadow: 0 0 0 4px rgba(255, 201, 60, .55), 0 6px 0 var(--navy); z-index: 1; animation: nextkey .9s ease-in-out infinite; }
@keyframes nextkey { 50% { box-shadow: 0 0 0 8px rgba(255, 201, 60, .25), 0 6px 0 var(--navy); } }
@media (prefers-reduced-motion: reduce) { .key.next { animation: none; } }
/* けんていの結果のバー */
.goals { display: grid; gap: 10px; margin: 12px 0; text-align: left; }
.goal { background: #fff; border: 3px solid var(--navy); border-radius: 14px; padding: 8px 12px; }
.goal-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; } .goal-top b { font-size: 14px; } .goal-top span { font-size: 20px; font-weight: 900; } .goal-top small { font-size: 12px; color: #5d5780; }
.goal-bar { height: 16px; border: 2px solid var(--navy); border-radius: 99px; background: #eef0f6; overflow: hidden; margin-top: 4px; }
.goal-bar i { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, #ffb35c, var(--tomato)); border-radius: 99px; animation: goalgrow 1s cubic-bezier(.2, .9, .3, 1) both; }
.goal.ok .goal-bar i { background: linear-gradient(90deg, #7ee0b8, var(--mint)); }
.goal-left { display: block; margin-top: 3px; font-size: 13px; color: var(--tomato); font-weight: 900; } .goal.ok .goal-left { color: var(--mint); }
@keyframes goalgrow { from { width: 0; } }
@media (prefers-reduced-motion: reduce) { .goal-bar i { animation: none; } }

/* ───────── ながれ旅：流氷の川。敵は右から流れてきて、左の岸の仲間へ ───────── */
.m-flow { --c: #2bb3c0; }
@media (min-width: 700px) { .mode.wide { grid-column: span 6; } }
.mode.wide { background: linear-gradient(100deg, #fff 55%, #dff6fb); }
.mode .new { position: absolute; left: 22px; top: -2px; font-size: 11px; font-weight: 900; color: #fff; background: var(--tomato); border: 2px solid var(--navy); border-top: 0; border-radius: 0 0 10px 10px; padding: 0 8px; }
.mode.wide b { margin-top: 8px; display: block; }
.courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; margin: 14px 0; }
.course { font: inherit; color: var(--navy); background: #fff; border: 3px solid var(--navy); border-radius: 16px; padding: 12px 14px; box-shadow: 0 5px 0 var(--navy); cursor: pointer; text-align: left; position: relative; }
.course b { display: block; font-size: 20px; } .course small { display: block; color: #5d5780; }
.course .fee { display: inline-block; margin-top: 6px; font-size: 13px; background: #e6f6ff; border: 2px solid var(--navy); border-radius: 99px; padding: 0 8px; }
.course em { display: inline-block; margin: 6px 0 0 6px; font-style: normal; font-size: 12px; background: #aaa; color: #fff; border-radius: 99px; padding: 1px 8px; }
.course.plus em { background: var(--mint); }
.course.quiz { background: #fffaf0; } .course.quiz b::after { content: " クイズ"; font-size: 12px; color: #fff; background: var(--grape); border-radius: 99px; padding: 1px 8px; vertical-align: middle; }
.course:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--navy); }
.flow-who { font-size: 14px; color: #5d5780; }
.lane { position: relative; height: clamp(150px, 24vw, 210px); border: 4px solid var(--navy); border-radius: 22px; box-shadow: 0 6px 0 var(--navy); margin-bottom: 14px; overflow: hidden;
  background: #bfe3f7; }
/* 景色（遠く・中・手前の3枚を ちがう速さで流す＝art/scenery.py。位置は app.js の flowTick が動かす） */
.ln-scene, .ln-scene i { position: absolute; inset: 0; }
.ln-scene i { background-repeat: repeat-x; background-size: auto 100%; background-position: 0 0; will-change: background-position; }
.ln-scene .ln-speed { opacity: 0; transition: opacity .3s; background: repeating-linear-gradient(180deg, transparent 0 13px, rgba(255, 255, 255, .55) 13px 15px, transparent 15px 31px); -webkit-mask: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent); mask: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent); background-size: 180px 100%; animation: speed .35s linear infinite; }
.lane.fast .ln-speed { opacity: .55; } .lane.fever .ln-speed { opacity: .9; }
@keyframes speed { to { background-position: -180px 0; } }
.lane.fever .lane-me img { filter: drop-shadow(0 0 8px #fff3a0) drop-shadow(0 0 16px var(--pc, var(--sun))); }
@keyframes river { to { background-position: -100% 0; } }
.ln-banner { position: absolute; left: 50%; top: 34%; z-index: 4; transform: translate(-50%, -50%); font-size: clamp(22px, 4vw, 38px); font-weight: 900; color: #fff; -webkit-text-stroke: 2px var(--navy); paint-order: stroke; text-shadow: 0 4px 0 var(--navy); white-space: nowrap; pointer-events: none; opacity: 0; }
.ln-banner.show { animation: banner 1.1s ease-out; } @keyframes banner { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 30% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -80%); } }
.ln-sound { font: inherit; font-size: 14px; background: #fff; border: 2px solid var(--navy); border-radius: 99px; min-width: 34px; height: 26px; cursor: pointer; padding: 0 6px; } .ln-sound.off { opacity: .55; }
.spark { position: absolute; bottom: 30%; width: 26px; height: 26px; margin-left: -13px; z-index: 3; pointer-events: none; background: radial-gradient(circle, #fff 0 18%, var(--pc, var(--sun)) 35%, transparent 62%); animation: spark .28s ease-out forwards; } @keyframes spark { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.burst { position: absolute; bottom: 32%; width: 0; height: 0; z-index: 3; pointer-events: none; } .burst i { position: absolute; width: 10px; height: 10px; margin: -5px; border-radius: 2px; background: var(--c); animation: burst .55s ease-out forwards; } @keyframes burst { to { transform: translate(var(--dx), var(--dy)) rotate(260deg); opacity: 0; } }
.lfoe.hit img { animation: flinch .16s; } @keyframes flinch { 40% { transform: translateX(6px) scale(.94); filter: brightness(1.8); } }
.lane.shake { animation: shake .3s; } @keyframes shake { 20% { transform: translate(-6px, 2px); } 40% { transform: translate(5px, -2px); } 60% { transform: translate(-4px, 1px); } 80% { transform: translate(3px, 0); } }
#play.hurry .tbar { animation: hurry .5s ease-in-out infinite alternate; } @keyframes hurry { to { box-shadow: 0 0 0 4px rgba(255, 107, 74, .75); } }
.lane-top { position: absolute; left: 10px; right: 10px; top: 6px; display: flex; align-items: center; gap: 8px; z-index: 3; font-size: 13px; }
.wind { width: min(30%, 160px); height: 10px; border: 2px solid var(--navy); border-radius: 99px; background: #fff; overflow: hidden; } .wind i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #9fe7d0, var(--mint)); transition: width .1s; }
.ln-pts { margin-left: auto; background: #fff; border: 2px solid var(--navy); border-radius: 99px; padding: 0 10px; } .ln-pts .plus { color: var(--mint); } .ln-pts span { font-size: 16px; }
.lane-me { position: absolute; left: 1%; bottom: 4px; width: 17%; z-index: 2; display: flex; justify-content: center; }
.lane-me img { width: clamp(70px, 13vw, 120px); height: clamp(70px, 13vw, 120px); object-fit: contain; display: block; }
.ln-foes { position: absolute; inset: 0; z-index: 1; }
.lfoe { position: absolute; bottom: 6px; width: 12%; min-width: 70px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; transition: opacity .2s; }
.lfoe img { width: clamp(44px, 7vw, 62px); height: clamp(44px, 7vw, 62px); object-fit: contain; position: relative; z-index: 1; animation: bob 1.6s ease-in-out infinite; }
.lfoe.t1 img { width: clamp(52px, 8.5vw, 74px); height: clamp(52px, 8.5vw, 74px); } .lfoe.t2 img { width: clamp(60px, 10vw, 86px); height: clamp(60px, 10vw, 86px); }
.lfoe .floe { display: block; width: 90%; height: 10px; margin-top: -8px; background: radial-gradient(ellipse, rgba(20, 20, 40, .35), transparent 70%); border: 0; }
.ltag { font-size: clamp(10px, 1.6vw, 13px); white-space: nowrap; max-width: 7.5em; overflow: hidden; text-overflow: ellipsis; background: #fff; border: 2px solid var(--navy); border-radius: 10px; padding: 0 6px; margin-bottom: 2px; opacity: .85; }
.lfoe.target { z-index: 2; } .lfoe.target .ltag { max-width: 9em; background: var(--sun); opacity: 1; font-size: clamp(13px, 2.2vw, 17px); box-shadow: 0 3px 0 var(--navy); }
.lfoe.target img { filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 2px var(--sun)); }
.lfoe.beaten { opacity: 0; transform: translateX(-50%) scale(1.3) rotate(12deg); transition: opacity .4s, transform .4s; }
.lfoe.bite { opacity: 0; transition: opacity .35s; }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-2deg); } }
.lshot { position: absolute; left: 14%; bottom: 40%; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(#fff, var(--pc, var(--sun)) 60%); box-shadow: 0 0 10px var(--pc, var(--sun)); z-index: 3; animation: lshot .3s ease-in forwards; }
@keyframes lshot { to { left: var(--to); transform: scale(1.6); opacity: .2; } }
.attack { animation: attack .3s; } @keyframes attack { 40% { transform: translateX(14px) scale(1.06); } }
.lane.gust { animation: gust .6s; } @keyframes gust { 30% { box-shadow: 0 0 0 6px #9fe7d0, 0 6px 0 var(--navy); } }
.fx.gain { color: var(--sun); font-size: 26px; top: 30%; }
.ln-hint { position: absolute; left: 50%; top: 42%; transform: translateX(-50%); z-index: 3; margin: 0; background: #fff; border: 3px solid var(--navy); border-radius: 99px; padding: 2px 14px; font-size: 14px; white-space: nowrap; animation: blink 1s steps(2) infinite; }
#play.hide-rest #p-rest { visibility: hidden; }
#play.hide-rest .p-roma::after { content: "よみを 打とう（Enter で ヒント −3秒）"; display: block; font-family: inherit; letter-spacing: 0; font-size: 13px; color: #8a86a0; }
.flow-extra { font-size: 14px; color: #5d5780; }
@media (prefers-reduced-motion: reduce) { .ln-speed, .lfoe img, .ln-hint, .lane.shake, .ln-banner.show { animation: none; } }
@media (orientation: landscape) and (max-height: 500px) { .lane { height: 120px; margin-bottom: 8px; } .lane-me img { width: 60px; height: 60px; } }
@media (min-width: 701px) and (max-height: 900px) { #play .lane { height: min(200px, 22vh); margin-bottom: 8px; } #play .lane-me img { width: min(110px, 13vh); height: min(110px, 13vh); } #play .lfoe img { width: min(62px, 8vh); height: min(62px, 8vh); } #play .lfoe.t1 img { width: min(74px, 9.5vh); height: min(74px, 9.5vh); } #play .lfoe.t2 img { width: min(86px, 11vh); height: min(86px, 11vh); } }

/* ながれ旅の工夫：ハート・あぶない合図・ふくろ持ち・回復の食べ物・ボス */
.ln-hp { display: inline-flex; gap: 2px; } .ln-hp i { width: 14px; height: 13px; background: #d8d4e8; clip-path: path("M7 13 L1 6.5 A3.3 3.3 0 0 1 7 2.4 A3.3 3.3 0 0 1 13 6.5 Z"); }
.ln-hp i.on { background: var(--tomato); } .ln-hp.low i.on { animation: beat .6s ease-in-out infinite; }
@keyframes beat { 50% { transform: scale(1.3); } }
.lane.danger { box-shadow: 0 0 0 4px rgba(255, 107, 74, .7), 0 6px 0 var(--navy); animation: dangerpulse .5s ease-in-out infinite alternate; }
@keyframes dangerpulse { to { box-shadow: 0 0 0 9px rgba(255, 107, 74, .25), 0 6px 0 var(--navy); } }
.lfoe.danger img { animation: shake .18s linear infinite; filter: drop-shadow(0 0 6px var(--tomato)); }
.lfoe.danger .ltag { background: var(--tomato); color: #fff; }
@keyframes shake { 25% { transform: translateX(-3px) rotate(-4deg); } 75% { transform: translateX(3px) rotate(4deg); } }
.lane.ouchflash { animation: ouchflash .35s; } @keyframes ouchflash { 30% { background: linear-gradient(180deg, #ffd6cc 0 22%, #ff9c86 22%); } }
.lane.special { animation: special .6s; }
.healed { animation: healed .5s; } @keyframes healed { 40% { filter: drop-shadow(0 0 10px #7ee0b8) brightness(1.2); transform: scale(1.08); } }
.lbag, .lbadge { font-size: 11px; white-space: nowrap; color: #fff; background: var(--grape); border: 2px solid var(--navy); border-radius: 99px; padding: 0 6px; margin-bottom: 2px; }
.lbag { background: #d4930f; animation: bob 1s ease-in-out infinite; } .lbadge { background: var(--navy); } .lbadge.heal { background: var(--mint); }
.lfoe.k-bag img { filter: drop-shadow(0 0 5px #ffc93c); }
.lheal { font-size: clamp(34px, 6vw, 50px); line-height: 1.1; animation: bob 1.4s ease-in-out infinite; }
.lfoe.k-heal .floe { background: #eafff5; }
.lfoe.t3 img { width: clamp(80px, 13vw, 116px); height: clamp(80px, 13vw, 116px); }
.lfoe.pass { opacity: 0; transition: opacity .35s; }
.fx.heal { color: var(--mint); font-size: 22px; top: 20%; }
.course { padding-right: 70px; } .course-boss { position: absolute; right: 8px; top: 10px; width: 56px; height: 56px; object-fit: contain; }
@media (min-width: 701px) and (max-height: 900px) { #play .lfoe.t3 img { width: min(104px, 13vh); height: min(104px, 13vh); } }
@media (prefers-reduced-motion: reduce) { .lane.danger, .lfoe.danger img, .ln-hp.low i.on, .lbag, .lheal { animation: none; } }
.lbag, .lbadge { position: absolute; top: 24px; right: -6px; z-index: 2; margin: 0; }
@media (max-width: 480px) { .wind-l { display: none; } .lane-top { gap: 6px; } .fx.ouch { font-size: 17px; } }
/* 学校サイトから来た時（school.js）：外へ出るリンクは全部隠す（#/ の中の移動は残す） */
html.from-school a[href]:not([href^="#"]):not([download]) { display: none !important; }   /* 認定証の保存（blob:・download）は残す */
/* 低い画面（ノートPC の高さ600〜660）でも 敵の札が 上の帯に 届かないように、絵の大きさを レーンの高さ（cqh）で しばる。
   上の帯 約30px＋札 約26px を引いた残りに 入る大きさ。ボスも同じ。旗の文字も レーンの高さに合わせる */
.lane { container-type: size; }
.lfoe img { max-height: 38cqh; max-width: 38cqh; } .lfoe.t1 img { max-height: 40cqh; max-width: 40cqh; } .lfoe.t2 img { max-height: 41cqh; max-width: 41cqh; } .lfoe.t3 img { max-height: 44cqh; max-width: 44cqh; }
.ln-banner { font-size: min(clamp(22px, 4vw, 38px), 20cqh); top: 50%; }
#ln-fx .fx.info { top: 36%; }
.nw { white-space: nowrap; }
/* なかま図鑑（段階1）：1マス＝1つの すがた。埋まった＝色つき・出会った＝うすく・まだ＝かげ */
.m-zukan { --c: #2fbf8f; }
.partners-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 6px; }
.partners { grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }
.partner img { width: 120px; height: 120px; }
.zukan-meter { display: flex; align-items: center; gap: 10px; font-size: 18px; } .zukan-meter .expbar { flex: 1; height: 14px; }
.zukan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; margin: 10px 0 16px; }
.zk { position: relative; background: #fff; border: 4px solid var(--navy); border-radius: 18px; padding: 8px; text-align: center; box-shadow: 0 5px 0 var(--navy); }
.zk .no { position: absolute; top: 6px; left: 10px; font-size: 11px; color: #5d5780; }
.zk img { display: block; margin: 8px auto 4px; width: 96px; height: 96px; object-fit: contain; }
.zk b { display: block; font-size: 16px; } .zk small { display: block; font-size: 12px; line-height: 1.5; color: #5d5780; }
.zk.got { background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--pc) 18%, #fff)); }
.zk.seen img { filter: grayscale(1) opacity(.55); }
.zk.none img { filter: brightness(0) opacity(.25); }
.zk.none b { color: #8d88a8; }
.as-link { display: block; text-align: center; text-decoration: none; box-sizing: border-box; }
/* 図鑑の3段（？／シルエット／絵）と「つれていく」（11-11） */
.zk.seen img { filter: brightness(0) opacity(.42); }
.zk.none img { display: none; }
.zk-q { display: grid; place-items: center; width: 96px; height: 96px; margin: 8px auto 4px; border-radius: 50%; background: #ecebf5; color: #b3aecb; font-size: 52px; font-weight: 900; }
.zk-go { display: inline-block; margin-top: 6px; padding: 4px 12px; border: 3px solid var(--navy); border-radius: 99px; background: var(--sun); font: inherit; font-size: 13px; font-weight: 800; color: var(--navy); cursor: pointer; box-shadow: 0 3px 0 var(--navy); }
.zk-go.on { background: var(--mint); color: #fff; cursor: default; }
.zk.active { outline: 4px solid var(--mint); outline-offset: 2px; }
.buddy-box { display: flex; flex-direction: column; align-items: center; margin-top: 4px; }
.buddy-box small { font-size: 12px; color: #5d5780; }
.buddy { width: 96px; height: 96px; object-fit: contain; transform-origin: 50% 100%; }
.buddy.hop { animation: buddy-hop .35s ease-out; }
.buddy.sad { animation: buddy-sad .45s ease-out; }
@keyframes buddy-hop { 40% { transform: translateY(-14px) scale(1.04); } }
@keyframes buddy-sad { 30% { transform: rotate(-8deg) translateY(3px); filter: saturate(.4); } 70% { transform: rotate(5deg); } }
@media (prefers-reduced-motion: reduce) { .buddy.hop, .buddy.sad { animation: none; } }
/* ホームの札（11-11 崩れ直し）：広い画面は 横長1＋大きい札2枚×2行＋小さい札3枚＝穴なし。2枚の絵（図鑑・たいせん）も大きい札の大きさに */
.mode.big .mode-art.duo { width: 140px; } .mode.big .mode-art.duo img { width: 70px; height: 70px; }
@media (max-width: 420px) { .mode.big .mode-art.duo { width: 104px; } .mode.big .mode-art.duo img { width: 52px; height: 52px; } }
@media (min-width: 700px) and (max-width: 1000px) { .mode:not(.big):not(.wide) { padding-right: 82px; } .mode:not(.big):not(.wide) .mode-art { width: 74px; height: 74px; } .mode:not(.big):not(.wide) b { font-size: clamp(17px, 2.3vw, 20px); white-space: nowrap; } .mode:not(.big):not(.wide) small { font-size: 12px; } }
.bubble, .mode small { text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; }   /* 分かち書きの すき間で だけ 折る */
/* じぶんの級を しる（11-11） */
.judge-go { display: block; width: 100%; margin: 0 0 14px; font: inherit; color: var(--navy); text-align: left; background: linear-gradient(100deg, #fff 50%, #fff3c4); border: 4px solid var(--navy); border-radius: 20px; padding: 14px 18px; box-shadow: 0 6px 0 var(--navy); cursor: pointer; }
.judge-go b { display: block; font-size: 22px; } .judge-go small { display: block; font-size: 13px; color: #5d5780; margin-top: 2px; }
.judge-go em { display: inline-block; margin-top: 6px; font-style: normal; font-size: 12px; background: var(--sun); border: 2px solid var(--navy); border-radius: 99px; padding: 0 8px; } .judge-go em:empty { display: none; }
.judge-go:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--navy); }
/* むげんロード：いまの町と 町の ならび（11-11） */
.road-now { margin: 0 0 12px; }
.road-head { margin: 0 0 6px; font-size: 15px; } .road-head b { font-size: 20px; color: var(--tomato); }
.road-towns { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; padding: 8px 10px; margin: 0; background: #fff; border: 3px solid var(--navy); border-radius: 16px; }
.road-towns li { flex: 1 0 auto; min-width: 46px; display: flex; flex-direction: column; align-items: center; position: relative; }
.road-towns li i { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--navy); background: #fff; z-index: 1; }
.road-towns li.done i { background: var(--mint); } .road-towns li.here i { background: var(--tomato); width: 20px; height: 20px; margin-top: -3px; }
.road-towns li small { font-size: 11px; margin-top: 2px; } .road-towns li.here small { font-weight: 900; color: var(--tomato); }
.course em.new { background: #ecebf5; color: #8d88a8; }
.ln-pts small { font-size: 12px; margin-left: 2px; font-weight: 700; }
/* 結果の題は ことばの切れ目（空白）だけで 折る＝「た」1字だけ 次の行に 落ちない（11-11） */
#r-title { text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; }
/* れんしゅう：その段で 新しい キー（11-11）・; キーの「れ」・物の キーボード向けの ひとこと */
.key.fresh { box-shadow: 0 0 0 3px var(--tomato); }
.key .jis { position: absolute; right: 3px; bottom: 1px; font-size: 9px; line-height: 1; color: #8d88a8; font-weight: 700; }
.practice-note { margin: -4px 0 12px; font-size: 13px; color: #5d5780; }
/* 技（11-11 段階2・11-12 に Enter・スペースの 2つへ）：アリーナの まん中の 下に 1列。せまい 画面は アリーナの 下に */
.wazabar { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); display: grid; grid-template-areas: "e s pt"; grid-template-columns: repeat(2, 120px) 40px; gap: 4px; z-index: 2; }
.wz-pt { grid-area: pt; align-self: center; font-size: 11px; color: #5d5780; text-align: center; } .wz-pt b { display: block; font-size: 18px; color: var(--navy); }
.wz { font: inherit; display: flex; flex-direction: column; align-items: center; line-height: 1.1; padding: 3px 2px; border: 3px solid var(--navy); border-radius: 12px; background: #eceaf3; color: #8d88a8; cursor: pointer; min-height: 40px; touch-action: manipulation; }
.wz b { font-size: 13px; } .wz span { font-size: 11px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; } .wz small { font-size: 10px; }
.wz.w0 { grid-area: e; } .wz.w1 { grid-area: s; }
.wz.ok { background: var(--sun); color: var(--navy); box-shadow: 0 3px 0 var(--navy); }
.wz:disabled { opacity: .45; cursor: default; }
.wz.nope { animation: nope .3s; } @keyframes nope { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.wz.fire { animation: wzfire .4s; } @keyframes wzfire { 40% { transform: scale(1.15); background: #fff; } }
.arena.powered #ar-me-box { filter: drop-shadow(0 0 8px var(--tomato)); } .arena.frozen .foe-art { filter: hue-rotate(180deg) saturate(.4) brightness(1.15); } .arena.guarded #ar-me-box { filter: drop-shadow(0 0 8px var(--mint)); }
/* 敵の技で 止まっている 間（11-12）：自分が 灰色で ふるえ、まん中に「うごけない」 */
.arena.stunned #ar-me-box { filter: grayscale(1) brightness(.85); animation: stunshake .25s infinite; }
.arena.stunned::after { content: "うごけない！"; position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); padding: 6px 16px; border: 3px solid var(--navy); border-radius: 99px; background: #fff; color: var(--tomato); font-weight: 900; font-size: 20px; z-index: 3; pointer-events: none; }
.arena.stunned .wz { opacity: .45; }
@keyframes stunshake { 50% { transform: translateX(2px); } }
.jam { display: block; font-size: 11px; font-weight: 800; color: #5d5780; min-height: 1em; }
@media (prefers-reduced-motion: reduce) { .arena.stunned #ar-me-box { animation: none; } }
@media (max-width: 940px) {
  .arena { flex-wrap: wrap; }
  .wazabar { position: relative; left: auto; bottom: auto; transform: none; order: 3; width: 100%; grid-template-columns: repeat(2, 1fr) 44px; margin-top: 4px; }
  .wz { min-height: 36px; }
}
@media (prefers-reduced-motion: reduce) { .wz.nope, .wz.fire { animation: none; } }
/* キーっこのページ */
.kk-card { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--pc) 18%, #fff)); border: 4px solid var(--navy); border-radius: 22px; box-shadow: 0 6px 0 var(--navy); padding: 14px; margin: 6px 0 16px; }
.kk-card > img { width: 200px; height: 200px; object-fit: contain; flex: none; margin: 0 auto; }
.kk-info { flex: 1 1 260px; min-width: 0; } .kk-info h2 { margin: 0; } .kk-sub { margin: 2px 0 6px; font-weight: 800; color: #5d5780; }
.kk-about { font-size: 14px; margin: 8px 0; }
.kk-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; } .kk-stats div { background: #fff; border: 3px solid var(--navy); border-radius: 12px; padding: 4px 6px; text-align: center; }
.kk-stats dt { font-size: 11px; color: #5d5780; } .kk-stats dd { margin: 0; font-weight: 900; font-size: 18px; overflow-wrap: anywhere; } .kk-stats dd small { display: block; font-size: 11px; font-weight: 700; }
.kk-help { font-size: 13px; color: #5d5780; margin: 0 0 6px; }
.kk-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.kk-slot { font: inherit; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 4px solid var(--navy); border-radius: 16px; background: #fff; color: var(--navy); cursor: pointer; box-shadow: 0 4px 0 var(--navy); min-height: 76px; }
.kk-slot.sel { background: var(--sun); transform: translateY(2px); box-shadow: 0 2px 0 var(--navy); }
.kk-slot span { font-weight: 900; font-size: 14px; overflow-wrap: anywhere; } .kk-slot small { font-size: 11px; color: #5d5780; } .kk-arrow { font-size: 16px; }
.kk-empty { color: #8d88a8; }
.kk-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; }
.kk-w { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n t" "s t"; align-items: center; gap: 0 8px; background: #fff; border: 3px solid var(--navy); border-radius: 14px; padding: 6px 10px; }
.kk-w b { grid-area: n; } .kk-w small { grid-area: s; font-size: 12px; color: #5d5780; } .kk-w > em, .kk-w > button { grid-area: t; }
.kk-w.locked { background: #f2f1f7; } .kk-w.locked b { color: #8d88a8; }
.kk-on { font-style: normal; font-weight: 900; font-size: 14px; } .kk-lv { font-style: normal; font-size: 12px; font-weight: 800; color: #8d88a8; }
.kk-put { font: inherit; font-size: 13px; font-weight: 800; padding: 4px 12px; border: 3px solid var(--navy); border-radius: 99px; background: var(--sun); color: var(--navy); cursor: pointer; }
.zk-more { display: block; margin-top: 6px; font-size: 13px; font-weight: 800; color: var(--navy); }
@media (max-width: 480px) { .kk-slots { grid-template-columns: 1fr 1fr; } .kk-stats { grid-template-columns: 1fr 1fr; } .kk-stats div:last-child { grid-column: span 2; } .kk-card > img { width: 160px; height: 160px; } }

/* めいさん図鑑の もらった印（結果の画面・リンクなし） */
.meisan-got { display:flex; align-items:center; justify-content:center; gap:6px; margin:8px auto 0; padding:4px 12px; width:fit-content; max-width:100%; border:2px solid #2a2350; border-radius:999px; background:#fffbe8; font-weight:700; font-size:.92rem; }
.meisan-got svg { flex:none; }

/* ───── ホームを 3つの 場所に 分ける（11-12 本社「種類で まとめて ひと目で 分かるように」）
   たたかう（赤）・あつめる（緑）・れんしゅう（青）。数字キーは 並びの順（1〜4 たたかう・5 図鑑・6〜8 れんしゅう）。いっしょに いる子（.tsure）は 数字に 入れない ───── */
.zones { display: grid; gap: 22px; }
.z-fight { --zc: #d9482b; --zt: #fff1ec; } .z-collect { --zc: #17895f; --zt: #e9f9f2; } .z-train { --zc: #1f7fc0; --zt: #eaf6ff; }
.zone-h { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 12px; font-size: 24px; line-height: 1.2; }
.zone-h small { font-size: 13px; font-weight: 700; color: #5d5780; }
.zone-ic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; border: 3px solid var(--navy); background: var(--zc); color: #fff; box-shadow: 0 3px 0 var(--navy); flex: none; }
.zone-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.zone-cards .mode { grid-column: auto; } .zone-cards .mode.wide { grid-column: 1 / -1; }
.tsure { position: relative; display: flex; align-items: center; gap: 14px; min-height: 150px; padding: 12px 16px; text-decoration: none; color: var(--navy); background: #fff;
  border: 4px solid var(--navy); border-radius: 20px; box-shadow: 0 6px 0 var(--navy); transition: transform .08s; }
.tsure:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--navy); }
.tsure-pic { flex: none; display: grid; place-items: center; width: 116px; height: 116px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #fff 0, var(--zt) 70%); border: 3px dashed color-mix(in srgb, var(--zc) 70%, var(--navy)); }
.tsure-pic img { width: 104px; height: 104px; object-fit: contain; }
.tsure-tx { flex: 1; display: grid; gap: 2px; min-width: 0; }
.tsure-tx small { font-size: 12px; font-weight: 800; color: #5d5780; }
.tsure-tx b { font-size: 24px; line-height: 1.15; overflow-wrap: anywhere; }
.tsure-tx em { justify-self: start; font-style: normal; font-weight: 900; font-size: 13px; background: var(--sun); border: 2px solid var(--navy); border-radius: 99px; padding: 0 9px; }
.tsure-go { margin-top: 4px; font-size: 13px; font-weight: 800; color: color-mix(in srgb, var(--zc) 55%, var(--navy)); }
.tsure-count { position: absolute; right: 10px; top: 10px; font-size: 12px; font-weight: 800; background: #fff; border: 2px solid var(--navy); border-radius: 99px; padding: 0 8px; }
.tsure-count:empty { display: none; }
a.tsure:hover .tsure-pic img, a.tsure:focus-visible .tsure-pic img { transform: translateY(-4px) rotate(-5deg); transition: transform .25s cubic-bezier(.2, 1.6, .4, 1); }
@media (max-width: 420px) { .zone-h { font-size: 21px; } .tsure-pic { width: 92px; height: 92px; } .tsure-pic img { width: 84px; height: 84px; } .tsure-tx b { font-size: 21px; } }

/* たたかうを 大きく 左・あつめる と れんしゅう を 右に（広い 画面）。見出しは 色の 帯（11-12 に 3案を 辛口採点で くらべて この形＝70.7点。A 64.4・B 63.6・前 62.5）*/
.zone-h { padding: 6px 12px 6px 6px; background: var(--zc); color: #fff; border: 3px solid var(--navy); border-radius: 16px; box-shadow: 0 4px 0 var(--navy); -webkit-text-stroke: 0; }
.zone-h small { color: #fff; font-size: 14px; }
.zone-ic { background: #fff; color: var(--zc); box-shadow: none; }
.mode::before { background: var(--zc); }
.z-train .zone-cards { grid-template-columns: 1fr; gap: 10px; }
.z-train .mode { min-height: 0; display: grid; grid-template-columns: 60px 1fr; align-items: center; column-gap: 12px; padding: 8px 56px 8px 18px; }
.z-train .zone-cards .mode .mode-art { position: static; grid-row: 1 / 3; grid-column: 1; width: 60px; height: 60px; }
.z-train .mode b { grid-column: 2; align-self: end; white-space: nowrap; } .z-train .mode small { grid-column: 2; align-self: start; }
.z-train .mode b { padding: 0; font-size: 19px; } .z-train .mode small { padding: 0; margin: 0; font-size: 13px; }
.z-train .mode .have { top: 6px; right: 8px; }
/* 説明は 14px・行間 1.5（小学生が 読める 大きさ）／NEW は 札の 内側／いっしょに いる子は 低い 札 */
.zone-cards .mode small { font-size: 14px; line-height: 1.5; }
.zone-cards .mode .new { position: static; display: inline-block; margin: 0 0 2px 8px; border-top: 2px solid var(--navy); border-radius: 99px; }
.zone-cards .mode.wide { min-height: 150px; } .zone-cards .mode.wide b { font-size: 30px; margin-top: 0; }
@media (min-width: 641px) { .zone-cards .mode.wide .mode-art { width: 132px; height: 132px; } .zone-cards .mode.big { padding-right: 150px; } }
@media (min-width: 900px) { .z-fight .zone-cards .mode.big { min-height: 118px; } .z-fight .zone-cards .mode.big .mode-art { width: 108px; height: 108px; } .z-fight .zone-cards .mode.big .mode-art.duo { width: 120px; } .z-fight .zone-cards .mode.big .mode-art.duo img { width: 58px; height: 58px; } .z-fight .zone-cards .mode.big { padding-right: 130px; } }
@media (min-width: 600px) and (max-width: 899px) { .z-fight .zone-cards, .z-collect .zone-cards { grid-template-columns: 1fr 1fr; } .z-fight .zone-cards > .mode:last-child { grid-column: 1 / -1; } }
.tsure { min-height: 0; padding: 8px 14px; gap: 12px; } .tsure-pic { width: 76px; height: 76px; } .tsure-pic img { width: 68px; height: 68px; } .tsure-tx b { font-size: 20px; }
.tsure-tx { grid-template-columns: auto auto 1fr; align-items: center; column-gap: 8px; } .tsure-tx small, .tsure-go { grid-column: 1 / -1; }
@media (max-width: 640px) { .zone-cards .mode.big { min-height: 124px; } }
@media (min-width: 900px) {
  .zones { grid-template-columns: 1.35fr 1fr; grid-template-areas: "f c" "f t"; align-items: start; }
  .z-fight { align-self: stretch; display: flex; flex-direction: column; } .z-fight .zone-cards { flex: 1; grid-auto-rows: auto; align-content: stretch; }   /* 左の下を 右の列に そろえる（11-12 本社） */
  .z-fight { grid-area: f; } .z-collect { grid-area: c; } .z-train { grid-area: t; }
  .z-fight .zone-cards, .z-collect .zone-cards { grid-template-columns: 1fr; }
}
