/* WPLACE mineral UI. Two shared raster skins; fixed-size corners, stretchable faces. */
body.game-layout{
 --ui-slate:url('../assets/ui/slate-panel-v1.png');
 --ui-brass:url('../assets/ui/brass-button-v1.png');
 --ui-text:#eee5cf;--ui-muted:#a3b6b5;--ui-gold:#d5b779;--ui-surface:#17252a;
 --panel:#17252a;--gold:#d5b779;--mint:#afc9b1;--muted:#a3b6b5;
 color:var(--ui-text);background:#101c20;
}
.game-layout button{font-weight:500;transition:filter .12s,color .12s,background-color .12s;}
.game-layout button:not(:disabled):active{filter:brightness(.9)}
.game-layout :is(button,input,select):focus-visible{outline:2px solid #e5c68b;outline-offset:3px}
.game-layout :is(.dialog,dialog,aside.game-drawer,.more-actions){
 border:12px solid transparent;border-image:var(--ui-slate) 112 fill / 12px / 0 stretch;
 border-radius:0;background:#17252a!important;color:var(--ui-text);box-shadow:0 20px 70px #02080bd9;
 scrollbar-color:#627376 #142126;scrollbar-width:thin;
}
.game-layout .dialog{padding:24px 26px;}
.game-layout .expedition-dialog{padding:22px 26px!important;}
.game-layout :is(.overlay){background:#061216bd;backdrop-filter:blur(5px)}
.game-layout dialog::backdrop{background:#061216c9;backdrop-filter:blur(5px)}
.game-layout :is(.dialog,dialog) h2{font-size:23px;font-weight:650;letter-spacing:-.055em;color:#e9d5a8;line-height:1.35;padding:0 40px 0 0;margin:0 0 20px}
.game-layout :is(.dialog,dialog) h3{color:#ded7be;font-weight:600}
.game-layout :is(.dialog,dialog) p{color:#b3c2be;line-height:1.75}
.game-layout :is(.dialog,dialog) small{color:#9eb4b1}
.game-layout :is(.dialog,dialog,.game-drawer,.context-actions,.mission-hud) button{
 border:6px solid transparent;border-image:var(--ui-slate) 112 fill / 6px / 0 stretch;
 border-radius:0;background:#213037;color:#dedfce;min-height:38px;padding:6px 12px;box-shadow:none;
}
.game-layout :is(.dialog,dialog,.game-drawer,.context-actions,.mission-hud) button:not(:disabled):hover{background:#213037;filter:brightness(1.2);color:#fff0d1}
.game-layout :is(.primary,.craft-open,.recipe button:not(:disabled),.progression-continue),
.game-layout .dialog .primary,.game-layout #welcome .primary{
 border:7px solid transparent;border-image:var(--ui-brass) 160 fill / 7px / 0 stretch;
 background:#af9256;color:#201d17;min-height:44px;font-weight:700;text-shadow:0 1px #f5dea137;border-radius:0;
}
.game-layout :is(.primary,.craft-open,.recipe button:not(:disabled),.progression-continue):hover,
.game-layout #welcome .primary:hover{color:#171812;background:#af9256;filter:brightness(1.08)}
.game-layout :is(.dialog,dialog,.game-drawer) button:disabled{opacity:1;color:#81918e;filter:saturate(.35) brightness(.8);cursor:not-allowed}
.game-layout :is(.dialog,dialog,.game-drawer) :is(.close,.drawer-close,.audio-close,.progression-close){
 border:0;border-image:none;background:none;min-width:36px;min-height:36px;padding:6px;color:#b6bdae;box-shadow:none;
}
.game-layout :is(.dialog,dialog) :is(.close,.audio-close,.progression-close):hover{background:#ffffff08;color:#f0d59b}
.game-layout .companion-dialog>button:first-child{border:0;border-image:none;float:right;background:none;min-height:36px}
.game-layout .dialog .close{top:8px;right:8px;font-size:23px}
.game-layout :is(.dialog,dialog) :is(input:not([type=checkbox]):not([type=range]),select),.game-layout #chat-input{
 background:#0d1c21;color:#e5dfcc;border:0;border-radius:2px;box-shadow:inset 0 2px 7px #0007;padding:11px 12px;min-height:42px;
}
.game-layout input[type=checkbox],.game-layout input[type=range]{accent-color:#c3a365}
.game-layout :is(.dialog,dialog) input::placeholder{color:#7b9292}
.game-layout .material-cost span{color:#b6ccab}.game-layout .material-cost .missing{color:#d6a28f}
.game-layout .error{color:#edb09c}

/* The gold surface denotes a selection, never every nested card. */
.game-layout :is(.set-tabs,.inventory-filters,.codex-list){border:0;gap:5px}
.game-layout :is(.set-tabs,.inventory-filters,.codex-list) button{
 background:none!important;border:0!important;border-image:none!important;box-shadow:none;padding:10px 13px;min-height:40px;color:#9fb2b2;border-radius:2px;
}
.game-layout :is(.set-tabs,.inventory-filters,.codex-list) button:hover{color:#e6d4b3;background:#344b4a55!important}
.game-layout :is(.set-tabs,.codex-list) button.active,.game-layout .inventory-filters button[aria-pressed=true]{
 background:#a88c50!important;border:6px solid transparent!important;border-image:var(--ui-brass) 160 fill / 6px / 0 stretch!important;
 color:#211f18!important;font-weight:650;box-shadow:none;padding:4px 7px;
}
.game-layout .set-tabs{margin-bottom:22px;gap:5px 7px}
.game-layout .codex-list{padding-right:0;gap:5px}.game-layout .codex-layout{gap:28px}
.game-layout :is(.vehicle-card,.gear-card,.life-card){background:linear-gradient(150deg,#344b4b38,transparent 70%),#102027!important;border:0;border-radius:3px;padding:18px;box-shadow:0 3px 10px #06101355}
.game-layout :is(.vehicle-card,.gear-card,.life-card) h3{font-size:15px;color:#e5d7b3}
.game-layout .gear-card.owned{background:linear-gradient(145deg,#4b655345,transparent 70%),#13262b!important}
.game-layout .gear-card .gear-art{width:82px;height:82px;filter:drop-shadow(0 6px 5px #0007)}
.game-layout .codex-detail .boss-card{background:none!important;box-shadow:none}
.game-layout .boss-portrait{filter:drop-shadow(0 10px 12px #0006)}
.game-layout .loadout{gap:8px;grid-template-columns:repeat(4,minmax(0,1fr));margin:18px 0 24px}
.game-layout .loadout-slot{border:8px solid transparent;border-image:var(--ui-slate) 112 fill / 8px / 0 stretch;background:#132126;padding:10px 6px;min-width:0}
.game-layout .loadout-slot>small{color:#c7b78e;font-size:11px}
.game-layout .loadout-slot>strong{font-size:11px;line-height:1.55;color:#e2e5d5}
.game-layout .loadout-slot .asset-icon{width:40px;height:40px;filter:drop-shadow(0 3px 3px #0008)}
.game-layout .loadout-slot>button{border:0;border-image:none;min-height:28px;padding:3px 8px;background:none;color:#8ea5a3;font-size:10px}
.game-layout .loadout-stats{background:#243b3d66;color:#c8d5c5;padding:13px 16px;line-height:1.85;font-size:12px}
.game-layout :is(.set-summary,.refinery-summary){background:none;border:0;padding:0 0 18px}
.game-layout .bonus-active{color:#b8d39a!important}
.game-layout :is(.upgrade-row,.refining-queue,.reward-rule,.invite-code,.rider-list){background:#22363a66;border:0;box-shadow:none}
.game-layout .party-member{padding:12px 14px;background:#102027}.game-layout .invite-code strong{color:#e5c78b;letter-spacing:.12em}
.game-layout .refinery-recipe{padding:18px 0}.game-layout .refinery-recipe-name strong{color:#e1dec5}
.game-layout .station-actions{gap:8px}.game-layout .station-actions button{font-size:11px}
.game-layout .facility-tiers{padding-top:14px;margin-top:18px}
.game-layout .recipe{padding:18px 0}.game-layout .recipe-info strong{font-size:14px;color:#e7ddc1}
.game-layout .recipe-info small{color:#9eb6b3}
.game-layout .recipe-icon{filter:drop-shadow(0 4px 4px #0007)}

/* Inventory cells are inset stone pockets; quantities and names stay readable. */
.game-layout aside.game-drawer{width:400px;padding:44px 16px 18px}
.game-layout .game-drawer .panel-title{font-size:21px;color:#e8d3a5;letter-spacing:-.04em}
.game-layout #bag-count{color:#9db3af}
.game-layout #inventory{gap:7px;grid-template-columns:repeat(4,minmax(0,1fr))}
.game-layout .inventory .slot{height:84px;min-height:84px;border:6px solid transparent;border-image:var(--ui-slate) 112 fill / 6px / 0 stretch;background:#14232a;padding:5px 3px;gap:5px;box-shadow:none;border-radius:0}
.game-layout .inventory .slot[aria-pressed=true]{border-image-source:var(--ui-brass);border-image-slice:160 fill;background:#9e824b;color:#211f18;box-shadow:none}
.game-layout .slot .item-name{font-size:10px;color:#c8d3c7}
.game-layout .slot[aria-pressed=true] .item-name{color:#211f18;font-weight:650}
.game-layout .slot .count{top:0;right:1px;color:#f4e3b9;font-size:11px}
.game-layout .slot[aria-pressed=true] .count{color:#201e16;text-shadow:none}
.game-layout .slot .asset-icon{width:36px;height:36px;filter:drop-shadow(0 3px 3px #0006)}
.game-layout #inventory-detail{background:#263c3e66;margin:18px 0 0;padding:16px 12px 16px 60px;min-height:100px}
.game-layout #inventory-detail strong{color:#e3c992}.game-layout #inventory-detail p{color:#afc0b9}
.game-layout .equipment{color:#8fa8a4}
.game-layout #chat-log{padding:8px 0;color:#c6d4ca}.game-layout #chat-log b{color:#dbbd7f}

/* The world-facing HUD stays compact, with mineral inlays and solid silhouettes. */
.game-layout header{background:#111f24;color:#d7d8c7;height:38px;box-shadow:0 2px 8px #0005}
.game-layout .brand{color:#d9bd83;font-size:17px;font-weight:750;letter-spacing:-.04em}.game-layout .brand span{color:#dbe3d6}
.game-layout #connection{color:#b6cbae}.game-layout #online{color:#8fa7a5}
.game-layout .player-card.vitals{width:240px;padding:10px 12px 7px;gap:8px;left:16px;top:16px;border:9px solid transparent;border-image:var(--ui-slate) 112 fill / 9px / 0 stretch;background:#17252a;border-radius:0;text-shadow:0 1px 2px #000}
.game-layout .vitals::before{display:none}
.game-layout .vitals #player-name{color:#e9dbb5;font-size:13px}.game-layout .vitals #level{color:#b6c4b0;font-size:10px}
.game-layout .vital-caption{color:#c7c8b4;font-size:10px;margin-bottom:4px}
.game-layout .vital-track{height:13px;background:#070f14;clip-path:polygon(3px 0,100% 0,100% calc(100% - 3px),calc(100% - 3px) 100%,0 100%,0 3px);box-shadow:inset 0 2px 4px #000b}
.game-layout .vitals #hp-bar{background:linear-gradient(180deg,#eea681 0%,#c16454 28%,#ab4943 68%,#723b36 100%)}
.game-layout .vitals #mana-fill{background:linear-gradient(180deg,#b8e0df 0%,#77b7c5 28%,#458d9e 68%,#305d75 100%)}
.game-layout .vital-fill::after{content:'';position:absolute;inset:0;background-image:var(--ui-brass);background-size:230px 230px;background-position:center;mix-blend-mode:soft-light;opacity:.5;pointer-events:none}
.game-layout .mana-track{height:9px}.game-layout .vitals .vital-loss{background:#ead6a1}
.game-layout .vitals .vitals-state{min-height:0;font-size:10px}.game-layout .vitals .vitals-state:empty{display:none}
.game-layout .mission-hud{top:173px;left:24px;width:225px}.game-layout .mission-hud.folded{padding:0;background:none}
.game-layout .mission-hud:not(.folded){border:8px solid transparent;border-image:var(--ui-slate) 112 fill / 8px / 0 stretch;background:#17252a;padding:10px}
.game-layout .mission-hud .mission-toggle{border:0;border-image:none;background:none;padding:0 18px 0 0;min-height:0;color:#dedcc2}
.game-layout .mission-toggle small{color:#c6af79;font-size:9px;letter-spacing:.08em}.game-layout .mission-title{color:#dfe2cf;font-size:12px}
.game-layout .hotbar{padding:7px;gap:5px;border:8px solid transparent;border-image:var(--ui-slate) 112 fill / 8px / 0 stretch;background:#142329;bottom:65px;border-radius:0;box-shadow:0 8px 24px #0007}
.game-layout .hotbar button{width:56px;height:59px;border:0;border-image:none;background:#26393b;box-shadow:inset 0 2px 6px #0008;border-radius:1px;padding:5px 2px}
.game-layout .hotbar button.selected{border:5px solid transparent;border-image:var(--ui-brass) 160 fill / 5px / 0 stretch;background:#a68b51;padding:0;box-shadow:none}
.game-layout .hotbar button:hover{filter:brightness(1.13);background:#304547}
.game-layout .hotbar button.selected:hover{background:#a68b51}
.game-layout .hotbar button.selected :is(small,kbd){color:#24251b;text-shadow:none;font-weight:650}
.game-layout .hotbar small{color:#d4dccd;font-size:10px}.game-layout .hotbar kbd{color:#98afab;top:3px;left:4px;font-size:8px}
.game-layout .hotbar .asset-icon{filter:drop-shadow(0 2px 2px #0008)}
.ui-icon{display:inline-block;width:20px;height:20px;flex:none;vertical-align:middle;pointer-events:none;color:currentColor}
.game-layout .hotbar .ui-icon{width:27px;height:27px}
.game-layout #dash-btn>span{color:#bcccb2}.game-layout #skill-button>span{color:#a2cadb}
.game-layout .game-dock{height:48px;gap:4px;background:#101e24f5;box-shadow:0 -6px 20px #07101455}
.game-layout .dock-button{min-width:108px;gap:9px;padding:0 17px;color:#c4d0c5;font-size:12px}
.game-layout .dock-button .ui-icon{width:18px;height:18px;color:#c8ac76}
.game-layout .dock-button:hover,.game-layout .dock-button[aria-expanded=true]{background:#2b424666;color:#f2e5c4}
.game-layout .dock-button kbd{color:#7f9d9d;font-size:9px}.game-layout .more-toggle::after{display:none}
.game-layout .more-actions{width:230px;left:calc(50% + 110px);padding:9px 10px;bottom:58px;border-width:9px;border-image-width:9px}
.game-layout .menu-action{min-height:40px;color:#cbd6c8;padding:7px 9px;border:0;border-image:none;background:none}
.game-layout .menu-action:hover{color:#efdbb3;background:#50615b33}.game-layout .menu-group + .menu-group{border:0;padding-top:10px;margin-top:5px}
.game-layout .context-actions{bottom:162px;max-width:calc(100% - 24px);flex-wrap:wrap;justify-content:center;width:max-content}
.game-layout .context-actions button{font-size:11px;color:#e7d7b1;min-height:40px;padding:5px 12px;border-width:6px;white-space:nowrap}
.game-layout .encounter-hud{border:8px solid transparent;border-image:var(--ui-slate) 112 fill / 8px / 0 stretch;background:#17252a;padding:9px 12px;box-shadow:0 5px 20px #0005}
.game-layout .boss-life{height:10px;background:#131619}.game-layout .boss-life i{background:linear-gradient(#e7c183,#ba8851 35%,#8e5838)}
.game-layout #toast{background:#13242bef;color:#e9d6b1;border:0;border-radius:3px;padding:12px 18px;box-shadow:0 5px 20px #0006;max-width:min(540px,calc(100% - 36px))}

/* Entry and secondary dialogs use the same materials, without nested ornamental frames. */
.game-layout #welcome .dialog{width:min(560px,calc(100vw - 32px))!important;padding:24px 30px;border-radius:0;max-height:calc(100dvh - 40px);display:flex;flex-direction:column;overflow:hidden}
.game-layout #welcome .welcome-header{flex:none}
.game-layout #welcome .welcome-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.game-layout #welcome h2{font-size:30px;margin-bottom:8px;color:#e8d4a7}
.game-layout #welcome p{font-size:13px;color:#abc0b9}
.game-layout #join-form>label{font-size:11px;color:#c8ba99;margin-bottom:8px}
.game-layout #name-input{width:100%;font-size:15px;min-height:44px}
.game-layout .character-select{margin:16px 0 18px;display:grid;grid-template-columns:1fr 1fr;gap:12px}
.game-layout .avatar-choices{grid-column:1/-1;gap:6px}
.game-layout .avatar-choices button{border:5px solid transparent;border-image:var(--ui-slate) 112 fill / 5px / 0 stretch;padding:5px 1px;background:#182d32;min-height:0;border-radius:0}
.game-layout .avatar-choices button[aria-pressed=true]{border-image:var(--ui-brass) 160 fill / 5px / 0 stretch;background:#ae8f50;box-shadow:none}
.game-layout .avatar-choices button[aria-pressed=true] small{color:#27251b;font-weight:700}
.game-layout .avatar-choices small{font-size:9px;color:#c2cdbf;line-height:1.4;letter-spacing:-.04em}
.game-layout .character-select>label{display:flex;flex-direction:column;align-items:stretch;gap:7px;margin:0;color:#aabdba;font-size:11px}
.game-layout .character-select select{width:100%;font-size:12px;padding:9px;min-height:38px}
.game-layout .character-select>canvas{display:none!important}
.game-layout #welcome .new-character{margin:18px 0 0;color:#b1c3b8;gap:8px;align-items:center}.game-layout #welcome .new-character small{color:#809e98}
.game-layout :is(.audio-dialog,.companion-dialog,.progression-dialog){padding:22px 24px;max-height:calc(100dvh - 28px)}
.game-layout .audio-dialog{width:min(440px,calc(100vw - 28px))}
.game-layout .audio-dialog input[type=range]{accent-color:#c3a366;min-height:26px;box-shadow:none;background:transparent}
.game-layout .audio-dialog label span{color:#c6d4c9}.game-layout .audio-dialog output{color:#d6bc84}
.game-layout .progression-dialog h2{padding:0;font-size:24px}.game-layout .progression-art{height:86px}
.game-layout .progression-chapter{color:#bda675}.game-layout .progression-count{color:#c9cfaa}
.game-layout .progression-dialog progress::-webkit-progress-value{background:#c0a269}.game-layout .progression-dialog progress::-moz-progress-bar{background:#c0a269}
.game-layout .progression-next{background:#29414270}.game-layout .progression-seals .cleared{color:#d7d6b2}
.game-layout .progression-actions button{padding:5px 8px;min-height:44px}
.game-layout .rail-build-bar{background:#12272dee;color:#dfdbbf;box-shadow:0 5px 15px #0005}

@media(max-width:900px){
 .game-layout .player-card.vitals{width:215px}.game-layout .more-actions{left:auto;right:12px}
}
@media(max-width:600px){
 .game-layout :is(.dialog,dialog,aside.game-drawer){border-width:9px;border-image-width:9px}
 .game-layout .dialog,.game-layout .expedition-dialog{padding:18px 14px!important}
 .game-layout :is(.dialog,dialog) h2{font-size:21px;margin-bottom:16px}
 .game-layout :is(.dialog,dialog,.game-drawer) button{min-height:42px}
 .game-layout .player-card.vitals{width:188px;left:10px;top:12px;padding:8px 8px 6px;gap:6px;border-width:7px;border-image-width:7px}
 .game-layout .vitals #player-name{font-size:11px}.game-layout .vital-caption{font-size:9px}.game-layout .vitals #hp-text,.game-layout #mana-text{font-size:10px}
 .game-layout .mission-hud{top:161px;left:16px;max-width:calc(100% - 150px)}
 .game-layout .mission-title{font-size:11px}.game-layout .world-title{right:13px;top:18px;width:125px}
 .game-layout .hotbar{padding:5px;gap:4px;border-width:6px;border-image-width:6px;bottom:61px}
 .game-layout .hotbar button{width:49px;height:55px}.game-layout .hotbar small{font-size:9px}
 .game-layout .game-dock{gap:0}.game-layout .dock-button{min-width:0;flex:1;gap:5px;padding:0 5px;font-size:11px}
 .game-layout .dock-button .ui-icon{width:16px;height:16px}.game-layout .dock-button kbd{display:none}
 .game-layout .more-toggle .ui-icon{display:none}.game-layout .more-actions{right:8px;width:220px;bottom:56px}
 .game-layout .context-actions{bottom:150px}.game-layout .context-actions button{font-size:10px;min-height:40px;padding:4px 8px}
 .game-layout aside.game-drawer{right:8px;top:46px;bottom:56px;width:390px;max-width:calc(100vw - 16px);padding:42px 10px 16px}
 .game-layout #inventory{gap:5px}.game-layout .inventory .slot{height:76px;min-height:76px;padding:3px 0}
 .game-layout .slot .asset-icon{width:32px;height:32px}.game-layout .slot .item-name{font-size:9px}
 .game-layout .loadout{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.game-layout .loadout-slot>button{min-height:32px}
 .game-layout .gear-card{padding:12px}.game-layout .gear-card .gear-art{width:68px;height:68px}
 .game-layout #welcome .dialog{padding:20px 17px!important}.game-layout #welcome h2{font-size:27px}
 .game-layout .character-select{gap:10px}.game-layout .avatar-choices{gap:3px}.game-layout .avatar-choices button{padding:3px 0;min-height:0;border-width:4px;border-image-width:4px}
 .game-layout .avatar-choices small{font-size:8px}.game-layout :is(.audio-dialog,.companion-dialog,.progression-dialog){padding:18px 16px}
 .game-layout .progression-dialog h2{font-size:22px}.game-layout .progression-art{height:74px}
 .game-layout .encounter-hud{top:214px}
}
@media(max-width:360px){.game-layout .dock-button .ui-icon{display:none}.game-layout .hotbar button{width:44px}.game-layout .hotbar{gap:3px;padding:4px}}
@media(max-height:500px) and (min-width:600px){
 .game-layout .player-card.vitals{width:185px;top:9px;padding:6px 8px;gap:4px;border-width:6px;border-image-width:6px}
 .game-layout .hotbar{bottom:52px;padding:3px;border-width:5px;border-image-width:5px}.game-layout .hotbar button{height:47px;width:48px}
 .game-layout .context-actions{bottom:127px}.game-layout .encounter-hud{top:9px}.game-layout .mission-hud{display:none}
}
@media(prefers-reduced-motion:reduce){.game-layout button{transition:none}}

/* Equipment is arranged around the explorer instead of repeated oversized cards. */
.gear-overview{display:grid;grid-template-columns:minmax(340px,1.15fr) minmax(210px,.85fr);gap:32px;align-items:center;margin-bottom:24px}
.equipment-stage{display:grid;grid-template-columns:minmax(90px,1fr) 128px minmax(90px,1fr);grid-template-rows:repeat(3,90px);gap:7px}
.equipment-portrait{grid-column:2;grid-row:1/3;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at 50% 66%,#67897535,transparent 70%)}
.equipment-portrait canvas{position:static!important;width:144px!important;height:166px!important;max-width:none;image-rendering:pixelated;filter:drop-shadow(0 7px 6px #0007)}
.equipment-cell{position:relative;display:grid;grid-template-columns:40px minmax(0,1fr);grid-template-rows:18px 1fr 23px;gap:0 6px;align-items:center;padding:6px 8px;background:#14262c;min-width:0;border:0;box-shadow:inset 0 2px 7px #06101680}
.equipment-cell[data-slot=head]{grid-column:1;grid-row:1}.equipment-cell[data-slot=body]{grid-column:1;grid-row:2}.equipment-cell[data-slot=hands]{grid-column:1;grid-row:3}
.equipment-cell[data-slot=accessory]{grid-column:3;grid-row:1}.equipment-cell[data-slot=legs]{grid-column:3;grid-row:2}.equipment-cell[data-slot=feet]{grid-column:3;grid-row:3}
.equipment-cell[data-slot=weapon]{grid-column:2;grid-row:3;background:#2d3d3659}
.equipment-cell .asset-icon{grid-column:1;grid-row:1/4;width:38px;height:38px;filter:drop-shadow(0 3px 3px #0007)}
.equipment-slot-label{grid-column:2;font-size:9px!important;color:#baa776!important}
.equipment-item-name{grid-column:2;font-size:10px;line-height:1.45;color:#d4dccc;font-weight:500;overflow:hidden;text-overflow:ellipsis;max-height:30px}
.equipment-empty{grid-column:1/-1;text-align:center;font-size:11px;color:#658682}
.game-layout .dialog .equipment-remove{grid-column:2;border:0;border-image:none;background:none!important;padding:0;min-height:23px;justify-self:start;color:#849f9b;font-size:10px;box-shadow:none}
.equipment-readout h3{margin:8px 0 20px;font-size:22px!important;color:#e8d6ac!important;letter-spacing:-.04em}
.equipment-kicker{font-size:10px;color:#bba97e!important;letter-spacing:.06em}
.equipment-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:20px 12px;margin:0}
.equipment-stats dt{font-size:10px;color:#9ab0ac;margin:0 0 7px}.equipment-stats dd{font-size:20px;font-weight:600;font-variant-numeric:tabular-nums;margin:0;color:#dce4ce}
.game-layout .equipment-note{font-size:11px;color:#91aaa3!important;line-height:1.75;margin:22px 0 0;max-width:290px}
.game-layout .set-summary .set-boss-icon{width:64px;height:70px}.game-layout .set-summary h3{font-size:17px;margin:0 0 8px}
.game-layout .set-summary p{margin:4px 0;font-size:12px}.game-layout .set-summary small{font-size:10px}
.game-layout .inventory-empty{grid-column:1/-1;padding:32px 8px;line-height:1.8;color:#8ea9a3;text-align:center;font-size:12px}
.game-layout #welcome .primary{text-align:center;font-size:14px;letter-spacing:.02em}
.game-layout .minimap-frame{position:absolute;right:14px;top:74px;width:120px;height:137px;border:7px solid transparent;border-image:var(--ui-slate) 112 / 7px / 0 stretch;pointer-events:none;z-index:3}
@media(max-width:800px){.gear-overview{grid-template-columns:1fr;gap:18px}.equipment-stage{max-width:460px;width:100%;justify-self:center}.equipment-readout{display:grid;grid-template-columns:1fr auto;gap:6px 20px}.equipment-readout h3{margin:0 0 8px}.equipment-kicker{grid-column:1/-1}.equipment-stats{grid-column:1/-1;grid-template-columns:repeat(6,1fr);gap:8px}.game-layout .equipment-note{grid-column:1/-1;margin:8px 0 0;max-width:none}.equipment-stats dd{font-size:17px}}
@media(max-width:600px){.equipment-stage{grid-template-columns:minmax(72px,1fr) 98px minmax(72px,1fr);grid-template-rows:repeat(3,112px);gap:5px}.equipment-cell{display:flex;flex-direction:column;justify-content:center;gap:3px;padding:5px 3px}.equipment-cell .asset-icon{width:30px;height:30px}.equipment-item-name{font-size:8px;white-space:nowrap;max-width:100%}.equipment-slot-label{font-size:8px!important}.game-layout .dialog .equipment-remove{position:static;min-height:36px;width:100%;font-size:10px;text-align:center;color:#9eb5ae}.game-layout .dialog .equipment-remove:focus-visible{background:#11252bf5!important;color:#ead5aa}.equipment-portrait canvas{width:120px!important;height:146px!important}.equipment-stats{grid-template-columns:repeat(3,1fr);gap:12px}.equipment-stats dd{font-size:18px}.equipment-readout h3{font-size:18px!important}.game-layout .minimap-frame{width:90px;height:107px}.game-layout .inventory-filters button{padding:9px 12px}.game-layout .inventory-filters button[aria-pressed=true]{padding:3px 6px}}
@media(max-width:360px){.game-layout .minimap-frame{display:none}}

/* Readable type and deliberate hierarchy across the complete interface. */
.game-layout :is(.dialog,dialog){font-size:13px;line-height:1.6}
.game-layout :is(.dialog,dialog) :is(p,.modal-intro,.collection-note,.reward-rule p){font-size:13px;line-height:1.75}
.game-layout :is(.dialog,dialog) small{font-size:11px;line-height:1.6}
.game-layout :is(.dialog,dialog,.game-drawer) button{min-height:44px}
.game-layout :is(.dialog,dialog,.game-drawer) :is(.close,.drawer-close,.audio-close,.progression-close){min-width:44px;min-height:44px}
.game-layout :is(.equipment-item-name,.equipment-slot-label){font-size:11px!important}
.game-layout .equipment-stats dt,.game-layout .equipment-kicker,.game-layout .equipment-note{font-size:12px!important}
.game-layout .equipment-stage{grid-template-rows:repeat(3,108px);grid-template-columns:minmax(120px,1fr) 128px minmax(120px,1fr)}
.game-layout .equipment-cell{grid-template-rows:18px 1fr 30px}
.game-layout .dialog .equipment-remove{min-height:30px;font-size:11px}
.game-layout .gear-overview{grid-template-columns:minmax(400px,1.3fr) minmax(210px,.8fr);gap:24px}
.game-layout .set-tabs{gap:4px;row-gap:6px}
.game-layout .dialog .set-tabs button{font-size:12px;min-height:44px}
.game-layout .station-actions{border:0}.game-layout .facility-tiers{border:0}
.game-layout .dialog .card-actions{gap:8px}
.game-layout .build-cost{font-size:12px;line-height:1.7}
.game-layout .material-cost span{font-size:12px}
.game-layout .dialog .gear-card{display:flex;flex-direction:column;align-items:stretch;gap:7px}
.game-layout .gear-card .gear-art{align-self:center}
.game-layout .gear-card h3,.game-layout .gear-card p{margin:3px 0}
.game-layout .gear-card p{flex:1}
.game-layout .dialog .gear-card button{width:100%;font-size:12px;line-height:1.45;padding:8px}
.game-layout .dialog .gear-card button:disabled{background:#15242a;color:#9aaca5;filter:none}
.game-layout .companion-dialog article{border:0;background:#102027;padding:16px;margin:10px 0;border-radius:3px}
.game-layout .companion-dialog h3{font-size:16px;color:#e7d2a4;margin-top:26px}
.game-layout .companion-dialog summary{color:#d6c095;min-height:44px}
.game-layout .companion-dialog .character-select>canvas{display:none}
.game-layout .companion-dialog button{font-size:12px;line-height:1.5;margin:4px}
.game-layout .audio-sliders input{min-height:44px;cursor:pointer}
.game-layout #help-modal .dialog{width:min(600px,94vw)}
.game-layout #help-modal p{margin:0 0 20px}

/* Inventory contents scroll independently; selected item remains visible. */
.game-layout aside.game-drawer[data-panel=inventory]{overflow:auto;padding-top:48px;}
.game-layout .game-drawer[data-panel=inventory]>.inventory{display:grid!important;grid-template-rows:auto auto auto minmax(160px,1fr) auto auto;height:auto;min-height:100%;overflow:visible}
.game-layout .inventory .panel-title{margin:0;padding:0 0 14px;align-items:center}
.game-layout .inventory-filters{margin-bottom:12px;flex-wrap:nowrap}
.game-layout #inventory{overflow-y:auto;align-content:start;padding:2px 4px 8px 2px;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#758681 #14252a}
.game-layout #inventory-detail{margin:10px 0 12px;padding:12px 12px 12px 58px;min-height:96px;background:#21383a;border-radius:3px}
.game-layout #inventory-detail strong{font-size:14px;line-height:1.4}
.game-layout #inventory-detail small{font-size:11px;margin-top:3px}
.game-layout #inventory-detail p{font-size:12px;margin-top:7px;line-height:1.5}
.game-layout #inventory-detail>img{top:14px;width:34px;height:34px}
.game-layout .inventory #equipment{display:none}
.game-layout .slot .item-name{font-size:11px}
.game-layout .slot .count{font-size:12px}

/* Identity, resources and combat readouts have stable, separate footprints. */
.game-layout .player-card.vitals{width:290px;min-height:132px;padding:10px 12px 8px 77px;gap:8px;}
.game-layout .hud-portrait{position:absolute!important;left:7px!important;top:16px!important;width:63px!important;height:82px!important;image-rendering:pixelated;filter:drop-shadow(0 4px 5px #0009);pointer-events:none}
.game-layout .vitals #player-name{font-size:13px}
.game-layout .vital-caption{font-size:11px}.game-layout .vitals #hp-text,.game-layout #mana-text{font-size:11px}
.game-layout .vital-track{height:15px;clip-path:polygon(3px 0,100% 0,100% calc(100% - 3px),calc(100% - 3px) 100%,0 100%,0 3px)}
.game-layout .mana-track{height:11px}
.game-layout .vitals .vitals-state{font-size:11px;grid-column:1/-1;color:#f0bda0}
.game-layout .vitals.critical{background:#302322;border-image-source:var(--ui-slate)}
.game-layout .vitals.critical .health-resource{filter:drop-shadow(0 0 4px #b5513445)}
.game-layout .mission-hud{top:167px;left:24px;width:264px}
.game-layout .mission-hud.folded{padding:6px 10px 10px;background:linear-gradient(90deg,#101e25df,transparent);border:0}
.game-layout .mission-hud .mission-toggle{min-height:40px;gap:6px}
.game-layout .mission-toggle small{font-size:10px}.game-layout .mission-title{font-size:13px;line-height:1.5}
.game-layout .mission-hud #quests{font-size:12px;max-height:220px;overflow:auto}
.game-layout .encounter-hud{width:380px;max-width:calc(100% - 660px);padding:10px 14px 10px 66px}
.game-layout .encounter-hud .boss-emblem{position:absolute;left:8px;top:17px;width:50px;height:50px;object-fit:contain;image-rendering:pixelated}
.game-layout .encounter-hud b{font-size:14px}.game-layout .encounter-hud .boss-phase{font-size:10px}
.game-layout .encounter-hud .boss-hint{font-size:11px}.game-layout .boss-readout span{font-size:11px}
.boss-stages{display:flex;gap:5px;margin-top:7px}
.boss-stages i{font-style:normal;font-size:10px;width:24px;text-align:center;background:#273b3e;color:#849994;clip-path:polygon(4px 0,100% 0,100% calc(100% - 4px),calc(100% - 4px) 100%,0 100%,0 4px)}
.boss-stages .reached{background:#c6a56a;color:#24241b}

/* Illustrated abilities, persistent labels, separate countdown and mana states. */
.game-layout .hotbar{bottom:64px;gap:5px;padding:6px}
.game-layout .hotbar button{position:relative;isolation:isolate;width:68px;height:80px;padding:7px 3px 17px;overflow:hidden}
.game-layout .hotbar button.selected{padding:2px 0 12px}
.game-layout .hotbar button>span:first-of-type{display:block;width:38px;height:38px;margin:0 auto}
.game-layout .hotbar .asset-icon{width:36px;height:36px}
.game-layout .hotbar small{font-size:11px;line-height:1.3;white-space:nowrap}
.game-layout .hotbar kbd{font-size:9px;z-index:3;top:2px;left:3px}
.game-layout .hotbar button:disabled{opacity:1;filter:none;background:#192b30;cursor:not-allowed}
.game-layout .hotbar button:disabled>span:first-of-type{filter:saturate(.5) brightness(.65)}
.game-layout .hotbar .ability-art{background-image:url('../assets/ui/ability-atlas-v1.png');background-size:300% 200%;background-repeat:no-repeat;filter:drop-shadow(0 2px 2px #0009)}
.ability-art[data-ability=sword]{background-position:0 0}.ability-art[data-ability=bow]{background-position:50% 0}.ability-art[data-ability=crossbow]{background-position:100% 0}
.ability-art[data-ability=staff]{background-position:0 100%}.ability-art[data-ability=froststaff]{background-position:50% 100%}.ability-art[data-ability=dash]{background-position:100% 100%}
.game-layout .hotbar .ability-status{position:absolute;bottom:3px;left:0;right:0;font-size:9px;color:#9fbcb7;height:13px;line-height:13px;white-space:nowrap}
.game-layout .hotbar .ability-timer{position:absolute;top:22px;left:0;right:0;font-style:normal;font-size:17px;font-weight:700;color:#fff0d1;text-shadow:0 2px 5px #000;z-index:3;pointer-events:none}
.game-layout .hotbar .cooling::after{content:'';position:absolute;inset:auto 0 0;height:var(--cooldown);background:#09171f90;z-index:-1;transition:height .1s linear}
.game-layout .hotbar .unavailable .ability-status{color:#e9b398}
.game-layout .context-actions{bottom:178px}
.game-layout #target-label{bottom:166px;padding:5px 10px;background:#13252bd9;color:#d7dcca;border:0;max-width:calc(100% - 32px)}
.game-layout #target-label:empty{display:none}
.game-layout .rail-build-bar{bottom:180px}
.game-layout .more-actions{max-height:calc(100dvh - 110px);overflow:auto;overscroll-behavior:contain}
.game-layout .dock-button[aria-expanded=true]{color:#edcf91;background:#314346}
.game-layout .dock-button[aria-expanded=true] .ui-icon{color:#f3d68f}
.game-layout #toast{top:175px;bottom:auto;left:50%;transform:translateX(-50%);font-size:13px;pointer-events:none}
.game-layout #toast:not(.visible){visibility:hidden}

/* Coarse pointer controls: angular surfaces, large touch targets, no painted rings. */
.touch-controls{display:none;position:absolute;inset:0;z-index:6;pointer-events:none}
.touch-pad{position:absolute;left:max(12px,env(safe-area-inset-left));bottom:64px;width:132px;height:132px;display:grid;grid-template:repeat(3,44px)/repeat(3,44px)}
.touch-pad button,.touch-attack{pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;border:5px solid transparent;border-image:var(--ui-slate) 112 fill / 5px / 0 stretch;background:#21363be6;color:#d2c197;min-width:44px;min-height:44px;padding:0;border-radius:0;font-size:14px}
.touch-pad [data-control=up]{grid-area:1/2}.touch-pad [data-control=left]{grid-area:2/1}.touch-pad [data-control=right]{grid-area:2/3}.touch-pad [data-control=down]{grid-area:3/2}
.touch-controls .pressed{border-image-source:var(--ui-brass);border-image-slice:160 fill;color:#221f18}
.touch-attack{position:absolute;bottom:94px;right:max(18px,env(safe-area-inset-right));width:64px;height:64px;font-size:13px}
body.ui-modal-open .touch-controls{display:none!important}
@media(max-width:1050px){.game-layout .encounter-hud{top:162px;width:350px;max-width:calc(100% - 40px)}.game-layout .in-encounter .mission-hud{display:none}}
@media(max-width:800px){.game-layout .gear-overview{grid-template-columns:1fr}.game-layout .equipment-stage{grid-template-columns:minmax(100px,1fr) 120px minmax(100px,1fr)}.game-layout .gear-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
 .game-layout .player-card.vitals{width:214px;left:8px;top:10px;padding:8px 8px 7px 54px;min-height:117px;gap:7px}
 .game-layout .hud-portrait{left:1px!important;top:19px!important;width:48px!important;height:66px!important}
 .game-layout .vitals #player-name{font-size:11px}.game-layout .vitals #level{font-size:9px}
 .game-layout .vital-caption,.game-layout .vitals #hp-text,.game-layout #mana-text{font-size:10px}
 .game-layout .vital-track{height:13px}.game-layout .mana-track{height:9px}
 .game-layout .world-title{width:125px;top:16px}.game-layout .world-title h1{font-size:12px}
 .game-layout .mission-hud{top:142px;left:10px;max-width:calc(100% - 130px)}.game-layout .mission-title{font-size:12px}
 .game-layout .encounter-hud{top:186px;width:calc(100% - 28px);max-width:none;padding:8px 10px 8px 54px}
 .game-layout .encounter-hud .boss-emblem{width:40px;height:40px;left:5px;top:17px}.game-layout .encounter-hud b{font-size:13px}
 .game-layout .hotbar{bottom:202px;padding:4px;gap:3px;max-width:calc(100% - 16px)}
 .game-layout .hotbar button{width:54px;height:74px;padding-top:5px}.game-layout .hotbar button.selected{padding-top:0}
 .game-layout .hotbar button>span:first-of-type{width:34px;height:34px}.game-layout .hotbar .asset-icon{width:30px;height:30px}
 .game-layout .hotbar small{font-size:10px}.game-layout .hotbar kbd{display:none}
 .game-layout .hotbar .ability-status{font-size:9px}.game-layout .hotbar .ability-timer{top:17px}
 .game-layout .context-actions{bottom:298px}.game-layout .context-actions button{font-size:11px;min-height:44px}
 .game-layout .rail-build-bar{bottom:298px}.game-layout #target-label{bottom:293px;font-size:11px}
 .touch-controls{display:block}.game-layout .game-dock{padding-bottom:env(safe-area-inset-bottom);height:calc(48px + env(safe-area-inset-bottom))}
 .game-layout .touch-pad{bottom:calc(62px + env(safe-area-inset-bottom))}.game-layout .touch-attack{bottom:calc(94px + env(safe-area-inset-bottom))}
 .game-layout #toast{top:auto;bottom:305px;font-size:12px;width:max-content;max-width:calc(100% - 24px)}
 .game-layout .dialog,.game-layout .expedition-dialog{padding:18px 12px!important}
 .game-layout .equipment-stage{grid-template-columns:minmax(68px,1fr) 98px minmax(68px,1fr);grid-template-rows:repeat(3,130px)}
 .game-layout .equipment-cell{padding:6px 3px;gap:4px}.game-layout .equipment-item-name{font-size:10px!important;white-space:normal;text-align:center;line-height:1.3;max-height:28px}
 .game-layout .equipment-slot-label{font-size:10px!important}.game-layout .dialog .equipment-remove{min-height:40px;font-size:11px}
 .game-layout .inventory .slot{height:78px;min-height:78px}.game-layout .slot .item-name{font-size:10px}
 .game-layout aside.game-drawer{top:46px;bottom:calc(56px + env(safe-area-inset-bottom));padding:44px 8px 10px}
 .game-layout .inventory-filters button{font-size:12px;min-height:44px;padding:8px 11px}
 .game-layout #inventory-detail{min-height:112px;margin:8px 0}.game-layout .inventory .panel-title{padding-bottom:8px}
 .game-layout .avatar-choices small{font-size:10px}.game-layout .character-select select{font-size:13px;min-height:44px}
}
@media(pointer:coarse) and (min-width:601px){.touch-controls{display:block}.game-layout .hotbar{bottom:65px}.game-layout .context-actions{bottom:174px}}
@media(max-width:360px){.game-layout .player-card.vitals{width:202px}.game-layout .world-title{width:94px}.game-layout .equipment-stage{grid-template-columns:minmax(62px,1fr) 80px minmax(62px,1fr)}.game-layout .equipment-portrait canvas{width:100px!important;height:132px!important}.game-layout .inventory-filters button{padding:8px}.game-layout .gear-card{padding:10px}}
@media(max-height:500px) and (min-width:600px){
 .game-layout .player-card.vitals{width:236px;min-height:112px;padding:6px 9px 6px 58px;gap:5px;top:8px;left:10px}
 .game-layout .hud-portrait{width:44px!important;height:60px!important;top:17px!important}
 .game-layout .encounter-hud{top:8px;width:310px;max-width:calc(100% - 410px);padding:7px 10px 7px 51px}
 .game-layout .encounter-hud .boss-emblem{width:37px;height:37px}.game-layout .encounter-hud .boss-hint{display:none}
 .game-layout .hotbar{bottom:52px;padding:3px;gap:3px}.game-layout .hotbar button{height:68px;width:60px;padding-top:1px}
 .game-layout .hotbar button.selected{padding-top:0}.game-layout .hotbar button>span:first-of-type{width:32px;height:32px}
 .game-layout .context-actions{bottom:137px}.game-layout #target-label{bottom:137px}.game-layout .rail-build-bar{bottom:137px}
 .game-layout #toast{top:140px}.game-layout #inventory-detail{min-height:70px}.game-layout #inventory-detail p{max-height:36px;overflow:auto}
 .game-layout .inventory .panel-title{padding-bottom:4px}.game-layout .inventory-filters{margin-bottom:4px}
}
@media(prefers-reduced-motion:reduce){.game-layout .hotbar .cooling::after{transition:none}}
/* Additional menus use labeled columns instead of one tall list. */
.game-layout .more-actions{display:grid;grid-template-columns:1fr 1fr;width:360px;left:auto;right:max(16px,calc(50% - 285px));gap:12px;padding:14px;border-width:9px;border-image-width:9px}
.game-layout .more-actions .menu-group{margin:0;padding:0;min-width:0}
.game-layout .more-actions .menu-group:last-child{grid-column:1/-1;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.menu-heading{display:block;padding:4px 9px 9px;color:#bca775;font-size:10px;letter-spacing:.06em}
.game-layout .menu-group:last-child .menu-heading{display:none}
.game-layout .more-actions .menu-action{min-height:40px;font-size:12px;padding:7px 9px}
.game-layout .more-actions .menu-group:last-child .menu-action{flex:1;width:auto;background:#24383b}
.game-layout .dialog :is(.card-actions,.refinery-summary,.refinery-recipe,.upgrade-row,.life-card,.rail-tools,.rail-workshop) button{border:5px solid transparent;border-image:var(--ui-slate) 112 fill / 5px / 0 stretch;background:#273b3e;padding:5px 10px;min-height:44px}
.game-layout .dialog :is(.refinery-summary,.upgrade-row,.rail-workshop) button:not(:disabled):first-of-type{border-image:var(--ui-brass) 160 fill / 5px / 0 stretch;color:#27241c;background:#ae9057;font-weight:650}
.game-layout .dialog :is(.card-actions,.refinery-summary,.refinery-recipe,.upgrade-row,.life-card,.rail-tools,.rail-workshop) button:disabled{background:#15252b;filter:none;color:#8b9d98;opacity:.8}
@media(max-width:600px){.game-layout .more-actions{width:min(360px,calc(100vw - 16px));right:8px;bottom:calc(56px + env(safe-area-inset-bottom));padding:10px;gap:8px}}
.game-layout .audio-dialog input[type=range]{appearance:none;-webkit-appearance:none;background:transparent;padding:0;margin:0;box-shadow:none;border:0;height:44px}
.audio-dialog input[type=range]::-webkit-slider-runnable-track{height:8px;background:linear-gradient(to right,#c6a46b var(--volume),#0b1b21 var(--volume));border:0;border-radius:0;box-shadow:inset 0 2px 2px #0005}
.audio-dialog input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:18px;height:24px;margin-top:-8px;background:#d8bd81;border:0;clip-path:polygon(4px 0,100% 0,100% calc(100% - 4px),calc(100% - 4px) 100%,0 100%,0 4px);box-shadow:inset 0 3px #f0d9a4,inset 0 -3px #8e7042}
.audio-dialog input[type=range]::-moz-range-track{height:8px;background:#0b1b21;border:0}.audio-dialog input[type=range]::-moz-range-progress{height:8px;background:#c6a46b}
.audio-dialog input[type=range]::-moz-range-thumb{width:18px;height:24px;background:#d8bd81;border:0;border-radius:1px}
.game-layout .touch-attack .asset-icon{display:block;width:30px;height:30px;margin:0 auto 2px;pointer-events:none}.game-layout .touch-attack small{font-size:11px;pointer-events:none}
@media(max-width:600px){.game-layout .encounter-hud{top:224px}}
.game-layout .fairy-choices{display:flex;gap:5px;flex-wrap:wrap}
.game-layout .fairy-choices button{margin:0}
.game-layout .fairy-choices button[aria-pressed=true]{border-image-source:var(--ui-brass);border-image-slice:160 fill;color:#28231b;background:#b29760}
.game-layout .fairy-choices button[aria-pressed]::before{content:'';display:inline-block;width:7px;height:10px;margin-right:7px;background:var(--fairy-color);clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%)}
.game-layout .companion-empty{padding:14px;background:#213538;color:#b5c5b9!important}
.pet-food-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px}
.game-layout .companion-dialog .pet-food-card{margin:0;padding:14px;display:grid;grid-template-columns:40px 1fr;gap:8px 12px;align-items:center}
.pet-food-card .asset-icon{width:38px;height:38px;grid-row:1/3}.pet-food-card strong{font-size:12px}.game-layout .pet-food-card p{font-size:11px;margin:0}
.game-layout .pet-food-card button{grid-column:1/-1;margin:0}
@media(max-width:600px){.pet-food-grid{grid-template-columns:1fr}}
/* Keep the unfinished DOM out of view while the sprite library is loading. */
.game-layout.ui-loading main{visibility:hidden}
@media(max-height:500px) and (min-width:600px){
 .game-layout aside.game-drawer[data-panel=inventory]{width:min(680px,calc(100vw - 24px));padding:12px 14px 10px}
 .game-layout .game-drawer[data-panel=inventory]>.inventory{grid-template-columns:minmax(200px,1fr) 210px;grid-template-rows:28px auto 44px minmax(120px,1fr) 44px;column-gap:14px}
 .game-layout .inventory .panel-title{grid-column:1/-1;font-size:18px;padding:0 52px 0 0;margin:0}
 .game-layout .inventory-filters{grid-column:1/-1;margin:0 0 4px}
 .game-layout #inventory{grid-column:1;grid-row:4/6;min-height:0}
 .game-layout #inventory-detail{grid-column:2;grid-row:4;min-height:0;overflow:auto;padding:8px 8px 8px 44px;margin:0 0 6px}
 .game-layout #inventory-detail>img{width:28px;height:28px;left:6px;top:10px}
 .game-layout #inventory-detail strong{font-size:12px}.game-layout #inventory-detail small{font-size:10px}.game-layout #inventory-detail p{font-size:11px;max-height:none}
 .game-layout .inventory .craft-open{grid-column:2;grid-row:5;margin:0}
}

/* Enhancement station: one selected item, with costs and the next result together. */
.enhancement-workbench{margin:18px 0 24px}
.enhancement-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
.enhancement-heading small{color:#bfb398}
.enhancement-layout{display:grid;grid-template-columns:minmax(180px,.85fr) minmax(0,1.3fr);gap:20px;margin-top:12px}
.enhancement-items{max-height:350px;overflow:auto;display:flex;flex-direction:column;gap:4px;padding:4px}
.enhancement-item{display:flex!important;align-items:center;gap:10px;text-align:left;min-height:48px;flex-shrink:0;padding:8px!important;background:#171d1a!important;border-image:none!important;border:0!important;box-shadow:none!important}
.enhancement-item.active{background:#394239!important;color:#ffe0a0}
.enhancement-item .asset-icon{width:32px;height:32px;object-fit:contain}
.enhancement-item span{flex:1;min-width:0;font-size:13px}
.enhancement-item b{color:#dfc184;font-variant-numeric:tabular-nums}
.enhancement-detail{min-width:0;background:#121915b3;padding:20px}
.enhancement-detail h3{margin:6px 0 16px;font-size:20px;color:#f4dfb6}
.enhancement-detail progress{width:100%;height:6px;accent-color:#cfa65a;display:block;margin-bottom:16px}
.enhancement-detail p{font-size:13px;line-height:1.65;overflow-wrap:anywhere}
.enhancement-current{color:#bbbca9}.enhancement-next{color:#bad59b}
.enhancement-materials{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:12px;margin:18px 0;color:#d0c7b0}
.enhancement-materials .material-missing{color:#edaa8d}
.enhancement-detail>.primary{width:100%;min-height:44px}
.enhancement-detail>small:last-child{display:block;margin-top:12px;color:#999e8e;font-size:11px}
.enhancement-benches{margin:20px 0}.enhancement-benches>summary{cursor:pointer;padding:12px 0;color:#dfc184}
@media(max-width:640px){.enhancement-layout{grid-template-columns:1fr;gap:12px}.enhancement-items{max-height:160px}.enhancement-detail{padding:16px}.enhancement-detail h3{font-size:18px}.enhancement-heading small{font-size:11px}}

/* Installed workshop interiors: readable materials and silhouettes, without neon borders. */
#garage-modal .dialog{--workshop-accent:#c2ae89}
#garage-modal .dialog>h2{color:var(--workshop-accent)}
.workshop-hero{display:flex;align-items:center;gap:22px;margin:0 0 24px;padding:14px 20px;background:#131e1dcc;box-shadow:inset 0 -3px 0 #0a111166}
.workshop-hero h3{font-size:23px;margin:5px 0 10px;color:var(--workshop-accent)}
.workshop-hero p{max-width:45ch;line-height:1.6;margin:6px 0 12px}.workshop-kicker{letter-spacing:.12em;color:var(--workshop-accent)}
.workshop-preview{width:144px;height:96px;object-fit:contain;image-rendering:pixelated;flex-shrink:0}
.workshop-blueprints{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.workshop-blueprint{display:flex;flex-direction:column;align-items:stretch;padding:16px;background:#182320}.workshop-blueprint .workshop-preview{align-self:center}.workshop-blueprint h3{font-size:16px;margin:8px 0}.workshop-blueprint p{font-size:13px;line-height:1.65;min-height:60px;color:#b9c2b2}.workshop-blueprint .build-cost{margin:auto 0 12px}.workshop-blueprint button+button{margin-top:8px}
.workshop-recipe{display:grid;grid-template-columns:56px 1fr auto;align-items:center;gap:8px 16px;padding:18px;background:#17231f;margin-bottom:12px}.workshop-recipe img{grid-row:span 3;width:48px;height:48px;object-fit:contain;image-rendering:pixelated}.workshop-recipe h3,.workshop-recipe p{margin:0}.workshop-recipe p,.workshop-recipe small{grid-column:2}.workshop-recipe button{grid-column:3;grid-row:1 / span 3}.workshop-set-select{display:flex;align-items:center;gap:12px;margin:18px 0}.workshop-set-select select{min-height:44px;background:#182725;color:#e8dfc5;padding:8px 14px}
.kitchen-recipes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:18px}.kitchen-recipe{display:grid;grid-template-columns:48px 1fr;gap:10px;padding:18px;background:#332a20}.kitchen-recipe img{width:44px;height:44px;object-fit:contain;image-rendering:pixelated}.kitchen-recipe h3{margin:8px 0}.kitchen-recipe p,.kitchen-recipe small,.kitchen-recipe button{grid-column:1 / -1}.kitchen-recipe p{margin:0;line-height:1.65}.kitchen-recipe button{min-height:44px}
[data-workshop=boat] .workshop-hero{background:#1c3437}[data-workshop=weapons] .workshop-hero{background:#322820}[data-workshop=armor] .workshop-hero{background:#29342d}[data-workshop=hover] .workshop-hero{background:#2b293b}[data-workshop=kitchen] .workshop-hero{background:#3a3023}[data-workshop=petkitchen] .workshop-hero{background:#2d3829}[data-workshop=petkitchen] .kitchen-recipe{background:#243125}[data-workshop=refinery] .workshop-hero{background:#352b23}[data-workshop=forge] .workshop-hero{background:#2b2e3b}
.context-actions{flex-wrap:wrap;max-width:min(94vw,720px)}
@media(max-width:700px){.workshop-blueprints{grid-template-columns:repeat(2,minmax(0,1fr))}.workshop-hero{gap:10px;padding:12px}.workshop-hero .workshop-preview{width:100px;height:80px}.workshop-hero h3{font-size:19px}.workshop-recipe{grid-template-columns:44px 1fr}.workshop-recipe button{grid-column:1 / -1;grid-row:auto}.kitchen-recipes{grid-template-columns:1fr}.workshop-blueprint{padding:12px}.workshop-blueprint .workshop-preview{width:110px;height:80px}.workshop-blueprint button{min-height:44px}}
@media(max-width:390px){.workshop-blueprints{grid-template-columns:1fr}.workshop-hero{flex-direction:column;align-items:flex-start}.workshop-blueprint p{min-height:0}}

.owned-weapons{margin-top:20px}.owned-weapons button{margin:4px 6px 4px 0;min-height:44px;padding:8px 12px}.workshop-hero{min-height:136px}.workshop-blueprint button{line-height:1.5}

.nearby-workshops{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px}.nearby-workshops button{padding:18px;text-align:left;min-height:72px;background:#1c2c2c}.nearby-workshops strong,.nearby-workshops small{display:block}.nearby-workshops small{margin-top:8px;color:#aebdb4}

/* Item actions share the bag surface and remain touch-sized on narrow screens. */
.game-layout .inventory-filters{overflow-x:auto;flex-shrink:0}
.game-layout .inventory-drop-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:end;margin-top:10px}
.game-layout .inventory-drop-actions label{display:flex;flex-direction:column;gap:4px;font-size:11px;color:#b9c9c0}
.game-layout .inventory-drop-actions input{width:72px;min-height:40px;padding:6px 10px;background:#132b30;color:#eee1c4;border:0;border-radius:3px;font:inherit}
.game-layout .inventory-drop-actions button{min-height:44px;padding:8px 12px}
.game-layout #inventory-detail .drop-hint{display:block;margin-top:8px;color:#9dada6}

.game-layout .backpack-upgrade{margin:0 0 10px;color:#c4d0c4;background:#172e32;border:0;border-radius:3px}
.game-layout .backpack-upgrade>summary{padding:10px 12px;cursor:pointer;font-size:12px;color:#dfc795;min-height:40px}
.game-layout .backpack-upgrade>h3{padding:12px 14px 0}
.game-layout .backpack-upgrade-body{display:flex;flex-direction:column;gap:9px;padding:0 12px 12px}
.game-layout .backpack-upgrade-body p{margin:0;font-size:12px}.game-layout .backpack-upgrade-body small{font-size:11px;line-height:1.55;color:#a7bab3}
.game-layout .backpack-upgrade-body button{align-self:start;min-height:42px;padding:8px 14px}
.game-layout .bag-empty-slot{opacity:.3;pointer-events:none}
.game-layout .bag-locked-row{grid-column:1/-1;text-align:center;padding:14px 5px;color:#899f99;font-size:11px}
.game-layout #bag-upgrade{flex-shrink:0}

.game-layout #bag-upgrade{grid-column:1/-1}
.game-layout #inventory-detail{min-height:0;overflow:visible}
.game-layout #inventory{max-height:280px}
.game-layout .inventory-filters{overflow-y:hidden;min-height:44px}
.game-layout .inventory .craft-open{margin-top:0;min-height:44px}

.storage-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:18px 0}.storage-tabs button[aria-pressed=true]{color:#ebcf96;background:#355353}.storage-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px}.storage-cell{background:#203639;padding:14px;display:flex;flex-direction:column;gap:8px}.storage-cell strong{font-size:13px}.storage-password{display:flex;flex-direction:column;gap:8px}.storage-password input{min-height:44px;background:#152a2e;color:#eee;padding:8px;border:0}

.storage-settings{padding:12px 0}.storage-settings summary{min-height:40px;cursor:pointer;color:#d6c08e}.storage-deposit{display:grid;grid-template-columns:minmax(0,1fr) 80px auto;gap:10px;align-items:center;margin:16px 0}.storage-deposit :is(select,input){width:100%;min-width:0;min-height:44px}.storage-cell .asset-icon{width:40px;height:40px;image-rendering:pixelated}.storage-cell>span{font-size:18px;color:#e7d2a1}.storage-cell button{min-height:36px}.storage-tabs{position:sticky;top:0;background:#14282c;z-index:2;padding:8px 0}.recovery-tools{margin-top:20px}.recovery-tools label{display:block;margin-top:12px}@media(max-width:600px){.storage-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.storage-deposit{grid-template-columns:1fr 76px}.storage-deposit button{grid-column:1/-1}.storage-cell{padding:10px}.storage-tabs{gap:2px}.storage-tabs button{font-size:11px;padding:8px}}

/* Keep dismissal available while a long facility inventory scrolls. */
.game-layout #garage-modal .dialog>.close{position:sticky;top:0;float:right;z-index:6;background:#172326} 

/* Portrait combat keeps the central field clear; touch targets stay full size. */
@media(max-width:600px){
 .game-layout .encounter-hud{top:138px;left:8px;right:auto;transform:none;width:calc(100% - 140px);max-width:280px;min-height:0;padding:6px 8px;border-width:4px;border-image-width:4px}
 .game-layout .encounter-hud .boss-emblem,.game-layout .encounter-hud .boss-stages,.game-layout .encounter-hud .boss-party{display:none}
 .game-layout .encounter-hud .boss-heading{gap:4px;align-items:center}
 .game-layout .encounter-hud b{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .game-layout .encounter-hud .boss-phase{font-size:8px;letter-spacing:0}
 .game-layout .encounter-hud .boss-life{height:8px;margin:5px 0 3px}
 .game-layout .encounter-hud .boss-health{font-size:9px}
}
/* Separate saved-character selection from character creation. */
.game-layout #character-create[hidden],.game-layout #character-roster[hidden]{display:none}
.game-layout #world-picker>label{margin-top:4px}
.game-layout #character-roster>p{font-size:12px;margin:16px 0}
.game-layout #character-roster .saved-character{display:flex;align-items:center;gap:16px;width:100%;padding:10px 14px;margin:8px 0;text-align:left;min-height:124px}
.game-layout .saved-character canvas{position:static!important;width:72px!important;height:96px!important;flex:none;image-rendering:pixelated}
.game-layout .saved-character>span:first-of-type{display:grid;gap:8px;flex:1;min-width:0}.saved-character strong{overflow-wrap:anywhere}.saved-character small{font-size:11px}.saved-character>span:last-child{font-size:12px;color:#d8c18c}
.game-layout .entry-actions{display:flex;gap:8px;margin:20px 0 12px}.game-layout .entry-actions button{flex:1;min-height:44px}
.game-layout #create-back{border:0;border-image:none;background:none;padding:8px 0;color:#b8c5bc;font-size:12px;text-align:left;margin:8px 0}
@media(max-width:480px){.game-layout #character-roster .saved-character{gap:10px;padding:8px;flex-wrap:wrap}.saved-character>span:last-child{margin-left:auto}}

.game-layout .creation-world{display:block;color:#b9ab89;font-size:11px;margin:4px 0}

/* Guest / Logto access gate is separate from character selection. */
.game-layout #access-gate{z-index:30}.game-layout .access-dialog{width:min(460px,calc(100vw - 32px));max-height:calc(100dvh - 40px);overflow:auto;padding:30px}
.game-layout #access-options{display:grid;gap:12px;margin-top:24px}.game-layout #access-options[hidden],.game-layout #access-gate [hidden]{display:none!important}
.game-layout #access-options>button{width:100%;min-height:48px;font-size:14px}.game-layout #google-entry{background:#e8e5dc;color:#252a29;border:0;border-image:none;font-weight:600}
.game-layout #google-entry:disabled{color:#717776;background:#c8cbc6;filter:none}.game-layout #login-availability{font-size:12px;line-height:1.65;margin:8px 0}
.game-layout #access-error{color:#edb09c;font-size:12px;line-height:1.6}.game-layout #access-back,.game-layout #access-retry,.game-layout #account-logout{margin:12px 8px 0 0;min-height:44px}
.game-layout #account-button{padding:4px 8px;min-height:30px;border:0;color:#c6cbbd;font-size:11px}
@media(max-width:480px){.game-layout .access-dialog{padding:22px 18px}.game-layout #account-button{max-width:90px;font-size:10px}}

body:has(#access-gate:not(.hidden)) .world-switch{display:none}
.game-layout #welcome-account-button{display:block;background:none;border:0;border-image:none;color:#c6cbbd;font-size:11px;min-height:36px;margin:4px 0;padding:6px 0}

.game-layout #access-language{display:block;width:110px;min-height:36px;margin:18px 0 0;padding:5px 8px;font-size:11px}
.game-layout #welcome-account-button[hidden]{display:none!important}.game-layout #account-import{min-height:44px;margin:12px 8px 0 0}
