*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#10151d;color:#f4f1e8;font-family:"PingFang SC","Microsoft YaHei",sans-serif}button,a{font:inherit;color:inherit}#rpg{position:relative;width:100%;height:100dvh;overflow:hidden;background:radial-gradient(ellipse at center,#33434b,#10151d 72%)}#world{display:block;width:100%;height:100%;touch-action:none;outline:none}.hud-top{position:absolute;z-index:2;top:max(16px,env(safe-area-inset-top));left:20px;right:20px;display:flex;align-items:center;gap:14px;pointer-events:none}.hud-top>*{pointer-events:auto}.back{display:grid;place-items:center;width:40px;height:40px;text-decoration:none;font:32px/1 Georgia;color:#f1d394;border:1px solid #dbc28d55;border-radius:50%;background:#101820c9}.brand{min-width:160px;text-shadow:0 2px 9px #07121c}.brand small,.quest small,.level small{display:block;color:#b4c6c9;font-size:9px;letter-spacing:2px}.brand b{display:block;font:25px Georgia,"Songti SC",serif;letter-spacing:5px;color:#f0e4c7;margin-top:2px}.quest{margin-left:auto;padding:9px 14px;border:1px solid #c7d7d244;border-radius:5px;background:linear-gradient(110deg,#111c25df,#273b45c9);box-shadow:0 5px 20px #050b0d66}.quest b{display:block;color:#f2d59a;font-size:12px;margin-top:5px}.level{display:grid;place-items:center;align-content:center;width:48px;height:48px;border:1px solid #e3c78699;border-radius:50%;background:#17242be8;color:#f1d394}.level small{font-size:7px;letter-spacing:0}.level b{font:21px Georgia}.hud-button{width:40px;height:40px;border:1px solid #ccd8d155;border-radius:50%;background:#132029d9;color:#f1d394;font-size:18px}.location{position:absolute;top:98px;left:24px;display:flex;align-items:center;gap:9px;padding:7px 12px;border:1px solid #ccd7d533;background:#111a1fc2;border-radius:3px;color:#eee6d3;text-shadow:0 2px 5px #000;font-size:11px;letter-spacing:2px}.location i{width:7px;height:7px;border-radius:50%;background:#84d7dd;box-shadow:0 0 10px #8ff8ff}.target-card{position:absolute;top:100px;right:23px;width:220px;padding:10px 12px;border:1px solid #df95815a;border-radius:5px;background:#101820df;box-shadow:0 5px 20px #0005}.target-card>div:first-child{display:flex;justify-content:space-between;align-items:center}.target-card small{font-size:9px;color:#bd9b8d}.target-card b{font-size:12px;color:#f0dacf}.target-health{height:6px;margin-top:9px;overflow:hidden;border-radius:8px;background:#4d2829}.target-health i{display:block;width:100%;height:100%;background:linear-gradient(90deg,#bd3f37,#f07755);transition:width .2s}#notice{position:absolute;left:50%;bottom:125px;transform:translateX(-50%);padding:9px 16px;border:1px solid #cad9d22b;border-radius:20px;background:#10191ece;color:#eee4cc;font-size:11px;white-space:nowrap;box-shadow:0 6px 20px #0004;transition:opacity .35s}.bottom-hud{position:absolute;z-index:2;left:20px;right:20px;bottom:max(20px,env(safe-area-inset-bottom));display:flex;align-items:flex-end;justify-content:space-between;gap:22px;pointer-events:none}.bottom-hud>*{pointer-events:auto}.hero-panel{display:flex;align-items:center;gap:12px;width:min(390px,44vw);min-height:94px;padding:10px 14px;border:1px solid #c2d5d755;border-radius:5px;background:linear-gradient(115deg,#111b22ed,#23333ce5);box-shadow:0 8px 26px #06101488}.hero-portrait{display:grid;place-items:center;width:62px;height:62px;flex:none;border:1px solid #d8bd7d;border-radius:4px;background:radial-gradient(circle,#657277,#202b31)}.hero-portrait img{width:54px;height:54px;object-fit:contain}.hero-bars{flex:1;min-width:0}.hero-name{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px}.hero-name>b{font:16px Georgia,"Songti SC",serif;color:#f3d9a3;letter-spacing:2px}.hero-name span{display:flex;align-items:center;gap:4px;color:#e5d5a7;font:12px Georgia}.hero-name img{width:15px;height:15px;object-fit:contain}.bar{height:8px;margin:5px 0;border:1px solid #bec9c126;border-radius:7px;background:#151a1e;overflow:hidden}.bar i,.xp i{display:block;width:100%;height:100%;border-radius:inherit;transition:width .2s}.hp i{background:linear-gradient(90deg,#913930,#db6551);box-shadow:0 0 8px #d94a4277}.mana i{background:linear-gradient(90deg,#236588,#69b9dc)}.xp{height:3px;margin-top:7px;background:#0b1114}.xp i{background:#e6c36e}.hotbar{display:flex;align-items:flex-end;gap:8px}.hotkey,.attack-button{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:76px;height:76px;padding:5px;border:1px solid #d6c28888;border-radius:7px;background:linear-gradient(145deg,#33434b,#141c21);box-shadow:0 5px 16px #0008;cursor:pointer}.hotkey b{font-size:9px;color:#e7dfcd;white-space:nowrap}.hotkey small{font-size:8px;color:#d5bd7f}.skill-glyph{display:grid;place-items:center;width:33px;height:33px;border:1px solid #e8d197;border-radius:5px;background:radial-gradient(circle at 30% 25%,#e4bd6d,#783c26 64%,#251b19);font:bold 13px Georgia;color:#fff3cf;box-shadow:0 0 13px #dc914e44}.potion .skill-glyph{background:radial-gradient(circle at 30% 25%,#e6a6c0,#814267 64%,#251b28)}.attack-button{width:83px;height:83px;border:1px solid #d98c69;background:radial-gradient(circle at 40% 30%,#995441,#381f20 72%);color:#f2d9b9}.attack-button span{font-size:32px;line-height:1}.attack-button b{font-size:9px}.mobile-controls{display:none}.veil,.loading{position:absolute;z-index:5;inset:0;display:grid;place-items:center;background:linear-gradient(120deg,#0b1219e9,#121d24ed);backdrop-filter:blur(14px)}.hero-select{width:min(760px,92vw);padding:35px;border:1px solid #b8cccd5c;border-radius:12px;background:linear-gradient(145deg,#19282feF,#10191feF);box-shadow:0 26px 90px #0009;text-align:center}.hero-select>small{color:#e1c37f;font-size:10px;letter-spacing:4px}.hero-select h1{margin:10px 0 6px;font:36px Georgia,"Songti SC",serif;letter-spacing:8px;color:#f1e4c6}.hero-select p{margin:0;color:#b9c4c0;font-size:12px}.hero-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:25px 0 17px}.hero-choice{position:relative;min-height:194px;padding:14px 10px;border:1px solid #aebdbd44;border-radius:7px;background:linear-gradient(160deg,#35464b,#172128);cursor:pointer;transition:transform .18s,border-color .18s,background .18s}.hero-choice:hover{transform:translateY(-4px);border-color:#e3c47c;background:linear-gradient(160deg,#495c5d,#1b2b31)}.hero-choice img{display:block;width:96px;height:105px;object-fit:contain;margin:0 auto 7px;filter:drop-shadow(0 7px 11px #0009)}.hero-choice b{display:block;font:18px Georgia,"Songti SC",serif;color:#f1dda9;letter-spacing:3px}.hero-choice small{display:block;margin-top:5px;color:#b9c8c4;font-size:9px}.controls-hint{padding-top:13px;border-top:1px solid #d1dbd21c;color:#9caaa9;font-size:10px;letter-spacing:1px}.loading{z-index:10;gap:10px;align-content:center;background:radial-gradient(circle at 50% 44%,#253f49,#10151d 64%);transition:opacity .45s}.loading.done{opacity:0;pointer-events:none}.sigil{font-size:48px;color:#e4c67f;text-shadow:0 0 20px #b2eaff88;animation:pulse 1.5s ease-in-out infinite}.loading b{font:24px Georgia,"Songti SC",serif;letter-spacing:5px;color:#f0e5cf}.loading small{color:#9eafb1;font-size:11px}@keyframes pulse{50%{transform:scale(1.16);opacity:.68}}@media(max-width:700px){.hud-top{top:max(10px,env(safe-area-inset-top));left:10px;right:10px;gap:8px}.back,.hud-button{width:34px;height:34px}.brand{min-width:0}.brand small{font-size:7px;letter-spacing:1px}.brand b{font-size:17px;letter-spacing:3px}.quest{padding:7px 9px}.quest small{font-size:7px;letter-spacing:1px}.quest b{font-size:9px}.level{width:38px;height:38px;flex:none}.level small{display:none}.level b{font-size:18px}.location{top:62px;left:10px;padding:5px 8px;font-size:8px}.target-card{top:62px;right:10px;width:155px;padding:7px 8px}.target-card small{font-size:7px}.target-card b{font-size:9px}.bottom-hud{left:9px;right:9px;bottom:max(9px,env(safe-area-inset-bottom));gap:7px;align-items:flex-end}.hero-panel{width:min(56vw,280px);min-height:69px;gap:6px;padding:6px}.hero-portrait{width:42px;height:42px}.hero-portrait img{width:38px;height:38px}.hero-name{margin-bottom:3px}.hero-name>b{font-size:12px}.hero-name span{font-size:9px}.hero-name img{width:12px;height:12px}.bar{height:6px;margin:3px 0}.xp{margin-top:5px}.hotbar{gap:4px}.hotkey{width:52px;height:59px;border-radius:5px}.hotkey b{font-size:7px}.hotkey small{font-size:7px}.skill-glyph{width:26px;height:26px;font-size:11px}.attack-button{width:57px;height:62px;border-radius:50%}.attack-button span{font-size:25px}.attack-button b{font-size:7px}#notice{bottom:88px;font-size:9px;padding:7px 11px;max-width:92vw;overflow:hidden;text-overflow:ellipsis}.hero-select{padding:22px 14px}.hero-select h1{font-size:26px;letter-spacing:5px}.hero-select p{font-size:10px;line-height:1.6}.hero-choices{gap:7px;margin:19px 0 13px}.hero-choice{min-height:147px;padding:9px 5px}.hero-choice img{width:68px;height:77px}.hero-choice b{font-size:13px;letter-spacing:1px}.hero-choice small{font-size:7px}.controls-hint{font-size:8px;line-height:1.6}.mobile-controls{display:block}.joystick{position:absolute;left:22px;bottom:103px;width:118px;height:118px;border:1px solid #dbe7e744;border-radius:50%;background:#12202b77;box-shadow:inset 0 0 24px #a0d5ec12;touch-action:none}.joystick i{position:absolute;inset:20%;border:1px solid #dce9e933;border-radius:50%}.joystick b{position:absolute;left:50%;top:50%;width:39px;height:39px;margin:-19.5px;border:1px solid #e6cc86;border-radius:50%;background:radial-gradient(circle at 35% 30%,#e5d6a4,#657276);box-shadow:0 3px 12px #0008;pointer-events:none}.mobile-controls>button{position:absolute;right:25px;bottom:115px;width:60px;height:60px;border:1px solid #e5c878;border-radius:50%;background:radial-gradient(circle at 35% 28%,#9e513b,#392027);box-shadow:0 5px 18px #0008;font:bold 18px Georgia;color:#f2dfb7}.mobile-controls>#mobile-attack{right:90px;bottom:76px;width:53px;height:53px;font-size:21px}.bottom-hud .hotbar{display:none}}@media(max-height:520px) and (max-width:900px){.bottom-hud{bottom:6px}.hero-panel{min-height:56px}.hero-portrait{width:35px;height:35px}.hotkey{height:50px}.attack-button{height:52px}.joystick{width:88px;height:88px;bottom:72px}.mobile-controls>button{width:48px;height:48px;bottom:82px}.mobile-controls>#mobile-attack{right:78px;bottom:55px;width:42px;height:42px}#notice{bottom:61px}}
.veil.hidden{display:none}#notice.fade{opacity:0;pointer-events:none}
.classic-war3-hero-overlay{position:absolute;inset:0;display:block;width:100%;height:100%;z-index:1;pointer-events:none;opacity:1;mix-blend-mode:normal}
.classic-war3-effects-overlay{position:absolute;inset:0;display:block;width:100%;height:100%;z-index:2;pointer-events:none;opacity:1;mix-blend-mode:screen}
#item-shop-dialog{z-index:8}
.hero-skill-slots{display:flex;align-items:flex-end;gap:7px;max-width:min(570px,48vw);overflow-x:auto;scrollbar-width:thin;scrollbar-color:#c9a65d66 #141c21;padding:2px 1px 5px}
.hero-skill-slot{flex:none;width:76px;height:76px}
.passive-skill-slot{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:2px;padding:4px;border:1px solid #b9c7c866;border-radius:5px;background:linear-gradient(145deg,#26333bd9,#11191ee8);color:#ded8c6;text-align:center}
.passive-skill-slot .skill-icon-wrap{flex:none}
.hero-skill-slot b{max-width:100%;overflow:hidden;text-overflow:ellipsis}
.hero-skill-slot.selected{border-color:#ffe19a;box-shadow:0 0 0 1px #ffe19a66,0 0 16px #e3bf6555}
.hero-skill-slot:disabled{opacity:.67;cursor:default}
.hero-skill-slot small{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:700px){.hero-skill-slots{max-width:70vw;gap:4px}.hero-skill-slot{width:52px;height:59px}}
.item-shop-window{width:min(660px,94vw);max-height:min(82vh,760px);overflow:auto;padding:24px;border:1px solid #b8cccd5c;border-radius:12px;background:linear-gradient(145deg,#19282fef,#10191fef);box-shadow:0 26px 90px #0009}
.item-shop-window>header{display:flex;align-items:center;gap:14px;border-bottom:1px solid #e7dfc21f;padding-bottom:13px}
.item-shop-window>header>div{margin-right:auto}
.item-shop-window header small{color:#e1c37f;font-size:9px;letter-spacing:3px}
.item-shop-window h2{margin:3px 0 0;font:26px Georgia,"Songti SC",serif;color:#f1e4c6;letter-spacing:4px}
.item-shop-window header>b{color:#f2d59a;font-size:12px}
.item-shop-window header>button{width:34px;height:34px;border:1px solid #ccd8d155;border-radius:50%;background:#132029d9;color:#f1d394;font-size:23px;line-height:1}
.item-shop-window>p{margin:13px 0;color:#b9c4c0;font-size:11px;line-height:1.6}
.item-search{display:block;width:100%;margin:0 0 11px;padding:10px 12px;border:1px solid #ccd8d144;border-radius:6px;background:#0c151b;color:#f2ead7;font:12px "PingFang SC","Microsoft YaHei",sans-serif;outline:none}
.item-search:focus{border-color:#d9be75aa}
#item-shop-list{display:grid;gap:10px}
.item-shop-card[hidden]{display:none}
.item-shop-card{display:flex;align-items:center;gap:13px;padding:12px;border:1px solid #ccd8d12b;border-radius:8px;background:#0c151ba8}
.item-shop-card>img{width:48px;height:48px;object-fit:contain;image-rendering:auto;border:1px solid #d7c8945c;border-radius:6px;background:#111b22}
.item-shop-copy{display:grid;gap:4px;min-width:0;flex:1}
.item-shop-copy b{font-size:13px;color:#f0e4c7}
.item-shop-copy small{font-size:10px;line-height:1.45;color:#b8c7c4}
.item-shop-card>button{min-width:145px;padding:10px 12px;border:1px solid #d9be755c;border-radius:6px;background:#312c20;color:#f3d893;font-size:11px}
.item-shop-card>button:disabled{border-color:#9fa8a133;background:#1b252a;color:#889595}
@media(max-width:540px){.item-shop-window{padding:16px}.item-shop-window h2{font-size:21px}.item-shop-card{gap:9px;padding:9px}.item-shop-card>img{width:40px;height:40px}.item-shop-card>button{min-width:102px;padding:8px 7px;font-size:9px}.item-shop-copy small{font-size:9px}}

.fruit-choice-window{width:min(720px,92vw);padding:30px;border:1px solid #d7c17a77;border-radius:12px;background:linear-gradient(145deg,#19282fef,#10191fef);box-shadow:0 26px 90px #0009;text-align:center}
.fruit-choice-window>small{color:#e1c37f;font-size:10px;letter-spacing:4px}
.fruit-choice-window h2{margin:8px 0;font:30px Georgia,"Songti SC",serif;letter-spacing:6px;color:#f1e4c6}
.fruit-choice-window p{margin:0 0 18px;color:#b9c4c0;font-size:12px}
.fruit-choice-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.fruit-choice-list button{display:grid;gap:7px;min-height:100px;padding:16px;border:1px solid #b8c8bd55;border-radius:8px;background:linear-gradient(145deg,#324448,#172229);color:#e5e1d2;text-align:left;cursor:pointer}
.fruit-choice-list button:hover{border-color:#e6cc86;background:linear-gradient(145deg,#465b56,#1e3033)}
.fruit-choice-list button:disabled{opacity:.58;cursor:not-allowed}
.fruit-choice-list b{font:18px Georgia,"Songti SC",serif;color:#f1d99b;letter-spacing:2px}
.fruit-choice-list span{font-size:11px;line-height:1.55;color:#bcc9c3}
@media(max-width:540px){.fruit-choice-window{padding:20px 14px}.fruit-choice-window h2{font-size:23px}.fruit-choice-list{grid-template-columns:1fr;gap:7px}.fruit-choice-list button{min-height:74px;padding:11px}.fruit-choice-list b{font-size:15px}.fruit-choice-list span{font-size:10px}}

.skill-icon-wrap{position:relative;display:block;width:38px;height:38px;border:2px solid #c9a65d;border-radius:4px;background:#171a1c;box-shadow:0 0 12px #0009}.skill-icon-wrap img{display:block;width:100%;height:100%;object-fit:cover}.skill-icon-wrap i{position:absolute;right:-6px;bottom:-5px;min-width:16px;height:16px;padding:1px 3px;border:1px solid #e9d69b;border-radius:3px;background:#172128;color:#fff2ca;font:700 9px/12px Georgia,serif;text-align:center;font-style:normal}.hotkey small{color:#e3ba78}.hotkey[title*="尚未接入"]{border-color:#b79a5a88}@media(max-width:700px){.skill-icon-wrap{width:29px;height:29px}.skill-icon-wrap i{min-width:14px;height:14px;font-size:8px;line-height:10px}}
.hero-name{justify-content:flex-start;gap:8px}.hero-name>b{margin-right:auto}.hero-name>.resource-gold,.hero-name>.resource-lumber{flex:none;gap:3px;font-size:10px}.hero-name>.resource-gold img,.hero-name>.resource-lumber img{width:13px;height:13px}@media(max-width:700px){.hero-name{gap:5px}.hero-name>.resource-gold,.hero-name>.resource-lumber{gap:2px;font-size:8px}.hero-name>.resource-gold img,.hero-name>.resource-lumber img{width:11px;height:11px}}
.quest-window{width:min(620px,92vw);max-height:min(80dvh,720px);overflow:auto;padding:24px;border:1px solid #d0bc8266;border-radius:9px;background:linear-gradient(145deg,#1b2b30f5,#10191ff5);box-shadow:0 26px 90px #000b}.quest-window>header{display:flex;align-items:center;justify-content:space-between}.quest-window header small{color:#d8bd7b;font-size:10px;letter-spacing:2px}.quest-window h2{margin:5px 0 0;font:26px Georgia,"Songti SC",serif;color:#f1e4c6;letter-spacing:3px}.quest-window header button{width:34px;height:34px;border:1px solid #cad7cd44;border-radius:50%;background:#162127;color:#e9d49a;font-size:22px;cursor:pointer}.quest-window>p{margin:12px 0;color:#aebdb9;font-size:11px;line-height:1.6}.quest-list{display:grid;gap:8px}.quest-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px;width:100%;min-height:66px;padding:11px 13px;border:1px solid #aebdbd35;border-radius:6px;background:linear-gradient(110deg,#2b3d41,#172329);text-align:left;cursor:pointer}.quest-row:disabled{opacity:.58;cursor:default}.quest-row:not(:disabled):hover{border-color:#e3c47c;background:linear-gradient(110deg,#46544a,#1b2b30)}.quest-row b{display:block;color:#f0dba8;font:16px Georgia,"Songti SC",serif}.quest-row small{display:block;margin-top:5px;color:#b7c5c0;font-size:10px;line-height:1.45}.quest-row em{color:#e2c678;font:12px Georgia,serif;white-space:nowrap;font-style:normal}@media(max-width:540px){.quest-window{padding:18px 13px}.quest-window h2{font-size:21px}.quest-row{padding:9px;gap:6px}.quest-row b{font-size:14px}.quest-row small{font-size:9px}.quest-row em{font-size:10px}}
/* Keep every original-map hero choice reachable on short desktop viewports. */
.hero-select{width:min(980px,94vw);max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain}
.hero-choices{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:700px){.hero-choices{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (min-width:701px) and (max-height:760px){.hero-select{padding:22px}.hero-select h1{font-size:30px;margin:7px 0 5px}.hero-choices{gap:9px;margin:13px 0 10px}.hero-choice{min-height:142px;padding:9px 8px}.hero-choice img{width:72px;height:78px;margin-bottom:5px}.controls-hint{padding-top:9px}}

.map-service-label{position:absolute;z-index:2;transform:translate(-50%,-100%);padding:3px 8px;border:1px solid #d9be7566;border-radius:4px;background:#0c151be0;color:#f3d893;font:bold 11px sans-serif;white-space:nowrap;pointer-events:none}.map-service-label[hidden]{display:none}
/* Original inventory: two columns, three rows, immediately before abilities. */
.inventory-panel{flex:none;width:108px;padding:4px 5px 5px;border:1px solid #baa36670;background:linear-gradient(145deg,#35403ee8,#141c22f2);border-radius:5px}.inventory-panel>small{display:block;margin-bottom:3px;color:#dcc58d;font-size:10px;text-align:center}.inventory-grid{display:grid;grid-template-columns:repeat(2,44px);grid-template-rows:repeat(3,40px);gap:4px;justify-content:center}.inventory-slot{position:relative;width:44px;height:40px;padding:2px;border:2px solid #8a784d;background:linear-gradient(140deg,#131b20,#30362e);border-radius:3px;box-shadow:inset 0 0 8px #000b;cursor:pointer}.inventory-slot img{width:100%;height:100%;object-fit:cover}.inventory-slot:disabled{cursor:default}.inventory-slot:hover{border-color:#f0dba8}.inventory-slot .item-count{position:absolute;right:1px;bottom:0;color:#fff4c7;font:700 10px sans-serif;text-shadow:1px 1px #000,-1px -1px #000}.inventory-slot .item-key{position:absolute;left:2px;top:1px;color:#ffe5a7;font:8px sans-serif;text-shadow:1px 1px #000}.hero-attributes,.hero-combat-stats{display:flex;gap:13px;color:#b8c5c0;font-size:10px;margin-top:6px}.hero-attributes b{color:#e1d092}.hero-combat-stats b{color:#d5dbd0}.population{flex:none;display:grid;gap:5px;padding:8px 12px;border:1px solid #cbb57560;border-radius:7px;background:#17252ae0;color:#f0d797;cursor:pointer}.population small{font-size:9px;color:#c1c9bf}.population>b{font-size:14px}.warehouse-window{width:min(750px,94vw)}.warehouse-summary{display:flex;justify-content:space-between;gap:12px;color:#e5d096;font-size:12px;margin:10px 0}.warehouse-window>.inventory-grid{grid-template-columns:repeat(6,48px);grid-template-rows:44px;justify-content:start;margin:16px 0}.warehouse-window .inventory-slot{width:48px;height:44px}.warehouse-upgrades{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.warehouse-upgrade{display:grid;grid-template-columns:38px 1fr;gap:9px;align-items:center;border:1px solid #ac95635c;border-radius:5px;background:#26363b;padding:10px;color:#e6d3a2;text-align:left;cursor:pointer}.warehouse-upgrade img{width:38px;height:38px}.warehouse-upgrade b{font-size:12px}.warehouse-upgrade small{display:block;margin-top:5px;font-size:10px;color:#bbc9c0;line-height:1.4}.warehouse-upgrade:disabled{opacity:.5;cursor:default}#warehouse-dialog{z-index:9}#warehouse-progress{color:#e4c67c;min-height:18px}.hero-panel{min-height:115px}.hotbar{min-width:0}.hero-skill-slots{max-width:min(570px,calc(100vw - 735px))}#notice{bottom:180px}.hud-top{gap:10px}.hud-top .quest{max-width:340px}.hud-top .quest small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#audio-toggle[aria-pressed=false]{opacity:.5}
@media(max-width:1100px) and (min-width:701px){.hero-panel{width:310px}.hero-skill-slots{max-width:calc(100vw - 630px)}.brand b{font-size:22px}.hud-top .quest{max-width:220px}.population{padding:7px}}
@media(max-width:700px){.hero-panel{min-height:99px;width:calc(100% - 110px)}.hero-attributes,.hero-combat-stats{font-size:9px;gap:9px;margin-top:5px}.bottom-hud .hotbar{display:flex;gap:0}.hotbar>#hero-skill-slots,.hotbar>#potion,.hotbar>#attack{display:none}.inventory-panel{width:100px;padding:3px}.inventory-grid{grid-template-columns:repeat(2,42px);grid-template-rows:repeat(3,33px);gap:3px}.inventory-slot{width:42px;height:33px}.inventory-panel>small{font-size:8px;margin-bottom:2px}.population{padding:5px 7px}.population small{font-size:7px}.population>b{font-size:11px}.hud-top{gap:5px}.hud-top .quest,.hud-top .brand small{display:none}.brand b{font-size:13px}.warehouse-upgrades{grid-template-columns:1fr}.warehouse-window>.inventory-grid{grid-template-columns:repeat(6,42px)}.warehouse-window .inventory-slot{width:42px;height:40px}.joystick{bottom:147px}.mobile-controls>button{bottom:155px}.mobile-controls>#mobile-attack{bottom:128px}#notice{bottom:151px;font-size:9px}}

#warehouse-hero-inventory{grid-template-columns:repeat(6,44px);margin:6px 0 10px}.warehouse-window{max-height:90vh;overflow:auto}.quest-window header{position:sticky;top:-1px;background:#172326;z-index:2}
.warehouse-upgrade em{display:block;margin-top:4px;font:10px sans-serif;color:#dfc278}.warehouse-window>small{font-size:10px;color:#bfc9bb}.warehouse-summary{flex-wrap:wrap}.warehouse-upgrade small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
@media(max-width:480px){.hud-top{flex-wrap:wrap}.brand{flex:1}.hud-top .level{margin-left:auto}.hud-top .hud-button{flex:none;width:31px;height:31px;font-size:14px}.hud-top .population{order:3;margin-left:auto}.hud-top #warehouse,.hud-top #audio-toggle,.hud-top #item-shop,.hud-top #quest-board,.hud-top #help{order:3}.hud-top .location{top:88px}.location,.target-card{top:96px}.warehouse-window{padding:14px 10px}.warehouse-window>.inventory-grid,#warehouse-hero-inventory{grid-template-columns:repeat(6,minmax(0,42px));gap:3px}.warehouse-window .inventory-slot{width:100%}}
@media(max-width:480px){.hud-top .back{flex:none}.hud-top .brand{flex:0 0 calc(100% - 82px);min-width:0}.hud-top .brand b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px;letter-spacing:1px}.hud-top .level{margin-left:0}.hud-top .population{margin-left:auto}}

.native-unit-health{position:absolute;z-index:8;width:58px;height:7px;padding:1px;background:#161e16;border:1px solid #111;box-shadow:0 0 0 1px #c0b397;pointer-events:none;transform:translate(-50%,-100%)}
.native-unit-health i{display:block;height:100%;width:100%;background:#c94d42}
.native-unit-health[hidden],.map-service-label[hidden]{display:none}
.native-hero-choice{font-size:10px;padding:2px 3px}
#target-hp-value{display:block;text-align:center;font-size:11px;color:#ecdfbd}
#original-hero-selection{padding:8px 16px;margin-bottom:12px;background:#243522;border:1px solid #9b875a;color:#ecdcb7;cursor:pointer}
.hero-attributes{flex-wrap:wrap;row-gap:3px}

.return-base{width:48px;flex:none;border-radius:5px;font-size:12px}
.attack-button,.potion{border-radius:3px;background:linear-gradient(145deg,#423d2c,#171c1d);border:2px solid #a88d50}
.attack-button>img,.potion>img{width:44px;height:44px;object-fit:cover;border:1px solid #e1c47e}
#mobile-attack>img{width:38px;height:38px;object-fit:cover;border:1px solid #bd9d58}
@media(max-width:700px){.return-base{width:38px;font-size:10px}.attack-button>img,.potion>img{width:32px;height:32px}}

.native-unit-health{z-index:1}.target-card{z-index:2}
.native-unit-health{width:38px;height:6px}
/* Warcraft command console: minimap, unit panel, six items, command grid. */
.bottom-hud{left:0;right:0;bottom:0;height:190px;display:grid;grid-template-columns:180px minmax(220px,1fr) minmax(480px,1.35fr);align-items:stretch;gap:8px;padding:8px;background:linear-gradient(#403b2e,#1c211e 14%,#111914);border-top:3px ridge #a28b53;box-shadow:0 -4px 12px #0008;pointer-events:auto}
.minimap-panel{position:relative;display:grid;grid-template-rows:1fr 20px;justify-items:center;min-width:0;border:2px ridge #a28b53;background:#111a17;padding:3px}
#minimap{width:100%;height:100%;min-height:0;object-fit:fill;cursor:crosshair;image-rendering:pixelated}
.view-distance-label{display:flex;align-items:center;gap:4px;width:100%;font-size:9px;color:#e3d099;white-space:nowrap}.view-distance-label input{width:100%;min-width:0;accent-color:#c4a35d}.view-distance-label output{font-size:8px}
.hero-panel{width:100%;height:100%;min-height:0;border-radius:0;box-shadow:none;padding:9px;gap:12px;background:linear-gradient(135deg,#27322a,#101816);border:2px ridge #9b8857}.hero-portrait{width:76px;height:95px;border-radius:0}.hero-portrait img{width:70px;height:85px;object-fit:contain}.hero-name>b{font-size:16px}.hero-attributes{gap:8px;line-height:1.5}.hero-combat-stats{gap:12px}.hero-bars{min-width:0}.hero-name{flex-wrap:wrap}.hero-name>b{flex-basis:100%}.bar.hp{height:8px}.bar.mana{height:6px}
.bottom-hud .hotbar{display:grid;grid-template-columns:106px 1fr 56px;gap:7px;align-items:stretch;min-width:0}.inventory-panel{width:106px;padding:4px;border-radius:0;border:2px ridge #9b8857}.inventory-grid{grid-template-columns:repeat(2,44px);grid-template-rows:repeat(3,45px);gap:3px}.inventory-slot{width:44px;height:45px}.inventory-panel>small{margin-bottom:5px}
.command-panel{display:grid;grid-template-rows:15px 1fr;min-width:0;border:2px ridge #9b8857;padding:3px;background:#142019}.command-panel>small{font-size:10px;text-align:center;color:#e0c886}.hero-skill-slots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:65px;gap:3px;max-width:none;overflow:auto;align-items:stretch;padding:0}.hero-skill-slots[hidden],#context-panel[hidden]{display:none}.hero-skill-slot{width:100%;height:65px;min-width:0;padding:3px;border-radius:0}.hero-skill-slot b{font-size:9px;white-space:nowrap}.hero-skill-slot small{font-size:8px}.skill-icon-wrap{width:31px;height:31px}.basic-commands{display:grid;grid-template-rows:1fr 1fr;gap:4px}.basic-commands .potion,.basic-commands .attack-button{width:100%;height:100%;min-width:0;padding:3px;border-radius:0;display:grid;place-items:center}.basic-commands img{width:36px;height:36px}.basic-commands b,.basic-commands small{font-size:9px}
#context-panel{min-height:0;overflow-y:auto}#context-commands{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}#context-commands>button{height:66px;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid #9f8853;background:linear-gradient(#374337,#162019);padding:3px;color:#f0dcac;cursor:pointer}#context-commands img{width:30px;height:30px;object-fit:cover}#context-commands span{font-size:9px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#context-commands small{font-size:8px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#context-commands button:disabled{opacity:.5;cursor:default}
.item-cooldown{position:absolute;inset:0;display:grid;place-items:center;background:conic-gradient(#000b 0deg var(--cooldown),transparent var(--cooldown) 360deg);pointer-events:none;font-style:normal}.item-cooldown span{color:white;font:bold 11px sans-serif;text-shadow:1px 1px 2px #000;background:#0006;padding:1px 2px}
.minimap-panel{min-height:0;grid-template-rows:minmax(0,1fr) 20px}#accept-letter{padding:8px;border:1px solid #b69a59;background:#314331;color:#eddda6;margin-bottom:10px;cursor:pointer}#accept-letter[hidden]{display:none}
.command-heading{display:flex;align-items:center;justify-content:space-between;gap:4px;min-width:0}.command-heading>small{font-size:10px;color:#e0c886;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#command-toggle{font-size:9px;padding:0 5px;line-height:13px;background:#30462e;color:#edd99d;border:1px solid #ac945c;cursor:pointer}#command-toggle[hidden]{display:none}
#notice{bottom:200px}.joystick{bottom:250px}.mobile-controls>button{bottom:270px}.mobile-controls>#mobile-attack{bottom:230px}
@media(min-width:701px) and (max-width:1100px){.bottom-hud{grid-template-columns:145px minmax(200px,1fr) minmax(330px,1.3fr);height:185px;gap:5px;padding:5px}.hero-portrait{width:50px;height:72px}.hero-portrait img{width:45px;height:65px}.hero-panel{gap:6px;padding:6px}.bottom-hud .hotbar{grid-template-columns:100px 1fr 48px;gap:3px}.hero-skill-slots,#context-commands{grid-template-columns:repeat(3,minmax(0,1fr))}.hero-name>b{font-size:13px}}
@media(max-width:700px){.bottom-hud{height:224px;grid-template-columns:100px 1fr;grid-template-rows:90px 116px;gap:4px;padding:5px}.minimap-panel{grid-row:1 / 3}.hero-panel{width:100%;height:90px;min-height:0;padding:4px;gap:6px}.hero-portrait{width:43px;height:58px}.hero-portrait img{width:39px;height:54px}.hero-name>b{font-size:12px}.hero-name{gap:4px;margin:0}.hero-name>b{flex-basis:auto}.hero-attributes,.hero-combat-stats{font-size:8px;gap:6px;margin-top:3px}.bar{margin:3px 0}.xp{margin-top:3px}.bottom-hud .hotbar{grid-column:2;grid-row:2;display:grid;grid-template-columns:65px 1fr;gap:3px}.inventory-panel{width:65px;padding:2px}.inventory-panel>small{font-size:8px;margin:0}.inventory-grid{grid-template-columns:repeat(2,27px);grid-template-rows:repeat(3,29px);gap:2px}.inventory-slot{width:27px;height:29px;padding:0;border-width:1px}.command-panel{padding:2px;grid-template-rows:13px 1fr}.command-panel>small{font-size:8px}.hotbar>#hero-skill-slots{display:grid}.hero-skill-slots,#context-commands{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:44px;gap:2px}.hero-skill-slot,#context-commands>button{height:44px;padding:1px}.skill-icon-wrap{width:22px;height:22px}.hero-skill-slot b,#context-commands span{font-size:7px}.hero-skill-slot small,#context-commands small{font-size:6px}#context-commands img{width:22px;height:22px}.basic-commands{display:none}.view-distance-label{flex-wrap:wrap;font-size:8px;height:25px}.minimap-panel{grid-template-rows:1fr 30px}.view-distance-label input{width:60px}.view-distance-label output{display:none}#notice{bottom:232px}.joystick{bottom:250px;width:85px;height:85px}.mobile-controls>button{bottom:280px;right:20px;width:48px;height:48px}.mobile-controls>#mobile-attack{bottom:244px;right:74px;width:43px;height:43px}.item-cooldown span{font-size:8px}}
@media(max-width:480px){.hud-top #return-base{order:3;width:38px;font-size:10px}}

/* A single Warcraft command card immediately to the right of the six items. */
.bottom-hud .hotbar{grid-template-columns:106px minmax(0,1fr)}
.command-panel{min-height:0;grid-template-rows:15px minmax(0,1fr)}
.command-card{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:48px;gap:3px;overflow:auto;align-content:start;scrollbar-width:thin;scrollbar-color:#b69a5966 #142019}
.command-card .basic-commands,.command-card .hero-skill-slots,.command-card #context-panel,.command-card #context-commands{display:contents}
.command-card .hero-skill-slots[hidden],.command-card #context-panel[hidden]{display:none}
.command-card .hero-skill-slot,.command-card #context-commands>button,.command-card .basic-commands>button{width:100%;height:48px;min-width:0;padding:2px;border-radius:1px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;border:1px solid #9f8853;background:linear-gradient(#374337,#162019);color:#f0dcac;overflow:hidden}
.command-card img,.command-card .skill-icon-wrap{width:27px;height:27px;flex:none}
.command-card b,.command-card #context-commands span{font-size:9px;line-height:11px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.command-card small,.command-card #context-commands small{font-size:8px;line-height:9px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.command-card .basic-commands button:disabled{opacity:.5}
.map-service-label{font-size:9px;font-weight:500;padding:1px 3px;background:#09141066;border:0;border-radius:2px;text-shadow:0 1px 2px #000,1px 0 2px #000}
.hud-top .quest{max-width:270px;padding:6px 10px;background:#11212099;backdrop-filter:blur(4px)}
.hud-top .quest b{font-size:11px}.hud-top .quest small{font-size:9px}
#quest-dialog{z-index:7;display:block;background:transparent;backdrop-filter:none;pointer-events:none}
#quest-dialog.hidden{display:none}
#quest-dialog .quest-window{position:absolute;right:18px;top:172px;width:min(344px,calc(100vw - 24px));max-height:calc(100dvh - 378px);padding:12px;pointer-events:auto;background:linear-gradient(145deg,#1c3233b8,#101b22b0);backdrop-filter:blur(6px);border:1px solid #baa26670;border-radius:6px;box-shadow:0 8px 24px #0004;scrollbar-width:thin;scrollbar-color:#b69a5955 transparent}
#quest-dialog header small{font-size:9px;letter-spacing:1px}
#quest-dialog h2{font-size:17px;letter-spacing:2px;margin-top:3px}
#quest-dialog header button{width:24px;height:24px;font-size:17px;border-radius:4px;background:#15262566}
#quest-dialog .quest-window>p{margin:9px 0;font-size:10px;line-height:1.5;color:#c5d3cc}
#quest-dialog .quest-list{gap:5px}
#quest-dialog .quest-row{position:relative;min-height:49px;padding:7px 8px;gap:7px;border-radius:3px;border-color:#a9c4b02b;background:linear-gradient(90deg,#52665022,#12201b22);overflow:hidden}
#quest-dialog .quest-row:after{content:'';position:absolute;left:0;bottom:0;width:var(--quest-progress,0%);height:2px;background:#bfc184aa}
#quest-dialog .quest-row:disabled{opacity:.8}
#quest-dialog .quest-row:not(:disabled):hover{border-color:#d7bd7688;background:#546d4344}
#quest-dialog .quest-row b{font-size:12px;line-height:15px;letter-spacing:.5px}
#quest-dialog .quest-row small{font-size:9px;line-height:13px;margin-top:3px;color:#b7c7bd}
#quest-dialog .quest-row em{font:9px sans-serif;color:#d9c48b}
@media(min-width:701px) and (max-width:1100px){.bottom-hud .hotbar{grid-template-columns:100px minmax(0,1fr)}.command-card{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.bottom-hud .hotbar{grid-template-columns:65px minmax(0,1fr)}.command-card{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:43px;gap:2px}.command-card .hero-skill-slot,.command-card #context-commands>button,.command-card .basic-commands>button{height:43px;padding:1px}.command-card img,.command-card .skill-icon-wrap{width:22px;height:22px}.command-card b,.command-card #context-commands span{font-size:7px;line-height:10px}.command-card small,.command-card #context-commands small{font-size:6px;line-height:8px}.map-service-label{font-size:8px}#quest-dialog .quest-window{top:108px;right:10px;max-height:calc(100dvh - 348px);width:min(310px,calc(100vw - 20px));padding:10px}}
.command-card .hero-skill-slot,.command-card #context-commands>button,.command-card .basic-commands>button{padding:1px}
.command-card img,.command-card .skill-icon-wrap{width:24px;height:24px}
.command-card b,.command-card small,.command-card #context-commands span,.command-card #context-commands small{flex:none}
@media(max-width:700px){.command-card img,.command-card .skill-icon-wrap{width:21px;height:21px}#quest-dialog .quest-window{max-height:min(360px,calc(100dvh - 348px));background:linear-gradient(145deg,#1c3233a8,#101b229a)}}

/* Task dock follows the right menu on both wrapped and desktop layouts. */
#quest-dialog .quest-window{top:var(--quest-dock-top,76px);width:min(260px,calc(100vw - 24px));padding:8px;max-height:calc(100dvh - var(--quest-dock-top,76px) - 230px)}
#quest-dialog .quest-window header small{display:none}#quest-dialog h2{font-size:13px;margin:0;letter-spacing:1px}
#quest-dialog .quest-window>p{font-size:8px;margin:6px 0;line-height:1.4}
#quest-dialog.collapsed .quest-list,#quest-dialog.collapsed .quest-window>p{display:none}
#quest-dialog .quest-row{min-height:37px;padding:4px 5px;gap:4px}
#quest-dialog .quest-row button{background:transparent;border:0;color:#e5d39d;cursor:pointer;text-align:left;padding:0;font-size:9px}
#quest-dialog .quest-row .quest-name{min-width:0}#quest-dialog .quest-row b{font-size:10px;line-height:13px}#quest-dialog .quest-row small{font-size:8px;line-height:11px;margin-top:1px}
#quest-dialog .quest-row .quest-accept{font-size:8px;text-align:right;white-space:nowrap}#quest-dialog .quest-accept:disabled{opacity:.65;cursor:default}
#quest-dialog .quest-name:hover b{color:#fff3c7;text-decoration:underline}
@media(max-width:700px){#quest-dialog .quest-window{width:222px;top:var(--quest-dock-top,108px);right:10px;padding:7px;max-height:calc(100dvh - var(--quest-dock-top,108px) - 230px)}}

/* Full command labels and a transparent task heading. */
.hud-top .hud-button{flex:0 0 auto;width:auto;min-width:52px;height:36px;padding:0 10px;border-radius:5px;font-size:12px;white-space:nowrap;background:#132029a6;backdrop-filter:blur(4px)}
#quest-dialog .quest-window>header{background:transparent;position:relative;top:auto;padding:0 0 3px}
@media(max-width:1100px){.hud-top{flex-wrap:wrap;gap:5px}.hud-top .brand{min-width:0;flex:1}.hud-top .quest{display:none}.hud-top .hud-button{min-width:46px;padding:0 7px;font-size:11px}}
@media(max-width:480px){.hud-top .hud-button,.hud-top #return-base{order:3;width:auto;min-width:44px;height:30px;font-size:11px;padding:0 7px}.hud-top .population{margin-left:0}.hud-top .brand{flex-basis:calc(100% - 82px)}}

.bar {position:relative}.bar>span {position:absolute;inset:0;text-align:center;font-size:11px;line-height:16px;color:#fff;text-shadow:0 1px 2px #000;pointer-events:none}.hero-portrait{cursor:pointer}.ground-item-name{position:fixed;transform:translate(-50%,-100%);z-index:3;padding:2px 5px;border-radius:3px;background:#14202688;color:#fff0b9;font-size:11px;white-space:nowrap;pointer-events:none;text-shadow:0 1px #000}.inventory-drag-ghost{position:fixed;width:42px;height:42px;z-index:100;pointer-events:none;opacity:.85;transform:translate(-50%,-50%)}

.bar.hp,.bar.mana{height:16px}.necklace-window{width:min(560px,94vw);padding:22px;background:#15232bea;border:1px solid #c8b57b66;border-radius:8px;max-height:80vh;overflow:auto}.necklace-window>h2{color:#eed39b}.necklace-window>p{font-size:12px;line-height:1.8}.necklace-window>button{float:right}.necklace-window img{width:32px;height:32px}.necklace-window header{display:flex;justify-content:space-between;align-items:center}@media(max-width:700px){.bar.hp,.bar.mana{height:12px}.bar>span{font-size:9px;line-height:12px}}

.ground-item-name{pointer-events:auto;cursor:pointer;user-select:none}
/* Native HumanUITile01–04, stitched without replacing the original stone artwork. */
:root{--native-hud-height:clamp(190px,16.2vw,340px)}
.bottom-hud.native-console{position:absolute;inset:auto 0 0;height:var(--native-hud-height);width:100%;padding:0;gap:0;display:block;border:0;border-radius:0;background:url('./assets/art/chaoyue-map/console/HumanConsole.png') center/100% 100% no-repeat;box-shadow:none;font-family:Georgia,"Songti SC","SimSun",serif;color:#f5eeca;z-index:5}
.native-console .minimap-panel{position:absolute;left:1%;top:8.5%;width:17.8%;height:86.5%;padding:0;border:0;background:#020505;border-radius:0;box-shadow:none}
.native-console #minimap{width:100%;height:100%;display:block;border:0;border-radius:0;image-rendering:auto}
.minimap-tools{position:absolute;left:19.35%;top:10%;width:3%;height:86%;display:grid;grid-template-rows:repeat(4,1fr) 1.2fr;gap:3px}
.minimap-tools button{padding:0;border:2px solid #aa8935;border-radius:0;background:#080804;cursor:pointer;min-height:0;width:100%;box-shadow:inset 0 0 3px #dbb13d}.minimap-tools button img{display:block;width:100%;height:100%;object-fit:fill}
.minimap-tools .view-distance-label{display:flex;flex-direction:column;justify-content:center;gap:1px;font-size:clamp(8px,.75vw,12px);text-align:center;color:#e6d281;background:#151514d9;padding:2px;width:100%;margin:0}.minimap-tools input{width:100%;min-width:0;height:7px;margin:2px 0}.minimap-tools output{font-size:9px}
.native-console .hero-panel,.native-console .hotbar,.native-console .hero-bars{display:contents}
.native-console .hero-portrait{position:absolute;left:26.55%;top:23%;width:10.5%;height:77%;padding:0;border:0;box-shadow:none;border-radius:40% 40% 0 0;overflow:hidden;background:#460606;cursor:pointer}
.native-console .hero-portrait>img{display:block;width:100%;height:77%;object-fit:cover;object-position:50% 20%;border:0;border-radius:0}
.native-console .bar{position:absolute;left:0;width:100%;height:11.5%;border:1px solid #99802e;background:#020202;padding:0;margin:0;border-radius:0;box-shadow:none;font-size:clamp(10px,1.15vw,20px);line-height:1}
.native-console .bar.hp{bottom:11.5%}.native-console .bar.mana{bottom:0}.native-console .bar>i{opacity:.14;height:100%;display:block}.native-console .bar>span{position:absolute;inset:0;display:grid;place-items:center;text-shadow:1px 1px #000;white-space:nowrap;font-variant-numeric:tabular-nums}.native-console .hp span{color:#a5e142}.native-console .mana span{color:#f0f0e8}
.native-console .hero-name{position:absolute;left:38%;top:24%;width:24%;height:10%;margin:0;display:grid;place-items:center;line-height:1;color:#eee5d1;font-size:clamp(12px,1.5vw,26px);letter-spacing:1px}.native-console .hero-name>b{margin:0;font:inherit}
.native-console .xp{position:absolute;left:39.2%;top:37%;width:22.8%;height:10.5%;margin:0;border:1px solid #af9547;border-radius:0;background:#070704;overflow:hidden}.native-console .xp>i{background:linear-gradient(#a816af,#45064d);display:block;height:100%}.native-console .xp>span{position:absolute;inset:0;text-align:center;align-content:center;color:#e7e2cc;font-size:clamp(8px,.95vw,16px);text-shadow:1px 1px #000}
.native-console .hero-combat-stats{position:absolute;left:39.2%;top:50%;width:13%;height:39%;display:grid;grid-template-rows:1fr 1fr;gap:5px;margin:0;font-size:clamp(10px,1.05vw,19px);color:#d6bf64}.native-console .hero-combat-stats>span{display:flex;align-items:center;gap:9px;min-height:0}.native-console .hero-combat-stats img{height:100%;max-width:36%;object-fit:contain;image-rendering:auto}.native-console .hero-combat-stats b{display:block;font-weight:400;color:#f4edda;white-space:nowrap;font-size:clamp(9px,1.05vw,18px);line-height:1.5}
.native-console .hero-attributes{position:absolute;left:54.8%;top:50%;width:7.2%;height:39%;display:grid;grid-template-rows:repeat(3,1fr);gap:0;margin:0;line-height:1;font-size:clamp(9px,.95vw,17px);color:#d6bf64}.native-console .hero-attributes>img{position:absolute;right:108%;top:25%;height:45%;width:70%;object-fit:contain}.native-console .hero-attributes b{display:block;font-weight:400;color:#eee4cd;line-height:1.3}
.hero-status-label{position:absolute;left:39.3%;top:92%;font-size:clamp(8px,.85vw,15px);color:#c7beaa}.hero-status-label>span{margin-left:8px;font-size:.85em;color:#b29e62}#hero-status{position:absolute;left:45%;top:90%;width:16%;height:9%;display:flex;gap:3px;align-items:center;overflow:hidden}
.native-console .inventory-panel{position:absolute;left:64.1%;top:18%;width:9.8%;height:80.5%;padding:0;border:0;border-radius:0;background:none;box-shadow:none}.native-console .inventory-panel>small{height:12%;margin:0;display:grid;place-items:center;color:#d7bb52;font:clamp(10px,1.05vw,20px) Georgia,"Songti SC",serif}.native-console #hero-inventory{height:87%;width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:5% 6%;padding:1.5% 1%;justify-content:stretch}
.native-console .inventory-slot{width:100%;height:100%;padding:1px;border:1px solid #9d7a20;border-radius:0;background:#010404;box-shadow:inset 0 0 0 1px #34342a;min-width:0;min-height:0}.native-console .inventory-slot img{display:block;object-fit:fill;width:100%;height:100%;border:0}.native-console .inventory-slot:hover{outline:1px solid #f0dc86}.native-console .item-key{display:none}.native-console .item-count{right:0;bottom:0;min-width:21%;padding:0 3px;background:#050505c9;border:1px solid #b8a16d;color:#edece3;font:clamp(9px,1vw,16px) Georgia,serif}.native-console .item-cooldown span{font-size:clamp(10px,1.1vw,18px)}
.native-console .command-panel{position:absolute;left:76.6%;top:20%;width:22.35%;height:78%;padding:0;border:0;border-radius:0;background:#010202;box-shadow:none}.native-console .command-heading{position:absolute;bottom:102%;right:0;height:12%;display:flex;align-items:center;gap:4px;margin:0;background:#101513bb;border:1px solid #a48c4d;padding:0 5px;font-size:clamp(8px,.85vw,13px)}.native-console .command-heading small{font:inherit;color:#decc8a}.native-console .command-heading button{height:100%;min-width:23px;padding:0 4px;border:0;border-left:1px solid #806b3d;background:#1b251e;color:#e6d497;border-radius:0;font-size:inherit;cursor:pointer}
.native-console .command-card{display:grid;width:100%;height:100%;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:3%;padding:1.5%;overflow:visible}.native-console .basic-commands,.native-console #hero-skill-slots,.native-console #context-panel,.native-console #context-commands{display:contents;max-width:none;max-height:none;overflow:visible}
.native-console [hidden]{display:none!important}.native-console .command-card button,.native-console .command-card .hero-skill-slot{position:relative;display:block;width:100%;height:100%;min-width:0;min-height:0;margin:0;padding:3%;border:2px solid #777a70;border-radius:0;background:#030706;box-shadow:inset 0 0 0 1px #242a27;overflow:hidden;cursor:pointer}
.native-console .command-card button:hover{border-color:#ecdc99}.native-console .command-card .selected{border-color:#aad4b9;box-shadow:0 0 4px #8cd4b7,inset 0 0 0 1px #344a39}.native-console .command-card button:disabled{opacity:.7;cursor:default}.native-console .command-card button>img,.native-console .skill-icon-wrap,.native-console .skill-icon-wrap>img{display:block;width:100%;height:100%;padding:0;object-fit:fill;border:0;border-radius:0;box-shadow:none;background:none}.native-console .command-card button>b,.native-console .command-card button>small,.native-console .command-card button>span:not(.skill-icon-wrap),.native-console .hero-skill-slot>b,.native-console .hero-skill-slot>small{display:none}.native-console .command-card i,.native-console .skill-icon-wrap i{position:absolute;right:1%;bottom:1%;left:auto;top:auto;width:auto;height:auto;min-width:20%;font:clamp(9px,1vw,16px)/1 Georgia,serif;color:#ece8d5;border:1px solid #b0a27c;background:#030403d0;border-radius:0;padding:1px 3px;font-style:normal;text-align:center}.native-console .passive-skill-slot{cursor:default}.native-console .command-card .cooldown-overlay{position:absolute;inset:4%;display:grid;place-items:center;background:conic-gradient(#030b15bb var(--cooldown),transparent 0);color:white;font:clamp(12px,1.3vw,22px) Georgia,serif;text-shadow:1px 1px #000;pointer-events:none}.native-console .command-card .cooldown-overlay[hidden]{display:none}
#hero-status .hero-skill-slot{position:relative;width:auto;height:100%;aspect-ratio:1;display:block;padding:0;min-width:0;flex:none;border:1px solid #8e7845}#hero-status .skill-icon-wrap{width:100%;height:100%;border:0}#hero-status b,#hero-status small,#hero-status i{display:none}
.native-resources{display:flex;gap:9px;margin-left:auto;align-items:center}.native-resources>span{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:86px;height:34px;padding:3px 9px;border:1px solid #88753c;background:#060906cc;color:#ede8d0;font:16px Georgia,serif}.native-resources img{width:22px;height:22px;object-fit:contain}.hud-top .population{background:#080d0bcc;border:1px solid #88753c;border-radius:0}.hud-top .brand b{font-size:18px}.hud-top .quest{max-width:240px}.hud-top{gap:6px}.hud-top .hud-button{flex:none;width:auto;min-width:43px;font-size:12px;padding:0 7px}
#notice{bottom:calc(var(--native-hud-height) + 12px)}
@media(max-width:900px){.native-resources{gap:3px}.native-resources>span{min-width:60px;font-size:12px;padding:2px 4px;gap:4px}.native-resources img{width:17px;height:17px}.hud-top .brand{display:none}.hud-top .quest{max-width:190px}.native-console .hero-combat-stats>span{gap:4px}.native-console .command-heading{font-size:8px}}
@media(max-width:700px){:root{--native-hud-height:clamp(140px,30dvh,190px)}.native-console .hero-portrait{left:23%;width:12%;height:72%;top:28%}.native-console .hero-name{font-size:12px}.native-console .hero-combat-stats{font-size:8px}.native-console .hero-combat-stats b{font-size:8px}.native-console .hero-attributes{font-size:8px}.native-console .bar{font-size:8px}.hero-status-label{font-size:7px}.native-console .command-heading small{max-width:50px;overflow:hidden;white-space:nowrap}.native-console .command-card i{font-size:8px}.mobile-controls{display:none}.hud-top .quest,.hud-top .level{display:none}.hud-top .hud-button{font-size:10px;padding:0 4px;min-width:30px}.native-resources>span{height:26px;min-width:50px;font-size:10px}.native-console .minimap-tools{gap:1px}.native-console .view-distance-label{font-size:7px}.native-console .view-distance-label output{font-size:7px}}
.native-console .command-panel{display:block!important;max-height:none;min-height:0}.native-console .command-card{max-height:none!important;min-height:0;flex:none;height:100%!important;align-items:stretch;align-content:stretch}.native-console .hero-name{text-align:center}.native-console:before{content:"";position:absolute;left:37.65%;top:31%;width:25%;height:69%;background:#010101;border-radius:38% 38% 0 0;pointer-events:none}.native-console .hero-name,.native-console .xp,.native-console .hero-combat-stats,.native-console .hero-attributes,.native-console .hero-status-label,.native-console #hero-status{z-index:1}
.native-empty-command{border:2px solid #484f4c;background:#010302;min-height:0;min-width:0;pointer-events:none;z-index:0;box-shadow:inset 0 0 0 1px #1a2320}.native-console .command-card button,.native-console .command-card .hero-skill-slot{z-index:1}.native-console .hero-portrait>img{image-rendering:auto}.native-console .hero-name b{width:100%;text-align:center}
.native-console .command-card #context-commands>button{height:100%;width:100%;display:block;padding:3%;min-height:0;border:2px solid #777a70}.native-console .command-card #context-commands>button img{width:100%;height:100%;object-fit:fill}.native-console .command-card button>.cooldown-overlay{display:grid}.native-console .command-card button>.cooldown-overlay[hidden]{display:none!important}.native-console .command-card .potion .potion-count{position:absolute;display:block;right:1%;bottom:1%;min-width:20%;padding:0 3px;border:1px solid #b0a27c;color:#eee8da;background:#030403d0;font:clamp(9px,1vw,16px) Georgia,serif}.native-console .command-card .potion>.cooldown-overlay{inset:4%}
.native-console .hero-portrait{display:block}.native-console .minimap-panel #minimap{max-width:none;max-height:none;height:100%;width:100%}.native-console .command-card #context-commands button>img{width:100%;height:100%;max-width:none;max-height:none;object-fit:fill}.native-console .command-card #context-commands button>span,.native-console .command-card #context-commands button>small{display:none}.native-console .minimap-tools button[aria-pressed=false]{filter:brightness(.55)}
.native-console .native-portrait-canvas{position:absolute;left:0;top:0;width:100%;height:77%;display:block;z-index:1;background:#4a0202}.native-console .native-portrait-canvas[hidden]{display:none}.native-console .hero-portrait .bar{z-index:2}.native-console .hero-name{justify-content:center;justify-items:center;align-content:center}.native-console .hero-name>b{margin:0!important;text-align:center;font-weight:400}
/* Preserve usable touch targets when the original wide console is shown on a phone. */
@media(max-width:700px){:root{--native-hud-height:290px}.native-console:before{left:46%;top:7%;width:52%;height:32%;border-radius:0}.native-console .minimap-panel{left:2%;top:5%;width:21%;height:30%}.native-console .minimap-tools{left:24%;top:5%;width:5%;height:32%;gap:1px}.native-console .hero-portrait{left:31%;top:6%;width:14%;height:32%}.native-console .hero-name{left:46%;top:5%;width:52%;height:8%}.native-console .xp{left:47%;top:14%;width:50%;height:7%}.native-console .hero-combat-stats{left:47%;top:23%;width:29%;height:15%;gap:1px;font-size:9px}.native-console .hero-attributes{left:81%;top:23%;width:17%;height:15%;font-size:8px}.native-console .hero-attributes>img{display:none}.native-console .hero-status-label{left:47%;top:39%;font-size:8px}.native-console #hero-status{left:72%;top:38%;width:25%;height:5%}.native-console .inventory-panel{left:2%;top:43%;width:30%;height:55%}.native-console .inventory-panel>small{height:10%;font-size:10px}.native-console #hero-inventory{height:90%;gap:3%}.native-console .command-panel{left:36%;top:47%;width:62%;height:51%}.native-console .command-heading{height:10%;font-size:9px}.native-console .command-card{gap:3%;padding:1%}.native-console .command-card i,.native-console .item-count{font-size:9px}.native-console .bar{font-size:7px}.native-console .bar>span{line-height:1}.mobile-controls{display:block}.joystick{bottom:calc(var(--native-hud-height) + 18px);width:68px;height:68px}.mobile-controls>button{bottom:calc(var(--native-hud-height) + 55px);width:40px;height:40px}.mobile-controls>#mobile-attack{bottom:calc(var(--native-hud-height) + 10px);width:40px;height:40px}#notice{bottom:calc(var(--native-hud-height) + 8px)}}

.native-console .hero-attributes>span{min-height:0}.native-console .hero-attributes{font-size:clamp(8px,.8vw,15px)}.native-console .hero-attributes b{line-height:1.05}@media(max-width:700px){.native-console .hero-attributes{font-size:8px}}
.native-console .minimap-panel{display:block}

#potion[hidden]{display:none!important}.native-console .inventory-slot:disabled{opacity:1;background:#010404}

/* Native Warcraft numerals and compact independent right panels. */
@font-face{font-family:WarcraftFriz;src:url('./assets/characters/war3-original/Fonts/FRIZQT__.TTF') format('truetype');font-display:swap}
.native-resources span,.native-resources b,.population>b{font-family:WarcraftFriz,Georgia,serif;font-weight:400;font-variant-numeric:tabular-nums;letter-spacing:.4px;text-shadow:1px 1px 1px #000}
.native-resources b{font-size:17px}
.battle-summary{position:absolute;z-index:7;right:18px;top:var(--battle-dock-top,76px);width:min(260px,calc(100vw - 24px));padding:8px;border:1px solid #baa26670;border-radius:5px;background:linear-gradient(145deg,#1c3233b8,#101b22b0);backdrop-filter:blur(6px);color:#e5d39d;box-shadow:0 6px 18px #0003;font-size:10px}
.battle-summary header{display:flex;align-items:center;gap:5px}.battle-summary header>b{margin-right:auto;font-size:12px;font-weight:400}.battle-summary button{width:22px;height:22px;background:#15262566;border:1px solid #baa26644;color:#e5d39d;border-radius:3px;cursor:pointer}.battle-summary dl{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:8px 0}.battle-summary dl>div{display:flex;justify-content:space-between;gap:4px}.battle-summary dt{color:#b1c4bd}.battle-summary dd{margin:0;font-variant-numeric:tabular-nums}.battle-summary p{margin:0;padding-top:6px;border-top:1px solid #baa26633;color:#9dce9b}.battle-summary .reviving{color:#ffbe8a}.battle-summary.collapsed dl{display:none}.battle-summary.collapsed p:not(.reviving){display:none}.battle-summary.hidden{display:none}
#warehouse-dialog{z-index:9}#technology-dialog{z-index:10}.warehouse-window{width:min(450px,94vw);background:linear-gradient(145deg,#18252df5,#0a1219f5);border-color:#ae935b}.technology-window{width:min(620px,94vw);background:linear-gradient(145deg,#18252df5,#0a1219f5);border-color:#ae935b}
.warehouse-toolbar{display:flex;gap:8px;margin:12px 0}.warehouse-toolbar button{padding:7px 10px;background:#162327;border:1px solid #927b48;color:#e3d09a;cursor:pointer;border-radius:3px;font-size:12px}.warehouse-toolbar button:hover{background:#2c3f39}.warehouse-storage{display:grid;grid-template-columns:1fr 24px 1fr;gap:10px;align-items:center}.warehouse-storage>section{padding:10px;background:#0003;border:1px solid #a98e4844;border-radius:4px}.warehouse-storage h3{font-size:13px;font-weight:400;margin:0 0 5px;color:#e5d39d}.warehouse-storage small{display:block;font-size:9px;line-height:1.5;color:#adbbb4;min-height:28px}.warehouse-storage .inventory-grid{margin-top:9px;grid-template-columns:repeat(2,48px);grid-template-rows:repeat(3,44px)}.storage-arrow{color:#b49e62;text-align:center}.warehouse-window>p{font-size:11px;color:#b7c7bd}.technology-window .warehouse-upgrade{background:#1a2b2dbb}.technology-window .warehouse-upgrade em{display:block;font-size:10px;font-style:normal;color:#d6c183;margin-top:5px}
@media(max-width:700px){.battle-summary{right:10px;width:222px;padding:7px;font-size:9px}.warehouse-storage{gap:6px;grid-template-columns:1fr 15px 1fr}.warehouse-storage>section{padding:6px}.warehouse-toolbar button{font-size:11px}}

.battle-summary dl{grid-template-columns:repeat(2,1fr)}

#warehouse-dialog .warehouse-storage{grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr)}
#warehouse-dialog .warehouse-storage>section{min-width:0}
#warehouse-dialog #warehouse-hero-inventory,#warehouse-dialog #warehouse-inventory{grid-template-columns:repeat(2,48px);grid-template-rows:repeat(3,44px);justify-content:center;margin:9px 0 0;gap:4px}
@media(max-width:480px){#warehouse-dialog .warehouse-storage{grid-template-columns:minmax(0,1fr) 15px minmax(0,1fr)}#warehouse-dialog #warehouse-hero-inventory,#warehouse-dialog #warehouse-inventory{grid-template-columns:repeat(2,44px);grid-template-rows:repeat(3,40px)}#warehouse-dialog .inventory-slot{width:44px;height:40px}}

/* Keep cooldown masks above the icons; the native label reset hid these spans. */
.native-console .command-card button>span.cooldown-overlay:not(.skill-icon-wrap){display:grid;z-index:3;inset:3%;font-weight:bold;background:conic-gradient(#020408dc var(--cooldown),#02040825 0);text-shadow:0 1px 3px #000,1px 0 #000}
.native-console .command-card button>span.cooldown-overlay[hidden]{display:none!important}
.equipment-bonus,.native-console b .equipment-bonus{color:#6cef65;font:inherit;white-space:nowrap}
.native-console .hero-combat-stats b{white-space:normal;font-size:clamp(9px,.9vw,16px)}
.native-console .hero-combat-stats>span>span{min-width:0}
.native-console .hero-attributes>img{width:34%;height:35%;right:104%;top:32%}
.battle-summary dt{display:flex;align-items:center;gap:4px}
.battle-summary dt img{width:18px;height:18px;object-fit:contain;flex:none}
#mobile-menu-toggle,#mobile-hero-info{display:none}
#hero-overhead-level{position:absolute;z-index:2;transform:translate(-50%,-100%);padding:2px 5px;border:1px solid #c5a55285;background:#111b24aa;color:#f7df9c;font:12px WarcraftFriz,"Songti SC",serif;pointer-events:none;white-space:nowrap}
#hero-overhead-level[hidden],#necklace-shortcut[hidden],#nearby-shop-entry[hidden],#mobile-hero-info[hidden]{display:none!important}
#necklace-shortcut{position:absolute;z-index:6;left:max(20px,env(safe-area-inset-left));top:154px;width:46px;height:46px;padding:3px;border:1px solid #bd9d4e;background:#0d161edc;border-radius:4px;cursor:pointer}
#necklace-shortcut img{width:100%;height:100%;object-fit:cover}
#necklace-points{position:absolute;right:-5px;top:-6px;min-width:16px;background:#183b22;color:#9cf0a6;font-size:10px;border-radius:8px}
#necklace-points:empty{display:none}
#nearby-shop-entry{display:none}
#hero-attributes-dialog{z-index:10}
.veil[aria-modal="true"]{z-index:20!important}
.hero-details-window{width:min(360px,92vw);max-height:calc(100dvh - 24px);overflow:auto;padding:18px;background:#142025eb;backdrop-filter:blur(8px)}
.hero-details-window>header{background:none;top:0}.hero-details-window h2{font-size:19px}
.hero-details-window header button{width:32px;height:32px}
.hero-details-window dl{display:grid;gap:0;margin:8px 0 16px;font-size:13px}
.hero-details-window dl>div{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid #b3c6bc22}
.hero-details-window dd{margin:0;color:#ede3c9}.hero-details-window dt{color:#abbeb6}
#hero-details-focus{width:100%;padding:10px;border:1px solid #ba9e5e75;border-radius:4px;background:#243d3c;color:#eddaa5;cursor:pointer}
.necklace-growth{display:block;color:#e2ce8e}.necklace-growth progress{display:block;width:100%;height:8px;margin:9px 0 12px;accent-color:#74b9a3}.necklace-bonuses{display:block;line-height:1.7;color:#c1d8c8}

/* Phone HUD also applies to touch devices whose landscape width exceeds 700px. */
body.mobile-rpg{--native-hud-height:calc(150px + env(safe-area-inset-bottom));--mobile-left:max(8px,env(safe-area-inset-left));--mobile-right:max(8px,env(safe-area-inset-right))}
.mobile-rpg .hud-top{z-index:8;left:var(--mobile-left);right:var(--mobile-right);top:max(5px,env(safe-area-inset-top));display:flex;gap:5px;flex-wrap:nowrap;align-items:center;min-height:34px;padding:0;background:none}
.mobile-rpg .hud-top .brand,.mobile-rpg .hud-top .quest,.mobile-rpg .hud-top .level,.mobile-rpg .hud-top .back{display:none}
.mobile-rpg .hud-top .native-resources{margin:0;flex:1;justify-content:flex-start;gap:4px}
.mobile-rpg .native-resources>span{height:30px;min-width:0;padding:2px 5px;gap:3px;font:13px WarcraftFriz,Georgia,serif}
.mobile-rpg .native-resources img{width:17px;height:17px}
.mobile-rpg .native-resources b{font:clamp(10px,2.8vw,12px) WarcraftFriz,Georgia,serif;white-space:nowrap}
.mobile-rpg .hud-top .population{order:0;padding:3px 5px;height:32px;margin:0;gap:0;min-width:57px}
.mobile-rpg .hud-top .population small{font-size:8px;letter-spacing:0}.mobile-rpg .hud-top .population>b{font-size:11px}
.mobile-rpg .hud-top .hud-button{order:0;min-width:42px;width:auto;height:32px;padding:0 8px;font-size:11px;border-radius:4px}
.mobile-rpg #mobile-menu-toggle{display:block}
.mobile-rpg .hud-top :is(#summon-warehouse,#battle-show,#warehouse,#audio-toggle,#effects-toggle,#item-shop,#quest-board,#help){display:none;order:2}
.mobile-rpg.mobile-menu-open .hud-top{flex-wrap:wrap;padding-bottom:5px;background:#13212bea;border:1px solid #b8a36a55;border-radius:5px}
.mobile-rpg.mobile-menu-open .hud-top :is(#summon-warehouse,#battle-show,#warehouse,#audio-toggle,#effects-toggle,#item-shop,#quest-board,#help){display:block}
.mobile-rpg #mobile-hero-info{display:flex;position:absolute;z-index:6;left:var(--mobile-left);top:calc(max(5px,env(safe-area-inset-top)) + 38px);width:170px;height:55px;align-items:center;gap:7px;padding:5px;border:1px solid #b7a06755;border-radius:5px;background:#101d27b8;text-align:left;cursor:pointer}
.mobile-rpg #mobile-hero-info img{width:39px;height:43px;object-fit:cover;border:1px solid #a99562}
.mobile-rpg #mobile-hero-info span{min-width:0}.mobile-rpg #mobile-hero-info b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;color:#ead59e}
.mobile-rpg #mobile-hero-info small{display:block;font-size:8px;white-space:nowrap;color:#bdd3c5;margin:3px 0}
.mobile-rpg #mobile-hero-info em{font-size:9px;font-style:normal;color:#dfc894}
.mobile-rpg .location{top:calc(max(5px,env(safe-area-inset-top)) + 97px);left:var(--mobile-left);max-width:180px;padding:3px 5px;gap:4px;font-size:8px;letter-spacing:0;pointer-events:none}
.mobile-rpg .target-card{display:none}
.mobile-rpg .battle-summary{right:var(--mobile-right);width:168px;font-size:9px;background:#101d2790;border-color:#aa976752;max-height:max(32px,calc(100dvh - var(--native-hud-height) - var(--battle-dock-top) - 122px));overflow:auto}
.mobile-rpg .battle-summary dt img{width:14px;height:14px}.mobile-rpg .battle-summary dl{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
.mobile-rpg #quest-dialog .quest-window{right:var(--mobile-right);width:168px;padding:5px;max-height:min(220px,calc(100dvh - var(--quest-dock-top) - var(--native-hud-height) - 96px));background:#101d2790;border-color:#aa976752}
.mobile-rpg #quest-dialog .quest-window>p,.mobile-rpg #quest-dialog .quest-name small{display:none}
.mobile-rpg #quest-dialog .quest-window>header{position:sticky;top:-5px;background:#11232be0;z-index:2;padding:3px 0}
.mobile-rpg #quest-dialog h2{font-size:11px;letter-spacing:0}.mobile-rpg #quest-dialog .quest-row{min-height:29px;padding:3px;grid-template-columns:minmax(0,1fr) auto}
.mobile-rpg #quest-dialog .quest-row b{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.mobile-rpg #quest-dialog .quest-accept{font-size:9px;max-width:74px;white-space:normal}.mobile-rpg #quest-dialog .quest-list{gap:3px}
.mobile-rpg .bottom-hud.native-console{height:var(--native-hud-height);inset:auto 0 0;width:100%;background:linear-gradient(0deg,#09131eef,#15273394 85%,transparent);border-top:1px solid #b3a27133;font-family:"PingFang SC","Microsoft YaHei",sans-serif}
.mobile-rpg .native-console:before,.mobile-rpg .native-console .hero-panel,.mobile-rpg .native-console .command-heading,.mobile-rpg .native-console .basic-commands,.mobile-rpg .native-console .native-empty-command,.mobile-rpg .native-console .minimap-tools{display:none!important}
.mobile-rpg .native-console .minimap-panel{left:var(--mobile-left);top:auto;bottom:calc(8px + env(safe-area-inset-bottom));width:62px;height:62px;padding:2px;border:1px solid #ac986255;background:#0a1318}
.mobile-rpg .native-console .inventory-panel{left:calc(var(--mobile-left) + 69px);top:auto;bottom:calc(7px + env(safe-area-inset-bottom));width:88px;height:133px;padding:0;background:none}
.mobile-rpg .native-console .inventory-panel>small{height:12px;font:9px "PingFang SC",sans-serif;margin:0;color:#c2b690}
.mobile-rpg .native-console #hero-inventory{height:120px;padding:0;gap:3px;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr))}
.mobile-rpg .native-console .inventory-slot{padding:2px;border-radius:3px;border-width:1px;border-color:#796f50}
.mobile-rpg .native-console .command-panel{left:calc(var(--mobile-left) + 166px);right:var(--mobile-right);top:auto;bottom:calc(8px + env(safe-area-inset-bottom));width:auto;height:calc(var(--mobile-skill-rows,2)*48px + (var(--mobile-skill-rows,2) - 1)*4px);background:none}
.mobile-rpg .native-console .command-card{display:block;padding:0;gap:0}
.mobile-rpg .native-console #hero-skill-slots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(var(--mobile-skill-rows,2),minmax(0,1fr));gap:4px;width:100%;height:100%}
.mobile-rpg .native-console #hero-skill-slots .hero-skill-slot{grid-column:auto!important;grid-row:auto!important;border:1px solid #ac9860;border-radius:5px;padding:2px;height:100%;width:100%;background:#0c1822}
.mobile-rpg .native-console .command-card i{font:10px Georgia,serif;z-index:2}
.mobile-rpg .native-console .command-card .cooldown-overlay{font:18px Georgia,serif}
.mobile-rpg .mobile-controls{display:block;position:absolute;inset:0;z-index:6;pointer-events:none}
.mobile-rpg .mobile-controls .joystick,.mobile-rpg .mobile-controls>button{position:absolute;touch-action:none}
.mobile-rpg .joystick{border:1px solid #ddc39355;border-radius:50%;background:#10223166}
.mobile-rpg .joystick i{position:absolute;inset:15%;border:1px solid #d2bc8855;border-radius:50%}
.mobile-rpg .joystick b{position:absolute;left:50%;top:50%;width:40%;height:40%;margin:-20% 0 0 -20%;border:1px solid #eed59b77;border-radius:50%;background:linear-gradient(145deg,#eadca6,#8f9b94);pointer-events:none}
.mobile-rpg .mobile-controls>button{padding:4px;border:1px solid #ddc39399;border-radius:50%;background:#162e32cf;color:#ecd5a1}
.mobile-rpg #mobile-attack img{width:100%;height:100%;object-fit:contain;border-radius:50%}
.mobile-rpg .joystick{left:var(--mobile-left);bottom:calc(var(--native-hud-height) + 13px);width:70px;height:70px;pointer-events:auto}
.mobile-rpg .mobile-controls #mobile-skill{display:none}
.mobile-rpg .mobile-controls #mobile-attack{right:var(--mobile-right);bottom:calc(var(--native-hud-height) + 13px);width:54px;height:54px;pointer-events:auto}
.mobile-rpg #nearby-shop-entry{display:block;position:absolute;z-index:6;left:50%;transform:translateX(-50%);bottom:calc(var(--native-hud-height) + 20px);max-width:calc(100vw - 180px);padding:10px 16px;border:1px solid #d2b467aa;border-radius:18px;background:#142d2bea;color:#ffe1a0;font-size:12px;cursor:pointer}
.mobile-rpg #necklace-shortcut{left:var(--mobile-left);top:calc(max(5px,env(safe-area-inset-top)) + 126px);width:39px;height:39px}
.mobile-rpg #notice{bottom:calc(var(--native-hud-height) + 94px);max-width:calc(100vw - 30px);padding:5px 9px;font-size:10px;white-space:normal;text-align:center;pointer-events:none;z-index:6}
.mobile-rpg .item-shop-window{width:min(620px,94vw);max-height:calc(100dvh - 20px);padding:12px;overflow:auto}
.mobile-rpg .item-shop-window>p{display:none}.mobile-rpg .item-shop-window h2{font-size:17px}.mobile-rpg .item-shop-window header{gap:7px}.mobile-rpg #shop-gold{font-size:9px}
.mobile-rpg .item-shop-window>header{display:grid;grid-template-columns:minmax(0,1fr) 32px;align-items:center}.mobile-rpg .item-shop-window header small{display:none}.mobile-rpg #shop-gold{grid-column:1/-1;grid-row:2}.mobile-rpg #item-shop-close{grid-column:2;grid-row:1;width:32px;height:32px}
.mobile-rpg .item-shop-card{grid-template-columns:34px minmax(0,1fr) auto;padding:8px;gap:7px}.mobile-rpg .item-shop-card>img{width:34px;height:34px}.mobile-rpg .item-shop-copy b{font-size:12px}.mobile-rpg .item-shop-copy small{font-size:9px}.mobile-rpg .item-shop-copy small:first-of-type{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.mobile-rpg .item-shop-card>button{max-width:95px;min-height:34px;padding:5px;font-size:10px}
.mobile-rpg .hero-select{max-height:calc(100dvh - 16px);padding:16px}.mobile-rpg .hero-choices{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
@media(orientation:landscape){
  body.mobile-rpg{--native-hud-height:calc(108px + env(safe-area-inset-bottom))}
  .mobile-rpg .native-console .minimap-panel{width:80px;height:80px}
  .mobile-rpg .native-console .inventory-panel{left:calc(var(--mobile-left) + 96px);height:98px;width:137px}
  .mobile-rpg .native-console #hero-inventory{height:86px;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}
  .mobile-rpg .native-console .command-panel{left:auto;width:clamp(230px,34vw,360px);height:calc(var(--mobile-skill-rows,2)*44px + (var(--mobile-skill-rows,2) - 1)*4px)}
  .mobile-rpg #quest-dialog .quest-window{max-height:max(32px,min(145px,calc(100dvh - var(--quest-dock-top) - var(--native-hud-height) - 82px)))}
  .mobile-rpg .hero-choices{grid-template-columns:repeat(5,minmax(0,1fr))}
  .mobile-rpg .hero-details-window dl{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px}
}
@media(max-width:359px) and (orientation:portrait){.mobile-rpg .native-console .minimap-panel{width:47px;height:47px}.mobile-rpg .native-console .inventory-panel{left:calc(var(--mobile-left) + 52px);width:79px}.mobile-rpg .native-console .command-panel{left:calc(var(--mobile-left) + 138px)}.mobile-rpg #mobile-hero-info{width:148px}.mobile-rpg .battle-summary,.mobile-rpg #quest-dialog .quest-window{width:153px}.mobile-rpg .native-resources>span{font-size:11px}.mobile-rpg .hud-top .hud-button{padding:0 6px;min-width:37px}}
@media(max-width:359px) and (orientation:portrait){.mobile-rpg .native-resources b{font-size:9px;letter-spacing:0}.mobile-rpg .native-resources img{width:12px;height:12px}.mobile-rpg .native-resources>span{padding:2px 3px;gap:2px}.mobile-rpg .hud-top .population{min-width:48px;padding:3px}.mobile-rpg .population small{font-size:7px}}

/* Keep the original five orders and 4 × 3 command card on phones as well. */
.mobile-rpg .native-console .basic-commands{display:contents!important}
.mobile-rpg .native-console .native-empty-command{display:block!important;background:#060d15;border:1px solid #484d4d;border-radius:2px;min-width:0;min-height:0}
.mobile-rpg .native-console .command-panel{height:133px}
.mobile-rpg .native-console .command-card{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:3px;width:100%;height:100%;padding:0}
.mobile-rpg .native-console #hero-skill-slots{display:contents}
.mobile-rpg .native-console #hero-skill-slots .hero-skill-slot,.mobile-rpg .native-console .basic-commands button{position:relative;grid-column:var(--command-column)!important;grid-row:var(--command-row)!important;min-width:0;min-height:0;width:100%;height:100%;padding:2px;border-radius:2px;border:1px solid #ac9860;background:#0c1822}
/* Inline native positions are authoritative; undo the former mobile auto-flow. */
.mobile-rpg .native-console #hero-skill-slots .hero-skill-slot[style]{grid-column:var(--command-column)!important;grid-row:var(--command-row)!important}
.mobile-rpg .native-console .command-card .skill-icon-wrap,.mobile-rpg .native-console .basic-commands img{width:100%;height:100%;display:block;object-fit:contain}
@media(orientation:landscape){body.mobile-rpg{--native-hud-height:calc(141px + env(safe-area-inset-bottom))}.mobile-rpg .native-console .command-panel{height:123px;width:165px}}
.hero-details-window dt{display:flex;align-items:center;gap:7px}
.hero-details-window dt img{width:28px;height:28px;object-fit:contain;border:1px solid #a88f54;background:#101820}
.hero-details-window [data-primary="true"]{color:#efcf79;background:#c6a75913}
.hero-details-window [data-primary="true"] dt:after{content:"主属性";font-size:9px;border:1px solid #a68d54;border-radius:2px;padding:1px 3px;white-space:nowrap}
#hero-details-primary{display:flex;align-items:center;gap:8px;color:#ecd18a;margin:8px 0;font-size:12px}
#hero-details-primary img{width:32px;height:32px;object-fit:contain}
.mobile-rpg .hero-details-window dl>div{min-height:38px}
#world{cursor:url('./assets/art/chaoyue-map/console/HumanCursorNormal.png') 6 2,default}
#rpg,#rpg button,#rpg select,#rpg summary{cursor:url('./assets/art/chaoyue-map/console/HumanCursorNormal.png') 6 2,default}

/* Small inventory actions remain separate from combat orders. */
.inventory-tools{position:absolute;left:2%;top:-32px;display:flex;gap:4px;pointer-events:auto}
.inventory-tools button{height:25px;padding:0 7px;font-size:10px;border:1px solid #a28b59;border-radius:3px;color:#ddcda8;background:#0d1b23e8}
.inventory-tools button[aria-pressed="true"]{border-color:#aaad69;color:#cfe6b3}
#unequip-item[aria-pressed="true"]{background:#543b1be8;color:#ffe0a0}
#auto-pickup[aria-pressed="false"]{color:#d5a699;border-color:#80665b}
.inventory-tools button:disabled{opacity:.5}
#hero-inventory.unequip-selecting .occupied{outline:1px solid #e6b35f;box-shadow:inset 0 0 6px #bb6b2455}
.native-console .basic-commands[hidden]{display:none!important}
.attack-stat-icon{position:relative;display:block;height:100%;aspect-ratio:1;width:auto;max-width:36%;flex:none}
.native-console .attack-stat-icon img{width:100%;height:100%;max-width:none}
#hero-attack-level{position:absolute;right:3.125%;bottom:3.125%;width:43.75%;height:40.625%;display:grid;place-items:center;padding:0;background:none;border:0;font:clamp(9px,.8vw,14px)/1 Arial,sans-serif;color:#f0e7d1;text-align:center}
.native-console .hero-name,.native-console .xp,.native-console .hero-combat-stats,.native-console .hero-attributes,.native-console .hero-status-label,.native-console #hero-status,.hero-details-window,.hero-details-window button{font-family:Arial,"PingFang SC",sans-serif;font-weight:500;font-variant-numeric:tabular-nums;letter-spacing:0}
.summon-controls{padding:8px;border:1px solid #af9b4c55;background:#07141280;margin:8px 0;color:#dccd99;font-size:12px}.summon-controls summary{cursor:pointer}.summon-controls small{display:block;color:#b6c3b6;font-size:10px;line-height:1.5;margin-top:4px}#summon-recipes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin:6px 0}.summon-controls button{padding:6px;border:1px solid #ac97534d;color:#e1d5ac;background:#182b29;text-align:left;font:12px Arial,"PingFang SC",sans-serif;cursor:pointer}.summon-controls button:disabled{opacity:.45;cursor:default}#companion-skills{margin:8px 0}.mobile-rpg .summon-controls{padding:5px;font-size:11px}
.native-console .bar{font-family:Arial,"PingFang SC",sans-serif;font-size:clamp(10px,.95vw,16px);font-weight:500;letter-spacing:0;font-variant-numeric:tabular-nums;line-height:1.2}
.native-console .bar>i{opacity:.65}
.hp i{background:linear-gradient(90deg,#168d24,#50c944);box-shadow:none}
.mana i{background:linear-gradient(90deg,#164db4,#3589e0)}
.native-console .hp span{color:#d2f6ba}.native-console .mana span{color:#c9e4ff}
.native-unit-health[data-friendly-health="hero"]{height:12px;width:54px}
.native-unit-health[data-friendly-health="base"]{width:72px}
.native-unit-health[data-friendly-health="hero"]>i:first-child{height:4px}
.native-unit-health .friendly-mana{height:3px;margin-top:2px;background:#347bea}
.mobile-rpg .inventory-tools{left:var(--mobile-left);top:auto;bottom:calc(79px + env(safe-area-inset-bottom));width:62px;display:grid;gap:4px}
.mobile-rpg .inventory-tools button{width:100%;height:25px;padding:0 2px;font-size:9px}
.mobile-rpg .item-shop-window{width:min(630px,calc(100vw - 16px));max-height:calc(100dvh - 16px);padding:10px;overflow:auto}
.mobile-rpg .item-shop-window>header{padding-bottom:6px;row-gap:2px}
.mobile-rpg #item-search{height:28px;padding:4px 8px;margin:6px 0;font-size:11px}
.mobile-rpg #item-shop-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.mobile-rpg .compact-shop-card{display:grid;position:relative;grid-template-columns:28px minmax(0,1fr);gap:2px 5px;padding:4px;min-height:62px;border-radius:3px;align-items:start}
.mobile-rpg .compact-shop-card>img{width:28px;height:28px;grid-column:1;grid-row:1}
.mobile-rpg .compact-shop-card .item-shop-copy{min-width:0;grid-column:2;grid-row:1;gap:0}
.mobile-rpg .compact-shop-card .item-shop-copy b{font-size:10px;line-height:14px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.mobile-rpg .compact-shop-card .item-shop-copy small{display:block;font-size:9px;line-height:13px;white-space:nowrap;letter-spacing:0}
.mobile-rpg .compact-shop-card>button{grid-column:2;grid-row:2;justify-self:end;min-width:44px;min-height:24px;padding:3px 6px;font-size:10px;max-width:100%;border-radius:3px}
.mobile-rpg .compact-shop-card>details{grid-column:1/-1;grid-row:2;align-self:center;font-size:9px;color:#c4c9b7;pointer-events:none}
.mobile-rpg .compact-shop-card>details>summary{width:max-content;max-width:calc(100% - 50px);cursor:pointer;pointer-events:auto}
.mobile-rpg .compact-shop-card>details[open]{grid-row:3;pointer-events:auto}
.mobile-rpg .compact-shop-card details p{margin:5px 0 0;color:#cbd5cd;line-height:1.5;font-size:10px}
@media(orientation:landscape){.mobile-rpg .inventory-tools{bottom:calc(97px + env(safe-area-inset-bottom));width:80px;display:flex;gap:3px}.mobile-rpg .inventory-tools button{height:25px;width:auto;padding:0 5px}.mobile-rpg #item-shop-list{grid-template-columns:repeat(4,minmax(0,1fr))}.mobile-rpg .compact-shop-card{min-height:66px}}
@media(max-width:359px) and (orientation:portrait){.mobile-rpg .inventory-tools{width:47px;bottom:calc(64px + env(safe-area-inset-bottom))}.mobile-rpg .inventory-tools button{font-size:8px}}
/* Native equipment pairs: purchasing stays left, upgrading the same chain stays right. */
.mobile-rpg #item-shop-list.paired-equipment-shop{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.shop-pair-heading{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;text-align:center;color:#d9c891;font-size:11px;gap:5px}
.mobile-rpg .paired-equipment-shop .compact-shop-card{min-height:62px}
#mobile-hero-info #mobile-hero-vitals{display:grid;gap:2px;width:100%}
#mobile-hero-info .mobile-vital{position:relative;display:block;height:10px;width:100%;overflow:hidden;border:1px solid #181c18;background:#070b09;border-radius:0}
#mobile-hero-info .mobile-vital i{position:absolute;inset:0 auto 0 0;display:block;height:100%;transition:width .1s linear}
#mobile-hero-info .mobile-vital.hp i{background:linear-gradient(#37c849,#07991c)}
#mobile-hero-info .mobile-vital.mana i{background:linear-gradient(#397cfd,#0c39d7)}
#mobile-hero-info .mobile-vital small{position:relative;display:block!important;text-align:center;font:8px/8px Arial,sans-serif!important;color:#fff!important;text-shadow:0 1px 2px #000;white-space:nowrap}
#mobile-hero-info>span{flex:1;min-width:0}
.quest-row.quest-ready{border-color:#5ba45e;background:linear-gradient(90deg,#17402c9c,#08170c66)}
.quest-row.quest-ready .quest-name b,.quest-row.quest-ready .quest-accept{color:#7aee7f}
#original-hidden-entries{display:flex;flex-wrap:wrap;gap:4px;padding:4px 0 7px;border-bottom:1px solid #ad94513d}
#original-hidden-entries button{padding:4px 6px;min-height:25px;font-size:10px;color:#dbcc94;background:#161b2180;border:1px solid #7d6b45;border-radius:3px}
#original-hidden-entries button:disabled{color:#79c683;opacity:.75}
#original-hidden-entries small{width:100%;font-size:9px;color:#c8b686}
#quest-dialog.collapsed #original-hidden-entries{display:none}
.original-quiz-window{max-width:min(430px,calc(100vw - 24px));width:430px;max-height:calc(100dvh - 24px);overflow:auto;padding:12px;background:#0e1620ed}
.original-quiz-window h3{font-size:16px;color:#eadcaf;line-height:1.5;margin:12px 0}
#original-quiz-status{font-size:11px;color:#b3bea8;line-height:1.4}
#original-quiz-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#original-quiz-options button{min-height:44px;white-space:normal;text-align:left;padding:8px;color:#e9e1be;background:#283b4099;border:1px solid #938052}
#original-chat{position:absolute;bottom:calc(var(--native-console-height,180px) + 12px);left:22px;z-index:100;display:flex;align-items:center;gap:8px;background:#10151de8;border:1px solid #88703e;padding:7px 10px;max-width:calc(100% - 44px);color:#ead49c;font-size:13px}
#original-chat[hidden]{display:none}
#original-chat-input{width:min(360px,70vw);background:#0008;border:1px solid #555d60;color:#eee;padding:7px;font-size:13px}
.mobile-rpg #original-hidden-entries{padding:3px 0;gap:3px}
.mobile-rpg #original-hidden-entries button{font-size:9px;padding:3px 4px;min-height:25px}
@media(max-height:500px){.original-quiz-window h3{font-size:13px;margin:8px 0}.original-quiz-window{padding:8px}#original-quiz-options{gap:4px}#original-quiz-options button{min-height:32px;padding:5px;font-size:12px}}
#mobile-hero-info .mobile-vital small{position:absolute;inset:0;margin:0!important;height:8px;line-height:8px!important}
.mobile-rpg #original-hidden-entries{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
.mobile-rpg #original-hidden-entries button{flex-shrink:0}
.mobile-rpg #original-hidden-entries small{width:auto;flex-shrink:0;align-self:center}
@media(orientation:landscape) and (max-height:520px){
  .mobile-rpg .paired-equipment-shop .compact-shop-card{min-height:44px;grid-template-columns:20px minmax(0,1fr) 44px;padding:3px;gap:2px 4px}
  .mobile-rpg .paired-equipment-shop .compact-shop-card>img{width:20px;height:20px}
  .mobile-rpg .paired-equipment-shop .item-shop-copy b{font-size:9px;line-height:11px}
  .mobile-rpg .paired-equipment-shop .item-shop-copy small{font-size:8px;line-height:9px}
  .mobile-rpg .paired-equipment-shop .compact-shop-card>button{grid-column:3;grid-row:1/span 2;height:34px;min-height:34px;padding:1px 5px;font-size:9px}
  .mobile-rpg .paired-equipment-shop .compact-shop-card>details{grid-column:2;grid-row:2;line-height:11px}
  .mobile-rpg .paired-equipment-shop .compact-shop-card>details>summary{max-width:100%}
  .mobile-rpg .paired-equipment-shop .compact-shop-card>details[open]{grid-column:1/-1;grid-row:3}
}
.mobile-rpg #mobile-hero-info{height:60px}
@media(orientation:landscape) and (max-height:520px){.mobile-rpg #quest-dialog .quest-window{max-height:max(32px,min(190px,calc(100dvh - var(--quest-dock-top) - var(--native-hud-height) - 8px)))}}

.summon-combat-status{margin-top:6px;padding-top:5px;border-top:1px solid #ac97532d}.summon-reviving{color:#7de7ce!important}
.summon-orders{display:flex;align-items:center;gap:5px;margin:3px 0;font-size:11px}.summon-orders span{flex:1;min-width:0;color:#b7c5cd}.summon-orders button{padding:3px 6px!important;flex:none!important;white-space:nowrap;font-size:11px!important}.summon-orders button[aria-pressed=true]{color:#99e6a0;border-color:#6b9972}

.summon-spell-icon{width:22px;height:22px;vertical-align:middle;margin-right:5px;border:1px solid #a68d4c}
.summon-learning{border-top:1px solid #af9b4c55;padding-top:6px;margin-top:6px}.summon-learn-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-top:5px}.summon-learn-grid>div{min-width:0}.summon-learn-grid button{width:100%;min-height:34px;margin-bottom:3px;position:relative}.summon-learn-grid [data-summon-spell]{display:flex;align-items:center;background:linear-gradient(to right,#080b0dcc var(--summon-cool),transparent var(--summon-cool)),#182b29}.summon-learn-grid small{margin:0}.summon-learn-grid [data-summon-learn]{font-size:10px;min-height:28px}.mobile-rpg .summon-learn-grid button{padding:4px}
.companion-learning>b{display:block;margin-bottom:4px}.companion-learning .companion-skill{display:flex;align-items:center;gap:4px;min-height:40px;box-sizing:border-box;padding:4px;background:linear-gradient(to right,#080b0dcc var(--summon-cool),transparent var(--summon-cool)),#182b29;border:1px solid #ac97534d;font-size:12px}.companion-learning .companion-skill span{min-width:0}.companion-learning .summon-spell-icon{flex-shrink:0}

@media(max-width:960px) and (max-height:500px){
  .mobile-rpg .warehouse-window{padding:8px 12px}
  .mobile-rpg .warehouse-window header small{display:none}
  .mobile-rpg .warehouse-window h2{font-size:17px;letter-spacing:1px;margin:0}
  .mobile-rpg .warehouse-window header button{width:28px;height:28px;font-size:20px}
  .mobile-rpg .warehouse-toolbar{margin:6px 0;gap:6px}
  .mobile-rpg .warehouse-toolbar button{padding:5px 7px;font-size:11px}
  .mobile-rpg .warehouse-window>p{margin:6px 0}
  .mobile-rpg .guardian-skills{margin-top:4px;padding-top:4px}
  .mobile-rpg .guardian-skills .summon-learn-grid{gap:3px;margin-top:3px}
  .mobile-rpg .guardian-skills .summon-learn-grid button{min-height:34px;margin-bottom:0}
}
:root { --assistant-accent: #c2a760; }
.assistant-actions { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.assistant-actions button { padding:9px 12px; border:1px solid #857452; color:#f1dfb5; background:#232a28; cursor:pointer; }
.assistant-actions button:disabled { opacity:.4; cursor:default; }
.assistant-window { max-width:760px; }
.assistant-god-shop { border:1px solid #85745266; padding:10px; margin:12px 0; color:#e6d8b5; font-size:12px; }
.assistant-god-shop summary { cursor:pointer; }
.assistant-god-shop p { font-size:11px; line-height:1.5; color:#b9c7bf; }
#assistant-shop-recipes { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
#assistant-shop-recipes button { min-width:0; padding:9px 7px; border:1px solid #857452; background:#232a28; color:#f1dfb5; font-size:11px; cursor:pointer; }
#assistant-shop-recipes button small { display:block; margin-top:4px; color:#b4c5bb; }
#assistant-shop-recipes button:disabled { opacity:.45; cursor:default; }
.assistant-window h3 { color:var(--assistant-accent); }
.castle-status.hidden { display:none; }
.castle-status { position:fixed; left:50%; top:86px; transform:translateX(-50%); z-index:8; max-width:70vw; padding:8px 14px; color:#ffe5a6; background:#201a16df; border:1px solid #a18450; font-size:13px; pointer-events:none; text-align:center; }
@media(max-width:700px) { .castle-status { top:95px; max-width:92vw; font-size:11px; } .assistant-window .warehouse-storage { display:flex; flex-direction:column; gap:12px; } .assistant-actions button { flex:1 0 29%; font-size:12px; } .assistant-window .storage-arrow { display:none; } }

#effects-toggle{width:64px;border-radius:5px;font-size:11px;white-space:nowrap}#effects-toggle[aria-pressed=false]{color:#b8c3c3;border-color:#7e929455}

#pause-clock { top:132px; font-variant-numeric:tabular-nums; }
@media(max-width:700px) { #pause-clock { top:132px; } }
.difficulty-choice{display:flex;align-items:center;justify-content:center;gap:12px;font-size:13px;color:#ead6a9}.difficulty-choice select{max-width:100%;padding:8px 12px;background:#17252a;color:#f3d89c;border:1px solid #907748;border-radius:4px}#difficulty-description{min-height:20px;margin:8px 0;color:#bed0c7}#endgame-status{top:164px;max-width:min(540px,calc(100vw - 40px));font-size:11px;letter-spacing:0;line-height:1.6;z-index:3;white-space:normal}#ending-panel{position:absolute;z-index:12;top:12%;left:50%;transform:translateX(-50%);width:min(680px,94vw);padding:18px 22px;text-align:center;background:#0d141be8;border:1px solid #b09353;color:#ead8a1}#ending-panel p{line-height:1.8;color:#f7efda}#ending-panel button,#temple-later{padding:7px 14px;background:#253833;border:1px solid #a08a55;color:#ead8a1;cursor:pointer}#temple-choice-dialog .fruit-choice-window{max-height:90dvh;overflow:auto}#temple-choices button{font-size:12px;line-height:1.6}@media(max-width:700px){.difficulty-choice{font-size:11px;gap:8px}.difficulty-choice select{font-size:11px}#endgame-status{top:164px;left:10px;max-width:calc(100vw - 20px);padding:5px 8px;font-size:9px}#ending-panel{top:12%;padding:10px;font-size:11px}}
#endgame-status.hidden,#ending-panel.hidden{display:none}
#endgame-status button{margin-left:12px;background:#253833;border:1px solid #a08a55;color:#ead8a1;cursor:pointer;padding:3px 8px}
#ending-panel{top:auto;bottom:calc(var(--native-hud-height) + 10px);padding:9px 14px;font-size:12px}#ending-panel p{margin:5px 0}.mobile-rpg #ending-panel{bottom:calc(var(--native-hud-height) + 6px);font-size:10px;padding:7px}
#choose-hero{z-index:21}
.loading{z-index:30}
/* Compact assistant: two six-slot bags, common actions, optional destinations. */
.assistant-window{width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:18px 20px;border-radius:8px;background:#111c22f5;box-shadow:0 18px 70px #0008}
.assistant-window header{align-items:center}.assistant-window header small{font-size:10px;letter-spacing:1px;color:#9cadad}.assistant-window h2{font-size:22px;margin:4px 0}.assistant-window #assistant-status{font-size:12px;color:#afc5b8;margin:10px 0 16px}
.assistant-window .warehouse-storage{display:grid;grid-template-columns:minmax(0,1fr) 18px minmax(0,1fr);gap:12px;padding:14px 0;border-top:1px solid #9bafa626;border-bottom:1px solid #9bafa626}
.assistant-window .warehouse-storage section{min-width:0}.assistant-window h3{font-size:12px;margin:0 0 5px;color:#e0cf9d}.assistant-window .warehouse-storage small{font-size:10px;color:#8da2a6}.assistant-window .storage-arrow{align-self:center;color:#7c9292;font-size:17px}
.assistant-window .inventory-grid{grid-template-columns:repeat(3,minmax(0,48px));grid-template-rows:repeat(2,46px);justify-content:start;margin-top:10px;gap:5px}.assistant-window .inventory-slot{width:100%;height:46px;border-width:1px;border-color:#77816d;border-radius:3px;background:#0a1218;box-shadow:none}
.assistant-actions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin:14px 0}.assistant-actions button,.assistant-destinations button{min-height:38px;padding:6px 4px;border:1px solid #506361;background:#1c2a2e;color:#dfebdf;border-radius:4px;font-size:12px}.assistant-actions button.active{border-color:#b9a16a;background:#394439;color:#ffe7ad}.assistant-actions button:hover,.assistant-destinations button:hover{border-color:#b9a16a}
.assistant-advanced{border-top:1px solid #9bafa626;padding:10px 0;color:#9bafad;font-size:12px}.assistant-advanced summary{cursor:pointer}.assistant-destinations{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:12px 0}.assistant-advanced p{font-size:11px;line-height:1.5}.assistant-hint{display:block;color:#80969c;font-size:10px;line-height:1.7}
#return-base img{display:none}
.mobile-rpg .hud-top :is(#camera-lock,#assistant-open){display:none;order:2}.mobile-rpg.mobile-menu-open .hud-top :is(#camera-lock,#assistant-open){display:block}
.mobile-rpg #return-base{position:fixed;z-index:10;left:calc(var(--mobile-left) + 5px);top:calc(max(5px,env(safe-area-inset-top)) + 103px);width:39px;height:39px;min-width:39px;padding:2px;border:1px solid #b7a06788;background:#101d27e8;border-radius:4px}
.mobile-rpg #return-base img{display:block;width:100%;height:100%;object-fit:contain}.mobile-rpg #return-base span{display:none}.mobile-rpg #return-base::after{content:'回城';position:absolute;bottom:1px;left:0;right:0;color:#fff1c8;font-size:9px;line-height:11px;text-shadow:0 1px 2px #000}
@media(max-width:700px){.assistant-window{padding:14px;max-height:calc(100dvh - 16px)}.assistant-window .warehouse-storage{display:grid;grid-template-columns:minmax(0,1fr) 12px minmax(0,1fr);gap:8px}.assistant-window .storage-arrow{display:block}.assistant-window .inventory-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,42px);gap:4px}.assistant-window .inventory-slot{height:42px}.assistant-actions button{font-size:11px;min-height:38px}.assistant-window .warehouse-storage small{font-size:9px}.assistant-window #assistant-status{margin-bottom:10px}}
@media(orientation:landscape) and (max-height:520px){
 .mobile-rpg .assistant-window{width:min(640px,calc(100vw - 24px));padding:10px 14px}
 .mobile-rpg .assistant-window h2{font-size:18px;margin:2px 0}.mobile-rpg .assistant-window header small{font-size:9px}
 .mobile-rpg .assistant-window #assistant-status{margin:7px 0;font-size:11px}
 .mobile-rpg .assistant-window .warehouse-storage{padding:9px 0;gap:10px;grid-template-columns:minmax(0,1fr) 18px minmax(0,1fr)}
 .mobile-rpg .assistant-window .inventory-grid{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:36px;margin-top:7px;gap:4px}.mobile-rpg .assistant-window .inventory-slot{height:36px}
 .mobile-rpg .assistant-window h3{margin-bottom:3px}.mobile-rpg .assistant-window .warehouse-storage small{font-size:9px}
 .mobile-rpg .assistant-actions{margin:9px 0}.mobile-rpg .assistant-actions button{min-height:34px}
 .mobile-rpg .assistant-advanced{padding:8px 0}
}

/* Shared portrait shortcuts never overlap, including both mobile orientations. */
.mobile-rpg #necklace-shortcut{left:calc(var(--mobile-left) + 5px);top:calc(max(5px,env(safe-area-inset-top)) + 148px)}
#unit-control[hidden]{display:none!important}
#unit-control{position:absolute;z-index:12;left:18px;bottom:calc(var(--native-hud-height,220px) + 14px);width:258px;padding:10px;border:1px solid #bda77288;border-radius:7px;background:#102126f2;box-shadow:0 7px 26px #0007}
#unit-control header{display:flex;align-items:center;justify-content:space-between;gap:8px}#unit-control header b{color:#f3d99b;font-size:13px}#unit-control-close{border:0;background:none;font-size:21px;color:#d7d3c6;cursor:pointer}
#unit-control-status{display:block;margin:3px 0 8px;color:#b8cac6;font-size:10px}
#unit-control-inventory{display:grid;grid-template-columns:repeat(6,1fr);gap:3px;margin-bottom:7px}#unit-control-inventory:empty{display:none}#unit-control-inventory button{height:33px;min-width:0;padding:2px;border:1px solid #afa17a88;background:#0a171b;position:relative}#unit-control-inventory img{width:100%;height:100%;object-fit:contain}#unit-control-inventory small{position:absolute;bottom:0;right:1px;color:#ffe094;font-size:10px;text-shadow:0 1px #000}
#unit-control-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}#unit-control-actions button{padding:7px 2px;min-height:32px;background:#1c3337;border:1px solid #ac987955;border-radius:3px;color:#ece4cb;font-size:11px;cursor:pointer}#unit-control-actions button:disabled{opacity:.4;cursor:default}
#item-upgrade-target-dialog .quest-window{width:min(410px,94vw);padding:16px;max-height:calc(100dvh - 20px);overflow:auto;background:#112328f5}#item-upgrade-target-dialog p{font-size:12px;color:#c0ceca}#item-upgrade-target-list img{width:32px;height:32px;object-fit:contain}#item-upgrade-target-list{grid-template-columns:1fr;gap:8px}#item-upgrade-target-list button{display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:12px;min-height:64px;padding:12px;text-align:left}#item-upgrade-target-list button>b{font:14px/1.5 "PingFang SC","Microsoft YaHei",sans-serif;color:#f0d8a3}#item-upgrade-target-list button>span{white-space:nowrap;font-size:12px;color:#badbc6}
.mobile-rpg #unit-control{left:var(--mobile-left);bottom:calc(var(--native-hud-height) + 92px);width:min(246px,calc(100vw - 24px));padding:8px}
@media(max-height:520px){.mobile-rpg #unit-control{left:calc(var(--mobile-left) + 82px);bottom:calc(var(--native-hud-height) + 8px);width:246px;padding:6px}.mobile-rpg #unit-control-actions button{min-height:26px;padding:4px 2px}.mobile-rpg #unit-control-status{margin:0 0 4px}.mobile-rpg #unit-control-inventory button{height:28px}}

/* Original resource icons and direct unit shortcuts. */
.population{display:flex;align-items:center;gap:6px}.population>img{width:25px;height:25px;object-fit:contain}.population>span{display:grid;gap:2px}.population>span>b{font-size:17px}
#unit-shortcuts{position:absolute;z-index:10;left:20px;right:auto;bottom:calc(var(--native-hud-height,326px) + 14px);display:flex;flex-direction:column;gap:6px}
body:not(.mobile-rpg) #unit-control{left:80px}
#unit-shortcuts[hidden]{display:none}#unit-shortcuts button{position:relative;width:43px;height:43px;padding:3px;border:1px solid #c4a96399;border-radius:4px;background:#112128e8;cursor:pointer}#unit-shortcuts img{display:block;width:100%;height:100%;object-fit:contain}#unit-shortcuts span{position:absolute;left:0;right:0;bottom:1px;font-size:9px;text-shadow:0 1px 2px #000;background:#0005}
body:not(.mobile-rpg) #return-base{position:fixed;left:24px;top:136px;min-width:43px;width:43px;height:43px;padding:3px;z-index:10}body:not(.mobile-rpg) #return-base img{display:block;width:100%;height:100%;object-fit:contain}body:not(.mobile-rpg) #return-base span{position:absolute;bottom:1px;left:0;right:0;font-size:9px;text-shadow:0 1px 2px #000}
body:not(.mobile-rpg) #necklace-shortcut{left:24px;top:185px;width:43px;height:43px}body:not(.mobile-rpg) #quest-dialog .quest-window{right:79px}
.travel-map-window{width:min(560px,calc(100vw - 20px));max-height:calc(100dvh - 20px);padding:12px;overflow:auto}.travel-map-window p{font-size:12px;margin:8px 0}.travel-map-window>small{font-size:10px;color:#c9c1a5}#travel-map{display:block;width:min(100%,calc(100dvh - 150px));height:auto;aspect-ratio:1;margin:0 auto 8px;image-rendering:auto;touch-action:manipulation;border:1px solid #c5ae76}
#shop-inventory-section{border-top:1px solid #b8a27055;margin-top:12px;padding-top:9px}#shop-inventory-section h3{font-size:13px;margin:0 0 4px}#shop-inventory-hint{font-size:10px!important;margin:4px 0!important}#shop-inventory{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}#shop-inventory button{display:grid;grid-template-columns:32px 1fr;align-items:center;gap:4px;padding:5px;background:#12242bcc;border:1px solid #b8a27066;border-radius:3px;min-height:44px;font-size:10px;cursor:pointer}#shop-inventory img{width:32px;height:32px;grid-row:span 2;object-fit:contain}#shop-inventory span{text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#shop-inventory small{text-align:left;color:#e3c27e;font-size:9px}#shop-inventory button:disabled{opacity:.45;cursor:default}
.mobile-rpg .population>img{width:20px;height:20px}.mobile-rpg .hud-top .population{gap:3px}.mobile-rpg .population>span>b{font-size:11px}
.mobile-rpg #unit-shortcuts{left:var(--mobile-left);right:auto;bottom:calc(var(--native-hud-height) + 89px);gap:4px}.mobile-rpg #unit-shortcuts button{width:39px;height:39px}
.mobile-rpg #unit-control{left:calc(var(--mobile-left) + 46px);width:min(246px,calc(100vw - 66px))}.mobile-rpg #shop-inventory{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(orientation:landscape){.mobile-rpg #unit-control{left:calc(var(--mobile-left) + 176px)}.mobile-rpg #unit-shortcuts{left:calc(var(--mobile-left) + 46px);flex-direction:row}}
.mobile-rpg .hud-top #assistant-open{display:none!important}#hero-growth-skill{font-size:11px;line-height:1.5;color:#dbc792}

/* Compact HUD: stable resource row, one utility menu, quiet information docks. */
.hud-top{z-index:8;font-family:Arial,"PingFang SC",sans-serif;gap:8px;align-items:center}
.native-resources>span,#population{height:34px;box-sizing:border-box;padding:0 9px;border:1px solid #b8a27070;border-radius:4px;background:#101b23e8;gap:7px;min-width:60px;font-variant-numeric:tabular-nums}
#population{min-width:88px;display:flex;align-items:center;margin:0}#population>span{display:block}#population>span>b{font-size:14px;line-height:1;font-weight:600}
.native-resources img,#population>img{width:21px;height:21px}.native-resources>span b{font-size:14px}
.hud-utilities{display:none!important}.hud-top #mobile-menu-toggle{display:block!important;min-width:44px;height:34px;margin-left:auto;border-radius:4px}
.mobile-menu-open .hud-utilities{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;position:absolute;right:0;top:calc(100% + 8px);width:278px;padding:10px;border:1px solid #b8a27077;border-radius:6px;background:#101c25f5;box-shadow:0 8px 22px #0008;z-index:20}
.mobile-menu-open .hud-utilities .hud-button{display:block!important;width:auto!important;height:34px!important;min-width:0!important;font-size:11px;padding:0 6px;border-radius:4px;text-align:center}
.hud-button,.battle-summary button,#quest-close,#unit-shortcuts button{border-color:#b8a27066;color:#e5d6b5}
.hud-button:active,#unit-shortcuts button:active,.skill-book-card button:active{transform:scale(.97)}
.battle-summary,#quest-dialog .quest-window,#unit-control{border:1px solid #b8a27066;border-radius:6px;background:#101c25eb;box-shadow:0 3px 12px #0004;font-family:Arial,"PingFang SC",sans-serif}
.battle-summary header>b,#quest-dialog h2{font-weight:600;letter-spacing:.03em;color:#e5d6b5}
.battle-summary{width:260px;padding:9px 10px}.battle-summary.collapsed{padding:7px 10px}#quest-dialog .quest-window{width:260px;padding:9px 10px}#quest-dialog.collapsed .quest-window{padding:7px 10px}
#quest-dialog .quest-list{gap:5px}#quest-dialog .quest-row{border:1px solid #9daaa72b;background:#25323a7a;border-radius:4px;padding:6px 7px;min-height:36px}
#quest-dialog .quest-name b{font-size:11px;font-weight:500}#quest-dialog .quest-row .quest-accept{padding:5px;color:#ebd4a0}#quest-dialog .quest-window>header{padding:0 0 5px;background:transparent}
#quest-dialog.collapsed .quest-window>header{padding-bottom:0}#quest-dialog .quest-window>header>div>small{display:none}
#unit-control{padding:10px}#unit-control-status{font-size:10px;color:#adbdbd}#unit-control-actions button{background:#24353df0;border-color:#a697743f;border-radius:4px}
.hero-skill-book-window{width:min(610px,calc(100vw - 20px));max-height:calc(100dvh - 20px);overflow:auto;padding:16px;background:#101c25f5;border-radius:8px}
.hero-skill-book-window>header{display:flex;align-items:center;justify-content:space-between;gap:10px}.hero-skill-book-window h2{font-size:21px;margin:4px 0}.hero-skill-book-window header small{font-size:11px;color:#c2b892}.hero-skill-book-window>p{font-size:11px;color:#adbdbd}
#hero-skill-book-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.skill-book-card{display:grid;grid-template-columns:36px minmax(0,1fr) 38px;gap:7px;align-items:center;border:1px solid #b8a27040;background:#1e2d36;padding:8px;border-radius:5px}
.skill-book-card>img{width:36px;height:36px;object-fit:contain}.skill-book-card>div{min-width:0}.skill-book-card b{display:block;font-size:12px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.skill-book-card small{display:block;color:#b4c3be;font-size:9px;margin-top:5px}.skill-book-card button{padding:6px 3px;min-height:32px;background:#334a4d;border:1px solid #b8a27066;color:#f0e0b5;border-radius:4px;font-size:10px;cursor:pointer}.skill-book-card button:disabled{opacity:.4;cursor:default}.skill-book-passive{font-size:10px;color:#acc5bc;text-align:center}
.skill-book-card.promoted-skill{border-color:#bbaa6580;background:#2a343b}.skill-book-card.promoted-skill small{color:#e5c987}.skill-book-card details{grid-column:1/-1;font-size:10px;line-height:1.6;color:#b9c8c5}.skill-book-card summary{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;cursor:pointer}.skill-book-card details p{white-space:pre-wrap;margin:6px 0 0}.skill-book-card details[open] summary{-webkit-line-clamp:unset}
#hero-skill-book-open{margin-left:auto;font-size:10px;color:#dcc18a;background:#17272e;border:1px solid #ac97674d;border-radius:3px;padding:2px 7px;cursor:pointer}
.upgrade-targeting .inventory-slot{opacity:.55}.upgrade-targeting .inventory-slot.upgrade-eligible{opacity:1;border-color:#8ddcb9;box-shadow:inset 0 0 0 1px #8ddcb9,0 0 4px #7eb89455}.upgrade-targeting .inventory-slot.upgrade-eligible:after{content:'↑';position:absolute;right:2px;top:0;font-size:13px;color:#bcffda;text-shadow:0 1px #000}
@media(hover:hover) and (pointer:fine){.hud-button:hover,#unit-shortcuts button:hover{background-color:#33434a;border-color:#d1bd86}.skill-book-card button:not(:disabled):hover{background:#456262}}
.mobile-rpg .hud-top{gap:5px}.mobile-rpg .native-resources>span,.mobile-rpg #population{height:30px;min-width:49px;padding:0 6px;gap:4px;border-radius:4px}.mobile-rpg #population{min-width:71px}.mobile-rpg #population>span>b,.mobile-rpg .native-resources>span b{font-size:11px}.mobile-rpg .native-resources img,.mobile-rpg #population>img{width:18px;height:18px}.mobile-rpg .hud-top #mobile-menu-toggle{height:30px;min-width:40px;padding:0 6px}
.mobile-rpg .hud-utilities{right:0}.mobile-rpg.mobile-menu-open .hud-utilities{width:min(278px,calc(100vw - 20px));top:calc(100% + 7px)}
.mobile-rpg .battle-summary,.mobile-rpg #quest-dialog .quest-window{width:158px;padding:6px 8px}.mobile-rpg .battle-summary.collapsed{padding:6px 8px}.mobile-rpg #quest-dialog.collapsed .quest-window{padding:6px 8px}.mobile-rpg #quest-dialog .quest-window>header{top:0}.mobile-rpg #quest-dialog .quest-row{min-height:32px;padding:4px 5px}.mobile-rpg #quest-dialog .quest-row b{font-size:10px}.mobile-rpg #quest-dialog .quest-window{max-height:min(250px,calc(100dvh - var(--quest-dock-top) - var(--native-hud-height) - 86px))}
.mobile-rpg .hero-skill-book-window{padding:12px}.mobile-rpg #hero-skill-book-list{grid-template-columns:1fr}.mobile-rpg .skill-book-card{grid-template-columns:36px minmax(0,1fr) 44px}.mobile-rpg #hero-skill-book-open{font-size:9px;padding:1px 5px;min-height:18px}.mobile-rpg .native-console .command-heading small{max-width:none;font-size:9px}
@media(max-height:520px){.mobile-rpg #hero-skill-book-list{grid-template-columns:repeat(2,minmax(0,1fr))}.mobile-rpg #quest-dialog .quest-window{max-height:min(180px,calc(100dvh - var(--quest-dock-top) - var(--native-hud-height) - 8px))}}
@media(prefers-reduced-motion:reduce){.hud-button:active,#unit-shortcuts button:active,.skill-book-card button:active{transform:none}}
.mobile-rpg .native-console .command-heading{display:flex!important;position:absolute;top:-22px;right:0;left:auto;width:auto;height:20px;gap:3px;z-index:3;align-items:center;background:#13242bea;border-radius:3px;border:1px solid #b8a27055;padding:0 4px}
.mobile-rpg .native-console .command-heading #command-title{display:none}.mobile-rpg #hero-skill-book-open{border:0;background:transparent;min-height:18px;padding:1px 5px}
/* Compact catalog: persistent categories, independently scrolling products. */
#unit-control{display:none!important}
.unit-console-command b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#item-shop-dialog.online-shop{inset:54px 14px auto auto;width:min(620px,calc(100vw - 28px));height:min(570px,calc(100dvh - var(--native-hud-height,236px) - 70px));max-height:none;display:block;background:none;pointer-events:none;z-index:20}
#item-shop-dialog.online-shop.hidden{display:none}
.online-shop .item-shop-window{pointer-events:auto;box-sizing:border-box;display:flex;flex-direction:column;width:100%;height:100%;max-height:none;margin:0;padding:16px;overflow:hidden;background:#111b23;border:1px solid #7e735b;border-radius:12px;box-shadow:0 14px 50px #0009;color:#e8e2d3}
.online-shop .item-shop-window>header{flex:none;display:flex;align-items:center;gap:10px;padding:0 0 12px;border-bottom:1px solid #a8997233;background:none;position:static;flex-wrap:nowrap}
#online-shop-icon{width:36px;height:36px;object-fit:cover;border:1px solid #8e8260;border-radius:6px;background:#0a1117}
.online-shop .item-shop-window header>div{flex:1;min-width:0}
.online-shop .item-shop-window header small{font-size:10px;letter-spacing:1px;color:#96a6af}
.online-shop .item-shop-window h2{margin:3px 0 0;font-size:17px;line-height:1.3;letter-spacing:0;font-weight:600}
.online-shop #shop-gold{display:flex;flex-direction:column;gap:4px;flex:none;font-size:12px;font-variant-numeric:tabular-nums;color:#e6cd93}
#shop-gold span{display:flex;gap:6px;align-items:center}#shop-gold img{width:16px;height:16px}
.online-shop .item-shop-window header>button{flex:none;margin:0 0 0 5px;width:32px;height:32px;padding:0;background:#26313a;border:1px solid #67758255;border-radius:6px;color:#b9c4ca;font-size:22px;line-height:1;cursor:pointer}
.online-shop .item-shop-window>p{margin:9px 0 12px;font-size:11px;line-height:1.4;color:#99abb5;flex:none}
.shop-browser{display:grid;grid-template-columns:116px minmax(0,1fr);gap:14px;min-height:0;flex:1}
#online-shop-tabs{display:flex;flex-direction:column;gap:4px;margin:0;padding:0 9px 0 0;border-right:1px solid #a8997226;max-height:none;overflow:auto;scrollbar-width:thin;scrollbar-color:#48565e transparent}
#online-shop-tabs button{display:flex;flex-direction:row;align-items:center;gap:8px;min-height:37px;flex:none;padding:6px;border:1px solid transparent;border-radius:6px;background:transparent;color:#acbbc4;font-size:11px;text-align:left;cursor:pointer}
#online-shop-tabs button img{width:24px;height:24px;object-fit:cover;border-radius:3px;pointer-events:none}
#online-shop-tabs button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}
#online-shop-tabs button[aria-pressed=true]{background:#c5a56518;border-color:#c5a56566;color:#eed69e}
.shop-catalog{display:flex;flex-direction:column;min-width:0;min-height:0}
.online-shop .item-search{box-sizing:border-box;width:100%;height:34px;min-height:34px;margin:0 0 10px;padding:6px 10px;background:#091219;border:1px solid #6c7c8944;border-radius:6px;color:#e5edf0;font-size:12px;outline-offset:2px}
.online-shop #item-shop-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;align-content:start;min-height:0;overflow:auto;overscroll-behavior:contain;padding-right:3px;scrollbar-width:thin;scrollbar-color:#48565e transparent}
.online-shop .item-shop-card{display:grid;grid-template-columns:32px minmax(0,1fr);gap:7px;padding:9px;border:1px solid #75849033;background:#1b2730;border-radius:7px;align-content:start;align-items:center;min-width:0}
.online-shop .item-shop-card>img{width:32px;height:32px;border:1px solid #a18e6033;border-radius:4px}
.online-shop .item-shop-copy{display:flex;flex-direction:column;gap:4px;min-width:0}
.online-shop .item-shop-copy b{font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}
.online-shop .item-shop-copy small{font-size:10px;line-height:1.35;color:#bda984;font-variant-numeric:tabular-nums}
.online-shop .item-shop-card>button{grid-column:1/-1;min-width:0;min-height:30px;padding:5px 8px;background:#b8a16c;border:1px solid #dcc28a55;border-radius:5px;color:#151a20;font-size:11px;font-weight:600;cursor:pointer}
.online-shop .item-shop-card>button:disabled{background:#26323b;border-color:#73818c33;color:#7e8b95;cursor:default}
.online-shop .item-shop-card details{grid-column:1/-1;min-width:0;color:#9baab4;font-size:10px}
.online-shop .item-shop-card summary{cursor:pointer;line-height:20px;min-height:20px}
.online-shop .item-shop-card details p{margin:6px 0 0;line-height:1.6;font-size:11px;color:#ccd5da;white-space:normal}
.online-shop .item-shop-card:has(details[open]){grid-column:1/-1}
.online-shop button:active:not(:disabled){transform:scale(.97)}
.online-shop button:focus-visible,.online-shop input:focus-visible{outline:2px solid #d8bd83;outline-offset:2px}
#shop-inventory-section[hidden],#shop-empty[hidden],#online-shop-tabs[hidden],#accept-letter[hidden],.item-shop-card[hidden]{display:none!important}
#shop-empty{font-size:12px;line-height:1.8;padding:18px 6px;color:#a4b2bb}
.online-shop[data-mode=nearby] .shop-browser{grid-template-columns:1fr}
@media(hover:hover){#online-shop-tabs button:hover{background:#acbac31a}.online-shop .item-shop-card>button:hover:not(:disabled){background:#d0b77e}}
@media(max-width:600px){
 #item-shop-dialog.online-shop{inset:144px 8px auto 8px;width:auto;height:calc(100dvh - var(--native-hud-height,175px) - 156px)}
 .online-shop .item-shop-window{padding:11px;border-radius:10px}
 .online-shop .item-shop-window h2{font-size:15px}
 .online-shop .item-shop-window header>button{width:30px;height:30px}
 .shop-browser{grid-template-columns:88px minmax(0,1fr);gap:9px}
 #online-shop-tabs{padding-right:6px}
 #online-shop-tabs button{font-size:10px;gap:5px;min-height:40px;padding:5px 2px}
 #online-shop-tabs button img{width:22px;height:22px}
 .online-shop #item-shop-list{grid-template-columns:1fr;gap:6px}
 .online-shop .item-shop-card{grid-template-columns:30px minmax(0,1fr) 49px;padding:8px;gap:7px}
 .online-shop .item-shop-card>img{width:30px;height:30px}
 .online-shop .item-shop-card>button{grid-column:3;grid-row:1;min-height:34px;padding:5px 3px}
 .online-shop .item-shop-card details{grid-column:1/-1}
 .online-shop .item-shop-window>p{font-size:10px;margin:8px 0}
}
@media(orientation:landscape) and (max-height:600px){
 #item-shop-dialog.online-shop{inset:43px 8px auto auto;width:min(580px,72vw);height:calc(100dvh - var(--native-hud-height,132px) - 51px)}
 .online-shop .item-shop-window{padding:9px}
 .online-shop .item-shop-window>header{padding-bottom:7px}
 .online-shop .item-shop-window>p{margin:5px 0}
 .shop-browser{grid-template-columns:100px minmax(0,1fr);gap:9px}
 #online-shop-tabs button{min-height:34px;padding:4px;gap:5px}
 .online-shop .item-search{height:29px;min-height:29px;margin-bottom:6px}
 .online-shop #item-shop-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.mobile-rpg .location{left:calc(var(--mobile-left) + 53px);top:calc(max(5px,env(safe-area-inset-top)) + 104px);max-width:calc(100vw - var(--mobile-left) - 66px)}
.defeat-veil{z-index:70!important;background:#09080cd9!important;display:grid;place-items:center}
.defeat-veil.hidden{display:none!important}
.defeat-window{width:min(380px,calc(100vw - 40px));box-sizing:border-box;padding:32px 28px;text-align:center;border:1px solid #ad6e55;border-radius:12px;background:#231a1c;box-shadow:0 20px 80px #0008}
.defeat-window>small{color:#c99885;letter-spacing:4px;font-size:12px}.defeat-window h2{font-size:36px;letter-spacing:4px;margin:16px 0 10px;color:#f1d5c8}.defeat-window p{color:#b7a7a4;font-size:13px;margin:0 0 26px}.defeat-window>div{display:flex;gap:8px}.defeat-window button{flex:1;border:1px solid #b78b71;border-radius:6px;padding:11px 8px;background:#b99071;color:#191417;cursor:pointer;font-size:13px}.defeat-window button:last-child{background:transparent;color:#c7b7af;border-color:#827072}
.mobile-rpg #mobile-hero-info .native-portrait-canvas{position:relative;left:auto;top:auto;width:39px;height:43px;flex:none;border:1px solid #a99562;border-radius:2px;z-index:auto}
.mobile-rpg #mobile-hero-info:has(.native-portrait-canvas:not([hidden]))>img{display:none}



/* One utility dock prevents independent buttons from covering one another. */
#unit-shortcuts{display:flex;flex-direction:row;align-items:flex-end;gap:7px;left:20px;bottom:calc(var(--native-hud-height,326px) + 14px)}
.unit-shortcut-buttons{display:flex;flex-direction:column;gap:6px}
#unit-shortcuts .inventory-tools{position:static;display:grid;grid-template-columns:1fr;gap:5px;width:66px}
#unit-shortcuts .inventory-tools button{width:66px;height:27px;padding:0 6px;font-size:10px;border-radius:4px;white-space:nowrap}
#unit-shortcuts .inventory-tools button[aria-pressed="true"]{color:#fff0bf;border-color:#dbc480;background:#454235}
#hero-inventory.sell-selecting .occupied{outline:1px solid #e5bc63;cursor:pointer}
body:not(.mobile-rpg) #quest-dialog .quest-window{right:18px;width:260px;max-height:var(--quest-dock-max-height,360px)}
.mobile-rpg #unit-shortcuts{left:var(--mobile-left);bottom:calc(var(--native-hud-height) + 90px);gap:6px}
.mobile-rpg .unit-shortcut-buttons{flex-direction:row;gap:4px}
.mobile-rpg #unit-shortcuts .inventory-tools{width:64px;gap:3px}
.mobile-rpg #unit-shortcuts .inventory-tools button{width:64px;height:24px;font-size:9px}
.mobile-rpg #quest-dialog .quest-window{max-height:min(250px,var(--quest-dock-max-height,180px))}
#population{touch-action:manipulation}
#population:hover,#population:focus-visible{border-color:#e0c382;background:#29332d;outline:none}

#assistant-inventory.sell-selecting .occupied{outline:1px solid #e5bc63;cursor:pointer}

@media (orientation:landscape) and (max-height:540px){
  .mobile-rpg #unit-shortcuts{left:calc(var(--mobile-left) + 48px);bottom:calc(var(--native-hud-height) + 102px);align-items:center}
  .mobile-rpg #unit-shortcuts .inventory-tools{display:flex;width:auto;gap:3px}
  .mobile-rpg #unit-shortcuts .inventory-tools button{width:43px;height:39px;font-size:8px;padding:0 2px}
}
/* Solo progress and cooperative lobby share the existing compact console. */
.session-picker{border:1px solid #56606866;border-radius:10px;padding:12px;margin:14px 0;background:#10151dcf;text-align:left}
.session-tabs{display:flex;gap:6px;margin-bottom:10px}.session-picker button,.session-window button{border:1px solid #73818f66;background:#26323e;color:#e8e5db;border-radius:6px;padding:9px 13px;font:inherit;cursor:pointer}.session-picker button[aria-pressed=true]{background:#775b2e;border-color:#d6b575}.session-picker button:disabled,.session-window button:disabled{opacity:.45;cursor:default}
#solo-start{display:flex;align-items:center;gap:12px}#solo-start small{color:#aeb9c4}.room-connect{display:grid;grid-template-columns:1fr auto 1fr auto;gap:8px;align-items:end}.room-connect label{display:grid;gap:5px;font-size:12px;color:#c2cbd3}.room-connect input{width:100%;min-width:0;box-sizing:border-box;background:#111a24;color:#f4e6bd;border:1px solid #566879;border-radius:6px;padding:9px;font:inherit}#room-code{text-transform:uppercase;letter-spacing:2px}#room-status{user-select:text;overflow-wrap:anywhere;font-size:12px;margin:12px 0 6px!important}#room-players{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(2,1fr);gap:6px}#room-players li{background:#34455455;padding:7px 9px;border-radius:5px;font-size:12px}.room-actions{display:flex;gap:8px;margin-top:10px}
#room-badge{position:absolute;top:var(--room-dock-top,70px);right:18px;z-index:7;color:#ead3a3;background:#131e2bef;border:1px solid #72819577;border-radius:7px;padding:7px 10px;font:12px system-ui;cursor:pointer}.session-window{width:min(440px,calc(100vw - 28px));max-height:80vh;overflow:auto;padding:20px;border:1px solid #77869280;border-radius:12px;color:#e4e8ed;background:linear-gradient(145deg,#26313e,#101821);box-shadow:0 18px 60px #0009;box-sizing:border-box}.session-window header{display:flex;align-items:center;justify-content:space-between}.session-window h2{margin:0;font-size:20px}.session-window p{font-size:13px;color:#c0c9d3;line-height:1.6}#save-actions{display:flex;flex-wrap:wrap;gap:8px}#session-detail{white-space:pre-line}.network-unit-label{position:absolute;transform:translate(-50%,-100%);color:#f2ecd8;text-shadow:0 1px 3px #000;background:#102033b8;padding:2px 6px;border-radius:4px;pointer-events:none;font:11px system-ui;z-index:5}
@media(max-width:700px){.session-picker{padding:9px}.room-connect{grid-template-columns:1fr auto}#solo-start{align-items:flex-start;flex-direction:column;gap:7px}#room-badge{top:var(--room-dock-top,70px);right:var(--mobile-right,10px);max-width:52vw;font-size:10px}#room-players{grid-template-columns:1fr}.session-window{padding:16px}.session-tabs button{flex:1}}
#room-badge.hidden,[hidden]{display:none!important}

#session-dialog{z-index:22!important}
/* Inventory actions sit beside the mobile bag; the unit dock remains above the joystick. */
.mobile-rpg .inventory-panel #inventory-tools{position:fixed;left:var(--mobile-left);top:auto;bottom:calc(76px + env(safe-area-inset-bottom));display:grid;grid-template-columns:1fr;gap:4px;width:62px;z-index:10}
.mobile-rpg .inventory-panel #inventory-tools button{width:62px;min-height:23px;height:23px;padding:0 3px;font-size:9px;line-height:1.1;border:1px solid #9d895966;border-radius:4px;background:#13242be8;color:#dece9e}
.mobile-rpg .inventory-panel #auto-pickup[aria-pressed=true]{border-color:#b69f62;color:#efdda8;background:#263932ed}
.native-resources>span[role=button]{cursor:pointer;touch-action:manipulation}
.native-resources>span[role=button]:hover,.native-resources>span[role=button]:focus-visible{outline:1px solid #ceb36f;outline-offset:2px;background:#273832}
@media(orientation:landscape){.mobile-rpg .inventory-panel #inventory-tools{bottom:calc(96px + env(safe-area-inset-bottom));width:80px}.mobile-rpg .inventory-panel #inventory-tools button{width:80px;height:23px}}
@media(max-width:359px) and (orientation:portrait){.mobile-rpg .inventory-panel #inventory-tools,.mobile-rpg .inventory-panel #inventory-tools button{width:47px}}
@media(orientation:landscape){.mobile-rpg .joystick{bottom:calc(var(--native-hud-height) + 38px)}.mobile-rpg #unit-shortcuts{left:calc(var(--mobile-left) + 76px)}}
@media(orientation:landscape){.mobile-rpg .joystick{width:60px;height:60px}}

/* Preserve the delivery label in the mobile catalog. */
.mobile-rpg .online-shop .item-shop-window>p{display:block}.mobile-rpg .online-shop .item-shop-window header small{display:block;font-size:9px}
@media(orientation:landscape) and (max-height:600px){
 .online-shop .item-shop-card{grid-template-columns:26px minmax(0,1fr) 46px;padding:6px;gap:5px}
 .online-shop .item-shop-card>img{width:26px;height:26px}
 .online-shop .item-shop-card>button{grid-column:3;grid-row:1;min-height:28px;padding:4px 2px}
 .online-shop .item-shop-card details{grid-column:1/-1;font-size:9px}
 .online-shop .item-shop-card summary{min-height:16px;line-height:16px}
}
@media(orientation:landscape) and (max-height:600px){.mobile-rpg .location{left:calc(var(--mobile-left) + 169px);max-width:calc(100vw - var(--mobile-left) - 182px)}}
/* Personal unit dock and native timed form. */
#unit-shortcuts .unit-shortcut-buttons{display:grid;grid-template-columns:repeat(3,43px);gap:5px;align-items:end}
#companion-shortcuts{display:contents}#companion-shortcuts button[aria-pressed=true]{outline:2px solid #e6ca77;outline-offset:1px}
#unit-shortcuts #companion-shortcuts span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mobile-rpg #unit-shortcuts .unit-shortcut-buttons{grid-template-columns:repeat(3,39px);gap:4px}
@media(orientation:landscape) and (max-height:600px){.mobile-rpg #unit-shortcuts .unit-shortcut-buttons{display:flex;gap:5px;max-width:calc(100vw - 105px);overflow-x:auto;scrollbar-width:none}.mobile-rpg #unit-shortcuts button{flex:none}}
#avatar-progress{position:fixed;transform:translateX(-50%);z-index:8;width:145px;padding:3px 5px;border:1px solid #c7af7880;border-radius:3px;background:#111c24e8;pointer-events:none}
#avatar-progress[hidden]{display:none}#avatar-progress b{display:block;font-size:10px;line-height:15px;color:#f0ddb0;text-align:center;white-space:nowrap}
#avatar-progress span{display:block;height:4px;background:#30363a;overflow:hidden;border-radius:2px}#avatar-progress i{display:block;height:100%;background:#d5b65c}
.original-bounty{position:fixed;z-index:8;display:flex;flex-direction:column;gap:2px;transform:translate(-50%,-100%);pointer-events:none;font-weight:500;font-size:14px;font-variant-numeric:tabular-nums;text-shadow:0 1px 3px #14212a66}
.original-bounty[hidden]{display:none}.original-bounty span{display:flex;align-items:center;gap:3px;white-space:nowrap}.original-bounty img{width:14px;height:14px}.gold-bounty{color:#ffe260}.crystal-bounty{color:#80caff}
#minimap{touch-action:none;cursor:crosshair}
/* Artifact action chooser: readable costs and one clear action per card. */
#staff-skill-dialog .staff-choice-window{width:min(510px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:22px;overflow:auto;border:1px solid #9e8860;border-radius:12px;background:#141f28;box-shadow:0 20px 70px #0009}
.staff-choice-window>header{display:flex;align-items:center;gap:12px;border-bottom:1px solid #9e886033;padding-bottom:16px}.staff-choice-window>header>img{width:46px;height:46px;border:1px solid #a99268;border-radius:6px}.staff-choice-window header small{color:#8fa6b4;font-size:10px;letter-spacing:1px}.staff-choice-window h2{font-size:20px;letter-spacing:0;margin:4px 0 0;color:#efddb3}
.staff-choice-window>p{font-size:12px;line-height:1.7;color:#a9b7c0;margin:14px 0}
.staff-choice-window .fruit-choice-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.staff-choice-window .fruit-choice-list button{display:grid;grid-template-columns:36px 1fr;align-items:center;gap:9px;padding:14px;border:1px solid #879caa55;border-radius:8px;background:#20313e;text-align:left;cursor:pointer}
.staff-choice-window .fruit-choice-list img{width:36px;height:36px;border:1px solid #ae9a6866;border-radius:4px}.staff-choice-window .fruit-choice-list b{font-size:13px;color:#eddfbd;line-height:1.5}.staff-choice-window .fruit-choice-list span{grid-column:1/-1;font-size:11px;line-height:1.7;color:#b5c3cc}.staff-choice-window .fruit-choice-list button:disabled{background:#1b252d;border-color:#52606b55;opacity:.6;cursor:default}
.staff-choice-window .fruit-choice-list button:active:not(:disabled){transform:scale(.98)}.staff-choice-window #staff-skill-close{display:block;margin:16px 0 0 auto;padding:8px 20px;border:1px solid #6c7d8980;border-radius:6px;background:#263540;color:#cdd9de;cursor:pointer}
@media(max-width:600px){#staff-skill-dialog .staff-choice-window{padding:16px}.staff-choice-window .fruit-choice-list{grid-template-columns:1fr}.staff-choice-window h2{font-size:16px}.staff-choice-window .fruit-choice-list button{padding:12px}}
#unit-shortcuts .unit-shortcut-buttons:has(#companion-shortcuts:empty){grid-template-columns:repeat(2,43px)}
.mobile-rpg #unit-shortcuts .unit-shortcut-buttons:has(#companion-shortcuts:empty){grid-template-columns:repeat(2,39px)}
/* Keep world hints readable next to a populated unit dock. */
.mobile-rpg #notice{left:calc(var(--mobile-left) + 140px);right:8px;max-width:none;transform:none}
@media(orientation:landscape) and (max-height:600px){
 .mobile-rpg #unit-shortcuts .unit-shortcut-buttons{max-width:min(320px,40vw)}
 .mobile-rpg .location{left:calc(var(--mobile-left) + 76px);top:calc(max(5px,env(safe-area-inset-top)) + 148px);max-width:min(260px,calc(100vw - 190px))}
 .mobile-rpg #notice{left:50%;right:auto;transform:translateX(-50%);bottom:calc(var(--native-hud-height) + 8px);max-width:calc(100vw - 190px)}
}
/* A compact, readable upgrade ledger with clear affordability. */
#technology-dialog .technology-window{width:min(720px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:22px;border:1px solid #8f7d575c;border-radius:12px;background:#15212a;box-shadow:0 24px 80px #0007;scrollbar-width:thin;scrollbar-color:#71838b #15212a}
.technology-window header{align-items:center;padding-bottom:16px;border-bottom:1px solid #71838b33}
.technology-window header small{color:#92a9b7;font-size:11px;letter-spacing:.5px}.technology-window h2{margin:5px 0 0;font-size:23px;letter-spacing:0;color:#ecddba}
.technology-window header button{border:1px solid #71838b55;border-radius:6px;color:#cbd7dc;background:#23333d}
.technology-balance{display:flex;align-items:center;gap:12px;padding:16px 0}.technology-balance>img{width:36px;height:36px;border:1px solid #98845f88;border-radius:6px}.technology-balance>div>small{display:block;font-size:11px;color:#a4b5bf;margin-bottom:4px}.technology-balance b{font-size:24px;font-variant-numeric:tabular-nums;font-weight:600;color:#f2dfaa}.technology-balance span{font-size:12px;color:#8da2af;margin-left:5px}.technology-balance p{margin:0 0 0 auto;color:#8198a6;font-size:10px;line-height:1.7;text-align:right}
.technology-window #warehouse-progress{font-size:11px;color:#99b8af;margin:0 0 12px}
.technology-window .warehouse-upgrades{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.technology-window .warehouse-upgrade{display:grid;grid-template-columns:38px minmax(0,1fr) 45px;align-items:center;gap:10px;min-height:94px;padding:12px;border:1px solid #71838b40;border-radius:8px;background:#1d2e39;text-align:left;cursor:pointer}
.technology-window .warehouse-upgrade>img{width:38px;height:38px;opacity:1;border:1px solid #a9905e77;border-radius:4px}
.technology-window .warehouse-upgrade b{display:block;font-size:13px;color:#e6d7b5;font-weight:500;line-height:1.5}.technology-window .warehouse-upgrade span>small{display:block;min-height:0;-webkit-line-clamp:unset;font-size:11px;color:#a8b9c3;line-height:1.6}.technology-window .warehouse-upgrade em{margin-top:5px;font-size:10px;color:#7f9cae;font-variant-numeric:tabular-nums}
.technology-price{justify-self:end;text-align:center;min-width:43px;padding:6px 3px;border-radius:5px;background:#a9915530;color:#ead599;font-size:17px;font-weight:500;line-height:1.4}.technology-price>small{display:block;font-size:9px;color:#d9c18b;white-space:nowrap}
.technology-window .warehouse-upgrade:disabled{opacity:.65;cursor:default;background:#1a2731}.technology-window .warehouse-upgrade:disabled .technology-price{background:#61788522;color:#9db0ba}.technology-window .warehouse-upgrade:disabled .technology-price small{color:#9db0ba}
.technology-window .warehouse-upgrade:focus-visible{outline:2px solid #d5bb79;outline-offset:2px}.technology-window .warehouse-upgrade:active:not(:disabled){background:#2a414d}
#unit-shortcuts .unit-shortcut-buttons{max-height:96px;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin}#companion-shortcuts button:disabled{opacity:.55}#companion-shortcuts button:disabled span{color:#9eacb7}
@media(max-width:600px){#technology-dialog .technology-window{padding:16px}.technology-window .warehouse-upgrades{grid-template-columns:1fr}.technology-window .warehouse-upgrade{min-height:82px}.technology-window h2{font-size:20px}}
@media(orientation:landscape) and (max-height:600px){.mobile-rpg #unit-shortcuts .unit-shortcut-buttons{overflow-x:auto;overflow-y:hidden;max-height:48px}#technology-dialog .technology-window{max-height:calc(100dvh - 16px);padding:14px}.technology-window .technology-balance{padding:10px 0}}

/* Selection / growth dialogs share a quiet, readable Warcraft palette. */
#choose-hero{background:radial-gradient(ellipse at 15% 12%,#23333dda,#0b141bea 62%);backdrop-filter:blur(8px)}
#choose-hero .hero-select{width:min(1056px,calc(100vw - 40px));padding:26px 30px;text-align:left;background:#13202bf5;border:1px solid #839aab3d;border-radius:16px;box-shadow:0 24px 80px #0007}
#choose-hero .hero-select>small{font:600 10px/1.5 system-ui;letter-spacing:2px;color:#b9a57c}
#choose-hero h1{margin:6px 0;font:600 28px/1.25 system-ui;letter-spacing:1px;color:#f0e7d7}
#choose-hero #start-description{margin:6px 0 18px;font-size:12px;color:#a1b3c2;line-height:1.6}
#choose-hero .session-picker{padding:12px 14px;margin-bottom:18px;border:1px solid #839aab25;border-radius:10px;background:#0d1921}
#choose-hero .session-tabs{justify-content:flex-start;gap:6px}
#choose-hero .session-tabs button{border-radius:6px;padding:7px 18px;font-size:12px}
#choose-hero .session-tabs [aria-pressed=true]{background:#304350;color:#f2dfac;border-color:#ae91664a;box-shadow:none}
#choose-hero #solo-start{justify-content:flex-start;align-items:center;gap:10px}
.selection-step{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:14px 0 10px;border-top:1px solid #839aab25;padding-top:14px}
.selection-step small{color:#d0bd95;font-size:11px;letter-spacing:1px}.selection-step span{font-size:11px;color:#8ea4b3}
.difficulty-cards{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.difficulty-cards button{display:grid;gap:5px;text-align:left;padding:12px;border:1px solid #718da132;border-radius:8px;background:#192b38;color:#d6e1e7;cursor:pointer}
.difficulty-cards small{font:11px/1.4 ui-monospace,monospace;color:#91a8b7}.difficulty-cards b{font-size:12px}.difficulty-cards span{font-size:10px;color:#92a9b9}
.difficulty-cards [aria-pressed=true]{background:#2e3b41;border-color:#c3a470;color:#f6e2b6;box-shadow:inset 0 0 0 1px #c3a47033}
#choose-hero .difficulty-choice{display:none}#choose-hero #difficulty-description{font-size:11px;color:#9eafbb;margin:8px 0}
#choose-hero #original-hero-selection{float:right;margin:0;padding:5px 8px;background:none;border:0;color:#c3ac80;font-size:10px}
#choose-hero .hero-choices{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:10px 0 16px}
#choose-hero .hero-choice{display:flex;align-items:center;gap:10px;min-height:86px;padding:10px;text-align:left;border:1px solid #7893a22d;border-radius:9px;background:#1b2c38;transition:background 140ms ease,border-color 140ms ease;transform:none}
#choose-hero .hero-choice img{width:52px;height:60px;object-fit:cover;border-radius:5px;filter:none;border:1px solid #7f909d44;flex-shrink:0}
#choose-hero .hero-choice-info{min-width:0;display:grid;gap:5px}#choose-hero .hero-choice b{font-size:13px;line-height:1.4;letter-spacing:0;color:#e2e8ea;margin:0}
#choose-hero .hero-choice small{font-size:9px;line-height:1.5;color:#8fa6b7}#choose-hero .hero-choice i{font-size:12px;font-style:normal;color:#b49c73;align-self:flex-start;margin-left:auto}
#choose-hero .controls-hint{border-top:1px solid #839aab25;padding-top:10px;font-size:10px;line-height:1.6;color:#839ba9}
#fruit-choice-dialog .fruit-choice-window,.necklace-window{width:min(640px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;padding:24px;background:#142330fa;border:1px solid #889ca344;border-radius:14px;box-shadow:0 20px 72px #0009;text-align:left}
#fruit-choice-dialog .fruit-choice-window>small,.necklace-window header small{color:#c2ab80;font-size:10px;letter-spacing:1px}
#fruit-choice-dialog h2,.necklace-window h2{font:600 23px/1.4 system-ui;letter-spacing:0;margin:6px 0;color:#e8e4da}
#fruit-choice-dialog p{font-size:12px;line-height:1.6;color:#9db0bf;margin:6px 0 20px}
#fruit-choice-dialog .fruit-choice-list,#necklace-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#fruit-choice-dialog [data-original-fruit],#necklace-options .fruit-choice{display:grid;grid-template-columns:44px minmax(0,1fr);gap:6px 12px;align-items:center;position:relative;text-align:left;padding:15px;border:1px solid #7a92a03d;border-radius:10px;background:#1e3342;color:#e2e7e8;min-height:112px;box-shadow:none;transition:background 140ms ease,border-color 140ms ease;transform:none}
#fruit-choice-dialog button img,#necklace-options img{width:44px;height:44px;object-fit:cover;border:1px solid #a3b5be55;border-radius:7px;grid-row:1/3}
#fruit-choice-dialog button b,#necklace-options b{font-size:13px;line-height:1.6;color:#e9e1cd}
#fruit-choice-dialog button span,#necklace-options span{font-size:11px;line-height:1.65;color:#a2b7c7}
#necklace-options .fruit-choice:disabled{opacity:.5;background:#172731;cursor:default}#necklace-options .fruit-choice[data-necklace=exchange]{grid-column:1/-1;min-height:78px}
.necklace-window header{align-items:flex-start;margin-bottom:16px;border-bottom:1px solid #7a92a029;padding-bottom:12px}.necklace-window header button{border-radius:6px;width:30px;height:30px;background:#223540;border:1px solid #7a92a040;color:#becdd7}
#necklace-status{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:0 0 16px;color:#b4c4cd;font-size:12px;line-height:1.9;padding:15px;border-radius:10px;background:#0e1c26;border:1px solid #8099aa26}
.necklace-growth b{font:600 23px/1 system-ui;color:#f1cf88}.necklace-growth progress{display:block;width:100%;height:5px;margin-top:13px;border:0;border-radius:6px;overflow:hidden;background:#293c47}.necklace-growth progress::-webkit-progress-bar{background:#293c47}.necklace-growth progress::-webkit-progress-value{background:#bca16c}.necklace-bonuses{border-left:1px solid #8099aa26;padding-left:14px;font-size:11px;color:#98b0c1}
.shop-recipients{display:flex;gap:5px;flex-wrap:wrap;align-items:center;padding:8px 0}.shop-recipients::before{content:'收货';font-size:10px;color:#98aeba;margin-right:5px}.shop-recipients button{padding:5px 9px;background:#1c303e;border:1px solid #809bad35;border-radius:5px;color:#c1d0db;font-size:11px;cursor:pointer}.shop-recipients button[aria-pressed=true]{color:#eed2a0;background:#3c403c;border-color:#bb9a63}.shop-recipients button:disabled{opacity:.35;cursor:default}
#context-recipients{max-height:55px;overflow:auto;margin:-2px 0 4px;padding:2px 0;gap:3px}#context-recipients button{font-size:9px;padding:3px 5px}#context-recipients::before{font-size:9px}
.quest-overhead{position:absolute;z-index:3;pointer-events:none;transform:translate(-50%,-100%);color:#ffdd76;font:800 26px/1.2 Georgia,serif;text-shadow:0 2px 4px #000c,0 0 10px #f0c44b66;filter:drop-shadow(0 1px 1px #000);}
.loading{background:radial-gradient(ellipse at 50% 40%,#243c4a,#0c1620 68%);gap:14px;transition:opacity 200ms cubic-bezier(.23,1,.32,1);text-align:center}
.loading-emblem{width:112px;height:112px;position:relative;margin-bottom:8px;display:grid;place-items:center;color:#e4c287}
.loading-emblem i{position:absolute;inset:0;border:1px solid #a1b4bf35;border-top-color:#e4c287;border-bottom-color:#b79c6d; border-radius:50%;animation:loading-orbit 8s linear infinite}
.loading-emblem i:nth-child(2){inset:13px;border-radius:16px;border-color:#e4c28755;transform:rotate(45deg);animation:loading-orbit 12s linear infinite reverse}
.loading-emblem span{font:52px/1 Georgia;color:#e4c287;animation:loading-glow 2s ease-in-out infinite}
.loading-edition{font:10px/1.4 system-ui;letter-spacing:3px;color:#97acb9}.loading>b{font:600 28px/1.5 system-ui;letter-spacing:5px;color:#eee6d6}.loading>small{font:12px/1.6 system-ui;color:#9db3c1;max-width:calc(100vw - 40px)}
.loading-track{width:min(260px,65vw);height:3px;background:#7895a033;border-radius:4px;overflow:hidden;margin-top:15px}.loading-track i{display:block;width:100%;height:100%;background:#d1b073;transform:scaleX(0);transform-origin:left;transition:transform 200ms cubic-bezier(.23,1,.32,1)}#loading-count{font:10px/1.5 ui-monospace,monospace;color:#849cac;letter-spacing:1px}
@keyframes loading-orbit{to{transform:rotate(360deg)}}@keyframes loading-glow{50%{opacity:.55}}
@media(hover:hover) and (pointer:fine){#choose-hero .hero-choice:hover{background:#2c414e;border-color:#c1a57780;transform:none}.difficulty-cards button:hover{border-color:#b99d6c}#fruit-choice-dialog button:hover,#necklace-options button:not(:disabled):hover{border-color:#bda16a;background:#2a4050;transform:none}}
@media(prefers-reduced-motion:reduce){#loading .loading-emblem i,#loading .loading-emblem span{animation:none}.loading-track i{transition:opacity 140ms ease}.loading{transition:opacity 140ms ease}}
@media(max-width:700px){#choose-hero .hero-select{width:calc(100vw - 20px);padding:18px;max-height:calc(100dvh - 20px)}#choose-hero h1{font-size:23px}.difficulty-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.difficulty-cards button{padding:9px;gap:3px}#choose-hero .hero-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}#choose-hero .hero-choice{min-height:82px;padding:8px;gap:8px}#choose-hero .hero-choice img{width:45px;height:53px}#choose-hero .hero-choice b{font-size:12px}#choose-hero .hero-choice small{font-size:9px}#choose-hero .hero-choice i{display:none}#choose-hero .controls-hint{font-size:9px}.selection-step span{font-size:10px}#choose-hero #solo-start{flex-wrap:wrap}#fruit-choice-dialog .fruit-choice-window,.necklace-window{padding:20px}#fruit-choice-dialog .fruit-choice-list,#necklace-options{grid-template-columns:1fr}#fruit-choice-dialog [data-original-fruit],#necklace-options .fruit-choice{min-height:88px}#necklace-status{font-size:11px;padding:12px;gap:10px}.necklace-bonuses{font-size:10px;padding-left:10px}.shop-recipients button{padding:6px 10px}}
@media(max-height:520px) and (min-width:701px){#choose-hero .hero-select{padding:16px 22px}#choose-hero h1{font-size:23px}#choose-hero .session-picker{margin-bottom:10px}#choose-hero .hero-choices{grid-template-columns:repeat(5,minmax(0,1fr))}#choose-hero .hero-choice{min-height:75px}#choose-hero .hero-choice img{width:42px;height:50px}}
.native-console .command-card #context-recipients{position:absolute;left:0;right:0;bottom:calc(100% + 28px);width:100%;max-height:34px;display:flex;flex-wrap:nowrap;align-items:center;overflow-x:auto;overflow-y:hidden;padding:3px 6px;gap:4px;background:#13232bed;border:1px solid #7892a249;border-radius:6px;z-index:4;white-space:nowrap;box-sizing:border-box}
.native-console .command-card #context-recipients button{position:static;display:block;flex:0 0 auto;width:auto;height:24px;min-height:24px;padding:3px 7px;font:10px/1.3 system-ui;border:1px solid #809bad35;border-radius:4px;background:#1c303e;box-shadow:none;color:#b8ccda}
.native-console .command-card #context-recipients button[aria-pressed=true]{color:#f1d6a5;background:#3c403c;border-color:#bb9a63}.native-console .command-card #context-recipients button:disabled{opacity:.35}
.mobile-rpg #context-recipients{display:none!important}
#choose-hero .hero-choice small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#hero-inventory{touch-action:none}
#assistant-inventory,#warehouse-inventory,#warehouse-hero-inventory{touch-action:none}
/* Defense stays visible above the battlefield; nearby shops require a click. */
.hud-top .level{display:none!important}
.defense-status{position:absolute;z-index:8;top:var(--defense-dock-top,76px);left:50%;transform:translateX(-50%);width:min(740px,calc(100vw - 32px));pointer-events:none;font-family:Arial,"PingFang SC",sans-serif}
.defense-row{display:flex;align-items:stretch;gap:8px}
#base-status{flex:0 0 125px;display:grid;align-content:center;gap:8px;padding:8px 12px;border:1px solid #7f96854d;border-radius:6px;background:#11231feb;box-sizing:border-box;color:#cce2d1}
#base-status-label{font-size:12px;line-height:1.3;font-variant-numeric:tabular-nums;letter-spacing:.3px}
.base-health-track{display:block;height:7px;background:#0b1515;border:1px solid #62756877;border-radius:2px;overflow:hidden}.base-health-track i{display:block;width:100%;height:100%;background:#58b979}
#base-status.critical{border-color:#cc675b;color:#ff8175;background:#2b171beF}.critical .base-health-track i{background:#e75d50}
#defense-status #target-card{position:static;display:block;flex:1;min-width:0;width:auto;padding:8px 12px;border:1px solid #b0866b80;border-radius:6px;background:#211b21ed;box-shadow:none}
#defense-status #target-card>div:first-child{display:flex;align-items:baseline;gap:8px}
#defense-status #target-kind{font-size:9px;color:#d5ac80;white-space:nowrap;letter-spacing:1px}
#defense-status #target-name{font-size:12px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#f1dfd6}
#defense-status #target-hp-value{font:10px/1.3 ui-monospace,monospace;color:#d7bca9;white-space:nowrap;margin-left:auto}
#defense-status .target-health{height:7px;margin-top:8px;border-radius:2px;background:#513434;border:1px solid #886a5a66}#defense-status #target-hp{display:block;height:100%;background:linear-gradient(90deg,#b64343,#e3a264)}
#base-danger{display:block;pointer-events:auto;cursor:pointer;margin-top:6px;width:100%;padding:7px 12px;border:1px solid #b84a49;border-radius:5px;background:#30151def;color:#ff8a7b;font:600 12px/1.4 Arial,"PingFang SC",sans-serif;box-shadow:0 2px 12px #0005;text-align:center}
#base-danger:disabled{opacity:1;cursor:default}
.native-unit-health[data-friendly-health="base"]{width:110px;height:14px;padding:2px;border:1px solid #1a271c;box-shadow:0 0 0 1px #d0c49a}.native-unit-health[data-friendly-health="base"]>i{height:8px}.native-unit-health[data-friendly-health="base"].critical{box-shadow:0 0 0 1px #eb8272;background:#341919}.native-unit-health[data-friendly-health="base"].critical>i{background:#e75d50!important}
.invulnerable-armor{color:#f0e4c8!important;font-weight:500;font-size:12px!important;white-space:nowrap}
.mobile-rpg .defense-status{left:var(--mobile-left);right:var(--mobile-right);width:auto;transform:none;top:var(--defense-dock-top,44px)}
.mobile-rpg .defense-row{gap:5px}.mobile-rpg #base-status{flex-basis:85px;padding:7px 8px;gap:7px}.mobile-rpg #base-status-label{font-size:10px}
.mobile-rpg #defense-status #target-card{padding:7px 8px}.mobile-rpg #defense-status #target-card>div:first-child{flex-wrap:wrap;gap:2px 5px}.mobile-rpg #defense-status #target-name{font-size:11px}.mobile-rpg #defense-status #target-kind{font-size:8px}.mobile-rpg #defense-status #target-hp-value{font-size:9px;margin-left:auto}.mobile-rpg #defense-status .target-health{margin-top:5px;height:6px}
.mobile-rpg #base-danger{font-size:10px;padding:5px 8px;margin-top:5px}
.mobile-rpg #mobile-hero-info{top:var(--unit-dock-top,92px)}
.mobile-rpg #return-base{top:calc(var(--unit-dock-top,92px) + 66px)}
.mobile-rpg #necklace-shortcut{top:calc(var(--unit-dock-top,92px) + 111px)}
.mobile-rpg .location{top:calc(var(--unit-dock-top,92px) + 69px);left:calc(var(--mobile-left) + 53px);max-width:calc(100vw - var(--mobile-left) - 66px)}
@media(max-height:520px) and (orientation:landscape){.mobile-rpg #base-status,.mobile-rpg #defense-status #target-card{padding:5px 9px}.mobile-rpg #base-status{gap:5px}.mobile-rpg #defense-status .target-health{height:5px;margin-top:5px}.mobile-rpg #base-danger{padding:4px 8px}}
.native-unit-health[data-friendly-health="base"]{box-sizing:border-box}

/* Compact target feedback and an aligned hero / return / necklace rail. */
.defense-status{width:min(450px,calc(100vw - 32px))}
#defense-status #target-card{flex:0 1 300px;padding:6px 9px;max-width:300px}
#defense-status #target-card>div:first-child{flex-wrap:wrap;gap:2px 6px}
#defense-status #target-hp-value{font-size:9px}
#defense-status .target-health{margin-top:5px;height:6px}
#base-status{flex-basis:110px;padding:6px 9px;gap:6px}
#hero-shortcut{position:fixed;left:24px;top:var(--unit-dock-top,110px);width:43px;height:43px;padding:2px;z-index:10;border:1px solid #a58a61;border-radius:4px;background:#13201eee;cursor:pointer}
#hero-shortcut img{width:100%;height:100%;object-fit:cover}#hero-shortcut span{position:absolute;bottom:1px;left:0;right:0;font-size:9px;color:#fff1c8;text-shadow:0 1px 2px #000}
#hero-shortcut[hidden]{display:none!important}
body:not(.mobile-rpg) #return-base{top:calc(var(--unit-dock-top,110px) + 49px)}
.mobile-rpg #hero-shortcut{left:calc(var(--mobile-left) + 5px);top:var(--unit-dock-top,92px);width:39px;height:39px}
.mobile-rpg #return-base{top:calc(var(--unit-dock-top,92px) + 45px)}
.mobile-rpg #necklace-shortcut{top:calc(var(--unit-dock-top,92px) + 90px)}
.mobile-rpg #mobile-hero-info{left:calc(var(--mobile-left) + 50px);width:min(160px,calc(100vw - var(--mobile-left) - var(--mobile-right) - 216px));height:43px;padding:3px;gap:5px}
.mobile-rpg #mobile-hero-info>img,.mobile-rpg #mobile-hero-info .native-portrait-canvas{width:32px;height:35px}.mobile-rpg #mobile-hero-info .native-portrait-canvas:not([hidden]){display:block!important}
.mobile-rpg #mobile-hero-info #mobile-hero-level{display:none}
.mobile-rpg .location{top:calc(var(--unit-dock-top,92px) + 47px)}

.defense-row{justify-content:center}

.defense-row{min-height:42px}
.mobile-rpg #mobile-hero-info em{display:none}

/* Short, transient combat feedback lives above the right-side panels. */
#target-card{position:absolute;z-index:8;top:var(--target-dock-top,76px);right:24px;width:220px;max-width:calc(100vw - 32px);padding:8px 10px;pointer-events:none;border:1px solid #b0866b80;border-radius:5px;background:#211b21ed;box-shadow:0 3px 14px #0004}
#target-card>div:first-child{display:flex;flex-wrap:wrap;align-items:baseline;gap:3px 6px}
#target-kind{font-size:9px;color:#d5ac80;white-space:nowrap}
#target-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:#f1dfd6}
#target-hp-value{flex-basis:100%;text-align:right;font:9px/1.2 ui-monospace,monospace;color:#d7bca9}
#target-card .target-health{height:6px;margin-top:6px;border-radius:2px;background:#513434}
.mobile-rpg #target-card{display:block;right:calc(var(--mobile-right) + 5px);width:155px;padding:6px 8px;top:var(--target-dock-top,44px)}
.mobile-rpg #target-name{font-size:10px}.mobile-rpg #target-kind{font-size:8px}.mobile-rpg #target-hp-value{font-size:8px}
.mobile-rpg .defense-row{justify-content:flex-start}
.mobile-rpg #base-danger{width:min(260px,calc(100% - 175px));min-width:100px}

.yellow-rune-overhead{color:#fff0a6;font:800 clamp(12px,1.2vw,20px)/1.2 Georgia,"Songti SC",serif;letter-spacing:1px;white-space:nowrap;text-shadow:0 2px 4px #000,0 0 12px #ffbf2e,0 0 22px #ff9e2d;animation:yellow-rune-entry-pulse 1.35s ease-in-out infinite}
@keyframes yellow-rune-entry-pulse{50%{filter:brightness(1.35);transform:translate(-50%,-108%) scale(1.06)}}
@media(max-width:700px){.yellow-rune-overhead{font-size:11px}}

/* Shared finish for battle HUD, shops, upgrades and co-op. Native assets remain intact. */
:root{--ui-bg:#111820;--ui-panel:#18212b;--ui-inset:#0d141c;--ui-line:#43515f66;--ui-line-soft:#43515f3d;--ui-gold:#d7be88;--ui-text:#e7e8e5;--ui-muted:#96a4b1;--ui-green:#80bfa6;--ui-red:#ec9286;--ui-radius:10px;--native-hud-height:190px;--console-left:max(12px,calc((100vw - 1008px)/2))}
body{font-family:system-ui,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ui-text)}
button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--ui-gold);outline-offset:3px}
button:disabled{cursor:default}
button:not(:disabled):active{filter:brightness(1.12)}
.hud-top{gap:10px;align-items:center}
.hud-top .brand b{font-size:19px;letter-spacing:3px;color:#e9dcc1}.hud-top .brand small{font-size:9px;letter-spacing:1px;color:var(--ui-muted)}
.hud-top .quest{border:1px solid var(--ui-line);border-radius:8px;background:#111b24e8;padding:9px 12px;box-shadow:none}.hud-top .quest b{font-size:11px;color:#d8cbb0}
.native-resources>span,.hud-top .population,.hud-top #mobile-menu-toggle{height:34px;border:1px solid var(--ui-line);border-radius:7px;background:#141e28eb;box-shadow:inset 0 1px #ffffff05;color:var(--ui-text)}
.native-resources>span{padding:5px 10px;min-width:82px;gap:7px;font:12px/1.2 system-ui;font-variant-numeric:tabular-nums;cursor:pointer}.native-resources b{font:600 13px/1.2 system-ui}.native-resources img{width:19px;height:19px}.hud-top .population{font:12px system-ui;min-width:76px}
.hud-top #mobile-menu-toggle{font-size:11px;min-width:48px}
.hud-utilities{padding:10px!important;border-radius:10px!important;border-color:var(--ui-line)!important;background:#16212bf5!important;box-shadow:0 12px 30px #0005}
.hud-utilities .hud-button{border:1px solid var(--ui-line-soft);background:#1d2a35;font-size:11px!important;border-radius:6px!important}
.location{border:1px solid var(--ui-line-soft);border-radius:6px;background:#131e28da;color:#b9c6cb;font-size:10px;letter-spacing:.5px}
#hero-shortcut,#return-base,#necklace-shortcut,#unit-shortcuts button{border:1px solid #ad967866;border-radius:7px;background:#16222bea;box-shadow:inset 0 1px #ffffff0b,0 3px 12px #0004}
#hero-shortcut img,#return-base img,#necklace-shortcut img,#unit-shortcuts button img{border-radius:4px}
#unit-shortcuts span,#hero-shortcut span,#return-base span{font-size:9px;color:#e1d6c0;text-shadow:0 1px 2px #000}
#inventory-tools button{border-color:var(--ui-line);border-radius:5px;background:#17242eee;color:#c4cbd0;font:10px system-ui;box-shadow:none}
#inventory-tools [aria-pressed=true]{border-color:#91b5a466;color:#c1dbc9;background:#1d302be8}
#base-status,#target-card{border-color:var(--ui-line);background:#152029ee;border-radius:7px;box-shadow:0 3px 12px #0003}
#base-status{color:#b3cdbf}#base-status-label{font-size:11px;font-weight:600}.base-health-track{height:7px;border:0;background:#09140f}.base-health-track i{background:#77b79a}
#base-status.critical{color:#ef9c90;border-color:#b87a725e;background:#291d24ee}
#base-danger{background:#2d1e27eb;border-color:#ad726765;color:#eea498;border-radius:6px;box-shadow:none;font-weight:500}
#target-kind{color:var(--ui-muted)}#target-name{font-weight:600;color:#ded8ce}#target-hp-value{color:#b4a38f}#target-card .target-health{height:5px;border-radius:2px;background:#453039}
#target-hp{background:linear-gradient(90deg,#a95153,#cd9272)}
.battle-summary,#quest-dialog .quest-window{background:#15212ce8;border:1px solid var(--ui-line);border-radius:8px;box-shadow:0 4px 16px #0002;backdrop-filter:none}
.battle-summary header>b,#quest-dialog h2{color:#d4c4a4;font:500 12px/1.4 system-ui;letter-spacing:0}.battle-summary button,#quest-close{border:1px solid var(--ui-line);border-radius:5px;background:#23313d;color:#b9c4ca}
.battle-summary dd{color:#dadbd5}.battle-summary dt{color:var(--ui-muted)}
#notice{border:1px solid var(--ui-line-soft);border-radius:7px;background:#131e28eb;color:#ccd1d1;font:11px/1.5 system-ui;padding:7px 12px;box-shadow:0 4px 16px #0003}
/* Desktop console: a quieter frame, aligned groups and more room for the map. */
body:not(.mobile-rpg) .bottom-hud.native-console{height:var(--native-hud-height);background:linear-gradient(180deg,#19232bf2,#111820fc);border-top:1px solid #aa92794d;box-shadow:0 -6px 25px #0003;font-family:system-ui}
body:not(.mobile-rpg) .native-console:before{display:none}
body:not(.mobile-rpg) .native-console .minimap-panel{left:var(--console-left);top:12px;width:156px;height:166px;border:1px solid var(--ui-line);padding:3px;border-radius:8px;background:#0c131a;overflow:hidden}
body:not(.mobile-rpg) .minimap-tools{left:calc(var(--console-left) + 164px);top:12px;width:30px;height:166px;grid-template-rows:repeat(4,25px) 1fr;gap:4px}
.minimap-tools button{border:1px solid var(--ui-line);border-radius:5px;box-shadow:none;background:#15232c}.minimap-tools .view-distance-label{border-radius:5px;background:#1b2933;color:#a2b0ba;font-family:system-ui}
body:not(.mobile-rpg) .native-console .hero-portrait{left:calc(var(--console-left) + 214px);top:14px;width:116px;height:164px;border:1px solid #8c7c625c;border-radius:9px;background:#16202a}
.native-console .bar{border-color:#101820;border-radius:0;font:11px system-ui}.native-console .bar>i{opacity:.6}.native-console .hp span{color:#e2ebdd}.native-console .mana span{color:#d9e6ed}.native-console .bar>span{text-shadow:0 1px 2px #000}
body:not(.mobile-rpg) .native-console .hero-name{left:calc(var(--console-left) + 350px);top:16px;width:260px;height:23px;display:flex;align-items:center;justify-content:flex-start;font:600 18px/1.2 system-ui;color:#e4d6bc;letter-spacing:.5px}
body:not(.mobile-rpg) .native-console .hero-name b{text-align:left;width:auto}
body:not(.mobile-rpg) .native-console .xp{left:calc(var(--console-left) + 350px);top:46px;width:260px;height:17px;border:0;border-radius:4px;background:#0a1118}
.native-console .xp>i{background:#58644b;opacity:.45}.native-console .xp>span{font:10px/17px system-ui;color:#b9c7b7;text-align:left;padding-left:7px;text-shadow:none}
body:not(.mobile-rpg) .native-console .hero-combat-stats{left:calc(var(--console-left) + 350px);top:76px;width:148px;height:65px;gap:9px;font:10px/1.4 system-ui;color:var(--ui-muted)}
body:not(.mobile-rpg) .native-console .hero-combat-stats>span{gap:8px}.native-console .hero-combat-stats b{font:500 12px/1.5 system-ui;color:#dce2e3}.native-console .hero-combat-stats img{max-width:29px}
body:not(.mobile-rpg) .native-console .hero-attributes{left:calc(var(--console-left) + 515px);top:77px;width:95px;height:67px;font:10px/1.4 system-ui;color:var(--ui-muted);gap:3px}
body:not(.mobile-rpg) .native-console .hero-attributes>span{display:flex;align-items:center;justify-content:space-between;gap:4px}.native-console .hero-attributes b{font:500 12px/1.4 system-ui;color:#dce2e3}.native-console .hero-attributes>img{display:none}
body:not(.mobile-rpg) .hero-status-label{left:calc(var(--console-left) + 350px);top:155px;font:10px/18px system-ui;color:#8595a2}
body:not(.mobile-rpg) #hero-status{left:calc(var(--console-left) + 392px);top:152px;width:218px;height:23px}
body:not(.mobile-rpg) .native-console .inventory-panel{left:calc(var(--console-left) + 634px);top:15px;width:110px;height:163px;border:0}
.native-console .inventory-panel>small{font:10px/16px system-ui;color:#aeb9c0;text-align:left;justify-content:flex-start;padding-left:2px}
body:not(.mobile-rpg) .native-console #hero-inventory{height:144px;gap:5px;padding:0}
.native-console .inventory-slot{border:1px solid #687b8b77;border-radius:5px;padding:2px;background:#0c151e;box-shadow:inset 0 1px #ffffff06;overflow:hidden}.native-console .inventory-slot img{border-radius:3px;object-fit:contain}
.native-console .item-count,.native-console .command-card i{font:10px/1.2 system-ui;border:0;border-radius:3px;background:#09121bc9;color:#dfe3d9}
body:not(.mobile-rpg) .native-console .command-panel{left:calc(var(--console-left) + 766px);top:34px;width:242px;height:144px;right:auto;background:none}
body:not(.mobile-rpg) .native-console .command-heading{top:-21px;bottom:auto;left:0;right:0;height:18px;border:0;padding:0;justify-content:flex-start;background:none;color:#a8b6bf;font:10px system-ui}
.native-console .command-heading small{color:#a8b6bf}.native-console .command-heading button{margin-left:auto;border:1px solid var(--ui-line-soft);border-radius:4px;background:#26343e;color:#cdbd99;padding:1px 7px;height:19px;font:10px system-ui}
body:not(.mobile-rpg) .native-console .command-card{gap:5px;padding:0}
.native-console .command-card button,.native-console .command-card .hero-skill-slot,.native-console .command-card #context-commands>button,.native-console .native-empty-command{border:1px solid #576a7a88;border-radius:5px;padding:2px;background:#0c151d;box-shadow:inset 0 1px #ffffff08}
.native-console .command-card button img,.native-console .skill-icon-wrap>img{object-fit:contain;border-radius:3px}
.native-console .native-empty-command{border-color:#43515f33;background:#101b24}
.native-console .command-card .selected{border-color:#ac9568;box-shadow:inset 0 0 0 1px #ac956840}
/* Common sheets: neutral surfaces and a single hierarchy of type and borders. */
.veil{background:#080e16c9;backdrop-filter:none}
:is(.hero-select,.item-shop-window,.quest-window,.fruit-choice-window,.staff-choice-window,.warehouse-window,.technology-window,.session-window){border:1px solid #6a7c8d55!important;border-radius:14px!important;background:var(--ui-panel)!important;color:var(--ui-text);box-shadow:0 18px 65px #0007!important;scrollbar-width:thin;scrollbar-color:#50606b #151f28;overscroll-behavior:contain}
:is(.item-shop-window,.quest-window,.fruit-choice-window,.staff-choice-window,.warehouse-window,.technology-window,.session-window) h2{font:600 22px/1.35 system-ui;color:#e8dfcf;letter-spacing:.3px}
:is(.item-shop-window,.quest-window,.fruit-choice-window,.staff-choice-window,.warehouse-window,.technology-window,.session-window)>header{background:var(--ui-panel)!important;border-color:var(--ui-line-soft)}
:is(.item-shop-window,.quest-window,.fruit-choice-window,.staff-choice-window,.warehouse-window,.technology-window,.session-window)>header button{border:1px solid var(--ui-line);border-radius:6px;background:#24313b;color:#c4cfd4;box-shadow:none}
:is(.staff-choice-window,.fruit-choice-window) .fruit-choice-list button,.necklace-option{border:1px solid var(--ui-line);border-radius:8px;background:#1d2a35;color:#dbe0df;box-shadow:none}
.fruit-choice-list button small,.fruit-choice-list button span{color:#9fb0bc}
.item-shop-window{background:#15202a!important}.item-shop-card,.compact-shop-card{border-color:var(--ui-line-soft)!important;border-radius:8px!important;background:#1b2833!important;box-shadow:none!important}
.item-shop-card img{border-radius:5px}.item-shop-copy b{color:#e0ddd2}.item-shop-copy small{color:#a69b82}
.item-shop-card button,.item-shop-toolbar button,#online-shop-tabs button,.shop-recipient{border:1px solid var(--ui-line);border-radius:6px;background:#25343e;color:#cad3d5;box-shadow:none}
#online-shop-tabs [aria-pressed=true],.shop-recipients [aria-pressed=true]{background:#3b3b32!important;color:#e8d8b4!important;border-color:#b5a07470!important}
.technology-window .warehouse-upgrades>button{border-color:var(--ui-line);background:#1d2b35;border-radius:8px;box-shadow:none}
/* Lobby and party members. */
#choose-hero{background:#0b121aec}
#choose-hero .hero-select{width:min(1120px,calc(100vw - 32px));padding:24px;text-align:left;background:linear-gradient(155deg,#202a34,#141e28)!important;max-height:calc(100dvh - 32px)}
#choose-hero>section>small{color:#b9a483;font:10px/1.5 system-ui;letter-spacing:2px}
#choose-hero h1{font:600 29px/1.3 system-ui;letter-spacing:.5px;color:#eee6d8;margin:5px 0}
#choose-hero #start-description{color:#9eacb8;line-height:1.6;margin:7px 0 16px;font-size:12px}
#choose-hero .session-picker{background:#111b24;border:1px solid var(--ui-line-soft);border-radius:10px;padding:12px 14px;margin-bottom:12px}
.session-tabs{gap:4px;padding:3px;width:fit-content;border:1px solid var(--ui-line-soft);border-radius:7px;background:#0d1720}
#choose-hero .session-tabs button{border:0;background:none;padding:7px 18px;border-radius:4px;color:#94a4b0;font:12px system-ui;box-shadow:none}
#choose-hero .session-tabs [aria-pressed=true]{background:#33414b;color:#eadbbe;box-shadow:inset 0 1px #ffffff08}
#solo-start{padding-top:10px}.session-picker button,#save-actions button,.session-window>button{border:1px solid var(--ui-line);background:#23323e;color:#d2d9db;border-radius:6px;padding:8px 12px;font:12px system-ui;box-shadow:none}
.room-connect{grid-template-columns:minmax(120px,1fr) auto minmax(120px,1fr) auto;gap:10px;margin-top:12px}.room-connect label{gap:5px;color:#8496a5;font-size:10px}.room-connect input{height:36px;border-color:var(--ui-line);border-radius:6px;background:#0e1821;font:12px system-ui;padding:8px 10px;color:#e2e6e6}
#room-code{font:600 14px ui-monospace,monospace;letter-spacing:2px}#room-name:disabled,#room-code:disabled{opacity:.65}
#online-start[data-room=true] .room-connect{display:none}
.room-overview{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0 4px;margin-top:5px}
.room-overview>div{display:grid;gap:4px}.room-overview small{font:10px system-ui;color:#8699a6;letter-spacing:1px}.room-overview strong{font:600 25px/1.2 ui-monospace,monospace;letter-spacing:4px;color:#e4d4b6}
.connection-chip{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--ui-line-soft);border-radius:20px;padding:5px 9px;background:#1d2b35;color:#9aafbf;white-space:nowrap;font:10px system-ui;font-variant-numeric:tabular-nums}
.connection-chip:before,.connection-dot{content:"";display:inline-block;width:5px;height:5px;border-radius:50%;background:#80bfa6;flex:none}
[data-quality=slow] .connection-dot,.connection-chip[data-quality=slow]:before{background:#d1a76f}
[data-quality=offline] .connection-dot,.connection-chip[data-quality=offline]:before{background:#ce8278}
[data-quality=waiting] .connection-dot,.connection-chip[data-quality=waiting]:before{background:#beac7b}
#room-status{font:11px/1.6 system-ui;color:#91a5b4;margin:8px 0!important}
#room-players,.room-roster{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;padding:0;list-style:none;margin:9px 0}
#room-players li,.room-roster li{display:flex;align-items:center;gap:8px;min-width:0;padding:10px;border:1px solid var(--ui-line-soft);border-left:2px solid var(--player-color,#526572);border-radius:7px;background:#1b2a35}
#room-players li[data-self=true],.room-roster li[data-self=true]{background:#22333f;border-color:#69829355;border-left-color:var(--player-color)}
#room-players img,.room-roster img,.player-slot{width:36px;height:40px;border-radius:5px;object-fit:cover;flex:none;background:#263641;border:1px solid var(--ui-line)}
.player-slot{display:grid;place-items:center;color:#718b9c;font:18px system-ui}.player-copy{min-width:0;flex:1}
#room-players b,.room-roster b{display:flex;align-items:center;gap:4px;overflow:hidden;color:#d4dce0;font:500 11px/1.5 system-ui;white-space:nowrap;text-overflow:ellipsis}
#room-players small,.room-roster small{display:block;color:#839cab;font:9px/1.5 system-ui;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.player-copy em{font:9px system-ui;color:#aaad9f;font-style:normal;flex:none}.player-state{flex:none;text-align:right;font:10px/1.6 system-ui;color:#a5c3b0}.player-state small{color:#8295a1}
#room-players li[data-connected=false] .player-state,.room-roster li[data-connected=false] .player-state{color:#d3af82}
.empty-player{opacity:.65}.empty-player>span:last-child{min-width:0}
.room-actions{align-items:center;gap:8px;margin-top:10px}.room-actions #room-start{margin-right:auto;min-width:180px;border-color:#aa956b66;background:#554936;color:#eee1c5;font-weight:500}.room-actions #room-start:disabled{opacity:.45}
#choose-hero .selection-step{margin:12px 0 8px;padding-top:12px;border-color:var(--ui-line-soft)}.selection-step small{font:11px system-ui;color:#baa685;letter-spacing:.4px}.selection-step span{color:#7e929f;font:10px system-ui}
.difficulty-cards{gap:7px}.difficulty-cards button{padding:9px 11px;background:#1d2b36;border-color:var(--ui-line-soft);border-radius:7px}.difficulty-cards [aria-pressed=true]{border-color:#b69b6770;background:#3b3c32;box-shadow:inset 0 0 0 1px #b69b6722}
#choose-hero .hero-choices{grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin:9px 0 14px}
#choose-hero .hero-choice{min-height:74px;padding:8px;gap:8px;border-color:var(--ui-line-soft);border-radius:7px;background:#1c2a35;box-shadow:none}
#choose-hero .hero-choice img{width:42px;height:49px;border-radius:4px;border-color:#7b8c9755}.hero-choice-info b{font-weight:500!important}#choose-hero .hero-choice b{font-size:11px;color:#d8dfdf}#choose-hero .hero-choice small{color:#8197a5;font:9px/1.45 system-ui}#choose-hero .hero-choice i{display:none}
#choose-hero .hero-choice[aria-pressed=true]{border-color:#b49c7377;background:#3b3c34;box-shadow:inset 0 0 0 1px #b49c7333}#choose-hero .hero-choice:disabled{opacity:.48}
#choose-hero .controls-hint{border-color:var(--ui-line-soft);font:10px/1.5 system-ui;color:#718995;letter-spacing:0;text-align:left}
.session-window{padding:22px;max-height:calc(100dvh - 32px)}.session-window>header{margin-bottom:10px}.session-window p{color:#95a9b7;font:12px/1.7 system-ui}#session-detail{font-size:11px;padding:10px 0;border-top:1px solid var(--ui-line-soft)}.session-window .room-roster{grid-template-columns:repeat(2,minmax(0,1fr))}
#room-badge{display:flex;align-items:center;gap:7px;height:31px;padding:5px 9px;border:1px solid var(--ui-line);border-radius:6px;background:#15222ded;color:#c4d0d7;font:11px system-ui;box-shadow:none;font-variant-numeric:tabular-nums}
#room-badge small{font-size:9px;color:#8fa5b4}#room-badge b{font-size:9px;font-weight:500;color:#a5bdac}
.network-recovery{position:absolute;z-index:16;top:37%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;gap:14px;padding:17px 21px;max-width:calc(100vw - 32px);border:1px solid #aa97775c;border-radius:10px;background:#17232cf5;box-shadow:0 12px 40px #0006;pointer-events:none}
.network-recovery b{display:block;font:500 14px/1.5 system-ui;color:#e4d7bd}.network-recovery p{margin:4px 0 0;color:#97aeba;font:11px/1.5 system-ui}
.connection-spinner{width:21px;height:21px;flex:none;border:2px solid #69808b55;border-top-color:#d7be88;border-radius:50%}
/* Touch keeps inventory tools at its left and the battle field unobstructed. */
.mobile-rpg .native-resources>span,.mobile-rpg .hud-top .population,.mobile-rpg .hud-top #mobile-menu-toggle{border-color:var(--ui-line);border-radius:6px;background:#14212bed}
.mobile-rpg .native-resources b{font-family:system-ui;font-weight:500;font-size:11px}.mobile-rpg #mobile-hero-info{background:#16242eea;border-color:var(--ui-line);border-radius:7px}.mobile-rpg #mobile-hero-info b{font-weight:500;color:#d6dccf}
.mobile-rpg .bottom-hud.native-console{background:linear-gradient(180deg,#12202beb,#111a23fa);border-color:#687b8b55}
.mobile-rpg .native-console .inventory-slot,.mobile-rpg .native-console #hero-skill-slots .hero-skill-slot{border-color:#697b8880;border-radius:5px;background:#0e1821}
.mobile-rpg #unit-shortcuts button{border-radius:6px}.mobile-rpg #notice{font-size:10px;line-height:1.4}
.mobile-rpg #quest-dialog .quest-window,.mobile-rpg .battle-summary{background:#15222ce8;backdrop-filter:none;border-color:var(--ui-line)}
.mobile-rpg .joystick{border-color:#abb7bb44;background:#182630a8}.mobile-rpg .joystick i{border-color:#b2bdc02b}.mobile-rpg .joystick b{border-color:#b7bbb577;background:linear-gradient(145deg,#d8d3bc,#889d9f);box-shadow:0 3px 10px #0004}
@media(min-width:901px) and (max-width:1050px){:root{--console-left:10px;--native-hud-height:184px}body:not(.mobile-rpg) .bottom-hud.native-console{font-size:11px}body:not(.mobile-rpg) .native-console .minimap-panel{width:145px}body:not(.mobile-rpg) .minimap-tools{left:160px}body:not(.mobile-rpg) .native-console .hero-portrait{left:203px;width:100px}body:not(.mobile-rpg) .native-console .hero-name,body:not(.mobile-rpg) .native-console .xp,body:not(.mobile-rpg) .native-console .hero-combat-stats,.hero-status-label{left:320px}body:not(.mobile-rpg) .native-console .hero-name,body:not(.mobile-rpg) .native-console .xp{width:230px}body:not(.mobile-rpg) .native-console .hero-attributes{left:475px}body:not(.mobile-rpg) .native-console .inventory-panel{left:574px}body:not(.mobile-rpg) .native-console .command-panel{left:706px;width:calc(100vw - 718px)}body:not(.mobile-rpg) #hero-status{left:363px}}
@media(max-width:900px){#choose-hero .hero-choices{grid-template-columns:repeat(4,minmax(0,1fr))}#room-players{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#choose-hero .hero-select{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:16px;border-radius:11px!important}#choose-hero h1{font-size:23px}#choose-hero #start-description{font-size:11px;line-height:1.55;margin-bottom:12px}#choose-hero .session-picker{padding:10px}#choose-hero .session-tabs{width:100%}#choose-hero .session-tabs button{flex:1;padding:8px 10px;font-size:11px}.room-connect{grid-template-columns:minmax(0,1fr) auto;gap:8px}.room-connect button{align-self:end;height:36px;font-size:11px;padding:7px 10px}#room-players li,.room-roster li{padding:8px 7px;gap:6px}#room-players img,.room-roster img,.player-slot{width:29px;height:34px}.player-state{font-size:9px}#room-players b,.room-roster b{font-size:10px}#room-players small,.room-roster small{font-size:8px}.room-actions{flex-wrap:wrap;gap:6px}.room-actions #room-start{min-width:0;flex-basis:100%;width:100%;margin:0}.room-actions button{font-size:11px;flex:1;padding:8px 10px}.room-overview strong{font-size:23px}.session-window{padding:17px}.session-window .room-roster{grid-template-columns:1fr}.session-window .empty-player{display:none}.difficulty-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.difficulty-cards button{padding:8px}.selection-step span{max-width:150px;text-align:right;font-size:9px}#choose-hero .hero-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}#choose-hero .hero-choice{min-height:74px;padding:7px;gap:7px}#choose-hero .hero-choice img{width:38px;height:46px}#choose-hero .hero-choice b{font-size:11px}#choose-hero .hero-choice small{font-size:8px}#solo-start{flex-wrap:wrap;gap:7px}#solo-start small{flex-basis:100%}.network-recovery{padding:14px 16px;gap:11px;width:calc(100vw - 44px);max-width:340px;top:39%}.network-recovery b{font-size:13px}.network-recovery p{font-size:10px}.item-shop-window{border-radius:11px!important}.item-shop-window h2{font-size:18px}.item-shop-window header{gap:8px}.mobile-rpg #room-badge{height:29px;padding:4px 7px;gap:5px;font-size:10px}}
@media(hover:hover) and (pointer:fine){.hero-choice:hover,.difficulty-cards button:hover,.item-shop-card:hover{border-color:#8196a266!important;background:#22333f!important}button:hover:not(:disabled){filter:brightness(1.06)}.native-console .inventory-slot:hover,.native-console .hero-skill-slot:hover{outline:none;border-color:#c5ac7c}.session-tabs button:hover{color:#e0d6c1}}
@media(prefers-reduced-motion:reduce){.hero-choice,.difficulty-cards button,.item-shop-card,button{transition:none!important}}
.player-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
#room-badge[data-quality=slow] b{color:#d1a76f}#room-badge[data-quality=offline] b{color:#ce8278}
.connection-chip[data-quality=checking]:before,[data-quality=checking] .connection-dot{background:#7796ac}
.connection-chip[data-quality=fair]:before,[data-quality=fair] .connection-dot{background:#beaf89}
.mobile-rpg .native-resources>span,.mobile-rpg .hud-top .population,.mobile-rpg .hud-top #mobile-menu-toggle{height:32px;min-height:32px}
/* Full-width console: fixed controls at the edges, flexible readable stats in between. */
body:not(.mobile-rpg){--console-left:12px;--stats-left:350px;--stats-width:calc(100vw - 674px)}
body:not(.mobile-rpg) .native-console .hero-name,body:not(.mobile-rpg) .native-console .xp{left:var(--stats-left);width:var(--stats-width)}
body:not(.mobile-rpg) .native-console .hero-combat-stats{left:var(--stats-left);width:calc(var(--stats-width) * .58 - 12px)}
body:not(.mobile-rpg) .native-console .hero-attributes{left:calc(var(--stats-left) + var(--stats-width) * .58);width:calc(var(--stats-width) * .42)}
body:not(.mobile-rpg) .native-console .inventory-panel{left:auto;right:294px;width:110px}
body:not(.mobile-rpg) .native-console .command-panel{left:auto;right:12px;width:260px}
body:not(.mobile-rpg) .hero-status-label{left:var(--stats-left)}
body:not(.mobile-rpg) #hero-status{left:calc(var(--stats-left) + 42px);width:calc(var(--stats-width) - 42px)}
.native-console .hero-combat-stats>span,.native-console .hero-combat-stats>span>span,.native-console .hero-attributes>span{white-space:nowrap;min-width:0}
.native-console .hero-combat-stats b,.native-console .hero-attributes b{white-space:nowrap;font-variant-numeric:tabular-nums;font-size:12px;overflow:hidden;text-overflow:ellipsis;min-width:0}
.native-console .hero-combat-stats>span>span:last-child{flex:1;display:flex;align-items:center;gap:6px}
.native-console .hero-combat-stats b{flex:1}.native-console .hero-attributes>span{gap:8px}
body:not(.mobile-rpg) #necklace-shortcut{left:24px;top:calc(var(--unit-dock-top,110px) + 98px);width:43px;height:43px}
.mobile-rpg #necklace-shortcut{left:13px;top:calc(var(--unit-dock-top,92px) + 90px)}
.hud-top .quest{position:absolute;left:50%;transform:translateX(-50%);width:clamp(140px,calc(100vw - 760px),330px);height:38px;max-width:none;flex:none;min-width:0;margin:0;padding:6px 10px;text-align:center}
.hud-top .native-resources{margin-left:auto}
.hud-top #mobile-menu-toggle{margin-left:0}
.hud-top .quest>#quest-caption{display:none}
.top-battle-row{position:absolute;top:50px;left:220px;display:flex;align-items:center;gap:14px;min-width:0;white-space:nowrap;padding:6px 10px;border:1px solid var(--ui-line);border-radius:7px;background:#111b24e8}
.hud-top .quest>#quest{display:block;font:500 12px/24px system-ui;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;font-variant-numeric:tabular-nums}
.top-battle-row #base-status{width:94px;min-width:94px;display:grid;gap:3px;padding:0;border:0;background:none}
.top-battle-row #base-status-label{font:500 11px/14px system-ui;color:#9ad0ac;white-space:nowrap}
.top-battle-row #base-status.critical #base-status-label{color:#ff8179}
.top-battle-row .base-health-track{width:100%;height:4px;margin:0}
#top-hero-battle{font:11px system-ui;color:#cfbf9d;background:transparent;border:0;border-left:1px solid var(--ui-line);padding:3px 0 3px 12px;cursor:pointer;white-space:nowrap}
#defense-status{background:none;border:0;padding:0;width:auto;left:50%;transform:translateX(-50%);pointer-events:none}
#base-danger{pointer-events:auto}
.native-console .command-heading{left:0;right:0;justify-content:flex-end;gap:3px}.native-console .command-heading>small{margin-right:auto}
.native-console .command-heading #skill-page-label{font:10px system-ui;color:var(--ui-muted)}
.native-console .command-panel:has(#context-panel:not([hidden])) :is(#skill-page-prev,#skill-page-next,#skill-page-label){display:none}
.native-console .passive-skill-slot{cursor:help!important}.native-console .passive-skill-slot .skill-icon-wrap{filter:saturate(.75)}
.native-console .passive-skill-slot:not(.attribute-skill-slot):after{content:'被动';position:absolute;bottom:2px;right:3px;font:8px/11px system-ui;color:#e7dfbd;background:#101820d9;padding:0 2px;border-radius:2px;pointer-events:none}
@media(min-width:901px) and (max-width:1150px){body:not(.mobile-rpg){--stats-left:316px;--stats-width:calc(100vw - 640px)}body:not(.mobile-rpg) .native-console .hero-portrait{left:204px;width:100px}body:not(.mobile-rpg) .native-console .minimap-panel{width:145px}body:not(.mobile-rpg) .minimap-tools{left:165px}}
.mobile-rpg .hud-top{flex-wrap:wrap;padding-bottom:6px}
.mobile-rpg .hud-top .quest{position:relative;left:auto;transform:none;display:block!important;order:10;flex:0 0 100%;width:100%;max-width:none;height:27px;padding:2px 7px;box-sizing:border-box;border:0;background:none}
.mobile-rpg .top-battle-row{position:relative;top:auto;left:auto;order:11;flex:none;margin:-4px auto 0;gap:10px;padding:4px 10px}.mobile-rpg .hud-top .quest>#quest{font-size:11px;line-height:22px}
.mobile-rpg .top-battle-row #base-status{width:66px;min-width:66px;gap:1px}.mobile-rpg .top-battle-row #base-status-label{font-size:10px;line-height:12px}
.mobile-rpg #top-hero-battle{font-size:9px;padding-left:7px}.mobile-rpg .native-console .command-heading{left:0;right:0}
@media(prefers-reduced-motion:reduce){#base-status-fill{transition:none}}
body:not(.mobile-rpg){--stats-width:calc(100vw - 774px)}
.top-battle-row #base-status{box-sizing:border-box;min-height:0;height:auto;flex:none}
@media(min-width:901px) and (max-width:1150px){body:not(.mobile-rpg){--stats-width:calc(100vw - 680px)}body:not(.mobile-rpg) .native-console .inventory-panel{right:244px}body:not(.mobile-rpg) .native-console .command-panel{width:210px}}

/* Keep wave, base health and the life card stable while combat targets change. */
.hud-top .wave-status{position:absolute;left:50%;top:0;transform:translateX(-50%);height:38px;display:flex;align-items:center;gap:14px;padding:5px 12px;border:1px solid var(--ui-line);border-radius:7px;background:linear-gradient(180deg,#1d2930f2,#111a22f2);box-shadow:inset 0 1px #e6d3a212,0 3px 14px #0003;max-width:calc(100% - 740px)}
.hud-top .wave-status .quest{position:static;transform:none;width:auto;height:auto;border:0;background:none;padding:0;box-shadow:none;min-width:0}
.wave-status #base-status{position:static;flex:none;width:76px;min-width:76px;padding:0;border:0;background:none;box-shadow:none;display:grid;gap:3px}
.wave-status #base-status-label{font:500 11px/14px system-ui;white-space:nowrap;color:#a5d8b2}.wave-status .base-health-track{height:3px}
.top-battle-row{left:220px;right:auto;top:49px;padding:0;border:0;background:none}
#top-hero-battle{font-size:10px;border:0;padding:0 8px;line-height:18px}
#hero-status{display:flex;align-items:center;gap:5px;overflow-x:auto;scrollbar-width:none;pointer-events:auto}
#hero-status[hidden]{display:none}.hero-buff-icon{position:relative;flex:none;width:23px;height:23px;padding:2px;border:1px solid #c5ae6d99;background:#101920;border-radius:3px;box-shadow:inset 0 0 0 1px #050909,0 2px 6px #0005}.hero-buff-icon img{width:100%;height:100%;object-fit:contain}.hero-buff-icon small{position:absolute;right:0;bottom:-1px;background:#091219dd;color:#f0dfb6;font:9px/12px system-ui;padding:0 2px;text-shadow:0 1px #000}
#target-card{height:66px;min-height:66px;overflow:hidden;box-shadow:inset 0 1px #f1dbac0d,0 4px 16px #0004}
#target-card>div:first-child{height:34px;display:grid;grid-template-columns:auto 1fr;gap:1px 7px;align-content:start}#target-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right}#target-hp-value{grid-column:1/-1;font:11px/16px system-ui;font-variant-numeric:tabular-nums;white-space:nowrap}#target-card .target-health{height:5px;margin-top:7px}
#target-card[data-subject=hero] .target-health{background:#18322a}#target-card[data-subject=hero] #target-hp{background:linear-gradient(90deg,#498560,#9bc388)}
@media(min-width:901px) and (max-width:1150px){.hud-top .wave-status{max-width:calc(100% - 640px);gap:8px;padding:5px 8px}.hud-top .wave-status #quest{font-size:10px}.wave-status #base-status{width:62px;min-width:62px}}
.mobile-rpg .hud-top .wave-status{position:relative;left:auto;top:auto;transform:none;order:10;flex:0 0 100%;max-width:none;justify-content:center;height:30px;border:0;background:none;padding:1px 3px;box-shadow:none;gap:12px}
.mobile-rpg .hud-top .wave-status .quest{order:0;flex:0 1 auto;width:auto;height:28px;padding:0;max-width:calc(100% - 85px)}
.mobile-rpg .wave-status #base-status{width:64px;min-width:64px;gap:1px}.mobile-rpg .wave-status #base-status-label{font-size:10px}
.mobile-rpg .top-battle-row{position:absolute;left:auto;right:0;top:100%;margin:0;padding:0;order:0}
.mobile-rpg #hero-status{display:flex;gap:3px;min-height:23px;overflow-x:auto}.mobile-rpg .hero-buff-icon{width:22px;height:22px}
.mobile-rpg #target-card{height:60px;min-height:60px;padding:6px 8px}.mobile-rpg #target-hp-value{font-size:9px}

.hud-top .wave-status .quest{display:block!important}

/* Aligned native portraits and a compact battle console. */
.hud-heading{position:relative;display:flex;align-items:center;width:160px;flex:none}
.hud-heading .location{position:absolute;left:170px;top:8px;width:clamp(100px,calc(50vw - 390px),280px);height:26px;padding:4px 8px;gap:6px;font-size:9px;letter-spacing:0;border-color:transparent;background:#1018209e}
.hud-heading #area{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#inventory-control-dock{position:absolute;left:218px;top:76px;width:62px;pointer-events:auto}
#inventory-control-dock #inventory-tools{position:static;display:grid;width:100%;grid-template-columns:1fr;gap:6px}
#inventory-control-dock #inventory-tools button{width:100%;height:27px;padding:0 3px;font:10px system-ui;white-space:nowrap;border-radius:4px}
body:not(.mobile-rpg){--stats-left:422px;--stats-width:calc(100vw - 846px)}
body:not(.mobile-rpg) .native-console .hero-portrait{left:294px;width:110px}
.native-console .hero-attributes>span{display:grid;grid-template-columns:18px 26px minmax(0,1fr);align-items:center;gap:6px}
.native-console .hero-attributes>span>img{display:block;width:18px;height:18px;max-width:none;object-fit:contain}
.native-console .hero-attributes>span>span{font-size:10px;white-space:nowrap;color:var(--ui-muted)}
.native-console .hero-attributes>span>b{text-align:right;overflow:hidden;text-overflow:ellipsis}
.native-console .hero-attributes>img{display:none}
@media(min-width:901px) and (max-width:1150px){
  body:not(.mobile-rpg){--stats-left:376px;--stats-width:calc(100vw - 750px)}
  body:not(.mobile-rpg) .native-console .hero-portrait{left:272px;width:92px}
  #inventory-control-dock{left:204px;width:56px}
  .native-console .hero-attributes>span{gap:4px;grid-template-columns:16px 23px minmax(0,1fr)}
  .native-console .hero-attributes>span>img{width:16px;height:16px}
  .native-console .hero-attributes>span>span{font-size:9px}
}
/* A single mobile status card has two independent, labelled actions. */
.mobile-rpg #hero-shortcut,.mobile-rpg #hero-status,.mobile-rpg #inventory-control-dock{display:none!important}
.mobile-rpg .hud-top .hud-heading{order:9;flex:0 0 100%;width:100%;height:25px;gap:9px}
.mobile-rpg .hud-heading .brand{display:block!important;flex:none;min-width:0}
.mobile-rpg .hud-heading .brand small{display:none}
.mobile-rpg .hud-heading .brand b{font:600 15px/23px "Songti SC","STSong",serif;letter-spacing:2px;margin:0}
.mobile-rpg .hud-heading .location{position:static;flex:1;min-width:0;width:auto;height:23px;max-width:none;padding:2px 5px;font-size:9px;border:0;background:#1018208c}
.mobile-rpg #mobile-hero-info{left:calc(var(--mobile-left) + 5px);width:190px;max-width:calc(100vw - 192px);height:49px;padding:3px;display:flex;gap:6px;align-items:center;border:1px solid var(--ui-line);background:#13202eea;z-index:10}
.mobile-rpg #mobile-hero-info[hidden]{display:none}
.mobile-rpg #mobile-portrait-select{position:relative;display:grid;place-items:center;width:38px;height:41px;flex:none;border:1px solid #ac976466;border-radius:3px;padding:0;background:#0a141c;overflow:hidden;cursor:pointer}
.mobile-rpg #mobile-portrait-select>img,.mobile-rpg #mobile-portrait-select .native-portrait-canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.mobile-rpg #mobile-portrait-select .native-portrait-canvas:not([hidden]){display:block!important}
.mobile-rpg #mobile-hero-details{display:flex;flex-direction:column;justify-content:center;gap:3px;min-width:0;flex:1;height:100%;padding:0;border:0;background:none;cursor:pointer;text-align:left;color:#e1e5db}
.mobile-rpg #mobile-hero-name{display:block;width:100%;font:500 10px/12px system-ui;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mobile-rpg #mobile-hero-vitals{display:grid;gap:2px;width:100%}
.mobile-rpg .mobile-vital{display:block;position:relative;height:10px;min-height:10px;border:1px solid #081115;background:#111e26;overflow:hidden}
.mobile-rpg .mobile-vital small{font:8px/9px system-ui;white-space:nowrap;text-align:center;position:absolute;inset:0;color:#eef4e5;z-index:1}
.mobile-rpg .mobile-vital i{position:absolute;inset:0 auto 0 0;height:100%}
.native-console .command-panel.assistant-commands .unit-console-command>b{display:block!important;position:absolute;inset:auto 1px 1px;z-index:3;margin:0;padding:2px 0;background:#071017e8;color:#f0e1c2;font:500 10px/12px system-ui;text-align:center;white-space:normal;max-height:28px;overflow:hidden}
.native-console .command-panel.assistant-commands .unit-console-command>small{display:block!important;position:absolute;right:2px;top:2px;z-index:3;background:#071017da;font:8px/10px system-ui;color:#ddd1b5}
.mobile-rpg .native-console .command-panel.assistant-commands .unit-console-command>b{font-size:9px;line-height:11px}
/* Lobby: dark stone, restrained brass and one portrait rhythm. */
#choose-hero{background:radial-gradient(ellipse at 50% 35%,#262827e8,#0b1015f5 72%)}
#choose-hero .hero-select{width:min(1140px,calc(100vw - 48px));max-height:calc(100dvh - 48px);padding:28px 30px 20px;border:1px solid #b49a6457!important;border-radius:10px!important;background:linear-gradient(150deg,#252a2b,#141b20 65%)!important;box-shadow:0 24px 80px #0009,inset 0 1px #e0c78c19!important;overflow-y:auto}
#choose-hero .lobby-heading{display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,.85fr);gap:34px;align-items:center;padding-bottom:22px;border-bottom:1px solid #c6ae7830}
#choose-hero .lobby-title>small{font:10px/1.5 system-ui;letter-spacing:2px;color:#c3ac7b}
#choose-hero h1{font:600 34px/1.3 "Songti SC","STSong",serif;letter-spacing:2px;margin:8px 0 10px;color:#efdfbd}
#choose-hero #start-description{font:12px/1.7 system-ui;color:#acb3b3;margin:0;max-width:360px}
#choose-hero .session-picker{margin:0;padding:14px 16px;border:1px solid #9b916338;border-radius:6px;background:#0c151aa8}
#choose-hero .session-tabs{background:#0a1217;border-color:#787b6938;border-radius:4px}
#choose-hero .session-tabs button{border-radius:2px;padding:7px 17px;font-size:11px}
#choose-hero .session-tabs [aria-pressed=true]{background:#42433a;color:#eddbb3}
#choose-hero #solo-start{gap:8px;padding-top:11px}
#choose-hero #solo-start button{padding:6px 9px;font-size:10px;background:#222c31;border-color:#68766e55;border-radius:3px}
#choose-hero #solo-start small{display:none}
#choose-hero .selection-step{margin:18px 0 10px;padding:0;border:0}
#choose-hero .selection-step small{font:500 11px system-ui;letter-spacing:1px;color:#ddc793}
#choose-hero .selection-step span{color:#98a6a8;font-size:10px}
#choose-hero .difficulty-cards{gap:8px}
#choose-hero .difficulty-cards button{position:relative;height:80px;padding:12px 13px;border:1px solid #aeb7a82b;border-radius:4px;background:#1a2529;gap:4px;align-content:center;transition:border-color .15s ease,background-color .15s ease}
#choose-hero .difficulty-cards small{font:10px/12px ui-monospace,monospace;letter-spacing:2px;color:#7c9497}
#choose-hero .difficulty-cards b{font:600 12px/18px "Songti SC","STSong",serif;letter-spacing:.5px;color:#d6d6c9;white-space:nowrap}
#choose-hero .difficulty-cards span{font:10px/14px system-ui;color:#91a5a6}
#choose-hero .difficulty-cards [aria-pressed=true]{background:#37392c;border-color:#cfb271;box-shadow:inset 0 0 0 1px #cfb27128}
#choose-hero .difficulty-cards [aria-pressed=true] b{color:#f1dfb0}
#choose-hero #difficulty-description{font:10px/16px system-ui;color:#94a6a4;margin:8px 0 0}
#choose-hero .hero-choices{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin:0 0 16px}
#choose-hero .hero-choice{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:11px;height:84px;min-height:84px;padding:10px 11px;min-width:0;text-align:left;border:1px solid #9baa9e30;border-radius:4px;background:#1b272d;box-shadow:inset 0 1px #d4d9ba05;overflow:hidden;transition:border-color .15s ease,background-color .15s ease}
#choose-hero .hero-choice>img{display:block;flex:none;width:48px;height:48px;min-width:48px;min-height:48px;margin:0;border:1px solid #baa77363;border-radius:2px;object-fit:cover;filter:none}
#choose-hero .hero-choice-info{display:grid;align-content:center;min-width:0;gap:3px;width:100%;overflow:hidden}
#choose-hero .hero-choice-info b{font:600 12px/16px "Songti SC","STSong",serif!important;color:#e3dcc6;letter-spacing:.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
#choose-hero .hero-choice-meta{font:9px/12px system-ui;color:#baa578;letter-spacing:.5px}
#choose-hero .hero-choice-info small{display:block;font:9px/13px system-ui;color:#8dabad;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
#choose-hero .hero-choice[aria-pressed=true]{background:#373b30;border-color:#ceb574}
#choose-hero #original-hero-selection{font-size:10px;color:#b6a77c;padding:0;border:0;margin-top:18px;background:none}
#choose-hero .controls-hint{font:10px/1.5 system-ui;color:#7e9698;padding-top:12px;border-color:#ae9f7130}
@media(hover:hover) and (pointer:fine){
  #choose-hero .hero-choice:hover{background:#26353a!important;border-color:#d0b87999!important;transform:none}
  #choose-hero .difficulty-cards button:hover{background:#28352e!important;border-color:#b5a57299!important}
}
@media(max-width:900px){
  #choose-hero .hero-select{width:calc(100vw - 28px);padding:20px;max-height:calc(100dvh - 28px)}
  #choose-hero .lobby-heading{grid-template-columns:1fr;gap:15px;padding-bottom:16px}
  #choose-hero .lobby-title{display:grid;grid-template-columns:1fr;gap:0}
  #choose-hero h1{font-size:28px;margin:6px 0}
  #choose-hero #start-description{max-width:none;font-size:11px}
  #choose-hero .session-picker{padding:10px 12px}
  #choose-hero .hero-choices{grid-template-columns:repeat(3,minmax(0,1fr))}
  #choose-hero .hero-choice{height:77px;min-height:77px;padding:8px;gap:9px;grid-template-columns:44px minmax(0,1fr)}
  #choose-hero .hero-choice>img{width:44px;height:44px;min-width:44px;min-height:44px}
}
@media(max-width:600px){
  #choose-hero .hero-select{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);padding:16px 13px 12px;border-radius:7px!important}
  #choose-hero .hero-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  #choose-hero .hero-choice{height:75px;min-height:75px;padding:7px;gap:7px;grid-template-columns:40px minmax(0,1fr)}
  #choose-hero .hero-choice>img{width:40px;height:40px;min-width:40px;min-height:40px}
  #choose-hero .hero-choice-info b{font-size:11px!important}
  #choose-hero .hero-choice-meta,#choose-hero .hero-choice-info small{font-size:8px}
  #choose-hero .difficulty-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  #choose-hero .difficulty-cards button{height:70px;padding:8px}
  #choose-hero .difficulty-cards b{font-size:11px;letter-spacing:0}
  #choose-hero .difficulty-cards span{font-size:9px}
  #choose-hero .selection-step{margin-top:15px}
  #choose-hero .controls-hint{font-size:9px}
}
@media(max-height:520px) and (min-width:601px){
  #choose-hero .hero-select{padding:16px 20px;max-height:calc(100dvh - 20px)}
  #choose-hero .lobby-heading{grid-template-columns:1fr 1fr;gap:18px}
  #choose-hero h1{font-size:25px}
  #choose-hero .hero-choices{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(prefers-reduced-motion:reduce){#choose-hero .hero-choice,#choose-hero .difficulty-cards button{transition:none}}

body:not(.mobile-rpg) .native-console .hero-attributes>span{display:grid;grid-template-columns:18px 26px minmax(0,1fr);gap:6px;justify-content:initial}
.mobile-rpg #target-card[data-subject=hero]{visibility:hidden}
.mobile-rpg #return-base,.mobile-rpg #necklace-shortcut,.mobile-rpg #unit-shortcuts button{width:44px;height:44px;min-width:44px;min-height:44px}
.mobile-rpg #return-base{top:calc(var(--unit-dock-top,92px) + 60px)}
.mobile-rpg #necklace-shortcut{top:calc(var(--unit-dock-top,92px) + 110px)}
.mobile-rpg #unit-shortcuts .unit-shortcut-buttons{grid-template-columns:repeat(3,44px)}
.mobile-rpg #unit-shortcuts .unit-shortcut-buttons:has(#companion-shortcuts:empty){grid-template-columns:repeat(2,44px)}
.mobile-rpg .native-console .command-panel{min-width:185px;min-height:138px}
.mobile-rpg .native-console .command-heading{top:auto;bottom:calc(100% + 5px);height:44px;width:185px;gap:3px}
.mobile-rpg .native-console .command-heading button{width:44px;min-width:44px;min-height:44px;padding:0;flex:none}
.mobile-rpg .native-console #hero-skill-book-open{min-height:44px}
.mobile-rpg .native-console #skill-page-label{min-width:34px;text-align:center}
.mobile-rpg .native-console .command-card #hero-skill-slots .hero-skill-slot,.mobile-rpg .native-console .command-card .basic-commands button,.mobile-rpg .native-console .command-card #context-commands>button{min-width:44px;min-height:44px}
.mobile-rpg .native-console .inventory-panel{width:91px;height:150px}
.mobile-rpg .native-console #hero-inventory{height:138px;grid-template-columns:repeat(2,44px);grid-template-rows:repeat(3,44px);gap:3px}
@media(orientation:portrait){
  .mobile-rpg #unit-shortcuts{left:calc(var(--mobile-left) + 55px);top:calc(var(--unit-dock-top,92px) + 60px);bottom:auto}
  .mobile-rpg #unit-shortcuts .unit-shortcut-buttons{max-width:146px;max-height:96px}
  .mobile-rpg .joystick{bottom:calc(var(--native-hud-height) + 64px)}
}
@media(orientation:landscape) and (max-height:600px){
  .mobile-rpg #unit-shortcuts{left:calc(var(--mobile-left) + 208px);top:var(--unit-dock-top,92px);bottom:auto}
  .mobile-rpg #unit-shortcuts .unit-shortcut-buttons{max-width:min(320px,calc(100vw - var(--mobile-left) - var(--mobile-right) - 394px))}
  .mobile-rpg #necklace-shortcut{left:calc(var(--mobile-left) + 55px);top:calc(var(--unit-dock-top,92px) + 60px)}
  .mobile-rpg .joystick{left:calc(var(--mobile-left) + 252px);bottom:calc(var(--native-hud-height) + 18px)}
  .mobile-rpg .native-console .inventory-panel{width:138px;height:104px}
  .mobile-rpg .native-console #hero-inventory{height:91px;grid-template-columns:repeat(3,44px);grid-template-rows:repeat(2,44px)}
  .mobile-rpg .native-console .command-heading{position:fixed;left:calc(var(--mobile-left) + 340px);right:auto;bottom:calc(var(--native-hud-height) + 8px)}
  .mobile-rpg #notice{bottom:calc(var(--native-hud-height) + 62px)}
}
@media(max-width:359px) and (orientation:portrait){
  .mobile-rpg .native-console .inventory-panel{left:var(--mobile-left)}
  .mobile-rpg .native-console .command-panel{left:auto;right:var(--mobile-right);width:185px}
  .mobile-rpg .native-console .minimap-panel{bottom:calc(var(--native-hud-height) + 116px)}
  .mobile-rpg .joystick{left:calc(var(--mobile-left) + 204px)}
}
#choose-hero .hero-select #solo-start{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:8px}

.touch-input-hint{display:none}
.quality-setting{display:flex;align-items:center;gap:10px;margin:15px 0;color:#dbc899;flex-wrap:wrap}
.quality-setting select{background:#192b33;color:#efdfb8;border:1px solid #a8936266;border-radius:4px;padding:8px 12px;font:inherit}
.quality-setting small{color:#97b0b4;font-size:11px}
.item-action-window{width:min(430px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:18px;background:#18262ef5;color:#e9dfc6;border:1px solid #ae976266;border-radius:7px;box-shadow:0 20px 70px #000a}
#item-action-dialog{z-index:60}
.item-action-window header{display:flex;align-items:center;gap:12px}
.item-action-window header>img{width:44px;height:44px;object-fit:contain}
.item-action-window h2{flex:1;min-width:0;font:600 18px/1.5 "Songti SC","STSong",serif;margin:0}
.item-action-window p{font:13px/1.8 system-ui;white-space:pre-line}
#item-action-status{color:#9fb4b7;font-size:11px}
#item-action-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#item-action-buttons button,#item-action-close{min-height:44px;border:1px solid #a58f6266;background:#253a43;color:#e5d7b5;padding:8px 12px;border-radius:4px;cursor:pointer}
.hero-skill-slot[aria-disabled=true]{opacity:.55;filter:saturate(.45)}
@media(pointer:coarse){
  .desktop-input-hint{display:none}.touch-input-hint{display:inline}
  .inventory-slot{touch-action:none;-webkit-touch-callout:none;user-select:none}
  .mobile-rpg .inventory-slot,.mobile-rpg .basic-commands>button,.mobile-rpg .hero-skill-slot,.mobile-rpg .hud-utilities .hud-button,.mobile-rpg #inventory-tools button{min-width:44px;min-height:44px}
  .mobile-rpg .inventory-grid{grid-auto-rows:minmax(44px,auto)}
  .mobile-rpg .assistant-window .inventory-grid{grid-template-rows:repeat(2,44px)}
  .mobile-rpg .assistant-window .inventory-slot{height:44px}
  .mobile-rpg #mobile-portrait-select{width:44px;height:44px}
  .mobile-rpg #mobile-hero-info{height:52px;gap:5px}
  .mobile-rpg #mobile-hero-details{min-height:44px}
  .mobile-rpg #quest-close{width:44px;min-width:44px;height:44px}
  .mobile-rpg #save-actions button,.mobile-rpg .quality-setting select,.mobile-rpg .assistant-actions button,.mobile-rpg .assistant-advanced button,.mobile-rpg .veil header>button{min-height:44px}
  .mobile-rpg .inventory-panel #inventory-tools{gap:5px;display:grid;grid-template-columns:repeat(3,minmax(44px,1fr));width:142px;bottom:calc(var(--native-hud-height) + 8px)}
  .mobile-rpg .inventory-panel #inventory-tools button{width:auto;height:44px;font-size:9px}
  @media(orientation:landscape){.mobile-rpg .inventory-panel #inventory-tools{left:calc(var(--mobile-left) + 96px)}}
  @media(max-width:359px) and (orientation:portrait){.mobile-rpg .inventory-panel #inventory-tools{bottom:calc(var(--native-hud-height) + 60px)}}
}
@media(prefers-reduced-motion:reduce){#item-action-buttons button:active{transform:none}}

/* The portrait and stats share one layout so resizing cannot overlap them. */
body:not(.mobile-rpg) .native-console .hero-panel{
  position:absolute;left:294px;right:426px;top:14px;bottom:12px;
  width:auto;height:auto;min-height:0;padding:0;display:grid;
  grid-template-columns:140px minmax(0,1fr);gap:16px;
  border:0;background:none;box-shadow:none;border-radius:0;align-items:stretch;
}
body:not(.mobile-rpg) .native-console .hero-portrait{
  position:relative;inset:auto;width:100%;height:100%;min-width:0;
  border:1px solid #89795b80;border-radius:7px;background:#0c141b;
}
body:not(.mobile-rpg) .native-console .hero-portrait .bar{height:20px;font-size:11px}
body:not(.mobile-rpg) .native-console .hero-portrait .bar.hp{bottom:20px}
body:not(.mobile-rpg) .native-console .hero-portrait .bar.mana{bottom:0}
body:not(.mobile-rpg) .native-console .hero-portrait>img,
body:not(.mobile-rpg) .native-console .hero-portrait .native-portrait-canvas{height:calc(100% - 40px)}
body:not(.mobile-rpg) .native-console .hero-bars{
  display:grid;grid-template-columns:minmax(0,1.4fr) minmax(112px,1fr);
  grid-template-rows:26px 20px minmax(56px,1fr) 25px;gap:7px 14px;min-width:0;
  padding:0;background:none;position:relative;
}
body:not(.mobile-rpg) .native-console .hero-bars>:is(.hero-name,.xp,.hero-combat-stats,.hero-attributes,.hero-status-label,#hero-status){
  position:relative;inset:auto;width:auto;height:auto;margin:0;min-width:0;
}
body:not(.mobile-rpg) .native-console .hero-name{grid-column:1/-1;grid-row:1;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;gap:12px}
body:not(.mobile-rpg) .native-console .hero-name>b{width:auto!important;min-width:0;flex-basis:auto;text-align:left!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 16px/24px system-ui}
body:not(.mobile-rpg) .native-console #hero-console-level{font:11px/20px system-ui;color:#bcae8f;flex:none}
body:not(.mobile-rpg) .native-console .xp{grid-column:1/-1;grid-row:2;overflow:hidden;border:1px solid #73624780;border-radius:3px;background:#09111b}
body:not(.mobile-rpg) .native-console .xp>i{background:linear-gradient(90deg,#66408d,#a46dce);opacity:.9;border-radius:0}
body:not(.mobile-rpg) .native-console .xp>span{display:grid;place-items:center;padding:0;font:10px/18px system-ui;color:#eee5f4;text-shadow:0 1px 2px #000}
body:not(.mobile-rpg) .native-console .hero-combat-stats{grid-column:1;grid-row:3;display:grid;grid-template-rows:repeat(2,minmax(0,1fr));gap:4px;align-content:center}
body:not(.mobile-rpg) .native-console .hero-combat-stats>span{gap:7px}
body:not(.mobile-rpg) .native-console .hero-combat-stats>span>img,
body:not(.mobile-rpg) .native-console .attack-stat-icon{width:26px;height:26px;max-width:none;flex:none}
body:not(.mobile-rpg) .native-console .hero-combat-stats b{font:500 12px/18px system-ui;white-space:nowrap}
body:not(.mobile-rpg) .native-console .hero-combat-stats>span>span:last-child{min-width:0;max-width:100%}
body:not(.mobile-rpg) .native-console .hero-combat-stats b{max-width:100%;overflow:hidden;text-overflow:ellipsis}
body:not(.mobile-rpg) .native-console .hero-attributes{grid-column:2;grid-row:3;display:grid;grid-template-rows:repeat(3,minmax(0,1fr));gap:3px;align-content:center}
body:not(.mobile-rpg) .native-console .hero-attributes>span{display:grid;grid-template-columns:18px 25px minmax(0,1fr);gap:5px;align-items:center;text-align:left;justify-content:start}
body:not(.mobile-rpg) .native-console .hero-attributes b{text-align:left;margin:0;font:500 12px/18px system-ui}
body:not(.mobile-rpg) .native-console .hero-status-label{grid-column:1/-1;grid-row:4;align-self:center;font:10px/23px system-ui;pointer-events:none}
body:not(.mobile-rpg) .native-console .hero-bars>#hero-status{grid-column:1/-1;grid-row:4;margin-left:40px;display:flex;align-items:center;gap:4px;overflow:hidden}
.native-console .hero-attributes[hidden]{display:none!important}
.native-console .xp[data-unavailable=true]>i{display:none}
@media(min-width:701px) and (max-width:1150px){
  body:not(.mobile-rpg) .native-console .hero-panel{left:270px;right:346px;grid-template-columns:118px minmax(0,1fr);gap:12px}
  body:not(.mobile-rpg) .native-console .command-panel{right:10px;width:210px}
  body:not(.mobile-rpg) .native-console .inventory-panel{right:234px;width:100px}
  body:not(.mobile-rpg) .native-console .hero-bars{grid-template-columns:minmax(0,1.3fr) minmax(100px,1fr);gap:7px 8px}
  body:not(.mobile-rpg) .native-console .hero-combat-stats>span>span:last-child{flex-direction:column;align-items:flex-start;gap:0}
  body:not(.mobile-rpg) .native-console .hero-combat-stats b,
  body:not(.mobile-rpg) .native-console .hero-attributes b{font-size:11px}
}
.mobile-rpg .native-console #hero-console-level{display:none}
@media(min-width:701px) and (max-width:950px){
  body:not(.mobile-rpg) .hud-top{display:grid;grid-template-columns:40px minmax(80px,1fr) auto auto auto;gap:8px}
  body:not(.mobile-rpg) .hud-top .hud-heading{grid-column:2;width:auto;min-width:0;align-self:start}
  body:not(.mobile-rpg) .hud-top .brand{display:block;min-width:0}
  body:not(.mobile-rpg) .hud-top .brand b{font-size:18px;letter-spacing:2px;white-space:nowrap}
  body:not(.mobile-rpg) .hud-top .brand small{font-size:7px;letter-spacing:0}
  body:not(.mobile-rpg) .hud-heading .location{left:0;top:29px;width:180px;max-width:100%;height:20px;padding:2px 4px;font-size:8px}
  body:not(.mobile-rpg) .hud-top .native-resources{grid-column:3;margin:0}
  body:not(.mobile-rpg) .hud-top .population{grid-column:4}
  body:not(.mobile-rpg) .hud-top #mobile-menu-toggle{grid-column:5;margin:0}
  body:not(.mobile-rpg) .hud-top .wave-status{left:50px;top:56px;transform:none;width:auto;max-width:280px;height:32px;padding:3px 8px}
  body:not(.mobile-rpg) .hud-top .wave-status #quest{font-size:10px}
  body:not(.mobile-rpg) .hud-top .top-battle-row{left:50px;top:92px}
  body:not(.mobile-rpg) .native-console .minimap-panel{width:122px}
  body:not(.mobile-rpg) .native-console .minimap-tools{left:140px;width:25px}
  body:not(.mobile-rpg) #inventory-control-dock{left:174px;width:32px}
  body:not(.mobile-rpg) #inventory-control-dock #inventory-tools button{font-size:9px;padding:0}
  body:not(.mobile-rpg) .native-console .hero-panel{left:218px;right:310px;grid-template-columns:98px minmax(0,1fr);gap:10px}
  body:not(.mobile-rpg) .native-console .command-panel{right:8px;width:190px}
  body:not(.mobile-rpg) .native-console .inventory-panel{right:212px;width:86px}
  body:not(.mobile-rpg) .native-console .hero-bars{grid-template-columns:minmax(0,1fr) minmax(68px,1fr);gap:7px 7px}
  body:not(.mobile-rpg) .native-console .hero-attributes>span{grid-template-columns:16px minmax(0,1fr);gap:4px}
  body:not(.mobile-rpg) .native-console .hero-attributes>span>span{display:none}
  body:not(.mobile-rpg) .native-console .hero-name>b{font-size:14px}
}
@media(min-width:701px) and (max-width:800px){
  body:not(.mobile-rpg) .native-console .minimap-panel{width:118px}
  body:not(.mobile-rpg) .native-console .minimap-tools{left:136px;width:24px}
  body:not(.mobile-rpg) #inventory-control-dock{left:164px;width:30px}
  body:not(.mobile-rpg) .native-console .hero-panel{left:202px;right:282px;grid-template-columns:82px minmax(0,1fr);gap:8px}
  body:not(.mobile-rpg) .native-console .command-panel{width:170px}
  body:not(.mobile-rpg) .native-console .inventory-panel{right:190px;width:80px}
  body:not(.mobile-rpg) .native-console .hero-portrait .bar{font-size:9px}
  body:not(.mobile-rpg) .native-console .hero-combat-stats>span{gap:4px}
  body:not(.mobile-rpg) .native-console .hero-combat-stats>span>img,
  body:not(.mobile-rpg) .native-console .attack-stat-icon{width:20px;height:24px}
  body:not(.mobile-rpg) .native-console .hero-combat-stats b{font-size:10px}
}
.quest-overhead.yellow-rune-entrance{display:flex;align-items:center;gap:5px;padding:3px 7px;border:1px solid #f4cb57;border-radius:4px;background:#181008d9;color:#fff0a6;font:800 clamp(11px,1vw,17px)/1.1 Georgia,"Songti SC",serif;letter-spacing:1px;white-space:nowrap;text-shadow:0 1px 3px #000;box-shadow:0 0 0 1px #5e3608,0 0 16px #ffbe30b8;animation:yellow-rune-entry-pulse 1.35s ease-in-out infinite}
.quest-overhead.yellow-rune-entrance img{width:22px;height:22px;object-fit:cover;border:1px solid #fee398;box-shadow:0 0 8px #ffe064}
.quest-overhead.yellow-rune-entrance b{font:inherit}
.quest-overhead.base-aura-overhead{padding:3px 10px;background:none;color:#fff0a6;font:800 clamp(22px,2vw,32px)/1.2 Georgia,"Songti SC",serif;letter-spacing:5px;white-space:nowrap;text-shadow:0 2px 4px #000,0 0 10px #ffbf2e88,0 0 18px #ff9e2d55;animation:none;filter:none;box-shadow:none}
.original-skill-name{position:absolute;z-index:8;transform:translate(-50%,-100%);pointer-events:none;white-space:nowrap;color:#ffdf8e;font:600 13px/1.4 system-ui,"PingFang SC",sans-serif;text-shadow:0 1px 3px #000,0 0 5px #000;letter-spacing:.3px}
.hud-top .brand b{font-weight:800;background:linear-gradient(180deg,#fff4cd 0%,#edcf83 40%,#ac7a33 53%,#f6db95 68%,#d4a655 100%);background-clip:text;-webkit-background-clip:text;color:transparent;text-shadow:0 1px 1px #20150b44;filter:drop-shadow(0 1px 1px #06090c);letter-spacing:3px}
@media(max-width:700px){
  .quest-overhead.yellow-rune-entrance{padding:2px 5px;font-size:10px;gap:3px}
  .quest-overhead.yellow-rune-entrance img{width:17px;height:17px}
  .quest-overhead.base-aura-overhead{font-size:22px;padding:3px 8px;letter-spacing:3px}
}

/* Four inventory tools remain entirely inside the native status console. */
body:not(.mobile-rpg) #inventory-control-dock{top:auto;bottom:12px}
@media(min-width:701px) and (max-width:950px){body:not(.mobile-rpg) #inventory-control-dock #inventory-tools button{white-space:normal;line-height:11px}}
/* Warcraft-style autocast frame remains visible over cooldown and selection. */
.hero-skill-slot.autocast-capable{touch-action:manipulation;-webkit-touch-callout:none;user-select:none}
.hero-skill-slot.autocast-enabled .skill-icon-wrap{box-shadow:inset 0 0 0 2px #ffe294,0 0 0 1px #b88627,0 0 7px #e9b44e99}
.hero-skill-slot.autocast-enabled .skill-icon-wrap::after{content:'↻';position:absolute;left:2px;top:1px;color:#fff0b4;font-size:13px;line-height:14px;text-shadow:0 1px 2px #281805;pointer-events:none;z-index:5}

#farming-travel[aria-pressed="true"]{border-color:#ffe098;box-shadow:inset 0 0 10px #d9a83b77,0 0 8px #e3b95488}

/* Phone controls share one dock; labels and panels leave the battlefield clear. */
#mobile-action-bar{display:none}
body.mobile-rpg{--native-hud-height:calc(196px + env(safe-area-inset-bottom))}
.mobile-rpg .hud-top{display:grid;grid-template-columns:74px minmax(0,1fr) 52px 44px 44px;grid-template-rows:44px 22px;gap:2px 4px;min-height:0;align-items:center;top:max(4px,env(safe-area-inset-top));background:none;padding:0;border:0}
.mobile-rpg .hud-top .hud-heading{display:contents}
.mobile-rpg .hud-top .brand{grid-column:1;grid-row:1;display:block!important;min-width:0}
.mobile-rpg .hud-top .brand b{font-size:15px;line-height:20px;letter-spacing:1px;white-space:nowrap}
.mobile-rpg .hud-top .brand small{display:none}
.mobile-rpg .hud-top .native-resources{grid-column:2;grid-row:1;display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:3px;width:100%;min-width:0;margin:0}
.mobile-rpg .hud-top .native-resources>span{height:30px;min-width:0;padding:0 3px;gap:3px;overflow:hidden;border-radius:3px}
.mobile-rpg .hud-top .native-resources b{font:600 10px/16px system-ui;overflow:hidden;text-overflow:ellipsis;min-width:0}
.mobile-rpg .hud-top .native-resources img{width:14px;height:14px;flex:none}
.mobile-rpg .hud-top #population{grid-column:3;grid-row:1;width:52px;min-width:0;height:44px;padding:0 3px;gap:2px;justify-content:center}
.mobile-rpg .hud-top #population img{width:14px;height:14px}
.mobile-rpg .hud-top #population>span>b{font-size:9px;white-space:nowrap}
.mobile-rpg .hud-top #mobile-menu-toggle{grid-column:5;grid-row:1;width:44px;height:44px;min-width:44px;padding:0;font-size:11px}
.mobile-rpg .hud-top .wave-status{grid-column:1/-1;grid-row:2;position:static;display:flex;justify-content:space-between;flex:none;width:100%;height:22px;max-width:none;padding:0 4px;gap:8px;background:#111c269e;border:0;border-radius:3px;transform:none}
.mobile-rpg .hud-top .wave-status .quest{height:auto;max-width:none;flex:1;min-width:0;padding:0}
.mobile-rpg .hud-top .wave-status #quest{font:500 10px/18px system-ui;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mobile-rpg .wave-status #base-status{width:72px;min-width:72px;gap:1px;padding:0}
.mobile-rpg .wave-status #base-status-label{font:500 10px/13px system-ui}
.mobile-rpg .wave-status .base-health-track{height:2px}
.mobile-rpg .hud-heading .location{position:absolute;left:0;right:0;top:calc(100% + 56px);width:auto;height:17px;max-width:none;padding:0 4px;font:9px/17px system-ui;background:#1018208c;border:0;gap:4px;pointer-events:none}
.mobile-rpg .hud-top .top-battle-row{display:none}
.mobile-rpg.mobile-menu-open .hud-top{display:grid;padding:0;background:none;border:0}
.mobile-rpg.mobile-menu-open .hud-top .hud-utilities{top:calc(100% + 5px);width:min(290px,calc(100vw - 16px));display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
.mobile-rpg.mobile-menu-open .hud-utilities .hud-button{min-height:44px;height:44px;font-size:10px!important;padding:0 4px}
.mobile-rpg #mobile-hero-info{left:var(--mobile-left);top:var(--unit-dock-top);width:calc(100% - var(--mobile-left) - var(--mobile-right) - 150px);max-width:none;height:44px;padding:2px;gap:5px;background:#13202eed;border-radius:4px}
.mobile-rpg #mobile-portrait-select{width:40px;height:40px;min-width:40px;border:0;overflow:visible}
.mobile-rpg #mobile-portrait-select::before{content:'';position:absolute;inset:-2px;z-index:2}
.mobile-rpg #mobile-portrait-select .native-portrait-canvas{width:100%;height:100%;border:0}
.mobile-rpg #mobile-hero-details{min-height:40px;gap:1px}
.mobile-rpg #mobile-hero-name{font:600 10px/12px system-ui}
.mobile-rpg .mobile-unit-heading{display:flex;align-items:center;gap:5px;width:100%;min-width:0;height:12px}
.mobile-rpg .mobile-unit-heading #mobile-hero-name{flex:1;min-width:0;width:auto}
.mobile-rpg #mobile-hero-info #mobile-hero-level{display:block;flex:none;margin:0;font:9px/12px system-ui;color:#d5bd85}
.mobile-rpg #mobile-xp{display:block;position:relative;width:100%;height:2px;min-height:2px;background:#27303c;overflow:hidden}
.mobile-rpg #mobile-xp-fill{display:block;height:100%;background:#b18acf}
.mobile-rpg #mobile-hero-vitals{gap:1px}
.mobile-rpg .mobile-vital{height:11px;min-height:11px}
.mobile-rpg #mobile-hero-info .mobile-vital small{margin:0;font:8px/10px system-ui}
.mobile-rpg #target-card{right:var(--mobile-right);top:var(--unit-dock-top);width:142px;height:44px;min-height:44px;padding:4px 6px;box-sizing:border-box;border-radius:4px}
.mobile-rpg #target-card>div:first-child{gap:0 4px;height:27px;align-content:start}
.mobile-rpg #target-name{font:500 10px/12px system-ui}
.mobile-rpg #target-kind{font:8px/12px system-ui}
.mobile-rpg #target-hp-value{font:8px/12px system-ui;overflow:hidden;text-overflow:ellipsis;text-align:left}
.mobile-rpg #target-card .target-health{height:3px;margin-top:3px}
.mobile-rpg #quest-dialog.collapsed .quest-window{position:fixed;top:max(4px,env(safe-area-inset-top));right:calc(var(--mobile-right) + 48px);width:44px;height:44px;min-height:0;max-height:44px;padding:0;overflow:hidden;background:#15212ce8;border-radius:4px}
.mobile-rpg #quest-dialog.collapsed .quest-window header{position:static;display:block;padding:0;height:44px;background:none}
.mobile-rpg #quest-dialog.collapsed .quest-window header>div{display:none}
.mobile-rpg #quest-close{width:44px;height:44px;min-width:44px;padding:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;font-size:9px;border:0}
.mobile-rpg #quest-close::before{content:'任务';font:500 11px/16px system-ui}
.mobile-rpg #quest-dialog:not(.collapsed) .quest-window{top:calc(var(--unit-dock-top) + 50px);right:var(--mobile-right);width:min(290px,calc(100vw - var(--mobile-left) - var(--mobile-right)));max-height:var(--quest-dock-max-height);padding:6px 8px;background:#15212cf5}
.mobile-rpg #quest-dialog:not(.collapsed) #quest-close::before{content:'收起'}
.mobile-rpg #quest-dialog .quest-row{min-height:44px}
.mobile-rpg #quest-dialog .quest-accept{min-width:44px;min-height:44px}
.mobile-rpg .bottom-hud.native-console{height:var(--native-hud-height);background:linear-gradient(#17232bf5,#0d1720fc);border-top:1px solid #ae966d55}
.mobile-rpg #mobile-action-bar{position:absolute;left:var(--mobile-left);right:var(--mobile-right);top:5px;height:44px;display:flex;align-items:center;gap:4px;overflow:auto hidden;scrollbar-width:thin;scrollbar-color:#8e8157 #13202a;touch-action:pan-x}
.mobile-rpg #mobile-action-bar>:is(#unit-shortcuts,#inventory-tools,.command-heading),
.mobile-rpg #mobile-action-bar .unit-shortcut-buttons{display:contents!important}
.mobile-rpg #mobile-action-bar .command-heading>small{display:none}
.mobile-rpg #mobile-action-bar button{position:relative;inset:auto;flex:0 0 44px;min-width:44px;width:44px;min-height:44px;height:44px;margin:0;padding:2px;border:1px solid #95835f66;border-radius:4px;background:#14232d;color:#e1d6bd;font:10px/13px system-ui;box-shadow:none}
.mobile-rpg #mobile-action-bar #return-base{position:relative;left:auto;top:auto;z-index:auto}
.mobile-rpg #mobile-action-bar button>img{display:block;width:100%;height:100%;object-fit:cover;border-radius:2px}
.mobile-rpg #mobile-action-bar :is(#return-base,#assistant-shortcut,#warehouse-shortcut)>span,
.mobile-rpg #mobile-action-bar #companion-shortcuts button>span{position:absolute;bottom:2px;left:2px;right:2px;font:9px/12px system-ui;background:#061018b8;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mobile-rpg #mobile-action-bar #return-base::after{display:none}
.mobile-rpg #mobile-action-bar :is(#assistant-shortcut,#warehouse-shortcut)[aria-pressed=true]{border-color:#e1c181;box-shadow:inset 0 0 0 1px #e1c18155}
.mobile-rpg #mobile-action-bar #skill-page-label{flex:none;min-width:26px;font:9px system-ui;text-align:center}
.mobile-rpg .native-console .inventory-panel{left:auto;right:calc(var(--mobile-right) + 193px);top:auto;bottom:calc(8px + env(safe-area-inset-bottom));width:92px;height:138px;padding:0}
.mobile-rpg .native-console .inventory-panel>small{display:none}
.mobile-rpg .native-console #hero-inventory{height:138px;grid-template-columns:repeat(2,minmax(44px,1fr));grid-template-rows:repeat(3,44px);gap:3px}
.mobile-rpg .native-console .inventory-slot{height:44px;min-height:44px;padding:1px}
.mobile-rpg .native-console .command-panel{left:auto;right:var(--mobile-right);top:auto;bottom:calc(8px + env(safe-area-inset-bottom));width:185px;height:138px;min-height:138px;min-width:185px}
.mobile-rpg .native-console .command-card{grid-template-columns:repeat(4,minmax(44px,1fr));grid-template-rows:repeat(3,44px);gap:3px}
.mobile-rpg .native-console .minimap-panel{left:var(--mobile-left);top:auto;bottom:calc(8px + env(safe-area-inset-bottom));width:clamp(44px,calc(100vw - 310px),62px);height:clamp(44px,calc(100vw - 310px),62px);padding:1px;border-radius:3px}
.mobile-rpg .native-console .command-card :is(.basic-commands button,.hero-skill-slot)>b{display:block!important;position:absolute;left:1px;right:1px;bottom:1px;height:12px;max-width:none;padding:0 1px;margin:0;color:#eee6d4;background:#07121bd9;font:500 8px/12px system-ui;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;z-index:2;pointer-events:none}
.mobile-rpg .native-console .command-card .basic-commands i{display:none}
.mobile-rpg .native-console .command-card .skill-icon-wrap i{top:1px;bottom:auto;right:2px;left:auto;font-size:8px}
.mobile-rpg .joystick{left:var(--mobile-left);bottom:calc(var(--native-hud-height) + 12px);width:80px;height:80px}
.mobile-rpg #nearby-shop-entry{left:auto;right:var(--mobile-right);transform:none;bottom:calc(var(--native-hud-height) + 12px);min-height:44px;max-width:calc(100vw - 112px);padding:6px 12px;border-radius:5px;font-size:11px}
.mobile-rpg #notice{left:var(--mobile-left);right:var(--mobile-right);top:calc(var(--unit-dock-top) + 48px);bottom:auto;transform:none;max-width:none;padding:4px 6px;font:10px/14px system-ui;text-align:left;max-height:36px;overflow:hidden;background:#182630f5}
.mobile-rpg #necklace-shortcut{left:var(--mobile-left);top:calc(var(--unit-dock-top) + 64px)}
@media(max-width:349px) and (orientation:portrait){
  .mobile-rpg .hud-top{grid-template-columns:64px minmax(0,1fr) 44px 44px 44px;gap:2px 3px}
  .mobile-rpg .hud-top .brand b{font-size:13px;letter-spacing:0}
  .mobile-rpg .hud-top #population{width:44px}
  .mobile-rpg .hud-top .native-resources img{width:11px;height:11px}
  .mobile-rpg .hud-top .native-resources b{font-size:9px}
  .mobile-rpg #mobile-hero-info{width:calc(100% - var(--mobile-left) - var(--mobile-right) - 136px)}
  .mobile-rpg #target-card{width:128px}
  .mobile-rpg #mobile-action-bar{left:var(--mobile-left)}
  .mobile-rpg .native-console .inventory-panel{left:var(--mobile-left);right:auto}
  .mobile-rpg .native-console .minimap-panel{left:calc(var(--mobile-left) + 88px);top:auto;bottom:calc(var(--native-hud-height) + 12px);width:44px;height:44px}
}
@media(orientation:landscape) and (max-height:600px){
  body.mobile-rpg{--native-hud-height:calc(154px + env(safe-area-inset-bottom))}
  .mobile-rpg .hud-top{grid-template-rows:44px}
  .mobile-rpg .hud-top .native-resources{width:min(140px,100%);justify-self:end}
  .mobile-rpg #mobile-hero-info{width:190px}
  .mobile-rpg .hud-top .wave-status{position:absolute;grid-area:auto;left:80px;right:auto;top:11px;width:calc(100% - 430px);max-width:340px;height:22px;justify-self:auto}
  .mobile-rpg .hud-heading .location{left:198px;right:auto;top:52px;width:calc(100% - 348px);max-width:440px}

  .mobile-rpg .bottom-hud.native-console{display:grid;grid-template-columns:52px 92px minmax(140px,1fr) 185px;grid-template-rows:minmax(0,1fr);align-content:stretch;gap:8px;padding:8px var(--mobile-right) calc(8px + env(safe-area-inset-bottom)) var(--mobile-left);align-items:end}
  .mobile-rpg #mobile-action-bar{position:static;grid-column:3;grid-row:1;display:grid;grid-template-columns:repeat(3,minmax(44px,1fr));grid-auto-rows:44px;gap:3px;height:138px;max-height:138px;min-width:0;overflow:auto;touch-action:pan-y}
  .mobile-rpg #mobile-action-bar button{width:100%;min-width:44px}
  .mobile-rpg #mobile-action-bar #skill-page-label{position:relative;display:grid;place-items:center}
  .mobile-rpg .native-console .minimap-panel{grid-column:1;grid-row:1;position:relative;inset:auto;width:52px;height:52px}
  .mobile-rpg .native-console .inventory-panel{grid-column:2;grid-row:1;position:relative;inset:auto;width:92px;height:138px}
  .mobile-rpg .native-console .command-panel{grid-column:4;grid-row:1;position:relative;inset:auto;width:185px;height:138px}
  .mobile-rpg .joystick{left:var(--mobile-left);bottom:calc(var(--native-hud-height) + 8px);width:64px;height:64px}
  .mobile-rpg #nearby-shop-entry{bottom:calc(var(--native-hud-height) + 8px)}
}
@media(orientation:landscape) and (max-height:600px) and (min-width:760px){
  body.mobile-rpg{--native-hud-height:calc(108px + env(safe-area-inset-bottom))}
  .mobile-rpg .hud-top .native-resources{width:min(140px,100%);justify-self:end}
  .mobile-rpg #mobile-hero-info{width:226px}
  .mobile-rpg .hud-heading .location{left:234px;width:calc(100% - 384px)}
  .mobile-rpg .native-console .command-card .native-empty-command{display:none!important}
  .mobile-rpg .bottom-hud.native-console{grid-template-columns:64px 138px minmax(232px,1fr) 284px}
  .mobile-rpg .native-console .minimap-panel{width:64px;height:64px}
  .mobile-rpg .native-console .inventory-panel{width:138px;height:92px}
  .mobile-rpg .native-console #hero-inventory{height:92px;grid-template-columns:repeat(3,minmax(44px,1fr));grid-template-rows:repeat(2,44px);gap:3px}
  .mobile-rpg #mobile-action-bar{grid-template-columns:repeat(5,minmax(44px,1fr));height:92px;max-height:92px}
  .mobile-rpg .native-console .command-panel{width:284px;height:92px;min-height:92px}
  .mobile-rpg .native-console .command-card{grid-template-columns:repeat(6,minmax(44px,1fr));grid-template-rows:repeat(2,44px)}
  .mobile-rpg .native-console .command-card .basic-commands button,
  .mobile-rpg .native-console .command-card #hero-skill-slots .hero-skill-slot[style]{grid-column:auto!important;grid-row:auto!important}
}

/* Catalog owns its scrolling area; HUD dimensions never constrain the dialog. */
#item-shop-dialog.online-shop{top:64px;right:16px;bottom:16px;left:auto;width:min(700px,calc(100vw - 32px));height:auto;max-height:720px}
.online-shop .item-shop-window{min-height:0;padding:14px;gap:10px}
.online-shop .item-shop-window>header{display:flex;padding:0 0 10px;gap:10px;min-height:44px}
.online-shop .item-shop-window>header>div{min-width:0;flex:1}
.online-shop .item-shop-window>header h2{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.online-shop .item-shop-window>header>button{width:44px;height:44px;min-width:44px;margin:0}
.online-shop .item-shop-window>p{display:none!important}
.online-shop #shop-recipients{flex:none;flex-wrap:nowrap;overflow:auto;padding:0;min-height:36px}
.online-shop #shop-recipients::before{white-space:nowrap}
.online-shop #shop-recipients button{flex:none;min-height:36px}
.online-shop .shop-browser{min-height:0;grid-template-columns:108px minmax(0,1fr);gap:10px;overflow:hidden}
.online-shop .shop-catalog{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.online-shop #item-shop-list{overflow:visible;flex:none;grid-template-columns:repeat(2,minmax(0,1fr));padding:0;gap:7px}
.online-shop .item-shop-card{align-self:start;min-height:0;grid-template-columns:32px minmax(0,1fr) 48px;padding:8px;gap:6px}
.online-shop .item-shop-card>button{grid-column:3;grid-row:1;min-height:44px;padding:4px}
.online-shop .item-shop-card details{grid-column:1/-1}
.online-shop .item-shop-card summary{min-height:28px;line-height:28px}
.online-shop .item-shop-card:has(details[open]){grid-column:1/-1}
.online-shop .item-search{flex:none;margin-bottom:8px;min-height:36px}
.online-shop #shop-inventory-section{flex:none;margin:0 0 8px}
.online-shop #shop-inventory-section h3{font-size:11px;margin:0 0 5px}
.online-shop #shop-inventory-hint{display:none}
body:not(.mobile-rpg) .native-console #context-recipients{position:absolute;right:0;bottom:calc(100% + 6px);width:max-content;max-width:330px;padding:4px 6px;background:#14212af5;border:1px solid #93806166;border-radius:5px}
.native-console #context-recipients[hidden]{display:none!important}
body:not(.mobile-rpg) .native-console .command-card #context-commands>button{position:relative;overflow:hidden}
body:not(.mobile-rpg) .native-console .command-card #context-commands button>span{display:block;position:absolute;left:1px;right:1px;bottom:1px;max-width:none;background:#08121ce8;font:9px/14px system-ui;text-align:center}
.mobile-rpg #item-shop-dialog.online-shop{inset:8px;width:auto;height:auto;max-height:none}
.mobile-rpg .online-shop .item-shop-window{width:100%;max-height:none;padding:10px;gap:7px;overflow:hidden}
.mobile-rpg .online-shop .item-shop-window>header{display:flex;padding-bottom:6px;gap:7px}
.mobile-rpg .online-shop .item-shop-window header small{display:none!important}
.mobile-rpg .online-shop #shop-gold{font-size:10px;gap:3px}
.mobile-rpg .online-shop #online-shop-icon{width:30px;height:30px}
.mobile-rpg .online-shop .shop-browser{grid-template-columns:84px minmax(0,1fr);gap:7px}
.mobile-rpg .online-shop #online-shop-tabs button{min-height:44px;gap:4px;padding:4px 2px;font-size:10px}
.mobile-rpg .online-shop #item-shop-list{grid-template-columns:1fr}
.mobile-rpg .online-shop .item-shop-card{grid-template-columns:30px minmax(0,1fr) 48px;padding:6px}
.mobile-rpg .online-shop #shop-recipients button{min-height:44px}
.mobile-rpg #notice{left:auto;right:var(--mobile-right);top:auto;bottom:calc(var(--native-hud-height) + 8px);width:max-content;max-width:min(240px,calc(100vw - 108px));max-height:38px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;white-space:normal;transform:none;text-align:left;font:10px/15px system-ui;padding:4px 7px;border-radius:4px;pointer-events:none}
@media(orientation:landscape) and (max-height:600px){
 .mobile-rpg .hud-top{grid-template-columns:80px minmax(150px,1fr) 144px 48px 44px 44px;grid-template-rows:38px;gap:4px}
 .mobile-rpg .hud-top .wave-status{position:static;grid-column:2;grid-row:1;width:100%;max-width:300px;height:28px;padding:0 6px;gap:8px}
 .mobile-rpg .hud-top .native-resources{grid-column:3;grid-row:1;width:144px;grid-template-columns:1.35fr 1fr}
 .mobile-rpg .hud-top #population{grid-column:4;width:48px;height:38px}
 .mobile-rpg .hud-top #mobile-menu-toggle{grid-column:6;height:38px}
 .mobile-rpg #quest-dialog.collapsed .quest-window{height:38px;max-height:38px}
 .mobile-rpg #quest-dialog.collapsed .quest-window header,.mobile-rpg #quest-close{height:38px;min-height:38px}
 .mobile-rpg #mobile-hero-info{top:48px;width:204px}
 .mobile-rpg #target-card{top:48px;width:132px}
 .mobile-rpg .hud-heading .location{display:none}
 .mobile-rpg #necklace-shortcut{top:100px}
 .mobile-rpg #notice{bottom:calc(var(--native-hud-height) + 6px);max-width:220px;font-size:9px;line-height:13px;max-height:34px}
 .mobile-rpg #item-shop-dialog.online-shop{inset:46px 8px 8px auto;width:min(650px,76vw);height:auto}
 .mobile-rpg .online-shop .item-shop-window{padding:8px;gap:5px}
 .mobile-rpg .online-shop .item-shop-window>header{min-height:36px;padding:0;gap:6px}
 .mobile-rpg .online-shop .item-shop-window h2{font-size:14px}
 .mobile-rpg .online-shop #shop-recipients{position:absolute;left:10px;top:50px;width:94px;max-height:calc(100% - 66px);display:flex;flex-direction:column;align-items:stretch;gap:5px;overflow:auto;padding:0}
 .mobile-rpg .online-shop #shop-recipients::before{font-size:9px;margin:0 0 2px}
 .mobile-rpg .online-shop #shop-recipients button{min-height:44px;width:100%;font-size:10px;padding:4px}
 .mobile-rpg .online-shop .shop-browser{margin-left:104px;grid-template-columns:86px minmax(0,1fr)}
 .mobile-rpg .online-shop[data-mode=nearby] .shop-browser{grid-template-columns:1fr}
 .mobile-rpg .online-shop #item-shop-list{grid-template-columns:repeat(2,minmax(0,1fr))}
 .mobile-rpg .online-shop .item-shop-card{grid-template-columns:26px minmax(0,1fr) 44px;padding:5px;gap:4px}
 .mobile-rpg .online-shop .item-shop-card>img{width:26px;height:26px}
 .mobile-rpg .online-shop .item-shop-copy b{font-size:10px}
 .mobile-rpg .online-shop .item-shop-copy small{font-size:9px}
 .mobile-rpg .online-shop .item-shop-card summary{min-height:20px;line-height:20px}
 .mobile-rpg .bottom-hud.native-console{grid-template-columns:64px 138px minmax(140px,1fr) 284px;gap:6px}
 .mobile-rpg #mobile-action-bar{grid-template-columns:repeat(3,minmax(44px,1fr));grid-auto-rows:44px;align-content:start}
}
@media(orientation:landscape) and (max-height:600px) and (max-width:759px){
 body.mobile-rpg{--native-hud-height:calc(108px + env(safe-area-inset-bottom))}
 .mobile-rpg .bottom-hud.native-console{grid-template-columns:48px 92px minmax(100px,1fr) 232px;gap:5px;padding:8px var(--mobile-right) calc(8px + env(safe-area-inset-bottom)) var(--mobile-left)}
 .mobile-rpg .native-console .minimap-panel{width:48px;height:48px}
 .mobile-rpg .native-console .inventory-panel,.mobile-rpg .native-console #hero-inventory{height:92px}
 .mobile-rpg .native-console #hero-inventory{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,44px)}
 .mobile-rpg #mobile-action-bar{height:92px;max-height:92px;grid-template-columns:repeat(2,minmax(44px,1fr))}
 .mobile-rpg .native-console .command-panel{width:232px;height:92px;min-width:0;min-height:92px}
 .mobile-rpg .native-console .command-card{grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(2,44px);overflow:auto}
 .mobile-rpg .native-console .command-card .native-empty-command{display:none!important}
 .mobile-rpg .native-console .command-card .basic-commands button,.mobile-rpg .native-console .command-card #hero-skill-slots .hero-skill-slot[style]{grid-column:auto!important;grid-row:auto!important}
 .mobile-rpg .hud-top{grid-template-columns:70px minmax(80px,1fr) 124px 44px 44px 44px;gap:2px}
 .mobile-rpg .hud-top .native-resources{width:124px}
 .mobile-rpg .online-shop #item-shop-list{grid-template-columns:1fr}
}
@media(orientation:landscape) and (max-height:600px){
 .mobile-rpg #mobile-action-bar{grid-template-columns:repeat(auto-fill,44px);justify-content:start}
 .mobile-rpg #mobile-action-bar button{width:44px;min-width:44px}
}
/* v142: compact catalogs and utility panels. */
#mobile-character-open{display:none}
body.mobile-menu-open .hud-top{z-index:45}
body.mobile-menu-open .hud-utilities{z-index:46}
#farming-travel{position:absolute;left:24px;top:236px;width:44px;height:50px;z-index:10;padding:2px;border:1px solid #bda263;border-radius:6px;background:linear-gradient(#32423d,#101e24);box-shadow:inset 0 1px #f7d88b44,0 3px 10px #0007;cursor:pointer}
#farming-travel[hidden]{display:none}
#farming-travel svg{width:36px;height:36px;display:block;margin:auto}
#farming-travel>span{display:block;font:9px/11px system-ui;color:#efdca2}
#farming-travel-dialog{z-index:55;background:#060e1570;display:grid;place-items:center}
#farming-travel-dialog.hidden{display:none}
.farming-travel-window{width:min(420px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:16px;border:1px solid #a38b5e;border-radius:10px;background:#14212afc;box-shadow:0 16px 50px #0009}
.farming-travel-window header{display:flex;justify-content:space-between;align-items:center;gap:8px}
.farming-travel-window h2{font-size:18px;margin:3px 0;color:#ead7a5}.farming-travel-window small{font-size:10px;color:#98aab5}
#farming-travel-close{width:44px;height:44px;border:1px solid #6a7b8755;background:#25343e;border-radius:6px;font-size:22px;cursor:pointer}
#farming-travel-list h3{font-size:11px;color:#c5b78f;margin:12px 0 6px}
#farming-travel-list section>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
#farming-travel-list button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:6px;border:1px solid #a58c5755;border-radius:6px;background:linear-gradient(#293b42,#1a2a32);font-size:11px;cursor:pointer}
#farming-travel-list button b{color:#efcd7b;font:18px Georgia}
.mobile-rpg #farming-travel{left:var(--mobile-left);top:calc(var(--unit-dock-top) + 110px)}
.mobile-rpg #quest-dialog:not(.collapsed) .quest-window{width:min(240px,calc(100vw - 24px));max-height:min(280px,calc(100dvh - 190px));padding:8px}
.mobile-rpg #quest-dialog .quest-window h2{font-size:14px}
.mobile-rpg #quest-dialog-description{font-size:10px;line-height:1.4;margin:5px 0}
.mobile-rpg #quest-dialog .quest-row{min-height:34px;padding:4px}.mobile-rpg #quest-dialog .quest-row b{font-size:10px}
.mobile-rpg #quest-dialog .quest-row small{font-size:9px}
.mobile-rpg #item-shop-dialog.online-shop{inset:50% 8px auto;width:auto;height:min(600px,calc(100dvh - 88px));transform:translateY(-50%)}
.mobile-rpg .online-shop .item-shop-window{padding:7px;gap:5px}
.mobile-rpg .online-shop #shop-recipients{min-height:32px}.mobile-rpg .online-shop #shop-recipients button{min-height:32px;padding:4px 7px}
.mobile-rpg .online-shop .shop-browser{grid-template-columns:70px minmax(0,1fr);gap:5px}
.mobile-rpg .online-shop #online-shop-tabs button{min-height:38px;font-size:9px;gap:3px}
.mobile-rpg .online-shop #online-shop-tabs button img{width:19px;height:19px}
.mobile-rpg .online-shop #item-shop-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
.mobile-rpg .online-shop .item-shop-card{grid-template-columns:24px minmax(0,1fr);gap:3px;padding:5px}
.mobile-rpg .online-shop .item-shop-card>img{width:24px;height:24px}
.mobile-rpg .online-shop .item-shop-copy b{font-size:10px;white-space:normal;line-height:13px}
.mobile-rpg .online-shop .item-shop-copy small{font-size:9px;line-height:12px}
.mobile-rpg .online-shop .item-shop-card>button{grid-column:1/-1;grid-row:auto;min-height:30px;font-size:10px;padding:3px}
.mobile-rpg .online-shop .item-shop-card summary{min-height:18px;line-height:18px;font-size:9px}
@media(orientation:landscape) and (max-height:600px){
 .mobile-rpg #mobile-character-open{display:block;grid-column:6;grid-row:1;width:44px;height:38px;padding:0;font-size:11px;border:1px solid #6c7b8844;border-radius:4px;background:#15212ce8}
 .mobile-rpg .hud-top{grid-template-columns:76px minmax(100px,1fr) 138px 44px 44px 44px 44px;gap:3px}
 .mobile-rpg .hud-top #mobile-menu-toggle{grid-column:7}
 .mobile-rpg .hud-top .native-resources{width:138px}
 .mobile-rpg #quest-dialog.collapsed .quest-window{right:calc(var(--mobile-right) + 94px)}
 .mobile-rpg #item-shop-dialog.online-shop{inset:46px 8px auto auto;width:min(560px,72vw);height:min(300px,calc(100dvh - 62px));transform:none}
 .mobile-rpg .online-shop #shop-recipients{position:static;width:auto;max-height:none;flex-direction:row;gap:4px;min-height:28px}
 .mobile-rpg .online-shop #shop-recipients button{width:auto;min-height:28px;padding:3px 7px}
 .mobile-rpg .online-shop #shop-recipients::before{margin-right:3px}
 .mobile-rpg .online-shop .shop-browser{margin-left:0;grid-template-columns:78px minmax(0,1fr)}
 .mobile-rpg .online-shop .item-shop-card{grid-template-columns:24px minmax(0,1fr) 40px;align-items:center}
 .mobile-rpg .online-shop .item-shop-card>button{grid-column:3;grid-row:1;min-height:36px}
 .mobile-rpg #quest-dialog:not(.collapsed) .quest-window{top:48px;width:228px;max-height:calc(100dvh - 64px)}
 .mobile-rpg #farming-travel{top:100px;height:44px}.mobile-rpg #farming-travel svg{width:30px;height:30px}.mobile-rpg #farming-travel>span{font-size:8px;line-height:9px}
 .farming-travel-window{width:min(520px,calc(100vw - 30px));padding:10px 14px}
 #farming-travel-list{display:grid;grid-template-columns:1fr 2fr 1fr;gap:10px}
 #farming-travel-list section>div{grid-template-columns:repeat(2,minmax(0,1fr))}
 #farming-travel-list button{min-height:44px;gap:3px;font-size:9px}
}
@media(orientation:landscape) and (max-height:600px){
 .mobile-rpg .hud-top :is(#mobile-character-open,#mobile-menu-toggle){width:44px;height:38px;min-width:44px;min-height:38px;padding:0;border:1px solid #6c7b8844;border-radius:5px;background:#15212ce8;font:11px system-ui;color:#d4dce0}
}
@media(orientation:landscape) and (max-height:600px){
 .mobile-rpg #quest-dialog:not(.collapsed) .quest-window{width:216px;max-height:min(228px,calc(100dvh - 64px));padding:7px}
 .mobile-rpg #quest-dialog .quest-row{min-height:32px;padding:3px 4px;gap:4px}
 .mobile-rpg #quest-dialog .quest-name{padding:2px;min-height:30px}
 .mobile-rpg #quest-dialog .quest-accept{min-width:36px;min-height:32px;padding:3px}
 .mobile-rpg #quest-dialog .quest-list{gap:4px}
}
#online-shop-tabs button:disabled{opacity:.5;cursor:default}
#online-shop-tabs button:disabled span::after{content:' · 未解锁';font-size:8px;color:#d1b57b}
.mobile-rpg .online-shop .item-shop-card>button{grid-column:2;grid-row:2;min-width:44px;justify-self:end;z-index:1}
.mobile-rpg .online-shop .item-shop-card>details{grid-column:1/-1;grid-row:2;align-self:center}
.mobile-rpg .online-shop .item-shop-card>details[open]{grid-row:3}
@media(orientation:landscape) and (max-height:600px){.mobile-rpg .online-shop .item-shop-card>button{grid-column:3;grid-row:1}.mobile-rpg .online-shop .item-shop-card>details[open]{grid-row:2}}
#mobile-unit-next{display:none}
@media(orientation:landscape) and (max-height:600px){
 body.mobile-rpg{--native-hud-height:144px}
 .mobile-rpg #mobile-hero-info{top:48px;width:176px;height:38px;padding:2px;gap:4px;border-radius:5px}
 .mobile-rpg #mobile-portrait-select{width:32px;height:32px;min-width:32px}
 .mobile-rpg #mobile-hero-details{min-height:32px;gap:0}
 .mobile-rpg .mobile-unit-heading{height:10px}
 .mobile-rpg #mobile-hero-name{font-size:9px;line-height:10px}
 .mobile-rpg #mobile-hero-info #mobile-hero-level{font-size:8px;line-height:10px}
 .mobile-rpg .mobile-vital{height:9px;min-height:9px}
 .mobile-rpg #mobile-hero-info .mobile-vital small{font-size:8px;line-height:9px}
 .mobile-rpg #mobile-unit-next{display:grid;place-items:center;align-self:stretch;flex:none;width:28px;min-width:28px;height:36px;margin:-2px -2px -2px 0;padding:0;border:0;border-left:1px solid #b9a17055;border-radius:0 4px 4px 0;background:#26383fde;color:#ebd59e;font:26px/1 system-ui;touch-action:manipulation}
 .mobile-rpg #mobile-unit-next:active{background:#52604b}
 .mobile-rpg .bottom-hud.native-console{height:144px;display:block;background:none;border:0;box-shadow:none;padding:0;pointer-events:none}
 .mobile-rpg .native-console .basic-commands,.mobile-rpg .native-console .command-card .native-empty-command,.mobile-rpg .native-console .command-card .passive-skill-slot{display:none!important}
 .mobile-rpg .native-console .command-panel{position:absolute;inset:auto var(--mobile-right) 10px auto;width:272px;height:128px;min-height:0;min-width:0;padding:0;background:none;border:0;pointer-events:auto}
 .mobile-rpg .native-console .command-card{display:grid;grid-template-columns:repeat(4,56px);grid-auto-rows:56px;grid-template-rows:none;justify-content:end;align-content:end;gap:8px;width:100%;height:100%;padding:2px;overflow:auto;scrollbar-width:none;background:none;border:0}
 .mobile-rpg .native-console .command-card #hero-skill-slots .hero-skill-slot[style],.mobile-rpg .native-console .command-card .hero-skill-slot{grid-row:auto!important;grid-column:auto!important}
 .mobile-rpg .native-console .command-card .hero-skill-slot{position:relative;display:block;width:56px;height:56px;min-width:56px;min-height:56px;padding:3px;border:2px solid #b9a16d;border-radius:50%;overflow:hidden;background:#142631;box-shadow:inset 0 0 0 1px #fff2,0 2px 7px #0008}
 .mobile-rpg .native-console .command-card .hero-skill-slot .skill-icon-wrap{position:absolute;inset:2px;width:auto;height:auto;overflow:hidden;border-radius:50%}
 .mobile-rpg .native-console .command-card .hero-skill-slot .skill-icon-wrap img{width:100%;height:100%;object-fit:cover}
 .mobile-rpg .native-console .command-card .hero-skill-slot>b{left:2px;right:2px;bottom:3px;height:13px;border-radius:0 0 16px 16px;font:8px/13px system-ui;background:#07121be0}
 .mobile-rpg .native-console .command-card .hero-skill-slot small,.mobile-rpg .native-console .command-card .hero-skill-slot .skill-icon-wrap i{display:none!important}
 .mobile-rpg .native-console .command-card .hero-skill-slot:active:not(:disabled){filter:brightness(1.25)}
 .mobile-rpg .native-console .command-card .cooldown-overlay{border-radius:50%;font-size:15px}
 .mobile-rpg .native-console .inventory-panel{position:absolute;inset:auto auto 8px calc(var(--mobile-left) + 94px);width:138px;height:92px;pointer-events:auto}
 .mobile-rpg .native-console #hero-inventory{height:92px;grid-template-columns:repeat(3,44px);grid-template-rows:repeat(2,44px);gap:3px}
 .mobile-rpg #mobile-action-bar{position:absolute;inset:auto auto 108px calc(var(--mobile-left) + 94px);display:flex;width:calc(100vw - 408px);min-width:140px;height:36px;max-height:36px;gap:4px;overflow:auto hidden;touch-action:pan-x;pointer-events:auto}
 .mobile-rpg #mobile-action-bar button{flex:0 0 36px;min-width:36px;width:36px;min-height:36px;height:36px;font-size:9px}
 .mobile-rpg #mobile-action-bar #unit-shortcuts,.mobile-rpg #mobile-action-bar .unit-shortcut-buttons{display:none!important}
 .mobile-rpg .native-console .minimap-panel{position:absolute;inset:auto auto 110px var(--mobile-left);width:62px;height:62px;pointer-events:auto}
 .mobile-rpg .joystick{left:calc(var(--mobile-left) + 8px);bottom:18px;width:76px;height:76px}
 .mobile-rpg #notice{bottom:auto;top:94px;right:var(--mobile-right);max-width:200px}
 .mobile-rpg #nearby-shop-entry{bottom:154px}
 .mobile-rpg .native-console .command-card #context-commands>button{grid-column:auto!important;grid-row:auto!important;min-width:56px;min-height:56px;width:56px;height:56px}
 .mobile-rpg #farming-travel{top:92px}
}
@media(orientation:landscape) and (max-height:600px){
 .mobile-rpg .native-console #hero-skill-slots .hero-skill-slot{border-radius:50%;border:2px solid #b9a16d;background:#142631;padding:3px;width:56px;height:56px}
 .mobile-rpg .native-console .command-card{align-content:start}
 .mobile-rpg .bottom-hud.native-console::after{display:none!important}
}
@media(orientation:landscape) and (max-height:600px){
 .mobile-rpg .native-console .command-panel{height:auto;max-height:128px;min-height:56px}
 .mobile-rpg .native-console .command-card{height:auto;max-height:128px;min-height:56px;align-content:start}
 .mobile-rpg .native-console [data-console-action=follow],.mobile-rpg .native-console [data-console-action=stop]{display:none!important}
}
@media(orientation:landscape) and (max-height:600px){.mobile-rpg #mobile-unit-next{height:38px;transform:translateY(-1px)}}

#game-defeat-dialog,#game-victory-dialog{background:radial-gradient(ellipse at 50% 42%,#172029b8,#070c13dc);padding:16px}
.result-window{--result-accent:#e3bf75;--result-line:#b3965866;position:relative;width:min(500px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;box-sizing:border-box;padding:28px 32px 26px;border:1px solid var(--result-line);border-radius:8px;background:linear-gradient(145deg,#25303af5,#121b25fc 68%);box-shadow:0 26px 90px #000a,inset 0 1px #eed8a919;text-align:center;font-family:system-ui,"PingFang SC",sans-serif}
#game-defeat-dialog .defeat-window{width:min(500px,calc(100vw - 32px));padding:28px 32px 26px;border:1px solid var(--result-line);border-radius:8px;background:linear-gradient(145deg,#2b2930f5,#171922fc 68%);box-shadow:0 26px 90px #000a,inset 0 1px #eed8a919}
.result-defeat{--result-accent:#db9a83;--result-line:#b67b6466}
.result-window::before,.result-window::after{content:'';position:absolute;width:28px;height:28px;border-color:var(--result-accent);opacity:.5;pointer-events:none}
.result-window::before{left:8px;top:8px;border-left:1px solid;border-top:1px solid}
.result-window::after{right:8px;bottom:8px;border-right:1px solid;border-bottom:1px solid}
.result-edition{display:block;color:#a6aeb5;font:10px/16px system-ui;letter-spacing:1px}
.result-emblem{display:grid;place-items:center;width:96px;height:96px;margin:20px auto 14px;border:1px solid var(--result-line);border-radius:50%;background:radial-gradient(circle,#c8a36616,#101a2200 70%);box-shadow:inset 0 0 0 6px #101b2566}
.result-emblem svg{width:66px;height:66px;fill:none;stroke:var(--result-accent);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.result-eyebrow{display:block;color:var(--result-accent);font:9px/16px system-ui;letter-spacing:3px}
.result-window h2,#game-defeat-dialog .defeat-window h2{margin:10px 0 8px;color:#f2e4c7;font:600 36px/1.35 "Songti SC","STSong",serif;letter-spacing:7px}
.result-defeat h2,#game-defeat-dialog .result-defeat h2{color:#efc6b4}
.result-window>p,#game-defeat-dialog .defeat-window>p{margin:0;font:12px/20px system-ui;color:#aeb9c3}
.result-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:22px 0 16px;border-block:1px solid var(--result-line);padding:8px 0;gap:0;text-align:left}
.result-stats>div{min-width:0;padding:8px 10px}
.result-stats small{display:block;color:#95a3b0;font:10px/15px system-ui}
.result-stats b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:500 15px/24px system-ui;color:#e9dfcd}
.result-window .result-message,#game-defeat-dialog .defeat-window .result-message{font-size:11px;color:#a9aaa4}
.result-actions,#game-defeat-dialog .defeat-window .result-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:22px}
.result-actions button,#game-defeat-dialog .defeat-window .result-actions button{min-height:44px;border:1px solid var(--result-line);border-radius:4px;padding:10px;background:#1c2934;color:#d8dbe0;font:12px system-ui;cursor:pointer}
.result-actions button:last-child,#game-defeat-dialog .defeat-window .result-actions button:last-child{background:#c5a76f;color:#17212b;border-color:#d6bc84}
.result-defeat .result-actions button:last-child,#game-defeat-dialog .result-defeat .result-actions button:last-child{background:#c5947c;border-color:#dbab92}
.unit-group-count{position:absolute;top:2px;right:2px;z-index:3;background:#101923e8;border-radius:3px;padding:1px 3px;font:600 10px/12px system-ui;color:#ffe4a6;pointer-events:none}
@media(max-width:600px){.result-window,#game-defeat-dialog .defeat-window{padding:22px 20px 20px}.result-emblem{width:76px;height:76px;margin:14px auto 10px}.result-emblem svg{width:52px;height:52px}.result-window h2,#game-defeat-dialog .defeat-window h2{font-size:30px;letter-spacing:5px}.result-stats{margin-top:18px}.result-stats b{font-size:13px}}
@media(orientation:landscape) and (max-height:520px){.result-window,#game-defeat-dialog .defeat-window{width:min(600px,calc(100vw - 32px));padding:14px 26px}.result-edition{font-size:9px}.result-emblem{width:54px;height:54px;margin:8px auto 4px}.result-emblem svg{width:38px;height:38px}.result-window h2,#game-defeat-dialog .defeat-window h2{font-size:26px;margin:4px 0}.result-eyebrow{font-size:8px}.result-stats{grid-template-columns:repeat(4,minmax(0,1fr));margin:12px 0 10px;padding:3px 0}.result-stats>div{padding:4px 8px}.result-actions,#game-defeat-dialog .defeat-window .result-actions{margin-top:12px}}

/* Original map artwork, with native-looking metal trim and honest progress. */
#loading{display:flex;flex-direction:column;justify-content:flex-end;align-items:center;padding:26px 20px 20px;gap:7px;background:#030608;isolation:isolate;overflow:hidden}
.original-loading-art{position:absolute;z-index:-2;inset:0;margin:auto;width:min(100vw,133.333dvh);height:min(75vw,100dvh);display:grid;grid-template-columns:1fr 1fr;grid-template-rows:2fr 1fr;opacity:.84}
.original-loading-art i{display:block;background-size:100% 100%;background-repeat:no-repeat}
.original-loading-art i:nth-child(1){background-image:url('./assets/art/chaoyue-map/loading/TL.jpg')}
.original-loading-art i:nth-child(2){background-image:url('./assets/art/chaoyue-map/loading/TR.jpg')}
.original-loading-art i:nth-child(3){background-image:url('./assets/art/chaoyue-map/loading/BL.jpg')}
.original-loading-art i:nth-child(4){background-image:url('./assets/art/chaoyue-map/loading/BR.jpg')}
#loading::after{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(transparent 48%,#030608c9 72%,#030608 100%);pointer-events:none}
#loading>b{font:700 clamp(22px,4vw,34px)/1.2 Georgia,'Songti SC',serif;letter-spacing:6px;color:#ecd18a;text-shadow:0 2px 1px #291a07,0 0 12px #000}
#loading .loading-edition{font:10px/1.4 system-ui;letter-spacing:2px;color:#b5a17c}
#loading>small{font:11px/1.5 system-ui;color:#d0c4a6;max-width:min(540px,90vw)}
#loading .loading-track{width:min(560px,80vw);height:20px;margin-top:7px;padding:3px;border:3px ridge #a69b75;border-radius:0;background:#080b0d;box-shadow:0 0 0 1px #080b0d,0 3px 12px #000a;overflow:hidden}
#loading .loading-track i{height:100%;background:linear-gradient(#ffdb71,#bb7c16 48%,#e6ad35 53%,#7e4b0c);box-shadow:inset 0 1px #fff2;transition:transform 200ms ease-out}
#loading-count{font:10px/1.5 system-ui;color:#a9a696;letter-spacing:0}
/* Warcraft lobby: carved frame, dark stone fields, raised bronze buttons. */
#choose-hero .hero-select,.session-window{border:5px ridge #7a7c71!important;border-radius:0!important;background:linear-gradient(#111b23ed,#081118f5),url('./assets/art/chaoyue-map/console/HumanUITile01.png') 0 0/512px 512px!important;box-shadow:0 0 0 2px #080b0c,0 15px 70px #000c,inset 0 0 0 1px #b8a86c66!important}
#choose-hero h1,.session-window h2{color:#e9c873;text-shadow:0 2px #382405;font-family:Georgia,'Songti SC',serif;letter-spacing:3px}
#choose-hero .session-picker{border:3px ridge #62675e;border-radius:0;background:#050b10dc;padding:14px}
#choose-hero .session-tabs{border:2px groove #555c55;border-radius:0;background:#070c10;padding:3px}
#choose-hero .session-tabs button,.room-connect button,.room-actions button,#solo-start button,.session-window button{border:2px outset #8b8059;border-radius:1px;background:linear-gradient(#34423f,#182522);color:#e2ce91;box-shadow:inset 0 0 0 1px #090f0b;font-size:12px;min-height:36px;padding:6px 12px;text-shadow:0 1px #000;cursor:pointer}
#choose-hero .session-tabs [aria-pressed=true]{border-style:inset;background:linear-gradient(#514328,#302b1c);color:#ffe4a2}
.room-connect input{border:2px inset #63685d;border-radius:0;background:#060d12;color:#e4e0cd;min-height:36px}
#room-overview,.session-window .room-overview{border:1px solid #776b44;border-radius:0;background:#0b1820;padding:10px 12px}
#room-code-display,#session-room-code{color:#edd28b;letter-spacing:4px;font-family:Georgia,serif}
#room-players,.room-roster{display:grid;grid-template-columns:1fr;gap:5px;padding:0;margin:10px 0;list-style:none}
#room-players li,.room-roster li{min-height:52px;display:flex;align-items:center;gap:9px;border:2px inset #626c62;border-radius:0;background:linear-gradient(90deg,#1c302f,#101b21);padding:6px 9px}
#room-players li::before,.room-roster li::before{content:'';width:5px;align-self:stretch;background:#a59460;flex:none}
#room-players li:nth-child(2)::before,.room-roster li:nth-child(2)::before{background:#547fb2}
#room-players li:nth-child(3)::before,.room-roster li:nth-child(3)::before{background:#5b9877}
#room-players li:nth-child(4)::before,.room-roster li:nth-child(4)::before{background:#a86d86}
#room-players img,.room-roster img,.player-slot{width:36px;height:36px;border:2px ridge #a59870;border-radius:0;object-fit:cover}
#room-players .player-copy,.room-roster .player-copy{min-width:0;flex:1}
.player-name{color:#ead9a6}.player-state{margin-left:auto;color:#c6bc98}.empty-player{opacity:.55}
.room-actions #room-start{background:linear-gradient(#5b6337,#2b3b22);border-color:#b6a768;color:#f2dda1}
.room-actions button:disabled,#choose-hero .session-picker button:disabled{opacity:.45;cursor:default}
@media(orientation:landscape) and (max-height:600px){
 /* Crop baked-in square Warcraft icon bevels before applying the round mask. */
 .mobile-rpg .native-console #hero-skill-slots .hero-skill-slot .skill-icon-wrap{inset:0;border:0!important;border-radius:50%!important;background:none;overflow:hidden}
 .mobile-rpg .native-console #hero-skill-slots .hero-skill-slot .skill-icon-wrap img{width:100%;height:100%;max-width:none;object-fit:cover;transform:scale(1.3);border:0;border-radius:0}
 .mobile-rpg .native-console #hero-skill-slots .hero-skill-slot{isolation:isolate;border:2px solid #a9935f;box-shadow:0 2px 5px #0009,inset 0 0 0 1px #f4d58a55}
 .mobile-rpg #mobile-action-bar{bottom:107px;height:32px;max-height:32px;gap:3px;padding:0;background:none;border:0;scrollbar-width:none}
 .mobile-rpg #mobile-action-bar button{flex:0 0 auto;min-width:42px;width:auto;min-height:32px;height:32px;padding:3px 7px;white-space:nowrap;font:10px/24px system-ui;border:1px solid #8b80585c;border-radius:3px;background:#15252dee;color:#d9d2bb;box-shadow:none}
 .mobile-rpg #mobile-action-bar #return-base{width:34px;min-width:34px;padding:2px}
 .mobile-rpg #mobile-action-bar #return-base>img{border:0;border-radius:2px}
 .mobile-rpg #mobile-action-bar #return-base>span{font-size:8px;line-height:10px}
 .mobile-rpg #mobile-action-bar :is(#unequip-item,#sell-item,#auto-pickup,#camera-lock,#hero-skill-book-open)::before{content:none}
 .mobile-rpg #mobile-action-bar button[aria-pressed=true]{border-color:#b7a573;background:#344331;color:#ebdfa9}
 .mobile-rpg #mobile-action-bar .command-heading{display:contents!important}
 #loading{padding-bottom:12px;gap:4px}#loading>b{font-size:22px}#loading .loading-track{margin-top:3px;height:16px}
 #choose-hero .lobby-heading{grid-template-columns:minmax(0,.8fr) minmax(320px,1.2fr);align-items:start;gap:16px}
 #choose-hero .session-picker{padding:9px}
 #room-players li{min-height:44px;padding:4px 7px}
}
@media(max-width:600px){#choose-hero .hero-select{padding:12px!important}#choose-hero .session-picker{padding:9px}.room-connect{gap:5px}#room-players li{min-height:46px;padding:5px}.room-connect button,.room-actions button{font-size:11px;min-height:38px}}
@media(prefers-reduced-motion:reduce){#loading .loading-track i,#loading{transition:none}}
.room-map-preview{display:none}
#choose-hero:has(#mode-online[aria-pressed=true]) .room-map-preview{display:grid;width:min(100%,280px);aspect-ratio:4/3;grid-template-columns:1fr 1fr;grid-template-rows:2fr 1fr;margin:16px auto 0;border:4px ridge #777c6d;box-shadow:0 0 0 1px #050707}
.room-map-preview i{background-size:100% 100%;background-repeat:no-repeat}
.room-map-preview i:nth-child(1){background-image:url('./assets/art/chaoyue-map/loading/TL.jpg')}.room-map-preview i:nth-child(2){background-image:url('./assets/art/chaoyue-map/loading/TR.jpg')}.room-map-preview i:nth-child(3){background-image:url('./assets/art/chaoyue-map/loading/BL.jpg')}.room-map-preview i:nth-child(4){background-image:url('./assets/art/chaoyue-map/loading/BR.jpg')}
@media(orientation:landscape) and (max-height:600px){
 #choose-hero .room-actions{position:sticky;bottom:-9px;background:#091218;z-index:2;padding:7px 0;margin:5px 0 0}
 #choose-hero #room-players{gap:3px;margin:6px 0}
 #choose-hero #room-players li{min-height:38px;padding:3px 6px}
 #choose-hero #room-players :is(img,.player-slot){width:30px;height:30px}
 #choose-hero #room-overview{padding:5px 8px}
 #choose-hero #room-status{font-size:10px;margin:5px 0}
 #choose-hero .room-map-preview{width:min(100%,210px);margin-top:12px}
}
@media(max-width:600px) and (orientation:portrait){#choose-hero:has(#mode-online[aria-pressed=true]) .room-map-preview{display:none}}
/* v145: one-height top rail and menu-owned secondary controls. */
#quest-close{font-size:0!important}
#quest-close::before{content:'收起';font:10px/16px system-ui}
#quest-dialog.collapsed #quest-close::before{content:'任务'}
.mobile-rpg #quest-close{gap:0}
.hud-top .hud-utilities :is(#hero-skill-book-open,#auto-pickup,#camera-lock){display:block;width:auto;min-height:36px;height:auto;margin:0;padding:6px;border:1px solid #7b82604d;border-radius:4px;background:#21302e;font:11px/16px system-ui;white-space:nowrap;color:#ddd5bb}
#mobile-cast-cancel,#mobile-cast-hint{position:absolute;z-index:48;pointer-events:none;color:#eadbc0;font:11px system-ui}
#mobile-cast-cancel[hidden],#mobile-cast-hint[hidden]{display:none}
#mobile-cast-cancel{top:48px;left:50%;transform:translateX(-50%);width:112px;height:62px;display:flex;align-items:center;justify-content:center;gap:4px;flex-direction:column;border:1px solid #cf9d75;border-radius:10px;background:#39252bec;font-size:23px}
#mobile-cast-cancel span{font-size:10px}#mobile-cast-cancel.armed{background:#9b332be8;border-color:#ffc290}
#mobile-cast-hint{left:50%;bottom:10px;transform:translateX(-50%);padding:5px 10px;background:#101d29e8;border:1px solid #a8916155;border-radius:4px}
@media(orientation:landscape) and (max-height:600px){
 .mobile-rpg .hud-top{grid-template-rows:38px}
 .mobile-rpg .hud-top .native-resources>span,.mobile-rpg .hud-top .wave-status,.mobile-rpg .hud-top #population,.mobile-rpg .hud-top #mobile-character-open,.mobile-rpg .hud-top #mobile-menu-toggle{height:38px;min-height:38px;max-height:38px}
 .mobile-rpg #quest-dialog.collapsed .quest-window,.mobile-rpg #quest-dialog.collapsed header,.mobile-rpg #quest-dialog.collapsed #quest-close{height:38px;max-height:38px;min-height:38px}
 .mobile-rpg .hud-top .native-resources{align-items:stretch}
 .mobile-rpg .native-console .command-card .hero-skill-slot{touch-action:none;user-select:none;-webkit-touch-callout:none}
}
body:not(.mobile-rpg) .hud-top .native-resources>span,body:not(.mobile-rpg) .hud-top :is(#population,#mobile-menu-toggle){height:36px;min-height:36px}
#game-defeat-dialog{background:radial-gradient(ellipse at 50% 30%,#51272e99,#05080aee 75%)}
#game-defeat-dialog .defeat-window{width:min(580px,calc(100vw - 28px));padding:30px 36px;border:5px ridge #82795b;border-radius:0;background:radial-gradient(ellipse at 50% 0,#583b2c66,transparent 65%),linear-gradient(#181b1df5,#090f13fc);box-shadow:0 0 0 2px #070a0b,0 0 65px #bb4a2033,inset 0 0 40px #000}
#game-defeat-dialog .result-emblem{width:84px;height:84px;margin:0 auto 10px;color:#c39856;filter:drop-shadow(0 2px 0 #000)}
#game-defeat-title{font:700 clamp(28px,5vw,42px)/1.2 Georgia,'Songti SC',serif!important;letter-spacing:8px;color:#e1c17c!important;text-shadow:0 3px #412713,0 0 24px #b45e2433}
#game-defeat-dialog .result-eyebrow{letter-spacing:4px;color:#a47d51}
#game-defeat-dialog .result-stats{border-block:1px solid #93804c55;padding:14px 0;margin:18px 0;background:#0002}
#game-defeat-dialog .result-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#game-defeat-dialog .result-actions button{border:2px outset #8c8059;border-radius:0;background:linear-gradient(#303c36,#16201d);color:#ddc991;min-height:40px}
#game-defeat-dialog #game-restart{grid-column:1/-1;background:linear-gradient(#785b2e,#3c311c);border-color:#c1a56d;font-size:15px;color:#ffe4a2;min-height:44px}
@media(orientation:landscape) and (max-height:600px){#game-defeat-dialog .defeat-window{width:min(580px,calc(100vw - 28px));padding:14px 22px}#game-defeat-dialog .result-emblem{float:left;width:66px;height:66px;margin:4px 12px 0 0}#game-defeat-dialog .result-stats{margin:10px 0;padding:8px 0}#game-defeat-dialog .result-message{margin:6px 0;font-size:10px}#game-defeat-title{font-size:29px!important}#game-defeat-dialog .result-edition{font-size:9px}}
#game-defeat-dialog .defeat-window .result-actions button:last-child{background:linear-gradient(#303c36,#16201d);color:#ddc991;border-color:#8c8059}
#game-defeat-dialog .result-emblem{border:0;border-radius:0;background:none;box-shadow:none}
#game-defeat-dialog .result-emblem svg{width:68px;height:68px;fill:#181a16;stroke:#c4a269;stroke-width:2}
/* v146: one shared frame for the landscape rail and aligned inventory actions. */
@media(orientation:landscape) and (max-height:600px){
 .mobile-rpg .hud-top .native-resources>span,.mobile-rpg .hud-top #population,.mobile-rpg .hud-top #mobile-character-open,.mobile-rpg .hud-top #mobile-menu-toggle,.mobile-rpg #quest-dialog.collapsed .quest-window{
  box-sizing:border-box;height:38px;min-height:38px;max-height:38px;border:1px solid #71807166;border-radius:4px;background:#14212cee;box-shadow:inset 0 1px #ffffff09;color:#d9d8c9;
 }
 .mobile-rpg .hud-top :is(#population,#mobile-character-open,#mobile-menu-toggle){margin:0;padding:0 5px;font:11px/36px system-ui}
 .mobile-rpg #quest-dialog.collapsed .quest-window{padding:0!important}
 .mobile-rpg #quest-dialog.collapsed header{margin:0;padding:0!important;height:36px;min-height:36px;background:none!important;border:0}
 .mobile-rpg #quest-dialog.collapsed #quest-close{display:grid;place-items:center;width:100%;height:36px;min-height:36px;padding:0;margin:0;border:0;border-radius:0;background:none;font-size:0!important}
 .mobile-rpg #quest-dialog.collapsed #quest-close::before{font:11px/36px system-ui;color:#d9d8c9}
 .mobile-rpg #mobile-action-bar{left:calc(var(--mobile-left) + 94px);right:auto;width:138px;bottom:106px;height:32px;max-height:32px;display:grid;grid-template-columns:1fr 1fr;gap:3px;overflow:visible;padding:0}
 .mobile-rpg #mobile-action-bar #inventory-tools{display:contents!important}
 .mobile-rpg #mobile-action-bar :is(#unequip-item,#sell-item){width:100%;min-width:0;height:32px;padding:0;font:11px/30px system-ui;text-align:center}
 .mobile-rpg #mobile-action-bar #return-base{position:fixed;left:var(--mobile-left);right:auto;top:auto;bottom:180px;width:38px;height:38px;min-width:38px;min-height:38px;line-height:1;padding:2px}
 .mobile-rpg #mobile-action-bar .command-heading{position:fixed;left:calc(var(--mobile-left) + 94px);right:auto;top:auto;bottom:145px;width:138px;height:auto;max-height:32px;display:flex!important;justify-content:flex-start;background:none;border:0;padding:0;gap:3px}
}
@media(orientation:landscape) and (max-height:600px){
 .mobile-rpg #mobile-action-bar{min-width:0;width:138px}
 .mobile-rpg #quest-dialog.collapsed #quest-close{min-width:0;width:100%}
}
@media(orientation:landscape) and (max-height:600px){
 .mobile-rpg #technology-dialog{padding:8px}
 .mobile-rpg #technology-dialog .technology-window{width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 28px);padding:10px 12px;border-radius:5px!important}
 .mobile-rpg #technology-dialog header{padding:0 0 5px;gap:8px}
 .mobile-rpg #technology-dialog h2{font:600 16px/22px system-ui;letter-spacing:1px;margin:0}
 .mobile-rpg #technology-dialog header small{display:none}
 .mobile-rpg #technology-close{width:32px;height:32px;min-width:32px;font-size:20px}
 .mobile-rpg .technology-balance{min-height:0;padding:5px 7px;gap:7px;margin:5px 0;display:flex;align-items:center}
 .mobile-rpg .technology-balance>img{width:26px;height:26px}
 .mobile-rpg .technology-balance>div{display:flex;align-items:center;gap:7px;flex:1}
 .mobile-rpg .technology-balance b{font:600 18px/24px system-ui}
 .mobile-rpg .technology-balance small,.mobile-rpg .technology-balance span{font-size:9px}
 .mobile-rpg .technology-balance p{font:9px/12px system-ui;margin:0}
 .mobile-rpg #warehouse-progress{font:10px/14px system-ui;min-height:0;margin:4px 0}
 .mobile-rpg #warehouse-upgrades{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
 .mobile-rpg #warehouse-upgrades .warehouse-upgrade{display:grid;grid-template-columns:25px minmax(0,1fr) 32px;gap:5px;min-height:62px;padding:5px;border-radius:3px}
 .mobile-rpg #warehouse-upgrades .warehouse-upgrade>img{width:25px;height:25px}
 .mobile-rpg #warehouse-upgrades .warehouse-upgrade b{font:600 10px/14px system-ui}
 .mobile-rpg #warehouse-upgrades .warehouse-upgrade small{font:9px/12px system-ui;margin:2px 0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
 .mobile-rpg #warehouse-upgrades .warehouse-upgrade em{font:9px/12px system-ui}
 .mobile-rpg .technology-price{font:600 13px/16px system-ui;min-width:0}
 .mobile-rpg #item-shop-dialog.online-shop{width:min(520px,72vw);height:min(268px,calc(100dvh - 62px))}
 .mobile-rpg .online-shop .item-shop-window{gap:4px;padding:6px}
 .mobile-rpg .online-shop .item-shop-window>header{min-height:30px}
 .mobile-rpg .online-shop #online-shop-icon{width:25px;height:25px}
 .mobile-rpg .online-shop .item-shop-window h2{font-size:12px}
 .mobile-rpg .online-shop .shop-browser{grid-template-columns:72px minmax(0,1fr);gap:5px}
 .mobile-rpg .online-shop #online-shop-tabs button{min-height:32px;padding:3px 2px}
 .mobile-rpg .online-shop .item-search{min-height:28px;height:28px;margin:0 0 4px;font-size:10px}
 .mobile-rpg .online-shop .item-shop-card{padding:4px;gap:3px;grid-template-columns:22px minmax(0,1fr) 36px}
 .mobile-rpg .online-shop .item-shop-card>img{width:22px;height:22px}
 .mobile-rpg .online-shop .item-shop-copy b{font-size:9px;line-height:12px}
 .mobile-rpg .online-shop .item-shop-copy small{font-size:8px;line-height:11px}
 .mobile-rpg .online-shop .item-shop-card>button{min-width:36px;min-height:30px;font-size:9px}
 .mobile-rpg .online-shop .item-shop-card summary{min-height:14px;line-height:14px;font-size:8px}
}
@media(orientation:landscape) and (max-height:600px){
 .mobile-rpg #technology-dialog .technology-window{width:min(540px,calc(100vw - 24px));height:min(280px,calc(100dvh - 28px));max-height:280px;display:flex;flex-direction:column;overflow:hidden;padding:8px 10px}
 .mobile-rpg #technology-dialog .technology-window>header,.mobile-rpg .technology-balance,.mobile-rpg #warehouse-progress{flex:none}
 .mobile-rpg #warehouse-upgrades{flex:1;min-height:0;overflow:auto;align-content:start;overscroll-behavior:contain;scrollbar-width:thin}
}
/* v148: clean loading screen, no legacy platform poster or logos. */
#loading{background:radial-gradient(ellipse at 50% 38%,#203039,#070d13 70%);padding-bottom:clamp(24px,8dvh,72px)}
#loading .original-loading-art{inset:0;width:100%;height:100%;opacity:1;display:grid;place-items:center;background:none}
#loading .original-loading-art::before{content:'';position:absolute;inset:24px;border:1px solid #a4945e33;box-shadow:inset 0 0 0 3px #101918,0 0 0 1px #070b0e}
#loading .original-loading-art span{position:absolute;top:24%;left:50%;transform:translateX(-50%);font:70px/1 Georgia;color:#a58a4d;text-shadow:0 2px #000;opacity:.7}
#loading::after{background:linear-gradient(transparent 40%,#050a0d70)}
#choose-hero:has(#mode-online[aria-pressed=true]) .room-map-preview{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:radial-gradient(ellipse,#263830,#0b151a);border:3px ridge #777860}
.room-map-preview b{font:600 26px Georgia,'Songti SC',serif;letter-spacing:4px;color:#d2b470;text-shadow:0 2px #000}
.room-map-preview small{font:10px system-ui;letter-spacing:2px;color:#a4ae9f}
@media(orientation:landscape) and (max-height:600px){#loading .original-loading-art span{top:16%;font-size:54px}}
/* v149: nearby NPC catalogs have no category sidebar. */
.mobile-rpg #item-shop-dialog.online-shop[data-mode=nearby] .shop-browser{grid-template-columns:minmax(0,1fr);margin-left:0}
@media(orientation:portrait){
 .mobile-rpg #item-shop-dialog.online-shop[data-mode=nearby] #item-shop-list{grid-template-columns:minmax(0,1fr);gap:6px}
 .mobile-rpg .online-shop[data-mode=nearby] .item-shop-card{grid-template-columns:32px minmax(0,1fr) 52px;gap:7px;padding:7px;align-items:center}
 .mobile-rpg .online-shop[data-mode=nearby] .item-shop-card>img{width:32px;height:32px}
 .mobile-rpg .online-shop[data-mode=nearby] .item-shop-card .item-shop-copy{grid-column:2;grid-row:1;gap:3px}
 .mobile-rpg .online-shop[data-mode=nearby] .item-shop-copy b{font-size:12px;line-height:16px;white-space:normal;overflow:visible;overflow-wrap:anywhere}
 .mobile-rpg .online-shop[data-mode=nearby] .item-shop-copy small{font-size:10px;line-height:14px;white-space:normal;display:block;overflow:visible}
 .mobile-rpg .online-shop[data-mode=nearby] .item-shop-card>button{grid-column:3;grid-row:1;min-width:44px;min-height:44px;justify-self:stretch;padding:4px;font-size:11px}
 .mobile-rpg .online-shop[data-mode=nearby] .item-shop-card>details,.mobile-rpg .online-shop[data-mode=nearby] .item-shop-card>details[open]{grid-column:1/-1;grid-row:2;min-width:0}
 .mobile-rpg .online-shop[data-mode=nearby] .item-shop-card summary{min-height:28px;line-height:28px;font-size:11px}
 .mobile-rpg .online-shop[data-mode=nearby] .item-shop-card details p{white-space:normal;overflow-wrap:anywhere;font-size:11px;line-height:1.6}
}

/* v150: dense portrait nearby catalog, three direct-purchase tiles per row. */
@media(orientation:portrait){
 .mobile-rpg #item-shop-dialog.online-shop[data-mode=nearby] #item-shop-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
 .mobile-rpg .online-shop[data-mode=nearby] .item-shop-card{display:flex;flex-direction:column;align-items:stretch;gap:4px;padding:5px;min-width:0}
 .mobile-rpg .online-shop[data-mode=nearby] .item-shop-card>img{align-self:center;width:28px;height:28px}
 .mobile-rpg .online-shop[data-mode=nearby] .item-shop-card .item-shop-copy{width:100%;gap:3px;flex:1}
 .mobile-rpg .online-shop[data-mode=nearby] .item-shop-copy b{font-size:10px;line-height:14px;min-height:28px;text-align:center}
 .mobile-rpg .online-shop[data-mode=nearby] .item-shop-copy small{font-size:9px;line-height:13px;text-align:center}
 .mobile-rpg .online-shop[data-mode=nearby] .item-shop-card>button{width:100%;max-width:none;min-height:36px;font-size:10px}
 .mobile-rpg .online-shop[data-mode=nearby] .item-shop-card>details{display:none}
}

/* Desktop retains the native quest disclosure arrow. */
body:not(.mobile-rpg) #quest-close{font-size:16px!important}
body:not(.mobile-rpg) #quest-close::before{content:none!important}
#loading .original-loading-art{background:center/100% 100% no-repeat url('./assets/art/chaoyue-map/loading19/original.png');width:min(100vw,133.333dvh);height:min(75vw,100dvh);inset:0;margin:auto}
#loading .original-loading-art::before,#loading .original-loading-art span{display:none}

/* Thunder edition's native four-part loading artwork. */
#loading .original-loading-art{display:grid;place-items:stretch;grid-template-columns:1fr 1fr;grid-template-rows:2fr 1fr;background:none}
/* Keep desktop command cells square and let native icons fill their frame. */
body:not(.mobile-rpg){--desktop-command-cell:clamp(32px,calc((var(--native-hud-height) - 44px)/3),48px)}
body:not(.mobile-rpg) .native-console .command-panel{left:auto;right:12px;width:calc(var(--desktop-command-cell)*4 + 12px);height:calc(var(--desktop-command-cell)*3 + 8px)}
body:not(.mobile-rpg) .native-console .command-card{grid-template-columns:repeat(4,var(--desktop-command-cell));grid-template-rows:repeat(3,var(--desktop-command-cell));gap:4px;padding:0}
body:not(.mobile-rpg) .native-console .command-card :is(button,.hero-skill-slot){box-sizing:border-box;padding:0;min-width:0;min-height:0}
body:not(.mobile-rpg) .native-console .command-card .skill-icon-wrap{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;border-radius:3px;overflow:hidden}
body:not(.mobile-rpg) .native-console .command-card :is(button>img,.skill-icon-wrap>img){width:100%;height:100%;max-width:none;max-height:none;object-fit:cover;border-radius:3px;margin:0}
body:not(.mobile-rpg) .native-console .inventory-panel{right:calc(var(--desktop-command-cell)*4 + 36px)}
