/* ブヒ冒険：ゲーム一覧＋ブヒアドベンチャー */

/* ---- ゲーム一覧 ---- */
.adv-menu { width: min(92%, 460px); display: flex; flex-direction: column; gap: 12px; }
.adv-game {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 14px; border: none; border-radius: 16px; cursor: pointer;
  background: #fff; box-shadow: 0 4px 12px rgba(180, 120, 150, .18);
}
.adv-game.locked { opacity: .55; cursor: default; }
.adv-game-ic { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(160deg, #ffc3dc, #ffd6e7); display: flex; align-items: center; justify-content: center; }
.adv-ic-svg { width: 24px; height: 24px; fill: #b0507a; }
.adv-game-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.adv-game-name { font-weight: 800; color: #5a3a48; }
.adv-game-desc { font-size: .8rem; color: #a08a94; }
.adv-game-lock { flex: 0 0 auto; }
.adv-lock-svg { width: 20px; height: 20px; fill: #c9b3bd; }

/* ---- フルスクリーンオーバーレイ（フッターより上＝ゲーム中フッター非表示） ---- */
.adv-overlay { position: fixed; inset: 0; z-index: 1200; background: linear-gradient(180deg, #aee6ff 0%, #dff4ff 58%, #ffeef5 100%); }

/* ---- キャラ選択 ---- */
.adv-select { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: 46px 14px 20px; overflow-y: auto; }
.adv-close, .adv-quit {
  position: absolute; top: 10px; right: 12px; width: 38px; height: 38px; border: none; border-radius: 50%;
  background: rgba(255, 255, 255, .85); color: #b06a85; font-size: 18px; font-weight: 700; cursor: pointer;
  box-shadow: 0 2px 6px rgba(120, 80, 100, .25);
}
.adv-select-title { font-size: 1.3rem; font-weight: 800; color: #d3387a; }
.adv-select-sub { margin: 6px 0 14px; font-size: .85rem; color: #7a5a66; }
.adv-char-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(100%, 440px); }
.adv-char {
  border: 3px solid transparent; border-radius: 14px; background: rgba(255, 255, 255, .8);
  padding: 6px 2px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center;
}
.adv-char svg { width: 74px; height: 74px; }
.adv-char-name { font-size: .74rem; color: #6b4a57; font-weight: 700; }
.adv-char.selected { border-color: #f0648c; background: #fff; box-shadow: 0 4px 10px rgba(230, 100, 140, .3); }
.adv-start { margin: 16px 0 6px; padding: 14px 52px; font-size: 1.1rem; } /* 見た目は共通の .btn.btn-primary */
.adv-best { font-size: .8rem; color: #7a5a66; }

/* ---- ゲームステージ ---- */
.adv-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; }
.adv-sky { position: absolute; inset: 0; background:
  radial-gradient(3px 3px at 18% 18%, #fff, transparent),
  radial-gradient(120px 44px at 30% 22%, rgba(255,255,255,.85), transparent),
  radial-gradient(150px 52px at 74% 14%, rgba(255,255,255,.8), transparent); }
.adv-world { position: absolute; left: 0; top: 0; will-change: transform; } /* 幅・高さはステージ生成時にインラインで指定 */
.adv-ground { position: absolute; background: linear-gradient(180deg, #7ec96a 0 14px, #a97c50 14px); border-top: 3px solid #5ea84e; box-sizing: border-box; }
.adv-plat { position: absolute; background: linear-gradient(180deg, #ffb867, #e0904a); border-radius: 8px; box-shadow: 0 3px 5px rgba(120, 70, 20, .3); }
/* どんぐりのゆらゆらは .anim（画面付近だけJSが付与）のときのみ動かす＝省電力 */
.adv-coin { position: absolute; width: 30px; height: 30px; }
.adv-coin.anim { animation: advCoinBob 1.2s ease-in-out infinite; }
.adv-coin-svg { width: 100%; height: 100%; fill: #b07a2e; } /* どんぐり色は共通の .acorn-ic に合わせる */
.adv-coin.got { animation: advGot .35s ease forwards; }
.adv-item { position: absolute; width: 40px; height: 46px; }
.adv-item svg { width: 100%; height: 100%; }
.adv-item.anim { animation: advItemPulse 1s ease-in-out infinite; }
.adv-item.got { animation: advGot .35s ease forwards; }
.adv-item.k-ball { width: 34px; height: 34px; }
/* リザルト表示中は背景のアニメを止める（見えていても動かす必要がない） */
.adv-stage.over .adv-coin, .adv-stage.over .adv-item { animation-play-state: paused; }
@keyframes advCoinBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes advItemPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.18); opacity: .85; } }
@keyframes advGot { to { transform: translateY(-26px) scale(1.4); opacity: 0; } }
/* とびら（ボスを倒すと開く）。戦闘中（.fight）は入口・出口とも描かない */
.adv-gate { position: absolute; width: 40px; height: 120px; transition: opacity .45s ease; }
.adv-gate svg { width: 100%; height: 100%; }
.adv-stage.fight .adv-gate, .adv-stage.fight .adv-door { opacity: 0; }
.gt-frame { fill: #7a5a46; }
.gt-door { fill: #a97c50; transition: transform .5s ease, opacity .5s ease; transform-origin: left center; }
.gt-knob { fill: #ffd23d; transition: opacity .5s ease; }
.adv-gate.open .gt-door { transform: scaleX(.12); opacity: .4; }
.adv-gate.open .gt-knob { opacity: 0; }

/* プレイヤー（transformのみで移動） */
.adv-player { position: absolute; left: 0; top: 0; width: 60px; height: 58px; will-change: transform; z-index: 3; }
.adv-player svg { width: 60px; height: 58px; }
/* デカどんぐり中：鼻が1.5倍＆金色（.pig.gold の金鼻スタイルを流用）＋金のオーラ */
.adv-player.golden svg { filter: drop-shadow(0 0 9px rgba(255, 206, 58, .9)); }
.adv-player.golden .nose-group { transform: scale(1.5); }
/* にじどんぐり無敵：焼き込み済みのにじみをopacityで明滅（filterアニメは使わない＝省電力） */
.adv-player::after {
  content: ""; position: absolute; left: 50%; top: 54%; width: 56px; height: 44px;
  transform: translate(-50%, -50%); border-radius: 50%; opacity: 0; pointer-events: none;
  box-shadow: 0 0 16px 7px rgba(255, 120, 170, .8), 0 0 26px 12px rgba(120, 200, 255, .45);
}
.adv-player.inv::after { animation: advInvFlash .5s steps(2) infinite; }
@keyframes advInvFlash { 0% { opacity: .95; } 100% { opacity: .4; } }
/* やられ：くるんと回って落ちる */
.adv-player.dead svg { animation: advDead .9s ease forwards; }
@keyframes advDead { 40% { transform: rotate(160deg); } 100% { transform: rotate(200deg); opacity: .6; } }

/* ---- 敵 ---- */
.adv-en { position: absolute; will-change: transform; z-index: 2; }
.adv-en svg { width: 100%; height: 100%; }
.adv-en.hit { animation: advEnHit .32s ease; }
@keyframes advEnHit { 0% { filter: brightness(2.4); } 100% { filter: none; } }
.adv-en.squish { animation: advSquish .42s ease forwards; }
@keyframes advSquish { 30% { transform: scaleY(.3) scaleX(1.3); } 100% { transform: scaleY(.1) scaleX(1.4) translateY(20px); opacity: 0; } }
/* ウリボー（子イノシシ） */
.ub-body { fill: #a97c50; stroke: #8a5a3a; stroke-width: 2; }
.ub-stripe { fill: none; stroke: #e6cfa3; stroke-width: 3; stroke-linecap: round; }
.ub-leg, .ub-ear { fill: #8a5a3a; }
.ub-snout { fill: #d99c74; }
.ub-hole { fill: #7a4a2c; }
.ub-eye { fill: #3a2a20; }
/* ブヒヒ（母イノシシ・踏み2回） */
.bh-body { fill: #9a6b42; stroke: #7a4e2e; stroke-width: 2.5; }
.bh-stripe { fill: none; stroke: #bfa27a; stroke-width: 4; stroke-linecap: round; }
.bh-leg, .bh-ear { fill: #7a4e2e; }
.bh-snout { fill: #d99c74; }
.bh-hole { fill: #6e4226; }
.bh-eye { fill: #2e2018; }
.bh-brow { fill: none; stroke: #4a3020; stroke-width: 3; stroke-linecap: round; }
.bh-tusk { fill: #f5efdd; }
/* ブヒコウモリ（abt-*：本編のちょうネクタイ .bt-* と衝突しないよう別名） */
.abt-wing, .abt-ear { fill: #6f5599; }
.abt-body { fill: #9b7fc4; stroke: #6f5599; stroke-width: 2; }
.abt-eye { fill: #2e2440; }
.abt-nose { fill: #e08ab0; }
.abt-hole { fill: #7a5490; }
/* トゲウリボー（踏めない！体の配色はウリボー .ub-* を共用） */
.tg-spike { fill: #f4695f; stroke: #c4443c; stroke-width: 2; stroke-linejoin: round; }
/* ブヒクラゲ（海の中） */
.kj-dome { fill: #f7a8c4; stroke: #e07ba0; stroke-width: 2; }
.kj-tent { fill: none; stroke: #e07ba0; stroke-width: 3.5; stroke-linecap: round; }
.kj-eye { fill: #4a2a3a; }
.kj-nose { fill: #e75f8e; }
.kj-hole { fill: #b23e66; }

/* ---- ボスの投げもの・バレーボール ---- */
.adv-shot { position: absolute; width: 28px; height: 26px; will-change: transform; z-index: 2; }
.adv-shot svg { width: 100%; height: 100%; }
.adv-shot.poof { animation: advGot .3s ease forwards; }
.adv-shot-acorn { width: 100%; height: 100%; fill: #b07a2e; } /* どんぐり爆弾は共通アイコン色 */
.adv-ball { position: absolute; left: 0; top: 0; width: 30px; height: 30px; will-change: transform; z-index: 3; }
.adv-ball svg { width: 100%; height: 100%; animation: advBallSpin .5s linear infinite; }
@keyframes advBallSpin { to { transform: rotate(360deg); } }
.vb-ball { fill: #fdfdff; stroke: #c9cede; stroke-width: 2; }
.vb-seam { fill: none; stroke: #8fa0c8; stroke-width: 2; stroke-linecap: round; }

/* ---- アイテムの塗り ---- */
.dk-nut { fill: #ffd23d; stroke: #e0a92e; stroke-width: 2; }
.dk-cap { fill: #c8862a; }
.dk-stem { fill: #8a5a3a; }
.dk-shine { fill: #fff6d8; }
.md-nut { fill: #9ed46a; stroke: #6faf49; stroke-width: 2; }
.md-cap { fill: #55923e; }
.md-stem { fill: #8a5a3a; }
.md-heart { fill: #f0648c; }
.nj-nut { fill: #fdf3fa; stroke: #d9b4e8; stroke-width: 2; }
.nj-s1 { fill: none; stroke: #f0648c; stroke-width: 5; stroke-linecap: round; }
.nj-s2 { fill: none; stroke: #ffd23d; stroke-width: 5; stroke-linecap: round; }
.nj-s3 { fill: none; stroke: #63c6f0; stroke-width: 5; stroke-linecap: round; }
.nj-cap { fill: #b48ce0; }
.nj-stem { fill: #8a5a3a; }

/* HUD */
.adv-hud { position: absolute; left: 10px; right: 10px; top: 8px; display: flex; align-items: center; gap: 10px; z-index: 5; }
.adv-hearts { color: #f0648c; font-size: 20px; letter-spacing: 2px; text-shadow: 0 1px 2px rgba(160, 60, 90, .4); }
.adv-hearts .off { color: rgba(255, 255, 255, .75); }
.adv-score { display: flex; align-items: center; gap: 4px; font-weight: 800; color: #6b4a2e;
  background: rgba(255, 255, 255, .8); padding: 3px 10px; border-radius: 999px; }
.adv-hud-acorn { width: 16px; height: 16px; fill: #b07a2e; }
.adv-progress { flex: 1 1 auto; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .6); overflow: hidden; }
/* 進捗はwidthでなくscaleXで伸ばす（毎フレームのレイアウトを起こさない） */
.adv-progress-fill { height: 100%; width: 100%; transform: scaleX(0); transform-origin: left center; will-change: transform;
  background: linear-gradient(90deg, #f27ca2, #ffd23d); }
.adv-quit { position: static; flex: 0 0 auto; }

/* 鼻ボタン（右下=ジャンプ／左下=効果）：枠なし・鼻そのものに影で「押せる」見た目 */
.adv-btn {
  position: absolute; bottom: 20px; width: 108px; height: 88px; border: none; padding: 0;
  background: none; cursor: pointer; z-index: 6;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.adv-btn svg { width: 96px; height: 74px; filter: drop-shadow(0 6px 6px rgba(90, 30, 50, .4));
  transition: transform .06s ease, filter .06s ease; }
.adv-btn:active svg { transform: translateY(4px) scale(.97); filter: drop-shadow(0 2px 3px rgba(90, 30, 50, .45)); }
.adv-btn-jump { right: 12px; }
.adv-btn-fx { left: 12px; }
.adv-btn-fx:disabled { cursor: default; }
.adv-btn-fx:disabled svg { opacity: .4; filter: drop-shadow(0 3px 4px rgba(90, 30, 50, .25)); }
/* アイテム所持中の光る合図：box-shadowアニメでなく、焼き込み済みのにじみをopacityで明滅（省電力） */
.adv-btn-fx::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 92px; height: 66px;
  transform: translate(-50%, -50%); border-radius: 50%;
  box-shadow: 0 0 22px 9px rgba(242, 179, 76, .8); opacity: 0; pointer-events: none;
}
.adv-btn-fx:not(:disabled)::after { animation: advFxReady .9s ease-in-out infinite; }
@keyframes advFxReady { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
/* バレーボールの残数バッジ */
.adv-ballcount[hidden] { display: none; }
.adv-ballcount {
  position: absolute; top: 2px; right: 6px; min-width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: #4a5a8a; font-size: .78rem; font-weight: 800;
  border-radius: 999px; box-shadow: 0 2px 5px rgba(90, 30, 50, .3); pointer-events: none;
}

/* やられ→再開の小パネル */
.adv-quickretry { background: rgba(40, 20, 30, .25); }
.adv-quickretry .adv-result-score { display: block; line-height: 1.7; }

/* リザルト */
.adv-result { position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; background: rgba(40, 20, 30, .35); }
.adv-result-card { background: #fff; border-radius: 20px; padding: 24px 30px; text-align: center; box-shadow: 0 10px 26px rgba(60, 20, 40, .35); }
.adv-result-head { font-size: 1.3rem; font-weight: 800; color: #d3387a; margin-bottom: 8px; }
.adv-result-score { display: block; line-height: 1.8; color: #6b4a2e; margin-bottom: 14px; }
.adv-result-score .adv-hud-acorn { vertical-align: -2px; margin-right: 2px; }
.adv-retry { display: block; width: 100%; margin-bottom: 8px; }
.adv-exit { border: none; background: none; color: #b06a85; text-decoration: underline; cursor: pointer; font-size: .85rem; }

/* ---- ステージマップ ---- */
.adv-map { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: 46px 16px 20px; overflow-y: auto; }
.adv-story { margin: 8px 0 4px; font-size: .88rem; line-height: 1.7; color: #6b4a57; text-align: center;
  background: rgba(255, 255, 255, .75); border-radius: 14px; padding: 10px 14px; width: min(100%, 420px); }
.adv-story b { color: #d3387a; }
.adv-story-done { margin: 6px 0 0; font-size: .82rem; font-weight: 700; color: #b8862c; }
.adv-map-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; width: min(100%, 380px); }
.adv-node {
  position: relative; aspect-ratio: 1; border: none; border-radius: 16px; cursor: pointer;
  font-size: 1.25rem; font-weight: 800; color: #fff;
  background: linear-gradient(180deg, #f27ca2, #e75f8e); box-shadow: 0 4px 10px rgba(215, 90, 140, .35);
  display: flex; align-items: center; justify-content: center;
}
.adv-node.cleared { background: linear-gradient(180deg, #ffd23d, #f2b34c); color: #7a5410; box-shadow: 0 4px 10px rgba(220, 170, 50, .4); }
.adv-node.locked { background: #e3d3da; box-shadow: none; cursor: default; }
.adv-node.boss { grid-column: span 2; aspect-ratio: auto; min-height: 64px; font-size: 1.5rem;
  background: linear-gradient(180deg, #6d4a86, #4c3060); box-shadow: 0 4px 12px rgba(70, 40, 90, .45); }
.adv-node.boss.cleared { background: linear-gradient(180deg, #ffd23d, #f2b34c); }
.adv-node.boss.locked { background: #cfc2d6; }
.adv-node-n {
  position: absolute; left: 0; right: 0; bottom: 4px; font-size: .58rem; font-weight: 700;
  color: rgba(255, 255, 255, .95); pointer-events: none;
}
.adv-node.cleared .adv-node-n { color: rgba(122, 84, 16, .85); }
.adv-node.locked .adv-node-n { color: #b39aa6; }
.adv-node-lock { width: 20px; height: 20px; fill: #fff; opacity: .9; }
.adv-node.locked .adv-node-lock { fill: #b39aa6; }

/* ---- ステージテーマ（ブヒ広場のシーン背景を側面ビューに） ---- */
/* 1 はじまりの草原（デフォルトの空＋緑の地面） */
/* 2 さくらの丘 */
.adv-stage.t-sakura { background: linear-gradient(180deg, #ffd9e6 0%, #ffe7ef 50%, #f6cfb0 100%); }
.adv-stage.t-sakura .adv-ground { background: linear-gradient(180deg, #f4b1c8 0 14px, #a97c50 14px); border-top-color: #e78bb0; }
/* 3 お花畑 */
.adv-stage.t-flower { background: linear-gradient(180deg, #bfe8ff 0%, #d8f3c8 52%, #a8dd86 100%); }
.adv-stage.t-flower .adv-ground { background: linear-gradient(180deg, #8fd06e 0 14px, #7bab4e 14px); border-top-color: #6fb84e; }
/* 4 浜辺 */
.adv-stage.t-beach { background: linear-gradient(180deg, #9fdbff 0%, #d7f1ff 55%, #e1f3ec 100%); }
.adv-stage.t-beach .adv-ground { background: linear-gradient(180deg, #f7e7b8 0 14px, #d3a85f 14px); border-top-color: #ecd28f; }
/* 5 海の中（泳ぎ） */
.adv-stage.t-sea { background: linear-gradient(180deg, #3fb6d6 0%, #1f8fc0 50%, #0f6f9e 100%); }
.adv-stage.t-sea .adv-sky { background:
  radial-gradient(3px 3px at 22% 24%, rgba(255,255,255,.7), transparent),
  radial-gradient(2.5px 2.5px at 66% 14%, rgba(255,255,255,.6), transparent),
  radial-gradient(2px 2px at 84% 40%, rgba(255,255,255,.55), transparent); }
.adv-stage.t-sea .adv-ground { background: linear-gradient(180deg, #d9c188 0 14px, #3a7f8f 14px); border-top-color: #e6d3a0; }
/* 6 紅葉の森 */
.adv-stage.t-autumn { background: linear-gradient(180deg, #ffd9a0 0%, #ffb56b 45%, #d9742f 100%); }
.adv-stage.t-autumn .adv-ground { background: linear-gradient(180deg, #e0904a 0 14px, #8a5a3a 14px); border-top-color: #d9742f; }
/* 7 雪山（滑る） */
.adv-stage.t-snow { background: linear-gradient(180deg, #cfe3f2 0%, #e8f2f9 55%, #f7fbff 100%); }
.adv-stage.t-snow .adv-ground { background: linear-gradient(180deg, #ffffff 0 14px, #bcdcf2 14px); border-top-color: #e6f4ff; }
/* 8 にじのくに */
.adv-stage.t-rainbow { background: linear-gradient(180deg, #ff9aa2 0%, #ffd59a 20%, #fff6a0 40%, #a8e6a0 60%, #9ad0ff 80%, #c9a8ff 100%); }
.adv-stage.t-rainbow .adv-ground { background: linear-gradient(180deg, #ffffff 0 14px, #e8e4f8 14px); border-top-color: #fff; }
/* 9 宇宙（低重力） */
.adv-stage.t-space { background: linear-gradient(180deg, #1a1338 0%, #2a2058 60%, #3a2d5e 100%); }
.adv-stage.t-space .adv-sky { background:
  radial-gradient(2.5px 2.5px at 16% 20%, #fff, transparent),
  radial-gradient(2px 2px at 62% 12%, #fff, transparent),
  radial-gradient(2px 2px at 84% 30%, #fff, transparent),
  radial-gradient(1.5px 1.5px at 38% 36%, #fff, transparent); }
.adv-stage.t-space .adv-ground { background: linear-gradient(180deg, #bcbccd 0 14px, #8b8ba4 14px); border-top-color: #d8d8e6; }
/* 10 祭りの夜 */
.adv-stage.t-matsuri { background: linear-gradient(180deg, #2a2350 0%, #3b2f63 42%, #6b4b6e 72%, #7a5a52 100%); }
.adv-stage.t-matsuri .adv-sky { background:
  radial-gradient(2px 2px at 26% 16%, #ffe9a8, transparent),
  radial-gradient(2px 2px at 70% 10%, #ffe9a8, transparent),
  radial-gradient(40px 18px at 50% 30%, rgba(255,180,80,.25), transparent); }
.adv-stage.t-matsuri .adv-ground { background: linear-gradient(180deg, #7a5a52 0 14px, #4a3a3a 14px); border-top-color: #96736a; }
/* 11 ブッヒー城（最終決戦） */
.adv-stage.t-castle { background: linear-gradient(180deg, #3c2a52 0%, #5a3e72 55%, #7a5488 100%); }
.adv-stage.t-castle .adv-sky { background:
  radial-gradient(2.5px 2.5px at 16% 20%, #ffe9a8, transparent),
  radial-gradient(2px 2px at 62% 12%, #ffe9a8, transparent),
  radial-gradient(2px 2px at 84% 26%, #ffe9a8, transparent); }
.adv-stage.t-castle .adv-ground { background: linear-gradient(180deg, #8a7a96 0 14px, #57485f 14px); border-top-color: #a294ae; }

/* ---- ボス（サイズはJSがインラインで指定） ---- */
.adv-boss { position: absolute; left: 0; top: 0; will-change: transform; z-index: 2; }
.adv-boss > svg { width: 100%; height: 100%; }
.adv-boss.hit { animation: advBossHit .4s ease; }
@keyframes advBossHit { 0% { filter: brightness(2.2); } 40% { filter: brightness(1.4); } 100% { filter: none; } }
.adv-boss.squish { animation: advSquish .5s ease forwards; }
/* 突進の予備動作：その場でブルブル震える（見てからかわせる合図） */
.adv-boss.windup > svg { animation: advWindup .12s linear infinite; }
@keyframes advWindup { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px) rotate(-1.5deg); } 75% { transform: translateX(4px) rotate(1.5deg); } }
/* 踏まれた後の無敵タイム：3秒チカチカ（この間はダメージも攻撃もなし） */
.adv-boss.iframes > svg { animation: advIframes .32s steps(2, jump-none) infinite; }
@keyframes advIframes { 0% { opacity: 1; } 100% { opacity: .35; } }
/* じょおうバチ：針が地面に刺さって抜けない！（おしりを軸にジタバタ＝踏みつけチャンスの合図） */
.adv-boss.stuck > svg { animation: advStuck .18s linear infinite; transform-origin: 50% 92%; }
@keyframes advStuck { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
/* おめん大将：くるっとお面つけ替え（しゃべって予告しない代わりの見た目サイン） */
.adv-boss.shift > svg { animation: advShift .38s ease; }
@keyframes advShift { 0% { transform: scaleX(1); } 50% { transform: scaleX(-.4); } 100% { transform: scaleX(1); } }
/* ボス部屋のバネ：乗ると大発射（弱ジャンプの子の回避・攻撃手段） */
.adv-spring { position: absolute; width: 46px; height: 26px; z-index: 1; }
.adv-spring svg { width: 100%; height: 100%; display: block; }
.adv-spring .sp-pad { fill: #e0526e; stroke: #b23e56; stroke-width: 2; }
.adv-spring .sp-coil { fill: none; stroke: #9aa3b4; stroke-width: 3; stroke-linecap: round; }
.adv-spring .sp-base { fill: #6c7484; }
.adv-spring.boing svg { animation: springBoing .32s ease-out; transform-origin: 50% 100%; }
@keyframes springBoing {
  0% { transform: scaleY(.45); }
  55% { transform: scaleY(1.25); }
  100% { transform: scaleY(1); }
}
/* 段差（テラス）：adv-ground のテーマ配色をそのまま使い、角を少しだけ丸める */
.adv-boxstep { border-radius: 8px 8px 0 0; box-shadow: -3px 0 4px rgba(80, 50, 20, .12) inset; }
/* 頭突きで壊せるブロック */
.adv-block { position: absolute; z-index: 1; }
.adv-block svg { width: 100%; height: 100%; display: block; }
.adv-block .bk-body { fill: #d8a45a; stroke: #a8763a; stroke-width: 2.5; }
.adv-block .bk-shine { fill: none; stroke: rgba(255,255,255,.7); stroke-width: 2.5; stroke-linecap: round; }
.adv-block .bk-dot { fill: #a8763a; }
.adv-block.crushed { animation: blockCrush .45s ease-out forwards; }
@keyframes blockCrush {
  0% { transform: scale(1); opacity: 1; }
  30% { transform: scale(1.15) rotate(6deg); }
  100% { transform: scale(.2) rotate(28deg); opacity: 0; }
}
/* ブロックからとび出すどんぐり */
.adv-blockpop { position: absolute; width: 28px; height: 28px; z-index: 4; pointer-events: none; animation: blockPop .7s ease-out forwards; }
@keyframes blockPop {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translateY(-46px) scale(1.1); opacity: 0; }
}
/* 桜のステージ：花びらが舞い落ちる（画面全体・スクロールと無関係） */
.adv-petals { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
.adv-petals span {
  position: absolute; top: -24px; width: 14px; height: 12px;
  background: #f8b9d0; border-radius: 60% 40% 55% 45%;
  opacity: .85; animation: petalFall 7s linear infinite;
}
@keyframes petalFall {
  0% { transform: translate(0, -3vh) rotate(0deg); }
  25% { transform: translate(-26px, 26vh) rotate(120deg); }
  50% { transform: translate(14px, 52vh) rotate(240deg); }
  75% { transform: translate(-20px, 78vh) rotate(340deg); }
  100% { transform: translate(8px, 108vh) rotate(460deg); }
}
/* リザルト表示中は花びらも止める（省電力） */
.adv-stage.over .adv-petals span { animation-play-state: paused; }
/* 紅葉の森：舞い散る落ち葉（.adv-petals の落下アニメを流用、色はインラインで指定） */
.adv-leaves span { border-radius: 70% 0 70% 0; opacity: .9; }
/* 雪山：しんしんと降る雪 */
.adv-snowfall span { border-radius: 50%; opacity: .95; }
/* にじのくに：虹色の星屑（ほんのり光る） */
.adv-sparkles span { border-radius: 50%; opacity: .9; box-shadow: 0 0 8px 2px currentColor; }
/* 宇宙：星がゆっくり流れる */
.adv-starfield span { border-radius: 50%; opacity: .9; box-shadow: 0 0 6px 1px rgba(255, 250, 220, .9); }
/* 祭りの夜：花火の火の粉 */
.adv-embers span { border-radius: 50%; opacity: .9; box-shadow: 0 0 7px 2px rgba(255, 170, 60, .75); }
/* きのこの森（ステージ6）：宙にうくキノコの足場 */
.adv-mush { position: absolute; z-index: 1; filter: drop-shadow(0 4px 5px rgba(120, 60, 30, .3)); }
.adv-mush svg { width: 100%; height: 100%; display: block; }
.adv-mush .mu-cap { fill: #d9553f; stroke: #b23e2e; stroke-width: 2; }
.adv-mush .mu-dot { fill: #fff2e0; }
.adv-mush .mu-stem { fill: #f0e2c8; stroke: #d4bf98; stroke-width: 2; }
/* リリスの回転アタック */
.adv-en.spinning svg { animation: risuSpin .24s linear infinite; transform-origin: 50% 55%; }
@keyframes risuSpin { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } }
/* ペンペンのおなかスライディング（前のめりに倒れてシャーッ） */
.adv-en.sliding svg { animation: penginSlide .82s ease-out; transform-origin: 50% 80%; }
@keyframes penginSlide { 0% { transform: rotate(0); } 20%, 90% { transform: rotate(-72deg) translateY(4px); } 100% { transform: rotate(0); } }
/* ころがる大雪玉：ゴロゴロ回転しながら転がってくる（ジャンプでかわす） */
.adv-snowball { position: absolute; width: 46px; height: 46px; z-index: 2; will-change: transform; }
.adv-snowball svg { width: 100%; height: 100%; display: block; animation: snowballRoll .5s linear infinite; }
@keyframes snowballRoll { 0% { transform: rotate(0); } 100% { transform: rotate(-360deg); } }
.adv-stage.over .adv-snowball svg { animation-play-state: paused; }
.adv-snowball.poofball svg { animation: snowPoof .32s ease-out forwards; }
@keyframes snowPoof { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
/* スキージャンプの踏切台（雪のリップ） */
.adv-spring.k-ski svg { filter: drop-shadow(0 2px 3px rgba(120, 160, 200, .35)); }
/* 雪山の棚（雪のバーン） */
.adv-plat.k-snow {
  background: linear-gradient(180deg, #ffffff 0 8px, #dcebf6 8px);
  border-top: 3px solid #fff; border-radius: 10px;
  box-shadow: 0 3px 6px rgba(120, 160, 200, .35);
}
/* にじのくに：虹のアーチ橋（7色の段）と沈む雲 */
.adv-plat.k-rc0 { background: #ff6f7d; } .adv-plat.k-rc1 { background: #ff9d5c; }
.adv-plat.k-rc2 { background: #ffd54a; } .adv-plat.k-rc3 { background: #6fdc6f; }
.adv-plat.k-rc4 { background: #5bc7ff; } .adv-plat.k-rc5 { background: #7d8bff; }
.adv-plat.k-rc6 { background: #b08fff; }
.adv-plat[class*="k-rc"] { border-radius: 9px; box-shadow: 0 3px 6px rgba(140, 110, 200, .3); }
.adv-cloud { position: absolute; z-index: 1; will-change: transform; filter: drop-shadow(0 4px 6px rgba(140, 160, 220, .35)); }
.adv-cloud svg { width: 100%; height: 100%; display: block; }
/* 虹の橋：遠くはなれた雲と雲を、大きなアーチでつなぐ */
.adv-rbow { position: absolute; z-index: 1; opacity: .94; filter: drop-shadow(0 3px 10px rgba(180, 150, 255, .5)); }
.adv-rbow svg { width: 100%; height: 100%; display: block; overflow: visible; }
/* 祭りの夜：屋台の屋根・ちょうちん足場・木の板・打ち上げ花火 */
.adv-yatai { position: absolute; z-index: 1; filter: drop-shadow(0 3px 5px rgba(120, 40, 40, .35)); }
.adv-yatai svg { width: 100%; height: 100%; display: block; }
.adv-lant { position: absolute; z-index: 1; filter: drop-shadow(0 0 10px rgba(255, 160, 70, .65)); }
.adv-lant svg { width: 100%; height: 100%; display: block; }
.adv-plat.k-wood {
  background: linear-gradient(180deg, #c9985c 0 6px, #a97c50 6px);
  border-top: 3px solid #e0b477; border-radius: 8px;
  box-shadow: 0 3px 6px rgba(90, 60, 30, .4);
}
.adv-rocket { position: absolute; width: 18px; height: 42px; z-index: 2; will-change: transform; }
.adv-rocket svg { width: 100%; height: 100%; display: block; }
.adv-rocket.burst svg { animation: rocketBurst .5s ease-out forwards; transform-origin: 50% 20%; }
@keyframes rocketBurst {
  0% { transform: scale(1); opacity: 1; filter: brightness(1.6); }
  40% { transform: scale(3.2); opacity: .9; filter: brightness(2.4); }
  100% { transform: scale(5); opacity: 0; }
}
/* ボヨヨンキノコ（紫カサ）：乗ると自動で大きく跳ねる */
.adv-mush.k-boing .mu-cap { fill: #9a6fd0; stroke: #7a50b0; }
.adv-mush.k-boing .mu-dot { fill: #f0e4ff; }
.adv-mush.k-boing.boing svg { animation: springBoing .34s ease-out; transform-origin: 50% 100%; }
/* 落ち葉のやま（走り抜けるとバサッ・どんぐりがかくれていることがある） */
.adv-pile { position: absolute; width: 64px; height: 34px; z-index: 1; }
.adv-pile svg { width: 100%; height: 100%; display: block; }
.adv-pile.burst { animation: pileBurst .5s ease-out forwards; }
@keyframes pileBurst {
  0% { transform: scale(1); opacity: 1; }
  40% { transform: scale(1.2, .6); }
  100% { transform: scale(1.5, .15); opacity: 0; }
}
/* 舞い散る葉っぱのかけら */
.adv-leafbit {
  position: absolute; width: 12px; height: 10px; z-index: 4; pointer-events: none;
  border-radius: 70% 0 70% 0; animation: leafbitFly .9s ease-out forwards;
}
@keyframes leafbitFly {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(220deg); opacity: 0; }
}
/* 風景の小物（テーマ別の飾り・さわれない） */
.adv-prop { position: absolute; width: 44px; height: 32px; z-index: 0; pointer-events: none; }
.adv-prop svg { width: 100%; height: 100%; display: block; }
/* お花畑のステージ：ちょうちょが舞う（画面に重ねる・スクロールと無関係） */
.adv-bflies { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
.adv-bflies span { position: absolute; left: 0; width: 26px; height: 20px; animation: bflyPath 12s linear infinite; }
.adv-bflies svg { width: 100%; height: 100%; display: block; animation: bflyFlap .34s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes bflyPath {
  0% { transform: translate(-8vw, 0); }
  25% { transform: translate(22vw, -34px); }
  50% { transform: translate(52vw, 12px); }
  75% { transform: translate(82vw, -26px); }
  100% { transform: translate(112vw, 0); }
}
@keyframes bflyFlap { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.5); } }
.adv-stage.over .adv-bflies span, .adv-stage.over .adv-bflies svg { animation-play-state: paused; }
/* ブヒヒ大将軍 */
.gn-body { fill: #8a5a3a; }
.gn-head { fill: #a97c50; }
.gn-plate { fill: #6c6480; stroke: #4c465e; stroke-width: 2; }
.gn-kabuto { fill: #5c5470; stroke: #4c465e; stroke-width: 2; }
.gn-crest { fill: #ffd23d; }
.gn-eye { fill: #2e2018; }
.gn-brow { fill: none; stroke: #2e2018; stroke-width: 3.5; stroke-linecap: round; }
.gn-nose { fill: #d99c74; }
.gn-hole { fill: #6e4226; }
.gn-tusk { fill: #f5efdd; }
/* ドンガラス */
.kr-body { fill: #4e4a63; }
.kr-belly { fill: #6c6785; }
.kr-wing { fill: #3c3852; }
.kr-beret { fill: #a97c50; stroke: #8a5a3a; stroke-width: 2; }
.kr-stem { fill: #8a5a3a; }
.kr-eye { fill: #ffffff; }
.kr-pupil { fill: #2c2840; }
.kr-beak { fill: #f2a441; stroke: #cf7f22; stroke-width: 2; stroke-linejoin: round; }
.kr-acorn { fill: #ffd23d; }
.kr-acap { fill: #c8862a; }
/* ゆきんこブタ */
.yk-body, .yk-tuft { fill: #f6f9ff; stroke: #c5d3e8; stroke-width: 2.5; stroke-linejoin: round; }
.yk-ear { fill: #dfe9f8; stroke: #c5d3e8; stroke-width: 2; }
.yk-face { fill: #e3edfb; }
.yk-eye { fill: #35415c; }
.yk-nose { fill: #f0a0be; }
.yk-hole { fill: #c56a8a; }
.bs-cape { fill: #3a2440; }
.bs-body { fill: #5c4668; }
.bs-head { fill: #6d5378; }
.bs-horn { fill: #e8e0ee; }
.bs-eye { fill: #ff5252; }
.bs-nose { fill: #8d6a97; }
.bs-hole { fill: #4c3455; }
.bs-tusk { fill: #f5efdd; }

/* ブヒ姫の檻（ブッヒーがかかえて逃げる／リザルトにも表示） */
.adv-cage { position: absolute; right: -18px; top: 26px; width: 46px; height: 50px; }
.adv-cage svg, .adv-finale svg { width: 100%; height: 100%; }
.cg-bar { stroke: #d8b23c; stroke-width: 3; fill: none; }
.hm-face { fill: #ffc3dc; }
.hm-nose { fill: #f0648c; }
.hm-eye { fill: #5a3a48; }
.hm-crown { fill: #ffd23d; stroke: #d8a02c; stroke-width: 1; }

/* ブッヒーのセリフ吹き出し */
.adv-boss-say {
  position: absolute; left: 50%; top: -34px; transform: translateX(-50%);
  background: #fff; color: #5a3a48; font-size: .72rem; font-weight: 800; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px; box-shadow: 0 2px 6px rgba(60, 30, 60, .35);
  opacity: 0; pointer-events: none;
}
.adv-boss-say.show { animation: advSay 2.4s ease forwards; }
@keyframes advSay { 0% { opacity: 0; transform: translateX(-50%) scale(.6); } 8% { opacity: 1; transform: translateX(-50%) scale(1.05); }
  14% { transform: translateX(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }

/* HUD：ブッヒー体当たりカウント */
.adv-bosshits { flex: 0 0 auto; font-size: .78rem; font-weight: 800; color: #fff;
  background: rgba(76, 48, 96, .85); padding: 3px 10px; border-radius: 999px; }

/* リザルト：フィナーレ（檻から出たブヒ姫） */
.adv-finale { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 12px; }
.adv-finale svg { width: 108px; height: 88px; }
.fc-cage { opacity: .75; }
.fc-door { stroke: #b8952c; }
.fh-dress { fill: #ffb3d1; stroke: #e5769f; stroke-width: 2; }
.fh-arm { fill: none; stroke: #ffc3dc; stroke-width: 5; stroke-linecap: round; }
.fc-spark { fill: #ffd23d; }
.fc-heart { fill: #f0648c; }
.adv-finale p { font-size: .82rem; line-height: 1.6; color: #6b4a57; margin: 0; }
.adv-next { display: block; width: 100%; margin-bottom: 8px; }

/* ---- ブヒ姫（救出後になかまになる美しいブヒ） ---- */
/* 顔：金のティアラ（王冠を桃の宝石で姫らしく）＋長いまつげ＋ぱっちりおめめ＋小さめの鼻＋濃いほっぺ */
.pig.face-hime .acc-crown { opacity: 1; }
.pig.face-hime .acc-crown .crown-body,
.pig.face-hime .acc-crown .crown-base { fill: #ffd23d; }
.pig.face-hime .acc-crown .crown-jewel { fill: #ff7fb2; }
.pig.face-hime .acc-nagomi-lash,
.pig.face-hime .acc-blush { opacity: 1; }
.pig.face-hime .eye { transform: scale(1.3); }
.pig.face-hime .nose-group { transform: scale(0.84); }
.pig.face-hime .cheek { fill: #ff9ec0; }
/* 全身：いつものプリンセスドレス */
.rp-hime-dress .hd-skirt { fill: #ffb3d1; stroke: #e5769f; stroke-width: 2; }
.rp-hime-dress .hd-sash { fill: #ffd23d; }
.rp-hime-dress .hd-hem { fill: none; stroke: #fff; stroke-width: 3; stroke-dasharray: 6 6; stroke-linecap: round; }
.rp-hime-dress .hd-gem { fill: #fff; }
.roompig.face-hime .rp-body { fill: #ffd7e6; }

/* ---- ボス部屋 ---- */
/* 部屋の装飾（ボスごとの専用の雰囲気。半透明の重ねなので地形はそのまま見える） */
.adv-broom { position: absolute; pointer-events: none; z-index: 0; }
.adv-broom > svg { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; }
.adv-broom.t-general { background: linear-gradient(rgba(120, 40, 40, .12), transparent 65%); }        /* 大将軍の陣 */
.adv-broom.t-karasu { background: linear-gradient(rgba(40, 30, 60, .24), transparent 70%); }           /* 夜のねぐら */
.adv-broom.t-hachi { background: linear-gradient(rgba(240, 190, 80, .14), transparent 60%); }          /* 巣のなか */
.adv-broom.t-kani { background: linear-gradient(transparent 55%, rgba(240, 214, 160, .25)); }          /* 磯の岩場 */
.adv-broom.t-okurage { background: linear-gradient(rgba(10, 60, 110, .28), rgba(10, 60, 110, .06)); }  /* 海底遺跡 */
.adv-broom.t-momiji { background: linear-gradient(rgba(200, 90, 40, .14), transparent 60%); }          /* 紅葉の森のおく */
.adv-broom.t-yukin { background: linear-gradient(rgba(255, 255, 255, .3), rgba(180, 220, 255, .12)); } /* こおりのほら穴 */
.adv-broom.t-pegasus { background: linear-gradient(rgba(255, 255, 255, .18), transparent 55%); }       /* そらのてっぺん */
.adv-broom.t-ufo { background: linear-gradient(rgba(16, 20, 52, .3), rgba(16, 20, 52, .08)); }         /* 宇宙船のなか */
.adv-broom.t-omen { background: linear-gradient(rgba(120, 40, 40, .2), transparent 70%); }             /* 祭りのやしろ */
.adv-broom.t-buhhii { background:
  radial-gradient(60% 46% at 50% 26%, rgba(255, 210, 120, .16), transparent),
  linear-gradient(rgba(60, 30, 80, .28), transparent 75%); } /* 玉座の間 */
.adv-plat { z-index: 1; } /* 部屋の装飾より手前に */

/* 入口の扉：閉じて待っていて、部屋の前にたどり着くと両びらきに開く。入室したら描かない */
.adv-door { position: absolute; width: 52px; height: 126px; z-index: 1; transition: opacity .45s ease; }
.adv-door svg { width: 100%; height: 100%; overflow: visible; }
.dr-arch { fill: none; stroke: #8a6a4e; stroke-width: 4; stroke-linecap: round; }
.dr-l, .dr-r { fill: #a97c50; stroke: #7a5a3e; stroke-width: 2; transition: transform .45s ease .05s; transform-box: view-box; }
.dr-l { transform-origin: 6px 70px; }
.dr-r { transform-origin: 46px 70px; }
.adv-door.open .dr-l, .adv-door.open .dr-r { transform: scaleX(.14); }

/* しゃがみ（スティックを下・当たり判定も低くなる） */
.adv-player svg { transform-origin: 50% 100%; transition: transform .08s ease; }
.adv-player.crouching svg { transform: scaleY(.55); }

/* 効果ボタンのスティック化（ボス部屋のあいだだけ） */
.adv-stick {
  display: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 78px; height: 78px; border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #fff7ea, #f0dfc8 70%);
  box-shadow: inset 0 3px 8px rgba(120, 80, 40, .35), 0 5px 10px rgba(90, 30, 50, .35);
  align-items: center; justify-content: center;
}
.adv-stick-knob {
  width: 38px; height: 38px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #ffd18a, #f2b34c 60%, #d99a34);
  box-shadow: 0 3px 6px rgba(120, 70, 20, .45);
  transition: transform .05s linear;
}
.adv-btn-fx.stick svg { display: none; }
.adv-btn-fx.stick .adv-stick { display: flex; }
.adv-btn-fx.stick::after { animation: none; opacity: 0; } /* ボール待機の光る合図は消す */

/* ---- キャラ選択ポップアップ（タップで大きくプレビュー→はじめる） ---- */
.adv-charpop {
  position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  background: rgba(40, 20, 30, .38);
}
.adv-charpop-card {
  background: #fff; border-radius: 22px; padding: 22px 30px 18px; text-align: center;
  width: min(78%, 300px); box-shadow: 0 10px 26px rgba(60, 20, 40, .35);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.adv-charpop-pig svg { width: 132px; height: 132px; }
.adv-charpop-name { font-size: 1.15rem; font-weight: 800; color: #d3387a; }
.adv-charpop-stage { font-size: .8rem; color: #7a5a66; margin-bottom: 6px; }
.adv-charpop .adv-start { width: 100%; padding: 14px 0; font-size: 1.1rem; margin: 0; }
.adv-charpop-close { border: none; background: none; color: #b06a85; text-decoration: underline; cursor: pointer; font-size: .85rem; margin-top: 6px; }

/* ---- ボス撃破の勝利バナー ---- */
.adv-victory {
  position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%);
  z-index: 7; pointer-events: none; white-space: nowrap;
  background: rgba(255, 255, 255, .94); border-radius: 999px; padding: 12px 26px;
  font-size: 1.05rem; font-weight: 800; color: #5a3a48;
  box-shadow: 0 6px 18px rgba(120, 60, 90, .35);
  display: flex; align-items: center; gap: 8px;
  animation: advVictoryPop 2.2s ease forwards;
}
.adv-victory b { color: #b8862c; }
.adv-victory-emoji { font-size: 1.4rem; }
@keyframes advVictoryPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
  10% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
  16% { transform: translate(-50%, -50%) scale(1); }
  82% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -62%) scale(.96); }
}

/* ---- 新ボスの塗り ---- */
/* じょおうバチ */
.qb-wing { fill: rgba(235, 245, 255, .85); stroke: #b8cbe0; stroke-width: 2; }
.qb-body { fill: #ffd23d; stroke: #d9a92e; stroke-width: 2; }
.qb-stripe { fill: none; stroke: #5a4420; stroke-width: 7; stroke-linecap: round; }
.qb-head { fill: #ffde66; stroke: #d9a92e; stroke-width: 2; }
.qb-crown { fill: #ff7fb2; stroke: #e05a92; stroke-width: 1.5; }
.qb-eye { fill: #3a2a10; }
.qb-nose { fill: #e8a03a; }
.qb-sting { fill: #8a6a20; }
/* オオブヒガニ */
.kn-body { fill: #ec5b3d; stroke: #c43e24; stroke-width: 2.5; }
.kn-claw { fill: #ec5b3d; stroke: #c43e24; stroke-width: 2.5; }
.kn-clawcut { fill: #ffeef5; }
.kn-leg, .kn-stalk { fill: none; stroke: #c43e24; stroke-width: 5; stroke-linecap: round; }
.kn-eye { fill: #3a2018; }
.kn-nose { fill: #ff9a7d; }
.kn-mouth { fill: none; stroke: #a03018; stroke-width: 3; stroke-linecap: round; }
/* もみじダヌキ */
.mj-body, .mj-head { fill: #b29b86; stroke: #94806c; stroke-width: 2; }
.mj-belly { fill: #e8dcc8; }
.mj-ear { fill: #94806c; }
.mj-patch { fill: #6e5a48; }
.mj-eye { fill: #fff; }
.mj-nose { fill: #5a4636; }
.mj-tail { fill: #b29b86; stroke: #94806c; stroke-width: 2; }
.mj-tailstripe { fill: none; stroke: #6e5a48; stroke-width: 5; stroke-linecap: round; }
.mj-leaf { fill: #e05a3a; }
/* 葉がくれ（消えている間） */
.adv-boss.hide { opacity: 0; transition: opacity .3s ease; }
.adv-boss { transition: opacity .3s ease; }
/* にじペガサス */
.pg-body, .pg-head { fill: #fdfaff; stroke: #d8cfe8; stroke-width: 2; }
.pg-leg { fill: #e8e0f4; }
.pg-wing { fill: #f2ecff; stroke: #d8cfe8; stroke-width: 2; }
.pg-mane1 { fill: none; stroke: #f0648c; stroke-width: 5; stroke-linecap: round; }
.pg-mane2 { fill: none; stroke: #ffd23d; stroke-width: 5; stroke-linecap: round; }
.pg-mane3 { fill: none; stroke: #63c6f0; stroke-width: 5; stroke-linecap: round; }
.pg-horncap { fill: #ffd23d; }
.pg-eye { fill: #4a3a55; }
.pg-nose { fill: #f0a0be; }
/* UFOブヒ星人 */
.uo-dome { fill: rgba(180, 230, 255, .55); stroke: #8ec8e8; stroke-width: 2; }
.uo-alien { fill: #7ed6a0; stroke: #56b47e; stroke-width: 2; }
.uo-aeye { fill: #1e3a2a; }
.uo-anose { fill: #56b47e; }
.uo-saucer { fill: #8b8ba4; stroke: #6c6c84; stroke-width: 2; }
.uo-rim { fill: #a8a8c0; }
.uo-light { fill: #ffd23d; }
/* おめん大将（投げモードでお面が赤くなる） */
.om-happi { fill: #3a5a8a; stroke: #2a4468; stroke-width: 2; }
.om-obi { fill: #d63a32; }
.om-head { fill: #f6a9c4; }
.om-mask { fill: #fbf3e8; stroke: #d63a32; stroke-width: 2; transition: fill .25s ease; }
.om-maskmark { fill: none; stroke: #d63a32; stroke-width: 3; stroke-linecap: round; }
.om-meye { fill: #4a2a20; }
.om-mnose { fill: #e88aa8; }
.om-band { fill: none; stroke: #d63a32; stroke-width: 4; stroke-linecap: round; }
.adv-boss.omen-throw .om-mask { fill: #e86a5a; }

/* ---- 新しい投げ物 ---- */
.sh-awa { fill: rgba(150, 212, 240, .55); stroke: #6cb8d8; stroke-width: 2; }
.sh-awahi { fill: rgba(255, 255, 255, .9); }
.sh-star { fill: #ffd23d; stroke: #e0a92e; stroke-width: 1.5; }
.sh-beam { fill: #9ef06a; stroke: #56b43e; stroke-width: 1.5; }
.sh-tama { fill: #fbf3e8; stroke: #d63a32; stroke-width: 2; }
.sh-tamaline { fill: none; stroke: #d63a32; stroke-width: 2.5; }
/* ドンガラスの爆弾どんぐり（導火線がチカチカ） */
.sh-bomb { fill: #3f3f4e; stroke: #26262f; stroke-width: 2; }
.sh-bombhi { fill: none; stroke: rgba(255, 255, 255, .35); stroke-width: 3; stroke-linecap: round; }
.sh-bombfuse { fill: none; stroke: #8a6a3a; stroke-width: 2.5; stroke-linecap: round; }
.sh-bombspark { fill: #ffb03a; }
.adv-shot.k-bomb svg { animation: advBombBlink .4s steps(2, jump-none) infinite; }
@keyframes advBombBlink { 0% { opacity: 1; } 100% { opacity: .55; } } /* opacity＝コンポジタのみで安い（filterは再描画が走る） */
/* オオブヒクラゲのビリビリ玉 */
.sh-biri { fill: #ffe15a; stroke: #e0a92e; stroke-width: 1.5; }
/* もみじダヌキの葉っぱ手裏剣（くるくる回る） */
.sh-leaf { fill: #d9553f; stroke: #a83a2a; stroke-width: 1.5; }
.adv-shot.k-leaf svg { animation: advLeafSpin .6s linear infinite; }
@keyframes advLeafSpin { to { transform: rotate(360deg); } }
/* ゆきんこブタの着地の雪しぶき */
.sh-yuki { fill: #f4faff; stroke: #c8dded; stroke-width: 2; }
.sh-yukihi { fill: #fff; }

/* ---- 新しい雑魚 ---- */
/* こばち（ミニミツバチ） */
.kb2-wing { fill: rgba(235, 245, 255, .85); stroke: #b8cbe0; stroke-width: 1.5; }
.kb2-body { fill: #ffd23d; stroke: #d9a92e; stroke-width: 2; }
.kb2-stripe { fill: none; stroke: #5a4420; stroke-width: 4.5; stroke-linecap: round; }
.kb2-eye { fill: #3a2a10; }
.kb2-nose { fill: #e8a03a; }
.kb2-sting { fill: #8a6a20; }
/* こがに（ミニガニ） */
.kg-body, .kg-claw { fill: #ec5b3d; stroke: #c43e24; stroke-width: 2; }
.kg-leg, .kg-stalk { fill: none; stroke: #c43e24; stroke-width: 3.5; stroke-linecap: round; }
.kg-eye { fill: #3a2018; }
.kg-mouth { fill: none; stroke: #a03018; stroke-width: 2.5; stroke-linecap: round; }

/* ---- 海の中：水面（これより上へは泳げない） ---- */
.adv-seasurface {
  position: absolute; height: 14px; z-index: 1; pointer-events: none;
  background:
    radial-gradient(14px 8px at 10px 12px, rgba(255, 255, 255, .55), transparent 70%),
    radial-gradient(14px 8px at 38px 10px, rgba(255, 255, 255, .45), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .75), rgba(190, 235, 250, .28));
  background-size: 56px 14px, 56px 14px, 100% 100%;
  border-top: 3px solid rgba(255, 255, 255, .85);
  border-radius: 3px;
}

/* ---- 海の敵 ---- */
/* さかなの大群 */
.fs-fish ellipse, .fs-fish path { fill: #5cb8e8; stroke: #3a92c4; stroke-width: 1.5; }
.fs-eye { fill: #1e3a50; stroke: none; }
/* ブヒイカ */
.ik-hood { fill: #f4e9f2; stroke: #d8bcd4; stroke-width: 2; }
.ik-fin { fill: #e8d4e6; }
.ik-eye { fill: #4a2a44; }
.ik-nose { fill: #e88aa8; }
.ik-tent { fill: none; stroke: #d8bcd4; stroke-width: 4; stroke-linecap: round; }
/* 墨 */
.sh-ink { fill: #2e2a36; }
.sh-inkhi { fill: rgba(255, 255, 255, .25); }

/* ---- お花畑のギミック ---- */
/* 大きい花の板（足場が花になる） */
.adv-plat.k-flower {
  background:
    radial-gradient(10px 12px at 12% -20%, #ff9ec0 60%, transparent 61%),
    radial-gradient(10px 12px at 32% -22%, #ffd23d 60%, transparent 61%),
    radial-gradient(10px 12px at 52% -20%, #b48ce0 60%, transparent 61%),
    radial-gradient(10px 12px at 72% -22%, #ff9ec0 60%, transparent 61%),
    radial-gradient(10px 12px at 90% -20%, #ffd23d 60%, transparent 61%),
    linear-gradient(180deg, #8fd06e, #6fb84e);
  border-radius: 10px;
  box-shadow: 0 3px 5px rgba(60, 110, 40, .35);
}
/* ぼよーん花（トランポリン花） */
.adv-spring.k-hana .hs-petal { fill: #ff9ec0; stroke: #e5769f; stroke-width: 1.5; }
.adv-spring.k-hana .hs-core { fill: #ffd23d; stroke: #d9a92e; stroke-width: 1.5; }
.adv-spring.k-hana .hs-stem { fill: none; stroke: #5ea84e; stroke-width: 3; stroke-linecap: round; }
/* 食ブヒ植物 */
.pk-jaw { fill: #7a4a9c; stroke: #5a3478; stroke-width: 2; }
.pk-jaw-bot { fill: #8a5aac; }
.pk-teeth { fill: none; stroke: #fff; stroke-width: 3; stroke-linejoin: round; }
.pk-spot { fill: #d6ff5a; }
.pk-eye { fill: #ffe95a; }
.pk-stem { fill: none; stroke: #4a8a3e; stroke-width: 4; stroke-linecap: round; }
/* パクッ（食べられた瞬間、口を閉じる） */
.adv-en.chomp .pk-jaw-top { animation: pkSnap .3s ease 2; transform-origin: 15% 85%; }
@keyframes pkSnap { 0% { transform: rotate(0); } 50% { transform: rotate(14deg); } 100% { transform: rotate(0); } }

/* ---- 宇宙（小惑星ベルト） ---- */
/* 小惑星の板：岩肌にクレーター */
.adv-plat.k-aster {
  background:
    radial-gradient(9px 6px at 22% 40%, rgba(70, 62, 96, .55) 60%, transparent 61%),
    radial-gradient(11px 7px at 64% 62%, rgba(70, 62, 96, .5) 60%, transparent 61%),
    radial-gradient(7px 5px at 86% 30%, rgba(70, 62, 96, .45) 60%, transparent 61%),
    linear-gradient(180deg, #a29ab8, #6e6786);
  border-radius: 12px;
  box-shadow: 0 4px 9px rgba(20, 16, 50, .45);
}
/* ぴぴん（みどりの宇宙人） */
.pp-ant { fill: none; stroke: #4a9a5e; stroke-width: 2.5; stroke-linecap: round; }
.pp-antb { fill: #ffd23d; }
.pp-body { fill: #7ed08a; stroke: #4a9a5e; stroke-width: 2; }
.pp-eye { fill: #fff; }
.pp-pupil { fill: #263a2c; }
.pp-nose { fill: #57b06a; }
/* ロボブヒ（2回踏み） */
.rb-ant { fill: none; stroke: #8a93a8; stroke-width: 3; stroke-linecap: round; }
.rb-lamp { fill: #ff6a6a; }
.rb-body { fill: #b8c2d8; stroke: #8a93a8; stroke-width: 2.5; }
.rb-eye { fill: #3ad2ff; }
.rb-nose { fill: #8a93a8; }
.rb-wheel { fill: #5a6478; }
/* ワープリング */
.adv-warp { position: absolute; width: 52px; height: 68px; z-index: 1; animation: wpPulse 1.6s ease-in-out infinite; pointer-events: none; }
.adv-warp svg { width: 100%; height: 100%; }
.wp-glow { fill: rgba(90, 220, 255, .16); }
.wp-ring { fill: none; stroke: #5bd8ff; stroke-width: 5; }
.wp-core { fill: rgba(160, 240, 255, .35); }
.adv-warp.out .wp-glow { fill: rgba(255, 150, 215, .14); }
.adv-warp.out .wp-ring { stroke: #ff9ad8; }
.adv-warp.out .wp-core { fill: rgba(255, 190, 230, .3); }
@keyframes wpPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
/* ワープ直後のシュンッ（まぶしく光る） */
.adv-player.warped svg { animation: wpFlash .5s ease; }
@keyframes wpFlash { 0% { filter: brightness(3); } 100% { filter: none; } }

/* ---- ブッヒー城（最終決戦） ---- */
/* くずれ橋：踏むとふるえて、くずれ落ちる石の板 */
.adv-crumb { position: absolute; z-index: 1; }
.adv-crumb svg { width: 100%; height: 100%; overflow: visible; }
.cb-body { fill: #9a8f9e; stroke: #6e6376; stroke-width: 2; }
.cb-crack { fill: none; stroke: #6e6376; stroke-width: 2; stroke-linejoin: round; }
.cb-frag { fill: #857a8c; }
.adv-crumb.shaking { animation: cbShake .12s linear infinite; }
@keyframes cbShake { 0% { transform: translate(0, 0); } 25% { transform: translate(-1.5px, 1px); } 50% { transform: translate(1.5px, -1px); } 75% { transform: translate(-1px, -1px); } }
.adv-crumb.fallen { animation: cbFall .55s ease-in forwards; }
@keyframes cbFall { to { transform: translateY(190px) rotate(8deg); opacity: 0; } }
/* ほねブヒ */
.hn-skull, .hn-snout { fill: #f4f0e6; stroke: #c9c2b2; stroke-width: 2; }
.hn-eye { fill: #3a3244; }
.hn-hole { fill: #b8b0a0; }
.hn-rib, .hn-leg { fill: none; stroke: #e6e0d2; stroke-width: 3.5; stroke-linecap: round; }
/* ほねブヒ：踏まれてホロッとくずれている間（復活待ち） */
.adv-en.crumbled svg { transform: scaleY(.28) translateY(20px); opacity: .65; transition: transform .18s ease, opacity .18s ease; transform-origin: 50% 100%; }
/* よろいブヒ */
.yr-plume { fill: #d6485a; }
.yr-helm { fill: #8f97ab; stroke: #656d82; stroke-width: 2.5; }
.yr-visor { fill: #3a4152; }
.yr-body { fill: #a8b0c4; stroke: #656d82; stroke-width: 2.5; }
.yr-snout { fill: #e8a0b4; }
.yr-rivet { fill: #dfe4ee; }
.yr-leg { fill: none; stroke: #656d82; stroke-width: 4; stroke-linecap: round; }

/* ---- 浜辺（夏のバカンス） ---- */
/* やどかり */
.yd-shell { fill: #e8a86a; stroke: #b8783e; stroke-width: 2; }
.yd-swirl { fill: none; stroke: #b8783e; stroke-width: 2.5; stroke-linecap: round; }
.yd-body { fill: #f08a9a; stroke: #c05a6e; stroke-width: 1.5; }
.yd-claw { fill: #e06a80; }
.yd-eye { fill: #4a2a34; }
/* やどかり：殻にひっこんでいる間（ぺしゃんこ演出を上書きして、殻だけ残す） */
.yd-body, .yd-claw, .yd-eye { transition: opacity .2s ease; }
.adv-en.t-yadokari.crumbled svg { transform: none; opacity: 1; }
.adv-en.t-yadokari.crumbled .yd-body, .adv-en.t-yadokari.crumbled .yd-claw, .adv-en.t-yadokari.crumbled .yd-eye { opacity: 0; }
/* カモメ */
.km-wing { fill: #f2f6fa; stroke: #c6d4de; stroke-width: 2; }
.km-body { fill: #ffffff; stroke: #c6d4de; stroke-width: 2; }
.km-tail { fill: #dce6ee; }
.km-eye { fill: #33404c; }
.km-beak { fill: #f2b34c; }
/* バウンドパラソル */
.pr-canopy { fill: #f06a6a; stroke: #c04848; stroke-width: 2; }
.pr-stripe { fill: #fff4ec; }
.pr-pole { fill: none; stroke: #b8895e; stroke-width: 3.5; stroke-linecap: round; }
.pr-base { fill: #e8d8b8; }
