*{box-sizing:border-box}html,body{margin:0;overflow:hidden;background:#070909;color:#d2c6ac;font-family:Georgia,'Times New Roman',serif;height:100%;user-select:none}button{font-family:inherit;color:#c7b993;cursor:pointer;background:linear-gradient(#282822,#131514);border:1px solid #61523c;padding:12px 18px;letter-spacing:1.5px;transition:filter .2s}button:hover{filter:brightness(1.45);border-color:#bd9559}button:focus-visible{outline:2px solid #e6bb6b;outline-offset:3px}[hidden]{display:none!important}canvas{display:block;width:100%;height:100%;touch-action:none}header{position:absolute;top:0;left:0;right:0;display:flex;align-items:start;justify-content:space-between;padding:25px 30px;background:linear-gradient(#080a0ce8,transparent);pointer-events:none}header nav{display:flex;gap:8px;pointer-events:auto}header button{font-size:10px;padding:10px}.brand{font-size:17px;letter-spacing:3px;text-shadow:0 2px #000}.brand span{color:#a88040}.brand small{display:block;font-size:9px;letter-spacing:5px;margin-top:8px;color:#8a806d}.location{text-align:center;letter-spacing:3px;font-size:12px}.location small{display:block;color:#908b7c;letter-spacing:.5px;margin-top:9px;font-size:12px}kbd{font:9px Arial;color:#a99b82;border:1px solid #554d3c;padding:3px}#quest{position:absolute;left:30px;top:118px;pointer-events:none;max-width:230px;text-shadow:0 2px 4px #000}small{font-size:10px;letter-spacing:2px;color:#a3906c}#quest h3{font-size:16px;font-weight:normal;margin:12px 0}#quest p,#kills{font:12px/1.7 Georgia;color:#929383;margin:4px 0}#kills{color:#b7975d}#hud{position:absolute;bottom:0;left:50%;transform:translateX(-50%);display:flex;align-items:end;gap:23px;padding:14px 35px 8px;background:linear-gradient(0deg,#0b0d0dfc 60%,#171815f0);border:1px solid #554b36;border-bottom:0;box-shadow:0 0 0 4px #0b0c0b,0 -12px 60px #0009;clip-path:polygon(3% 0,97% 0,100% 14%,100% 100%,0 100%,0 14%)}.orb-wrap{text-align:center}.orb-wrap>small{font-size:9px;display:block;margin:6px}.orb{width:112px;height:112px;border-radius:50%;border:7px ridge #6b624e;background:#160e0e;position:relative;overflow:hidden;box-shadow:0 0 0 3px #131211,0 0 22px #000,inset 0 0 20px #000}.orb>div{position:absolute;bottom:0;width:100%;height:100%;transition:height .2s}.health>div{background:radial-gradient(ellipse at 30% 25%,#ef5c42,#a50913 52%,#33080a)}.mana>div{background:radial-gradient(ellipse at 30% 25%,#64b8e9,#174e9e 52%,#080f39)}.orb:after{content:'';position:absolute;inset:0;border-radius:50%;box-shadow:inset -9px -10px 16px #000b,inset 5px 5px 12px #ffffff27;background:radial-gradient(ellipse at 30% 20%,#fff8,transparent 20%)}.orb b{position:absolute;bottom:25px;left:0;right:0;font:11px Georgia;z-index:2;text-shadow:0 1px 3px #000}.centerhud{width:420px}.levelrow{display:flex;justify-content:space-between;font-size:9px;letter-spacing:1.2px;margin-bottom:7px}.xp{height:4px;background:#25241c;margin-bottom:11px}.xp i{height:100%;display:block;background:#a78b42;width:0}.skills{display:flex;gap:6px}.skills button{position:relative;flex:1;padding:7px 2px 5px;background:radial-gradient(#33352b,#151712);border:1px solid #716145}.skills kbd{position:absolute;top:-5px;left:5px;background:#141513;border:0;font-size:8px;padding:0 3px}.skills strong{font-size:29px;display:block;line-height:35px;text-shadow:0 0 15px #d5c099}.skills span{font:8px Georgia;letter-spacing:1px}.skills .fire{color:#ff934a}.skills .ice{color:#a1d2e1}.skills .potion{color:#e24748}.controls{font:8px Arial;text-align:center;color:#847e6f;letter-spacing:.8px;margin:12px 0 0}.controls em{margin:0 4px}#toast{position:absolute;top:27%;left:50%;transform:translateX(-50%);color:#eac178;font-size:17px;text-align:center;text-shadow:0 2px 4px #000;pointer-events:none;transition:opacity .5s}#floorBanner{position:absolute;top:35%;width:100%;text-align:center;font-size:32px;letter-spacing:7px;color:#d8c299;pointer-events:none;text-shadow:0 2px 10px #000;transition:opacity 2s}#bossbar{position:absolute;top:100px;left:50%;transform:translateX(-50%);width:340px;text-align:center;font-size:11px;letter-spacing:2px}#bossbar>div{height:9px;border:1px solid #8e6743;background:#191111;margin-top:9px;padding:2px}#bossbar i{display:block;height:100%;background:#a5221c}.panel{position:absolute;right:20px;top:88px;bottom:165px;width:345px;overflow:auto;background:linear-gradient(140deg,#25261fed,#0d100ff7);border:1px solid #6b5b3e;box-shadow:0 8px 80px #000;padding:27px;z-index:4}.panel h2{font-size:30px;margin:12px 0}.panel h4{font-weight:normal}.panel h4 small{display:block;margin-top:5px;letter-spacing:0}.close{float:right;padding:4px 7px}.panel p{font-size:12px;line-height:1.7}.item{display:block;width:100%;text-align:left;padding:12px;margin-bottom:7px;font-size:12px;letter-spacing:.3px}.item span{display:block;font-size:10px;color:#aaa38e;margin-top:5px}.muted{color:#817f72}.overlay{position:absolute;inset:0;z-index:10;background:#080a09;display:flex;align-items:center;justify-content:center;text-align:center}.menuart{position:absolute;inset:0;background:linear-gradient(0deg,#060807 0%,#06080744 50%,#06080733),url('/og.png') center 38%/cover no-repeat;opacity:.8}.menutext{position:relative;padding-top:140px;text-shadow:0 2px 20px #000}.menutext>small{letter-spacing:6px;color:#bdac8a}.menutext h1{font-weight:normal;font-size:58px;line-height:.96;letter-spacing:11px;color:#d2af74;text-shadow:0 3px 0 #332719,0 0 40px #000;margin:24px 0 15px}.menutext h1 span{display:block;font-size:36px;letter-spacing:8px;margin-top:10px}.tagline{font-size:16px;font-style:italic;color:#b6aa92}.rule{width:120px;height:1px;background:#8b6738;margin:23px auto}.intro{font-size:14px;line-height:1.8;color:#aba795}.primary{display:block;min-width:280px;margin:26px auto 12px;padding:18px 27px;border:1px solid #ac7e47;box-shadow:inset 0 0 0 3px #201b13,0 0 35px #a24f1118;background:linear-gradient(#5b3b20,#2d2014);color:#efc994;font-size:12px;letter-spacing:3px}.primary span{margin-left:25px}.menunote{font:9px Arial;letter-spacing:2px;color:#8d8069;margin-top:24px}.menufoot{position:absolute;bottom:23px;left:30px;right:30px;display:flex;justify-content:space-between;color:#797666;font:9px Arial;letter-spacing:2px}.compact{background:#040707df;backdrop-filter:blur(7px)}.compact h2{font-size:48px;font-weight:normal;color:#d3b47d}.compact p{font-size:14px;color:#aba693;line-height:1.9}.compact button:not(.primary){display:block;margin:auto}#touchmove{display:none;position:absolute;bottom:185px;left:16px;text-align:center}#touchmove button{padding:12px;background:#101613bb}.artloaded h1{visibility:hidden}.artloaded .menutext{padding-top:200px}.artloaded .menutext>small{visibility:hidden}@media(max-width:800px){header{padding:16px}.location{display:none}header nav button{font-size:8px;padding:8px}.brand{font-size:11px}.brand small{font-size:7px;letter-spacing:2px}#quest{top:80px;left:17px}#quest h3{font-size:13px}#hud{gap:10px;padding:12px 14px 5px;width:98%;justify-content:center}.orb{width:70px;height:70px;border-width:5px}.orb b{font-size:9px;bottom:18px}.centerhud{width:320px;max-width:60vw}.skills strong{font-size:24px}.skills span{font-size:6px;letter-spacing:0}.controls{font-size:6px;letter-spacing:0}.menutext h1{font-size:40px}.menutext h1 span{font-size:27px}.intro{font-size:12px}.menufoot{font-size:7px;letter-spacing:.7px}.panel{top:75px;bottom:150px;right:10px;width:310px}#bossbar{top:78px;width:260px}#floorBanner{font-size:23px}.menunote{font-size:7px}}@media(pointer:coarse){#touchmove{display:block}.controls{visibility:hidden}}
.artloaded .menutext{padding:0;margin-bottom:74px;align-self:flex-end}.artloaded .menutext h1,.artloaded .menutext>small{display:none}.artloaded .tagline{font-size:18px}.artloaded .intro{color:#c5bca7;text-shadow:0 2px 8px #000}.artloaded .rule{margin:16px auto}.menuart{opacity:1}.artloaded .primary{margin-top:20px}.skills button:active{filter:brightness(1.8)}@media(max-height:650px){.artloaded .menutext{margin-bottom:35px}.artloaded .intro,.artloaded .rule,.artloaded .menunote{display:none}.menufoot{bottom:10px}#hud{transform:translateX(-50%) scale(.85);transform-origin:bottom center}#quest{top:70px}}@media(max-width:550px){#quest{max-width:145px}#quest h3{max-width:125px}.menutext{max-width:95%}.menufoot span{max-width:180px;text-align:right}.artloaded .menutext{margin-bottom:60px}.menuart{background-position:center top}.artloaded .intro br{display:none}.artloaded .intro{padding:0 22px}.orb{width:55px;height:55px}.orb b{font-size:8px;bottom:13px}#hud{padding-left:7px;padding-right:7px;gap:7px}.centerhud{max-width:64vw}.skills button{min-width:0}.skills kbd{font-size:7px;left:0}#touchmove{bottom:140px}}

.stamina{display:flex;gap:8px;align-items:center;margin:4px 0 9px}.stamina>div{height:5px;flex:1;background:#26251b}.stamina>div>i{display:block;background:#b5a06d;height:100%;width:100%}.stamina button{font:8px Georgia;padding:3px 5px;letter-spacing:0}

.skills .potion img{height:32px;width:auto;image-rendering:pixelated}.stamina button img{height:18px;vertical-align:middle;image-rendering:pixelated;margin-right:4px}

#inventory{width:440px;padding:24px;top:74px;bottom:190px;background:linear-gradient(120deg,#24231ef7,#0c0d0afc);border:3px ridge #796549}#inventory h2{font-size:25px;margin:8px 0}#equipped{display:flex;justify-content:center;gap:24px;margin:16px 0}.equipment-slot{position:relative;width:108px;height:152px;padding:15px 8px 2px;border:2px ridge #685c42;background:radial-gradient(#34352b,#11120f);font-size:10px;letter-spacing:.5px}.equipment-slot>small{position:absolute;top:5px;left:0;right:0;font-size:8px;letter-spacing:1px}.equipment-slot>span{color:#807763}.equipment-icon{width:100%;height:100%;object-fit:contain;pointer-events:none}.bag-heading{display:flex;justify-content:space-between;font-size:10px;margin:18px 0 8px;color:#d2b970}#items{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));grid-template-rows:repeat(4,36px);gap:0;border:2px ridge #75634a;background:#090b08}.bag-cell{padding:0;border:1px solid #3b3d30;background:linear-gradient(130deg,#141911,#0c100b);min-width:0;min-height:0;letter-spacing:0}.bag-item{z-index:1;padding:2px;border:1px solid #607048;background:#26332088;min-width:0;min-height:0;overflow:hidden;cursor:grab}.bag-item.rare{background:#69532066;border-color:#a58c42}.bag-item.selected{outline:2px solid #e3c47b;outline-offset:-2px;filter:brightness(1.2)}#itemDetail{min-height:40px;color:#d6c49b;font-size:12px}.bag-actions{display:flex;gap:8px}.bag-actions button{flex:1;font-size:10px;padding:10px}.bag-actions button:disabled{opacity:.35;cursor:default}#overflow{display:flex;gap:4px;flex-wrap:wrap;margin-top:10px}.overflow-item{width:48px;height:80px}#inventory .muted{font-size:10px}@media(max-width:600px){#inventory{right:6px;width:calc(100% - 12px);max-width:440px;top:62px;bottom:140px;padding:16px}#items{grid-template-rows:repeat(4,30px)}.equipment-slot{height:112px;width:88px}#equipped{margin:10px 0}}

.coop-menu{margin:16px auto 0;max-width:410px;padding-top:14px;border-top:1px solid #94774755}.coop-menu small{font-size:10px;color:#b2b29b;line-height:1.6;display:block}.coop-menu>button{width:100%}.join-row{display:flex;gap:6px;margin:8px 0}.join-row input{width:100%;min-width:0;background:#111711;color:#e7d7b0;border:1px solid #645f46;padding:10px;font:12px Georgia}.join-row button{margin:0;padding:9px 14px}.stats-link{position:fixed;bottom:9px;right:15px;z-index:45;color:#b9bcaa;font:10px Georgia;letter-spacing:1px}#coopBar{position:fixed;z-index:55;top:78px;left:50%;transform:translateX(-50%);background:#101913ed;border:1px solid #7e8863;padding:8px 12px;max-width:90vw;display:flex;align-items:center;gap:12px;font:11px Georgia;color:#d1e8cb}#coopBar[hidden]{display:none}#coopBar button{font-size:10px;white-space:nowrap;padding:6px}#partyStatus{color:#d8bd79;white-space:nowrap}.menutext{max-height:94vh;overflow-y:auto}@media(max-width:700px){#coopBar{top:60px;flex-wrap:wrap;width:90%;gap:6px}#coopStatus{flex-basis:100%;order:4}.coop-menu{margin-top:10px}.stats-link{bottom:3px;font-size:9px}.menufoot{display:none}}

/* Original CSS resource vessels and etched flask icons; no imported game artwork. */
.orb{border-radius:24% 24% 38% 38%;border:5px solid #70654d;box-shadow:0 0 0 2px #181e17,inset 0 0 20px #000;background:#121a16}.orb:after{border-radius:18% 18% 34% 34%;background:repeating-linear-gradient(115deg,transparent 0 22px,#dbc58e12 23px 24px)}.health>div{background:radial-gradient(ellipse at 35% 15%,#efaa58,#b9512f 58%,#492216)}.mana>div{background:radial-gradient(ellipse at 35% 15%,#b1ead0,#438579 58%,#173b37)}
.flask-icon{display:inline-block!important;position:relative;width:19px;height:24px;border:2px solid #c4b98e;border-radius:3px 3px 7px 7px;background:linear-gradient(0deg,#c5663b 0 65%,#17241f 65%);vertical-align:middle;margin:4px 5px}.flask-icon:before{content:'';position:absolute;left:4px;top:-8px;width:7px;height:7px;border:2px solid #c4b98e;border-bottom:0;background:#283028}.flask-icon:after{content:'';position:absolute;left:3px;top:5px;width:2px;height:10px;background:#ffffff66}.flask-icon.mana-flask{background:linear-gradient(0deg,#559d87 0 65%,#17241f 65%)}

#boonChoices{display:grid;gap:12px;margin:20px 0}#boonChoices button{max-width:470px}#boonChoices button:disabled{opacity:.5;cursor:default}

#skillPanel{width:480px;max-width:calc(100vw - 24px);right:18px;top:88px;bottom:175px;padding:24px;overflow-y:auto}#skillPanel h2{margin:8px 0;font-weight:normal;font-size:32px}#skillPoints{color:#dfc587}.skill-choice{display:flex;align-items:center;gap:14px;padding:18px 0;border-top:1px solid #66573b}.skill-choice>div{flex:1}.skill-choice strong{font-size:13px;letter-spacing:2px}.skill-choice strong span{float:right;font:12px Georgia;color:#aeb595}.skill-choice p{font-size:12px;line-height:1.6;color:#b3b6a7;margin:8px 0}.skill-choice small{font-size:10px;letter-spacing:.3px;line-height:1.6}.skill-choice button{padding:10px;font-size:10px;white-space:nowrap}#skillPanel button:disabled{opacity:.4;cursor:default}#resetSkills{width:100%;font-size:10px}#skillPanel .muted{font-size:11px;line-height:1.7}header nav{flex-wrap:wrap;justify-content:flex-end}@media(max-width:700px){#skillPanel{top:110px;bottom:140px;right:8px;padding:18px}.skill-choice{padding:14px 0}header nav{max-width:240px;gap:4px}}
/* Header rows own party placement; measured height follows wrapping and rotation. */
:root{--header-h:88px}
#hudHeader{position:fixed;display:grid;grid-template-columns:minmax(0,1fr);gap:8px;z-index:5;padding-bottom:8px}
.header-main{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-width:0}
.header-main>.location{flex:1;min-width:0}
.header-main>nav{flex-shrink:0}
#hudHeader #coopBar{position:static;z-index:auto;transform:none;top:auto;left:auto;margin:0 auto;width:max-content;max-width:100%;flex-wrap:wrap;justify-content:center;pointer-events:auto;gap:6px 10px}
:where(body:has(#hudHeader)) #quest{top:calc(var(--header-h) + 16px)}
:where(body:has(#hudHeader)) #bossbar{top:calc(var(--header-h) + 8px)}
:where(body:has(#hudHeader)) .panel,:where(body:has(#hudHeader)) #inventory,:where(body:has(#hudHeader)) #skillPanel{z-index:20;top:calc(var(--header-h) + 8px)}
:where(body:has(#hudHeader)) .overlay{z-index:40;overflow-y:auto;padding:12px}
:where(body:has(#hudHeader)) .overlay.compact>div{max-height:calc(100dvh - 24px);overflow-y:auto;max-width:100%;padding:8px}
:where(body:has(#hudHeader)) .stats-link{z-index:3}
@media(max-width:1000px){.header-main>.location{display:none}}
@media(max-width:700px){
 #hudHeader{padding:10px 12px 8px;gap:6px}
 .header-main{display:grid;gap:6px}
 #hudHeader .brand small{display:none}
 .header-main>nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));width:100%;max-width:none;gap:4px}
 .header-main>nav button{min-width:0;padding:8px 2px;letter-spacing:0;font-size:8px}
 .header-main>nav kbd{display:none}
 #hudHeader #coopBar{width:100%;padding:6px;gap:4px 8px}
 #hudHeader #coopBar button{letter-spacing:.6px}
 #hudHeader #coopStatus{flex-basis:100%;order:4;line-height:1.35;overflow-wrap:anywhere}
 :where(body:has(#hudHeader)) .panel,:where(body:has(#hudHeader)) #inventory,:where(body:has(#hudHeader)) #skillPanel{left:8px;right:8px;width:auto;max-width:none;bottom:8px;max-height:none;padding:16px}
}
@media(pointer:coarse){
 #hudHeader nav button,#hudHeader #coopBar button,:where(body:has(#hudHeader)) .panel .close{min-height:44px;min-width:44px;touch-action:manipulation}
}
@media(max-height:480px){
 :where(body:has(#hudHeader)) .panel,:where(body:has(#hudHeader)) #inventory,:where(body:has(#hudHeader)) #skillPanel{top:calc(var(--header-h) + 4px);bottom:8px;max-height:none;padding:12px}
 #hudHeader{padding-top:8px}
 :where(body:has(#hudHeader)) #quest h3,:where(body:has(#hudHeader)) #quest p{display:none}
 :where(body:has(#hudHeader)) .overlay.compact h2{font-size:30px;margin:8px 0}
 :where(body:has(#hudHeader)) .overlay.compact .primary{margin:12px auto;padding:12px}
}
/* Keep discovery available on the title screen, below gameplay modals otherwise. */
:where(body:has(#hudHeader):has(#menu:not([hidden]))) .stats-link{z-index:45}
@media(max-height:480px){:where(body:has(#hudHeader)) #quest{display:none}}

/* Inline gear preview: scoped so older live pages retain their layout. */
#itemCompare{margin:8px 0 12px;border:1px solid #61523c;background:#0c0d0af0;padding:8px 10px}
#itemCompare table{width:100%;border-collapse:collapse;font-size:11px;color:#d6c49b}
#itemCompare caption{text-align:left;font-size:10px;letter-spacing:.5px;color:#a3906c;margin-bottom:6px;overflow-wrap:anywhere}
#itemCompare caption span{color:#d2b970}
#itemCompare th{font-weight:normal;letter-spacing:.5px;font-size:10px;color:#b8a985;text-align:left}
#itemCompare td,#itemCompare th{padding:4px 6px;border-top:1px solid #3b3d30}
#itemCompare thead th{border-top:0}
#itemCompare td{text-align:right;font-variant-numeric:tabular-nums}
#itemCompare .delta-up{color:#a9d18b}#itemCompare .delta-down{color:#f08b80}#itemCompare .delta-flat{color:#b7b3a3}
#compareNote{font-size:10px;color:#b8a985;margin:8px 0 0}
@media(max-width:600px){#itemCompare td,#itemCompare th{padding:3px 4px}}

.touch-only{display:none}
@media(pointer:coarse){
 body.touch-v2{--touch-size:56px;--touch-gap:4px;--touch-edge:8px}
 body.touch-v2 #hudHeader{padding-top:calc(10px + env(safe-area-inset-top));padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
 body.touch-v2 .touch-only{display:block}
 body.touch-v2 #touchmove{left:calc(var(--touch-edge) + env(safe-area-inset-left));bottom:calc(92px + env(safe-area-inset-bottom));z-index:6}
 body.touch-v2 #touchmove button{width:var(--touch-size);height:var(--touch-size);padding:0;font-size:20px;background:#101613dd;border-color:#9e855b;touch-action:none;-webkit-tap-highlight-color:transparent}
 body.touch-v2 #touchmove>div{display:flex;gap:var(--touch-gap);margin-top:var(--touch-gap)}
 body.touch-v2 #hud{left:0;width:100%;max-width:none;transform:none;clip-path:none;gap:8px;align-items:center;padding:6px 8px calc(6px + env(safe-area-inset-bottom));z-index:6}
 body.touch-v2 #hud .skills{position:fixed;right:calc(var(--touch-edge) + env(safe-area-inset-right));bottom:calc(92px + env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(3,var(--touch-size));grid-auto-rows:var(--touch-size);gap:var(--touch-gap);z-index:6}
 body.touch-v2 #hud .skills button{min-width:48px;min-height:48px;padding:2px;background:radial-gradient(#33352bf0,#151712ed);touch-action:none;-webkit-tap-highlight-color:transparent}
 body.touch-v2 #hud .skills button[data-action=attack]{grid-area:2/3;border:2px solid #c6a160}
 body.touch-v2 #hud .skills strong{font-size:22px;line-height:25px}
 body.touch-v2 #hud .skills span{font-size:8px;letter-spacing:0}
 body.touch-v2 #hud .skills kbd{display:none}
 body.touch-v2 #hud .skills .is-held{filter:brightness(1.5);border-color:#f5d28d}
 body.touch-v2 #hud .orb{width:48px;height:48px;border-width:3px}
 body.touch-v2 #hud .orb b{font-size:8px;bottom:12px}
 body.touch-v2 #hud .controls,body.touch-v2 #hud kbd,body.touch-v2 #hudHeader kbd{display:none}
 body.touch-v2 #hud .orb-wrap>small{display:block;margin:2px;font-size:8px}
 body.touch-v2 #hud .centerhud{flex:1;width:auto;max-width:none}
 body.touch-v2 #hud .levelrow{font-size:8px;letter-spacing:0;margin-bottom:3px}
 body.touch-v2 #hud .stamina{gap:4px;margin:2px 0 4px}
 body.touch-v2 #hud .stamina button{min-height:44px;min-width:48px;font-size:9px;padding:3px}
 body.touch-v2 #hud .xp{margin:0}
 body.touch-v2 #hud .flask-icon{height:19px;width:15px;margin:3px}
 body.touch-v2 .touch-help{font-size:11px;line-height:1.6;color:#d6c49b;padding:0 12px}
 body.touch-v2 .stats-link{bottom:calc(82px + env(safe-area-inset-bottom));font-size:8px}
 body.touch-v2:has(.overlay:not([hidden])) #touchmove,body.touch-v2:has(.overlay:not([hidden])) #hud{visibility:hidden}
}
@media(pointer:coarse) and (max-width:370px){body.touch-v2{--touch-size:48px;--touch-edge:4px}}
@media(pointer:coarse) and (max-height:480px){
 body.touch-v2 #touchmove,body.touch-v2 #hud .skills{bottom:calc(8px + env(safe-area-inset-bottom))}
 body.touch-v2 #hud{left:28%;width:44%;transform:none}
 body.touch-v2 #hud .levelrow{font-size:8px}
 body.touch-v2 .stats-link{bottom:84px;right:40%;font-size:8px}
 body.touch-v2 .touch-help{display:none}
}

@media(pointer:coarse) and (max-height:480px) and (max-width:740px){
 body.touch-v2{--touch-size:48px;--touch-edge:4px}
 body.touch-v2 #hud{gap:4px;padding-left:4px;padding-right:4px}
 body.touch-v2 #hud .orb{width:40px;height:40px}
 body.touch-v2 #hud .orb b{font-size:7px;bottom:9px}
}

.graphics-settings{margin:14px auto;max-width:320px;text-align:left}
.graphics-settings label{display:block;font-size:11px;letter-spacing:2px;color:#c7b993;margin-bottom:6px}
.graphics-settings select{width:100%;min-height:44px;padding:10px 12px;background:#171b19;color:#e3d4b5;border:1px solid #61523c;font:14px Georgia}
.graphics-settings select:focus-visible{outline:2px solid #e6bb6b;outline-offset:3px}
.graphics-settings #graphicsStatus{font-size:12px;line-height:1.5;margin:6px 0;color:#bcb5a4}

/* Shared enemy/boss readout follows the measured header on phones and desktop. */
#bossbar{width:min(320px,calc(100vw - 32px));pointer-events:none;padding:9px 12px;background:#090b0be8;border:1px solid #61523c;box-shadow:0 3px 14px #0008;z-index:2}
#enemyName{display:block;color:#ead3a3;font-size:11px;letter-spacing:1.5px}
#enemyState{display:block;min-height:12px;margin-top:4px;color:#e5b779;font:9px Georgia;letter-spacing:1px}
#bossbar>div{margin-top:4px;height:10px}
#enemyLife{display:block;margin-top:4px;font:10px Georgia;letter-spacing:.5px;color:#ddd1b7}
@media(max-height:480px){#bossbar{padding:4px 8px;width:240px}#enemyState{display:none}#enemyLife{margin-top:2px}}
/* Combat readout temporarily replaces the quest aside instead of covering it. */
body:has(#bossbar:not([hidden])) #quest{visibility:hidden}

.tempering{margin:14px 0;padding:12px 0;border-top:1px solid #61523c;border-bottom:1px solid #61523c}
.tempering button{display:block;width:100%;min-height:44px;margin-top:8px;padding:10px 8px;font-size:10px;letter-spacing:.5px;line-height:1.6;text-align:left}
.tempering button:disabled{opacity:.5;cursor:default}
.tempering p{margin-bottom:0;color:#bcb5a4;font-size:11px}
.tempering summary{cursor:pointer;min-height:32px;display:list-item;font-size:10px;letter-spacing:1px;color:#d5bd8b}
.tempering summary:focus-visible{outline:2px solid #e6bb6b;outline-offset:3px}

/* Keep the original cover title inside phone viewports and let the menu scroll. */
@media(max-width:700px),(pointer:coarse) and (max-height:480px){
 #menu{display:block;overflow-y:auto;overscroll-behavior:contain;padding:env(safe-area-inset-top) 0 calc(42px + env(safe-area-inset-bottom))}
 #menu .menuart{position:fixed;pointer-events:none;background-size:170% auto;background-position:center top}
 #menu .menutext,#menu.artloaded .menutext,.artloaded #menu .menutext{width:calc(100% - 32px);max-width:410px;max-height:none;overflow:visible;margin:clamp(130px,35vw,210px) auto 0;padding:0}
 #menu .intro{padding:0 8px}
 #menu .primary{min-width:0;width:100%;max-width:340px}
 #menu .join-row button{min-width:82px;min-height:44px;letter-spacing:.7px}
 #menu .join-row input{min-height:44px;font-size:16px}
 #menu .coop-menu small{letter-spacing:.7px}
 #menu #joinStatus{line-height:1.5;font-size:13px}
 body:has(#menu:not([hidden])) .stats-link{bottom:calc(8px + env(safe-area-inset-bottom));padding:7px 10px;background:#080a09e8}
}
@media(pointer:coarse){
 #menu .join-row input{font-size:16px;min-height:44px}
 #menu .join-row button{min-height:44px}
}

@media(pointer:coarse) and (max-height:480px){
 #menu .menuart{background-size:auto 330px}
 .artloaded #menu .menutext{margin-top:110px}
 #menu .menufoot{display:none}
}

.build-summary{border-block:1px solid #61523c;padding:8px 0;margin:12px 0}.build-summary p{overflow-wrap:anywhere}.build-summary #descentSummary{color:#dec58e}.build-summary small{letter-spacing:1px;font-size:9px}

#equipped{gap:12px}#equipped .equipment-slot{flex:1;max-width:108px;min-width:0}#swapWeapon{width:100%;min-height:44px}#swapWeapon:disabled{opacity:.4}.bag-actions{flex-wrap:wrap}.bag-actions button{min-height:44px;min-width:64px}
/* Put carried loot and its actions first; advanced equipment tools stay nearby. */
#inventory .bag-heading{margin-top:12px}#inventory #stats{margin:8px 0}#inventory #itemDetail{min-height:30px;margin:10px 0}#inventory .bag-actions{position:relative;margin:8px 0 14px}#gearManagement{margin-top:16px}#gearManagement>summary{min-height:44px;display:flex;align-items:center;cursor:pointer}#gearManagement>summary::before{content:'▸';margin-right:8px}#gearManagement[open]>summary::before{content:'▾'}
