#routeProgress{display:flex;overflow-x:auto;gap:8px}#routeProgress>span{flex:0 0 130px;font-size:12px}.mission #seals{max-height:none}.connection-summary button{width:100%}.lab-limit{color:#efc078!important}.lab-group{display:flex;align-items:center;justify-content:center;gap:6px;max-width:100%;overflow:hidden}.lab-group img{flex:0 1 auto!important;width:min(70px,25%)!important;height:auto!important;aspect-ratio:1;object-fit:cover;border-radius:50%;min-width:0}.lab-group .fallen{opacity:.25;filter:grayscale(1)}#labReport,#labNotes{display:block;box-sizing:border-box;width:100%;padding:12px;color:#eee8d9;background:#141a12;border:1px solid #baa37c77;border-radius:7px;margin:12px 0;font:14px/1.6 system-ui}#labReport{font:12px/1.6 monospace}.lab-bag-row{display:flex;gap:15px;align-items:center;justify-content:space-between;border-bottom:1px solid #baa37c33;padding:8px 0}@media(max-width:700px){#routeProgress>span{flex-basis:105px}body.location-trial:not(.battle-focused) .scene-space{min-height:300px!important;height:auto!important}body.location-trial:not(.battle-focused) #scene{width:100%!important;height:auto!important;aspect-ratio:3/2!important}#modal{max-width:calc(100vw - 24px)}.lab-group img{width:23%!important}}
.location-trial #locationCaption p{display:block;margin:3px 0!important;font-size:13px!important}#locationCaption .lab-limit{font-size:12px!important}.location-trial .hotspot{max-width:80%}.location-trial .mission{display:none}aside .lab-profile{font-size:13px;line-height:1.6}.lab-profile img{width:38px;height:38px;object-fit:cover;vertical-align:middle;margin-right:8px}.lab-profile p{margin:9px 0}.lab-profile button{width:100%;min-height:42px}body.location-trial .connections-button{font-size:13px}
@media(max-width:800px){header .lab-help,header #fullscreenButton{font-size:0;min-width:32px}header .lab-help:after{content:'?';font-size:16px}header #fullscreenButton:after{content:'⛶';font-size:17px}header .lab-report-button{font-size:10px}.lab-group img{width:44%!important;max-width:48px}.lab-group{flex-wrap:wrap;gap:4px}.battle-focused .enemy-portrait.lab-group{height:auto;min-height:65px;aspect-ratio:auto;border:0;background:transparent;box-shadow:none}}
.battle-focused .enemy-portrait.lab-group{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:116px;height:auto;min-height:116px;aspect-ratio:auto;border:0;background:transparent;box-shadow:none;overflow:visible}.battle-focused .enemy-portrait.lab-group img{width:100%!important;max-width:54px!important;border:1px solid #b9a67688;aspect-ratio:1;height:auto!important;object-fit:cover}.battle-focused .enemy-portrait.lab-group img:last-child:nth-child(odd){grid-column:1/-1;justify-self:center}@media(max-width:800px){.battle-focused .enemy-portrait.lab-group{width:65px;min-height:65px}.battle-focused .enemy-portrait.lab-group img{max-width:32px!important}}

.lab-torch-controls{padding:8px 0;border-top:1px solid #baa37c55}.lab-torch-controls button{width:100%;white-space:normal}.lab-torch-controls small{display:block;color:#efc078}.torch-slot small{max-width:115px;white-space:normal;text-align:center}.torch-slot strong{font-size:16px;color:#ddbd7d}
.location-trial #stats{grid-template-columns:repeat(4,minmax(0,1fr))}.location-trial #stats .stat{min-width:0;padding:8px 10px}.lab-poison-stat small{color:#bad598}.lab-poison-stat strong{color:#dce5cb}.lab-reward-summary{display:flex;justify-content:space-between;gap:12px;align-items:center;border:1px solid #d5b06688;background:#45371e55;border-radius:7px;padding:8px 12px;margin:6px 0}.lab-reward-summary strong,.lab-reward-summary span{display:block;font-size:14px}.lab-reward-summary span{font-size:12px;color:#cbc6b1}.lab-reward-summary button{min-height:40px;flex-shrink:0}#labVictoryLoot{flex-shrink:0}.lab-victory-loot{border:1px solid #d5b06688;padding:14px;border-radius:8px;margin:12px 0;background:#46351e44}.lab-victory-loot h3{margin:6px 0}.lab-victory-loot small{display:block;line-height:1.5;margin:10px 0;color:#cbc6b1}.lab-reward-row{display:flex;gap:12px;align-items:center;justify-content:space-between;border-top:1px solid #d5b06633;padding:8px 0}.lab-reward-row button{min-height:40px;flex-shrink:0}@media(max-width:600px){.lab-reward-summary{padding:7px 8px;gap:6px}.lab-reward-summary strong{font-size:12px}.lab-reward-summary button{font-size:12px;padding:7px}.lab-reward-row{align-items:flex-start}.lab-reward-row span{font-size:14px;min-width:0}.lab-reward-row button{font-size:12px}}

/* Preserve the full portrait illustration supplied for card 9. */
@media(max-width:700px){body.location-trial:not(.battle-focused) .game-stage:has(#scene[data-lab-card="9"]){overflow-y:auto}body.location-trial:not(.battle-focused) .scene-space:has(#scene[data-lab-card="9"]){flex:none;min-height:0!important}body.location-trial:not(.battle-focused) #scene[data-lab-card="9"]{aspect-ratio:1199/1312!important}}

@media(max-width:800px){.location-trial .game-hud{grid-template-columns:minmax(0,1.8fr) minmax(0,1fr)}.location-trial #stats .stat{padding:7px 4px}.location-trial #stats .stat strong{font-size:20px}.location-trial #stats .stat small{font-size:7px;white-space:nowrap}}

.lab-reward-summary.has-pending{border:2px solid #dfb573;background:#493719;padding:10px 14px;box-shadow:0 0 14px #dfb57318}.lab-reward-summary .lab-loot-heading{font-size:11px;letter-spacing:1.3px;color:#f0cc85;font-weight:700;margin-bottom:4px}.lab-reward-summary.has-pending button{min-height:48px;font-weight:700;padding:10px 18px}.lab-reward-summary.has-pending strong{color:#f4e5c4}@media(max-width:600px){.lab-reward-summary.has-pending{padding:8px;gap:8px}.lab-reward-summary .lab-loot-heading{font-size:10px;letter-spacing:.6px}.lab-reward-summary.has-pending button{padding:9px;font-size:12px}}

/* Loot replaces the defeated enemy, both in the victory recap and in the scene. */
.lab-loot-spot{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;border:0;background:transparent;box-shadow:none;padding:0;color:#f3d395;cursor:pointer;min-width:0;max-width:100%;font:600 13px/1.25 system-ui,sans-serif;text-align:center}.lab-loot-icon{position:relative;display:block;width:96px;height:96px;aspect-ratio:1;border:2px solid #dfb573;border-radius:50%;background:radial-gradient(circle,#49371e,#171d13);box-shadow:0 0 0 4px #dfb57318,0 4px 16px #0008}.lab-loot-icon img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover;object-position:center}.lab-loot-count{position:absolute;right:-4px;bottom:0;background:#dfb573;color:#202216;border:2px solid #202216;border-radius:50%;min-width:25px;height:25px;display:grid;place-items:center;font-size:13px}.lab-loot-label{display:block;padding:6px 8px;border:1px solid #dfb57399;border-radius:5px;background:#171d13ed;max-width:140px}.lab-loot-spot:hover .lab-loot-icon,.lab-loot-spot:focus-visible .lab-loot-icon{border-color:#ffdc91;box-shadow:0 0 0 4px #dfb57344}.lab-loot-spot:focus-visible{outline:2px solid #ffdc91;outline-offset:7px;border-radius:8px}.lab-loot-combat{justify-self:center;align-self:center;overflow:visible}.lab-loot-scene{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:5;width:145px;pointer-events:auto}.lab-loot-cleared{width:100%;height:96px}@media(max-width:800px){.lab-loot-combat .lab-loot-icon{width:64px;height:64px}.lab-loot-combat{font-size:11px;gap:5px}.lab-loot-combat .lab-loot-label{padding:5px;max-width:92px}.lab-loot-combat .lab-loot-count{min-width:21px;height:21px;font-size:11px}.lab-loot-cleared{height:64px}}
.lab-carcass-icon img{filter:saturate(.45);opacity:.8}.lab-loot-panel h2{margin:6px 0 12px;padding-right:38px}.lab-loot-capacity{padding:10px 12px;border:1px solid #d5b06677;border-radius:6px;background:#dfb5730b}.lab-loot-auto,.lab-loot-note{font-size:13px;color:#c6c7b3;line-height:1.6}.lab-loot-item{display:flex;gap:12px;align-items:center;border:1px solid #d5b06655;background:#10170e66;border-radius:8px;margin:12px 0;padding:12px}.lab-loot-thumb{width:66px;height:66px;flex-shrink:0;object-fit:contain;background:#9b88644d;border-radius:6px}.lab-loot-item>div{flex:1;min-width:0}.lab-loot-item strong{display:block;font-size:15px;line-height:1.4}.lab-loot-item small{display:block;font-size:12px;line-height:1.5;color:#c6c7b3;margin-top:4px}.lab-loot-item button{min-height:44px;flex-shrink:0}.lab-loot-token{display:grid;place-items:center;color:#dfb573;font:16px Georgia,serif;border:1px solid #d5b06655}.lab-loot-done{padding:10px;border-bottom:1px solid #d5b06633;color:#aab48f;font-size:13px}.lab-loot-bag{margin:16px 0;border-top:1px solid #d5b06655;padding-top:12px}.lab-loot-bag summary{cursor:pointer;color:#dfb573;min-height:36px}.lab-loot-bag button{min-height:42px}.lab-loot-bag .lab-bag-row span{font-size:13px}@media(max-width:600px){.lab-loot-item{gap:8px;padding:10px;flex-wrap:wrap}.lab-loot-thumb{width:50px;height:50px}.lab-loot-item>div{min-width:135px}.lab-loot-item button{margin-left:auto}.lab-loot-item strong{font-size:14px}.lab-loot-panel h2{font-size:24px}}

.lab-equipment-panel{border-block:1px solid #baa37c55;padding:12px 0;margin:12px 0}.lab-equipment-panel>small{display:block;line-height:1.5;color:#c5bfae}.lab-equipment-panel details{margin:16px 0}.lab-equipment-panel .lab-loot-item{margin:10px 0}.lab-equipped-summary{display:grid;grid-template-columns:38px 1fr;align-items:center;gap:4px 8px;font-size:13px}.lab-equipped-summary img{width:38px;height:38px;grid-row:span 2}.lab-equipped-summary small{grid-column:2;color:#dfbd7d}

.lab-loot-item>.lab-gear-actions{flex:0 0 auto;display:grid;gap:6px}.lab-gear-actions button{margin:0}@media(max-width:600px){.lab-loot-item>.lab-gear-actions{min-width:0;margin-left:auto}}

#modal:has(.lab-equipment-screen){width:min(760px,calc(100vw - 24px));max-width:760px}.lab-equipment-screen h2{padding-right:40px;margin:6px 0 16px}.lab-equip-totals{display:flex;flex-wrap:wrap;gap:12px 24px;border-block:1px solid #c9a96066;padding:12px 0;color:#d5ceb9}.lab-equip-totals b{color:#eac785;font-size:20px}.lab-equip-rule,.lab-equip-note{font-size:14px;line-height:1.6;color:#c8c8b7}.lab-equip-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.lab-equip-slot{display:flex;flex-direction:column;gap:10px;min-width:0;padding:14px;border:1px solid #bba57370;border-radius:8px;background:#10170e66}.lab-equip-slot.empty{border-style:dashed;background:#141b1222}.lab-equip-slot .eyebrow{font-size:11px;letter-spacing:1.5px}.lab-equip-identity{display:flex;align-items:center;gap:12px;min-width:0}.lab-equip-identity img,.lab-empty-slot{width:56px;height:56px;flex-shrink:0;border-radius:5px;object-fit:contain;background:#9b886433}.lab-empty-slot{display:grid;place-items:center;border:1px dashed #9b886466;color:#a69c83;font-size:24px}.lab-equip-identity strong{font-size:15px;line-height:1.4}.lab-equip-slot small{display:block;line-height:1.5;color:#c5c4b2;font-size:13px}.lab-equip-slot button{align-self:flex-end;min-height:44px;margin-top:auto}@media(max-width:600px){.lab-equipment-screen h2{font-size:25px}.lab-equip-grid{gap:8px}.lab-equip-slot{padding:10px;gap:8px}.lab-equip-identity{flex-direction:column;align-items:flex-start;gap:8px}.lab-equip-identity strong{font-size:14px}.lab-equip-slot .eyebrow{font-size:10px;letter-spacing:1px}.lab-equip-slot small{font-size:12px}.lab-equip-totals{gap:10px;font-size:13px}}
@media(min-width:901px){#modal:has(.lab-equipment-screen){width:min(1020px,calc(100vw - 40px));max-width:1020px}.lab-equip-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.lab-equip-identity{flex-direction:column;align-items:flex-start}}

/* Persistent finds stay attached to the event point on the scene. */
.lab-remains-pending{border:2px solid #e4bd73!important;box-shadow:0 0 15px #e4bd7344!important}.lab-event-result{padding:14px;border-left:3px solid #deb66d;background:#d5ac6512;font-size:16px;line-height:1.6;color:#f0dfba}.lab-remains-panel>.primary{margin-top:8px;min-height:44px}

/* Both Crocevia variants use their full square illustration. */
@media(max-width:700px){body.location-trial:not(.battle-focused) .game-stage:has(#scene[data-lab-card="13"]){overflow-y:auto}body.location-trial:not(.battle-focused) .scene-space:has(#scene[data-lab-card="13"]){flex:none;min-height:0!important}body.location-trial:not(.battle-focused) #scene[data-lab-card="13"]{aspect-ratio:1/1!important}}

/* Preserve the original square framing of the two newly approved rooms. */
@media(max-width:700px){body.location-trial:not(.battle-focused) .game-stage:has(#scene:is([data-lab-card="33"],[data-lab-card="34"])){overflow-y:auto}body.location-trial:not(.battle-focused) .scene-space:has(#scene:is([data-lab-card="33"],[data-lab-card="34"])){flex:none;min-height:0!important}body.location-trial:not(.battle-focused) #scene:is([data-lab-card="33"],[data-lab-card="34"]){aspect-ratio:1/1!important}}

/* Same stable click target and pulse as enemies, using the approved fallen adventurer art. */
.encounter-preview.lab-adventurer-spot{left:50%;top:50%}.encounter-preview .lab-adventurer-portrait{display:block;width:clamp(64px,11vw,112px);height:auto;aspect-ratio:1;border-radius:50%;padding:0;background-image:url('assets/lab/passaggio-dei-caduti.webp');background-size:240% auto;background-position:0% 25%;border:2px solid #dfb573;box-shadow:0 0 0 5px #15201699,0 3px 20px #0009;animation:encounterPulse 2.4s ease-in-out infinite}.lab-adventurer-spot.pending .lab-adventurer-portrait{animation:none;box-shadow:0 0 0 5px #15201699,0 0 22px #dfb57388}.lab-adventurer-spot.examined{opacity:.65;cursor:default}.lab-adventurer-spot.examined .lab-adventurer-portrait{animation:none;filter:grayscale(.8)}@media(prefers-reduced-motion:reduce){.encounter-preview .lab-adventurer-portrait{animation:none}}

/* Preserve the supplied waterfall video framing on desktop and mobile. */
body.location-trial:not(.battle-focused) #scene[data-lab-card="39"]{aspect-ratio:427/240!important}

/* Camerata: bind actions to the table and supplies, keeping carcass loot central. */
body.location-trial #scene[data-lab-card="38"] #hotspots>.hotspot.searched:not(.lab-remains-pending){display:none!important}
body.location-trial #scene[data-lab-card="38"] #hotspots>.lab-loot-scene{top:40%}

/* One illustrated row per equipped object in the sidebar. */
.lab-equipped-list{display:grid;gap:12px;margin:0 0 16px}
.lab-equipped-list .lab-equipped-summary{margin:0;min-width:0;line-height:1.35}
.lab-equipped-list .lab-equipped-summary span{min-width:0;overflow-wrap:anywhere}
.lab-equipped-list .lab-equipped-summary img{object-fit:cover;border-radius:4px}

.lab-inventory-actions{display:grid;gap:6px;margin-top:12px}

/* Readable potion choices and a single usable row for every carried dose. */
.lab-potion-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0}.lab-potion-option{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:7px;min-height:84px;width:100%;padding:13px;text-align:left;white-space:normal;line-height:1.45}.lab-potion-option strong{font:600 14px/1.4 system-ui,sans-serif}.lab-potion-option small{display:block;font-size:12px;line-height:1.5;color:#d0c6aa}.lab-potion-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 0;border-bottom:1px solid #d5b06644}.lab-potion-row>div:first-child{flex:1;min-width:0}.lab-potion-row strong{display:block;font-size:15px;line-height:1.5}.lab-potion-row strong span{color:#e4bd76}.lab-potion-row small{display:block;margin-top:4px;font-size:13px;line-height:1.5;color:#d0c6aa}.lab-potion-row .lab-potion-reason{color:#acae9b;font-size:12px}.lab-potion-actions{display:flex;flex-direction:column;gap:7px;flex-shrink:0}.lab-potion-actions button{min-height:42px;min-width:75px}.lab-potion-tests{margin:22px 0;border-top:1px solid #d5b06644;padding-top:14px}.lab-potion-tests summary{cursor:pointer;color:#d5b066}.lab-potion-tests p{font-size:13px;line-height:1.6}.lab-potion-active{padding:12px;margin:12px 0;border:1px solid #d5b06666;border-radius:6px;background:#d5b0660c;line-height:1.6}.lab-potion-active strong,.lab-potion-active span{display:block;font-size:12px}.lab-potion-active strong{color:#e3bd7f}.lab-potion-message{border-left:2px solid #d5b066;padding:8px 12px}.lab-potion-footer{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}@media(max-width:550px){.lab-potion-choices{grid-template-columns:1fr}.lab-potion-option{min-height:76px}.lab-potion-row{gap:10px}.lab-potion-row strong{font-size:14px}.lab-potion-row small{font-size:12px}}
.lab-potion-actions button:disabled,.lab-potion-option:disabled{opacity:.45;cursor:not-allowed}

/* Keep the snake reward clear of the separate carcass on the table. */
body.location-trial #scene[data-lab-card="50"] #hotspots>.lab-loot-scene{top:30%}

.lab-table-carcass-thumb{display:block;background-image:url("assets/lab/original-card-50.webp");background-size:310%;background-position:23.4% 55.9%;background-repeat:no-repeat}

/* Five immediately visible resources; keep the lantern readable on narrow screens. */
.location-trial #stats{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.location-trial #stats .stat{padding:7px 8px}
.lab-rations-stat small{color:#dfc38f}
@media(max-width:800px){
 .location-trial .game-hud{grid-template-columns:minmax(0,1fr)}
 .location-trial #stats{gap:4px}
 .location-trial #stats .stat{padding:7px 5px}
 .location-trial #stats .stat small{font-size:9px;letter-spacing:.5px}
}

.lab-bridge-warning{grid-column:1/-1;width:100%;margin:4px 0;padding:10px 12px;border-left:3px solid #dfb573;color:#f0d5a7;line-height:1.5;background:#49371e44}.lab-bridge-panel{padding:12px 0;line-height:1.55}.lab-bridge-panel h2{font-size:26px;margin:4px 0 10px}.lab-bridge-panel p{margin:6px 0}.lab-bridge-panel button{margin:6px 6px 0 0}

/* Loot cards follow the dialog width, independently of the viewport. */
#modal .lab-loot-item{display:grid;grid-template-columns:66px minmax(0,1fr);gap:10px 12px;align-items:start;min-width:0;max-width:100%;box-sizing:border-box}
#modal .lab-loot-item>.lab-loot-thumb{grid-column:1;grid-row:1;width:66px;height:66px}
#modal .lab-loot-item>div:not(.lab-gear-actions):not(.lab-loot-thumb){grid-column:2;grid-row:1;min-width:0;overflow-wrap:anywhere}
#modal .lab-loot-item>button,#modal .lab-loot-item>.lab-gear-actions{grid-column:1/-1;min-width:0;max-width:100%;width:100%;margin:0;box-sizing:border-box}
#modal .lab-loot-item>button{white-space:normal;overflow-wrap:anywhere}
#modal .lab-loot-item>.lab-gear-actions{display:flex;flex-wrap:wrap;gap:8px}
#modal .lab-gear-actions button{flex:1 1 140px;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
#modal .lab-loot-item>strong,#modal .lab-loot-item>small{grid-column:1/-1;min-width:0;overflow-wrap:anywhere}
#modal .lab-loot-item strong{font-size:16px}#modal .lab-loot-item small{font-size:14px}

.lab-inventory-rations{padding:10px 12px;margin:8px 0 14px;border:1px solid #bca77b65;border-radius:8px}
.lab-inventory-rations .lab-bag-row{padding:0;border:0}
.lab-inventory-rations .lab-bag-row h3{margin:0}
.lab-inventory-rations button{white-space:normal}

.location-trial .lab-fork-exits{display:flex;flex:1 0 100%;grid-column:1/-1;gap:8px;width:100%}
.location-trial .lab-fork-exits button{text-align:left}
.location-trial .lab-fork-exits button small{font-size:12px;line-height:1.35;opacity:1}
@media(max-width:600px){.location-trial .lab-fork-exits{flex-direction:column}}

#hotspots>.lab-depot-chest{max-width:28%;min-width:0;white-space:normal}
#hotspots>.lab-depot-chest>span{background:#101710ed;text-align:center;justify-content:center;line-height:1.25}
@media(max-width:560px){
 #hotspots>.lab-depot-chest{padding-inline:2px}
 #hotspots>.lab-depot-chest>span{padding-inline:4px}
 #hotspots>.lab-depot-chest>span:before{display:none}
}

#hotspots>.lab-forge-spot{max-width:33%;white-space:normal;text-align:center}
#hotspots>.lab-forge-spot>span{background:#101710ed}

.game-stage:has(.lab-chaos-choice){overflow-y:auto}
.game-stage:has(.lab-chaos-choice) .scene-space{min-height:110px}
.lab-chaos-choice{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}
.lab-chaos-choice>button.quiet{display:grid;align-content:start;gap:5px;text-align:left;padding:12px 14px;border-color:#dfb57366;background:#24271b}
.lab-chaos-choice>button.quiet:hover,.lab-chaos-choice>button.quiet:focus-visible{border-color:var(--gold);background:#322d20}
.lab-chaos-choice strong{font-size:16px;color:#f3dfbd}
.lab-chaos-choice small{font-size:14px;line-height:1.45;white-space:normal;color:#e1ddcf}
.lab-chaos-choice b{color:#efcb91}
@media(max-width:570px){
 .lab-chaos-choice{grid-template-columns:1fr;gap:6px}
 .lab-chaos-choice>button.quiet{padding:9px 11px}
}

.lab-circle-runes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:16px 0}
.lab-circle-runes button{display:grid;justify-items:center;gap:6px;min-height:80px;padding:8px 5px;color:#dff5f5}
.lab-circle-runes span{font-size:32px;line-height:1;color:#9cdfe8}
.lab-circle-runes button:disabled{opacity:1}
.lab-circle-runes button.lit,.lab-circle-runes button.selected{background:#24434a;border-color:#9cdfe8}
.lab-circle-runes button.lit{box-shadow:inset 0 0 14px #9cdfe85c}
.lab-circle-status{min-height:2.8em}

#combatEquipmentStatus{
 flex-shrink:0;
 margin-top:6px;
 padding:8px 12px;
 border:1px solid #a481496b;
 border-radius:6px;
 background:#28241b;
 color:#f5e2bd;
 font-weight:600;
 font-size:14px;
 line-height:1.4;
 white-space:pre-line;
}
#combatEquipmentStatus.equipment-destroyed{
 border-color:#d88c76;
 background:#38251f;
 color:#ffe4d8;
}

#modal:has(.lab-bag-screen) {
 width: min(640px, calc(100vw - 24px));
 max-width: 640px;
 padding: clamp(14px, 3vw, 24px);
 border-color: #a2774d;
 background: linear-gradient(#140d0926, #140d093b), #332017 url("assets/lab/borsa-cuoio.webp") center / 100% 100% no-repeat;
}
#modal:has(.lab-bag-screen) > .close {
 background-color: #281a12;
}
.lab-bag-screen {
 display: grid;
 gap: 14px;
 line-height: 1.45;
}
.lab-bag-screen .lab-bag-heading {
 display: flex;
 flex-wrap: wrap;
 align-items: center;
 justify-content: space-between;
 gap: 6px 12px;
 width: auto;
 height: auto;
 min-height: 0;
 padding: 0 0 10px;
 margin-right: 66px;
 border-bottom: 1px solid #bca77b38;
 background: none;
}
.lab-bag-screen h2, .lab-bag-screen h3, .lab-bag-heading p { margin: 0; }
.lab-bag-screen h3 { margin-bottom: 7px; font-size: 18px; }
.lab-bag-heading strong { color: #f0d4a4; }
.lab-bag-screen :is(.lab-bag-entry, .lab-potion-row, .lab-loot-item) {
 margin: 0 0 6px;
 border: 1px solid #bca77b33;
 border-radius: 7px;
 background: #19130fe8;
 padding: 8px;
}
.lab-bag-entry,
#modal .lab-bag-screen .lab-loot-item {
 display: grid;
 grid-template-columns: 48px minmax(0,1fr) auto;
 align-items: center;
 gap: 10px;
}
.lab-bag-entry .lab-loot-thumb,
#modal .lab-bag-screen .lab-loot-item > .lab-loot-thumb {
 width: 48px;
 height: 48px;
}
.lab-bag-screen :is(.lab-bag-entry, .lab-loot-item) small {
 display: block;
 font-size: 12px;
 color: #c1bdab;
}
.lab-bag-screen .lab-bag-entry strong span { color: #e8c98f; }
.lab-bag-entry-actions,
#modal .lab-bag-screen .lab-loot-item > .lab-gear-actions {
 display: flex;
 flex-wrap: wrap;
 gap: 4px;
 justify-content: end;
}
#modal .lab-bag-screen .lab-loot-item > :is(.lab-gear-actions, button) {
 grid-column: 3; grid-row: 1; width: auto;
}
#modal .lab-bag-screen .lab-gear-actions button { flex: 0 1 auto; }
.lab-bag-screen button { min-height: 36px; padding: 6px 9px; font-size: 13px; }
.lab-bag-screen .lab-bag-secondary { color: #cec7b6; }
.lab-bag-screen .lab-bag-sack { justify-self: start; }
.lab-bag-screen .lab-potions { margin: 0; padding: 0; border: 0; }
.lab-bag-screen .lab-potions:has(#labRemedyStatus:empty):not(:has(article)) { display: none; }
.lab-bag-tools { border-top: 1px solid #bca77b38; padding-top: 10px; color: #c1bdab; }
@media (max-width: 540px) {
 .lab-bag-entry,
 #modal .lab-bag-screen .lab-loot-item { grid-template-columns: 44px minmax(0,1fr); }
 .lab-bag-entry-actions,
 #modal .lab-bag-screen .lab-loot-item > :is(.lab-gear-actions, button) {
  grid-column: 1 / -1; grid-row: auto; justify-content: start;
 }
 .lab-bag-entry .lab-loot-thumb,
 #modal .lab-bag-screen .lab-loot-item > .lab-loot-thumb { width: 44px; height: 44px; }
}

.lab-potion-info { display: flex; gap: 10px; align-items: center; min-width: 0; }
.lab-potion-info .lab-loot-thumb { flex: 0 0 44px; width: 44px; height: 44px; }
.lab-potion-info > div { min-width: 0; }

.lab-item-inline{display:inline-flex;align-items:center;gap:.35em;vertical-align:middle}
.lab-item-inline .lab-loot-thumb{width:1.45em;height:1.45em;border-radius:3px}

.battle-outcome .lab-stone-deduction {
 color: #f0d4a4;
 font-weight: 700;
}

#modal:has(.lab-fallen-boulders) {
 --discovery-art: url("assets/lab/massi-caduti.webp");
}
#modal:has(.lab-discovery-clue) {
 --discovery-art: url("assets/lab/fogli-del-diario.webp");
}
#modal:has(.lab-discovery-well) {
 --discovery-art: url("assets/lab/acqua-del-pozzo.webp");
}
#modal:has(:is(.lab-fallen-boulders, .lab-discovery-clue, .lab-discovery-well, .lab-bronze-unlock, .lab-new-adventure, .lab-dart-triggered, .lab-dart-disarmed, .lab-lantern-empty, .lab-crate-empty, .lab-crates-oil, .lab-secret-forge, .lab-secret-found, .lab-secret-kit-art, .lab-secret-missing, .lab-take-breath, .lab-cook-meat, .lab-food-found, .lab-food-empty, .lab-surroundings-empty, .lab-camp-art, .lab-normal-dart-triggered, .lab-normal-dart-disarmed, .lab-bronze-locked, .lab-spear-art, .lab-crates-coins, .lab-repair-empty-forge, .lab-repair-empty-store, .lab-tunnel-art, .lab-raw-meat-found, .lab-repair-kit-found, .lab-trap-jaw)) {
 background: linear-gradient(90deg, #130f0be8 0%, #130f0bc2 45%, #130f0b36 100%), #1e1710 var(--discovery-art) right center / cover no-repeat;
}
#modal:has(:is(.lab-fallen-boulders, .lab-discovery-clue, .lab-discovery-well, .lab-bronze-unlock, .lab-new-adventure, .lab-dart-triggered, .lab-dart-disarmed, .lab-lantern-empty, .lab-crate-empty, .lab-crates-oil, .lab-secret-forge, .lab-secret-found, .lab-secret-kit-art, .lab-secret-missing, .lab-take-breath, .lab-cook-meat, .lab-food-found, .lab-food-empty, .lab-surroundings-empty, .lab-camp-art, .lab-normal-dart-triggered, .lab-normal-dart-disarmed, .lab-bronze-locked, .lab-spear-art, .lab-crates-coins, .lab-repair-empty-forge, .lab-repair-empty-store, .lab-tunnel-art, .lab-raw-meat-found, .lab-repair-kit-found, .lab-trap-jaw)) > .close {
 background-color: #18130ecc;
}
#modal:has(:is(.lab-fallen-boulders, .lab-discovery-clue, .lab-discovery-well, .lab-bronze-unlock, .lab-new-adventure, .lab-dart-triggered, .lab-dart-disarmed, .lab-lantern-empty, .lab-crate-empty, .lab-crates-oil, .lab-secret-forge, .lab-secret-found, .lab-secret-kit-art, .lab-secret-missing, .lab-take-breath, .lab-cook-meat, .lab-food-found, .lab-food-empty, .lab-surroundings-empty, .lab-camp-art, .lab-normal-dart-triggered, .lab-normal-dart-disarmed, .lab-bronze-locked, .lab-spear-art, .lab-crates-coins, .lab-repair-empty-forge, .lab-repair-empty-store, .lab-tunnel-art, .lab-raw-meat-found, .lab-repair-kit-found, .lab-trap-jaw)) #modalBody > p {
 color: #eee3d0;
 text-shadow: 0 1px 3px #110d09;
}

#modal:has(.lab-bronze-unlock) {
 --discovery-art: url("assets/lab/portone-bronzo-chiave.webp");
}

#modal:has(.lab-new-adventure) {
 --discovery-art: url("assets/lab/nuova-avventura.webp");
}
#modal .lab-new-adventure-note {font-size: 12px; opacity: .9;}

#modal:has(.lab-dart-disarmed) { --discovery-art: url("assets/lab/dardo-disarmato.webp"); }
#modal:has(.lab-dart-triggered) { --discovery-art: url("assets/lab/dardo-scattato.webp"); }
#modal:has(.lab-lantern-empty) { --discovery-art: url("assets/lab/lanterna-vuota.webp"); }
#modal:has(.lab-crate-empty) { --discovery-art: url("assets/lab/cassa-vuota.webp"); }
#modal:has(.lab-crates-oil) { --discovery-art: url("assets/lab/casse-olio.webp"); }

#modal:has(.lab-secret-forge) { --discovery-art: url("assets/lab/passaggio-forgia.webp"); }

#modal:has(.lab-secret-missing) { --discovery-art: url("assets/lab/passaggio-segreto-assente.webp"); }

#modal:has(.lab-take-breath) { --discovery-art: url("assets/lab/prendi-fiato.webp"); }
#modal:has(.lab-cook-meat) { --discovery-art: url("assets/lab/cuoci-carne.webp"); }
#modal .lab-cook-meat p { color: #eee3d0; text-shadow: 0 1px 3px #110d09; }

#modal:has(.lab-food-found) { --discovery-art: url("assets/lab/provviste-trovate.webp"); }
#modal:has(.lab-food-empty) { --discovery-art: url("assets/lab/provviste-assenti.webp"); }
#modal:has(.lab-surroundings-empty) { --discovery-art: url("assets/lab/dintorni-vuoti.webp"); }

#modal:has(.lab-camp-art) { --discovery-art: url("assets/lab/accampamento.webp"); }
#modal .lab-camp-art p { color: #eee3d0; text-shadow: 0 1px 3px #110d09; }

#modal:has(.lab-normal-dart-disarmed) { --discovery-art: url("assets/lab/dardo-normale-disarmato.webp"); }
#modal:has(.lab-normal-dart-triggered) { --discovery-art: url("assets/lab/dardo-normale-scattato.webp"); }

#modal:has(.lab-bronze-locked) { --discovery-art: url("assets/lab/portone-bronzo-chiuso.webp"); }
#modal:has(.lab-spear-art) { --discovery-art: url("assets/lab/lancia-scelta.webp"); }
#modal:has(.lab-crates-coins) { --discovery-art: url("assets/lab/casse-monete.webp"); }
#modal:has(.lab-repair-empty-forge) { --discovery-art: url("assets/lab/fucina-poster-v1.webp"); }
#modal:has(.lab-repair-empty-store) { --discovery-art: url("assets/lab/original-card-69.webp"); }
#modal:has(.lab-tunnel-art) { --discovery-art: url("assets/lab/rotonda-dei-cunicoli.webp"); }
#modal:has(.lab-raw-meat-found) {
 --discovery-art: url("assets/loot/carne-cruda.webp");
 --discovery-edge-shade: #19160f48;
}
#modal:has(.lab-repair-kit-found) {
 --discovery-art: url("assets/loot/kit-riparazione.webp");
 --discovery-edge-shade: #19160f48;
}
#modal:has(.lab-repair-kit-found) #modalBody > h2 { padding-inline-end: 52px; }
@media (max-width: 480px) {
 #modal:has(:is(.lab-crates-coins, .lab-tunnel-art)) {
  background-image: linear-gradient(90deg, #130f0be8 0%, #130f0bb8 62%, #130f0b84 100%), var(--discovery-art);
 }
}
#modal:has(:is(.lab-repair-empty-forge, .lab-repair-empty-store, .lab-raw-meat-found, .lab-repair-kit-found)) {
 background:
  linear-gradient(90deg, #19160f 0%, #19160fe8 30%, #19160f52 66%, var(--discovery-edge-shade, #19160f0a) 100%) center / cover no-repeat,
  #19160f var(--discovery-art) right center / auto 100% no-repeat;
}
#modal:has(:is(.lab-repair-empty-forge, .lab-repair-empty-store, .lab-raw-meat-found, .lab-repair-kit-found)) #modalBody > p {
 text-shadow: 0 1px 3px #100d08, 0 0 6px #100d08;
}
#modal .lab-spear-art p { color: #eee3d0; text-shadow: 0 1px 3px #110d09; }


/* Pending loot cards must fit the bag dialog, not the viewport width. */
#modal .lab-bag-screen .lab-loot-item {
 grid-template-columns: 48px minmax(0, 1fr);
}
#modal .lab-bag-screen .lab-loot-item > :is(.lab-gear-actions, button) {
 grid-column: 1 / -1;
 grid-row: auto;
 justify-content: start;
}
#modal .lab-bag-screen .lab-loot-item > .lab-gear-actions > small {
 flex: 0 0 100%;
 min-width: 0;
 overflow-wrap: anywhere;
}
@media (max-width: 540px) {
 #modal .lab-bag-screen .lab-loot-item { grid-template-columns: 44px minmax(0, 1fr); }
}

#modal:has(.lab-trap-jaw) { --discovery-art: url("assets/lab/trappola-tagliola.webp"); }

/* Only the Lord of Chaos in the tribute hall: full-length original illustration. */
.location-trial .encounter-preview.chaos-lord-preview{top:50%;width:100%;height:100%;padding:0;gap:0;background:transparent;justify-content:center;pointer-events:none}
.location-trial .encounter-preview.chaos-lord-preview img{position:absolute;top:max(9%,36px);height:min(78%,calc(97% - 48px - max(9%,36px)));width:auto;max-width:72%;aspect-ratio:auto;object-fit:contain;border:0;border-radius:0;box-shadow:none;animation:none;pointer-events:auto;mask-image:linear-gradient(to right,transparent,#000 5%,#000 95%,transparent)}
.location-trial .encounter-preview.chaos-lord-preview span{position:absolute;bottom:3%;min-height:44px;display:grid;place-items:center;pointer-events:auto}
.location-trial .encounter-preview.chaos-lord-preview:focus-visible{outline-offset:-3px}

/* Disabled pickup must not resemble an available action. */
.lab-loot-item button:disabled{opacity:.42;cursor:not-allowed}

#modal:has(.lab-barrels-empty){--discovery-art:url("assets/lab/barili-vuoti.webp")}

#modal:has(.lab-two-oil){--discovery-art:url("assets/lab/due-boccette-olio.webp")}

#modal:has(.lab-one-oil){--discovery-art:url("assets/lab/una-boccetta-olio.png")}

/* Illustrated introduction to the Custodian's forge, with a reading contrast layer. */
#modal:has(.lab-forge-intro-art){
 background:linear-gradient(90deg,#100e09e8 0%,#120e0bc4 52%,#110e0b75 100%),#21170f url("assets/lab/forgia-custode-intro.webp") 72% center/cover no-repeat;
 border-color:#98734c;
}
#modal:has(.lab-forge-intro-art)>.close{background-color:#18130ecc}
#modal:has(.lab-forge-intro-art) #modalBody>p{color:#f0e7d8;text-shadow:0 1px 3px #0b0906}

#modal:has(.lab-secret-found){--discovery-art:url("assets/discesa-porta.webp")}
#modal:has(.lab-secret-kit-art){--discovery-art:url("assets/lab/provviste-trovate.webp")}
.lab-secret-kit-rewards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:14px 0}
.lab-secret-kit-rewards>div{display:flex;align-items:center;flex-direction:column;gap:5px;padding:8px 4px;border:1px solid #bca16a88;background:#17150fe0;border-radius:7px;text-align:center}
.lab-secret-kit-rewards img{width:58px;height:58px;object-fit:contain;border-radius:5px}
.lab-secret-kit-rewards strong{color:#f4dfad;font-size:13px;line-height:1.2}
.lab-secret-kit-rewards small{color:#dfd2bc;font-size:11px}
.lab-secret-transition{width:min(760px,94vw);max-width:94vw;padding:14px;background:#15140f;color:#f3dfb4;border:1px solid #ae9263;border-radius:10px;text-align:center}
.lab-secret-transition::backdrop{background:#000e}
.lab-secret-transition video{display:block;width:100%;max-height:70vh;object-fit:contain;margin:10px auto;background:#000}
.lab-secret-transition button{margin:auto}

#modal:has(.lab-altar-art){background:linear-gradient(90deg,#130f0bf2 0%,#130f0bc9 55%,#130f0b69 100%),#1e1710 url("assets/lab/cella-votiva-v1.webp") center / cover no-repeat}
.lab-altar-outcomes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:14px 0}
.lab-altar-outcomes>div{display:flex;flex-direction:column;align-items:center;gap:5px;background:#14140fdc;border:1px solid #ad925e88;border-radius:6px;text-align:center;padding:8px 3px}
.lab-altar-outcomes b{font-size:13px;color:#e8d2a1}.lab-altar-outcomes span{font-size:18px;font-weight:bold}.lab-altar-outcomes small{font-size:11px;color:#eae2d1}.altar-fear{color:#d5b2e6}.altar-energy{color:#f2d16e}.altar-life{color:#ee8e83}
.lab-altar-note{font-size:12px!important}
.lab-altar-art button:disabled{opacity:.42!important;cursor:not-allowed!important;filter:grayscale(.65)}

.location-trial .lab-fork-branch{display:flex;flex-direction:column;flex:1 1 0;min-width:0;gap:5px}
.location-trial .lab-fork-branch>button{width:100%;white-space:normal}
.location-trial .lab-fork-inspect{font-size:12px;padding:7px 9px}
.location-trial .lab-fork-inspect:disabled{opacity:.45;cursor:not-allowed}
.location-trial .lab-fork-insight{font-size:12px;line-height:1.4;color:#f0d6a2;background:#171c15cc;border-left:2px solid #bda06b;padding:7px 9px;margin:0}
@media(max-width:600px){.location-trial .lab-fork-branch{flex:1 1 auto}}

.lab-discovery-reward{display:flex;align-items:center;gap:10px;width:fit-content;padding:6px 12px;color:#f5dfb1;border:1px solid #bca16a80;border-radius:6px;background:#17160fdc;margin:8px 0}
.lab-discovery-reward img{width:46px;height:46px;object-fit:contain}
.lab-discovery-fear{color:#dab8e3;font-size:26px}

#modal:has(.lab-forge-board-art),#modal:has(.lab-forge-grip){background:linear-gradient(90deg,#120e0bef,#120e0bcf 58%,#120e0b60),#20150c url("assets/lab/forgia-passerella.webp") center / cover no-repeat}
#modal:has(.lab-forge-grip.dead),#modal:has(.lab-forge-grip.caught){background-image:linear-gradient(90deg,#120e0bef,#120e0bcf 58%,#120e0b60),url("assets/lab/forgia-passerella-crollata.webp")}
.lab-forge-grip-check{display:flex;align-items:center;gap:12px;padding:12px;margin:12px 0;border:1px solid #ae9163;border-radius:7px;background:#100d0bce;color:#f5dfb2}
.lab-forge-grip-die{font-size:30px;min-width:50px;text-align:center;padding:4px 8px;border:1px solid #c9ab73;border-radius:7px}
.lab-forge-grip.dead .lab-forge-grip-die{color:#f18a7e;border-color:#ad5146}.lab-forge-grip.caught .lab-forge-grip-die{color:#9edcb2;border-color:#639c74}

.lab-bronze-note-image{display:block;width:100%;height:auto;max-height:230px;object-fit:contain;background:#121710;border:1px solid #c5a06b55;border-radius:6px;margin:10px 0 14px}

#modal:has(.lab-findings) {
 width:min(580px,calc(100vw - 20px));
 max-width:580px;
 border-color:#a88b576b;
 border-radius:12px;
 background:radial-gradient(ellipse at top,#393424 0,transparent 65%),#20261b;
}
#modal:has(.lab-findings) > .close { background:#27291e; }
.lab-findings { clear:none; }
.lab-findings > h2 { margin:5px 0 16px; }
.lab-findings > .eyebrow { display:block; padding-right:52px; }
.lab-findings .lab-loot-contents { display:grid; gap:8px; }
.lab-findings .lab-loot-contents:empty { display:none; }
.lab-findings .lab-loot-done {
 display:flex; align-items:center; gap:12px; padding:9px 12px;
 border:1px solid #bca37140; border-radius:8px; background:#141c1399;
 color:#f0e2c6; font-size:.9375rem;
}
.lab-findings .lab-loot-done .lab-loot-thumb { width:42px; height:42px; }
.lab-findings .lab-loot-check { margin-left:auto; color:#bcd18f; font-weight:700; }
#modal .lab-findings .lab-loot-item { margin:0; }
.lab-findings .lab-loot-bag {
 margin:14px 0 0; padding:0; border:1px solid #bca37143;
 border-radius:8px; background:#171e15a6;
}
.lab-findings .lab-loot-bag summary {
 display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; padding:10px 12px;
 min-height:44px; list-style:none; font-size:.875rem;
}
.lab-findings .lab-loot-bag summary::-webkit-details-marker { display:none; }
.lab-findings .lab-loot-bag summary::before { content:'▸'; }
.lab-findings .lab-loot-bag[open] summary::before { content:'▾'; }
.lab-findings .lab-loot-bag summary strong {
 margin-left:auto; color:#e7dfc9; font-size:.8125rem; font-variant-numeric:tabular-nums;
}
.lab-findings .lab-loot-bag-list { padding:0 12px 7px; }
.lab-findings .lab-loot-bag-list h3 { margin:10px 0 2px; color:#d5c19a; font-size:.875rem; }
.lab-findings .lab-loot-bag-list .lab-bag-row { gap:8px; }
.lab-findings .lab-loot-bag-list .lab-loot-thumb { width:32px; height:32px; }
.lab-findings .lab-loot-bag-list .lab-item-inline { display:flex; align-items:center; gap:8px; min-width:0; }
.lab-findings .lab-loot-bag-list .lab-item-inline > span { overflow-wrap:anywhere; }
.lab-findings .lab-loot-bag-list button { flex-shrink:0; min-height:44px; padding:6px 9px; }
.lab-findings .lab-loot-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.lab-findings .lab-loot-actions button { min-height:44px; margin:0; }
@media(max-width:480px) {
 .lab-findings .lab-loot-actions .primary { flex-basis:100%; }
 .lab-findings .lab-loot-actions .quiet { flex:1 1 124px; }
}

.lab-bridge-illustration {
 display:block;
 width:100%;
 height:clamp(120px,24dvh,220px);
 margin-top:4px;
 border:1px solid #d5b06655;
 border-radius:8px;
 object-fit:cover;
 object-position:center 61%;
}

#modal:has(.lab-quick-start) {
 width:min(540px,calc(100vw - 20px));
 background:
  linear-gradient(180deg,#0b110bb8 0,#131a13d9 100px,#22281e 225px),
  #22281e url("assets/lab/introduzione-victor.webp") center top / 100% auto no-repeat;
}
#modal:has(.lab-quick-start) > .close { background:#171d16; }
.lab-quick-start { line-height:1.55; }
.lab-quick-start h2 { margin:0 44px 12px 0; }
.lab-quick-start ol { padding-inline-start:1.25rem; }
.lab-quick-start li+li { margin-top:.75rem; }
.lab-quick-start li::marker { color:var(--gold); font-weight:700; }
.lab-quick-start button { min-height:44px; margin-top:.5rem; }

.location-trial .scene-top :is(#depth,#stateTag):empty { display:none; }
.location-trial .scene-top #stateTag { margin-inline-start:auto; }
