/* Cliopich 1.8.1 — shared window, slot and control skin. */
@font-face{font-family:CliopichMono;src:url(fonts/DejaVuSansMono-Bold.ttf) format('truetype');font-weight:700;font-display:swap}
:root{
 --ink:#183747;--panel:#ece4d0;--panel-low:#e0d5bc;--panel-high:#f6f0df;
 --text:#273f4b;--muted:#516974;--line:#9aa7a5;--rim:#657f8d;
 --blue:#365f78;--blue-dark:#24495e;--blue-light:#547f99;
 --lime:#dfa05c;--purple:#456f89;--shadow:#102b3b;
}
html,body{background:var(--ink);color:var(--text);font-family:Pixelora,system-ui,sans-serif;font-size:14px}
button,input,select{font-family:inherit;-webkit-tap-highlight-color:transparent}
button{transition:background-color .1s,border-color .1s;cursor:pointer}
button:disabled{cursor:default;opacity:.48}
button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid #de9b55;outline-offset:3px}
button img{pointer-events:none}
img{image-rendering:pixelated}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
h1,h2,h3{font-family:Pixelora,system-ui,sans-serif;letter-spacing:-.4px}
.eyebrow,.version,.lobby-version,#modal-eyebrow{font-family:CliopichMono,monospace;font-size:10px;letter-spacing:.6px;color:var(--muted)}
.brand{font-family:Pixelora,sans-serif;color:#f5eed9;letter-spacing:-1.6px;font-size:30px;gap:10px}
.brand img{width:34px;height:34px}.brand-dot{color:#e4b372}.live-dot{width:6px;height:6px;border-radius:1px;background:#9ac788;box-shadow:none}
kbd{display:inline-block;min-width:20px;padding:2px 4px;border:1px solid #8197a1;border-bottom-width:2px;border-radius:2px;background:#f1ebdb;color:#344e5f;font:10px CliopichMono,monospace;text-align:center;margin-right:3px}
:is(.primary,.secondary,.chip,.close-button,.favorite-button,.lobby-side-actions button,.catalog-pager button,.lobby-refresh){
 border:2px solid var(--rim);border-radius:3px;background:#d9e1dd;color:#304c5c;
 box-shadow:inset 0 2px 0 #f8fbf0,inset 0 -2px 0 #b3c3c7,0 2px 0 #17374733;
 padding:10px 15px;font-size:12px;font-weight:700;line-height:1.45;min-height:41px;
}
.primary{background:#e4ab69;color:#483724;border-color:#9d744b;box-shadow:inset 0 2px 0 #f7ce96,inset 0 -2px 0 #c48948,0 2px 0 #17374733}
.primary:hover{background:#edbb7d;transform:none}.secondary:hover,.chip:hover{background:#e7ece6;border-color:#5b7e93}
:is(.primary,.secondary,.chip,.close-button,.modal-nav button,.lobby-shortcuts button):active{transform:translateY(1px);box-shadow:inset 0 2px 0 #203d4b22}
.chip.active{background:#466e87;color:#f5eed9;border-color:#30546e;box-shadow:inset 0 2px 0 #648aa2,inset 0 -2px 0 #31536b}
.danger{color:#8b413a;border-color:#ae7870}.text-button{color:#315f7b;text-decoration:underline;font-size:11px;padding:4px}
label{font-size:12px;color:#455f6c;margin:12px 0}
input,select{background:#faf6e9;color:#2f4b5d;border:2px solid #a0aeac;border-radius:3px;padding:10px 11px;box-shadow:inset 0 2px 0 #50636b12;min-height:42px;font-size:12px;min-width:0;max-width:100%}
input::placeholder{color:#5b717b}input[type=checkbox]{accent-color:#4d7991;min-height:0}
.progress{height:7px;background:#c6ccc4;border:1px solid #96a6a1;border-radius:1px;overflow:hidden;box-shadow:inset 0 1px 0 #697b8222}
.progress i{height:100%;background:#6d9b9c;border-radius:0}.banner{background:#d9e3da;border:1px solid #9cafab;border-left:3px solid #65899a;border-radius:2px;color:#3c5b65;padding:12px 14px;line-height:1.6}

/* Entry screen. Existing scene art stays untouched. */
.welcome,.lobby{background:#183747;color:#e6eadf;background-image:none;padding:24px max(24px,calc((100vw - 1180px)/2)) 18px;min-height:100dvh}
.welcome-top,.lobby-header{max-width:1180px;margin:auto;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #52717b;padding:0 0 17px;gap:18px}
.welcome-top .version,.lobby-version{color:#b6cacf;font-size:10px;white-space:nowrap}
.welcome-grid{max-width:1180px;margin:52px auto 48px;display:grid;grid-template-columns:minmax(0,1.3fr) minmax(310px,.8fr);gap:34px;align-items:center}
.welcome-art{min-height:430px;position:relative;padding-bottom:130px;overflow:visible}
.welcome-art>img{width:100%;height:310px;object-fit:cover;object-position:center 50%;border:3px solid #72939d;border-radius:4px;box-shadow:5px 5px 0 #0f2b3a}
.welcome-sign{position:absolute;left:24px;bottom:0;max-width:calc(100% - 48px);padding:20px 28px;background:#ece4d0;border:3px solid #718894;border-radius:3px;box-shadow:4px 4px 0 #102c3b;color:#2d4a59}
.welcome-sign>span{font:10px CliopichMono,monospace;color:#55727f;letter-spacing:2px}.welcome-sign h1{font-size:34px;line-height:1.12;margin:11px 0;letter-spacing:-1px}.welcome-sign p{font-size:12px;color:#516974;margin:0;line-height:1.65}
.welcome-copy{width:100%;max-width:420px;justify-self:end}
.auth-card{padding:0;background:var(--panel);border:3px solid var(--rim);border-radius:4px;box-shadow:5px 5px 0 #102b3b;width:100%;max-width:none;overflow:hidden;color:var(--text)}
.window-caption{display:flex;align-items:center;gap:9px;padding:12px 16px;background:#365f78;color:#f2eddb;border-bottom:2px solid #24495e;font-size:13px;font-weight:700}.window-caption>img{width:22px;height:22px}.window-caption>small{margin-left:auto;color:#c9dbdd;font-size:10px}
.auth-content{padding:20px 22px 18px}.auth-content .tabs{gap:0;margin:0 0 18px;border:0;background:#d4d9ce;padding:3px;border-radius:3px}.auth-content .tabs button{flex:1;padding:10px 6px;border:1px solid transparent;font-size:12px;color:#5a6b6c;border-radius:2px}
.auth-content .tabs button.active{background:#faf4df;border:1px solid #b1b7a8;color:#304f5e;box-shadow:0 1px 0 #9aaba744}
.auth-card .wide{width:100%;margin-top:8px}.auth-card .form-error{color:#a44538;min-height:0;font-size:12px;margin:10px 0;line-height:1.5}.auth-content>small{display:block;color:#516c73;font-size:10px;line-height:1.6;text-align:center}
.welcome-controls{display:flex;justify-content:center;flex-wrap:wrap;gap:13px;color:#b9ced2;font-size:10px;margin-top:20px}.welcome-controls kbd{background:#365364;border-color:#658391;color:#f1ebd9}
.welcome-footer,.lobby-footer{max-width:1180px;margin:20px auto 0;display:flex;justify-content:space-between;gap:16px;color:#9fbac3;font-size:10px;letter-spacing:0;border-top:1px solid #466572;padding-top:16px}

/* World selection is the main action in the lobby. */
.lobby-content{max-width:1180px;margin:22px auto}.lobby-version{margin-right:auto;padding-left:8px}.lobby-account{display:flex;align-items:center;gap:10px}
.lobby-account>span{display:flex;align-items:center;gap:7px;padding:8px 12px;min-height:38px;background:#284d61;border:1px solid #638291;border-radius:3px;color:#f1dfac;font-size:12px}.lobby-account>span>img{width:20px;height:20px}.lobby-account button{font-size:11px;min-height:38px;padding:8px 13px}
.lobby-hero{min-height:200px;border:3px solid #6f8d99;border-radius:4px;background:#284d61;box-shadow:4px 4px 0 #102c3a;position:relative;overflow:hidden;margin:0;display:flex}
.hero-copy{padding:24px 28px;position:relative;z-index:1;background:#284d61;flex:0 0 49%}.hero-copy .eyebrow{color:#abc4cb;font-size:9px}.hero-copy h1{font-size:30px;line-height:1.2;letter-spacing:-.8px;margin:9px 0 10px;color:#f5edd9}.hero-copy p{font-size:12px;line-height:1.7;margin:0;color:#c2d4d7}.hero-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:17px}
.hero-actions .secondary{background:#32596e;color:#e3ece6;border-color:#72919c;box-shadow:inset 0 1px 0 #8facb033,inset 0 -2px 0 #20465b}.hero-actions .secondary:hover{background:#416b7e}
.lobby-hero>img{position:absolute;right:0;top:0;width:51%;height:100%;object-fit:cover;object-position:center 45%;opacity:1;border-left:3px solid #6f8d99}
.hero-plaque{position:absolute;right:16px;bottom:13px;padding:7px 11px;background:#203b4ddd;border:1px solid #87a6aa;color:#f0e9d3;font-size:10px;border-radius:2px}
.lobby-columns{display:grid;grid-template-columns:minmax(0,1fr) 238px;gap:18px;margin-top:20px}.lobby-main{min-width:0}.lobby-side{display:flex;flex-direction:column;gap:13px}
.lobby-section,.lobby-tools{color:var(--text);background:var(--panel);border:2px solid #80969b;border-radius:4px;box-shadow:3px 3px 0 #102c3a;padding:18px}
.section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}.section-heading>div>span{font:9px CliopichMono,monospace;color:#516c73;letter-spacing:1px}.section-heading h2{font-size:21px;letter-spacing:-.4px;color:#304e5f;margin:5px 0 0}.section-heading button{min-height:35px;padding:7px 11px;font-size:10px}
.lobby-join{display:flex;gap:9px;margin:0 0 17px;padding:0;border:0}.lobby-join input{margin:0;flex:1;min-width:0;font-size:13px}.lobby-join button{font-size:12px;white-space:nowrap}
.world-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.world-card-wrap{position:relative;min-width:0}.world-card{width:100%;border:2px solid #8da1a5;border-radius:3px;background:#dce1d6;box-shadow:0 2px 0 #a9b6b333;overflow:hidden;text-align:left;transition:border-color .1s}
.world-card:hover{transform:none;border-color:#577d8f}.world-card .preview{height:80px}.world-card .preview span{top:7px;right:7px;background:#234352de;color:#edf3dd;border:1px solid #92a8a2;border-radius:2px;padding:4px 5px;font-size:8px}.world-card .info{background:#e9e4d3;padding:10px 11px;display:flex;flex-direction:column;gap:4px;min-height:60px}.world-card .info strong{color:#304f60;font-size:12px;overflow-wrap:anywhere}.world-card .info small{color:#687c7d;font-size:9px;line-height:1.4}
.favorite-button{position:absolute;top:5px;left:5px;width:28px;height:27px;min-height:0;padding:0;background:#f1ead3;color:#8b947d;border:1px solid #81999a;border-radius:2px;font-size:15px}.favorite-button.active{color:#ab743b;background:#f9df9f}
.lobby-tools{margin-top:16px}.tools-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px}.tools-title h2{font-size:16px;letter-spacing:-.2px;margin:0;color:#355767}.tools-title small{font-size:9px;color:#778783}
.lobby-shortcuts{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:0}
.lobby-shortcuts button{min-height:96px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:10px 5px;text-align:center;background:#d8dfd5;color:#354f5d;border:1px solid #9fb0ad;border-bottom-width:3px;border-radius:3px;box-shadow:inset 0 1px 0 #faf5e8;gap:3px}
.lobby-shortcuts button:hover{background:#e8ebdd;border-color:#6d929e}.lobby-shortcuts button>span{display:block;float:none;width:32px;height:32px;padding:0;margin:0 0 3px}.lobby-shortcuts button>span>img{width:32px;height:32px}.lobby-shortcuts button>strong{font-size:11px;color:#355565;line-height:1.4}.lobby-shortcuts button>small{font-size:8px;color:#50696e;line-height:1.4;margin:0}
.adventurer-card,.gift-card,.daily-card{background:#e8e1cb;color:#354f5c;border:2px solid #7e969e;border-radius:4px;box-shadow:3px 3px 0 #102c3a;padding:17px;overflow:hidden}
.adventurer-card{display:flex;flex-direction:column;align-items:center;text-align:center;padding:0 15px 15px}.card-caption{align-self:stretch;margin:0 -15px 8px;padding:10px;background:#3a6278;color:#e4eadc;border-bottom:2px solid #284d61;font:9px CliopichMono,monospace;letter-spacing:1px}
.adventurer-card canvas{width:102px;height:127px;margin:0 auto 3px;image-rendering:pixelated}.adventurer-card>span{color:#31566b;font-size:15px;font-weight:700;overflow-wrap:anywhere;max-width:100%;margin-bottom:5px}.adventurer-card>strong{font-size:11px;color:#6e807b;font-weight:400}.adventurer-card .progress{width:100%;margin:12px 0 6px}.adventurer-card>small{font-size:9px;color:#526b71}.adventurer-card>button{margin-top:12px;width:100%;font-size:10px;min-height:36px}
.gift-card,.daily-card{display:grid;grid-template-columns:36px minmax(0,1fr);gap:5px 10px;padding:14px}.gift-card>img,.daily-card>img{width:36px;height:36px;grid-row:1/3;align-self:center}.gift-card h3,.daily-card h3{font-size:12px;line-height:1.4;margin:0;color:#415e68}.gift-card p{font-size:10px;color:#78857c;line-height:1.6;margin:0}.gift-card button,.daily-card button{grid-column:1/-1;margin:7px 0 0;width:100%;font-size:10px;min-height:36px}.daily-card>span{font:8px CliopichMono,monospace;color:#8b805f;letter-spacing:1px}.daily-card h3{grid-column:2}
.lobby-side-actions{display:grid;gap:5px}.lobby-side-actions button{width:100%;min-height:34px;padding:7px 11px;text-align:left;font-size:10px;background:#274b60;border:1px solid #617e8d;color:#c7d8d8;box-shadow:inset 0 1px 0 #adc2c212}
.lobby-side-actions button:hover{background:#3b6277}.lobby-side-actions #lobby-logout{color:#d5b3a2}.lobby-footer kbd{background:#2c4e60;color:#d6e6df;border-color:#6c8794}

/* One frame for every window. The rail owns its scrolling on desktop. */
.modal{z-index:60;background:#102533bd;backdrop-filter:none;padding:24px max(16px,env(safe-area-inset-right)) 24px max(16px,env(safe-area-inset-left));align-items:center}
.modal-card{display:grid;grid-template-columns:136px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);width:min(1000px,100%);height:min(760px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);min-height:0;background:var(--panel);border:3px solid #708c9b;border-radius:4px;box-shadow:inset 0 0 0 1px #f5eedc,5px 5px 0 #0d2a39;animation:none;color:var(--text);overflow:hidden}
.modal-card[data-panel=space],.modal-card[data-panel=inventory],.modal-card[data-panel=admin]{width:min(1100px,100%)}
.modal-card>header{grid-column:1/-1;grid-row:1;display:flex;align-items:center;justify-content:space-between;padding:13px 18px;background:#365f78;border-bottom:3px solid #244a60;gap:14px;color:#f5eed9}
.modal-card>header>div{min-width:0}.modal-card #modal-eyebrow{color:#d3e0df;font-size:8px;letter-spacing:1px;display:block;line-height:1.4}.modal-card h2{font-size:21px;margin:4px 0 0;letter-spacing:-.3px;color:#f4efda;overflow-wrap:anywhere}
.close-button{width:35px;height:35px;min-height:35px;flex:0 0 35px;padding:0;font-size:24px;color:#f3e7d2;background:#b1755b;border-color:#724e48;box-shadow:inset 0 2px 0 #ce9776,inset 0 -2px 0 #915b49;border-radius:2px}
.close-button:hover{background:#bd8265}.modal-nav{grid-column:1;grid-row:2;display:flex;flex-direction:column;gap:4px;background:#d2dbd4;border:0;border-right:2px solid #a4b4b3;padding:12px 8px;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#8da4a8 #d2dbd4}
.modal-nav button{display:flex;align-items:center;gap:9px;flex:0 0 auto;min-height:44px;min-width:0;padding:8px 9px;text-align:left;background:transparent;color:#57717e;border:1px solid transparent;border-radius:3px;font-size:11px;box-shadow:none;white-space:nowrap}
.modal-nav button>img{width:23px;height:23px;flex:0 0 23px}.modal-nav button:hover{background:#e4e9df;border-color:#afc0ba}.modal-nav button.active{color:#f7eed8;background:#456f88;border-color:#2a566e;box-shadow:inset 0 1px 0 #7496a8,inset 0 -2px 0 #345870}
#modal-body{grid-column:2;grid-row:2;min-height:0;min-width:0;max-height:none;overflow-y:auto;overflow-x:hidden;padding:22px 24px;color:var(--text);scrollbar-width:thin;scrollbar-color:#8ea3a6 #e5dec8;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
#modal-body p,#modal-body .panel-note,#modal-body .wide-note{color:#516974;line-height:1.7}#modal-body h3{color:#3a5a6a}#modal-body>.panel-note:first-child{font-size:11px;margin:0 0 18px;padding-bottom:13px;border-bottom:1px solid #c1c6b8}
#modal-body .toolbar,#modal-body .exp-toolbar,#modal-body .progress-toolbar{flex-wrap:wrap;min-width:0;gap:8px}#modal-body :is(input,select){max-width:100%}
.inline-form{display:flex;flex-wrap:wrap;align-items:end;gap:12px}.inline-form>label{flex:1 1 150px;min-width:0}.inline-form>button{flex:0 0 auto;margin-bottom:13px}
.empty,.panel-loading,.panel-failure{background:#e2dfcb;color:#677b7d;border:1px dashed #a5b5ad;border-radius:3px;padding:24px;text-align:center;line-height:1.7}.empty strong,.panel-failure strong{display:block;color:#456673}.empty button,.panel-failure button{margin-top:14px}.panel-loading{padding:13px;font-size:11px}
.list-row{border:1px solid #b2bdb4;border-radius:3px;background:#e1e2d1;min-width:0;padding:13px;box-shadow:inset 0 1px 0 #faf5e6}.list-row>.info{min-width:0}.list-row .info strong{color:#365565;font-size:12px;line-height:1.5;overflow-wrap:anywhere}.list-row small{color:#4f6b70;font-size:10px;line-height:1.6}.list-row>img{width:42px;height:42px}.list-row>button{flex-shrink:0}
.catalog-pager{gap:12px;flex-wrap:wrap;margin-top:18px;padding-top:14px;border-top:1px solid #bbc4b8}.catalog-pager>span{color:#506970;font-size:11px}.catalog-pager button{min-height:35px;padding:7px 12px;font-size:11px}

/* Item slots use a quiet background so the existing artwork stays legible. */
:is(.item-card,.inventory-entry .item-card,.equipment-cell,.quickbar-assignment,.storage-choice,.lock-card,.admin-pick-item,.collection-card){background:#dce1d7;border:1px solid #a0b3b0;border-radius:3px;box-shadow:inset 0 2px 0 #f8f2df,0 2px 0 #bbc7bd;color:#3b5967}
.item-card:hover,.admin-pick-item:hover,.equipment-cell:hover{background:#edf0e0;border-color:#668da0;transform:none}.item-card strong{color:#345565;font-size:11px}.item-card small{color:#506a70}.exp-item:hover img{transform:none}
.item-rarity{display:inline-block;align-self:center;padding:2px 5px;border-radius:2px;background:#39596d;color:#e0e7de!important;font:8px CliopichMono,monospace;line-height:1.4;letter-spacing:0}
.exp-item[data-rarity=legend] .item-rarity{background:#68543e;color:#ffe2aa!important}.exp-item[data-rarity=epic] .item-rarity{background:#575476;color:#e0d8ff!important}.exp-item[data-rarity=mythic] .item-rarity{background:#3a6171;color:#d5f6ff!important}.exp-item[data-rarity=secret] .item-rarity{background:#70516c;color:#ffdfec!important}
.inventory-hero{background:#d6dfd5;border:1px solid #a9bab1;border-radius:3px;padding:13px 17px}.inventory-hero h3{font-size:17px;margin-bottom:7px}.inventory-hero .eyebrow{font-size:8px;color:#6d857f}.inventory-hero canvas{width:72px;height:90px}.inventory-hero p{font-size:10px}.inventory-quickbar{background:#d1dcd3;border:1px solid #a0b1ac;border-radius:3px;padding:11px}.inventory-quickbar>small{color:#677d7d;font-size:9px}.quickbar-assignment.active,.storage-choice.selected,.admin-pick-item.active{border-color:#bd9254;background:#eddbb1;box-shadow:inset 0 1px 0 #fff0cb}.equipment-strip{background:none;border:0;border-radius:0;padding:0;gap:7px;margin:14px 0}.equipment-cell{min-height:92px;padding:7px 4px;gap:5px}.equipment-cell small{color:#718681;font-size:9px}.equipment-cell span{font-size:8px;color:#59747b}.equipment-cell img{width:32px;height:32px}.empty-equipment{color:#91a59e!important}
.inventory-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.inventory-entry .item-card{min-height:166px;padding:12px 6px 24px}.inventory-entry .item-card img{width:48px;height:48px}.inventory-entry .item-card strong{font-size:10px;line-height:1.5}.inventory-entry .item-card small:not(.item-rarity){font-size:8px;line-height:1.5}.inventory-entry .item-card em{font-size:9px;color:#4b6b70}.inventory-info{background:#edf0df;border:1px solid #9bb1ac;border-radius:3px;color:#567480}.equipped-badge{background:#477b73;color:#f0f2da;border-radius:2px;font-size:8px}.inventory-sort{color:#516a6e}.inventory-sort select{min-height:34px;padding:7px 9px}
.shop-balance{display:grid;grid-template-columns:1fr auto;gap:6px 16px;padding:16px;background:#dae2d3;border:1px solid #a3b8ad;border-radius:3px}.shop-balance>div{font:8px CliopichMono,monospace;color:#6d817c;letter-spacing:1px}.shop-balance>strong{font-size:17px;color:#3b5c69;grid-column:1}.shop-balance>b{grid-column:2;grid-row:1/3;align-self:center;color:#947140;font-size:21px;font-variant-numeric:tabular-nums}
.shop-tools{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,180px) auto;gap:12px;align-items:end;margin:17px 0}.shop-tools label{margin:0}.shop-tools>button{min-height:42px}.shop-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;color:#526c71;font-size:10px;margin:14px 0}
.shop-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}.shop-item{display:flex;flex-direction:column;align-items:center;min-height:167px;padding:15px 8px 13px;gap:5px}.shop-item img{width:52px;height:52px;margin:0 0 6px}.shop-item strong{font-size:11px;line-height:1.5}.shop-kind{min-height:14px;font-size:9px}.shop-price{margin-top:auto;background:#c9d8ce;color:#496b62;padding:4px 9px;border-radius:2px;font-size:11px}
.shop-product{display:grid;grid-template-columns:96px minmax(0,1fr);gap:22px;align-items:center;background:#dce2d3;border:1px solid #a6b7ac;border-radius:3px;padding:22px}.shop-product>img{width:96px;height:96px}.shop-product h3{font-size:21px;margin:0 0 10px}.shop-product small{color:#916f3b}.purchase-total{display:flex;justify-content:space-between;gap:15px;align-items:center;border-top:1px solid #b5c0b1;padding:18px 0;color:#596f73}.purchase-total b{color:#947244;font-size:22px}.purchase-note{min-height:20px}
:is(.storage-panel,.book-step,.book-intro,.splice-result,.lock-exchange,.admin-item-preview,.exp-region,.adventure-intro,.mastery-card,.contract-card,.atelier-intro,.atelier-starter,.recipe-card,.collection-detail,.collection-rewards>section,.admin-metrics section,.create-world,.atelier-recipe,.collection-hero,.title-selection,.station-banner,.recycle-row){background:#e1e2d1;border:1px solid #aebcaf;border-radius:3px;color:#415f69;box-shadow:inset 0 1px 0 #faf4e2}
.storage-columns{gap:14px;grid-template-columns:1fr 1fr}.storage-panel{padding:15px;min-width:0}.storage-panel h3{font-size:13px}.storage-selection-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;max-height:330px;gap:7px}.storage-choice{padding:8px}.storage-choice label strong{font-size:9px;line-height:1.5}.storage-choice label small{font-size:9px;color:#516a6e}.storage-choice>label{margin:0}.storage-choice input[type=number]{min-height:34px;padding:6px}.storage-batch-actions{gap:6px}.storage-batch-actions button{min-height:32px;padding:6px;font-size:9px}.storage-picked{color:#526a70}
.atelier-intro,.collection-hero{padding:20px}.atelier-intro h3,.collection-hero h3{font-size:23px;color:#365768}.atelier-intro>img{width:70px;height:70px}.atelier-starter{border-left:3px solid #bd9d5c}.mastery-card .info>small,.progression-heading>small,.recipe-cost{color:#526b70}.mastery-rank{background:#d3ddce;border:1px solid #a5b8ab;color:#5b7b73;border-radius:3px}.mastery-card,.contract-card{padding:17px}.contract-card strong{color:#446776}.contract-card>small:not(.eyebrow){color:#536d70}.recipe-ingredients>div{color:#4e696a}.recipe-ingredients>div.missing{color:#a36d54}.atelier-recipe{padding:18px}.atelier-recipe .recipe-cost{color:#526b70}.recycle-row>span{color:#496b72}.collection-card.discovered{border-color:#9fb8aa;background:#dbe4d1}.collection-card small{color:#526c70}.collection-detail .item-rarity{margin-bottom:8px}.title-selection small{color:#516a70}
.admin-metrics section{padding:16px}.admin-metrics strong{color:#4d7581}.admin-metrics small{color:#526a6d}.admin-log{background:#e1e2d3;border-color:#b0beb1;border-radius:3px;color:#5d7779}.admin-log code{background:#d6ddd0;color:#5f7678}.admin-item-preview strong{color:#355d70}.admin-pick-item span{color:#53757c}.profile-card,.trade-column,.stat-grid>div{background:#dce2d2;border-color:#aabaae;border-radius:3px;color:#496975}.offer,.trade-state{background:#d1ddce;color:#627c76}.danger-tag{color:#826a4d;background:#d9decc;padding:3px 6px;border-radius:2px;display:inline-block;align-self:start;width:fit-content}

/* Space and story retain their content, using the same window materials. */
.space-toolbar label{color:#5c747d}.space-layout{grid-template-columns:minmax(0,1fr) minmax(240px,.9fr);gap:15px}.space-details{background:#dce2d4;border:1px solid #aabcb0;border-radius:3px;padding:16px;color:#3f6070}.star-map{border:2px solid #819aa5;border-radius:3px}.planet-selector{gap:5px}.planet-selector button{min-height:30px;font-size:9px;padding:6px 8px}.planet-dot{background:#648b89;color:#f1edda;border-color:#466c72}.space-planet-heading{font-size:14px}.space-planet-heading small{color:#536d72}.satellite-card{background:#e9e6d2;border-left:3px solid #94adab;border-radius:2px}.satellite-card p{color:#536c70;font-size:11px}.satellite-card code{color:#5e7c7d;background:#d8e1d2;padding:5px;font-size:10px}.satellite-card small{color:#536c70}
.star-station-card{background:#d8e0d3;border:1px solid #a4b7ab;border-top:3px solid #9ba66d;border-radius:3px;padding:19px}.star-station-card .station-clock{color:#426878;font-size:22px}.star-station-card .eyebrow{color:#71897d}.star-station-card p{color:#4e6c70}.story-chapter{background:#e0e3d1;border:1px solid #acbdac;border-left:3px solid #829f93;border-radius:3px}.story-chapter .eyebrow{color:#536d6e}.story-chapter.locked{opacity:.62}.story-rewards span{color:#4f6a6d}.forge-recipe{background:#e0e3d3;border-radius:3px;border-color:#a9b9b0}.forge-recipe h3{font-size:17px}.forge-recipe>small{color:#516a70}.market-form{gap:13px}

/* Grouped menu, with every existing screen still one tap away. */
.menu-overview{display:flex;align-items:center;gap:14px;padding:15px;background:#d9e1d2;border:1px solid #a8bcb0;border-radius:3px;margin-bottom:18px}.menu-overview>img{width:44px;height:44px}.menu-overview h3{font-size:17px;margin:0 0 5px}.menu-overview p{font-size:11px;margin:0}.menu-overview .primary{margin-left:auto;white-space:nowrap}.pause-buttons{display:flex;flex-direction:column;gap:17px}.menu-group h3{font-size:11px;letter-spacing:.3px;margin:0 0 8px;color:#758779!important}.menu-links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.menu-links button{display:flex;align-items:center;gap:9px;text-align:left;min-height:49px;padding:9px 10px;font-size:11px;white-space:normal;background:#e1e5d7;border-color:#a1b5ae;box-shadow:inset 0 1px 0 #faf3e2,0 2px 0 #b9c7bb}.menu-links button>img{width:25px;height:25px;flex:0 0 25px}.menu-links button:hover{background:#f0efdc}.menu-footer{display:flex;justify-content:space-between;gap:10px;margin-top:20px;border-top:1px solid #bac6b6;padding-top:15px}

/* In-world chrome uses the blue outside of the light windows. */
.game{--text:#f1efdc;--muted:#b0c9ce;--line:#6c8e9a;color:#e8ecdf}
.game-header{top:max(12px,env(safe-area-inset-top));left:max(18px,env(safe-area-inset-left));right:max(18px,env(safe-area-inset-right));gap:12px}.brand.small{font-size:23px;text-shadow:1px 2px 0 #183645}.brand.small img{width:28px;height:28px}.game-shade{opacity:.7}
:is(.world-pill,.gem-pill,.avatar-button,.fullscreen-button,.game-nav button,.bottom-bar,.bag-button,.wing-status,.zoom-controls button,.quest-tracker,.interaction-hint,.tile-tooltip){background:#254b60ed;border:2px solid #7395a1;border-radius:3px;box-shadow:inset 0 1px 0 #b4cccf29,2px 2px 0 #153440;backdrop-filter:none;color:#e6ecdf}
.world-pill{min-width:190px;padding:8px 12px;gap:10px}.world-orb{width:25px;height:25px}.world-pill small{color:#afc8ce;font-size:7px;letter-spacing:1px}.world-pill strong{color:#f6efda;font:12px CliopichMono,monospace;letter-spacing:.4px}.header-right{gap:8px}.gem-pill{display:flex;align-items:center;gap:6px;color:#efdbab;padding:8px 10px;font-size:12px}.gem-pill>img{width:20px;height:20px}.avatar-button,.fullscreen-button{width:36px;height:36px;min-height:36px}.avatar-button>img{width:26px;height:26px}.world-status{top:76px;left:max(20px,env(safe-area-inset-left));font-size:9px;color:#e1eada;gap:13px}.world-status span{background:#203f526b;padding:3px 5px;border-radius:2px}
.game-nav{top:113px;right:max(18px,env(safe-area-inset-right));gap:7px}.game-nav button{width:52px;min-height:52px;padding:6px 0 5px;transition:background-color .1s}.game-nav button:hover{transform:none;background:#3d6b7e}.game-nav span{display:flex;align-items:center;justify-content:center;height:26px}.game-nav span>img{width:26px;height:26px}.game-nav small{font-size:8px;color:#d7e7dc;margin-top:3px}.touch-menu-button{display:block}
.bottom-bar{padding:7px;gap:7px;bottom:max(22px,env(safe-area-inset-bottom));background:#234b5eed}.quickbar-stack{gap:4px}.compact-health{font:11px CliopichMono,monospace;color:#f5f0d9;letter-spacing:.5px;text-shadow:1px 1px 0 #153b4d}.hotbar{gap:5px}.hotbar button{width:49px;height:57px;border:2px solid #829ea5;border-radius:2px;background:#355c6c;box-shadow:inset 0 2px 0 #9ab8b333,inset 0 -2px 0 #234657;padding:4px}.hotbar button.active{background:#b69a65;border-color:#f6dd9e;box-shadow:inset 0 2px 0 #e4c889,inset 0 -2px 0 #8d784f}.hotbar button:nth-child(2){border-color:#8aaeb1;background:#3d626e}.hotbar button:nth-child(2).active{background:#6f9a9a;border-color:#d0e5d7;box-shadow:inset 0 2px 0 #afc9bd}.hotbar .key-number,.hotbar .quantity{color:#f5ecd0}.hotbar .slot-caption{color:#dce8dc;font-size:7px}.hotbar button.active .slot-caption{color:#fff0c9}.hotbar img{width:30px;height:30px}.bag-button{height:57px;width:39px;padding:4px}.bag-button>img{width:28px;height:28px}.bag-button small{font-size:8px;color:#e7e9d5}.breath-hud{color:#bfe9ef;font-size:10px}.control-hint{font-size:8px;color:#cbdfd9;bottom:4px;text-shadow:1px 1px #193d4f}.control-hint kbd{font-size:8px;padding:0 3px;min-width:15px;background:#2f5366;color:#dae5d6;border-color:#789ba5}
.quest-tracker{top:100px;background:#264b60ed;border-color:#809e9f}.quest-tracker strong{font-size:10px;color:#e9e4cb}.quest-tracker small{font-size:9px;color:#bacfd0}.quest-tracker .progress{background:#35596a;border-color:#719592}.quest-tracker .progress i{background:#a0be9e}.interaction-hint{font-size:10px;padding:7px 11px;color:#efe7cd}.wing-status{color:#d7e6d9;font-size:9px;padding:6px 9px}.tile-tooltip{padding:7px 10px;font-size:10px;color:#efe9d1}.star-run-hud{background:#294e61eb;border:1px solid #d1bd84;border-radius:3px;color:#efe2be;font-size:10px}.zoom-controls button{height:28px;min-height:28px;width:28px;font-size:16px}.world-title-float{background:#284e61e6;border:2px solid #89a2a6;border-radius:3px;padding:13px 25px}.world-title-float span{color:#b8cdd1}.world-title-float strong{color:#f6edcf;font-size:22px}
.game .chat-box{background:#e7e0cbed;border:2px solid #718e9a;border-radius:3px;box-shadow:2px 2px 0 #123347;max-width:calc(100vw - 24px)}
.game .chat-box .chat-heading{background:#365f78!important;border-bottom:1px solid #24495e;color:#e5ebdd;padding:8px 10px!important;border-radius:0!important;font-size:10px!important;min-height:32px!important;letter-spacing:0!important}
.game .chat-messages{background:#e4dfcc;color:#3c5967;padding:9px!important}.game .chat-message .chat-meta{color:#8a988b;font-size:9px}.game .chat-message b{color:#3e6a7d!important}.game .chat-message .chat-text{background:#f4eedc;color:#43616b;border:1px solid #c7cbbb;border-radius:2px;font-size:11px;padding:5px 7px}.game .chat-message.mine .chat-text{background:#d4e0ce;border-color:#a5baab}.game .chat-message.mine b{color:#557962!important}.game .chat-box #chat-form{background:#cfd9cf;padding:6px;gap:5px}.game .chat-box #chat-input{background:#f7f1df;border:1px solid #a1b6b3;border-radius:2px;box-shadow:none;color:#365c6d;font-size:11px;min-height:33px;padding:6px 8px;margin:0}.game .chat-box #chat-form button{background:#d8a16a;border:1px solid #9f7856;color:#3d3e35;border-radius:2px;min-height:33px;width:34px}.game .chat-box .chat-unread{background:#e5b577;color:#4a4532}.game .chat-box .chat-new{background:#74948e!important;color:#f4eedb;border:0;font-size:9px}.chat-messages .system{font-size:10px;color:#839288}.game .chat-box.collapsed{width:140px}.game .chat-box.collapsed .chat-heading{padding:6px 8px!important}.game .chat-box.collapsed .chat-heading:before{content:none!important}
.notifications{z-index:80}.notification{background:#e6e3cf;border:2px solid #7b999b;border-left:4px solid #709c86;border-radius:3px;color:#44626b;box-shadow:3px 3px 0 #183d49;padding:12px 16px;font-size:12px}.notification.error{background:#f0dfcc;border-color:#b68b77;color:#8b5748}.loading{z-index:90;background:#183747;color:#ecebd7}.loading strong{font-size:13px;letter-spacing:0}.loading img{width:48px;height:48px;animation:none}

/* The existing mobile controller dimensions and preferences are retained. */
#mobile-controls .joystick-base{border-color:#b6cfc5a8;background:#2e576bbf;box-shadow:inset 0 2px 0 #d0e0d326}
#mobile-controls .joystick-stick{border-color:#dce5cd;background:#a3b7a5;box-shadow:inset 0 3px 0 #d0dcc2,inset 0 -3px 0 #6a8e88}
.touch-device #mobile-controls .mobile-actions button{background:#355f74!important;color:#ebefdc!important;border-color:#92b6bb;box-shadow:inset 0 2px 0 #a9c8c033,inset 0 -3px 0 #204b61,0 2px 0 #143f51;border-radius:4px}
.touch-device #mobile-controls #attack-button{background:#9d7054!important;border-color:#ddb38b!important}.touch-device #mobile-controls #interact-button{background:#487a80!important;border-color:#a1cbc0!important}.touch-device #mobile-controls .mobile-actions .jump-button{background:#b39761!important;border-color:#e8d6a1!important}.touch-device #mobile-controls .mobile-actions .pressed{border-color:#fff1c8!important;background:#597a81!important;box-shadow:inset 0 2px 0 #183c4f55}
.touch-device .game-nav [data-panel=shop]{display:block}.touch-device .game-nav span>img{width:22px;height:22px}.touch-device .quest-tracker{left:14px;top:170px;right:auto;width:176px}.touch-device .chat-box{max-width:240px}.touch-device .chat-box.collapsed{width:134px}

@media (min-width:1400px){.lobby-hero{min-height:217px}.hero-copy{padding:28px 31px}.lobby-section{padding:21px}.world-card .preview{height:93px}}
@media (max-width:1000px){
 .welcome,.lobby{padding-left:22px;padding-right:22px}.welcome-grid{gap:24px;grid-template-columns:minmax(0,1fr) 340px}.welcome-sign{left:14px;padding:18px 22px}.welcome-sign h1{font-size:29px}.lobby-columns{grid-template-columns:minmax(0,1fr) 215px;gap:14px}.lobby-shortcuts{grid-template-columns:repeat(4,minmax(0,1fr))}.lobby-hero .hero-copy{flex-basis:52%}.lobby-hero>img{width:48%}.hero-copy{padding:22px}.hero-copy h1{font-size:27px}.hero-plaque{font-size:8px}.menu-links{grid-template-columns:repeat(2,minmax(0,1fr))}.shop-grid{gap:9px}.inventory-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.storage-selection-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.space-layout{grid-template-columns:1fr}.star-map{max-height:400px;object-fit:contain}.space-details{padding:15px}.lobby-account{gap:7px}
}
@media (max-width:760px){
 .welcome-grid{grid-template-columns:1fr;max-width:480px;margin:28px auto 32px;gap:25px}.welcome-art{min-height:260px;padding-bottom:68px}.welcome-art>img{height:220px}.welcome-sign{bottom:0;left:16px;right:16px;padding:13px 18px;max-width:none}.welcome-sign h1{font-size:24px;margin:6px 0;line-height:1.15}.welcome-sign h1 br{display:none}.welcome-sign p{font-size:10px}.welcome-sign>span{font-size:8px}.welcome-copy{max-width:none;justify-self:stretch}.welcome-top .version{font-size:8px}.welcome-controls{margin-top:17px}.auth-content{padding:17px 20px}.lobby-columns{grid-template-columns:minmax(0,1fr) 195px;gap:12px}.lobby-section,.lobby-tools{padding:14px}.world-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.lobby-shortcuts{grid-template-columns:repeat(3,minmax(0,1fr))}.lobby-shortcuts button>small{font-size:8px}.lobby-shortcuts button{min-height:86px}.lobby-hero{min-height:190px}.hero-copy h1{font-size:25px}.hero-copy p{font-size:11px}.hero-actions{gap:6px}.hero-actions button{font-size:10px;padding:8px 10px;min-height:36px}.lobby-join{gap:6px}.lobby-join button{font-size:10px;padding:9px}.lobby-version{font-size:8px}
}
@media (max-width:700px){
 .welcome,.lobby{padding:16px 14px}.welcome-top,.lobby-header{gap:10px;padding-bottom:13px}.brand{font-size:27px}.brand img{width:30px;height:30px}.lobby-content{margin-top:16px}.lobby-columns{grid-template-columns:1fr;margin-top:16px}.lobby-side{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:11px}.adventurer-card{grid-row:span 2}.lobby-side-actions{grid-column:1/-1;grid-template-columns:repeat(3,minmax(0,1fr))}.lobby-side-actions button{text-align:center}.lobby-shortcuts{grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.lobby-shortcuts button{min-height:82px;padding:8px 3px}.lobby-shortcuts button>strong{font-size:10px}.lobby-shortcuts button>small{display:none}.lobby-shortcuts button>span,.lobby-shortcuts button>span>img{width:30px;height:30px}.lobby-hero .hero-copy{flex-basis:56%;padding:19px}.lobby-hero>img{width:44%}.hero-copy h1{font-size:24px}.hero-plaque{display:none}.lobby-header .brand{font-size:26px}.lobby-version{padding:0}.lobby-account>span{padding:6px 8px;min-height:34px;font-size:11px}.lobby-account button{min-height:34px;padding:6px 9px;font-size:10px}.lobby-account>span>img{width:18px;height:18px}.lobby-footer{flex-direction:column;gap:9px;font-size:9px}.tools-title h2{font-size:15px}
 .modal{padding:max(6px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))}
 .modal-card,.modal-card[data-panel=space],.modal-card[data-panel=inventory],.modal-card[data-panel=admin]{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr);width:100%;height:calc(100dvh - max(6px,env(safe-area-inset-top)) - max(6px,env(safe-area-inset-bottom)));max-height:calc(100dvh - max(6px,env(safe-area-inset-top)) - max(6px,env(safe-area-inset-bottom)));border-width:2px;border-radius:3px;box-shadow:2px 2px 0 #102d3b}
 .modal-card>header{grid-column:1;grid-row:1;padding:10px 12px;border-bottom-width:2px;gap:10px}.modal-card h2{font-size:17px;margin-top:3px}.modal-card #modal-eyebrow{font-size:7px}.close-button{width:34px;height:34px;min-height:34px;flex-basis:34px;font-size:23px}
 .modal-nav{grid-column:1;grid-row:2;flex-direction:row;gap:4px;overflow-x:auto;overflow-y:hidden;max-width:100%;padding:6px;min-height:0;border:0;border-bottom:2px solid #a8b7b1;scrollbar-width:thin;scrollbar-color:#839da1 #d3dcd4;scroll-padding:6px;overscroll-behavior-inline:contain}.modal-nav button{flex:0 0 72px;min-height:39px;flex-direction:column;justify-content:center;gap:4px;padding:5px 4px;font-size:9px;line-height:1.2}.modal-nav button>img{width:20px;height:20px;flex:0 0 20px}
 #modal-body{grid-column:1;grid-row:3;padding:16px 13px;max-height:none}.shop-tools{grid-template-columns:minmax(0,1fr) auto;gap:10px}.shop-tools label:first-child{grid-column:1/-1}.shop-tools>button{min-width:66px}.shop-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.shop-item{min-height:154px;padding:13px 5px 11px}.shop-item img{width:43px;height:43px}.shop-item strong{font-size:10px}.shop-kind{font-size:8px}.shop-balance{padding:13px;gap:6px 10px}.shop-balance>strong{font-size:14px}.shop-balance>b{font-size:18px}.shop-product{grid-template-columns:68px minmax(0,1fr);gap:14px;padding:15px}.shop-product>img{width:68px;height:68px}.shop-product h3{font-size:18px}.inventory-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.inventory-entry .item-card{min-height:160px}.inventory-entry .item-card img{width:44px;height:44px}.inventory-hero{padding:12px}.inventory-hero h3{font-size:15px}.equipment-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.equipment-cell{min-height:83px}.inventory-quickbar{padding:9px;gap:5px}.quickbar-assignment{padding:6px 3px}.quickbar-assignment span{font-size:8px}
 .storage-columns{grid-template-columns:1fr;gap:12px}.storage-selection-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;max-height:285px}.storage-panel{padding:12px}.storage-panel .storage-selection-grid{max-height:285px}.inline-form>label{flex-basis:130px}.inline-form>button{width:100%}.menu-overview{flex-wrap:wrap;padding:12px;gap:10px}.menu-overview .primary{width:100%;margin-left:0}.menu-overview h3{font-size:15px}.menu-links{gap:7px}.menu-links button{font-size:10px;min-height:47px;padding:8px}.menu-links button>img{width:23px;height:23px;flex-basis:23px}.menu-footer button{font-size:10px;padding:9px}.list-row{gap:9px;padding:11px}.list-row>button{font-size:10px;padding:8px 10px;min-height:35px}.list-row>.info{flex-basis:calc(100% - 60px)}.list-row small{font-size:9px}.atelier-recipes{grid-template-columns:1fr}.daily-contracts{grid-template-columns:1fr}.space-toolbar{gap:8px}.space-toolbar>button{font-size:10px;padding:9px}.space-layout{grid-template-columns:1fr}.star-map{max-height:360px}.star-station-card{padding:14px}.star-station-card .station-clock{font-size:20px}.market-form{grid-template-columns:1fr}.forge-recipe{padding:14px}.forge-recipe h3{font-size:15px}.catalog-pager{gap:9px}.catalog-pager button{font-size:10px}
 .game-header{left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));gap:7px;top:max(10px,env(safe-area-inset-top))}.brand.small{font-size:18px;gap:5px}.brand.small img{width:24px;height:24px}.world-pill{min-width:0;padding:7px 9px;gap:7px}.world-pill .world-orb{width:20px;height:20px}.world-pill strong{font-size:10px;max-width:115px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.world-pill small{font-size:6px;margin-bottom:3px}.gem-pill{padding:7px;gap:4px;font-size:10px;min-height:34px}.gem-pill>img{width:17px;height:17px}.header-right{gap:5px}.avatar-button,.fullscreen-button{width:32px;height:34px;min-height:34px}.world-status{left:11px;top:66px;font-size:8px;gap:7px}.world-status span{padding:2px 3px}.game-nav{right:max(10px,env(safe-area-inset-right));top:100px;gap:6px}.game-nav button{width:43px;min-height:43px;padding:4px 0}.game-nav small{font-size:7px;margin-top:1px}.game-nav span>img{width:23px;height:23px}.game-nav span{height:23px}.touch-device .quest-tracker{top:165px;left:11px;width:170px}.game .chat-box{width:250px}.game .chat-messages{height:112px}.game .chat-box.collapsed{width:133px}.notifications{left:50%;right:auto;transform:translateX(-50%);width:min(340px,calc(100vw - 28px))}.notification{font-size:11px;padding:11px 13px}.world-title-float strong{font-size:19px}
}
@media (max-width:380px){
 .welcome-top .version{font-size:7px;letter-spacing:0}.welcome-sign{left:10px;right:10px;padding:12px}.welcome-sign h1{font-size:21px}.lobby-header .brand{font-size:23px}.lobby-header .brand img{width:26px;height:26px}.lobby-version{display:none}.lobby-shortcuts{grid-template-columns:repeat(5,minmax(0,1fr))}.lobby-shortcuts button{min-height:75px}.lobby-shortcuts button>strong{font-size:8px}.lobby-shortcuts button>span,.lobby-shortcuts button>span>img{width:27px;height:27px}.lobby-side{grid-template-columns:1fr 1fr;gap:9px}.adventurer-card{padding-left:10px;padding-right:10px}.card-caption{margin-left:-10px;margin-right:-10px;font-size:8px}.gift-card,.daily-card{padding:10px;grid-template-columns:26px minmax(0,1fr);gap:5px 7px}.gift-card>img,.daily-card>img{width:26px;height:26px}.gift-card h3,.daily-card h3{font-size:10px}.gift-card p{font-size:9px}.gift-card button,.daily-card button{font-size:8px;padding:7px 5px}.lobby-side-actions{grid-template-columns:1fr 1fr}.lobby-join button{font-size:9px;padding:8px}.section-heading h2{font-size:19px}.tools-title h2{font-size:13px}.tools-title small{font-size:8px}.lobby-hero .hero-copy{flex-basis:64%;padding:17px}.lobby-hero>img{width:36%}.hero-copy h1{font-size:23px}.hero-copy p{font-size:10px}.hero-actions{margin-top:12px}.hero-actions button{font-size:9px;min-height:33px}.shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.inventory-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.inventory-entry .item-card{min-height:155px;padding-left:4px;padding-right:4px}.inventory-entry .item-card strong{font-size:9px}.inventory-entry .item-card img{width:39px;height:39px}.menu-links{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.menu-links button{font-size:9px}.menu-links button>img{width:20px;height:20px;flex-basis:20px}.storage-selection-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.brand.small>span{display:none}.world-pill strong{max-width:115px}.header-right .fullscreen-button{display:none}
}
@media (orientation:landscape) and (max-height:540px){
 .modal{padding:6px max(6px,env(safe-area-inset-right)) 6px max(6px,env(safe-area-inset-left))}.modal-card,.modal-card[data-panel=space],.modal-card[data-panel=inventory],.modal-card[data-panel=admin]{grid-template-columns:106px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);height:calc(100dvh - 12px);max-height:calc(100dvh - 12px)}.modal-card>header{grid-column:1/-1;grid-row:1;padding:7px 12px}.modal-card h2{font-size:16px;margin-top:1px}.modal-card #modal-eyebrow{font-size:6px}.close-button{width:29px;height:29px;min-height:29px;flex-basis:29px;font-size:21px}.modal-nav{grid-column:1;grid-row:2;display:flex;flex-direction:column;overflow-x:hidden;overflow-y:auto;max-width:none;border:0;border-right:2px solid #a8b7b1;padding:6px;gap:3px}.modal-nav button{flex:0 0 auto;min-height:34px;flex-direction:row;justify-content:start;gap:6px;padding:5px 6px;font-size:9px;text-align:left}.modal-nav button>img{width:18px;height:18px;flex:0 0 18px}#modal-body{grid-column:2;grid-row:2;padding:13px 16px;max-height:none}.shop-tools{grid-template-columns:minmax(0,1fr) minmax(100px,150px) auto;margin:10px 0}.shop-tools label:first-child{grid-column:auto}.shop-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.shop-item{min-height:147px}.inventory-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.equipment-strip{grid-template-columns:repeat(6,minmax(0,1fr))}.menu-links{grid-template-columns:repeat(3,minmax(0,1fr))}.menu-overview{flex-wrap:nowrap}.menu-overview .primary{width:auto;margin-left:auto}.space-layout{grid-template-columns:minmax(0,1fr) minmax(230px,.9fr)}.space-details{padding:12px}.star-map{max-height:none}.storage-columns{grid-template-columns:1fr 1fr}.storage-selection-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.atelier-recipes{grid-template-columns:repeat(2,minmax(0,1fr))}.daily-contracts{grid-template-columns:repeat(2,minmax(0,1fr))}
 .welcome-grid{grid-template-columns:minmax(0,1fr) minmax(300px,.8fr);max-width:100%;gap:22px;margin:22px auto}.welcome-art{min-height:260px}.welcome-art>img{height:225px}.welcome-sign h1{font-size:24px}.welcome-copy{max-width:none}.auth-content{padding:13px 18px}.auth-content label{margin:9px 0}.auth-content .tabs{margin-bottom:10px}.welcome-controls{margin-top:12px}.welcome-footer{margin-top:12px}.lobby-columns{grid-template-columns:minmax(0,1fr) 195px}.lobby-side{display:flex}.lobby-shortcuts{grid-template-columns:repeat(4,minmax(0,1fr))}.lobby-hero{min-height:178px}.lobby-side-actions{grid-template-columns:1fr}.game-header{top:max(7px,env(safe-area-inset-top))}.world-status{top:57px}.touch-device .game-nav{top:63px}.touch-device .game-nav button{width:38px;height:38px;min-height:38px}.touch-device .game-nav small{display:none}.touch-device .game-nav span{height:24px}.touch-device .quest-tracker{top:85px;left:205px;width:160px}.touch-device .chat-box{width:230px;max-width:230px}.touch-device .chat-box.collapsed{width:130px}.game .chat-messages{height:82px}.game .chat-box .chat-heading{min-height:27px!important;padding:5px 9px!important}.game .chat-message .chat-text{font-size:10px}.game .chat-box #chat-input{min-height:29px}.game .chat-box #chat-form button{min-height:29px}.control-hint{display:none}
}
@media (orientation:landscape) and (max-width:620px){.modal-card{grid-template-columns:94px minmax(0,1fr)}.modal-nav button{font-size:8px;padding:5px}.modal-nav button>img{width:17px;height:17px;flex-basis:17px}#modal-body{padding:12px}.space-layout{grid-template-columns:1fr}.shop-grid,.inventory-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.menu-links{grid-template-columns:repeat(2,minmax(0,1fr))}.touch-device .quest-tracker{top:92px;left:190px;width:145px}.touch-device .chat-box.collapsed{width:112px}.game .chat-box.collapsed .chat-heading>span{display:initial!important}.game .chat-box.collapsed .chat-heading>i{display:none}.touch-device .chat-box.collapsed .chat-heading::before{content:none!important}}
@media (orientation:landscape) and (max-height:330px){.touch-device .quest-tracker{display:none}.touch-device .zoom-controls{display:none}.star-run-hud{top:64px}.game-nav{gap:4px}.game .chat-messages{height:62px}}
@media (prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important}.primary,.secondary,.chip,.modal-nav button,.lobby-shortcuts button{transition:none}.exp-item:after{animation:none!important;display:none}.world-title-float{animation:none}}

/* Numeric balances and guide text use the same high-contrast ink. */
.lock-card b{color:#567079}.lock-card strong{color:#395a68}.balance b{color:#8e6b36}.book-intro{color:#3d5f68}.mastery-card .info small,.collection-card small,.storage-picked,.inventory-sort{color:#526a70}.recipe-title strong{color:#3e6070}.item-detail{color:#4c6873}.item-detail>img{background:#d2ded2;border:1px solid #aabcb1;border-radius:3px}.form-error{color:#9f5141}

/* Keep the HUD out of the two thumb zones, including short landscape screens. */
.game .chat-box{z-index:5}.game .zoom-controls,.game .quest-tracker{z-index:3}
@media (max-width:700px){
 .game-header .brand.small>span{display:none}.world-pill{flex:1;min-width:0}.world-pill>span{min-width:0}.world-pill strong{max-width:115px}
 .touch-device .zoom-controls{top:116px;bottom:auto;left:12px;display:flex;flex-direction:row;gap:4px}.touch-device .quest-tracker{top:183px}
}
@media (max-width:500px){.header-right .fullscreen-button{display:none}}
@media (orientation:portrait){
 .touch-device .chat-box,.touch-device .chat-box.collapsed{bottom:calc(max(12px,env(safe-area-inset-bottom)) + 273px)}
}
@media (orientation:landscape) and (max-height:540px){
 .touch-device .game-nav{top:67px;right:max(10px,env(safe-area-inset-right));flex-direction:row;gap:5px}
 .touch-device .game-nav button{width:34px;height:34px;min-height:34px;padding:3px 0}.touch-device .game-nav small{display:none}
 .touch-device .game-nav span{height:24px}.touch-device .game-nav span>img{width:23px;height:23px}
 .touch-device .zoom-controls{top:111px;bottom:auto;left:12px;display:flex;flex-direction:row;gap:4px}
 .touch-device .quest-tracker{top:112px;left:250px;width:158px}
}
@media (orientation:landscape) and (max-width:620px){.touch-device .quest-tracker{left:250px;top:112px;width:145px}}
@media (orientation:landscape) and (max-height:330px){.touch-device .zoom-controls,.touch-device .quest-tracker{display:none}}
