
:root { --bg:#0b1220; --panel:#111827; --panel2:#1f2937; --text:#e5e7eb; --muted:#94a3b8; --accent:#60a5fa; --warn:#f59e0b; --bad:#ef4444; --good:#22c55e; }
* { box-sizing:border-box; } body { margin:0; font-family:Arial,Helvetica,sans-serif; background:var(--bg); color:var(--text); }
header { padding:16px 20px; background:#020617; border-bottom:1px solid #334155; } h1,h2,h3 { margin:0 0 10px; }
.container { display:grid; grid-template-columns: 390px 1fr 390px; gap:16px; padding:16px; } .player-container { display:grid; grid-template-columns: 360px 1fr; gap:16px; padding:16px; }
.panel { background:var(--panel); border:1px solid #334155; border-radius:12px; padding:16px; min-height:120px; }
.small { color:var(--muted); font-size:13px; } .row { display:flex; gap:8px; flex-wrap:wrap; align-items:center; } .grid2 { display:grid; grid-template-columns: 1fr 1fr; gap:10px; }
.tag { display:inline-block; background:#0b1220; border:1px solid #334155; color:#cbd5e1; border-radius:999px; padding:3px 8px; font-size:12px; margin:0 6px 6px 0; }
.tag-critical { color:#fecaca; border-color:#ef4444; background:rgba(127,29,29,.35); }
button, select, input, textarea { background:var(--panel2); color:var(--text); border:1px solid #475569; border-radius:8px; padding:10px 12px; }
button { background:var(--accent); color:#08111f; border:0; font-weight:700; cursor:pointer; } button.secondary { background:#334155; color:var(--text); } button.good { background:#22c55e; color:#052e16; } button.warn { background:#f59e0b; color:#111827; }
.card { background:var(--panel2); border:1px solid #475569; border-radius:10px; padding:10px; margin:10px 0; } .asset { border-left:4px solid var(--accent); } .asset.committed { border-left-color:var(--warn); } .asset.delayed { border-left-color:var(--bad); }
.timeline-item { border-left:4px solid #60a5fa; padding-left:10px; margin:10px 0; } #map, #playerMap { width:100%; height:760px; border-radius:12px; overflow:hidden; border:1px solid #334155; }
.leaflet-container { background:#082032; } .legend-box { margin-top:8px; font-size:12px; color:var(--muted); } .status-good { color:#86efac; } .status-warn { color:#fcd34d; } .status-bad { color:#fca5a5; }
textarea { width:100%; min-height:110px; resize:vertical; } .zone-selected { outline:2px solid #f59e0b; }


.ntds-div-icon { background: transparent; border: 0; }
.ntds-marker-wrap { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; pointer-events:none; }
.ntds-symbol-shell { padding:2px 4px 0; border-radius:14px; background:rgba(2,6,23,.14); backdrop-filter: blur(1px); }
.ntds-marker-wrap svg { overflow: visible; filter: drop-shadow(0 2px 4px rgba(2,6,23,.45)); }
.ntds-asset-name { margin-top:-2px; padding:2px 8px; border-radius:999px; border:1px solid #334155; font-size:10px; font-weight:800; line-height:1.3; white-space:nowrap; text-align:center; max-width:168px; overflow:hidden; text-overflow:ellipsis; }
.ntds-asset-meta { padding:1px 6px; border-radius:999px; background:rgba(248,250,252,.95); border:1px solid #cbd5e1; color:#0f172a; font-size:9px; font-weight:700; line-height:1.2; white-space:nowrap; text-align:center; max-width:190px; overflow:hidden; text-overflow:ellipsis; }

.ntds-track .ntds-symbol-shell { background: rgba(15,23,42,.10); }
.ntds-unit .ntds-symbol-shell { background: rgba(2,6,23,.16); }
.ntds-track .ntds-asset-meta { background: rgba(255,251,235,.96); }
.ntds-unit .ntds-asset-meta { background: rgba(248,250,252,.95); }

.ntds-marker-wrap { min-width: 118px; }
.ntds-asset-meta { max-width: 220px; }
@media (max-width: 1400px) {
  .container { grid-template-columns: 420px 1fr 360px; }
}


html, body { height: 100%; overflow: hidden; }
body { min-height: 100vh; }
header { position: sticky; top: 0; z-index: 20; }
.container { align-items: start; height: calc(100vh - 86px); overflow: hidden; }
.container > .panel:first-child,
.container > .panel:last-child { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.container > .panel:nth-child(2) { height: 100%; position: sticky; top: 0; overflow: hidden; display: flex; flex-direction: column; }
.container > .panel:nth-child(2) h2 { flex: 0 0 auto; }
#map { flex: 1 1 auto; height: auto; min-height: 520px; }
.legend-box { flex: 0 0 auto; }
@media (max-width: 1100px) {
  html, body { overflow: auto; }
  .container { grid-template-columns: 1fr; height: auto; overflow: visible; }
  .container > .panel:first-child,
  .container > .panel:last-child,
  .container > .panel:nth-child(2) { height: auto; overflow: visible; position: static; }
  #map { height: 70vh; min-height: 420px; }
}


.asset-filter-box { margin-top:10px; padding:10px 12px; border:1px solid #334155; border-radius:12px; background:#0b1220; }
.asset-filter-box summary { cursor:pointer; font-weight:700; }
.filter-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:6px 10px; margin-top:6px; }
.filter-check { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text); }
.map-legend { display:grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap:6px 14px; align-items:center; }
.legend-row { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--text); }
.legend-symbol { display:inline-block; width:28px; height:16px; border-radius:10px; border:2px solid #e2e8f0; background:rgba(30,41,59,.35); }
.legend-unit { border-style:solid; background:rgba(30,64,175,.45); }
.legend-track { border-style:dashed; background:rgba(30,41,59,.12); }
.legend-chip { display:inline-flex; align-items:center; justify-content:center; min-width:22px; height:18px; padding:0 6px; border-radius:999px; font-size:11px; font-weight:800; color:#f8fafc; background:#334155; }
.aff-friend { background:#1d4ed8; }
.aff-assumed_friend { background:#0f766e; }
.aff-neutral { background:#475569; }
.aff-hostile { background:#b91c1c; }
.aff-suspect { background:#d97706; }
.aff-unknown { background:#6d28d9; }


.asset-section { margin-bottom: 12px; }
.section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #8fb4ff; margin: 6px 0; }


.player-container { align-items: start; height: calc(100vh - 86px); overflow: hidden; }
.player-container > .panel:first-child { height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.player-container > .panel:nth-child(2) { height: 100%; position: sticky; top: 0; overflow: hidden; display: flex; flex-direction: column; }
.player-container > .panel:nth-child(2) h2 { flex: 0 0 auto; }
#playerMap { flex: 1 1 auto; height: auto; min-height: 520px; }
.player-select-btn { margin-top: 8px; }
@media (max-width: 1100px) {
  .player-container { grid-template-columns: 1fr; height: auto; overflow: visible; }
  .player-container > .panel:first-child,
  .player-container > .panel:nth-child(2) { height: auto; overflow: visible; position: static; }
  #playerMap { height: 70vh; min-height: 420px; }
}

.nav-btn { display:inline-flex; align-items:center; justify-content:center; padding:8px 12px; border-radius:8px; background:#334155; color:#e5e7eb; text-decoration:none; font-weight:700; border:1px solid #475569; }
.waypoint-div-icon { background:transparent; border:0; }
.waypoint-pin { display:flex; align-items:center; justify-content:center; min-width:28px; height:28px; padding:0 8px; border-radius:999px; background:#f59e0b; color:#111827; border:2px solid #fff7ed; font-size:11px; font-weight:800; box-shadow:0 2px 6px rgba(0,0,0,.35); }
.distance-label-icon { background:transparent; border:0; }
.distance-label { padding:1px 6px; border-radius:999px; background:rgba(248,250,252,.96); color:#0f172a; border:1px solid #cbd5e1; font-size:10px; font-weight:700; white-space:nowrap; }
.ops-container { display:grid; grid-template-columns: minmax(420px, 1fr) minmax(320px, 420px); gap:16px; padding:16px; }
@media (max-width: 1100px) { .ops-container { grid-template-columns:1fr; } }

.app6-div-icon,.minimal-div-icon,.commercial-div-icon{background:transparent;border:0;}
.symbol-app6 .ntds-symbol-shell,.symbol-minimal .ntds-symbol-shell,.symbol-commercial .ntds-symbol-shell{background:transparent;backdrop-filter:none;}
#symbolStyleSelect{min-width:160px;}

.compact-grid { display:grid; grid-template-columns: 1fr; gap:10px; }
.panel label { display:block; width:100%; }
.panel select, .panel input, .panel textarea { width:100%; max-width:100%; }
.player-container .panel:first-child .tag { max-width:100%; }
.player-container .panel:first-child .card, .ops-container .panel .card { overflow:hidden; }


header { display:flex; flex-direction:column; gap:6px; position:sticky; top:0; z-index:20; }
.turn-badge {
  position:absolute;
  right:20px;
  top:16px;
  min-width:132px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid #60a5fa;
  background:rgba(15,23,42,.94);
  box-shadow:0 8px 24px rgba(2,6,23,.35);
  text-align:right;
}
.turn-badge-turn { font-size:12px; font-weight:800; color:#93c5fd; text-transform:uppercase; letter-spacing:.04em; }
.turn-badge-time { font-size:22px; font-weight:800; color:#eff6ff; line-height:1.05; }
.turn-badge-meta { font-size:11px; color:#cbd5e1; margin-top:3px; }
header .row { padding-right:160px; }
@media (max-width: 900px) {
  .turn-badge { position:static; align-self:flex-start; text-align:left; min-width:0; }
  header .row { padding-right:0; }
}

.measure-control {
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  border: 1px solid #475569;
  border-radius: 12px;
  padding: 10px;
  min-width: 170px;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.28);
}
.measure-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #93c5fd; }
.measure-status { margin-top: 6px; font-size: 13px; font-weight: 700; color: #f8fafc; }
.measure-actions { display: flex; gap: 8px; margin-top: 8px; }
.measure-btn { border: 1px solid #64748b; background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
.measure-btn.secondary { background: #1e293b; }
.measure-btn.active { border-color: #f59e0b; color: #fbbf24; }
.measure-label div { background: rgba(15, 23, 42, 0.96); color: #f8fafc; border: 1px solid #f59e0b; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; text-align: center; white-space: nowrap; box-shadow: 0 6px 16px rgba(2, 6, 23, 0.28); }


.turn-status-panel {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  padding:12px 14px;
  border:1px solid #60a5fa;
  border-radius:12px;
  background:rgba(15,23,42,.72);
}
.turn-status-kicker { font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; color:#93c5fd; }
.turn-status-main { font-size:24px; font-weight:800; color:#f8fafc; line-height:1.05; }
.turn-status-meta { font-size:12px; color:#cbd5e1; }
.turn-status-tags { display:flex; flex-wrap:wrap; gap:8px; }
.turn-status-tags .tag { margin:0; }
.facilitator-scenario-layout { grid-template-columns:minmax(420px, 1fr) minmax(420px, 1fr); }
.facilitator-ops-layout { grid-template-columns:minmax(520px, 1fr) minmax(320px, 420px); }

.map-toolbar { display:flex; gap:8px; align-items:center; margin:10px 0 12px; flex-wrap:wrap; }
.map-toolbar-status { padding:8px 10px; border:1px dashed #475569; border-radius:10px; background:#0f172a; min-width:220px; }
.active-tool-btn { border-color:#f59e0b !important; color:#fbbf24 !important; }
.legend-row span.small { color: var(--muted); }

.external-map-tools { position: static; margin: 8px 0 10px; }
.cell-map-badge { display:none !important; }
.cell-div-icon { display:none !important; }

.ops-container.player-page-scroll > .panel,
.player-page-scroll > .panel {
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.fullmap-layout { padding:16px; }
.fullmap-layout > .panel { min-height: calc(100vh - 120px); }
.player-map-small { height: 520px !important; }
.player-map-full { height: calc(100vh - 260px) !important; min-height: 640px; }
.weather-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap:10px; }
.tag-warn { background: rgba(245,158,11,.15); border-color:#f59e0b; color:#fde68a; }
@media (max-width: 1100px) {
  .ops-container.player-page-scroll > .panel,
  .player-page-scroll > .panel { max-height:none; overflow:visible; }
  .player-map-full { height: 70vh !important; min-height: 480px; }
}

.facilitator-assets-layout { grid-template-columns:minmax(420px, 0.95fr) minmax(460px, 1.05fr); }
.facilitator-assets-layout > .panel { min-height: calc(100vh - 140px); }

/* Global turn badge override */
header {
  position: relative;
}

.turn-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  min-width: 190px;
  min-height: 56px;
  padding: 14px 22px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: #2b5ea7;
  box-shadow: 0 6px 18px rgba(0,0,0,0.28);
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* Scenario page bottom breathing room */
.facilitator-scenario-layout,
.player-page-scroll,
.ops-container {
  padding-bottom: 140px !important;
}

body {
  overflow-y: auto;
}

/* Facilitator scenario page: allow full natural page height */
.facilitator-scenario-layout {
  align-items: start !important;
}

.facilitator-scenario-layout > .panel {
  min-height: auto !important;
  height: auto !important;
}

.facilitator-scenario-layout .player-page-scroll,
.facilitator-scenario-layout .ops-container,
.facilitator-scenario-layout .panel {
  overflow: visible !important;
  max-height: none !important;
}

body.facilitator-scenario-page,
body[data-page="facilitator-scenario"] {
  overflow-y: auto !important;
}

.facilitator-scenario-layout {
  padding-bottom: 180px !important;
}

.facilitator-scenario-layout .panel:last-child,
.facilitator-scenario-layout > .panel:first-child {
  padding-bottom: 60px !important;
}

/* Facilitator scenario header cleanup */
body.facilitator-scenario-page header h1,
body.facilitator-scenario-page header .small {
  display: none !important;
}

body.facilitator-scenario-page header {
  padding-top: 14px !important;
  padding-bottom: 14px !important;
  min-height: auto !important;
}

body.facilitator-scenario-page header .badge:empty,
body.facilitator-scenario-page header .pill:empty,
body.facilitator-scenario-page header .chip:empty,
body.facilitator-scenario-page header .turn-badge:empty {
  display: none !important;
}

/* Turn badge: same visual height family as nav buttons */
.turn-badge,
#turnCounterBadge,
#globalTurnStatusBadge {
  min-width: 150px !important;
  min-height: 40px !important;
  height: 40px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  border: 1px solid #79b8ff !important;
  background: #163b74 !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

/* Cleaner facilitator scenario header */
body.facilitator-scenario-page header {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  min-height: auto !important;
}

body.facilitator-scenario-page header h1,
body.facilitator-scenario-page header .small,
body.facilitator-scenario-page header .badge,
body.facilitator-scenario-page header .pill,
body.facilitator-scenario-page header .chip {
  display: none !important;
}

/* Remove leftover small blue pill near Scenario State */
body.facilitator-scenario-page .panel .badge,
body.facilitator-scenario-page .panel .pill,
body.facilitator-scenario-page .panel .chip {
  display: none !important;
}

/* Keep scenario editor visible; only simplify header chrome */
body.facilitator-scenario-page header {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  min-height: auto !important;
}

body.facilitator-scenario-page header h1,
body.facilitator-scenario-page header .small,
body.facilitator-scenario-page header .badge,
body.facilitator-scenario-page header .pill,
body.facilitator-scenario-page header .chip {
  display: none !important;
}

/* Turn badge sizing */
.turn-badge,
#turnCounterBadge,
#globalTurnStatusBadge {
  min-width: 150px !important;
  min-height: 40px !important;
  height: 40px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  border: 1px solid #79b8ff !important;
  background: #163b74 !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

/* Hide leftover empty ghost control above Scenario State */
body.facilitator-scenario-page h2:first-of-type {
  margin-top: 0 !important;
}

/* Hide leftover empty ghost control above Scenario State */
body.facilitator-scenario-page h2:first-of-type {
  margin-top: 0 !important;
}

/* Remove leftover ghost pill above Scenario State */
body.facilitator-scenario-page h2:first-of-type {
  margin-top: 0 !important;
}

body.facilitator-scenario-page h2:first-of-type::before {
  content: none !important;
  display: none !important;
}

body.facilitator-scenario-page .panel > input:first-child,
body.facilitator-scenario-page .panel > .pill:first-child,
body.facilitator-scenario-page .panel > .badge:first-child,
body.facilitator-scenario-page .panel > .chip:first-child {
  display: none !important;
}

/* Player page header cleanup */
body[class*="player"] header h1,
body[class*="player"] header .small,
body[class*="player"] header .badge,
body[class*="player"] header .pill,
body[class*="player"] header .chip {
  display: none !important;
}

/* Remove empty turn status panel above Scenario State on facilitator scenario page */
body.facilitator-scenario-page #turnStatusPanel,
body.facilitator-scenario-page .turn-status-panel {
  display: none !important;
}

/* Player access gate */
#playerAccessGate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 10, 24, 0.92);
  backdrop-filter: blur(3px);
}

#playerAccessGate .player-gate-card {
  width: min(520px, calc(100vw - 32px));
  background: #0f1b33;
  border: 1px solid rgba(121, 184, 255, 0.25);
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  padding: 24px;
}

#playerAccessGate input,
#playerAccessGate select {
  width: 100%;
  margin-top: 10px;
}

body.player-gate-complete #playerAccessGate {
  display: none !important;
}

/* Player page header cleanup */
body[class*="player"] header h1,
body[class*="player"] header .small,
body[class*="player"] header .badge,
body[class*="player"] header .pill,
body[class*="player"] header .chip {
  display: none !important;
}

/* Facilitator assets page: allow full natural page height */
.facilitator-assets-page {
  overflow-y: auto !important;
}

.facilitator-assets-page .panel,
.facilitator-assets-page .player-page-scroll,
.facilitator-assets-page .ops-container,
.facilitator-assets-page .facilitator-layout,
.facilitator-assets-page .facilitator-assets-layout {
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
  min-height: auto !important;
}

.facilitator-assets-page .facilitator-layout,
.facilitator-assets-page .facilitator-assets-layout {
  align-items: start !important;
  padding-bottom: 180px !important;
}

.facilitator-assets-page .panel:last-child,
.facilitator-assets-page .facilitator-layout > .panel:first-child,
.facilitator-assets-page .facilitator-assets-layout > .panel:first-child {
  padding-bottom: 60px !important;
}

/* Global page cleanup helpers */
header h1 {
  display: none !important;
}

header .small:empty,
header .badge:empty,
header .pill:empty,
header .chip:empty,
.turn-status-panel:empty {
  display: none !important;
}

/* Hide leftover empty pills before major headings */
.badge:empty,
.pill:empty,
.chip:empty {
  display: none !important;
}

/* Scenario page: move blue cells visually to right side and hide old template block */
#loadScenarioMetaBtn,
#newBlankScenarioBtn,
#saveScenarioMetaBtn {
  margin-top: 0 !important;
}

#loadTemplateBtn {
  display: none !important;
}

#templateSelect {
  display: none !important;
}

/* Asset roster selected item: blue outline instead of green fill */
.asset-roster-item.good,
.asset-roster-item.secondary[data-action="select-asset"] {
  border: 1px solid #79b8ff !important;
  background: rgba(22, 59, 116, 0.35) !important;
  color: #ffffff !important;
}

.asset-roster-item.good:hover,
.asset-roster-item.secondary[data-action="select-asset"]:hover {
  background: rgba(22, 59, 116, 0.5) !important;
}

/* Revert scenario layout overrides */
#loadTemplateBtn {
  display: inline-flex !important;
}

#templateSelect {
  display: inline-flex !important;
}

#cellsEditor,
#addCellBtn,
#saveCellsBtn {
  display: initial !important;
}

.facilitator-scenario-layout,
.facilitator-layout {
  display: grid !important;
}

.facilitator-scenario-layout > *,
.facilitator-layout > * {
  visibility: visible !important;
}

/* Keep scenario meta buttons visible in normal flow */
#newBlankScenarioBtn,
#loadScenarioMetaBtn,
#saveScenarioMetaBtn {
  display: inline-flex !important;
}

/* Revert scenario layout overrides */
#loadTemplateBtn {
  display: inline-flex !important;
}

#templateSelect {
  display: inline-flex !important;
}

#cellsEditor,
#addCellBtn,
#saveCellsBtn {
  display: initial !important;
}

.facilitator-scenario-layout,
.facilitator-layout {
  display: grid !important;
}

.facilitator-scenario-layout > *,
.facilitator-layout > * {
  visibility: visible !important;
}

/* Keep scenario meta buttons visible in normal flow */
#newBlankScenarioBtn,
#loadScenarioMetaBtn,
#saveScenarioMetaBtn {
  display: inline-flex !important;
}

/* Scenario nav back to left + visible turn badge */
.facilitator-scenario-page header .row {
  justify-content: flex-start !important;
}

.turn-status-panel {
  display: flex !important;
  justify-content: flex-end !important;
  margin-top: 10px !important;
}

.turn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid #79b8ff;
  background: rgba(22, 59, 116, 0.35);
  color: #fff;
  font-weight: 700;
}

.facilitator-scenario-page header {
  position: relative;
  padding-top: 12px;
}

.facilitator-scenario-page #turnStatusPanel {
  position: absolute;
  top: 10px;
  right: 16px;
  z-index: 20;
  display: block !important;
}

.facilitator-scenario-page .turn-badge {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid #79b8ff;
  background: rgba(22, 59, 116, 0.35);
  color: #fff;
  font-weight: 700;
}

/* Force turn badge visible on facilitator scenario page */
body.facilitator-scenario-page #turnStatusPanel,
body.facilitator-scenario-page .turn-status-panel {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body.facilitator-scenario-page #turnStatusPanel {
  position: absolute !important;
  top: 10px !important;
  right: 16px !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

body.facilitator-scenario-page #turnStatusPanel .turn-badge,
body.facilitator-scenario-page .turn-status-panel .turn-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  padding: 0 16px !important;
  border-radius: 14px !important;
  border: 1px solid #79b8ff !important;
  background: rgba(22, 59, 116, 0.35) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

/* Force turn badge visible on facilitator scenario page */
body.facilitator-scenario-page #turnStatusPanel,
body.facilitator-scenario-page .turn-status-panel {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body.facilitator-scenario-page #turnStatusPanel {
  position: absolute !important;
  top: 10px !important;
  right: 16px !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}

body.facilitator-scenario-page #turnStatusPanel .turn-badge,
body.facilitator-scenario-page .turn-status-panel .turn-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  padding: 0 16px !important;
  border-radius: 14px !important;
  border: 1px solid #79b8ff !important;
  background: rgba(22, 59, 116, 0.35) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

/* Scenario page: make turn badge line up like other facilitator pages */
body.facilitator-scenario-page header {
  position: relative !important;
  min-height: 72px !important;
  padding: 16px 16px 8px 16px !important;
  margin-bottom: 8px !important;
}

body.facilitator-scenario-page header .row {
  align-items: center !important;
  min-height: 44px !important;
}

body.facilitator-scenario-page #turnStatusPanel {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  z-index: 9999 !important;
  display: block !important;
}

body.facilitator-scenario-page #turnStatusPanel .turn-badge,
body.facilitator-scenario-page .turn-status-panel .turn-badge {
  min-height: 36px !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  font-size: 15px !important;
  line-height: 1 !important;
}

body.facilitator-scenario-page .ops-container.facilitator-scenario-layout {
  margin-top: 0 !important;
}

/* Scenario page turn badge: match navigation page styling */
body.facilitator-scenario-page #turnStatusPanel {
  position: absolute !important;
  top: 8px !important;
  right: 12px !important;
  z-index: 9999 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: none !important;
}

body.facilitator-scenario-page #turnStatusPanel .turn-badge,
body.facilitator-scenario-page .turn-status-panel .turn-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 34px !important;
  padding: 0 18px !important;
  border-radius: 14px !important;
  border: 1px solid #79b8ff !important;
  background: rgba(37, 78, 145, 0.85) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  line-height: 1 !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}

/* Scenario page: use the same shared turn status positioning as other facilitator pages */
body.facilitator-scenario-page #turnStatusPanel,
body.facilitator-scenario-page .turn-status-panel {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: absolute !important;
  top: 8px !important;
  right: 12px !important;
  z-index: 9999 !important;
}

/* Remove scenario-specific badge styling so shared badge styling wins */
body.facilitator-scenario-page #turnStatusPanel .turn-badge,
body.facilitator-scenario-page .turn-status-panel .turn-badge {
  all: unset;
}

/* Fix scenario turn badge: restore normal shared badge appearance */
body.facilitator-scenario-page #turnStatusPanel .turn-badge,
body.facilitator-scenario-page .turn-status-panel .turn-badge {
  all: revert !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 34px !important;
  padding: 0 18px !important;
  border-radius: 14px !important;
  border: 1px solid #79b8ff !important;
  background: rgba(37, 78, 145, 0.85) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.facilitator-scenario-page #turnStatusPanel {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: absolute !important;
  top: 8px !important;
  right: 12px !important;
  z-index: 9999 !important;
}

/* Scenario page turn badge: copy visual style from other facilitator pages */
body.facilitator-scenario-page #turnStatusPanel,
body.facilitator-scenario-page .turn-status-panel {
  display: flex !important;
  justify-content: flex-end !important;
  position: absolute !important;
  top: 8px !important;
  right: 12px !important;
  z-index: 9999 !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: none !important;
}

body.facilitator-scenario-page #turnStatusPanel .turn-badge,
body.facilitator-scenario-page .turn-status-panel .turn-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 34px !important;
  padding: 0 18px !important;
  border-radius: 14px !important;
  border: 1px solid #79b8ff !important;
  background: rgba(37, 78, 145, 0.85) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* Scenario page badge: stop overriding it here; let shared badge styling show */
body.facilitator-scenario-page #turnStatusPanel,
body.facilitator-scenario-page .turn-status-panel {
  display: flex !important;
  justify-content: flex-end !important;
  position: absolute !important;
  top: 8px !important;
  right: 12px !important;
  z-index: 9999 !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: none !important;
}

/* Scenario page: use exact same badge element/positioning pattern as navigation */
body.facilitator-scenario-page #turnCounterBadge {
  display: inline-flex !important;
}

/* Global turn counter badge: make it taller and more prominent on all pages */
.turn-badge,
#turnCounterBadge,
#globalTurnStatusBadge {
  min-height: 68px !important;
  height: 68px !important;
  padding: 0 22px !important;
  border-radius: 18px !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

/* Global top bar alignment for nav buttons + larger turn badge */
header {
  position: relative !important;
  min-height: 108px !important;
  padding: 12px 16px 14px 16px !important;
  box-sizing: border-box !important;
}

header .row {
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

header .row:first-of-type {
  min-height: 76px !important;
  padding-right: 210px !important; /* reserve room for turn badge */
}

#turnCounterBadge,
#globalTurnStatusBadge,
#turnStatusPanel {
  position: absolute !important;
  top: 12px !important;
  right: 16px !important;
  z-index: 9999 !important;
}

.turn-badge,
#turnCounterBadge,
#globalTurnStatusBadge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 68px !important;
  height: 68px !important;
  padding: 0 22px !important;
  border-radius: 18px !important;
  box-sizing: border-box !important;
}

/* Give content a clean separation under the top bar */
header + .container,
header + .ops-container,
header + .player-page-scroll,
header + .facilitator-scenario-layout {
  margin-top: 8px !important;
}

/* Make the top dark bar align nav buttons and turn badge more cleanly on all pages */
header {
  padding-top: 14px !important;
  padding-bottom: 14px !important;
  min-height: 96px !important;
}

header .row:first-of-type {
  min-height: 54px !important;
  align-items: center !important;
}

#turnCounterBadge,
#globalTurnStatusBadge,
#turnStatusPanel,
.turn-status-panel {
  top: 14px !important;
  right: 16px !important;
}

.turn-badge,
#turnCounterBadge,
#globalTurnStatusBadge {
  min-height: 54px !important;
  height: 54px !important;
  padding: 0 20px !important;
  border-radius: 16px !important;
  font-size: 17px !important;
  line-height: 1 !important;
}

/* Maritime map */
#navigationMap,
#fullMapCanvas {
  width: 100%;
  background: #0b1220;
}

.owge-map-toolbar {
  margin-top: 12px;
  margin-bottom: 10px;
}

.owge-asset-icon,
.owge-cell-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 2px solid #79b8ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.owge-cell-icon {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.owge-route-label {
  background: rgba(8, 18, 34, 0.88);
  border: 1px solid rgba(121,184,255,0.6);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}

.owge-legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px 16px;
}

.owge-legend-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  border: 2px solid #79b8ff;
  color: #fff;
  font-weight: 800;
  vertical-align: middle;
  background: rgba(22,59,116,0.92);
}

.owge-legend-icon.ship-red,
.owge-legend-icon.sub-red,
.owge-legend-icon.cell-red {
  border-color: #ff6b6b;
  background: rgba(120,20,20,0.9);
}

.owge-legend-icon.ship-blue,
.owge-legend-icon.sub-blue,
.owge-legend-icon.air-blue,
.owge-legend-icon.carrier-blue,
.owge-legend-icon.cell-blue {
  border-color: #79b8ff;
  background: rgba(22,59,116,0.92);
}

.owge-legend-line {
  display: inline-block;
  width: 32px;
  height: 0;
  border-top: 3px dashed #79b8ff;
  margin-right: 8px;
  vertical-align: middle;
}

#navigationMap {
  width: 100%;
  background: #0b1220;
}

.owge-asset-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 2px solid #79b8ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

#navigationMap {
  width: 100%;
  background: #0b1220;
}

.owge-asset-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 2px solid #79b8ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/* Player full map should use full-width facilitator-like layout */
body.player-full-map-page .ops-container {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 16px !important;
  box-sizing: border-box !important;
}

body.player-full-map-page .panel {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
}

body.player-full-map-page #playerFullMapCanvas {
  width: 100% !important;
  height: 80vh !important;
  min-height: 680px !important;
}

.owge-ntds-icon {
  width: 28px;
  height: 28px;
  border: 2px solid #79b8ff;
  border-radius: 4px;
  background: rgba(9, 16, 30, 0.78);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.owge-route-label {
  background: rgba(8,18,34,0.88);
  border: 1px solid rgba(121,184,255,0.6);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}

/* Player pages: remove leftover reserved space from old cell selector/header blocks */
body[class*="player-"] header,
body.player-page header {
  position: relative !important;
}

body[class*="player-"] header .row,
body.player-page header .row {
  justify-content: flex-start !important;
  align-items: center !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
}

body[class*="player-"] #playerCellSelectorMount,
body[class*="player-"] #cellSelectorMount,
body[class*="player-"] #playerCellStatusMount,
body[class*="player-"] #playerSelectedCellBanner,
body[class*="player-"] #playerCellSubtitle,
body[class*="player-"] #playerScenarioSubtitle,
body.player-page #playerCellSelectorMount,
body.player-page #cellSelectorMount,
body.player-page #playerCellStatusMount,
body.player-page #playerSelectedCellBanner,
body.player-page #playerCellSubtitle,
body.player-page #playerScenarioSubtitle {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body[class*="player-"] header > :not(.row):not(#turnCounterBadge),
body.player-page header > :not(.row):not(#turnCounterBadge) {
  display: none !important;
}

/* Keep player nav buttons flush-left like facilitator */
body[class*="player-"] .nav-btn,
body.player-page .nav-btn {
  margin-left: 0 !important;
}

.owge-ntds-icon {
  width: 28px;
  height: 28px;
  border: 2px solid #79b8ff;
  border-radius: 4px;
  background: rgba(9, 16, 30, 0.78);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.owge-route-label {
  background: rgba(8,18,34,0.88);
  border: 1px solid rgba(121,184,255,0.6);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}

/* Player pages: no leftover subtitle/selector space, flush left nav */
body[class*="player-"] header,
body.player-page header {
  position: relative !important;
  min-height: 96px !important;
  padding: 14px 16px !important;
}

body[class*="player-"] header .row,
body.player-page header .row {
  justify-content: flex-start !important;
  align-items: center !important;
  margin: 0 !important;
  padding-left: 0 !important;
  gap: 8px !important;
}

body[class*="player-"] header > .small,
body.player-page header > .small,
body[class*="player-"] #playerCellSelectorMount,
body[class*="player-"] #cellSelectorMount,
body[class*="player-"] #playerCellStatusMount,
body[class*="player-"] #playerSelectedCellBanner,
body[class*="player-"] #playerCellSubtitle,
body[class*="player-"] #playerScenarioSubtitle,
body.player-page #playerCellSelectorMount,
body.player-page #cellSelectorMount,
body.player-page #playerCellStatusMount,
body.player-page #playerSelectedCellBanner,
body.player-page #playerCellSubtitle,
body.player-page #playerScenarioSubtitle {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body[class*="player-"] .nav-btn,
body.player-page .nav-btn {
  margin-left: 0 !important;
}

.owge-ntds-icon {
  width: 34px;
  height: 34px;
  border: 2px solid #79b8ff;
  border-radius: 4px;
  background: rgba(9, 16, 30, 0.86);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.owge-ntds-shape {
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.owge-ntds-tag {
  position: absolute;
  right: -6px;
  bottom: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(8,18,34,0.96);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
}

.owge-route-label {
  background: rgba(8,18,34,0.88);
  border: 1px solid rgba(121,184,255,0.6);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}

.owge-ntds-icon {
  width: 34px;
  height: 34px;
  border: 2px solid #79b8ff;
  border-radius: 4px;
  background: rgba(9, 16, 30, 0.86);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.owge-ntds-shape {
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.owge-ntds-tag {
  position: absolute;
  right: -6px;
  bottom: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(8,18,34,0.96);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
}

.owge-route-label {
  background: rgba(8,18,34,0.88);
  border: 1px solid rgba(121,184,255,0.6);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}

.owge-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
  vertical-align: middle;
}

.owge-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.owge-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(121,184,255,0.55);
  border-radius: 999px;
  transition: 0.2s ease;
}

.owge-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  top: 2px;
  background: #79b8ff;
  border-radius: 50%;
  transition: 0.2s ease;
}

.owge-switch input:checked + .owge-slider {
  background: rgba(121,184,255,0.22);
}

.owge-switch input:checked + .owge-slider:before {
  transform: translateX(20px);
}

.owge-ntds-icon {
  width: 34px;
  height: 34px;
  border: 2px solid #79b8ff;
  border-radius: 4px;
  background: rgba(9, 16, 30, 0.86);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.owge-ntds-shape {
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

.owge-ntds-tag {
  position: absolute;
  right: -6px;
  bottom: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(8,18,34,0.96);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
}

.owge-route-label {
  background: rgba(8,18,34,0.88);
  border: 1px solid rgba(121,184,255,0.6);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}




/* OWGE pill toggles */
.owge-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 18px;
  vertical-align: middle;
  flex: 0 0 auto;
}

.owge-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.owge-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border-radius: 999px;
  background: #d92f2f;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.16), 0 1px 3px rgba(0,0,0,0.22);
  transition: background 0.2s ease;
}

.owge-slider::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f4f4f4 0%, #d9d9d9 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,0.28);
  transition: transform 0.2s ease;
}

.owge-switch input:checked + .owge-slider {
  background: #57c400;
}

.owge-switch input:checked + .owge-slider::before {
  transform: translateX(20px);
}

.owge-switch-labels {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.owge-switch-state {
  font-size: 10px;
  color: #cbd5e1;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.owge-switch-state strong {
  color: #ffffff;
}





.owge-toggle-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.owge-mini-switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 16px;
  vertical-align: middle;
  flex: 0 0 auto;
}

.owge-mini-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.owge-mini-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border-radius: 999px;
  background: #d92f2f;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.16), 0 1px 3px rgba(0,0,0,0.22);
  transition: background 0.2s ease;
}

.owge-mini-slider::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f4f4f4 0%, #d9d9d9 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,0.28);
  transition: transform 0.2s ease;
}

.owge-mini-switch input:checked + .owge-mini-slider {
  background: #57c400;
}

.owge-mini-switch input:checked + .owge-mini-slider::before {
  transform: translateX(18px);
}



.owge-sensor-box {
  max-width: 260px;
}

.owge-toggle-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.owge-mini-switch {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 14px;
  vertical-align: middle;
  flex: 0 0 auto;
}

.owge-mini-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.owge-mini-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border-radius: 999px;
  background: #d92f2f;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.16), 0 1px 2px rgba(0,0,0,0.22);
  transition: background 0.2s ease;
}

.owge-mini-slider::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f4f4f4 0%, #d9d9d9 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,0.28);
  transition: transform 0.2s ease;
}

.owge-mini-switch input:checked + .owge-mini-slider {
  background: #57c400;
}

.owge-mini-switch input:checked + .owge-mini-slider::before {
  transform: translateX(14px);
}



.owge-sensor-box {
  max-width: 240px;
}

.owge-toggle-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.owge-player-switch {
  position: relative;
  display: inline-block;
  width: 26px;
  height: 13px;
  vertical-align: middle;
  flex: 0 0 auto;
}

.owge-player-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.owge-player-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  border-radius: 999px;
  background: #d92f2f;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.16), 0 1px 2px rgba(0,0,0,0.22);
  transition: background 0.2s ease;
}

.owge-player-slider::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f4f4f4 0%, #d9d9d9 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,0.28);
  transition: transform 0.2s ease;
}

.owge-player-switch input:checked + .owge-player-slider {
  background: #57c400;
}

.owge-player-switch input:checked + .owge-player-slider::before {
  transform: translateX(12px);
}



.owge-sensor-box {
  max-width: 220px !important;
}

.owge-toggle-row {
  display: grid !important;
  grid-template-columns: 38px auto !important;
  gap: 6px !important;
  align-items: center !important;
  margin-bottom: 6px !important;
}

.owge-toggle-inline {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
}

.owge-player-switch {
  position: relative !important;
  display: inline-block !important;
  width: 24px !important;
  height: 12px !important;
  vertical-align: middle !important;
  flex: 0 0 auto !important;
}

.owge-player-switch input {
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
}

.owge-player-slider {
  position: absolute !important;
  inset: 0 !important;
  cursor: pointer !important;
  border-radius: 999px !important;
  background: #d92f2f !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.16), 0 1px 2px rgba(0,0,0,0.22) !important;
  transition: background 0.2s ease !important;
}

.owge-player-slider::before {
  content: "" !important;
  position: absolute !important;
  top: 1px !important;
  left: 1px !important;
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: linear-gradient(180deg, #f4f4f4 0%, #d9d9d9 100%) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.28) !important;
  transition: transform 0.2s ease !important;
}

.owge-player-switch input:checked + .owge-player-slider {
  background: #57c400 !important;
}

.owge-player-switch input:checked + .owge-player-slider::before {
  transform: translateX(10px) !important;
}



body.player-scenario-page header .row,
body.player-navigation-page header .row,
body.player-ops-page header .row,
body.player-status-page header .row,
body.player-weather-page header .row,
body.player-full-map-page header .row {
  justify-content: flex-start !important;
  align-items: flex-end !important;
  gap: 8px !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
}

body.player-scenario-page header select,
body.player-navigation-page header select,
body.player-ops-page header select,
body.player-status-page header select,
body.player-weather-page header select,
body.player-full-map-page header select {
  display: none !important;
}



.turn-badge-main {
  font-size: 14px;
  font-weight: 800;
  margin-top: 2px;
}
body.player-scenario-page header .row,
body.player-navigation-page header .row,
body.player-ops-page header .row,
body.player-status-page header .row,
body.player-weather-page header .row,
body.player-full-map-page header .row {
  justify-content: flex-start !important;
  align-items: flex-end !important;
  gap: 8px !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
}




.turn-badge,
#turnCounterBadge,
#globalTurnStatusBadge,
#turnStatusPanel {
  min-height: 132px !important;
  height: 132px !important;
  min-width: 132px !important;
  width: 132px !important;
  padding: 12px 10px !important;
  border-radius: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  text-align: center !important;
  flex-shrink: 0 !important;
}

.turn-badge-main {
  font-size: 22px;
  font-weight: 900;
  margin-top: 6px;
}

header {
  min-height: 148px !important;
}

header .row {
  align-items: center !important;
}


body.player-scenario-page header .row,
body.player-navigation-page header .row,
body.player-ops-page header .row,
body.player-status-page header .row,
body.player-weather-page header .row,
body.player-full-map-page header .row,
body.facilitator-scenario-page header .row,
body.facilitator-navigation-page header .row,
body.facilitator-ops-page header .row,
body.facilitator-status-page header .row,
body.facilitator-weather-page header .row,
body.facilitator-assets-page header .row {
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 8px !important;
  margin-left: 0 !important;
  padding-left: 0 !important;
  flex-wrap: wrap !important;
}

body.player-weather-page header h1,
body.player-weather-page header h2,
body.player-weather-page header h3,
body.player-weather-page header p,
body.player-ops-page header h1,
body.player-ops-page header h2,
body.player-ops-page header h3,
body.player-ops-page header p,
body.player-status-page header h1,
body.player-status-page header h2,
body.player-status-page header h3,
body.player-status-page header p,
body.facilitator-weather-page header h1,
body.facilitator-weather-page header h2,
body.facilitator-weather-page header h3,
body.facilitator-weather-page header p {
  display: none !important;
}



.turn-badge,
#turnCounterBadge,
#globalTurnStatusBadge,
#turnStatusPanel {
  min-height: 148px !important;
  height: 148px !important;
  min-width: 148px !important;
  width: 148px !important;
  padding: 12px 10px !important;
  border-radius: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  white-space: normal !important;
}

.turn-badge-main {
  font-size: 24px !important;
  font-weight: 900 !important;
  margin-top: 8px !important;
}

/* ===== Stable H+ counter badge ===== */
.turn-badge,
#turnCounterBadge,
#globalTurnStatusBadge,
#turnStatusPanel {
  min-width: 128px !important;
  width: 128px !important;
  min-height: 128px !important;
  height: 128px !important;
  padding: 0 !important;
  border-radius: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
}

.turn-badge-date,
.turn-badge-main {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  font-size: 28px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: 0.01em !important;
  white-space: nowrap !important;
}

/* ===== Header / top bar ===== */
html, body {
  min-height: 100vh !important;
}

body {
  display: block;
}

header {
  min-height: 152px !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  box-sizing: border-box !important;
}

header .row {
  min-height: 132px !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

/* Keep nav buttons left, badge right */
header .row .nav-btn {
  align-self: center !important;
}

header #turnCounterBadge,
header #globalTurnStatusBadge,
header #turnStatusPanel {
  margin-left: auto !important;
  align-self: center !important;
}

/* ===== Main content better fullscreen ===== */
.container,
.ops-container,
.page-container,
.scenario-layout,
.player-page-scroll,
.container.player-page-scroll {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
}

body.facilitator-scenario-page .ops-container,
body.facilitator-navigation-page .ops-container,
body.facilitator-ops-page .ops-container,
body.facilitator-status-page .ops-container,
body.facilitator-weather-page .ops-container,
body.facilitator-assets-page .ops-container,
body.player-scenario-page .container,
body.player-navigation-page .container,
body.player-ops-page .container,
body.player-status-page .container,
body.player-weather-page .container,
body.player-full-map-page .container {
  width: 100% !important;
  max-width: none !important;
}

/* Remove little layout drift */
body.player-scenario-page header .row,
body.player-navigation-page header .row,
body.player-ops-page header .row,
body.player-status-page header .row,
body.player-weather-page header .row,
body.player-full-map-page header .row,
body.facilitator-scenario-page header .row,
body.facilitator-navigation-page header .row,
body.facilitator-ops-page header .row,
body.facilitator-status-page header .row,
body.facilitator-weather-page header .row,
body.facilitator-assets-page header .row {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* If old text remnants still exist in header, hide them */
header h1,
header h2,
header h3,
header p,
header label:not(.owge-player-switch):not(.portal-label) {
  display: none !important;
}


/* Assets page: two wide panes */
body.facilitator-assets-page .ops-container,
body.facilitator-assets-page .container,
body.facilitator-assets-page .page-container {
  width: 100% !important;
  max-width: none !important;
}

body.facilitator-assets-page .ops-container > .panel:first-child,
body.facilitator-assets-page .ops-container > .panel:nth-child(2),
body.facilitator-assets-page .container > .panel:first-child,
body.facilitator-assets-page .container > .panel:nth-child(2) {
  width: 100% !important;
  min-width: 0 !important;
}

body.facilitator-assets-page .ops-container,
body.facilitator-assets-page .container {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: start !important;
}



/* ===== Unified header / badge / fullscreen cleanup ===== */
#turnCounterBadge {
  min-width: 128px !important;
  width: 128px !important;
  min-height: 128px !important;
  height: 128px !important;
  padding: 0 !important;
  border-radius: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
}

#turnCounterBadge .turn-badge-main {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  font-size: 28px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: 0.01em !important;
  white-space: nowrap !important;
}

#turnCounterBadge .turn-badge-date,
#turnCounterBadge .turn-badge-zulu {
  display: none !important;
}

html, body {
  min-height: 100vh !important;
}

header {
  min-height: 152px !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  box-sizing: border-box !important;
}

header .row {
  min-height: 132px !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

header .row .nav-btn {
  align-self: center !important;
}

header #turnCounterBadge {
  margin-left: auto !important;
  align-self: center !important;
}

.container,
.ops-container,
.page-container,
.scenario-layout,
.player-page-scroll,
.container.player-page-scroll {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
}

