:root{--command:#122a32;--gold:#e7be69}
.map-test-tools{position:absolute;z-index:1200;left:54px;top:8px;width:190px;max-width:calc(100% - 180px);padding:4px 6px;border:1px solid #cad8ce;border-radius:10px;background:#fffffff2;box-shadow:0 6px 22px #173b2933;color:#254e3b}
.map-test-tools[open]{width:min(230px,calc(100% - 120px));max-width:none}#mapTestHelp{display:none}
.hud-speed{min-width:90px;padding:10px;border:1px solid #52716e;border-radius:12px;background:#203e45;color:#fff;display:flex;flex-direction:column;justify-content:center}.hud-speed small{font-size:9px;letter-spacing:1px;color:#a3c5bc}.hud-speed b{font-size:14px;color:#f5e5be;white-space:nowrap}
.mission-controls{display:grid;gap:10px;margin-top:14px;min-width:0}.mission-controls select{max-width:100%;min-width:0;font-size:16px;min-height:44px}.mission-controls button{min-height:44px}#missionNotice{font-size:13px;color:#92502c;overflow-wrap:anywhere}
.map-test-tools summary{cursor:pointer;font-size:11px;font-weight:800;min-height:44px;line-height:44px;touch-action:manipulation}
.map-test-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.map-test-actions>div{min-width:0}
#mapTestTools .test-boost{display:block;margin:0;padding:0;border:0;background:none}#mapTestTools .test-boost>div{display:none}
.map-test-tools .button{width:100%;min-height:44px;font-size:11px;padding:8px 5px;white-space:normal}.map-test-tools p{font-size:10px;line-height:1.5;margin:6px 0 0;overflow-wrap:anywhere}#mapTestStatus:empty{display:none}
.town-help{font-size:12px;color:#c6d7ca;margin:0 0 18px}.town-viewport{overflow:auto;max-width:1400px;border:1px solid #a5ac87;border-radius:24px;box-shadow:0 18px 60px #071c2955;margin-bottom:100px;overscroll-behavior:contain;scrollbar-color:#8ba08b #19383b}.town-map{position:relative;width:100%;min-width:1040px;aspect-ratio:1280/900;background:#94aa79 url('/town.svg') center/100% 100% no-repeat;isolation:isolate}.hq-view .town-building{position:absolute;transform:translate(-50%,-50%);width:172px;padding:0;border:0;border-radius:16px;background:transparent!important;display:flex;flex-direction:column;align-items:center;color:#fff;cursor:pointer;gap:0;z-index:1;transition:filter .15s,translate .15s}.town-building svg{display:block;width:148px;height:124px;filter:drop-shadow(0 8px 3px #233e3433);transition:transform .15s}.town-building:hover svg,.town-building:focus-visible svg{transform:translateY(-5px)}.town-building:hover,.town-building:focus-visible{z-index:3}.town-building:focus-visible{outline:3px solid #fff0b9;outline-offset:4px}.town-label{display:block;min-width:125px;max-width:172px;padding:8px 11px;background:#183c35f0;border:1px solid #c9be88;border-radius:10px;box-shadow:0 4px 10px #314e3429;text-align:center;font-size:12px;font-weight:750;line-height:1.3}.town-label small{display:block;font-size:8px;letter-spacing:1.3px;font-weight:500;margin-top:4px;color:#ccceab}.town-compass{position:absolute;right:25px;top:18px;color:#f3ebc9;font-size:25px;text-align:center;line-height:1.25;text-shadow:0 2px 3px #52664a}.town-plaque{position:absolute;bottom:20px;left:24px;letter-spacing:3px;font-size:9px;color:#34523f;background:#e6dfbeab;border:1px solid #a7ad83;padding:9px 13px;border-radius:6px}
.town-dialog{padding:0;border:1px solid #9cab9a;border-radius:20px;background:#f8faf6;color:#28443d;width:min(620px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow:auto;box-shadow:0 28px 90px #0005;overscroll-behavior:contain}.town-dialog::backdrop{background:#071f2bc7;backdrop-filter:blur(4px)}.town-dialog .hq-detail{padding:26px;background:#f8faf6;color:#28443d;border:0}.town-dialog .hq-detail>h2{font-size:27px;margin:14px 0}.town-dialog .modal-header small{font-size:10px;letter-spacing:1.8px;color:#7b754f;line-height:1.5}.town-dialog .hq-fort{display:block;width:100%;margin-top:10px;padding:13px;text-align:left;border:1px solid #cddccf;border-radius:10px;background:#fff;color:#26483a;font:inherit;font-size:13px;line-height:1.6;cursor:pointer}.town-dialog .hq-fort:hover{border-color:#43856a;background:#eef7ef}.town-dialog .hq-fort-list{max-height:45dvh;overflow:auto}.town-dialog .modal-close{flex-shrink:0;cursor:pointer}.town-dialog p{font-size:13px;line-height:1.6}.town-dialog .hqGroupAction[hidden]{display:none}
@media(prefers-reduced-motion:reduce){.town-building,.town-building svg{transition:none}}
.game-view{display:block!important;position:relative;height:100dvh;min-height:0!important;background:var(--command)}
.game-view[hidden]{display:none!important}
.command-bar{position:absolute;inset:0 0 auto;height:82px;z-index:1300;display:flex;align-items:center;gap:18px;padding:12px 24px;background:#112a32;color:#fff;box-shadow:0 4px 30px #071a2433}
.command-brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--gold);font-size:28px;font-weight:900;letter-spacing:-2px}.command-brand span{font-size:16px;letter-spacing:3px;color:white}.command-brand small{display:block;font-size:9px;letter-spacing:2px;color:#95b6b4;margin-top:5px}
.hud-resources{display:flex;gap:8px;margin:auto;min-width:0}.command-bar button,.command-dock button,.hq-view button,.panel-back{border:1px solid #52716e;background:#203e45;color:#fff;border-radius:12px;padding:12px 16px;cursor:pointer;font:inherit}.hud-resources button{text-align:left;min-width:150px}.hud-resources small{display:block;font-size:9px;letter-spacing:2px;color:#a3c5bc}.hud-resources b{display:block;font-size:15px;margin-top:4px;color:#f5e5be}
.command-dock{position:absolute;z-index:1300;bottom:22px;left:50%;transform:translateX(-50%);display:flex;gap:8px;padding:8px;background:#112a32ed;border:1px solid #6d8a7b;border-radius:20px;box-shadow:0 10px 30px #0003;max-width:calc(100% - 20px)}.command-dock button{display:flex;gap:8px;align-items:center;white-space:nowrap;font-size:14px}.command-dock button:hover,.hq-building:hover{border-color:var(--gold);background:#35534f}
.game-view>.mobile-nav{display:none!important}.game-view .map-area{position:absolute!important;inset:82px 0 0;height:auto!important;min-height:0;display:block!important;width:auto}.map-top{top:12px}.map-actions{top:58px}.map-legend{bottom:112px;max-width:360px}.toast{bottom:112px}.game-view .sidebar{display:none!important}.game-view[data-ui-panel=open] .sidebar{display:flex!important;position:absolute;z-index:1400;top:94px;left:16px;bottom:106px;width:440px;max-width:calc(100% - 32px);height:auto!important;min-height:0;border:1px solid #b4c6bd;border-radius:18px;box-shadow:0 15px 60px #051f3d44;overflow:hidden;background:white}.panel-back{background:#173a3d;border-radius:0;text-align:left;flex-shrink:0}.game-view .game-hero{padding:12px 18px}.game-hero .brand-mark,.game-hero .eyebrow,.hero-bottom h1,.hero-bottom p,.account-tools-link{display:none}.hero-bottom{margin:0}.tab-nav{flex-wrap:wrap}.tab{min-width:25%}.side-scroll{min-height:0}.sidebar-foot{font-size:9px}.game-view[data-section=dashboard] .sidebar{width:min(950px,calc(100% - 32px))}.game-view[data-section=dashboard] .map-area{display:block!important}
.hq-view{position:absolute;z-index:1350;inset:82px 0 0;overflow:auto;padding:40px max(24px,calc((100vw - 1250px)/2));background:radial-gradient(ellipse at 20% 15%,#28554e,#122b34 70%);color:#e7f0e9}.hq-view[hidden]{display:none}.hq-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:24px}.hq-heading small,.hq-detail>small{color:#d9b972;letter-spacing:2px;font-size:10px}.hq-heading h1{font-size:38px;letter-spacing:-1px;margin:12px 0}.hq-heading p{color:#a8c3b9;font-size:13px}.hq-layout{display:grid;grid-template-columns:380px 1fr;gap:24px;padding-bottom:110px}.hq-buildings{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-content:start}.hq-view .hq-building{min-height:85px;text-align:left;font-weight:700;line-height:1.5;background:#28483f;border-color:#52776a}.hq-view .planned{opacity:.45;cursor:not-allowed}.hq-detail{padding:26px;border:1px solid #46665f;border-radius:20px;background:#f8faf6;color:#28443d;min-width:0}.hq-detail h2{font-size:27px;margin:14px 0}.hq-note{font-size:12px;padding:14px;border-radius:10px;background:#f7edda;color:#765c32;line-height:1.6}.hq-view .hq-fort{display:block;width:100%;margin-top:10px;text-align:left;background:white;border-color:#d0ddd4;color:#27483a;font-size:13px;line-height:1.6}.hq-fort-list{max-height:55dvh;overflow:auto}
button:focus-visible,a:focus-visible{outline:3px solid #e7be69;outline-offset:3px}
.first-explore{position:absolute;z-index:1150;top:58px;left:60px;right:75px;max-width:420px;padding:14px 16px;border:1px solid #c7dacf;border-radius:12px;background:#fffffff5;box-shadow:0 6px 24px #153f3330;color:#27483d;font-size:12px;line-height:1.5}.first-explore[hidden]{display:none}.first-explore strong{display:block;font-size:13px}.first-explore p{margin:5px 0;overflow-wrap:anywhere}.first-explore .button{margin-top:7px;min-height:44px}.first-explore button[hidden]{display:none}
@media(max-width:850px), (max-width:1100px) and (max-height:500px) and (orientation:landscape){.first-explore{top:64px;left:50px;right:68px;padding:10px;max-height:calc(100% - 80px);overflow-y:auto}}
@media(max-width:850px){.command-bar{padding:10px;gap:8px;height:94px}.command-brand span{display:none}.hud-resources{gap:4px}.hud-resources button{min-width:0;padding:9px}.hud-resources b{font-size:11px}.command-bar>button{padding:9px;font-size:11px}.game-view .map-area,.hq-view{top:94px}.command-dock{bottom:10px;width:calc(100% - 20px);justify-content:space-around;gap:3px;padding:5px}.command-dock button{font-size:16px;flex-direction:column;padding:8px 5px;gap:4px;border:0}.command-dock span{font-size:9px;white-space:normal;text-align:center}.game-view[data-ui-panel=open] .sidebar{top:102px;bottom:88px;left:8px;max-width:calc(100% - 16px);width:100%}.hq-view{padding:24px 16px}.hq-heading h1{font-size:26px}.hq-layout{grid-template-columns:1fr}.hq-buildings{grid-template-columns:repeat(3,1fr)}.hq-view .hq-building{font-size:11px;padding:10px;min-height:65px}.map-legend{display:none}.toast{bottom:90px}.sidebar-foot{display:block}.hq-heading button{font-size:12px;padding:10px}}
