/* The dungeon is the working surface; detail lives in the codex. */
:root{--rail-width:76px}
body{background:#0c1017}
.rail{width:var(--rail-width);padding:12px 8px;border-right:1px solid #574c39;overflow:visible;background:#151922}
.brand{justify-content:center;font-size:34px}.brand span,.rail-label,.rail-bottom small,.rail .volume-control{display:none}
.rail nav{gap:9px;margin-top:24px}.rail nav button{font-size:0;justify-content:center;padding:10px 0;min-height:50px;border-radius:8px}.rail nav button span{font-size:25px}.rail nav button b{font-size:12px}
.rail-bottom{gap:8px}.rail-bottom button{font-size:0;padding:8px;min-height:36px}.rail-bottom button::first-letter{font-size:20px}
main{margin-left:var(--rail-width);padding:0 18px;max-width:none}.statusbar{min-height:64px;padding:6px 4px;border-bottom:1px solid #574c39;background:#10151d;gap:32px}.statusbar strong{font-size:25px}.statusbar .mini-combat{margin-left:auto}.statusbar small{font-size:12px}
main>footer{display:none}.location-path,.location-path+.view-head .eyebrow,.scene-motto,.party-sprite,.region-progress{display:none}
.location-path+.view-head{position:absolute;top:79px;left:calc(var(--rail-width) + 40px);z-index:3;padding:0;pointer-events:none}.location-path+.view-head h1{font-size:clamp(22px,2.4vw,36px);margin:0;color:#f0d9a7;text-shadow:0 2px 4px #000}
.encounter.immersive{position:relative;margin-top:10px;border:1px solid #514937;box-shadow:none;display:flex;flex-direction:column;min-height:calc(100dvh - 88px);background:#10151d}
.encounter-top{position:absolute;top:52px;left:24px;right:24px;z-index:3;border:0;background:transparent;padding:0;font-size:14px}
.scene.pixel-scene{height:auto;min-height:330px;flex:1;background:#161b24;isolation:isolate}.pixel-room{width:100%;height:100%;max-width:none;opacity:.55}.pixel-scene #monster{top:26%;left:50%;transform:translateX(-50%);width:240px;height:220px}.creature-sprite{width:160px;height:160px}.creature-sprite.boss-sprite{width:208px;height:208px}.creature-sprite.small-sprite{width:128px;height:128px}
.enemy-caption{left:25%;width:50%;bottom:24px}.enemy-title h2{font-size:28px}.enemy-caption p{font-size:14px}.health{height:8px}.battle-numbers{display:none}.skills{background:transparent;max-width:700px;width:100%;margin:auto;padding:10px;gap:12px}.skills button{min-height:55px;box-shadow:none;border:1px solid #61563e;border-radius:5px}.skills small{font-size:12px}.field-controls{justify-content:center;padding:0 10px 12px}.field-controls button{font-size:14px;padding:8px 14px;box-shadow:none}.ritual:has(#ritual-text:empty){display:none}
.view-head{padding:16px 0}.view-head h1{font-size:30px}.view-head p{max-width:65ch}
@media(max-width:800px){:root{--rail-width:60px}main{padding:0 8px}.statusbar{gap:15px}.statusbar .mini-combat{display:none}.location-path+.view-head{left:82px}.enemy-caption{left:8%;width:84%}.skills{max-width:100%}.skills button{display:flex}.skill-sigil{display:none}.scene.pixel-scene{min-height:320px}}
@media(max-height:700px) and (min-width:801px){.scene.pixel-scene{min-height:250px}.pixel-scene #monster{top:22%;height:160px}.creature-sprite{width:112px;height:112px}.creature-sprite.boss-sprite{width:144px;height:144px}.enemy-caption{bottom:12px}.skills button{min-height:44px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

[hidden]{display:none!important}
.statusbar{height:64px;min-height:64px}.statusbar strong{line-height:1.1}.statusbar small{line-height:1.3}.damage-readout>button{padding:0}
.portrait .portrait-sprite{width:75%;height:75%}
button:focus-visible,a:focus-visible{outline:2px solid #e6c987;outline-offset:3px}
.expedition-surface{position:relative;display:flex;flex-direction:column;height:calc(100dvh - 70px);min-height:560px;padding-top:8px}
.location-banner{position:absolute;top:22px;left:24px;z-index:3;pointer-events:none;display:flex;align-items:baseline;gap:18px}.location-banner h1{font-size:clamp(22px,2vw,32px);margin:0;text-shadow:0 2px 3px #000}.location-banner>span{font-size:14px;color:#b8b1a0}
.expedition-surface .encounter.immersive{width:100%;min-height:260px;flex:1;margin:0;border-bottom:0;border-radius:8px 8px 0 0;overflow:hidden}
.expedition-surface .scene.pixel-scene{min-height:200px}.expedition-surface .encounter-top{top:51px;font-size:12px;pointer-events:none}
.expedition-surface .pixel-room{left:0;top:0;transform:none;filter:brightness(.55);background:#10151d}
.expedition-surface .pixel-scene #monster{top:23%;height:150px;width:200px}.expedition-surface .creature-sprite{width:112px;height:112px}.expedition-surface .creature-sprite.boss-sprite{width:144px;height:144px}.expedition-surface .creature-sprite.small-sprite{width:96px;height:96px}
.expedition-surface .enemy-caption{bottom:10px;left:30%;width:40%}.enemy-title{justify-content:center}.enemy-title h2{font-size:24px}.enemy-caption p{font-size:12px;margin-top:4px}.hp-label{font-size:12px}
.battle-toolbar{display:flex;align-items:center;justify-content:center;gap:12px;padding:5px 12px;background:#111720;border-top:1px solid #343c48;min-height:58px}.battle-toolbar>button{font-size:14px;padding:8px 12px;box-shadow:none;white-space:nowrap}.battle-toolbar .skills{width:auto;max-width:none;margin:0;padding:0;display:flex;gap:8px}.battle-toolbar .skills button{display:flex;flex-direction:column;align-items:flex-start;min-height:42px;padding:5px 14px;min-width:140px}.skills small{margin:3px 0 0}.skills b{font-size:14px}.skills kbd{font-size:12px;padding:0 3px}
.collection-dock{background:#151a23;border:1px solid #514937;padding:8px 10px;border-radius:0 0 8px 8px;margin-bottom:8px;flex:none}
.collection-top{display:flex;align-items:center;gap:18px;margin-bottom:8px;min-height:52px}.collection-dock .chest-row{display:flex;gap:5px;margin:0;border:0}.collection-dock .chest{display:flex;align-items:center;justify-content:center;min-height:48px;min-width:48px;padding:4px;border:1px solid transparent;background:transparent;box-shadow:none;border-radius:5px}.collection-dock .chest.selected{border-color:#c4a76c;background:#322d25}.collection-dock .chest.sealed{opacity:.4}.collection-dock .chest-art{height:36px;width:36px;margin:0}.deck-label h2{font-size:21px;margin:0}.deck-label small{font-size:12px;white-space:nowrap}.batch-actions{margin-left:auto;display:flex;gap:5px;align-items:center}.batch-actions button{font-size:14px;padding:9px 13px;box-shadow:none;border-radius:4px;white-space:nowrap}.batch-actions .gold-button{background:#c0a573;color:#14171e}
.collection-dock .card-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:6px;margin:0}
.collection-dock .tarot{display:flex;flex-direction:column;align-items:stretch;min-width:0;min-height:0;height:clamp(110px,17vh,170px);padding:4px;border:1px solid #686252;border-radius:3px;background:linear-gradient(#262b34,#161c25);box-shadow:none;text-align:center;overflow:hidden;position:relative;transition:border-color .15s,filter .15s}
.collection-dock .tarot:hover,.collection-dock .tarot:focus-visible{border-color:#f5d394;filter:brightness(1.2)}.collection-dock .tarot.rank-1{border:2px solid #b2cbd4;background:linear-gradient(#314250,#1c2630)}.collection-dock .tarot.rank-2{border:2px solid #d5b570;background:linear-gradient(#493b24,#272016)}.collection-dock .tarot.inscribed{box-shadow:inset 0 0 0 2px #9a89b4}
.collection-dock .card-top{padding:0;font-size:12px;line-height:16px;min-height:16px;color:#c6bca5}.collection-dock .card-illustration{border:0;background:transparent;min-height:0;height:auto;flex:1;margin:0;display:flex;align-items:center;justify-content:center}.collection-dock .card-sprite{width:clamp(40px,4.1vw,72px);height:clamp(40px,4.1vw,72px)}.collection-dock .tarot h3{font-size:clamp(12px,.95vw,16px);line-height:1.1;font-weight:normal;margin:3px 0 0;min-height:2.2em;display:flex;justify-content:center;align-items:center}.collection-dock .tarot.undiscovered{opacity:.45;filter:saturate(.2)}.collection-dock .tarot.undiscovered:hover{opacity:.8}
.collection-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:7px;font-size:12px;min-height:30px;color:#b3b3ac}.collection-bottom label{font-size:14px;display:flex;align-items:center;gap:6px}.collection-bottom input{accent-color:#c0a573}.sigil-slots{display:flex;align-items:center;gap:5px}.sigil-slots button{min-height:26px;min-width:26px;padding:1px 5px;font-size:16px;box-shadow:none}.sealed-chamber{padding:24px;min-height:170px;text-align:center}.sealed-chamber h3{font-size:20px}
#card-detail{position:fixed;z-index:60;display:none;max-height:calc(100dvh - 16px);overflow:auto;background:#202731;border:2px solid #bcaa7d;box-shadow:0 14px 65px #000c;padding:18px;color:#e9ddc6;border-radius:6px}#card-detail.visible{display:flex;flex-direction:column;gap:9px}#card-detail h2{font-size:26px;margin:0}#card-detail p{font-size:16px;line-height:1.45;margin:0}#card-detail small{font-size:12px;line-height:1.4}#card-detail .card-illustration{height:130px;min-height:130px;margin:0;background:#141b24;border:1px solid #515660}#card-detail .card-sprite{height:112px;width:112px}#card-detail>button:not(.close-detail),.signature button{font-size:14px;box-shadow:none;padding:8px}#card-detail .close-detail{position:absolute;right:6px;top:4px;padding:0 6px;box-shadow:none;background:none;border:0;font-size:24px}.signature{border-top:1px solid #596074;padding-top:10px;display:flex;flex-direction:column;gap:7px}.signature p{font-size:14px!important}.signature b{color:#d5c0f0}.forge-comparison{background:#111923;border-left:3px solid #c9b47d;padding:8px 14px}
.guild-gallery{display:grid;grid-template-columns:1fr;gap:12px;max-width:1100px;margin:0 auto 24px}.guild-banner{display:flex;align-items:center;gap:30px;text-align:left;padding:15px 28px;min-height:116px;background:linear-gradient(100deg,#202c38,#1a1e26);border:1px solid #5e5949;box-shadow:none;border-radius:6px}.guild-banner .portrait{width:80px;height:80px;margin:0;flex:none}.guild-banner h2{margin:0 0 6px;font-size:27px}.guild-banner small{font-size:14px}.guild-banner>b{margin-left:auto;font-size:25px;color:#dbc18c}
.back-button{margin:14px 0;box-shadow:none;font-size:14px}.guild-chamber,.hero-chamber{max-width:1200px;margin:auto;padding:20px 30px 30px;background:#181e28;border:1px solid #5b5444;border-radius:8px}.guild-chamber header,.hero-chamber header{display:flex;align-items:center;gap:28px}.guild-chamber header .portrait,.hero-chamber header .portrait{width:120px;height:120px;margin:0;flex:none}.guild-chamber h1,.hero-chamber h1{font-size:36px;margin:0 0 10px}.guild-chamber header p,.hero-chamber header p{max-width:60ch;font-size:16px}.guild-bank{justify-content:center;gap:48px;padding:20px 0;margin:0}.guild-bank strong{font-size:36px}.guild-chamber>.gold-button{display:block;margin:0 auto}.guild-chamber>.muted{text-align:center;font-size:14px;color:#aeb5bc}.rank-title{text-align:center;margin:24px 0 15px;font-size:24px}.rank-track{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}.rank-node{min-height:110px;display:flex;align-items:center;flex-direction:column;gap:4px;box-shadow:none;background:#111721;border:1px solid #4f5663;border-radius:8px}.rank-node>span{font-size:30px}.rank-node small{font-size:12px}.rank-node.earned{color:#d4c293;background:#343025;opacity:1}.rank-node.current{border-color:#d6b16e}.mission-meter{margin:20px auto;max-width:650px;font-size:14px}.mission-meter progress{display:block;width:100%;margin-top:8px;height:10px}.guild-chamber details{font-size:14px}.guild-chamber details p{max-width:70ch;line-height:1.6}
.hero-gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:26px;max-width:1100px;margin:35px auto}.hero-choice{background:linear-gradient(#26313e,#181e28);box-shadow:none;border:1px solid #71664c;border-radius:8px;min-height:340px;padding:22px}.hero-choice .portrait{width:160px;height:160px;margin:auto}.hero-choice h2{font-size:30px;margin:20px 0 6px}.hero-choice p{font-size:16px}.hero-choice small{font-size:14px}.hero-chamber header progress{display:block;margin:8px 0;width:280px;max-width:100%;height:8px}.hero-chamber header button{font-size:14px;padding:8px 12px;box-shadow:none}.trees{display:grid;grid-template-columns:1.2fr 1fr;gap:40px;margin-top:26px}.trees h2{font-size:23px}.skill-tree{display:grid;grid-template-columns:1fr 1fr;gap:30px}.tree-branch{display:flex;flex-direction:column;align-items:stretch;gap:22px}.tree-branch h3{text-align:center;margin:0;font-size:19px}.tree-node{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;min-height:100px;padding:10px;background:#141b25;border:1px solid #565c66;border-radius:8px;box-shadow:none}.tree-node+.tree-node::before{content:'';position:absolute;width:2px;height:22px;top:-23px;left:50%;background:#686453}.tree-node span{font-size:23px}.tree-node small{font-size:12px;line-height:1.4}.tree-node.earned{opacity:1;background:#363327;border-color:#d5bc7e;color:#f1dba6}.memory-node{padding:14px 18px;border-left:2px solid #676575;margin:0 0 16px;background:#131923}.memory-node.earned{border-color:#b9a172}.memory-node p{font-size:14px;line-height:1.4;margin:7px 0}.memory-node small{font-size:12px}.memory-node progress{display:block;height:6px;width:100%;margin-top:8px}.trees>section>small{display:block;font-size:14px;margin-top:16px}
@media(min-width:1600px){.expedition-surface .creature-sprite{width:160px;height:160px}.expedition-surface .creature-sprite.boss-sprite{width:192px;height:192px}.expedition-surface .pixel-scene #monster{height:200px}.collection-dock .card-grid{gap:9px}}
@media(max-height:750px) and (min-width:1000px){.collection-dock .tarot{height:110px}.collection-dock .card-sprite{width:48px;height:48px}.expedition-surface .creature-sprite{width:96px;height:96px}.expedition-surface .creature-sprite.boss-sprite{width:112px;height:112px}.expedition-surface .pixel-scene #monster{top:23%;height:112px}.enemy-title h2{font-size:21px}.location-banner h1{font-size:24px}.collection-top{min-height:45px}.collection-dock .chest{min-height:40px;min-width:40px}.collection-dock .chest-art{width:32px;height:32px}.battle-toolbar{min-height:50px}.expedition-surface .enemy-caption{bottom:6px}}
@media(max-width:1100px){.collection-top{gap:10px}.deck-label h2{font-size:18px}.batch-actions button{padding:8px}.collection-dock .chest{min-width:38px;width:38px}.collection-dock .chest-art{width:30px;height:30px}.guild-chamber,.hero-chamber{padding:18px}.trees{gap:18px}.guild-banner h2{font-size:23px}}
@media(max-width:850px){.expedition-surface{height:auto;min-height:0}.expedition-surface .encounter.immersive{min-height:350px}.expedition-surface .scene.pixel-scene{min-height:280px}.collection-dock .card-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.collection-dock .tarot{height:120px}.collection-dock .card-sprite{width:52px;height:52px}.collection-top{flex-wrap:wrap}.deck-label{margin-left:auto}.batch-actions{width:100%;margin:0}.batch-actions .gold-button{flex:1}.collection-bottom{flex-wrap:wrap}.expedition-surface .enemy-caption{left:15%;width:70%}.location-banner{left:15px;gap:10px}.location-banner>span{font-size:12px}.battle-toolbar .skills button{min-width:0;padding:5px 8px}.battle-toolbar{gap:6px}.battle-toolbar .skills b{font-size:12px}.battle-toolbar .skills small{font-size:12px}.hero-gallery{gap:12px}.hero-choice{padding:12px;min-height:260px}.hero-choice .portrait{width:100px;height:100px}.hero-choice h2{font-size:24px}.trees{grid-template-columns:1fr}.rank-track{gap:6px}.rank-node{font-size:12px;padding:8px 4px}.guild-banner{padding:12px;gap:15px}.guild-banner>b{font-size:20px}.batch-hint{display:none}}
@media(max-width:520px){.statusbar{gap:12px}.statusbar strong{font-size:21px}.statusbar small{font-size:12px}.statusbar>div:nth-child(2){display:none}.collection-dock .card-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.collection-dock .tarot h3{font-size:12px}.collection-dock .tarot{height:115px}.collection-dock{padding:7px}.location-banner{display:block}.location-banner h1{font-size:21px}.expedition-surface .encounter-top{top:68px;left:15px;right:15px}.expedition-surface .pixel-scene #monster{top:30%}.expedition-surface .enemy-caption{left:7%;width:86%}.enemy-title h2{font-size:21px}.battle-toolbar{flex-wrap:wrap}.battle-toolbar .skills{order:-1;width:100%;justify-content:center}.hero-gallery{grid-template-columns:1fr;margin:15px auto}.hero-choice{min-height:0}.guild-banner .portrait{width:48px;height:48px}.guild-banner h2{font-size:19px}.guild-banner>b{font-size:16px}.guild-chamber header,.hero-chamber header{gap:12px}.guild-chamber header .portrait,.hero-chamber header .portrait{width:64px;height:64px}.guild-chamber h1,.hero-chamber h1{font-size:26px}.guild-bank{gap:15px}.guild-bank strong{font-size:26px}.rank-track{grid-template-columns:repeat(2,1fr)}.skill-tree{gap:12px}.guild-chamber,.hero-chamber{padding:12px}.discovery-hint{font-size:12px}.collection-bottom label{font-size:12px}}
.expedition-surface .pixel-scene #monster{top:68px;bottom:88px;height:auto;transform:translateX(-50%)}
.expedition-surface .pixel-room{grid-template-columns:repeat(28,minmax(0,1fr));grid-template-rows:repeat(12,minmax(0,1fr))}.expedition-surface .pixel-room i{width:100%;height:100%}
.location-banner h1{font-family:Georgia,serif;color:#e8d09a}.expedition-surface .enemy-title h2{margin:2px 0 5px}
@media(min-width:851px) and (max-width:1100px){.expedition-surface{height:auto}.expedition-surface .scene.pixel-scene{min-height:300px}.collection-dock .card-grid{grid-template-columns:repeat(8,minmax(0,1fr))}.collection-dock .tarot{height:125px}.battle-toolbar .skills button{min-width:120px}}
@media(min-width:1101px){.collection-dock .tarot{height:clamp(90px,13vh,145px)}.collection-dock .tarot h3{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:2.2em;max-height:2.2em}.expedition-surface .creature-sprite{width:clamp(80px,10vh,128px);height:clamp(80px,10vh,128px)}.expedition-surface .creature-sprite.boss-sprite{width:clamp(96px,12vh,160px);height:clamp(96px,12vh,160px)}.expedition-surface .creature-sprite.small-sprite{width:80px;height:80px}}
@media(min-width:1101px) and (max-width:1500px){.collection-dock .card-sprite{width:40px;height:40px}}

/* Stable card inspection: hover is visual only, all actions use the explicit forge mode. */
.collection-dock .tarot{overflow:visible;transform-origin:center center;transition:transform .14s ease,filter .14s ease,border-color .14s ease;z-index:1}
.collection-dock .tarot:hover,.collection-dock .tarot:focus-visible{transform:scale(1.18);z-index:40;filter:brightness(1.18);}
.collection-dock .tarot .card-hover-info{position:absolute;display:none;left:50%;top:calc(100% - 8px);transform:translateX(-50%);width:180px;max-width:calc(100vw - 24px);padding:9px 10px;text-align:left;line-height:1.25;background:#202936;border:1px solid #c5a968;border-radius:4px;box-shadow:0 10px 28px #000b;color:#eadfca;pointer-events:none}
.collection-dock .tarot:hover .card-hover-info,.collection-dock .tarot:focus-visible .card-hover-info{display:flex;flex-direction:column;gap:4px}
.card-hover-info b{font-size:13px;color:#f4d898}.card-hover-info span{font-size:12px;color:#d4d6d2}.card-hover-info strong{font-size:12px;color:#b8e0c4}
.forge-console{display:flex;align-items:center;gap:8px;padding:8px 10px;margin:0 0 8px;background:#111821;border:1px solid #494d55;border-radius:4px}.forge-console>div{display:flex;flex-direction:column;gap:2px;margin-right:auto}.forge-console b{font-size:14px;color:#e7cf96}.forge-console small{font-size:12px;color:#abb5bb}.forge-console button{padding:7px 10px;font-size:13px;box-shadow:none;border-radius:4px}.forge-console button.active{background:#c5a86e;color:#151a22;border-color:#f0d597}.forge-console button[data-forge-mode="gold"]{border-color:#a97f31}.forge-console button.subtle{background:transparent;color:#b9b8ad}
.forge-mode-active .tarot.forge-target{border-color:#e6c97c;box-shadow:0 0 0 2px #c59b47aa,0 0 18px #c79e4c55;animation:forge-pulse 1.8s ease-in-out infinite}.forge-mode-active .tarot:not(.forge-target){opacity:.35}.forge-mode-active .tarot.forge-target:hover{opacity:1}
@keyframes forge-pulse{50%{box-shadow:0 0 0 3px #e4bd6599,0 0 24px #c79e4c88}}
.collection-bottom{flex-wrap:wrap}.collection-bottom .auto-master{color:#e6cf96}.collection-bottom .auto-master small{color:#9ed5ad;font-size:11px}
#orb-control{border-color:#7061a4;background:linear-gradient(#312750,#1b1a2b);color:#e4d8ff;min-width:118px}.battle-toolbar #orb-control.orb-active{border-color:#d7a9ff;background:linear-gradient(#6f3ba0,#30205b);box-shadow:0 0 18px #9d5bd888;color:#fff3ff}.battle-toolbar #orb-control:disabled{opacity:.7}
@media(max-width:850px){.forge-console{flex-wrap:wrap}.forge-console>div{width:100%}.forge-console button{flex:1}.collection-dock .tarot:hover,.collection-dock .tarot:focus-visible{transform:scale(1.1)}.collection-dock .tarot .card-hover-info{width:165px}.auto-master{order:4}}

/* A quieter lower deck leaves the encounter as the visual focus. */
.collection-dock .collection-top{min-height:48px;margin-bottom:5px}.collection-dock .batch-actions{gap:6px}.collection-dock .batch-actions button[data-quantity]{display:none}.collection-dock .gold-button{min-width:138px}.auto-toggle,.forge-toggle{font-size:13px!important;padding:8px 10px!important;box-shadow:none!important}.auto-toggle.active{border-color:#9ecb9f;background:#243b32;color:#d8f0d4}.forge-toggle.active{border-color:#d6b777;background:#3a3120;color:#f6dfac}.forge-console{margin:0 0 7px;padding:6px 8px}.forge-console>div{gap:0}.forge-console button{padding:6px 9px}.collection-bottom{display:none}
.expedition-surface .encounter.immersive{min-height:360px}.expedition-surface .scene.pixel-scene{min-height:285px}.expedition-surface .pixel-scene #monster{top:15%;height:230px}.expedition-surface .creature-sprite{width:148px;height:148px}.expedition-surface .creature-sprite.boss-sprite{width:182px;height:182px}.expedition-surface .enemy-caption{bottom:14px}.expedition-surface .battle-toolbar{min-height:54px}
@media(max-height:760px) and (min-width:851px){.expedition-surface .encounter.immersive{min-height:320px}.expedition-surface .scene.pixel-scene{min-height:245px}.expedition-surface .pixel-scene #monster{height:190px}.expedition-surface .creature-sprite{width:124px;height:124px}.expedition-surface .creature-sprite.boss-sprite{width:150px;height:150px}}

/* VISUAL PASS 01 — a living dungeon table built from the CC0 pixel atlas. */
:root{--ember:#e18d54;--brass:#d6b56f;--ink:#0a0d14;--wine:#28141d;--moss:#748d70}
body{background:radial-gradient(ellipse at 50% -10%,#263142 0,#11151e 46%,#080b11 100%);background-attachment:fixed}
main{background:linear-gradient(90deg,transparent 0,rgba(10,13,20,.2) 50%,transparent 100%)}
.statusbar{position:relative;background:linear-gradient(180deg,#44131a 0%,#2a0d15 68%,#180c12 100%);border-bottom:1px solid #c18c52;box-shadow:0 3px 0 #07090e,inset 0 -1px #6e3937,inset 0 1px #7a302b}
.statusbar::after{content:'';position:absolute;left:0;right:0;bottom:-4px;height:2px;background:linear-gradient(90deg,transparent,#d1a866 18%,#6e373b 50%,#d1a866 82%,transparent);opacity:.7;pointer-events:none}
.statusbar small{color:#d4b37d;text-shadow:0 1px 2px #000}.statusbar strong{color:#ffe5a4;text-shadow:0 2px 2px #14070a}
.location-banner{filter:drop-shadow(0 3px 4px #000b)}
.location-banner h1{letter-spacing:.02em;text-shadow:0 2px 0 #111,0 0 18px #e3b87233}
.location-banner h1::after{content:'';display:inline-block;width:18px;height:1px;margin:0 10px 7px;background:#a6774d;opacity:.8;vertical-align:middle}
.location-banner>span{letter-spacing:.08em;text-transform:uppercase;color:#ccb789;text-shadow:0 1px 2px #000}
.expedition-surface .encounter.immersive{border-color:#71583e;background:#0c111a;box-shadow:0 12px 40px #0008,0 0 0 1px #181014,inset 0 0 0 1px #b18b5233}
.expedition-surface .scene.pixel-scene{position:relative;overflow:hidden;isolation:isolate;min-height:285px;background-color:#111722;background-image:linear-gradient(180deg,#120f1680 0%,transparent 35%,#080d16e8 100%),url('dungeon.png');background-position:center 52%;background-size:cover;background-repeat:no-repeat;border:1px solid #8a6748;box-shadow:inset 0 0 90px #05070dcc,inset 0 -35px 50px #05070dcc}
.expedition-surface .scene.pixel-scene.region-1,.expedition-surface .scene.pixel-scene.region-4{background-image:linear-gradient(180deg,#0e1716a8 0%,transparent 42%,#07100fe8 100%),url('forest.png');background-position:center 58%}
.expedition-surface .scene.pixel-scene.region-2{background-image:linear-gradient(180deg,#11152199 0%,transparent 38%,#080d16e8 100%),url('flooded-crypt.png');background-position:center 55%}
.expedition-surface .scene.pixel-scene.region-3{background-image:linear-gradient(180deg,#28131399 0%,transparent 42%,#12090ce8 100%),url('dungeon.png');background-position:center 50%}
.expedition-surface .scene.pixel-scene.region-5,.expedition-surface .scene.pixel-scene.region-7{background-image:linear-gradient(180deg,#10172788 0%,transparent 44%,#080d17e8 100%),url('frozen-cathedral.png');background-position:center 50%}
.expedition-surface .scene.pixel-scene.region-6{background-image:linear-gradient(180deg,#15151c88 0%,transparent 40%,#100b11e8 100%),url('flooded-crypt.png');background-position:center 48%}
.expedition-surface .pixel-room{z-index:0;opacity:.16;filter:brightness(.85) saturate(.75) contrast(1.3);mix-blend-mode:screen;background:transparent}
.expedition-surface .pixel-room i{opacity:.9}
.expedition-surface .scene.pixel-scene::before{z-index:1;content:'';background:radial-gradient(ellipse at 50% 45%,transparent 20%,#080b12a8 80%,#05070bcc 100%),linear-gradient(180deg,#080a10a8 0%,transparent 22%,transparent 62%,#05070dd6 100%),repeating-linear-gradient(0deg,transparent 0 3px,#080b1120 4px 5px);mix-blend-mode:multiply;opacity:.94;animation:dungeon-breathe 8s ease-in-out infinite;pointer-events:none}
.expedition-surface .scene.pixel-scene::after{z-index:2;content:'';position:absolute;inset:-18%;background:radial-gradient(circle at 16% 34%,#f5af5a22 0 2px,transparent 3px),radial-gradient(circle at 74% 22%,#f4c27b1c 0 1px,transparent 3px),radial-gradient(circle at 82% 61%,#f4a45520 0 2px,transparent 4px),radial-gradient(ellipse at 8% 54%,#e78d4930 0,transparent 20%),radial-gradient(ellipse at 92% 48%,#d26b3c20 0,transparent 22%);background-size:180px 230px,230px 190px,260px 280px,100% 100%,100% 100%;mix-blend-mode:screen;opacity:.75;pointer-events:none;animation:embers-drift 13s linear infinite}
.expedition-surface .pixel-scene #monster{z-index:4;filter:drop-shadow(0 16px 12px #000b);transition:filter .2s,transform .2s}
.expedition-surface .pixel-scene #monster::before{content:'';position:absolute;z-index:-1;width:150px;height:75px;bottom:15px;border-radius:50%;background:radial-gradient(ellipse,#d9954b36 0,transparent 70%);filter:blur(5px);animation:torch-flicker 2.2s ease-in-out infinite}
.expedition-surface .creature-sprite{filter:drop-shadow(0 0 8px #bb693c66);animation:creature-idle 2.8s ease-in-out infinite}
.expedition-surface .creature-sprite.boss-sprite{filter:drop-shadow(0 0 9px #d18b4eaa) drop-shadow(0 16px 10px #000b);animation:boss-idle 3.4s ease-in-out infinite}
.expedition-surface .creature-sprite.small-sprite{filter:drop-shadow(0 0 5px #91b17577)}
.expedition-surface .enemy-caption{z-index:5;padding:8px 16px 9px;border:1px solid #9d754e99;border-radius:5px;background:linear-gradient(180deg,#161923c9,#0a0e16ed);box-shadow:0 8px 22px #000b,inset 0 1px #e9c78122;backdrop-filter:blur(3px)}
.expedition-surface .enemy-title h2{letter-spacing:.025em;color:#f2d79b;text-shadow:0 2px 0 #080a0d,0 0 14px #e5b86933}
.expedition-surface .enemy-caption p{color:#c2b18e;text-shadow:0 1px 2px #000}
.expedition-surface .health{background:#090d14;border-color:#8a604c;box-shadow:inset 0 1px #0008}.expedition-surface .health i{background:linear-gradient(90deg,#873e4e,#cf6d69);box-shadow:0 0 9px #d16c6c77}
.expedition-surface .encounter-top{z-index:6;color:#d7c39b;text-shadow:0 1px 2px #000}.expedition-surface .encounter-top span:last-child{color:#efc67b}
.expedition-surface .battle-toolbar{background:linear-gradient(180deg,#151922,#0d1118);border-top-color:#6c543e;box-shadow:0 -4px 18px #0006}
.expedition-surface .battle-toolbar>button,.expedition-surface .skills button{border-color:#776146;background:linear-gradient(180deg,#25232a,#171a22);box-shadow:0 3px 0 #07090e,inset 0 1px #d3ae6c18}.expedition-surface .battle-toolbar>button:hover:enabled,.expedition-surface .skills button:hover:enabled{border-color:#d5b370;background:linear-gradient(180deg,#3a3029,#211c21)}
.expedition-surface .ritual{position:relative;z-index:6;background:linear-gradient(90deg,#201821,#2d2024,#201821);border-top:1px solid #6c4d4b;border-bottom:1px solid #171219;color:#d7a2a4}

/* Cards read as a tactile collection of little relics instead of a flat grid. */
.collection-dock{position:relative;background:linear-gradient(180deg,#1b202b,#111720);border-color:#7a6246;box-shadow:0 8px 25px #0008,inset 0 1px #d8b67a1f}
.collection-dock::before{content:'';position:absolute;inset:5px;pointer-events:none;border:1px solid #e5c78312;border-radius:4px}
.collection-dock .collection-top{position:relative;z-index:2}.deck-label h2{color:#eed49b;text-shadow:0 1px 2px #000}.deck-label small{color:#bcae91}
.collection-dock .chest{transition:transform .16s ease,filter .16s ease,background .16s ease;border-color:#594d3c}.collection-dock .chest:hover:enabled{transform:translateY(-3px);background:#3b2c22;filter:brightness(1.24) drop-shadow(0 3px 5px #000)}.collection-dock .chest.selected{background:linear-gradient(180deg,#54402b,#2a201a);box-shadow:0 0 0 1px #d4b36e66,0 5px 12px #0008}.collection-dock .chest-art{filter:drop-shadow(0 4px 3px #000b);transition:transform .16s}.collection-dock .chest.selected .chest-art{transform:scale(1.08)}
.collection-dock .card-grid{position:relative;z-index:2;gap:7px}
.collection-dock .tarot{border-color:#756a59;background:linear-gradient(155deg,#303440 0%,#1a202a 58%,#10151c 100%);box-shadow:0 3px 0 #07090d,inset 0 0 0 1px #e5d5ad18,inset 0 0 22px #080a0e66}
.collection-dock .tarot::before{content:'';position:absolute;inset:3px;pointer-events:none;border:1px solid #f3d58a1d;border-radius:2px}.collection-dock .tarot.rank-1{border-color:#b5c9d1;background:linear-gradient(155deg,#3d5660,#1e2a31 58%,#121a20)}.collection-dock .tarot.rank-2{border-color:#d8b56d;background:linear-gradient(155deg,#5a472d,#302619 58%,#17130f)}
.collection-dock .tarot:hover,.collection-dock .tarot:focus-visible{box-shadow:0 8px 18px #000c,inset 0 0 0 1px #f7e3a488,inset 0 0 28px #d7a95d22}.collection-dock .tarot.rank-1:hover{box-shadow:0 8px 20px #000c,0 0 18px #b9e7f044,inset 0 0 0 1px #efffff99}.collection-dock .tarot.rank-2:hover{box-shadow:0 8px 20px #000c,0 0 20px #eac36e66,inset 0 0 0 1px #fff1bd99}
.collection-dock .card-top{position:relative;z-index:1;color:#d4c6a8;letter-spacing:.08em;text-shadow:0 1px 2px #000}.collection-dock .tarot.rank-1 .card-top{color:#d1e8ec}.collection-dock .tarot.rank-2 .card-top{color:#f1d58e}.collection-dock .card-illustration{position:relative;z-index:1;background:radial-gradient(circle at 50% 35%,#3b4250,#171c25 70%);border:1px solid #86765b;box-shadow:inset 0 0 16px #07090d99,0 2px 0 #090b10}.collection-dock .tarot.rank-1 .card-illustration{background:radial-gradient(circle at 50% 35%,#587480,#1d2b34 70%);border-color:#aacdd6}.collection-dock .tarot.rank-2 .card-illustration{background:radial-gradient(circle at 50% 35%,#896738,#2b2116 70%);border-color:#e5c67c}.collection-dock .card-sprite{filter:drop-shadow(0 5px 3px #000b)}.collection-dock .tarot h3{position:relative;z-index:1;color:#eadabc;text-shadow:0 1px 2px #000}.collection-dock .tarot.undiscovered{background:linear-gradient(145deg,#252a33,#121720);border-color:#4c4d50}.collection-dock .tarot.undiscovered .card-illustration{background:radial-gradient(circle,#262b32,#10141b);border-color:#4a4a48}.collection-dock .tarot.undiscovered h3{color:#9c9a92}
.collection-dock .tarot .card-hover-info{z-index:50;background:linear-gradient(180deg,#2c2930,#181b23);border-color:#c6a76a;box-shadow:0 12px 30px #000e,0 0 0 1px #f1d18a22}.card-hover-info b{color:#f6dda1}.card-hover-info span{color:#d6cec0}

/* The rooms outside combat keep the same hand-crafted, candlelit language. */
.view-head{position:relative}.view-head::after{content:'';display:block;width:130px;height:1px;margin-top:11px;background:linear-gradient(90deg,#b28b59,transparent);opacity:.75}.view-head h1{color:#f0d5a0;text-shadow:0 2px 0 #0b0d12,0 0 20px #d19f5b2a}
.guild-gallery,.hero-gallery{padding:12px;border:1px solid #715d46;background:linear-gradient(135deg,#111722e8,#24191cdd),url('dungeon.png') center/cover;box-shadow:0 12px 34px #0008}
.guild-banner{background:linear-gradient(100deg,#242b32e8,#1c1b23e8);border-color:#876a4b;box-shadow:0 4px 0 #090b10,inset 0 1px #f1d39322;transition:transform .16s,filter .16s,border-color .16s}.guild-banner:hover:enabled{transform:translateX(4px);filter:brightness(1.14);border-color:#dbb76f}.guild-banner .portrait{border-color:#bd9b61;box-shadow:4px 4px 0 #090b10,0 0 18px #d3984a33}.guild-banner h2{color:#efd5a1;text-shadow:0 2px #101218}.guild-banner small{color:#c5baa5}.guild-banner>b{color:#edcb82;text-shadow:0 0 10px #e2af5b55}
.hero-choice{background:linear-gradient(180deg,#29333de8,#151a22f0),url('frozen-cathedral.png') center/cover;border-color:#8b704f;box-shadow:0 5px 0 #080a0f,inset 0 1px #f0d49522;transition:transform .18s,filter .18s,border-color .18s}.hero-choice:hover:enabled{transform:translateY(-5px);filter:brightness(1.15);border-color:#e0bc76}.hero-choice .portrait{border-color:#c9a86a;box-shadow:6px 6px 0 #080a0f,0 0 24px #c58f4b44}.hero-choice h2{color:#f0d3a0;text-shadow:0 2px #0a0d13}.hero-choice p,.hero-choice small{color:#c7c4bc}
.guild-chamber,.hero-chamber{background:linear-gradient(135deg,#1a2029ed,#10151de8),url('flooded-crypt.png') center/cover;border-color:#806648;box-shadow:0 14px 38px #0009,inset 0 1px #f2d2981d}.hero-chamber{background-image:linear-gradient(135deg,#202b35ed,#10151de8),url('frozen-cathedral.png')}.guild-chamber header .portrait,.hero-chamber header .portrait{border-color:#c6a269;box-shadow:7px 7px 0 #080a0f,0 0 24px #d69b4b33}.guild-chamber h1,.hero-chamber h1{color:#efd29a;text-shadow:0 2px #0b0d13}
@keyframes dungeon-breathe{0%,100%{opacity:.84}50%{opacity:1}}
@keyframes embers-drift{0%{transform:translate3d(-2%,2%,0) scale(1)}50%{transform:translate3d(2%,-1%,0) scale(1.03)}100%{transform:translate3d(-2%,2%,0) scale(1)}}
@keyframes torch-flicker{0%,100%{opacity:.45;transform:scaleX(.9)}50%{opacity:.8;transform:scaleX(1.12)}}
@keyframes creature-idle{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-4px) scale(1.012)}}
@keyframes boss-idle{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-6px) scale(1.02)}}
@media(max-width:850px){.expedition-surface .scene.pixel-scene{background-position:center 50%}.expedition-surface .scene.pixel-scene::after{opacity:.55}.guild-gallery,.hero-gallery{padding:7px}.view-head::after{margin-top:5px}.collection-dock .tarot:hover,.collection-dock .tarot:focus-visible{transform:scale(1.1)}}
@media(prefers-reduced-motion:reduce){.expedition-surface .scene.pixel-scene::before,.expedition-surface .scene.pixel-scene::after,.expedition-surface .creature-sprite,.expedition-surface .pixel-scene #monster::before{animation:none}}
/* Keep approved 32px encounters above the nameplate, including short viewports. */
.expedition-surface .scene.pixel-scene #monster{top:56px;bottom:124px;height:auto;min-height:0}
.expedition-surface #monster .creature-sprite{height:100%;width:auto;aspect-ratio:1;max-height:160px;max-width:160px;flex-shrink:0;image-rendering:pixelated}
.expedition-surface #monster .boss-sprite{max-height:192px;max-width:192px}
.expedition-surface #monster .small-sprite{max-height:96px;max-width:96px}
