/* 夜祓い — 画面（スマホの縦が主。PC は同じ画面を中央に縦長で出し、左右に記録） */
:root {
  --ink: #0b0a14; --night: #151032; --night2: #241a4a; --panel: rgba(22, 16, 44, 0.9); --panel2: rgba(34, 25, 66, 0.92);
  --line: rgba(255, 200, 140, 0.26); --line2: rgba(255, 200, 140, 0.5);
  --text: #fff4e6; --dim: #c6b6d8; --dim2: #8f80a8;
  --paper: #fbf1dc; --paper2: #ecd9b3; --inkt: #2b1b12; --inkd: #6a4e33;
  --lantern: #ffa040; --lantern2: #e8642a; --verm: #d8432f; --gold: #ffcf5a; --fox: #6fd8ff; --green: #6fe39a; --red: #ff4d6d; --evo: #ffd34a;
  --font: 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', 'Yu Gothic UI', 'Meiryo', sans-serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  --hud-h: calc(84px + var(--safe-t));
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--text); font-family: var(--font); font-weight: 500; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; }
img { -webkit-user-drag: none; }
.ico { width: 1.2em; height: 1.2em; flex: none; display: block; }
#stage { position: fixed; inset: 0; overflow: hidden; background: var(--ink); }
#game { position: absolute; inset: 0; }
#game canvas { display: block; }
#touch { position: absolute; inset: 0; z-index: 2; }
#ui { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.vignette { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(5, 2, 12, 0.75) 100%); }
.side { display: none; }
[hidden] { display: none !important; }
#fatal { position: fixed; inset: 0; z-index: 99; background: #200; color: #fff; padding: 20px; overflow: auto; }

/* ジョイスティック */
.stick { position: fixed; width: 112px; height: 112px; margin: -56px 0 0 -56px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.06); opacity: 0; transition: opacity 0.15s; pointer-events: none; }
.stick.is-on { opacity: 1; }
.stick__knob { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, 0.55); transform: translate(-50%, -50%); }

