:root {
  --bg: #090b10;
  --panel: #111620;
  --panel-2: #171e2b;
  --card: #131a26;
  --line: rgba(255,255,255,.09);
  --text: #edf2ff;
  --muted: #97a3b7;
  --gold: #d7b46a;
  --gold-2: #f3d991;
  --red: #ff6b7a;
  --green: #74e0ad;
  --blue: #7ab8ff;
  --violet: #b68cff;
  --shadow: 0 20px 70px rgba(0,0,0,.35);
  --radius: 18px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(215,180,106,.18), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(122,184,255,.14), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font-cn);
}
button, input, select { font: inherit; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 280px 1fr; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 24px; border-right: 1px solid var(--line);
  background: rgba(9,11,16,.74); backdrop-filter: blur(18px);
}
.brand { display: flex; gap: 14px; align-items: center; margin-bottom: 28px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; font-weight: 900;
  background: linear-gradient(135deg, var(--gold), #765a2b);
  color: #16110a; box-shadow: 0 10px 26px rgba(215,180,106,.18);
}
.brand h1 { margin: 0; font-size: 23px; letter-spacing: .08em; }
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.nav { display: grid; gap: 10px; }
.nav button {
  border: 1px solid transparent; border-radius: 14px; padding: 12px 14px;
  color: var(--muted); background: transparent; text-align: left; cursor: pointer;
  transition: .18s ease;
}
.nav button:hover, .nav button.active {
  color: var(--text); background: rgba(255,255,255,.07); border-color: var(--line);
}
.sidebar-note {
  margin-top: 18px;
  padding: 14px; border: 1px solid var(--line); border-radius: 16px;
  background: rgba(255,255,255,.04); color: var(--muted); font-size: 13px;
}
.sidebar-note strong { color: var(--gold-2); display:block; margin-bottom: 5px; }
.main { padding: 28px; }
.view { display: none; animation: fade .18s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px);} to { opacity: 1; transform: translateY(0);} }
.hero {
  position: relative; overflow: hidden; border-radius: 28px; padding: 32px;
  background: linear-gradient(135deg, rgba(215,180,106,.17), rgba(122,184,255,.08) 50%, rgba(182,140,255,.12));
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.hero::after {
  content: ""; position: absolute; inset: auto -10% -40% auto; width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(215,180,106,.17), transparent 65%);
}
.hero h2 { margin: 0; font-size: 38px; letter-spacing: .04em; }
.hero p { margin: 14px 0 0; max-width: 880px; color: var(--muted); line-height: 1.8; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.card {
  border: 1px solid var(--line); background: rgba(19,26,38,.82);
  border-radius: var(--radius); padding: 18px; box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.card h3 { margin: 0 0 10px; font-size: 19px; }
.card p { color: var(--muted); line-height: 1.7; margin: 0; }
.section-title { display: flex; align-items: end; justify-content: space-between; margin: 28px 0 16px; }
.section-title h2 { margin: 0; font-size: 28px; }
.section-title p { margin: 0; color: var(--muted); }
.attr-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 14px; }
.attr { padding: 10px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.attr span { display:block; color: var(--muted); font-size: 12px; }
.attr strong { display:block; margin-top: 4px; color: var(--gold-2); font-size: 20px; }
.tags { display:flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag { border: 1px solid var(--line); background: rgba(255,255,255,.05); padding: 4px 9px; border-radius: 999px; color: var(--muted); font-size: 12px; }
.skill { padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.035); }
.skill + .skill { margin-top: 10px; }
.skill-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.skill-name { font-weight: 800; color: var(--text); }
.skill-meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.skill-desc { margin-top: 7px; color: var(--muted); line-height: 1.6; font-size: 14px; }
.tabs { display:flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.tab, .primary, .ghost, .danger {
  border: 1px solid var(--line); border-radius: 13px; padding: 10px 14px; cursor:pointer;
  background: rgba(255,255,255,.05); color: var(--text); transition: .18s ease;
}
.tab.active, .primary { background: linear-gradient(135deg, var(--gold), #8b6830); color: #15100a; border-color: rgba(243,217,145,.4); font-weight: 800; }
.ghost:hover, .tab:hover { background: rgba(255,255,255,.09); }
.danger { color: var(--red); }
.creator { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.form-row { display:grid; gap: 8px; margin-bottom: 14px; }
.form-row label { color: var(--muted); font-size: 14px; }
input, select {
  width: 100%; border: 1px solid var(--line); background: rgba(0,0,0,.2); color: var(--text);
  border-radius: 14px; padding: 12px 14px; outline: none;
}
.point-row { display:grid; grid-template-columns: 70px 1fr 42px 42px 48px; gap: 8px; align-items: center; margin-bottom: 10px; }
.point-row .bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.point-row .bar span { display:block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--blue)); }
.point-row button { height: 36px; border-radius: 12px; border:1px solid var(--line); background: rgba(255,255,255,.05); color:var(--text); cursor:pointer; }
.notice { padding: 14px 16px; border: 1px solid rgba(215,180,106,.26); background: rgba(215,180,106,.08); border-radius: 16px; color: #f1dfae; line-height: 1.7; }
.table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: 16px; }
.table th, .table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
.table th { color: var(--gold-2); font-weight: 800; background: rgba(255,255,255,.04); }
.table td { color: var(--muted); }
.placeholder { min-height: 260px; display:grid; place-items:center; text-align:center; color:var(--muted); border:1px dashed rgba(255,255,255,.18); border-radius:24px; background:rgba(255,255,255,.025); }
.placeholder strong { display:block; color:var(--text); font-size:24px; margin-bottom:8px; }
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .sidebar-note { margin-top: 16px; }
  .grid.two, .grid.three, .grid.five, .creator { grid-template-columns: 1fr; }
  .attr-list { grid-template-columns: repeat(2, 1fr); }
}

.event-toolbar { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; margin-bottom: 18px; }
.event-title-row { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.event-title-row p { color: var(--muted); margin-top: 4px; }
.event-count { border: 1px solid rgba(215,180,106,.32); color: var(--gold-2); padding: 7px 10px; border-radius: 999px; background: rgba(215,180,106,.08); white-space: nowrap; }
.event-scenes { display: grid; gap: 14px; margin-top: 16px; }
.event-scene { border: 1px solid var(--line); border-radius: 16px; padding: 15px; background: rgba(255,255,255,.035); }
.event-scene.quiet { border-color: rgba(122,184,255,.18); }
.event-scene.interactive { border-color: rgba(215,180,106,.22); }
.event-scene.combat { border-color: rgba(255,107,122,.20); }
.event-scene-head { display: flex; justify-content: space-between; gap: 10px; color: var(--gold-2); margin-bottom: 9px; }
.event-scene-head span { color: var(--muted); font-size: 13px; }
.event-text { color: var(--text) !important; line-height: 1.9 !important; margin: 0 0 10px !important; }
.event-rule { color: var(--muted); line-height: 1.7; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0,0,0,.16); }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.action-chip { color: #16110a; background: var(--gold-2); border-radius: 999px; padding: 5px 10px; font-weight: 800; font-size: 12px; }
.event-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.event-list-item { cursor: pointer; text-align: left; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); padding: 11px 12px; border-radius: 14px; transition: .18s ease; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.event-list-item span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.event-list-item:hover, .event-list-item.active { background: rgba(215,180,106,.10); border-color: rgba(215,180,106,.32); }
@media (max-width: 980px) {
  .event-toolbar { grid-template-columns: 1fr; }
  .event-list { grid-template-columns: 1fr; }
}


.recipe-head { display:flex; justify-content: space-between; gap: 14px; align-items: start; margin-bottom: 10px; }
.recipe-head p { margin-top: 4px; }
.quality-badge { border-radius: 999px; padding: 7px 11px; font-weight: 900; font-size: 12px; border: 1px solid var(--line); white-space: nowrap; }
.q-poor { color: #aeb6c2; background: rgba(150,160,175,.10); border-color: rgba(150,160,175,.24); }
.q-common { color: #dce3ee; background: rgba(255,255,255,.06); }
.q-fine { color: #84e0ad; background: rgba(116,224,173,.10); border-color: rgba(116,224,173,.25); }
.q-rare { color: #7ab8ff; background: rgba(122,184,255,.10); border-color: rgba(122,184,255,.25); }
.q-epic { color: #c7a0ff; background: rgba(182,140,255,.12); border-color: rgba(182,140,255,.30); }
.q-legend { color: #f3d991; background: rgba(215,180,106,.13); border-color: rgba(215,180,106,.34); }
.q-myth { color: #ffb3bd; background: rgba(255,107,122,.12); border-color: rgba(255,107,122,.30); }
.recipe-block { margin-top: 13px; }
.recipe-block strong { display:block; color: var(--gold-2); margin-bottom: 8px; }
.material-list, .stat-pills, .quality-row { display:flex; flex-wrap: wrap; gap: 8px; }
.material-chip, .stat-pills span, .quality-pill { border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--muted); border-radius: 999px; padding: 6px 10px; font-size: 13px; }
.stat-pills span { color: var(--text); }
.manual-rules { margin-bottom: 18px; }
.crafting-tabs { margin-top: 28px; }
.road-tabs { margin-bottom: 18px; }
.recipe-card.potion .quality-badge { color: #74e0ad; background: rgba(116,224,173,.10); border-color: rgba(116,224,173,.25); }

/* v0.1.4 制作手册反查 / 装备位置 / 战斗测试 */
.item-link {
  border: 0; background: transparent; color: var(--gold-2); cursor: pointer;
  padding: 0; font: inherit; text-decoration: underline; text-underline-offset: 3px;
}
.material-chip.clickable {
  cursor: pointer; color: var(--gold-2); transition: .16s ease;
}
.material-chip.clickable:hover {
  transform: translateY(-1px); border-color: rgba(215,180,106,.42); background: rgba(215,180,106,.12);
}
.item-detail { margin: 18px 0; border-color: rgba(122,184,255,.22); }
.item-detail.empty { border-style: dashed; }
.item-desc { color: var(--text) !important; line-height: 1.85 !important; }
.drop-source-list { display: grid; gap: 9px; }
.drop-source {
  display: grid; grid-template-columns: 180px 1fr; gap: 10px; align-items: start;
  border: 1px solid var(--line); border-radius: 13px; padding: 10px 12px;
  background: rgba(255,255,255,.035);
}
.drop-source b { color: var(--text); }
.drop-source span { color: var(--muted); line-height: 1.5; }
.slot-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 14px; }
.slot-road { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: rgba(255,255,255,.035); }
.slot-road-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; margin-bottom: 12px; }
.slot-road-head strong { color: var(--gold-2); font-size: 18px; }
.slot-road-head span { color: var(--muted); font-size: 12px; text-align: right; line-height: 1.5; }
.slot-list { display: grid; gap: 8px; }
.slot-item { display: grid; grid-template-columns: 70px 1fr; gap: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.slot-item b { color: var(--text); }
.slot-item span { color: var(--muted); line-height: 1.55; }
.battle-start { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: center; margin-top: 18px; }
.battle-start label { color: var(--gold-2); font-weight: 800; }
.battle-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.fighter-card.enemy { border-color: rgba(255,107,122,.22); }
.hpbar { height: 12px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.08); margin: 12px 0; border: 1px solid var(--line); }
.hpbar span { display: block; height: 100%; background: linear-gradient(90deg, #ff6b7a, #f3d991); }
.fighter-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.fighter-stats span { border: 1px solid var(--line); border-radius: 999px; padding: 5px 9px; color: var(--muted); background: rgba(255,255,255,.04); font-size: 13px; }
.battle-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.battle-actions button:disabled { opacity: .45; cursor: not-allowed; }
.battle-log { display: grid; gap: 10px; }
.battle-log p { margin: 0; border: 1px solid var(--line); border-radius: 15px; padding: 13px 15px; background: rgba(255,255,255,.035); color: var(--text); line-height: 1.8; }
@media (max-width: 980px) {
  .drop-source, .slot-item, .battle-start { grid-template-columns: 1fr; }
  .slot-guide-grid, .battle-layout { grid-template-columns: 1fr; }
}

/* v0.1.5 背包系统 */
.bagbar {
  height: 12px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.08);
  border: 1px solid var(--line); margin-top: 14px;
}
.bagbar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--blue)); }
.inventory-rules { margin: 18px 0; border-color: rgba(215,180,106,.24); }
.inventory-item.material { border-color: rgba(215,180,106,.14); }
.inventory-item.potion { border-color: rgba(116,224,173,.18); }
.inventory-item.equipment { border-color: rgba(122,184,255,.20); }
.inventory-item .item-desc { margin-bottom: 12px !important; }

/* v0.1.6 遗迹收尸人 */
.scavenger-item { border-color: rgba(215,180,106,.20); }
.scavenger-item.equipment { border-color: rgba(122,184,255,.25); }
.scavenger-item.potion { border-color: rgba(116,224,173,.22); }
.scavenger-item.material { border-color: rgba(215,180,106,.18); }
.scavenger-item .battle-actions { justify-content: flex-end; }
.scavenger-item button:disabled { opacity: .45; cursor: not-allowed; }


/* v0.1.7 城镇独立建筑 / 典当行 / 工坊 / 遇见图鉴 */
.material-chip.enough { border-color: rgba(116,224,173,.28); color: #a9f2ca; background: rgba(116,224,173,.08); }
.material-chip.missing { border-color: rgba(255,107,122,.28); color: #ffb3bd; background: rgba(255,107,122,.08); }
.pawn-item { border-color: rgba(215,180,106,.18); }
.pawn-item.material { border-color: rgba(215,180,106,.18); }
.pawn-item.potion { border-color: rgba(116,224,173,.20); }
.pawn-item.equipment { border-color: rgba(122,184,255,.22); }
.codex-entry { display: grid; gap: 12px; margin-bottom: 18px; }
.codex-meta { border-color: rgba(215,180,106,.22); background: rgba(215,180,106,.07); }
.recipe-card button:disabled, .pawn-item button:disabled { opacity: .45; cursor: not-allowed; }
.card .battle-actions { align-items: center; }


/* v0.1.8 事件按钮系统 */
.action-btn {
  border: 0;
  cursor: pointer;
  transition: .16s ease;
  box-shadow: 0 8px 18px rgba(215,180,106,.10);
}
.action-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
}
.action-btn:disabled {
  opacity: .52;
  cursor: not-allowed;
  filter: grayscale(.35);
}
.dungeon-log { margin-bottom: 22px; }
.event-scene .action-row { align-items: center; }

/* v0.1.9 屏幕式地下城布局 / 顶部背包 / 城镇NPC商店布局 */
.quick-bag-button {
  position: fixed; top: 18px; right: 22px; z-index: 80;
  border: 1px solid rgba(243,217,145,.42); border-radius: 999px;
  padding: 11px 17px; background: linear-gradient(135deg, var(--gold), #8b6830);
  color: #15100a; font-weight: 900; box-shadow: 0 10px 28px rgba(0,0,0,.32); cursor: pointer;
}
.bag-modal.hidden { display: none; }
.bag-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; }
.bag-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(8px); }
.bag-modal-panel {
  position: relative; width: min(980px, calc(100vw - 48px)); max-height: min(780px, calc(100vh - 48px));
  overflow: auto; border: 1px solid rgba(122,184,255,.26); border-radius: 28px;
  background: linear-gradient(180deg, rgba(19,26,38,.97), rgba(9,11,16,.97)); box-shadow: var(--shadow); padding: 22px;
}
.bag-modal-head { display:flex; justify-content:space-between; gap:18px; align-items:start; margin-bottom: 18px; }
.bag-modal-head h2 { margin:0; font-size:28px; }
.bag-modal-head p { margin:6px 0 0; color:var(--muted); }
.bag-modal-stats { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bag-modal-stats div { border:1px solid var(--line); border-radius:18px; padding:14px; background:rgba(255,255,255,.045); }
.bag-modal-stats strong { display:block; font-size:24px; color:var(--gold-2); }
.bag-modal-stats span { color:var(--muted); font-size:13px; }
.bag-item-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:12px; margin-top:18px; }
.bag-item { border:1px solid var(--line); border-radius:16px; padding:13px; background:rgba(255,255,255,.035); }
.bag-item b { display:block; color:var(--text); margin-bottom:4px; }
.bag-item span { color:var(--gold-2); font-size:13px; }
.bag-item p { color:var(--muted); line-height:1.65; margin:10px 0 0; font-size:14px; }
.bag-item.potion { border-color: rgba(116,224,173,.22); }
.bag-item.equipment { border-color: rgba(122,184,255,.24); }

.game-hud-title, .town-title { display:flex; align-items:end; justify-content:space-between; gap:18px; margin-bottom:18px; }
.game-hud-title h2, .town-title h2 { margin:0; font-size:32px; letter-spacing:.04em; }
.game-hud-title p, .town-title p { margin:7px 0 0; color:var(--muted); }
.dungeon-play-layout { display:grid; grid-template-columns: minmax(0, 1fr) 350px; gap:18px; align-items:stretch; min-height: calc(100vh - 130px); }
.dungeon-main-panel { display:grid; grid-template-rows: minmax(420px, 1fr) auto; gap:18px; min-width: 0; }
.dungeon-display {
  border: 1px solid rgba(122,184,255,.28); border-radius: 28px; padding:22px;
  background:
    radial-gradient(circle at 10% 10%, rgba(122,184,255,.12), transparent 38%),
    linear-gradient(180deg, rgba(16,22,33,.94), rgba(8,10,16,.96));
  box-shadow: var(--shadow); overflow:hidden; min-height:420px; display:flex; flex-direction:column; gap:16px;
}
.display-header { display:flex; justify-content:space-between; gap:12px; color:var(--blue); font-weight:900; letter-spacing:.08em; border-bottom:1px solid var(--line); padding-bottom:12px; }
.display-header em { color:var(--gold-2); font-style:normal; }
.dungeon-screen-intro { margin:auto 0; display:grid; gap:18px; }
.dungeon-screen-intro p { font-size:20px; line-height:2.05; color:var(--text); margin:0; max-width:980px; }
.dungeon-event-box { border:1px solid rgba(255,255,255,.12); border-radius:20px; background:rgba(255,255,255,.045); padding:18px; max-width:100%; }
.dungeon-event-box.quiet { border-color: rgba(122,184,255,.24); }
.dungeon-event-box.interactive { border-color: rgba(215,180,106,.28); }
.dungeon-event-box.combat { border-color: rgba(255,107,122,.30); }
.event-mini-head { display:flex; justify-content:space-between; gap:12px; margin-bottom:12px; }
.event-mini-head strong { display:block; color:var(--gold-2); font-size:22px; }
.event-mini-head span { display:block; color:var(--muted); margin-top:4px; }
.event-mini-head em { color:var(--muted); font-style:normal; }
.compact-rule { margin-top:12px; }
.screen-log { display:grid; gap:9px; overflow:auto; min-height:120px; max-height:240px; padding-right:4px; }
.screen-log p { border:1px solid var(--line); border-radius:14px; padding:11px 13px; background:rgba(0,0,0,.16); color:var(--muted); line-height:1.75; margin:0; }
.screen-log.muted-log p { text-align:center; color:var(--muted); }
.dungeon-command-deck { border:1px solid rgba(215,180,106,.22); border-radius:24px; padding:18px; background:rgba(19,26,38,.86); }
.command-title { display:flex; justify-content:space-between; gap:12px; margin-bottom:14px; color:var(--muted); }
.command-title strong { color:var(--gold-2); font-size:18px; }
.command-buttons .action-row, .command-buttons, .dungeon-command-deck .action-row { display:flex; flex-wrap:wrap; gap:12px; }
.big-action { font-size:18px; padding:13px 26px; border-radius:18px; }
.player-side-panel { display:grid; grid-template-rows: auto 1fr; gap:18px; min-width:0; }
.player-status-card, .equipment-panel { border:1px solid rgba(255,107,122,.23); border-radius:24px; padding:18px; background:rgba(19,26,38,.86); }
.player-name-row { display:flex; justify-content:space-between; gap:12px; align-items:start; margin-bottom:14px; }
.player-name-row h3 { margin:0; font-size:22px; }
.player-name-row span { color:var(--gold-2); font-size:13px; }
.resource-line { display:grid; grid-template-columns: 44px 1fr 80px; gap:10px; align-items:center; margin:12px 0; }
.resource-line b { color:var(--muted); font-size:13px; }
.resource-line em { color:var(--muted); font-style:normal; font-size:12px; text-align:right; }
.resource-bar { height:12px; border-radius:999px; background:rgba(255,255,255,.08); border:1px solid var(--line); overflow:hidden; }
.resource-bar span { display:block; height:100%; }
.resource-bar.hp span { background:linear-gradient(90deg, #ff6b7a, #f3d991); }
.resource-bar.mp span { background:linear-gradient(90deg, #7ab8ff, #b68cff); }
.mini-stat-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:8px; margin-top:14px; }
.mini-stat-grid span, .equipment-slot { border:1px solid var(--line); border-radius:13px; padding:9px; background:rgba(255,255,255,.035); color:var(--muted); font-size:13px; }
.equipment-panel h3 { margin:0 0 14px; }
.equipment-grid { display:grid; gap:10px; }
.equipment-slot { display:flex; justify-content:space-between; gap:10px; }
.equipment-slot b { color:var(--text); }
.dungeon-small-stats { display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; }
.dungeon-small-stats span { border:1px solid var(--line); border-radius:999px; padding:7px 11px; color:var(--muted); background:rgba(255,255,255,.04); }
.compact-start { display:grid; grid-template-columns: 160px auto auto; gap:12px; align-items:center; }
.battle-opponent-card { border:1px solid rgba(255,107,122,.24); border-radius:18px; padding:16px; background:rgba(255,107,122,.055); }
.battle-opponent-card h3 { margin:0 0 8px; }
.battle-opponent-card p { margin:0; color:var(--muted); }

.town-stat-row { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:18px; margin-bottom:18px; }
.town-shop-layout { display:grid; grid-template-columns: minmax(0, 1fr) 420px; gap:18px; min-height: calc(100vh - 180px); }
.shop-main-panel, .npc-panel { border:1px solid rgba(122,184,255,.24); border-radius:28px; background:rgba(19,26,38,.86); box-shadow:var(--shadow); overflow:hidden; }
.shop-main-panel { padding:20px; }
.shop-panel-head { border-bottom:1px solid var(--line); padding-bottom:16px; margin-bottom:16px; }
.shop-panel-head h3 { margin:0; font-size:26px; color:var(--blue); }
.shop-panel-head p { color:var(--muted); margin:6px 0 0; }
.shop-actions { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:14px; }
.shop-tabs { margin: 0 0 16px; }
.shop-card-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:14px; }
.shop-card { transition:.16s ease; }
.shop-card:hover { transform:translateY(-2px); border-color:rgba(215,180,106,.38); background:rgba(215,180,106,.06); }
.npc-panel { display:grid; grid-template-rows: 1fr auto; border-color: rgba(116,224,173,.28); }
.npc-portrait { min-height:420px; display:grid; place-items:center; text-align:center; padding:24px; background:radial-gradient(circle at 50% 30%, rgba(116,224,173,.14), transparent 34%), rgba(0,0,0,.15); }
.npc-portrait strong { display:block; font-size:34px; color:#9ee6b9; letter-spacing:.08em; }
.npc-portrait span { display:block; color:var(--muted); margin-top:8px; }
.npc-dialogue { border-top:1px solid rgba(255,107,122,.24); padding:22px; background:rgba(255,107,122,.055); min-height:190px; }
.npc-dialogue b { display:block; color:#ff9ca7; font-size:20px; margin-bottom:10px; }
.npc-dialogue p { color:var(--text); line-height:1.9; margin:0; font-size:17px; }
.workshop-quality-row { margin-bottom: 16px; }

@media (max-width: 1180px) {
  .dungeon-play-layout, .town-shop-layout { grid-template-columns: 1fr; }
  .player-side-panel { grid-template-columns: 1fr; grid-template-rows: auto; }
  .npc-portrait { min-height:260px; }
}
@media (max-width: 760px) {
  .main { padding: 18px; }
  .bag-modal-stats, .bag-item-grid, .town-stat-row, .shop-card-grid { grid-template-columns: 1fr; }
  .compact-start, .resource-line { grid-template-columns: 1fr; }
  .quick-bag-button { top: 10px; right: 10px; }
}

/* v0.1.10 事件叙事增强 / 规则隐藏 / 城镇建筑局部滚动 */
.dungeon-event-box {
  max-height: none;
}
.dungeon-event-box .event-text {
  font-size: 17px;
  line-height: 2.15 !important;
  letter-spacing: .02em;
  margin-bottom: 0 !important;
  white-space: pre-wrap;
}
.event-branch-note {
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid rgba(122,184,255,.18);
  border-radius: 14px;
  background: rgba(122,184,255,.055);
  color: var(--muted);
  line-height: 1.75;
  font-size: 14px;
}
.compact-rule { display: none !important; }
.dungeon-display {
  overflow: auto;
}
.screen-log {
  flex: 1 1 auto;
  min-height: 100px;
  max-height: 210px;
}

.town-shop-layout {
  height: calc(100vh - 184px);
  min-height: 620px;
  align-items: stretch;
}
.shop-main-panel {
  overflow-y: auto;
  min-height: 0;
}
.npc-panel {
  height: 100%;
  min-height: 0;
  position: sticky;
  top: 20px;
}
.npc-portrait {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.npc-dialogue {
  max-height: 230px;
  overflow-y: auto;
}
.shop-card-grid {
  padding-right: 4px;
}
.shop-main-panel::-webkit-scrollbar,
.npc-dialogue::-webkit-scrollbar,
.dungeon-display::-webkit-scrollbar {
  width: 9px;
}
.shop-main-panel::-webkit-scrollbar-thumb,
.npc-dialogue::-webkit-scrollbar-thumb,
.dungeon-display::-webkit-scrollbar-thumb {
  background: rgba(215,180,106,.35);
  border-radius: 999px;
}
.shop-main-panel::-webkit-scrollbar-track,
.npc-dialogue::-webkit-scrollbar-track,
.dungeon-display::-webkit-scrollbar-track {
  background: rgba(255,255,255,.04);
  border-radius: 999px;
}
@media (max-width: 1180px) {
  .town-shop-layout { height: auto; min-height: 0; }
  .shop-main-panel { max-height: none; overflow: visible; }
  .npc-panel { position: relative; top: auto; height: auto; }
  .npc-portrait { min-height: 260px; height: auto; }
}

/* v0.1.11 地下城当前页战斗 / 精简无用说明 / 经验条 */
.event-branch-note { display: none !important; }
.display-header span { font-size: 18px; }
.clean-stats span:last-child { display: none; }
.exp-block { margin: 12px 0; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: rgba(255,255,255,.035); }
.exp-top { display:flex; justify-content:space-between; gap:12px; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.exp-top b { color: var(--gold-2); }
.expbar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid var(--line); overflow: hidden; }
.expbar span { display:block; height:100%; background: linear-gradient(90deg, #f3d991, #7ab8ff); }
.exp-block p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.battle-inline-wrap { display: grid; gap: 14px; }
.battle-summary-row { display:flex; justify-content:space-between; gap:12px; align-items:center; border:1px solid rgba(215,180,106,.24); border-radius:16px; padding:12px 14px; background:rgba(215,180,106,.055); }
.battle-summary-row strong { color: var(--gold-2); }
.battle-summary-row span { color: var(--muted); }
.enemy-group-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.battle-opponent-card.defeated { opacity: .58; filter: grayscale(.45); }
.battle-screen-log { max-height: 330px; min-height: 220px; }
.dungeon-display.battle-mode { border-color: rgba(255,107,122,.36); }
.dungeon-battle-box { display:block; }
.dungeon-event-box .event-text { margin: 0 !important; }
.screen-log { margin-top: 0; }
@media (max-width: 900px) { .enemy-group-grid { grid-template-columns: 1fr; } }

/* v0.1.12 地下城文字与连续探索优化 */
.dungeon-display,
.dungeon-event-box,
.dungeon-screen-intro,
.battle-inline-wrap {
  font-family: "KaiTi", "STKaiti", "FangSong", "Microsoft YaHei", system-ui, sans-serif;
}
.dungeon-event-box .event-text,
.dungeon-screen-intro p.typewriter-text {
  font-size: 19px;
  line-height: 2.25 !important;
  letter-spacing: .045em;
  text-shadow: 0 0 12px rgba(122,184,255,.08);
}
.typewriter-text { min-height: 2.25em; white-space: pre-wrap; }
.typing-cursor {
  display: inline-block;
  color: var(--gold-2);
  animation: typingBlink 1s steps(2, start) infinite;
  margin-left: 2px;
}
@keyframes typingBlink { 50% { opacity: 0; } }
.dungeon-action-result {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(215,180,106,.24);
  background: rgba(215,180,106,.055);
}
.dungeon-action-result p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
  letter-spacing: .025em;
}
.persistent-status-note {
  margin: 10px 0 12px;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid rgba(215,180,106,.18);
  background: rgba(215,180,106,.045);
  color: var(--muted);
  line-height: 1.65;
  font-size: 13px;
}
.display-header span { color: var(--gold-2); }
.dungeon-display .screen-log:not(.battle-screen-log) { display: none; }

/* v0.1.14 continuous debuff source panel */
.status-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.status-pills span { display: inline-flex; flex-direction: column; gap: 2px; border: 1px solid rgba(255, 220, 140, .34); border-radius: 12px; padding: 6px 9px; background: rgba(255, 208, 120, .08); color: var(--gold); font-size: 12px; line-height: 1.25; }
.status-pills small { color: var(--muted); font-size: 11px; max-width: 240px; }


/* v0.1.16 第300层Boss档案 / 入场预览 */
.floor300-boss-view .boss-selector { display:flex; flex-wrap:wrap; gap:10px; margin:14px 0 18px; }
.boss-stage-card { position:relative; overflow:hidden; min-height:420px; border:1px solid rgba(255,255,255,.12); border-radius:24px; background:#080a0f; box-shadow:var(--shadow); }
.boss-stage-bg { position:absolute; inset:0; background-size:cover; background-position:center; filter:brightness(.58) saturate(1.05); transform:scale(1.02); }
.boss-stage-overlay { position:absolute; inset:0; background:linear-gradient(90deg, rgba(4,7,12,.9) 0%, rgba(4,7,12,.55) 48%, rgba(4,7,12,.22) 100%); }
.boss-stage-content { position:relative; z-index:1; padding:24px; max-width:860px; }
.boss-stage-content h2 { margin:0; font-size:32px; letter-spacing:.05em; }
.boss-stage-content p { color:#d7e2ff; line-height:1.8; max-width:780px; }
.boss-control-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
.boss-panel-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-top:18px; }
.boss-phase-card { border:1px solid var(--line); border-radius:18px; padding:16px; background:rgba(19,26,38,.78); }
.boss-phase-card h3 { margin:0 0 6px; }
.boss-stat-table { width:100%; border-collapse:collapse; margin-top:12px; }
.boss-stat-table td { border-bottom:1px solid rgba(255,255,255,.07); padding:7px 6px; color:var(--muted); }
.boss-stat-table b { color:var(--gold-2); }
.boss-skill-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.boss-skill-card { border:1px solid var(--line); border-radius:16px; padding:14px; background:rgba(255,255,255,.035); }
.boss-skill-card h4 { margin:0 0 6px; color:var(--text); }
.boss-skill-card p { color:var(--muted); line-height:1.7; margin:0; }
.logic-list { display:grid; gap:10px; margin-top:10px; }
.logic-list li { line-height:1.7; color:var(--muted); }
.boss-resource-note { color:var(--muted); border:1px solid var(--line); background:rgba(255,255,255,.04); border-radius:16px; padding:14px; margin-top:14px; line-height:1.7; }
@media (max-width:1100px){ .boss-panel-grid, .boss-skill-grid { grid-template-columns:1fr; } }

/* v0.1.18 Boss背景固定 / 对话字体 / 开发者Boss测试 */
body.boss-preview-active {
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}
.boss-stage-bg { background-attachment: fixed; }
.floor300-boss-view .game-hud-title p,
.boss-resource-note,
.boss-stage-content .boss-extra-intro { display:none !important; }
.boss-stage-content { max-width: 980px; }
.boss-stage-content h2 { text-shadow: 0 0 22px rgba(0,0,0,.72); }
.boss-dialogue-box {
  margin-top: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(3,6,12,.66);
  border-radius: 18px;
  padding: 18px 20px;
  max-height: 260px;
  overflow: auto;
  box-shadow: inset 0 0 22px rgba(0,0,0,.28);
}
.boss-dialogue-line,
.boss-dialogue-box p {
  font-family: var(--font-dialogue);
  font-size: 22px;
  line-height: 2.05;
  letter-spacing: .04em;
  color: #fff2e0;
  text-shadow: 0 0 14px rgba(0,0,0,.75), 0 0 10px rgba(215,180,106,.16);
  margin: 0 0 10px;
}
.boss-dialogue-narration {
  font-family: var(--font-dialogue);
  font-size: 20px;
  line-height: 2;
  color: #d9d4ca;
  opacity: .92;
}
.dialogue-trigger-grid { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.dialogue-trigger-grid button { padding:8px 11px; border-radius:12px; font-size:13px; }
.boss-test-layout {
  display:grid;
  grid-template-columns:minmax(0, 1fr) 360px;
  gap:18px;
  align-items:start;
}
.boss-test-arena {
  position:relative;
  min-height:620px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:24px;
  overflow:hidden;
  background:#080a0f;
  box-shadow:var(--shadow);
}
.boss-test-arena-bg {
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center;
  background-attachment:fixed;
  filter:brightness(.55) saturate(1.08);
  transform:scale(1.02);
}
.boss-test-arena-shade { position:absolute; inset:0; background:linear-gradient(180deg, rgba(5,7,10,.35), rgba(5,7,10,.88)); }
.boss-test-content { position:relative; z-index:1; padding:24px; display:grid; gap:16px; }
.boss-test-topline { display:flex; justify-content:space-between; gap:12px; align-items:start; }
.boss-test-topline h2 { margin:0; font-size:30px; letter-spacing:.05em; }
.boss-test-topline p { color:var(--muted); margin:7px 0 0; }
.boss-hp-box { min-width:260px; border:1px solid rgba(255,255,255,.14); border-radius:16px; padding:12px; background:rgba(0,0,0,.36); }
.boss-hp-box b { color:var(--gold-2); }
.boss-hp-bar { margin-top:8px; height:13px; border-radius:999px; overflow:hidden; background:rgba(255,255,255,.09); border:1px solid var(--line); }
.boss-hp-bar span { display:block; height:100%; background:linear-gradient(90deg, #ff6b7a, #f3d991); }
.boss-test-controls, .boss-test-panel { border:1px solid var(--line); border-radius:18px; padding:16px; background:rgba(19,26,38,.82); }
.boss-test-controls h3, .boss-test-panel h3 { margin:0 0 12px; color:var(--gold-2); }
.boss-test-controls .form-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.boss-test-controls input, .boss-test-controls select { width:100%; }
.boss-test-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }
.boss-test-log { max-height:300px; overflow:auto; }
.boss-test-log p { margin:0 0 8px; color:var(--muted); line-height:1.8; }
.boss-test-log p.dialogue { color:#fff2e0; font-family:var(--font-dialogue); font-size:21px; }
.boss-test-side .mini-stat-grid { grid-template-columns:1fr 1fr; }
@media (max-width:1200px){ .boss-test-layout { grid-template-columns:1fr; } }


/* v0.1.18：Boss测试场修复、Boss台词字体与英文名入场 */
.latin-text,
.boss-name-splash {
  font-family: var(--font-ui);
  letter-spacing: .06em;
}
.boss-dialogue-box .boss-quote-text,
.boss-test-log .boss-quote-text {
  font-family: var(--font-dialogue);
  font-size: 1.16em;
  color: #fff3df;
  text-shadow: 0 0 16px rgba(255,220,170,.13);
}
.boss-dialogue-box .boss-narration-text,
.boss-test-log .boss-narration-text {
  font-family: var(--font-cn);
  color: #c9d4ea;
}
.boss-dialogue-box p,
.boss-test-log p {
  white-space: pre-wrap;
}
.boss-test-log p.dialogue {
  font-family: var(--font-cn);
  font-size: 18px;
}
.boss-dialogue-line {
  font-family: var(--font-cn);
}
.boss-dialogue-full .boss-dialogue-line .boss-quote-text {
  font-size: 1.22em;
}
.boss-dialogue-trigger .boss-dialogue-line .boss-quote-text,
.boss-test-log p.dialogue .boss-quote-text {
  font-size: 1.28em;
}
body.boss-preview-active {
  background-size: cover !important;
  background-position: center center !important;
  background-attachment: fixed !important;
}
.boss-test-arena-bg,
.boss-stage-bg {
  background-attachment: fixed;
}
.boss-name-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  pointer-events: none;
  font-size: clamp(46px, 9vw, 128px);
  font-weight: 900;
  color: #f7e7b7;
  text-align: center;
  padding: 8vw;
  opacity: 0;
  transform: scale(.92);
  text-shadow:
    0 0 18px rgba(255,220,140,.35),
    0 0 60px rgba(150,80,255,.30),
    0 12px 40px rgba(0,0,0,.92);
  background:
    radial-gradient(circle at 50% 50%, rgba(10,10,16,.38), rgba(0,0,0,.72) 60%, rgba(0,0,0,.0) 100%);
  transition: opacity .45s ease, transform .55s ease, filter .55s ease;
}
.boss-name-splash.show {
  opacity: 1;
  transform: scale(1);
}
.boss-name-splash.hide {
  opacity: 0;
  transform: scale(1.08);
  filter: blur(5px);
}
.floor300-boss-view .section-title p,
.boss-test-layout + .boss-resource-note {
  display: none !important;
}

.material-group { border:1px solid rgba(255,255,255,.08); border-radius:16px; padding:10px; margin:8px 0; background:rgba(255,255,255,.035); }
.material-group > b { display:block; margin-bottom:8px; color:var(--gold-2); }
.mini-note { color:var(--muted); font-size:13px; margin:8px 0 0; }
.starter-shop { margin-bottom:16px; }


/* v0.1.32 combat readability */
.enemy-group-grid.targetable { display:grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap:12px; }
.battle-opponent-card { text-align:left; border:1px solid rgba(255,255,255,.12); background:rgba(9,10,16,.72); color:inherit; border-radius:14px; padding:14px; cursor:pointer; transition:.16s ease; }
.battle-opponent-card:hover { transform: translateY(-1px); border-color:rgba(255,210,140,.55); }
.battle-opponent-card.selected-target { box-shadow:0 0 0 2px rgba(255,205,120,.45), 0 12px 30px rgba(0,0,0,.25); border-color:rgba(255,205,120,.8); }
.battle-opponent-card.defeated { opacity:.45; filter:grayscale(.75); cursor:not-allowed; }
.intent-chip { display:inline-flex; margin-top:8px; padding:4px 8px; border-radius:999px; font-size:12px; background:rgba(255,255,255,.09); }
.intent-chip.danger-高 { background:rgba(255,72,72,.22); color:#ffd4d4; }
.intent-chip.danger-中 { background:rgba(255,190,80,.20); color:#ffe4ad; }
.intent-chip.danger-低 { background:rgba(130,210,255,.16); color:#d7f1ff; }
.player-battle-line { display:flex; gap:10px; flex-wrap:wrap; margin:8px 0 12px; }
.player-battle-line span, .player-battle-line b { padding:5px 9px; border-radius:999px; background:rgba(255,255,255,.08); font-size:13px; }
.action-hint { display:block; flex-basis:100%; margin-top:8px; opacity:.74; font-size:12px; }

/* v0.1.33 */
.alloc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-top:14px}.alloc-btn{display:flex;flex-direction:column;gap:4px;align-items:flex-start}.alloc-btn small{opacity:.72}.d20-tag{border-color:rgba(255,210,120,.45);background:rgba(255,210,120,.10);color:#ffe2a6}.allocation-card{border-color:rgba(255,210,120,.18)}


/* v0.1.34 地下城风格 UI 重绘：去 demo 化、石厅/暗金/羊皮纸质感 */
:root{
  --d-bg:#07090c; --d-panel:rgba(16,18,21,.92); --d-panel2:rgba(25,22,18,.88);
  --d-gold:#c9a45b; --d-gold2:#f0d18a; --d-blood:#7f1d1d; --d-line:rgba(221,183,106,.24);
  --d-text:#efe6d1; --d-muted:#a99d85; --d-green:#85b38a;
}
body{background:
  radial-gradient(circle at 70% -10%, rgba(185,119,45,.18), transparent 42%),
  radial-gradient(circle at 0% 100%, rgba(86,16,16,.25), transparent 45%),
  linear-gradient(135deg,#08090b 0%,#10100d 38%,#07090c 100%) !important;color:var(--d-text);}
body:before{content:"";position:fixed;inset:0;pointer-events:none;opacity:.16;background-image:linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px),linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px);background-size:58px 58px;mask-image:radial-gradient(circle at 50% 35%,#000 0%,transparent 78%);z-index:-1;}
.app-shell.dungeon-shell{max-width:1680px;margin:0 auto;padding:18px;gap:18px;}
.sidebar.dungeon-sidebar{background:linear-gradient(180deg,rgba(20,17,14,.96),rgba(8,9,11,.96));border:1px solid var(--d-line);box-shadow:0 20px 80px rgba(0,0,0,.5), inset 0 0 42px rgba(201,164,91,.05);border-radius:24px;}
.brand{border-bottom:1px solid var(--d-line);padding-bottom:16px}.brand-mark{background:radial-gradient(circle,#ead08a,#8d5d25 70%);color:#1a1007;box-shadow:0 0 28px rgba(201,164,91,.25)}.brand h1{letter-spacing:.18em}.brand p{color:var(--d-muted)}
.nav button{border:1px solid rgba(201,164,91,.12);background:linear-gradient(90deg,rgba(255,255,255,.03),rgba(201,164,91,.04));color:var(--d-text);border-radius:14px;margin-bottom:8px;position:relative;overflow:hidden}.nav button:before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:transparent}.nav button:hover{border-color:rgba(240,209,138,.42);transform:translateX(2px)}.nav button.active{background:linear-gradient(90deg,rgba(127,29,29,.55),rgba(201,164,91,.13));border-color:rgba(240,209,138,.55);box-shadow:inset 0 0 30px rgba(0,0,0,.25)}.nav button.active:before{background:var(--d-gold)}
.sidebar-note,.card,.boss-test-panel,.boss-test-controls,.player-side-panel,.dungeon-command-deck,.dungeon-display,.shop-card,.recipe-card,.skill,.boss-skill-card,.boss-phase-card{background:linear-gradient(180deg,rgba(25,24,22,.92),rgba(10,11,13,.9));border:1px solid var(--d-line);box-shadow:0 18px 48px rgba(0,0,0,.35), inset 0 0 36px rgba(201,164,91,.035);border-radius:20px;color:var(--d-text)}
.main.dungeon-main{background:linear-gradient(180deg,rgba(11,12,14,.76),rgba(5,6,8,.64));border:1px solid rgba(201,164,91,.16);border-radius:26px;box-shadow:0 24px 100px rgba(0,0,0,.45);}
.section-title h2,.game-hud-title h2{font-size:30px;letter-spacing:.08em;color:#f5e4b7;text-shadow:0 0 24px rgba(201,164,91,.18)}.section-title p,.game-hud-title p,.card p{color:var(--d-muted)}
button.primary,.primary{background:linear-gradient(180deg,#d8b46b,#76501f);border:1px solid #f5da94;color:#1b1007;box-shadow:0 10px 24px rgba(133,84,24,.22)}button.ghost,.ghost{background:rgba(255,255,255,.035);border:1px solid rgba(201,164,91,.28);color:var(--d-text)}button.danger,.danger{background:linear-gradient(180deg,#8d2424,#3e0909);border:1px solid rgba(255,180,150,.34);color:#ffe1d1}.quick-bag-button{background:linear-gradient(180deg,#d8b46b,#7b521f);color:#1b1007;border:1px solid #f5da94;box-shadow:0 12px 40px rgba(0,0,0,.5)}
.dungeon-hero{min-height:360px;border-radius:30px;border:1px solid var(--d-line);background:linear-gradient(90deg,rgba(7,9,12,.78),rgba(7,9,12,.35)),radial-gradient(circle at 80% 25%,rgba(201,164,91,.18),transparent 45%),linear-gradient(135deg,#0b0c0e,#1b1712);display:grid;align-items:end;padding:38px;box-shadow:inset 0 -80px 120px rgba(0,0,0,.46),0 28px 90px rgba(0,0,0,.35);position:relative;overflow:hidden}.dungeon-hero:after{content:"";position:absolute;inset:auto -10% -20% -10%;height:45%;background:radial-gradient(ellipse at center,rgba(127,29,29,.25),transparent 70%)}.dungeon-hero h2{font-size:52px;margin:0 0 14px;color:#f8e8bd;letter-spacing:.16em}.dungeon-hero p{max-width:780px;line-height:1.9;color:#d5c6a5}.dungeon-quick-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:18px}.dungeon-quick-card{padding:18px;border-radius:18px;background:rgba(255,255,255,.035);border:1px solid var(--d-line)}
.dungeon-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px}.dungeon-display{min-height:540px;padding:22px;background:linear-gradient(180deg,rgba(12,12,12,.92),rgba(7,8,10,.96));position:relative;overflow:hidden}.dungeon-display:before{content:"";position:absolute;inset:12px;border:1px solid rgba(201,164,91,.12);border-radius:16px;pointer-events:none}.display-header{border-bottom:1px solid var(--d-line);padding-bottom:12px;color:#f1d38a}.dungeon-event-box{background:rgba(0,0,0,.28);border:1px solid rgba(201,164,91,.16);border-radius:18px;padding:18px;margin-top:16px}.event-text,.dungeon-screen-intro p{font-size:16px;line-height:2;color:#e4d8bd}.event-branch-note{display:none!important}.player-side-panel{padding:16px}.equipment-slot{background:rgba(0,0,0,.22);border:1px solid rgba(201,164,91,.16);border-radius:12px}.resource-bar{background:rgba(0,0,0,.45)}.resource-bar.hp span{background:linear-gradient(90deg,#6c1111,#d45b45)}.resource-bar.mp span{background:linear-gradient(90deg,#1e406e,#6aa9ff)}
.battle-layout,.boss-test-layout{gap:18px}.battle-log,.boss-test-log{background:rgba(0,0,0,.36);border:1px solid rgba(201,164,91,.14);border-radius:18px;padding:16px}.fighter-card.enemy{border-color:rgba(127,29,29,.45)}.enemy-intent{color:#f0d18a}.tag{border-color:rgba(201,164,91,.22);background:rgba(201,164,91,.08);color:#edd49a}.table th{color:#c9a45b}.table td{color:#efe6d1}
.boss-sim-grid{display:grid;grid-template-columns:360px minmax(0,1fr);gap:18px}.boss-sim-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.boss-sim-form label{display:flex;flex-direction:column;gap:6px;color:var(--d-muted);font-size:13px}.boss-sim-form input,.boss-sim-form select,input,select{background:rgba(0,0,0,.36);border:1px solid rgba(201,164,91,.22);color:var(--d-text);border-radius:10px;padding:10px}.boss-sim-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.boss-sim-stats span{background:rgba(0,0,0,.25);border:1px solid rgba(201,164,91,.14);border-radius:12px;padding:10px;color:#e8d8b6}
@media(max-width:1100px){.dungeon-layout,.boss-sim-grid{grid-template-columns:1fr}.dungeon-quick-grid{grid-template-columns:1fr}.dungeon-hero h2{font-size:36px}}

/* v0.1.35：高阶暗黑 UI / 保险栏交互 */
:root{
  --lux-gold:#f2d08a;
  --lux-gold-deep:#9d6b2e;
  --lux-ink:#050608;
  --lux-panel:rgba(13,14,16,.96);
  --lux-red:#8d2020;
}
body{
  background:
    radial-gradient(circle at 20% -12%, rgba(242,208,138,.20), transparent 36rem),
    radial-gradient(circle at 88% 16%, rgba(93,31,27,.22), transparent 30rem),
    linear-gradient(135deg,#050608 0%,#10100e 52%,#050608 100%) !important;
}
body:after{
  content:""; position:fixed; inset:0; pointer-events:none; z-index:-1; opacity:.10;
  background:
    linear-gradient(115deg, transparent 0 46%, rgba(255,255,255,.08) 48%, transparent 50% 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 4px);
  mix-blend-mode:screen;
}
.app-shell.dungeon-shell{grid-template-columns:300px minmax(0,1fr);padding:22px;}
.sidebar.dungeon-sidebar{
  background:
    linear-gradient(180deg, rgba(27,22,17,.98), rgba(7,8,10,.98)),
    radial-gradient(circle at 50% 0%, rgba(242,208,138,.12), transparent 65%);
  border-color:rgba(242,208,138,.28);
  box-shadow:0 30px 100px rgba(0,0,0,.62), inset 0 1px 0 rgba(255,255,255,.06), inset 0 0 60px rgba(242,208,138,.045);
}
.brand-mark{border-radius:50%;box-shadow:0 0 0 1px rgba(255,255,255,.18),0 0 38px rgba(242,208,138,.32), inset 0 2px 8px rgba(255,255,255,.28);}
.nav button{
  padding:13px 15px 13px 18px;
  font-weight:800;
  letter-spacing:.04em;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}
.nav button:hover{box-shadow:0 10px 30px rgba(0,0,0,.22), inset 0 0 22px rgba(242,208,138,.045);}
.nav button.active{box-shadow:0 12px 35px rgba(0,0,0,.28), inset 0 0 32px rgba(242,208,138,.075);}
.main.dungeon-main{padding:34px;background:linear-gradient(180deg,rgba(14,15,17,.88),rgba(5,6,8,.78));border-color:rgba(242,208,138,.18);}
.card,.dungeon-display,.dungeon-command-deck,.player-side-panel,.shop-main-panel,.npc-panel,.bag-modal-panel,.recipe-card,.inventory-item,.skill{
  backdrop-filter: blur(10px);
  border-color:rgba(242,208,138,.18) !important;
  box-shadow:0 18px 55px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.035), inset 0 0 36px rgba(242,208,138,.025) !important;
}
button,.primary,.ghost,.danger,.tab,.action-btn,.action-chip{
  text-transform:none;
  letter-spacing:.04em;
  font-weight:900;
  position:relative;
  overflow:hidden;
}
button:after,.primary:after,.ghost:after,.danger:after,.tab:after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(120deg, transparent 0 30%, rgba(255,255,255,.16) 45%, transparent 60% 100%);
  transform:translateX(-120%); transition:transform .45s ease;
}
button:hover:after,.primary:hover:after,.ghost:hover:after,.danger:hover:after,.tab:hover:after{transform:translateX(120%);}
.primary,button.primary{
  border-radius:14px;
  background:linear-gradient(180deg,#ffe0a0 0%,#c18a3b 45%,#684115 100%) !important;
  border:1px solid rgba(255,232,175,.8) !important;
  box-shadow:0 10px 30px rgba(170,105,28,.32), inset 0 1px 0 rgba(255,255,255,.55), inset 0 -10px 20px rgba(44,20,2,.25) !important;
}
.ghost,button.ghost,.tab{
  border-radius:14px;
  background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(0,0,0,.18)) !important;
  border:1px solid rgba(242,208,138,.24) !important;
}
.danger,button.danger{
  border-radius:14px;
  background:linear-gradient(180deg,#9e2d2d,#3b0707) !important;
  border:1px solid rgba(255,180,150,.36) !important;
}
.premium-hero{min-height:420px;background:
  linear-gradient(90deg,rgba(5,6,8,.86),rgba(5,6,8,.42)),
  radial-gradient(circle at 78% 28%,rgba(242,208,138,.20),transparent 42%),
  radial-gradient(circle at 12% 85%,rgba(127,29,29,.22),transparent 38%),
  linear-gradient(135deg,#11100d,#030405) !important;
  border-color:rgba(242,208,138,.26) !important;
}
.premium-hero .hero-rune{position:absolute;right:48px;top:34px;font-size:132px;color:rgba(242,208,138,.06);filter:blur(.2px);}
.premium-hero h2{font-size:clamp(42px,5.4vw,78px);text-shadow:0 0 28px rgba(242,208,138,.28),0 12px 40px rgba(0,0,0,.86);}
.premium-quick .dungeon-quick-card{border:1px solid rgba(242,208,138,.18);background:linear-gradient(180deg,rgba(22,20,17,.72),rgba(7,8,10,.78));box-shadow:0 16px 42px rgba(0,0,0,.32);}
.dungeon-layout{grid-template-columns:minmax(0,1fr) 380px;}
.dungeon-display{min-height:620px;border-radius:26px;background:
  linear-gradient(180deg,rgba(8,9,11,.96),rgba(3,4,5,.98)),
  radial-gradient(circle at 50% 0%,rgba(242,208,138,.08),transparent 60%) !important;
}
.dungeon-display:before{inset:16px;border-radius:19px;border-color:rgba(242,208,138,.16);}
.display-header{font-weight:900;letter-spacing:.08em;}
.dungeon-event-box{border-radius:20px;background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(0,0,0,.18));}
.event-text,.dungeon-screen-intro p{font-size:17px;line-height:2.15;color:#f0e3c8!important;}
.quick-bag-button{right:28px;bottom:28px;border-radius:999px;padding:15px 18px;font-weight:900;letter-spacing:.08em;}
.insurance-panel{margin:18px 0;border-color:rgba(132,204,154,.28)!important;background:linear-gradient(180deg,rgba(16,28,20,.58),rgba(9,11,10,.9))!important;}
.insurance-bar span{background:linear-gradient(90deg,#85b38a,#f2d08a)!important;}
.insurance-actions{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0;}
.insurance-slots{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;margin-top:12px;}
.insurance-slot,.bag-item.insured,.inventory-item.insured{border-color:rgba(132,204,154,.45)!important;background:linear-gradient(180deg,rgba(42,78,50,.16),rgba(0,0,0,.12))!important;}
.insurance-slot{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;border:1px solid rgba(132,204,154,.32);border-radius:14px;padding:10px 12px;}
.insurance-slot b{color:#d9ffd9}.insurance-slot span{color:var(--d-muted);font-size:12px;grid-column:1/2;}
.insurance-card-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:12px 0 4px;}
.insured-mark{color:#bff3c9;border:1px solid rgba(132,204,154,.38);background:rgba(132,204,154,.10);padding:6px 10px;border-radius:999px;font-size:12px;font-weight:900;}
.mini{font-size:12px;padding:6px 10px!important;border-radius:10px!important;}
.bag-modal-panel{max-width:1180px;background:linear-gradient(180deg,rgba(16,17,19,.98),rgba(5,6,8,.98));border:1px solid rgba(242,208,138,.28);}
.bag-item{position:relative;}
.bag-item .mini{margin-top:8px;}
@media(max-width:1180px){.app-shell.dungeon-shell{grid-template-columns:1fr}.sidebar.dungeon-sidebar{height:auto;position:relative}.dungeon-layout{grid-template-columns:1fr}.main.dungeon-main{padding:22px}}


/* v0.1.36：地下城高级按钮与对话框体系
   设计目标：黑曜石、旧金属、暗金雕纹、羊皮纸发光边框；减少 demo 感，强化“地下城操作台”质感。 */
:root{
  --ui-obsidian:#050506;
  --ui-obsidian-2:#0b0b0d;
  --ui-charcoal:#171512;
  --ui-gold:#d7aa55;
  --ui-gold-soft:#ffe2a2;
  --ui-bronze:#7c4c19;
  --ui-blood:#7b1414;
  --ui-blood-hot:#d64a3a;
  --ui-emerald:#7dbe8d;
  --ui-blue:#79aeea;
  --ui-parchment:#ead7a8;
  --ui-line:rgba(255,221,155,.24);
  --ui-line-strong:rgba(255,226,162,.48);
}

/* 通用按钮基座：所有按钮统一成有厚度的金属按钮 */
button,
.primary,
.ghost,
.danger,
.tab,
.event-list-item,
.point-row button,
.battle-opponent-card,
.inventory-card button,
.shop-card button,
.dialogue-trigger-grid button{
  min-height: 38px;
  border-radius: 15px !important;
  letter-spacing: .055em;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(0,0,0,.38);
  transform: translateZ(0);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .16s ease, box-shadow .18s ease, border-color .18s ease, filter .18s ease, background .18s ease;
}
button:not(:disabled){ cursor: pointer; }
button:not(:disabled):hover,
.primary:not(:disabled):hover,
.ghost:not(:disabled):hover,
.danger:not(:disabled):hover,
.tab:not(:disabled):hover{
  transform: translateY(-2px);
  filter: saturate(1.08) brightness(1.04);
}
button:not(:disabled):active,
.primary:not(:disabled):active,
.ghost:not(:disabled):active,
.danger:not(:disabled):active,
.tab:not(:disabled):active{
  transform: translateY(1px) scale(.992);
  filter: brightness(.96);
}
button:disabled,
.primary:disabled,
.ghost:disabled,
.danger:disabled,
.tab:disabled{
  cursor: not-allowed !important;
  opacity: .42 !important;
  filter: grayscale(.65) brightness(.72);
  box-shadow: none !important;
}

/* 主按钮：推进、确认、购买、制作，暗金王权质感 */
.primary,
button.primary,
.big-action.primary{
  color: #1b1006 !important;
  background:
    linear-gradient(180deg, rgba(255,248,202,.98) 0%, rgba(233,188,93,.98) 20%, rgba(180,117,41,.98) 58%, rgba(92,51,13,.98) 100%) !important;
  border: 1px solid rgba(255,233,176,.95) !important;
  box-shadow:
    0 14px 34px rgba(135,79,18,.34),
    0 0 0 1px rgba(91,48,11,.55),
    inset 0 1px 0 rgba(255,255,255,.76),
    inset 0 -12px 22px rgba(46,21,2,.28),
    inset 0 0 0 2px rgba(255,228,160,.10) !important;
}
.primary::before,
button.primary::before{
  content:"";
  position:absolute;
  left:10px; right:10px; top:6px; height:1px;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent);
  pointer-events:none;
}
.primary.big-action,
button.big-action{
  min-height: 54px;
  padding: 14px 24px !important;
  font-size: 16px;
  border-radius: 18px !important;
  letter-spacing: .12em;
}

/* 次级按钮：探索、查看、切换页签，黑铁镶金 */
.ghost,
button.ghost,
.tab,
button.tab,
.point-row button,
.dialogue-trigger-grid button{
  color: #f0dfbd !important;
  background:
    linear-gradient(180deg, rgba(31,30,27,.96) 0%, rgba(13,14,16,.96) 62%, rgba(4,5,6,.98) 100%) !important;
  border: 1px solid rgba(223,177,87,.34) !important;
  box-shadow:
    0 10px 26px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.06),
    inset 0 -10px 20px rgba(0,0,0,.22) !important;
}
.ghost:hover,
button.ghost:hover,
.tab:hover,
button.tab:hover{
  border-color: rgba(255,226,162,.62) !important;
  box-shadow:
    0 16px 36px rgba(0,0,0,.36),
    0 0 26px rgba(215,170,85,.08),
    inset 0 0 28px rgba(215,170,85,.065) !important;
}
.tab.active,
button.tab.active{
  color:#1a1006 !important;
  background:linear-gradient(180deg,#f4d899,#bb8131 55%,#6c3f12) !important;
  border-color: rgba(255,236,184,.82) !important;
}

/* 危险按钮：退出、删除、死亡结算，血红铁印 */
.danger,
button.danger{
  color:#ffe5d9 !important;
  background:
    linear-gradient(180deg, rgba(170,49,44,.98) 0%, rgba(105,18,18,.98) 55%, rgba(41,4,4,.98) 100%) !important;
  border:1px solid rgba(255,163,137,.45) !important;
  box-shadow:
    0 12px 32px rgba(92,10,10,.35),
    inset 0 1px 0 rgba(255,255,255,.16),
    inset 0 -12px 22px rgba(0,0,0,.28) !important;
}
.danger:hover,
button.danger:hover{
  border-color: rgba(255,207,184,.62) !important;
  box-shadow:0 16px 38px rgba(118,16,16,.42), inset 0 0 30px rgba(255,120,80,.08) !important;
}

/* 地下城主操作区按钮：形成“指令牌”布局 */
.command-buttons,
.battle-actions,
.action-row,
.boss-control-row,
.boss-test-actions,
.insurance-actions,
.shop-actions{
  gap: 12px !important;
}
.command-buttons button,
.battle-actions button,
.action-row button,
.boss-control-row button,
.boss-test-actions button,
.insurance-actions button,
.shop-actions button{
  padding: 11px 16px !important;
}
.command-buttons button{
  min-height: 46px;
  min-width: 112px;
}
.command-buttons button:not(.danger):not(.primary){
  background:linear-gradient(180deg, rgba(32,29,23,.96), rgba(9,10,12,.98)) !important;
}

/* 事件按钮：采集/探索/警戒更像可选择的地下城行动牌 */
.event-list-item,
.action-chip,
.battle-opponent-card{
  border-color: rgba(215,170,85,.24) !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(215,170,85,.10), transparent 45%),
    linear-gradient(180deg, rgba(20,20,20,.88), rgba(7,8,10,.94)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 10px 28px rgba(0,0,0,.22);
}
.event-list-item:hover,
.battle-opponent-card:hover{
  border-color: rgba(255,226,162,.58) !important;
  box-shadow:0 16px 40px rgba(0,0,0,.34), inset 0 0 30px rgba(215,170,85,.07);
}
.battle-opponent-card.selected-target{
  border-color: rgba(255,226,162,.88) !important;
  box-shadow:
    0 0 0 2px rgba(255,220,140,.30),
    0 18px 46px rgba(0,0,0,.42),
    inset 0 0 36px rgba(215,170,85,.10) !important;
}

/* 快捷背包按钮：悬浮金币铭牌 */
.quick-bag-button{
  min-width: 82px;
  height: 54px;
  padding: 0 18px !important;
  border-radius: 999px !important;
  color:#1a1006 !important;
  background:linear-gradient(180deg,#ffe5a8,#bd8233 58%,#5c3510) !important;
  border:1px solid rgba(255,232,175,.88) !important;
  box-shadow:0 18px 50px rgba(0,0,0,.55),0 0 28px rgba(215,170,85,.18),inset 0 1px 0 rgba(255,255,255,.65) !important;
}
.quick-bag-button::before{
  content:"✦";
  margin-right:6px;
}

/* 输入框也统一为暗金石槽 */
input, select, textarea{
  background:linear-gradient(180deg,rgba(6,7,8,.72),rgba(15,13,10,.86)) !important;
  border:1px solid rgba(215,170,85,.26) !important;
  color:#f1e3c2 !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035), inset 0 0 18px rgba(0,0,0,.28);
}
input:focus, select:focus, textarea:focus{
  border-color:rgba(255,226,162,.68) !important;
  box-shadow:0 0 0 3px rgba(215,170,85,.10), inset 0 0 18px rgba(0,0,0,.22) !important;
}

/* 对话框总体系：羊皮纸+黑金边框+发光标题 */
.npc-dialogue,
.boss-dialogue-box,
.battle-log p,
.boss-test-log p,
.notice,
.dungeon-event-box,
.event-scene,
.item-detail,
.placeholder{
  position: relative;
  border-radius: 22px !important;
  border: 1px solid rgba(255,226,162,.24) !important;
  background:
    linear-gradient(180deg, rgba(27,23,17,.88), rgba(7,8,10,.92)) !important;
  box-shadow:
    0 18px 46px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,255,255,.045),
    inset 0 0 44px rgba(215,170,85,.035) !important;
  overflow: hidden;
}
.npc-dialogue::before,
.boss-dialogue-box::before,
.battle-log p::before,
.boss-test-log p::before,
.notice::before,
.dungeon-event-box::before,
.event-scene::before{
  content:"";
  position:absolute;
  inset:10px;
  border:1px solid rgba(255,226,162,.085);
  border-radius: 16px;
  pointer-events:none;
}
.npc-dialogue::after,
.boss-dialogue-box::after,
.notice::after,
.dungeon-event-box::after{
  content:"";
  position:absolute;
  left:20px; right:20px; top:0; height:1px;
  background:linear-gradient(90deg, transparent, rgba(255,226,162,.44), transparent);
  pointer-events:none;
}
.npc-dialogue b,
.boss-dialogue-box b,
.display-header span,
.command-title strong{
  color: var(--ui-gold-soft) !important;
  text-shadow: 0 0 18px rgba(215,170,85,.18);
  letter-spacing: .08em;
}
.npc-dialogue p,
.boss-dialogue-box p,
.battle-log p,
.boss-test-log p,
.notice,
.event-text,
.item-desc{
  color:#f1e6cc !important;
  line-height: 2.05 !important;
}

/* NPC对话：右侧对话栏更像“人物对白框” */
.npc-panel{
  background:
    radial-gradient(circle at 50% 20%, rgba(125,190,141,.10), transparent 32%),
    linear-gradient(180deg, rgba(16,18,18,.96), rgba(5,6,7,.98)) !important;
}
.npc-portrait{
  background:
    radial-gradient(circle at 50% 28%, rgba(215,170,85,.12), transparent 34%),
    linear-gradient(180deg, rgba(11,12,13,.36), rgba(0,0,0,.18)) !important;
}
.npc-portrait strong{
  color:#f7dfaa !important;
  text-shadow:0 0 24px rgba(215,170,85,.22);
}
.npc-dialogue{
  min-height: 210px;
  padding: 26px 26px 28px 30px !important;
  background:
    radial-gradient(circle at 16px 18px, rgba(255,226,162,.16), transparent 18px),
    linear-gradient(180deg, rgba(35,27,18,.92), rgba(9,9,10,.94)) !important;
}
.npc-dialogue b::before{
  content:"◆ ";
  color: var(--ui-gold);
}

/* Boss台词：更宽、更像镜头字幕框；台词和叙述区分 */
.boss-dialogue-box{
  padding: 22px 24px !important;
  background:
    linear-gradient(90deg, rgba(5,6,8,.94), rgba(24,18,14,.90), rgba(5,6,8,.94)) !important;
  border-color: rgba(255,226,162,.30) !important;
}
.boss-dialogue-line,
.boss-dialogue-narration{
  padding: 8px 4px;
  margin: 0 0 8px !important;
}
.boss-dialogue-box .boss-quote-text,
.boss-test-log .boss-quote-text{
  color:#fff0cf !important;
  text-shadow:0 0 16px rgba(255,226,162,.18), 0 2px 12px rgba(0,0,0,.5) !important;
}
.boss-dialogue-box .boss-narration-text,
.boss-test-log .boss-narration-text{
  color:#cbbf9f !important;
}
.dialogue-trigger-grid button{
  min-height: 36px;
  padding: 8px 12px !important;
  font-size: 12px;
}

/* 战斗日志：每条像一张战报羊皮纸 */
.battle-log,
.boss-test-log{
  background:
    linear-gradient(180deg, rgba(5,6,8,.80), rgba(12,10,8,.86)) !important;
  border:1px solid rgba(215,170,85,.18) !important;
}
.battle-log p,
.boss-test-log p{
  padding: 14px 18px 14px 20px !important;
  margin-bottom: 10px !important;
  border-left: 3px solid rgba(215,170,85,.52) !important;
}
.battle-log p:first-child,
.boss-test-log p:first-child{
  border-color: rgba(255,226,162,.36) !important;
  box-shadow: 0 16px 42px rgba(0,0,0,.32), inset 0 0 32px rgba(215,170,85,.045) !important;
}

/* 地下城事件文字：加强阅读高级感 */
.dungeon-event-box{
  padding: 22px 24px !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(127,29,29,.13), transparent 34%),
    linear-gradient(180deg, rgba(22,19,15,.88), rgba(6,7,8,.94)) !important;
}
.event-text::first-letter{
  color: var(--ui-gold-soft);
  font-size: 1.25em;
  font-weight: 900;
}

/* 弹窗：背包/对话类弹窗更像地下城浮层 */
.bag-modal-backdrop{
  backdrop-filter: blur(8px);
  background: radial-gradient(circle at 50% 30%, rgba(70,32,12,.38), rgba(0,0,0,.80)) !important;
}
.bag-modal-panel{
  border-radius: 28px !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(215,170,85,.10), transparent 48%),
    linear-gradient(180deg, rgba(17,17,17,.98), rgba(4,5,6,.99)) !important;
  border:1px solid rgba(255,226,162,.34) !important;
}
.bag-modal-head{
  border-bottom:1px solid rgba(255,226,162,.18);
  padding-bottom: 14px;
}
.bag-modal-head h2{
  color:#f9e4ad;
  letter-spacing:.12em;
}

@media (max-width: 780px){
  .command-buttons button,
  .battle-actions button,
  .action-row button{
    width: 100%;
  }
  .primary.big-action,
  button.big-action{
    width: 100%;
  }
}


/* v0.1.37 交互修复：所有装饰性遮罩只负责视觉，不再接管鼠标点击。 */
.dungeon-hero::before,
.dungeon-hero::after,
.premium-hero::before,
.premium-hero::after,
.dungeon-quick-card::before,
.dungeon-quick-card::after,
.card::before,
.card::after,
.dungeon-display::before,
.dungeon-display::after,
.dungeon-command-deck::before,
.dungeon-command-deck::after,
.player-side-panel::before,
.player-side-panel::after,
.npc-dialogue::before,
.npc-dialogue::after,
.boss-dialogue-box::before,
.boss-dialogue-box::after,
.battle-log p::before,
.boss-test-log p::before,
.notice::before,
.notice::after,
.dungeon-event-box::before,
.dungeon-event-box::after,
.event-scene::before,
.event-scene::after,
.bag-modal-panel::before,
.bag-modal-panel::after {
  pointer-events: none !important;
}
.dungeon-hero > *,
.premium-hero > *,
.dungeon-display > *,
.dungeon-command-deck > *,
.player-side-panel > *,
.bag-modal-panel > * {
  position: relative;
  z-index: 1;
}
button,
.action-chip,
.event-list-item,
.battle-opponent-card,
.quick-bag-button,
[data-home-go],
[data-event-action],
[data-open-bag],
[data-view] {
  pointer-events: auto !important;
}

/* v0.1.38 药方未学习状态 */
.locked-recipe{position:relative;filter:saturate(.78);}
.locked-recipe:after{content:'药方未掌握';position:absolute;right:18px;top:18px;border:1px solid rgba(202,170,104,.55);color:#e9d39a;background:rgba(22,14,7,.82);padding:4px 10px;border-radius:999px;font-size:12px;letter-spacing:.12em;pointer-events:none;}
.locked-recipe .recipe-block,.locked-recipe p{opacity:.82;}

/* v0.1.39：地下城全屏探索、备战界面、按键可读性修复 */
body.dungeon-fullscreen{overflow:hidden;background:#020202!important;}
body.dungeon-fullscreen .app-shell{display:block;min-height:100vh;width:100vw;}
body.dungeon-fullscreen .sidebar{display:none!important;}
body.dungeon-fullscreen .main{width:100vw;max-width:none;margin:0;padding:0!important;}
body.dungeon-fullscreen .view{min-height:100vh;}
body.dungeon-fullscreen #dungeon.view.active{display:block;padding:22px 26px 28px!important;}
.dungeon-full-hud{display:flex;justify-content:space-between;gap:18px;align-items:center;margin:0 0 18px;padding:18px 22px;border:1px solid rgba(240,198,112,.28);border-radius:24px;background:linear-gradient(180deg,rgba(17,17,14,.95),rgba(5,5,6,.96));box-shadow:0 22px 80px rgba(0,0,0,.5), inset 0 0 34px rgba(216,164,74,.06);}
.dungeon-full-hud h2{margin:0;color:#ffe5a7;text-shadow:0 0 20px rgba(255,204,122,.22);letter-spacing:.16em;}
.dungeon-full-hud p{margin:6px 0 0;color:#d9c59b;}
.dungeon-run-menu{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end;}
.dungeon-full-layout{height:calc(100vh - 122px);display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:18px;}
body.dungeon-fullscreen .dungeon-display{min-height:calc(100vh - 290px);max-height:calc(100vh - 290px);overflow:auto;}
body.dungeon-fullscreen .player-side-panel{max-height:calc(100vh - 122px);overflow:auto;}
.dungeon-prep-shell{max-width:1280px;margin:0 auto;padding:8px 0 40px;}
.dungeon-prep-notice{margin:14px 0 18px;}
.prep-grid{margin:16px 0;}
.prep-item-list{display:grid;gap:10px;max-height:520px;overflow:auto;padding-right:6px;}
.prep-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:14px 16px;border:1px solid rgba(231,190,111,.18);border-radius:18px;background:linear-gradient(180deg,rgba(19,18,15,.88),rgba(7,7,8,.92));}
.prep-item.disabled{opacity:.58;filter:saturate(.6);}
.prep-item b{display:block;color:#ffe2a8;letter-spacing:.08em;}
.prep-item span{display:block;margin:4px 0;color:#c9b98d;font-size:12px;}
.prep-item p{margin:0;color:#b8ad95;font-size:13px;line-height:1.65;}
.prep-actions{display:flex;gap:8px;}
.prep-chosen-list{display:flex;flex-wrap:wrap;gap:8px;}
.prep-chosen-list span{padding:7px 10px;border:1px solid rgba(255,222,160,.24);border-radius:999px;background:rgba(216,164,74,.08);color:#ffe0a1;}
.pause-card{border-color:rgba(127,29,29,.38)!important;box-shadow:0 26px 80px rgba(0,0,0,.45), inset 0 0 42px rgba(127,29,29,.08)!important;}
.command-buttons button,.battle-actions button,.action-row button,.dungeon-run-menu button,.prep-actions button,button.primary,button.ghost,button.danger{color:#ffe8b6!important;text-shadow:0 1px 2px #000,0 0 14px rgba(255,210,130,.28)!important;font-weight:900!important;letter-spacing:.08em!important;opacity:1!important;}
button.ghost{background:linear-gradient(180deg,rgba(42,34,22,.96),rgba(8,8,10,.98))!important;border-color:rgba(255,218,150,.32)!important;}
button.primary{background:linear-gradient(180deg,#8f6930,#3a2410 54%,#111)!important;border-color:rgba(255,226,162,.56)!important;color:#fff3cf!important;box-shadow:0 12px 30px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,238,184,.45),inset 0 -10px 22px rgba(0,0,0,.32)!important;}
button.danger{background:linear-gradient(180deg,#8d211d,#35100e 58%,#080505)!important;border-color:rgba(255,114,102,.48)!important;color:#ffe0d8!important;}
button:disabled{color:#8e7b5a!important;text-shadow:none!important;filter:none!important;opacity:.68!important;cursor:not-allowed!important;}
.command-buttons button:hover:not(:disabled),.battle-actions button:hover:not(:disabled),.dungeon-run-menu button:hover:not(:disabled),.prep-actions button:hover:not(:disabled){transform:translateY(-1px);filter:brightness(1.12);box-shadow:0 16px 42px rgba(0,0,0,.42),0 0 22px rgba(216,164,74,.16)!important;}
@media(max-width:980px){.dungeon-full-layout{grid-template-columns:1fr;height:auto}.dungeon-full-hud{align-items:flex-start;flex-direction:column}body.dungeon-fullscreen{overflow:auto}body.dungeon-fullscreen .dungeon-display{min-height:420px;max-height:none}.dungeon-run-menu{justify-content:flex-start}.prep-item{grid-template-columns:1fr}.prep-actions{justify-content:flex-start}}

/* v0.1.40：按钮交互与角色档案弹窗修复 */
button, [role="button"], .nav button, [data-view], [data-home-go], [data-event-action], [data-open-bag], [data-prep-add], [data-prep-remove], [data-archive-active], [data-archive-delete] {
  pointer-events: auto !important;
  position: relative;
  z-index: 5;
}
.app-shell, .main, .view, .card, .dungeon-hero, .dungeon-display, .dungeon-command-deck, .battle-actions, .command-buttons, .archive-actions { pointer-events: auto !important; }
.first-character-modal{position:fixed;inset:0;z-index:99999;display:grid;place-items:center;padding:24px;background:rgba(0,0,0,.42);backdrop-filter:blur(10px)}
.first-character-backdrop{position:absolute;inset:0;background:radial-gradient(circle at 50% 20%,rgba(209,163,82,.16),rgba(0,0,0,.82) 60%,rgba(0,0,0,.94));pointer-events:none}
.first-character-panel{position:relative;width:min(1180px,96vw);max-height:92vh;overflow:auto;border-radius:30px;border:1px solid rgba(241,208,138,.34);background:linear-gradient(180deg,rgba(20,18,15,.98),rgba(7,8,9,.98));box-shadow:0 40px 120px rgba(0,0,0,.7),inset 0 1px 0 rgba(255,255,255,.08),inset 0 0 60px rgba(215,170,85,.05);padding:26px}
.modal-title h2{margin:0;color:#ffe8b8;font-size:34px;letter-spacing:.12em}.modal-title p{color:#d6c29a;line-height:1.8}.modal-creator{margin-top:18px}.first-character-panel input,.first-character-panel select{width:100%;margin:8px 0 16px;border-radius:14px;border:1px solid rgba(215,170,85,.28);background:rgba(0,0,0,.35);color:#ffe8bd;padding:12px 14px}.first-character-panel label{color:#f3d99b;font-weight:900;letter-spacing:.06em}.first-character-panel .point-row{grid-template-columns:88px 1fr 42px 42px 56px}.first-character-panel button:disabled{opacity:.52!important}
.archive-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(420px,1fr));gap:18px}.character-archive-card{position:relative;overflow:hidden}.character-archive-card.active{border-color:rgba(255,220,150,.55)!important;box-shadow:0 24px 80px rgba(0,0,0,.48),0 0 32px rgba(215,170,85,.12),inset 0 0 45px rgba(215,170,85,.055)!important}.archive-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}.archive-card-head h3{margin:0;color:#ffe8b6;font-size:28px}.archive-card-head p{margin:6px 0 0;color:#cdb98d}.archive-card-head span{border:1px solid rgba(215,170,85,.34);border-radius:999px;padding:6px 10px;color:#f5d68b;background:rgba(0,0,0,.28);font-size:12px;font-weight:900;letter-spacing:.14em}.archive-actions{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}.archive-skill-list{display:grid;grid-template-columns:1fr;gap:10px;max-height:260px;overflow:auto;padding-right:4px}.section-title.compact{margin:14px 0 10px}.section-title.compact h2{font-size:21px}.archive-stat-table th,.archive-stat-table td{font-size:13px}
.nav button[data-view="create"]{display:none!important}.nav button[data-view="profile"]::after{content:"";}
@media(max-width:720px){.archive-grid{grid-template-columns:1fr}.first-character-panel{padding:18px}.modal-title h2{font-size:26px}.first-character-panel .point-row{grid-template-columns:64px 1fr 36px 36px 44px}}


/* v0.1.41：按钮点击层级硬修复 + 城镇NPC立绘 */
button, [role="button"], [data-view], [data-home-go], [data-event-action], [data-open-bag], [data-prep-add], [data-prep-remove], .nav button {
  pointer-events: auto !important;
  user-select: none;
}
button { position: relative; z-index: 20; }
.nav button { z-index: 30; }
.dungeon-run-menu, .battle-actions, .action-row, .prep-actions, .archive-actions, .shop-actions { position: relative; z-index: 35; pointer-events: auto !important; }
.app-shell, .sidebar, .main, .view, .card, .shop-main-panel, .npc-panel, .dungeon-display, .dungeon-command-deck { pointer-events: auto !important; }
.app-shell::before, .app-shell::after, .sidebar::before, .sidebar::after, .main::before, .main::after, .view::before, .view::after, .card::before, .card::after, .dungeon-hero::before, .dungeon-hero::after, .dungeon-display::before, .dungeon-display::after, .shop-main-panel::before, .shop-main-panel::after, .npc-panel::before, .npc-panel::after {
  pointer-events: none !important;
}
.npc-portrait-image {
  min-height: 520px;
  background-size: cover !important;
  background-position: center top !important;
  align-items: end !important;
  padding: 0 !important;
  overflow: hidden;
  position: relative;
}
.npc-portrait-image::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 22%, rgba(255,235,190,.10), transparent 38%), linear-gradient(180deg, transparent 45%, rgba(0,0,0,.78));
}
.npc-nameplate {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 22px 24px 24px;
  background: linear-gradient(180deg, rgba(10,8,6,0), rgba(10,8,6,.88));
  border-top: 1px solid rgba(231,198,127,.22);
}
.npc-nameplate strong { color: #ffe7b2 !important; text-shadow: 0 0 18px rgba(234,185,96,.22); }
.npc-nameplate span { color: #d9c39a !important; }
@media (max-width: 980px) { .npc-portrait-image { min-height: 360px; } }


/* v0.1.42 NPC立绘框与典当柜台修正 */
.premium-town-layout{grid-template-columns:minmax(0,1fr) 430px!important;align-items:stretch!important;}
.premium-npc-panel{display:grid!important;grid-template-rows:minmax(520px,1fr) auto!important;min-height:720px!important;overflow:hidden!important;border-color:rgba(229,194,126,.24)!important;background:linear-gradient(180deg,rgba(12,13,13,.96),rgba(4,4,5,.98))!important;}
.npc-portrait-image{position:relative!important;height:100%!important;min-height:520px!important;padding:0!important;display:block!important;background:linear-gradient(180deg,#111,#030303)!important;}
.npc-portrait-image img{width:100%!important;height:100%!important;min-height:520px!important;object-fit:cover!important;object-position:center top!important;display:block!important;filter:brightness(.86) contrast(1.08) saturate(.88)!important;user-select:none!important;pointer-events:none!important;}
.npc-portrait-image.npc-scavenger img{object-position:center top!important;}
.npc-portrait-image.npc-potion img{object-position:center top!important;}
.npc-portrait-image.npc-pawn img{object-position:center top!important;}
.npc-portrait-image.npc-forge img{object-position:center top!important;}
.npc-portrait-image::after{content:""!important;position:absolute!important;inset:0!important;pointer-events:none!important;background:radial-gradient(circle at 50% 18%,rgba(255,235,190,.08),transparent 36%),linear-gradient(180deg,rgba(0,0,0,0) 42%,rgba(0,0,0,.82) 100%)!important;}
.npc-nameplate{position:absolute!important;left:0!important;right:0!important;bottom:0!important;z-index:2!important;padding:24px 26px 26px!important;background:linear-gradient(180deg,rgba(0,0,0,0),rgba(0,0,0,.88))!important;border-top:1px solid rgba(238,203,137,.18)!important;}
.npc-nameplate strong{font-size:38px!important;letter-spacing:.12em!important;color:#ffe5ad!important;text-shadow:0 0 22px rgba(224,181,99,.28),0 2px 4px #000!important;}
.npc-nameplate span{display:block!important;margin-top:8px!important;color:#cdb98a!important;letter-spacing:.08em!important;}
.premium-npc-dialogue{min-height:178px!important;max-height:238px!important;border-top:1px solid rgba(238,203,137,.24)!important;background:linear-gradient(180deg,rgba(34,27,18,.96),rgba(8,8,9,.98))!important;}
.premium-npc-dialogue b{font-family:Georgia,serif!important;font-size:22px!important;color:#ffe3a4!important;letter-spacing:.09em!important;}
.premium-npc-dialogue b::before{content:""!important;}
.premium-npc-dialogue p{font-size:16px!important;line-height:1.9!important;color:#f2e5c9!important;}
.pawn-columns{display:grid;grid-template-columns:1fr;gap:22px;}
.shop-subtitle{margin:12px 0 14px;padding:10px 14px;border:1px solid rgba(238,203,137,.2);border-radius:14px;color:#ffe3a4;font-weight:900;letter-spacing:.14em;background:rgba(0,0,0,.22);}
.pawn-market-item{border-color:rgba(180,135,76,.34)!important;background:linear-gradient(180deg,rgba(38,29,16,.76),rgba(8,8,9,.94))!important;}
button,[data-view],[data-home-go],[data-open-bag],[data-close-bag],[data-pawn-buy]{pointer-events:auto!important;}
@media(max-width:1180px){.premium-town-layout{grid-template-columns:1fr!important}.premium-npc-panel{position:relative!important;min-height:auto!important}.npc-portrait-image,.npc-portrait-image img{min-height:420px!important}}


/* v0.1.43：备战装备栏/城镇背包重排、传送水晶、按钮硬修复 */
button, [data-view], [data-home-go], [data-event-action], [data-open-bag], [data-prep-add], [data-prep-remove], [data-use-crystal-extract], [data-pawn-buy] {
  pointer-events: auto !important;
  cursor: pointer;
}
button:disabled { cursor: not-allowed; }
.main, .view, .card, .dungeon-display, .dungeon-command-deck, .shop-main-panel, .npc-panel, .prep-equipment-strip, .prep-town-backpack {
  pointer-events: auto !important;
}
.main::before, .main::after, .view::before, .view::after, .card::before, .card::after, .dungeon-display::before, .dungeon-display::after, .dungeon-command-deck::before, .dungeon-command-deck::after, .shop-main-panel::before, .shop-main-panel::after, .npc-panel::before, .npc-panel::after {
  pointer-events: none !important;
}
.dungeon-prep-shell.v143-prep { display: grid; gap: 18px; }
.prep-equipment-strip {
  border: 1px solid rgba(216, 176, 95, .22);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(25,23,18,.92), rgba(7,8,9,.96));
  box-shadow: inset 0 0 0 1px rgba(255,226,164,.035), 0 18px 52px rgba(0,0,0,.36);
  padding: 18px;
}
.prep-equipment-strip h3, .prep-town-backpack h3 { margin: 0 0 8px; color: #ffe8b6; letter-spacing: .06em; }
.prep-equipment-strip p, .prep-town-backpack p { color: #b9ad93; margin: 0 0 14px; line-height: 1.7; }
.prep-equipment-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(120px, 1fr));
  gap: 10px;
}
.prep-equip-slot {
  min-height: 78px;
  border: 1px solid rgba(211, 167, 83, .18);
  border-radius: 15px;
  background: radial-gradient(circle at 50% 0%, rgba(229,180,88,.12), transparent 48%), rgba(0,0,0,.28);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.prep-equip-slot b { color: #f7d48a; font-size: 13px; }
.prep-equip-slot span { color: #e7dcc4; font-size: 12px; line-height: 1.35; }
.prep-equip-slot.empty span { color: #7d7567; }
.prep-top-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:flex-end; }
.v143-prep-layout { display: grid; grid-template-columns: minmax(360px, .85fr) minmax(420px, 1.15fr); gap: 18px; }
.prep-town-backpack {
  border: 1px solid rgba(216, 176, 95, .18);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(18,17,14,.94), rgba(4,5,6,.96));
  padding: 18px;
}
.prep-backpack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.prep-item.v143 { border-radius: 16px; background: rgba(0,0,0,.28); border: 1px solid rgba(214,176,101,.16); padding: 13px; display:grid; grid-template-columns:1fr auto; gap:12px; align-items:center; }
.prep-item.v143 b { color:#ffe8b6; }
.prep-item.v143 span, .prep-item.v143 p { color:#bcb19b; }
.prep-item.v143 p { margin:6px 0 0; font-size:13px; }
.pawn-columns.v143 { display:grid; grid-template-columns:minmax(0,1fr); gap:24px; }
.shop-subtitle { color:#ffe8b6; font-weight:900; letter-spacing:.08em; margin:8px 0 12px; }
.npc-dialogue b { color:#f4ca78; letter-spacing:.06em; }
body.dungeon-fullscreen .dungeon-run-menu { gap: 10px; }
body.dungeon-fullscreen .dungeon-run-menu .extract { border-color: rgba(110,214,180,.45)!important; color:#d9fff1!important; }
.dungeon-action-result { margin-top:16px; border-top:1px solid rgba(224,184,96,.18); padding-top:14px; color:#f1dfbd; line-height:1.9; }
@media (max-width: 1280px) { .prep-equipment-grid { grid-template-columns: repeat(4, minmax(120px, 1fr)); } .v143-prep-layout { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .prep-equipment-grid { grid-template-columns: repeat(2, minmax(120px, 1fr)); } .prep-item.v143 { grid-template-columns: 1fr; } }

/* === FONT LOAD DIRECT FIX 20260708 === */
/* 字体修复：沿用旧包字体名，但改为相对路径加载，兼容 localhost、子目录部署和直接打开 index.html。 */
html, body {
  font-family: var(--font-cn) !important;
}

/* 英文标题/入场名继续走旧包的 Canterbury 字体。 */
.latin-text,
.boss-name-splash,
.brand-mark {
  font-family: var(--font-ui) !important;
}

/* 只让中文引号“”中的 Boss 台词使用手写体；叙述文字仍使用普通中文字体。 */
.boss-dialogue-box .boss-quote-text,
.boss-dialogue-trigger .boss-dialogue-line .boss-quote-text,
.boss-dialogue-full .boss-dialogue-line .boss-quote-text,
.boss-test-log .boss-quote-text,
.boss-test-log p.dialogue .boss-quote-text {
  font-family: var(--font-dialogue) !important;
  font-weight: 400 !important;
}

.boss-dialogue-box .boss-narration-text,
.boss-dialogue-narration,
.boss-test-log .boss-narration-text,
.boss-test-log p.narration {
  font-family: var(--font-cn) !important;
}

/* 如果某些旧数据没有被 JS 切成 span，也至少让台词行不再被后续规则覆盖丢字体。 */
.boss-dialogue-box p:has(.boss-quote-text),
.boss-test-log p.dialogue:has(.boss-quote-text) {
  font-family: var(--font-cn) !important;
}

/* v0.1.45：地下城入口整备与典当行补强 */
.v145-prep .game-hud-title h2::after{content:' v0.1.45';font-size:12px;margin-left:8px;color:#dcb36b;letter-spacing:.08em}
.v145-equip-panel{border:1px solid rgba(226,177,87,.28);background:linear-gradient(135deg,rgba(42,28,16,.72),rgba(8,8,9,.92));box-shadow:0 18px 42px rgba(0,0,0,.28)}
.v145-equip-grid .prep-equip-slot{position:relative;min-height:118px;padding-bottom:44px}
.v145-equip-grid .prep-equip-slot small{display:block;margin-top:8px;color:rgba(236,222,191,.62);line-height:1.45;font-size:12px}
.v145-equip-grid .prep-equip-slot button{position:absolute;right:10px;bottom:10px}
.equip-bonus-pills{margin-top:14px}
.v145-prep-layout{align-items:stretch}
.v145-town-grid .prep-item{border-color:rgba(255,255,255,.08)}
.v145-equipment-row{background:linear-gradient(135deg,rgba(38,28,18,.9),rgba(10,10,10,.9));border-color:rgba(226,177,87,.22)!important}
.v145-equipment-row b::before{content:'装 ';color:#e9c77d;font-size:12px;margin-right:4px}
.mini-stats{margin-top:8px;gap:6px}
.mini-stats span{font-size:11px;padding:4px 7px}
.v145-chosen span{background:rgba(226,177,87,.13);border-color:rgba(226,177,87,.25)}
.bag-modal-stats.compact{grid-template-columns:repeat(2,minmax(0,1fr));margin:12px 0}
.v145-pawn-columns{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
.v145-pawn-columns .shop-card-grid{grid-template-columns:1fr}
@media (max-width: 1100px){.v145-pawn-columns{grid-template-columns:1fr}.v145-equip-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* v0.1.46：NPC英文名使用 Canterbury；典当行黑匣货柜 */
.npc-nameplate strong,
.premium-npc-dialogue b,
.npc-dialogue b,
.npc-latin-name,
.npc-portrait-image > strong {
  font-family: var(--font-ui) !important;
  font-weight: 400 !important;
  letter-spacing: .08em !important;
}
.npc-nameplate span { font-family: var(--font-cn) !important; }
.v146-pawn-columns{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start;margin-bottom:18px}
.v146-pawn-columns .shop-card-grid{grid-template-columns:1fr}
.pawn-rare-section{margin-top:18px;border:1px solid rgba(239,196,102,.28);border-radius:22px;padding:16px;background:radial-gradient(circle at 16% 0%,rgba(255,213,128,.14),transparent 34%),linear-gradient(180deg,rgba(31,20,10,.72),rgba(5,5,6,.92));box-shadow:inset 0 0 0 1px rgba(255,255,255,.03)}
.pawn-rare-section .shop-subtitle{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:0}
.pawn-rare-section .shop-subtitle span{color:#ffe6a7}
.pawn-rare-section .shop-subtitle em{font-style:normal;color:#e6bd69;font-size:12px;border:1px solid rgba(230,189,105,.28);border-radius:999px;padding:5px 9px;background:rgba(0,0,0,.24)}
.rare-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;margin-top:12px}
.pawn-rare-item{position:relative;overflow:hidden;border-color:rgba(255,210,122,.28)!important;background:linear-gradient(150deg,rgba(50,31,12,.86),rgba(8,8,9,.94))!important}
.pawn-rare-item:before{content:"";position:absolute;inset:-35% auto auto -20%;width:70%;height:70%;background:radial-gradient(circle,rgba(255,205,112,.12),transparent 68%);pointer-events:none}
.pawn-rare-item.sold{opacity:.52;filter:grayscale(.35)}
.pawn-rare-item .q-mythic{border-color:rgba(255,224,143,.55);background:linear-gradient(135deg,rgba(255,220,129,.22),rgba(166,46,46,.18));color:#ffe9a9}
.rare-placeholder strong{color:#ffe3a3!important}
@media (max-width: 1280px){.rare-grid{grid-template-columns:1fr!important}.v146-pawn-columns{grid-template-columns:1fr}}


/* v0.1.47：典当行空白页修复与NPC英文字体最终兜底 */
.npc-nameplate strong,
.premium-npc-dialogue b,
.npc-dialogue b,
.npc-latin-name,
.v147-npc-name,
.v147-npc-dialogue b {
  font-family: var(--font-ui) !important;
  font-weight: 400 !important;
  letter-spacing: .10em !important;
}
.v147-pawn-layout { grid-template-columns: minmax(0,1fr) 430px !important; }
.v147-pawn-columns { display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:start; margin-bottom:18px; }
.v147-pawn-columns .v147-card-grid { grid-template-columns:1fr !important; }
.v147-pawn-tabs { margin-bottom:14px; }
.v147-npc-panel { min-height:720px !important; }
.v147-npc-portrait img { width:100%; height:100%; min-height:520px; object-fit:cover; object-position:center top; display:block; }
.v147-pawn-stats .card h3 { color:#ffe6a8; }
.v147-rare { margin-top:20px; }
.v147-rare .mini-note { color:#d5c4a0; line-height:1.75; margin:0 0 12px; }
@media(max-width:1280px){
  .v147-pawn-layout { grid-template-columns:1fr !important; }
  .v147-pawn-columns { grid-template-columns:1fr; }
  .v147-npc-panel { min-height:auto !important; }
}


/* v0.1.48：角色重新注册与地下城行动门槛 */
.v148-profile-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}
.v148-profile-toolbar h3{ margin:0 0 6px; }
.v148-profile-toolbar p{ margin:0; color:var(--muted); }
.v148-action-row{ display:flex; flex-wrap:wrap; gap:10px; }
.v148-action-row .big-action{ min-width:160px; }

/* v0.1.49：用户指定背景图整合 */
body {
  background:
    linear-gradient(180deg, rgba(4,4,6,.78), rgba(3,3,5,.90)),
    radial-gradient(circle at top left, rgba(215,180,106,.10), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(122,184,255,.08), transparent 32rem),
    url('/assets/backgrounds/main_ui_bg.png') center center / cover fixed no-repeat,
    var(--bg) !important;
}
.sidebar,
.main,
.brand,
.sidebar-note,
.nav button {
  backdrop-filter: blur(14px);
}
.main { position: relative; }

.first-character-backdrop {
  background:
    linear-gradient(180deg, rgba(3,3,4,.55), rgba(2,2,3,.90)),
    radial-gradient(circle at 50% 18%, rgba(231,198,127,.12), transparent 36%),
    url('/assets/backgrounds/character_create_bg.png') center center / cover no-repeat !important;
}
.first-character-panel {
  background: linear-gradient(180deg, rgba(18,16,13,.84), rgba(7,8,9,.92)) !important;
  backdrop-filter: blur(8px);
}

body[data-view="battle"] #battle.view.active,
body.dungeon-fullscreen #dungeon.view.active,
body[data-view="forge"] #forge.view.active,
body[data-view="potionworkshop"] #potionworkshop.view.active,
body[data-view="pawnshop"] #pawnshop.view.active,
body[data-view="scavenger"] #scavenger.view.active,
body[data-view="bookstore"] #bookstore.view.active,
body[data-view="fatehouse"] #fatehouse.view.active {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 28px;
}
body[data-view="battle"] #battle.view.active > *,
body.dungeon-fullscreen #dungeon.view.active > *,
body[data-view="forge"] #forge.view.active > *,
body[data-view="potionworkshop"] #potionworkshop.view.active > *,
body[data-view="pawnshop"] #pawnshop.view.active > *,
body[data-view="scavenger"] #scavenger.view.active > *,
body[data-view="bookstore"] #bookstore.view.active > *,
body[data-view="fatehouse"] #fatehouse.view.active > * {
  position: relative;
  z-index: 1;
}
body[data-view="battle"] #battle.view.active::before,
body.dungeon-fullscreen #dungeon.view.active::before,
body[data-view="forge"] #forge.view.active::before,
body[data-view="potionworkshop"] #potionworkshop.view.active::before,
body[data-view="pawnshop"] #pawnshop.view.active::before,
body[data-view="scavenger"] #scavenger.view.active::before,
body[data-view="bookstore"] #bookstore.view.active::before,
body[data-view="fatehouse"] #fatehouse.view.active::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: brightness(.42) saturate(.86);
}
body[data-view="battle"] #battle.view.active::before,
body.dungeon-fullscreen #dungeon.view.active::before {
  background-image:
    linear-gradient(180deg, rgba(5,6,9,.34), rgba(3,3,4,.84)),
    url('/assets/backgrounds/battle_bg.png');
}
body[data-view="forge"] #forge.view.active::before {
  background-image:
    linear-gradient(180deg, rgba(5,5,6,.30), rgba(2,2,3,.84)),
    url('/assets/backgrounds/forge_bg.png');
}
body[data-view="potionworkshop"] #potionworkshop.view.active::before {
  background-image:
    linear-gradient(180deg, rgba(6,5,8,.30), rgba(2,2,3,.84)),
    url('/assets/backgrounds/potion_bg.png');
}
body[data-view="pawnshop"] #pawnshop.view.active::before {
  background-image:
    linear-gradient(180deg, rgba(10,6,4,.30), rgba(2,2,3,.86)),
    url('/assets/backgrounds/pawnshop_bg.png');
}
body[data-view="scavenger"] #scavenger.view.active::before {
  background-image:
    linear-gradient(180deg, rgba(5,7,9,.30), rgba(2,2,3,.86)),
    url('/assets/backgrounds/scavenger_bg.png');
}
body[data-view="bookstore"] #bookstore.view.active::before {
  background-image:
    linear-gradient(180deg, rgba(7,5,6,.34), rgba(2,2,3,.88)),
    url('/assets/backgrounds/bookstore_bg.png');
}
body[data-view="fatehouse"] #fatehouse.view.active::before {
  background-image:
    linear-gradient(180deg, rgba(6,4,7,.32), rgba(2,2,3,.90)),
    url('/assets/backgrounds/fatehouse_bg.png');
}

body[data-view="battle"] #battle .dungeon-display,
body.dungeon-fullscreen #dungeon .dungeon-display,
body[data-view="forge"] #forge .shop-main-panel,
body[data-view="potionworkshop"] #potionworkshop .shop-main-panel,
body[data-view="pawnshop"] #pawnshop .shop-main-panel,
body[data-view="scavenger"] #scavenger .shop-main-panel,
body[data-view="bookstore"] #bookstore .v080-card,
body[data-view="bookstore"] #bookstore .v080-shelf,
body[data-view="bookstore"] #bookstore .v080-notice,
body[data-view="bookstore"] #bookstore .v080-npc,
body[data-view="bookstore"] #bookstore .v080-dialog,
body[data-view="fatehouse"] #fatehouse .v080-card,
body[data-view="fatehouse"] #fatehouse .v080-shelf,
body[data-view="fatehouse"] #fatehouse .v080-notice,
body[data-view="fatehouse"] #fatehouse .v080-npc,
body[data-view="fatehouse"] #fatehouse .v080-dialog,
body[data-view="forge"] #forge .npc-panel,
body[data-view="potionworkshop"] #potionworkshop .npc-panel,
body[data-view="pawnshop"] #pawnshop .npc-panel,
body[data-view="scavenger"] #scavenger .npc-panel {
  background: linear-gradient(180deg, rgba(12,12,14,.82), rgba(4,4,5,.94)) !important;
  backdrop-filter: blur(7px);
}
body[data-view="battle"] #battle .dungeon-command-deck,
body.dungeon-fullscreen #dungeon .dungeon-command-deck,
body[data-view="battle"] #battle .player-side-panel,
body.dungeon-fullscreen #dungeon .player-side-panel {
  background: linear-gradient(180deg, rgba(11,12,14,.86), rgba(4,4,5,.95)) !important;
  backdrop-filter: blur(7px);
}

/* v0.1.50：隐藏事件样式 */
.hidden-event-box {
  border-color: rgba(255, 208, 126, .42) !important;
  box-shadow: inset 0 0 40px rgba(215, 155, 70, .08), 0 24px 80px rgba(0,0,0,.35) !important;
}
.hidden-event-box .event-text {
  white-space: pre-line;
  line-height: 1.95 !important;
  color: #f4e4c0 !important;
}
.hidden-event-box .event-mini-head strong::before {
  content: "✦ 隐藏事件 ";
  color: #ffd98b;
  letter-spacing: .12em;
}
.hidden-effect-card {
  margin-top: 14px;
  border: 1px solid rgba(255, 208, 126, .26);
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(40, 26, 13, .42), rgba(5,5,6,.76));
}
.hidden-effect-card b { color: #ffe2a3; display:block; margin-bottom:10px; letter-spacing:.08em; }
.hidden-effect-card div { display:flex; flex-wrap:wrap; gap:8px; }
.hidden-effect-card span {
  border: 1px solid rgba(255, 208, 126, .32);
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffe2a3;
  background: rgba(0,0,0,.28);
  font-size: 12px;
  font-weight: 800;
}

/* v0.1.51：制作手册背景 + 左侧按钮缩略图 */
.nav button.nav-visual {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
}
.nav-thumb {
  width: 42px;
  min-width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(243,217,145,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 8px 18px rgba(0,0,0,.22);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}
.nav-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.18));
}
.nav-label { flex: 1; position: relative; z-index: 1; }
.thumb-home { background-image: url('/assets/backgrounds/main_ui_bg.png'); }
.thumb-profile { background-image: url('/assets/backgrounds/character_create_bg.png'); }
.thumb-dungeon { background-image: url('/assets/backgrounds/battle_bg.png'); }
.thumb-scavenger { background-image: url('/assets/backgrounds/scavenger_bg.png'); }
.thumb-pawnshop { background-image: url('/assets/backgrounds/pawnshop_bg.png'); }
.thumb-forge { background-image: url('/assets/backgrounds/forge_bg.png'); }
.thumb-potion { background-image: url('/assets/backgrounds/potion_bg.png'); }
.thumb-crafting { background-image: url('/assets/backgrounds/crafting_bg.png'); }
.thumb-bookstore { background-image: url('/assets/backgrounds/bookstore_bg.png'); }
.thumb-fatehouse { background-image: url('/assets/backgrounds/fatehouse_bg.png'); }
.thumb-codex {
  background-image:
    linear-gradient(180deg, rgba(72,58,35,.24), rgba(8,8,9,.28)),
    url('/assets/backgrounds/crafting_bg.png');
}
.nav button.nav-visual.active .nav-thumb,
.nav button.nav-visual:hover .nav-thumb {
  border-color: rgba(243,217,145,.42);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 10px 22px rgba(0,0,0,.28), 0 0 0 1px rgba(243,217,145,.10);
}

body[data-view="crafting"] #crafting.view.active {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 28px;
}
body[data-view="crafting"] #crafting.view.active > * {
  position: relative;
  z-index: 1;
}
body[data-view="crafting"] #crafting.view.active::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(7,6,5,.24), rgba(2,2,3,.86)),
    url('/assets/backgrounds/crafting_bg.png');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: brightness(.48) saturate(.84);
}
body[data-view="crafting"] #crafting .card,
body[data-view="crafting"] #crafting .shop-main-panel,
body[data-view="crafting"] #crafting .manual-rules,
body[data-view="crafting"] #crafting .recipe-card,
body[data-view="crafting"] #crafting .table,
body[data-view="crafting"] #crafting .skill,
body[data-view="crafting"] #crafting .notice {
  background: linear-gradient(180deg, rgba(16,14,12,.84), rgba(4,4,5,.94)) !important;
  backdrop-filter: blur(6px);
}
body[data-view="crafting"] #crafting .table th,
body[data-view="crafting"] #crafting .table td {
  background: transparent;
}

/* v0.1.52：整块导航按钮贴图 + 壁纸式界面 + 半透明面板 */
.nav button.nav-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 68px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid rgba(241,208,138,.12);
  background: rgba(8,8,10,.38) !important;
  backdrop-filter: blur(8px);
  color: #f1e7d0;
  isolation: isolate;
}
.nav button.nav-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: .55;
  filter: brightness(.52) saturate(.84);
  transform: scale(1.02);
}
.nav button.nav-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, rgba(8,8,10,.86) 0%, rgba(8,8,10,.55) 45%, rgba(8,8,10,.70) 100%);
}
.nav button.nav-visual .nav-thumb { display: none !important; }
.nav button.nav-visual .nav-label {
  position: relative;
  z-index: 1;
  font-weight: 900;
  letter-spacing: .06em;
  text-shadow: 0 1px 0 #000, 0 0 18px rgba(0,0,0,.28);
}
.nav button.nav-visual:hover,
.nav button.nav-visual.active {
  color: #fff5db;
  border-color: rgba(241,208,138,.32);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 10px 28px rgba(0,0,0,.18), 0 0 0 1px rgba(241,208,138,.10);
  background: rgba(25,16,10,.42) !important;
}
.nav button.nav-visual:hover::before,
.nav button.nav-visual.active::before {
  opacity: .78;
  filter: brightness(.66) saturate(.92);
}
.nav button.nav-visual.active::after {
  background: linear-gradient(90deg, rgba(62,28,14,.70) 0%, rgba(17,11,9,.52) 42%, rgba(8,8,10,.62) 100%);
}
.nav button[data-view="home"]::before { background-image: url('/assets/backgrounds/main_ui_bg.png'); }
.nav button[data-view="profile"]::before { background-image: url('/assets/backgrounds/character_create_bg.png'); }
.nav button[data-view="dungeon"]::before { background-image: url('/assets/backgrounds/battle_bg.png'); }
.nav button[data-view="scavenger"]::before { background-image: url('/assets/backgrounds/scavenger_bg.png'); }
.nav button[data-view="pawnshop"]::before { background-image: url('/assets/backgrounds/pawnshop_bg.png'); }
.nav button[data-view="forge"]::before { background-image: url('/assets/backgrounds/forge_bg.png'); }
.nav button[data-view="potionworkshop"]::before { background-image: url('/assets/backgrounds/potion_bg.png'); }
.nav button[data-view="codex"]::before { background-image: url('/assets/backgrounds/crafting_bg.png'); }
.nav button[data-view="crafting"]::before { background-image: url('/assets/backgrounds/crafting_bg.png'); }
.nav button[data-view="bookstore"]::before { background-image: url('/assets/backgrounds/bookstore_bg.png'); }
.nav button[data-view="fatehouse"]::before { background-image: url('/assets/backgrounds/fatehouse_bg.png'); }

body[data-view="forge"] #forge.view.active,
body[data-view="potionworkshop"] #potionworkshop.view.active,
body[data-view="pawnshop"] #pawnshop.view.active,
body[data-view="scavenger"] #scavenger.view.active,
body[data-view="crafting"] #crafting.view.active,
body[data-view="codex"] #codex.view.active,
body[data-view="bookstore"] #bookstore.view.active,
body[data-view="fatehouse"] #fatehouse.view.active {
  border-radius: 28px;
}
body[data-view="codex"] #codex.view.active,
body[data-view="bookstore"] #bookstore.view.active,
body[data-view="fatehouse"] #fatehouse.view.active {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
body[data-view="codex"] #codex.view.active > * {
  position: relative;
  z-index: 1;
}
body[data-view="codex"] #codex.view.active::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(7,6,5,.20), rgba(2,2,3,.86)),
    url('/assets/backgrounds/crafting_bg.png');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: brightness(.46) saturate(.80);
}

body[data-view="forge"] #forge .town-title,
body[data-view="potionworkshop"] #potionworkshop .town-title,
body[data-view="pawnshop"] #pawnshop .town-title,
body[data-view="scavenger"] #scavenger .town-title,
body[data-view="crafting"] #crafting .section-title,
body[data-view="codex"] #codex .section-title,
body[data-view="forge"] #forge .town-stat-row .card,
body[data-view="potionworkshop"] #potionworkshop .town-stat-row .card,
body[data-view="pawnshop"] #pawnshop .town-stat-row .card,
body[data-view="scavenger"] #scavenger .town-stat-row .card,
body[data-view="forge"] #forge .shop-main-panel,
body[data-view="potionworkshop"] #potionworkshop .shop-main-panel,
body[data-view="pawnshop"] #pawnshop .shop-main-panel,
body[data-view="scavenger"] #scavenger .shop-main-panel,
body[data-view="forge"] #forge .npc-panel,
body[data-view="potionworkshop"] #potionworkshop .npc-panel,
body[data-view="pawnshop"] #pawnshop .npc-panel,
body[data-view="scavenger"] #scavenger .npc-panel,
body[data-view="forge"] #forge .npc-dialogue,
body[data-view="potionworkshop"] #potionworkshop .npc-dialogue,
body[data-view="pawnshop"] #pawnshop .npc-dialogue,
body[data-view="scavenger"] #scavenger .npc-dialogue,
body[data-view="forge"] #forge .placeholder,
body[data-view="potionworkshop"] #potionworkshop .placeholder,
body[data-view="pawnshop"] #pawnshop .placeholder,
body[data-view="scavenger"] #scavenger .placeholder,
body[data-view="crafting"] #crafting .card,
body[data-view="crafting"] #crafting .shop-main-panel,
body[data-view="crafting"] #crafting .manual-rules,
body[data-view="crafting"] #crafting .recipe-card,
body[data-view="crafting"] #crafting .table,
body[data-view="crafting"] #crafting .skill,
body[data-view="crafting"] #crafting .notice,
body[data-view="codex"] #codex .card,
body[data-view="codex"] #codex .skill,
body[data-view="codex"] #codex .notice,
body[data-view="codex"] #codex .table {
  background: linear-gradient(180deg, rgba(12,12,14,.56), rgba(4,4,5,.78)) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
body[data-view="forge"] #forge .town-title,
body[data-view="potionworkshop"] #potionworkshop .town-title,
body[data-view="pawnshop"] #pawnshop .town-title,
body[data-view="scavenger"] #scavenger .town-title {
  padding: 10px 4px 4px;
}
body[data-view="forge"] #forge .placeholder,
body[data-view="potionworkshop"] #potionworkshop .placeholder,
body[data-view="pawnshop"] #pawnshop .placeholder,
body[data-view="scavenger"] #scavenger .placeholder {
  border: 1px solid rgba(241,208,138,.14);
}
body[data-view="crafting"] #crafting .table th,
body[data-view="crafting"] #crafting .table td,
body[data-view="codex"] #codex .table th,
body[data-view="codex"] #codex .table td {
  background: transparent !important;
}

/* v0.1.53：整块右侧壁纸切换 + 建档右侧框内贴图 + 强制按钮贴图 */
.main.dungeon-main {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.main.dungeon-main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(5,5,7,.42), rgba(2,2,3,.80)),
    url('/assets/backgrounds/main_ui_bg.png');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: brightness(.44) saturate(.84);
}
body[data-view="home"] .main.dungeon-main::before { background-image: linear-gradient(180deg, rgba(5,5,7,.42), rgba(2,2,3,.80)), url('/assets/backgrounds/main_ui_bg.png'); }
body[data-view="profile"] .main.dungeon-main::before,
body[data-view="create"] .main.dungeon-main::before { background-image: linear-gradient(180deg, rgba(5,5,7,.42), rgba(2,2,3,.80)), url('/assets/backgrounds/character_create_bg.png'); }
body[data-view="dungeon"] .main.dungeon-main::before,
body[data-view="battle"] .main.dungeon-main::before { background-image: linear-gradient(180deg, rgba(5,5,7,.38), rgba(2,2,3,.82)), url('/assets/backgrounds/battle_bg.png'); }
body[data-view="scavenger"] .main.dungeon-main::before { background-image: linear-gradient(180deg, rgba(5,5,7,.42), rgba(2,2,3,.82)), url('/assets/backgrounds/scavenger_bg.png'); }
body[data-view="pawnshop"] .main.dungeon-main::before { background-image: linear-gradient(180deg, rgba(5,5,7,.42), rgba(2,2,3,.82)), url('/assets/backgrounds/pawnshop_bg.png'); }
body[data-view="bookstore"] .main.dungeon-main::before { background-image: linear-gradient(180deg, rgba(7,5,7,.42), rgba(2,2,3,.84)), url('/assets/backgrounds/bookstore_bg.png'); }
body[data-view="fatehouse"] .main.dungeon-main::before { background-image: linear-gradient(180deg, rgba(6,5,7,.42), rgba(2,2,3,.86)), url('/assets/backgrounds/fatehouse_bg.png'); }
body[data-view="forge"] .main.dungeon-main::before { background-image: linear-gradient(180deg, rgba(5,5,7,.42), rgba(2,2,3,.82)), url('/assets/backgrounds/forge_bg.png'); }
body[data-view="potionworkshop"] .main.dungeon-main::before { background-image: linear-gradient(180deg, rgba(5,5,7,.42), rgba(2,2,3,.82)), url('/assets/backgrounds/potion_bg.png'); }
body[data-view="codex"] .main.dungeon-main::before,
body[data-view="crafting"] .main.dungeon-main::before { background-image: linear-gradient(180deg, rgba(5,5,7,.42), rgba(2,2,3,.82)), url('/assets/backgrounds/crafting_bg.png'); }
.main.dungeon-main > .view { position: relative; z-index: 1; background: transparent !important; }

/* 左侧整个按钮直接作为贴图按钮 */
.nav button[data-view] {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #f8ecd0;
  text-shadow: 0 1px 0 rgba(0,0,0,.55);
  border: 1px solid rgba(239,210,150,.14) !important;
  background: rgba(8,8,10,.30) !important;
  backdrop-filter: blur(8px);
}
.nav button[data-view] > * { position: relative; z-index: 2; }
.nav button[data-view]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: .78;
  filter: brightness(.58) saturate(.86);
}
.nav button[data-view]::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(9,9,12,.82) 0%, rgba(9,9,12,.55) 45%, rgba(9,9,12,.72) 100%);
}
.nav button[data-view="home"]::before { background-image: url('/assets/backgrounds/main_ui_bg.png'); }
.nav button[data-view="profile"]::before { background-image: url('/assets/backgrounds/character_create_bg.png'); }
.nav button[data-view="dungeon"]::before { background-image: url('/assets/backgrounds/battle_bg.png'); }
.nav button[data-view="scavenger"]::before { background-image: url('/assets/backgrounds/scavenger_bg.png'); }
.nav button[data-view="pawnshop"]::before { background-image: url('/assets/backgrounds/pawnshop_bg.png'); }
.nav button[data-view="forge"]::before { background-image: url('/assets/backgrounds/forge_bg.png'); }
.nav button[data-view="potionworkshop"]::before { background-image: url('/assets/backgrounds/potion_bg.png'); }
.nav button[data-view="codex"]::before,
.nav button[data-view="crafting"]::before { background-image: url('/assets/backgrounds/crafting_bg.png'); }
.nav button[data-view="bookstore"]::before { background-image: url('/assets/backgrounds/bookstore_bg.png'); }
.nav button[data-view="fatehouse"]::before { background-image: url('/assets/backgrounds/fatehouse_bg.png'); }
.nav button[data-view]:hover::before,
.nav button[data-view].active::before { opacity: .95; filter: brightness(.74) saturate(.92); }
.nav button[data-view].active::after,
.nav button[data-view]:hover::after { background: linear-gradient(90deg, rgba(62,27,12,.72) 0%, rgba(17,11,9,.50) 42%, rgba(8,8,10,.62) 100%); }
.nav button[data-view].active {
  border-color: rgba(239,210,150,.40) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), 0 8px 22px rgba(0,0,0,.18), 0 0 0 1px rgba(239,210,150,.10);
}
.nav button[data-view] .nav-thumb { display:none !important; }
.nav button[data-view] .nav-label { position: relative; z-index: 2; }

/* 建档页：把图放进右侧框里 */
#create .creator > .card:last-child {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 540px;
}
#create .creator > .card:last-child::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(180deg, rgba(8,8,10,.28), rgba(4,4,5,.68)),
    url('/assets/backgrounds/character_create_bg.png');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: brightness(.55) saturate(.88);
}
#create .creator > .card:last-child::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(6,6,8,.18), rgba(6,6,8,.52) 48%, rgba(5,5,7,.82) 100%);
}
#create .creator > .card:last-child > * {
  position: relative;
  z-index: 1;
}
#create .creator > .card:first-child,
#create .creator > .card:last-child,
#profile .card,
#scavenger .card,
#pawnshop .card,
#forge .card,
#potionworkshop .card,
#codex .card,
#crafting .card,
#scavenger .shop-main-panel,
#pawnshop .shop-main-panel,
#forge .shop-main-panel,
#potionworkshop .shop-main-panel,
#scavenger .npc-panel,
#pawnshop .npc-panel,
#forge .npc-panel,
#potionworkshop .npc-panel,
#scavenger .npc-dialogue,
#pawnshop .npc-dialogue,
#forge .npc-dialogue,
#potionworkshop .npc-dialogue,
#scavenger .placeholder,
#pawnshop .placeholder,
#forge .placeholder,
#potionworkshop .placeholder {
  background: linear-gradient(180deg, rgba(12,12,14,.54), rgba(4,4,5,.78)) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* v0.1.54：升级属性弹窗 */
.levelup-modal{position:fixed;inset:0;z-index:100000;display:grid;place-items:center;padding:24px;}
.levelup-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.68);backdrop-filter:blur(10px);}
.levelup-panel{position:relative;z-index:1;width:min(760px,94vw);border-color:rgba(245,210,140,.36)!important;background:linear-gradient(180deg,rgba(24,20,14,.94),rgba(6,6,8,.98))!important;box-shadow:0 40px 130px rgba(0,0,0,.72), inset 0 1px 0 rgba(255,255,255,.08)!important;}
.levelup-panel h2{margin:0 0 10px;color:#ffe7ad;font-size:30px;letter-spacing:.08em;}
.levelup-panel p{color:#e8d6ad;line-height:1.8;}
.levelup-panel .alloc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px;margin:18px 0;}
.levelup-panel .alloc-btn{display:grid;gap:6px;text-align:left;}
.levelup-panel .alloc-btn small{color:#bca987;font-size:12px;}

/* v0.2.0-prep：正式服手机端基础适配 */
@media (max-width: 820px) {
  body { overflow-x: hidden; }
  .app-shell {
    display: block !important;
    min-height: 100vh;
  }
  .sidebar {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto !important;
    width: 100%;
    height: 82px !important;
    padding: 8px 10px !important;
    z-index: 9990;
    border-right: 0 !important;
    border-top: 1px solid rgba(239,210,150,.18);
    background: rgba(5,5,6,.82) !important;
    backdrop-filter: blur(16px);
  }
  .brand,
  .sidebar-note { display: none !important; }
  .nav {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto;
    height: 66px;
    padding-bottom: 4px;
  }
  .nav button[data-view] {
    min-width: 108px !important;
    height: 58px !important;
    min-height: 58px !important;
    border-radius: 16px !important;
    padding: 0 10px !important;
    text-align: center !important;
    justify-content: center !important;
    font-size: 13px !important;
  }
  .nav button[data-view] .nav-label {
    width: 100%;
    text-align: center;
    white-space: nowrap;
  }
  .main {
    width: 100vw !important;
    min-height: 100vh;
    padding: 14px !important;
    padding-bottom: 102px !important;
  }
  .quick-bag-button {
    right: 14px !important;
    bottom: 96px !important;
    z-index: 9995;
  }
  .section-title,
  .town-title,
  .game-hud-title,
  .dungeon-full-hud {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  .section-title h2,
  .town-title h2,
  .game-hud-title h2,
  .dungeon-full-hud h2 {
    font-size: 28px !important;
    line-height: 1.2;
  }
  .creator,
  .grid.two,
  .grid.three,
  .grid.five,
  .town-shop-layout,
  .premium-town-layout,
  .dungeon-play-layout,
  .dungeon-full-layout,
  .archive-grid {
    grid-template-columns: 1fr !important;
  }
  .card,
  .shop-main-panel,
  .npc-panel,
  .dungeon-display,
  .dungeon-command-deck,
  .player-side-panel {
    border-radius: 18px !important;
  }
  .town-stat-row {
    grid-template-columns: 1fr !important;
  }
  .shop-card-grid,
  .rare-grid,
  .bag-item-grid {
    grid-template-columns: 1fr !important;
  }
  .npc-portrait-image,
  .npc-portrait-image img {
    min-height: 260px !important;
    max-height: 360px !important;
  }
  .premium-npc-panel {
    min-height: auto !important;
  }
  .premium-npc-dialogue {
    max-height: none !important;
  }
  .command-buttons,
  .battle-actions,
  .shop-actions,
  .v148-action-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  button,
  .tab,
  .primary,
  .ghost,
  .danger {
    min-height: 44px;
  }
  .point-row {
    grid-template-columns: 52px 1fr 40px 40px 40px !important;
    gap: 7px !important;
  }
  .attr-list,
  .mini-stat-grid,
  .fighter-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .bag-modal-panel {
    width: calc(100vw - 20px) !important;
    max-height: calc(100vh - 40px) !important;
    border-radius: 22px !important;
    padding: 16px !important;
  }
  body.dungeon-fullscreen #dungeon.view.active {
    padding: 12px !important;
    padding-bottom: 96px !important;
  }
  body.dungeon-fullscreen .dungeon-display {
    min-height: 360px !important;
    max-height: none !important;
  }
}

/* v0.2.1：手机端按键可点击修复 */
@media (max-width: 900px), (pointer: coarse) {
  html, body {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255, 220, 150, .18);
  }
  .app-shell,
  .sidebar,
  .main,
  .view,
  .view.active,
  .card,
  .shop-main-panel,
  .npc-panel,
  .dungeon-display,
  .dungeon-command-deck,
  .player-side-panel,
  .bag-modal,
  .bag-modal-panel {
    pointer-events: auto !important;
  }
  body::before,
  body::after,
  .app-shell::before,
  .app-shell::after,
  .sidebar::before,
  .sidebar::after,
  .main::before,
  .main::after,
  .view::before,
  .view::after,
  .card::before,
  .card::after,
  .shop-main-panel::before,
  .shop-main-panel::after,
  .npc-panel::before,
  .npc-panel::after,
  .dungeon-display::before,
  .dungeon-display::after,
  .dungeon-command-deck::before,
  .dungeon-command-deck::after {
    pointer-events: none !important;
  }
  button,
  a,
  input,
  select,
  textarea,
  [role="button"],
  [data-view],
  [data-home-go],
  [data-event-action],
  [data-open-bag],
  [data-close-bag],
  [data-prep-add],
  [data-prep-remove],
  [data-use-crystal-extract],
  [data-pawn-buy],
  [data-v147-buy-market],
  [data-v147-buy-rare],
  [data-v147-sell-one],
  [data-v147-sell-all],
  [data-v147-talk],
  [data-levelup-attr] {
    pointer-events: auto !important;
    touch-action: manipulation !important;
    cursor: pointer !important;
    position: relative;
    z-index: 5;
  }
  .sidebar,
  .quick-bag-button,
  .bag-modal,
  .levelup-modal,
  .first-character-modal {
    z-index: 100000 !important;
  }
  .nav {
    pointer-events: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .nav button[data-view] {
    flex: 0 0 auto;
  }
}

/* v0.2.2：一次性选项与装备显示 */
.v022-choice-locked button[disabled],
.v022-checkpoint-actions button[disabled] {
  opacity: .62 !important;
  cursor: not-allowed !important;
}
.v022-equipment-grid .equipment-slot,
.v022-equipped-card .equipment-slot {
  min-height: 92px;
}
.v022-equipment-grid .equipment-slot.equipped,
.v022-equipped-card .equipment-slot.equipped {
  border-color: rgba(239,210,150,.34) !important;
  background: linear-gradient(180deg, rgba(56,38,18,.42), rgba(6,6,7,.72)) !important;
}
.v022-equipment-grid .equipment-slot small,
.v022-equipped-card .equipment-slot small {
  display: block;
  margin-top: 6px;
  color: #cdb98a;
  font-size: 12px;
  line-height: 1.45;
}
.v022-equipped-card {
  margin: 18px 0;
}
@media(max-width:820px){
  .v022-equipment-grid,
  .v022-equipped-card .equipment-grid {
    grid-template-columns: 1fr 1fr !important;
  }
  .v022-checkpoint-actions,
  .v022-choice-locked {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }
}


/* v0.2.3：游戏内装备显示与隐藏状态持续提示 */
.v023-runtime-equipment,
.v023-profile-equipment {
  margin-top: 14px;
  border-color: rgba(239,210,150,.28) !important;
  background: linear-gradient(180deg, rgba(18,15,11,.62), rgba(5,5,6,.82)) !important;
  backdrop-filter: blur(10px);
}
.v023-runtime-equipment h3,
.v023-profile-equipment h3 {
  color: #ffe7b2;
}
.v023-equipment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.v023-equipment-grid .equipment-slot {
  min-height: 86px;
  border: 1px solid rgba(239,210,150,.18);
  border-radius: 14px;
  padding: 10px;
  background: rgba(0,0,0,.26);
}
.v023-equipment-grid .equipment-slot b {
  display: block;
  color: #f7d889;
  margin-bottom: 5px;
}
.v023-equipment-grid .equipment-slot span {
  display: block;
  color: #f7eed8;
  font-weight: 800;
  line-height: 1.35;
}
.v023-equipment-grid .equipment-slot small {
  display: block;
  margin-top: 5px;
  color: #cdb98a;
  font-size: 12px;
  line-height: 1.45;
}
.v023-equipment-grid .equipment-slot.equipped {
  border-color: rgba(239,210,150,.36);
  box-shadow: inset 0 0 22px rgba(239,178,80,.08);
}
.v023-hidden-effects span {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}
.v023-hidden-effects small {
  color: #bca980;
  font-size: 11px;
  font-weight: 500;
}
@media(max-width:820px){
  .v023-equipment-grid {
    grid-template-columns: 1fr 1fr;
  }
  .v023-runtime-equipment,
  .v023-profile-equipment {
    margin-bottom: 12px;
  }
}


/* v0.2.7：字体与Boss战场景修复 */
.latin-text,
.brand-mark,
.boss-name-splash,
.npc-name-en,
.npc-dialogue-name-en {
  font-family: DungeonGameLatin, Canterbury, Georgia, serif !important;
  letter-spacing: .045em;
}
.boss-quote-text {
  font-family: BossDialogueCN, KaiTi, STKaiti, FangSong, serif !important;
  font-size: 1.08em;
  letter-spacing: .03em;
}
body.boss-battle-live .main.dungeon-main::before,
body.boss-battle-live #dungeon.view.active::before,
body.boss-battle-live #battle.view.active::before {
  background-image:
    linear-gradient(180deg, rgba(4,4,6,.28), rgba(2,2,3,.82)),
    var(--current-boss-bg) !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  filter: brightness(.58) saturate(.94) contrast(1.04) !important;
}
body.boss-battle-live .dungeon-display,
body.boss-battle-live .dungeon-command-deck,
body.boss-battle-live .player-side-panel,
body.boss-battle-live .battle-inline-wrap {
  background: linear-gradient(180deg, rgba(8,8,10,.66), rgba(3,3,4,.86)) !important;
  backdrop-filter: blur(8px);
}
.battle-screen-log p .boss-quote-text,
.event-text .boss-quote-text,
.screen-log .boss-quote-text {
  color: #f4dfb2;
  text-shadow: 0 0 14px rgba(0,0,0,.42);
}


/* v0.2.8：转职、技能配置、特殊事件后续与背包扩容 */
.v028-skill-loadout,
.v028-post-dialogue {
  border: 1px solid rgba(236,199,124,.24);
  box-shadow: 0 18px 60px rgba(0,0,0,.28);
}
.v028-panel-head {
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
  margin-bottom:12px;
}
.v028-panel-head h3 { margin:0 0 6px; }
.v028-panel-head p { margin:0; color:var(--muted); }
.v028-panel-head strong {
  border:1px solid rgba(236,199,124,.28);
  border-radius:999px;
  padding:6px 10px;
  color:#ffe0a0;
}
.v028-selected-skills {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:12px 0;
}
.v028-selected-skills span,
.v028-skill-list span,
.v028-attr-row span {
  display:inline-flex;
  border:1px solid rgba(236,199,124,.22);
  border-radius:999px;
  padding:6px 10px;
  background:rgba(12,12,14,.42);
}
.v028-selected-skills em { color:var(--muted); }
.v028-skill-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:10px;
}
.v028-skill-card {
  text-align:left;
  min-height:112px;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(236,199,124,.16);
  background:rgba(8,8,10,.46);
}
.v028-skill-card.selected {
  border-color:rgba(255,218,135,.52);
  background:linear-gradient(180deg, rgba(62,36,12,.58), rgba(8,8,10,.58));
}
.v028-skill-card b,
.v028-skill-card span,
.v028-skill-card small {
  display:block;
}
.v028-skill-card span { color:#f2d492; margin:6px 0; }
.v028-skill-card small { color:var(--muted); line-height:1.55; }
.v028-battle-skill {
  min-width:150px;
}
.v028-promotion-modal {
  position:fixed;
  inset:0;
  z-index:20000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.v028-modal-backdrop {
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.72);
  backdrop-filter:blur(10px);
}
.v028-modal-panel {
  position:relative;
  z-index:1;
  width:min(980px,96vw);
  max-height:88vh;
  overflow:auto;
  border:1px solid rgba(236,199,124,.34);
  border-radius:28px;
  padding:22px;
  background:linear-gradient(180deg, rgba(18,16,13,.94), rgba(5,5,7,.96));
  box-shadow:0 28px 120px rgba(0,0,0,.55);
}
.v028-modal-title h2 { margin:0 0 8px; }
.v028-modal-title p { margin:0 0 18px; color:var(--muted); }
.v028-promotion-options {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.v028-promotion-card h3 { color:#ffe0a0; }
.v028-attr-row,
.v028-skill-list {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:10px 0 14px;
}
.v028-special-skip .big-action {
  min-width:180px;
}
.v028-post-dialogue {
  margin-top:16px;
  background:linear-gradient(180deg, rgba(24,17,11,.68), rgba(5,5,7,.86)) !important;
  backdrop-filter:blur(8px);
}
#upgrade-bag-capacity {
  margin-top:12px;
}
@media (max-width: 820px) {
  .v028-promotion-options { grid-template-columns:1fr; }
  .v028-modal-panel { padding:16px; border-radius:22px; }
  .v028-skill-grid { grid-template-columns:1fr; }
}


/* v0.2.9：Boss侦查前厅 / 入场台词保护 */
.v029-boss-gate-actions {
  align-items:center;
}
.v029-boss-gate-actions .big-action {
  min-width:190px;
}
.v029-boss-scout-card {
  margin-top:16px;
  border:1px solid rgba(255,210,125,.28);
  background:linear-gradient(180deg, rgba(36,24,12,.72), rgba(4,4,6,.86)) !important;
  box-shadow:0 18px 60px rgba(0,0,0,.34);
}
.v029-boss-scout-card h3 {
  margin-top:0;
  color:#ffe1a4;
}
.v029-boss-scout-card .muted {
  color:var(--muted);
  font-size:.92em;
}
body.boss-battle-live .v029-boss-scout-card {
  display:none;
}


/* v0.3.2：角色创建弹窗输入/选择层级修复 */
#first-character-modal,
#first-character-modal * {
  pointer-events: auto !important;
}
#first-character-modal .first-character-backdrop {
  pointer-events: none !important;
}
#first-character-modal .first-character-panel {
  position: relative !important;
  z-index: 100010 !important;
  pointer-events: auto !important;
}
#first-character-modal input,
#first-character-modal select,
#first-character-modal textarea {
  position: relative !important;
  z-index: 100020 !important;
  pointer-events: auto !important;
  user-select: text !important;
  -webkit-user-select: text !important;
  cursor: text !important;
}
#first-character-modal select {
  cursor: pointer !important;
}
.v032-name-prompt {
  margin: -6px 0 14px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  position: relative !important;
  z-index: 100021 !important;
}
.v032-class-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: -6px 0 16px;
  position: relative;
  z-index: 100021;
}
.v032-mini-title {
  grid-column: 1 / -1;
  color: #f0d797;
  font-size: 13px;
  letter-spacing: .08em;
  opacity: .9;
}
.v032-class-picker button {
  text-align: left !important;
  padding: 10px 12px !important;
  min-height: 76px;
  border-radius: 14px;
  position: relative !important;
  z-index: 100022 !important;
}
.v032-class-picker button b,
.v032-class-picker button span {
  display: block;
}
.v032-class-picker button span {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
  color: #cdbd94;
  max-height: 34px;
  overflow: hidden;
}
.v032-class-picker button.active {
  border-color: rgba(255,226,162,.76) !important;
  box-shadow: 0 0 0 1px rgba(255,226,162,.16), 0 0 26px rgba(213,164,74,.2) !important;
}


/* v0.3.3：长文本/长面板可滚动，装备栏去套娃 */
.player-side-panel,
aside.player-side-panel {
  max-height: calc(100vh - 110px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.equipment-panel,
.v033-scrollable {
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.equipment-panel {
  max-height: min(72vh, 760px) !important;
}
.equipment-grid,
.v022-equipment-grid {
  max-height: min(62vh, 680px) !important;
  overflow-y: auto !important;
  padding-right: 4px;
}
.event-text,
.screen-log,
.battle-screen-log,
.boss-dialogue-box {
  max-height: min(42vh, 420px) !important;
  overflow-y: auto !important;
  padding-right: 6px;
}
.v028-post-dialogue,
.v029-boss-scout-card,
.v028-skill-loadout,
.archive-skill-list {
  max-height: min(58vh, 560px) !important;
  overflow-y: auto !important;
}
.v033-soft-scroll {
  max-height: 220px;
  overflow-y: auto !important;
}
.equipment-panel .equipment-panel {
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.equipment-panel .equipment-panel > h3 {
  display: none !important;
}
.battle-actions .big-action,
.dungeon-command-deck .big-action {
  min-width: 150px;
}
@media (max-width: 900px) {
  .player-side-panel,
  aside.player-side-panel {
    max-height: 65vh !important;
  }
  .equipment-panel {
    max-height: 60vh !important;
  }
  .event-text,
  .screen-log,
  .battle-screen-log,
  .boss-dialogue-box {
    max-height: 36vh !important;
  }
}


/* v0.3.6：创建角色界面禁止内部滚动；滚动只留给地下城长文本 */
#first-character-modal,
#first-character-modal .first-character-panel,
#first-character-modal .modal-creator,
#first-character-modal .creator,
#first-character-modal .card,
#first-character-modal .v036-creator-skills,
#first-character-modal .v036-skill-grid {
  max-height: none !important;
  overflow: visible !important;
  scrollbar-width: none !important;
}
#first-character-modal ::-webkit-scrollbar {
  display: none !important;
}
#first-character-modal .first-character-panel {
  width: min(1480px, 92vw) !important;
  max-width: 1480px !important;
}
#first-character-modal .modal-creator,
#first-character-modal .creator {
  align-items: stretch !important;
}
#first-character-modal .v033-scrollable,
#first-character-modal .v033-soft-scroll {
  max-height: none !important;
  overflow: visible !important;
}
.v036-creator-skills {
  margin-top: 18px;
}
.v036-skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.v036-skill-chip {
  border: 1px solid rgba(236,199,124,.18);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(7,8,10,.38);
}
.v036-skill-chip b,
.v036-skill-chip span,
.v036-skill-chip small {
  display: block;
}
.v036-skill-chip span {
  margin: 4px 0;
  color: #f0d391;
}
.v036-skill-chip small {
  color: var(--muted);
  line-height: 1.45;
}
.v036-promotion-modal {
  position: fixed;
  inset: 0;
  z-index: 21000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.v036-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(10px);
}
.v036-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1020px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  border: 1px solid rgba(236,199,124,.34);
  border-radius: 28px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(18,16,13,.96), rgba(5,5,7,.97));
  box-shadow: 0 28px 120px rgba(0,0,0,.58);
}
.v036-modal-title h2 {
  margin: 0 0 8px;
}
.v036-modal-title p {
  margin: 0 0 18px;
  color: var(--muted);
}
.v036-promotion-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.v036-promotion-card h3 {
  color: #ffe0a0;
}
.v036-attr-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}
.v036-attr-row span {
  display: inline-flex;
  border: 1px solid rgba(236,199,124,.22);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(12,12,14,.42);
}
/* 滚动只给地下城/战斗里的长文本 */
body:not(.dungeon-fullscreen) #home .v033-scrollable,
body:not(.dungeon-fullscreen) #profile .v033-scrollable,
body:not(.dungeon-fullscreen) #inventory .v033-scrollable,
body:not(.dungeon-fullscreen) #home .v033-soft-scroll,
body:not(.dungeon-fullscreen) #profile .v033-soft-scroll,
body:not(.dungeon-fullscreen) #inventory .v033-soft-scroll {
  max-height: none !important;
  overflow: visible !important;
}
#dungeon .event-text,
#dungeon .screen-log,
#dungeon .battle-screen-log,
#dungeon .boss-dialogue-box,
#battle .screen-log,
#battle .battle-screen-log,
#battle .boss-dialogue-box {
  overflow-y: auto !important;
}
@media (max-width: 900px) {
  .v036-promotion-options {
    grid-template-columns: 1fr;
  }
  #first-character-modal .first-character-panel {
    width: 96vw !important;
  }
}


/* v0.3.7：注销并创建 */
.v037-profile-toolbar,
.v037-empty-create {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  border: 1px solid rgba(236,199,124,.22);
}
.v037-profile-toolbar h3,
.v037-empty-create h3 {
  margin: 0 0 6px;
}
.v037-profile-toolbar p,
.v037-empty-create p {
  margin: 0;
  color: var(--muted);
}
#first-character-modal.v037-force-open {
  position: fixed !important;
  inset: 0 !important;
  z-index: 25000 !important;
  display: block !important;
  pointer-events: auto !important;
}
#first-character-modal.v037-force-open .first-character-panel {
  z-index: 25002 !important;
}
#first-character-modal.v037-force-open .first-character-backdrop {
  z-index: 25001 !important;
}


/* v0.3.9：角色创建/战斗结果界面优化 */
.v039-profile-toolbar,
.v039-empty-create {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
  border:1px solid rgba(236,199,124,.24);
  background:linear-gradient(180deg, rgba(18,16,12,.78), rgba(5,5,7,.88)) !important;
  box-shadow:0 18px 60px rgba(0,0,0,.32);
}
.v039-profile-toolbar h3,
.v039-empty-create h2 {
  margin:0 0 6px;
  color:#ffe3ad;
}
.v039-profile-toolbar p,
.v039-empty-create p {
  margin:0;
  color:var(--muted);
}
.v039-empty-profile {
  min-height:72vh;
}
.v039-empty-create {
  max-width:860px;
  margin:80px auto 0;
  padding:26px 30px !important;
}
#first-character-modal.v039-creator-open {
  position:fixed !important;
  inset:0 !important;
  z-index:30000 !important;
  display:block !important;
  pointer-events:auto !important;
}
#first-character-modal.v039-creator-open .first-character-backdrop {
  pointer-events:none !important;
  background:radial-gradient(circle at 50% 28%, rgba(126,91,38,.18), rgba(0,0,0,.78) 58%, rgba(0,0,0,.92)) !important;
}
#first-character-modal.v039-creator-open .first-character-panel,
#first-character-modal .v039-creator-panel {
  width:min(1500px,94vw) !important;
  max-width:1500px !important;
  border-radius:28px !important;
  border:1px solid rgba(236,199,124,.34) !important;
  background:linear-gradient(180deg, rgba(16,14,10,.94), rgba(5,5,6,.97)) !important;
  box-shadow:0 36px 140px rgba(0,0,0,.62), inset 0 0 0 1px rgba(255,230,170,.05) !important;
}
#first-character-modal .modal-title h2 {
  color:#ffe6b6;
  letter-spacing:.02em;
}
#first-character-modal .modal-title p {
  color:#cdbd94;
}
#first-character-modal .creator,
#first-character-modal .modal-creator {
  gap:22px !important;
}
#first-character-modal .card {
  border-color:rgba(236,199,124,.22) !important;
  background:rgba(8,9,11,.54) !important;
}
.v039-next-floor-button,
#battle-continue-floor.v039-next-floor-button {
  min-width:220px !important;
  min-height:52px !important;
  border-radius:999px !important;
  font-size:17px !important;
  letter-spacing:.06em !important;
  box-shadow:0 0 28px rgba(215,168,76,.18), inset 0 0 0 1px rgba(255,231,180,.16) !important;
}
.v039-action-row {
  gap:12px !important;
  flex-wrap:wrap !important;
}
#battle .battle-actions,
.battle-screen-actions,
.battle-actions:has(#battle-continue-floor) {
  position:relative;
  padding:14px 0 4px;
}
#battle .battle-actions:has(#battle-continue-floor)::before,
.battle-actions:has(#battle-continue-floor)::before {
  content:"战斗已结算";
  display:block;
  width:100%;
  color:#d9bd7c;
  opacity:.9;
  margin-bottom:8px;
  letter-spacing:.08em;
}
@media (max-width: 900px) {
  #first-character-modal.v039-creator-open .first-character-panel,
  #first-character-modal .v039-creator-panel {
    width:96vw !important;
    padding:18px !important;
  }
  .v039-profile-toolbar,
  .v039-empty-create {
    flex-direction:column;
    align-items:flex-start;
  }
}


/* v0.4.0：Boss台词中英文字体分流 */
.boss-dialogue-box .boss-quote-text,
.boss-test-log .boss-quote-text,
.screen-log .boss-quote-text,
.battle-screen-log .boss-quote-text {
  font-family: BossDialogueCN, KaiTi, STKaiti, FangSong, serif !important;
  letter-spacing: .035em;
}
.boss-dialogue-box .boss-quote-english,
.boss-test-log .boss-quote-english,
.screen-log .boss-quote-english,
.battle-screen-log .boss-quote-english,
.boss-dialogue-box .boss-narration-english,
.boss-test-log .boss-narration-english,
.screen-log .boss-narration-english,
.battle-screen-log .boss-narration-english,
.boss-dialogue-box .boss-latin-text,
.boss-test-log .boss-latin-text,
.screen-log .boss-latin-text,
.battle-screen-log .boss-latin-text,
.boss-dialogue-box .latin-text,
.boss-test-log .latin-text,
.screen-log .latin-text,
.battle-screen-log .latin-text,
.boss-line-english {
  font-family: DungeonGameLatin, Canterbury, Georgia, serif !important;
  letter-spacing: .055em;
}
.boss-dialogue-box .boss-narration-text,
.boss-test-log .boss-narration-text,
.screen-log .boss-narration-text,
.battle-screen-log .boss-narration-text {
  font-family: BossDialogueCN, KaiTi, STKaiti, FangSong, serif !important;
}
.hidden-effect-card span small {
  display:block;
  margin-top:2px;
  opacity:.78;
  font-size:11px;
  color:#e7c983;
}


/* v0.4.1：战斗记录Boss台词样式 */
.v041-boss-dialogue-line {
  font-family: BossDialogueCN, KaiTi, STKaiti, FangSong, serif !important;
  color: var(--boss-line-color, #f0d08a) !important;
  text-shadow:
    0 0 14px color-mix(in srgb, var(--boss-line-color, #f0d08a) 26%, transparent),
    0 0 2px rgba(0,0,0,.75) !important;
  letter-spacing: .035em;
  border-color: color-mix(in srgb, var(--boss-line-color, #f0d08a) 32%, rgba(255,255,255,.08)) !important;
}
.v041-boss-dialogue-line::first-letter {
  color: color-mix(in srgb, var(--boss-line-color, #f0d08a) 82%, #ffffff 18%);
}
.v041-boss-dialogue-line .latin-text {
  font-family: BossDialogueCN, KaiTi, STKaiti, FangSong, serif !important;
}


/* v0.4.2：隐藏事件派生正文与Boss台词独立框 */
.v042-hidden-outcome {
  border:1px solid rgba(236,199,124,.28);
  background:linear-gradient(180deg, rgba(16,12,8,.82), rgba(4,4,6,.94)) !important;
  box-shadow:0 24px 90px rgba(0,0,0,.42);
  max-height: min(72vh, 760px);
  overflow-y:auto;
}
.v042-hidden-head {
  border-bottom:1px solid rgba(236,199,124,.16);
  margin-bottom:16px;
  padding-bottom:12px;
}
.v042-hidden-head span {
  display:block;
  color:#d8b66e;
  letter-spacing:.12em;
  font-size:13px;
  margin-bottom:4px;
}
.v042-hidden-head h2 {
  margin:0 0 8px;
  font-family: BossDialogueCN, KaiTi, STKaiti, FangSong, serif !important;
  color:#ffe4a8;
}
.v042-hidden-head b {
  color:#f1d08d;
}
.v042-hidden-body {
  font-family: BossDialogueCN, KaiTi, STKaiti, FangSong, serif !important;
  font-size:18px;
  line-height:2.02;
  letter-spacing:.035em;
}
.v042-hidden-body p {
  margin:0 0 13px;
}
.v042-hidden-body .v042-english-line {
  font-family: DungeonGameLatin, Canterbury, Georgia, serif !important;
  letter-spacing:.06em;
  color:#ead8ad;
}
.v042-lazy {
  --v042-color:#ff9bd4;
  border-color:rgba(255,155,212,.34) !important;
}
.v042-contract,
.v042-broken {
  --v042-color:#d45f83;
  border-color:rgba(212,95,131,.34) !important;
}
.v042-mansion {
  --v042-color:#b889ff;
  border-color:rgba(184,137,255,.34) !important;
}
.v042-hidden-outcome .v042-hidden-head h2,
.v042-hidden-outcome .v042-hidden-body p strong {
  color:var(--v042-color, #ffe4a8);
  text-shadow:0 0 16px color-mix(in srgb, var(--v042-color, #ffe4a8) 24%, transparent);
}
.v042-hidden-actions {
  position:sticky;
  bottom:0;
  display:flex;
  justify-content:flex-end;
  padding-top:14px;
  margin-top:18px;
  background:linear-gradient(180deg, transparent, rgba(4,4,6,.92) 32%);
}
.v042-hidden-actions .big-action {
  min-width:220px;
  border-radius:999px;
}
.v042-boss-dialogue-panel {
  border:1px solid color-mix(in srgb, var(--boss-dialogue-color, #f0d08a) 42%, rgba(255,255,255,.08));
  background:linear-gradient(180deg, rgba(20,14,10,.72), rgba(3,3,5,.9)) !important;
  box-shadow:0 20px 80px rgba(0,0,0,.38), 0 0 28px color-mix(in srgb, var(--boss-dialogue-color, #f0d08a) 14%, transparent);
  margin-bottom:14px;
}
.v042-boss-dialogue-title {
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid color-mix(in srgb, var(--boss-dialogue-color, #f0d08a) 30%, rgba(255,255,255,.06));
  margin-bottom:10px;
  padding-bottom:8px;
}
.v042-boss-dialogue-title span {
  font-family: DungeonGameLatin, Canterbury, Georgia, serif !important;
  color:var(--boss-dialogue-color, #f0d08a);
  letter-spacing:.12em;
}
.v042-boss-dialogue-title h3 {
  margin:0;
  font-family: BossDialogueCN, KaiTi, STKaiti, FangSong, serif !important;
  color:var(--boss-dialogue-color, #f0d08a);
}
.v042-boss-dialogue-lines p {
  margin:0 0 8px;
  font-family: BossDialogueCN, KaiTi, STKaiti, FangSong, serif !important;
  font-size:19px;
  line-height:1.9;
  letter-spacing:.035em;
  color:color-mix(in srgb, var(--boss-dialogue-color, #f0d08a) 82%, #fff 18%);
  text-shadow:0 0 14px color-mix(in srgb, var(--boss-dialogue-color, #f0d08a) 22%, transparent);
}


/* v0.4.3：背包极简显示 / 搜索 / 详情 */
.v043-inventory-page,
#bag-modal-content {
  --v043-line: rgba(236,199,124,.18);
}
.v043-bag-head {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  margin-bottom:14px;
}
.v043-bag-head h2 {
  margin:0 0 6px;
  color:#ffe4a8;
}
.v043-bag-head p {
  margin:0;
  color:var(--muted);
}
.v043-bag-head strong {
  border:1px solid rgba(236,199,124,.28);
  border-radius:999px;
  padding:8px 14px;
  color:#f5d38d;
  white-space:nowrap;
}
.v043-bag-stats {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:10px 0 14px;
}
.v043-bag-stats span {
  border:1px solid rgba(236,199,124,.16);
  border-radius:999px;
  padding:6px 10px;
  background:rgba(8,9,11,.42);
  color:#d9c89b;
}
.v043-bag-tools {
  display:grid;
  grid-template-columns:minmax(240px, 1fr) auto;
  gap:12px;
  align-items:center;
  margin:14px 0;
}
.v043-bag-search {
  min-height:42px;
  border-radius:14px;
  border:1px solid rgba(236,199,124,.24);
  background:rgba(3,4,6,.62);
  color:#fff2d2;
  padding:0 14px;
  outline:none;
}
.v043-bag-search:focus {
  border-color:rgba(255,222,150,.55);
  box-shadow:0 0 0 3px rgba(236,199,124,.1);
}
.v043-tabs {
  margin:0 !important;
  justify-content:flex-end;
}
.v043-item-list {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:9px;
  max-height:min(58vh,640px);
  overflow-y:auto;
  padding-right:4px;
}
.v043-item-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:52px;
  border:1px solid var(--v043-line);
  border-radius:14px;
  padding:10px 12px;
  background:linear-gradient(180deg, rgba(12,13,15,.62), rgba(5,6,8,.72));
  color:#f5e7c9;
  text-align:left;
  cursor:pointer;
}
.v043-item-row:hover {
  border-color:rgba(255,225,160,.48);
  transform:translateY(-1px);
}
.v043-item-name {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight:700;
}
.v043-item-qty {
  color:#ffd98f;
  flex:0 0 auto;
}
.v043-item-row.material .v043-item-qty { color:#d6e6a3; }
.v043-item-row.potion .v043-item-qty { color:#9fd0ff; }
.v043-item-row.equipment .v043-item-qty { color:#e8b0ff; }
.v043-item-detail-modal {
  position:fixed;
  inset:0;
  z-index:32000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.v043-detail-backdrop {
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.72);
  backdrop-filter:blur(8px);
}
.v043-detail-panel {
  position:relative;
  z-index:1;
  width:min(680px,94vw);
  max-height:86vh;
  overflow-y:auto;
  border:1px solid rgba(236,199,124,.34);
  background:linear-gradient(180deg, rgba(18,16,13,.96), rgba(4,4,6,.97)) !important;
  box-shadow:0 28px 120px rgba(0,0,0,.55);
}
.v043-detail-head {
  border-bottom:1px solid rgba(236,199,124,.18);
  padding-bottom:12px;
  margin-bottom:12px;
}
.v043-detail-head h2 {
  margin:0 0 6px;
  color:#ffe4a8;
}
.v043-detail-head span {
  color:#d6c194;
}
.v043-detail-body p {
  margin:8px 0;
  line-height:1.7;
}
.v043-detail-body b {
  color:#f0cf8c;
}
#bag-modal-content .v043-item-list {
  max-height:min(55vh,560px);
}
@media (max-width: 860px) {
  .v043-bag-tools {
    grid-template-columns:1fr;
  }
  .v043-tabs {
    justify-content:flex-start;
  }
  .v043-item-list {
    grid-template-columns:1fr;
  }
}


/* v0.4.5：目标选择 / 查看意图 / 蓄力按钮 */
.v045-target-card {
  cursor:pointer !important;
  transition:transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.v045-target-card:hover {
  transform:translateY(-2px);
  border-color:rgba(255,222,150,.55) !important;
  box-shadow:0 0 26px rgba(221,171,84,.16) !important;
}
.battle-opponent-card.selected-target,
.v045-target-card.selected-target {
  border-color:rgba(255,226,150,.86) !important;
  box-shadow:
    0 0 0 1px rgba(255,226,150,.28),
    0 0 32px rgba(224,170,70,.22) !important;
  background:linear-gradient(180deg, rgba(42,29,11,.66), rgba(8,8,10,.76)) !important;
}
.battle-opponent-card.selected-target::before,
.v045-target-card.selected-target::before {
  content:"当前目标";
  display:inline-flex;
  width:max-content;
  margin-bottom:6px;
  border:1px solid rgba(255,226,150,.45);
  border-radius:999px;
  padding:3px 8px;
  color:#ffe09a;
  font-size:12px;
  letter-spacing:.08em;
}
#battle-focus,
#battle-inspect {
  border-color:rgba(149,190,255,.26) !important;
}
#battle-focus:hover,
#battle-inspect:hover {
  border-color:rgba(149,190,255,.58) !important;
}
.v045-skill-btn {
  min-width:150px;
}


/* v0.4.6：地下城背包容量与技能显示修复 */
.v028-selected-skills span {
  font-family: inherit !important;
}
.v028-selected-skills span:empty {
  display:none;
}
.v046-capacity-note {
  color:#d6c194;
}


/* v0.4.7：隐藏事件战斗前剧情 / Boss台词框位置 */
.v047-prebattle {
  border:1px solid rgba(236,199,124,.28);
  background:linear-gradient(180deg, rgba(16,12,8,.86), rgba(4,4,6,.96)) !important;
  max-height:min(72vh,760px);
  overflow-y:auto;
  box-shadow:0 24px 90px rgba(0,0,0,.42);
}
.v047-prebattle-head {
  border-bottom:1px solid rgba(236,199,124,.16);
  margin-bottom:16px;
  padding-bottom:12px;
}
.v047-prebattle-head span {
  display:block;
  color:#d8b66e;
  letter-spacing:.12em;
  font-size:13px;
  margin-bottom:4px;
}
.v047-prebattle-head h2 {
  margin:0 0 8px;
  font-family: BossDialogueCN, KaiTi, STKaiti, FangSong, serif !important;
  color:#ffe4a8;
}
.v047-prebattle-head b {
  color:#f1d08d;
}
.v047-prebattle-body {
  font-family: BossDialogueCN, KaiTi, STKaiti, FangSong, serif !important;
  font-size:18px;
  line-height:2.02;
  letter-spacing:.035em;
}
.v047-prebattle-body p {
  margin:0 0 13px;
}
.v047-prebattle-body .v047-english-line {
  font-family:DungeonGameLatin, Canterbury, Georgia, serif !important;
  letter-spacing:.06em;
}
.v047-contract {
  --v047-color:#d45f83;
  border-color:rgba(212,95,131,.36) !important;
}
.v047-broken {
  --v047-color:#c43d52;
  border-color:rgba(196,61,82,.38) !important;
}
.v047-prebattle .v047-prebattle-head h2,
.v047-prebattle .v047-prebattle-body p {
  text-shadow:0 0 14px color-mix(in srgb, var(--v047-color, #ffe4a8) 18%, transparent);
}
.v047-prebattle-actions {
  position:sticky;
  bottom:0;
  display:flex;
  justify-content:flex-end;
  margin-top:18px;
  padding-top:16px;
  background:linear-gradient(180deg, transparent, rgba(4,4,6,.94) 34%);
}
.v047-prebattle-actions .big-action {
  min-width:220px;
  border-radius:999px;
}
.v047-boss-dialogue-panel {
  margin:12px 0 14px !important;
  order:2;
}
.battle-inline-wrap .battle-summary-row {
  order:0;
}
.battle-inline-wrap .player-battle-line {
  order:1;
}
.battle-inline-wrap .enemy-group-grid {
  order:3;
}
.battle-inline-wrap .battle-screen-log {
  order:4;
}


/* v0.4.8：动作防连点视觉反馈 */
.v048-action-busy,
button.v048-action-busy {
  pointer-events:none !important;
  opacity:.58 !important;
  filter:saturate(.7);
  transform:none !important;
}
.v048-guarded-action::after {
  content:"";
}


/* v0.4.10：真正删除账号按钮 */
.v050-delete-account {
  border-color: rgba(255,98,98,.42) !important;
  color:#ffd0d0 !important;
}
.v050-delete-account:hover {
  box-shadow:0 0 24px rgba(255,78,78,.18) !important;
}
.v050-empty-account {
  max-width: 760px;
  margin: 40px auto;
  border:1px solid rgba(255,190,110,.24);
  background:linear-gradient(180deg, rgba(18,14,10,.74), rgba(4,4,6,.9)) !important;
}
.v050-empty-account h2 {
  color:#ffe0a0;
  margin-top:0;
}
.v050-empty-account p {
  color:var(--muted);
  line-height:1.7;
}

/* v0.4.11：账号登录注册 / 地下城入口去内部滚动 */
.v411-profile-account {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
  border:1px solid rgba(236,199,124,.26);
  background:linear-gradient(180deg, rgba(16,14,10,.82), rgba(5,5,7,.92)) !important;
}
.v411-profile-account h3 { margin:0 0 6px; color:#ffe3ad; }
.v411-profile-account p { margin:0; color:var(--muted); }
.v411-account-modal {
  position:fixed;
  inset:0;
  z-index:36000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.v411-account-backdrop {
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.76);
  backdrop-filter:blur(10px);
}
.v411-account-panel {
  position:relative;
  z-index:1;
  width:min(560px,94vw);
  border:1px solid rgba(236,199,124,.34);
  background:linear-gradient(180deg, rgba(18,16,13,.97), rgba(4,4,6,.98)) !important;
  box-shadow:0 28px 120px rgba(0,0,0,.58);
}
.v411-account-tabs {
  display:flex;
  gap:8px;
  margin-bottom:16px;
}
.v411-account-tabs button {
  flex:1;
}
.v411-account-tabs button.active {
  border-color:rgba(255,226,150,.72) !important;
  color:#ffe4a8 !important;
  box-shadow:0 0 22px rgba(220,172,80,.18);
}
.v411-account-body h2 {
  margin:0 0 8px;
  color:#ffe4a8;
}
.v411-account-body p {
  color:var(--muted);
  line-height:1.65;
}
.v411-account-body label {
  display:block;
  margin:12px 0;
  color:#f2d89f;
}
.v411-account-body input {
  display:block;
  width:100%;
  box-sizing:border-box;
  margin-top:6px;
  min-height:44px;
  border-radius:14px;
  border:1px solid rgba(236,199,124,.24);
  background:rgba(3,4,6,.62);
  color:#fff2d2;
  padding:0 14px;
  outline:none;
}
.v411-account-body input:focus {
  border-color:rgba(255,222,150,.58);
  box-shadow:0 0 0 3px rgba(236,199,124,.1);
}
.v411-account-list {
  margin-top:16px;
  border-top:1px solid rgba(236,199,124,.16);
  padding-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.v411-account-list strong {
  width:100%;
  color:#f2d89f;
}
/* 入口整备页不要内部滚轮，只允许页面整体滚动 */
.v411-no-prep-scroll .dungeon-prep-shell,
.v411-no-prep-scroll .v143-prep,
.v411-no-prep-scroll .v145-prep,
.v411-no-prep-scroll .v143-prep-layout,
.v411-no-prep-scroll .v145-prep-layout,
.v411-no-prep-scroll .prep-town-backpack,
.v411-no-prep-scroll .prep-item-list,
.v411-no-prep-scroll .town-backpack-grid,
.v411-no-prep-scroll .v028-skill-loadout,
.v411-no-prep-scroll .v028-skill-grid,
.v411-no-prep-scroll .v043-item-list,
.v411-no-prep-scroll .v043-inventory-page {
  max-height:none !important;
  overflow:visible !important;
}
.v411-no-prep-scroll .dungeon-prep-shell ::-webkit-scrollbar,
.v411-no-prep-scroll .v143-prep ::-webkit-scrollbar,
.v411-no-prep-scroll .v145-prep ::-webkit-scrollbar {
  display:none !important;
}
@media (max-width: 900px) {
  .v411-profile-account { flex-direction:column; align-items:flex-start; }
}

/* v0.4.13 玩家技能CD显示 */
button.is-cooling,
.ghost.is-cooling {
  opacity: 0.55;
  filter: grayscale(0.35);
  cursor: not-allowed;
}

/* v0.4.14 mobile/cd/event hotfix */
button,
[data-event-action],
[data-home-go],
[data-open-bag],
#battle-attack,
#battle-skill,
#battle-guard,
#battle-focus,
#battle-inspect,
#battle-potion,
#battle-flee,
#battle-continue-floor {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255, 230, 170, 0.18);
}
.v047-prebattle,
.v042-hidden-outcome,
.v028-post-dialogue {
  touch-action: manipulation;
}
.player-battle-line span {
  white-space: nowrap;
}


/* v0.4.15：手机UI重设计 / 保险栏与背包移动端重构 */
.v415-bag-summary{margin-bottom:14px;}
.v415-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
.v415-summary-card{padding:12px 10px;border:1px solid rgba(212,177,104,.18);border-radius:14px;background:linear-gradient(180deg,rgba(24,18,10,.78),rgba(11,9,6,.9));display:flex;flex-direction:column;gap:4px;}
.v415-summary-card strong{font-size:20px;color:#f2dec0;line-height:1.1;}
.v415-summary-card span{font-size:12px;color:var(--d-muted);}
.v415-bag-tools{margin-bottom:14px;}
.v415-search-row{display:flex;gap:10px;align-items:center;}
.v415-bag-search{width:100%;padding:14px 16px;border-radius:14px;border:1px solid rgba(212,177,104,.18);background:rgba(8,7,5,.88);color:#f5ead5;font:inherit;outline:none;}
.v415-bag-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px;}
.v415-bag-card{border:1px solid rgba(212,177,104,.18);border-radius:18px;padding:14px;background:linear-gradient(180deg,rgba(23,18,10,.8),rgba(10,8,5,.92));box-shadow:0 8px 28px rgba(0,0,0,.16);}
.v415-bag-card-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:10px;}
.v415-bag-card-head h3{margin:0 0 6px;font-size:18px;line-height:1.2;}
.v415-bag-card-head p{margin:0;color:var(--d-muted);font-size:12px;line-height:1.5;}
.v415-mobile-title{margin-bottom:14px;}
.v415-insurance-panel{margin-bottom:14px;}

@media (max-width: 860px){
  body.v415-mobile-ui{padding-bottom:104px;background-attachment:scroll;}
  .app-shell{display:block;min-height:100vh;}
  .dungeon-sidebar,.sidebar{position:sticky;top:0;z-index:30;width:auto;min-width:0;max-width:none;padding:10px 12px 8px;border-right:none;border-bottom:1px solid rgba(212,177,104,.15);backdrop-filter:blur(10px);background:linear-gradient(180deg,rgba(7,6,5,.96),rgba(10,8,6,.84));}
  .brand{gap:10px;align-items:center;}
  .brand-mark{width:40px;height:40px;font-size:20px;}
  .brand h1{font-size:22px;}
  .brand p{font-size:12px;}
  .sidebar-note{display:none !important;}

  .main,.dungeon-main{padding:12px 12px 120px;min-width:0;}
  .view{min-height:calc(100vh - 172px);}
  .section-title{margin-bottom:14px;}
  .section-title h2{font-size:26px;line-height:1.15;}
  .section-title p{font-size:13px;line-height:1.55;}
  .card{border-radius:18px;padding:14px;}
  .recipe-head,.game-hud-title,.v411-profile-account,.shop-hero,.dungeon-full-hud,.battle-top,.battle-hero{display:block !important;}
  .recipe-head > *, .game-hud-title > *, .battle-top > *{width:100%;}

  .grid,.grid.two,.grid.three,.insurance-slots,.bag-item-grid,.v143-prep-layout,.v145-prep-layout,.v415-bag-grid{grid-template-columns:1fr !important;}
  .battle-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  .battle-actions > button,.tabs > button,.v415-search-row > button,.insurance-actions > button,.nav button,.quick-bag-button,button.primary,button.ghost,button.danger{min-height:46px;border-radius:14px;font-size:14px;}
  .insurance-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
  .tabs,.inventory-tabs,.v415-inv-tabs{display:flex;overflow:auto;gap:8px;padding-bottom:4px;scrollbar-width:none;}
  .tabs::-webkit-scrollbar,.inventory-tabs::-webkit-scrollbar,.v415-inv-tabs::-webkit-scrollbar{display:none;}
  .tab{flex:0 0 auto;}

  .nav{position:fixed;left:0;right:0;bottom:0;z-index:60;display:flex;gap:8px;overflow-x:auto;padding:10px 12px calc(10px + env(safe-area-inset-bottom));border-top:1px solid rgba(212,177,104,.16);background:linear-gradient(180deg,rgba(10,9,7,.92),rgba(7,6,5,.98));backdrop-filter:blur(12px);scrollbar-width:none;}
  .nav::-webkit-scrollbar{display:none;}
  .nav button{flex:0 0 92px;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:10px 8px;gap:6px;}
  .nav-label{font-size:12px;line-height:1.15;text-align:center;}
  .nav-thumb{width:34px;height:34px;}

  .quick-bag-button{position:fixed;right:12px;bottom:88px;z-index:70;padding:0 16px;box-shadow:0 10px 28px rgba(0,0,0,.35);}
  .bag-modal{z-index:90;}
  .bag-modal-panel{width:min(100vw,100%);height:86vh;max-height:86vh;border-radius:22px 22px 0 0;position:absolute;left:0;right:0;bottom:0;margin:0;overflow:auto;padding-bottom:calc(18px + env(safe-area-inset-bottom));}
  .bag-modal-head{position:sticky;top:0;z-index:2;background:linear-gradient(180deg,rgba(12,10,7,.98),rgba(12,10,7,.9));padding-bottom:12px;margin-bottom:12px;border-bottom:1px solid rgba(212,177,104,.12);}
  #bag-modal-content{padding-bottom:20px;}

  .dungeon-prep-shell,.v145-prep,.v143-prep{padding-bottom:6px;}
  .prep-town-backpack .bag-item,.v415-bag-card,.inventory-item,.insurance-slot{border-radius:16px;}
  .bag-modal-stats,.v415-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .dungeon-full-hud,.battle-layout,.battle-main,.battle-side,.boss-cards,.shop-grid,.resource-grid,.character-grid{grid-template-columns:1fr !important;}
  .battle-log,.combat-log,.battle-feed{max-height:220px;overflow:auto;}
  .event-rule,.item-desc,p,li{line-height:1.65;}
  .v415-search-row{flex-direction:column;align-items:stretch;}
  .v415-search-row > button{width:100%;}
}

@media (max-width: 520px){
  .main,.dungeon-main{padding-left:10px;padding-right:10px;}
  .brand h1{font-size:20px;}
  .section-title h2{font-size:24px;}
  .card{padding:12px;}
  .battle-actions{grid-template-columns:1fr 1fr;}
  .nav button{flex-basis:84px;}
  .v415-bag-card-head{display:block;}
  .v415-bag-card-head .quality-badge{display:inline-flex;margin-top:8px;}
}


/* v0.4.16：转职兜底弹窗 */
.v416-promotion-modal{position:fixed;inset:0;z-index:120;display:flex;align-items:center;justify-content:center;padding:24px;}
.v416-promotion-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.76);backdrop-filter:blur(8px);}
.v416-promotion-panel{position:relative;width:min(980px,96vw);max-height:88vh;overflow:auto;border:1px solid rgba(212,177,104,.28);border-radius:24px;padding:22px;background:linear-gradient(180deg,rgba(22,16,10,.98),rgba(8,7,5,.98));box-shadow:0 30px 80px rgba(0,0,0,.55);}
.v416-promotion-title span{display:inline-flex;border:1px solid rgba(212,177,104,.32);border-radius:999px;padding:5px 10px;color:#f2d08a;font-size:12px;font-weight:900;letter-spacing:.12em;}
.v416-promotion-title h2{margin:12px 0 8px;font-size:28px;color:#f8e7c4;}
.v416-promotion-title p{margin:0 0 16px;color:var(--d-muted);line-height:1.7;}
.v416-promotion-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.v416-promotion-card h3{font-size:24px;margin:0 0 8px;}
.v416-attr-row,.v416-skill-list{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0;}
.v416-attr-row span,.v416-skill-list span{border:1px solid rgba(212,177,104,.18);border-radius:999px;padding:6px 10px;background:rgba(0,0,0,.18);font-size:12px;color:#f3dfba;}
@media (max-width:860px){
  .v416-promotion-modal{align-items:flex-end;padding:0;}
  .v416-promotion-panel{width:100vw;max-height:86vh;border-radius:24px 24px 0 0;padding:16px 14px calc(18px + env(safe-area-inset-bottom));}
  .v416-promotion-options{grid-template-columns:1fr;}
  .v416-promotion-title h2{font-size:23px;}
}

/* v0.4.17：隐藏事件层级兜底标记 */
.v042-hidden-outcome,.v047-prebattle{isolation:isolate;}


/* v0.4.18：隐藏事件完整展示、滚动保持、武器契约面板 */
.v047-prebattle,
.v042-hidden-outcome{
  max-height:none!important;
  overflow:visible!important;
}
.v047-prebattle-body,
.v042-hidden-body{
  max-height:none!important;
  overflow:visible!important;
}
html,body,.main,.dungeon-main,.dungeon-display,.shop-main-panel,.npc-dialogue,.bag-modal-panel,.battle-log,.combat-log,.screen-log{
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scroll-behavior:auto!important;
}
body.dungeon-fullscreen{overflow:auto!important;}
body.dungeon-fullscreen .dungeon-display{
  max-height:none!important;
  overflow:visible!important;
}
.v418-contract-panel{margin:14px 0;border-color:rgba(160,210,255,.26)!important;background:linear-gradient(180deg,rgba(17,27,36,.68),rgba(8,8,9,.94))!important;}
.v418-contract-list{display:grid;gap:10px;margin-top:12px;}
.v418-contract-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;border:1px solid rgba(212,177,104,.18);border-radius:16px;padding:12px;background:rgba(0,0,0,.18);}
.v418-contract-row b{display:block;color:#f8e7c4;margin-bottom:4px;}
.v418-contract-row span{display:block;color:var(--d-muted);font-size:12px;line-height:1.5;}
.v418-contract-row.contracted{border-color:rgba(110,220,170,.34);background:linear-gradient(180deg,rgba(30,76,55,.25),rgba(0,0,0,.16));}
.v418-contract-row.empty{opacity:.72;}
.scavenger-item .quality-badge{box-shadow:0 0 18px rgba(245,203,110,.12);}
@media(max-width:860px){
  .v418-contract-row{grid-template-columns:1fr;}
  .v418-contract-row button{width:100%;}
  .v047-prebattle,.v042-hidden-outcome{padding-bottom:20px!important;}
}


/* v0.4.19：视频反馈-暂离页不再长列表滚动 */
.v419-paused-page{display:grid;gap:14px;max-width:1120px;margin:0 auto;padding-bottom:16px;}
.v419-pause-hero{border-color:rgba(212,177,104,.34)!important;background:linear-gradient(180deg,rgba(28,20,12,.92),rgba(8,7,5,.96))!important;}
.v419-pause-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;}
.v419-pause-head span{display:inline-flex;border:1px solid rgba(212,177,104,.36);border-radius:999px;padding:5px 10px;color:#f7d98e;font-size:12px;font-weight:900;letter-spacing:.12em;}
.v419-pause-head strong{color:#f9d77e;font-size:20px;}
.v419-pause-hero h2{margin:0 0 10px;color:#ffe8b6;font-size:30px;line-height:1.2;}
.v419-pause-hero p{margin:0;color:#cdbb96;line-height:1.8;}
.v419-pause-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px;}
.v419-summary-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0;}
.v419-summary-row div{border:1px solid rgba(212,177,104,.16);border-radius:14px;padding:12px;background:rgba(0,0,0,.22);}
.v419-summary-row strong{display:block;color:#f8e1aa;font-size:22px;}
.v419-summary-row span{display:block;color:var(--d-muted);font-size:12px;margin-top:4px;}
.v419-eq-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}
.v419-eq-chip{border:1px solid rgba(212,177,104,.18);border-radius:14px;padding:10px 12px;background:rgba(0,0,0,.22);min-height:64px;}
.v419-eq-chip b{display:block;color:#f8e1aa;margin-bottom:4px;}
.v419-eq-chip span{display:block;color:#cdbb96;font-size:12px;line-height:1.35;}
.v419-eq-chip.empty{opacity:.62;}
.v419-paused-compact .dungeon-prep-shell,.v419-paused-compact .v145-prep-layout,.v419-paused-compact .prep-town-backpack{max-height:none!important;overflow:visible!important;}
html,body{overscroll-behavior-y:none!important;}
@media(max-width:860px){
  .v419-paused-page{gap:10px;padding:10px 0 120px;}
  .v419-pause-hero h2{font-size:22px;}
  .v419-pause-actions{grid-template-columns:1fr;}
  .v419-eq-grid{grid-template-columns:1fr 1fr;}
  .v419-summary-row{grid-template-columns:1fr 1fr;}
  .v419-paused-page .card{padding:12px!important;border-radius:18px!important;}
}


/* v0.4.20：护盾规则提示 */
.v420-shield-rule{
  display:inline-flex;
  align-items:center;
  margin-left:8px;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(132,204,154,.32);
  background:rgba(132,204,154,.08);
  color:#bff3c9;
  font-size:12px;
  font-weight:900;
}
@media (max-width:860px){
  .v420-shield-rule{margin-left:0;margin-top:5px;}
}


/* v0.4.21：战斗节奏提示 */
.v421-battle-rule{
  margin:8px 0 0;
  padding:8px 10px;
  border:1px solid rgba(212,177,104,.18);
  border-radius:12px;
  background:rgba(212,177,104,.07);
  color:#f3d28b;
  font-size:12px;
  font-weight:900;
  letter-spacing:.04em;
}
@media (max-width:860px){
  .v421-battle-rule{font-size:11px;line-height:1.5;}
}


/* v0.4.22：玩家技能CD按钮状态 */
button.is-cooling,.v045-skill-btn.is-cooling,.v028-battle-skill.is-cooling{opacity:.55;filter:grayscale(.35);cursor:not-allowed;}


/* v0.4.23：保险栏兜底、战斗列表滚动保持、按钮修复 */
.v423-insurance-mini{
  margin:12px 0;
  border-color:rgba(132,204,154,.25);
  background:linear-gradient(180deg,rgba(20,32,24,.62),rgba(10,9,6,.88));
}
.enemy-group-grid,
.targetable,
.battle-screen-log,
.screen-log,
.battle-log,
.combat-log,
.dungeon-display,
.bag-modal-panel,
#bag-modal-content,
.shop-main-panel,
.npc-dialogue{
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.enemy-group-grid.targetable,
.enemy-group-grid{
  scroll-behavior:auto !important;
}
#battle-attack{
  display:inline-flex !important;
  visibility:visible !important;
}
@media (max-width:860px){
  .v423-insurance-mini{margin:10px 0;}
  .v423-insurance-mini .battle-actions{grid-template-columns:1fr 1fr;}
}


/* v0.4.24：地下城入口前置 / 城镇背包收纳 */
.v424-start-panel{
  margin:0 0 14px;
  border-color:rgba(255,211,127,.28);
  background:linear-gradient(180deg,rgba(45,33,13,.72),rgba(12,10,7,.92));
}
.v424-start-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.v424-old-start-hidden{
  opacity:.45;
  transform:scale(.98);
}
.v424-townbag-head{
  position:sticky;
  top:0;
  z-index:3;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:10px 0 12px;
  background:linear-gradient(180deg,rgba(16,13,9,.98),rgba(16,13,9,.84));
  border-bottom:1px solid rgba(212,177,104,.14);
}
.v424-townbag-head h3{margin:0;}
.v424-townbag-head p{margin:4px 0 0;color:var(--d-muted);font-size:12px;}
.prep-town-backpack .v424-compact-line{
  display:none;
}
body:not(.v424-townbag-expanded) .prep-town-backpack > h3,
body:not(.v424-townbag-expanded) .prep-town-backpack > p{
  display:none;
}
body:not(.v424-townbag-expanded) .prep-town-backpack .prep-backpack-grid,
body:not(.v424-townbag-expanded) .prep-town-backpack .v145-town-grid{
  display:flex !important;
  flex-direction:column;
  gap:6px;
  max-height:360px;
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
body:not(.v424-townbag-expanded) .prep-town-backpack .prep-item.v143{
  min-height:unset;
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:12px;
}
body:not(.v424-townbag-expanded) .prep-town-backpack .prep-item.v143 > :not(.v424-compact-line):not(.prep-actions){
  display:none !important;
}
body:not(.v424-townbag-expanded) .prep-town-backpack .prep-item.v143 .v424-compact-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}
body:not(.v424-townbag-expanded) .prep-town-backpack .prep-item.v143 .v424-compact-line b{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#f8e7c4;
}
body:not(.v424-townbag-expanded) .prep-town-backpack .prep-item.v143 .v424-compact-line span{
  flex:0 0 auto;
  color:#f2d08a;
  font-weight:900;
}
body:not(.v424-townbag-expanded) .prep-town-backpack .prep-item.v143 .prep-actions{
  display:flex;
  gap:6px;
}
body:not(.v424-townbag-expanded) .prep-town-backpack .prep-item.v143 .prep-actions .mini{
  padding:7px 9px;
  min-height:32px;
}
body.v424-townbag-expanded .prep-town-backpack .prep-backpack-grid,
body.v424-townbag-expanded .prep-town-backpack .v145-town-grid{
  max-height:none;
  overflow:visible;
}
@media (max-width:860px){
  .v424-start-actions{grid-template-columns:1fr;}
  .v424-start-panel{margin-bottom:10px;}
  body:not(.v424-townbag-expanded) .prep-town-backpack .prep-backpack-grid,
  body:not(.v424-townbag-expanded) .prep-town-backpack .v145-town-grid{
    max-height:300px;
  }
}


/* v0.4.25：左侧展开并与右侧等高 */
.dungeon-prep-shell .v425-prep-layout,
.dungeon-prep-shell .v143-prep-layout.v145-prep-layout,
.dungeon-prep-shell .v145-prep-layout{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
  gap:18px;
  align-items:stretch !important;
}
.dungeon-prep-shell .v425-prep-layout > section,
.dungeon-prep-shell .v143-prep-layout.v145-prep-layout > section,
.dungeon-prep-shell .v145-prep-layout > section{
  min-height:100%;
}
.v425-left-card,
.v425-right-card,
.prep-town-backpack{
  height:100%;
}
.v425-left-card{
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  border-color:rgba(255,211,127,.28);
  background:linear-gradient(180deg,rgba(34,25,11,.72),rgba(10,9,7,.92));
}
.v425-left-card > h3,
.v425-left-card > p{
  display:none !important;
}
.v425-left-main{
  display:flex;
  flex-direction:column;
  gap:14px;
  flex:1;
  min-height:100%;
}
.v425-entry-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.v425-entry-head h3,
.v425-summary-head h4{margin:0;}
.v425-entry-head p,
.v425-summary-head p{margin:6px 0 0;color:var(--d-muted);}
.v425-start-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.v425-start-stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.v425-start-stats > div{
  border:1px solid rgba(212,177,104,.12);
  border-radius:18px;
  padding:16px 18px;
  background:rgba(255,255,255,.02);
}
.v425-start-stats strong{
  display:block;
  font-size:34px;
  line-height:1;
  color:#f5d88d;
}
.v425-start-stats span{
  display:block;
  margin-top:8px;
  color:var(--d-muted);
}
.v425-left-summary{
  display:flex;
  flex-direction:column;
  flex:1;
  min-height:220px;
}
.v425-chosen-box{
  flex:1;
  min-height:160px;
  border:1px solid rgba(212,177,104,.12);
  border-radius:18px;
  padding:16px;
  background:rgba(255,255,255,.02);
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.v425-chosen-list{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.v425-empty{
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
  gap:8px;
  color:var(--d-muted);
}
.v425-empty strong{color:#f8e7c4;}
.v425-rule-note{
  border:1px solid rgba(212,177,104,.12);
  border-radius:16px;
  padding:12px 14px;
  background:rgba(255,255,255,.02);
  color:#d8c8a6;
  font-size:13px;
  line-height:1.75;
}
.v425-old-actions{
  margin-top:12px;
  opacity:.82;
}
.v425-right-card,
.prep-town-backpack{
  display:flex;
  flex-direction:column;
}
.v425-right-card .prep-backpack-grid,
.v425-right-card .v145-town-grid,
.prep-town-backpack .prep-backpack-grid,
.prep-town-backpack .v145-town-grid{
  flex:1;
}
@media (max-width:860px){
  .dungeon-prep-shell .v425-prep-layout,
  .dungeon-prep-shell .v143-prep-layout.v145-prep-layout,
  .dungeon-prep-shell .v145-prep-layout{
    grid-template-columns:1fr !important;
  }
  .v425-start-actions,
  .v425-start-stats{grid-template-columns:1fr;}
  .v425-left-summary{min-height:0;}
}


/* v0.4.26：套装触发状态 */
.v426-set-card{
  margin-top:10px;
}
.v426-set-line{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:8px 0;
  border-top:1px solid rgba(212,177,104,.12);
  font-size:12px;
}
.v426-set-line b{color:#f8e7c4;}
.v426-set-line span{color:var(--d-muted);text-align:right;}
.v426-set-line.active span{color:#bff3c9;}
.v426-set-line.inactive span{color:#c9bda5;}


/* v0.4.28：契约书轮回提示 */
.contract-shadow-note{
  border:1px solid rgba(212,177,104,.22);
  border-radius:14px;
  padding:10px 12px;
  background:rgba(80,20,20,.14);
  color:#f3d28b;
}


/* v0.4.29：战斗药物快捷栏与药物背包 */
.v429-potion-quick{
  grid-column:1 / -1;
  border:1px solid rgba(132,204,154,.25);
  border-radius:18px;
  padding:12px;
  background:linear-gradient(180deg,rgba(20,32,24,.55),rgba(7,8,6,.88));
  display:grid;
  gap:10px;
  margin-bottom:10px;
}
.v429-potion-title{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
}
.v429-potion-title b{color:#d8ffd9;}
.v429-potion-title span{font-size:12px;color:var(--d-muted);}
.v429-potion-cards{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.v429-potion-card{
  text-align:left;
  border:1px solid rgba(132,204,154,.22);
  border-radius:14px;
  background:rgba(10,18,12,.76);
  padding:10px 12px;
  color:#f7eedb;
  min-height:68px;
}
.v429-potion-card b{display:block;font-size:15px;margin-bottom:5px;color:#f6e3b2;}
.v429-potion-card span{display:block;font-size:12px;line-height:1.45;color:#bfd9c4;}
.v429-open-bag{justify-self:end;}
.v429-potion-quick.empty{
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.v429-potion-modal{
  position:fixed;
  inset:0;
  z-index:140;
  background:rgba(0,0,0,.72);
  backdrop-filter:blur(8px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}
.v429-potion-panel{
  width:min(760px,96vw);
  max-height:86vh;
  overflow:auto;
  border:1px solid rgba(212,177,104,.25);
  border-radius:24px;
  padding:18px;
  background:linear-gradient(180deg,rgba(22,16,10,.98),rgba(8,7,5,.98));
  box-shadow:0 28px 80px rgba(0,0,0,.55);
}
.v429-potion-list{
  display:grid;
  gap:10px;
}
.v429-potion-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  border:1px solid rgba(212,177,104,.14);
  border-radius:16px;
  padding:12px 14px;
  background:rgba(255,255,255,.025);
}
.v429-potion-row b{display:block;color:#f8e7c4;margin-bottom:4px;}
.v429-potion-row span{display:block;color:var(--d-muted);font-size:13px;}
@media (max-width:860px){
  .v429-potion-cards{grid-template-columns:1fr;}
  .v429-potion-title{display:block;}
  .v429-open-bag{justify-self:stretch;}
  .v429-potion-modal{align-items:flex-end;padding:0;}
  .v429-potion-panel{
    width:100vw;
    max-height:86vh;
    border-radius:24px 24px 0 0;
    padding-bottom:calc(18px + env(safe-area-inset-bottom));
  }
  .v429-potion-row{align-items:stretch;flex-direction:column;}
}


/* v0.4.30：收尸人商店与装备契约选择 */
.v430-contract-panel{
  margin:14px 0;
  border-color:rgba(132,204,154,.26);
  background:linear-gradient(180deg,rgba(19,31,23,.58),rgba(9,8,6,.92));
}
.v430-contract-summary{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:12px 0;
}
.v430-contract-summary span{
  border:1px solid rgba(212,177,104,.16);
  border-radius:999px;
  padding:6px 10px;
  color:#f3dfba;
  background:rgba(255,255,255,.025);
  font-size:12px;
}
.v430-contract-modal{
  position:fixed;
  inset:0;
  z-index:150;
  background:rgba(0,0,0,.74);
  backdrop-filter:blur(8px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}
.v430-contract-dialog{
  width:min(860px,96vw);
  max-height:86vh;
  overflow:auto;
  border:1px solid rgba(212,177,104,.25);
  border-radius:24px;
  padding:18px;
  background:linear-gradient(180deg,rgba(22,16,10,.98),rgba(8,7,5,.98));
  box-shadow:0 28px 80px rgba(0,0,0,.55);
}
.v430-equipment-list{
  display:grid;
  gap:10px;
}
.v430-equipment-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  border:1px solid rgba(212,177,104,.14);
  border-radius:16px;
  padding:12px 14px;
  background:rgba(255,255,255,.025);
}
.v430-equipment-row.bound{
  border-color:rgba(132,204,154,.22);
  background:rgba(132,204,154,.055);
}
.v430-equipment-row b{
  display:block;
  color:#f8e7c4;
  margin-bottom:4px;
}
.v430-equipment-row span{
  display:block;
  color:var(--d-muted);
  font-size:13px;
}
.scavenger-item .event-rule{
  overflow-wrap:anywhere;
}
@media (max-width:860px){
  .v430-contract-modal{align-items:flex-end;padding:0;}
  .v430-contract-dialog{
    width:100vw;
    max-height:86vh;
    border-radius:24px 24px 0 0;
    padding-bottom:calc(18px + env(safe-area-inset-bottom));
  }
  .v430-equipment-row{flex-direction:column;align-items:stretch;}
}


/* v0.4.31：战斗区固定高度 / 行动按钮不消失 / 侧栏装备栏合并 / 背包卸装保险 */
.dungeon-fullscreen .dungeon-full-layout > div:first-child,
.dungeon-play-layout > .dungeon-main-panel{
  min-height:0;
}
.dungeon-fullscreen .dungeon-full-layout > div:first-child:has(.battle-mode),
.dungeon-play-layout > .dungeon-main-panel:has(.battle-mode){
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
  height:calc(100dvh - 126px);
  max-height:calc(100dvh - 126px);
  overflow:hidden;
}
.dungeon-display.battle-mode,
.dungeon-display .battle-inline-wrap,
.battle-inline-wrap.v431-battle-fixed-area,
.v431-battle-fixed-area{
  min-height:0;
  overflow:hidden;
}
.dungeon-display.battle-mode{
  display:flex;
  flex-direction:column;
}
.battle-inline-wrap{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:0;
  max-height:100%;
}
.battle-summary-row,
.player-battle-line{
  flex:0 0 auto;
}
.enemy-group-grid.targetable,
.enemy-group-grid{
  flex:0 0 auto;
  max-height:168px;
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.battle-screen-log,
.dungeon-display.battle-mode .screen-log{
  flex:1 1 auto;
  min-height:94px;
  max-height:190px;
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding-right:6px;
}
.v431-battle-sticky-actions,
.dungeon-command-deck:has(#battle-attack),
.dungeon-command-deck:has(#battle-skill){
  position:sticky;
  bottom:0;
  z-index:50;
  flex:0 0 auto;
  margin-top:10px;
  box-shadow:0 -18px 36px rgba(0,0,0,.42);
  backdrop-filter:blur(8px);
}
.v431-battle-sticky-actions .command-buttons,
.dungeon-command-deck:has(#battle-attack) .command-buttons,
.dungeon-command-deck:has(#battle-skill) .command-buttons{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(132px,1fr));
  gap:10px;
  max-height:34dvh;
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.v431-side-equipment{
  margin-top:10px;
}
.v431-side-equipment h3{
  margin:0 0 10px;
}
.v431-equipment-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}
.v431-equip-slot{
  border:1px solid rgba(212,177,104,.14);
  border-radius:12px;
  padding:8px 10px;
  background:rgba(255,255,255,.025);
  display:grid;
  gap:4px;
}
.v431-equip-slot b{color:#f8e7c4;}
.v431-equip-slot span{color:#d8c8a6;font-size:12px;}
.v431-equip-slot em{color:#9fb6d8;font-size:11px;font-style:normal;}
.v431-equip-slot.empty{opacity:.72;}
.v431-equipped-bag-panel,
.v431-insurance-panel{
  margin:12px 0;
}
.v431-equipped-list,
.v431-insurance-list{
  display:grid;
  gap:8px;
}
.v431-equipped-row,
.v431-insurance-list span{
  border:1px solid rgba(212,177,104,.14);
  border-radius:14px;
  padding:10px 12px;
  background:rgba(255,255,255,.025);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.v431-equipped-row b,
.v431-insurance-list b{
  display:block;
  color:#f8e7c4;
}
.v431-equipped-row span,
.v431-insurance-list em{
  display:block;
  color:var(--d-muted);
  font-size:12px;
  font-style:normal;
}
.v431-equipped-row.empty{
  opacity:.65;
}
.v431-card-tools{
  margin-top:10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.v431-insurance-check{
  margin-top:10px;
  color:#bff3c9;
  font-size:12px;
  border:1px solid rgba(132,204,154,.18);
  border-radius:12px;
  padding:8px 10px;
  background:rgba(132,204,154,.055);
}
.player-side-panel .equipment-panel:not(.v431-side-equipment) {
  display:none !important;
}
@media (max-width:860px){
  .dungeon-fullscreen .dungeon-full-layout > div:first-child:has(.battle-mode),
  .dungeon-play-layout > .dungeon-main-panel:has(.battle-mode){
    height:calc(100dvh - 104px);
    max-height:calc(100dvh - 104px);
  }
  .enemy-group-grid.targetable,
  .enemy-group-grid{
    max-height:132px;
  }
  .battle-screen-log,
  .dungeon-display.battle-mode .screen-log{
    max-height:150px;
  }
  .v431-battle-sticky-actions .command-buttons,
  .dungeon-command-deck:has(#battle-attack) .command-buttons,
  .dungeon-command-deck:has(#battle-skill) .command-buttons{
    grid-template-columns:repeat(2,minmax(0,1fr));
    max-height:38dvh;
  }
  .v431-equipped-row,
  .v431-insurance-list span{
    align-items:stretch;
    flex-direction:column;
  }
}


/* v0.4.32：电脑版战斗播报滚动区 */
@media (min-width: 861px){
  .dungeon-fullscreen .dungeon-full-layout > div:first-child:has(.battle-mode),
  .dungeon-play-layout > .dungeon-main-panel:has(.battle-mode){
    height: calc(100dvh - 118px);
    max-height: calc(100dvh - 118px);
    min-height: calc(100dvh - 118px);
    overflow: hidden;
  }
  .v432-desktop-battle-box,
  .dungeon-display.battle-mode{
    display:flex;
    flex-direction:column;
    min-height:0;
    overflow:hidden;
  }
  .v432-desktop-battle-wrap,
  .battle-inline-wrap{
    display:grid;
    grid-template-rows:auto auto minmax(0,1fr);
    gap:12px;
    min-height:0;
    height:100%;
    overflow:hidden;
  }
  .battle-summary-row{ flex:0 0 auto; }
  .enemy-group-grid.targetable,
  .enemy-group-grid{
    flex:0 0 auto;
    max-height:190px;
    overflow:auto;
    overscroll-behavior:contain;
  }
  .v432-desktop-battle-log,
  .battle-screen-log{
    min-height:0 !important;
    height:auto !important;
    max-height:none !important;
    overflow:auto !important;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
    padding-right:8px;
    scroll-behavior:smooth;
  }
  .v432-desktop-battle-log p,
  .battle-screen-log p{
    margin:0 0 10px;
  }
  .v431-battle-sticky-actions,
  .dungeon-command-deck:has(#battle-attack),
  .dungeon-command-deck:has(#battle-skill){
    margin-top:8px;
    padding-top:10px;
    background:linear-gradient(180deg, rgba(5,8,12,0) 0%, rgba(5,8,12,.8) 22%, rgba(5,8,12,.96) 100%);
  }
  .v431-battle-sticky-actions .command-buttons,
  .dungeon-command-deck:has(#battle-attack) .command-buttons,
  .dungeon-command-deck:has(#battle-skill) .command-buttons{
    max-height:28dvh;
    overflow:auto;
  }
}


/* v0.4.33：职业被动高级优先 / 饰品契约 */
.v433-passive-note,
.v433-contract-note{
  margin:10px 0;
  border:1px solid rgba(212,177,104,.18);
  border-radius:12px;
  padding:8px 10px;
  background:rgba(212,177,104,.06);
  color:#f3d28b;
  font-size:12px;
  line-height:1.6;
}
.v433-passive-suppressed{
  opacity:.56;
  filter:grayscale(.25);
}
.v433-passive-suppressed::after{
  content:"高级被动优先";
  display:inline-flex;
  margin-top:6px;
  border:1px solid rgba(255,107,122,.28);
  border-radius:999px;
  padding:3px 7px;
  color:#ffb6bf;
  font-size:11px;
}
.v433-passive-active{
  border-color:rgba(132,204,154,.38) !important;
}
.v433-accessory-contract{
  border-color:rgba(180,140,255,.28);
  background:rgba(128,100,255,.055);
}


/* v0.4.34：生命1修复 / 属性点异常保护 / 套盾职业清单 */
.v434-shield-summary{
  margin:14px 0;
  border-color:rgba(132,204,154,.24);
  background:linear-gradient(180deg,rgba(19,31,23,.52),rgba(9,8,6,.92));
}
.v434-shield-groups{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:12px 0;
}
.v434-shield-groups span{
  border:1px solid rgba(212,177,104,.15);
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  color:#f3dfba;
  background:rgba(255,255,255,.025);
}
.v434-shield-list{
  display:grid;
  gap:8px;
  margin-top:10px;
  max-height:360px;
  overflow:auto;
  overscroll-behavior:contain;
}
.v434-shield-list div{
  border:1px solid rgba(212,177,104,.12);
  border-radius:12px;
  padding:8px 10px;
  background:rgba(255,255,255,.025);
}
.v434-shield-list b{
  display:block;
  color:#f8e7c4;
}
.v434-shield-list small{
  display:block;
  color:var(--d-muted);
  line-height:1.5;
}


/* v0.4.35：Boss二阶段/两管血显示 */
.v435-phase-chip{
  display:inline-flex;
  margin-top:8px;
  border:1px solid rgba(255,107,122,.32);
  border-radius:999px;
  padding:4px 8px;
  background:rgba(255,107,122,.08);
  color:#ffd0d6;
  font-size:12px;
  font-weight:900;
}
.v435-boss-phase-rule{
  margin:8px 0;
  border:1px solid rgba(255,107,122,.24);
  border-radius:14px;
  padding:8px 10px;
  background:linear-gradient(180deg,rgba(80,20,28,.18),rgba(20,8,10,.35));
  color:#ffd0d6;
  font-size:12px;
  font-weight:900;
  line-height:1.55;
}


/* v0.4.36：兰瑟薇尔权柄机制显示 */
.v436-lanse-rule,
.v436-lanse-panel{
  margin:8px 0;
  border:1px solid rgba(255,107,122,.26);
  border-radius:14px;
  padding:8px 10px;
  background:linear-gradient(180deg,rgba(80,20,28,.18),rgba(20,8,10,.35));
  color:#ffd0d6;
  font-size:12px;
  font-weight:900;
  line-height:1.55;
}
.v436-lanse-panel b{
  display:block;
  color:#ffd7a3;
  margin-bottom:4px;
}
.v436-lanse-panel span{
  display:block;
  color:#ffd0d6;
}
button[data-v436-sealed="attack"],
button[data-v436-sealed="skill"]{
  opacity:.45 !important;
  cursor:not-allowed !important;
  filter:grayscale(.45);
}


/* v0.4.38：盼月机制显示 */
.v438-panyue-rule,
.v438-panyue-panel{
  margin:8px 0;
  border:1px solid rgba(150,180,255,.26);
  border-radius:14px;
  padding:8px 10px;
  background:linear-gradient(180deg,rgba(30,45,90,.18),rgba(8,12,22,.35));
  color:#d9e5ff;
  font-size:12px;
  font-weight:900;
  line-height:1.55;
}
.v438-panyue-panel b{
  display:block;
  color:#f8e7c4;
  margin-bottom:4px;
}
.v438-panyue-panel span{
  display:block;
  color:#d9e5ff;
}
button[data-v438-sealed="panyue"]{
  opacity:.45 !important;
  cursor:not-allowed !important;
  filter:grayscale(.45);
}


/* v0.4.39：非战斗地下城恢复普通布局；战斗页单独固定 */
#dungeon:not(.v439-battle-only-root).active,
#dungeon:not(.v439-battle-only-root){
  height:auto !important;
  max-height:none !important;
  overflow:visible !important;
  display:block;
}
#dungeon:not(.v439-battle-only-root) .dungeon-full-layout{
  height:auto !important;
  max-height:none !important;
  overflow:visible !important;
  display:grid;
  align-items:start;
}
#dungeon:not(.v439-battle-only-root) .dungeon-full-layout > div:first-child{
  height:auto !important;
  max-height:none !important;
  overflow:visible !important;
  display:block !important;
}
#dungeon:not(.v439-battle-only-root) .dungeon-display,
#dungeon:not(.v439-battle-only-root) .dungeon-command-deck,
#dungeon:not(.v439-battle-only-root) .player-side-panel,
#dungeon:not(.v439-battle-only-root) aside{
  height:auto !important;
  max-height:none !important;
  overflow:visible !important;
  position:relative !important;
}
#dungeon:not(.v439-battle-only-root) .dungeon-command-deck{
  box-shadow:none !important;
}

#dungeon.v439-battle-only-root .v439-battle-fixed-layout,
#dungeon.v439-battle-only-root .dungeon-full-layout:has(.battle-mode){
  min-height:0 !important;
  overflow:hidden !important;
}
#dungeon.v439-battle-only-root .dungeon-full-layout:has(.battle-mode) > div:first-child{
  min-height:0 !important;
  overflow:hidden !important;
  display:grid !important;
  grid-template-rows:minmax(0,1fr) auto;
  gap:10px;
}
#dungeon.v439-battle-only-root .dungeon-display.battle-mode,
#dungeon.v439-battle-only-root .v439-battle-display-scroll{
  min-height:0 !important;
  overflow:auto !important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
#dungeon.v439-battle-only-root .v439-battle-actions-fixed{
  position:sticky !important;
  bottom:0;
  z-index:70;
  max-height:32dvh;
  overflow:auto !important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  box-shadow:0 -18px 36px rgba(0,0,0,.42);
}
#dungeon.v439-battle-only-root .v439-battle-side-scroll{
  max-height:calc(100dvh - 150px);
  overflow:auto !important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
@media (max-width:860px){
  #dungeon.v439-battle-only-root .v439-battle-side-scroll{
    max-height:30dvh;
  }
}


/* v0.4.40：删除重复装备栏，保留当前穿戴装备；右侧不再独立滚动 */
#dungeon .v431-side-equipment,
#dungeon .player-side-panel .v431-side-equipment,
#dungeon aside .v431-side-equipment{
  display:none !important;
}

/* 覆盖 v0.4.31 里“隐藏非 v431 装备栏”的旧规则，保留图二当前穿戴装备 */
#dungeon .player-side-panel .equipment-panel:not(.v431-side-equipment),
#dungeon aside .equipment-panel:not(.v431-side-equipment),
#dungeon .v023-runtime-equipment,
#dungeon .v022-equipped-card,
#dungeon .v023-profile-equipment,
.v440-keep-equipped-panel{
  display:block !important;
}

/* 右侧栏取消内部滚动条，跟随页面整体滚动 */
#dungeon .player-side-panel,
#dungeon aside,
#dungeon .v440-side-no-inner-scroll{
  max-height:none !important;
  height:auto !important;
  overflow:visible !important;
  overscroll-behavior:auto !important;
  scrollbar-gutter:auto !important;
}

/* 右侧装备/状态卡片也不要自己套滚动条 */
#dungeon .v023-runtime-equipment,
#dungeon .v022-equipped-card,
#dungeon .v023-profile-equipment,
#dungeon .equipment-panel,
#dungeon .v440-panel-no-inner-scroll{
  max-height:none !important;
  height:auto !important;
  overflow:visible !important;
  overscroll-behavior:auto !important;
}

/* 战斗页面只让中间播报/按钮区滚，不让右侧角色栏滚 */
#dungeon.v439-battle-only-root .v439-battle-side-scroll,
#dungeon.v439-battle-only-root .player-side-panel,
#dungeon.v439-battle-only-root aside{
  max-height:none !important;
  height:auto !important;
  overflow:visible !important;
}

/* 页面本体允许滚轮滚动，避免只能拖右侧小滚动条 */
html,
body{
  overflow-y:auto !important;
}


/* v0.4.41：兰瑟薇尔强制阶段机制提示 */
.v441-lanse-force-panel{
  margin:8px 0;
  border:1px solid rgba(255,107,122,.30);
  border-radius:14px;
  padding:8px 10px;
  background:linear-gradient(180deg,rgba(90,20,36,.20),rgba(20,8,14,.38));
  color:#ffd0d6;
  font-size:12px;
  font-weight:900;
  line-height:1.55;
}
.v441-lanse-force-panel b{
  display:block;
  color:#ffd7a3;
  margin-bottom:4px;
}
.v441-lanse-force-panel span{
  display:block;
}


/* v0.4.42：300层通关退出地下城 */
.v442-final-clear-panel{
  margin:8px 0;
  border:1px solid rgba(255,215,128,.32);
  border-radius:14px;
  padding:10px 12px;
  background:linear-gradient(180deg,rgba(100,72,18,.20),rgba(22,12,6,.42));
  color:#ffe3a6;
  font-size:13px;
  font-weight:900;
  line-height:1.6;
}
.v442-final-clear-panel b{
  display:block;
  color:#fff1c8;
  margin-bottom:4px;
}
.v442-final-clear-panel span{
  display:block;
}
.v442-final-exit{
  border-color:rgba(255,120,120,.45) !important;
  box-shadow:0 0 22px rgba(255,80,80,.20);
}


/* v0.4.43：彻底隐藏旧版右侧「装备栏」；保留「当前穿戴装备」 */
#dungeon .v431-side-equipment{
  display:none !important;
}

/* Edge/Chromium 支持 :has，用 CSS 再兜底隐藏标题为装备栏的旧面板 */
#dungeon .player-side-panel section:has(> h3:first-child),
#dungeon aside section:has(> h3:first-child),
#dungeon .player-side-panel .card:has(> h3:first-child),
#dungeon aside .card:has(> h3:first-child){
  /* 默认不动，下面精确靠 JS 删除；这里保留选择器兼容未来覆盖 */
}

#dungeon .v443-current-equipped-kept,
#dungeon .v023-runtime-equipment,
#dungeon .v022-equipped-card,
#dungeon .v023-profile-equipment{
  display:block !important;
}

/* 旧装备栏就算删除前闪现，也不要再出现内部滚动条 */
#dungeon .v431-side-equipment,
#dungeon .v431-side-equipment *{
  max-height:none !important;
  overflow:visible !important;
}


/* v0.4.44：150层Boss机制面板 */
.v444-floor150-panel{
  margin:8px 0;
  border:1px solid rgba(164,210,255,.28);
  border-radius:14px;
  padding:8px 10px;
  background:linear-gradient(180deg,rgba(28,52,86,.20),rgba(8,12,20,.38));
  color:#dcecff;
  font-size:12px;
  font-weight:900;
  line-height:1.55;
}
.v444-floor150-panel b{
  display:block;
  color:#fff1c8;
  margin-bottom:4px;
}
.v444-floor150-panel span{
  display:block;
}


/* v0.4.45：全Boss机制面板 */
.v445-boss-panel{
  margin:8px 0;
  border:1px solid rgba(255,206,118,.30);
  border-radius:14px;
  padding:8px 10px;
  background:linear-gradient(180deg,rgba(88,58,18,.20),rgba(16,10,4,.38));
  color:#ffe6b7;
  font-size:12px;
  font-weight:900;
  line-height:1.55;
}
.v445-boss-panel b{display:block;color:#fff3d3;margin-bottom:4px;}
.v445-boss-panel span{display:block;}


/* v0.4.46：整页触摸/滚轮滚动 + 战斗竖向卡片格式 */
html.v046-scroll-root,
body.v046-scroll-root,
html,
body{
  overflow-y:auto !important;
  overflow-x:hidden !important;
  touch-action:pan-y !important;
  overscroll-behavior-y:auto !important;
  -webkit-overflow-scrolling:touch;
}

/* 地下城内不再依赖左侧/右侧小滚动条；触摸和鼠标滚轮控制整页 */
#dungeon .v046-no-inner-scroll,
#dungeon .dungeon-display,
#dungeon .battle-inline-wrap,
#dungeon .battle-screen-log,
#dungeon .screen-log,
#dungeon .dungeon-full-layout,
#dungeon .dungeon-command-deck,
#dungeon .player-side-panel,
#dungeon aside{
  max-height:none !important;
  height:auto !important;
  overflow:visible !important;
  overscroll-behavior:auto !important;
  scrollbar-gutter:auto !important;
  -webkit-overflow-scrolling:touch;
}

#dungeon.v046-dungeon-battle .dungeon-full-layout,
#dungeon.v046-dungeon-battle .dungeon-layout{
  display:block !important;
  max-width:980px;
  margin:0 auto;
  overflow:visible !important;
}
#dungeon.v046-dungeon-battle .dungeon-full-layout > div:first-child,
#dungeon.v046-dungeon-battle .dungeon-main-panel{
  display:block !important;
  overflow:visible !important;
}
#dungeon.v046-dungeon-battle .player-side-panel,
#dungeon.v046-dungeon-battle aside{
  display:none !important;
}
#dungeon.v046-dungeon-battle .dungeon-display.battle-mode,
#dungeon.v046-dungeon-battle .dungeon-display{
  padding:14px !important;
  border-radius:24px;
  overflow:visible !important;
}
#dungeon.v046-dungeon-battle .display-header{
  margin-bottom:10px;
}
.v046-battle-shell{
  display:grid;
  gap:14px;
  width:100%;
}
.v046-battle-title{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  border:1px solid rgba(212,177,104,.18);
  border-radius:18px;
  padding:10px 12px;
  background:rgba(0,0,0,.22);
  color:#f8e7c4;
}
.v046-battle-title span{color:var(--d-muted);font-size:13px;}
.v046-battle-card{
  width:100%;
  text-align:left;
  border:1px solid rgba(212,177,104,.24);
  border-radius:24px;
  padding:18px;
  background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(0,0,0,.22));
  color:#f8e7c4;
  box-shadow:0 18px 44px rgba(0,0,0,.24);
}
.v046-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.v046-card-head h2,
.v046-card-head h3{
  margin:0;
  font-size:clamp(28px,5.6vw,48px);
  line-height:1.05;
  letter-spacing:.02em;
}
.v046-card-head h3{font-size:clamp(22px,4vw,34px);}
.v046-card-head p{margin:8px 0 0;color:var(--d-muted);font-size:clamp(14px,2.6vw,20px);}
.v046-card-head em{
  flex:0 0 auto;
  border:1px solid rgba(212,177,104,.28);
  border-radius:999px;
  padding:6px 12px;
  color:#f8e7c4;
  background:rgba(0,0,0,.22);
  font-size:12px;
  font-style:normal;
  font-weight:900;
  letter-spacing:.12em;
}
.v046-two-bars{display:grid;gap:8px;margin-bottom:14px;}
.v046-bar{
  position:relative;
  height:18px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.08);
}
.v046-bar i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#9d2f35,#f06a5d);}
.v046-bar.mp i{background:linear-gradient(90deg,#275ea8,#72adff);}
.v046-bar.enemy i{background:linear-gradient(90deg,#d64552,#ffe08a);}
.v046-bar span{
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  color:#fff8df;font-size:11px;font-weight:900;text-shadow:0 1px 3px #000;
}
.v046-stat-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.v046-stat{
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  padding:9px 10px;
  background:rgba(0,0,0,.20);
}
.v046-stat span{display:block;color:#aab2c2;font-size:12px;margin-bottom:3px;}
.v046-stat b{font-size:18px;color:#ffe7aa;}
.v046-enemy-list{display:grid;gap:12px;}
.v046-enemy-card{cursor:pointer;}
.v046-enemy-card.selected{border-color:rgba(255,224,138,.75);box-shadow:0 0 0 2px rgba(255,224,138,.12),0 18px 44px rgba(0,0,0,.24);}
.v046-enemy-stats{grid-template-columns:repeat(4,minmax(0,1fr));}
.v046-chip-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;}
.v046-chip-row span,.v046-mechanism-line span{
  border:1px solid rgba(212,177,104,.18);
  border-radius:999px;
  padding:5px 9px;
  color:#f8e7c4;
  background:rgba(0,0,0,.18);
  font-size:12px;
  font-weight:800;
}
.v046-mechanism-line{display:flex;flex-wrap:wrap;gap:8px;}
.v046-log-card{
  border:1px solid rgba(212,177,104,.18);
  border-radius:22px;
  padding:14px;
  background:rgba(0,0,0,.24);
  color:#d8deea;
}
.v046-log-card > div{display:flex;justify-content:space-between;gap:12px;margin-bottom:8px;color:#f8e7c4;}
.v046-log-card > div span{color:var(--d-muted);font-size:12px;}
.v046-log-card p{margin:6px 0;line-height:1.65;font-size:13px;}

#dungeon.v046-dungeon-battle .dungeon-command-deck{
  position:sticky !important;
  bottom:0;
  z-index:90;
  margin-top:14px;
  overflow:visible !important;
  box-shadow:0 -20px 40px rgba(0,0,0,.46);
  backdrop-filter:blur(16px);
}
#dungeon.v046-dungeon-battle .command-title{margin-bottom:10px;}
.v046-action-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.v046-action-grid button{
  min-height:48px;
  white-space:normal;
}

@media (max-width:860px){
  #dungeon.v046-dungeon-battle .dungeon-full-hud{display:none !important;}
  #dungeon.v046-dungeon-battle .dungeon-display{padding:10px !important;border-radius:18px;}
  .v046-battle-shell{gap:10px;}
  .v046-battle-card{padding:14px;border-radius:20px;}
  .v046-stat-grid,.v046-enemy-stats{grid-template-columns:repeat(2,minmax(0,1fr));}
  .v046-action-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
  .v046-action-grid button{min-height:44px;font-size:13px;padding:9px 8px;}
  #dungeon.v046-dungeon-battle .dungeon-command-deck{border-radius:20px 20px 0 0;padding:12px;margin-left:-8px;margin-right:-8px;}
  body{padding-bottom:env(safe-area-inset-bottom);}
}
@media (max-width:520px){
  .v046-action-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .v046-battle-title{align-items:flex-start;flex-direction:column;}
  .v046-card-head h2{font-size:34px;}
}


/* v0.4.47：Boss战全屏大背景，卡片透明化，阶段换图 */
body.v047-boss-battle-bg::before,
body.boss-battle-live::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-2;
  pointer-events:none;
  background-image:
    linear-gradient(180deg, rgba(3,4,8,.48), rgba(3,4,8,.88)),
    var(--v047-boss-bg, var(--current-boss-bg)) !important;
  background-size:cover !important;
  background-position:center center !important;
  background-repeat:no-repeat !important;
  filter:brightness(.70) saturate(1.05) contrast(1.08);
}
body.v047-boss-battle-bg::after,
body.boss-battle-live::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(circle at 50% 24%, rgba(255,220,150,.10), transparent 38%),
    linear-gradient(90deg, rgba(0,0,0,.40), transparent 26%, transparent 74%, rgba(0,0,0,.45));
}
body.v047-boss-battle-bg #dungeon.view.active,
body.boss-battle-live #dungeon.view.active{
  background:transparent !important;
}
body.v047-boss-battle-bg .dungeon-display,
body.v047-boss-battle-bg .dungeon-command-deck,
body.v047-boss-battle-bg .player-side-panel,
body.v047-boss-battle-bg .battle-inline-wrap,
body.boss-battle-live .dungeon-display,
body.boss-battle-live .dungeon-command-deck,
body.boss-battle-live .player-side-panel,
body.boss-battle-live .battle-inline-wrap{
  background:linear-gradient(180deg,rgba(8,8,10,.58),rgba(3,3,4,.78)) !important;
  backdrop-filter:blur(8px);
}
body.v047-boss-battle-bg .v046-battle-card,
body.boss-battle-live .v046-battle-card{
  background:linear-gradient(180deg,rgba(10,10,12,.62),rgba(0,0,0,.44)) !important;
}
body.v047-boss-battle-bg .v046-enemy-card.selected,
body.boss-battle-live .v046-enemy-card.selected{
  box-shadow:0 0 0 2px rgba(255,224,138,.18),0 18px 58px rgba(0,0,0,.38);
}

/* v0.4.50 battle ui cleanup */
.v450-battle-shell{display:grid;gap:16px;min-height:520px}
.v450-battle-topline{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:14px 16px;border:1px solid rgba(201,164,91,.18);border-radius:16px;background:linear-gradient(180deg,rgba(255,244,210,.06),rgba(0,0,0,.18));color:#f4dfae;flex-wrap:wrap}
.v450-battle-round{font-size:18px;font-weight:900;color:#f6df8c}
.v450-battle-target{color:#d8c59a;font-size:14px}
.v450-battle-core{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);gap:16px;min-height:0;flex:1}
.v450-battle-log-panel,.v450-battle-stage-panel{border:1px solid rgba(201,164,91,.16);border-radius:18px;background:rgba(0,0,0,.26);padding:16px;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.v450-panel-head{display:flex;justify-content:space-between;gap:10px;align-items:center;border-bottom:1px solid rgba(201,164,91,.14);padding-bottom:10px;margin-bottom:12px}
.v450-panel-head strong{color:#f2da93;font-size:18px}
.v450-panel-head span{color:#ae9f7c;font-size:13px}
.v450-battle-feed{display:grid;gap:10px;max-height:440px;overflow:auto;padding-right:2px}
.v450-battle-feed p{margin:0;border:1px solid rgba(201,164,91,.12);background:rgba(255,255,255,.035);border-radius:14px;padding:12px 14px;line-height:1.8}
.v450-player-brief{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.v450-player-brief span,.v450-player-brief b{padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.08);font-size:13px;color:#eee0bf}
.v450-battle-enemy-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;align-content:start}
.v450-action-layout{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;width:100%}
.v450-side-panel{display:grid;gap:16px}
.v450-quick-bag-panel h3,.equipment-panel h3{margin-top:0}
.v450-quick-bag-list{display:grid;gap:10px}
.v450-quick-bag-item{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:10px 12px;border-radius:12px;border:1px solid rgba(201,164,91,.14);background:rgba(255,255,255,.03)}
.v450-quick-bag-item strong{font-size:14px;color:#f1dfb1}
.v450-quick-bag-item span{font-size:13px;color:#d0c3a4}
.v450-quick-bag-empty{padding:12px;border-radius:12px;background:rgba(255,255,255,.03);color:#a89c7c;text-align:center}
.v450-open-bag-button{margin-top:12px;width:100%}
@media (max-width: 1180px){
  .v450-battle-core{grid-template-columns:1fr}
}
@media (max-width: 820px){
  .v450-action-layout{grid-template-columns:1fr 1fr}
}
@media (max-width: 560px){
  .v450-action-layout{grid-template-columns:1fr}
}

/* v0.4.51：主界面操作优化，左右分离滚动，禁止整页一起滚 */
html,body{height:100%;overflow:hidden;}
body{height:100dvh;overflow:hidden;}
.app-shell.dungeon-shell{height:100dvh;min-height:100dvh;overflow:hidden;grid-template-columns:320px minmax(0,1fr);align-items:stretch;}
.app-shell.dungeon-shell > .sidebar,
.app-shell.dungeon-shell > .main{min-height:0;}
.sidebar.dungeon-sidebar,
.app-shell.dungeon-shell > .sidebar{
  position:relative !important;
  top:auto !important;
  height:100dvh !important;
  max-height:100dvh !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior:contain;
  padding:20px 18px 28px;
}
.main.dungeon-main,
.app-shell.dungeon-shell > .main{
  height:100dvh !important;
  max-height:100dvh !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior:contain;
  min-width:0;
  min-height:0;
  padding:20px 22px 36px;
}
.main.dungeon-main .view{min-width:0;}
.main.dungeon-main .view.active{display:block;}
.sidebar-note{margin-top:18px;flex:0 0 auto;}
.nav{padding-bottom:8px;}
.nav button{min-height:88px;display:grid;grid-template-columns:56px 1fr;align-items:center;gap:14px;padding:14px 16px;border-radius:20px;background:rgba(255,255,255,.03);border:1px solid rgba(201,164,91,.12);}
.nav button .nav-label{font-size:17px;font-weight:800;color:#f0dfb4;letter-spacing:.02em;}
.nav button:hover,.nav button.active{background:rgba(255,255,255,.07);border-color:rgba(201,164,91,.28);}
.nav button .nav-thumb{width:54px;height:54px;border-radius:14px;display:block;background-size:cover;background-position:center;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08),0 8px 22px rgba(0,0,0,.28)}
.dungeon-main .card,.dungeon-main .shop-card,.dungeon-main .recipe-card,.dungeon-main .boss-test-panel,.dungeon-main .boss-test-controls{max-width:100%;}
#profile .card,#home .card,#dungeon .card,#scavenger .card,#pawnshop .card,#forge .card,#potionworkshop .card,#codex .card,#crafting .card{scroll-margin-top:18px;}
@media (max-width: 980px){
  html,body{overflow:auto;}
  body{height:auto;min-height:100dvh;}
  .app-shell.dungeon-shell{height:auto;min-height:100dvh;overflow:visible;grid-template-columns:1fr;}
  .sidebar.dungeon-sidebar,.app-shell.dungeon-shell>.sidebar,
  .main.dungeon-main,.app-shell.dungeon-shell>.main{height:auto !important;max-height:none !important;overflow:visible !important;}
}



/* v0.4.52：地下城/战斗/保险栏最终重排 */
.sidebar.dungeon-sidebar .v450-side-panel,
.sidebar.dungeon-sidebar .player-side-panel,
.sidebar.dungeon-sidebar .equipment-panel,
.sidebar.dungeon-sidebar .v431-side-equipment,
.sidebar.dungeon-sidebar .v434-shield-summary,
.sidebar.dungeon-sidebar .sidebar-note ~ *{display:none!important;}
#profile .v434-shield-summary{display:none!important;}
#dungeon .v423-insurance-mini,
#dungeon .v415-insurance-panel,
#dungeon .v431-insurance-panel{display:none!important;}

.v452-dungeon-root{display:grid;gap:16px;min-width:0;}
.v452-top-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,.62fr);gap:16px;align-items:stretch;}
.v452-top-card{border:1px solid rgba(201,164,91,.18);border-radius:22px;background:linear-gradient(180deg,rgba(23,22,18,.72),rgba(4,5,6,.78));box-shadow:0 18px 48px rgba(0,0,0,.32),inset 0 0 36px rgba(201,164,91,.03);padding:18px 20px;color:#eadbb8;min-width:0;}
.v452-top-title{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:10px;}
.v452-top-title h3{margin:0;color:#f7e2a6;font-size:20px;}
.v452-top-title span{padding:6px 12px;border-radius:999px;border:1px solid rgba(201,164,91,.28);background:rgba(201,164,91,.10);color:#f8df91;font-weight:900;white-space:nowrap;}
.v452-top-card p{margin:0;color:#b9ad90;line-height:1.7;}
.v452-top-actions,.v452-menu-inline .battle-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px;}
.v452-menu-inline{margin-top:10px;}

.v452-play-grid{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:16px;align-items:start;min-width:0;}
.v452-play-main{display:grid;gap:16px;min-width:0;}
.v452-display-card,.v452-action-card,.v452-side-card{border:1px solid rgba(201,164,91,.16);border-radius:22px;background:linear-gradient(180deg,rgba(19,18,16,.66),rgba(3,4,6,.78));box-shadow:0 18px 48px rgba(0,0,0,.30);padding:16px;min-width:0;}
.v452-action-card{position:sticky;bottom:0;z-index:7;background:linear-gradient(180deg,rgba(20,18,12,.88),rgba(3,4,6,.96));backdrop-filter:blur(10px);}
.v452-battle-screen{display:grid;gap:14px;min-height:520px;}
.v452-battle-status{display:flex;align-items:center;justify-content:space-between;gap:14px;border:1px solid rgba(201,164,91,.12);border-radius:16px;background:rgba(255,255,255,.035);padding:12px 14px;}
.v452-battle-status h3{margin:0;color:#f4dc91;font-size:20px;}
.v452-battle-status p{margin:4px 0 0;color:#a99d81;}
.v452-battle-status span{color:#d6c79e;font-weight:800;}
.v452-battle-grid{display:grid;grid-template-columns:360px minmax(0,1fr);gap:14px;min-height:0;}
.v452-battle-log,.v452-battle-stage{border:1px solid rgba(201,164,91,.13);border-radius:18px;background:rgba(0,0,0,.25);padding:14px;min-height:0;overflow:hidden;}
.v452-box-head{display:flex;justify-content:space-between;gap:10px;border-bottom:1px solid rgba(201,164,91,.12);padding-bottom:10px;margin-bottom:12px;}
.v452-box-head b{color:#f3dc94;font-size:18px;}
.v452-box-head span{color:#a99d81;font-size:13px;}
.v452-log-list{display:grid;gap:10px;max-height:460px;overflow:auto;padding-right:2px;}
.v452-log-list p{margin:0;line-height:1.75;border:1px solid rgba(201,164,91,.10);border-radius:13px;padding:10px 12px;background:rgba(255,255,255,.035);color:#ddd4bd;}
.v452-player-chips{display:flex;flex-wrap:wrap;gap:9px;margin-bottom:12px;}
.v452-player-chips span,.v452-player-chips em{font-style:normal;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.07);color:#dfd3b6;font-size:13px;}
.v452-enemy-list{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));align-content:start;}
.v452-action-bar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
.v452-side-panel{display:grid!important;gap:14px;position:sticky;top:16px;max-height:calc(100dvh - 36px);overflow:auto;overscroll-behavior:contain;}
.v452-side-title{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:12px;}
.v452-side-title h3{margin:0;color:#f3dc94;font-size:24px;}
.v452-side-title span{color:#d4c5a2;}
.v452-side-card h3{margin:0 0 8px;color:#f3dc94;}
.v452-side-card p{margin:0 0 12px;color:#a99d81;line-height:1.65;}
.v452-potion-grid{display:grid;gap:9px;}
.v452-potion{display:flex;justify-content:space-between;gap:8px;align-items:center;border:1px solid rgba(70,180,105,.25);border-radius:13px;background:rgba(52,130,74,.10);color:#d9f1d8;padding:10px 12px;text-align:left;cursor:pointer;}
.v452-potion b{color:#efffe9;}
.v452-potion span{color:#aee6b3;}
.v452-empty{border:1px dashed rgba(255,255,255,.14);border-radius:13px;padding:12px;color:#9e947e;text-align:center;background:rgba(255,255,255,.025);}
.v452-equip-grid{display:grid;grid-template-columns:1fr;gap:9px;}
.v452-equip-slot{display:grid;grid-template-columns:78px minmax(0,1fr) auto;gap:8px;align-items:center;border:1px solid rgba(201,164,91,.12);border-radius:13px;padding:10px 12px;background:rgba(255,255,255,.035);}
.v452-equip-slot b{color:#f3dc94;}
.v452-equip-slot span{color:#eee2bf;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.v452-equip-slot em{font-style:normal;color:#b9ad90;font-size:12px;}
.v452-equip-slot.empty span,.v452-equip-slot.empty em{color:#857b67;}
@media(max-width:1280px){
  .v452-top-grid,.v452-play-grid{grid-template-columns:1fr;}
  .v452-side-panel{position:relative;top:auto;max-height:none;overflow:visible;}
}
@media(max-width:900px){
  .v452-battle-grid{grid-template-columns:1fr;}
  .v452-action-bar{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:560px){
  .v452-action-bar{grid-template-columns:1fr;}
}


/* v0.4.53：按参考图重做地下城主界面 */
#dungeon.view.active, #dungeon.active { overflow:hidden; }
body.dungeon-fullscreen #dungeon.view.active, body.dungeon-fullscreen #dungeon.active { overflow:hidden; }
#dungeon .v453-shell, #dungeon .v453-shell * { box-sizing:border-box; }
#dungeon .v453-shell{
  display:grid;
  grid-template-columns:minmax(0,1fr) 360px;
  gap:14px;
  height:calc(100dvh - 28px);
  max-height:calc(100dvh - 28px);
  overflow:hidden;
}
#dungeon .v453-main{
  display:grid;
  grid-template-rows:132px minmax(190px, 1.2fr) minmax(170px, 0.9fr) 170px;
  gap:14px;
  min-width:0;
  min-height:0;
  overflow:hidden;
}
#dungeon .v453-topbar,
#dungeon .v453-display-panel,
#dungeon .v453-log-panel,
#dungeon .v453-action-panel,
#dungeon .v453-role-card,
#dungeon .v453-equip-card{
  border:1px solid rgba(201,164,91,.18);
  border-radius:22px;
  background:linear-gradient(180deg,rgba(20,18,14,.82),rgba(4,4,6,.90));
  box-shadow:0 16px 40px rgba(0,0,0,.28), inset 0 0 28px rgba(201,164,91,.04);
  min-width:0;
  min-height:0;
  overflow:hidden;
}
#dungeon .v453-topbar{ padding:16px 18px; }
#dungeon .v453-topbar-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px;}
#dungeon .v453-topbar-head h2{margin:0;color:#f3dc94;font-size:32px;line-height:1;}
#dungeon .v453-topbar-head p{margin:8px 0 0;color:#b8ac90;line-height:1.45;font-size:14px;}
#dungeon .v453-floor-badge{padding:8px 12px;border-radius:999px;background:rgba(201,164,91,.10);border:1px solid rgba(201,164,91,.25);color:#f3dc94;font-weight:800;white-space:nowrap;}
#dungeon .v453-top-menu{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
#dungeon .v453-top-menu button{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#dungeon .v453-display-panel,
#dungeon .v453-log-panel,
#dungeon .v453-action-panel{padding:14px;}
#dungeon .v453-display-wrap,
#dungeon .v453-log-wrap,
#dungeon .v453-action-wrap{display:grid;grid-template-rows:auto 1fr;gap:12px;height:100%;min-height:0;}
#dungeon .v453-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid rgba(201,164,91,.12);padding-bottom:10px;}
#dungeon .v453-card-head strong{color:#f3dc94;font-size:20px;}
#dungeon .v453-card-head span{color:#ad9f82;font-size:13px;}
#dungeon .v453-scene-scroll,
#dungeon .v453-log-scroll,
#dungeon .v453-action-scroll,
#dungeon .v453-equip-list{overflow:auto;min-height:0;padding-right:4px;}
#dungeon .v453-battle-meta{display:flex;flex-wrap:wrap;gap:8px;align-items:center;}
#dungeon .v453-battle-meta span,
#dungeon .v453-battle-meta em{font-style:normal;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.05);color:#ddd1b1;font-size:12px;}
#dungeon .v453-enemy-grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));overflow:auto;min-height:0;padding-right:4px;align-content:start;}
#dungeon .v453-log-scroll{display:grid;gap:10px;align-content:start;}
#dungeon .v453-log-scroll p{margin:0;border:1px solid rgba(201,164,91,.10);border-radius:13px;background:rgba(255,255,255,.035);padding:10px 12px;color:#e6dcc2;line-height:1.65;word-break:break-word;}
#dungeon .v453-log-scroll p.action{border-color:rgba(105,190,255,.18);}
#dungeon .v453-action-scroll .battle-actions,
#dungeon .v453-action-scroll .command-buttons,
#dungeon .v453-action-scroll .v452-action-bar,
#dungeon .v453-action-scroll .v453-action-bar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
#dungeon .v453-action-scroll button{min-width:0;}
#dungeon .v453-side-shell{display:grid;grid-template-rows:170px minmax(0,1fr);gap:14px;min-height:0;overflow:hidden;}
#dungeon .v453-role-card{padding:14px;display:grid;grid-template-rows:auto auto auto 1fr;gap:10px;}
#dungeon .v453-role-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;}
#dungeon .v453-role-head h3{margin:0;color:#f3dc94;font-size:24px;line-height:1;}
#dungeon .v453-role-head p{margin:6px 0 0;color:#b8ac90;font-size:14px;}
#dungeon .v453-role-head span{padding:6px 11px;border-radius:999px;background:rgba(201,164,91,.10);border:1px solid rgba(201,164,91,.25);color:#f3dc94;font-weight:800;}
#dungeon .v453-mini-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
#dungeon .v453-mini-stats span{padding:8px 10px;border-radius:12px;background:rgba(255,255,255,.04);color:#ddd1b1;font-size:13px;}
#dungeon .v453-role-sub strong{display:block;margin-bottom:8px;color:#f3dc94;}
#dungeon .v453-quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
#dungeon .v453-quick-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 10px;border:1px solid rgba(70,180,105,.20);border-radius:12px;background:rgba(52,130,74,.10);color:#def7db;min-width:0;}
#dungeon .v453-quick-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
#dungeon .v453-quick-item em{font-style:normal;color:#a7e6b1;}
#dungeon .v453-equip-card{padding:14px;display:grid;grid-template-rows:auto 1fr;gap:10px;}
#dungeon .v453-equip-row{display:grid;grid-template-columns:68px minmax(0,1fr) auto;gap:8px;align-items:center;border:1px solid rgba(201,164,91,.10);border-radius:12px;background:rgba(255,255,255,.03);padding:9px 10px;}
#dungeon .v453-equip-row b{color:#f3dc94;}
#dungeon .v453-equip-row span{color:#eadfbe;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#dungeon .v453-equip-row em{font-style:normal;color:#af9f80;font-size:12px;}
#dungeon .v453-equip-row.empty span,#dungeon .v453-equip-row.empty em{color:#817866;}
#dungeon .v453-empty{display:flex;align-items:center;justify-content:center;min-height:70px;border:1px dashed rgba(255,255,255,.12);border-radius:12px;color:#9d927b;background:rgba(255,255,255,.02);padding:10px;text-align:center;}
@media (max-width: 1400px){
  #dungeon .v453-shell{grid-template-columns:minmax(0,1fr) 320px;}
}
@media (max-width: 1200px){
  #dungeon .v453-shell{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto;height:auto;max-height:none;overflow:auto;}
  #dungeon .v453-main{grid-template-rows:132px minmax(240px,auto) minmax(180px,auto) auto;overflow:visible;}
  #dungeon .v453-side-shell{grid-template-rows:auto auto;overflow:visible;}
}
@media (max-width: 900px){
  #dungeon .v453-top-menu{grid-template-columns:repeat(2,minmax(0,1fr));}
  #dungeon .v453-action-scroll .battle-actions,
  #dungeon .v453-action-scroll .command-buttons,
  #dungeon .v453-action-scroll .v452-action-bar,
  #dungeon .v453-action-scroll .v453-action-bar{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width: 560px){
  #dungeon .v453-action-scroll .battle-actions,
  #dungeon .v453-action-scroll .command-buttons,
  #dungeon .v453-action-scroll .v452-action-bar,
  #dungeon .v453-action-scroll .v453-action-bar,
  #dungeon .v453-top-menu,
  #dungeon .v453-quick-grid,
  #dungeon .v453-mini-stats{grid-template-columns:1fr;}
}

/* v0.4.55：地下城界面最终布局 */
#dungeon .v452-insurance-head,#dungeon .v431-insurance-panel,#dungeon .v423-insurance-mini,#dungeon .v415-insurance-panel,#dungeon .v453-side-shell,#dungeon .v453-role-card,#dungeon .v452-side-panel{display:none!important;}
#dungeon .v455-shell,#dungeon .v455-shell *{box-sizing:border-box;}
#dungeon .v455-shell{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:14px;height:calc(100dvh - 30px);max-height:calc(100dvh - 30px);overflow:hidden;}
#dungeon .v455-left{display:grid;grid-template-rows:132px minmax(190px,1.08fr) minmax(170px,.88fr) 164px;gap:14px;min-height:0;min-width:0;overflow:hidden;}
#dungeon .v455-top-grid{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:14px;min-height:0;overflow:hidden;}
#dungeon .v455-top-menu,#dungeon .v455-player-top,#dungeon .v455-display-card,#dungeon .v455-log-card,#dungeon .v455-action-card,#dungeon .v455-potion-card,#dungeon .v455-equipment-card,#bag-modal-content .v455-bag-summary,#bag-modal-content .v455-bag-insurance{border:1px solid rgba(201,164,91,.18);border-radius:22px;background:linear-gradient(180deg,rgba(20,18,14,.82),rgba(4,4,6,.90));box-shadow:0 16px 40px rgba(0,0,0,.30),inset 0 0 28px rgba(201,164,91,.04);min-width:0;min-height:0;overflow:hidden;}
#dungeon .v455-top-menu,#dungeon .v455-player-top,#dungeon .v455-display-card,#dungeon .v455-log-card,#dungeon .v455-action-card,#dungeon .v455-potion-card,#dungeon .v455-equipment-card{padding:14px 16px;}
#dungeon .v455-card-title,#bag-modal-content .v455-card-title{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;border-bottom:1px solid rgba(201,164,91,.12);padding-bottom:10px;margin-bottom:12px;}
#dungeon .v455-card-title h3,#bag-modal-content .v455-card-title h3{margin:0;color:#f7e0a1;font-size:22px;line-height:1.08;}
#dungeon .v455-card-title p,#bag-modal-content .v455-card-title p{margin:6px 0 0;color:#b7aa8d;font-size:14px;line-height:1.45;}
#dungeon .v455-card-title span,#bag-modal-content .v455-card-title span,#dungeon .v455-top-menu .v455-card-title>span{border:1px solid rgba(201,164,91,.28);border-radius:999px;background:rgba(201,164,91,.10);padding:7px 12px;color:#f4dc91;font-weight:900;white-space:nowrap;}
#dungeon .v455-menu-buttons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
#dungeon .v455-menu-buttons button{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;}
#dungeon .v455-player-top{display:grid;grid-template-rows:auto auto 1fr;gap:8px;}
#dungeon .v455-bars{display:grid;gap:8px;}
#dungeon .v455-statline{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;align-self:end;}
#dungeon .v455-statline span{padding:8px 10px;border-radius:12px;background:rgba(255,255,255,.04);color:#dcd0b1;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#dungeon .v455-display-card,#dungeon .v455-log-card,#dungeon .v455-action-card{display:grid;grid-template-rows:auto 1fr;gap:0;overflow:hidden;}
#dungeon .v455-display-scroll,#dungeon .v455-log-scroll,#dungeon .v455-action-inner,#dungeon .v455-equipment-list{min-height:0;overflow:auto;overscroll-behavior:contain;padding-right:4px;}
#dungeon .v455-display-scroll{line-height:1.8;color:#e4dac0;}
#dungeon .v455-enemy-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;overflow:auto;align-content:start;min-height:0;padding-right:4px;}
#dungeon .v455-log-scroll{display:grid;gap:10px;align-content:start;}
#dungeon .v455-log-scroll p{margin:0;border:1px solid rgba(201,164,91,.10);border-radius:13px;background:rgba(255,255,255,.035);padding:10px 12px;color:#e5dac1;line-height:1.65;}
#dungeon .v455-action-inner .battle-actions,#dungeon .v455-action-inner .command-buttons,#dungeon .v455-action-inner .v452-action-bar,#dungeon .v455-action-inner .v453-action-bar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
#dungeon .v455-right{display:grid;grid-template-rows:160px minmax(0,1fr);gap:14px;min-height:0;overflow:hidden;}
#dungeon .v455-potion-card{display:grid;grid-template-rows:auto 1fr;overflow:hidden;}
#dungeon .v455-potion-list{display:grid;grid-template-columns:1fr 1fr;gap:8px;min-height:0;overflow:auto;}
#dungeon .v455-potion-row{display:flex;justify-content:space-between;gap:8px;align-items:center;border:1px solid rgba(70,180,105,.22);background:rgba(52,130,74,.10);border-radius:12px;padding:9px 10px;color:#dcf5d8;min-width:0;}
#dungeon .v455-potion-row span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#dungeon .v455-potion-row em{font-style:normal;color:#a7e9b0;}
#dungeon .v455-equipment-card{display:grid;grid-template-rows:auto 1fr;overflow:hidden;}
#dungeon .v455-equipment-list{display:grid;gap:9px;align-content:start;}
#dungeon .v455-equip-row{display:grid;grid-template-columns:66px minmax(0,1fr) auto;gap:8px;align-items:center;border:1px solid rgba(201,164,91,.10);border-radius:12px;background:rgba(255,255,255,.03);padding:9px 10px;}
#dungeon .v455-equip-row b{color:#f3dc94;}
#dungeon .v455-equip-row span{color:#eadfbe;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#dungeon .v455-equip-row em{font-style:normal;color:#ad9f80;font-size:12px;}
#dungeon .v455-equip-row.empty span,#dungeon .v455-equip-row.empty em{color:#817766;}
#dungeon .v455-empty,#bag-modal-content .v455-empty{display:flex;align-items:center;justify-content:center;min-height:62px;border:1px dashed rgba(255,255,255,.14);border-radius:12px;color:#9f947d;background:rgba(255,255,255,.025);text-align:center;padding:10px;}
#bag-modal-content .v455-bag-modal{display:grid;gap:16px;}
#bag-modal-content .v455-bag-summary,#bag-modal-content .v455-bag-insurance{padding:18px;}
#bag-modal-content .v455-bag-summary{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;}
#bag-modal-content .v455-bag-summary h3{margin:0;color:#f7e0a1;font-size:30px;}
#bag-modal-content .v455-bag-summary p{margin:8px 0 0;color:#b7aa8d;line-height:1.55;}
#bag-modal-content .v455-bag-summary span{border:1px solid rgba(201,164,91,.28);border-radius:999px;background:rgba(201,164,91,.10);padding:8px 13px;color:#f3dc94;font-weight:900;white-space:nowrap;}
#bag-modal-content .v455-insurance-note{border:1px solid rgba(70,180,105,.22);background:rgba(52,130,74,.10);border-radius:12px;padding:11px 12px;color:#cdeccf;}
#bag-modal-content .v455-bag-list{display:grid;gap:10px;}
#bag-modal-content .v455-bag-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;border:1px solid rgba(201,164,91,.13);border-radius:15px;background:rgba(255,255,255,.035);padding:14px;}
#bag-modal-content .v455-bag-row b{display:block;color:#f3dc94;font-size:18px;margin-bottom:4px;}
#bag-modal-content .v455-bag-row span{display:block;color:#c8bda1;margin-bottom:6px;}
#bag-modal-content .v455-bag-row p{margin:0;color:#9f947f;line-height:1.5;}
.v455-exit-modal{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;padding:24px;}
.v455-exit-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.70);backdrop-filter:blur(4px);}
.v455-exit-dialog{position:relative;width:min(620px,calc(100vw - 32px));border:1px solid rgba(240,210,140,.38);border-radius:26px;overflow:hidden;background:#090807;box-shadow:0 30px 90px rgba(0,0,0,.70);}
.v455-exit-dialog::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(0,0,0,.78),rgba(0,0,0,.48)),var(--boss-poster);background-size:cover;background-position:center;filter:brightness(.78) contrast(1.1);}
.v455-exit-content{position:relative;padding:34px;color:#f8e6b8;text-shadow:0 2px 10px rgba(0,0,0,.7);}
.v455-exit-content h3{margin:0 0 14px;font-size:32px;color:#ffe4a0;}
.v455-exit-content p{margin:0 0 26px;font-size:18px;line-height:1.7;color:#eadbc0;}
.v455-exit-actions{display:flex;gap:14px;justify-content:flex-end;}
.v455-exit-actions button{min-width:126px;}
@media(max-width:1400px){#dungeon .v455-shell{grid-template-columns:minmax(0,1fr) 320px;}#dungeon .v455-top-grid{grid-template-columns:minmax(0,1fr) 320px;}#dungeon .v455-menu-buttons{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:1100px){#dungeon .v455-shell{grid-template-columns:1fr;height:auto;max-height:none;overflow:auto;}#dungeon .v455-left{grid-template-rows:auto minmax(240px,auto) minmax(180px,auto) auto;overflow:visible;}#dungeon .v455-top-grid{grid-template-columns:1fr;}#dungeon .v455-right{grid-template-rows:auto auto;overflow:visible;}#dungeon .v455-equipment-list,#dungeon .v455-display-scroll,#dungeon .v455-log-scroll{max-height:none;}}
@media(max-width:760px){#dungeon .v455-menu-buttons,#dungeon .v455-action-inner .battle-actions,#dungeon .v455-action-inner .command-buttons,#dungeon .v455-action-inner .v452-action-bar,#dungeon .v455-action-inner .v453-action-bar,#dungeon .v455-statline,#dungeon .v455-potion-list{grid-template-columns:1fr;}#bag-modal-content .v455-bag-row{grid-template-columns:1fr;}}


/* v0.4.56：地下城界面最终强制布局 */
#dungeon.view.active{overflow:hidden!important;}
#dungeon .v456-shell,#dungeon .v456-shell *{box-sizing:border-box;}
#dungeon .v456-shell{display:grid!important;grid-template-columns:minmax(0,1fr) 380px!important;grid-template-rows:132px minmax(0,1.05fr) minmax(0,.82fr) 158px!important;grid-template-areas:"top role" "display side" "log side" "action side";gap:14px;height:calc(100dvh - 30px);max-height:calc(100dvh - 30px);overflow:hidden!important;min-width:0;}
#dungeon .v456-top{grid-area:top;}#dungeon .v456-role{grid-area:role;}#dungeon .v456-display{grid-area:display;}#dungeon .v456-log{grid-area:log;}#dungeon .v456-action{grid-area:action;}#dungeon .v456-side{grid-area:side;}
#dungeon .v456-top,#dungeon .v456-role,#dungeon .v456-display,#dungeon .v456-log,#dungeon .v456-action,#dungeon .v456-potions,#dungeon .v456-equipment,#bag-modal-content .v456-bag-top,#bag-modal-content .v456-bag-ins{border:1px solid rgba(201,164,91,.18);border-radius:22px;background:linear-gradient(180deg,rgba(20,18,14,.84),rgba(4,4,6,.92));box-shadow:0 16px 40px rgba(0,0,0,.30),inset 0 0 28px rgba(201,164,91,.04);padding:14px 16px;min-width:0;min-height:0;overflow:hidden;}
#dungeon .v456-head,#bag-modal-content .v456-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;border-bottom:1px solid rgba(201,164,91,.12);padding-bottom:10px;margin-bottom:12px;}
#dungeon .v456-head h2,#dungeon .v456-head h3,#bag-modal-content .v456-head h3{margin:0;color:#f7e0a1;line-height:1.08;}#dungeon .v456-head h2{font-size:27px;}#dungeon .v456-head h3,#bag-modal-content .v456-head h3{font-size:20px;}#dungeon .v456-head p,#bag-modal-content .v456-head p{margin:6px 0 0;color:#b7aa8d;font-size:13px;line-height:1.45;}#dungeon .v456-head>span,#bag-modal-content .v456-head>span,#dungeon .v456-top .v456-head>span{border:1px solid rgba(201,164,91,.28);border-radius:999px;background:rgba(201,164,91,.10);padding:7px 12px;color:#f4dc91;font-weight:900;white-space:nowrap;}
#dungeon .v456-menu{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}#dungeon .v456-menu button{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#dungeon .v456-role{display:grid;grid-template-rows:auto auto auto 1fr;gap:7px;}#dungeon .v456-mini{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;align-self:end;}#dungeon .v456-mini span{padding:7px 8px;border-radius:10px;background:rgba(255,255,255,.04);color:#dcd0b1;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#dungeon .v456-display,#dungeon .v456-log,#dungeon .v456-action{display:grid;grid-template-rows:auto 1fr;gap:0;}#dungeon .v456-scroll,#dungeon .v456-enemies,#dungeon .v456-log-list,#dungeon .v456-actions,#dungeon .v456-equip-list{min-height:0;overflow:auto;overscroll-behavior:contain;padding-right:4px;}
#dungeon .v456-enemies{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px;align-content:start;}#dungeon .v456-log-list{display:grid;gap:10px;align-content:start;}#dungeon .v456-log-list p{margin:0;border:1px solid rgba(201,164,91,.10);border-radius:13px;background:rgba(255,255,255,.035);padding:10px 12px;color:#e5dac1;line-height:1.62;}
#dungeon .v456-actions .battle-actions,#dungeon .v456-actions .command-buttons,#dungeon .v456-actions .v452-action-bar,#dungeon .v456-actions .v453-action-bar,#dungeon .v456-actions .v455-action-inner{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}#dungeon .v456-actions button{min-width:0;}
#dungeon .v456-side{display:grid;grid-template-rows:160px minmax(0,1fr);gap:14px;min-height:0;overflow:hidden;}#dungeon .v456-potions,#dungeon .v456-equipment{display:grid;grid-template-rows:auto 1fr;gap:0;}#dungeon .v456-potion-list{display:grid;grid-template-columns:1fr 1fr;gap:8px;min-height:0;overflow:auto;}#dungeon .v456-potion{display:flex;justify-content:space-between;gap:8px;align-items:center;border:1px solid rgba(70,180,105,.22);background:rgba(52,130,74,.10);border-radius:12px;padding:9px 10px;color:#dcf5d8;min-width:0;}#dungeon .v456-potion span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}#dungeon .v456-potion em{font-style:normal;color:#a7e9b0;}
#dungeon .v456-equip-list{display:grid;gap:9px;align-content:start;}#dungeon .v456-equip{display:grid;grid-template-columns:66px minmax(0,1fr) auto;gap:8px;align-items:center;border:1px solid rgba(201,164,91,.10);border-radius:12px;background:rgba(255,255,255,.03);padding:9px 10px;}#dungeon .v456-equip b{color:#f3dc94;}#dungeon .v456-equip span{color:#eadfbe;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}#dungeon .v456-equip em{font-style:normal;color:#ad9f80;font-size:12px;}#dungeon .v456-equip.empty span,#dungeon .v456-equip.empty em{color:#817766;}
#dungeon .v456-empty,#bag-modal-content .v456-empty{display:flex;align-items:center;justify-content:center;min-height:60px;border:1px dashed rgba(255,255,255,.14);border-radius:12px;color:#9f947d;background:rgba(255,255,255,.025);text-align:center;padding:10px;}
#bag-modal-content .v456-bag{display:grid;gap:14px;}#bag-modal-content .v456-bag-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;}#bag-modal-content .v456-bag-top h3{margin:0;color:#f7e0a1;font-size:30px;}#bag-modal-content .v456-bag-top p{margin:8px 0 0;color:#b7aa8d;}#bag-modal-content .v456-bag-top span{border:1px solid rgba(201,164,91,.28);border-radius:999px;background:rgba(201,164,91,.10);padding:8px 13px;color:#f3dc94;font-weight:900;white-space:nowrap;}#bag-modal-content .v456-ins-note{border:1px solid rgba(70,180,105,.22);background:rgba(52,130,74,.10);border-radius:12px;padding:11px 12px;color:#cdeccf;}#bag-modal-content .v456-bag-list{display:grid;gap:10px;}#bag-modal-content .v456-bag-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;border:1px solid rgba(201,164,91,.13);border-radius:15px;background:rgba(255,255,255,.035);padding:14px;}#bag-modal-content .v456-bag-row b{display:block;color:#f3dc94;font-size:18px;margin-bottom:4px;}#bag-modal-content .v456-bag-row span{display:block;color:#c8bda1;margin-bottom:6px;}#bag-modal-content .v456-bag-row p{margin:0;color:#9f947f;line-height:1.5;}
.v456-exit-modal{position:fixed;inset:0;z-index:12000;display:grid;place-items:center;padding:24px;}.v456-exit-bg{position:absolute;inset:0;background:rgba(0,0,0,.72);backdrop-filter:blur(5px);}.v456-exit-box{position:relative;width:min(640px,calc(100vw - 32px));border:1px solid rgba(240,210,140,.38);border-radius:26px;overflow:hidden;background:#090807;box-shadow:0 30px 90px rgba(0,0,0,.70);}.v456-exit-box::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(0,0,0,.78),rgba(0,0,0,.48)),var(--poster);background-size:cover;background-position:center;filter:brightness(.78) contrast(1.1);}.v456-exit-content{position:relative;padding:34px;color:#f8e6b8;text-shadow:0 2px 10px rgba(0,0,0,.7);}.v456-exit-content h3{margin:0 0 14px;font-size:32px;color:#ffe4a0;}.v456-exit-content p{margin:0 0 26px;font-size:18px;line-height:1.7;color:#eadbc0;}.v456-exit-content div{display:flex;gap:14px;justify-content:flex-end;}.v456-exit-content button{min-width:126px;}
@media(max-width:1400px){#dungeon .v456-shell{grid-template-columns:minmax(0,1fr) 330px!important;}#dungeon .v456-menu{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:1100px){#dungeon .v456-shell{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto auto auto auto auto auto!important;grid-template-areas:"top" "role" "display" "log" "action" "side";height:auto;max-height:none;overflow:auto!important;}#dungeon .v456-side{grid-template-rows:auto auto;overflow:visible;}}
@media(max-width:760px){#dungeon .v456-menu,#dungeon .v456-actions .battle-actions,#dungeon .v456-actions .command-buttons,#dungeon .v456-actions .v452-action-bar,#dungeon .v456-actions .v453-action-bar,#dungeon .v456-mini,#dungeon .v456-potion-list{grid-template-columns:1fr!important;}#bag-modal-content .v456-bag-row{grid-template-columns:1fr;}}



/* v0.4.57：地下城图二布局最终覆盖 */
#dungeon .v456-shell,
#dungeon .v455-shell,
#dungeon .v453-shell,
#dungeon .v452-dungeon-root,
#dungeon .v431-insurance-panel,
#dungeon .v423-insurance-mini,
#dungeon .v415-insurance-panel{display:none!important;}
body.dungeon-fullscreen #dungeon.view.active,
body.dungeon-fullscreen #dungeon.active{padding:12px!important;overflow:hidden!important;}
#dungeon .v457-shell,
#dungeon .v457-shell *{box-sizing:border-box;}
#dungeon .v457-shell{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 390px;
  grid-template-rows:136px minmax(0,1.06fr) minmax(0,.82fr) 162px;
  grid-template-areas:
    "top role"
    "display side"
    "log side"
    "action side";
  gap:12px;
  height:calc(100dvh - 24px);
  max-height:calc(100dvh - 24px);
  min-width:0;
  overflow:hidden!important;
}
#dungeon .v457-top-left{grid-area:top;}
#dungeon .v457-role-area{grid-area:role;}
#dungeon .v457-display-area{grid-area:display;}
#dungeon .v457-log-area{grid-area:log;}
#dungeon .v457-action-area{grid-area:action;}
#dungeon .v457-side-area{grid-area:side;}
#dungeon .v457-zone{
  border:1px solid rgba(201,164,91,.18);
  border-radius:22px;
  background:linear-gradient(180deg,rgba(20,18,14,.78),rgba(3,4,6,.90));
  box-shadow:0 16px 44px rgba(0,0,0,.34), inset 0 0 26px rgba(201,164,91,.04);
  min-width:0;
  min-height:0;
  overflow:hidden;
}
#dungeon .v457-top-left,
#dungeon .v457-role-area,
#dungeon .v457-display-area,
#dungeon .v457-log-area,
#dungeon .v457-action-area{padding:14px 16px;}
#dungeon .v457-zone-title{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid rgba(201,164,91,.12);
  padding-bottom:9px;
  margin-bottom:10px;
}
#dungeon .v457-zone-title h2,
#dungeon .v457-zone-title h3{margin:0;color:#f3dc94;line-height:1.1;}
#dungeon .v457-zone-title h2{font-size:26px;}
#dungeon .v457-zone-title h3{font-size:20px;}
#dungeon .v457-zone-title p{margin:6px 0 0;color:#b9ad91;font-size:14px;line-height:1.45;}
#dungeon .v457-zone-title span{
  flex:0 0 auto;
  padding:7px 12px;
  border:1px solid rgba(201,164,91,.28);
  border-radius:999px;
  color:#f3dc94;
  background:rgba(201,164,91,.10);
  font-weight:900;
  font-size:13px;
}
#dungeon .v457-top-buttons{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
}
#dungeon .v457-top-buttons button{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#dungeon .v457-role-area{
  display:grid;
  grid-template-rows:auto auto auto 1fr;
  gap:8px;
}
#dungeon .v457-stat-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
#dungeon .v457-stat-grid span{
  padding:8px 10px;
  border:1px solid rgba(201,164,91,.10);
  border-radius:12px;
  background:rgba(255,255,255,.035);
  color:#dfd3b4;
  font-size:13px;
}
#dungeon .v457-display-area{
  display:grid;
  grid-template-rows:auto 1fr;
}
#dungeon .v457-scroll-content{
  min-height:0;
  overflow:auto;
  padding-right:4px;
}
#dungeon .v457-battle-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:10px;
}
#dungeon .v457-battle-meta span,
#dungeon .v457-battle-meta em{
  font-style:normal;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.055);
  color:#dfd3b4;
  font-size:12px;
}
#dungeon .v457-enemy-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:10px;
  align-content:start;
  min-height:0;
  overflow:auto;
  padding-right:4px;
}
#dungeon .v457-log-area{
  display:grid;
  grid-template-rows:auto 1fr;
}
#dungeon .v457-log-list{
  display:grid;
  align-content:start;
  gap:9px;
  min-height:0;
  overflow:auto;
  padding-right:4px;
}
#dungeon .v457-log-list p{
  margin:0;
  padding:10px 12px;
  border:1px solid rgba(201,164,91,.10);
  border-radius:13px;
  background:rgba(255,255,255,.032);
  color:#e3d8bd;
  line-height:1.65;
  word-break:break-word;
}
#dungeon .v457-action-area{
  display:grid;
  grid-template-rows:auto 1fr;
}
#dungeon .v457-action-list{
  min-height:0;
  overflow:auto;
  padding-right:4px;
}
#dungeon .v457-action-list .battle-actions,
#dungeon .v457-action-list .command-buttons,
#dungeon .v457-action-list .v452-action-bar,
#dungeon .v457-action-list .v453-action-bar,
#dungeon .v457-action-list .v456-action-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:9px!important;
}
#dungeon .v457-action-list button{
  min-width:0;
  white-space:normal;
}
#dungeon .v457-side-area{
  display:grid;
  grid-template-rows:178px minmax(0,1fr);
  gap:12px;
  background:transparent;
  border:0;
  box-shadow:none;
}
#dungeon .v457-side-card{
  border:1px solid rgba(201,164,91,.18);
  border-radius:22px;
  background:linear-gradient(180deg,rgba(20,18,14,.78),rgba(3,4,6,.90));
  box-shadow:0 16px 44px rgba(0,0,0,.34), inset 0 0 26px rgba(201,164,91,.04);
  min-width:0;
  min-height:0;
  overflow:hidden;
  padding:14px 16px;
}
#dungeon .v457-side-card .v457-zone-title{margin-bottom:8px;}
#dungeon .v457-potion-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
#dungeon .v457-potion{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  border:1px solid rgba(72,185,110,.22);
  border-radius:12px;
  background:rgba(52,130,74,.10);
  color:#def7db;
  padding:9px 10px;
  min-width:0;
}
#dungeon .v457-potion span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#dungeon .v457-potion em{
  font-style:normal;
  color:#a9e8b3;
}
#dungeon .v457-equipment-card{
  display:grid;
  grid-template-rows:auto 1fr;
}
#dungeon .v457-equip-list{
  display:grid;
  align-content:start;
  gap:8px;
  min-height:0;
  overflow:auto;
  padding-right:4px;
}
#dungeon .v457-equip{
  display:grid;
  grid-template-columns:72px minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  padding:9px 10px;
  border:1px solid rgba(201,164,91,.10);
  border-radius:12px;
  background:rgba(255,255,255,.032);
}
#dungeon .v457-equip b{color:#f3dc94;}
#dungeon .v457-equip span{
  color:#eadfbe;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#dungeon .v457-equip em{
  color:#ad9f82;
  font-size:12px;
  font-style:normal;
}
#dungeon .v457-equip.empty span,
#dungeon .v457-equip.empty em{color:#817966;}
#dungeon .v457-empty{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:60px;
  border:1px dashed rgba(255,255,255,.12);
  border-radius:12px;
  background:rgba(255,255,255,.025);
  color:#9f947d;
  text-align:center;
  padding:10px;
}
.v457-run-bag-modal,
.v457-exit-modal{
  position:fixed;
  inset:0;
  z-index:99999;
  display:flex;
  align-items:center;
  justify-content:center;
}
.v457-modal-backdrop,
.v457-exit-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.72);
  backdrop-filter:blur(4px);
}
.v457-run-bag-box{
  position:relative;
  width:min(1120px,92vw);
  max-height:86vh;
  display:grid;
  grid-template-rows:auto auto auto 1fr;
  gap:14px;
  border:1px solid rgba(201,164,91,.28);
  border-radius:24px;
  background:linear-gradient(180deg,rgba(20,18,14,.96),rgba(4,4,6,.98));
  box-shadow:0 28px 90px rgba(0,0,0,.65);
  padding:22px;
  overflow:hidden;
}
.v457-run-bag-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  border-bottom:1px solid rgba(201,164,91,.18);
  padding-bottom:14px;
}
.v457-run-bag-head h2{margin:0;color:#f3dc94;font-size:30px;}
.v457-run-bag-head p{margin:8px 0 0;color:#b9ad91;}
.v457-run-bag-insurance,
.v457-run-bag-summary,
.v457-run-bag-list{
  border:1px solid rgba(201,164,91,.14);
  border-radius:18px;
  background:rgba(255,255,255,.03);
  padding:14px;
}
.v457-run-bag-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.v457-run-bag-summary div{
  border:1px solid rgba(201,164,91,.10);
  border-radius:14px;
  padding:12px;
  background:rgba(0,0,0,.18);
}
.v457-run-bag-summary b{display:block;color:#f3dc94;font-size:24px;}
.v457-run-bag-summary span{color:#a99d81;font-size:13px;}
.v457-run-bag-list{
  min-height:0;
  overflow:auto;
  display:grid;
  gap:10px;
  align-content:start;
}
.v457-run-bag-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  border:1px solid rgba(201,164,91,.10);
  border-radius:14px;
  background:rgba(0,0,0,.18);
  padding:12px 14px;
}
.v457-run-bag-row b{color:#f3dc94;}
.v457-run-bag-row span{display:block;color:#c9bc9d;margin-top:4px;}
.v457-run-bag-row p{margin:6px 0 0;color:#9f947d;line-height:1.55;}
.v457-exit-box{
  position:relative;
  width:min(620px,90vw);
  border:1px solid rgba(201,164,91,.35);
  border-radius:24px;
  overflow:hidden;
  box-shadow:0 28px 90px rgba(0,0,0,.7);
  background:#050506;
}
.v457-exit-box::before{
  content:"";
  position:absolute;
  inset:0;
  background-image:linear-gradient(90deg,rgba(0,0,0,.80),rgba(0,0,0,.56)),var(--poster);
  background-size:cover;
  background-position:center;
  filter:saturate(.75);
}
.v457-exit-content{
  position:relative;
  padding:28px;
}
.v457-exit-content h2{margin:0;color:#f3dc94;font-size:30px;}
.v457-exit-content p{color:#e8ddc2;line-height:1.8;}
.v457-exit-actions{display:flex;gap:12px;flex-wrap:wrap;}
.v457-toast{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:100000;
  padding:12px 16px;
  border:1px solid rgba(201,164,91,.35);
  border-radius:14px;
  background:rgba(10,10,12,.94);
  color:#f3dc94;
  box-shadow:0 16px 40px rgba(0,0,0,.45);
}
@media(max-width:1200px){
  #dungeon .v457-shell{
    grid-template-columns:1fr;
    grid-template-rows:auto auto minmax(260px,auto) auto auto auto;
    grid-template-areas:"top" "role" "display" "log" "action" "side";
    height:auto;
    max-height:none;
    overflow:visible!important;
  }
  #dungeon .v457-side-area{grid-template-rows:auto auto;}
}
@media(max-width:820px){
  #dungeon .v457-top-buttons,
  #dungeon .v457-action-list .battle-actions,
  #dungeon .v457-action-list .command-buttons,
  #dungeon .v457-action-list .v452-action-bar,
  #dungeon .v457-action-list .v453-action-bar,
  #dungeon .v457-action-list .v456-action-grid,
  .v457-run-bag-summary{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:560px){
  #dungeon .v457-top-buttons,
  #dungeon .v457-action-list .battle-actions,
  #dungeon .v457-action-list .command-buttons,
  #dungeon .v457-action-list .v452-action-bar,
  #dungeon .v457-action-list .v453-action-bar,
  #dungeon .v457-action-list .v456-action-grid,
  #dungeon .v457-potion-list,
  .v457-run-bag-summary{
    grid-template-columns:1fr!important;
  }
  .v457-run-bag-row{grid-template-columns:1fr;}
}



/* v0.4.59：装备栏点击不消失，展示区域固定 */
#dungeon .v457-equipment-card,
#dungeon .v457-equip-list,
#dungeon .v457-equip {
  pointer-events: auto;
}
#dungeon .v457-equip {
  user-select: none;
  cursor: default;
}
#dungeon .v457-equipment-card:active,
#dungeon .v457-equip:active {
  transform: none !important;
  opacity: 1 !important;
}



/* v0.4.60：恢复v0.4.33系城镇NPC右侧立绘布局 */
.v460-town-shop-layout,
.town-shop-layout.premium-town-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 360px;
  gap:18px;
  align-items:stretch;
  min-height:620px;
}
.v460-shop-main,
.town-shop-layout .shop-main-panel{
  min-width:0;
  min-height:0;
  overflow:hidden;
}
.v460-shop-scroll,
.town-shop-layout .shop-main-scroll{
  max-height:calc(100vh - 260px);
  overflow:auto;
  padding-right:4px;
}
.v460-npc-panel,
.town-shop-layout .npc-panel{
  position:sticky;
  top:18px;
  align-self:start;
  display:grid;
  grid-template-rows:minmax(360px,48vh) auto;
  gap:14px;
  min-height:560px;
}
.v460-npc-portrait,
.npc-panel .npc-portrait-image{
  position:relative;
  overflow:hidden;
  border-radius:24px;
  border:1px solid rgba(201,164,91,.25);
  background:linear-gradient(180deg,rgba(255,244,210,.06),rgba(0,0,0,.55));
  min-height:360px;
}
.v460-npc-portrait img,
.npc-panel .npc-portrait-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  filter:saturate(.9) contrast(1.06);
}
.v460-npc-portrait::after,
.npc-panel .npc-portrait-image::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(0,0,0,0),rgba(0,0,0,.68));
  pointer-events:none;
}
.v460-npc-portrait .npc-nameplate,
.npc-panel .npc-nameplate{
  position:absolute;
  left:18px;
  right:18px;
  bottom:18px;
  z-index:2;
  color:#f4dfae;
}
.v460-npc-portrait .npc-nameplate strong,
.npc-panel .npc-nameplate strong{
  display:block;
  font-size:26px;
  line-height:1.1;
}
.v460-npc-portrait .npc-nameplate span,
.npc-panel .npc-nameplate span{
  color:#d4c5a2;
}
.v460-npc-dialogue,
.npc-panel .npc-dialogue{
  max-height:210px;
  overflow:auto;
}
.v460-card-grid.shop-card-grid,
.shop-card-grid.v460-card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:14px;
}
.v460-title-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
#scavenger .shop-card-grid .shop-card,
#pawnshop .shop-card-grid .shop-card,
#forge .shop-card-grid .shop-card,
#potionworkshop .shop-card-grid .shop-card{
  min-width:0;
}
#scavenger .shop-main-scroll,
#pawnshop .shop-main-scroll,
#forge .shop-main-scroll,
#potionworkshop .shop-main-scroll{
  overscroll-behavior:contain;
}
@media(max-width:1100px){
  .v460-town-shop-layout,
  .town-shop-layout.premium-town-layout{
    grid-template-columns:1fr;
  }
  .v460-npc-panel,
  .town-shop-layout .npc-panel{
    position:relative;
    top:auto;
    grid-template-rows:320px auto;
    min-height:0;
  }
  .v460-shop-scroll,
  .town-shop-layout .shop-main-scroll{
    max-height:none;
  }
}



/* v0.4.61：地下城入口技能配置面板恢复 */
.v461-skill-loadout{
  border:1px solid rgba(201,164,91,.20);
  background:linear-gradient(180deg,rgba(20,18,14,.78),rgba(3,4,6,.90));
}
.v461-skill-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  border-bottom:1px solid rgba(201,164,91,.14);
  padding-bottom:12px;
  margin-bottom:12px;
}
.v461-skill-head h3{margin:0;color:#f5df9f;font-size:24px;}
.v461-skill-head p{margin:6px 0 0;color:#b9ad91;line-height:1.6;}
.v461-skill-head strong{
  flex:0 0 auto;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid rgba(201,164,91,.28);
  background:rgba(201,164,91,.10);
  color:#f5df9f;
}
.v461-selected{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:12px;
}
.v461-selected span,.v461-selected em{
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.06);
  color:#e9d9b5;
  font-style:normal;
}
.v461-skill-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:10px;
}
.v461-skill-card{
  border:1px solid rgba(201,164,91,.14);
  border-radius:16px;
  background:rgba(255,255,255,.035);
  padding:12px;
  text-align:left;
  display:grid;
  gap:6px;
  min-height:126px;
  cursor:pointer;
}
.v461-skill-card:hover{
  border-color:rgba(201,164,91,.36);
  background:rgba(201,164,91,.07);
}
.v461-skill-card.selected{
  border-color:rgba(236,196,105,.70);
  box-shadow:0 0 0 1px rgba(236,196,105,.25), inset 0 0 26px rgba(201,164,91,.08);
}
.v461-skill-card b{color:#f5df9f;font-size:16px;}
.v461-skill-card span{color:#d8c9a7;font-size:13px;}
.v461-skill-card small{
  color:#a99e85;
  line-height:1.55;
  max-height:4.6em;
  overflow:hidden;
}
.v461-skill-card:disabled{
  opacity:.45;
  cursor:not-allowed;
}
@media(max-width:700px){
  .v461-skill-head{display:grid;}
  .v461-skill-grid{grid-template-columns:1fr;}
}


/* v0.4.62：UI审查后的全局滚动与地下城入口整合样式 */
html, body{height:100%;}
body{overflow:hidden;}
.app-shell.dungeon-shell{height:100dvh;min-height:100dvh;overflow:hidden;grid-template-columns:280px minmax(0,1fr);}
.sidebar.dungeon-sidebar{height:100dvh;overflow:auto;overscroll-behavior:contain;}
.main.dungeon-main{height:100dvh;overflow:auto;overscroll-behavior:contain;min-width:0;padding:28px;}
.view.active{min-width:0;}
#quick-bag-button,.quick-bag-button{display:none!important;}
#dungeon .dungeon-prep-shell:not(.v462-prep-shell),
#dungeon #v028-skill-loadout-wrap:not(#v462-skill-loadout-wrap #v028-skill-loadout-wrap),
#dungeon #v461-skill-loadout-wrap:not(#v462-skill-loadout-wrap){display:none!important;}
.v462-prep-shell{display:grid;gap:18px;max-width:1500px;margin:0 auto 42px;}
.v462-prep-hero,.v462-equipment-strip,.v462-prep-shell .v461-skill-loadout,.v462-dungeon-bag-panel,.v462-town-bag-panel,.v462-pause-card{border:1px solid rgba(201,164,91,.18);border-radius:24px;background:linear-gradient(180deg,rgba(20,18,14,.76),rgba(4,5,7,.88));box-shadow:0 16px 44px rgba(0,0,0,.28),inset 0 0 28px rgba(201,164,91,.035);}
.v462-prep-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:28px 32px;background:linear-gradient(135deg,rgba(215,180,106,.16),rgba(0,0,0,.66));}
.v462-prep-hero h2{margin:0;color:#f5df9f;font-size:36px;letter-spacing:.04em;}
.v462-prep-hero p{margin:10px 0 0;color:#b9ad91;line-height:1.7;}
.v462-prep-hero span{padding:7px 12px;border-radius:999px;border:1px solid rgba(201,164,91,.28);background:rgba(201,164,91,.10);color:#f5df9f;font-weight:900;white-space:nowrap;}
.v462-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;border-bottom:1px solid rgba(201,164,91,.14);padding-bottom:12px;margin-bottom:14px;}
.v462-panel-head h3{margin:0;color:#f5df9f;font-size:24px;}
.v462-panel-head p{margin:6px 0 0;color:#b9ad91;line-height:1.65;}
.v462-panel-head strong{padding:7px 12px;border-radius:999px;border:1px solid rgba(201,164,91,.28);background:rgba(201,164,91,.10);color:#f5df9f;white-space:nowrap;}
.v462-head-actions{display:flex;gap:10px;flex-wrap:wrap;}
.v462-equipment-strip{padding:22px 24px;}
.v462-equip-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;}
.v462-equip-slot{min-height:132px;border:1px solid rgba(201,164,91,.13);border-radius:16px;background:rgba(255,255,255,.035);padding:13px;display:grid;gap:6px;align-content:start;}
.v462-equip-slot b{color:#f5df9f;}
.v462-equip-slot span{color:#eadfbe;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.v462-equip-slot small{color:#a99e85;line-height:1.45;}
.v462-equip-slot.empty span,.v462-equip-slot.empty small{color:#827967;}
.v462-prep-shell .v461-skill-loadout{padding:22px 24px;}
.v462-prep-grid{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:18px;align-items:start;}
.v462-dungeon-bag-panel,.v462-town-bag-panel{padding:22px 24px;min-width:0;}
.v462-prep-stats{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 14px;}
.v462-prep-stats span,.v462-chosen-list span,.v462-chosen-list em{display:inline-flex;padding:7px 10px;border-radius:999px;border:1px solid rgba(201,164,91,.12);background:rgba(255,255,255,.04);color:#d8c9a7;font-style:normal;}
.v462-chosen-list{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px;}
.v462-town-list{display:grid;gap:10px;max-height:620px;overflow:auto;padding-right:4px;overscroll-behavior:contain;}
.v462-town-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;border:1px solid rgba(201,164,91,.11);border-radius:16px;background:rgba(255,255,255,.035);padding:13px 14px;}
.v462-town-row b{color:#f5df9f;}
.v462-town-row span{display:block;color:#d7c8a6;margin-top:4px;}
.v462-town-row p{margin:6px 0 0;color:#9f947d;line-height:1.55;}
.v462-town-row.equipment{border-color:rgba(122,184,255,.18);}
.v462-pause-card{padding:18px 20px;}
/* v0.4.33 系列工坊/NPC页统一兜底：左内容 + 右侧立绘栏 */
.town-npc-layout,.npc-shop-layout,.v460-npc-layout{display:grid!important;grid-template-columns:minmax(0,1fr) 320px!important;gap:18px!important;align-items:start!important;}
.town-npc-side,.npc-side,.v460-npc-side{position:sticky!important;top:18px!important;min-height:420px;border:1px solid rgba(201,164,91,.18);border-radius:24px;background:linear-gradient(180deg,rgba(20,18,14,.76),rgba(4,5,7,.88));overflow:hidden;}
@media(max-width:1200px){.v462-prep-grid,.town-npc-layout,.npc-shop-layout,.v460-npc-layout{grid-template-columns:1fr!important}.town-npc-side,.npc-side,.v460-npc-side{position:relative!important;top:auto!important}.v462-equip-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:720px){body{overflow:auto}.app-shell.dungeon-shell{height:auto;min-height:100dvh;grid-template-columns:1fr}.sidebar.dungeon-sidebar{height:auto}.main.dungeon-main{height:auto;overflow:visible;padding:14px}.v462-prep-hero,.v462-panel-head{display:grid}.v462-equip-grid,.v461-skill-grid,.v462-prep-grid{grid-template-columns:1fr!important}.v462-town-row{grid-template-columns:1fr}.v462-head-actions{justify-content:flex-start}}

/* v0.4.63：单一 UI 渲染源样式。所有页面只允许显示对应 data-zone 内容。 */
body[data-ui-version] #quick-bag-button{display:none!important;}
body[data-ui-version] .view:not(.active){display:none!important;}
body[data-ui-version] .ui63-view{min-width:0;}
.ui63-card,.ui63-page-head{border:1px solid rgba(201,164,91,.18);border-radius:22px;background:linear-gradient(180deg,rgba(20,18,14,.78),rgba(3,4,6,.92));box-shadow:0 16px 44px rgba(0,0,0,.30), inset 0 0 26px rgba(201,164,91,.04);min-width:0;min-height:0;overflow:hidden;padding:16px;}
.ui63-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;border-bottom:1px solid rgba(201,164,91,.12);padding-bottom:10px;margin-bottom:12px;}
.ui63-card-head h2,.ui63-card-head h3,.ui63-page-head h2{margin:0;color:#f3dc94;line-height:1.1;}
.ui63-card-head h2,.ui63-page-head h2{font-size:30px;}.ui63-card-head h3{font-size:21px;}
.ui63-card-head p,.ui63-page-head p{margin:7px 0 0;color:#b9ad91;line-height:1.55;}
.ui63-card-head span,.ui63-page-head span{flex:0 0 auto;padding:7px 12px;border:1px solid rgba(201,164,91,.28);border-radius:999px;background:rgba(201,164,91,.10);color:#f3dc94;font-weight:900;}
.ui63-empty{display:flex;align-items:center;justify-content:center;min-height:58px;border:1px dashed rgba(255,255,255,.13);border-radius:14px;background:rgba(255,255,255,.025);color:#9e947d;text-align:center;padding:10px;}
.ui63-control-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}.ui63-control-grid button{min-width:0;white-space:normal;}
.ui63-scroll{min-height:0;overflow:auto;padding-right:4px;line-height:1.8;color:#e6dac0;}

body[data-current-view="dungeon"] .main.dungeon-main{overflow:hidden!important;}
.ui63-dungeon-run{display:grid;grid-template-columns:minmax(0,1fr) 380px;grid-template-rows:136px minmax(0,1.05fr) minmax(0,.82fr) 160px;grid-template-areas:"top role" "display side" "log side" "actions side";gap:12px;height:calc(100dvh - 40px);min-height:0;overflow:hidden;}
.ui63-dungeon-top{grid-area:top;}.ui63-role-card{grid-area:role;}.ui63-display{grid-area:display;display:grid;grid-template-rows:auto 1fr;}.ui63-log{grid-area:log;display:grid;grid-template-rows:auto 1fr;}.ui63-actions{grid-area:actions;display:grid;grid-template-rows:auto 1fr;}.ui63-right-panel{grid-area:side;display:grid;grid-template-rows:178px minmax(0,1fr);gap:12px;min-height:0;overflow:hidden;}
.ui63-control-grid,.ui63-dungeon-top .ui63-control-grid{grid-template-columns:repeat(4,minmax(0,1fr));}
.ui63-mini-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px;}.ui63-mini-stats span{padding:8px 10px;border:1px solid rgba(201,164,91,.10);border-radius:12px;background:rgba(255,255,255,.035);color:#dfd3b4;font-size:13px;}
.ui63-battle-meta{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px;}.ui63-battle-meta span,.ui63-battle-meta em{font-style:normal;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.055);color:#dfd3b4;font-size:12px;}
.ui63-enemy-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:10px;min-height:0;overflow:auto;align-content:start;padding-right:4px;}
.ui63-log-list{display:grid;gap:9px;min-height:0;overflow:auto;align-content:start;padding-right:4px;}.ui63-log-list p{margin:0;padding:10px 12px;border:1px solid rgba(201,164,91,.10);border-radius:13px;background:rgba(255,255,255,.032);color:#e3d8bd;line-height:1.65;word-break:break-word;}
.ui63-action-list{min-height:0;overflow:auto;padding-right:4px;}.ui63-action-list .battle-actions,.ui63-action-list .command-buttons,.ui63-action-list .v450-action-layout,.ui63-action-list .v452-action-bar,.ui63-action-list .v453-action-bar{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:9px!important;}.ui63-action-list button{min-width:0;}
.ui63-potion-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}.ui63-potion{display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid rgba(72,185,110,.22);border-radius:12px;background:rgba(52,130,74,.10);color:#def7db;padding:9px 10px;min-width:0;}.ui63-potion span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.ui63-potion em{font-style:normal;color:#a9e8b3;}
.ui63-equip-card{display:grid;grid-template-rows:auto 1fr;}.ui63-equip-list{display:grid;align-content:start;gap:8px;min-height:0;overflow:auto;padding-right:4px;}.ui63-equip-row{display:grid;grid-template-columns:72px minmax(0,1fr) auto;gap:8px;align-items:center;padding:9px 10px;border:1px solid rgba(201,164,91,.10);border-radius:12px;background:rgba(255,255,255,.032);}.ui63-equip-row b{color:#f3dc94;}.ui63-equip-row span{color:#eadfbe;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.ui63-equip-row em{color:#ad9f82;font-size:12px;font-style:normal;}.ui63-equip-row.empty span,.ui63-equip-row.empty em{color:#817966;}

.ui63-dungeon-prep{display:grid;gap:16px;}.ui63-page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;}.ui63-prep-equip-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;}.ui63-prep-bag-columns{display:grid;grid-template-columns:1fr 1fr;gap:14px;}.ui63-prep-bag-columns h4{color:#f3dc94;margin:0 0 10px;}.ui63-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 12px;border:1px solid rgba(201,164,91,.10);border-radius:13px;background:rgba(255,255,255,.032);margin-bottom:8px;}.ui63-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#e7d9b6;}
.ui63-skill-selected{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px;}.ui63-skill-selected em{font-style:normal;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.06);color:#e9d9b5;}.ui63-skill-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:10px;}.ui63-skill{border:1px solid rgba(201,164,91,.14);border-radius:16px;background:rgba(255,255,255,.035);padding:12px;text-align:left;display:grid;gap:6px;min-height:126px;cursor:pointer;}.ui63-skill.selected{border-color:rgba(236,196,105,.70);box-shadow:0 0 0 1px rgba(236,196,105,.25), inset 0 0 26px rgba(201,164,91,.08);}.ui63-skill b{color:#f5df9f;font-size:16px;}.ui63-skill span{color:#d8c9a7;font-size:13px;}.ui63-skill small{color:#a99e85;line-height:1.55;max-height:4.6em;overflow:hidden;}.ui63-skill:disabled{opacity:.45;cursor:not-allowed;}

.ui63-npc-shell{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;align-items:start;}.ui63-npc-main{min-width:0;}.ui63-npc-aside{position:sticky;top:14px;border:1px solid rgba(201,164,91,.18);border-radius:22px;background:linear-gradient(180deg,rgba(20,18,14,.78),rgba(3,4,6,.92));padding:16px;box-shadow:0 16px 44px rgba(0,0,0,.30);}.ui63-npc-portrait{height:420px;border-radius:18px;overflow:hidden;background:rgba(255,255,255,.03);border:1px solid rgba(201,164,91,.12);}.ui63-npc-portrait img{width:100%;height:100%;object-fit:cover;display:block;}.ui63-npc-dialog{margin-top:12px;border:1px solid rgba(201,164,91,.12);border-radius:16px;background:rgba(0,0,0,.22);padding:14px;}.ui63-npc-dialog h3{margin:0;color:#f3dc94;}.ui63-npc-dialog p{color:#d8c9a7;line-height:1.65;}

.ui63-modal{position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;}.ui63-modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.72);backdrop-filter:blur(4px);}.ui63-modal-panel{position:relative;width:min(1120px,92vw);max-height:86vh;display:grid;grid-template-rows:auto auto auto 1fr;gap:14px;border:1px solid rgba(201,164,91,.28);border-radius:24px;background:linear-gradient(180deg,rgba(20,18,14,.96),rgba(4,4,6,.98));box-shadow:0 28px 90px rgba(0,0,0,.65);padding:22px;overflow:hidden;}.ui63-modal-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;border-bottom:1px solid rgba(201,164,91,.18);padding-bottom:14px;}.ui63-modal-head h2{margin:0;color:#f3dc94;font-size:30px;}.ui63-modal-head p{margin:8px 0 0;color:#b9ad91;}.ui63-run-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}.ui63-run-summary div{border:1px solid rgba(201,164,91,.10);border-radius:14px;padding:12px;background:rgba(0,0,0,.18);}.ui63-run-summary b{display:block;color:#f3dc94;font-size:24px;}.ui63-run-summary span{color:#a99d81;font-size:13px;}.ui63-run-list{min-height:0;overflow:auto;display:grid;gap:10px;align-content:start;}.ui63-run-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;border:1px solid rgba(201,164,91,.10);border-radius:14px;background:rgba(0,0,0,.18);padding:12px 14px;}.ui63-run-row b{color:#f3dc94;}.ui63-run-row span{display:block;color:#c9bc9d;margin-top:4px;}.ui63-run-row p{margin:6px 0 0;color:#9f947d;line-height:1.55;}
.ui63-exit-panel{position:relative;width:min(620px,90vw);border:1px solid rgba(201,164,91,.35);border-radius:24px;overflow:hidden;box-shadow:0 28px 90px rgba(0,0,0,.7);background:#050506;padding:28px;}.ui63-exit-panel::before{content:"";position:absolute;inset:0;background-image:linear-gradient(90deg,rgba(0,0,0,.82),rgba(0,0,0,.58)),var(--poster);background-size:cover;background-position:center;filter:saturate(.75);}.ui63-exit-panel>div{position:relative;}.ui63-exit-panel h2{margin:0;color:#f3dc94;font-size:30px;}.ui63-exit-panel p{color:#e8ddc2;line-height:1.8;}

@media(max-width:1200px){.ui63-dungeon-run{grid-template-columns:1fr;grid-template-rows:auto auto minmax(260px,auto) auto auto auto;grid-template-areas:"top" "role" "display" "log" "actions" "side";height:auto;max-height:none;overflow:visible;}.ui63-right-panel{grid-template-rows:auto auto;}.ui63-npc-shell{grid-template-columns:1fr;}.ui63-npc-aside{position:relative;top:auto;}.ui63-npc-portrait{height:320px;}.ui63-prep-bag-columns{grid-template-columns:1fr;}}
@media(max-width:760px){.ui63-control-grid,.ui63-dungeon-top .ui63-control-grid,.ui63-action-list .battle-actions,.ui63-action-list .command-buttons,.ui63-action-list .v450-action-layout,.ui63-action-list .v452-action-bar,.ui63-action-list .v453-action-bar,.ui63-run-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important;}.ui63-potion-list{grid-template-columns:1fr;}}
@media(max-width:520px){.ui63-control-grid,.ui63-dungeon-top .ui63-control-grid,.ui63-action-list .battle-actions,.ui63-action-list .command-buttons,.ui63-action-list .v450-action-layout,.ui63-action-list .v452-action-bar,.ui63-action-list .v453-action-bar,.ui63-run-summary{grid-template-columns:1fr!important;}.ui63-page-head,.ui63-card-head{display:grid;}.ui63-run-row{grid-template-columns:1fr;}}



/* v0.4.64：地下城整备页滚动修复 + 启动加载界面 */
body.ui64-loading-active {
  overflow: hidden !important;
}
.ui64-startup-loader {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: grid;
  place-items: center;
  background: #020203;
  overflow: hidden;
}
.ui64-startup-loader.is-done {
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
}
.ui64-startup-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(0,0,0,.88), rgba(0,0,0,.52), rgba(0,0,0,.90)),
    var(--ui64-loading-poster);
  background-size: cover;
  background-position: center;
  filter: saturate(.82) contrast(1.02);
  transform: scale(1.04);
}
.ui64-startup-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(201,164,91,.18), transparent 36%),
    linear-gradient(180deg, rgba(0,0,0,.16), rgba(0,0,0,.72));
}
.ui64-startup-panel {
  position: relative;
  width: min(560px, 88vw);
  border: 1px solid rgba(201,164,91,.42);
  border-radius: 26px;
  padding: 30px 30px 28px;
  text-align: center;
  color: #f3dc94;
  background: linear-gradient(180deg, rgba(18,16,13,.82), rgba(3,4,6,.94));
  box-shadow: 0 28px 90px rgba(0,0,0,.70), inset 0 0 34px rgba(201,164,91,.06);
  backdrop-filter: blur(8px);
}
.ui64-startup-panel h2 {
  margin: 14px 0 8px;
  font-size: 34px;
  letter-spacing: .08em;
}
.ui64-startup-panel p {
  margin: 0;
  color: #efe2c0;
  line-height: 1.8;
}
.ui64-startup-panel small {
  display: block;
  margin-top: 12px;
  color: #b8ac8f;
}
.ui64-startup-ring {
  width: 58px;
  height: 58px;
  margin: 0 auto;
  border-radius: 999px;
  border: 3px solid rgba(201,164,91,.18);
  border-top-color: #f3dc94;
  animation: ui64Spin .9s linear infinite;
}
.ui64-startup-loader.is-error .ui64-startup-ring {
  animation: none;
  border-color: rgba(255,100,100,.45);
}
.ui64-startup-loader.is-error .ui64-startup-panel {
  border-color: rgba(255,100,100,.48);
}
@keyframes ui64Spin { to { transform: rotate(360deg); } }

/* 地下城入口/整备页不是全屏运行页，右侧主内容必须可以上下滚动。 */
body[data-current-view="dungeon"]:not(.dungeon-fullscreen) .app-shell.dungeon-shell {
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  align-items: stretch !important;
}
body[data-current-view="dungeon"]:not(.dungeon-fullscreen) .sidebar.dungeon-sidebar {
  height: calc(100dvh - 36px) !important;
  max-height: calc(100dvh - 36px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
}
body[data-current-view="dungeon"]:not(.dungeon-fullscreen) .main.dungeon-main {
  height: calc(100dvh - 36px) !important;
  max-height: calc(100dvh - 36px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  padding-bottom: 80px !important;
}
body[data-current-view="dungeon"]:not(.dungeon-fullscreen) #dungeon.view.active {
  min-height: auto !important;
  overflow: visible !important;
}
body[data-current-view="dungeon"]:not(.dungeon-fullscreen) .ui63-dungeon-prep {
  min-height: auto !important;
  padding-bottom: 96px !important;
}
body[data-current-view="dungeon"]:not(.dungeon-fullscreen) .ui63-card,
body[data-current-view="dungeon"]:not(.dungeon-fullscreen) .ui63-page-head {
  overflow: visible;
}
body[data-current-view="dungeon"]:not(.dungeon-fullscreen) .ui63-skill-grid,
body[data-current-view="dungeon"]:not(.dungeon-fullscreen) .ui63-prep-bag-columns {
  min-height: 0;
}
@media (max-width: 980px) {
  body[data-current-view="dungeon"]:not(.dungeon-fullscreen) .app-shell.dungeon-shell {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  body[data-current-view="dungeon"]:not(.dungeon-fullscreen) .sidebar.dungeon-sidebar,
  body[data-current-view="dungeon"]:not(.dungeon-fullscreen) .main.dungeon-main {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}


/* v0.4.66：UI样式兜底与版本无关化。防止 data-ui-version / 缓存 / 旧补丁导致地下城整备页裸奔。 */
.view:not(.active){display:none!important;}
#quick-bag-button{display:none!important;}
body[data-ui-version] .view:not(.active){display:none!important;}
body[data-ui-version] #quick-bag-button{display:none!important;}

/* 地下城整备页：必须可滚动，且不受地下城运行页 overflow:hidden 影响。 */
body[data-current-view="dungeon"]:not(.dungeon-fullscreen){overflow:hidden!important;}
body[data-current-view="dungeon"]:not(.dungeon-fullscreen) .app-shell.dungeon-shell{
  height:100dvh!important;
  max-height:100dvh!important;
  overflow:hidden!important;
  display:grid!important;
  grid-template-columns:320px minmax(0,1fr)!important;
  align-items:stretch!important;
}
body[data-current-view="dungeon"]:not(.dungeon-fullscreen) .sidebar.dungeon-sidebar{
  height:calc(100dvh - 36px)!important;
  max-height:calc(100dvh - 36px)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain;
}
body[data-current-view="dungeon"]:not(.dungeon-fullscreen) .main.dungeon-main{
  height:calc(100dvh - 36px)!important;
  max-height:calc(100dvh - 36px)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain;
  padding-bottom:110px!important;
}
body[data-current-view="dungeon"]:not(.dungeon-fullscreen) #dungeon.view.active{
  display:block!important;
  overflow:visible!important;
  min-height:auto!important;
}

/* UI63最终外观强制兜底。就算 body 上 data-ui-version 没来得及设置，也必须有卡片样式。 */
#dungeon .ui63-dungeon-prep{display:grid!important;gap:16px!important;padding-bottom:110px!important;}
#dungeon .ui63-page-head,
#dungeon .ui63-card{
  border:1px solid rgba(201,164,91,.18)!important;
  border-radius:22px!important;
  background:linear-gradient(180deg,rgba(20,18,14,.78),rgba(3,4,6,.92))!important;
  box-shadow:0 16px 44px rgba(0,0,0,.30), inset 0 0 26px rgba(201,164,91,.04)!important;
  min-width:0!important;
  min-height:0!important;
  overflow:hidden!important;
  padding:16px!important;
  color:#e8ddc2!important;
}
#dungeon .ui63-page-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:16px!important;}
#dungeon .ui63-card-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:14px!important;border-bottom:1px solid rgba(201,164,91,.12)!important;padding-bottom:10px!important;margin-bottom:12px!important;}
#dungeon .ui63-card-head h2,#dungeon .ui63-card-head h3,#dungeon .ui63-page-head h2{margin:0!important;color:#f3dc94!important;line-height:1.1!important;}
#dungeon .ui63-card-head h2,#dungeon .ui63-page-head h2{font-size:30px!important;}
#dungeon .ui63-card-head h3{font-size:21px!important;}
#dungeon .ui63-card-head p,#dungeon .ui63-page-head p{margin:7px 0 0!important;color:#b9ad91!important;line-height:1.55!important;}
#dungeon .ui63-card-head span,#dungeon .ui63-page-head span{
  flex:0 0 auto!important;
  padding:7px 12px!important;
  border:1px solid rgba(201,164,91,.28)!important;
  border-radius:999px!important;
  background:rgba(201,164,91,.10)!important;
  color:#f3dc94!important;
  font-weight:900!important;
}
#dungeon .ui63-control-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;}
#dungeon .ui63-control-grid button{min-width:0!important;white-space:normal!important;}
#dungeon .ui63-prep-equip-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important;gap:10px!important;}
#dungeon .ui63-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:10px!important;align-items:center!important;padding:10px 12px!important;border:1px solid rgba(201,164,91,.10)!important;border-radius:13px!important;background:rgba(255,255,255,.032)!important;margin-bottom:8px!important;}
#dungeon .ui63-row span{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;color:#e7d9b6!important;}
#dungeon .ui63-prep-bag-columns{display:grid!important;grid-template-columns:1fr 1fr!important;gap:14px!important;}
#dungeon .ui63-skill-selected{display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin-bottom:12px!important;}
#dungeon .ui63-skill-selected em{font-style:normal!important;padding:6px 10px!important;border-radius:999px!important;background:rgba(255,255,255,.06)!important;color:#e9d9b5!important;}
#dungeon .ui63-skill-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(230px,1fr))!important;gap:10px!important;}
#dungeon .ui63-skill{border:1px solid rgba(201,164,91,.14)!important;border-radius:16px!important;background:rgba(255,255,255,.035)!important;padding:12px!important;text-align:left!important;display:grid!important;gap:6px!important;min-height:126px!important;cursor:pointer!important;color:#d8c9a7!important;}
#dungeon .ui63-skill.selected{border-color:rgba(236,196,105,.70)!important;box-shadow:0 0 0 1px rgba(236,196,105,.25), inset 0 0 26px rgba(201,164,91,.08)!important;}
#dungeon .ui63-skill b{color:#f5df9f!important;font-size:16px!important;}
#dungeon .ui63-skill span{color:#d8c9a7!important;font-size:13px!important;}
#dungeon .ui63-skill small{color:#a99e85!important;line-height:1.55!important;max-height:4.6em!important;overflow:hidden!important;}

/* 地下城运行页继续使用固定图二布局，不影响整备页滚动。 */
body.dungeon-fullscreen #dungeon .ui63-dungeon-run{height:calc(100dvh - 40px)!important;max-height:calc(100dvh - 40px)!important;overflow:hidden!important;}

@media(max-width:980px){
  body[data-current-view="dungeon"]:not(.dungeon-fullscreen){overflow:auto!important;}
  body[data-current-view="dungeon"]:not(.dungeon-fullscreen) .app-shell.dungeon-shell{height:auto!important;max-height:none!important;overflow:visible!important;grid-template-columns:1fr!important;}
  body[data-current-view="dungeon"]:not(.dungeon-fullscreen) .sidebar.dungeon-sidebar,
  body[data-current-view="dungeon"]:not(.dungeon-fullscreen) .main.dungeon-main{height:auto!important;max-height:none!important;overflow:visible!important;}
  #dungeon .ui63-prep-bag-columns{grid-template-columns:1fr!important;}
}
@media(max-width:620px){
  #dungeon .ui63-control-grid{grid-template-columns:1fr!important;}
  #dungeon .ui63-page-head,#dungeon .ui63-card-head{display:grid!important;}
}


/* v0.4.66 placeholder: critical CSS is injected inline by app.js and index.html to avoid order/cache failure. */


/* v0.4.72：清理 v0.4.67-0.4.71 运行页样式叠加，重新统一地下城运行布局。 */
body.dungeon-fullscreen{
  overflow:hidden !important;
}
body.dungeon-fullscreen #dungeon.view.active{
  padding:6px !important;
  overflow:hidden !important;
}
body.dungeon-fullscreen .app-shell,
body.dungeon-fullscreen .app-shell.dungeon-shell,
body.dungeon-fullscreen .main.dungeon-main{
  width:100vw !important;
  max-width:100vw !important;
  height:100dvh !important;
  max-height:100dvh !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
}
body.dungeon-fullscreen .sidebar.dungeon-sidebar{
  display:none !important;
}
body.dungeon-fullscreen .ui72-dungeon-run{
  width:calc(100vw - 12px) !important;
  max-width:calc(100vw - 12px) !important;
  height:calc(100dvh - 12px) !important;
  max-height:calc(100dvh - 12px) !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) 330px !important;
  grid-template-rows:34px minmax(0,1fr) 72px !important;
  grid-template-areas:"top side" "display side" "actions side" !important;
  gap:6px !important;
  min-height:0 !important;
  overflow:hidden !important;
  margin:0 auto !important;
  padding:0 !important;
  box-sizing:border-box !important;
}
.ui72-toolbar{
  grid-area:top !important;
  height:34px !important;
  min-height:0 !important;
  padding:2px !important;
  overflow:hidden !important;
  border:1px solid rgba(201,164,91,.16) !important;
  border-radius:14px !important;
  background:linear-gradient(180deg,rgba(30,24,16,.60),rgba(3,4,6,.76)) !important;
  box-shadow:inset 0 0 20px rgba(201,164,91,.04) !important;
  z-index:3 !important;
}
.ui72-toolbar-buttons{
  height:100% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:5px !important;
  overflow:hidden !important;
  min-width:0 !important;
}
.ui72-toolbar button{
  height:28px !important;
  min-height:28px !important;
  padding:3px 8px !important;
  border-radius:10px !important;
  font-size:12px !important;
  line-height:1 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  flex:0 0 auto !important;
}
.ui72-floor-button{width:42px !important; padding:0 !important; border-radius:999px !important;}
.ui72-bag-button{width:140px !important;}
.ui72-crystal-button{width:132px !important;}
.ui72-pause-button{width:100px !important;}
.ui72-exit-button{width:104px !important;}
.ui72-display{
  grid-area:display !important;
  min-height:0 !important;
  overflow:hidden !important;
  padding:8px !important;
  display:grid !important;
  grid-template-rows:auto minmax(0,1fr) !important;
  align-content:start !important;
}
.ui72-display-strip{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:7px !important;
  min-height:25px !important;
  height:25px !important;
  margin:0 0 7px !important;
  overflow:hidden !important;
  flex:0 0 auto !important;
  white-space:nowrap !important;
}
.ui72-display-strip span,
.ui72-display-strip em,
.ui72-display-strip b,
.ui72-display-strip i{
  display:inline-flex !important;
  align-items:center !important;
  max-width:240px !important;
  height:23px !important;
  padding:3px 8px !important;
  border-radius:999px !important;
  border:1px solid rgba(201,164,91,.16) !important;
  background:rgba(255,255,255,.045) !important;
  color:#d9ceb2 !important;
  font-size:12px !important;
  line-height:1 !important;
  font-style:normal !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}
.ui72-display-strip b{
  color:#f5df9f !important;
  border-color:rgba(201,164,91,.28) !important;
  background:rgba(201,164,91,.10) !important;
}
.ui72-display-body{
  min-height:0 !important;
  height:100% !important;
  display:grid !important;
  grid-template-rows:minmax(0,1fr) 74px !important;
  gap:7px !important;
  overflow:hidden !important;
}
.ui72-scene-scroll{
  height:100% !important;
  min-height:0 !important;
  overflow:auto !important;
  padding:0 !important;
  scrollbar-gutter:stable !important;
}
.ui72-scene-scroll .ui63-card-head,
.ui72-scene-scroll h3:first-child,
.ui72-scene-scroll > h3:first-child{
  display:none !important;
}
.ui72-enemy-cards{
  min-height:0 !important;
  height:100% !important;
  overflow:auto !important;
  display:grid !important;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr)) !important;
  align-content:start !important;
  gap:8px !important;
  padding:0 4px 0 0 !important;
  scrollbar-gutter:stable !important;
}
.ui68-monster-card{
  min-height:112px !important;
  padding:10px !important;
  border:1px solid rgba(243,220,148,.42) !important;
  border-radius:16px !important;
  background:linear-gradient(180deg,rgba(45,33,19,.76),rgba(4,4,6,.82)) !important;
  box-shadow:inset 0 0 24px rgba(201,164,91,.05) !important;
  overflow:hidden !important;
}
.ui68-monster-head{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:8px !important;
  align-items:start !important;
}
.ui68-monster-head h3{margin:0 0 3px !important;color:#f8df99 !important;font-size:16px !important;line-height:1.2 !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;}
.ui68-monster-head p{margin:0 !important;color:#b7c8df !important;font-size:11px !important;line-height:1.25 !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;}
.ui68-monster-head span{color:#f3dc94 !important;font-size:11px !important;border:1px solid rgba(201,164,91,.30) !important;background:rgba(201,164,91,.10) !important;border-radius:999px !important;padding:4px 8px !important;white-space:nowrap !important;}
.ui68-monster-hp{display:grid !important;grid-template-columns:28px minmax(0,1fr) 74px !important;gap:7px !important;align-items:center !important;margin:8px 0 7px !important;}
.ui68-monster-hp b{color:#f3dc94 !important;font-size:11px !important;}
.ui68-monster-hp em{color:#f1e2c0 !important;font-style:normal !important;font-size:11px !important;text-align:right !important;white-space:nowrap !important;font-variant-numeric:tabular-nums;}
.ui68-hpbar{height:10px !important;border-radius:999px !important;overflow:hidden !important;background:rgba(255,255,255,.08) !important;border:1px solid rgba(255,255,255,.10) !important;}
.ui68-hpbar i{display:block !important;height:100% !important;border-radius:999px !important;background:linear-gradient(90deg,#ff6380,#ffd58a) !important;}
.ui68-fighter-stats{display:grid !important;grid-template-columns:repeat(4,minmax(0,1fr)) !important;gap:5px !important;margin-top:0 !important;}
.ui68-fighter-stats span{background:rgba(255,255,255,.04) !important;border:1px solid rgba(201,164,91,.10) !important;border-radius:8px !important;color:#d8caa8 !important;padding:5px 6px !important;font-size:11px !important;text-align:center !important;white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;}
.ui68-status-line{display:flex !important;flex-wrap:wrap !important;gap:5px !important;margin-top:6px !important;}
.ui68-status-line:empty{display:none !important;}
.ui68-status-line i{font-style:normal !important;color:#bde7c5 !important;border:1px solid rgba(90,200,120,.18) !important;background:rgba(50,130,70,.10) !important;border-radius:999px !important;padding:3px 7px !important;font-size:11px !important;}
.ui72-log-merged{
  height:74px !important;
  min-height:0 !important;
  overflow:hidden !important;
}
.ui72-log-merged > div{
  height:100% !important;
  overflow:auto !important;
  display:grid !important;
  gap:5px !important;
  align-content:start !important;
  scrollbar-gutter:stable !important;
}
.ui72-log-merged p{margin:0 !important;padding:5px 8px !important;line-height:1.3 !important;font-size:12px !important;border-radius:8px !important;background:rgba(255,255,255,.04) !important;border:1px solid rgba(201,164,91,.08) !important;color:#e4d8bb !important;}
.ui72-actions{
  grid-area:actions !important;
  min-height:0 !important;
  overflow:hidden !important;
  padding:7px !important;
  display:block !important;
}
.ui72-action-list{
  height:100% !important;
  min-height:0 !important;
  overflow:auto !important;
  padding:0 3px 0 0 !important;
  scrollbar-gutter:stable !important;
}
.ui72-action-list .battle-actions,
.ui72-action-list .command-buttons,
.ui72-action-list .v450-action-layout,
.ui72-action-list .v452-action-bar,
.ui72-action-list .v453-action-bar{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:7px !important;
  align-content:start !important;
}
.ui72-action-list button{min-height:30px !important;height:auto !important;padding:6px 8px !important;font-size:12px !important;line-height:1.1 !important;}
.ui72-right-panel{
  grid-area:side !important;
  min-width:0 !important;
  min-height:0 !important;
  height:100% !important;
  overflow:hidden !important;
  display:grid !important;
  grid-template-rows:150px 72px minmax(0,1fr) !important;
  gap:6px !important;
}
.ui72-role-card{padding:8px !important;overflow:hidden !important;min-height:0 !important;}
.ui72-role-title{display:grid !important;grid-template-columns:minmax(0,1fr) auto !important;gap:8px !important;align-items:end !important;border-bottom:1px solid rgba(201,164,91,.10) !important;padding-bottom:5px !important;margin-bottom:6px !important;}
.ui72-role-title b{color:#f5df9f !important;font-size:18px !important;line-height:1.1 !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;}
.ui72-role-title span{color:#cfc3a5 !important;font-size:12px !important;white-space:nowrap !important;}
.ui72-resource-list .resource-line{display:grid !important;grid-template-columns:32px minmax(0,1fr) 90px !important;gap:6px !important;align-items:center !important;margin:5px 0 !important;}
.ui72-resource-list .resource-line b{color:#b9c9df !important;font-size:12px !important;white-space:nowrap !important;}
.ui72-resource-list .resource-line em{font-size:12px !important;color:#f1e2c0 !important;text-align:right !important;white-space:nowrap !important;overflow:visible !important;font-variant-numeric:tabular-nums;}
.ui72-resource-list .resource-bar{height:10px !important;min-width:0 !important;}
.ui72-mini-stats{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:4px !important;margin-top:5px !important;}
.ui72-mini-stats span{display:block !important;padding:4px 6px !important;border-radius:8px !important;background:rgba(255,255,255,.04) !important;border:1px solid rgba(201,164,91,.08) !important;color:#d8caa8 !important;font-size:11px !important;line-height:1.1 !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;}
.ui72-potion-card{padding:7px !important;overflow:hidden !important;min-height:0 !important;}
.ui72-potion-list{height:100% !important;overflow:auto !important;display:grid !important;gap:5px !important;align-content:start !important;scrollbar-gutter:stable !important;}
.ui72-potion{min-height:26px !important;padding:5px 7px !important;border-radius:9px !important;font-size:11px !important;display:flex !important;align-items:center !important;justify-content:space-between !important;gap:6px !important;}
.ui72-empty{display:grid !important;place-items:center !important;min-height:42px !important;color:#9f957d !important;border:1px dashed rgba(201,164,91,.12) !important;border-radius:10px !important;font-size:12px !important;}
.ui72-equip-card{padding:7px !important;overflow:hidden !important;min-height:0 !important;}
.ui72-equip-list{height:100% !important;min-height:0 !important;overflow:auto !important;display:grid !important;gap:5px !important;align-content:start !important;scrollbar-gutter:stable !important;}
.ui72-equip-row{min-height:0 !important;display:grid !important;grid-template-columns:50px minmax(0,1fr) 42px !important;gap:5px !important;align-items:center !important;padding:5px 7px !important;border-radius:9px !important;background:rgba(255,255,255,.04) !important;border:1px solid rgba(201,164,91,.08) !important;}
.ui72-equip-row b{font-size:11px !important;color:#f5df9f !important;white-space:nowrap !important;}
.ui72-equip-row span{font-size:11px !important;color:#e4d8bb !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;}
.ui72-equip-row em{font-size:10px !important;color:#b9ad91 !important;text-align:right !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;}
@media(max-width:1100px){
  body.dungeon-fullscreen .ui72-dungeon-run{grid-template-columns:1fr !important;grid-template-rows:34px minmax(0,1fr) 72px auto !important;grid-template-areas:"top" "display" "actions" "side" !important;overflow:auto !important;}
  .ui72-right-panel{grid-template-rows:auto auto auto !important;}
}



/* v0.4.73：NPC 右侧立绘修复 / 典当行去重排版修复 */
.ui73-npc-shell{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(320px,390px) !important;
  gap:22px !important;
  align-items:start !important;
  min-height:calc(100dvh - 56px);
}
.ui73-npc-main{
  min-width:0 !important;
  display:block !important;
}
.ui73-npc-main > .town-shop-layout,
.ui73-npc-main > .premium-town-layout{
  display:block !important;
  min-height:0 !important;
}
.ui73-npc-main .npc-panel,
.ui73-npc-main .premium-npc-panel,
.ui73-npc-main .npc-portrait,
.ui73-npc-main .npc-dialogue,
.ui73-npc-main .npc-nameplate{
  display:none !important;
}
.ui73-npc-main .shop-main-panel{
  display:block !important;
  width:100% !important;
  min-height:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  overflow:visible !important;
}
.ui73-npc-main .shop-main-scroll{
  overflow:visible !important;
  max-height:none !important;
}
.ui73-npc-aside{
  position:sticky !important;
  top:18px !important;
  display:grid !important;
  grid-template-rows:minmax(360px, 52dvh) auto !important;
  gap:16px !important;
  min-width:0 !important;
  max-height:calc(100dvh - 48px);
  overflow:hidden !important;
  border:1px solid rgba(201,164,91,.24) !important;
  border-radius:28px !important;
  background:linear-gradient(180deg,rgba(18,16,13,.80),rgba(4,4,6,.92)) !important;
  box-shadow:0 24px 70px rgba(0,0,0,.38), inset 0 0 28px rgba(201,164,91,.04) !important;
  padding:16px !important;
}
.ui73-npc-portrait{
  position:relative !important;
  min-height:0 !important;
  height:100% !important;
  padding:0 !important;
  border:1px solid rgba(201,164,91,.18) !important;
  border-radius:22px !important;
  background:radial-gradient(circle at 50% 20%,rgba(201,164,91,.10),transparent 42%),rgba(0,0,0,.34) !important;
  overflow:hidden !important;
}
.ui73-npc-portrait img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  object-position:center top !important;
  filter:contrast(1.04) saturate(.88) brightness(.86);
}
.ui73-npc-portrait.is-broken::before{
  content:"立绘资源未读取";
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  color:#f2d88e;
  background:rgba(0,0,0,.55);
  font-size:18px;
}
.ui73-npc-name{
  position:absolute;
  left:0;right:0;bottom:0;
  padding:18px 16px 16px;
  text-align:center;
  background:linear-gradient(180deg,transparent,rgba(0,0,0,.78));
}
.ui73-npc-name b{
  display:block;
  color:#f4dd98;
  font-family:var(--font-ui), serif !important;
  font-size:28px;
  line-height:1.1;
  letter-spacing:.05em;
  text-shadow:0 2px 18px rgba(0,0,0,.85);
}
.ui73-npc-name span{
  display:block;
  margin-top:6px;
  color:#d8c7a5;
  font-family:var(--font-cn), "Microsoft YaHei", sans-serif !important;
  font-size:14px;
}
.ui73-npc-dialog{
  border:1px solid rgba(201,164,91,.18) !important;
  border-radius:22px !important;
  padding:20px !important;
  min-height:0 !important;
  background:rgba(0,0,0,.30) !important;
}
.ui73-npc-dialog h3{
  margin:0 0 12px !important;
  color:#f4dd98 !important;
  font-family:var(--font-cn), "Microsoft YaHei", sans-serif !important;
  font-size:24px !important;
}
.ui73-npc-dialog p{
  margin:8px 0 0 !important;
  color:#eadbb7 !important;
  font-family:var(--font-cn), "Microsoft YaHei", sans-serif !important;
  line-height:1.75 !important;
  font-size:16px !important;
}
.ui73-npc-dialog b{
  color:#f4dd98 !important;
  font-family:var(--font-ui), serif !important;
  font-size:20px !important;
  letter-spacing:.02em;
}
/* 典当行内容区压缩成正常商品/规则区，不再给旧立绘留双栏。 */
#pawnshop .ui73-npc-main .grid.three,
#pawnshop .ui73-npc-main .grid.two,
#forge .ui73-npc-main .grid.three,
#forge .ui73-npc-main .grid.two,
#potionworkshop .ui73-npc-main .grid.three,
#potionworkshop .ui73-npc-main .grid.two{
  min-width:0 !important;
}
@media(max-width:1120px){
  .ui73-npc-shell{
    grid-template-columns:1fr !important;
  }
  .ui73-npc-aside{
    position:relative !important;
    top:0 !important;
    grid-template-rows:360px auto !important;
    max-height:none !important;
  }
}



/* v0.4.74：按标注图重排地下城运行页；右侧角色/药物/装备固定，显示屏与按钮归位。 */
body.dungeon-fullscreen .ui72-dungeon-run{
  grid-template-columns:minmax(0,1fr) 260px !important;
  grid-template-rows:38px minmax(0,1fr) 76px !important;
  grid-template-areas:"top side" "display side" "actions side" !important;
  gap:6px !important;
}
.ui72-toolbar{
  height:38px !important;
  padding:3px 4px !important;
}
.ui72-toolbar-buttons{
  justify-content:flex-start !important;
  gap:8px !important;
}
.ui72-toolbar button{
  height:30px !important;
  min-height:30px !important;
  border-radius:11px !important;
  font-size:12px !important;
}
.ui72-floor-button{width:38px !important;min-width:38px !important;max-width:38px !important;font-size:11px !important;}
.ui72-bag-button{width:154px !important;}
.ui72-crystal-button{width:148px !important;}
.ui72-pause-button{width:126px !important;}
.ui72-exit-button{width:126px !important;}
.ui72-display{
  padding:10px 12px !important;
  border-radius:18px !important;
  grid-template-rows:auto minmax(0,1fr) !important;
}
.ui72-display-strip{
  height:auto !important;
  min-height:28px !important;
  margin:0 0 8px !important;
  align-items:center !important;
}
.ui72-display-strip span,
.ui72-display-strip em,
.ui72-display-strip b,
.ui72-display-strip i{
  height:24px !important;
  font-size:12px !important;
  max-width:260px !important;
}
.ui72-display-body{
  grid-template-rows:minmax(0,1fr) 78px !important;
}
.ui72-scene-scroll{
  padding:0 4px 0 0 !important;
}
.ui72-actions{
  padding:8px !important;
  border-radius:16px !important;
}
.ui72-action-list .battle-actions,
.ui72-action-list .command-buttons,
.ui72-action-list .v450-action-layout,
.ui72-action-list .v452-action-bar,
.ui72-action-list .v453-action-bar{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:8px !important;
}
.ui72-action-list button{
  min-height:34px !important;
  font-size:13px !important;
}
/* 关键：覆盖旧 ui63-role-card 的 grid-area:role，防止角色状态跑到右栏底部或创建隐式网格。 */
.ui72-right-panel{
  display:grid !important;
  grid-template-rows:160px 154px minmax(0,1fr) !important;
  gap:7px !important;
  align-content:start !important;
}
.ui72-right-panel > *{
  grid-area:auto !important;
  position:relative !important;
  min-width:0 !important;
}
.ui72-role-card{
  grid-area:auto !important;
  padding:10px !important;
}
.ui72-role-title{
  margin-bottom:8px !important;
  padding-bottom:7px !important;
}
.ui72-role-title b{font-size:20px !important;}
.ui72-role-title span{font-size:12px !important;}
.ui72-resource-list .resource-line{
  grid-template-columns:32px minmax(0,1fr) 82px !important;
  margin:5px 0 !important;
}
.ui72-resource-list .resource-bar{height:10px !important;}
.ui72-mini-stats{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:5px !important;
}
.ui72-mini-stats span{
  font-size:11px !important;
  padding:5px 6px !important;
}
.ui72-potion-card{
  grid-area:auto !important;
  padding:9px !important;
}
.ui72-potion-list{
  display:grid !important;
  grid-template-rows:repeat(3,minmax(34px,1fr)) !important;
  gap:7px !important;
}
.ui72-potion{
  min-height:34px !important;
  font-size:12px !important;
  padding:7px 9px !important;
}
.ui72-empty{
  min-height:100% !important;
  font-size:12px !important;
}
.ui72-equip-card{
  grid-area:auto !important;
  padding:9px !important;
}
.ui72-equip-list{
  gap:6px !important;
}
.ui72-equip-row{
  grid-template-columns:44px minmax(0,1fr) 34px !important;
  min-height:25px !important;
  padding:5px 7px !important;
}
.ui72-equip-row b,
.ui72-equip-row span{font-size:11px !important;}
.ui72-equip-row em{font-size:9px !important;}
/* 右侧所有文字紧凑，不再横向撑出画面。 */
.ui72-right-panel .ui63-card,
.ui72-right-panel section{
  max-width:100% !important;
  overflow:hidden !important;
}
@media(max-width:1200px){
  body.dungeon-fullscreen .ui72-dungeon-run{grid-template-columns:minmax(0,1fr) 240px !important;}
  .ui72-bag-button{width:134px !important;}
  .ui72-crystal-button{width:130px !important;}
  .ui72-pause-button,.ui72-exit-button{width:112px !important;}
}
/* v0.4.74：典当行黑匣置顶、搜索、可售卖收纳。 */
.ui74-pawn-shell{
  grid-template-columns:minmax(0,1fr) minmax(310px,370px) !important;
}
.ui74-pawn-main{
  display:grid !important;
  gap:16px !important;
  align-content:start !important;
}
.ui74-pawn-head{
  display:flex !important;
  justify-content:space-between !important;
  align-items:flex-start !important;
  gap:16px !important;
  padding:18px 20px !important;
  border:1px solid rgba(201,164,91,.18) !important;
  border-radius:22px !important;
  background:linear-gradient(180deg,rgba(20,18,14,.78),rgba(3,4,6,.90)) !important;
}
.ui74-pawn-head h2{
  margin:0 !important;
  color:#f3dc94 !important;
  font-size:30px !important;
}
.ui74-pawn-head p{
  margin:8px 0 0 !important;
  color:#b9ad91 !important;
}
.ui74-pawn-head span{
  padding:7px 12px !important;
  border:1px solid rgba(201,164,91,.28) !important;
  border-radius:999px !important;
  color:#f3dc94 !important;
}
.ui74-pawn-stats{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:10px !important;
}
.ui74-pawn-stats>div{
  padding:14px !important;
  border:1px solid rgba(201,164,91,.14) !important;
  border-radius:16px !important;
  background:rgba(255,255,255,.035) !important;
}
.ui74-pawn-stats b{
  display:block !important;
  color:#f3dc94 !important;
  font-size:20px !important;
}
.ui74-pawn-stats span{
  display:block !important;
  margin-top:5px !important;
  color:#b9ad91 !important;
  font-size:13px !important;
}
.ui74-pawn-tools{
  display:grid !important;
  grid-template-columns:minmax(260px,1fr) auto !important;
  gap:12px !important;
  align-items:center !important;
}
.ui74-pawn-tools input{
  width:100% !important;
  min-height:42px !important;
  border:1px solid rgba(201,164,91,.20) !important;
  border-radius:14px !important;
  background:rgba(0,0,0,.30) !important;
  color:#f2e4c7 !important;
  padding:0 14px !important;
  font-size:15px !important;
}
.ui74-pawn-fold{
  border:1px solid rgba(201,164,91,.18) !important;
  border-radius:22px !important;
  background:linear-gradient(180deg,rgba(20,18,14,.72),rgba(3,4,6,.88)) !important;
  overflow:hidden !important;
}
.ui74-pawn-fold summary{
  cursor:pointer !important;
  list-style:none !important;
  display:flex !important;
  justify-content:space-between !important;
  align-items:center !important;
  padding:16px 18px !important;
  color:#f3dc94 !important;
  font-size:22px !important;
  font-weight:900 !important;
  border-bottom:1px solid rgba(201,164,91,.12) !important;
}
.ui74-pawn-fold summary::-webkit-details-marker{display:none !important;}
.ui74-pawn-fold summary em{
  font-style:normal !important;
  font-size:14px !important;
  color:#b9ad91 !important;
}
.ui74-pawn-fold:not([open]) summary{
  border-bottom:0 !important;
}
.ui74-pawn-list{
  display:grid !important;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr)) !important;
  gap:12px !important;
  padding:14px !important;
}
.ui74-pawn-section{
  border:1px solid rgba(201,164,91,.18) !important;
  border-radius:22px !important;
  background:linear-gradient(180deg,rgba(20,18,14,.72),rgba(3,4,6,.88)) !important;
  padding:16px !important;
}
.ui74-pawn-section .shop-subtitle{
  margin:0 0 12px !important;
}
.ui74-pawn-main .pawn-rare-section{
  order:-10 !important;
  margin:0 !important;
}
.ui74-pawn-main .rare-grid,
.ui74-pawn-main .shop-card-grid.rare-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr)) !important;
  gap:12px !important;
}
@media(max-width:1120px){
  .ui74-pawn-shell{grid-template-columns:1fr !important;}
  .ui74-pawn-tools{grid-template-columns:1fr !important;}
}


/* v0.4.80：clean UI core。只保留一个地下城/城镇 UI 控制器，按钮不再依赖后置硬修。 */
body.ui80-booting .app-shell,
body.ui80-booting .view,
body.ui80-booting button,
body.ui80-booting input,
body.ui80-booting select,
body.ui80-booting textarea{pointer-events:none!important;}
body.ui80-booting .ui64-startup-loader,
body.ui80-booting .ui64-startup-loader *{pointer-events:auto!important;}
.ui72-dungeon-run button,
.ui63-modal button,
.ui74-pawn-shell button,
.ui74-pawn-shell input,
.ui63-npc-shell button{pointer-events:auto;cursor:pointer;}
.ui72-scene-scroll,
.ui72-scene-scroll .dungeon-event-box,
.ui72-scene-scroll .dungeon-screen-intro,
.ui72-scene-scroll .dungeon-action-result{width:100%;max-width:none;}
.ui72-scene-scroll{font-size:18px;line-height:2.02;color:#f2e7c8;padding:12px 16px;}
.ui72-scene-scroll p,
.ui72-scene-scroll .event-text,
.ui72-scene-scroll .typewriter-text,
.ui72-scene-scroll .dungeon-action-result p,
.ui72-scene-scroll .dungeon-screen-intro p{width:100%;max-width:none;white-space:normal;overflow-wrap:break-word;word-break:normal;}
.ui80-clean-note{display:none!important;}



/* v0.4.81：快捷药物严格过滤，出战技能在地下城右栏与战斗按钮中显示。 */
.ui72-skill-card{min-height:0 !important;}
.ui72-side-title{font-weight:800;color:#ffe8a8;margin-bottom:8px;font-size:14px;letter-spacing:.05em;}
.ui72-skill-list{display:grid;gap:6px;}
.ui72-skill-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;padding:7px 9px;border:1px solid rgba(201,164,91,.18);border-radius:10px;background:rgba(255,255,255,.035);}
.ui72-skill-row b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#ffe7aa;}
.ui72-skill-row em{font-style:normal;font-size:11px;color:#cdbf9d;white-space:nowrap;}
.v046-action-grid .v046-skill-button{min-width:160px;}
@media (max-width:900px){.ui72-skill-row{grid-template-columns:1fr}.ui72-skill-row em{white-space:normal}.v046-action-grid .v046-skill-button{min-width:0}}


/* v0.4.82：战斗右侧栏恢复 + 角色卡显示升级所需经验。 */
#dungeon.v046-dungeon-battle aside.ui72-right-panel,
#dungeon.v046-dungeon-battle .ui72-right-panel,
body.dungeon-fullscreen #dungeon.v046-dungeon-battle aside.ui72-right-panel,
body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-right-panel{
  display:grid !important;
  visibility:visible !important;
  opacity:1 !important;
  grid-area:side !important;
  position:relative !important;
  z-index:30 !important;
  height:100% !important;
  max-height:100% !important;
  min-height:0 !important;
  overflow:hidden !important;
  grid-template-rows:minmax(184px,auto) 98px 132px minmax(0,1fr) !important;
  gap:7px !important;
}
body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-dungeon-run,
body.dungeon-fullscreen .ui72-dungeon-run{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(280px,330px) !important;
  grid-template-rows:38px minmax(0,1fr) 76px !important;
  grid-template-areas:"top side" "display side" "actions side" !important;
  overflow:hidden !important;
}
#dungeon.v046-dungeon-battle .ui72-right-panel.v046-no-inner-scroll,
#dungeon.v046-dungeon-battle aside.ui72-right-panel.v046-no-inner-scroll{
  height:100% !important;
  max-height:100% !important;
  overflow:hidden !important;
}
.ui72-right-panel .ui72-role-card,
.ui72-right-panel .ui72-potion-card,
.ui72-right-panel .ui72-skill-card,
.ui72-right-panel .ui72-equip-card{
  display:block !important;
  min-height:0 !important;
  max-width:100% !important;
  overflow:hidden !important;
}
.ui72-role-card .ui72-resource-list .resource-line.ui82-exp-line{
  margin-top:6px !important;
}
.ui72-resource-list .resource-bar.exp{
  height:10px !important;
  border-radius:999px !important;
  overflow:hidden !important;
  background:rgba(255,255,255,.08) !important;
  border:1px solid rgba(255,255,255,.10) !important;
}
.ui72-resource-list .resource-bar.exp span{
  display:block !important;
  height:100% !important;
  border-radius:999px !important;
  background:linear-gradient(90deg,#f2c764,#fff0aa) !important;
}
.ui82-exp-left{
  margin:5px 0 6px !important;
  padding:4px 7px !important;
  border:1px solid rgba(201,164,91,.13) !important;
  border-radius:9px !important;
  background:rgba(201,164,91,.06) !important;
  color:#d8caa8 !important;
  font-size:11px !important;
  line-height:1.2 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.ui82-exp-left b{color:#ffe8a8 !important;}
.ui72-skill-card{padding:8px !important;}
.ui72-skill-list{
  height:calc(100% - 24px) !important;
  overflow:auto !important;
  scrollbar-gutter:stable !important;
}
#dungeon.v046-dungeon-battle .ui72-display,
body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-display{
  grid-area:display !important;
  min-width:0 !important;
}
@media(max-width:1180px){
  body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-dungeon-run,
  body.dungeon-fullscreen .ui72-dungeon-run{
    grid-template-columns:minmax(0,1fr) 270px !important;
  }
  #dungeon.v046-dungeon-battle .ui72-right-panel,
  #dungeon.v046-dungeon-battle aside.ui72-right-panel{
    grid-template-rows:minmax(184px,auto) 86px 120px minmax(0,1fr) !important;
  }
}
@media(max-width:900px){
  body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-dungeon-run,
  body.dungeon-fullscreen .ui72-dungeon-run{
    grid-template-columns:1fr !important;
    grid-template-rows:38px minmax(0,1fr) 76px auto !important;
    grid-template-areas:"top" "display" "actions" "side" !important;
    overflow:auto !important;
  }
  #dungeon.v046-dungeon-battle aside.ui72-right-panel,
  #dungeon.v046-dungeon-battle .ui72-right-panel{
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
    grid-template-rows:auto auto auto auto !important;
  }
}


/* v0.4.83：右侧栏完整显示、技能简化、目标选择和敌方意图恢复。 */
body.dungeon-fullscreen .ui72-dungeon-run,
body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-dungeon-run{
  grid-template-columns:minmax(0,1fr) minmax(310px,340px) !important;
  grid-template-rows:38px minmax(0,1fr) 82px !important;
}
#dungeon.v046-dungeon-battle aside.ui72-right-panel,
#dungeon.v046-dungeon-battle .ui72-right-panel,
body.dungeon-fullscreen #dungeon.v046-dungeon-battle aside.ui72-right-panel,
body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-right-panel,
body.dungeon-fullscreen .ui72-right-panel{
  grid-template-rows:174px 64px 74px minmax(0,1fr) !important;
  gap:6px !important;
  overflow:hidden !important;
}
.ui72-role-card{padding:7px !important;}
.ui72-role-title{padding-bottom:4px !important;margin-bottom:4px !important;}
.ui72-role-title b{font-size:17px !important;}
.ui72-resource-list .resource-line{grid-template-columns:30px minmax(0,1fr) 78px !important;gap:5px !important;margin:3px 0 !important;}
.ui72-resource-list .resource-line b{font-size:11px !important;}
.ui72-resource-list .resource-line em{font-size:11px !important;}
.ui72-resource-list .resource-bar{height:8px !important;}
.ui82-exp-left{font-size:10px !important;line-height:1 !important;padding:3px 6px !important;margin:3px 0 !important;}
.ui72-mini-stats{gap:3px !important;margin-top:3px !important;}
.ui72-mini-stats span{font-size:10px !important;padding:3px 5px !important;}
.ui72-side-title{font-size:12px !important;margin-bottom:5px !important;}
.ui72-potion-card{padding:6px !important;}
.ui72-skill-card{padding:6px !important;}
.ui72-skill-list{height:calc(100% - 20px) !important;overflow:hidden !important;display:flex !important;flex-wrap:wrap !important;gap:4px !important;align-content:flex-start !important;}
.ui83-skill-chip{display:inline-flex !important;align-items:center !important;gap:4px !important;max-width:100% !important;padding:4px 6px !important;border-radius:999px !important;border:1px solid rgba(201,164,91,.18) !important;background:rgba(255,255,255,.04) !important;color:#ffe7aa !important;font-size:11px !important;line-height:1 !important;}
.ui83-skill-chip b{max-width:98px !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;}
.ui83-skill-chip em{font-style:normal !important;color:#cdbf9d !important;font-size:10px !important;white-space:nowrap !important;}
.ui83-skill-chip.passive{opacity:.82 !important;}
.ui83-target-card{cursor:pointer !important;transition:border-color .12s, box-shadow .12s, transform .12s !important;}
.ui83-target-card:hover{border-color:rgba(255,229,150,.62) !important;box-shadow:0 0 0 1px rgba(255,229,150,.16),0 0 18px rgba(201,164,91,.18) !important;}
.ui83-target-card.selected-target{border-color:rgba(255,229,150,.95) !important;box-shadow:0 0 0 2px rgba(255,229,150,.28),0 0 24px rgba(201,164,91,.24) !important;}
.ui83-intent-row{display:flex !important;align-items:center !important;gap:5px !important;margin-top:5px !important;min-height:20px !important;}
.ui83-intent-chip{display:inline-flex !important;align-items:center !important;max-width:100% !important;padding:3px 7px !important;border-radius:999px !important;border:1px solid rgba(201,164,91,.22) !important;background:rgba(201,164,91,.08) !important;color:#f5df9f !important;font-size:11px !important;white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;}
.ui83-intent-chip.danger-高{border-color:rgba(255,94,94,.48) !important;color:#ffb0a6 !important;background:rgba(255,72,72,.10) !important;}
.ui83-intent-chip.danger-中{border-color:rgba(255,190,83,.45) !important;color:#ffd89b !important;background:rgba(255,180,70,.10) !important;}
.ui83-intent-chip.danger-低{border-color:rgba(145,209,132,.36) !important;color:#c9e9bf !important;background:rgba(86,160,75,.09) !important;}
.ui83-intent-chip.defeated{opacity:.7;color:#9c947f !important;}
.ui83-battle-buttons{display:grid !important;grid-template-columns:repeat(4,minmax(0,1fr)) !important;gap:6px !important;width:100% !important;align-content:start !important;}
.ui83-battle-buttons button{min-width:0 !important;min-height:32px !important;height:auto !important;padding:6px 8px !important;font-size:12px !important;line-height:1.05 !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;}
.ui83-battle-buttons button em{font-style:normal !important;color:#d8caa8 !important;font-size:10px !important;margin-left:4px !important;}
.ui83-cast-skill.is-cooling{opacity:.56 !important;}
@media(max-width:1180px){
  body.dungeon-fullscreen .ui72-dungeon-run,
  body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-dungeon-run{grid-template-columns:minmax(0,1fr) 300px !important;}
  .ui83-battle-buttons{grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
}
@media(max-width:900px){
  #dungeon.v046-dungeon-battle aside.ui72-right-panel,
  #dungeon.v046-dungeon-battle .ui72-right-panel,
  body.dungeon-fullscreen .ui72-right-panel{grid-template-rows:auto auto auto auto !important;}
}


/* v0.4.84：右侧栏紧凑显示 / 敌方目标与意图可点可见 / 字体最终校验。 */
body,
.ui63-view,
.ui72-dungeon-run,
.ui72-right-panel,
.ui72-display,
.ui72-actions{font-family:var(--font-cn) !important;}
.boss-name-splash,
.latin-text,
.ui72-toolbar button{font-family:var(--font-ui) !important;}
.boss-quote-text,
.boss-dialogue-box,
.ui72-scene-scroll .event-text{font-family:var(--font-dialogue) !important;}
body.dungeon-fullscreen .ui72-right-panel,
#dungeon.v046-dungeon-battle .ui72-right-panel,
#dungeon.v046-dungeon-battle aside.ui72-right-panel{
  display:grid !important;
  grid-template-rows:auto auto auto auto !important;
  align-content:start !important;
  align-self:start !important;
  gap:6px !important;
  height:auto !important;
  max-height:calc(100dvh - 12px) !important;
  overflow:auto !important;
  scrollbar-gutter:stable !important;
}
.ui72-role-card{min-height:0 !important;max-height:none !important;}
.ui72-role-title{margin-bottom:4px !important;padding-bottom:4px !important;}
.ui72-resource-list .resource-line{margin:3px 0 !important;grid-template-columns:30px minmax(0,1fr) 82px !important;}
.ui82-exp-left{margin:3px 0 4px !important;}
.ui72-potion-card{min-height:58px !important;}
.ui72-skill-card{min-height:52px !important;}
.ui72-equip-card{max-height:238px !important;overflow:hidden !important;}
.ui72-equip-list{max-height:204px !important;overflow:auto !important;}
.ui72-skill-list{height:auto !important;max-height:54px !important;overflow:auto !important;display:flex !important;flex-wrap:wrap !important;gap:4px !important;align-content:flex-start !important;}
.ui83-skill-chip{padding:3px 6px !important;font-size:10px !important;}
.ui83-skill-chip b{max-width:92px !important;}
.ui83-skill-chip em{font-size:9px !important;}
.ui72-enemy-cards,
.ui83-target-card,
.battle-opponent-card[data-target-enemy],
.battle-opponent-card[data-enemy-index]{pointer-events:auto !important;cursor:pointer !important;}
.ui83-target-card{position:relative !important;z-index:4 !important;}
.ui83-target-card.selected-target::after{content:'当前目标';position:absolute;right:10px;top:9px;border:1px solid rgba(255,229,150,.48);border-radius:999px;padding:3px 7px;background:rgba(0,0,0,.32);color:#ffe59a;font-size:10px;}
.ui83-intent-row{display:flex !important;visibility:visible !important;opacity:1 !important;min-height:19px !important;}
.ui83-intent-chip{display:inline-flex !important;visibility:visible !important;opacity:1 !important;}
.ui84-db-check{display:none !important;}



/* v0.4.94：目标选择稳定、敌方意图分级显示、图鉴补全、死亡仅允许离开地下城。 */
.ui83-target-card{
  appearance:none;
  text-align:left;
  color:inherit;
  font:inherit;
  width:100%;
  cursor:pointer;
}
.ui83-target-card:not(:disabled):hover{
  border-color:rgba(244,211,136,.72) !important;
  filter:brightness(1.08);
}
.ui83-target-card.selected-target{
  box-shadow:0 0 0 2px rgba(244,211,136,.55),0 0 24px rgba(244,211,136,.18) inset !important;
}
.ui83-intent-chip{
  display:inline-flex;
  align-items:center;
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ui83-battle-buttons.death-only{
  grid-template-columns: minmax(240px, 420px) !important;
}
.ui85-codex-shell{padding:24px;}
.ui85-codex-tabs{margin:16px 0 20px;}
.ui85-codex-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:16px;}
.ui85-codex-card{border:1px solid rgba(201,164,91,.24);border-radius:18px;background:rgba(7,6,4,.72);padding:16px;box-shadow:inset 0 0 28px rgba(255,214,128,.035);}
.ui85-codex-card h3{margin:0 0 8px;color:var(--gold,#f4d388);font-size:22px;}
.ui85-codex-card p{margin:6px 0;line-height:1.72;color:rgba(244,232,202,.88);}
.ui85-codex-img{height:150px;border-radius:14px;overflow:hidden;background:rgba(255,255,255,.035);margin-bottom:12px;border:1px solid rgba(201,164,91,.15);}
.ui85-codex-img img{width:100%;height:100%;object-fit:cover;display:block;}


/* v0.4.94：地下王庭品牌、弹窗、图鉴详情与稳定布局 */
.brand{min-height:64px!important;align-items:center!important;}
.brand h1{white-space:nowrap!important;line-height:1.12!important;}
.brand p{min-height:18px!important;line-height:18px!important;white-space:nowrap!important;transition:none!important;animation:none!important;}
.brand-mark.brand-mark-image{overflow:hidden!important;padding:0!important;background:#080706!important;border:1px solid rgba(232,198,120,.48)!important;box-shadow:0 0 0 1px rgba(0,0,0,.8),0 0 30px rgba(221,169,85,.26)!important;}
.brand-mark.brand-mark-image img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;border-radius:inherit!important;}
.ui72-toolbar{min-height:48px!important;contain:layout paint!important;}
.ui72-toolbar-buttons{min-height:42px!important;align-items:center!important;}
.ui72-toolbar button{min-height:36px!important;white-space:nowrap!important;}
.ui86-town-bag-panel{width:min(1120px,92vw)!important;max-height:88vh!important;overflow:auto!important;}
.ui86-level-modal{position:fixed!important;inset:0!important;z-index:1000001!important;display:grid!important;place-items:center!important;}
.ui86-level-panel{position:relative!important;width:min(760px,92vw)!important;max-height:88vh!important;overflow:auto!important;border:1px solid rgba(226,190,114,.45)!important;border-radius:24px!important;background:linear-gradient(180deg,rgba(22,18,13,.96),rgba(3,3,4,.98))!important;box-shadow:0 28px 120px rgba(0,0,0,.72),inset 0 0 32px rgba(226,190,114,.06)!important;padding:24px!important;color:#f4e5bd!important;}
.ui86-level-panel header{display:flex!important;justify-content:space-between!important;gap:16px!important;align-items:flex-start!important;border-bottom:1px solid rgba(226,190,114,.18)!important;padding-bottom:14px!important;margin-bottom:16px!important;}
.ui86-level-panel h2{margin:0 0 8px!important;font-size:28px!important;}
.ui86-level-grid{display:grid!important;grid-template-columns:repeat(5,minmax(110px,1fr))!important;gap:12px!important;}
.ui86-level-attr{border:1px solid rgba(226,190,114,.35)!important;border-radius:16px!important;background:rgba(255,255,255,.035)!important;color:#f4e5bd!important;padding:14px!important;text-align:left!important;cursor:pointer!important;}
.ui86-level-attr b,.ui86-level-attr span{display:block!important;}
.ui86-level-attr span{margin-top:6px!important;color:#b9b0a0!important;font-size:13px!important;}
.ui86-level-note{color:#b9b0a0!important;margin:16px 0 0!important;}
.ui86-codex-card{cursor:pointer!important;text-align:left!important;border:1px solid rgba(226,190,114,.28)!important;background:linear-gradient(180deg,rgba(21,18,14,.78),rgba(4,4,5,.9))!important;color:#f4e5bd!important;border-radius:18px!important;padding:12px!important;display:grid!important;grid-template-columns:150px 1fr!important;gap:14px!important;align-items:center!important;}
.ui86-codex-card h3{margin:0 0 6px!important;font-size:22px!important;}
.ui86-codex-card p{margin:0!important;color:#c8bd9f!important;}
.ui86-codex-thumb{height:96px!important;border-radius:14px!important;overflow:hidden!important;background:rgba(255,255,255,.035)!important;display:grid!important;place-items:center!important;color:#9d937d!important;border:1px solid rgba(226,190,114,.14)!important;}
.ui86-codex-thumb img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important;}
.ui86-codex-detail-modal{position:fixed!important;inset:0!important;z-index:1000000!important;display:grid!important;place-items:center!important;}
.ui86-codex-detail-panel{position:relative!important;width:min(980px,92vw)!important;max-height:88vh!important;overflow:auto!important;border:1px solid rgba(226,190,114,.42)!important;border-radius:24px!important;background:linear-gradient(180deg,rgba(16,13,10,.96),rgba(2,2,3,.98))!important;color:#f4e5bd!important;box-shadow:0 30px 130px rgba(0,0,0,.74)!important;padding:24px!important;}
.ui86-codex-close{position:sticky!important;top:0!important;float:right!important;z-index:2!important;}
.ui86-detail-body h2{font-size:32px!important;margin:0 0 12px!important;}
.ui86-detail-body section{border:1px solid rgba(226,190,114,.18)!important;border-radius:16px!important;padding:14px!important;margin:12px 0!important;background:rgba(255,255,255,.025)!important;}
.ui86-detail-phase{margin:12px 0!important;border-radius:16px!important;overflow:hidden!important;border:1px solid rgba(226,190,114,.18)!important;background:rgba(255,255,255,.025)!important;}
.ui86-detail-phase b{display:block!important;padding:10px 14px!important;}
.ui86-detail-phase img{display:block!important;width:100%!important;max-height:360px!important;object-fit:cover!important;object-position:center!important;}
.ui86-codex-inline .codex-entry{border:none!important;padding:0!important;background:transparent!important;}
@media (max-width:900px){.ui86-level-grid{grid-template-columns:1fr 1fr!important}.ui86-codex-card{grid-template-columns:1fr!important}.ui86-codex-thumb{height:150px!important}}


/* v0.4.94：品牌栏静态化 + 契约绑定面板强化 */
.brand{min-height:64px!important;contain:layout style!important;}
.brand h1{white-space:nowrap!important;letter-spacing:.08em!important;}
.brand p,
.brand p[data-stable-brand]{position:relative!important;display:block!important;min-width:82px!important;width:82px!important;height:18px!important;line-height:18px!important;overflow:hidden!important;color:transparent!important;font-size:0!important;white-space:nowrap!important;animation:none!important;transition:none!important;}
.brand p::after,
.brand p[data-stable-brand]::after{content:'正式探索'!important;position:absolute!important;left:0!important;top:0!important;color:var(--muted)!important;font-size:13px!important;line-height:18px!important;white-space:nowrap!important;letter-spacing:.04em!important;}
.v487-contract-panel{margin:0 0 18px!important;border:1px solid rgba(217,183,106,.38)!important;background:linear-gradient(135deg,rgba(35,25,14,.82),rgba(8,7,6,.88))!important;box-shadow:0 0 24px rgba(181,130,54,.12)!important;}
.v487-contract-summary{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0 14px!important;}
.v487-contract-summary span{border:1px solid rgba(217,183,106,.24);border-radius:999px;padding:6px 10px;background:rgba(0,0,0,.26);color:var(--text)}
.v487-contract-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;}
.v487-contract-modal{position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.68);backdrop-filter:blur(4px);}
.v487-contract-dialog{width:min(1040px,92vw);max-height:86vh;overflow:auto;border:1px solid rgba(240,211,145,.45);border-radius:22px;background:linear-gradient(145deg,rgba(18,15,10,.98),rgba(4,4,4,.97));padding:22px;box-shadow:0 20px 80px rgba(0,0,0,.72);}
.v487-equipment-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px;}
.v487-equipment-row{display:flex;justify-content:space-between;gap:12px;align-items:center;border:1px solid rgba(217,183,106,.25);border-radius:16px;padding:12px;background:rgba(255,255,255,.035);}
.v487-equipment-row.bound{border-color:rgba(109,214,161,.38);background:rgba(48,108,72,.12);}
.v487-equipment-row b{display:block;color:var(--gold);font-size:16px;margin-bottom:5px;}
.v487-equipment-row span{display:block;color:var(--muted);font-size:13px;line-height:1.45;}
.v487-death-note{margin-top:10px;color:#b9c4d7;font-size:13px;line-height:1.6;}
@media(max-width:900px){.v487-equipment-list{grid-template-columns:1fr}.brand p,.brand p[data-stable-brand]{width:78px!important;min-width:78px!important}}


/* v0.4.88：存档救援提示与稳定返回界面 */
.ui88-rescue-notice{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:999999;
  max-width:min(420px, calc(100vw - 32px));
  padding:14px 16px;
  border:1px solid rgba(248,211,132,.42);
  border-radius:18px;
  background:linear-gradient(135deg, rgba(18,12,7,.96), rgba(2,3,5,.94));
  box-shadow:0 18px 45px rgba(0,0,0,.55), inset 0 0 35px rgba(186,124,38,.12);
  color:var(--text, #f6e6bf);
  display:grid;
  grid-template-columns:1fr auto;
  gap:4px 12px;
  align-items:center;
}
.ui88-rescue-notice strong{font-size:17px;color:var(--gold-light,#ffe9a9);}
.ui88-rescue-notice span{grid-column:1/2;color:var(--muted,#c8b98f);line-height:1.55;}
.ui88-rescue-notice button{grid-row:1/3;grid-column:2/3;}
@media (max-width:720px){.ui88-rescue-notice{left:12px;right:12px;bottom:14px;grid-template-columns:1fr}.ui88-rescue-notice button{grid-row:auto;grid-column:auto;width:100%;}}


/* v0.4.91：启动加速与加载失败操作 */
.ui90-boot-actions{display:flex;gap:12px;justify-content:center;margin-top:18px;flex-wrap:wrap}
.ui90-boot-actions button{border:1px solid rgba(243,220,148,.55);background:rgba(0,0,0,.45);color:#f3dc94;border-radius:14px;padding:10px 18px;font-weight:800;cursor:pointer}
body.ui90-loader-fallback #home.view.active:empty::before{content:'正在恢复界面……如果页面长时间空白，请强制刷新一次。';display:block;margin:24px;padding:24px;border:1px solid rgba(201,164,91,.35);border-radius:18px;color:#f3dc94;background:rgba(0,0,0,.42)}


/* v0.4.91：启动错误前台面板与极速进入 */
.ui90-boot-actions{display:flex;gap:12px;justify-content:center;margin-top:18px;flex-wrap:wrap}
.ui90-boot-actions button{border:1px solid rgba(243,220,148,.55);border-radius:12px;background:rgba(24,18,10,.85);color:#f6df9a;padding:10px 16px;font-weight:800;cursor:pointer}
.ui90-boot-actions button:hover{filter:brightness(1.14)}
#front-error-panel button{font:inherit}
body.ui91-lite-mode .sidebar-note:after{content:'快速启动模式：完整图鉴/工坊数据会在后台补齐。';display:block;margin-top:6px;color:#d8c79d;font-size:12px}


/* v0.4.94：强制禁用旧版阻塞加载遮罩，避免旧 UI64/80 状态卡死。 */
body.ui64-loading-active, body.ui80-booting, body.u180-booting { overflow: auto !important; }
#ui64-startup-loader { display: none !important; pointer-events: none !important; visibility: hidden !important; }
body.ui94-safe-ready .app-shell { display: grid !important; pointer-events: auto !important; }
body.ui94-safe-ready .view.active { display: block !important; }


/* v0.4.95 safe entry: old loader can never block pointer or scrolling */
body.ui64-loading-active, body.ui80-booting, body.u180-booting { overflow: auto !important; }
#ui64-startup-loader { display: none !important; pointer-events: none !important; }
body.ui95-safe-ready .ui95-gate { display: block; }
body.ui95-ready .ui95-gate, body.ui95-force-home .ui95-gate { display: none !important; }


/* =========================================================
   v0.5.2 — 手机端专用操作层 + 电脑端布局完善
   ========================================================= */
.ui500-mobile-topbar,
.ui500-mobile-bottom,
.ui500-mobile-scrim,
.ui500-sidebar-close{display:none;}

@media (min-width:901px){
  body.ui500-shell{background-attachment:scroll;}
  body.ui500-shell .app-shell.dungeon-shell{
    width:100%;
    max-width:1920px;
    grid-template-columns:clamp(248px,17vw,300px) minmax(0,1fr);
    gap:clamp(14px,1.25vw,24px);
    padding:clamp(14px,1.4vw,26px);
  }
  body.ui500-shell .sidebar.dungeon-sidebar{
    border-radius:26px;
    padding:clamp(17px,1.3vw,25px);
    box-shadow:0 24px 70px rgba(0,0,0,.42),inset 0 0 50px rgba(219,175,91,.035);
  }
  body.ui500-shell .main.dungeon-main{
    padding:clamp(18px,1.7vw,32px);
    border-radius:28px;
    scrollbar-gutter:stable;
  }
  body.ui500-shell .main.dungeon-main>.view.active{
    width:100%;
    max-width:1640px;
    margin-inline:auto;
  }
  body.ui500-shell.dungeon-fullscreen .main.dungeon-main>.view.active{max-width:none;}
  body.ui500-shell .nav{gap:9px;}
  body.ui500-shell .nav button{min-height:54px;padding:12px 16px;border-radius:15px;}
  body.ui500-shell .ui63-card,
  body.ui500-shell .card{border-radius:20px;}
  body.ui500-shell .ui63-npc-shell{grid-template-columns:minmax(0,1fr) clamp(300px,23vw,380px);gap:22px;}
  body.ui500-shell .ui63-npc-portrait{height:clamp(360px,48vh,560px);}
  body.ui500-shell .ui63-modal-panel{width:min(1180px,calc(100vw - 72px));}
}

@media (min-width:901px) and (max-width:1200px){
  body.ui500-shell .app-shell.dungeon-shell{grid-template-columns:230px minmax(0,1fr)!important;}
  body.ui500-shell .sidebar.dungeon-sidebar{display:block!important;position:relative!important;height:calc(100dvh - 28px)!important;overflow:auto!important;}
  body.ui500-shell .main.dungeon-main{height:calc(100dvh - 28px)!important;overflow:auto!important;}
  body.ui500-shell .brand h1{font-size:24px;}
  body.ui500-shell .nav button{font-size:14px;padding-inline:12px;}
}

@media (max-width:900px){
  :root{--ui500-top:64px;--ui500-bottom:68px;}
  html{overflow-x:hidden;scroll-padding-top:calc(var(--ui500-top) + env(safe-area-inset-top));}
  body.ui500-shell{
    width:100%;
    min-width:0;
    min-height:100dvh;
    overflow-x:hidden!important;
    background-attachment:scroll;
    -webkit-tap-highlight-color:transparent;
    overscroll-behavior-y:none;
  }
  body.ui500-shell.ui500-menu-open{overflow:hidden!important;}

  .ui500-mobile-topbar{
    position:fixed;
    z-index:100020;
    inset:0 0 auto 0;
    min-height:calc(var(--ui500-top) + env(safe-area-inset-top));
    display:grid;
    grid-template-columns:48px minmax(0,1fr) 48px;
    align-items:end;
    gap:8px;
    padding:env(safe-area-inset-top) 10px 8px;
    border-bottom:1px solid rgba(226,190,114,.24);
    background:linear-gradient(180deg,rgba(18,15,11,.98),rgba(6,6,7,.96));
    box-shadow:0 8px 30px rgba(0,0,0,.48);
    backdrop-filter:blur(18px);
  }
  .ui500-mobile-icon{
    width:48px;
    height:48px;
    display:grid;
    place-items:center;
    border:1px solid rgba(226,190,114,.32);
    border-radius:15px;
    background:linear-gradient(180deg,rgba(76,57,29,.72),rgba(15,13,10,.92));
    color:#f7dfa0;
    font:900 19px/1 var(--font-cn,system-ui);
    box-shadow:inset 0 0 20px rgba(245,200,105,.05);
  }
  .ui500-mobile-brand{min-width:0;height:48px;display:flex;align-items:center;justify-content:center;gap:10px;}
  .ui500-mobile-brand img{width:38px;height:38px;flex:0 0 auto;object-fit:cover;border-radius:50%;border:1px solid rgba(232,198,120,.45);}
  .ui500-mobile-brand span{min-width:0;display:grid;line-height:1.12;}
  .ui500-mobile-brand b{color:#f8e2a8;font-size:18px;letter-spacing:.09em;white-space:nowrap;}
  .ui500-mobile-brand small{color:#9f9275;font-size:11px;margin-top:3px;letter-spacing:.12em;}

  .ui500-mobile-bottom{
    position:fixed;
    z-index:100020;
    inset:auto 0 0 0;
    min-height:calc(var(--ui500-bottom) + env(safe-area-inset-bottom));
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    align-items:start;
    gap:3px;
    padding:7px 6px env(safe-area-inset-bottom);
    border-top:1px solid rgba(226,190,114,.25);
    background:linear-gradient(0deg,rgba(9,8,7,.99),rgba(18,15,11,.97));
    box-shadow:0 -12px 36px rgba(0,0,0,.52);
    backdrop-filter:blur(18px);
  }
  .ui500-mobile-bottom button{
    min-width:0;
    min-height:54px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    padding:5px 2px;
    border:0;
    border-radius:13px;
    background:transparent;
    color:#aaa087;
    font:700 11px/1.1 var(--font-cn,system-ui);
  }
  .ui500-mobile-bottom button::before{font-size:20px;line-height:1;}
  .ui500-mobile-bottom button[data-view="home"]::before{content:'⌂';}
  .ui500-mobile-bottom button[data-view="profile"]::before{content:'♙';}
  .ui500-mobile-bottom button[data-view="dungeon"]::before{content:'♜';}
  .ui500-mobile-bottom button[data-view="codex"]::before{content:'◇';}
  .ui500-mobile-bottom button[data-mobile-menu]::before{content:'☰';}
  .ui500-mobile-bottom button.active,
  .ui500-mobile-bottom button[aria-current="page"]{
    color:#ffe6a1;
    background:linear-gradient(180deg,rgba(170,119,38,.26),rgba(94,61,16,.10));
    box-shadow:inset 0 0 0 1px rgba(232,190,105,.18);
  }

  .ui500-mobile-scrim{
    position:fixed;
    z-index:100028;
    inset:0;
    display:block;
    width:100%;
    height:100%;
    padding:0;
    border:0;
    border-radius:0;
    background:rgba(0,0,0,.72);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    backdrop-filter:blur(3px);
    transition:opacity .22s ease,visibility .22s ease;
  }
  body.ui500-menu-open .ui500-mobile-scrim{opacity:1;visibility:visible;pointer-events:auto;}

  body.ui500-shell .app-shell.dungeon-shell{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    height:auto!important;
    min-height:100dvh!important;
    overflow:visible!important;
    padding:0!important;
  }
  body.ui500-shell .sidebar.dungeon-sidebar{
    position:fixed!important;
    z-index:100030!important;
    inset:0 auto 0 0!important;
    width:min(86vw,350px)!important;
    height:100dvh!important;
    max-height:none!important;
    overflow:auto!important;
    overscroll-behavior:contain;
    padding:calc(18px + env(safe-area-inset-top)) 18px calc(22px + env(safe-area-inset-bottom))!important;
    border:0!important;
    border-right:1px solid rgba(226,190,114,.32)!important;
    border-radius:0 24px 24px 0!important;
    background:linear-gradient(150deg,rgba(24,20,14,.995),rgba(3,4,5,.995))!important;
    box-shadow:24px 0 70px rgba(0,0,0,.72)!important;
    transform:translate3d(-105%,0,0);
    visibility:hidden;
    transition:transform .24s ease,visibility .24s ease;
  }
  body.ui500-menu-open .sidebar.dungeon-sidebar{transform:translate3d(0,0,0);visibility:visible;}
  .ui500-sidebar-close{
    position:sticky;
    z-index:2;
    top:0;
    margin:0 0 12px auto;
    width:46px;
    height:46px;
    display:grid;
    place-items:center;
    border:1px solid rgba(226,190,114,.3);
    border-radius:14px;
    background:rgba(9,8,7,.9);
    color:#f5dc9b;
    font-size:25px;
  }
  body.ui500-shell .sidebar.dungeon-sidebar .brand{padding-right:54px;}
  body.ui500-shell .sidebar.dungeon-sidebar .nav{gap:8px;}
  body.ui500-shell .sidebar.dungeon-sidebar .nav button{min-height:50px;padding:12px 14px;border-radius:14px;}

  body.ui500-shell .main.dungeon-main{
    width:100%!important;
    height:auto!important;
    min-height:100dvh!important;
    max-height:none!important;
    overflow:visible!important;
    padding:calc(var(--ui500-top) + env(safe-area-inset-top) + 10px) 10px calc(var(--ui500-bottom) + env(safe-area-inset-bottom) + 14px)!important;
    border-radius:0!important;
  }
  body.ui500-shell .main.dungeon-main>.view.active{width:100%;min-width:0;margin:0!important;}
  body.ui500-shell .ui63-view{gap:12px;padding:0;}
  body.ui500-shell .ui63-card,
  body.ui500-shell .card{min-width:0;border-radius:17px;padding:14px;}
  body.ui500-shell h1{font-size:clamp(27px,8vw,38px);}
  body.ui500-shell h2{font-size:clamp(23px,6.6vw,31px);line-height:1.18;}
  body.ui500-shell h3{font-size:18px;line-height:1.25;}
  body.ui500-shell p{overflow-wrap:anywhere;}
  body.ui500-shell button,
  body.ui500-shell [role="button"],
  body.ui500-shell select,
  body.ui500-shell input{min-height:44px;touch-action:manipulation;}
  body.ui500-shell .battle-actions,
  body.ui500-shell .command-buttons,
  body.ui500-shell .ui63-control-grid{gap:9px;}
  body.ui500-shell .battle-actions>button,
  body.ui500-shell .command-buttons>button{min-height:48px;flex:1 1 138px;}

  body.ui500-shell .ui63-npc-shell,
  body.ui500-shell .ui73-npc-shell{display:flex!important;flex-direction:column!important;gap:12px!important;}
  body.ui500-shell .ui63-npc-main{order:2;width:100%;}
  body.ui500-shell .ui63-npc-aside{order:1;position:relative!important;top:auto!important;width:100%;display:grid;grid-template-columns:92px minmax(0,1fr);gap:12px;padding:11px;border-radius:18px;}
  body.ui500-shell .ui63-npc-portrait{height:112px!important;border-radius:14px;}
  body.ui500-shell .ui63-npc-dialog{margin:0!important;padding:10px!important;align-self:stretch;}
  body.ui500-shell .ui63-npc-dialog h3{font-size:18px;}
  body.ui500-shell .ui63-npc-dialog p{font-size:13px;line-height:1.5;margin:6px 0 0;}

  body.ui500-shell .ui63-modal{align-items:flex-end!important;padding-top:calc(30px + env(safe-area-inset-top));}
  body.ui500-shell .ui63-modal-panel,
  body.ui500-shell .ui86-town-bag-panel,
  body.ui500-shell .ui86-level-panel,
  body.ui500-shell .ui86-codex-detail-panel,
  body.ui500-shell .v487-contract-dialog{
    width:100%!important;
    max-width:none!important;
    max-height:calc(100dvh - 24px - env(safe-area-inset-top))!important;
    margin:0!important;
    padding:16px 13px calc(14px + env(safe-area-inset-bottom))!important;
    border-radius:24px 24px 0 0!important;
    overflow:auto!important;
  }
  body.ui500-shell .ui63-modal-head{position:sticky;z-index:4;top:-16px;background:rgba(13,11,9,.96);padding:12px 0;}
  body.ui500-shell .ui63-modal-head h2{font-size:24px!important;}
  body.ui500-shell .ui63-run-summary{grid-template-columns:repeat(2,minmax(0,1fr));}
  body.ui500-shell .ui63-run-row{grid-template-columns:1fr;}
  body.ui500-shell .ui63-run-row>button{width:100%;}
  body.ui500-shell .ui86-level-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  body.ui500-shell .ui86-codex-card{grid-template-columns:104px minmax(0,1fr)!important;padding:10px!important;}
  body.ui500-shell .ui86-codex-thumb{height:92px!important;}

  body.ui500-shell .game-hud-title,
  body.ui500-shell .prep-top-actions,
  body.ui500-shell .v462-prep-hero,
  body.ui500-shell .v462-panel-head{display:flex!important;flex-wrap:wrap;gap:10px;align-items:flex-start;}
  body.ui500-shell .v143-prep-layout,
  body.ui500-shell .v145-prep-layout,
  body.ui500-shell .prep-equipment-grid,
  body.ui500-shell .v145-equip-grid,
  body.ui500-shell .ui85-codex-grid{grid-template-columns:1fr!important;}
  body.ui500-shell .prep-equipment-strip{padding:13px;overflow:hidden;}
  body.ui500-shell .prep-equip-slot{min-width:0;}

  body.dungeon-fullscreen .ui500-mobile-topbar,
  body.dungeon-fullscreen .ui500-mobile-bottom,
  body.dungeon-fullscreen .ui500-mobile-scrim{display:none!important;}
  body.dungeon-fullscreen .main.dungeon-main{padding:0!important;height:100dvh!important;min-height:100dvh!important;overflow:hidden!important;}
  body.dungeon-fullscreen #dungeon.view.active{height:100dvh!important;overflow:hidden!important;}
  body.dungeon-fullscreen .ui72-dungeon-run,
  body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-dungeon-run{
    width:100%!important;
    height:100dvh!important;
    max-height:none!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto minmax(260px,1fr) auto auto!important;
    grid-template-areas:"top" "display" "side" "actions"!important;
    gap:8px!important;
    padding:8px 8px calc(8px + env(safe-area-inset-bottom))!important;
    overflow:auto!important;
    overscroll-behavior:contain;
  }
  body.dungeon-fullscreen .ui72-toolbar{grid-area:top;position:sticky;z-index:9;top:0;min-height:44px!important;padding:6px 9px!important;border-radius:14px!important;}
  body.dungeon-fullscreen .ui72-toolbar-buttons{overflow-x:auto;flex-wrap:nowrap!important;scrollbar-width:none;}
  body.dungeon-fullscreen .ui72-toolbar-buttons::-webkit-scrollbar{display:none;}
  body.dungeon-fullscreen .ui72-toolbar button{min-height:40px!important;flex:0 0 auto;}
  body.dungeon-fullscreen .ui72-display{grid-area:display;min-height:260px!important;border-radius:18px!important;}
  body.dungeon-fullscreen .ui72-right-panel,
  body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-right-panel{
    grid-area:side!important;
    width:100%!important;
    min-width:0!important;
    max-height:none!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-template-rows:auto!important;
    gap:7px!important;
    overflow:visible!important;
  }
  body.dungeon-fullscreen .ui72-right-panel .ui72-role-card,
  body.dungeon-fullscreen .ui72-right-panel .ui72-potion-card,
  body.dungeon-fullscreen .ui72-right-panel .ui72-skill-card{min-width:0!important;padding:9px!important;border-radius:14px!important;}
  body.dungeon-fullscreen .ui72-right-panel .ui72-equip-card{display:none!important;}
  body.dungeon-fullscreen .ui72-actions{
    grid-area:actions!important;
    position:sticky!important;
    z-index:12!important;
    bottom:0!important;
    width:100%!important;
    min-height:0!important;
    padding:8px!important;
    border-radius:17px!important;
    background:linear-gradient(180deg,rgba(23,18,12,.97),rgba(5,5,6,.995))!important;
    box-shadow:0 -12px 30px rgba(0,0,0,.52)!important;
  }
  body.dungeon-fullscreen .ui72-action-list,
  body.dungeon-fullscreen .ui83-battle-buttons{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;}
  body.dungeon-fullscreen .ui72-actions button{width:100%!important;min-height:50px!important;margin:0!important;white-space:normal;}
  body.dungeon-fullscreen .ui72-enemy-cards{grid-template-columns:1fr!important;}
}

@media (max-width:560px){
  :root{--ui500-top:60px;--ui500-bottom:64px;}
  .ui500-mobile-topbar{grid-template-columns:46px minmax(0,1fr) 46px;padding-inline:7px;padding-bottom:7px;}
  .ui500-mobile-icon{width:46px;height:46px;}
  .ui500-mobile-brand img{width:34px;height:34px;}
  .ui500-mobile-brand b{font-size:16px;}
  body.ui500-shell .main.dungeon-main{padding-left:8px!important;padding-right:8px!important;}
  body.ui500-shell .ui63-card,
  body.ui500-shell .card{padding:12px;}
  body.ui500-shell .ui63-npc-aside{grid-template-columns:78px minmax(0,1fr);}
  body.ui500-shell .ui63-npc-portrait{height:98px!important;}
  body.ui500-shell .ui86-codex-card{grid-template-columns:86px minmax(0,1fr)!important;}
  body.dungeon-fullscreen .ui72-dungeon-run,
  body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-dungeon-run{padding:6px 6px calc(6px + env(safe-area-inset-bottom))!important;gap:6px!important;}
  body.dungeon-fullscreen .ui72-right-panel,
  body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-right-panel{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  body.dungeon-fullscreen .ui72-right-panel .ui72-skill-card{grid-column:1/-1;}
  body.dungeon-fullscreen .ui72-action-list,
  body.dungeon-fullscreen .ui83-battle-buttons{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}

@media (prefers-reduced-motion:reduce){
  .ui500-mobile-scrim,
  body.ui500-shell .sidebar.dungeon-sidebar{transition:none!important;}
}

/* v0.5.5 — 地下城按钮坞最终布局：固定在视口内，不再被历史最小高度推出屏幕。 */
@media (min-width:901px){
  html:has(body.dungeon-fullscreen),
  body.dungeon-fullscreen{
    width:100%!important;
    height:100dvh!important;
    min-height:0!important;
    max-height:100dvh!important;
    overflow:hidden!important;
  }
  body.dungeon-fullscreen .app-shell,
  body.dungeon-fullscreen .app-shell.dungeon-shell,
  body.dungeon-fullscreen .main.dungeon-main,
  body.dungeon-fullscreen #dungeon.view.active{
    height:100dvh!important;
    min-height:0!important;
    max-height:100dvh!important;
    margin:0!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  body.dungeon-fullscreen .main.dungeon-main{
    width:100vw!important;
    max-width:100vw!important;
    padding:0!important;
  }
  body.dungeon-fullscreen #dungeon.view.active{
    width:100%!important;
    padding:6px!important;
  }
  body.dungeon-fullscreen .ui72-dungeon-run,
  body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-dungeon-run{
    width:100%!important;
    max-width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;
    margin:0!important;
    padding:0!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(310px,340px)!important;
    grid-template-rows:50px minmax(0,1fr) minmax(88px,auto)!important;
    grid-template-areas:"top side" "display side" "actions side"!important;
    gap:6px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  body.dungeon-fullscreen .ui72-toolbar{
    grid-area:top!important;
    width:100%!important;
    height:50px!important;
    min-height:0!important;
    max-height:50px!important;
    padding:5px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  body.dungeon-fullscreen .ui72-toolbar-buttons{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:40px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
  }
  body.dungeon-fullscreen .ui72-toolbar button{
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
  }
  body.dungeon-fullscreen .ui72-display{
    grid-area:display!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:hidden!important;
  }
  body.dungeon-fullscreen .ui72-scene-scroll{
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;
    overflow:auto!important;
  }
  body.dungeon-fullscreen .ui72-actions{
    grid-area:actions!important;
    position:relative!important;
    z-index:50!important;
    align-self:stretch!important;
    width:100%!important;
    height:auto!important;
    min-height:88px!important;
    max-height:min(36dvh,240px)!important;
    padding:9px!important;
    overflow:auto!important;
    box-sizing:border-box!important;
    visibility:visible!important;
    opacity:1!important;
  }
  body.dungeon-fullscreen .ui72-action-list{
    width:100%!important;
    height:auto!important;
    min-height:68px!important;
    max-height:none!important;
    overflow:visible!important;
  }
  body.dungeon-fullscreen .ui72-action-list>.action-row,
  body.dungeon-fullscreen .ui72-action-list>.v148-action-row,
  body.dungeon-fullscreen .ui53-event-continue,
  body.dungeon-fullscreen .ui54-prebattle-action{
    width:100%!important;
    min-height:68px!important;
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important;
    gap:8px!important;
    align-items:center!important;
  }
  body.dungeon-fullscreen .ui72-actions button{
    min-height:48px!important;
    height:auto!important;
    white-space:normal!important;
  }
  body.dungeon-fullscreen .ui54-prebattle-action>span,
  body.dungeon-fullscreen .ui53-event-continue>span{
    color:#d9caa9!important;
    font-size:13px!important;
  }
}

@media (min-width:901px) and (max-width:1180px){
  body.dungeon-fullscreen .ui72-dungeon-run,
  body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-dungeon-run{
    grid-template-columns:minmax(0,1fr) 300px!important;
  }
  body.dungeon-fullscreen .ui72-action-list>.action-row,
  body.dungeon-fullscreen .ui72-action-list>.v148-action-row,
  body.dungeon-fullscreen .ui53-event-continue,
  body.dungeon-fullscreen .ui54-prebattle-action{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

.ui54-prebattle .event-mini-head em{color:#ffb4a6!important;}
.ui54-prebattle-action{border-left:3px solid rgba(216,87,90,.72);padding-left:10px;}

/* v0.5.2 — 完整角色档案、角色主题对话与隐藏事件字体 */
.v052-profile-equipment{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0 16px}
.v052-profile-equip{display:grid;grid-template-columns:86px minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 12px;border:1px solid rgba(215,180,106,.2);border-radius:12px;background:rgba(0,0,0,.22)}
.v052-profile-equip b{color:#e7c982}.v052-profile-equip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.v052-profile-equip em{font-style:normal;color:var(--muted);font-size:12px}.v052-profile-equip.empty{opacity:.62}
.v052-profile-skills{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.v052-profile-skill{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;text-align:left!important;gap:3px 10px!important;min-height:72px!important;padding:11px 12px!important;border-color:rgba(180,160,125,.22)!important}
.v052-profile-skill b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.v052-profile-skill span{grid-column:1;color:var(--muted);font-size:12px}.v052-profile-skill em{grid-column:2;grid-row:1/3;align-self:center;font-style:normal;color:#b8aa91;font-size:12px}
.v052-profile-skill.selected{border-color:rgba(122,219,166,.58)!important;background:linear-gradient(180deg,rgba(34,92,64,.28),rgba(7,15,12,.7))!important}.v052-profile-skill.selected em{color:#9fe1bb}

.ui52-themed-event{--character-color:#e7bf72;border:1px solid color-mix(in srgb,var(--character-color) 38%,rgba(255,255,255,.08))!important;box-shadow:inset 0 0 36px color-mix(in srgb,var(--character-color) 7%,transparent),0 16px 48px rgba(0,0,0,.25)}
.ui52-themed-event .event-mini-head strong,.ui52-themed-event .character-quote{color:color-mix(in srgb,var(--character-color) 84%,#fff 16%);text-shadow:0 0 14px color-mix(in srgb,var(--character-color) 25%,transparent)}
.ui52-themed-event .event-text{display:grid;gap:10px;font-family:BossDialogueCN,KaiTi,STKaiti,FangSong,serif!important;font-size:18px;line-height:1.95}
.ui52-themed-event .event-text p{margin:0}.ui52-themed-event .event-narration{color:#d7cdbc}.ui52-themed-event .character-quote{padding-left:14px;border-left:2px solid var(--character-color);font-size:19px}
.ui52-themed-event .event-latin-text{font-family:DungeonGameLatin,Canterbury,Georgia,serif!important;letter-spacing:.055em;color:color-mix(in srgb,var(--character-color) 78%,#fff 22%)}
.ui52-character-dialogue{--character-color:#f0d08a;margin:0 0 10px;padding:12px 14px;border:1px solid color-mix(in srgb,var(--character-color) 42%,transparent);border-radius:14px;background:linear-gradient(180deg,color-mix(in srgb,var(--character-color) 9%,rgba(5,5,7,.9)),rgba(3,3,5,.92));box-shadow:0 0 24px color-mix(in srgb,var(--character-color) 10%,transparent)}
.ui52-character-dialogue header{display:flex;justify-content:space-between;gap:12px;padding-bottom:7px;margin-bottom:8px;border-bottom:1px solid color-mix(in srgb,var(--character-color) 28%,transparent)}
.ui52-character-dialogue header span{font-family:DungeonGameLatin,Canterbury,Georgia,serif!important;letter-spacing:.12em;color:var(--character-color)}.ui52-character-dialogue header b{color:var(--character-color)}
.ui52-character-dialogue p{margin:0 0 7px!important;font-family:BossDialogueCN,KaiTi,STKaiti,FangSong,serif!important;font-size:18px!important;line-height:1.8!important;color:color-mix(in srgb,var(--character-color) 82%,#fff 18%)!important}

@media(max-width:760px){.v052-profile-equipment,.v052-profile-skills{grid-template-columns:1fr}.v052-profile-equip{grid-template-columns:72px minmax(0,1fr) auto}.ui52-themed-event .event-text{font-size:16px}.ui52-themed-event .character-quote{font-size:17px}}

/* v0.5.3 — 最终角色档案、事件推进、黑匣商店与意图遮蔽 */
.ui53-profile-shell{display:grid;gap:14px;max-width:1500px;margin:0 auto;padding-bottom:30px}
.ui53-profile-hero{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;padding:26px;border:1px solid rgba(224,188,105,.32);border-radius:22px;background:linear-gradient(125deg,rgba(59,39,20,.72),rgba(7,8,11,.96) 58%,rgba(45,12,18,.65));box-shadow:inset 0 0 42px rgba(231,191,110,.06),0 22px 54px rgba(0,0,0,.28)}
.ui53-profile-hero span{font-family:DungeonGameLatin,Canterbury,Georgia,serif;letter-spacing:.12em;color:#c7a96e}.ui53-profile-hero h2{margin:6px 0 4px;font-size:38px;color:#f1d99a}.ui53-profile-hero p{margin:0;color:#c6bba7}
.ui53-profile-money{text-align:right}.ui53-profile-money b{display:block;font-size:32px;color:#f0c866}.ui53-profile-money span{font-size:12px;letter-spacing:.18em;color:#9f927d}
.ui53-profile-summary{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}.ui53-profile-summary>div{min-width:0;padding:14px;border:1px solid rgba(206,175,111,.18);border-radius:14px;background:rgba(7,8,10,.75)}.ui53-profile-summary b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#ead394;font-size:17px}.ui53-profile-summary span{display:block;margin-top:5px;color:#938a7b;font-size:12px}
.ui53-profile-section{padding:18px!important}.ui53-profile-attrs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.ui53-profile-attrs article{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:center;gap:4px 10px;padding:13px;border:1px solid rgba(213,180,106,.2);border-radius:13px;background:rgba(0,0,0,.25)}.ui53-profile-attrs article span{color:#a89e8d}.ui53-profile-attrs article b{font-size:25px;color:#efd38c}.ui53-profile-attrs article button{grid-column:2;grid-row:1/3;min-width:52px}
.ui53-profile-combat{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.ui53-profile-combat span{display:flex;justify-content:space-between;gap:10px;padding:11px 13px;border:1px solid rgba(178,162,132,.17);border-radius:11px;background:rgba(0,0,0,.22);color:#a99f90}.ui53-profile-combat b{color:#e9d5a4}
.ui53-profile-equipment{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.ui53-profile-equip{display:grid;grid-template-columns:74px minmax(0,1fr);gap:4px 12px;padding:13px;border:1px solid rgba(211,178,107,.18);border-radius:13px;background:rgba(0,0,0,.23)}.ui53-profile-equip>b{grid-row:1/3;color:#c9aa6e}.ui53-profile-equip>strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#e9dfc8}.ui53-profile-equip>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8f887d;font-size:12px}.ui53-profile-equip.empty{opacity:.58}
.ui53-profile-skills{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.ui53-profile-skill{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:auto auto!important;gap:7px 12px!important;min-height:100px!important;padding:13px!important;text-align:left!important;border-color:rgba(178,157,116,.2)!important}.ui53-profile-skill>span{min-width:0}.ui53-profile-skill>span b,.ui53-profile-skill>span em{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui53-profile-skill>span b{color:#e9d5a7}.ui53-profile-skill>span em{margin-top:4px;color:#938b7e;font-size:12px;font-style:normal}.ui53-profile-skill>small{grid-column:1/3;color:#aea596;line-height:1.5}.ui53-profile-skill>strong{grid-column:2;grid-row:1;color:#a99a7d}.ui53-profile-skill.selected{border-color:rgba(93,207,145,.55)!important;background:linear-gradient(150deg,rgba(26,87,56,.42),rgba(5,11,9,.86))!important}.ui53-profile-skill.selected>strong{color:#8fe2b4}
.ui53-profile-account{display:flex;align-items:center;justify-content:space-between;gap:20px}.ui53-profile-account h3,.ui53-profile-account p{margin:0}.ui53-profile-account p{margin-top:6px;color:#9e9588}
.ui53-event-continue{display:flex;align-items:center;justify-content:flex-end;gap:14px;width:100%}.ui53-event-continue span{margin-right:auto;color:#b8ad9c}.ui53-event-continue button{min-width:210px}.ui52-themed-event.resolved{border-color:color-mix(in srgb,var(--character-color) 62%,rgba(255,255,255,.1))!important}
.ui53-black-box-shop{margin:0 0 18px;padding:15px;border:1px solid rgba(176,74,82,.42);border-radius:18px;background:radial-gradient(circle at 90% 0,rgba(137,31,47,.2),transparent 35%),linear-gradient(145deg,rgba(17,7,10,.96),rgba(3,4,6,.97));box-shadow:inset 0 0 38px rgba(132,23,39,.1),0 16px 38px rgba(0,0,0,.26)}.ui53-black-box-shop>header{display:flex;justify-content:space-between;gap:16px;padding:3px 4px 13px;margin-bottom:12px;border-bottom:1px solid rgba(194,80,91,.27)}.ui53-black-box-shop>header span{font-family:DungeonGameLatin,Canterbury,Georgia,serif;letter-spacing:.18em;color:#bb6571;font-size:12px}.ui53-black-box-shop>header h3{margin:3px 0;color:#f0c1c5;font-size:24px}.ui53-black-box-shop>header p{margin:0;color:#a79696;line-height:1.55}.ui53-black-box-shop>header>b{align-self:flex-start;padding:7px 10px;border:1px solid rgba(204,102,111,.28);border-radius:999px;color:#c8868c;white-space:nowrap}.ui53-black-box-shop .pawn-rare-section{margin:0;padding:0;border:0;background:none}
.ui83-intent-chip.concealed{filter:saturate(.75);color:#d4c7ab!important}.ui83-intent-chip.revealed{border-color:rgba(108,207,159,.48)!important;color:#a6e7c3!important;box-shadow:0 0 16px rgba(75,174,129,.1)}

@media(max-width:900px){.ui53-profile-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.ui53-profile-attrs{grid-template-columns:repeat(2,minmax(0,1fr))}.ui53-profile-combat{grid-template-columns:repeat(2,minmax(0,1fr))}.ui53-profile-equipment,.ui53-profile-skills{grid-template-columns:1fr}.ui53-profile-account{align-items:flex-start;flex-direction:column}.ui53-black-box-shop>header{flex-direction:column}.ui53-black-box-shop>header>b{align-self:flex-start}}
@media(max-width:560px){.ui53-profile-hero{align-items:flex-start;padding:18px}.ui53-profile-hero h2{font-size:29px}.ui53-profile-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.ui53-profile-attrs{grid-template-columns:1fr}.ui53-event-continue{align-items:stretch;flex-direction:column}.ui53-event-continue button{width:100%;min-width:0}.ui53-profile-money b{font-size:24px}}

/* v0.5.5 — 十层检查点选择提交、城镇取货与快捷药店 */
.ui54-checkpoint-panel{width:min(1240px,94vw)!important;max-height:92dvh!important;overflow:auto!important;}
.ui54-checkpoint-tabs{position:sticky;z-index:8;top:-1px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:9px 0 12px;background:linear-gradient(180deg,rgba(10,9,7,.99) 76%,transparent)}
.ui54-checkpoint-section{display:none}.ui54-checkpoint-section.active{display:block}
.ui54-checkpoint-section>header{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin:6px 0 12px;padding:14px 15px;border:1px solid rgba(215,181,108,.2);border-radius:15px;background:rgba(0,0,0,.24)}
.ui54-checkpoint-section>header h3,.ui54-checkpoint-section>header p{margin:0}.ui54-checkpoint-section>header p{margin-top:6px;color:#a69d8e;line-height:1.55}.ui54-checkpoint-section>header>div:last-child{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.ui54-submit-list,.ui54-stock-list{display:grid;gap:8px}.ui54-check-row,.ui54-stock-row,.ui54-shop-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:center;padding:12px 14px;border:1px solid rgba(205,174,109,.17);border-radius:13px;background:rgba(4,5,7,.74)}
.ui54-check-row.keep{border-color:rgba(103,184,140,.34);background:linear-gradient(145deg,rgba(24,78,52,.22),rgba(3,6,5,.78))}.ui54-check-row.submit{border-color:rgba(220,153,88,.34)}.ui54-check-row.protected{border-color:rgba(104,161,223,.32)}
.ui54-check-row b,.ui54-stock-row b,.ui54-shop-row b{display:block;color:#ead49a}.ui54-check-row span,.ui54-stock-row span,.ui54-shop-row span{display:block;margin-top:4px;color:#a69c89;font-size:12px}.ui54-check-row p,.ui54-stock-row p,.ui54-shop-row p{margin:5px 0 0;color:#8e887e;font-size:12px;line-height:1.45}
.ui54-check-row button,.ui54-stock-row button,.ui54-shop-row button{min-width:120px}.ui54-shop-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.ui54-checkpoint-message{margin:8px 0!important}
.ui54-boss-gate-actions{grid-template-columns:minmax(260px,520px)!important;justify-content:start}.ui54-boss-gate-actions button{border-color:rgba(226,85,85,.6)!important;box-shadow:0 0 24px rgba(174,36,42,.14)}
@media(max-width:760px){.ui54-checkpoint-tabs{grid-template-columns:1fr}.ui54-checkpoint-section>header{display:grid}.ui54-checkpoint-section>header>div:last-child{justify-content:stretch}.ui54-checkpoint-section>header>div:last-child button{width:100%}.ui54-shop-grid{grid-template-columns:1fr}.ui54-check-row,.ui54-stock-row,.ui54-shop-row{grid-template-columns:1fr}.ui54-check-row button,.ui54-stock-row button,.ui54-shop-row button{width:100%}}

/* v0.5.6：层数自适应、搜索结果与探索药物弹窗。 */
.ui72-floor-button{
  width:auto!important;
  min-width:64px!important;
  max-width:none!important;
  padding:0 12px!important;
  white-space:nowrap!important;
  overflow:visible!important;
  font-variant-numeric:tabular-nums;
}
.v056-run-search{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  margin:14px 0;
}
.v056-run-search input,
.ui63-modal-zone #v415-bag-search,
[data-pawn-search]{
  min-width:0;
}
.v056-search-empty{margin:14px 0;}
.v056-potion-panel{width:min(680px,94vw);max-height:min(820px,92vh);display:flex;flex-direction:column;gap:14px;}
.v056-potion-list{display:grid;gap:10px;overflow:auto;min-height:0;padding-right:4px;}
.v056-potion-choice{display:flex;align-items:center;justify-content:space-between;gap:16px;text-align:left;padding:14px 16px;}
.v056-potion-choice span{display:grid;gap:5px;}
.v056-potion-choice small{opacity:.78;line-height:1.45;}
.v056-potion-choice em{font-style:normal;white-space:nowrap;}
.v056-potion-confirm{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;padding:14px;border:1px solid rgba(201,164,91,.28);border-radius:14px;background:rgba(12,12,14,.72);}
.v056-potion-confirm p{margin:4px 0 0;opacity:.78;}
.v056-potion-cancel{margin-top:auto;width:100%;}
.ui72-potion-use-button{white-space:nowrap;}
[hidden]{display:none!important;}
@media (max-width:720px){
  .ui72-floor-button{min-width:58px!important;padding:0 9px!important;}
  .v056-potion-confirm{grid-template-columns:1fr;}
  .v056-run-search{grid-template-columns:1fr auto;}
}

/* v0.5.7：装备穿脱、城镇背包装备栏与Boss意图反馈。 */
.v057-equipped-panel{margin:14px 0;padding:16px!important;border-color:rgba(216,181,105,.28)!important;background:linear-gradient(145deg,rgba(31,24,13,.46),rgba(5,6,8,.88))!important}
.v057-equipped-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:12px}
.v057-equipped-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:11px 12px;border:1px solid rgba(202,171,106,.18);border-radius:12px;background:rgba(0,0,0,.23)}
.v057-equipped-row>div{min-width:0}.v057-equipped-row b,.v057-equipped-row span{display:block}.v057-equipped-row b{color:#c9aa6e;font-size:12px}.v057-equipped-row span{margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#e7dcc3}.v057-equipped-row.empty{opacity:.58}
.v057-unequip-button{min-width:70px!important;white-space:nowrap!important}
.ui72-equip-row{grid-template-columns:72px minmax(0,1fr) minmax(90px,auto) auto!important;align-items:center!important}
.ui53-profile-equip{grid-template-columns:74px minmax(0,1fr) auto!important;align-items:center!important}
.ui53-profile-equip>.v057-unequip-button{grid-column:3;grid-row:1/3}
.v415-bag-card .insurance-card-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.ui83-intent-chip.revealed{white-space:normal!important;line-height:1.45!important}
@media(max-width:760px){
  .v057-equipped-grid{grid-template-columns:1fr}
  .ui72-equip-row{grid-template-columns:64px minmax(0,1fr) auto!important}.ui72-equip-row>em{grid-column:2/4}
  .ui53-profile-equip{grid-template-columns:64px minmax(0,1fr) auto!important}
}


/* v0.5.8：角色档案/检查点装备整备。 */
.v058-equip-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.ui72-equip-row>.v058-equip-actions{grid-column:4;grid-row:1;white-space:nowrap}
.ui53-profile-equip>.v058-equip-actions{grid-column:3;grid-row:1/3;align-self:center}
.v058-equipment-panel{width:min(860px,94vw);max-height:min(880px,92vh);display:flex;flex-direction:column;gap:14px;overflow:hidden}
.v058-equipment-panel>header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.v058-equipment-panel h2,.v058-equipment-panel p{margin:0}.v058-equipment-panel header p{margin-top:6px;opacity:.78;line-height:1.55}
.v058-current-equipment{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:13px 15px;border:1px solid rgba(214,178,98,.3);border-radius:14px;background:rgba(28,21,12,.62)}
.v058-current-equipment b{color:#d5b36d}.v058-current-equipment span{font-weight:800}
.v058-equipment-options{display:grid;gap:10px;overflow:auto;min-height:0;padding-right:4px}
.v058-equipment-options article{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;padding:14px;border:1px solid rgba(201,166,91,.24);border-radius:14px;background:rgba(4,5,7,.72)}
.v058-equipment-options article div{min-width:0}.v058-equipment-options b,.v058-equipment-options span{display:block}.v058-equipment-options span{margin-top:4px;color:#c7bda8}.v058-equipment-options p{margin:7px 0 0;opacity:.75;line-height:1.5}
.v058-cancel-equipment{width:100%;margin-top:auto}
.ui54-checkpoint-actions{grid-template-columns:repeat(2,minmax(180px,1fr))!important}
@media(max-width:760px){
  .ui72-equip-row{grid-template-columns:64px minmax(0,1fr)!important}.ui72-equip-row>em{grid-column:2}.ui72-equip-row>.v058-equip-actions{grid-column:1/3;grid-row:auto;justify-content:stretch}.ui72-equip-row>.v058-equip-actions button{flex:1}
  .ui53-profile-equip{grid-template-columns:64px minmax(0,1fr)!important}.ui53-profile-equip>.v058-equip-actions{grid-column:1/3;grid-row:auto;justify-content:stretch}.ui53-profile-equip>.v058-equip-actions button{flex:1}
  .v058-current-equipment,.v058-equipment-options article{grid-template-columns:1fr}.v058-current-equipment button,.v058-equipment-options article button{width:100%}
  .ui54-checkpoint-actions{grid-template-columns:1fr!important}
}

/* v0.5.9 UI hotfix 1：地下城入口出战装备栏防溢出。 */
#dungeon [data-zone="prep-equipment"]{
  max-width:100%;
  overflow:hidden;
}
#dungeon [data-zone="prep-equipment"] .ui63-card-head{
  align-items:flex-start;
  flex-wrap:wrap;
}
#dungeon [data-zone="prep-equipment"] .ui63-card-head>div{
  flex:1 1 420px;
  min-width:0;
}
#dungeon [data-zone="prep-equipment"] .ui63-card-head>[data-ui63-open-town-bag]{
  flex:0 0 auto;
}
#dungeon [data-zone="prep-equipment"] .ui63-prep-equip-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
  width:100%;
  max-width:100%;
  align-items:stretch;
}
#dungeon [data-zone="prep-equipment"] .ui63-prep-equip-grid>*{
  min-width:0!important;
  max-width:100%;
}
#dungeon [data-zone="prep-equipment"] .ui72-equip-row{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  min-height:124px!important;
  overflow:hidden!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:auto auto auto 1fr!important;
  align-content:start!important;
  align-items:start!important;
  gap:4px!important;
  padding:12px!important;
}
#dungeon [data-zone="prep-equipment"] .ui72-equip-row>b,
#dungeon [data-zone="prep-equipment"] .ui72-equip-row>span,
#dungeon [data-zone="prep-equipment"] .ui72-equip-row>em{
  grid-column:1!important;
  min-width:0!important;
  max-width:100%;
}
#dungeon [data-zone="prep-equipment"] .ui72-equip-row>b{
  font-size:12px!important;
  color:#f0cf7d!important;
}
#dungeon [data-zone="prep-equipment"] .ui72-equip-row>span{
  font-size:13px!important;
  color:#e7dcc3!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
#dungeon [data-zone="prep-equipment"] .ui72-equip-row>em{
  font-size:11px!important;
  color:#9d927c!important;
  text-align:left!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
#dungeon [data-zone="prep-equipment"] .ui72-equip-row>.v058-equip-actions{
  grid-column:1!important;
  grid-row:4!important;
  align-self:end!important;
  width:100%;
  min-width:0;
  display:flex!important;
  justify-content:stretch!important;
  flex-wrap:nowrap!important;
  gap:7px!important;
  margin-top:7px;
  white-space:normal!important;
}
#dungeon [data-zone="prep-equipment"] .ui72-equip-row>.v058-equip-actions button{
  flex:1 1 0;
  width:auto!important;
  min-width:0!important;
  padding-left:8px!important;
  padding-right:8px!important;
  white-space:nowrap!important;
}
@media(max-width:1200px){
  #dungeon [data-zone="prep-equipment"] .ui63-prep-equip-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:640px){
  #dungeon [data-zone="prep-equipment"] .ui63-prep-equip-grid{
    grid-template-columns:minmax(0,1fr)!important;
  }
  #dungeon [data-zone="prep-equipment"] .ui63-card-head>[data-ui63-open-town-bag]{
    width:100%;
  }
}


/* v0.5.9 hotfix 2: readable run sidebar, action receipt and forgotten display. */
#dungeon [data-zone="equipment"].ui72-equip-card{
  max-height:330px!important;
  min-height:250px!important;
  padding:8px!important;
}
#dungeon [data-zone="equipment"] .ui72-side-title{
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;
}
#dungeon [data-zone="equipment"] .ui72-side-title small{font-size:9px!important;font-weight:500!important;opacity:.58;}
#dungeon [data-zone="equipment"] .ui72-equip-list{max-height:292px!important;gap:4px!important;overflow:auto!important;}
#dungeon [data-zone="equipment"] .ui72-equip-row.ui59-equip-compact{
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:54px minmax(0,1fr) 52px!important;
  grid-template-rows:1fr!important;
  align-items:center!important;
  min-height:30px!important;
  width:100%!important;
  padding:6px 7px!important;
  gap:6px!important;
  overflow:hidden!important;
}
#dungeon [data-zone="equipment"] .ui72-equip-row.ui59-equip-compact>b,
#dungeon [data-zone="equipment"] .ui72-equip-row.ui59-equip-compact>span,
#dungeon [data-zone="equipment"] .ui72-equip-row.ui59-equip-compact>em{
  grid-row:1!important;min-width:0!important;margin:0!important;
}
#dungeon [data-zone="equipment"] .ui72-equip-row.ui59-equip-compact>b{grid-column:1!important;font-size:11px!important;}
#dungeon [data-zone="equipment"] .ui72-equip-row.ui59-equip-compact>span{grid-column:2!important;font-size:11px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}
#dungeon [data-zone="equipment"] .ui72-equip-row.ui59-equip-compact>em{grid-column:3!important;font-size:9px!important;text-align:right!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}
#dungeon [data-zone="equipment"] .ui72-equip-row.ui59-equip-compact.empty{opacity:.52;}
.ui59-action-receipt{margin-top:12px;padding:13px 15px;border:1px solid rgba(239,201,112,.34);border-radius:14px;background:linear-gradient(135deg,rgba(54,39,14,.72),rgba(10,10,12,.88));box-shadow:inset 0 0 28px rgba(239,201,112,.045);}
.ui59-action-receipt header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;padding-bottom:8px;border-bottom:1px solid rgba(239,201,112,.18);}
.ui59-action-receipt header strong{color:#f3d98c;font-size:14px;}.ui59-action-receipt header em{font-style:normal;color:#bcae90;font-size:11px;}
.ui59-action-receipt>div{display:grid;grid-template-columns:72px minmax(0,1fr);gap:8px;padding:5px 0;line-height:1.55;font-size:12px;}
.ui59-action-receipt>div b{color:#d7bd78;}.ui59-action-receipt .gain b{color:#91d89e;}.ui59-action-receipt .loss b{color:#ee9b9b;}.ui59-action-receipt .state b{color:#bda0f5;}
.ui59-action-receipt>div span{min-width:0;color:#e6dcc6;overflow-wrap:anywhere;}
.ui59-forgotten-hp .resource-bar{background:repeating-linear-gradient(135deg,rgba(145,103,195,.28) 0 7px,rgba(35,24,47,.75) 7px 14px)!important;}
.ui59-forgotten-hp .resource-bar span{opacity:.18!important;background:#b084e8!important;}
.ui59-forgotten-hp em{color:#c8a5ee!important;letter-spacing:.03em;}
.ui59-forgotten-badge{margin:5px 0;padding:4px 7px;border:1px solid rgba(176,132,232,.28);border-radius:8px;background:rgba(95,54,130,.16);color:#c9a5ef;font-size:10px;line-height:1.35;}
@media(max-width:1100px){
  #dungeon [data-zone="equipment"].ui72-equip-card{min-height:0!important;max-height:none!important;}
  #dungeon [data-zone="equipment"] .ui72-equip-list{max-height:none!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:620px){
  #dungeon [data-zone="equipment"] .ui72-equip-list{grid-template-columns:1fr!important;}
  .ui59-action-receipt>div{grid-template-columns:1fr;gap:2px;}
}

/* v0.5.9 hotfix 3: complete Boss artwork and paused-run read-only town. */
body.v047-boss-battle-bg::before,
body.boss-battle-live::before{
  background-color:#030303!important;
  background-size:100% 100%,contain!important;
  background-position:center center,center center!important;
  filter:brightness(.80) saturate(1.04) contrast(1.05)!important;
}
body.boss-battle-live .main.dungeon-main::before,
body.boss-battle-live #dungeon.view.active::before,
body.boss-battle-live #battle.view.active::before{
  background-color:#030303!important;
  background-size:100% 100%,contain!important;
  background-position:center center,center center!important;
  filter:brightness(.68) saturate(1.02) contrast(1.04)!important;
}
body.v047-boss-battle-bg::after,
body.boss-battle-live::after{
  background:linear-gradient(180deg,rgba(0,0,0,.10),rgba(0,0,0,.50)),linear-gradient(90deg,rgba(0,0,0,.24),transparent 24%,transparent 76%,rgba(0,0,0,.28))!important;
}
body.boss-battle-live #dungeon.v046-dungeon-battle .ui72-display,
body.v047-boss-battle-bg #dungeon.v046-dungeon-battle .ui72-display{
  background:linear-gradient(180deg,rgba(4,4,6,.36),rgba(2,2,3,.60))!important;
  backdrop-filter:blur(2px)!important;
}
#dungeon.v046-dungeon-battle [data-zone="equipment"].ui72-equip-card{
  max-height:none!important;
  min-height:0!important;
  overflow:visible!important;
}
#dungeon.v046-dungeon-battle [data-zone="equipment"] .ui72-equip-list{
  max-height:none!important;
  overflow:visible!important;
  display:grid!important;
  gap:3px!important;
}
#dungeon.v046-dungeon-battle .ui72-right-panel{
  overflow:auto!important;
  scrollbar-gutter:stable!important;
  padding-right:2px;
}
.v059-paused-readonly-notice{
  display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;align-items:center;
  margin:0 0 14px;padding:13px 16px;border:1px solid rgba(236,192,98,.42);border-radius:15px;
  background:linear-gradient(135deg,rgba(78,52,14,.78),rgba(9,9,11,.94));box-shadow:0 12px 34px rgba(0,0,0,.28);
  color:#eadbb8;
}
.v059-paused-readonly-notice strong{color:#ffe09a;white-space:nowrap}.v059-paused-readonly-notice span{line-height:1.6;font-size:13px}
.v059-paused-blocked{opacity:.42!important;filter:saturate(.45)!important;cursor:not-allowed!important;box-shadow:none!important}
body.v059-paused-readonly .main input:not([type="search"]),
body.v059-paused-readonly .main select,
body.v059-paused-readonly .main textarea{caret-color:transparent}
@media(max-width:900px){
  body.v047-boss-battle-bg::before,body.boss-battle-live::before,
  body.boss-battle-live .main.dungeon-main::before,body.boss-battle-live #dungeon.view.active::before,body.boss-battle-live #battle.view.active::before{
    background-size:100% 100%,contain!important;background-position:center,center!important;
  }
  #dungeon.v046-dungeon-battle [data-zone="equipment"] .ui72-equip-list{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .v059-paused-readonly-notice{grid-template-columns:1fr}.v059-paused-readonly-notice strong{white-space:normal}
}
@media(max-width:560px){#dungeon.v046-dungeon-battle [data-zone="equipment"] .ui72-equip-list{grid-template-columns:1fr!important}}


/* v0.6.0 Boss dialogue / forge expansion */
.ui72-display-body.has-boss-dialogue{
  grid-template-rows:auto minmax(0,1fr) 74px !important;
  min-height:0;
}
.ui72-display-body.has-boss-dialogue > .ui52-character-dialogue.boss{
  position:relative !important;
  inset:auto !important;
  z-index:8;
  margin:0 0 6px !important;
  max-height:138px;
  min-height:72px;
  overflow:auto;
  border-color:rgba(224,180,86,.42);
  background:linear-gradient(180deg,rgba(18,13,9,.97),rgba(7,7,8,.94));
  box-shadow:0 12px 32px rgba(0,0,0,.34);
}
#dungeon [data-ui-root="dungeon-run"] .v042-boss-dialogue-panel{display:none!important}
.v060-forge-filter{display:flex;gap:14px;align-items:end;justify-content:space-between;flex-wrap:wrap}
.v060-forge-class-picker,.v060-forge-class-fixed{display:grid;gap:7px;min-width:min(100%,360px)}
.v060-forge-class-picker span,.v060-forge-class-fixed span{font-size:12px;color:var(--muted,#b7a98a)}
.v060-forge-class-picker select{width:100%;min-height:44px;border-radius:12px;background:#100e0b;color:#f4ddb0;border:1px solid rgba(210,168,75,.35);padding:0 12px}
.v060-forge-class-fixed b{font-size:20px;color:#f4d990}
.quality-badge.q-random{background:linear-gradient(135deg,#69521e,#2e214b);color:#fff0bd;border:1px solid rgba(242,201,107,.5)}
.v060-random-quality-note{margin:14px 0}
.v060-forge-recipe-grid .recipe-card{min-width:0}
@media(max-height:820px){
  .ui72-display-body.has-boss-dialogue > .ui52-character-dialogue.boss{max-height:108px;min-height:62px}
}
@media(max-width:820px){
  .ui72-display-body.has-boss-dialogue{grid-template-rows:auto minmax(250px,1fr) minmax(70px,auto)!important}
  .ui72-display-body.has-boss-dialogue > .ui52-character-dialogue.boss{max-height:124px}
}

/* v0.6.0 hotfix：检查点八槽装备整备与城镇取货优先排序 */
.v060-equipment-station-panel{max-width:980px!important}
.v060-equipment-slot-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-height:min(62vh,620px);overflow:auto;padding:2px 4px 4px}
.v058-slot-choice{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;text-align:left;padding:14px 16px;border:1px solid rgba(201,164,91,.22);border-radius:15px;background:linear-gradient(180deg,rgba(36,29,19,.88),rgba(10,9,8,.96));color:#f4e5bd;min-width:0}
.v058-slot-choice:hover{border-color:rgba(244,205,116,.58);transform:translateY(-1px)}
.v058-slot-choice span{display:grid;gap:5px;min-width:0}.v058-slot-choice b{color:#f6d986;font-size:15px}.v058-slot-choice small{color:#d8cdb0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.v058-slot-choice em{font-style:normal;color:#b7a988;font-size:12px;white-space:nowrap}.v058-slot-choice.empty{opacity:.82}.v058-slot-choice.equipped{box-shadow:inset 0 0 24px rgba(190,139,49,.08)}
.ui54-stock-priority-note{margin:0 0 10px;padding:9px 12px;border:1px solid rgba(201,164,91,.18);border-radius:12px;background:rgba(201,164,91,.06);color:#cdbd98;font-size:12px}
@media(max-width:720px){.v060-equipment-slot-grid{grid-template-columns:1fr}.v058-slot-choice{padding:12px 13px}}


/* v0.6.1 full audit：Boss意图/蓄力与死亡态不得挤出操作底栏 */
@media (min-width:901px){
  body.dungeon-fullscreen .ui72-dungeon-run,
  body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-dungeon-run{
    grid-template-rows:50px minmax(150px,1fr) clamp(168px,22dvh,230px)!important;
    overflow:hidden!important;
  }
  body.dungeon-fullscreen .ui72-actions{
    position:relative!important;
    z-index:120!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    overflow:hidden!important;
    pointer-events:auto!important;
    isolation:isolate!important;
    box-shadow:0 -10px 28px rgba(0,0,0,.36)!important;
  }
  body.dungeon-fullscreen .ui72-action-list{
    height:100%!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    scrollbar-gutter:stable!important;
    padding:2px 5px 8px 2px!important;
  }
  body.dungeon-fullscreen .ui83-battle-buttons{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:8px!important;
    align-content:start!important;
    width:100%!important;
    min-height:min-content!important;
    pointer-events:auto!important;
  }
  body.dungeon-fullscreen .ui83-battle-buttons button{
    min-height:44px!important;
    position:relative!important;
    z-index:2!important;
    pointer-events:auto!important;
  }
  body.dungeon-fullscreen .ui83-battle-buttons.death-only{
    grid-template-columns:1fr!important;
    min-height:100%!important;
    place-content:center!important;
    position:sticky!important;
    top:0!important;
    bottom:0!important;
    z-index:8!important;
  }
  body.dungeon-fullscreen .ui83-battle-buttons.death-only #battle-exit-dungeon{
    width:100%!important;
    min-height:58px!important;
    font-size:16px!important;
  }
  body.dungeon-fullscreen .ui72-display,
  body.dungeon-fullscreen .ui72-display-body,
  body.dungeon-fullscreen .ui72-scene-scroll{min-height:0!important;overflow:auto!important;}
  body.dungeon-fullscreen .ui72-display-body.has-boss-dialogue{
    grid-template-rows:minmax(62px,112px) minmax(0,1fr) 74px!important;
  }
  body.dungeon-fullscreen .ui72-display-body.has-boss-dialogue>.ui52-character-dialogue.boss{
    max-height:112px!important;
    min-height:62px!important;
    overflow:auto!important;
    pointer-events:auto!important;
  }
}
@media (min-width:901px) and (max-height:720px){
  body.dungeon-fullscreen .ui72-dungeon-run,
  body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-dungeon-run{
    grid-template-rows:44px minmax(120px,1fr) 172px!important;
  }
  body.dungeon-fullscreen .ui72-display-body.has-boss-dialogue{
    grid-template-rows:minmax(56px,86px) minmax(0,1fr) 62px!important;
  }
  body.dungeon-fullscreen .ui72-display-body.has-boss-dialogue>.ui52-character-dialogue.boss{
    max-height:86px!important;min-height:56px!important;
  }
}
@media (max-width:900px){
  body.dungeon-fullscreen .ui72-actions{position:sticky!important;bottom:0!important;z-index:120!important;max-height:46dvh!important;overflow:hidden!important;pointer-events:auto!important;}
  body.dungeon-fullscreen .ui72-action-list{max-height:46dvh!important;overflow-y:auto!important;scrollbar-gutter:stable!important;}
  body.dungeon-fullscreen .ui83-battle-buttons.death-only{grid-template-columns:1fr!important;position:sticky!important;bottom:0!important;z-index:8!important;}
  body.dungeon-fullscreen .ui83-battle-buttons.death-only #battle-exit-dungeon{min-height:58px!important;width:100%!important;}
}

/* v0.6.2 炼药系统：独立药方研读台、药材图鉴与明确的学习状态。 */
.v062-potion-tabs{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin:18px 0;
  padding:8px;
  border:1px solid rgba(201,164,91,.22);
  border-radius:18px;
  background:rgba(7,10,9,.82);
}
.v062-potion-tabs button{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:13px 15px;
  border-radius:13px;
  border:1px solid rgba(118,190,135,.18);
  background:rgba(35,75,49,.14);
  color:#dcebdc;
  cursor:pointer;
}
.v062-potion-tabs button.active{
  border-color:rgba(119,226,151,.55);
  background:linear-gradient(180deg,rgba(69,139,88,.30),rgba(25,72,43,.25));
  box-shadow:inset 0 0 20px rgba(90,210,123,.08);
}
.v062-potion-tabs span{font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.v062-potion-tabs em{font-style:normal;font-size:12px;color:#9ed7ac;white-space:nowrap;}
.v062-study-summary{margin-bottom:14px;}
.v062-study-toolbar{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px;}
.v062-study-grid,.v062-material-grid,.v062-potion-recipe-grid{align-items:stretch;}
.v062-study-card,.v062-material-card{display:flex;flex-direction:column;min-width:0;overflow:hidden;}
.v062-study-card.ready{border-color:rgba(113,227,143,.46);box-shadow:0 16px 38px rgba(0,0,0,.30),inset 0 0 28px rgba(73,190,101,.07);}
.v062-study-card.learned{opacity:.82;}
.v062-study-card.missing{border-color:rgba(180,180,180,.14);}
.v062-study-source{display:grid;gap:5px;margin:12px 0;padding:10px 12px;border:1px solid rgba(201,164,91,.15);border-radius:12px;background:rgba(0,0,0,.18);}
.v062-study-source b{color:#e7ca8e;font-size:13px;}
.v062-study-source span{font-size:12px;line-height:1.55;color:#b9c7bd;overflow-wrap:anywhere;}
.v062-study-card .battle-actions,.v062-material-card .battle-actions{margin-top:auto;}
.v062-material-uses{display:flex;flex-wrap:wrap;gap:6px;margin-top:auto;padding-top:12px;}
.v062-material-uses span{padding:5px 8px;border-radius:999px;background:rgba(75,132,92,.18);border:1px solid rgba(110,185,129,.18);font-size:11px;color:#cce9d0;}
.v062-material-card .item-link{font-size:inherit;font-weight:inherit;color:#e8d39c;text-align:left;}
.v062-brew-note{margin-bottom:16px;}
@media(max-width:760px){
  .v062-potion-tabs{grid-template-columns:1fr;}
  .v062-potion-tabs button{min-height:48px;}
  .v062-study-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
}

/* v0.6.4：Boss胜利存档点恢复与战斗界面稳定重绘。 */
body.dungeon-fullscreen,
body.dungeon-fullscreen #dungeon,
body.dungeon-fullscreen .ui72-dungeon-run,
body.dungeon-fullscreen .ui72-display,
body.dungeon-fullscreen .ui72-display-body,
body.dungeon-fullscreen .ui72-action-list,
body.dungeon-fullscreen .ui72-right-panel{
  overflow-anchor:none!important;
}
#dungeon.v064-render-freeze{
  contain:layout style!important;
}
body.boss-battle-live::before,
body.v047-boss-battle-bg::before,
body.boss-battle-live .main.dungeon-main::before,
body.boss-battle-live #dungeon.view.active::before{
  animation:none!important;
  transition:none!important;
  backface-visibility:hidden!important;
  transform:translateZ(0)!important;
}
.ui83-battle-buttons.boss-checkpoint-only{
  grid-template-columns:1fr!important;
  min-height:100%!important;
  place-content:center!important;
}
.ui83-battle-buttons.boss-checkpoint-only #v064-enter-boss-checkpoint{
  width:100%!important;
  min-height:58px!important;
  font-size:16px!important;
}
.v064-entry-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.v064-final-checkpoint-actions{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
.v064-final-checkpoint-actions [data-v064-final-checkpoint-exit]{
  grid-column:1/-1;
  min-height:52px!important;
}
@media(max-width:720px){
  .v064-entry-actions,
  .v064-final-checkpoint-actions{grid-template-columns:1fr!important;}
  .v064-final-checkpoint-actions [data-v064-final-checkpoint-exit]{grid-column:auto;}
}

/* v0.6.6：静默酒店遗址隐藏事件与复苏叙事层。 */
body.v066-silent-hotel-open{overflow:hidden!important}
.v066-silent-hotel-revival{position:fixed;inset:0;z-index:2147483000;display:grid;place-items:center;padding:24px}
.v066-hotel-backdrop{position:absolute;inset:0;background:radial-gradient(circle at 50% 32%,rgba(94,75,121,.28),rgba(3,3,8,.96) 58%,#000 100%);backdrop-filter:blur(8px)}
.v066-hotel-panel{position:relative;width:min(820px,calc(100vw - 32px));max-height:min(86vh,920px);display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:16px;padding:24px;border:1px solid rgba(199,177,229,.42);border-radius:22px;background:linear-gradient(155deg,rgba(17,14,25,.98),rgba(5,5,9,.98));box-shadow:0 28px 90px rgba(0,0,0,.72),inset 0 0 60px rgba(110,76,150,.08);color:#e9e2f3}
.v066-hotel-panel header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:14px;border-bottom:1px solid rgba(199,177,229,.18)}
.v066-hotel-panel header span{display:block;margin-bottom:5px;color:#a897bd;font-size:12px;letter-spacing:.18em}
.v066-hotel-panel h2{margin:0;color:#f1eaf8;font-size:clamp(24px,4vw,36px)}
.v066-hotel-panel header em{font-style:normal;color:#c7b1df;font-size:12px;white-space:nowrap}
.v066-hotel-story{min-height:0;overflow:auto;padding:4px 10px 4px 2px;line-height:1.95;font-size:15px;color:#315ea8;scrollbar-width:thin;overscroll-behavior:contain;text-shadow:0 1px 12px rgba(49,94,168,.24)}
.v066-hotel-panel [data-v066-leave-hotel]{min-height:54px;background:linear-gradient(180deg,#76618e,#43324f);border-color:#a990c4;color:#fff}
@media(max-width:700px){
  .v066-silent-hotel-revival{padding:0;align-items:end}
  .v066-hotel-panel{width:100vw;max-height:92dvh;border-radius:22px 22px 0 0;padding:18px 16px calc(16px + env(safe-area-inset-bottom));gap:12px}
  .v066-hotel-panel header{gap:10px}
  .v066-hotel-panel header em{white-space:normal;text-align:right}
  .v066-hotel-story{font-size:14px;line-height:1.85}
}

/* v0.6.7：统一隐藏事件池（五事件同级）与每轮最多三次规则。 */

/* v0.6.8：全项目重复与运行风险审计；账号卡仅保留最终渲染版本。 */


/* v0.7.4：静默酒店遗址使用独立深蓝叙事色，不影响其他隐藏事件。 */
.ui52-themed-event.silent-hotel{border-color:rgba(49,94,168,.72)!important;box-shadow:0 18px 52px rgba(15,37,84,.24),inset 0 0 38px rgba(49,94,168,.08)!important}
.ui52-themed-event.silent-hotel .event-text,
.ui52-themed-event.silent-hotel .event-text p,
.ui52-themed-event.silent-hotel .event-narration,
.ui52-themed-event.silent-hotel .character-quote,
.ui52-themed-event.silent-hotel .event-latin-text,
.ui52-themed-event.silent-hotel [data-event-story]{color:#315ea8!important;text-shadow:0 1px 10px rgba(49,94,168,.22)}
.v066-hotel-panel .v066-hotel-story,
.v066-hotel-panel .v066-hotel-story p{color:#315ea8!important}

/* v0.7.1 王庭成长 */
.v071-growth-card{border-color:rgba(220,178,78,.42);background:linear-gradient(135deg,rgba(55,39,16,.72),rgba(12,12,14,.92))}
.v071-growth-card .stat-pills{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.v071-growth-card .stat-pills span{border:1px solid rgba(220,178,78,.3);background:rgba(220,178,78,.08);padding:6px 10px;border-radius:999px}
@media(max-width:720px){.v071-growth-card .recipe-head{align-items:flex-start}.v071-growth-card .stat-pills{display:grid;grid-template-columns:1fr 1fr}.v071-growth-card .stat-pills span{text-align:center}}


/* v0.7.2：撤离水晶、保险格与 Boss 传送点入口。 */
.v072-alchemy-shop{display:grid;gap:16px}
.v072-alchemy-shop .notice{margin:0}
.v072-crystal-card{border-color:rgba(110,210,255,.48);background:linear-gradient(145deg,rgba(18,55,73,.52),rgba(12,14,19,.96));box-shadow:inset 0 0 38px rgba(91,197,255,.08)}
.v072-crystal-card .recipe-head h3{color:#bfeaff}
.v072-insurance-prep{border-color:rgba(104,194,242,.34);background:linear-gradient(135deg,rgba(23,47,62,.5),rgba(10,12,16,.94))}
.v072-insurance-prep .ui63-control-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.v072-entry-choice-modal{z-index:2147482500}
.v072-entry-choice-panel{width:min(760px,calc(100vw - 32px))}
.v072-entry-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:18px}
.v072-entry-choice-grid button{display:grid;gap:7px;align-content:center;min-height:104px;padding:18px;text-align:left}
.v072-entry-choice-grid button b{font-size:18px}
.v072-entry-choice-grid button span{font-size:13px;line-height:1.55;opacity:.76}
@media(max-width:720px){
  .v072-insurance-prep .ui63-control-grid,
  .v072-entry-choice-grid{grid-template-columns:1fr}
  .v072-entry-choice-panel{width:100vw;max-height:92dvh;border-radius:22px 22px 0 0;padding-bottom:calc(18px + env(safe-area-inset-bottom))}
  .v072-entry-choice-grid button{min-height:82px}
}


/* v0.7.3：完整属性详情与药品精确说明 */
.v073-detail-fab{position:fixed;right:18px;bottom:18px;z-index:1450;min-width:74px;padding:11px 16px;border-color:rgba(139,204,255,.55)!important;background:rgba(8,15,24,.92)!important;box-shadow:0 10px 30px rgba(0,0,0,.36)}
.v073-detail-modal{position:fixed;inset:0;z-index:3100;display:flex;align-items:center;justify-content:center;padding:22px}
.v073-detail-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.78);backdrop-filter:blur(5px)}
.v073-detail-panel{position:relative;width:min(1040px,96vw);max-height:90vh;overflow:auto;padding:22px;border:1px solid rgba(126,189,255,.3);border-radius:18px;background:linear-gradient(180deg,rgba(16,24,35,.98),rgba(7,10,16,.99));box-shadow:0 26px 90px rgba(0,0,0,.65)}
.v073-detail-panel>header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}.v073-detail-panel h2,.v073-detail-panel h3{margin:0}.v073-detail-panel header p,.v073-detail-subhead p{margin:6px 0 0;color:var(--d-muted,#a9b2c1)}
.v073-stat-detail-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.v073-stat-detail-grid article{min-height:92px;padding:13px;border:1px solid rgba(130,180,230,.16);border-radius:12px;background:rgba(255,255,255,.035)}.v073-stat-detail-grid article span,.v073-stat-detail-grid article small{display:block;color:var(--d-muted,#a9b2c1)}.v073-stat-detail-grid article b{display:block;margin:6px 0;font-size:20px;color:#e8f5ff}.v073-stat-detail-grid article small{font-size:11px;line-height:1.45}.v073-stat-detail-grid.compact{grid-template-columns:repeat(4,minmax(0,1fr))}
.v073-detail-subhead{margin:22px 0 12px}.v073-rule-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.v073-attr-rule{padding:14px;border:1px solid rgba(213,177,104,.18);border-radius:12px;background:rgba(213,177,104,.045)}.v073-attr-rule>div{display:flex;justify-content:space-between;gap:8px}.v073-attr-rule b{color:#f3d99d}.v073-attr-rule em{font-size:12px;color:#a9cfff}.v073-attr-rule p{margin:9px 0;font-size:12px;line-height:1.55;color:#d6dde8}.v073-attr-rule small{color:var(--d-muted,#a9b2c1);line-height:1.45}.v073-rule-grid.compact{grid-template-columns:repeat(5,minmax(0,1fr))}
.v073-potion-effect{margin:11px 0;padding:11px 12px;border:1px solid rgba(112,224,173,.22);border-radius:10px;background:rgba(112,224,173,.055)}.v073-potion-effect b{color:#8ce6b7}.v073-potion-effect p{margin:6px 0 0;line-height:1.65;color:#d6e8dd}.v429-potion-row small{display:block;margin-top:6px;max-width:700px;font-size:11px;line-height:1.5;color:#9eb5a6}
@media(max-width:900px){.v073-stat-detail-grid,.v073-stat-detail-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr))}.v073-rule-grid,.v073-rule-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr))}.v073-detail-panel{padding:15px}.v073-detail-fab{right:12px;bottom:76px}}
@media(max-width:520px){.v073-stat-detail-grid,.v073-stat-detail-grid.compact,.v073-rule-grid,.v073-rule-grid.compact{grid-template-columns:1fr}.v073-detail-modal{padding:8px}.v073-detail-panel{width:100%;max-height:94vh;border-radius:14px}.v073-stat-detail-grid article{min-height:0}.v073-detail-fab{bottom:82px}}

/* v0.7.5 UI patch：压缩战斗留白、扩大播报区、Buff栏可视化、装备详情移位。 */
body.dungeon-fullscreen .ui72-dungeon-run,
body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-dungeon-run{
  grid-template-columns:minmax(0,1fr) 300px !important;
  grid-template-rows:34px minmax(0,1fr) minmax(130px,auto) !important;
  grid-template-areas:"top side" "display side" "actions side" !important;
}

.ui72-display{
  padding:8px !important;
}
.ui72-display-body{
  min-height:0 !important;
  height:100% !important;
  display:grid !important;
  grid-template-rows:minmax(0,1fr) minmax(176px,.68fr) !important;
  gap:8px !important;
  overflow:hidden !important;
}
.ui72-battle-main{
  min-height:0 !important;
  display:grid !important;
  grid-template-rows:auto minmax(0,1fr) !important;
  gap:8px !important;
  overflow:hidden !important;
}
.ui72-battle-main .ui52-character-dialogue{margin:0 !important;}
.ui72-enemy-cards{
  min-height:0 !important;
  max-height:none !important;
}
.ui72-battle-bottom{
  min-height:0 !important;
  display:grid !important;
  grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr) !important;
  gap:8px !important;
  overflow:hidden !important;
}
.ui72-bottom-card{
  min-height:0 !important;
  display:grid !important;
  grid-template-rows:auto minmax(0,1fr) !important;
  padding:8px !important;
  border:1px solid rgba(201,164,91,.16) !important;
  border-radius:14px !important;
  background:linear-gradient(180deg,rgba(25,20,14,.56),rgba(5,6,9,.74)) !important;
}
.ui72-bottom-head{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:8px !important;
  margin-bottom:6px !important;
  min-height:22px !important;
}
.ui72-bottom-head strong{color:#f7df9c !important;font-size:13px !important;letter-spacing:.03em !important;}
.ui72-bottom-head span{color:#bfae89 !important;font-size:11px !important;white-space:nowrap !important;}
.ui72-log-panel .ui72-log-merged{
  height:auto !important;
  min-height:0 !important;
  overflow:hidden !important;
}
.ui72-log-panel .ui72-log-merged > div{
  height:100% !important;
  min-height:0 !important;
}
.ui72-buff-list{
  min-height:0 !important;
  overflow:auto !important;
  display:grid !important;
  gap:6px !important;
  align-content:start !important;
  scrollbar-gutter:stable !important;
}
.ui72-buff-chip{
  display:grid !important;
  gap:2px !important;
  padding:7px 8px !important;
  border-radius:10px !important;
  border:1px solid rgba(201,164,91,.14) !important;
  background:rgba(255,255,255,.04) !important;
}
.ui72-buff-chip b{color:#f5df9f !important;font-size:12px !important;line-height:1.15 !important;}
.ui72-buff-chip span{color:#d8ccb0 !important;font-size:11px !important;line-height:1.25 !important;}
.ui72-buff-chip.buff{border-color:rgba(107,210,152,.22) !important;background:rgba(48,120,74,.14) !important;}
.ui72-buff-chip.buff b{color:#bbf1c4 !important;}
.ui72-buff-chip.debuff{border-color:rgba(234,108,108,.22) !important;background:rgba(124,35,35,.16) !important;}
.ui72-buff-chip.debuff b{color:#ffb6b6 !important;}
.ui72-buff-chip.neutral{border-color:rgba(201,164,91,.14) !important;background:rgba(201,164,91,.06) !important;}

.ui72-right-panel.ui72-right-panel-compact{
  grid-template-rows:auto minmax(86px,120px) minmax(0,1fr) !important;
}
.ui72-skill-list{
  height:100% !important;
  overflow:auto !important;
  align-content:start !important;
  scrollbar-gutter:stable !important;
}

.ui72-actions{
  padding:8px !important;
}
.ui72-action-list{
  display:grid !important;
  gap:8px !important;
  align-content:start !important;
}
.ui72-inline-equip{
  border:1px solid rgba(201,164,91,.16) !important;
  border-radius:12px !important;
  background:rgba(255,255,255,.03) !important;
  overflow:hidden !important;
}
.ui72-inline-equip summary{
  list-style:none !important;
  cursor:pointer !important;
  padding:8px 10px !important;
  color:#f0d99a !important;
  font-weight:700 !important;
  font-size:12px !important;
}
.ui72-inline-equip summary::-webkit-details-marker{display:none !important;}
.ui72-inline-equip-list{
  display:grid !important;
  gap:5px !important;
  padding:0 8px 8px !important;
  max-height:180px !important;
  overflow:auto !important;
  scrollbar-gutter:stable !important;
}

@media (max-width:1360px){
  body.dungeon-fullscreen .ui72-dungeon-run,
  body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-dungeon-run{
    grid-template-columns:minmax(0,1fr) 280px !important;
  }
  .ui72-battle-bottom{
    grid-template-columns:minmax(0,1.2fr) minmax(220px,1fr) !important;
  }
}
@media (max-width:1180px){
  .ui72-display-body{
    grid-template-rows:minmax(0,1fr) minmax(220px,auto) !important;
  }
  .ui72-battle-bottom{
    grid-template-columns:1fr !important;
  }
}
@media (max-width:900px){
  body.dungeon-fullscreen .ui72-dungeon-run,
  body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-dungeon-run{
    grid-template-columns:1fr !important;
    grid-template-rows:34px minmax(0,1fr) auto auto !important;
    grid-template-areas:"top" "display" "actions" "side" !important;
  }
  .ui72-display-body{
    grid-template-rows:minmax(0,1fr) minmax(240px,auto) !important;
  }
  .ui72-battle-bottom{
    grid-template-columns:1fr !important;
  }
}

/* v0.7.5 UI patch 3：日志放左侧大区，右栏依次为药物/技能/装备/Buff。 */
body.dungeon-fullscreen .ui72-dungeon-run,
body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-dungeon-run{
  grid-template-columns:minmax(0,1fr) 320px !important;
  grid-template-rows:34px minmax(0,1fr) 190px !important;
  grid-template-areas:"top side" "display side" "actions side" !important;
}

.ui72-display-body-v3{
  min-height:0 !important;
  height:100% !important;
  display:grid !important;
  grid-template-rows:minmax(190px,260px) minmax(0,1fr) !important;
  gap:8px !important;
  overflow:hidden !important;
}
.ui72-battle-top-v3{
  min-height:0 !important;
  overflow:hidden !important;
}
.ui72-battle-top-v3 .ui72-enemy-cards{
  min-height:0 !important;
  height:100% !important;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr)) !important;
}
.ui72-log-panel-v3{
  min-height:0 !important;
  display:grid !important;
  grid-template-rows:auto minmax(0,1fr) !important;
  padding:8px !important;
  border:1px solid rgba(201,164,91,.16) !important;
  border-radius:14px !important;
  background:linear-gradient(180deg,rgba(20,16,12,.58),rgba(5,6,9,.76)) !important;
  overflow:hidden !important;
}
.ui72-log-panel-v3 .ui72-log-merged{
  height:auto !important;
  min-height:0 !important;
  overflow:hidden !important;
}
.ui72-log-panel-v3 .ui72-log-merged > div{
  height:100% !important;
  min-height:0 !important;
  overflow:auto !important;
  display:grid !important;
  gap:5px !important;
  align-content:start !important;
  scrollbar-gutter:stable !important;
}
.ui72-right-panel-v3{
  grid-template-rows:auto minmax(74px,100px) minmax(110px,150px) minmax(180px,1fr) minmax(160px,1fr) !important;
  gap:6px !important;
  min-height:0 !important;
  overflow:hidden !important;
}
.ui72-right-panel-v3 > .ui63-card{
  min-height:0 !important;
  overflow:hidden !important;
}
.ui72-right-panel-v3 .ui72-potion-list,
.ui72-right-panel-v3 .ui72-skill-list,
.ui72-right-panel-v3 .ui72-equip-list,
.ui72-right-panel-v3 .ui72-buff-list{
  min-height:0 !important;
  overflow:auto !important;
  scrollbar-gutter:stable !important;
}
.ui72-equip-card{
  display:grid !important;
  grid-template-rows:auto minmax(0,1fr) !important;
}
.ui72-equip-list{
  display:grid !important;
  gap:4px !important;
  align-content:start !important;
  padding-right:2px !important;
}
.ui72-buff-card{
  display:grid !important;
  grid-template-rows:auto minmax(0,1fr) !important;
}
.ui72-buff-list{
  display:grid !important;
  gap:6px !important;
  align-content:start !important;
}
.ui72-buff-chip{
  display:grid !important;
  gap:2px !important;
  padding:7px 8px !important;
  border-radius:10px !important;
  border:1px solid rgba(201,164,91,.14) !important;
  background:rgba(255,255,255,.04) !important;
}
.ui72-buff-chip b{color:#f5df9f !important;font-size:12px !important;line-height:1.15 !important;}
.ui72-buff-chip span{color:#d8ccb0 !important;font-size:11px !important;line-height:1.25 !important;}
.ui72-buff-chip.buff{border-color:rgba(107,210,152,.22) !important;background:rgba(48,120,74,.14) !important;}
.ui72-buff-chip.buff b{color:#bbf1c4 !important;}
.ui72-buff-chip.debuff{border-color:rgba(234,108,108,.22) !important;background:rgba(124,35,35,.16) !important;}
.ui72-buff-chip.debuff b{color:#ffb6b6 !important;}
.ui72-buff-chip.neutral{border-color:rgba(201,164,91,.14) !important;background:rgba(201,164,91,.06) !important;}

@media (max-width:1400px){
  body.dungeon-fullscreen .ui72-dungeon-run,
  body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-dungeon-run{
    grid-template-columns:minmax(0,1fr) 296px !important;
  }
}
@media (max-width:1100px){
  body.dungeon-fullscreen .ui72-dungeon-run,
  body.dungeon-fullscreen #dungeon.v046-dungeon-battle .ui72-dungeon-run{
    grid-template-columns:1fr !important;
    grid-template-rows:34px minmax(0,1fr) 190px auto !important;
    grid-template-areas:"top" "display" "actions" "side" !important;
  }
  .ui72-right-panel-v3{
    grid-template-rows:auto minmax(80px,120px) minmax(110px,170px) minmax(150px,220px) minmax(150px,220px) !important;
  }
}
