/* Viewport game canvas with compact, touch-friendly HUD. No external UI libraries. */
.game-hud598{--hud-navy:#102c43;--hud-ink:#254d63;--hud-gold:#f7cf78;--hud-edge:#d8ba72;--hud-top:calc(86px + env(safe-area-inset-top));--hud-bottom:calc(82px + env(safe-area-inset-bottom));height:100dvh;min-height:0;margin:0;overflow:hidden;background:#7db9d3;color:var(--hud-ink);font-family:system-ui,-apple-system,"Segoe UI",sans-serif}
.game-hud598 *{box-sizing:border-box}.game-hud598 button{touch-action:manipulation;-webkit-tap-highlight-color:transparent}.game-hud598 button:focus-visible{outline:3px solid #fff2ae;outline-offset:3px}
.game-hud598 #scene{display:block!important;position:fixed;inset:0;width:100%;height:100%;min-height:0;max-height:none;aspect-ratio:auto;margin:0;border:0;border-radius:0;box-shadow:none;overflow:hidden;background:#8cc5dc}
.game-hud598 #scene>canvas{position:absolute;inset:0;width:100%;height:100%;border:0;border-radius:0;touch-action:none}.game-hud598 #worldFx{pointer-events:none}
.game-hud598 .scene-badge{display:none}.game-hud598 .scene-hint{position:absolute;bottom:calc(var(--hud-bottom) + 12px);left:50%;right:auto;transform:translateX(-50%);font-size:10px;white-space:nowrap;padding:6px 12px;border:1px solid #fff4be55;border-radius:20px;background:#102c438c;color:#fff1c9;pointer-events:none}
.game-hud598 .world-controls{position:absolute;bottom:calc(var(--hud-bottom) + 14px);right:16px;left:auto;top:auto;display:flex;gap:4px}.game-hud598 .world-controls button{padding:0;min-width:36px;height:36px;color:#fff0c9;border:1px solid #d6b86f;background:#173d53e8;box-shadow:0 3px 6px #05203d33;border-radius:10px;font-size:16px}.game-hud598 .world-controls [data-world-action="reset"]{font-size:10px;padding:0 8px}
.game-hud598 header{position:fixed;inset:env(safe-area-inset-top) 0 auto;z-index:30;display:flex;align-items:center;gap:8px;height:52px;min-height:0;padding:6px 14px;border:0;background:linear-gradient(#112e46ed,#173a51db);box-shadow:0 2px 0 #dfb96199,0 7px 20px #08273b33}
.game-hud598 .brand{display:none}.game-hud598 #resources{display:flex;flex:1;gap:8px;min-width:0;justify-content:center;margin:0}.game-hud598 .resource{position:relative;display:flex;align-items:center;justify-content:center;gap:6px;min-width:105px;height:34px;margin:0;padding:3px 10px;background:#061c2d90;border:1px solid #8caaa65e;border-radius:11px;box-shadow:inset 0 1px 2px #0004;color:#fff2d1;font-size:13px;font-weight:750;white-space:nowrap;cursor:pointer}.game-hud598 .resource i{font-size:21px;color:#ffd36a;font-style:normal;text-shadow:0 1px 4px #ffbe4733}.game-hud598 .resource:nth-child(2) i{color:#d6b98e}.game-hud598 .resource:nth-child(3) i{color:#b8f6ff}.game-hud598 .resource small{display:none}
.game-hud598 header #accountButton{order:-2;display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;min-width:0;padding:0;border:2px solid #e9c26b;border-radius:13px;background:linear-gradient(145deg,#40677e,#133044);color:#fff4d0;font-size:13px;font-weight:800;box-shadow:0 2px 0 #062337}
.game-hud598 header #settings,.game-hud598 header #noticesBell593,.game-hud598 header #hudFullscreen598{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;padding:0;border:1px solid #d3bd7a99;border-radius:11px;background:#153a50;color:#fff0c9;font-size:17px}.game-hud598 header #settings{font-size:20px}.game-hud598 header #noticesBell593{font-size:13px;white-space:nowrap}
.game-hud598 .hud-icon598 svg{width:20px;height:20px}.game-hud598 .hud-icon598>span{display:none}
.game-hud598 #researchWallet{position:fixed;inset:calc(57px + env(safe-area-inset-top)) 18px auto auto;display:flex;justify-content:flex-end;gap:6px;margin:0;padding:0;z-index:28;background:none;border:0;box-shadow:none;max-width:calc(100vw - 110px)}
.game-hud598 #researchWallet>span,.game-hud598 #researchWallet>.vip-pill{display:flex;align-items:center;gap:5px;height:26px;margin:0;padding:2px 9px!important;background:#173d50df!important;border:1px solid #e7c97c88!important;border-radius:8px;color:#fff0c5!important;font-size:0!important;box-shadow:0 2px 4px #122c3c33;cursor:pointer;white-space:nowrap}.game-hud598 #researchWallet>span b{font-size:10px}.game-hud598 #researchWallet>span:before{content:'▤';font-size:14px;color:#ffe4a0}.game-hud598 #researchWallet>span:nth-child(2):before{content:'✦';color:#d1b7ff}.game-hud598 #researchWallet>span:nth-child(3){display:none}.game-hud598 #researchWallet>.vip-pill{font-size:10px!important;background:linear-gradient(#f9dc8a,#e2ad51)!important;color:#533a20!important;font-weight:800}
.game-hud598 #releaseStrip,.game-hud598 #onlineStatus,.game-hud598 #buildingControls,.game-hud598 #jobs580{display:none!important}
.game-hud598 main{position:fixed;inset:0;display:block;max-width:none;width:100%;height:100%;min-height:0;margin:0;gap:0;padding:0;pointer-events:none;background:none}
.game-hud598 main>aside{display:none!important}.game-hud598 .content{position:fixed;top:calc(var(--hud-top) + 8px);bottom:calc(var(--hud-bottom) + 8px);left:50%;transform:translateX(-50%);width:min(1120px,calc(100% - 32px));min-width:0;min-height:0;margin:0;padding:0 16px 18px;overflow:auto;overscroll-behavior:contain;pointer-events:auto;border:1px solid #e0c27e;border-radius:19px;background:linear-gradient(145deg,#f2f9fcfa,#e8f1f4fa);box-shadow:0 18px 50px #05253766;scrollbar-width:thin;scrollbar-color:#86adb9 transparent}
.game-hud598[data-hud-pane598="closed"] .content{display:none}.game-hud598 .content>.title-row{display:none}.game-hud598 .content>.research-wallet{display:none}.game-hud598 #hudPanelHead598{display:flex;position:sticky;top:0;align-items:center;justify-content:space-between;gap:12px;z-index:10;background:linear-gradient(120deg,#183d54,#265b72);color:#fff1c9;margin:0 -16px 14px;padding:12px 16px;border-bottom:2px solid #e6c477}.game-hud598 #viewTitle{font-size:19px;line-height:1.3;margin:0;color:#fff1ce}.game-hud598 #hudPanelHead598 button{display:grid;place-items:center;min-width:34px;width:34px;height:34px;margin:0;padding:0;border:1px solid #e4c47a88;border-radius:10px;background:#0b263e80;color:#ffedbf}
.game-hud598 #hudDock598{position:fixed;z-index:35;bottom:env(safe-area-inset-bottom);left:50%;transform:translateX(-50%);width:min(750px,calc(100% - 24px));height:72px;padding:4px 6px 6px;border:1px solid #dfbd77;border-bottom:0;border-radius:20px 20px 0 0;background:linear-gradient(#224961f5,#102b42fa);box-shadow:0 -5px 24px #05243844}
.game-hud598 #hudDock598 nav{position:static;display:flex;gap:4px;height:100%;max-height:none;margin:0;padding:0;overflow:visible;background:none;direction:ltr}
.game-hud598 #hudDock598 nav button{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;margin:0;padding:4px 0;border:1px solid transparent;border-radius:13px;background:none;color:#c6dce6;box-shadow:none;transition:background .15s,color .15s;font-size:10px;text-align:center;white-space:nowrap}.game-hud598 #hudDock598 nav button[hidden]{display:none!important}.game-hud598 #hudDock598 svg{width:26px;height:26px;color:#ebd19a;filter:drop-shadow(0 2px 1px #08263f)}.game-hud598 #hudDock598 nav button span{margin:0;font-size:10px;line-height:1.15}.game-hud598 #hudDock598 nav button.active{background:linear-gradient(#ffe5a0,#e2b56c);border-color:#fff0bc;color:#3c3e3b;box-shadow:inset 0 1px 0 #fff6c5,0 3px 9px #021c3155}.game-hud598 #hudDock598 nav button.active svg{color:#3b5c6b;filter:none}
.game-hud598 #hudTools598{position:fixed;z-index:22;right:14px;top:calc(var(--hud-top) + 24px);display:flex;flex-direction:column;gap:13px}.game-hud598 .hud-action598{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:56px;min-height:55px;margin:0;padding:6px 2px;background:linear-gradient(#1e4c64f0,#14344be6);border:1px solid #dec482;border-radius:15px;color:#ffe3a0;box-shadow:0 4px 0 #09283a70,0 5px 12px #142f4340}.game-hud598 .hud-action598 svg{width:27px;height:27px}.game-hud598 .hud-action598 span{font-size:9px;max-width:54px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.game-hud598 .hud-action598.protected598{color:#a7fff0;border-color:#8cead4;background:linear-gradient(#1d6f75,#164450)}.game-hud598 .hud-action598[hidden]{display:none}
.game-hud598 #hudPower598{position:fixed;left:15px;top:calc(59px + env(safe-area-inset-top));display:flex;align-items:center;gap:5px;height:25px;min-height:0;margin:0;padding:3px 9px;border:1px solid #eac77e99;border-radius:8px;color:#ffe69e;background:#193d52e6;z-index:22;font-size:11px}.game-hud598 #hudPower598 svg{width:16px;height:16px}
.game-hud598 #hudTasks598{position:fixed;z-index:22;left:14px;top:calc(var(--hud-top) + 24px);display:flex;flex-direction:column;gap:9px}.game-hud598 .hud-job598{display:grid;grid-template-columns:23px 1fr;align-items:center;gap:4px;width:108px;min-height:43px;margin:0;padding:7px 8px;border:1px solid #cdb577a6;border-radius:12px;background:linear-gradient(100deg,#102e45ef,#24556ade);color:#ffe5ab;box-shadow:0 4px 8px #10263833}.game-hud598 .hud-job598 svg{width:22px;height:22px;grid-row:1/3}.game-hud598 .hud-job598 span{font-size:10px;font-variant-numeric:tabular-nums}.game-hud598 .hud-job598 progress{display:block;grid-column:2;height:3px;width:100%;accent-color:#e9c263;border:0}
.game-hud598>.collect-area{position:fixed;z-index:23;left:16px;bottom:calc(var(--hud-bottom) + 15px);display:flex;align-items:flex-start;margin:0;gap:4px;max-width:145px}.game-hud598 #collect{display:flex;align-items:center;justify-content:center;gap:5px;min-height:40px;margin:0;padding:8px 11px;border:1px solid #fff1b0;border-radius:12px;background:linear-gradient(#ffe79a,#dfad52);color:#4b3e2e;box-shadow:0 4px 0 #86612688,0 6px 15px #14314544;font-size:10px;font-weight:750}.game-hud598 #collect svg{width:20px;height:20px}.game-hud598 #collectPreview{font-size:8px;line-height:1.3;max-width:140px;color:#fff5d2;background:#17394ac4;padding:3px 6px;border-radius:6px;text-align:start;text-shadow:none}
.game-hud598[data-hud-pane598="open"] #hudTasks598,.game-hud598[data-hud-pane598="open"] #hudTools598,.game-hud598[data-hud-pane598="open"]>.collect-area,.game-hud598[data-hud-pane598="open"] .scene-hint,.game-hud598[data-hud-pane598="open"] .world-controls{display:none}.game-hud598[data-hud-pane598="open"] #scene:after{content:'';position:absolute;inset:0;background:#0b273a52;pointer-events:none}
.game-hud598 #toast{z-index:100;bottom:calc(var(--hud-bottom) + 20px);max-width:calc(100vw - 30px);font-size:12px;border-radius:12px;background:#112e45;color:#fff2ce;border:1px solid #e4c37e}
.game-hud598 dialog{z-index:80;max-height:calc(100dvh - 44px);width:min(610px,calc(100vw - 24px));margin:auto;border:1px solid #daba76;border-radius:20px;padding:24px 18px;background:linear-gradient(145deg,#f5fbfd,#e8f2f6);color:#244d64;box-shadow:0 20px 80px #061d3c66}.game-hud598 dialog::backdrop{background:#06192f91}.game-hud598 dialog h2{color:#234c65;font-size:22px;padding-right:20px}.game-hud598 #closeModal{position:absolute;top:8px;right:9px;background:#dcecf1;border:1px solid #9cbdc9;border-radius:10px;width:32px;height:32px;min-width:0;color:#2c5970;font-size:22px}
.game-hud598 .hud-menu-grid598{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:18px}.game-hud598 .hud-menu-grid598 button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:9px;min-height:96px;margin:0;padding:10px 6px;border:1px solid #acc8d3;border-radius:15px;background:linear-gradient(#fafdff,#e0eef4);color:#284e64;font-size:11px}.game-hud598 .hud-menu-grid598 svg{width:31px;height:31px;color:#8f6b29}.game-hud598 #hudOptions598{display:flex;flex-wrap:wrap;gap:12px;margin-block:20px}.game-hud598 #hudOptions598 .performance-controls{display:flex;flex-wrap:wrap;gap:10px;margin:0;align-items:center}.game-hud598 #hudOptions598 select{font-size:14px;padding:9px;border-radius:9px;max-width:none}.game-hud598 .hud-treasury598{display:grid;gap:8px}.game-hud598 .hud-treasury598>div{display:flex;justify-content:space-between;gap:15px;padding:12px;border:1px solid #bed4de;border-radius:10px;background:#f6fbfd}.game-hud598 .hud-treasury598 b{color:#9a6a22}
.game-hud598 .hero-roster{gap:14px}.game-hud598 .roster-card{min-width:0;border-radius:14px;box-shadow:0 4px 14px #244c6010}.game-hud598 .hero-art.hero-art-fullbody{border-radius:10px}.game-hud598 .filter-row{position:relative;gap:7px}.game-hud598 [data-new-heroes598]{border-color:#c49d4b;color:#7e6029;background:#fff6d8}.game-hud598 .defense-notice583{font-size:11px;padding:10px;margin-bottom:12px}.game-hud598 .defense-notice583 small{font-size:10px}.game-hud598 .defense-notice583 .loss-summary583{display:none}
.game-hud598[data-hud-view598="world"] .content{width:calc(100% - 24px);background:#113b4bdc;border-color:#b8cfbe;color:#ebf8ef;padding-bottom:5px}.game-hud598[data-hud-view598="world"] #hudPanelHead598{margin-bottom:5px}.game-hud598[data-hud-view598="world"] #panel>.world-boss-card,.game-hud598[data-hud-view598="world"] #panel>p,.game-hud598[data-hud-view598="world"] #panel>.defense-notice583{display:none}.game-hud598[data-hud-view598="world"] #hudTools598{display:flex;top:calc(var(--hud-top) + 75px);right:27px}.game-hud598[data-hud-view598="world"] .world-toolbar,.game-hud598[data-hud-view598="world"] .world-pan,.game-hud598[data-hud-view598="world"] .world-zoom585{display:flex;justify-content:center;flex-wrap:wrap;gap:4px;margin:4px 0;padding:0;font-size:10px}.game-hud598[data-hud-view598="world"] .world-toolbar>span{color:#ecf9ef;background:#123d4b}.game-hud598[data-hud-view598="world"] .world-toolbar button,.game-hud598[data-hud-view598="world"] .world-zoom585 button,.game-hud598[data-hud-view598="world"] .world-pan button{font-size:10px;padding:4px 7px;min-height:27px;background:#e5f4ef;border-color:#a8c9be;color:#244d5d}.game-hud598[data-hud-view598="world"] .world-grid{width:min(100%,calc(100dvh - 315px));height:min(calc(100vw - 60px),calc(100dvh - 315px));aspect-ratio:1;max-width:none;max-height:none;margin:7px auto;padding:5px;border-radius:12px;flex:none;background-color:#85b9ae}.game-hud598[data-hud-view598="world"] .world-pan>span,.game-hud598[data-hud-view598="world"] .world-zoom585>span{font-size:10px;color:#d4ede1}
.game-hud598 .combat-modal{width:min(1280px,calc(100vw - 16px));max-width:none;padding:12px}.game-hud598 #combatCanvas{max-height:calc(100dvh - 220px);object-fit:contain}.game-hud598 #combatResult:empty{display:none}
.game-hud598:not(.signed-in) #scene,.game-hud598:not(.signed-in) header,.game-hud598:not(.signed-in) #hudDock598,.game-hud598:not(.signed-in) #hudTools598,.game-hud598:not(.signed-in) #hudTasks598,.game-hud598:not(.signed-in) #hudPower598,.game-hud598:not(.signed-in)>.collect-area{display:none!important}.game-hud598:not(.signed-in){background:linear-gradient(#123e5c66,#0d324eaa),url('/assets/sefer-10plus.png') center/cover}.game-hud598 #accountGate:not([hidden]){position:fixed;inset:50% auto auto 50%;transform:translate(-50%,-50%);z-index:50;width:min(460px,calc(100% - 26px));max-height:calc(100dvh - 28px);overflow:auto;margin:0;padding:24px;border:1px solid #efd080;border-radius:22px;background:#f6fbfdf5;box-shadow:0 22px 70px #041e3466}.game-hud598 #accountGate h1{font-size:25px}
@media(min-width:1000px){.game-hud598 #resources{flex:0 1 auto;margin-inline:auto}.game-hud598 #researchWallet{inset:calc(9px + env(safe-area-inset-top)) 195px auto auto}.game-hud598 header{padding-right:145px}.game-hud598 header #settings{position:absolute;right:59px}.game-hud598 header #hudFullscreen598{position:absolute;right:15px}.game-hud598 header #noticesBell593{position:absolute;right:103px}.game-hud598 #hudPower598{top:calc(64px + env(safe-area-inset-top))}.game-hud598{--hud-top:calc(62px + env(safe-area-inset-top))}}
@media(max-width:600px){.game-hud598 header{height:48px;padding:5px 7px;gap:4px}.game-hud598 #resources{gap:4px}.game-hud598 .resource{min-width:0;flex:1;height:31px;padding:2px 5px;gap:3px;font-size:10px;letter-spacing:-.15px}.game-hud598 .resource i{font-size:17px}.game-hud598 header #accountButton{width:33px;height:33px;flex-basis:33px;font-size:11px;border-radius:11px}.game-hud598 header #settings,.game-hud598 header #noticesBell593{width:30px;height:31px;flex-basis:30px;font-size:11px;border-radius:9px}.game-hud598 header #hudFullscreen598{display:none}.game-hud598 #researchWallet{top:calc(54px + env(safe-area-inset-top));right:8px;gap:4px;max-width:calc(100vw - 100px)}.game-hud598 #researchWallet>span,.game-hud598 #researchWallet>.vip-pill{height:23px;padding:2px 6px!important}.game-hud598 #researchWallet>span b{font-size:9px}.game-hud598 #hudPower598{left:8px;top:calc(54px + env(safe-area-inset-top));font-size:10px;height:23px;padding:3px 6px}.game-hud598 #hudDock598{width:calc(100% - 12px);height:68px;padding:4px 4px 5px;border-radius:16px 16px 0 0}.game-hud598 #hudDock598 nav{gap:1px}.game-hud598 #hudDock598 nav button span{font-size:8px;max-width:58px;overflow:hidden;text-overflow:ellipsis}.game-hud598 #hudDock598 svg{width:25px;height:25px}.game-hud598 .hud-action598{width:43px;min-height:47px;padding:5px 1px;border-radius:12px}.game-hud598 .hud-action598 svg{width:24px;height:24px}.game-hud598 .hud-action598 span{font-size:8px;max-width:40px}.game-hud598 #hudTools598{right:8px;gap:11px;top:calc(var(--hud-top) + 14px)}.game-hud598 #hudTasks598{left:8px;top:calc(var(--hud-top) + 14px);gap:7px}.game-hud598 .hud-job598{width:89px;padding:6px;grid-template-columns:20px 1fr;min-height:38px}.game-hud598 .hud-job598 svg{width:19px;height:19px}.game-hud598 .hud-job598 span{font-size:9px}.game-hud598 .content{width:calc(100% - 12px);top:calc(var(--hud-top) + 1px);bottom:calc(var(--hud-bottom) - 2px);padding:0 9px 14px;border-radius:14px}.game-hud598 #hudPanelHead598{margin:0 -9px 10px;padding:9px 11px;min-height:48px}.game-hud598 #viewTitle{font-size:17px}.game-hud598 .hero-roster{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.game-hud598 .roster-card{padding:7px}.game-hud598 .roster-card h3{font-size:12px}.game-hud598 .roster-card p,.game-hud598 .roster-card small,.game-hud598 .roster-card button{font-size:9px}.game-hud598 .hero-art.hero-art-fullbody{height:260px}.game-hud598 .hero-preview-button{font-size:8px;padding:5px 6px}.game-hud598 .skill-info{min-height:130px}.game-hud598 .filter-row{gap:4px}.game-hud598 .filter-row button{font-size:10px;padding:7px}.game-hud598 .world-controls{right:8px;bottom:calc(var(--hud-bottom) + 8px)}.game-hud598 .world-controls button{height:32px;min-width:31px}.game-hud598 .scene-hint{bottom:calc(var(--hud-bottom) + 58px);font-size:8px;padding:4px 8px}.game-hud598>.collect-area{left:9px;bottom:calc(var(--hud-bottom) + 9px);max-width:120px}.game-hud598 #collect{font-size:9px;padding:7px 8px;min-height:35px}.game-hud598 #collectPreview{font-size:7px;max-width:114px}.game-hud598 #hudOptions598{gap:10px}.game-hud598 .hud-menu-grid598{gap:7px}.game-hud598 .hud-menu-grid598 button{font-size:10px;min-height:85px}.game-hud598 .defense-notice583{padding:8px}.game-hud598[data-hud-view598="world"] .world-grid{height:min(calc(100vw - 38px),calc(100dvh - 330px));width:min(100%,calc(100dvh - 330px))}.game-hud598[data-hud-view598="world"] #hudTools598{right:16px;top:calc(var(--hud-top) + 58px)}.game-hud598[data-hud-view598="world"] #hudTools598>button:not(#hudBoss598){display:none}}
@media(max-height:500px) and (orientation:landscape){.game-hud598{--hud-top:56px;--hud-bottom:61px}.game-hud598 header{height:44px}.game-hud598 #researchWallet{top:8px;right:150px}.game-hud598 #hudPower598{top:51px}.game-hud598 #hudDock598{height:55px;width:min(610px,calc(100% - 140px))}.game-hud598 #hudDock598 svg{width:21px;height:21px}.game-hud598 #hudDock598 nav button span{font-size:8px}.game-hud598 .content{top:52px;bottom:60px}.game-hud598 .hud-action598{min-height:38px;width:43px;gap:0}.game-hud598 .hud-action598 svg{width:21px;height:21px}.game-hud598 #hudTools598{gap:6px;top:64px}.game-hud598 #hudTasks598{top:64px}.game-hud598 .scene-hint{display:none}.game-hud598 .hero-roster{grid-template-columns:repeat(3,minmax(0,1fr))}.game-hud598 .hero-art.hero-art-fullbody{height:240px}.game-hud598[data-hud-view598="world"] .world-grid{width:min(calc(100dvh - 180px),55vw);height:min(calc(100dvh - 180px),55vw)}.game-hud598[data-hud-view598="world"] .world-toolbar,.game-hud598[data-hud-view598="world"] .world-zoom585,.game-hud598[data-hud-view598="world"] .world-pan{display:inline-flex;margin:0 2px}.game-hud598[data-hud-view598="world"] #hudPanelHead598{padding:4px 10px;min-height:33px;margin-bottom:2px}}
@media(prefers-reduced-motion:reduce){.game-hud598 *{scroll-behavior:auto!important;transition:none!important}}
[dir="rtl"].game-hud598 #hudPanelHead598{direction:rtl}[dir="rtl"].game-hud598 #hudDock598 nav{direction:rtl}[dir="rtl"].game-hud598 .hud-treasury598{direction:rtl}

.game-hud598 .defense-notice583{display:none}
.game-hud598[data-hud-pane598="open"] #hudPower598{display:none}
@media(max-height:500px) and (orientation:landscape) and (min-width:601px){.game-hud598 header{padding-right:145px}.game-hud598 header #settings{position:absolute;right:59px}.game-hud598 header #hudFullscreen598{position:absolute;right:15px}.game-hud598 header #noticesBell593{position:absolute;right:103px}.game-hud598 #resources{flex:0 0 auto;margin:0}.game-hud598 .resource{min-width:78px;width:78px;font-size:11px;padding:3px 6px}.game-hud598 #researchWallet{top:9px;right:150px}}
@media(max-height:500px) and (orientation:landscape) and (max-width:600px){.game-hud598 #researchWallet{display:none}}
@media(max-width:600px){.game-hud598[data-hud-view598="world"] .world-toolbar>span:not(.energy-pill),.game-hud598[data-hud-view598="world"] .world-zoom585>span{display:none}.game-hud598[data-hud-view598="world"] .world-toolbar #refreshSociety{font-size:0;width:30px}.game-hud598[data-hud-view598="world"] .world-toolbar #refreshSociety:before{content:"↻";font-size:16px}}

/* A translated-off-screen toast is not hidden when anchored above a fixed dock. */
.game-hud598 #toast{pointer-events:none;opacity:0;visibility:hidden;transform:translate(-50%,8px);bottom:calc(var(--hud-bottom) + 18px);max-width:min(480px,calc(100vw - 28px));width:max-content;text-align:center;line-height:1.45;overflow-wrap:anywhere;transition:opacity .16s ease,transform .16s ease;}
.game-hud598 #toast.show{opacity:1;visibility:visible;transform:translate(-50%,0);}

.march-overlay600 .route600>path{stroke:#f6bd55;stroke-width:.55;stroke-dasharray:1.1 1;fill:none}.march-overlay600 .return600>path{stroke:#9bc8ff}.march-overlay600 .scout-route600>path{stroke:#72e1bd}.march-overlay600 [data-route-actor600]{will-change:transform}.boss-map600{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:5;overflow:visible}.boss-map600 .boss-target600{pointer-events:all;cursor:pointer;outline:none}.boss-map600 .boss-target600>ellipse{fill:#f5cc8055;stroke:#f5dc89;stroke-width:.5}.boss-map600 .boss-target600:focus>ellipse{stroke:#fff;stroke-width:1.2}.boss-map600 .boss-target600>text{fill:#fff3bd;stroke:#193d54;stroke-width:.8;paint-order:stroke;font-weight:800;pointer-events:none}.vip-base600{font-size:11px;color:#7c5a21}.game-hud598[data-hud-view598="world"] .world-toolbar [data-march-focus600]{background:#f8dda1;color:#443d29}

.boss-map600 .boss-target600{pointer-events:none}.boss-map600 .boss-hit600{pointer-events:all;cursor:pointer}.boss-map600 .boss-hit600:focus-visible{stroke:#fff1aa;stroke-width:.7;outline:none}

/* v601: map gestures and chat stay local to this game. */
#worldControls{display:none!important}.world-grid{touch-action:none;overscroll-behavior:contain}.world-zoom585{pointer-events:none}.world-zoom585 button{display:none!important}
#chatBell601{font-size:20px}#chat601[hidden]{display:none!important}
#chat601>header{position:static;inset:auto;width:auto;height:auto;min-height:0;max-height:none;transform:none;box-shadow:none;border:0;border-radius:0;background:none;backdrop-filter:none;z-index:auto}
#chat601{position:fixed;z-index:140;inset:auto 18px calc(98px + env(safe-area-inset-bottom)) auto;width:min(420px,calc(100vw - 24px));height:min(600px,calc(100dvh - 160px));display:flex;flex-direction:column;background:linear-gradient(155deg,#163f54,#0d293c);border:1px solid #c8ac65;border-radius:18px;box-shadow:0 16px 60px #061d36bb;color:#ecf5f7;padding:12px;box-sizing:border-box;font:14px/1.4 system-ui}
#chat601 header{display:flex;justify-content:space-between;align-items:center;padding:0 2px 8px}#chat601 header strong{font-size:19px;color:#ffe1a1}#chat601 button{cursor:pointer;border:1px solid #7797a6;background:#254e62;color:#eff7fa;border-radius:10px;padding:8px 11px;font:inherit}#chat601 button:disabled{opacity:.5;cursor:default}#chat601 header button{font-size:21px;line-height:1;padding:5px 10px}#chat601 nav{display:flex;gap:5px;padding-bottom:8px}#chat601 nav button{flex:1}#chat601 nav button[aria-pressed=true]{background:#edc76c;color:#193d52;border-color:#ffe3a3}
#chat601 .chat-history601{flex:1;min-height:90px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:4px 6px;background:#08283a88;border-radius:10px}#chat601 .chat-message601{margin:6px 0 10px;padding:9px 10px;background:#20485c;border-radius:12px;border:1px solid #41677b}#chat601 .chat-message601.mine601{background:#385342;border-color:#67815a;margin-inline-start:18px}#chat601 .chat-message601>div{display:flex;justify-content:space-between;gap:8px;align-items:center}#chat601 .chat-message601 button{border:0;background:none;padding:0;color:#ffdb8b;font-size:12px;font-weight:700}#chat601 time{font-size:10px;color:#bbd0db}#chat601 .chat-message601 p{white-space:pre-wrap;overflow-wrap:anywhere;margin:5px 0;color:#fff;font-size:14px}#chat601 .chat-translate601{font-size:11px;color:#b7dff5;text-decoration:underline}
#chat601 textarea,#chat601 input{font:inherit;box-sizing:border-box;width:100%;border:1px solid #7195a6;border-radius:9px;background:#f3f9fc;color:#17384d;padding:9px;resize:none}#chat601 textarea{min-height:56px;max-height:120px}#chat601 form{margin:0}#chat601 #chatSend601>div{display:flex;justify-content:space-between;align-items:center;padding:5px 0}#chat601 #chatSend601 button{background:#f4d27e;color:#233f4d;border-color:#ffdf94}#chat601 #chatError601{margin:4px 2px;color:#ffdc9f;font-size:12px}#chat601 .chat-foot601{font-size:10px;color:#c3d5df}#chat601 .chat-peer601{padding-bottom:7px}#chat601 #chatPeer601{display:flex;gap:4px}#chat601 #chatPeer601 input{min-width:0}#chat601 #chatPeers601{display:flex;gap:4px;overflow:auto;margin-top:5px}#chat601 #chatPeers601 button{white-space:nowrap;font-size:11px;padding:4px 8px}
@media(max-width:600px){#chat601{right:8px;bottom:calc(88px + env(safe-area-inset-bottom));width:calc(100vw - 16px);height:min(540px,calc(100dvh - 148px));border-radius:15px;padding:9px}}@media(max-height:470px){#chat601{top:56px;bottom:82px;height:auto}#chat601 .chat-foot601{display:none}#chat601 textarea{min-height:36px;height:36px}#chat601 .chat-history601{min-height:40px}}

/* Drag previews transform a single layer; only release requests another map window. */
.world-grid{overflow:hidden;cursor:grab;user-select:none}.world-grid.dragging602{cursor:grabbing}.world-grid>.map-drag-layer602{grid-column:1/-1;display:grid;grid-template-columns:repeat(var(--world-columns585,11),minmax(0,1fr));gap:2px;position:relative;min-width:0;min-height:0;width:100%;height:100%;touch-action:none}.world-grid.world-overview585>.map-drag-layer602{display:block}.world-grid .world-cell{user-select:none}.world-grid .world-cell img{pointer-events:none;-webkit-user-drag:none}.world-pan{display:none!important}
.castle-badge602{display:inline-flex;align-items:center;justify-content:center;gap:3px;background:#153c50e8;color:#ffe3a3;border:1px solid #f0cc79;border-radius:4px;line-height:1;padding:2px 3px;box-shadow:0 1px 4px #08233988;white-space:nowrap;pointer-events:none}.castle-badge602 img{width:22px;height:15px;object-fit:cover;position:static;inset:auto;margin:0;display:block;border-radius:1px}.castle-badge602 b{font:700 12px system-ui}.world-cell .castle-badge602{position:absolute;right:0;top:0;z-index:4;gap:2px;padding:1px 2px}.world-cell .castle-badge602 img{position:static;inset:auto;width:13px;height:9px;margin:0;object-fit:cover}.world-cell .castle-badge602 b{font-size:9px}.world-cell .castle-badge602>span{font-size:9px}#castleOwn602{position:absolute;z-index:5;pointer-events:none;transform:translate(-50%,-100%)}#castleOwn602[hidden]{display:none!important}
#chat601 .translate-tools602{display:flex;align-items:center;gap:7px}#chat601 .translate-source602{font:10px system-ui;padding:2px 3px;width:52px;color:#e4f2fb;background:#15394e;border:1px solid #638294;border-radius:5px}#chat601 .translate-tools602 button{font:11px system-ui;color:#bedff5;text-decoration:underline;background:none;border:0;padding:3px}#chat601 .translation602{margin-top:7px;padding:8px;border-inline-start:2px solid #eecb7c;background:#102f40;border-radius:5px;color:#ffe6aa;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}#chat601 .translation602[hidden]{display:none}

/* Fine map zoom keeps labels legible at 1x1, 3x3 and 5x5. */
.world-grid .world-cell .castle-badge602 img{width:calc(13px * var(--marker-scale603,1));height:calc(9px * var(--marker-scale603,1))}.world-grid .world-cell .castle-badge602 b{font-size:calc(9px * var(--marker-scale603,1))}.world-grid .world-cell .tile-name,.world-grid .world-cell .tile-resource{font-size:calc(8px * var(--marker-scale603,1))}#chat601 .translate-source602{display:none}

/* v604: shared live chat strip and matched HUD controls. */
.scene-hint{display:none!important}.game-hud598 header #chatBell601{display:grid;place-items:center;flex:0 0 36px;min-width:36px;width:36px;min-height:36px;height:36px;padding:0;margin:0;border:1px solid #d3bd7a99;border-radius:11px;background:#153a50;color:#fff0c9;box-shadow:none;font-size:17px}.game-hud598 header #chatBell601 svg{width:20px;height:20px;display:block}.game-hud598 header #chatBell601[aria-expanded=true]{background:#30566a;border-color:#f5d383}
#chatStrip604[hidden]{display:none!important}#chatStrip604{position:fixed;z-index:28;left:50%;transform:translateX(-50%);width:min(690px,calc(100vw - 340px));min-width:270px;padding:5px 9px;border:1px solid #d9bb779c;border-radius:12px;background:linear-gradient(135deg,#12384bea,#214f62ed);box-shadow:0 5px 18px #08263860;color:#f4f8fa;box-sizing:border-box;backdrop-filter:blur(6px)}#chatStrip604>button{display:flex;align-items:center;gap:8px;width:100%;min-height:20px;max-height:24px;padding:2px 0;border:0;border-radius:3px;background:none;color:inherit;text-align:start;box-shadow:none;font:11px/1.3 system-ui;cursor:pointer;overflow:hidden}#chatStrip604>button:hover{background:#ffffff10;transform:none}#chatStrip604 .live-channel604{flex:0 0 47px;font-size:9px;font-weight:700;color:#e9ca81;white-space:nowrap}#chatStrip604 .live-message604{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#chatStrip604 [data-live-channel604=alliance] .live-channel604{color:#9ce4bf}
.game-hud598[data-chat-strip604=true] .content{bottom:calc(var(--hud-bottom) + var(--chat-strip-height604,80px) + 8px)}.game-hud598[data-chat-strip604=true][data-hud-view598=world] .world-grid{width:min(100%,calc(100dvh - 405px));height:min(calc(100vw - 60px),calc(100dvh - 405px))}
@media(max-width:840px){#chatStrip604{width:calc(100vw - 20px);min-width:0}.game-hud598[data-chat-strip604=true]>.collect-area{bottom:calc(var(--hud-bottom) + var(--chat-strip-height604,80px) + 14px)}}
@media(max-width:600px){.game-hud598 header #chatBell601{width:30px;min-width:30px;height:31px;min-height:31px;flex-basis:30px;border-radius:9px}.game-hud598 header #chatBell601 svg{width:17px;height:17px}#chatStrip604{width:calc(100vw - 14px);border-radius:10px;padding:4px 7px}#chatStrip604>button{font-size:10px;min-height:19px;gap:5px}#chatStrip604 .live-channel604{flex-basis:42px;font-size:8px}.game-hud598[data-chat-strip604=true][data-hud-view598=world] .world-grid{height:min(calc(100vw - 38px),calc(100dvh - 420px));width:min(100%,calc(100dvh - 420px))}}
@media(max-height:470px) and (orientation:landscape){#chatStrip604{width:min(560px,calc(100vw - 280px));padding:3px 7px}#chatStrip604>button{min-height:16px;font-size:9px}#chatStrip604>button:nth-child(2){display:none}.game-hud598[data-chat-strip604=true][data-hud-view598=world] .world-grid{width:min(calc(100dvh - 240px),55vw);height:min(calc(100dvh - 240px),55vw)}}

/* 605: public presence dots and read-only early-game world chat. */
.online-dot605{display:inline-block;width:7px;height:7px;border-radius:50%;background:#9da6ac;border:1px solid #f5f9fc;box-shadow:0 0 0 1px #17425766;vertical-align:middle;margin-inline-end:3px;flex:none}.online-dot605.is-online605{background:#38df7b;box-shadow:0 0 4px #28d97680}.world-cell .tile-name .online-dot605{width:calc(6px * var(--marker-scale603,1));height:calc(6px * var(--marker-scale603,1))}.online-modal605{display:flex;align-items:center;gap:4px;font-size:12px}#chat601 #chatWriteNote605{font-size:11px;color:#ffdf9d;margin:5px 0}#chat601 #chatWriteNote605[hidden]{display:none}#chat601 textarea:disabled{opacity:.7;cursor:not-allowed}