/* ===================== ボタン ===================== */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; min-width: 0; padding: 0 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--panel2); color: var(--text); font-weight: 800; font-size: 16px; line-height: 1.15; cursor: pointer; transition: transform 0.08s, filter 0.15s, opacity 0.2s; white-space: nowrap; }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn--main { background: linear-gradient(180deg, #ffbe5c 0%, var(--lantern) 45%, var(--lantern2) 100%); border-color: #ffd9a0; color: #2a1404; box-shadow: 0 4px 0 #9c3f12, 0 0 22px rgba(255, 150, 60, 0.35); }
.btn--main:active:not(:disabled) { box-shadow: 0 2px 0 #9c3f12; transform: translateY(2px); }
.btn--big { min-height: 62px; font-size: 21px; letter-spacing: 0.08em; }
.btn--sub { background: rgba(20, 14, 40, 0.88); }
.btn--icon { flex-direction: column; gap: 2px; font-size: 13px; min-height: 56px; }
.btn--icon .ico { width: 22px; height: 22px; color: var(--lantern); }
.btn--back { flex: 0 1 auto !important; min-width: 96px; }
.btn.is-hot { border-color: var(--gold); color: var(--gold); }
.btn .dot { position: absolute; top: 6px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); }
.btn.is-shake, .is-shake { animation: shake 0.32s; }
.btn.is-armed { border-color: var(--red); color: #ffd0d8; background: rgba(90, 10, 30, 0.9); }
.row { display: flex; gap: 8px; width: 100%; }
.row > .btn { flex: 1 1 0; }
.row--3 > .btn { flex: 1 1 0; }
.dim { color: var(--dim); }
.small { font-size: 12px; }
.gold { color: var(--gold); }
.lead { margin: 2px 0 10px; font-size: 13px; color: var(--dim); line-height: 1.5; }
.bar { position: relative; height: 10px; border-radius: 5px; background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.12); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 5px; background: linear-gradient(90deg, #ff8a3d, var(--gold)); transition: width 0.6s cubic-bezier(0.3, 0.8, 0.3, 1); }
.bar--rank i { background: linear-gradient(90deg, #8f5cff, var(--fox)); }
.stamp { display: inline-block; flex: none; padding: 2px 6px; border: 2px solid var(--verm); border-radius: 5px; background: rgba(255, 240, 220, 0.95); color: var(--verm); font-size: 12px; font-weight: 900; font-style: normal; line-height: 1.2; transform: rotate(-6deg); }
.stamp--s { font-size: 10px; padding: 1px 4px; }
.coin { display: flex; align-items: center; gap: 4px; padding: 4px 10px 4px 6px; border-radius: 16px; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 207, 90, 0.4); color: var(--gold); font-weight: 900; font-size: 16px; font-variant-numeric: tabular-nums; }
.coin img { width: 22px; height: 22px; object-fit: contain; }
.coin.is-spend { animation: spend 0.45s; }

/* ===================== 画面の共通形 ===================== */
.screens { position: absolute; inset: 0; z-index: 20; pointer-events: auto; }
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; background: radial-gradient(120% 70% at 50% 0%, var(--night2) 0%, var(--night) 45%, var(--ink) 100%); animation: scrIn 0.22s ease-out; }
.scr::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.07; background-image: radial-gradient(circle at 25% 25%, #fff 1px, transparent 1.5px), radial-gradient(circle at 75% 60%, #fff 1px, transparent 1.5px); background-size: 46px 46px, 70px 70px; }
.scr__head { position: relative; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(10px + var(--safe-t)) calc(14px + var(--safe-r)) 8px calc(14px + var(--safe-l)); }
.scr__title { position: relative; font-size: 22px; font-weight: 900; letter-spacing: 0.06em; padding-left: 14px; white-space: nowrap; }
.scr__title::before { content: ''; position: absolute; left: 0; top: 50%; width: 7px; height: 22px; margin-top: -11px; border-radius: 3px; background: linear-gradient(180deg, #ffd08a, var(--lantern2)); box-shadow: 0 0 10px var(--lantern); }
.scr__body { position: relative; flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 4px calc(14px + var(--safe-r)) 14px calc(14px + var(--safe-l)); touch-action: pan-y; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.scr__foot { position: relative; flex: none; display: flex; flex-direction: column; gap: 8px; padding: 10px calc(14px + var(--safe-r)) calc(12px + var(--safe-b)) calc(14px + var(--safe-l)); background: linear-gradient(180deg, rgba(11, 10, 20, 0.6), rgba(11, 10, 20, 0.95)); border-top: 1px solid var(--line); }
.sec { margin: 0 0 12px; }
.sec__h { display: flex; align-items: baseline; gap: 6px; margin: 4px 0 6px; font-size: 14px; font-weight: 900; color: var(--lantern); letter-spacing: 0.05em; }
.sec__h small { color: var(--dim); font-weight: 700; }

/* ===================== タイトル ===================== */
.scr--title { background: var(--ink); }
.scr--title::before { display: none; }
.title__art { position: absolute; inset: 0; overflow: hidden; }
.title__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }
.title__art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 10, 20, 0.55) 0%, rgba(11, 10, 20, 0) 30%, rgba(11, 10, 20, 0) 50%, rgba(11, 10, 20, 0.85) 78%, var(--ink) 100%); }
.title__fallback { position: absolute; inset: 0; background: radial-gradient(80% 50% at 50% 38%, #3b2468 0%, #1a1238 55%, var(--ink) 100%); }
.title__fallback::before { content: ''; position: absolute; left: 50%; top: 30%; width: 220px; height: 170px; margin-left: -110px; border-top: 22px solid #b8321f; border-radius: 30px 30px 0 0 / 14px 14px 0 0; box-shadow: 0 0 40px rgba(216, 67, 47, 0.3); }
.title__fallback::after { content: ''; position: absolute; left: 50%; top: calc(30% + 40px); width: 170px; height: 150px; margin-left: -85px; border-left: 18px solid #a52b1a; border-right: 18px solid #a52b1a; border-top: 12px solid #a52b1a; }
.title__fallback i { position: absolute; width: 26px; height: 34px; border-radius: 45%; background: radial-gradient(circle at 50% 45%, #ffe0a0, var(--lantern) 55%, #a8361a 100%); box-shadow: 0 0 26px 8px rgba(255, 150, 60, 0.45); animation: sway 3s ease-in-out infinite; }
.title__fallback i:nth-child(1) { left: 12%; top: 52%; } .title__fallback i:nth-child(2) { left: 26%; top: 60%; animation-delay: -1s; } .title__fallback i:nth-child(3) { right: 26%; top: 60%; animation-delay: -2s; } .title__fallback i:nth-child(4) { right: 12%; top: 52%; animation-delay: -0.5s; } .title__fallback i:nth-child(5) { left: 50%; top: 70%; margin-left: -13px; animation-delay: -1.5s; }
.title__logo { position: relative; margin-top: calc(6vh + var(--safe-t)); text-align: center; }
.title__jp { font-size: clamp(54px, 17vw, 84px); font-weight: 900; letter-spacing: 0.1em; line-height: 1.05; color: #fff8ee; text-shadow: 0 0 18px rgba(255, 160, 64, 0.7), 0 0 44px rgba(255, 100, 40, 0.45), 0 4px 0 #6b1f10; }
.title__en { margin-top: 12px; font-size: 13px; font-weight: 800; letter-spacing: 0.6em; padding-left: 0.6em; color: var(--lantern); }
.title__sub { margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--dim); text-shadow: 0 1px 3px #000; }
.title__plate { position: relative; margin: auto calc(14px + var(--safe-r)) 10px calc(14px + var(--safe-l)); display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: rgba(11, 10, 20, 0.72); border: 1px solid var(--line); }
.rankb { flex: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 8px; }
.rankb__lv { font-size: 13px; font-weight: 800; color: var(--fox); }
.rankb__lv b { font-size: 20px; }
.rankb__t { font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rankb .bar { grid-column: 1 / -1; }
.scr--title .scr__foot { background: none; border: 0; padding-top: 4px; }

/* ===================== 夜の地図 ===================== */
.nextgoal { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 2px 0 12px; padding: 8px 10px; border-radius: 10px; background: linear-gradient(180deg, var(--paper), var(--paper2)); color: var(--inkt); font-size: 13px; font-weight: 700; line-height: 1.35; box-shadow: 0 3px 0 #a88a5c; }
.nextgoal__h { flex: none; padding: 1px 7px; border-radius: 4px; background: var(--verm); color: #fff; font-size: 11px; font-weight: 900; }
.nextgoal__t { flex: 1 1 200px; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.nextgoal__t small { color: var(--inkd); font-weight: 800; margin-left: 4px; }
.nextgoal__ic { width: 24px; height: 24px; object-fit: contain; border-radius: 5px; background: rgba(0, 0, 0, 0.12); }
.nights { position: relative; display: flex; flex-direction: column; gap: 12px; padding-left: 4px; }
.nights::before { content: ''; position: absolute; left: 17px; top: 20px; bottom: 20px; border-left: 3px dashed rgba(255, 160, 64, 0.35); }
.night { position: relative; display: grid; grid-template-columns: 28px 76px minmax(0, 1fr); align-items: center; gap: 10px; width: 100%; min-height: 96px; padding: 10px 10px 10px 0; border: 0; background: none; text-align: left; cursor: pointer; }
.night__no { z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--lantern); color: #2a1404; font-weight: 900; font-size: 14px; box-shadow: 0 0 12px rgba(255, 150, 60, 0.6); }
.night__pic { width: 76px; height: 76px; border-radius: 12px; overflow: hidden; background: #1e1640; border: 2px solid var(--line); display: grid; place-items: center; }
.night__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.night__lock .ico { width: 30px; height: 30px; color: var(--dim2); }
.night__b { min-width: 0; padding: 8px 10px; border-radius: 12px; background: var(--panel); border: 2px solid var(--line); }
.night__name { font-size: 16px; font-weight: 900; margin-bottom: 4px; line-height: 1.3; }
.night__stars { display: flex; flex-direction: column; gap: 1px; }
.nstar { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--dim); line-height: 1.35; }
.nstar i { flex: none; color: var(--dim2); }
.nstar i .ico { width: 15px; height: 15px; }
.nstar.on { color: var(--text); }
.nstar.on i { color: var(--gold); filter: drop-shadow(0 0 4px rgba(255, 207, 90, 0.8)); }
.night__best { margin-top: 3px; font-size: 12px; color: var(--fox); font-weight: 700; }
.night.is-sel .night__b { border-color: var(--lantern); box-shadow: 0 0 0 1px var(--lantern), 0 0 22px rgba(255, 150, 60, 0.35); }
.night.is-sel .night__pic { border-color: var(--lantern); }
.night.is-locked .night__no { background: #4a3f63; color: var(--dim); box-shadow: none; }
.night.is-locked .night__b { background: rgba(16, 12, 30, 0.85); border-style: dashed; }
.night.is-locked .night__name { color: var(--dim); }
.night__hint { display: flex; align-items: flex-start; gap: 5px; font-size: 13px; color: var(--gold); font-weight: 700; line-height: 1.4; }
.night__hint .ico { width: 15px; height: 15px; margin-top: 2px; }

/* ===================== 祓い手 ===================== */
.chars__night { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 13px; font-weight: 800; color: var(--dim); }
.chars__night .ico { color: var(--lantern); }
.charlist { display: flex; flex-direction: column; gap: 10px; }
.char { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: center; width: 100%; padding: 10px; border-radius: 14px; border: 2px solid var(--line); background: var(--panel); text-align: left; cursor: pointer; }
.char__pic { position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #3c2b6e, #171030); }
.char__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.char__lock { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10, 6, 20, 0.55); }
.char__lock .ico { width: 30px; height: 30px; color: var(--dim); }
.char__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; margin-bottom: 4px; }
.char__name { font-size: 20px; font-weight: 900; }
.char__head small { font-size: 12px; color: var(--dim); font-weight: 700; }
.char__w { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); margin-bottom: 3px; }
.char__w img { width: 26px; height: 26px; object-fit: contain; border-radius: 6px; background: rgba(0, 0, 0, 0.35); flex: none; }
.char__w b { color: var(--text); }
.char__trait { font-size: 13px; color: var(--gold); font-weight: 700; line-height: 1.4; }
.char__hint { display: flex; gap: 5px; align-items: flex-start; font-size: 13px; color: var(--gold); font-weight: 700; line-height: 1.4; }
.char__hint .ico { width: 15px; height: 15px; margin-top: 2px; }
.char.is-sel { border-color: var(--lantern); box-shadow: 0 0 0 1px var(--lantern), 0 0 22px rgba(255, 150, 60, 0.35); }
.char.is-locked { background: rgba(16, 12, 30, 0.85); border-style: dashed; }
.char.is-locked .char__pic img { filter: brightness(0) opacity(0.7); }

/* ===================== 旅の結果 ===================== */
.scr--result.is-won { background: radial-gradient(120% 70% at 50% 0%, #6b3a3a 0%, #2d1a3e 45%, var(--ink) 100%); }
.scr--result.is-won .scr__title { color: #ffe3b0; text-shadow: 0 0 16px rgba(255, 180, 80, 0.8); }
.res__night { font-size: 12px; color: var(--dim); font-weight: 700; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.rrow--gold { grid-column: 1 / -1; }
.rrow { display: flex; flex-direction: column; align-items: stretch; gap: 0; min-width: 0; padding: 6px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); opacity: 0; transform: translateY(8px); transition: opacity 0.25s, transform 0.25s; }
.rrow.is-in { opacity: 1; transform: none; }
.rrow__l { min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--dim); }
.rrow__l img { width: 22px; height: 22px; object-fit: contain; }
.rrow__vv { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.rrow--gold { flex-direction: row; align-items: center; justify-content: space-between; }
.rrow__v { font-size: 24px; line-height: 1.3; font-weight: 900; font-variant-numeric: tabular-nums; }
.rrow--gold .rrow__v { color: var(--gold); }
.rrow .stamp { opacity: 0; }
.rrow.is-rec { border-color: var(--gold); box-shadow: 0 0 18px rgba(255, 207, 90, 0.3); }
.rrow.is-rec .stamp { opacity: 1; animation: stampIn 0.35s cubic-bezier(0.2, 1.6, 0.4, 1); }
.scr--result .sec { opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.3s; }
.scr--result .sec.is-in { opacity: 1; transform: none; }
.rstar { display: flex; align-items: center; gap: 8px; min-height: 30px; font-size: 13px; color: var(--dim); }
.rstar i { color: var(--dim2); }
.rstar i .ico { width: 22px; height: 22px; }
.rstar span { flex: 1; min-width: 0; }
.rstar.on { color: var(--text); }
.rstar.on i { color: var(--gold); }
.rstar .stamp { opacity: 0; }
.rstar.is-pop i { animation: starPop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1); filter: drop-shadow(0 0 8px rgba(255, 207, 90, 0.9)); }
.rstar.is-pop .stamp, .is-done .rstar.is-new .stamp { opacity: 1; }
.rankrow { display: flex; align-items: center; gap: 8px; }
.rankrow__lv { flex: none; font-size: 13px; color: var(--fox); font-weight: 800; }
.rankrow__lv b { font-size: 20px; }
.rankrow .bar { flex: 1; }
.rankrow__xp { flex: none; min-width: 3em; text-align: right; font-size: 13px; font-weight: 800; color: var(--fox); }
.rankup { min-height: 0; font-size: 15px; font-weight: 900; color: var(--gold); opacity: 0; }
.res__rank.is-up .rankup { opacity: 1; margin-top: 6px; animation: pop 0.5s; }
.is-done .res__rank .rankup:not(:empty) { opacity: 1; margin-top: 6px; }
.unlock { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 6px; border-radius: 12px; background: linear-gradient(90deg, rgba(255, 207, 90, 0.22), rgba(255, 207, 90, 0.05)); border: 1px solid var(--gold); }
.unlock img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: rgba(0, 0, 0, 0.35); flex: none; }
.unlock div { min-width: 0; display: flex; flex-direction: column; }
.unlock small { font-size: 11px; color: var(--gold); font-weight: 800; }
.unlock b { font-size: 16px; }
.achrow { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; padding: 6px 4px; font-size: 14px; }
.achrow .ico { color: var(--green); width: 18px; height: 18px; }
.achrow small { color: var(--dim); font-size: 12px; flex-basis: 100%; padding-left: 26px; }
.goalrow { padding: 8px 10px; margin-bottom: 6px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.goalrow.is-done { border-color: rgba(111, 227, 154, 0.5); }
.goalrow__h { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 2px 8px; font-size: 14px; }
.goalrow__rw { display: flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 800; color: var(--gold); }
.goalrow__rw img { width: 20px; height: 20px; object-fit: contain; }
.goalrow__d { font-size: 12px; color: var(--dim); margin: 2px 0 4px; }
.goalrow__p { display: flex; align-items: center; gap: 8px; }
.goalrow__p .bar { flex: 1; height: 8px; }
.goalrow__p small { flex: none; font-size: 12px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }

/* ===================== 祠 ===================== */
.ups { display: flex; flex-direction: column; gap: 8px; }
.up { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 14px; background: var(--panel); border: 2px solid var(--line); }
.up__ic { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: rgba(0, 0, 0, 0.35); }
.up__ic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.up__b { min-width: 0; }
.up__name { font-size: 16px; font-weight: 900; line-height: 1.3; }
.up__line { font-size: 14px; font-weight: 700; color: var(--dim); line-height: 1.4; }
.up__line s { text-decoration: none; }
.up__line b { color: var(--gold); font-weight: 900; }
.up__dots { display: flex; align-items: center; gap: 4px; margin-top: 3px; }
.up__dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.25); }
.up__dots i.on { background: var(--gold); border-color: #fff2c0; box-shadow: 0 0 6px rgba(255, 207, 90, 0.8); }
.up__dots small { margin-left: 4px; font-size: 11px; color: var(--dim); font-weight: 800; }
.up__desc { margin-top: 2px; font-size: 12px; color: var(--dim2); line-height: 1.35; }
.up__buy { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-width: 84px; min-height: 56px; padding: 4px 8px; border-radius: 12px; border: 2px solid #ffe08a; background: linear-gradient(180deg, #ffe08a, #f2a93b); color: #3a2205; font-weight: 900; cursor: pointer; }
.up__buy img { width: 18px; height: 18px; object-fit: contain; }
.up__buy b { font-size: 16px; line-height: 1.1; }
.up__buy { flex-direction: row; flex-wrap: wrap; column-gap: 3px; }
.up__buy small { flex-basis: 100%; text-align: center; font-size: 11px; font-weight: 800; }
.up__buy.is-short { background: rgba(30, 22, 50, 0.9); border-color: rgba(255, 207, 90, 0.35); color: var(--gold); }
.up__buy.is-short small { color: var(--dim); }
.up__buy:disabled { background: rgba(111, 227, 154, 0.12); border-color: rgba(111, 227, 154, 0.5); color: var(--green); cursor: default; }
.up.is-afford { border-color: rgba(255, 207, 90, 0.55); }
.up.is-max { border-color: rgba(111, 227, 154, 0.35); }
.up.is-bought { animation: bought 0.8s ease-out; }
.up.is-bought .up__dots i.on:last-of-type { animation: pop 0.5s; }

/* ===================== 図鑑 ===================== */
.tabs { display: flex; gap: 4px; width: 100%; }
.tab { flex: 1 1 0; min-width: 0; min-height: 48px; padding: 0 2px; border-radius: 12px; border: 2px solid var(--line); background: rgba(20, 14, 40, 0.88); font-weight: 800; font-size: 14px; cursor: pointer; white-space: nowrap; }
.tab.is-on { background: var(--lantern); border-color: #ffd9a0; color: #2a1404; }
.cx { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 10px; margin-bottom: 8px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.cx__ic { width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: rgba(0, 0, 0, 0.35); }
.cx__ic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cx__b { min-width: 0; }
.cx__name { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; font-size: 16px; font-weight: 900; }
.cx__lock { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--dim); font-weight: 800; }
.cx__lock .ico { width: 13px; height: 13px; }
.cx__desc { font-size: 13px; color: var(--dim); line-height: 1.45; }
.cx__num { display: block; color: var(--gold); font-weight: 700; font-size: 12px; }
.cx__hint { font-size: 12px; color: var(--gold); font-weight: 700; margin-top: 2px; }
.cx.is-locked .cx__ic img { filter: grayscale(1) brightness(0.6); }
.recipe { display: flex; align-items: flex-start; justify-content: center; gap: 4px; margin-top: 6px; padding: 6px; border-radius: 10px; background: rgba(0, 0, 0, 0.3); }
.recipe > i { flex: none; align-self: center; margin-top: -14px; font-style: normal; font-weight: 900; color: var(--lantern); font-size: 16px; }
.rc { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rc img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; background: rgba(255, 255, 255, 0.06); border: 2px solid rgba(255, 255, 255, 0.12); }
.rc small { font-size: 11px; font-weight: 700; color: var(--dim); text-align: center; line-height: 1.25; overflow-wrap: anywhere; }
.rc--evo img { border-color: var(--evo); box-shadow: 0 0 12px rgba(255, 211, 74, 0.5); background: rgba(255, 211, 74, 0.15); }
.rc--evo small { color: var(--evo); }
.rc.has img { border-color: var(--green); }
.recipe--s { justify-content: flex-start; }
.recipe--s .rc { flex: 0 1 76px; }
.recipe--s .rc img { width: 32px; height: 32px; border-radius: 8px; }
.recipe.is-done { outline: 1px solid var(--evo); }
.cxevo { padding: 8px; margin-bottom: 10px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.cxevo .recipe { margin-top: 0; }
.cxevo__d { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 6px 4px 2px; }
.cxevo__d b { font-size: 15px; color: var(--evo); }
.cxevo__d span { flex-basis: 100%; font-size: 13px; color: var(--dim); }
.cxevo.is-done { border-color: var(--evo); }
.cxgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.cxe { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); text-align: center; }
.cxe__ic { width: 58px; height: 58px; }
.cxe__ic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cxe__name { font-size: 14px; font-weight: 900; }
.cxe small { font-size: 10px; color: var(--dim); }
.cxe__tag { display: inline-block; margin-right: 4px; vertical-align: 2px; padding: 0 5px; border-radius: 4px; background: var(--verm); color: #fff; font-size: 10px; font-weight: 900; font-style: normal; }
.cxe.is-unseen .cxe__ic img { filter: brightness(0) opacity(0.6); }
.cxe.is-unseen .cxe__name { color: var(--dim2); }

/* ===================== 設定 ===================== */
.set { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 2px 4px; }
.set__l { flex: none; width: 6.5em; font-size: 14px; font-weight: 800; }
.set__v { flex: none; width: 2.4em; text-align: right; font-variant-numeric: tabular-nums; color: var(--gold); }
.set input[type=range] { flex: 1; min-width: 0; height: 48px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; touch-action: pan-x; }
.set input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--lantern2), var(--gold)); }
.set input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px; border-radius: 50%; background: #fff3dd; border: 3px solid var(--lantern); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); }
.set input[type=range]::-moz-range-track { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--lantern2), var(--gold)); }
.set input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff3dd; border: 3px solid var(--lantern); }
.seg { flex: 1; min-width: 0; display: flex; gap: 4px; }
.seg__b { flex: 1 1 0; min-width: 0; min-height: 48px; border-radius: 12px; border: 2px solid var(--line); background: rgba(20, 14, 40, 0.88); font-weight: 800; font-size: 14px; cursor: pointer; }
.seg__b.is-on { background: var(--lantern); border-color: #ffd9a0; color: #2a1404; }
.set--stack { flex-wrap: wrap; gap: 4px 10px; }
.set--stack .seg { flex-basis: 100%; }
.rrow__bd { display: flex; flex-wrap: wrap; gap: 0 10px; flex-basis: 100%; font-size: 11px; color: var(--dim); font-weight: 700; }
.rrow__bd b { color: var(--gold); }
.rrow--gold { flex-wrap: wrap; }
.char__prog { display: block; color: var(--fox); font-size: 12px; margin-top: 1px; }
.notice { position: absolute; left: 50%; top: calc(14px + var(--safe-t)); z-index: 40; max-width: calc(100% - 32px); transform: translateX(-50%); padding: 10px 16px; border-radius: 12px; background: rgba(20, 14, 40, 0.96); border: 1px solid var(--gold); color: var(--text); font-size: 14px; font-weight: 800; line-height: 1.4; text-align: center; pointer-events: none; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6); }
.notice.is-on { animation: annIn 0.3s ease-out; }
.card__lines span b:only-child { color: var(--inkt); }
.evo-note { font-style: normal; margin-left: 3px; color: #2f7e5a; font-size: 11px; font-weight: 900; }
.evo-note.is-ready { color: #fff; background: #b07a14; padding: 0 5px; border-radius: 4px; }
.depthb { flex: none; padding: 1px 6px; border-radius: 6px; background: rgba(150, 40, 60, 0.85); color: #ffe0e6; font-size: 11px; font-weight: 900; line-height: 16px; text-shadow: none; }
.arrows { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.arw { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform; }
.arw__tip { position: absolute; left: -24px; top: -24px; width: 48px; height: 48px; }
.arw__tip::after { content: ''; position: absolute; right: -10px; top: 50%; margin-top: -9px; border-left: 16px solid var(--c, #ff9a3c); border-top: 9px solid transparent; border-bottom: 9px solid transparent; filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.8)); }
.arw__ic { position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: #1a0d18; border: 3px solid var(--c, #ff9a3c); box-shadow: 0 0 10px var(--c, #ff9a3c); }
.arw__ic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.arw--boss { --c: #ff3050; }
.arw--boss .arw__ic { animation: arwPulse 0.7s ease-in-out infinite alternate; }
.arw--elite { --c: #ff9a3c; }
.arw--chest { --c: #ffd34a; }
.arw--chest .arw__ic { background: #3a2a08; }
.arw--chest .arw__ic img { object-fit: contain; }
@keyframes arwPulse { from { box-shadow: 0 0 6px var(--c); } to { box-shadow: 0 0 20px 4px var(--c); } }
.depth { margin: -4px 0 4px 38px; padding: 10px 12px; border-radius: 12px; background: rgba(60, 20, 40, 0.75); border: 2px solid rgba(255, 90, 110, 0.55); }
.depth__h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 900; color: #ffb3c0; }
.depth__h small { font-size: 11px; color: var(--dim); font-weight: 700; }
.depth__row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.depth__b { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; border: 2px solid var(--line2); background: rgba(20, 14, 40, 0.9); cursor: pointer; }
.depth__b .ico { width: 24px; height: 24px; }
.depth__b:disabled { opacity: 0.35; cursor: default; }
.depth__v { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.2; }
.depth__v b { line-height: 1.45; font-size: 30px; font-weight: 900; color: #fff; text-shadow: 0 0 12px rgba(255, 80, 110, 0.8); }
.depth__v span { line-height: 1.5; font-size: 12px; color: var(--dim); font-weight: 700; }
.depth__dots { display: flex; justify-content: center; gap: 5px; }
.depth__dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.25); }
.depth__dots i.on { background: #c8435c; border-color: #ff9aac; }
.depth__dots i.all { background: var(--gold); border-color: #fff2c0; }
.depth__dots i.cur { outline: 2px solid #fff; outline-offset: 1px; }
.depth__info { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px 6px; margin-top: 6px; font-size: 12px; color: var(--dim); font-weight: 700; }
.depth__info i { color: var(--dim2); } .depth__info i.on { color: var(--gold); }
.depth__info .ico { width: 15px; height: 15px; }
.depth__hint { display: flex; gap: 5px; align-items: flex-start; justify-content: center; margin-top: 4px; font-size: 12px; color: var(--gold); font-weight: 700; }
.depth__hint .ico { width: 14px; height: 14px; margin-top: 1px; }
.depthup { display: flex; flex-direction: column; align-items: center; padding: 12px; border-radius: 14px; background: radial-gradient(circle at 50% 40%, rgba(255, 80, 110, 0.5), rgba(60, 10, 30, 0.9)); border: 2px solid #ff9aac; text-align: center; }
.depthup small { line-height: 1.6; font-size: 13px; font-weight: 900; color: #ffd0d8; letter-spacing: 0.1em; }
.depthup b { font-size: 34px; font-weight: 900; color: #fff; text-shadow: 0 0 16px rgba(255, 80, 110, 1), 0 3px 0 #5a0a20; line-height: 1.5; }
.depthup span { font-size: 12px; color: #ffd0d8; font-weight: 700; }
.res__depth.is-pop .depthup { animation: depthPop 0.7s cubic-bezier(0.2, 1.5, 0.4, 1); }
@keyframes depthPop { 0% { transform: scale(0.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.dmgrow { display: grid; grid-template-columns: 26px minmax(0, 5.5em) minmax(0, 1fr) 3em; align-items: center; gap: 6px; padding: 2px 0; font-size: 13px; font-weight: 700; }
.dmgrow img { width: 26px; height: 26px; object-fit: contain; border-radius: 6px; background: rgba(0, 0, 0, 0.35); }
.dmgrow__n { white-space: nowrap; overflow: hidden; }
.dmgrow b { text-align: right; color: var(--gold); font-variant-numeric: tabular-nums; }
.hurtline { margin-top: 6px; font-size: 12px; color: var(--dim); line-height: 1.5; }
.hurtline b { color: #ffb3c0; }
.unlock.is-soon { border-style: dashed; border-color: rgba(255, 207, 90, 0.5); }
.achrow--more { color: var(--dim); font-size: 12px; }
.depth__v em, .depthup em { line-height: 1.6; font-style: normal; font-size: 13px; font-weight: 900; color: #ffb3c0; letter-spacing: 0.1em; }
.depthup__hint { margin-top: 2px; font-size: 11px !important; color: var(--dim) !important; letter-spacing: 0 !important; }
.night__dl { font-size: 11px; color: #ffb3c0; font-weight: 800; margin-bottom: 1px; }
.waiting { margin-top: 6px; padding: 8px 10px; border-radius: 12px; border: 1px dashed rgba(111, 216, 255, 0.5); background: rgba(20, 40, 70, 0.4); }
.waiting__h { font-size: 12px; font-weight: 900; color: var(--fox); margin-bottom: 2px; }
.waitrow { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 13px; line-height: 1.5; }
.waitrow span { color: var(--gold); font-size: 12px; font-weight: 700; }
.howto { margin: 0; padding-left: 1.2em; font-size: 13px; line-height: 1.6; color: var(--dim); }
.howto b { color: var(--text); }

/* ===================== 旅の中: HUD ===================== */
.playlayer { position: absolute; inset: 0; pointer-events: none; }
.ui.is-menu .playlayer, .ui.is-menu .modal { display: none; }
.ui.has-modal .playlayer { visibility: hidden; }
.hud { position: absolute; left: 0; right: 0; top: 0; padding: calc(4px + var(--safe-t)) calc(8px + var(--safe-r)) 0 calc(8px + var(--safe-l)); display: flex; flex-direction: column; gap: 4px; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.hud__r1, .hud__r2 { display: flex; align-items: center; gap: 6px; margin-right: 50px; height: 22px; }
.hud__r2 { height: 20px; }
.lvb { flex: none; display: flex; align-items: baseline; justify-content: center; gap: 1px; min-width: 46px; height: 22px; padding: 0 6px; border-radius: 11px; background: linear-gradient(180deg, #a8ecff, #3aa8ff); color: #05233a; font-size: 10px; font-weight: 900; line-height: 22px; text-shadow: none; }
.lvb b { font-size: 15px; }
.xpbar { flex: 1 1 auto; min-width: 40px; height: 12px; border-radius: 6px; background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(111, 216, 255, 0.45); overflow: hidden; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, #3aa8ff, #b8f0ff); transform-origin: left; transform: scaleX(0); transition: transform 0.15s; }
.hstat { flex: none; display: flex; align-items: center; gap: 3px; font-size: 14px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
.hstat img, .hstat .ico { width: 16px; height: 16px; object-fit: contain; }
.hstat--k { color: #ffd8de; }
.hstat--k .ico { color: #ff8da0; }
.hstat--g { color: var(--gold); }
.hstat--hp { color: #ffb3c0; min-width: 44px; }
.hstat--hp .ico { color: var(--red); }
.hstat--hp.is-low { color: var(--red); animation: blink 0.6s steps(2) infinite; }
.dawn { position: relative; flex: 1 1 auto; min-width: 60px; height: 20px; }
.dawn__track { position: absolute; left: 0; right: 0; top: 7px; height: 7px; border-radius: 4px; background: rgba(0, 0, 0, 0.6); border: 1px solid rgba(255, 210, 160, 0.35); overflow: hidden; }
.dawn__fill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, #3b2a7a 0%, #8a4bb0 55%, #ff9a5a 100%); }
.dawn__marks { position: absolute; inset: 0; }
.mk { position: absolute; top: 1px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: #2a0d18; border: 2px solid var(--red); overflow: hidden; box-shadow: 0 0 6px rgba(255, 77, 109, 0.6); }
.mk img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk--boss { top: 0; width: 20px; height: 20px; margin-left: -20px; border-color: var(--gold); box-shadow: 0 0 8px rgba(255, 207, 90, 0.8); }
.mk--ring { top: 6px; width: 9px; height: 9px; margin-left: -4px; border-radius: 2px; transform: rotate(45deg); background: #ffb36b; border: 1px solid #2a1404; box-shadow: none; }
.mk.is-past { opacity: 0.35; filter: grayscale(0.8); }
.mk.is-soon { animation: pulse 0.6s ease-in-out infinite alternate; }
.dawn__now { position: absolute; top: 3px; width: 6px; height: 15px; margin-left: -3px; border-radius: 3px; background: #fff0c8; box-shadow: 0 0 8px 2px rgba(255, 170, 80, 0.9); }
.dawn__sun { display: none; }
.dawn__t { flex: none; min-width: 3.1em; text-align: right; font-size: 16px; font-weight: 900; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.dawn__t.is-boss { color: var(--red); animation: blink 0.8s steps(2) infinite; }
.inv { display: flex; align-items: center; gap: 2px; height: 26px; }
.slot { position: relative; flex: 0 1 26px; min-width: 0; height: 26px; border-radius: 6px; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 160, 100, 0.45); }
.slot--p { border-color: rgba(111, 227, 154, 0.45); }
.slot img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 5px; }
.slot b { position: absolute; right: -1px; bottom: -3px; font-size: 10px; font-weight: 900; line-height: 1; color: #fff; text-shadow: 0 0 2px #000, 0 1px 2px #000, 0 0 3px #000; }
.slot.is-empty { background: rgba(0, 0, 0, 0.22); border: 1px dashed rgba(255, 255, 255, 0.18); }
.slot.is-max { border-color: var(--gold); }
.slot.is-max b { color: var(--gold); }
.slot.is-ready { animation: readyGlow 0.9s ease-in-out infinite alternate; }
.slot.is-evo { border: 2px solid var(--evo); background: rgba(255, 211, 74, 0.25); box-shadow: 0 0 6px rgba(255, 211, 74, 0.7); }
.slot.is-evo b { color: var(--evo); }
.inv__sep { flex: 0 0 6px; height: 16px; border-left: 1px solid rgba(255, 255, 255, 0.2); margin-left: 3px; }
.pausebtn { position: absolute; top: calc(2px + var(--safe-t)); right: calc(2px + var(--safe-r)); width: 48px; height: 48px; padding: 0; border: 0; background: none; display: grid; place-items: center; cursor: pointer; pointer-events: auto; }
.pausebtn .ico { width: 38px; height: 38px; padding: 8px; border-radius: 50%; background: rgba(10, 6, 20, 0.6); border: 2px solid rgba(255, 255, 255, 0.35); color: #fff; }
.goal { position: absolute; left: calc(8px + var(--safe-l)); top: calc(var(--hud-h) + 2px); max-width: calc(100% - 150px); padding: 3px 9px; border-radius: 10px; background: rgba(8, 4, 18, 0.55); font-size: 12px; font-weight: 800; color: #e9ddff; line-height: 1.35; text-shadow: 0 1px 2px #000; }
.goal:empty { display: none; }
.goal--warn { color: #ffd0d8; background: rgba(90, 10, 30, 0.6); animation: blink 0.8s ease-in-out infinite alternate; }
.goal--hot { color: var(--gold); }
.combo { position: absolute; right: calc(10px + var(--safe-r)); top: calc(var(--hud-h) + 4px); display: none; flex-direction: row; align-items: baseline; gap: 4px; line-height: 1; text-shadow: 0 2px 0 #3a1204, 0 0 10px rgba(0, 0, 0, 0.8); }
.combo.is-on { display: flex; }
.combo b { transform-origin: 100% 0%; line-height: 1.2; font-size: 26px; font-weight: 900; color: #fff1c8; font-variant-numeric: tabular-nums; transform: skewX(-8deg); }
.combo span { line-height: 1.2; font-size: 12px; font-weight: 900; color: var(--gold); letter-spacing: 0.1em; }
.combo--t2 b { color: var(--gold); font-size: 29px; }
.combo--t3 b { color: #ff9a3c; font-size: 32px; text-shadow: 0 0 14px rgba(255, 120, 40, 0.9), 0 2px 0 #3a1204; }
.combo--t4 b { color: #ff5d3c; font-size: 35px; text-shadow: 0 0 18px rgba(255, 60, 40, 1), 0 0 34px rgba(255, 200, 60, 0.7), 0 2px 0 #3a1204; }
.combo--t3 span, .combo--t4 span { color: #ffb36b; }
.combo b.pop { animation: comboPop 0.25s ease-out; }
.announce { position: absolute; left: 8px; right: 8px; top: max(calc(var(--hud-h) + 60px), 22%); display: flex; justify-content: center; opacity: 0; pointer-events: none; }
.announce > * { flex: none; }
.announce span { max-width: 100%; padding: 6px 16px; border-radius: 10px; font-size: 16px; font-weight: 900; text-align: center; line-height: 1.3; background: rgba(8, 4, 18, 0.7); color: var(--gold); border: 1px solid rgba(255, 207, 90, 0.5); text-shadow: 0 1px 3px #000; }
.announce.is-on { opacity: 1; }
.announce.is-on > * { animation: annIn 0.35s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.announce__ic { width: 40px; height: 40px; object-fit: contain; margin-right: -8px; z-index: 1; filter: drop-shadow(0 0 6px rgba(255, 77, 109, 0.9)); align-self: center; }
.announce--warn span { background: linear-gradient(90deg, rgba(120, 10, 30, 0.2), rgba(150, 14, 40, 0.92) 15%, rgba(150, 14, 40, 0.92) 85%, rgba(120, 10, 30, 0.2)); color: #fff; border: 0; border-top: 2px solid var(--red); border-bottom: 2px solid var(--red); border-radius: 0; font-size: 18px; padding: 6px 26px; }
.announce--boss span { background: linear-gradient(90deg, rgba(60, 0, 10, 0.2), rgba(100, 0, 20, 0.95) 15%, rgba(100, 0, 20, 0.95) 85%, rgba(60, 0, 10, 0.2)); color: #ffe3b0; border: 0; border-top: 3px solid var(--gold); border-bottom: 3px solid var(--gold); border-radius: 0; font-size: 21px; padding: 6px 30px; letter-spacing: 0.1em; }
.announce--record span, .announce--evo span { background: linear-gradient(180deg, #fff3c8, #ffcf5a); color: #4a2a04; border-color: #fff; text-shadow: none; }
.announce--combo span { color: #ffb36b; border-color: rgba(255, 150, 60, 0.6); font-size: 18px; }
.announce--win span, .announce--over span { font-size: 26px; padding: 6px 26px; background: rgba(8, 4, 18, 0.8); color: #fff; letter-spacing: 0.1em; }
.announce--win span { color: #ffe3b0; text-shadow: 0 0 16px rgba(255, 180, 80, 0.9); }
.php { position: absolute; left: 50%; top: 56%; width: 42px; height: 6px; margin-left: -21px; border-radius: 3px; background: rgba(0, 0, 0, 0.65); border: 1px solid rgba(0, 0, 0, 0.8); overflow: hidden; }
.php i { display: block; height: 100%; background: linear-gradient(180deg, #ff8fa2, #e0284c); transform-origin: left; }
.php.is-low i { animation: blink 0.5s steps(2) infinite; }
.php.is-hit { animation: shake 0.25s; }
.php.is-heal { box-shadow: 0 0 8px 2px rgba(111, 227, 154, 0.9); }
.lowhp { position: absolute; inset: 0; opacity: 0; box-shadow: inset 0 0 70px 10px rgba(255, 0, 40, 0.55); }
.lowhp.is-on { animation: lowPulse 1s ease-in-out infinite alternate; }
.hurtfx { position: absolute; inset: 0; opacity: 0; background: radial-gradient(ellipse at center, transparent 50%, rgba(255, 20, 60, 0.45) 100%); }
.hurtfx.is-on { animation: hurtFlash 0.3s ease-out; }
.bossbar { position: absolute; left: 14px; right: 14px; bottom: calc(14px + var(--safe-b)); height: 20px; border-radius: 10px; background: rgba(0, 0, 0, 0.75); border: 2px solid var(--gold); overflow: hidden; box-shadow: 0 0 14px rgba(255, 77, 109, 0.5); }
.bossbar__fill { position: absolute; inset: 0; background: linear-gradient(90deg, #8b0f2a, #ff4d6d); transform-origin: left; }
.bossbar__n { position: absolute; inset: 0; z-index: 1; text-align: center; font-size: 12px; font-weight: 900; line-height: 16px; text-shadow: 0 1px 2px #000; }

/* ===================== 旅の中: 窓 ===================== */
.modal { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px; padding: calc(12px + var(--safe-t)) calc(12px + var(--safe-r)) calc(max(14px, 6vh) + var(--safe-b)) calc(12px + var(--safe-l)); background: rgba(8, 4, 18, 0.66); pointer-events: auto; overflow: hidden; }
.modal--lv { justify-content: safe flex-end; overflow-y: auto; touch-action: pan-y; }
@media (max-height: 640px) {
  .modal--lv { padding-bottom: calc(10px + var(--safe-b)); gap: 6px; padding-top: calc(6px + var(--safe-t)); }
  .lv__title { font-size: 22px; }
  .card { min-height: 66px; padding: 6px 10px 6px 12px; }
  .card__icon { width: 50px; height: 50px; }
  .card__name { font-size: 16px; }
  .card__lines { font-size: 13px; }
  .evo-mini .em { width: 20px; height: 20px; }
  .cards { gap: 6px; }
}
.modal--wait { background: transparent; }
.evoname { position: absolute; left: 0; right: 0; top: 34%; display: flex; justify-content: center; opacity: 0; pointer-events: none; }
.evoname.is-on { animation: evoName 1.6s ease-out forwards; }
.evoname__in { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 26px; text-align: center; }
.evoname__ic { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 0 14px rgba(255, 211, 74, 1)); }
.evoname small { font-size: 15px; font-weight: 900; letter-spacing: 0.4em; padding-left: 0.4em; color: #fff3c8; text-shadow: 0 0 8px #b07a14, 0 2px 2px #000; }
.evoname b { font-size: clamp(28px, 9vw, 42px); font-weight: 900; color: #fff6d8; letter-spacing: 0.06em; text-shadow: 0 0 14px rgba(255, 211, 74, 1), 0 0 34px rgba(255, 160, 40, 0.9), 0 3px 0 #7a4a04; }
@keyframes evoName { 0% { opacity: 0; transform: scale(1.8); } 15% { opacity: 1; transform: scale(0.95); } 25% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1.04); } }
/* レベルアップ */
.lv__pillar { position: absolute; left: 50%; top: 0; bottom: 0; width: 160px; margin-left: -80px; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(159, 232, 255, 0.5) 40%, rgba(255, 255, 255, 0.85) 50%, rgba(159, 232, 255, 0.5) 60%, transparent); animation: pillar 0.8s ease-out forwards; }
.lv__head { position: relative; text-align: center; animation: headIn 0.35s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
.lv__title { font-size: 28px; font-weight: 900; letter-spacing: 0.12em; color: #fff7e0; text-shadow: 0 0 16px rgba(159, 232, 255, 0.9), 0 0 32px rgba(111, 216, 255, 0.6), 0 3px 0 #123a5a; line-height: 1.2; }
.lv__lv { display: flex; align-items: baseline; justify-content: center; gap: 6px; font-size: 14px; font-weight: 800; color: var(--fox); }
.lv__lv b { font-size: 20px; color: #fff; }
.lv__lv small { font-size: 12px; color: var(--dim); }
.cards { position: relative; display: flex; flex-direction: column; gap: 8px; width: min(460px, 100%); }
.cards.is-locked .card { pointer-events: none; }
.card { position: relative; display: flex; gap: 10px; align-items: center; width: 100%; min-height: 78px; padding: 8px 12px 8px 14px; border-radius: 12px; border: 0; background: linear-gradient(180deg, var(--paper) 0%, var(--paper2) 100%); color: var(--inkt); text-align: left; cursor: pointer; overflow: hidden; box-shadow: 0 4px 0 #a88a5c, 0 8px 18px rgba(0, 0, 0, 0.5); animation: cardDrop 0.42s cubic-bezier(0.2, 1.35, 0.4, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
.card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--verm); }
.card--p::before { background: #2f9e7a; }
.card--evo { background: linear-gradient(180deg, #fff3c8 0%, #ffd56a 100%); box-shadow: 0 4px 0 #b07a14, 0 0 24px rgba(255, 211, 74, 0.7); }
.card--evo::before { background: var(--evo); }
.card:active { transform: scale(0.98); }
.card__icon { position: relative; flex: none; width: 58px; height: 58px; border-radius: 12px; background: #2a1d3e; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.25); }
.card__icon img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 12px; }
.card__kind { position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%); padding: 0 6px; border-radius: 6px; background: var(--verm); color: #fff; font-size: 10px; font-weight: 900; line-height: 15px; white-space: nowrap; }
.card--p .card__kind { background: #2f9e7a; }
.card--evo .card__kind { background: #b07a14; }
.card__kind:empty { display: none; }
.card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.card__head { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.card__name { min-width: 0; font-size: 18px; font-weight: 900; line-height: 1.25; }
.tag { flex: none; display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--inkd); font-weight: 800; }
.tag--new { flex: none; padding: 1px 7px; border-radius: 5px; background: var(--verm); color: #fff; font-size: 12px; font-weight: 900; font-style: normal; }
.tag--max { padding: 0 5px; border-radius: 4px; background: #b07a14; color: #fff; font-style: normal; font-size: 11px; }
.card__lines { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 14px; font-weight: 700; line-height: 1.4; }
.card__lines span { white-space: nowrap; }
.card__lines s { color: #8b6d4d; text-decoration: none; }
.card__lines b { color: var(--verm); font-weight: 900; }
.card__desc { font-size: 13px; color: #5a4330; line-height: 1.35; }
.evo-mini { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin-top: 1px; font-size: 11px; font-weight: 800; color: #8a5a10; }
.evo-mini .em { flex: none; display: block; width: 22px; height: 22px; border-radius: 6px; background: #2a1d3e; border: 2px solid transparent; overflow: hidden; }
.evo-mini .em img { width: 100%; height: 100%; object-fit: contain; display: block; }
.evo-mini .em.has { border-color: #2f9e7a; }
.evo-mini .em--evo { border-color: var(--evo); }
.evo-mini i { font-style: normal; color: #8a5a10; }
.evo-mini em { font-style: normal; margin-left: 2px; }
.card__key { position: absolute; right: 7px; bottom: 4px; font-size: 10px; font-weight: 900; color: rgba(43, 27, 18, 0.35); }
@media (hover: none) { .card__key { display: none; } }
.card.is-picked { z-index: 2; animation: picked 0.3s ease-out forwards; }
.cards.is-picking .card:not(.is-picked) { opacity: 0.3; transform: scale(0.96); transition: opacity 0.15s, transform 0.15s; }
.lv__row { display: flex; gap: 8px; width: min(460px, 100%); }
.lv__row .btn { flex: 1 1 0; min-height: 48px; font-size: 14px; }
.lv__row .btn b { color: var(--gold); }
/* 宝箱 */
.modal--chest { justify-content: center; background: radial-gradient(circle at 50% 40%, rgba(80, 50, 10, 0.75), rgba(8, 4, 18, 0.85)); }
.chest__head { font-size: 26px; font-weight: 900; letter-spacing: 0.1em; text-shadow: 0 0 14px rgba(255, 207, 90, 0.8), 0 2px 0 #3a2204; }
.chest__head .gold { color: var(--evo); }
.chest__box { width: 92px; height: 92px; animation: chestBounce 0.6s ease-in-out infinite alternate; }
.chest__box img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 16px rgba(255, 207, 90, 0.8)); }
.modal--chest.is-open .chest__box { animation: none; transform: scale(0.85); opacity: 0.8; }
.reels { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: min(460px, 100%); }
.reel { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 104px; }
.reels--5 .reel { width: 96px; }
.reel__win { width: 84px; height: 84px; border-radius: 16px; overflow: hidden; background: #1e1436; border: 3px solid rgba(255, 160, 64, 0.6); display: grid; place-items: center; box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.6); }
.reel__win img { width: 70px; height: 70px; object-fit: contain; }
.reel.is-spin img { animation: spinIn 0.09s linear; }
.reel:not(.is-stop) img { filter: blur(0.6px) brightness(0.85); }
.reel.is-stop .reel__win { border-color: #fff0c0; animation: stopPop 0.35s cubic-bezier(0.2, 1.6, 0.4, 1); }
.reel--evo.is-stop .reel__win { background: radial-gradient(circle, #fff3c8 0%, #ffcf5a 55%, #b07a14 100%); border-color: #fff; animation: stopPop 0.35s cubic-bezier(0.2, 1.6, 0.4, 1), evoGlow 0.8s 0.35s ease-in-out infinite alternate; }
.reel__name { font-size: 14px; font-weight: 900; text-align: center; line-height: 1.25; min-height: 1.25em; }
.reel__sub { font-size: 11px; color: var(--dim); text-align: center; font-weight: 700; line-height: 1.2; min-height: 1.2em; }
.reel--evo .reel__sub { color: var(--evo); font-size: 13px; font-weight: 900; }
.chest__foot { width: min(460px, 100%); }
.chest__foot .btn { width: 100%; }
/* 一時停止 */
.modal--pause { z-index: 15; align-items: stretch; justify-content: stretch; gap: 0; padding: 0; background: rgba(8, 4, 18, 0.9); }
.modal--pause .scr__foot { background: rgba(11, 10, 20, 0.95); }
.pause__t { font-size: 13px; color: var(--dim); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prow { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 8px; align-items: center; padding: 7px 9px; margin-bottom: 6px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.prow__ic { width: 42px; height: 42px; object-fit: contain; border-radius: 10px; background: rgba(0, 0, 0, 0.35); }
.prow__b { min-width: 0; }
.prow__h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 15px; }
.prow__h span { flex: none; font-size: 12px; color: var(--dim); font-weight: 800; }
.prow__v { display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 13px; color: var(--dim); line-height: 1.45; }
.prow__v span { white-space: nowrap; }
.prow__v b { color: var(--gold); }
.statgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 13px; color: var(--dim); }
.statgrid b { color: var(--text); }

/* ===================== PC: 中央に縦長、左右に記録 ===================== */
@media (min-width: 1000px) and (min-height: 600px) and (min-aspect-ratio: 5/4) {
  body { background: radial-gradient(100% 80% at 50% 0%, #1d1540, var(--ink)); }
  #stage { left: 0; right: 0; margin: 0 auto; width: min(64vh, 620px); border-left: 1px solid var(--line); border-right: 1px solid var(--line); box-shadow: 0 0 60px rgba(0, 0, 0, 0.8); }
  .side { display: block; position: fixed; top: 0; bottom: 0; width: calc((100vw - min(64vh, 620px)) / 2); padding: 28px 28px; overflow-y: auto; }
  .side > * { max-width: 300px; }
  .side--l { left: 0; display: flex; flex-direction: column; align-items: flex-end; text-align: left; }
  .side--l > * { width: 100%; }
  .side--r { right: 0; }
}
.side__h { margin: 18px 0 6px; font-size: 13px; font-weight: 900; color: var(--lantern); letter-spacing: 0.08em; }
.side__h:first-child { margin-top: 0; }
.side__rank { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.side__rank b { font-size: 30px; color: var(--fox); }
.side__rank span { font-weight: 800; }
.side__gold { display: flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 900; color: var(--gold); }
.side__gold img { width: 26px; height: 26px; object-fit: contain; }
.side__st { padding: 8px 10px; margin-bottom: 6px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; font-weight: 800; }
.side__st small { display: block; color: var(--dim); font-weight: 700; }
.stars { display: flex; gap: 2px; margin: 2px 0; }
.stars i { color: var(--dim2); }
.stars i.on { color: var(--gold); }
.stars .ico { width: 16px; height: 16px; }
.side__it { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; font-weight: 700; }
.side__it img { width: 30px; height: 30px; object-fit: contain; border-radius: 6px; background: rgba(0, 0, 0, 0.35); }
.side__it span { flex: 1; }
.side__it b { color: var(--gold); font-size: 13px; }
.side__p { margin: 0; font-size: 13px; color: var(--dim); line-height: 1.7; }

/* ===================== 横画面のスマホ（低い画面） ===================== */
@media (max-height: 460px) and (min-aspect-ratio: 4/3) {
  .scr__head { padding-top: calc(6px + var(--safe-t)); padding-bottom: 4px; }
  .scr__title { font-size: 18px; }
  .scr__foot { padding-top: 6px; padding-bottom: calc(6px + var(--safe-b)); }
  .scr__foot .row, .scr__foot .tabs { max-width: 640px; align-self: center; }
  .scr__body > * { max-width: 720px; margin-left: auto; margin-right: auto; }
  .title__logo { margin-top: calc(10px + var(--safe-t)); }
  .title__jp { font-size: 48px; }
  .title__sub { margin-top: 2px; }
  .title__plate { width: min(640px, calc(100% - 28px)); align-self: center; margin-left: auto; margin-right: auto; }
  .scr--title .scr__foot { flex-direction: row; align-items: stretch; }
  .scr--title .scr__foot .btn--big { flex: 1.2 1 0; }
  .scr--title .scr__foot .row--3 { flex: 1 1 0; }
  .modal { justify-content: center; padding-bottom: calc(10px + var(--safe-b)); gap: 6px; }
  .lv__pillar { display: none; }
  .lv__title { font-size: 20px; }
  .lv__head { display: flex; align-items: baseline; gap: 10px; }
  .cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(820px, 100%); }
  .card { min-height: 72px; }
  .lv__row { width: min(460px, 100%); }
  .chest__box { display: none; }
  .goal { max-width: 29%; }
  .announce { top: calc(var(--hud-h) + 2px); left: 30%; right: 30%; }
  .announce span { font-size: 15px; padding: 4px 12px; }
  .announce--warn span, .announce--boss span, .announce--win span, .announce--over span { font-size: 17px; padding: 4px 16px; }
  .reel__win { width: 68px; height: 68px; }
  .reel__win img { width: 56px; height: 56px; }
}

/* ===================== 動き ===================== */
@keyframes scrIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes spend { 0% { transform: scale(1); } 40% { transform: scale(1.15); box-shadow: 0 0 16px rgba(255, 207, 90, 0.9); } 100% { transform: scale(1); } }
@keyframes bought { 0% { box-shadow: 0 0 0 0 rgba(255, 207, 90, 0); background: var(--panel); } 25% { box-shadow: 0 0 0 3px var(--gold), 0 0 30px 6px rgba(255, 207, 90, 0.7); background: rgba(90, 64, 20, 0.95); } 100% { box-shadow: 0 0 0 0 rgba(255, 207, 90, 0); background: var(--panel); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }
@keyframes stampIn { 0% { transform: rotate(-6deg) scale(2.2); opacity: 0; } 100% { transform: rotate(-6deg) scale(1); opacity: 1; } }
@keyframes starPop { 0% { transform: scale(0.3) rotate(-40deg); } 60% { transform: scale(1.6) rotate(10deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes blink { from { opacity: 1; } to { opacity: 0.45; } }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.35); } }
@keyframes readyGlow { from { box-shadow: 0 0 2px rgba(255, 211, 74, 0.4); } to { box-shadow: 0 0 10px 2px rgba(255, 211, 74, 0.95); } }
@keyframes comboPop { 0% { transform: skewX(-8deg) scale(1.16); filter: brightness(1.8); } 100% { transform: skewX(-8deg) scale(1); filter: none; } }
@keyframes annIn { 0% { opacity: 0; transform: scale(1.4); } 100% { opacity: 1; transform: scale(1); } }
@keyframes lowPulse { from { opacity: 0.35; } to { opacity: 1; } }
@keyframes hurtFlash { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes pillar { 0% { opacity: 0; transform: scaleX(0.1); } 25% { opacity: 1; transform: scaleX(1.2); } 100% { opacity: 0; transform: scaleX(0.5); } }
@keyframes headIn { 0% { opacity: 0; transform: scale(1.8); } 100% { opacity: 1; transform: scale(1); } }
@keyframes cardDrop { 0% { opacity: 0; transform: translateY(-120px) rotate(-3deg); } 70% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes picked { 0% { transform: scale(1); filter: brightness(1); } 40% { transform: scale(1.05); filter: brightness(1.3); box-shadow: 0 0 0 3px #fff, 0 0 40px 10px rgba(255, 220, 120, 0.9); } 100% { transform: scale(1.02); filter: brightness(1.15); box-shadow: 0 0 0 3px #fff, 0 0 30px 6px rgba(255, 220, 120, 0.8); } }
@keyframes chestBounce { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-8px) rotate(3deg); } }
@keyframes spinIn { from { transform: translateY(-40%); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes stopPop { 0% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes evoGlow { from { box-shadow: 0 0 12px 2px rgba(255, 211, 74, 0.6); } to { box-shadow: 0 0 30px 8px rgba(255, 211, 74, 1); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }
