/* Crownfall battlefield: shared faction cues and restrained navy/brass surfaces. */
body.in-game { --cf-ink:#090f16; --cf-panel:#0d151e; --cf-line:#514b3b; --cf-steel:#2c3942; --cf-text:#e4ded0; --cf-muted:#919da3; }
#map .castle { --faction:#a79e83; --faction-dark:#22272a; --faction-cloth:#898571; }
#map .castle[data-owner="blue"] { --faction:#668eac; --faction-dark:#122535; --faction-cloth:#386887; }
#map .castle[data-owner="red"] { --faction:#ae696b; --faction-dark:#301b22; --faction-cloth:#833c47; }
#map .castle[data-owner="green"] { --faction:#83a38a; --faction-dark:#192b24; --faction-cloth:#4c775b; }
#map .castle[data-owner="purple"] { --faction:#a18ab9; --faction-dark:#251f32; --faction-cloth:#775589; }
body.in-game #map .castle .ownership-ring { fill:none; stroke:var(--faction); stroke-width:1.5px; vector-effect:non-scaling-stroke; opacity:.9; }
body.in-game #map .castle .ownership-aura { fill:var(--faction-cloth); fill-opacity:.15; }
body.in-game #map .castle[data-owner="neutral"] .ownership-aura { fill-opacity:0; }
body.in-game #map .castle[data-owner="neutral"] .ownership-ring { stroke-width:1px; opacity:.55; }
body.in-game #map .castle .faction-flag,body.in-game #map .castle .gate-banner { fill:var(--faction-cloth); }
body.in-game #map .castle .castle-caption .troop-plate { fill:var(--faction-dark); stroke:var(--faction); stroke-width:1.1px; vector-effect:non-scaling-stroke; }
body.in-game #map .ownership-marker { fill:var(--faction); }
body.in-game #map .castle-caption .castle-name { fill:#e4dfd1; font-size:16px !important; letter-spacing:0 !important; }
body.in-game #map .castle-caption .castle-role { fill:#a6b0b2; font-size:11px !important; opacity:1 !important; }
body.in-game #map .castle-sprite-img { filter:saturate(.82) brightness(.92) !important; }
body.in-game #map .source-halo,body.in-game #map .target-halo { display:block !important; opacity:0; fill:none !important; stroke-width:1.3px !important; vector-effect:non-scaling-stroke; }
body.in-game #map .castle.source-selected .source-halo { opacity:.95; stroke:#94b4ca !important; }
body.in-game #map .castle.target-selected .target-halo { opacity:1; stroke:#cb9290 !important; stroke-dasharray:5 3; }
body.in-game #map .castle.target-selected[data-owner="blue"] .target-halo { stroke:#94b4ca !important; }
body.in-game #map #routePreview,body.in-game #map #dragLine { stroke:#afc8d8; stroke-width:1.6px; vector-effect:non-scaling-stroke; }
body.in-game #map #connections { display:none; }
#map .anchor-debug { display:none; }
#map.show-anchors .anchor-debug { display:block; }
#map .castle-silhouette-hitbox { cursor:pointer; }
/* Plates remain attached to their roots; only optional name/role details declutter. */
body.in-game #map .label-hidden { display:none !important; }
body.in-game .game-hud { background:#0a1119f7 !important; border-bottom:1px solid var(--cf-line) !important; box-shadow:0 3px 12px #0005 !important; }
body.in-game .game-hud .hud-pill { background:transparent !important; border:0 !important; border-right:1px solid var(--cf-steel) !important; border-radius:0 !important; box-shadow:none !important; }
body.in-game .game-hud .hud-pill small { color:var(--cf-muted) !important; letter-spacing:.07em; }
body.in-game .game-hud .gold-pill strong { color:#c9b17a; }
body.in-game .game-hud .army-pill strong { color:#8bacbf; }
body.in-game .game-hud .hud-btn,body.in-game .map-tools button,body.in-game .minimap-toggle-btn { border:1px solid #39434a !important; border-radius:3px !important; color:#c8c8bf !important; background:#101820 !important; box-shadow:none !important; text-shadow:none !important; }
body.in-game .game-hud .hud-btn .svg-icon { width:18px; height:18px; }
body.in-game .game-hud .hud-btn:is(:hover,:focus-visible),body.in-game .map-tools button:is(:hover,:focus-visible) { border-color:#9b875d !important; background:#20221e !important; color:#d8c49a !important; }
body.in-game .game-hud .match-clock { background:none; border:0; padding:0 6px; color:#9da8ad; font:11px 'Outfit',sans-serif; }
body.in-game .game-hud .match-clock .live-dot { display:none; }
body.in-game .game-hud .weather-pill { border:0 !important; color:#a9b6be; }
body.in-game #weatherIcon { font-size:0 !important; filter:grayscale(1); }
body.in-game #weatherIcon::after { content:'☀︎'; font:22px/1 Georgia,serif; color:#a6b0b5; }
body.in-game [data-weather="rain"] #weatherIcon::after { content:'☂︎'; }
body.in-game [data-weather="snow"] #weatherIcon::after { content:'❄︎'; }
body.in-game [data-weather="fog"] #weatherIcon::after { content:'≋'; }
body.in-game .game-dock { background:#0b121bf8 !important; border:1px solid #74664b !important; box-shadow:inset 0 0 0 2px #101b24,0 -3px 14px #0005 !important; border-radius:3px !important; color:var(--cf-text); }
body.in-game #gameDock .source-chip { border:0 !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; }
body.in-game #gameDock .source-chip strong { color:#ddd7c8; font-weight:500 !important; }
body.in-game #gameDock .source-garrison { color:#8cabbf; }
body.in-game #gameDock :is(.pct-btn,.all-btn,.strip-route-btn,.reserve-btn,.cycle-arrow-btn,.castle-manage-icon-btn) { background:#101a24 !important; border:1px solid #34414c !important; border-radius:3px !important; color:#c4c8c5 !important; box-shadow:none !important; text-shadow:none !important; }
body.in-game #gameDock .pct-btn:is(.active,[aria-pressed="true"]) { background:#20384a !important; border-color:#668da6 !important; color:#e0e8e9 !important; box-shadow:inset 0 -2px 0 #668da64d !important; }
body.in-game #gameDock :is(.pct-btn,.all-btn,.strip-route-btn,.reserve-btn,.cycle-arrow-btn,.castle-manage-icon-btn):focus-visible { outline:2px solid #b29c71; outline-offset:2px; }
body.in-game #gameDock .castle-manage-icon-btn .svg-icon { width:20px; height:20px; }
body.in-game #gameDock .strip-attack-btn:not(:disabled) { background:#5e5032 !important; border:1px solid #a08a59 !important; color:#eee2c5 !important; box-shadow:inset 0 1px 0 #b79d5630 !important; border-radius:3px !important; text-shadow:none; }
body.in-game #gameDock .strip-attack-btn:disabled { background:#18222b !important; border:1px solid #38434b !important; color:#909ba1 !important; opacity:1 !important; box-shadow:none !important; border-radius:3px !important; }
body.in-game #gameDock #targetName { color:#d4d8d5; }
body.in-game #gameDock #targetDefenseText { color:#aeb9bd; }
body.in-game #gameDock #battleForecast { color:#bb9e8c; }
@media (max-width:900px) {
  body.in-game .game-hud { min-height:52px !important; padding:calc(3px + env(safe-area-inset-top,0px)) max(6px,env(safe-area-inset-right,0px)) 3px max(6px,env(safe-area-inset-left,0px)) !important; gap:4px !important; }
  body.in-game .hud-brand-btn { display:none !important; }
  body.in-game .hud-left { gap:0 !important; }
  body.in-game .game-hud .hud-pill { padding:3px 9px !important; min-height:44px !important; }
  body.in-game .game-hud .hud-pill strong { font:600 19px/1.1 'Outfit',sans-serif; }
  body.in-game .game-hud .hud-pill small { font-size:8px !important; }
  body.in-game .hud-right { gap:3px !important; }
  body.in-game .game-hud .hud-right .match-clock { display:block !important; min-width:32px; padding:0 2px; }
  body.in-game .game-hud .weather-pill { width:44px; min-width:44px; padding:0 !important; }
  body.in-game #gameDock { left:max(6px,env(safe-area-inset-left,0px)) !important; right:max(6px,env(safe-area-inset-right,0px)) !important; width:auto !important; bottom:calc(4px + env(safe-area-inset-bottom,0px)) !important; padding:5px 6px !important; gap:4px !important; grid-template-rows:44px 44px 44px !important; }
  body.in-game #gameDock .source-chip { height:44px !important; min-height:44px !important; padding:0 !important; }
  body.in-game #gameDock #dispatchActionBtn { height:44px !important; min-height:44px !important; }
  body.in-game #gameDock .dock-tactics { padding-top:0 !important; }
  body.in-game #gameDock .target-chip { padding-left:0 !important; }
  body.in-game #gameDock .pct-btn { font:600 12px 'Outfit',sans-serif !important; }
  body.in-game .battlefield-main { bottom:calc(var(--dock-height,154px) + 8px + env(safe-area-inset-bottom,0px)) !important; }
  body.in-game .map-tools { right:max(7px,env(safe-area-inset-right,0px)); }
  body.in-game .map-title-chip { padding:5px 8px !important; }
  body.in-game #toast { pointer-events:none; }
}
@media (max-width:360px) {
  body.in-game .game-hud .hud-pill { padding:3px 6px !important; }
  body.in-game .game-hud .hud-pill strong { font-size:17px; }
  body.in-game .game-hud .hud-right .match-clock { min-width:28px; font-size:10px; }
}
@media (max-height:520px) and (min-width:480px) {
  body.in-game #gameDock { grid-template-rows:44px 44px !important; }
  body.in-game #gameDock .source-chip { height:88px !important; grid-template-rows:auto 44px; }
  body.in-game #gameDock .source-meta { display:flex !important; flex-direction:row !important; align-items:center; }
  body.in-game #gameDock .source-garrison-line { display:flex !important; }
}
body.in-game #map .strategic-roads > path:not(.road-bed) { stroke:#a29a82; stroke-width:1.4; stroke-dasharray:none; opacity:.46; stroke-linejoin:round; stroke-linecap:round; }
body.in-game #map .strategic-roads > path.road-bed { stroke:#1e2520; stroke-width:4.5; opacity:.5; stroke-linejoin:round; stroke-linecap:round; }
body.in-game .game-hud .hud-right .match-clock { border:0 !important; background:none !important; box-shadow:none !important; min-height:0 !important; height:auto !important; }
