:root {
  --bg: #0b0c1e;
  --panel: rgba(14, 18, 40, .86);
  --line: rgba(243, 213, 138, .28);
  --gold: #f3d58a;
  --gold-2: #c9a24b;
  --ink: #eef0ff;
  --ink-2: #a8aed0;
  --blue: #7ad0ff;
  --red: #ff6a5a;
  --mincho: 'Yu Mincho', 'YuMincho', 'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'Noto Serif JP', serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: #000; color: var(--ink);
  font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', 'Yu Gothic', 'Meiryo', sans-serif;
  overscroll-behavior: none; -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; overflow: hidden;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }

.scene { position: fixed; inset: 0; max-width: 560px; margin: 0 auto; overflow: hidden; background: var(--bg); touch-action: none; }
.bg { position: absolute; inset: 0; }
.bg svg { width: 100%; height: 100%; display: block; }
.en { font-size: 11px; letter-spacing: .22em; color: var(--gold-2); margin: 0; font-weight: 700; }
.en.small { font-size: 9px; }
.gold {
  font-family: var(--mincho); font-weight: 800; margin: 0; letter-spacing: .12em;
  background: linear-gradient(180deg, #fff6d0 0%, #f3d58a 45%, #b8862a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .7));
}
.goldtext { color: var(--gold); }
.small { font-size: 11px; }

/* 題名 */
/* 題名：イラスト全体を背景にして、題名の文字が読みやすいよう上を暗くする */
.title .bg { background: radial-gradient(circle at 50% 10%, #2a2f62, #0b0c1e 70%); }
.title .bg img { position: absolute; left: 0; right: 0; top: 24%; width: 100%; height: 76%; object-fit: cover; object-position: 50% 0; display: block; }
.title .bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 12, 30, 0) 22%, rgba(11, 12, 30, .95) 24.5%, rgba(11, 12, 30, 0) 34%, rgba(11, 12, 30, 0) 78%, rgba(11, 12, 30, .7) 100%); }
.title-box { position: absolute; left: 0; right: 0; top: calc(max(16px, env(safe-area-inset-top)) + 3%); text-align: center; padding: 0 16px; }
.title-start { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 44px); text-align: center; }
.title h1 { font-size: clamp(36px, 10.5vw, 60px); margin: 10px 0 6px; letter-spacing: .06em; white-space: nowrap; }
.title .sub { font-family: var(--mincho); color: #e8e4f8; letter-spacing: .2em; margin: 0; text-shadow: 0 2px 8px #000; }
.rule { display: block; width: 180px; height: 1px; margin: 18px auto; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.btn.gold-btn {
  min-width: 230px; min-height: 52px; border-radius: 6px; border: 1px solid var(--gold-2);
  background: linear-gradient(180deg, rgba(40, 36, 60, .9), rgba(16, 14, 30, .95)); color: var(--gold);
  font-family: var(--mincho); font-weight: 700; font-size: 18px; letter-spacing: .15em; box-shadow: 0 0 20px rgba(243, 213, 138, .2);
}
.tap { font-size: 9px; letter-spacing: .25em; color: var(--ink-2); margin-top: 14px; }
.ver { position: absolute; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 10px); font-size: 9px; letter-spacing: .15em; color: var(--ink-2); margin: 0; }

/* 町（歩いて回れる町） */
#townview { position: absolute; left: 0; top: 0; }
.town-hud { position: absolute; left: 12px; right: 12px; top: calc(max(10px, env(safe-area-inset-top)) + 22px); display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.town-title { background: linear-gradient(90deg, rgba(8, 10, 30, .82), rgba(8, 10, 30, 0)); padding: 6px 30px 6px 10px; border-radius: 10px; }
.town-title h2 { font-size: 24px; margin-top: 2px; }
.town-lv { margin: 2px 0 0; font-size: 12px; color: var(--ink); text-shadow: 0 1px 3px #000; }
.icon-btn { pointer-events: auto; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: rgba(10, 12, 30, .7); font-size: 20px; color: var(--gold); }
.town-stats { position: absolute; left: 12px; right: 12px; top: calc(max(10px, env(safe-area-inset-top)) + 98px); display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none; }
.town-stats span { font-size: 11px; color: var(--ink-2); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; }
.town-stats b { color: var(--ink); }
.town-log { bottom: calc(env(safe-area-inset-bottom) + 210px); }
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.menu-grid button { border: 1px solid var(--line); border-radius: 8px; background: rgba(14, 16, 36, .85); padding: 10px 4px; line-height: 1.35; }
.menu-grid span { display: block; color: var(--gold); font-size: 16px; }
.menu-grid b { display: block; font-size: 13px; }
.menu-grid small { display: block; font-size: 10px; color: var(--ink-2); }
.talk-name { font-family: var(--mincho); color: var(--gold); font-size: 15px; margin: 0 0 6px; }
.talk-line { font-size: 14px !important; color: var(--ink) !important; background: rgba(255, 255, 255, .04); border-radius: 8px; padding: 8px 10px; }

/* 迷宮 */
#view { position: absolute; left: 0; top: 0; }
.hud-top { position: absolute; left: 8px; right: 8px; top: calc(max(8px, env(safe-area-inset-top)) + 22px); display: flex; justify-content: space-between; gap: 8px; pointer-events: none; }
.hud-hero { display: flex; gap: 8px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 5px 10px 5px 5px; min-width: 0; flex: 1; max-width: 276px; }
.hud-face { width: 46px; height: 46px; border-radius: 8px; overflow: hidden; background: #1c2350; flex: none; }
.hud-stat { flex: 1; min-width: 0; }
.hud-stat p { margin: 0 0 3px; font-size: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; line-height: 1.35; }
.hud-stat .pw { font-style: normal; color: #ffe9a8; font-weight: 700; font-size: 13px; }
.hud-stat .pw i { font-style: normal; font-size: 17px; margin-left: 1px; }
.hud-stat b { font-family: var(--mincho); }
.hud-stat span { color: var(--gold); font-size: 12px; }
.hpbar { position: relative; height: 24px; border-radius: 12px; background: #2a1e2e; overflow: hidden; }
.hpbar i { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(90deg, #4fd87a, #b8f07a); transition: width .2s, background .3s; }
.hpbar i.mid { background: linear-gradient(90deg, #f0c030, #ffe680); }
.hpbar i.low { background: linear-gradient(90deg, #e8382a, #ff7a4a); }
.hpbar span { position: relative; display: block; text-align: center; font-size: 18px; line-height: 24px; font-weight: 800; letter-spacing: .02em; text-shadow: 0 1px 3px #000, 0 0 2px #000; color: #fff; }
.mpbar { position: relative; height: 16px; border-radius: 8px; background: #1a2040; overflow: hidden; margin-top: 3px; }
.mpbar i { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(90deg, #4fd87a, #b8f07a); transition: width .2s, background .3s; }
.mpbar i.mid { background: linear-gradient(90deg, #f0c030, #ffe680); }
.mpbar i.low { background: linear-gradient(90deg, #e8382a, #ff7a4a); }
.mpbar span { position: relative; display: block; text-align: center; font-size: 12px; line-height: 16px; font-weight: 800; text-shadow: 0 1px 2px #000; color: #fff; }
.dungeon.caster { --hud-extra: 19px; }
.hud-floor { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px; display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: center; }
.hud-floor small { grid-column: 1; font-size: 8px; letter-spacing: .15em; color: var(--ink-2); }
.hud-floor b { grid-column: 1; grid-row: 2; font-family: var(--mincho); font-size: 26px; line-height: 1; color: var(--gold); }
.hud-floor span { grid-column: 2; grid-row: 1 / 3; font-size: 11px; line-height: 1.5; }
.hud-floor i { font-style: normal; font-weight: 700; }
.hud-sub { position: absolute; left: 12px; top: calc(max(8px, env(safe-area-inset-top)) + 22px + 62px + var(--hud-extra, 0px)); pointer-events: none; text-shadow: 0 1px 3px #000; }
.hud-sub p { margin: 0; font-size: 12px; }
.hud-sub .small { color: var(--ink-2); font-size: 10px; }
.hud-sub .status { color: #c89aff; font-size: 11px; }
.map-tools { position: absolute; right: 8px; top: calc(max(8px, env(safe-area-inset-top)) + 22px + 60px + var(--hud-extra, 0px)); display: flex; gap: 6px; }
.chip { font-size: 11px; padding: 6px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); }
.minimap { position: absolute; right: 8px; top: calc(max(8px, env(safe-area-inset-top)) + 22px + 96px + var(--hud-extra, 0px)); width: 132px; height: 99px; border-radius: 8px; border: 1px solid var(--line); pointer-events: none; }
.minimap.overlay { left: 0; right: 0; top: 18%; width: 100%; height: 56%; border: none; opacity: .85; }
.log {
  position: absolute; left: 10px; right: 10px; bottom: calc(env(safe-area-inset-bottom) + 210px); margin: 0; font-size: 12px; line-height: 1.5;
  background: rgba(8, 10, 24, .72); border: 1px solid rgba(255, 255, 255, .08); border-radius: 8px; padding: 6px 10px; pointer-events: none; min-height: 40px;
}
.log span { display: block; }
.log span.old { color: var(--ink-2); }

/* スティック（左下）とボタン（右下）。iPhone の画面の下のふちから十分はなす */
.stick-area { position: absolute; left: 12px; bottom: calc(env(safe-area-inset-bottom) + 26px); width: 150px; height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; touch-action: none; }
.stick-area small { font-size: 9px; color: var(--ink-2); letter-spacing: .1em; margin-top: 6px; }
.stick {
  position: relative; width: 128px; height: 128px; border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 213, 138, .08), rgba(14, 18, 40, .7) 60%, rgba(243, 213, 138, .12));
  border: 2px solid rgba(243, 213, 138, .45); box-shadow: inset 0 0 18px rgba(0, 0, 0, .6);
}
.stick i {
  position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6d0, #c9a24b 50%, #6a4a14 100%); box-shadow: 0 0 14px rgba(243, 213, 138, .5);
}
.stick.face { border-color: #7ad0ff; }
.actions { position: absolute; right: 10px; bottom: calc(env(safe-area-inset-bottom) + 26px); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.actions .row { display: flex; gap: 6px; }
.act { min-width: 54px; height: 38px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); font-size: 12px; font-weight: 700; }
.act.on { border-color: var(--blue); color: var(--blue); box-shadow: 0 0 10px rgba(122, 208, 255, .4); }
.attack {
  width: 78px; height: 78px; border-radius: 50%; margin-right: 34px; border: 2px solid var(--gold-2);
  background: radial-gradient(circle at 40% 35%, #4a4060, #1a1630); font-family: var(--mincho); font-size: 18px; font-weight: 800; color: var(--gold);
  box-shadow: 0 0 18px rgba(243, 213, 138, .25); line-height: 1.1;
}
.attack small { display: block; font-size: 9px; color: var(--ink-2); font-family: inherit; }

/* 小さな画面 */
.modal { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: rgba(2, 3, 12, .6); }
.panel {
  width: min(100%, 560px); max-height: 86vh; max-height: 86dvh; display: flex; flex-direction: column; border-radius: 16px 16px 0 0;
  background: linear-gradient(180deg, #161a38, #0c0e22); border: 1px solid var(--line); border-bottom: none;
  padding-bottom: env(safe-area-inset-bottom);
}
.panel header { position: relative; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.panel h3 { margin: 2px 0 0; font-family: var(--mincho); font-size: 20px; color: var(--gold); }
.x { position: absolute; right: 8px; top: 6px; width: 54px; height: 54px; font-size: 34px; line-height: 1; color: var(--ink); border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .07); touch-action: manipulation; }
.panel header { padding-right: 70px; }
.m-body { overflow-y: auto; padding: 12px 14px 18px; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.m-body p { margin: 0 0 8px; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.m-body h4 { margin: 12px 0 4px; font-size: 14px; color: var(--gold); font-family: var(--mincho); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.list li img { width: 40px; height: 40px; }
.list li b { font-size: 14px; display: block; }
.list li small { font-size: 11px; color: var(--ink-2); display: block; line-height: 1.5; }
.list li.sel { background: rgba(243, 213, 138, .08); border-radius: 8px; }
.list li.unknown { opacity: .45; }
.mini-btn { min-width: 64px; height: 36px; border-radius: 8px; border: 1px solid var(--gold-2); color: var(--gold); font-size: 12px; font-weight: 700; padding: 0 8px; }
.mini-btn:disabled { opacity: .35; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.wide-btn { flex: 1; min-height: 46px; border-radius: 10px; border: 1px solid var(--gold-2); color: var(--gold); font-weight: 700; background: rgba(243, 213, 138, .06); }
.wide-btn.blue { border-color: var(--blue); color: var(--blue); }
.choice { display: block; width: 100%; text-align: left; padding: 12px 14px; margin-bottom: 8px; border-radius: 10px; border: 1px solid rgba(122, 208, 255, .45); background: rgba(20, 40, 70, .6); }
.choice b { display: block; font-family: var(--mincho); font-size: 16px; color: var(--gold); }
.choice small { font-size: 12px; color: var(--ink-2); }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tabs button { flex: 1; height: 36px; border-radius: 8px; border: 1px solid var(--line); font-size: 13px; }
.tabs button.on { border-color: var(--gold); color: var(--gold); background: rgba(243, 213, 138, .08); }
.result-face { width: 120px; margin: 8px auto 0; }
.result-face img { width: 100%; display: block; border-radius: 12px; border: 1px solid var(--gold-2); }
.center { text-align: center; }
.big-gold { font-family: var(--mincho); font-size: 26px; color: var(--gold); margin: 4px 0; }
.toast { position: fixed; left: 50%; top: 40%; transform: translateX(-50%); z-index: 30; background: rgba(10, 12, 30, .92); border: 1px solid var(--line); color: var(--gold); padding: 10px 18px; border-radius: 99px; font-size: 14px; }

@media (hover: hover) and (pointer: fine) {
  .stick-area { transform: scale(.85); transform-origin: left bottom; }
}
#btn-examine { font-size: 15px; letter-spacing: 0; }
.town-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: auto; }
.chip.on { border-color: var(--gold); color: var(--gold); }

/* 顔の絵（町・迷宮の上の欄） */
.hud-face img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 右下のボタン：同じ大きさで 2列×3段。iPhone の画面の下のふちから十分はなす */
.cmd-grid {
  position: absolute; right: 10px; bottom: calc(env(safe-area-inset-bottom) + 26px);
  display: grid; grid-template-columns: repeat(2, 80px); grid-auto-rows: 52px; gap: 6px;
}
.cmd {
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--panel);
  font-size: 16px; font-weight: 800; line-height: 1.1; color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35); touch-action: manipulation;
}
.cmd small { display: block; font-size: 9px; font-weight: 400; color: var(--ink-2); margin-top: 2px; }
.cmd.main { border-color: var(--gold-2); color: var(--gold); font-family: var(--mincho); font-size: 18px; background: radial-gradient(circle at 40% 30%, #4a4060, #1a1630); }
.cmd.on { border-color: var(--blue); color: var(--blue); box-shadow: 0 0 10px rgba(122, 208, 255, .45); }
.cmd:active { transform: scale(.97); }
.town-cmds { grid-auto-rows: 64px; }

/* 8方向の矢印ボタン（左下）。iPhone の画面の下のふちから十分はなす */
.dpad {
  position: absolute; left: 10px; bottom: calc(env(safe-area-inset-bottom) + 26px);
  /* ボタンの大きさ：画面の幅に合わせて、52〜66px（右下のボタンとぶつからない大きさ） */
  --pad: clamp(52px, calc((100vw - 206px) / 3), 66px);
  display: grid; grid-template-columns: repeat(3, var(--pad)); grid-template-rows: repeat(3, var(--pad)); gap: 6px;
  touch-action: none;
}
.dpad button {
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--panel); color: var(--gold);
  font-size: 24px; font-weight: 800; line-height: 1; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); touch-action: none;
}
.dpad button.on { background: rgba(243, 213, 138, .22); border-color: var(--gold); box-shadow: 0 0 12px rgba(243, 213, 138, .45); }
.dpad-center { border-radius: 50%; margin: 14px; background: rgba(243, 213, 138, .12); border: 1px solid var(--line); }
.dpad.face button { color: var(--blue); border-color: rgba(122, 208, 255, .5); }

/* 矢印のまん中：休むボタン */
.dpad-center.rest { margin: 6px; padding: 0; color: var(--gold); font-family: var(--mincho); font-size: 15px; line-height: 1.05; display: flex; flex-direction: column; align-items: center; justify-content: center; touch-action: none; }
.dpad-center.rest small { font-size: 7px; letter-spacing: -.02em; white-space: nowrap; color: var(--ink-2); font-family: inherit; }
.dpad-center.rest.on { background: rgba(120, 220, 150, .3); }
.dpad-center.rest.faceon { background: rgba(122, 208, 255, .28); border-color: var(--blue); color: var(--blue); }
/* 場面が変わるときの暗転 */
.fade { position: fixed; inset: 0; z-index: 90; background: #000; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.fade.on { opacity: 1; pointer-events: auto; }
/* 店のいちばん上：いまの所持金 */
.m-body p.gold-bar { position: sticky; top: -12px; z-index: 2; margin: -12px -14px 10px; padding: 8px 14px; background: #121633; border-bottom: 1px solid var(--line); color: var(--gold); font-family: var(--mincho); font-size: 16px; font-weight: 700; text-align: right; }
/* 装備の小さな絵（HUD） */
.hud-sub .gear { display: flex; gap: 4px; margin-top: 3px; }
.hud-sub .gear .g { width: 22px; height: 22px; border-radius: 5px; background: rgba(14, 18, 44, .7); border: 1px solid var(--line); display: grid; place-items: center; }
.hud-sub .gear .g img { width: 20px; height: 20px; }
.hud-sub .gear .g.none { border-style: dashed; opacity: .55; font-size: 10px; color: var(--ink-2); }
/* 道具袋：装備中の欄 */
.gear-list li.equipped { background: rgba(243, 213, 138, .08); }
.gear-list li.empty { opacity: .6; }
.gear-none { width: 40px; height: 40px; border: 1px dashed var(--line); border-radius: 8px; display: grid; place-items: center; font-size: 12px; color: var(--ink-2); }
.list .tag { font-size: 11px; color: var(--gold); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }

/* 矢をうつボタン（矢がないときはうすく） */
#btn-arrow small { display: block; font-size: 10px; color: var(--ink-2); }
#btn-arrow.empty { opacity: .5; }

/* 仲間のチェンジ・バックアップ */
.party-list li { grid-template-columns: 60px 1fr auto; }
.party-list li img { width: 56px; height: 56px; flex: none; }
.party-list li small { display: block; }
.code-box { width: 100%; box-sizing: border-box; margin-top: 8px; background: rgba(14, 18, 44, .85); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-size: 11px; font-family: monospace; resize: vertical; word-break: break-all; }

/* 空腹のサイン：満腹度が0になると赤く光る。20以下はオレンジ */
#h-fullwrap.hungry i#h-full { color: #ffa040; }
#h-fullwrap.empty { color: #ff6a5a; }
#h-fullwrap.empty i#h-full { color: #ff4a3a; text-shadow: 0 0 6px rgba(255, 60, 40, .9); animation: starve-blink .8s ease-in-out infinite; }
.hud-sub .status.danger { color: #ff5a4a; font-weight: 800; font-size: 13px; text-shadow: 0 0 4px rgba(0, 0, 0, .9); animation: starve-blink .8s ease-in-out infinite; }
.dungeon.starving .hpbar { box-shadow: 0 0 0 2px #ff4a3a, 0 0 10px rgba(255, 60, 40, .7); animation: starve-ring .8s ease-in-out infinite; }
@keyframes starve-blink { 50% { opacity: .35; } }
@keyframes starve-ring { 50% { box-shadow: 0 0 0 2px rgba(255, 74, 58, .25), 0 0 3px rgba(255, 60, 40, .2); } }

/* ドラクエ風のステータス窓（黒い窓に、白い二重のふち。小さめ） */
.dq-win {
  margin: 8px 0 12px; padding: 8px 12px 10px; width: 210px; max-width: 100%;
  background: #000; border: 4px double #fff; border-radius: 6px;
  color: #fff; font-family: 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
  font-size: 14px; line-height: 1.5;
}
.dq-win .dq-name { font-size: 15px; font-weight: bold; padding-bottom: 3px; margin-bottom: 3px; }
.dq-win .dq-row { display: flex; justify-content: space-between; gap: 10px; }
.dq-win .dq-row b { font-weight: normal; font-variant-numeric: tabular-nums; }

/* 道具袋：迷宮の画面を出したまま、下に出す。リストは左、コマンドは右 */
.modal.dock { background: transparent; pointer-events: none; }
.modal.dock .panel { pointer-events: auto; height: 46vh; height: 46dvh; min-height: 260px; max-height: none; border-radius: 14px 14px 0 0; box-shadow: 0 -6px 24px rgba(0, 0, 0, .55); }
.modal.dock .panel header { display: none; }
.modal.dock .m-body { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 8px 10px 10px; overflow: hidden; }
.bag-top { display: flex; gap: 8px; align-items: center; }
.bag-top .wide-btn { min-height: 40px; }
.bag-count { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.bag-cols { display: grid; grid-template-columns: 1fr 112px; gap: 8px; flex: 1; min-height: 0; margin-top: 8px; }
.bag-list { overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; border: 1px solid var(--line); border-radius: 8px; padding: 0 4px; }
.bag-list li { grid-template-columns: 32px 1fr auto; gap: 8px; padding: 6px 2px; }
.bag-list li img { width: 32px; height: 32px; }
.bag-list li.sel { background: rgba(243, 213, 138, .2); outline: 1px solid var(--gold-2); border-radius: 6px; }
.bag-list li.sep { background: rgba(122, 208, 255, .08); }
.bag-cmds { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; touch-action: pan-y; }
.bag-cmds .wide-btn { flex: none; min-height: 40px; font-size: 13px; padding: 0 4px; }
.bag-cmds .info { font-size: 11px; line-height: 1.45; color: var(--ink-2); margin: 0; }
.bag-cmds .info.desc { color: var(--ink); padding-bottom: 6px; margin-bottom: 2px; border-bottom: 1px solid var(--line); }
