:root {
  color-scheme: dark;
  --bg: #0b121b; --panel: #131f2c; --line: #304456; --text: #e5edf5;
  --muted: #b0bfcd; --normal: #72d7b3; --warning: #ffcf70; --danger: #ff9292;
  --unknown: #ffdb77; --friendly: #71baff; --enemy: #ff8585;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 "Segoe UI", "Malgun Gothic", sans-serif; }
h1,h2,h3,p,dl { margin: 0; }
h1 { font-size: 25px; letter-spacing: -.5px; } h1 span { font-weight: 400; }
h2 { font-size: 18px; } h3 { font-size: 16px; }
a,button { color: var(--text); border: 1px solid var(--line); border-radius: 5px; background: #1b2c3f; padding: 7px 11px; text-decoration: none; font: inherit; cursor: pointer; }
a:hover,button:hover { background: #29435b; }
a:focus-visible,button:focus-visible,summary:focus-visible,input:focus-visible { outline: 3px solid var(--warning); outline-offset: 3px; }
button:disabled { opacity: .6; cursor: wait; }
.command-bar { padding: 10px 20px 0; border-bottom: 1px solid var(--line); background: #101c28; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.eyebrow { color: #99c6db; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; }
.command-bar nav { display: flex; gap: 8px; flex-wrap: wrap; }
.command-summary { width: 100%; display: grid; grid-template-columns: 1fr 1.4fr .8fr 1.5fr .65fr 1.6fr 1fr 1fr; border-top: 1px solid var(--line); }
.command-summary>div { padding: 7px 9px; border-right: 1px solid var(--line); min-width: 0; }
dt { color: var(--muted); font-size: 11px; } dd { margin: 2px 0 0; overflow-wrap: anywhere; }
main { padding: 8px 20px 25px; }
.status-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.next-decision { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid #365d74; background: #162c3b; border-radius: 5px; margin-bottom: 10px; }
.next-decision strong { color: #a5d8ee; font-size: 11px; flex-shrink: 0; }
#next-decision-status { font-weight: 700; white-space: nowrap; } .next-decision p { font-size: 13px; }
.cop-grid { display: grid; grid-template-columns: minmax(0,1fr) 380px; gap: 12px; align-items: start; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 13px; min-width: 0; }
.picture { padding: 12px; }
.map-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.map-heading h2 { font-size: 21px; } .map-heading h2 span { font-size: 15px; color: var(--muted); font-weight: 400; }
.notional { font-size: 11px; border: 1px solid #a49657; color: #ffdb83; padding: 4px 7px; }
.map-notice { color: #ecd59e; font-size: 12px; margin: 3px 0 5px; }
#map-filters { display: flex; flex-wrap: wrap; gap: 5px 12px; padding: 0; margin: 4px 0 7px; border: 0; }
#map-filters legend { float: left; color: var(--muted); font-size: 12px; margin-right: 12px; }
#map-filters label { font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 3px; }
input[type=checkbox] { accent-color: #8cc7f0; }
#tactical-map { display: block; width: 100%; max-height: calc(100vh - 360px); min-height: 290px; border: 1px solid #43584f; border-radius: 6px; }
.map-background { fill: #132522; }
.terrain-contour { stroke: #71815b; fill: #60714c; fill-opacity: .06; stroke-opacity: .65; stroke-width: 1.5; }
.terrain-label { fill: #c3c9a5; font-size: 19px; font-weight: 600; paint-order: stroke; stroke: #152620; stroke-width: 4; }
.approach-route { stroke: #ab9b6d; stroke-width: 4; stroke-dasharray: 8 7; fill: none; opacity: .7; }
.unplaced-zone { fill: #142030; stroke: #68788a; stroke-dasharray: 5 5; }
.tray-label { fill: #b5c5d4; font-size: 15px; }
.friendly { color: var(--friendly); } .enemy { color: var(--enemy); } .unknown { color: var(--unknown); }
.tactical-symbol { cursor: pointer; outline: none; }
.symbol-frame { fill: #132b40; stroke: currentColor; stroke-width: 2.6; }
.enemy .symbol-frame { fill: #4b2329; } .unknown .symbol-frame { fill: #3c3620; }
.symbol-icon { stroke: currentColor; fill: none; stroke-width: 2.5; }
.symbol-label { fill: #f0f5f8; font-size: 24px; font-weight: 700; paint-order: stroke; stroke: #10221e; stroke-width: 5; stroke-linejoin: round; }
.symbol-type { fill: currentColor; font-size: 14px; paint-order: stroke; stroke: #10221e; stroke-width: 4; }
.selection-ring { fill: none; stroke: #fff0b2; stroke-width: 3; opacity: 0; }
.tactical-symbol.selected .selection-ring,.tactical-symbol:focus-visible .selection-ring { opacity: 1; }
.tactical-symbol.selected .symbol-label { fill: #fff0b2; }
.threat-mark { fill: #ff9797; font-size: 19px; font-weight: 800; }
.coverage { fill: #5caadb; fill-opacity: .09; stroke: #71baff; stroke-opacity: .5; stroke-dasharray: 6 5; stroke-width: 1.5; }
.movement { stroke: currentColor; stroke-width: 3; }
.map-legend { display: flex; flex-wrap: wrap; gap: 4px 13px; margin-top: 7px; font-size: 12px; }
.map-bottom { display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; margin-top: 4px; font-size: 11px; color: var(--muted); }
.right-column { display: grid; gap: 10px; min-width: 0; }
.section-heading { margin-bottom: 7px; } .muted,.empty { color: var(--muted); font-size: 12px; } .empty { padding: 10px 0; }
.badge { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; border: 1px solid currentColor; }
.normal { color: var(--normal); } .warning { color: var(--warning); } .danger { color: var(--danger); }
#attention-items { overflow: visible; }
.alert-item { padding: 7px 0; border-bottom: 1px solid var(--line); } .alert-item:first-child { padding-top: 0; } .alert-item:last-child { border-bottom: 0; }
.alert-item p { margin: 4px 0; }
.alert-select { text-align: left; display: block; width: 100%; border-color: #85494d; font-size: 15px; line-height: 1.5; word-break: keep-all; overflow-wrap: break-word; }
.alert-select[aria-pressed=true] { border-color: #ffe6a4; }
.meta { font-size: 10px; color: var(--muted); overflow-wrap: anywhere; }
.intent-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 14px; font-size: 14px; }
.intent-fields dd { white-space: pre-line; word-break: keep-all; overflow-wrap: break-word; }
.intent { overflow: visible; }
.selection dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; font-size: 15px; margin: 8px 0; }
.selection dt,.intent-fields dt { font-size: 12px; }
.selection dd { font-weight: 600; }
.selection .wide { grid-column: 1 / -1; }
#selected-object h3 { color: #ffe5aa; font-size: 21px; }
#selected-object h3 .badge { font-size: 13px; }
.record-details { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.record-details summary { font-size: 12px; color: var(--muted); }
.record-details .record-fields { display: grid; grid-template-columns: 1fr; gap: 5px; margin-top: 8px; font-size: 12px; }
.record-fields dt { font-size: 11px; } .record-fields dd { font-weight: 400; }
.record-details .meta { font-size: 12px; margin-top: 6px; }
.decisions,.changes,.object-directory { grid-column: 1 / -1; }
.decisions .section-heading { display: flex; justify-content: space-between; gap: 10px; }
.decision-flow { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; padding: 0; list-style: none; margin: 8px 0; }
.decision-flow li { border: 1px solid var(--line); border-radius: 5px; padding: 10px; min-width: 0; }
.decision-flow strong { display: block; margin-bottom: 5px; } .decision-flow .meta { margin-top: 5px; }
.action-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; } .primary { background: #224a62; border-color: #547f98; }
details { color: var(--muted); font-size: 12px; } summary { cursor: pointer; font-size: 14px; } #cycle-history p { margin-top: 7px; }
.changes ol { list-style: none; padding: 0; margin: 8px 0 0; max-height: 250px; overflow: auto; }
.changes li { border-top: 1px solid var(--line); padding: 8px 0; overflow-wrap: anywhere; }
.objects { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-top: 10px; }
.object { border: 1px solid var(--line); border-radius: 5px; padding: 12px; min-width: 0; }
.object dl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .object .location { grid-column: 1 / -1; } .object header { margin-bottom: 7px; } .object .meta { margin-top: 6px; }
.error { padding: 12px; border: 1px solid var(--danger); color: var(--danger); margin-bottom: 10px; }
footer { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; color: var(--muted); font-size: 11px; } footer p { margin-top: 4px; }
[hidden] { display: none !important; }
@media (min-width: 1700px) { .cop-grid { grid-template-columns: minmax(0,1fr) 420px; } #tactical-map { max-height: 650px; } }
@media (max-width: 1000px) {
  .command-summary { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .cop-grid { grid-template-columns: minmax(0,1fr); } .right-column { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .intent { max-height: none; } #tactical-map { max-height: none; min-height: 0; }
  .next-decision { flex-wrap: wrap; gap: 5px 10px; } .objects { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 650px) {
  main { padding: 8px; } .command-bar { padding: 10px 8px 0; }
  h1 { font-size: 23px; } .command-bar nav a { font-size: 12px; }
  .command-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .right-column { grid-template-columns: minmax(0,1fr); } .decision-flow { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .objects { grid-template-columns: minmax(0,1fr); }
  .map-heading h2 { font-size: 18px; } .map-heading h2 span { font-size: 13px; }
  .picture { padding: 8px; } .status-line button { flex-shrink: 0; }
  .map-notice { font-size: 11px; } .decisions .section-heading { flex-wrap: wrap; }
}
