/* Original visual theme; no dependencies on the reference project. */
body.theater-ui { --surface:#f3f7f5; --panel:#fff; --field:#e9efeb; --ink:#203c33; --muted:#536d63; --line:#c6d6ce; --accent:#2d7258; background:var(--surface); color:var(--ink); }
body.theater-ui.dark-mode { --surface:#080f11; --panel:#101b1d; --field:#142426; --ink:#e0eae5; --muted:#9aafa7; --line:#2b403b; --accent:#b7ddca; color-scheme:dark; }
body.theater-ui .app-shell { padding-top:76px; }
body.theater-ui #map { border-radius:0; background:var(--surface); }
.theater-header { position:absolute; inset:0 0 auto; height:76px; z-index:1002; display:flex; align-items:center; padding:0 30px; background:var(--surface); border-bottom:1px solid var(--line); }
.theater-brand { color:var(--ink); text-decoration:none; display:flex; align-items:center; gap:13px; }
.theater-brand:hover { color:var(--accent); text-decoration:none; }
.theater-brand-mark { font-size:34px; font-weight:400; color:var(--accent); line-height:1; }
.theater-brand strong { display:block; font-size:19px; letter-spacing:.22em; line-height:1.3; }
.theater-brand small { display:block; margin-top:4px; font:8px/1.4 Consolas,monospace; letter-spacing:.2em; color:var(--muted); text-transform:uppercase; }
.theater-nav { position:absolute; left:50%; transform:translateX(-50%); height:100%; display:flex; gap:34px; }
.theater-nav a { display:flex; align-items:center; gap:10px; border-bottom:2px solid transparent; color:var(--muted); font-size:13px; text-decoration:none; }
.theater-nav a[aria-current] { color:var(--ink); border-color:var(--accent); }
.theater-nav a:hover { color:var(--accent); }
.theater-nav span { font:9px Consolas,monospace; color:var(--muted); }
.theater-intro { position:absolute; top:106px; left:30px; z-index:450; pointer-events:none; max-width:calc(100vw - 160px); padding:16px 20px; background:var(--surface); border:1px solid var(--line); border-radius:8px; box-shadow:0 4px 16px #00000012; }
.theater-intro p { font:9px/1.5 Consolas,monospace; letter-spacing:.14em; text-transform:uppercase; color:var(--accent); margin:0 0 8px; }
.theater-intro h1 { font-size:clamp(24px,3vw,38px); line-height:1.15; font-weight:400; letter-spacing:-.03em; margin:0 0 8px; }
.theater-intro small { display:block; color:var(--muted); font-size:12px; line-height:1.5; }
body.theater-ui .top-left-session-links { top:20px; right:26px; left:auto; z-index:1003; padding:0; background:var(--surface); border:1px solid var(--line); border-radius:2px; max-width:240px; }
body.theater-ui .top-left-user { color:var(--ink); border-radius:0; padding:8px 12px; max-width:238px; font-size:12px; font-weight:400; }
body.theater-ui .top-left-dropdown { left:auto; right:0; background:var(--panel); border:1px solid var(--line); border-radius:2px; padding:8px; }
body.theater-ui .top-left-dropdown-item { color:var(--ink); border-radius:0; padding:9px 12px; }
body.theater-ui .top-left-dropdown-item:hover,body.theater-ui .top-left-user:hover { color:var(--accent); background:var(--field); }
body.theater-ui .top-left-dropdown-divider { background:var(--line); }
body.theater-ui .top-left-summary-panel,body.theater-ui .top-left-sim-panel,body.theater-ui .top-left-defense-budget,body.theater-ui .map-controls,body.theater-ui .mobile-action-panel,body.theater-ui .modal-content,body.theater-ui .leaflet-control-layers,body.theater-ui .leaflet-popup-content-wrapper {
background:var(--panel); color:var(--ink); border:1px solid var(--line); border-radius:2px; box-shadow:0 12px 32px #00000020; }
body.theater-ui .top-left-summary-panel { top:94px; left:auto; right:76px; padding:20px; max-height:calc(100dvh - 120px); overflow-y:auto; }
body.theater-ui .top-left-sim-panel { top:244px; left:30px; padding:16px; width:300px; }
body.theater-ui .top-left-defense-budget { left:30px; bottom:298px; padding:13px 18px; }
body.theater-ui .defense-budget-label,body.theater-ui .sim-live-title,body.theater-ui .summary-title,body.theater-ui .bottom-sim-handle { font:10px/1.5 Consolas,monospace; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); }
body.theater-ui .defense-budget-value { color:var(--ink); font:24px/1.4 Consolas,monospace; margin-top:4px; }
body.theater-ui .top-left-quick-share { left:30px; bottom:378px; background:var(--panel); color:var(--accent); border:1px solid var(--line); box-shadow:none; }
body.theater-ui .bottom-sim-panel { left:30px; bottom:42px; width:min(780px,calc(100vw - 320px)); background-color:var(--panel) !important; color:var(--ink); border:1px solid var(--line); border-radius:2px; padding:14px 18px; box-shadow:0 12px 32px #00000020; }
body.theater-ui .bottom-sim-handle { background:transparent; border-bottom:1px solid var(--line); border-radius:0; padding:0 0 10px; margin-bottom:12px; }
body.theater-ui .bottom-drawer-toggle { bottom:6px; background:var(--panel); color:var(--muted); border:1px solid var(--line); border-radius:2px; box-shadow:none; font:10px/1.5 Consolas,monospace; }
body.theater-ui .leaflet-bottom.leaflet-right { right:20px; bottom:34px; }
body.theater-ui .map-controls { padding:16px; width:224px; opacity:1; }
body.theater-ui .map-controls::before { content:'MAP CONTROLS'; display:block; font:10px Consolas,monospace; letter-spacing:.12em; color:var(--muted); margin-bottom:14px; }
body.theater-ui .button-row.clear-buttons { gap:0; }
body.theater-ui .button-row.clear-buttons button { background:transparent; color:var(--ink); text-align:left; border:0; border-bottom:1px solid var(--line); border-radius:0; padding:10px 0; font-size:12px; }
body.theater-ui .button-row.clear-buttons button:hover { color:var(--accent); background:var(--field); }
body.theater-ui #settings-btn,body.theater-ui #location-btn { color:var(--accent); padding:10px 8px; }
body.theater-ui .ring-switches { border-top:1px solid var(--line); padding-top:12px; gap:10px; }
body.theater-ui .ring-switch-item,body.theater-ui #mobileSimulationModal .ring-switch-item,body.theater-ui .sim-speed-title,body.theater-ui .sim-speed-value,body.theater-ui .bottom-sim-help,body.theater-ui .summary-row,body.theater-ui .summary-section { color:var(--ink); }
body.theater-ui .summary-help,body.theater-ui .summary-label,body.theater-ui .summary-working-copy,body.theater-ui .summary-status,body.theater-ui .user-click-hint,body.theater-ui .template-filter-meta { color:var(--muted); }
body.theater-ui input[type=checkbox],body.theater-ui input[type=range] { accent-color:var(--accent); }
body.theater-ui .btn { border-radius:2px; font-size:12px; padding:8px 12px; box-shadow:none; }
body.theater-ui .btn-primary,body.theater-ui #simulateButton { background:var(--accent); border-color:var(--accent); color:var(--surface); }
body.theater-ui .btn-primary:hover,body.theater-ui #simulateButton:hover { filter:brightness(.9); }
body.theater-ui .btn-secondary,body.theater-ui .btn-dark,body.theater-ui .btn-light,body.theater-ui .btn-outline-secondary,body.theater-ui .btn-outline-primary,body.theater-ui .btn-outline-light { background:var(--field); color:var(--ink); border-color:var(--line); }
body.theater-ui .btn:disabled { opacity:.45; }
body.theater-ui :is(button,a,input,select):focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
body.theater-ui .modal-header,body.theater-ui .modal-footer { background:transparent; border-color:var(--line); padding:18px 24px; }
body.theater-ui .modal-title { color:var(--ink); font-weight:400; letter-spacing:-.02em; }
body.theater-ui .modal-body { padding:22px 24px; }
body.theater-ui .close { color:var(--ink); text-shadow:none; opacity:.8; top:16px; right:18px; }
body.theater-ui .modal-backdrop { background:#030a08; }
body.theater-ui .form-control,body.theater-ui .bootstrap-select .dropdown-toggle,body.theater-ui .bootstrap-select .dropdown-menu,body.theater-ui .bootstrap-select .bs-searchbox input { background:var(--field); color:var(--ink); border:1px solid var(--line); border-radius:2px; }
body.theater-ui .form-control:focus { border-color:var(--accent); box-shadow:0 0 0 2px #86b69e30; }
body.theater-ui .form-control::placeholder { color:var(--muted); }
body.theater-ui select.form-control option,body.theater-ui .bootstrap-select .dropdown-item { color:var(--ink); background:var(--field); }
body.theater-ui .bootstrap-select .dropdown-item:hover,body.theater-ui .bootstrap-select .dropdown-item.active { color:var(--surface); background:var(--accent); }
body.theater-ui .country-filter-btn { border-radius:2px; padding:8px 10px; background:var(--field); border-color:var(--line); color:var(--ink); }
body.theater-ui .country-filter-btn.active { background:var(--accent); color:var(--surface); border-color:var(--accent); }
body.theater-ui .selected-template-preview,body.theater-ui .sim-live-item,body.theater-ui .sim-report-metric-box,body.theater-ui .sim-report-section { border-radius:2px; border-color:var(--line); background:var(--field); color:var(--ink); }
body.theater-ui .sim-live-item strong,body.theater-ui .sim-report-metric-value { color:var(--accent); font-family:Consolas,monospace; }
body.theater-ui .sim-report-metric-label,body.theater-ui label { color:var(--muted); }
body.theater-ui .table { color:var(--ink); }
body.theater-ui .table td,body.theater-ui .table th,body.theater-ui hr { border-color:var(--line); }
body.theater-ui .text-muted { color:var(--muted) !important; }
body.theater-ui .leaflet-control-layers { padding:8px; }
body.theater-ui .leaflet-control-layers label { color:var(--ink); }
body.theater-ui .leaflet-control-layers-separator { border-color:var(--line); }
body.theater-ui .leaflet-control-layers-toggle { background-color:transparent; }
body.theater-ui .leaflet-popup-tip { background:var(--panel); }
body.theater-ui .leaflet-control-attribution.leaflet-control { display:block; background:var(--surface); color:var(--muted); font-size:9px; }
body.theater-ui .leaflet-control-attribution a { color:var(--accent); }
body.theater-ui .leaflet-top.leaflet-right { top:16px; right:20px; }
body.theater-ui .mobile-action-panel-toggle { background:var(--field); color:var(--accent); border-radius:0; padding:12px; }
@media (max-width:1050px) {
.theater-nav { gap:18px; } .theater-nav span { display:none; }
body.theater-ui .top-left-session-links { max-width:180px; } body.theater-ui .top-left-user { max-width:178px; }
body.theater-ui .bottom-sim-panel { width:calc(100vw - 294px); left:16px; } body.theater-ui .map-controls { width:220px; }
}
@media (max-width:700px) {
.theater-header { height:64px; padding:0 16px; } body.theater-ui .app-shell { padding-top:64px; }
.theater-brand strong { font-size:16px; } .theater-brand small { font-size:7px; } .theater-brand-mark { font-size:28px; } .theater-nav { display:none; }
.theater-intro { display:none; }
body.theater-ui .top-left-session-links { display:block; top:15px; right:12px; max-width:145px; } body.theater-ui .top-left-user { max-width:143px; font-size:11px; }
body.theater-ui .leaflet-top.leaflet-right { right:4px; top:12px; } body.theater-ui .leaflet-bottom.leaflet-right { right:2px; bottom:12px; }
body.theater-ui .map-controls { width:152px; padding:10px; } body.theater-ui .map-controls::before { font-size:9px; margin-bottom:4px; }
body.theater-ui .button-row.clear-buttons button { padding:7px 0; font-size:11px; } body.theater-ui .ring-switches { gap:5px; padding-top:7px; }
body.theater-ui .top-left-sim-panel { left:16px; } body.theater-ui .top-left-summary-panel { right:16px; }
body.theater-ui .mobile-action-panel { border-radius:2px; background:var(--panel); bottom:22px; width:150px; } body.theater-ui .modal-body { padding:18px; }
}
@media (prefers-reduced-motion:reduce) {
body.theater-ui .btn,body.theater-ui .bottom-drawer-panel,body.theater-ui .mobile-action-panel-body { transition:none; }
}
/* Allow controls to wrap at tablet widths without covering adjacent panels. */
body.theater-ui .bottom-sim-row { grid-template-columns:auto minmax(0,1fr); gap:16px; }
body.theater-ui .bottom-sim-secondary-row { grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); gap:16px; }
body.theater-ui .bottom-sim-panel .ring-switch-item { white-space:normal; }
body.theater-ui .bottom-sim-switches { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 14px; }
@media (min-width:601px) and (max-width:900px) {
    body.theater-ui .bottom-sim-row { grid-template-columns:1fr; gap:8px; }
}

/* Darken only the OpenStreetMap imagery; overlays retain their original colors. */
body.theater-ui.dark-mode .theater-osm-tiles { filter:invert(.93) hue-rotate(155deg) saturate(.35) brightness(.8); }
body.theater-ui .top-left-defense-budget { bottom:370px; }
body.theater-ui .top-left-quick-share { bottom:466px; }
body.theater-ui .sim-speed-note { background:var(--field); color:var(--muted); border:1px solid var(--line); border-radius:0; font-weight:400; }
body.theater-ui .map-controls { background-color:var(--panel) !important; }
body.theater-ui .bottom-sim-handle { color:var(--muted); }
body.theater-ui .bottom-sim-panel { pointer-events:auto; }@media (min-width:601px) and (max-width:900px) {
    body.theater-ui .top-left-defense-budget { bottom:500px; }
    body.theater-ui .top-left-quick-share { bottom:596px; }
}
