/* SPEC-165: ストーリーモード (= ランドマップ・店の only・顔見せ・目標の帯) */

/* ---------- S-A ワールドマップ (= 地図そのもの。 §3.y) ---------- */
.story-map { position: relative; display: block; width: 100%; height: 100dvh; min-height: 100dvh; padding: 0; overflow: hidden; background: #06050c; text-align: left; }
.story-map::after { display: none; }
.story-map__board { position: absolute; inset: 0; transition: transform 0.55s cubic-bezier(0.4, 0, 0.6, 1), opacity 0.5s ease; }
.story-map__board.is-zoom { transform: scale(2.6); opacity: 0; }
.story-map__sea { position: absolute; inset: 0; background:
  radial-gradient(ellipse at 50% 48%, #1b1630 0%, #0a0814 60%, #04030a 100%);
}
.story-map__sea::after { content: ""; position: absolute; inset: 0; background:
  radial-gradient(ellipse 30% 20% at 20% 30%, rgba(60, 80, 140, 0.18), transparent 70%),
  radial-gradient(ellipse 30% 20% at 80% 70%, rgba(120, 60, 140, 0.14), transparent 70%),
  repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 28px), repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 28px); }
.story-map__lands, .story-map__plates { position: absolute; inset: 0; }
.story-map__paths { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.story-map__clouds { position: absolute; inset: -20%; pointer-events: none; z-index: 4; }
.story-map__clouds i { position: absolute; inset: 0; display: block; filter: blur(8px); background:
  radial-gradient(ellipse 28% 12% at 30% 30%, rgba(255, 255, 255, 0.10), transparent 70%),
  radial-gradient(ellipse 34% 10% at 72% 62%, rgba(255, 255, 255, 0.08), transparent 70%),
  radial-gradient(ellipse 24% 9% at 50% 86%, rgba(255, 255, 255, 0.07), transparent 70%); animation: story-cloud 46s linear infinite alternate; }
.story-map__clouds i + i { background: radial-gradient(ellipse 30% 10% at 60% 20%, rgba(255, 255, 255, 0.07), transparent 70%), radial-gradient(ellipse 26% 9% at 20% 70%, rgba(255, 255, 255, 0.06), transparent 70%); animation-duration: 63s; animation-direction: alternate-reverse; }
@keyframes story-cloud { to { transform: translate(5%, 2%); } }
.story-map__head { position: absolute; left: 0; right: 0; top: 0; z-index: 6; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: max(12px, var(--safe-t)) 16px 0; text-shadow: 0 1px 3px #000; pointer-events: none; }
.story-map__title { margin: 0; font-size: 20px; font-weight: 900; letter-spacing: 1px; }
.story-map__title::before { content: attr(data-kicker); display: block; font-size: 10px; letter-spacing: 3px; opacity: 0.7; }
.story-map__sub { margin: 0; font-size: 12px; opacity: 0.85; }
.story-map__back { position: absolute; left: 14px; bottom: max(16px, var(--safe-b)); z-index: 6; }
.story-map__hint { position: absolute; right: 14px; bottom: max(22px, var(--safe-b)); z-index: 6; margin: 0; font-size: 11px; opacity: 0.75; text-shadow: 0 1px 2px #000; }

/* 領土 (= 背景を楕円に切り抜き、 縁をぎざぎざに。 外へ向けて暗く溶かす) */
.story-terr { position: absolute; background-size: cover; background-position: center; z-index: 1; filter: url(#storyEdgeFilter);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 46%, rgba(0, 0, 0, 0.6) 62%, transparent 76%); mask-image: radial-gradient(ellipse at center, #000 46%, rgba(0, 0, 0, 0.6) 62%, transparent 76%); }
.story-terr::after { content: ""; position: absolute; inset: 0; background: rgba(6, 4, 14, 0.3); }
.story-terr.is-sealed { filter: url(#storyEdgeFilter) saturate(0.35) brightness(0.55); }
.story-terr--c { z-index: 2; -webkit-mask-image: radial-gradient(ellipse at center, #000 38%, transparent 70%); mask-image: radial-gradient(ellipse at center, #000 38%, transparent 70%); }
.story-terr.is-done::after { background: rgba(6, 4, 14, 0.18); }

/* 靄 (= 開いていないランド。 3 層の黒い雲が漂い、 晴れる瞬間は上へ抜ける) */
.story-mist { position: absolute; z-index: 2; pointer-events: none; opacity: 1; transition: opacity 1.4s ease; }
.story-mist.is-clear { opacity: 0; }
.story-mist.is-clear.story-mist--lift > i { animation: story-mist-lift 1.4s ease-out forwards; }
.story-mist > i { position: absolute; inset: 0; display: block; filter: url(#storyMistFilter); }
.story-mist__a { background: radial-gradient(ellipse 60% 50% at 30% 40%, rgba(5, 4, 12, 0.9) 0%, rgba(5, 4, 12, 0.7) 45%, rgba(5, 4, 12, 0) 75%), radial-gradient(ellipse 30% 18% at 62% 28%, rgba(150, 140, 190, 0.26) 0%, rgba(150, 140, 190, 0) 100%); animation: story-mist-drift 14s ease-in-out infinite alternate; }
.story-mist__b { background: radial-gradient(ellipse 55% 55% at 70% 60%, rgba(10, 8, 22, 0.9) 0%, rgba(10, 8, 22, 0.65) 50%, rgba(10, 8, 22, 0) 78%), radial-gradient(ellipse 36% 16% at 30% 72%, rgba(130, 120, 170, 0.24) 0%, rgba(130, 120, 170, 0) 100%); animation: story-mist-drift 19s ease-in-out infinite alternate-reverse; }
.story-mist__c { background: radial-gradient(ellipse 80% 70% at 50% 50%, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.4) 60%, rgba(20, 16, 36, 0) 100%); animation: story-mist-breathe 9s ease-in-out infinite; }
@keyframes story-mist-drift { from { transform: translate(-5%, -3%) scale(1.05); } to { transform: translate(5%, 4%) scale(1.12); } }
@keyframes story-mist-breathe { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }
@keyframes story-mist-lift { to { transform: translateY(-40%) scale(1.3); opacity: 0; } }

/* ランドの札 (= 押すと入る) */
.story-plate { position: absolute; z-index: 5; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; cursor: pointer; font: inherit; color: #fff;
  background: rgba(8, 6, 18, 0.8); border: 1.5px solid var(--land, #888); box-shadow: 0 0 16px color-mix(in srgb, var(--land, #888) 50%, transparent); backdrop-filter: blur(3px); text-align: left; }
.story-plate__cry { width: 44px; height: 44px; image-rendering: pixelated; filter: drop-shadow(0 0 6px var(--land, #888)); }
.story-plate__txt { display: flex; flex-direction: column; line-height: 1.1; white-space: nowrap; }
.story-plate__txt small { font-size: 9px; letter-spacing: 2px; color: var(--land, #ccc); }
.story-plate__txt b { font-size: 15px; font-weight: 900; }
.story-plate__pg { margin-left: 6px; font-size: 11px; color: #9ef0b0; white-space: nowrap; }
.story-plate__lock { margin-left: 4px; font-size: 13px; opacity: 0.8; }
.story-plate.is-sealed { opacity: 0.8; cursor: not-allowed; filter: saturate(0.4); }
.story-plate.is-sealed .story-plate__cry { filter: brightness(0.35); }
.story-plate.is-current { border-color: #ffe17a; box-shadow: 0 0 22px rgba(255, 225, 122, 0.8); animation: story-pulse 1.4s ease-in-out infinite; }
.story-plate.is-done { border-color: color-mix(in srgb, var(--land) 70%, #fff); }
.story-plate--c { padding: 4px 10px 4px 6px; }
.story-plate--c .story-plate__cry { width: 32px; height: 32px; }
.story-plate--c .story-plate__txt b { font-size: 13px; }
@keyframes story-pulse { 0%, 100% { box-shadow: 0 0 8px rgba(255, 215, 120, 0.45); } 50% { box-shadow: 0 0 24px rgba(255, 215, 120, 0.9); } }

/* 道 (= 地図の上の線。 % の座標で引く) */
.story-road { fill: none; stroke-width: 4; stroke-linecap: round; }
.story-road--done { stroke: #ffe9a6; filter: drop-shadow(0 0 4px rgba(255, 225, 122, 0.9)); }
.story-road--now { stroke: #ffe17a; stroke-dasharray: 7 9; animation: story-dash 1.2s linear infinite; filter: drop-shadow(0 0 5px rgba(255, 225, 122, 0.8)); }
.story-road--far { stroke: rgba(255, 255, 255, 0.22); stroke-dasharray: 2 9; }
@keyframes story-dash { to { stroke-dashoffset: -32; } }

/* 中央の塔 (= 島の上。 ゼウスの上にファオ。 黒い霧。 ときどき稲光。 立つ前は封印の渦) */
.story-tower { position: absolute; left: 50%; top: 42%; z-index: 4; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.story-tower__zeus { width: 112px; height: 112px; image-rendering: pixelated; filter: drop-shadow(0 0 16px rgba(155, 93, 229, 0.9)); }
.story-tower__fao { width: 52px; height: 52px; image-rendering: pixelated; margin-bottom: -14px; z-index: 2; filter: drop-shadow(0 0 10px rgba(255, 80, 120, 0.9)); animation: story-fao-hover 3.2s ease-in-out infinite; }
.story-tower__fog { position: absolute; left: -60%; right: -60%; bottom: -16%; height: 60%; display: block; filter: url(#storyMistFilter); z-index: 3; background: radial-gradient(ellipse 60% 60% at 50% 70%, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0) 80%); animation: story-mist-drift 16s ease-in-out infinite alternate; }
.story-tower__fog--2 { bottom: 10%; height: 40%; opacity: 0.7; animation-duration: 22s; animation-direction: alternate-reverse; }
.story-tower__bolt { position: absolute; left: 50%; top: -40px; width: 2px; height: 56px; background: linear-gradient(#fff, rgba(255, 255, 255, 0)); box-shadow: 0 0 12px #bfe3ff; transform: translateX(-50%) rotate(8deg); opacity: 0; animation: story-bolt 7s infinite; }
@keyframes story-bolt { 0%, 93%, 100% { opacity: 0; } 94%, 96% { opacity: 1; } }
.story-tower.is-rise .story-tower__zeus, .story-tower.is-rise .story-tower__fao { animation: story-tower-rise 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.story-tower__seal { width: 72px; height: 72px; border-radius: 50%; display: block; background: conic-gradient(from 0deg, rgba(120, 80, 200, 0.0), rgba(120, 80, 200, 0.6), rgba(120, 80, 200, 0.0) 60%); filter: blur(2px); animation: story-seal 9s linear infinite; }
@keyframes story-seal { to { transform: rotate(360deg); } }
@keyframes story-tower-rise { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes story-fao-hover { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* ---------- S-B ワールド詳細 ---------- */
.story-world { position: relative; display: block; width: 100%; height: 100dvh; min-height: 100dvh; padding: 0; overflow: hidden; background: #06050c; text-align: left; transition: opacity 0.45s ease; }
.story-world::after { display: none; }
.story-world.is-in { opacity: 0; }
.story-world__bg { position: absolute; inset: -4%; background-size: cover; background-position: center; animation: story-pan 30s ease-in-out infinite alternate; }
@keyframes story-pan { to { transform: translate(2%, -1.5%) scale(1.04); } }
.story-world__shade { position: absolute; inset: 0; background: linear-gradient(rgba(6, 4, 14, 0.6), rgba(6, 4, 14, 0.15) 30%, rgba(6, 4, 14, 0.25) 70%, rgba(6, 4, 14, 0.85)); }
.story-world__head { position: absolute; left: 0; right: 0; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: max(14px, var(--safe-t)) 16px 0; text-shadow: 0 1px 3px #000; }
.story-world__cry { width: 72px; height: 72px; image-rendering: pixelated; filter: drop-shadow(0 0 10px var(--land, #888)); }
.story-world__txt { display: flex; flex-direction: column; line-height: 1.1; white-space: nowrap; }
.story-world__txt small { font-size: 10px; letter-spacing: 3px; color: var(--land, #ccc); }
.story-world__txt b { font-size: 22px; font-weight: 900; }
.story-world__pg { margin-left: auto; align-self: flex-start; margin-top: 4px; font-size: 12px; color: #9ef0b0; }
.story-world__trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.story-world__trail .story-road { stroke-width: 5; }
.story-world__nodes { position: absolute; inset: 0; z-index: 2; }
.story-world__back { position: absolute; left: 14px; bottom: max(16px, var(--safe-b)); z-index: 4; }
.story-world__hint { position: absolute; right: 12px; bottom: max(14px, var(--safe-b)); z-index: 4; max-width: 56%; margin: 0; padding: 8px 10px; border-radius: 10px; background: rgba(8, 6, 18, 0.85); border: 1px solid rgba(255, 255, 255, 0.2); font-size: 11px; line-height: 1.4; }
.story-world__hint:empty { display: none; }

/* ステージの札 (= 像を大きく。 作者: 256px まで可) */
.story-stage { position: absolute; width: 96px; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: #fff; }
.story-stage__foe { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); width: 96px; image-rendering: pixelated; opacity: 0.85; filter: drop-shadow(0 0 14px rgba(187, 134, 252, 0.9)); pointer-events: none; }
.story-stage__art { width: 88px; height: 98px; background-size: contain; background-repeat: no-repeat; background-position: center bottom; image-rendering: pixelated; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.9)); }
.story-stage--boss .story-stage__art, .story-stage--shadow .story-stage__art { width: 104px; height: 116px; }
.story-stage__id { padding: 2px 10px; border-radius: 999px; background: rgba(8, 6, 18, 0.85); border: 1.5px solid rgba(255, 255, 255, 0.35); font-size: 12px; font-weight: 900; }
.story-stage__lbl { font-size: 9px; color: #9ef0b0; text-shadow: 0 1px 2px #000; }
.story-stage.is-cleared .story-stage__id { border-color: var(--land, #8c8); }
.story-stage.is-current .story-stage__id { border-color: #ffe17a; box-shadow: 0 0 14px rgba(255, 215, 120, 0.8); }
.story-stage.is-current::before { content: ""; position: absolute; top: 14px; width: 80px; height: 80px; border-radius: 50%; border: 2px solid rgba(255, 225, 122, 0.8); animation: story-ring 1.6s ease-out infinite; pointer-events: none; }
@keyframes story-ring { from { transform: scale(0.7); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.story-stage.is-locked, .story-stage.is-todo { opacity: 0.55; cursor: not-allowed; }
.story-stage.is-locked .story-stage__art { filter: grayscale(1) brightness(0.45); }
.story-stage.is-locked .story-stage__foe { opacity: 0.45; filter: grayscale(0.6) brightness(0.6); }

/* ---------- S-C ステージの説明 ---------- */
.story-stage-modal { position: fixed; inset: 0; z-index: calc(var(--z-title) + 10);   /* .title-screen (= 200) より上。 80 だとワールド詳細の裏に隠れて「押しても何も出ない」 */ display: flex; align-items: flex-end; justify-content: center; padding: 0 12px max(16px, var(--safe-b)); }
.story-stage-modal.hidden { display: none; }
.story-stage-modal__dim { position: absolute; inset: 0; background: rgba(4, 3, 10, 0.72); backdrop-filter: blur(2px); }
.story-stage-modal__card { position: relative; width: 100%; max-width: 420px; max-height: calc(100vh - 24px); overflow: auto; border-radius: 16px; border: 1.5px solid var(--land, #ffe17a); background: rgba(10, 8, 20, 0.96); box-shadow: 0 0 30px color-mix(in srgb, var(--land, #ffe17a) 45%, transparent); transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.2, 1.1), opacity 0.3s ease; }
.story-stage-modal.is-in .story-stage-modal__card { transform: translateY(40px); opacity: 0; }
.ssm-top { position: relative; height: 150px; background-size: cover; background-position: center 30%; }
.ssm-top::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(10, 8, 20, 0.1), rgba(10, 8, 20, 0.95)); }
.ssm-top__art { position: absolute; left: 14px; top: 10px; width: 52px; height: 58px; background: center / contain no-repeat; image-rendering: pixelated; z-index: 1; }
.ssm-top__id { position: absolute; left: 14px; bottom: 10px; z-index: 1; display: flex; flex-direction: column; line-height: 1.15; }
.ssm-top__id small { font-size: 10px; letter-spacing: 2px; color: var(--land, #ccc); }
.ssm-top__id b { font-size: 21px; font-weight: 900; }
.ssm-top__foe { position: absolute; right: 14px; bottom: 6px; width: 112px; image-rendering: pixelated; filter: drop-shadow(0 0 16px rgba(187, 134, 252, 0.95)); z-index: 1; }
.ssm-top__mob { position: absolute; right: 14px; bottom: 10px; z-index: 1; display: flex; gap: 4px; }
.ssm-top__mob img { width: 44px; height: 44px; image-rendering: pixelated; filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.9)); }
.ssm-body { padding: 12px 14px 14px; display: grid; gap: 10px; }
.ssm-row { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: start; font-size: 12px; }
.ssm-k { font-size: 10px; letter-spacing: 2px; color: #ffe17a; padding-top: 3px; }
.ssm-goal { font-size: 15px; font-weight: 900; }
.ssm-en { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ssm-en img { width: 32px; height: 32px; image-rendering: pixelated; background: rgba(255, 255, 255, 0.06); border-radius: 8px; }
.ssm-en__txt { font-size: 11px; opacity: 0.85; }
.ssm-rw { display: flex; flex-wrap: wrap; gap: 6px; }
.ssm-rw span { padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18); font-size: 11px; }
.ssm-rw .is-bond { border-color: #bb86fc; color: #d9c6ff; }
.ssm-rw .is-unlock { border-color: #9ef0b0; color: #9ef0b0; }
.ssm-mai { display: flex; gap: 8px; align-items: flex-start; font-size: 11px; line-height: 1.4; padding: 8px; border-radius: 10px; background: rgba(58, 160, 232, 0.1); border: 1px solid rgba(58, 160, 232, 0.35); }
.ssm-mai i { display: block; width: 34px; height: 34px; flex: none; border-radius: 8px; background: #234 center top / cover no-repeat; image-rendering: pixelated; }
.ssm-best { font-size: 10px; opacity: 0.75; text-align: right; }
.ssm-btns { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 2px; }
.ssm-go { background: linear-gradient(#ffe17a, #f0b429); color: #2a1a00; border-color: #ffe17a; box-shadow: 0 0 16px rgba(255, 225, 122, 0.6); font-weight: 900; }

:root[data-reduce-fx] .story-map__clouds i, :root[data-reduce-fx] .story-mist > i, :root[data-reduce-fx] .story-tower__fog, :root[data-reduce-fx] .story-tower__fao, :root[data-reduce-fx] .story-tower__bolt, :root[data-reduce-fx] .story-tower__seal, :root[data-reduce-fx] .story-road--now, :root[data-reduce-fx] .story-plate.is-current, :root[data-reduce-fx] .story-world__bg, :root[data-reduce-fx] .story-stage.is-current::before { animation: none; }
@media (prefers-reduced-motion: reduce) { .story-map__clouds i, .story-mist > i, .story-tower__fog, .story-tower__fao, .story-tower__bolt, .story-tower__seal, .story-road--now, .story-plate.is-current, .story-world__bg, .story-stage.is-current::before { animation: none; } }

/* モード選択の札 */
.mode-card--story { border-color: #ffe17a; }

/* 店の only (= 品を固定。 リロール・ギフト・お断り・取り置き・固有スキルを出さない) */
.shop-modal--story #shopReroll, .shop-modal--story #shopGiftFirstWrap, .shop-modal--story #shopBans, .shop-modal--story #shopBansLeft,
.shop-modal--story #shopWalletBans, .shop-modal--story #shopSig, .shop-modal--story .shop-corner, .shop-modal--story #shopSub, .shop-modal--story #shopIntro { display: none !important; }
.shop-modal--story-basic #shopReroll, .shop-modal--story-basic .shop-corner--lock, .shop-modal--story-basic #shopSub, .shop-modal--nosig #shopSig,
.shop-modal--story-noban #shopBans, .shop-modal--story-noban #shopBansLeft, .shop-modal--story-noban #shopWalletBans, .shop-modal--story-noban .shop-corner--ban { display: none !important; }
/* 取り置き・お断り・「あと n 回でボス」は 5-1、 固有スキルは 5-2 まで隠す */
.shop-modal--story .shop-card { box-shadow: 0 0 18px rgba(255, 225, 122, 0.75); }
.shop-modal--story #shopLeave[disabled] { opacity: 0.4; cursor: not-allowed; }

/* 戦闘の目標の帯 (= HUD の下) */
.story-goal { position: absolute; left: 50%; transform: translateX(-50%); z-index: 5; padding: 3px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.55); color: #ffe9a6; font-size: 13px; font-weight: 700; pointer-events: none; white-space: nowrap; }
.story-goal.hidden { display: none; }
/* 作者 2026-10-22: 目標は大きく。 数字が増えた瞬間に跳ね、 下の線が満ちる。 達成で金色に光る */
.story-goal { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 150px; padding: 5px 16px 7px; font-size: 12px; border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(6, 4, 14, 0.78); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5); }
.story-goal__lbl { font-size: 11px; letter-spacing: 2px; color: #ffe17a; font-weight: 800; }
.story-goal__num { display: inline-flex; align-items: baseline; gap: 3px; font-size: 13px; color: #cfd6e6; }
.story-goal__num i { font-style: normal; opacity: 0.6; }
.story-goal__now { display: inline-block; font-size: 26px; line-height: 1; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 0 10px rgba(255, 225, 122, 0.45); }
.story-goal__now.is-tick { animation: story-goal-tick 0.32s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes story-goal-tick { 0% { transform: scale(1.5); color: #ffe17a; } 100% { transform: scale(1); } }
.story-goal__bar { width: 100%; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.story-goal__fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #5ecf8a, #ffe17a); transition: width 0.35s ease-out; box-shadow: 0 0 8px rgba(255, 225, 122, 0.6); }
.story-goal__done { font-size: 13px; font-weight: 900; letter-spacing: 3px; color: #ffe17a; }
.story-goal.is-done { border-color: rgba(255, 225, 122, 0.8); box-shadow: 0 0 18px rgba(255, 225, 122, 0.55); }
.story-goal.is-burst { animation: story-goal-burst 0.7s ease-out; }
@keyframes story-goal-burst { 0% { transform: translateX(-50%) scale(1.25); box-shadow: 0 0 0 0 rgba(255, 225, 122, 0.8); } 100% { transform: translateX(-50%) scale(1); box-shadow: 0 0 24px 10px rgba(255, 225, 122, 0); } }
:root[data-reduce-fx] .story-goal__now.is-tick, :root[data-reduce-fx] .story-goal.is-burst { animation: none; }
/* 作者 2026-10-22: PC ではセリフの字と札が小さく、 釣り合わない。 広い画面では一回り大きく */
@media (min-width: 900px) {
  .story-scene__text { font-size: 21px; line-height: 1.8; }
  .story-scene__name { font-size: 13px; }
  .story-stage { transform: translate(-50%, -50%) scale(1.3); }   /* 札とアチーブメントの絵ごと一回り大きく */
  .story-stage__id { font-size: 16px; padding: 3px 14px; }
  .story-stage__lbl { font-size: 12px; }
  .story-world__txt b { font-size: 30px; }
  .story-world__txt small { font-size: 13px; }
  .story-world__hint { font-size: 14px; max-width: 44%; }
  .story-plate__txt b { font-size: 20px; }
  .story-plate__txt small { font-size: 11px; }
  .story-map__title { font-size: 28px; }
  .story-map__sub { font-size: 15px; }
  .story-map__say { font-size: 15px; }
  .ssm-top__id b { font-size: 26px; }
  .ssm-row { font-size: 15px; }
  .ssm-goal { font-size: 19px; }
  .ssm-mai { font-size: 14px; }
  .ssm-en__txt { font-size: 13px; }
  .story-goal { min-width: 200px; font-size: 14px; }
  .story-goal__now { font-size: 34px; }
  .story-goal__lbl { font-size: 13px; }
  .story-bond__line { font-size: 17px; }
  .story-bond__name { font-size: 22px; }
}

/* 顔見せ (= シャドーヒーローが右から入って一言) */
.story-cameo { position: fixed; right: 4vw; bottom: 22vh; z-index: 60; width: min(40vw, 260px); pointer-events: none; opacity: 0; transform: translateX(40px); transition: opacity 0.35s ease, transform 0.35s ease; }
.story-cameo img { width: 100%; image-rendering: pixelated; filter: drop-shadow(0 0 18px rgba(170, 120, 255, 0.8)); }
.story-cameo--in { opacity: 1; transform: translateX(0); }
.story-cameo--out { opacity: 0; transform: translateX(40px); }

/* 結果の画面の「マップへ」 */
.result-story-map { margin-top: 0.3rem; }

/* 絆の報酬ラッシュの札 (= 越えた瞬間に真ん中へ。 body に置く) */
.story-burst { position: fixed; left: 50%; top: 38%; z-index: 70; transform: translate(-50%, -50%) scale(0.8); opacity: 0; min-width: 210px; padding: 10px 16px 12px; border-radius: 14px; border: 2px solid #ffe17a; background: rgba(12, 8, 24, 0.92); color: #fff; box-shadow: 0 0 28px rgba(255, 225, 122, 0.6); pointer-events: none; transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.2, 0.9, 0.2, 1.2); }
.story-burst--in { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.story-burst--out { opacity: 0; transform: translate(-50%, -60%) scale(1.05); }
.story-burst__head { font-size: 12px; letter-spacing: 1px; color: #ffe17a; font-weight: 900; margin-bottom: 6px; text-align: center; }
.story-burst ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; font-size: 13px; }
.story-burst li b { color: #9ef0b0; margin-right: 4px; }
.story-burst__unlock { grid-column: 1 / -1; color: #d9c6ff; font-size: 12px; text-align: center; }

/* ---------- シーン (= マインちゃんの台詞。 §3.z) ---------- */
.story-scene { position: fixed; inset: 0; display: block; padding: 0; overflow: hidden; background: #04030a; text-align: left; }
.story-scene::after { display: none; }
.story-scene__bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, #1a1430 0%, #07060f 65%, #000 100%); }
.story-scene__bg::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 28px), repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 28px); }
.story-scene__tap { position: absolute; inset: 0; border: 0; background: transparent; cursor: pointer; }
.story-scene__face { position: absolute; left: 50%; bottom: 34%; width: 192px; height: 256px; transform: translateX(-50%); image-rendering: pixelated; filter: drop-shadow(0 0 24px rgba(58, 160, 232, 0.5)); pointer-events: none; animation: story-face-in 0.5s ease both; }
@keyframes story-face-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.story-scene__box { position: absolute; left: 12px; right: 12px; bottom: max(18px, var(--safe-b)); min-height: 30%; padding: 14px 16px 12px; border-radius: 14px; background: rgba(8, 6, 18, 0.92); border: 1.5px solid rgba(58, 160, 232, 0.6); box-shadow: 0 0 24px rgba(58, 160, 232, 0.35); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.story-scene__name { font-size: 10px; letter-spacing: 3px; color: #3aa0e8; }
.story-scene__text { margin: 0; flex: 1; font-size: 15px; line-height: 1.7; min-height: 4.2em; }
.story-scene__foot { display: flex; align-items: center; justify-content: space-between; pointer-events: auto; }
.story-scene__no { font-size: 11px; opacity: 0.6; }
.story-scene__next { padding: 8px 18px; }

/* ---------- 次元の裂け目 (= ゴールに着いた瞬間。 画面がゆがんで暗転) ---------- */
body.is-rift #app { animation: story-warp 2.6s ease-in forwards; }
@keyframes story-warp { 0% { filter: none; transform: none; } 30% { filter: hue-rotate(40deg) contrast(1.3) blur(0.5px); transform: skew(1deg, -1deg) scale(1.02); } 60% { filter: hue-rotate(-120deg) contrast(1.8) saturate(2) blur(2px); transform: skew(-3deg, 2deg) scale(1.08) rotate(1deg); } 85% { filter: hue-rotate(200deg) contrast(2.4) blur(6px) brightness(0.5); transform: skew(5deg, -4deg) scale(1.25) rotate(-2deg); } 100% { filter: blur(14px) brightness(0); transform: scale(1.6) rotate(3deg); } }
.story-rift { position: fixed; inset: 0; z-index: 90; pointer-events: none; overflow: hidden; }
.story-rift__ring { position: absolute; left: 50%; top: 45%; width: 20px; height: 20px; border-radius: 50%; transform: translate(-50%, -50%); border: 3px solid rgba(187, 134, 252, 0.9); box-shadow: 0 0 30px rgba(187, 134, 252, 0.8), inset 0 0 30px rgba(58, 160, 232, 0.6); animation: story-ring-out 2.2s cubic-bezier(0.2, 0.7, 0.3, 1) forwards; }
.story-rift__ring--2 { animation-delay: 0.35s; border-color: rgba(58, 160, 232, 0.9); }
@keyframes story-ring-out { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(60); } }
.story-rift__dark { position: absolute; inset: 0; background: #000; opacity: 0; animation: story-dark 2.6s ease-in forwards; }
@keyframes story-dark { 0%, 55% { opacity: 0; } 100% { opacity: 1; } }
:root[data-reduce-fx] .story-scene__face { animation: none; }
@media (prefers-reduced-motion: reduce) { body.is-rift #app { animation: story-dark 0.6s forwards; } .story-rift__ring { animation: none; opacity: 0; } .story-rift__dark { animation-duration: 0.6s; } }

/* 地図の上の一言 (= ランドを取り戻した・塔が立った) */
.story-map__say { position: absolute; left: 12px; right: 12px; bottom: calc(max(16px, var(--safe-b)) + 52px); z-index: 7; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(8, 6, 18, 0.9); border: 1.5px solid rgba(58, 160, 232, 0.6); box-shadow: 0 0 18px rgba(58, 160, 232, 0.35); font-size: 12px; line-height: 1.5; animation: story-say-in 0.4s ease both; }
.story-map__say.hidden { display: none; }
.story-map__say i { flex: none; width: 40px; height: 40px; border-radius: 8px; background: url("https://raw.githubusercontent.com/bearko/mycryptoheroes/main/Image/Characters/navi_ain_06_smile.png") center top / cover no-repeat #234; image-rendering: pixelated; }
@keyframes story-say-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* シーンで相手 (= COVID-19) が話すとき */
.story-scene.is-foe .story-scene__box { border-color: rgba(239, 95, 138, 0.7); box-shadow: 0 0 24px rgba(239, 95, 138, 0.35); }
.story-scene.is-foe .story-scene__name { color: #ef5f8a; }
.story-scene__face.is-foe { width: 256px; height: 256px; filter: drop-shadow(0 0 28px rgba(239, 95, 138, 0.7)); }
/* スマホでヒーロー選択の × が共通基盤のチャットのボタンと重なる (= 作者の報告 2026-10-22) */
@media (max-width: 640px) { .hero-modal__close-x { margin-right: 56px; } }

/* ---------- 旅 (= 次のステージへ。 ヒーローが札から札へ歩く・次の札が開く) ---------- */
.story-world__hero { position: absolute; width: 64px; height: 64px; transform: translate(-50%, -110%); image-rendering: pixelated; z-index: 5; pointer-events: none; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.8)); animation: story-hero-bob 0.5s ease-in-out infinite alternate; }
.story-world__hero.is-walk { transition: left 2s cubic-bezier(0.4, 0, 0.2, 1), top 2s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes story-hero-bob { from { margin-top: 0; } to { margin-top: -6px; } }
.story-stage.is-reveal { animation: story-reveal 1.1s cubic-bezier(0.2, 0.9, 0.2, 1.3) both; }
.story-stage.is-reveal .story-stage__art { filter: drop-shadow(0 0 16px rgba(255, 225, 122, 0.95)); }
@keyframes story-reveal { 0% { transform: translate(-50%, -50%) scale(0.4); opacity: 0; filter: brightness(3); } 60% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1); filter: none; } }
/* 新しく現れたランドの札 (= 靄が晴れたあとに弾む) */
.story-plate.is-new { animation: story-plate-new 1.2s 1.2s cubic-bezier(0.2, 0.9, 0.2, 1.3) both; }
@keyframes story-plate-new { 0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; } 60% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1); } }

/* ---------- ランクアップの演出 (= 1-5: ブレード → エリートブレード) ---------- */
.story-rankup { position: fixed; inset: 0; z-index: var(--z-modal-top); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(ellipse at 50% 45%, rgba(40, 30, 10, 0.92) 0%, rgba(4, 3, 10, 0.96) 70%); opacity: 0; transition: opacity 0.3s ease; cursor: pointer; overflow: hidden; }
.story-rankup.is-run { opacity: 1; }
.story-rankup.is-out { opacity: 0; }
.story-rankup__rays { position: absolute; left: 50%; top: 45%; width: 900px; height: 900px; transform: translate(-50%, -50%); border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(255, 225, 122, 0) 0deg, rgba(255, 225, 122, 0.35) 10deg, rgba(255, 225, 122, 0) 20deg, rgba(255, 225, 122, 0) 45deg); opacity: 0; animation: story-rays 2.6s ease-out forwards; }
.story-rankup__rays--2 { animation-direction: reverse; animation-duration: 3.4s; }
@keyframes story-rays { 0%, 30% { opacity: 0; transform: translate(-50%, -50%) rotate(0deg) scale(0.6); } 45% { opacity: 1; } 100% { opacity: 0.6; transform: translate(-50%, -50%) rotate(60deg) scale(1.1); } }
.story-rankup__stage { position: relative; width: 192px; height: 192px; }
.story-rankup__from, .story-rankup__to { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.story-rankup__from { animation: story-ru-from 1.1s ease-in forwards; }
@keyframes story-ru-from { 0% { transform: scale(0.8); opacity: 0; } 20% { transform: scale(1); opacity: 1; } 70% { transform: scale(1.05) rotate(-2deg); } 80% { transform: scale(1.05) rotate(2deg); } 90% { transform: scale(1.1) rotate(-2deg); filter: brightness(2); } 100% { transform: scale(1.3); opacity: 0; filter: brightness(4); } }
.story-rankup__to { opacity: 0; animation: story-ru-to 1.4s 1.05s cubic-bezier(0.2, 0.9, 0.2, 1.3) forwards; filter: drop-shadow(0 0 28px rgba(255, 225, 122, 0.95)); }
@keyframes story-ru-to { 0% { transform: scale(0.3); opacity: 0; filter: brightness(4) drop-shadow(0 0 28px rgba(255, 225, 122, 0.95)); } 50% { transform: scale(1.25); opacity: 1; } 100% { transform: scale(1.1); opacity: 1; filter: brightness(1) drop-shadow(0 0 28px rgba(255, 225, 122, 0.95)); } }
.story-rankup__flash { position: absolute; inset: -40%; border-radius: 50%; background: radial-gradient(circle, #fff 0%, rgba(255, 240, 200, 0.8) 30%, rgba(255, 225, 122, 0) 70%); opacity: 0; animation: story-ru-flash 0.6s 0.95s ease-out forwards; pointer-events: none; }
@keyframes story-ru-flash { 0% { opacity: 0; transform: scale(0.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.6); } }
.story-rankup__txt { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; color: #fff; opacity: 0; animation: story-ru-txt 0.6s 1.3s ease-out forwards; text-shadow: 0 2px 6px #000; }
.story-rankup__txt small { font-size: 11px; letter-spacing: 4px; color: #ffe17a; }
.story-rankup__txt b { font-size: 20px; font-weight: 900; }
.story-rankup__txt b span { color: #ffe17a; margin: 0 6px; }
@keyframes story-ru-txt { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.story-rankup__skip { position: absolute; bottom: max(24px, var(--safe-b)); font-size: 11px; opacity: 0.6; }
:root[data-reduce-fx] .story-rankup__rays, :root[data-reduce-fx] .story-world__hero { animation: none; }

/* ---------- 越えた瞬間のポップアップ (= 相手の絵・一言・絆の報酬。 押すまで止める) ---------- */
.story-bond { position: fixed; inset: 0; z-index: var(--z-modal-top); display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4, 3, 10, 0.72); backdrop-filter: blur(2px); opacity: 0; transition: opacity 0.3s ease; cursor: pointer; }
.story-bond.is-in { opacity: 1; }
.story-bond.is-out { opacity: 0; }
.story-bond__card { position: relative; width: 100%; max-width: 380px; padding: 16px 16px 14px; border-radius: 16px; border: 2px solid #bb86fc; background: rgba(12, 8, 24, 0.96); box-shadow: 0 0 36px rgba(187, 134, 252, 0.55); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; transform: scale(0.9); transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.2, 1.2); }
.story-bond.is-in .story-bond__card { transform: scale(1); }
.story-bond__kicker { font-size: 11px; letter-spacing: 4px; color: #bb86fc; font-weight: 900; }
.story-bond__face { width: 192px; height: 192px; image-rendering: pixelated; filter: drop-shadow(0 0 22px rgba(187, 134, 252, 0.9)); animation: story-bond-face 0.6s cubic-bezier(0.2, 0.9, 0.2, 1.3) both; }
@keyframes story-bond-face { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.story-bond__name { font-size: 18px; font-weight: 900; color: #fff; }
.story-bond__line { margin: 0; font-size: 14px; line-height: 1.6; color: #e9ddff; }
.story-bond__rw { width: 100%; margin-top: 4px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 225, 122, 0.08); border: 1px solid rgba(255, 225, 122, 0.4); }
.story-bond__rw small { display: block; font-size: 10px; letter-spacing: 3px; color: #ffe17a; margin-bottom: 4px; }
.story-bond__rw ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; font-size: 13px; text-align: left; }
.story-bond__rw li b { color: #9ef0b0; margin-right: 4px; }
.story-bond__unlock { grid-column: 1 / -1; color: #d9c6ff; font-size: 12px; text-align: center; }
.story-bond__tap { margin-top: 6px; font-size: 12px; color: #ffe17a; animation: story-tap-blink 1.2s ease-in-out infinite; }
@keyframes story-tap-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
:root[data-reduce-fx] .story-bond__face, :root[data-reduce-fx] .story-bond__tap { animation: none; }

/* ---------- SPEC-177: ストーリーを終えたら「ここからが本番」 ---------- */
.post-story { display: block; padding: 0; overflow-x: hidden; overflow-y: auto; background: #04030a; text-align: left; }
.post-story::after { display: none; }
.post-story .story-scene__bg { position: fixed; }
.post-story__body { position: relative; max-width: 520px; margin: 0 auto; padding: max(22px, var(--safe-t)) 16px max(24px, var(--safe-b)); display: flex; flex-direction: column; gap: 12px; }
.post-story__kicker { margin: 0; font-size: 11px; letter-spacing: 4px; color: #3aa0e8; text-align: center; animation: post-in 0.5s ease both; }
.post-story__title { margin: 0; font-size: 30px; line-height: 1.2; text-align: center; letter-spacing: 2px; background: linear-gradient(180deg, #fff 0%, #ffd36b 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 14px rgba(255, 196, 80, 0.45)); animation: post-in 0.6s 0.1s ease both; }
.post-story__mine { display: flex; align-items: flex-end; gap: 10px; animation: post-in 0.6s 0.2s ease both; }
.post-story__face { width: 72px; height: 96px; flex: none; image-rendering: pixelated; filter: drop-shadow(0 0 10px rgba(58, 160, 232, 0.5)); }
.post-story__say { margin: 0 0 6px; flex: 1; padding: 10px 12px; border-radius: 12px; background: rgba(8, 6, 18, 0.92); border: 1.5px solid rgba(58, 160, 232, 0.6); font-size: 13px; line-height: 1.6; }
.post-story__head { margin: 6px 0 0; font-size: 13px; font-weight: 700; color: #cfd8ff; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.post-story__mode { font-size: 18px; letter-spacing: 3px; color: #ffd36b; }
.post-story__bosses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.post-story__boss { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 8px; border-radius: 12px; overflow: hidden; background: radial-gradient(ellipse at 50% 35%, rgba(255, 70, 70, 0.32) 0%, rgba(30, 8, 20, 0.9) 70%); border: 1.5px solid rgba(255, 110, 110, 0.55); box-shadow: 0 0 18px rgba(255, 70, 70, 0.25); animation: post-boss-in 0.55s calc(0.35s + var(--i) * 0.14s) cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
.post-story__boss-img { width: 96px; height: 96px; max-width: 100%; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.7)); }
.post-story__boss-name { font-size: 12px; font-weight: 700; text-align: center; line-height: 1.3; }
.post-story__boss-stage { font-size: 10px; opacity: 0.7; text-align: center; }
.post-story__opens { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.post-story__opens li { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); border-left: 3px solid #3aa0e8; }
.post-story__opens b { font-size: 14px; }
.post-story__opens span { font-size: 12px; opacity: 0.8; line-height: 1.5; }
.post-story__loop { position: relative; list-style: none; margin: 0 auto; padding: 0; width: min(100%, 280px); aspect-ratio: 1.25; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 24px 30px; }
.post-story__loop::before { content: ""; position: absolute; inset: 22%; border-radius: 50%; border: 2px dashed rgba(255, 211, 107, 0.55); animation: post-spin 14s linear infinite; }
.post-story__step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 16px; background: rgba(8, 6, 18, 0.92); border: 1.5px solid rgba(255, 211, 107, 0.5); font-size: 12px; font-weight: 700; text-align: center; padding: 6px; animation: post-in 0.5s calc(0.9s + var(--i) * 0.12s) ease both; }
.post-story__step img { width: 44px; height: 44px; object-fit: contain; image-rendering: pixelated; }
/* 時計回り (= 左上 → 右上 → 右下 → 左下)。 矢印は次のマスの側 */
.post-story__step--run { grid-area: 1 / 1; }
.post-story__step--gum { grid-area: 1 / 2; }
.post-story__step--tree { grid-area: 2 / 2; }
.post-story__step--far { grid-area: 2 / 1; }
.post-story__step::after { position: absolute; font-size: 18px; color: #ffd36b; text-shadow: 0 0 6px rgba(0, 0, 0, 0.9); }
.post-story__step--run::after { content: "▶"; right: -22px; top: 50%; transform: translateY(-50%); }
.post-story__step--gum::after { content: "▼"; bottom: -24px; left: 50%; transform: translateX(-50%); }
.post-story__step--tree::after { content: "◀"; left: -22px; top: 50%; transform: translateY(-50%); }
.post-story__step--far::after { content: "▲"; top: -24px; left: 50%; transform: translateX(-50%); }
/* ボタンは 1 つだけなので、 スクロールしなくても見えるよう下に貼り付ける */
.post-story__go { position: sticky; bottom: max(12px, var(--safe-b)); z-index: 2; margin-top: 8px; padding: 14px 18px; font-size: 17px; box-shadow: 0 -10px 24px rgba(4, 3, 10, 0.9); animation: post-in 0.5s 1.4s ease both, post-pulse 1.8s 2s ease-in-out infinite; }
@keyframes post-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes post-boss-in { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes post-spin { to { transform: rotate(360deg); } }
@keyframes post-pulse { 0%, 100% { box-shadow: 0 -10px 24px rgba(4, 3, 10, 0.9), 0 0 0 0 rgba(255, 211, 107, 0); } 50% { box-shadow: 0 -10px 24px rgba(4, 3, 10, 0.9), 0 0 0 6px rgba(255, 211, 107, 0.35); } }
:root[data-reduce-fx] .post-story *, :root[data-reduce-fx] .post-story *::before { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .post-story *, .post-story *::before { animation: none !important; } }

/* ---------- SPEC-178: ホーム画面に追加の案内 (= マインちゃんの帯 (325) より上) ---------- */
.install-sheet { position: fixed; inset: 0; z-index: 340; display: flex; align-items: flex-end; justify-content: center; padding: 0 12px max(16px, var(--safe-b)); }
.install-sheet.hidden { display: none; }
.install-sheet__dim { position: absolute; inset: 0; background: rgba(4, 3, 10, 0.72); backdrop-filter: blur(2px); }
.install-sheet__card { position: relative; width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 14px; border-radius: 16px; border: 1.5px solid rgba(58, 160, 232, 0.6); background: rgba(10, 8, 20, 0.96); box-shadow: 0 0 30px rgba(58, 160, 232, 0.35); text-align: left; animation: install-up 0.35s cubic-bezier(0.2, 0.9, 0.2, 1.1) both; }
.install-sheet__top { display: flex; align-items: flex-end; gap: 10px; }
.install-sheet__face { width: 60px; height: 80px; flex: none; image-rendering: pixelated; }
.install-sheet__title { margin: 0 0 4px; font-size: 16px; }
.install-sheet__say { margin: 0; font-size: 13px; line-height: 1.6; opacity: 0.9; }
.install-sheet__steps { margin: 0; padding: 8px 12px 8px 30px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); font-size: 13px; line-height: 1.8; }
.install-sheet__add { padding: 12px; font-size: 15px; }
.install-sheet__later { padding: 8px; font-size: 13px; }
@keyframes install-up { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
:root[data-reduce-fx] .install-sheet__card { animation: none; }

/* ---------- SPEC-180: ストーリーの区切りで「次」 (= あと◯ と、 次のランドで開くもの) ---------- */
.story-next { display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left; }
.story-next.hidden { display: none; }
.story-next__bar { position: relative; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.story-next__fill { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); border-radius: inherit; background: linear-gradient(90deg, #3aa0e8, #ffd36b); }
.story-next__row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12px; opacity: 0.9; }
.story-next__row b { font-size: 13px; color: #ffd36b; }
.story-next__card { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--land, #3aa0e8) 14%, rgba(8, 6, 18, 0.9)); border: 1.5px solid var(--land, #3aa0e8); box-shadow: 0 0 16px color-mix(in srgb, var(--land, #3aa0e8) 35%, transparent); animation: story-next-in 0.5s 0.6s ease both; }
.story-next__kicker { font-size: 10px; letter-spacing: 3px; color: var(--land, #3aa0e8); font-weight: 700; }
.story-next__main { display: flex; align-items: center; gap: 10px; }
.story-next__main img { width: 56px; height: 56px; flex: none; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7)); }
.story-next__main div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.story-next__main b { font-size: 15px; }
.story-next__main span { font-size: 12px; opacity: 0.85; line-height: 1.5; }
.story-next__hint { margin: 0; font-size: 12px; line-height: 1.6; opacity: 0.8; font-style: italic; }
@keyframes story-next-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
:root[data-reduce-fx] .story-next__card { animation: none; }
