:root{color-scheme:dark;--hud-safe-top: env(safe-area-inset-top, 0px);--hud-safe-right: env(safe-area-inset-right, 0px);--hud-safe-bottom: env(safe-area-inset-bottom, 0px);--hud-safe-left: env(safe-area-inset-left, 0px);--hud-top-height: 52px;--hud-bottom-height: 56px;--hud-top-padding-block: 12px;--hud-chrome-top: calc( var(--hud-safe-top) + var(--hud-top-height) + var(--hud-top-padding-block) );--hud-chrome-bottom: var(--hud-bottom-height);--hud-panel-width: 220px;--hud-touch-target: 44px;--hud-minimap-size: 140px;--hud-side-graphic-height: 120px;--hud-edge-inset: 8px;--hud-gap: 8px;--message-log-inset-x: var(--hud-edge-inset);--message-log-gap-bottom: var(--hud-gap);--message-log-launcher-size: 44px;--message-log-max-width: 400px;--message-log-max-height: 220px;--hud-detail-panel-width: min(50vw, 720px);--hud-detail-tile-min-width: 240px;--hud-detail-tile-min-height: 148px;--hud-detail-max-height: min(80vh, 640px);--app-shell-height: 100vh;--app-shell-height: 100dvh;--app-shell-width: 100vw;--app-shell-width: 100dvw;--visual-viewport-offset-top: 0px;--visual-viewport-offset-left: 0px;--visual-viewport-width: var(--app-shell-width);--visual-viewport-height: var(--app-shell-height)}*{box-sizing:border-box}html,body{margin:0;height:var(--app-shell-height);min-height:var(--app-shell-height);overflow:hidden;overscroll-behavior:none;background:#15151a;color:#e6e6e6;font-family:system-ui,sans-serif}#ui{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;min-height:var(--app-shell-height);overflow-x:hidden;overflow-y:auto;overscroll-behavior:none;-webkit-overflow-scrolling:touch}#ui[hidden]{display:none}#app{position:fixed;top:var(--visual-viewport-offset-top);left:var(--visual-viewport-offset-left);width:var(--visual-viewport-width);height:var(--visual-viewport-height);overflow:hidden;overscroll-behavior:none;touch-action:none;z-index:0}#app[hidden]{display:none}#app canvas{touch-action:none}.hud-side,.hud-building-detail-body,.message-log-list{overscroll-behavior:contain;touch-action:pan-y}.game-hud[hidden]{display:none}.hud-dot{width:12px;height:12px;border-radius:50%;border:1px solid #00000055;flex:0 0 auto}.hud-dot.offline{opacity:.4}.hud-players{display:inline-flex;gap:4px;flex-wrap:wrap}.hud-res{font-variant-numeric:tabular-nums;color:#e6e6e6;white-space:nowrap}.hud-hint{color:#8a8a95}.hud-top{position:fixed;top:0;left:0;right:0;z-index:100;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:var(--hud-chrome-top);padding:calc(var(--hud-safe-top) + 6px) calc(var(--hud-edge-inset) + var(--hud-safe-right)) 6px calc(var(--hud-edge-inset) + var(--hud-safe-left));background:#14141be0;border-bottom:1px solid #2c2c38;font-size:.85rem;pointer-events:auto}.hud-top:before{content:"";position:absolute;left:0;right:0;top:0;height:var(--hud-safe-top);background:#14141b;pointer-events:none}.hud-profile{display:flex;align-items:center;gap:10px;min-width:0}.hud-conn-dot{width:10px;height:10px;border-radius:50%;flex:0 0 auto;border:1px solid #00000055}.hud-conn-dot.connected{background:#4ade80}.hud-conn-dot.reconnecting{background:#fbbf24;animation:hud-conn-pulse 1.1s ease-in-out infinite}.hud-conn-dot.lost{background:#f87171}.hud-conn-dot.spectator{background:#8a8a95}@keyframes hud-conn-pulse{0%,to{opacity:1}50%{opacity:.45}}.hud-profile-info{display:flex;align-items:center;gap:8px}.hud-name{font-weight:600}.hud-time{font-variant-numeric:tabular-nums;color:#c9c9d4}.hud-resources{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end;flex:1 1 auto;min-width:0}.hud-minimap{position:fixed;top:calc(var(--hud-chrome-top) + var(--hud-gap));right:calc(var(--hud-edge-inset) + var(--hud-safe-right));z-index:100;pointer-events:auto}.hud-minimap-canvas{display:block;width:var(--hud-minimap-size);height:var(--hud-minimap-size);border:2px solid #3a3a48;border-radius:4px;background:#0c0c12;cursor:pointer;touch-action:none}.hud-side-root{position:fixed;left:calc(var(--hud-edge-inset) + var(--hud-safe-left));top:calc(var(--hud-chrome-top) + var(--hud-gap));z-index:100;pointer-events:none}.hud-side-launcher{position:fixed;left:calc(var(--hud-edge-inset) + var(--hud-safe-left));top:calc(var(--hud-chrome-top) + var(--hud-gap));width:var(--message-log-launcher-size);height:var(--message-log-launcher-size);min-width:var(--hud-touch-target);min-height:var(--hud-touch-target);padding:0;font-size:1.25rem;font-weight:700;line-height:1;border-radius:8px;background:#1f1f27f0;border:1px solid #3a3a48;color:#93c5fd;cursor:pointer;pointer-events:auto}.hud-side{position:fixed;left:calc(var(--hud-edge-inset) + var(--hud-safe-left));top:calc(var(--hud-chrome-top) + var(--hud-gap));width:var(--hud-panel-width);max-width:calc(100vw - var(--hud-minimap-size) - var(--hud-edge-inset) * 2 - var(--hud-gap));max-height:calc(100vh - var(--hud-chrome-top) - var(--hud-chrome-bottom) - var(--hud-gap) * 2);padding:10px;background:#14141be6;border:1px solid #2c2c38;border-radius:8px;overflow-y:auto;pointer-events:auto;font-size:.85rem;box-sizing:border-box}.hud-side-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:6px}.hud-side-head .hud-sel-title{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hud-side-body{display:flex;flex-direction:column;min-height:0}.hud-side-close{flex:0 0 auto;min-width:22px;min-height:22px;padding:0;border:none;border-radius:4px;background:#7f1d1dcc;color:#fecaca;font-size:1rem;font-weight:700;line-height:1;cursor:pointer}.game-hud:not([data-hud-layout^=mobile]) .hud-side-close{display:none}.hud-side-minimize-detail{flex:0 0 auto;min-width:var(--hud-touch-target);min-height:var(--hud-touch-target);padding:0;border:none;border-radius:4px;background:#2a2a36;color:#e8e8f0;font-size:1.25rem;line-height:1;cursor:pointer;display:none}.hud-side-root[data-building-detail-open] .hud-side-minimize-detail{display:inline-flex;align-items:center;justify-content:center}.hud-side-root[data-building-detail-open] .hud-side-launcher{z-index:101}.hud-side[hidden],.hud-side-launcher[hidden]{display:none!important}.hud-graphic{width:100%;height:var(--hud-side-graphic-height);min-height:var(--hud-side-graphic-height);flex-shrink:0;border:1px solid #00000066;border-radius:6px;margin:8px 0;background-size:cover;background-position:center;overflow:hidden}.hud-graphic--sprite{display:flex;align-items:center;justify-content:center;background-size:auto}.hud-graphic--terrain{position:relative;background-size:auto}.hud-graphic-terrain{position:relative;width:100%;height:100%}.hud-graphic-ground,.hud-graphic-deco{pointer-events:none;-webkit-user-select:none;user-select:none}.hud-graphic-deco{position:absolute;width:auto;max-width:95%;object-fit:contain}.hud-sel-infos{display:flex;flex-direction:column;gap:2px;flex-shrink:0}.hud-sel-title{font-weight:700}.hud-sel-line{color:#d2d2dc;margin:2px 0}.hud-stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px 10px;margin:4px 0}.hud-stat{display:flex;justify-content:space-between;gap:6px;min-width:0;color:#d2d2dc;font-variant-numeric:tabular-nums}.hud-stat-label{color:#8a8a95;font-weight:600}.hud-stat-value{color:#e6e6e6}.hud-sel-subtitle{font-size:.75rem;color:#9ca3af;margin-top:6px;font-weight:600}.hud-queue-active{color:#93c5fd;font-weight:600}.hud-queue-item{color:#a8a8b8;padding-left:4px}.hud-bar{position:relative;height:14px;background:#0006;border-radius:3px;overflow:hidden;margin:6px 0}.hud-bar-fill{height:100%;background:#4ade80}.hud-bar-progress .hud-bar-fill{background:#2f6df6}.hud-bar-label{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;font-size:.7rem;color:#fff;text-shadow:0 1px 2px #000}.hud-bottom{position:fixed;left:0;right:0;bottom:0;z-index:100;display:flex;align-items:center;gap:10px;min-height:var(--hud-bottom-height);padding:8px calc(var(--hud-edge-inset) + var(--hud-safe-right)) calc(8px + var(--hud-safe-bottom)) calc(var(--hud-edge-inset) + var(--hud-safe-left));background:#14141be0;border-top:1px solid #2c2c38;pointer-events:auto;overflow:visible}.hud-bottom:after{content:"";position:absolute;left:0;right:0;bottom:0;height:var(--hud-safe-bottom);background:#14141b;pointer-events:none}.hud-basemenu{flex:0 0 auto}.hud-bar-slots{display:flex;gap:8px;flex-wrap:nowrap;flex:1;justify-content:center;align-items:center;overflow:visible}.hud-bar-slot{flex:0 0 auto}.hud-bar-slot-btn{min-width:max(72px,var(--hud-touch-target));min-height:var(--hud-touch-target)}.hud-bar-slot-active{outline:1px solid #4ade80}.hud-bar-pop{width:max-content;max-width:calc(100vw - var(--hud-edge-inset) * 2);padding:8px;background:#1f1f27f0;border:1px solid #3a3a48;border-radius:8px;box-shadow:0 4px 16px #00000080;z-index:110;white-space:normal;pointer-events:auto}.hud-bar-pop[hidden]{display:none}.hud-asset-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.hud-bar-pop-grid{--hud-bar-pop-cell: 88px;display:grid;grid-template-columns:repeat(3,var(--hud-bar-pop-cell));gap:8px;width:max-content}.hud-bar-pop-grid .hud-asset-card{width:var(--hud-bar-pop-cell);height:100px;min-width:var(--hud-bar-pop-cell);max-width:var(--hud-bar-pop-cell);box-sizing:border-box;padding:6px 4px;justify-content:flex-start}.hud-bar-pop-grid .hud-asset-card-line{width:100%;max-height:2.6em;overflow:hidden;text-overflow:ellipsis;word-break:break-word}.hud-asset-card-wrap{position:relative;min-width:0}.hud-asset-card-wrap .hud-asset-card{width:100%}.hud-asset-card-cancel{position:absolute;top:2px;right:2px;z-index:2;min-width:22px;min-height:22px;padding:0;border:none;border-radius:4px;background:#7f1d1dcc;color:#fecaca;font-size:1rem;font-weight:700;line-height:1;cursor:pointer;opacity:0;pointer-events:none}@media(hover:hover){.hud-asset-card-wrap--cancelable:hover .hud-asset-card-cancel{opacity:1;pointer-events:auto}}@media(hover:none){.hud-asset-card-wrap--cancelable .hud-asset-card-cancel{opacity:.9;pointer-events:auto}}.hud-asset-card{display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 4px;background:#14141a;border:1px solid #3a3a48;border-radius:6px;color:#e6e6e6;font-size:.65rem;cursor:pointer;min-width:0}.hud-asset-card:disabled{opacity:.45;cursor:not-allowed}.hud-asset-card-active{border-color:#4ade80;box-shadow:0 0 0 1px #4ade8066}.hud-asset-card-icon{width:40px;height:40px;background-size:contain;background-repeat:no-repeat;background-position:center;background-color:#0c0c12;border-radius:4px}.hud-asset-card-line{text-align:center;line-height:1.2;color:#b8b8c4;word-break:break-word}.hud-asset-card-reason{color:#fbbf24;font-size:.58rem}.game-hud button:focus-visible,.message-log-root button:focus-visible,.hud-asset-card:focus-visible{outline:2px solid #60a5fa;outline-offset:2px}.hud-menu{position:relative;flex:0 0 auto}.hud-menu-btn{min-width:44px;padding:10px 12px;font-size:1.15rem;line-height:1}.hud-menu-pop{position:absolute;bottom:calc(100% + var(--hud-gap));left:0;display:flex;flex-direction:column;gap:4px;padding:6px;background:#1f1f27;border:1px solid #3a3a48;border-radius:6px;min-width:200px}.hud-menu-section-title{font-size:.7rem;font-weight:600;color:#9a9aa6;text-transform:uppercase;letter-spacing:.04em;margin-top:2px}.hud-menu-conn-line{font-size:.78rem;color:#b8b8c4;line-height:1.3;word-break:break-word}.hud-menu-conn-status{font-weight:600;color:#e6e6e6}.hud-menu-pop[hidden]{display:none}.game-hud[data-hud-layout=mobile-portrait]{--hud-top-height: 44px;--hud-bottom-height: 52px;--hud-panel-width: min(168px, 46vw);--hud-minimap-size: 88px;--hud-side-graphic-height: 72px;--message-log-max-width: min(340px, calc(100vw - var(--hud-edge-inset) * 2));--message-log-max-height: min(200px, 32vh)}.game-hud[data-hud-layout=mobile-portrait] .hud-top{font-size:.78rem}.game-hud[data-hud-layout=mobile-portrait] .hud-resources{gap:8px}.game-hud[data-hud-layout=mobile-landscape]{--hud-top-height: 40px;--hud-bottom-height: 48px;--hud-panel-width: 156px;--hud-minimap-size: 76px;--hud-side-graphic-height: 64px;--message-log-inset-x: calc(var(--hud-panel-width) + var(--hud-edge-inset) + var(--hud-gap));--message-log-max-width: min( 320px, calc( 100vw - var(--hud-panel-width) - var(--hud-minimap-size) - var(--hud-edge-inset) * 2 - var(--hud-gap) * 2 ) );--message-log-max-height: min(160px, 42vh)}.game-hud[data-hud-layout=mobile-landscape] .hud-top{font-size:.76rem}.game-hud[data-hud-layout=mobile-landscape] .hud-bar-pop-grid{--hud-bar-pop-cell: 76px}.game-hud[data-hud-layout=tablet-portrait]{--hud-top-height: 48px;--hud-panel-width: 190px;--hud-minimap-size: 100px;--hud-side-graphic-height: 96px}.game-hud[data-hud-layout=tablet-landscape]{--hud-top-height: 48px;--hud-panel-width: 200px;--hud-minimap-size: 110px;--hud-side-graphic-height: 100px}.game-hud[data-hud-layout=desktop]{--hud-top-height: 52px;--hud-bottom-height: 56px;--hud-panel-width: 220px;--hud-minimap-size: 140px}.game-hud[data-hud-layout^=mobile] .hud-bar-slots{overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-x;scrollbar-width:thin}.countdown{font-size:4rem;font-weight:700;text-align:center;margin:16px 0;color:#f0c14b}.screen{width:100%;max-width:720px;margin:0 auto;padding:32px 20px;text-align:center}#ui.ui-bg,#app.ui-bg{min-height:var(--app-shell-height);background-size:cover;background-position:center;background-repeat:no-repeat}.screen h1{text-shadow:0 2px 10px rgba(0,0,0,.6)}.screen h1{font-size:1.6rem;margin:0 0 4px}.screen .subtitle{color:#9a9aa6;margin:0 0 24px}.end-stats{text-align:left;background:#1f1f27e6;border:1px solid #2c2c38;border-radius:10px;padding:14px 16px;margin:0 auto 16px;max-width:360px}.end-stats-title{font-size:.9rem;margin:0 0 10px;color:#c9c9d4;font-weight:600}.end-stat-row{display:flex;justify-content:space-between;gap:12px;font-size:.85rem;padding:3px 0}.end-stat-label{color:#9a9aa6}.end-stat-value{color:#e6e6e6;font-variant-numeric:tabular-nums;text-align:right}.panel{background:#1f1f27;border:1px solid #2c2c38;border-radius:10px;padding:18px;margin-bottom:16px}.row{display:flex;gap:10px;align-items:center;justify-content:center;flex-wrap:wrap}label{font-size:.85rem;color:#9a9aa6}input[type=text]{flex:1;min-width:160px;padding:10px 12px;border-radius:8px;border:1px solid #3a3a48;background:#14141a;color:#e6e6e6;font-size:1rem}button{padding:10px 16px;border-radius:8px;border:1px solid #3a3a48;background:#2f6df6;color:#fff;font-size:.95rem;cursor:pointer}button.secondary{background:#2c2c38}button:disabled{opacity:.45;cursor:not-allowed}.room-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}.room-list li{display:flex;justify-content:space-between;align-items:center;gap:12px;min-width:0;background:#14141a;border:1px solid #2c2c38;border-radius:8px;padding:12px 14px}.room-meta{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0;overflow:hidden}.room-meta .name{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.room-meta .detail{font-size:.82rem;color:#9a9aa6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.room-list li>button{flex-shrink:0}.player-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.player-list li{display:flex;align-items:center;gap:10px}.swatch{width:16px;height:16px;border-radius:4px;border:1px solid #00000055;flex:none}.badge{font-size:.72rem;padding:2px 7px;border-radius:999px;background:#2c2c38;color:#c9c9d4}.badge.host{background:#b8860b;color:#fff}.badge.you{background:#2f6df6;color:#fff}.badge.disconnected{background:#6b2230;color:#fff}.notice{color:#c9c9d4;font-size:.9rem}.notice.error{color:#ff8585}.empty{color:#75757f;font-style:italic}.launcher-list{display:flex;flex-direction:column;gap:10px;margin:0 0 16px}.launcher-card{display:flex;justify-content:space-between;align-items:center;gap:12px;background:#14141a;border:1px solid #2c2c38;border-radius:8px;padding:14px 16px}.launcher-card-info{display:flex;flex-direction:column;gap:4px}.launcher-card-title{font-weight:600;font-size:1.05rem}.launcher-card-desc{font-size:.88rem;color:#b6b6c2}.launcher-card-meta{font-size:.8rem;color:#8a8a96}.hud-banner{position:fixed;top:calc(var(--hud-chrome-top) + var(--hud-gap));left:50%;transform:translate(-50%);z-index:150;padding:8px 18px;border-radius:8px;background:#d6194beb;color:#fff;font-weight:600;box-shadow:0 4px 16px #0006;pointer-events:none}.hud-banner[hidden]{display:none}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 0}.setting-label{color:#b9b9c6;font-size:.9rem}.setting-value{font-weight:600}.setting-row select,.setting-row input{min-width:140px}.fx-fade{position:fixed;top:0;right:0;bottom:0;left:0;background:#0c0c10;opacity:0;display:none;pointer-events:none;transition:opacity .26s ease;z-index:210}.fx-fade.visible{opacity:1;pointer-events:auto}.fx-countdown{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:#0a0a1080;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .4s ease,visibility .4s ease;z-index:200}.fx-countdown.visible{opacity:1;visibility:visible;pointer-events:auto}.fx-countdown-num{font-size:8rem;font-weight:800;color:#f0c14b;text-shadow:0 4px 24px rgba(0,0,0,.7)}.hud-building-detail-root{position:fixed;top:0;right:0;bottom:0;left:0;z-index:180;pointer-events:none}.hud-building-detail-root[hidden]{display:none!important}.hud-building-detail-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#08080e8c;pointer-events:auto}.hud-building-detail-panel{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(var(--hud-detail-panel-width),calc(100vw - var(--hud-edge-inset) * 2));max-height:var(--hud-detail-max-height);display:flex;flex-direction:column;background:#1e1e28;border:1px solid #3a3a4a;border-radius:10px;box-shadow:0 12px 40px #00000073;pointer-events:auto;overflow:hidden}.hud-building-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:10px 12px 8px;border-bottom:1px solid #2c2c38}.hud-building-detail-title{flex:1 1 auto;min-width:0;font-weight:700;font-size:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hud-building-detail-actions{display:flex;flex:0 0 auto;align-items:flex-start;gap:4px}.hud-building-detail-nav{flex:0 0 auto;min-width:var(--hud-touch-target);min-height:var(--hud-touch-target);padding:0;border:none;border-radius:6px;background:#2a2a36;color:#e8e8f0;font-size:1.25rem;line-height:1;cursor:pointer}.hud-building-detail-nav:disabled{opacity:.35;cursor:not-allowed}.hud-building-detail-close{flex:0 0 auto;min-width:var(--hud-touch-target);min-height:var(--hud-touch-target);padding:0;border:none;border-radius:6px;background:#2a2a36;color:#e8e8f0;font-size:1.5rem;line-height:1;cursor:pointer}.hud-building-detail-body{flex:1 1 auto;overflow-y:auto;padding:10px 12px 14px}.hud-building-detail-grid{display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(var(--hud-detail-tile-min-width),1fr))}.hud-building-detail-tile{display:flex;flex-direction:column;min-width:var(--hud-detail-tile-min-width);min-height:var(--hud-detail-tile-min-height);background:#252530;border-radius:8px;padding:10px 12px}.hud-building-detail-tile-title{font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:#a0a0b8;margin-bottom:8px}.hud-building-detail-tile-body{display:flex;flex:1 1 auto;flex-direction:column;gap:4px;min-height:0}.hud-building-detail-tile[data-section=visual]{min-height:240px}.hud-building-detail-visual{display:flex;flex:1 1 auto;align-items:center;justify-content:center;min-height:200px}.hud-building-detail-visual-icon{flex:0 1 auto;border-radius:6px;background-color:transparent}.hud-building-detail-state,.hud-building-detail-upgrade,.hud-building-detail-queue,.hud-building-detail-demolish{display:flex;flex-direction:column;gap:4px}.hud-building-detail-empty{font-size:.875rem;color:#a0a0b8;font-style:italic}.hud-building-detail-upgrade-btn{margin-top:6px;padding:8px 12px;border:none;border-radius:6px;background:#3a5a8a;color:#e8e8f0;font-weight:600;cursor:pointer}.hud-building-detail-upgrade-btn:disabled{opacity:.5;cursor:not-allowed}.hud-building-detail-demolish-btn{margin-top:6px;padding:8px 12px;border:none;border-radius:6px;background:#8a3a3a;color:#e8e8f0;font-weight:600;cursor:pointer}.hud-building-detail-demolish-btn:disabled{opacity:.5;cursor:not-allowed}.hud-building-detail-research-branch-box{display:flex;flex-direction:column;gap:8px}.hud-building-detail-research-branch-box{min-height:100%}.hud-building-detail-research-item{display:flex;flex-direction:column;gap:3px;padding:8px;border-radius:6px;background:#0003}.hud-building-detail-research-item[data-status=researched]{opacity:.75}.hud-building-detail-research-btn{margin-top:4px;padding:6px 10px;border:none;border-radius:6px;background:#3a6a5a;color:#e8e8f0;font-weight:600;cursor:pointer;align-self:flex-start}.hud-building-detail-research-btn:disabled{opacity:.5;cursor:not-allowed}.hud-side-open-details{flex:0 0 auto;min-width:var(--hud-touch-target);min-height:var(--hud-touch-target);padding:0;border:none;border-radius:6px;background:#3a5a8a;color:#e8e8f0;font-size:1rem;font-weight:600;line-height:1;cursor:pointer}.hud-side-open-details[hidden]{display:none!important}.game-hud[data-hud-layout=mobile-portrait]{--hud-detail-panel-width: min(92vw, 400px);--hud-detail-max-height: min(70vh, 520px);--hud-detail-tile-min-width: 200px;--hud-detail-tile-min-height: 132px}.game-hud[data-hud-layout=mobile-landscape]{--hud-detail-panel-width: min(50vw, 480px);--hud-detail-max-height: min(72vh, 400px);--hud-detail-tile-min-width: 200px;--hud-detail-tile-min-height: 128px}.game-hud[data-hud-layout=tablet-portrait],.game-hud[data-hud-layout=tablet-landscape]{--hud-detail-panel-width: min(50vw, 600px);--hud-detail-max-height: min(75vh, 560px);--hud-detail-tile-min-height: 140px}.message-log-root{position:fixed;z-index:110;pointer-events:none}.message-log-root[hidden]{display:none!important}.message-log-launcher{position:fixed;left:calc(var(--message-log-inset-x) + var(--hud-safe-left));bottom:calc(var(--hud-chrome-bottom) + var(--message-log-gap-bottom));width:var(--message-log-launcher-size);height:var(--message-log-launcher-size);min-width:var(--hud-touch-target);min-height:var(--hud-touch-target);padding:0;font-size:1.1rem;border-radius:8px;background:#1f1f27f0;border:1px solid #3a3a48;cursor:pointer;pointer-events:auto}.message-log{position:fixed;left:calc(var(--message-log-inset-x) + var(--hud-safe-left));bottom:calc(var(--hud-chrome-bottom) + var(--message-log-gap-bottom));width:var(--message-log-max-width);height:var(--message-log-max-height);min-width:240px;min-height:120px;max-width:min(520px,calc(100vw - var(--hud-edge-inset) * 2 - var(--hud-safe-left) - var(--hud-safe-right)));max-height:min(360px,45vh);display:flex;flex-direction:column;overflow:hidden;background:#14141bf0;border:1px solid #2c2c38;border-radius:8px;box-shadow:0 4px 16px #00000080;pointer-events:auto;font-size:.8rem;box-sizing:border-box}.message-log-resize-handle{position:absolute;top:0;right:0;width:24px;height:24px;z-index:2;cursor:nesw-resize;touch-action:none;border-radius:0 8px 0 0;background:linear-gradient(225deg,transparent 0 45%,#5a5a6a 45% 48%,transparent 48% 55%,#5a5a6a 55% 58%,transparent 58% 100%)}.message-log-resize-handle:hover{background-color:#2a2a36aa}.message-log-header{display:flex;align-items:center;justify-content:space-between;padding:6px 28px 6px 8px;border-bottom:1px solid #2c2c38;flex-shrink:0}.message-log-title{font-weight:600;color:#e8e8f0}.message-log-minimize{min-width:28px;padding:2px 8px}.message-log-toolbar{display:flex;flex-wrap:wrap;gap:4px 6px;align-items:center;padding:6px 8px;border-bottom:1px solid #2c2c38;flex-shrink:0}.message-log-filters{display:flex;flex-wrap:wrap;gap:4px}.message-log-filter{font-size:.7rem;padding:2px 6px;min-width:auto}.message-log-filter--active{outline:1px solid #4ade80}.message-log-filter--disabled{opacity:.45;cursor:not-allowed}.message-log-errors-only{display:inline-flex;align-items:center;gap:4px;font-size:.7rem;color:#b0b0bc}.message-log-list{flex:1;overflow-y:auto;padding:6px 8px;display:flex;flex-direction:column;gap:4px}.message-log-empty{color:#888;margin:0}.message-log-line{line-height:1.35;word-break:break-word}.message-log-meta{color:#8888a0;font-size:.7rem}.message-log-line--warn{color:#fbbf24}.message-log-line--error{color:#f87171}.message-log-line--success{color:#4ade80}.message-log[hidden],.message-log-launcher[hidden]{display:none!important}.client-perf-overlay{position:fixed;top:.5rem;left:.5rem;z-index:100000;max-width:min(92vw,28rem);padding:.45rem .6rem;border-radius:4px;background:#080a10d1;border:1px solid rgba(120,130,160,.35);color:#d8dce8;font:11px/1.35 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre;pointer-events:none;-webkit-user-select:none;user-select:none}.building-tuner-shell>#app{flex:1 1 auto;min-width:0;min-height:0}.building-tuner-shell{display:flex;width:100vw;height:100vh;overflow:hidden}.building-tuner-sidebar{flex:0 0 min(360px,38vw);overflow-y:auto;background:#12121a;border-right:1px solid #2a2a36;z-index:2}.building-tuner-panel{padding:1rem 1.1rem 2rem;color:#e8e8ef;font-size:.875rem;line-height:1.45}.building-tuner-title{margin:0 0 .35rem;font-size:1.1rem;font-weight:600}.building-tuner-hint{margin:0 0 1rem;color:#9ca3af;font-size:.8rem}.building-tuner-select{width:100%;margin-bottom:.75rem;padding:.4rem .5rem;background:#1e1e28;color:inherit;border:1px solid #3f3f50;border-radius:4px}.building-tuner-meta{margin-bottom:.75rem;padding:.5rem .65rem;background:#1a1a24;border-radius:4px;font-size:.78rem;color:#a5b4fc}.building-tuner-row{display:grid;grid-template-columns:6.5rem 1fr 3rem;gap:.35rem .5rem;align-items:center;margin-bottom:.45rem}.building-tuner-row input[type=range]{width:100%}.building-tuner-value{text-align:right;font-variant-numeric:tabular-nums;color:#cbd5e1;font-size:.75rem}.building-tuner-actions{display:flex;flex-wrap:wrap;gap:.4rem;margin:1rem 0}.building-tuner-export{margin:0;padding:.65rem;background:#0d0d12;border:1px solid #333;border-radius:4px;font-size:.72rem;overflow-x:auto;white-space:pre-wrap;color:#86efac}.iso-cropper-preview{flex:1 1 auto;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;overflow:auto;background:#0d1117;padding:1.5rem}.iso-cropper-canvas{max-width:100%;height:auto;cursor:grab;box-shadow:0 0 0 1px #334155}.iso-cropper-canvas-dragging{cursor:grabbing}.iso-cropper-drop{margin-bottom:.85rem;padding:1.1rem .75rem;text-align:center;border:1px dashed #4b5563;border-radius:6px;color:#9ca3af;font-size:.8rem;cursor:pointer;transition:border-color .15s,background .15s}.iso-cropper-drop:hover,.iso-cropper-drop-active{border-color:#6366f1;background:#1a1a28;color:#c7d2fe}.perf-dashboard-shell{display:flex;flex-direction:column;width:100vw;min-height:100vh;overflow:auto;background:#0f0f14;color:#e8e8ef;font-size:.875rem;line-height:1.45}.perf-dashboard-header{padding:1.25rem 1.5rem .75rem;border-bottom:1px solid #2a2a36}.perf-dashboard-title{margin:0 0 .35rem;font-size:1.2rem;font-weight:600}.perf-dashboard-hint{margin:0;color:#9ca3af;font-size:.8rem}.perf-dashboard-body{display:grid;grid-template-columns:minmax(280px,340px) 1fr;gap:1rem;padding:1rem 1.5rem 2rem}@media(max-width:900px){.perf-dashboard-body{grid-template-columns:1fr}}.perf-dashboard-card{background:#12121a;border:1px solid #2a2a36;border-radius:8px;padding:1rem 1.1rem}.perf-dashboard-card h2{margin:0 0 .75rem;font-size:.95rem;font-weight:600}.perf-dashboard-divider{margin:1rem 0;border:none;border-top:1px solid #2a2a36}.perf-dashboard-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.65rem}.perf-dashboard-row label,.perf-dashboard-row input[type=range]{flex:1}.perf-dashboard-status{margin-top:.5rem;font-size:.78rem;color:#9ca3af}.perf-dashboard-status.is-error{color:#f87171}.perf-dashboard-rooms{display:flex;flex-direction:column;gap:1rem}.perf-room-card{background:#12121a;border:1px solid #2a2a36;border-radius:8px;padding:1rem 1.1rem}.perf-room-card h3{margin:0 0 .5rem;font-size:.95rem;font-weight:600;word-break:break-all}.perf-room-meta{display:flex;flex-wrap:wrap;gap:.5rem 1rem;margin-bottom:.75rem;color:#9ca3af;font-size:.78rem}.perf-metrics-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:.5rem}.perf-metric{background:#1a1a24;border-radius:6px;padding:.5rem .6rem}.perf-metric dt{margin:0;font-size:.72rem;color:#9ca3af}.perf-metric dd{margin:.15rem 0 0;font-size:.9rem;font-weight:600;font-variant-numeric:tabular-nums}.perf-phase-table{width:100%;border-collapse:collapse;margin-top:.75rem;font-size:.78rem}.perf-phase-table th,.perf-phase-table td{text-align:left;padding:.35rem .5rem;border-bottom:1px solid #2a2a36}.perf-phase-table th{color:#9ca3af;font-weight:500}.perf-dashboard-link{color:#93c5fd;text-decoration:none}.perf-dashboard-link:hover{text-decoration:underline}.balance-board-shell{display:flex;flex-direction:column;width:100vw;min-height:100vh;overflow:auto;background:#0f0f14;color:#e8e8ef;font-size:.875rem;line-height:1.45}.balance-board-header{padding:1.25rem 1.5rem .75rem;border-bottom:1px solid #2a2a36}.balance-board-title{margin:0 0 .35rem;font-size:1.2rem;font-weight:600}.balance-board-hint{margin:0 0 .75rem;color:#9ca3af;font-size:.8rem}.balance-board-faction-label{display:inline-flex;align-items:center;gap:.5rem;font-size:.85rem}.balance-board-faction-select{background:#1a1a24;color:inherit;border:1px solid #3a3a48;border-radius:4px;padding:.25rem .5rem}.balance-board-body{display:flex;flex-direction:column;gap:1rem;padding:1rem 1.5rem 2rem}.balance-board-card{background:#16161e;border:1px solid #2a2a36;border-radius:8px;padding:1rem;overflow-x:auto}.balance-board-card h2{margin:0 0 .75rem;font-size:1rem;font-weight:600}.balance-board-table{width:100%;border-collapse:collapse;font-size:.8rem}.balance-board-table th,.balance-board-table td{padding:.35rem .5rem;border-bottom:1px solid #2a2a36;text-align:left;white-space:nowrap}.balance-board-table th{color:#9ca3af;font-weight:500}.balance-board-table tbody tr:hover{background:#1e1e28}
