/* カエル化彼女の UI（0.1.42）：テーマは「カエル」。深い緑・カエルの緑・彼女のピンク・クリーム色。
   枠は、角の 1 つだけ小さい丸（しずくの形）。ゲージ・返事のボタンに、カエルの目（上に 2 つ出る丸）を付ける（題字・ワイプの枠の目は、分かりづらいので 0.1.43 で外した） */
:root { --deep: #0e3a33; --pond: #17564b; --teal: #1f7a72; --mint: #c9f0e2; --frog: #6cc23a; --frogd: #4f9a2a; --pink: #ff7fa8; --pinkd: #d6457a; --cream: #fff8e4; --ink: #1d3b2c; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #8fc7e8; color: #fff;
  font-family: "Zen Maru Gothic", system-ui, sans-serif; font-weight: 900;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; overscroll-behavior: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.game { position: fixed; inset: 0; }
.screen-wrap, #screen { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: #fff; }
body.ready .loading { display: none; }
[hidden] { display: none !important; }

.hud { position: absolute; inset: 0; pointer-events: none;
  padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left)); }
.gauge { display: flex; width: max-content; align-items: center; gap: 9px; background: linear-gradient(#2a8c84, var(--teal)); border: 2px solid var(--mint); border-radius: 16px 16px 16px 4px; padding: 9px 12px 6px; box-shadow: 0 3px 0 var(--deep); }
.gauge-label { font-size: 13px; white-space: nowrap; color: var(--cream); letter-spacing: .06em; }
.pips { display: inline-flex; gap: 5px; }
/* カエルの顔（main.js の FROG_SVG）。部位の色は、ここの決まりで塗る（変数を使わない。iPhone の Safari で塗られないことがあったため） */
.kf { display: block; overflow: visible; }
.kf-h { stroke-linejoin: round; stroke-width: 5px; }
.kf-m { fill: none; stroke: none; stroke-width: 4px; stroke-linecap: round; }
.kf-c { fill: none; }
/* カエルの顔 5 つ。まだのものは暗い影、ミスのたびに緑のカエルになる */
.pips i { display: block; width: 27px; height: 22px; }
.pips i .kf { width: 100%; height: 100%; }
.pips .kf-h { fill: #14534d; stroke: #3f9d94; stroke-width: 7px; } .pips .kf-w { fill: #1b6a62; } .pips .kf-p { fill: #14534d; }
.pips i.on .kf-h { fill: #6cc23a; stroke: #eaffd2; } .pips i.on .kf-w { fill: #fff; } .pips i.on .kf-p { fill: #1d3b2c; } .pips i.on .kf-c { fill: #f59bb6; } .pips i.on .kf-m { stroke: #4f9a2a; }

.pips i.new { animation: pip .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pip { 0% { transform: scale(2.6); } 100% { transform: scale(1); } }
.dist { margin-top: 7px; display: inline-block; font-size: 14px; background: var(--cream); color: var(--pinkd); border: 2px solid var(--pink); border-radius: 14px 14px 14px 4px; padding: 1px 12px 2px; white-space: nowrap; box-shadow: 0 2px 0 rgba(14, 58, 51, .5); }
.dist.warn { background: #e0443e; color: #fff; border-color: #fff; animation: shake .25s infinite; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }
.signal { margin-top: 7px; margin-left: 6px; display: inline-block; font-size: 14px; border: 2px solid var(--mint); border-radius: 14px; padding: 1px 12px 2px; white-space: nowrap; background: #c8281e; box-shadow: 0 2px 0 rgba(14, 58, 51, .5); }
.signal.green { background: #1f9a4c; }
.signal.wind { background: rgba(40, 84, 140, .85); }
/* ぬれ具合（ステージ 3）。色が変わるだけで、揺らさない・点滅させない */
.wet { margin-top: 6px; display: flex; align-items: center; gap: 7px; width: max-content; font-size: 13px; background: var(--teal); border: 2px solid var(--mint); border-radius: 14px; padding: 1px 12px 2px; white-space: nowrap; box-shadow: 0 2px 0 rgba(14, 58, 51, .5); }
.wet i { display: block; width: 84px; height: 9px; border-radius: 5px; background: rgba(0, 0, 0, .3); overflow: hidden; }
.wet b { display: block; width: 100%; height: 100%; background: #6ec1ff; transform-origin: left center; transform: scaleX(0); }
.wet.warn { background: rgba(150, 40, 34, .85); }
.wet.warn b { background: #ffd0c8; }
.finder { position: absolute; border: 4px solid var(--cream); border-radius: 12px 12px 12px 4px; box-shadow: 0 0 0 2px var(--frogd), 0 4px 0 2px var(--deep); overflow: hidden; pointer-events: none; }
.finder span { position: absolute; left: 0; top: 0; font-size: 11px; background: var(--frogd); padding: 0 8px 1px; border-radius: 0 0 8px 0; white-space: nowrap; }
.finder i { position: absolute; inset: 0; background: radial-gradient(circle at 50% 22%, rgba(255, 255, 240, .95), rgba(255, 255, 240, .35) 55%, rgba(255, 255, 240, .1)); opacity: 0; }
.finder b { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(0, 0, 0, .45); }
.finder u { display: block; width: 100%; height: 100%; background: #ffe27a; transform-origin: left center; }
.finder canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.extra { width: 100%; }
.extra p { margin: 0 0 4px; font-size: 13px; opacity: .9; }
.extra .photos { display: flex; justify-content: center; gap: 8px; }
.extra figure { margin: 0; width: 30%; max-width: 104px; background: #fff; padding: 4px 4px 2px; border-radius: 3px; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); color: #333; }
.extra figure:nth-child(odd) { transform: rotate(-2deg); } .extra figure:nth-child(even) { transform: rotate(2deg); }
.extra figure canvas, .extra figure .none { display: block; width: 100%; aspect-ratio: 3 / 4; background: #9aa3a8; }
.extra figure .none { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; }
.extra figcaption { font-size: 11px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.extra figure.bad figcaption { color: #c0392b; }
/* ステージ 6 の結果：6 つのデートの記録 */
.extra .dates-title { margin-top: 10px; }
.extra .dates { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
.extra .dates li { background: #e6f1d2; border-radius: 8px 8px 8px 3px; padding: 3px 2px 4px; font-size: 11px; line-height: 1.35; text-align: center; white-space: nowrap; border-bottom: 0; }
.extra .dates li::before { content: none; }
.extra .dates li span { display: block; opacity: .85; }
.extra .dates li b { font-size: 15px; }
.extra .dates li.best b { color: var(--pinkd); }
.wipe-frame { position: absolute; border: 5px solid var(--cream); border-radius: 24px 24px 24px 8px; box-shadow: 0 0 0 3px var(--frogd), 0 5px 0 3px var(--deep); }
.wipe-frame span { position: absolute; left: -5px; bottom: -5px; font-size: 12px; background: var(--frogd); color: #fff; padding: 0 9px 1px; border-radius: 0 10px 0 8px; }
.wipe-frame.big span { font-size: 15px; }
.bubble { position: absolute; left: 50%; top: 15%; transform: translateX(-50%); width: min(86vw, 430px); background: var(--cream); color: var(--ink);
  border: 3px solid var(--pond); border-radius: 24px; padding: 9px 14px 11px; font-size: clamp(15px, 4.2vw, 19px); line-height: 1.45; box-shadow: 0 4px 0 var(--deep); text-align: center; }
.bubble::after { content: ""; position: absolute; right: 44px; top: -12px; width: 18px; height: 18px; background: inherit; border: 3px solid var(--pond); border-right: 0; border-bottom: 0; transform: rotate(52deg) skew(12deg); border-radius: 6px 0 0 0; }
.bubble p { margin: 0; }
.bubble i { display: block; height: 8px; margin-top: 7px; border-radius: 4px; background: linear-gradient(90deg, var(--frog), #b6e36b); transform-origin: left center; }
.bubble.frog { background: #e3f6c8; }
.bubble.self i { display: none; }
.bubble.muffled p { color: #8a8a8a; letter-spacing: .12em; }
.bubble.muffled::before { content: "🎆 花火の音で、よく聞こえない"; display: block; font-size: .68em; color: #c0392b; margin-bottom: 2px; }
.hint { position: absolute; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: 96vw; background: rgba(14, 58, 51, .9); color: var(--cream);
  border: 2px solid #9fe0c7; border-radius: 16px; padding: 5px 12px 6px; font-size: clamp(12px, 3.3vw, 15px); font-weight: 700; text-align: center; }
.toast { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); font-family: "Dela Gothic One", sans-serif; font-weight: 400; font-size: clamp(26px, 8vw, 44px);
  -webkit-text-stroke: 2px var(--deep); paint-order: stroke fill; text-shadow: 0 4px 0 var(--deep); white-space: nowrap; text-align: center; }
.toast.bad { color: #b9f25e; } .toast.good { color: #ffd1e0; }

.touch { position: absolute; inset: 0; }
.stick { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; background: rgba(23, 86, 75, .35); border: 2px solid var(--mint); pointer-events: none; }
.knob { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: var(--cream); box-shadow: 0 0 0 3px var(--frog); }
.btns { isolation: isolate; position: absolute; right: max(14px, env(safe-area-inset-right)); bottom: max(22px, env(safe-area-inset-bottom)); display: flex; gap: 12px; align-items: flex-end; }
/* 返事のボタン：カエルの顔の形（上に目が 2 つ）。「うん」はピンク、「ううん」は緑 */
.round { position: relative; width: 92px; height: 76px; padding: 18px 0 0; border: 0; background: transparent; color: #fff; font: inherit; font-size: 18px; white-space: nowrap; -webkit-appearance: none; appearance: none; }
.round .kf { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(0 5px 0 #0e3a33); }
.round span { position: relative; }
.round .kf-h { stroke: #fff8e4; } .round .kf-w { fill: #fff; } .round .kf-p { fill: #1d3b2c; } .round .kf-c { fill: rgba(255, 255, 255, .3); }
.round.yes { text-shadow: 0 2px 0 #d6457a; } .round.yes .kf-h { fill: #ff7fa8; }
.round.no { text-shadow: 0 2px 0 #4f9a2a; width: 80px; height: 66px; padding-top: 16px; font-size: 16px; } .round.no .kf-h { fill: #6cc23a; }
.round:active, .round.down { transform: translateY(3px); } .round:active .kf, .round.down .kf { filter: drop-shadow(0 2px 0 #0e3a33); }
.btns.idle .round, .btns.solo .round.no { opacity: .5; }
.round.call .kf { animation: kf-call 1.1s ease-in-out infinite; } /* ステージが「うん」をほかの用（🎒 など）に使うとき：押せると気づくように、ふちが光る（動かさない） */
@keyframes kf-call { 50% { filter: drop-shadow(0 5px 0 #0e3a33) drop-shadow(0 0 6px #fff36b) drop-shadow(0 0 6px #fff36b); } }
.round.call:active .kf { animation: none; }

.menu { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; text-align: center;
  padding: 16px 16px max(18px, env(safe-area-inset-bottom)); background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 40%, rgba(14, 58, 51, .88)); }
.logo { position: absolute; top: max(4vh, env(safe-area-inset-top)); left: 0; right: 0; margin: 0; display: flex; justify-content: center; align-items: flex-end; flex-wrap: nowrap;
  font-family: "Dela Gothic One", sans-serif; font-weight: 400; font-size: clamp(34px, 10vw, 70px); line-height: 1; letter-spacing: 0; pointer-events: none; }
/* 字ごとに少し傾けて、ぴょこぴょこ跳ねる。「カエル化」は緑、「彼女」はピンク。字に濃い色のふち。
   ふちが隣の字に食い込んで読みづらかったので、字の間を少し空け、ふちを細めにしている。
   跳ね方はカエル：かがんで（つぶれる）→ 縦にのびて高く跳ぶ → 着地でつぶれる → ぷるんと戻る。
   白いふちは付けない（カエルの顔の形の白い台も試したが、外した） */
.logo b { display: inline-block; font-weight: 400; margin: 0 .035em; transform-origin: 50% 100%; animation: logo-hop 2.4s ease-in-out infinite; paint-order: stroke fill; -webkit-text-stroke: .1em var(--c2);
  position: relative; z-index: 0; text-shadow: 0 .05em 0 var(--deep); }
.logo-frog { --c2: #1f5a17; color: var(--frog); display: inline-flex; }
.logo-girl { --c2: #8f1f4c; color: #ff8db5; display: inline-flex; position: relative; margin-left: .12em; font-size: 1.12em; }
.logo-frog b:nth-child(odd) { --r: -6deg; } .logo-frog b:nth-child(even) { --r: 5deg; }
.logo-frog b:nth-child(1) { animation-delay: 0s; } .logo-frog b:nth-child(2) { animation-delay: .12s; } .logo-frog b:nth-child(3) { animation-delay: .24s; } .logo-frog b:nth-child(4) { animation-delay: .36s; }
.logo-girl b:nth-child(1) { --r: -4deg; animation-delay: .5s; } .logo-girl b:nth-child(2) { --r: 6deg; animation-delay: .62s; }
.logo-girl i { position: absolute; right: -.32em; top: -.3em; font-style: normal; font-family: sans-serif; font-size: .5em; color: var(--pink); -webkit-text-stroke: 0;
  text-shadow: 0 0 0 #fff, 2px 2px 0 #fff, -2px 2px 0 #fff, 2px -2px 0 #fff, -2px -2px 0 #fff; transform: rotate(14deg); animation: logo-beat 1.2s ease-in-out infinite; }
@keyframes logo-hop { 0%, 52%, 100% { transform: translateY(0) rotate(var(--r, 0deg)) scale(1, 1); } 60% { transform: translateY(0) rotate(var(--r, 0deg)) scale(1.14, .8); } 67% { transform: translateY(-.32em) rotate(calc(var(--r, 0deg) - 4deg)) scale(.86, 1.18); } 74% { transform: translateY(-.42em) rotate(var(--r, 0deg)) scale(.98, 1.03); } 82% { transform: translateY(0) rotate(calc(var(--r, 0deg) + 3deg)) scale(1.18, .78); } 88% { transform: translateY(0) rotate(var(--r, 0deg)) scale(.95, 1.06); } 94% { transform: translateY(0) rotate(var(--r, 0deg)) scale(1.03, .97); } }
@keyframes logo-beat { 0%, 100% { transform: rotate(14deg) scale(1); } 15% { transform: rotate(14deg) scale(1.25); } 30% { transform: rotate(14deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .logo b, .logo-girl i { animation: none; transform: rotate(var(--r, 0deg)); } }
.lead { margin: 0; font-size: clamp(13px, 3.6vw, 18px); white-space: nowrap; text-shadow: 0 2px 4px rgba(0, 0, 0, .6); }
.keys, .note { margin: 0; font-size: 12px; font-weight: 700; opacity: .95; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
kbd { background: rgba(255, 255, 255, .9); color: #222; border-radius: 4px; padding: 0 5px; margin: 0 1px; font: inherit; font-size: 11px; }
.touch-only { display: none; }
@media (pointer: coarse) { .touch-only { display: block; } .keyboard-only { display: none; } }
.stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(100%, 380px); margin: 2px 0 4px; }
.stages button { flex: 1 1 0; min-width: 0; font: inherit; font-size: 15px; font-weight: 900; color: #fff; background: var(--teal); border: 2px solid var(--mint);
  border-radius: 16px 16px 16px 4px; padding: 6px 4px 6px; cursor: pointer; line-height: 1.25; box-shadow: 0 3px 0 var(--deep); }
.stages button { position: relative; }
/* パーフェクト（カエル化 0% でクリア）したステージ：金のふちと、右上に 👑（0.1.110。オーナーの依頼） */
.stages button.perfect { border-color: #f2c94c; box-shadow: 0 3px 0 var(--deep), 0 0 0 1px #f2c94c; }
.stages button.perfect::after { content: "👑"; position: absolute; top: -12px; right: -5px; font-size: 18px; line-height: 1; transform: rotate(14deg); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .55)); }
.perfects { margin: 0; font-size: 12px; font-weight: 900; color: #ffe9a6; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.perfects[hidden] { display: none; }
.stages button small { display: block; font-size: 11px; font-weight: 700; opacity: .95; white-space: nowrap; }
/* ステージ 7（ステージ 6 をクリアすると出る）：6 つの下に、横はばいっぱいの 1 行の帯にする（かくしステージらしく、紺地に金のふち）。
   0.1.104 までは、3 つずつ 2 段の下の、まん中に 1 つだけ同じ形で置いていて、つり合いが悪かった（0.1.105。オーナーの指摘） */
.stages button.secret { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: center; gap: 10px; padding: 7px 10px; background: #1f2a4a; border-color: #f2c94c; color: #ffe9a6; }
.stages button.secret::before { content: "★"; color: #f2c94c; }
.stages button.secret small { display: inline; font-size: 13px; color: #fff; }
.stages button.secret.on { background: var(--pink); border-color: #fff; color: #fff; }
.stages button.secret.on::before { color: #fff; }
.stages button.on { background: var(--pink); border-color: #fff; }
.stages button:disabled { cursor: default; background: #2f5650; border-color: #6f978d; color: #cfe0da; }
.stages button:disabled small { font-size: 10px; }
/* 幅のせまい画面：3 つが 1 行に並び、ステージ名（8 文字）が 1 行に収まるように */
@media (max-width: 360px) { .keys { font-size: 11px; padding-left: 40px; } .stages { gap: 5px; } .stages button { font-size: 14px; padding: 7px 2px 6px; } .stages button small { font-size: 10px; letter-spacing: -.04em; } }
.card .unlock { margin: 0; width: 100%; box-sizing: border-box; padding: 7px 10px; border-radius: 14px; background: #fde6ee; font-size: 14px; line-height: 1.45; font-weight: 900; color: var(--pinkd); white-space: pre-line; }
.ver { position: absolute; right: 8px; bottom: 6px; font-size: 11px; opacity: .8; font-weight: 500; }
.btn { font: inherit; font-size: 18px; border: 0; border-radius: 999px; padding: 10px 26px; color: #fff; white-space: nowrap; cursor: pointer; }
.btn-main { background: var(--pink); box-shadow: 0 0 0 3px #fff, 0 5px 0 3px var(--deep); text-shadow: 0 2px 0 var(--pinkd); } .btn-sub { background: var(--pond); box-shadow: 0 0 0 2px var(--mint); font-size: 15px; padding: 7px 20px; }

.card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(92vw, 420px); max-height: 92vh; max-height: 92svh; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: var(--cream); color: var(--ink);
  border: 4px solid var(--pond); border-radius: 26px 26px 26px 8px; box-shadow: 0 6px 0 var(--deep); padding: 16px 18px 20px; text-align: center; display: flex; flex-direction: column; gap: 9px; align-items: center; }
.card h2 { margin: 0; font-family: "Dela Gothic One", sans-serif; font-size: clamp(22px, 6.4vw, 30px); font-weight: 400; color: var(--pond); }
.kicker { margin: 0; font-size: 13px; opacity: .9; }
.pct { margin: 0; font-size: 16px; } .pct b { font-size: 34px; color: var(--frogd); font-family: "Dela Gothic One", sans-serif; font-weight: 400; }
/* パーフェクト（カエル化 0% でクリア）の結果：金のカード・数字が転がって「0%」・はんこ・紙ふぶき（js/main.js の beginPerfect） */
.stamp, .crowns { margin: 0; } .stamp[hidden], .crowns[hidden] { display: none; }
.card.perfect { border-color: #e9b100; background: radial-gradient(circle at 50% 0, #fff3b8, var(--cream) 62%); box-shadow: 0 6px 0 #8a6400, 0 0 0 4px #fff3b0, 0 0 42px 12px rgba(255, 214, 64, .6); }
.card.perfect h2 { color: #c47a00; }
.stamp { font-family: "Dela Gothic One", sans-serif; font-size: 19px; letter-spacing: .1em; color: #fff; background: linear-gradient(#ffcf3a, #f29a00); padding: 1px 16px 3px; border-radius: 999px; border: 3px solid #fff; box-shadow: 0 3px 0 #a86a00; text-shadow: 0 2px 0 #a86a00; transform: rotate(-3deg); opacity: 0; }
.stamp.show { opacity: 1; animation: pf-stamp .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pf-stamp { from { transform: rotate(9deg) scale(3); opacity: 0; } }
.card.perfect .pct { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.card.perfect .pct span { font-weight: 900; color: #a86a00; }
.card.perfect .pct b { display: inline-block; font-size: 66px; line-height: 1.05; color: #a9b7a2; font-variant-numeric: tabular-nums; }
.card.perfect .pct b.land { color: #f5a400; text-shadow: 0 3px 0 #fff, 0 6px 0 #a86a00, 0 0 18px #ffe27a; animation: pf-land .55s cubic-bezier(.2, 1.9, .4, 1); }
@keyframes pf-land { from { transform: scale(2.1) rotate(-9deg); } }
.crowns { font-size: 14px; line-height: 1.5; font-weight: 900; color: #a86a00; white-space: pre-line; opacity: 0; transition: opacity .3s .25s; }
.crowns.show { opacity: 1; }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti[hidden] { display: none; }
.confetti i { position: absolute; top: -24px; width: 9px; height: 15px; border-radius: 2px; animation: pf-fall linear 2 both; }
@keyframes pf-fall { to { transform: translate(var(--sw, 0), 112vh) rotate(760deg); } }
/* 横向きの低い画面：ボタンまで 1 画面に収める（はんこは左上の角に重ね、「カエル化 0%」は横に並べる） */
@media (orientation: landscape) and (max-height: 460px) {
  .card.perfect { gap: 5px; padding-top: 12px; padding-bottom: 14px; }
  .card.perfect .stamp { position: absolute; left: 8px; top: 8px; font-size: 13px; padding: 0 9px 2px; transform: rotate(-8deg); }
  .card.perfect .kicker { align-self: flex-end; }
  .card.perfect .pct { flex-direction: row; align-items: baseline; gap: 8px; }
  .card.perfect .pct b { font-size: 46px; }
  .card.perfect .crowns { white-space: normal; font-size: 13px; }
  .card.perfect #btn-next { margin-top: 0; } .card.perfect .row { margin-top: 2px; }
}
@media (prefers-reduced-motion: reduce) { .stamp.show, .card.perfect .pct b.land { animation: none; } }
.card ul { margin: 0; width: 100%; box-sizing: border-box; padding: 3px 12px; list-style: none; font-size: 14px; font-weight: 700; line-height: 1.35; text-align: left; background: #fff; border: 2px solid #cfe6c6; border-radius: 14px; }
.card ul:empty { display: none; }
.card ul li { display: flex; gap: 6px; padding: 5px 0; border-bottom: 2px dotted #cfe6c6; } .card ul li:last-child { border-bottom: 0; }
.card li::before { content: "🐸"; flex: none; }
/* シェア：X は黒、LINE は緑、端末のシェアは青（ほかのゲームと同じ色） */
.card .share { display: flex; gap: 8px; width: 100%; }
.card .sh { flex: 1; font: inherit; font-size: 14px; font-weight: 900; color: #fff; border: 0; border-radius: 12px; padding: 9px 4px; white-space: nowrap; cursor: pointer; box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.card .sh:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.card .sh[hidden] { display: none; }
.sh-x { background: #000; } .sh-line { background: #06c755; } .sh-os { background: #0058f8; }
/* 結果のボタン：次のステージ（あれば）を大きく 1 つ、その下に「もう一度」「タイトル」を同じ大きさで横に並べる */
.card #btn-next { width: 100%; margin-top: 4px; }
.card .row { display: flex; gap: 12px; width: 100%; margin-top: 6px; } .card .row .btn { flex: 1; font-size: 16px; padding: 10px 0; }
.card #btn-next:not([hidden]) ~ .row #btn-retry { background: #fff; color: var(--pinkd); text-shadow: none; box-shadow: 0 0 0 3px var(--pink); }
.mute { position: absolute; left: max(10px, env(safe-area-inset-left)); bottom: max(10px, env(safe-area-inset-bottom)); width: 44px; height: 44px; padding: 0; border-radius: 50%;
  border: 2px solid var(--mint); background: var(--pond); color: #fff; font: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.pause { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(14, 58, 51, .78); font-size: 22px; }
.pause p { margin: 0; background: var(--cream); color: var(--pond); border: 4px solid var(--pond); border-radius: 26px 26px 26px 8px; box-shadow: 0 6px 0 var(--deep); padding: 14px 30px 16px; text-align: center; font-family: "Dela Gothic One", sans-serif; font-weight: 400; }
.pause small { display: block; margin-top: 4px; font-family: "Zen Maru Gothic", sans-serif; font-weight: 900; font-size: 15px; color: var(--pinkd); }

/* ---------- ステージ 7「極秘ミッション」だけの表示（js/stages/sora-hud.js） ---------- */
/* ミッションの札：いまの目標と、進みぐあい */
.s7-mission { display: table; margin-top: 7px; font-size: 12px; line-height: 1.5; color: #d9ffe4; background: rgba(10, 40, 32, .82); border: 2px solid #59e07a; border-radius: 6px 14px 14px 6px; padding: 1px 12px 2px 8px; white-space: nowrap; box-shadow: 0 2px 0 rgba(14, 58, 51, .5); }
.s7-mission b { font-family: "Dela Gothic One", sans-serif; font-weight: 400; font-size: 10px; letter-spacing: .12em; color: #59e07a; margin-right: 7px; }
.s7-mission i { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 8px; }
.s7-mission i u { width: 9px; height: 9px; border-radius: 2px; background: rgba(217, 255, 228, .22); }
.s7-mission i u.on { background: #59e07a; }
.s7-mission i s { display: block; width: 92px; height: 9px; border-radius: 3px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.s7-mission i s b { display: block; height: 100%; margin: 0; background: #ff5c8a; }
/* 横長では、吹き出しの左に収まるように 2 段。縦長では 1 段（下の吹き出しに重ならないように） */
.s7-mission span { display: block; }
@media (orientation: portrait) { .s7-mission span { display: inline; } .s7-mission > b { display: none; } }
.s7-mission.boss { border-color: #ff5c8a; } .s7-mission.boss b { color: #ff9fbb; }
/* 速さと高さ（空中戦）：機体の左右に、うすく */
.s7-tape { position: absolute; top: 47%; font-size: 13px; line-height: 1.25; color: #b9ffcc; text-shadow: 0 1px 2px rgba(10, 40, 32, .9); padding: 2px 8px; border-top: 2px solid rgba(185, 255, 204, .7); border-bottom: 2px solid rgba(185, 255, 204, .7); background: rgba(10, 40, 32, .28); text-align: center; min-width: 58px; }
.s7-tape b { display: block; font-size: 9px; letter-spacing: .14em; font-weight: 400; opacity: .85; }
.s7-tape.l { left: 13%; } .s7-tape.r { right: 13%; }
.s7-tape.warn { color: #ffb3b3; border-color: #ff6b6b; background: rgba(120, 20, 20, .4); }
@media (orientation: portrait) { .s7-tape { top: 40%; font-size: 12px; min-width: 50px; padding: 1px 5px; } .s7-tape.l { left: 3%; } .s7-tape.r { right: 3%; } }
/* 画面の外のメカヘビを指す矢印（地上戦） */
.s7-arrow { position: absolute; width: 34px; height: 34px; }
.s7-arrow i { position: absolute; inset: 0; background: #7a52c4; border: 2px solid #ffd84a; clip-path: polygon(50% 0, 96% 92%, 50% 70%, 4% 92%); }
.s7-arrow::before { content: ""; position: absolute; inset: -3px; background: #ffd84a; clip-path: polygon(50% 0, 100% 100%, 50% 76%, 0 100%); }
/* 通信ふうの吹き出し・ワイプ（空中戦・地上戦のあいだ） */
.hud.s7 .bubble { background: #ecfff1; border-radius: 10px; }
.hud.s7 .bubble::before { content: "◉ 通信　ケロ・ワン"; display: block; font-size: .6em; letter-spacing: .1em; color: #1f9a4c; margin: -2px 0 1px; text-align: left; }
.hud.s7 .bubble.frog::before { content: "◉ 通信　ケロ・ワン（ケロ）"; }
.hud.s7 .wipe-frame::after { content: ""; position: absolute; inset: 0; border-radius: 18px 18px 18px 4px; background: repeating-linear-gradient(0deg, rgba(20, 80, 50, .1) 0 2px, transparent 2px 5px); pointer-events: none; }
/* 作戦指令（出撃の前）：極秘の書類ばさみ。厚紙の表紙（見出しのつまみ）に、紙の指令書がはさんである */
.s7-brief { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: auto; padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  background: repeating-linear-gradient(0deg, rgba(120, 255, 170, .05) 0 1px, transparent 1px 4px), radial-gradient(ellipse at 50% 45%, rgba(8, 30, 24, .5), rgba(4, 16, 13, .86)); }
.s7-brief[hidden] { display: none; }
.s7-doc { position: relative; width: min(94vw, 760px); padding: 26px 10px 10px; background: linear-gradient(175deg, #d2b077, #b9935a); border-radius: 6px 12px 12px 12px; box-shadow: 0 10px 0 rgba(4, 16, 13, .55), 0 0 0 2px #8a6a3c inset; transform: rotate(-1.1deg); animation: s7doc .5s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes s7doc { from { transform: translateY(60px) rotate(4deg); opacity: 0; } }
.s7-tab { position: absolute; left: 58px; top: 5px; font-family: "Dela Gothic One", sans-serif; font-size: 12px; letter-spacing: .2em; color: #6b4d24; white-space: nowrap; }
.s7-tab i { font-style: normal; font-family: "Zen Maru Gothic", sans-serif; font-weight: 700; font-size: 10px; letter-spacing: .08em; margin-left: 12px; opacity: .8; }
.s7-paper { position: relative; color: #2a3a30; text-align: left; padding: 10px 16px 12px; border-radius: 3px; transform: rotate(.7deg);
  background: repeating-linear-gradient(0deg, transparent 0 23px, rgba(42, 58, 48, .07) 23px 24px), linear-gradient(170deg, #fbf4de, #efe4c6); box-shadow: 0 2px 5px rgba(60, 40, 10, .45); }
.s7-paper::before { content: ""; position: absolute; left: 22px; top: -13px; width: 16px; height: 40px; border: 3px solid #8f999f; border-radius: 9px; border-bottom-color: transparent; box-shadow: 1px 1px 0 rgba(0, 0, 0, .25); } /* 紙ばさみ */
.s7-paper header { position: relative; padding-left: 34px; border-bottom: 3px double #2a3a30; padding-bottom: 5px; }
.s7-paper small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .28em; opacity: .75; }
.s7-paper h2 { margin: 0; font-family: "Dela Gothic One", sans-serif; font-weight: 400; font-size: clamp(19px, 5.6vw, 28px); line-height: 1.25; letter-spacing: .03em; }
.s7-stamp { position: absolute; right: 0; top: -2px; font-style: normal; font-family: "Dela Gothic One", sans-serif; font-size: clamp(22px, 6vw, 30px); line-height: 1; letter-spacing: .08em; color: #d2372f; border: 3px solid #d2372f; outline: 1.5px solid #d2372f; outline-offset: 2px; border-radius: 6px; padding: 3px 8px 6px 10px; transform: rotate(9deg); opacity: .88; mix-blend-mode: multiply; animation: s7stamp .28s .55s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes s7stamp { from { transform: rotate(9deg) scale(2.6); opacity: 0; } }
.s7-body { display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); gap: 12px 16px; align-items: center; margin-top: 9px; }
.s7-map { margin: 0; padding: 4px 4px 0; background: #fff; box-shadow: 0 1px 4px rgba(60, 40, 10, .4); transform: rotate(-1.6deg); }
.s7-map svg { display: block; width: 100%; height: auto; }
.s7-map figcaption { font-size: 10px; text-align: center; letter-spacing: .08em; padding: 1px 0 2px; opacity: .8; }
.s7-mt { font: 700 10px "Zen Maru Gothic", sans-serif; text-anchor: middle; }
.s7-mq { font: 400 17px "Dela Gothic One", sans-serif; text-anchor: middle; }
.s7-route { animation: s7route 1.5s .7s ease-in-out both; }
@keyframes s7route { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.s7-goal { transform-box: fill-box; transform-origin: center; animation: s7pop .3s 2.1s cubic-bezier(.3, 1.8, .5, 1) both; }
@keyframes s7pop { from { transform: scale(0); } }
.s7-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: clamp(13px, 3.6vw, 15px); line-height: 1.45; font-weight: 700; }
.s7-list li { display: grid; grid-template-columns: 3.4em 1fr; gap: 9px; align-items: start; animation: s7item .35s both; }
.s7-list li:nth-child(1) { animation-delay: .75s; } .s7-list li:nth-child(2) { animation-delay: 1.05s; } .s7-list li:nth-child(3) { animation-delay: 1.35s; }
@keyframes s7item { from { opacity: 0; transform: translateX(-10px); } }
.s7-list b { font-weight: 900; font-size: .9em; letter-spacing: .1em; text-align: center; color: #fbf4de; background: #2a3a30; border-radius: 3px; padding: 1px 0 2px; margin-top: 1px; }
.s7-list li:nth-child(2) b { background: #6236ad; } .s7-list li:nth-child(3) b { background: #d2372f; }
.s7-list u { text-decoration: none; background: #2a3a30; color: #2a3a30; border-radius: 2px; letter-spacing: -.08em; }
.s7-paper footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed rgba(42, 58, 48, .5); }
.s7-sign { font-size: 11px; line-height: 1.5; letter-spacing: .06em; opacity: .8; white-space: nowrap; }
.s7-paper button { font: inherit; font-family: "Dela Gothic One", sans-serif; font-size: clamp(16px, 4.6vw, 20px); white-space: nowrap; color: #fff; background: var(--pink); border: 3px solid #fff; border-radius: 30px; padding: 7px 26px 9px; box-shadow: 0 4px 0 var(--pinkd), 0 6px 8px rgba(60, 40, 10, .35); cursor: pointer; touch-action: manipulation; animation: s7go 1.1s 2.2s ease-in-out infinite; }
@keyframes s7go { 50% { box-shadow: 0 4px 0 var(--pinkd), 0 6px 8px rgba(60, 40, 10, .35), 0 0 0 6px rgba(255, 127, 168, .35); } } /* 押す所だと分かるように、ふちが光る（動かさない） */
.s7-paper button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--pinkd); animation: none; }
/* 縦長：地図を上、項目を下。ワイプ（右上）の下から始める */
@media (orientation: portrait) {
  .s7-brief { align-items: center; padding-top: 150px; padding-bottom: 20px; }
  .s7-body { grid-template-columns: 1fr; }
  .s7-map { width: 88%; margin: 0 auto; }
  .s7-sign { display: none; } .s7-paper footer { justify-content: center; }
  .s7-stamp { top: -30px; right: -8px; font-size: 21px; } /* 題に重ならないように、紙の右上の角へ */
  .s7-tab i { display: none; }
}
/* 横長で背の低い画面（スマホの横向き）：すき間と字を詰める */
@media (orientation: landscape) and (max-height: 460px) {
  .s7-doc { width: min(94vw, 680px); padding: 20px 8px 7px; }
  .s7-tab { top: 2px; font-size: 11px; }
  .s7-paper { padding: 6px 14px 8px; background-size: auto; }
  .s7-paper h2 { font-size: 20px; } .s7-stamp { font-size: 22px; }
  .s7-body { margin-top: 6px; gap: 8px 14px; grid-template-columns: minmax(0, 40fr) minmax(0, 60fr); }
  .s7-list { gap: 4px; font-size: 13px; }
  .s7-paper footer { margin-top: 6px; padding-top: 5px; }
  .s7-paper button { font-size: 16px; padding: 4px 22px 6px; }
}
@media (prefers-reduced-motion: reduce) { .s7-doc, .s7-stamp, .s7-route, .s7-goal, .s7-list li, .s7-paper button { animation: none; } }

/* ほかのゲーム・制作のリンク（タイトル）と、フォローのボタン（結果）。ほかのゲームと同じ形 */
.links { margin: 0; font-size: 12px; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.links a { color: #fff; }
.follow { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 12px; font-weight: 700; color: #6b7d63; }
.follow a { color: var(--pond); display: flex; padding: 4px; }
.follow svg { width: 20px; height: 20px; fill: currentColor; }
/* 横向きの低い画面では、結果のカードをボタンまで 1 画面に収めたいので、フォローは出さない */
@media (orientation: landscape) and (max-height: 500px) { .card .follow { display: none; } }
