/* HELLFORGE v0.3.4 — THE BLACK RELIQUARY
   Original dark-fantasy interface, inspired by the broad medieval/horror UI genre.
   NO third-party paid/free UI art from ToffeeCraft is copied or embedded.
   Preserves DOM ids, data-focus-key, hit targets, gamepad focus and game logic. */
:root {
  --ui-abyss:#07070a;
  --ui-charcoal:#141218;
  --ui-iron:#28222a;
  --ui-iron-light:#49404a;
  --ui-copper:#96744a;
  --ui-gold:#d9b77b;
  --ui-gold-bright:#f4d8a1;
  --ui-script:#eae0cf;
  --ui-dim:#c0b3a2;
  --ui-ember:#e48e45;
  --ui-rune:#96d1bf;
  --ui-danger:#dc8a8b;
  --gold-dim:var(--ui-copper);
  --gold-bright:var(--ui-gold);
  --parchment:var(--ui-script);
  --muted:var(--ui-dim);
}
/* Iron engraved panels. Multi-gradient edges create a pixel-like ornament with no raster dependency. */
.modal-backdrop:not(#panel-act-banner){
  background:radial-gradient(ellipse 64% 80% at 50% 45%,rgba(30,19,23,.72),rgba(3,2,5,.89));
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
}
.gothic-panel {
  position:relative;
  scrollbar-color:#8c6946 #141016;
  scrollbar-width:thin;
  color:var(--ui-script);
  background:
    linear-gradient(135deg,transparent 8px,rgba(206,157,81,.15) 9px,transparent 10px) left top/42px 42px no-repeat,
    linear-gradient(225deg,transparent 8px,rgba(206,157,81,.15) 9px,transparent 10px) right top/42px 42px no-repeat,
    repeating-linear-gradient(0deg,rgba(255,240,205,.012) 0px,rgba(255,240,205,.012) 1px,transparent 1px,transparent 4px),
    radial-gradient(ellipse at 50% -9%,rgba(110,68,44,.29),transparent 55%),
    linear-gradient(167deg,#261f25,#16131a 52%,#0b0b10 100%);
  border:2px solid #a18155;
  border-radius:2px;
  box-shadow:
    inset 0 0 0 2px #191118,
    inset 0 0 0 4px #59422e,
    inset 0 0 0 5px rgba(10,7,9,.95),
    inset 0 -42px 50px rgba(0,0,0,.27),
    0 0 0 3px #0a090b,
    0 0 0 4px #463729,
    0 24px 85px rgba(0,0,0,.96);
  padding:22px 25px 24px;
  max-height:min(90dvh,950px);
}
.gothic-panel::before{
  content:"";pointer-events:none;position:absolute;left:16px;right:16px;top:7px;height:2px;
  background:linear-gradient(90deg,transparent 0%,#80613f 7%,#d4ac6d 50%,#80613f 93%,transparent 100%);
  opacity:.6;
}
.panel-header {position:relative;min-height:42px;padding:4px 0 13px;margin-bottom:17px;
  border-bottom:1px solid #705438;flex-wrap:wrap;}
.panel-header::after {content:"◆";position:absolute;left:50%;bottom:-9px;transform:translateX(-50%);
  background:#1b161c;color:#c39b62;font-size:10px;padding:0 10px;line-height:15px;}
.panel-header h2 {font-size:clamp(1rem,1.65vw,1.35rem);font-weight:600;line-height:1.33;
  letter-spacing:.105em;color:var(--ui-gold-bright);text-shadow:0 2px 5px #050405;
  text-transform:uppercase;}
.panel-header h2::before{content:"✦";color:#ae8251;font-size:.8em;margin-right:10px;}
.close-x {width:34px;height:34px;min-width:34px;background:linear-gradient(180deg,#403033,#21171c);
  color:#f6e5c8;font-size:1.22rem;border:1px solid #ad8050;
  box-shadow:inset 0 0 0 2px #20171c;transition:background .15s,color .15s;}
.close-x:hover,.close-x:focus-visible{background:#543329;border-color:#f5c885;color:#fff;}
/* Shared button language: hammered copper outer shell, warm legible lettering. */
.gothic-btn,.mini-btn,.pot-btn,.skill-slot,#btn-act-banner-continue,
button[data-close-panel] {touch-action:manipulation;}
.gothic-btn {
  font-weight:600;color:#f2e5d0;letter-spacing:.115em;
  border:1px solid #a47d4e;
  background:linear-gradient(180deg,#423239 0%,#2b222b 9%,#1b171e 52%,#171219 100%);
  box-shadow:inset 0 0 0 2px rgba(12,10,13,.94),inset 0 1px 0 rgba(247,207,148,.17),0 3px 0 #0c0a0d,0 5px 15px #000a;
  text-shadow:0 1px 2px #050307;
  min-height:38px;
}
.gothic-btn:hover:not(:disabled),.gothic-btn:focus-visible{
  background:linear-gradient(180deg,#65412e,#39251e 45%,#261b1a);
  color:#fff2d9;border-color:#f1c985;
  box-shadow:inset 0 0 0 2px #2a1916,inset 0 1px 0 #b67b46,0 0 14px #db8b4544,0 3px 0 #0c090e;
}
.mini-btn {min-height:27px;padding:5px 10px;line-height:1.3;color:#e7d6bd;font-size:.70rem;
  border:1px solid #806447;background:linear-gradient(180deg,#342a2e,#20191e);
  box-shadow:inset 0 1px 0 #ad85572c;}
.mini-btn:hover,.mini-btn:focus-visible{background:#4c332b;color:#ffe3ad;border-color:#efbf75;}
.mini-btn.qol-danger,.hero-del-btn {border-color:#a86759;color:#ffccbd;}
:is(button,select,input,[role="button"]):focus-visible {outline:3px solid #ffe0a1;outline-offset:2px;}
body.input-mode-gamepad :is(button,select,input,[role="button"]):focus,
.gp-focus {outline:3px solid #ffdf9e!important;outline-offset:2px!important;
  box-shadow:0 0 0 3px #1b1116,0 0 0 5px #7c5738,0 0 20px #e8a35e8c!important;}
/* Never interfere with controller cursor suppression or its focus manager. */
button:disabled,.mini-btn:disabled {filter:saturate(.45);opacity:.55;}
/* HUD — more legible, symmetrical, and not overcrowded on the Xbox. */
.hud-top {padding:11px 10px;gap:7px;}
#hud-room-name,#hud-gold-pill,#hud-input-device,#hud-story-objective {
  border:1px solid #947047!important;color:#edc98b!important;
  background:linear-gradient(180deg,rgba(44,32,35,.95),rgba(11,11,15,.95))!important;
  box-shadow:inset 0 0 0 2px #19151b,0 4px 14px #0009;
  text-shadow:0 1px 3px #050405;
}
#hud-room-name {font-weight:700;padding:6px 20px;}
#hud-gold-pill {color:#ffdc8d!important;font-size:.85rem;padding:6px 15px;}
#hud-gold-pill::before{content:"◆";font-size:11px;color:#d8a751;margin-right:8px;}
#hud-target-bar,#boss-bar-wrap,#automap-overlay {border:1px solid #966e47;
  background:linear-gradient(180deg,rgba(37,27,34,.96),rgba(10,9,14,.95));
  box-shadow:inset 0 0 0 2px #161218,0 8px 30px #000b;}
#hud-toast {background:linear-gradient(180deg,#3a2831,#111117);border:2px solid #bd955d;
  padding:10px 19px;color:#fff0d8;box-shadow:0 7px 26px #000c;}
.hud-bottom {gap:13px;margin-bottom:10px;padding:11px 17px 12px;
  border:2px solid #a8814f;border-radius:2px;
  background:linear-gradient(180deg,rgba(45,33,38,.97),rgba(18,16,22,.985));
  box-shadow:inset 0 0 0 2px #151019,inset 0 0 0 4px #55402e,0 0 0 3px #08080b,0 -10px 36px #000e;}
.hud-center {min-width:0;width:min(650px,64vw);gap:8px;}
.hud-row {gap:9px;}
.orb-wrap {width:78px;height:78px;border:4px solid #947044;
  box-shadow:inset 0 0 20px #000e,0 0 0 2px #1c1319,0 0 0 4px #503d2d,0 4px 10px #000;}
.orb-wrap::after{content:"";position:absolute;inset:3px;border-radius:50%;border:1px solid #f0c99c52;
  background:radial-gradient(ellipse at 30% 20%,#ffffff16,transparent 48%);pointer-events:none;}
.orb-text{z-index:2;font-size:.78rem;letter-spacing:.01em;text-shadow:0 2px 4px #000,0 0 3px #000;}
.portrait-frame {height:52px;width:52px;border:2px solid #ac8553;
  box-shadow:inset 0 0 0 1px #0b0a0b,0 0 0 2px #2d2020;}
.skill-bar{gap:5px;}
.skill-slot {width:49px;height:49px;min-width:0;padding:4px 2px 2px;
  background:linear-gradient(180deg,#3a2c34,#121218);border:2px solid #806247;
  box-shadow:inset 0 0 0 2px #131017,inset 0 -7px 12px #0006;
  color:#f2dfc3;font-size:.65rem;font-weight:600;}
.skill-slot:hover,.skill-slot:focus-visible {border-color:#edc481;color:#fff6e6;background:#4a3028;}
.skill-slot.active-buff{border-color:#f7b75e;box-shadow:inset 0 0 0 2px #3a231d,0 0 12px #f5a95178;}
.skill-key{color:#ffe4ac;font-weight:700;font-size:.65rem;}
.pot-btn{width:42px;height:49px;border:2px solid #8f6b4f;background:#261f27;font-weight:700;}
.pot-btn.hp {color:#ffabab;border-color:#a95b53;}
.pot-btn.mp {color:#b9d5ff;border-color:#607fbb;}
.xp-track {height:13px;border:1px solid #95744f;box-shadow:inset 0 1px 4px #000;}
#xp-bar-fill{background:linear-gradient(90deg,#786036,#d4a55d,#f1cb7e);}
#xp-bar-label{color:#fff3d8;font-weight:700;text-shadow:0 1px 3px #000;}
.hud-mini-btns {display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;width:100%;}
.hud-mini-btns .mini-btn{white-space:nowrap;overflow:hidden;text-overflow:clip;
  min-width:0;padding:5px 4px;font-size:.68rem;letter-spacing:.01em;}
/* Inventory — equipment and backpack now read like an engraved RPG grid. */
#panel-inventory>.gothic-panel{width:min(780px,96vw);}
.inv-layout{gap:22px;grid-template-columns:minmax(194px,235px) minmax(0,1fr);min-width:0;}
#inv-equip-grid{gap:7px;}
.equip-slot {height:60px;min-width:0;border-width:2px;border-style:solid;
  background:radial-gradient(circle at 50% 15%,#30252e,#101014 73%);
  box-shadow:inset 0 0 0 2px #201920,inset 0 -9px 12px #0009;transition:background .14s;}
.equip-slot:hover,.equip-slot:focus-visible,.equip-slot.gp-focus{background:#3d2b2b;}
.slot-label{color:#e5c99f;letter-spacing:.05em;font-size:.62rem;}
.slot-empty {color:#72645e;}
#inv-bag-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;}
.bag-slot {width:auto;min-width:0;height:auto;aspect-ratio:1 / 1;min-height:43px;border-width:2px;border-style:solid;
  background:radial-gradient(ellipse at 50% 28%,#342933,#111015 75%);
  box-shadow:inset 0 0 0 2px #1c1720,inset 0 -8px 10px #0007;transition:background .13s;}
.bag-slot:hover,.bag-slot:focus-visible,.bag-slot.gp-focus{background:#47332e;}
.item-icon{image-rendering:pixelated;}
.drop-mini-btn{width:19px;height:19px;line-height:17px;font-weight:700;z-index:2;border:1px solid #ad624f;background:#471e1d;}
#panel-inventory #inv-gold {color:#ffdf9a!important;white-space:nowrap;}
#item-tooltip{width:min(300px,calc(100vw - 20px));padding:13px 16px;color:#f0e4d2;
  background:linear-gradient(180deg,#30252e,#101015);border:2px solid #be9460;
  box-shadow:inset 0 0 0 2px #0c0b0e,inset 0 0 0 4px #4b3525,0 12px 38px #000e;}
#item-tooltip.controller-docked{bottom:155px;max-height:min(55vh,450px);overflow-y:auto;}
.tt-name{font-size:1rem;line-height:1.35;text-shadow:0 1px 2px #070608;}
.tt-meta{color:#ddc59f;}
.tt-stat,.quest-reward {color:#a6cbf0;}
.tt-desc{color:#f2ce9e;line-height:1.5;}
.tt-hint{color:#f2d292;}
/* Quests / lore and character: readable scrollable manuscript, not cramped lists. */
#panel-quests>.gothic-panel{width:min(670px,94vw)!important;}
#quests-list {max-width:100%;}
.quest-card {padding:14px 16px;margin-bottom:11px;
  background:linear-gradient(125deg,#302630a6,#17141bbd);
  border:1px solid #71563d;border-left:3px solid #be965e;
  box-shadow:inset 0 0 0 1px #2d2428,0 3px 10px #0006;}
.quest-card.completed{opacity:.9;border-left-color:#8cb68d;border-color:#658a65;}
.quest-top{color:#ebc687;flex-wrap:wrap;gap:7px;font-size:.95rem;}
.quest-desc{color:#e4d6c2;font-size:.86rem;line-height:1.6;overflow-wrap:anywhere;}
.quest-reward{font-size:.77rem;line-height:1.4;}
#quests-list li {line-height:1.6;}
.stat-row{min-height:37px;padding:7px 3px;border-bottom:1px solid #88705438;color:#e9dac4;gap:14px;}
.stat-val-wrap{color:#f2cf8f;}
.char-grid{gap:18px;}
.skill-branch,.skill-node,.sigil-card,.qol-action-row,.rune-forge-row,.forge-mats {
  background:linear-gradient(180deg,#2a2129,#15131a);border-color:#785c41;
  box-shadow:inset 0 0 0 1px #18121a;}
.skill-branch{padding:12px;}
.skill-node{padding:10px;}
.skill-node-desc,.sigil-desc{color:#ddcdb8;line-height:1.5;}
.branch-title,.sigil-ab-hdr,.ctrl-settings-title{color:#f3cb88;}
.forge-row{padding:10px 8px;border-bottom:1px solid #9a765336;gap:10px;flex-wrap:wrap;}
#heroes-slot-list>.forge-row,#heroes-class-list>.forge-row,
#endgame-tier-list>.forge-row,#endgame-mod-list>.forge-row{background:#1d171e;
  border:1px solid #70583f;padding:11px 12px;margin:7px 0 9px!important;}
/* Dialogue feels like a conversation, not a debug modal. */
.dialogue-panel{width:min(720px,95vw);}
.dialogue-content{gap:19px;}
.dialogue-portrait-frame{flex:0 0 118px;width:118px;height:118px;
  border:2px solid #bf9661;box-shadow:inset 0 0 0 2px #100d10,0 0 0 2px #3c2c28,0 10px 20px #000a;}
#dlg-npc-name{color:#f6d9a4!important;font-size:1.22rem;}
#dlg-npc-title{color:#d3af80!important;}
#dlg-npc-text{color:#f0e4d1!important;font-size:1rem!important;line-height:1.75!important;max-width:65ch;}
#dlg-actions{display:flex;flex-wrap:wrap;gap:9px;}
#dlg-actions .gothic-btn{min-height:41px;font-size:.86rem;}
/* Basic controls — accessible pointer targets and modern scrolling. */
#panel-settings>.gothic-panel{width:min(510px,95vw)!important;}
#panel-pause>.gothic-panel{width:min(520px,95vw)!important;}
#panel-map canvas{max-width:min(300px,75vw);}
.gothic-panel select,.gothic-panel input[type="number"],.gothic-panel input[type="text"]{
  min-height:35px;color:#f2dfc4;background:#21191f;border:1px solid #967451;font:inherit;
}
.gothic-panel input[type="range"]{accent-color:#dca86a;min-width:100px;max-width:150px;}
.gothic-panel input[type="checkbox"]{accent-color:#d5a668;min-width:18px;min-height:18px;}
.gothic-panel label{color:#ead8bd;}
.controls-list{gap:8px 15px;font-size:.83rem;}
.controls-list div{padding:7px 0;gap:12px;}
.controls-list strong{color:#f1d29f;text-align:right;}
/* Notifications and act cards remain concise and legible. */
#panel-act-banner{background:radial-gradient(circle at center,rgba(23,14,19,.95),rgba(3,3,5,.99) 82%);}
#act-banner-title{text-shadow:0 3px 2px #000,0 0 35px #bf75384c;}
#btn-act-banner-continue{border:1px solid #bd945e;color:#ffe1ac;min-height:41px;}
#btn-act-banner-continue:hover,#btn-act-banner-continue:focus-visible{background:#463126;}
/* Accessibility: ensure visually clear focus; don't animate large layout surfaces. */
@media (prefers-reduced-motion:reduce){
  .gothic-btn,.mini-btn,.bag-slot,.equip-slot,.close-x{transition:none!important;}
  .modal-backdrop{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
}
@media (max-width:850px){
  .gothic-panel {padding:16px 17px 18px;max-width:97vw;max-height:93dvh;}
  .hud-bottom{gap:7px;padding:8px;margin-bottom:4px;}
  .hud-center{width:min(600px,73vw);}
  .hud-mini-btns{grid-template-columns:repeat(4,minmax(0,1fr));}
  .orb-wrap{width:56px;height:56px;border-width:3px;}
  .skill-slot{width:42px;height:44px;}
  .pot-btn{width:37px;height:44px;}
  .portrait-frame{width:42px;height:44px;}
  .inv-layout{grid-template-columns:minmax(0,1fr);gap:14px;}
  #inv-equip-grid{grid-template-columns:repeat(5,minmax(0,1fr));}
  .equip-slot{height:54px;}
  .char-grid,.skills-grid{grid-template-columns:1fr;min-width:0;}
  .dialogue-portrait-frame{flex-basis:88px;width:88px;height:88px;}
}
@media (max-width:570px){
  .gothic-panel {padding:14px 13px 16px;}
  .panel-header h2{font-size:1rem;letter-spacing:.05em;}
  .panel-header h2::before{margin-right:5px;}
  .hud-bottom{gap:4px;width:100%;margin:0;border-left:0;border-right:0;justify-content:center;}
  .hud-center{width:calc(100vw - 102px);}
  .hud-mini-btns{grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;}
  .hud-mini-btns .mini-btn{font-size:.60rem;padding:5px 1px;}
  .orb-wrap{width:45px;height:45px;border-width:2px;}
  .orb-text{font-size:.60rem;}
  .skill-bar{gap:3px;}
  .skill-slot{width:clamp(31px,8vw,39px);height:39px;font-size:.57rem;}
  .skill-key{font-size:.54rem;}
  .portrait-frame{width:34px;height:38px;}
  .pot-btn{width:30px;height:38px;font-size:.54rem;}
  #inv-equip-grid{grid-template-columns:repeat(5,minmax(0,1fr));}
  #inv-bag-grid{gap:4px;}
  .bag-slot{min-height:0;}
  #panel-inventory .panel-header>div{gap:5px!important;flex-wrap:wrap;}
  .dialogue-content{gap:9px;}
  .dialogue-portrait-frame{flex:0 0 69px;width:69px;height:69px;}
  #dlg-npc-text{font-size:.86rem!important;line-height:1.55!important;}
  #item-tooltip.controller-docked{bottom:190px;right:7px;}
  .controls-list{grid-template-columns:1fr;}
}
/* Title composition is intentionally unchanged: only the HTML button finish and version are refined. */
#screen-menu .menu-box{border-color:#8d6242;
  box-shadow:0 0 0 3px rgba(10,4,9,.83),inset 0 0 0 2px #38261f,
    inset 0 0 32px rgba(137,66,29,.14),0 -8px 48px rgba(0,0,0,.72);}
#screen-menu .gothic-btn{border-color:#9e7048;
  color:#eed9b9;background:linear-gradient(180deg,#38252b,#1c131a);
  text-shadow:0 1px 3px #000;}
#screen-menu .gothic-btn:hover:not(:disabled),#screen-menu .gothic-btn:focus-visible{
  color:#fff0d2;border-color:#f4c785;background:linear-gradient(180deg,#64402c,#2e1d1a);}
#screen-menu .game-version{color:#d7bd98;letter-spacing:.23em;
  font-size:clamp(.62rem,1.25vh,.75rem);margin:1px 0 clamp(8px,1.3vh,13px);}

/* v0.3.4.2 carbon-steel identity restored from production */
:root{--ui-abyss:#06070a;--ui-obsidian:#0d0f14;--ui-charcoal:#14171f;--ui-steel:#1d212b;--ui-iron:#353b47;--ui-iron-light:#565e6e;--ui-silver:#8f96a4;--ui-bone:#e3e0d9;--ui-dim:#9ea3ae;--ui-copper:#6c5c49;--ui-gold:#c99c58;--ui-gold-bright:#e4be7a;--ui-ember:#cf6f34;--ui-crimson:#9e242c;--ui-crimson-bright:#d13d46;--ui-rune:#6fb8ab;--ui-violet:#8a75ad;--ui-danger:#d97478;--gold-dim:var(--ui-iron-light);--gold-bright:var(--ui-gold);--parchment:var(--ui-bone);--muted:var(--ui-dim)}.modal-backdrop:not(#panel-act-banner){background:radial-gradient(ellipse 68% 82% at 50% 44%,rgba(16,18,26,.76),rgba(3,4,7,.92));backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)}.gothic-panel{position:relative;scrollbar-color:#535b6a #0f1117;scrollbar-width:thin;color:var(--ui-bone);background:linear-gradient(135deg,transparent 8px,rgba(155,164,180,.14) 9px,transparent 10px) left top/40px 40px no-repeat,linear-gradient(225deg,transparent 8px,rgba(155,164,180,.14) 9px,transparent 10px) right top/40px 40px no-repeat,repeating-linear-gradient(0deg,rgba(220,226,238,.012) 0px,rgba(220,226,238,.012) 1px,transparent 1px,transparent 4px),radial-gradient(ellipse at 50% -10%,rgba(116,30,38,.18),transparent 54%),linear-gradient(168deg,#1b1f28,#11131a 52%,#090a0e 100%);border:2px solid #59606f;border-radius:2px;box-shadow:inset 0 0 0 2px #0d0f15,inset 0 0 0 4px #2c313c,inset 0 0 0 5px rgba(7,8,12,.96),inset 0 -42px 52px rgba(0,0,0,.35),0 0 0 3px #07080c,0 0 0 4px #252933,0 24px 85px rgba(0,0,0,.96);padding:22px 25px 24px;max-height:min(90dvh,950px)}.gothic-panel::before{content:"";pointer-events:none;position:absolute;left:18px;right:18px;top:7px;height:1px;background:linear-gradient(90deg,transparent 0%,#49505e 10%,#a8b0be 50%,#49505e 90%,transparent 100%);opacity:.55}.panel-header{position:relative;min-height:42px;padding:4px 0 13px;margin-bottom:17px;border-bottom:1px solid #393f4c;flex-wrap:wrap}.panel-header::after{content:"◆";position:absolute;left:50%;bottom:-9px;transform:translateX(-50%);background:#12151c;color:#8e96a6;font-size:10px;padding:0 10px;line-height:15px}.panel-header h2{font-size:clamp(1rem,1.65vw,1.35rem);font-weight:600;line-height:1.33;letter-spacing:.11em;color:var(--ui-gold-bright);text-shadow:0 2px 6px #040508;text-transform:uppercase}.panel-header h2::before{content:"✦";color:#9e2a32;font-size:.8em;margin-right:10px}.close-x{width:34px;height:34px;min-width:34px;background:linear-gradient(180deg,#262a35,#13161d);color:#d8dce4;font-size:1.22rem;border:1px solid #596070;box-shadow:inset 0 0 0 2px #11131a;transition:background .15s,color .15s,border-color .15s}.close-x:hover,.close-x:focus-visible{background:#4d1a20;border-color:#d14a52;color:#fff}.gothic-btn,.mini-btn,.pot-btn,.skill-slot,#btn-act-banner-continue,button[data-close-panel]{touch-action:manipulation}.gothic-btn{font-weight:600;color:#e4e2dc;letter-spacing:.115em;border:1px solid #565e6d;background:linear-gradient(180deg,#252a35 0%,#1a1e27 14%,#12151c 56%,#0d0f15 100%);box-shadow:inset 0 0 0 2px rgba(8,9,13,.95),inset 0 1px 0 rgba(196,204,218,.15),0 3px 0 #07080b,0 5px 15px #000a;text-shadow:0 1px 2px #040508;min-height:38px}.gothic-btn:hover:not(:disabled),.gothic-btn:focus-visible{background:linear-gradient(180deg,#3d1a20,#241218 48%,#170d12);color:#f5f0e6;border-color:#c99c58;box-shadow:inset 0 0 0 2px #1c0f13,inset 0 1px 0 rgba(226,188,122,.28),0 0 12px rgba(176,42,48,.28),0 3px 0 #07080b}.mini-btn{min-height:27px;padding:5px 10px;line-height:1.3;color:#d8dbe2;font-size:.70rem;border:1px solid #49505e;background:linear-gradient(180deg,#212630,#13161d);box-shadow:inset 0 1px 0 rgba(188,196,210,.12)}.mini-btn:hover,.mini-btn:focus-visible{background:#341c22;color:#f5e4c4;border-color:#c99c58}.mini-btn.qol-danger,.hero-del-btn{border-color:#8a2c34;color:#f0b6ba;background:linear-gradient(180deg,#2c1418,#190c0f)}.mini-btn.qol-danger:hover,.hero-del-btn:hover{border-color:#d14650;background:#4a1820;color:#fff}:is(button,select,input,[role="button"]):focus-visible{outline:3px solid #e4be7a;outline-offset:2px}body.input-mode-gamepad:is(button,select,input,[role="button"]):focus,.gp-focus{outline:3px solid #e6c280!important;outline-offset:2px!important;box-shadow:0 0 0 3px #0c0e14,0 0 0 5px #6f7787,0 0 16px rgba(201,156,88,.45)!important}button:disabled,.mini-btn:disabled{filter:saturate(.4);opacity:.52}.hud-top{padding:11px 10px;gap:7px}#hud-room-name,#hud-gold-pill,#hud-input-device,#hud-story-objective{border:1px solid #4b5260!important;color:#dcdfe6!important;background:linear-gradient(180deg,rgba(24,27,36,.95),rgba(10,11,16,.96))!important;box-shadow:inset 0 0 0 2px #0f1117,0 4px 14px #000a;text-shadow:0 1px 3px #040508}#hud-room-name{font-weight:700;padding:6px 20px;letter-spacing:.16em;color:#e6e2d8!important}#hud-gold-pill{color:#e4be7a!important;font-size:.85rem;padding:6px 15px;border-color:#69583e!important}#hud-gold-pill::before{content:"◆";font-size:11px;color:#c99c58;margin-right:8px}#hud-story-objective{border-color:#6e2b31!important;color:#e6d5be!important}#hud-target-bar,#boss-bar-wrap,#automap-overlay{border:1px solid #525968;background:linear-gradient(180deg,rgba(24,27,36,.96),rgba(9,10,15,.96));box-shadow:inset 0 0 0 2px #0f1117,0 8px 30px #000c}#boss-bar-wrap{border-color:#7d232a}#hud-toast{background:linear-gradient(180deg,#20242f,#0e1016);border:2px solid #6b7384;padding:10px 19px;color:#eceae4;box-shadow:0 7px 26px #000d}.hud-bottom{gap:13px;margin-bottom:10px;padding:11px 17px 12px;border:2px solid #586070;border-radius:2px;background:linear-gradient(180deg,rgba(26,30,39,.97),rgba(11,13,18,.985));box-shadow:inset 0 0 0 2px #0d0f15,inset 0 0 0 4px #2a2f3a,0 0 0 3px #06070a,0 -10px 36px #000e}.hud-center{min-width:0;width:min(650px,64vw);gap:8px}.hud-row{gap:9px}.orb-wrap{width:78px;height:78px;border:4px solid #535a68;box-shadow:inset 0 0 20px #000e,0 0 0 2px #0e1016,0 0 0 4px #2c313d,0 4px 10px #000}.orb-wrap::after{content:"";position:absolute;inset:3px;border-radius:50%;border:1px solid rgba(206,214,228,.24);background:radial-gradient(ellipse at 30% 20%,#ffffff16,transparent 48%);pointer-events:none}.orb-text{z-index:2;font-size:.78rem;letter-spacing:.01em;text-shadow:0 2px 4px #000,0 0 3px #000}.portrait-frame{height:52px;width:52px;border:2px solid #636b7a;box-shadow:inset 0 0 0 1px #08090d,0 0 0 2px #1c2029}.skill-bar{gap:5px}.skill-slot{width:49px;height:49px;min-width:0;padding:4px 2px 2px;background:linear-gradient(180deg,#222631,#101218);border:2px solid #4d5463;box-shadow:inset 0 0 0 2px #0e1016,inset 0 -7px 12px #0007;color:#e2e4ea;font-size:.65rem;font-weight:600}.skill-slot:hover,.skill-slot:focus-visible{border-color:#c99c58;color:#fff6e6;background:#2f191f}.skill-slot.active-buff{border-color:#6fb8ab;box-shadow:inset 0 0 0 2px #132524,0 0 10px rgba(111,184,171,.36)}.skill-key{color:#d8b87a;font-weight:700;font-size:.65rem}.pot-btn{width:42px;height:49px;border:2px solid #4e5564;background:#161922;font-weight:700}.pot-btn.hp{color:#f4a2a6;border-color:#8a2931;background:linear-gradient(180deg,#2a1418,#140b0e)}.pot-btn.mp{color:#a9d2eb;border-color:#3d658a;background:linear-gradient(180deg,#14202d,#0b111a)}.xp-track{height:13px;border:1px solid #4a5160;background:#0a0b10;box-shadow:inset 0 1px 4px #000}#xp-bar-fill{background:linear-gradient(90deg,#4c3d59,#7b6399,#9a82ba)}#xp-bar-label{color:#ece9f2;font-weight:700;text-shadow:0 1px 3px #000}.hud-mini-btns{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;width:100%}.hud-mini-btns .mini-btn{white-space:nowrap;overflow:hidden;text-overflow:clip;min-width:0;padding:5px 4px;font-size:.68rem;letter-spacing:.01em}#panel-inventory>.gothic-panel{width:min(780px,96vw)}.inv-layout{gap:22px;grid-template-columns:minmax(194px,235px) minmax(0,1fr);min-width:0}#inv-equip-grid{gap:7px}.equip-slot{height:60px;min-width:0;border-width:2px;border-style:solid;border-color:#444b58;background:radial-gradient(circle at 50% 15%,#212530,#0d0f14 75%);box-shadow:inset 0 0 0 2px #14171f,inset 0 -9px 12px #000a;transition:background .14s,border-color .14s}.equip-slot:hover,.equip-slot:focus-visible,.equip-slot.gp-focus{background:#2a1d24;border-color:#8f96a4}.slot-label{color:#b7becb;letter-spacing:.05em;font-size:.62rem}.slot-empty{color:#5d6472}#inv-bag-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}.bag-slot{width:auto;min-width:0;height:auto;aspect-ratio:1 / 1;min-height:43px;border-width:2px;border-style:solid;border-color:#444b58;background:radial-gradient(ellipse at 50% 28%,#232833,#0e1016 76%);box-shadow:inset 0 0 0 2px #13161e,inset 0 -8px 10px #0008;transition:background .13s,border-color .13s}.bag-slot:hover,.bag-slot:focus-visible,.bag-slot.gp-focus{background:#2d2026;border-color:#98a0b0}.item-icon{image-rendering:pixelated}.drop-mini-btn{width:19px;height:19px;line-height:17px;font-weight:700;z-index:2;border:1px solid #96323a;background:#3a1418;color:#f5cfd2}#panel-inventory #inv-gold{color:#e4be7a!important;white-space:nowrap}#item-tooltip{width:min(300px,calc(100vw - 20px));padding:13px 16px;color:#e5e3dc;background:linear-gradient(180deg,#1c2029,#0c0e13);border:2px solid #666e7e;box-shadow:inset 0 0 0 2px #090a0e,inset 0 0 0 4px #2a2f3b,0 12px 38px #000e}#item-tooltip.controller-docked{bottom:155px;max-height:min(55vh,450px);overflow-y:auto}.tt-name{font-size:1rem;line-height:1.35;text-shadow:0 1px 2px #050608}.tt-meta{color:#a8b0be}.tt-stat,.quest-reward{color:#8bc6bd}.tt-desc{color:#d5d2ca;line-height:1.5}.tt-hint{color:#d4b172}#panel-quests>.gothic-panel{width:min(670px,94vw)!important}#quests-list{max-width:100%}.quest-card{padding:14px 16px;margin-bottom:11px;background:linear-gradient(125deg,rgba(29,33,43,.86),rgba(14,16,22,.92));border:1px solid #3f4552;border-left:3px solid #9e2a32;box-shadow:inset 0 0 0 1px #191d26,0 3px 10px #0007}.quest-card.completed{opacity:.9;border-left-color:#6fb8ab;border-color:#3c615b}.quest-top{color:#e4be7a;flex-wrap:wrap;gap:7px;font-size:.95rem}.quest-desc{color:#d8dadf;font-size:.86rem;line-height:1.6;overflow-wrap:anywhere}.quest-reward{font-size:.77rem;line-height:1.4}#quests-list li{line-height:1.6}.stat-row{min-height:37px;padding:7px 3px;border-bottom:1px solid rgba(110,120,138,.22);color:#d9dce3;gap:14px}.stat-val-wrap{color:#e4be7a}.char-grid{gap:18px}.skill-branch,.skill-node,.sigil-card,.qol-action-row,.rune-forge-row,.forge-mats{background:linear-gradient(180deg,#1a1e27,#101218);border-color:#444b59;box-shadow:inset 0 0 0 1px #14171f}.skill-branch{padding:12px}.skill-node{padding:10px}.skill-node-desc,.sigil-desc{color:#c9cdd6;line-height:1.5}.branch-title,.sigil-ab-hdr,.ctrl-settings-title{color:#d8b77a}.forge-row{padding:10px 8px;border-bottom:1px solid rgba(110,120,138,.2);gap:10px;flex-wrap:wrap}#heroes-slot-list>.forge-row,#heroes-class-list>.forge-row,#endgame-tier-list>.forge-row,#endgame-mod-list>.forge-row{background:#141720;border:1px solid #414856;padding:11px 12px;margin:7px 0 9px!important}.dialogue-panel{width:min(720px,95vw)}.dialogue-content{gap:19px}.dialogue-portrait-frame{flex:0 0 118px;width:118px;height:118px;border:2px solid #6b7384;box-shadow:inset 0 0 0 2px #0b0d12,0 0 0 2px #262b36,0 10px 20px #000b}#dlg-npc-name{color:#e6c589!important;font-size:1.22rem}#dlg-npc-title{color:#9ca3b0!important}#dlg-npc-text{color:#e4e2dc!important;font-size:1rem!important;line-height:1.75!important;max-width:65ch}#dlg-actions{display:flex;flex-wrap:wrap;gap:9px}#dlg-actions .gothic-btn{min-height:41px;font-size:.86rem}#panel-settings>.gothic-panel{width:min(510px,95vw)!important}#panel-pause>.gothic-panel{width:min(520px,95vw)!important}#panel-map canvas{max-width:min(300px,75vw)}.gothic-panel select,.gothic-panel input[type="number"],.gothic-panel input[type="text"]{min-height:35px;color:#e6e4de;background:#151821;border:1px solid #545c6c;font:inherit}.gothic-panel input[type="range"]{accent-color:#c99c58;min-width:100px;max-width:150px}.gothic-panel input[type="checkbox"]{accent-color:#b5363e;min-width:18px;min-height:18px}.gothic-panel label{color:#dcdfe6}.controls-list{gap:8px 15px;font-size:.83rem}.controls-list div{padding:7px 0;gap:12px}.controls-list strong{color:#d9bc82;text-align:right}#panel-act-banner{background:radial-gradient(circle at center,rgba(18,14,20,.95),rgba(3,4,7,.99) 82%)}#act-banner-title{text-shadow:0 3px 2px #000,0 0 32px rgba(158,36,44,.42)}#btn-act-banner-continue{border:1px solid #636b7a;color:#e6e2d8;min-height:41px;background:rgba(16,18,24,.9)}#btn-act-banner-continue:hover,#btn-act-banner-continue:focus-visible{background:#34181e;border-color:#c99c58;color:#fff}@media (prefers-reduced-motion:reduce){.gothic-btn,.mini-btn,.bag-slot,.equip-slot,.close-x{transition:none!important}.modal-backdrop{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}}@media (max-width:850px){.gothic-panel{padding:16px 17px 18px;max-width:97vw;max-height:93dvh}.hud-bottom{gap:7px;padding:8px;margin-bottom:4px}.hud-center{width:min(600px,73vw)}.hud-mini-btns{grid-template-columns:repeat(4,minmax(0,1fr))}.orb-wrap{width:56px;height:56px;border-width:3px}.skill-slot{width:42px;height:44px}.pot-btn{width:37px;height:44px}.portrait-frame{width:42px;height:44px}.inv-layout{grid-template-columns:minmax(0,1fr);gap:14px}#inv-equip-grid{grid-template-columns:repeat(5,minmax(0,1fr))}.equip-slot{height:54px}.char-grid,.skills-grid{grid-template-columns:1fr;min-width:0}.dialogue-portrait-frame{flex-basis:88px;width:88px;height:88px}}@media (max-width:570px){.gothic-panel{padding:14px 13px 16px}.panel-header h2{font-size:1rem;letter-spacing:.05em}.panel-header h2::before{margin-right:5px}.hud-bottom{gap:4px;width:100%;margin:0;border-left:0;border-right:0;justify-content:center}.hud-center{width:calc(100vw - 102px)}.hud-mini-btns{grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}.hud-mini-btns .mini-btn{font-size:.60rem;padding:5px 1px}.orb-wrap{width:45px;height:45px;border-width:2px}.orb-text{font-size:.60rem}.skill-bar{gap:3px}.skill-slot{width:clamp(31px,8vw,39px);height:39px;font-size:.57rem}.skill-key{font-size:.54rem}.portrait-frame{width:34px;height:38px}.pot-btn{width:30px;height:38px;font-size:.54rem}#inv-equip-grid{grid-template-columns:repeat(5,minmax(0,1fr))}#inv-bag-grid{gap:4px}.bag-slot{min-height:0}#panel-inventory .panel-header>div{gap:5px!important;flex-wrap:wrap}.dialogue-content{gap:9px}.dialogue-portrait-frame{flex:0 0 69px;width:69px;height:69px}#dlg-npc-text{font-size:.86rem!important;line-height:1.55!important}#item-tooltip.controller-docked{bottom:190px;right:7px}.controls-list{grid-template-columns:1fr}}#screen-menu .menu-box{border-color:#4b515f;background:linear-gradient(180deg,rgba(11,12,17,.985),rgba(7,8,12,.99));box-shadow:0 0 0 3px rgba(6,7,11,.88),inset 0 0 0 2px #242833,inset 0 0 34px rgba(138,32,38,.14),0 -8px 48px rgba(0,0,0,.78)}#screen-menu .game-subtitle{color:#b97c5b}#screen-menu .gothic-btn{border-color:#535b6a;color:#e5e3dc;background:linear-gradient(180deg,#222631,#11131a);text-shadow:0 1px 3px #000}#screen-menu .gothic-btn:hover:not(:disabled),#screen-menu .gothic-btn:focus-visible{color:#f7f1e6;border-color:#c99c58;background:linear-gradient(180deg,#401b21,#1d0f14)}#screen-menu .game-version{color:#9ea5b3;letter-spacing:.23em;font-size:clamp(.62rem,1.25vh,.75rem);margin:1px 0 clamp(8px,1.3vh,13px)}#screen-menu .menu-music-toggle{border-color:#4f5665;background:rgba(11,13,18,.94);color:#d2d6df}#screen-menu .menu-music-toggle:hover,#screen-menu .menu-music-toggle:focus-visible{border-color:#c99c58;color:#f3d8a3}

/* v0.3.4.3 KEEPERS PACK: large backpack with controller-safe scroll */
#panel-inventory .gothic-panel {width:min(860px,96vw);max-height:94dvh;overflow-y:auto;}
#panel-inventory .inv-layout {grid-template-columns:minmax(190px,245px) minmax(0,1fr);min-width:0;align-items:start;}
#inv-bag-grid {display:grid;grid-template-columns:repeat(8,minmax(0,46px));gap:5px;
   max-height:56dvh;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;
   scrollbar-color:#7c8796 #11161e;padding:6px 5px 10px 3px;scroll-padding:12px;
   overscroll-behavior:contain;align-content:start;}
#inv-bag-grid .bag-slot {width:44px;height:44px;flex-shrink:0;}
.item-icon {background-size:2048px 32px !important; image-rendering:pixelated;}
#inv-capacity {color:#d4e0ec;font-variant-numeric:tabular-nums;white-space:nowrap;}
#inv-bag-grid .bag-slot.gp-focus,#inv-bag-grid .bag-slot:focus-visible {outline:3px solid #c4e3ed;outline-offset:-2px;z-index:1;}
@media (max-width:690px) {
  #panel-inventory .inv-layout{grid-template-columns:1fr;}
  #inv-bag-grid{max-height:47dvh;}
}
@media (max-width:440px) {
  #inv-bag-grid {grid-template-columns:repeat(6,minmax(0,44px));}
}
