/* Reference presentation. All controls retain their existing game handlers. */
:root { --brass:#b59a63; --ink:#0b141d; --ivory:#eee6d4; }
/* The war room is artwork, not a blurred backdrop. */
.menu-scene-layer.scene-bg { animation:none; transform:none; filter:none; will-change:auto; background-position:center; }
.menu-scene-layer.scene-bg.high { background-image:url('assets/war_room_balcony.webp'); opacity:1; }
.menu-scene-layer.scene-bg.low { display:none; }
.menu-scene-layer.scene-vignette { z-index:3; background:linear-gradient(90deg,#02050899,transparent 36%),linear-gradient(0deg,#02050855,transparent 22%); }
.menu-scene-layer.scene-fog,.torch-flicker-layer,.menu-ambiance-canvas { display:none; }
.menu-top-bar { padding:28px 34px 0; }
.menu-telemetry-cluster { top:36px; left:59%; }
.menu-live-badge { border:1px solid #a18a5d; border-radius:0; padding:10px 18px; background:#0b151ee8; font:13px Georgia,serif; clip-path:polygon(10px 0,calc(100% - 10px) 0,100% 10px,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%,0 10px); }
.menu-top-profile-cluster { padding:5px 9px; gap:10px; border:1px solid #ac9566; background:linear-gradient(#15202aec,#080f17f5); border-radius:2px; box-shadow:inset 0 0 0 3px #09121b,0 5px 18px #0006; }
.menu-compact-profile { background:none; border:0; box-shadow:none; padding:0 8px 0 0; gap:14px; }
.profile-avatar-frame { width:54px; height:54px; border-color:var(--brass); }
.profile-avatar-img { width:100%; height:100%; object-fit:cover; }
.profile-name { font:500 17px 'Cinzel',Georgia,serif; text-transform:none; color:var(--ivory); }
.profile-rank-line { color:#aeb7bc; font-size:12px; }
.profile-winrate { color:#ccc3ae; }
.menu-quick-icon-btn { width:36px; height:40px; border:0; border-left:1px solid #9c8a6140; border-radius:0; background:none; color:#c9b07a; }
.menu-quick-icon-btn .svg-icon { width:21px; height:21px; }
.menu-left-rail { position:absolute; top:24px; bottom:26px; left:42px; width:min(460px,30vw); margin:0; justify-content:center; }
.menu-brand-header { align-items:center; text-align:center; margin:0 0 24px; padding:0 0 18px; position:relative; }
.menu-brand-header::after,.menu-rail-separator { background:linear-gradient(90deg,transparent,#a38b59,transparent); height:1px; }
.menu-brand-header::after { content:''; position:absolute; bottom:0; left:10%; right:10%; }
.brand-crown-icon { margin-bottom:6px; }
.brand-crown-icon .crown-hero-svg { width:clamp(38px,6vh,58px); height:clamp(38px,6vh,58px); filter:drop-shadow(0 2px 3px #0009); }
.brand-logo-text { font-size:clamp(32px,3.65vw,62px); font-weight:500; letter-spacing:.025em; line-height:1.16; filter:drop-shadow(0 2px 3px #000); }
.brand-edition-sub { font:11px/1.6 Georgia,serif; letter-spacing:.3em; color:#d9d4c7; margin-top:8px; }
.primary-nav-list { gap:10px; }
.primary-nav-card { height:clamp(64px,9.5vh,96px); border:1px solid #73808988; padding:0 22px; border-radius:0; background:#081019ed; backdrop-filter:none; box-shadow:inset 0 0 0 3px #101820,0 3px 10px #0005; clip-path:polygon(10px 0,calc(100% - 10px) 0,100% 10px,100% calc(100% - 10px),calc(100% - 10px) 100%,10px 100%,0 calc(100% - 10px),0 10px); }
.primary-nav-card.active { border-color:#ddbf78; background:#252017eb; box-shadow:inset 0 0 0 3px #51432b,0 0 15px #d7b16525; }
.nav-card-icon { width:42px; height:46px; }
.nav-card-icon .svg-icon { width:34px; height:34px; }
.nav-card-texts { margin-left:18px; }
.nav-card-title { font-size:clamp(16px,1.35vw,23px); font-weight:600; letter-spacing:.025em; color:#f0ede2; }
.nav-card-sub { font:13px/1.3 Georgia,serif; color:#b6bec0; white-space:normal; max-width:250px; }
.nav-card-bg-mask { opacity:.64; filter:saturate(.65); }
.nav-card-chevron { color:#d2c4a2; }
.primary-nav-card:focus-visible,.secondary-nav-row:focus-visible,.menu-quick-icon-btn:focus-visible { outline:2px solid #e9ce90; outline-offset:-5px; }
.menu-rail-separator { margin:18px 10px 10px; flex-shrink:0; }
.secondary-nav-list { gap:0; }
.secondary-nav-row { min-height:30px; padding:7px 20px; font:12px/1.2 'Cinzel',Georgia,serif; letter-spacing:.08em; color:#bdc4c5; }
.secondary-nav-row .svg-icon { color:#bba06a; width:21px; height:21px; }
.menu-rail-version { font:9px Georgia,serif; letter-spacing:.25em; padding:13px 20px 0; color:#8f9697; }
.menu-bottom-quote { left:34%; bottom:46px; max-width:310px; font:italic 14px/1.5 Georgia,serif; text-align:left; color:#b7b1a3; }
.menu-bottom-news-card { width:440px; right:34px; bottom:32px; height:70px; border:1px solid #84979e; border-radius:2px; background:#0a131cee; }
.news-thumb-frame { width:106px; height:58px; }
.news-headline { font:14px 'Cinzel',Georgia,serif; color:#dddacb; }
.news-summary { font:12px Georgia,serif; color:#acb6bb; }
/* Framed status band, restrained brass and slate, matching the map reference. */
body.in-game .game-hud { height:64px; min-height:64px; padding:6px 14px !important; gap:12px; background:linear-gradient(#13202bf7,#080f17fc) !important; backdrop-filter:none !important; border-bottom:1px solid #9d8557; box-shadow:0 2px 8px #0005 !important; }
body.in-game .hud-left,body.in-game .hud-right { gap:8px; }
body.in-game .hud-brand-title { font:500 20px 'Cinzel',Georgia,serif !important; letter-spacing:.04em; color:#d2b576; }
body.in-game .hud-brand-btn { padding:0 16px 0 4px; margin:0; }
body.in-game .hud-pill { min-height:48px !important; padding:5px 12px !important; border:1px solid #64727c !important; border-radius:2px !important; box-shadow:inset 0 0 0 2px #0a121b !important; background:linear-gradient(#152330,#0a111a) !important; gap:10px; }
body.in-game .hud-pill small { color:#a6b5bd !important; font:600 10px/1.2 'Outfit',sans-serif; letter-spacing:.035em; }
body.in-game .hud-pill strong { font:600 19px/1.15 'Cinzel',Georgia,serif; }
body.in-game .hud-pill em { font-size:11px; color:#8ab997; }
body.in-game .hero-pill { min-width:175px; }
body.in-game .hud-hero-avatar { width:38px; height:38px; border:1px solid #ba9d68; }
body.in-game .hero-pill strong { font-size:15px; color:#dbc185; }
body.in-game .hud-btn { min-width:44px; min-height:46px !important; border-radius:2px !important; border-color:#627481; background:linear-gradient(#182632,#081019); box-shadow:inset 0 0 0 2px #09131c; }
body.in-game .hud-center { flex:1 1 80px; min-width:0; }
body.in-game .dominance-labels .dom-player,body.in-game .dominance-bar { display:none !important; }
body.in-game .dominance-labels { justify-content:flex-end; }
body.in-game .dom-vs { color:#b9b3a2; font-size:10px; }
body.in-game .match-clock { border:1px solid #455662; border-radius:28px; padding:12px; background:#09131c; }
body.in-game .hud-dominance-strip { height:2px; opacity:.75; }
body.in-game .game-dock { width:calc(100% - 32px) !important; bottom:12px !important; min-height:74px; height:auto !important; max-height:none !important; padding:8px 12px !important; gap:12px !important; border:1px solid #998359 !important; border-radius:2px !important; background:linear-gradient(#14212bf7,#080f17fc) !important; box-shadow:inset 0 0 0 3px #0a141d,0 -2px 10px #0005 !important; backdrop-filter:none !important; overflow:visible !important; }
body.in-game .dock-source { border:0 !important; background:none !important; box-shadow:none !important; }
body.in-game .source-chip { min-height:48px !important; border:1px solid #516572 !important; border-radius:2px !important; background:#0c1822 !important; }
body.in-game .source-chip strong { font:600 14px 'Cinzel',Georgia,serif !important; max-width:170px; }
body.in-game .source-icon { color:#b4c6cf; }
body.in-game .source-garrison { color:#79a7ca; font-size:14px; }
body.in-game .castle-manage-icon-btn { min-height:40px !important; border-color:#9f8554 !important; color:#d6bd81 !important; background:linear-gradient(#2b2b21,#131a1a) !important; }
body.in-game .pct-btn,body.in-game .all-btn,body.in-game .strip-route-btn,body.in-game .reserve-btn { min-height:40px; }
body.in-game .troop-chip { min-width:40px !important; height:38px; border-color:#3d505e !important; background:#0d1923 !important; }
body.in-game .target-chip { min-width:130px; }
body.in-game #dispatchReason { position:static; background:none; padding:0; max-width:100%; font-size:10px; color:#b3b9b6; }
body.in-game .dock-action { position:relative; flex-wrap:wrap; gap:4px 10px; }
body.in-game #dispatchReason { flex:1 0 100%; text-align:right; }
body.in-game .strip-attack-btn { min-height:44px !important; }
body.in-game .strip-attack-btn:not(:disabled) { background:linear-gradient(#aa884b,#65522c) !important; border-color:#d7bd80 !important; color:#fff4d9 !important; box-shadow:inset 0 0 0 2px #6c5734 !important; }
body.in-game #dispatchActionText,body.in-game #dispatchActionText span { color:inherit; }
body.in-game .battlefield-main { inset:var(--hud-height,64px) 0 calc(var(--dock-height,90px) + 20px) !important; border:0; }
body.in-game .map-title-chip { top:calc(var(--hud-height,64px) + 16px); background:linear-gradient(90deg,#08131bdb,transparent) !important; border:0 !important; padding:8px 14px !important; border-radius:0 !important; box-shadow:none !important; }
body.in-game .chip-realm { font-size:19px !important; font-weight:500 !important; }
body.in-game .map-tools { top:calc(var(--hud-height,64px) + 20px); right:14px; gap:7px; }
body.in-game .map-tools button { width:42px !important; height:42px !important; border:1px solid #667985 !important; border-radius:2px !important; background:linear-gradient(#14222e,#071019) !important; backdrop-filter:none !important; }
#focusHome .svg-icon { width:22px; height:22px; }
body.in-game .resume-notice { background:linear-gradient(#13212bf2,#09121af2) !important; border:1px solid #b59a63 !important; font:600 14px 'Cinzel',Georgia,serif !important; letter-spacing:.02em !important; box-shadow:inset 0 0 0 3px #09131c !important; }
/* Ground contact belongs below the sprite, with no detached drop-shadow. */
body.in-game #map .castle-sprite-img { filter:saturate(.78) brightness(.88) !important; }
body.in-game #map .castle-name { font-size:18px !important; letter-spacing:.1px !important; }
body.in-game #map .castle-role { font-size:10px !important; opacity:.65 !important; }
body.in-game #map .label-hidden { display:none !important; }
body.in-game #map .castle-composition { display:none; }
body.in-game #map .castle:is(.source-selected,.target-selected):focus-visible .castle-composition { display:block; }
body.in-game #map .source-halo,body.in-game #map .target-halo { stroke-width:2; stroke-dasharray:none; }
body.in-game #map .castle-caption text { paint-order:stroke !important; }
body.in-game #map .castle-banner-group path { filter:none !important; }
body[data-quality="low"] #map .war-atmosphere,body[data-quality="low"] .weather-particle-layer { display:none; }
body[data-quality="low"] #map .castle-sprite-img { filter:none !important; }
body[data-quality="low"] #map .route,body[data-quality="low"] #map .banner-flag { animation:none !important; }
@media (max-width:1350px) and (min-width:901px) {
  body.in-game .hud-brand-title { display:none; }
  body.in-game .hero-pill { min-width:145px; }
  body.in-game .hud-center { display:none; }
  body.in-game .hud-left { flex:1; }
  body.in-game .game-dock { flex-wrap:wrap !important; gap:6px !important; }
  body.in-game .dock-source { flex:1 1 42%; }
  body.in-game .dock-tactics { flex:1 1 48%; justify-content:flex-end; }
  body.in-game .dock-action { flex:1 0 100%; justify-content:flex-end; }
  body.in-game #dispatchReason { flex:0 1 auto; order:-1; margin-right:auto; }
}
/* Touch play: readable local camera, full-size controls and a three-row command deck. */
@media (max-width:900px) {
  .menu-top-bar { padding:12px 16px 0; }
  .menu-top-profile-cluster { padding:4px 6px; gap:4px; }
  .profile-avatar-frame { width:36px; height:36px; }
  .profile-name { font-size:13px; }
  .profile-rank-line { font-size:10px; }
  .menu-header-actions { gap:2px; }
  .menu-quick-icon-btn { width:36px; min-height:44px; }
  .menu-left-rail { position:relative; top:auto; bottom:auto; left:auto; margin:22px 20px; width:calc(100% - 40px); justify-content:flex-start; }
  .menu-brand-header { margin-bottom:18px; padding-bottom:16px; }
  .brand-crown-icon .crown-hero-svg { width:42px; height:42px; }
  .brand-logo-text { font-size:clamp(32px,8.7vw,46px); }
  .brand-edition-sub { font-size:9px; letter-spacing:.25em; }
  .primary-nav-card { height:74px; padding:0 16px; }
  .nav-card-icon { width:32px; }
  .nav-card-icon .svg-icon { width:28px; height:28px; }
  .nav-card-title { font-size:17px; }
  .nav-card-sub { font-size:12px; }
  .secondary-nav-list { display:grid; grid-template-columns:1fr 1fr; gap:0; }
  .secondary-nav-row { min-height:44px; padding:8px; font-size:10px; letter-spacing:.035em; }
  .menu-rail-version { text-align:center; }
  .main-menu-screen { overflow-y:auto !important; height:100dvh !important; justify-content:flex-start !important; }
  .menu-ambiance-backdrop { position:fixed; }
  .menu-scene-layer.scene-vignette { background:linear-gradient(0deg,#050b13ed 5%,#050b13b0 65%,#050b1333); }
  .menu-scene-layer.scene-bg { background-position:58% center; }
  .menu-top-right { margin-left:auto; }
  .menu-telemetry-cluster,.menu-bottom-quote,.menu-bottom-news-card { display:none; }
  body.in-game .game-hud { min-height:56px !important; height:auto; padding:max(4px,env(safe-area-inset-top)) 6px 5px !important; gap:4px !important; flex-wrap:nowrap; }
  body.in-game .hud-left { flex:1 1 auto; gap:5px; }
  body.in-game .hud-right { flex:0 0 auto; gap:4px; }
  body.in-game .hud-center,body.in-game .hero-pill,body.in-game .room-pill,body.in-game .hud-brand-title { display:none !important; }
  body.in-game .army-pill { display:flex !important; }
  body.in-game .hud-brand-btn { width:30px; min-width:30px; height:44px; padding:0; }
  body.in-game .hud-pill { min-height:44px !important; padding:4px 7px !important; gap:5px; }
  body.in-game .hud-pill .hud-val { display:flex; flex-direction:column; }
  body.in-game .hud-pill small { font-size:8px !important; max-width:62px; overflow:hidden; white-space:nowrap; }
  body.in-game .hud-pill strong { font:700 16px/1.15 'Outfit',sans-serif; }
  body.in-game .hud-pill em,body.in-game .hud-pill .hud-icon,.hud-right #weatherName,.hud-right #weatherTipDot { display:none !important; }
  body.in-game .weather-pill { min-width:34px; width:34px; padding:0 !important; background:none !important; border:0 !important; box-shadow:none !important; }
  body.in-game .weather-pill #weatherIcon { display:block !important; font-size:19px; }
  body.in-game .weather-pill .hud-val { display:none !important; }
  body.in-game .hud-right .hud-btn { width:44px !important; min-width:44px; height:44px !important; min-height:44px !important; padding:0 !important; }
  body.in-game .hud-right #speedBtn,body.in-game .hud-right .match-clock { display:none !important; }
  body.in-game .map-title-chip { top:calc(var(--hud-height,56px) + 8px) !important; left:8px; padding:6px 9px !important; max-width:calc(100% - 75px); pointer-events:none !important; }
  body.in-game .chip-realm { font-size:13px !important; line-height:1.4; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  body.in-game .map-title-chip .chip-badge,body.in-game .map-title-chip #objectiveText { display:none !important; }
  body.in-game .map-tools { position:fixed; top:calc(var(--hud-height,56px) + 46px) !important; right:8px; flex-direction:column !important; gap:5px; }
  body.in-game .map-tools button { width:44px !important; min-width:44px !important; height:44px !important; min-height:44px !important; }
  body.in-game .zoom-presets,body.in-game #zoomReadout { display:none !important; }
  body.in-game .game-dock { display:grid !important; grid-template-columns:1fr; grid-template-rows:auto auto auto; width:calc(100% - 12px) !important; left:6px !important; right:6px; transform:none !important; bottom:max(6px,env(safe-area-inset-bottom)) !important; padding:7px !important; min-height:0 !important; height:auto !important; max-height:none !important; gap:6px !important; }
  body.in-game .dock-source { grid-column:1; grid-row:1; width:100% !important; padding:0 !important; min-width:0 !important; }
  body.in-game .context-castle { display:flex !important; gap:6px !important; width:100%; }
  body.in-game .context-view.hidden { display:none !important; }
  body.in-game .source-chip { flex:1; min-width:0 !important; height:48px !important; min-height:48px !important; padding:3px 6px !important; gap:5px !important; }
  body.in-game .source-meta { flex:1; min-width:0; }
  body.in-game .source-name-row strong { max-width:145px !important; font-size:12px !important; white-space:nowrap; }
  body.in-game .source-garrison { font-size:12px !important; }
  body.in-game .source-stars,body.in-game #activeSpecPill,body.in-game #sourceIncome,body.in-game .source-icon,body.in-game .mgmt-btn-label { display:none !important; }
  body.in-game .cycle-arrow-btn { display:flex !important; align-items:center; justify-content:center; width:40px; height:42px; min-width:40px; }
  body.in-game .castle-manage-icon-btn { width:44px !important; min-width:44px !important; height:44px !important; min-height:44px !important; font-size:18px !important; }
  body.in-game .strip-troops { display:none !important; }
  body.in-game .dock-tactics { grid-column:1; grid-row:2; display:flex !important; width:100%; gap:5px !important; padding:0 !important; border:0 !important; }
  body.in-game .percent-group { flex:1; display:flex !important; gap:4px !important; }
  body.in-game .pct-btn { flex:1; min-width:0 !important; height:44px !important; min-height:44px !important; padding:0 5px !important; font-size:12px !important; }
  body.in-game .all-btn { width:44px !important; min-width:44px !important; min-height:44px !important; padding:0 3px !important; font-size:10px; }
  body.in-game .all-btn span { font-size:0; }
  body.in-game .all-btn span::after { content:'⚑'; font-size:19px; }
  body.in-game .strip-route-btn,body.in-game .reserve-btn { width:44px !important; min-width:44px !important; height:44px !important; min-height:44px !important; padding:0 !important; display:flex !important; align-items:center; justify-content:center; }
  body.in-game .strip-route-btn .route-text-wrap,body.in-game .reserve-btn .btn-text,body.in-game .reserve-btn span:not(.btn-icon),body.in-game kbd { display:none !important; }
  body.in-game .dock-action { grid-column:1; grid-row:3; display:grid !important; grid-template-columns:minmax(0,1fr) minmax(115px,.9fr); gap:5px !important; width:100% !important; align-items:center; padding:0 !important; border:0 !important; }
  body.in-game .target-chip { min-width:0 !important; max-width:none !important; padding:0 4px !important; }
  body.in-game .target-head-row { display:flex; flex-direction:column; align-items:flex-start; gap:2px; }
  body.in-game #targetName { max-width:100%; font-size:11px !important; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  body.in-game #targetDefenseText,body.in-game #battleForecast { font-size:10px !important; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; display:block; }
  body.in-game #targetHint { font-size:11px; color:#c4c9c5; }
  body.in-game #dispatchActionBtn { width:100% !important; min-width:0 !important; height:48px !important; min-height:48px !important; padding:4px 6px !important; font-size:12px !important; }
  body.in-game #dispatchReason { display:none; }
  body.in-game .battlefield-main { bottom:calc(var(--dock-height,170px) + 10px) !important; }
  body.in-game .minimap-toggle-btn { right:8px; width:44px; height:44px; min-height:44px; bottom:calc(var(--dock-height,170px) + 20px); }
  body.in-game .minimap-container { right:60px; bottom:calc(var(--dock-height,170px) + 20px); }
  body.in-game .dragon-strike-controls,body.in-game .hero-abilities { bottom:calc(var(--dock-height,170px) + 76px); }
  body.in-game .game-hud,body.in-game .game-dock,body.in-game .map-tools button { backdrop-filter:none !important; -webkit-backdrop-filter:none !important; }
  body.in-game .resume-notice { max-width:calc(100% - 84px); top:calc(var(--hud-height,56px) + 12px); font-size:11px !important; padding:8px !important; }
}
@media (max-width:360px) {
  body.in-game .hud-brand-btn { display:none; }
  .menu-top-bar { padding:8px; }
  .menu-top-profile-cluster { gap:0; }
  .menu-compact-profile { gap:6px; padding-right:4px; }
  .menu-quick-icon-btn { width:32px; }
  .menu-left-rail { margin:18px 12px; width:calc(100% - 24px); }
  .nav-card-title { font-size:15px; }
  .nav-card-sub { font-size:11px; }
  .primary-nav-card { height:68px; }
  body.in-game .cycle-arrow-btn { display:none !important; }
}
@media (max-height:520px) and (min-width:600px) {
  .menu-left-rail { margin:12px 24px 24px; width:330px; }
  .menu-top-bar { position:absolute; top:0; right:0; }
  .menu-brand-header { margin-bottom:10px; padding-bottom:8px; }
  .brand-crown-icon { display:none; }
  .brand-logo-text { font-size:30px; }
  .brand-edition-sub { display:none; }
  .primary-nav-card { height:57px; }
  .nav-card-title { font-size:16px; }
  .nav-card-sub { font-size:11px; }
  .secondary-nav-list { grid-template-columns:1fr 1fr; }
  body.in-game .game-hud { min-height:50px !important; }
  body.in-game .game-dock { grid-template-columns:minmax(175px,.8fr) minmax(0,1.5fr); grid-template-rows:44px 44px; padding:5px 8px !important; gap:4px 10px !important; }
  body.in-game .dock-source { grid-row:1 / 3; grid-column:1; align-self:center; }
  body.in-game .dock-tactics { grid-row:1; grid-column:2; }
  body.in-game .dock-action { grid-row:2; grid-column:2; }
  body.in-game .source-chip { height:70px !important; }
  body.in-game .source-name-row strong { max-width:130px !important; }
  body.in-game .map-tools { top:calc(var(--hud-height,50px) + 8px) !important; right:8px; display:grid; grid-template-columns:44px 44px; }
  body.in-game .map-title-chip { max-width:calc(100% - 120px); }
  body.in-game .minimap-toggle-btn { right:8px; }
  body.in-game .dragon-strike-controls,body.in-game .hero-abilities { right:58px; bottom:calc(var(--dock-height,100px) + 18px); }
}
/* Explicitly replace legacy fixed 28/34px grid tracks. */
body.in-game #map .selection { opacity:0; fill:none; }
body.in-game #map .castle:is(.source-selected,.target-selected) .selection { opacity:1; stroke:#c1ab73; stroke-width:2; }
body.in-game #map .castle.target-selected .selection { stroke:#c4776f; }
body.in-game #map .source-halo,body.in-game #map .target-halo { display:none; }
@media (max-width:900px) {
  body.in-game #gameDock { grid-template-columns:minmax(0,1fr) !important; grid-template-rows:auto auto auto !important; max-width:none !important; }
  body.in-game #activeBox { grid-column:1 !important; grid-row:1 !important; }
  body.in-game #tacticalControls { grid-column:1 !important; grid-row:2 !important; flex-wrap:nowrap !important; width:100% !important; }
  body.in-game #targetBox { grid-column:1 !important; grid-row:3 !important; margin:0 !important; }
  body.in-game .source-chip { flex:1 1 auto !important; }
  body.in-game .percent-group { flex:1 1 auto !important; padding:0 !important; border:0 !important; min-width:0; }
  body.in-game .pct-btn { flex:1 1 0 !important; min-width:44px !important; }
  body.in-game .all-btn { display:flex !important; align-items:center; justify-content:center; }
  body.in-game .target-chip { text-align:left !important; }
  body.in-game #targetName,body.in-game #battleForecast { max-width:100% !important; }
  body.in-game #battleForecast { display:block !important; }
  body.in-game .tactical-ability-rail { right:auto; left:10px; bottom:calc(var(--dock-height,170px) + 18px); flex-direction:row; gap:6px; }
  body.in-game .tactical-ability-rail button { width:44px; height:44px; min-height:44px; }
}
@media (max-height:520px) and (min-width:600px) {
  body.in-game #gameDock { grid-template-columns:minmax(175px,.8fr) minmax(0,1.5fr) !important; grid-template-rows:44px 48px !important; }
  body.in-game #activeBox { grid-column:1 !important; grid-row:1 / 3 !important; }
  body.in-game #tacticalControls { grid-column:2 !important; grid-row:1 !important; }
  body.in-game #targetBox { grid-column:2 !important; grid-row:2 !important; }
  body.in-game .tactical-ability-rail { left:8px; bottom:calc(var(--dock-height,100px) + 14px); }
}
body.in-game #map .castle .building,body.in-game #map .castle:hover .building,body.in-game #map .castle.source-selected .building { filter:none !important; transition:none; }
body.in-game #toast { border-radius:2px; border-color:#9d895b; background:#111c25ed; box-shadow:0 3px 12px #0004; }
@media (max-width:900px) {
  body.in-game .weather-pill { width:44px; min-width:44px; }
  body.in-game .castle-mgmt-panel .reserve-btn { width:100% !important; height:auto !important; min-height:48px !important; padding:8px 12px !important; justify-content:flex-start; }
  body.in-game .castle-mgmt-panel .reserve-btn .btn-text,body.in-game .castle-mgmt-panel .reserve-btn span { display:block !important; }
  body.in-game .castle-mgmt-panel { bottom:calc(var(--dock-height,170px) + 10px); max-height:calc(100dvh - var(--hud-height,56px) - var(--dock-height,170px) - 30px); }
}
