/* なぞ箱街道
   VOICE: 街道の運び屋。短く、旅の帳面の口調
   PICTURE: 月夜の街道。人形のような旅人どうしの斬り合いと、奪った箱の光
   COLOUR: 夜の藍と土、灯籠の橙。鮮やかなのは輪と品の光と血の赤だけ
   LAYOUT: 上に所持金と体力の帯、下に帳面の札。戦いの間は真ん中を空ける */
body.rpg { --bg: #0c1018; background: #0c1018; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }
#fade { position: fixed; inset: 0; z-index: 35; background: #05070c; opacity: 0; pointer-events: none; transition: opacity .35s; }
#fade.on { opacity: 1; }

.rpg #hud { align-items: flex-start; background: linear-gradient(rgba(8, 10, 16, .92), rgba(8, 10, 16, .7)); border-bottom-color: rgba(160, 180, 220, .18); }
.rpg .money b { font-size: 24px; }
.me { width: 46%; max-width: 230px; flex: none; }
.lvrow { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: 13px; }
.lvrow b { font-size: 15px; font-weight: 900; }
#pts { font-size: 11px; font-weight: 900; color: #1a1408; background: #ffd76a; border-radius: 999px; padding: 1px 7px; }
.mute { width: 28px; height: 24px; border-radius: 6px; background: rgba(255, 255, 255, .08); font-size: 13px; color: #cfd6e6; }
.mute.off { opacity: .4; text-decoration: line-through; }
.bar { position: relative; height: 14px; border-radius: 7px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-top: 4px; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; transition: width .25s; }
.bar.hp i { background: linear-gradient(#7ad07a, #3a9a4a); }
.bar.hp.low i { background: linear-gradient(#ff8a6a, #c03a2a); }
.bar.hp span { position: absolute; inset: 0; font-size: 10px; font-weight: 900; line-height: 14px; text-align: center; color: #fff; text-shadow: 0 1px 2px #000; }
.bar.xp { height: 5px; margin-top: 3px; }
.bar.xp i { background: #8ab4ff; }
.bleed { color: #ff7a6a; }

/* 頭の上の体力 */
#bars { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
.ob { position: absolute; transform: translate(-50%, -100%); width: 120px; text-align: center; }
.ob p { font-size: 12px; font-weight: 900; color: #f2ecdf; text-shadow: 0 1px 3px #000; white-space: nowrap; }
.ob p em { font-style: normal; font-size: 10px; color: #ffd76a; margin-left: 4px; }
.ob .bar { height: 9px; margin-top: 2px; background: rgba(0, 0, 0, .55); box-shadow: 0 0 0 1px rgba(255, 255, 255, .15); }
.ob .bar i { background: linear-gradient(#ff8a6a, #c03a2a); }
.ob.me .bar i { background: linear-gradient(#7ad07a, #3a9a4a); }
.ob .st { font-size: 10px; font-weight: 900; margin-top: 2px; min-height: 13px; }
.ob .st span { padding: 0 5px; border-radius: 4px; margin: 0 2px; }
.ob .st .b { background: #8a2a20; color: #fff; } .ob .st .s { background: #d8c060; color: #2a2008; }

/* 町 */
.town { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-width: 520px; margin: 0 auto; }
.town .tb { min-height: 58px; border-radius: 10px; background: rgba(20, 24, 34, .86); border: 1px solid rgba(200, 210, 240, .16); color: #eef0f6; font-size: 14px; font-weight: 900; padding: 4px 2px; line-height: 1.2; position: relative; }
.town .tb small { display: block; font-size: 10px; font-weight: 700; color: #a8b0c4; margin-top: 3px; }
.town .tb:active { transform: translateY(1px); }
.town .tb .dot { position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #ffcf5a; box-shadow: 0 0 6px #ffcf5a; }
.goRoad { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: 520px; margin: 0 auto 8px; }
.goRoad .btn { min-height: 56px; font-size: 18px; }

/* 街道 */
.roadInfo { display: flex; justify-content: space-between; align-items: center; max-width: 520px; margin: 0 auto 8px; font-size: 13px; font-weight: 700; color: #d8dcea; text-shadow: 0 1px 3px #000; }
.roadInfo b { font-size: 15px; color: #fff; }
.meter { display: inline-flex; align-items: center; gap: 6px; }
.meter i { display: block; width: 70px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.meter i u { display: block; height: 100%; background: #ff8a5a; }
.acts { display: flex; gap: 8px; max-width: 520px; margin: 0 auto; }
.acts .btn { min-height: 54px; }
.acts .btn.big { flex: 2; font-size: 19px; }
.danger { display: inline-block; font-size: 12px; font-weight: 900; padding: 2px 9px; border-radius: 999px; }
.danger.d0 { background: #cfe8c8; color: #1e4a24; } .danger.d1 { background: #f2e2a8; color: #6a4a08; } .danger.d2 { background: #f6c2b4; color: #8a1e10; }
.boss { font-size: 11px; font-weight: 900; background: #2a1830; color: #ffd76a; padding: 2px 8px; border-radius: 4px; }
.estats { display: flex; gap: 10px; font-size: 12px; font-weight: 700; color: #5a4c38; margin-top: 6px; flex-wrap: wrap; }
.estats b { color: var(--ink); font-size: 14px; }

/* 比べる */
.cmp { margin-top: 8px; font-size: 13px; font-weight: 700; background: #e2d4b4; border-radius: 7px; padding: 7px 10px; line-height: 1.6; }
.cmp .up { color: #1e6a34; font-weight: 900; } .cmp .dn { color: #9a2a1a; font-weight: 900; }

/* 札の中の行 */
.lrow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed rgba(42, 33, 24, .25); }
.lrow img { width: 52px; height: 52px; flex: none; background: #e6d9bc; border-radius: 8px; }
.lrow .tx { flex: 1; min-width: 0; font-size: 14px; font-weight: 900; }
.lrow .tx small { display: block; font-size: 12px; color: #6a5a44; font-weight: 700; margin-top: 2px; line-height: 1.45; }
.lrow .btn { flex: none; min-width: 84px; min-height: 42px; font-size: 14px; }
.lrow .bs { display: flex; flex-direction: column; gap: 4px; }
.eqTag { font-size: 10px; font-weight: 900; background: #2e5a40; color: #fff; padding: 1px 6px; border-radius: 4px; margin-left: 4px; vertical-align: 2px; }
.statRow { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed rgba(42, 33, 24, .25); }
.statRow .tx { flex: 1; font-size: 15px; font-weight: 900; }
.statRow .tx small { display: block; font-size: 11px; color: #6a5a44; font-weight: 700; }
.statRow b { font-size: 20px; width: 40px; text-align: right; }
.plus { width: 44px; height: 40px; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: 22px; font-weight: 900; }
.plus:disabled { opacity: .3; }
.perk { padding: 9px 10px; border-radius: 9px; background: #e6d9bc; margin-top: 6px; display: flex; gap: 8px; align-items: center; }
.perk.on { background: #cfe2c4; box-shadow: inset 0 0 0 2px #2e5a40; }
.perk .tx { flex: 1; font-size: 14px; font-weight: 900; }
.perk .tx small { display: block; font-size: 11px; font-weight: 700; line-height: 1.5; }
.perk .tx .g { color: #1e6a34; } .perk .tx .x { color: #9a2a1a; }
.perk .btn { flex: none; min-width: 84px; min-height: 40px; font-size: 13px; }
.slots { display: flex; gap: 6px; margin-top: 6px; }
.slots i { flex: 1; font-style: normal; text-align: center; font-size: 12px; font-weight: 900; padding: 8px 2px; border-radius: 8px; background: #e6d9bc; }
.slots i.on { background: #2e5a40; color: #fff; }
.slots i.lock { opacity: .5; }
.xpbar { height: 8px; border-radius: 4px; background: #d8cab0; overflow: hidden; margin-top: 6px; }
.xpbar i { display: block; height: 100%; background: #4a7ad0; }
.tabs { display: flex; gap: 6px; margin-top: 10px; }
.tabs button { flex: 1; padding: 8px 4px; border-radius: 8px; background: #e2d4b4; font-weight: 900; font-size: 13px; }
.tabs button.on { background: var(--ink); color: var(--paper); }
.foe { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; padding: 6px 0; border-bottom: 1px dashed rgba(42, 33, 24, .2); }
.rpg #toasts { top: calc(env(safe-area-inset-top) + 124px); }
.pop.crit { font-size: 30px; color: #ffe86a; }
.pop.good { color: #9fe8ff; }
.pop.heal { color: #9ff0a8; }
.pop.big { font-size: 26px; }
#flash.dark { background: #000; }
