/* Original stone/iron/brass shell. Gameplay geometry and camera remain authoritative. */
:root{--panel-iron:#242b25;--panel-deep:#151d17;--panel-edge:#6f7055;--brass:#d4b66d;--paper:#eee4cc;--dock-width:360px;--log-height:156px}
.app-frame{padding:8px;gap:7px;background:#101610}
.expedition-hud{display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,420px);align-items:center;gap:12px;padding:7px 12px;border:1px solid var(--panel-edge);border-top:2px solid #99906b;background:var(--panel-iron);min-height:66px}
.hud-identity{display:flex;align-items:baseline;gap:5px 14px;flex-wrap:wrap;min-width:0}
.hud-name{font-size:17px;color:var(--paper);overflow-wrap:anywhere}.hud-summary{font:12px var(--sans);color:#d6d3bb}.hud-points{font:11px var(--sans);color:#f0ce7f}.hud-connection{font:10px var(--sans);color:#bacb9d}.hud-connection[data-state=offline]{color:#f0ad92}
.expedition-hud .vitals-panel{grid-template-columns:1fr 1fr;gap:10px}.expedition-hud .vital-track{height:9px}.expedition-hud #conditions-copy{font-size:11px;margin:4px 0 0;line-height:1.3;overflow-wrap:anywhere}
.expedition-hud .vitals-region{display:block;min-width:0}.expedition-hud #conditions-copy{max-width:none}
.game-layout{grid-template-columns:minmax(0,1fr) var(--dock-width);grid-template-rows:minmax(0,1fr) var(--log-height);padding:0;gap:7px;min-height:0}
.adventure-content{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto auto;min-width:0;padding:8px;gap:5px;border-color:#545e49;background:#182219}
.bottom-hud,.actions-region,.action-buttons{min-width:0;max-width:100%}
.stage-copy{grid-row:1}.encounter-panel{grid-row:2}.inspection-row{grid-row:3;display:block}.bottom-hud{grid-row:4;display:block;min-height:0;padding-top:6px}
.target-detail .stage-description{font-size:12px;line-height:1.4;margin:0;padding:5px 0;min-height:22px}.map-toolbar{gap:5px 12px}.map-status{font-size:12px}
.rpg-dock{grid-column:2;grid-row:1;display:flex;flex-direction:column;min-width:0;min-height:0;border:1px solid var(--panel-edge);border-top:2px solid #99906b;background:var(--panel-iron)}
.rpg-dock .management-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:6px;border-bottom:1px solid var(--panel-edge);flex-shrink:0}
.rpg-dock .management-button{font:12px var(--sans);min-height:38px;padding:5px 3px;border-radius:1px;background:#303a2d;border:1px solid #666b50;color:#e9dfc2}
.rpg-dock .management-button[aria-pressed=true]{border-color:var(--brass);background:#45452f;color:#fff1c2;box-shadow:inset 0 -2px #d4b66d}
.navigation-symbol{font-size:16px;margin-right:5px;color:#dbc17f}.rpg-panels{position:relative;flex:1;min-height:0;overflow:hidden}.rpg-dock[data-panel-open=false] .rpg-panels{background:linear-gradient(180deg,#252e24,#1a231b)}
#rpg-panels>dialog[open]{position:absolute;inset:0;margin:0;width:100%;height:100%;max-width:none;max-height:none;min-width:0;overflow:auto;border:0;padding:10px;background:var(--panel-iron);color:var(--paper);box-shadow:none;font:12px/1.45 var(--sans)}
#rpg-panels .stats-dialog-heading{position:sticky;top:-10px;z-index:10;background:var(--panel-iron);padding:8px 0;margin-bottom:8px;border-bottom:1px solid #666b50}
#rpg-panels .stats-dialog-heading h2{font:17px Georgia,serif;color:#e8d298;margin:0}#rpg-panels .dialog-close{min-width:32px;min-height:32px}
#rpg-panels .inventory-layout{display:block}#rpg-panels .inventory-grid{grid-template-columns:repeat(4,minmax(0,1fr));max-height:none}#rpg-panels .inventory-slot{min-width:0}
#rpg-panels .stats-detail{max-height:none;overflow:visible}#rpg-panels .inventory-detail,#rpg-panels .item-detail{overflow-wrap:anywhere;min-width:0}#rpg-panels select{max-width:100%}
#rpg-panels .allocation-summary{position:static}
#rpg-panels .ability-card{padding:8px;margin-bottom:7px;border:1px solid #4d5a44;background:#1b251c}#rpg-panels .hotbar-editor{grid-template-columns:1fr}
.journal-rail{display:flex;flex-direction:column;gap:5px;padding:7px 10px;background:#1c261d;border:1px solid var(--panel-edge);min-width:0}
.journal-heading{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.journal-heading h2{margin-right:auto;font:13px Georgia,serif}.journal-channels{display:flex;gap:3px;flex-wrap:wrap}.journal-channels button,.journal-collapse{font:11px var(--sans);min-height:28px;padding:3px 9px;color:var(--paper);border:1px solid #62694f;background:#2c3829}.journal-channels [aria-pressed=true]{border-color:var(--brass);color:#ffe5a4;background:#45452f}
.journal-list{width:100%;flex:1}.journal-rail[data-collapsed=true] .journal-list{display:none}.game-layout[data-log-collapsed=true]{--log-height:42px}
.global-chat[data-docked=true]{position:absolute;inset:auto 8px 8px auto;bottom:8px!important;width:min(510px,calc(100vw - 16px));height:var(--log-height);max-height:var(--log-height);z-index:15;border:1px solid #a58b55;box-shadow:0 0 0 2px #121a13;display:flex;flex-direction:column;padding:7px;background:#202c22;font:12px var(--sans)}
.global-chat[data-docked=true][hidden]{display:none}.global-chat .chat-messages{flex:1;min-height:0;overflow:auto}.global-chat form{display:flex;gap:5px}.global-chat input{min-width:0;flex:1}.global-chat .stats-dialog-heading{margin:0}.global-chat h3{font-size:13px;margin:0}
.action-feedback{overflow:hidden}.action-button:focus-visible,.management-button:focus-visible,.journal-channels button:focus-visible{outline:2px solid #ffe8a7;outline-offset:2px}.stage-notices{top:70px;max-height:30%}
@media(min-width:1000px){.game-layout:has(.rpg-dock[data-panel-open=false]){grid-template-columns:minmax(0,1fr) 124px}.rpg-dock[data-panel-open=false]{align-self:start}.rpg-dock[data-panel-open=false] .management-buttons{grid-template-columns:1fr}.rpg-dock[data-panel-open=false] .rpg-panels{display:none}}
@media(max-width:999px){
 :root{--log-height:132px}.app-frame{padding:5px;gap:4px}.game-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto var(--log-height);gap:4px}
 .expedition-hud{grid-template-columns:1fr 1fr;min-height:70px;gap:6px;padding:5px 7px}.hud-identity{display:block}.hud-name{display:block;font-size:14px}.hud-summary,.hud-points,.hud-connection{display:block;font-size:10px}.expedition-hud .vitals-panel{gap:5px;grid-template-columns:1fr 1fr}.expedition-hud .vital-label{font-size:10px}.expedition-hud #conditions-copy{font-size:10px;max-height:28px;overflow:auto}
 .rpg-dock{grid-column:1;grid-row:2;border:0;min-height:0}.rpg-dock .management-buttons{grid-template-columns:repeat(4,minmax(0,1fr));padding:2px;gap:3px}.rpg-dock .management-button{min-height:40px;font-size:11px}.navigation-symbol{font-size:13px;margin-right:3px}
 .rpg-panels{position:fixed;top:95px;left:6px;right:6px;height:min(30dvh,300px);z-index:18;border:1px solid #a99666;box-shadow:0 4px 12px #0008;background:var(--panel-iron)}.rpg-dock[data-panel-open=false] .rpg-panels{display:none}
 .journal-rail{grid-row:3;padding:5px 7px}.journal-heading{gap:3px}.journal-heading h2{font-size:12px}.journal-channels button,.journal-collapse{min-height:30px;padding:3px 6px}.journal-entry{font-size:11px;gap:6px}
 .adventure-content{padding:4px;gap:3px}.bottom-hud{display:block;padding-top:4px;min-height:0}.inspection-row{display:block}.target-detail .stage-description{font-size:10px;max-height:35px;overflow:auto;padding:2px 0}.map-toolbar{gap:3px 7px}.map-status{font-size:10px}.stage-notices{top:60px;max-height:28%}
 .global-chat[data-docked=true]{height:132px;max-height:132px;bottom:5px!important;right:5px}.game-layout[data-log-collapsed=true]{--log-height:42px}
}
@media(max-height:500px) and (max-width:999px){.expedition-hud{min-height:40px;padding:3px 6px}.expedition-hud .vital-label{font-size:9px;line-height:1.1}.expedition-hud .vital-track{height:7px}.expedition-hud #conditions-copy{max-height:12px;margin-top:2px;font-size:9px}.hud-name{font-size:12px}.hud-summary{font-size:9px}.hud-connection,.hud-points{display:none}.rpg-dock .management-buttons{grid-template-columns:repeat(8,minmax(0,1fr))}.rpg-dock .management-button{min-height:32px;font-size:10px}.navigation-symbol{display:none}.rpg-panels{top:52px;height:40dvh}.game-layout{--log-height:55px}.journal-heading h2{display:none}.journal-channels button,.journal-collapse{min-height:25px}.target-detail{max-height:20px}.journal-rail{gap:2px}}
@media(max-height:500px) and (min-width:681px) and (max-width:999px){
 .actions-region{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:2px 6px;align-items:start}
 .action-buttons{grid-column:1;grid-row:1;display:flex;overflow-x:auto;height:44px}.action-buttons .action-button{flex:0 0 78px;height:44px;min-height:44px}
 .touch-controls{grid-column:2;grid-row:1;padding:0;margin:0;min-height:44px}.touch-toggle{grid-column:2;grid-row:2;justify-self:end;margin:0}
 #action-feedback{grid-column:1;grid-row:2;margin:0}.game-layout{--log-height:45px}.target-detail .stage-description{max-height:14px;padding:0;line-height:14px}.inspection-row{max-height:14px}.rpg-dock .management-button{min-height:29px}.rpg-dock .management-buttons{padding:1px}
}
