/* ============================================================================
   components.css — floating map components: sensor markers + entity cards.
   (Chrome lives in app.css; this is everything that floats over the map.)
   All colors come from theme tokens or the per-instance --c domain color.
   ========================================================================== */

/* ---- sensor / platform markers ---- */
.sensor-marker { display: flex; flex-direction: column; align-items: center;
  cursor: pointer; user-select: none; }
.sm-glyph {
  width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(18, 20, 24, 0.86); border: 1.5px solid var(--c); color: var(--c);
  box-shadow: 0 0 7px -1px var(--c), 0 1px 4px rgba(0, 0, 0, 0.6);
  transition: background var(--dur), transform var(--dur);
}
.sm-glyph svg { width: 16px; height: 16px; }
.sensor-marker.planned .sm-glyph { border-style: dashed; opacity: 0.9; }
/* Platforms are bare die-cut silhouettes (no chip), rotated to heading. */
/* Platforms are bigger bare die-cut silhouettes — no hard outline; a soft dark
   halo (layered drop-shadows) keeps the white aircraft readable on ANY basemap. */
.sensor-marker.platform .sm-glyph { width: 46px; height: 46px; background: none;
  border: none; box-shadow: none; color: var(--c);
  filter: drop-shadow(0 0 2px rgba(0,0,0,.95)) drop-shadow(0 0 5px rgba(0,0,0,.7)); }
.sensor-marker.platform .sm-glyph svg { width: 46px; height: 46px; transition: transform 120ms linear; }
.sensor-marker.platform:hover .sm-glyph { background: none; transform: scale(1.06); }
.sm-lbl { margin-top: 2px; font-family: var(--font-head); font-size: 9px; letter-spacing: 0.06em;
  color: #e2e6ea; text-shadow: 0 0 3px #000, 0 0 3px #000; white-space: nowrap;
  pointer-events: none; }  /* label must not intercept clicks on contacts beneath */
.sensor-marker:hover .sm-glyph { background: rgba(42, 46, 52, 0.96); transform: scale(1.08); }

/* ---- entity card ---- */
.ecard {
  position: absolute; z-index: 20; width: 268px; overflow: hidden;
  background: var(--bg-panel); border: 1px solid var(--line);
  border-top: 2px solid var(--c); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel); font-size: 12px;
}
.ec-titlebar { display: flex; align-items: center; gap: 6px; height: 25px; padding: 0 5px 0 10px;
  background: var(--bg-panel-2); cursor: grab; }
.ec-coords { font-size: 10.5px; color: var(--text-3); }
.ec-titlebar .grow { flex: 1; }
.ec-btn { width: 20px; height: 20px; display: grid; place-items: center; background: transparent;
  border: 0; color: var(--text-3); border-radius: 3px; }
.ec-btn:hover { background: var(--bg-hover); color: #fff; }
.ec-btn svg { width: 12px; height: 12px; }

.ec-head { display: flex; align-items: center; gap: 10px; padding: 10px; }
.ec-head .sensor-marker { flex-direction: row; cursor: default; }
.ec-id { flex: 1; min-width: 0; }
.ec-name { font-family: var(--font-head); font-size: 14px; color: var(--text-1); letter-spacing: 0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ec-type { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.ec-status.planned { align-self: flex-start; font-size: 9px; letter-spacing: 0.08em;
  color: var(--accent-gold); border: 1px solid var(--accent-gold); border-radius: 3px; padding: 1px 5px; }

.ec-body { padding: 0 10px 8px; }
.ec-kv { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0;
  border-top: 1px solid var(--line-soft); }
.ec-kv span { color: var(--text-3); white-space: nowrap; }
.ec-kv b { color: var(--text-1); font-weight: 500; text-align: right; }

.ec-tabs { display: flex; align-items: center; gap: 14px; padding: 6px 10px;
  border-top: 1px solid var(--line); background: var(--bg-panel-2); }
.ec-tabs span:not(.grow) { font-family: var(--font-head); font-size: 11px; letter-spacing: 0.06em;
  color: var(--text-3); cursor: pointer; padding-bottom: 2px; }
.ec-tabs span.on { color: var(--text-1); border-bottom: 2px solid var(--accent-blue); }
.ec-tabs .grow { flex: 1; }
.ec-eye { background: transparent; border: 0; color: var(--text-3); display: grid; place-items: center; }
.ec-eye svg { width: 13px; height: 13px; }
.ec-btn.cam { color: var(--accent-gold); }

/* ---- top threat counters ---- */
.counters-wrap { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 15;
  display: flex; flex-direction: column; align-items: center; gap: 6px; }
.alert-area { display: flex; align-items: center; gap: 7px; padding: 5px 12px;
  background: rgba(255, 176, 0, 0.14); border: 1px solid var(--accent-gold); border-radius: 5px;
  color: var(--accent-gold); font-family: var(--font-head); font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; cursor: pointer; box-shadow: 0 0 14px rgba(255, 176, 0, 0.25); }
.alert-area:hover { background: rgba(255, 176, 0, 0.22); }
.alert-area .aa-go { color: #fff; opacity: .85; }
.counters { position: relative; z-index: 15;
  display: flex; align-items: stretch; background: rgba(18, 20, 24, 0.92);
  border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow-panel); overflow: hidden; }
.counters.hot { border-color: var(--accent-red); box-shadow: 0 0 20px rgba(238, 95, 91, 0.4); }
.ct-item { display: flex; align-items: center; gap: 9px; padding: 6px 15px; }
.ct-item .ct-n { font-family: var(--font-head); font-size: 26px; font-weight: 700; line-height: 1; }
button.ct-missile { background: transparent; border: 0; font: inherit; cursor: pointer; }
button.ct-missile:hover { background: var(--bg-hover); }
.ct-missile .ct-n { color: var(--accent-red); }
.ct-uav .ct-n { color: var(--accent-orange); }
.ct-lbl { font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); line-height: 1.15; text-align: left; }
.ct-div { width: 1px; background: var(--line); }
.ct-where { display: flex; align-items: center; padding: 0 12px; font-size: 11px; color: var(--text-2); max-width: 220px; }

/* ---- launch brief (intel readout) ---- */
.lb-card { position: absolute; z-index: 26; width: 344px; max-height: 74vh; display: flex; flex-direction: column;
  background: var(--bg-panel); border: 1px solid var(--line); border-top: 2px solid var(--accent-red);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-panel); font-size: 12px; }
.lb-titlebar { display: flex; align-items: center; gap: 6px; height: 27px; padding: 0 5px 0 10px;
  background: var(--bg-panel-2); cursor: grab; }
.lb-ttl { display: flex; align-items: center; gap: 6px; font-family: var(--font-head); font-size: 11.5px;
  letter-spacing: .1em; color: #ff9b98; }
.lb-ttl svg { width: 13px; height: 13px; }
.lb-titlebar .grow { flex: 1; }
.lb-x { width: 20px; height: 20px; display: grid; place-items: center; background: transparent; border: 0;
  color: var(--text-3); border-radius: 3px; } .lb-x:hover { background: var(--bg-hover); color: #fff; }
.lb-x svg { width: 12px; height: 12px; }
.lb-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line);
  border-bottom: 1px solid var(--line); }
.lb-summary > div { background: var(--bg-panel); padding: 7px 4px; text-align: center; }
.lb-summary b { display: block; font-family: var(--font-head); font-size: 20px; color: var(--text-1); line-height: 1; }
.lb-summary span { font-size: 8.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.lb-line { padding: 7px 10px; font-size: 11px; color: var(--text-2); border-bottom: 1px solid var(--line-soft); }
.lb-line b { color: var(--text-1); font-weight: 600; }
.lb-scroll { overflow-y: auto; padding: 4px 8px 10px; }
.lb-sec { font-family: var(--font-head); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-3); margin: 10px 2px 5px; }
.lb-site { display: block; width: 100%; text-align: left; background: var(--bg-panel-2); border: 1px solid var(--line);
  border-radius: 5px; padding: 7px 9px; margin-bottom: 6px; cursor: pointer; color: inherit; font: inherit; }
.lb-site[data-lon]:hover { border-color: var(--accent-red); background: var(--bg-hover); }
.lb-site.lb-uas { border-left: 2px solid var(--accent-orange); cursor: default; }
.lb-site-h { display: flex; justify-content: space-between; align-items: baseline; }
.lb-site-h b { font-family: var(--font-head); font-size: 13px; color: var(--text-1); letter-spacing: .02em; }
.lb-site-h span { font-size: 10px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.lb-site-from { font-size: 10.5px; color: var(--text-3); margin: 1px 0 5px; }
.lb-site-kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; }
.lb-site-kv span { font-size: 10px; color: var(--text-3); }
.lb-site-kv b { font-size: 10.5px; color: var(--text-2); font-weight: 500; }
.lb-kill { color: #7ecb8f !important; } .lb-leak { color: #ff6b6b !important; } .lb-flight { color: #ffcf6a !important; }
.lb-live { font-family: var(--font-head); font-size: 9px; letter-spacing: .12em; color: #59c27a;
  border: 1px solid rgba(89,194,122,.5); border-radius: 3px; padding: 1px 5px; margin-right: 4px; }
.lb-empty { padding: 8px 4px; font-size: 11px; color: var(--text-3); font-style: italic; }
.lb-chain { list-style: none; margin: 0; padding: 0; }
.lb-chain li { position: relative; padding: 3px 0 3px 14px; font-size: 10.5px; color: var(--text-3); line-height: 1.35;
  border-left: 1px solid var(--line); margin-left: 4px; }
.lb-chain li::before { content: ""; position: absolute; left: -1px; top: 9px; width: 7px; height: 2px;
  background: var(--accent-red); }
.lb-chain b { color: var(--text-2); } .lb-chain i { color: var(--text-3); font-style: italic; }

/* ---- basemap dropdown ---- */
.bm-menu { position: fixed; z-index: 60; min-width: 184px; background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: 6px; box-shadow: var(--shadow-panel); padding: 4px; }
.bm-title { font-family: var(--font-head); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3); padding: 5px 8px 4px; }
.bm-item { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 4px; font-size: 12px;
  color: var(--text-2); cursor: pointer; }
.bm-item:hover { background: var(--bg-hover); color: #fff; }
.bm-check { width: 13px; height: 13px; display: grid; place-items: center; opacity: 0; }
.bm-check svg { width: 13px; height: 13px; color: var(--accent-blue); }
.bm-item.on .bm-check { opacity: 1; } .bm-item.on { color: #fff; }
.bm-sub { font-size: 10px; color: var(--text-3); padding: 6px 8px 2px; letter-spacing: .04em; }

/* ---- replay: LIVE / REPLAY switch and panel ---- */
.tl-mode { height: 20px; padding: 0 8px; margin-right: 8px; border-radius: 3px; cursor: pointer;
  font-family: var(--font-head); font-size: 10px; letter-spacing: .12em; border: 1px solid; background: transparent; }
.tl-mode.live { color: var(--accent-green); border-color: rgba(70,183,72,.55); }
.tl-mode.live::before { content: "● "; }
.tl-mode.replay { color: var(--accent-gold); border-color: rgba(255,176,0,.6); background: rgba(255,176,0,.08); }
.rp-menu { width: 280px; padding: 6px 8px 8px; }
.rp-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0;
  font-size: 12px; color: var(--text-2); }
.rp-row input, .rp-row select { background: var(--bg-panel-2); color: var(--text-1); border: 1px solid var(--line);
  border-radius: 3px; padding: 3px 6px; font: 12px var(--font-body, sans-serif); color-scheme: dark; }
.rp-note { font-size: 11px; color: var(--text-3); padding: 4px 0 8px; }
.rp-actions { display: flex; gap: 6px; }
.rp-btn { flex: 1; height: 26px; border-radius: 3px; border: 1px solid var(--line); background: var(--bg-panel-2);
  color: var(--text-1); font-size: 12px; cursor: pointer; }
.rp-btn:hover { background: var(--bg-hover); }
.rp-btn.primary { background: #1d4f73; border-color: #2a6c9b; }
.rp-btn.primary:hover { background: #24608b; }
.rp-status { font-size: 11px; color: var(--text-2); padding-top: 7px; min-height: 14px; }
.rp-status.error { color: #f3a19e; } .rp-status.warn { color: var(--accent-gold); } .rp-status.ok { color: #8fd694; }

/* ---- Arabic / RTL ---- */
.lang-ar { }
[dir="rtl"] { text-align: right; }
[dir="rtl"] .lm-label, [dir="rtl"] .title, [dir="rtl"] .lb-line, [dir="rtl"] .lb-site-from,
[dir="rtl"] .ec-name, [dir="rtl"] .ec-type { text-align: right; }
[dir="rtl"] .lm-sechead, [dir="rtl"] .lm-row { direction: rtl; }
[dir="rtl"] .lm-row .indent { display: none; }

/* ---- measurement readout ---- */
.measure-readout { position: absolute; top: 54px; left: 50%; transform: translateX(-50%); z-index: 24;
  background: rgba(18,20,24,.94); border: 1px solid var(--accent-gold); border-radius: 5px; padding: 5px 12px;
  font-size: 12px; color: #ffe09b; box-shadow: var(--shadow-panel); white-space: nowrap; }
.measure-readout b { font-family: var(--font-head); font-size: 14px; color: #fff; }
.mr-hint { color: var(--text-3); font-size: 10px; margin-left: 8px; }
/* while measuring, let clicks fall through markers to the map (measure from a sensor) */
#map.measuring .sensor-marker { pointer-events: none; }

/* ---- AIS ship card (matches Optix mapClickDetailsPopup) ---- */
.ecard.shipcard { width: 346px; }
.sc-seen { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; font-size: 10.5px;
  color: var(--text-3); background: var(--bg-panel-2); border-bottom: 1px solid var(--line-soft); }
.sc-seen .grow { flex: 1; }
.sc-mini { width: 18px; height: 18px; display: grid; place-items: center; color: var(--text-3); }
.sc-mini svg { width: 12px; height: 12px; }
.sc-content { min-height: 116px; }

/* VESSEL tab — text lines on the left, gauges pinned top-right. min-height keeps
   the stacked gauges (speed + heading + track btn) inside the body, clear of the
   tabs row below. */
.sc-vessel { position: relative; padding: 9px 10px 10px; min-height: 150px; }
.sc-gcol { position: absolute; top: 6px; right: 10px; width: 76px; display: flex; flex-direction: column;
  align-items: center; text-align: center; }
.sc-draft { font-size: 9.5px; color: var(--text-3); align-self: flex-end; margin-bottom: 1px; }
.sc-gcol .sc-gspeed svg { width: 52px; height: 52px; }
.sc-gcol .sc-gcomp svg { width: 44px; height: 44px; margin-top: -3px; }
.sc-wave { margin-top: 4px; width: 24px; height: 20px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 4px; background: transparent; color: #38c6c0; cursor: pointer; }
.sc-wave svg { width: 14px; height: 14px; } .sc-wave:hover { background: var(--bg-hover); }

.sc-head { display: flex; gap: 9px; align-items: flex-start; padding-right: 84px; }
.sc-thumb { width: 44px; height: 32px; flex: 0 0 auto; display: grid; place-items: center;
  background: var(--bg-panel-2); border: 1px solid var(--line); border-radius: 4px; }
.sc-thumb svg { width: 34px; height: 24px; }
.sc-htext { min-width: 0; }
.sc-nameline { display: flex; align-items: baseline; gap: 5px; }
.sc-name { font-family: var(--font-head); font-size: 15px; color: var(--text-1); letter-spacing: .02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.sc-type { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.sc-mmsi { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-2); margin-top: 3px; }
.sc-flag { font-size: 9px; color: var(--text-3); border: 1px solid var(--line); border-radius: 2px; padding: 0 4px; }
.sc-line { font-size: 11px; color: var(--text-2); margin-top: 6px; padding-right: 84px; }

/* VOYAGE / META tabs — labeled rows */
.sc-tabbody { padding: 6px 10px 8px; }
.sc-row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0;
  border-top: 1px solid var(--line-soft); font-size: 11px; }
.sc-row span { color: var(--text-3); }
.sc-row b { color: var(--text-1); font-weight: 500; text-align: right; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
/* UNMODIFIED (raw) tab */
.sc-raw { margin: 0; padding: 8px 10px; font-family: "Roboto Mono", monospace; font-size: 10px;
  line-height: 1.5; color: #9fd0c8; white-space: pre-wrap; word-break: break-word; max-height: 200px; overflow: auto; }

.shipcard .ec-tabs { gap: 8px; }
.shipcard .ec-tabs span:not(.grow) { font-size: 10px; letter-spacing: .04em; cursor: pointer; }

/* aircraft card variant — same chrome, no gauge column */
.aircard { width: 340px; }
.aircard .sc-content { min-height: 96px; }
.ac-main { padding: 9px 11px 11px; }
.ac-main .sc-head { padding-right: 0; margin-bottom: 2px; }
.aircard .sc-line { padding-right: 0; margin-top: 6px; }
.aircard .sc-line b { color: var(--text-1); font-weight: 600; }
.aircard .sc-name { max-width: 160px; }
.aircard .ec-tabs { gap: 7px; }
.aircard .ec-tabs span:not(.grow) { font-size: 9.5px; }

/* ---- missile track card (Optix AIS-card style) ---- */
.ecard.actcard { width: 302px; }
.actcard .ac-head { padding: 9px 10px 2px; }
.actcard .ac-content { max-height: 320px; overflow: auto; padding: 2px 10px 8px; }
.actcard .ac-rows .sc-row:first-child { border-top: 0; }
.actcard .ac-empty { padding: 10px 0 12px; color: var(--text-3); }
.actcard .sc-raw { max-height: 320px; overflow: auto; }

.ecard.track { width: 258px; }
.tc-photo { position: relative; height: 92px; background: #000; overflow: hidden;
  border-bottom: 1px solid var(--line); }
.tc-photo img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.tc-photo-cap { position: absolute; bottom: 3px; right: 5px; font-size: 8px; color: rgba(255,255,255,.55);
  text-shadow: 0 0 3px #000; }
.tc-photo-tag { position: absolute; top: 6px; left: 8px; font-family: var(--font-head); font-size: 12px;
  letter-spacing: .06em; color: #fff; text-shadow: 0 0 5px #000; background: rgba(238,95,91,.85);
  padding: 1px 7px; border-radius: 3px; }
.tc-body { padding: 8px 10px 4px; }
.tc-headrow { display: flex; align-items: center; gap: 8px; }
.tc-name { flex: 1; font-family: var(--font-head); font-size: 15px; color: var(--text-1); letter-spacing: .02em; }
.tc-conf { font-size: 9px; letter-spacing: .06em; padding: 1px 6px; border-radius: 3px; border: 1px solid; }
.tc-conf.conf-high { color: #ff6b6b; border-color: #ff6b6b; }
.tc-conf.conf-med { color: var(--accent-orange); border-color: var(--accent-orange); }
.tc-conf.conf-low { color: var(--text-3); border-color: var(--text-3); }
.tc-idrow { display: flex; justify-content: space-between; gap: 8px; margin-top: 3px;
  font-size: 10px; color: var(--text-3); }

.tc-gauges { display: flex; align-items: center; gap: 6px; margin: 8px 0 4px; }
.tc-gauge-wrap { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.tc-gspeed svg, .tc-gcomp svg { width: 66px; height: 66px; }
.tc-glbl { font-size: 8px; letter-spacing: .1em; color: var(--text-3); }
.g-val { fill: #fff; font: 700 15px var(--font-head); text-anchor: middle; }
.g-sub { fill: var(--text-3); font: 400 8px var(--font-body); text-anchor: middle; letter-spacing: .04em; }
.c-tick { fill: var(--text-3); font: 700 8px var(--font-body); text-anchor: middle; }
.tc-alt { flex: 1; display: grid; grid-template-columns: 1fr; align-content: center; gap: 0;
  padding-left: 6px; border-left: 1px solid var(--line-soft); text-align: center; }
.tc-alt b { font-family: var(--font-head); font-size: 17px; color: var(--accent-gold); line-height: 1.1; }
.tc-alt b.tc-etav { color: var(--text-1); font-size: 14px; margin-top: 4px; }
.tc-alt span { font-size: 8px; letter-spacing: .06em; color: var(--text-3); }
.tc-assess { font-size: 10.5px; color: var(--text-2); line-height: 1.4; padding: 4px 0 2px;
  border-top: 1px solid var(--line-soft); margin-top: 4px; }
.tc-assess b { color: var(--text-1); font-weight: 500; }

/* ---- contact baseball card (air / sea / cue / false track) ---- */
.ecard.contact { width: 244px; }
.ecard.contact .cc-head { padding: 9px 10px 2px; }
.cc-name { font-family: var(--font-head); font-size: 15px; color: var(--text-1); letter-spacing: .02em; }
.cc-type { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.cc-source { display: flex; align-items: center; gap: 6px; margin: 4px 10px 0; padding: 3px 8px;
  background: var(--bg-panel-2); border: 1px solid var(--line); border-radius: 3px;
  font-family: var(--font-head); font-size: 10px; letter-spacing: .06em; color: var(--text-2); }
.cc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c);
  box-shadow: 0 0 5px var(--c); flex: 0 0 auto; }
.cc-gauges { display: flex; align-items: center; gap: 6px; padding: 8px 10px 2px; }
.cc-gspeed svg, .cc-gcomp svg { width: 64px; height: 64px; }
.cc-body { padding: 2px 10px 6px; }

/* ---- imagery baseball card ---- */
.ecard.imagery { width: 252px; }
.ecard.imagery .cc-head { padding: 9px 10px 2px; }
.ec-btn.sat { color: var(--accent-green); }
.ec-btn.sat:hover { color: #fff; }
.ec-btn.sat.loaded { color: #fff; background: var(--accent-green); }
.imported-row .lm-label { font-size: 11px; color: var(--text-2); overflow: hidden;
  text-overflow: ellipsis; }
.imported-row .imp-x { display: grid; color: var(--text-3); }
.imported-row .imp-x:hover { color: var(--accent-red); }
.imported-row .imp-x svg { width: 12px; height: 12px; }

/* ---- Video Player window ---- */
.vidwin {
  position: absolute; right: 16px; bottom: 16px; z-index: 25; width: 600px; height: 366px;
  min-width: 340px; min-height: 240px;
  display: flex; flex-direction: column; background: var(--bg-panel);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel); overflow: hidden;
}
/* drag-to-resize grip (bottom-right) */
.vw-resize { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; z-index: 6; }
.vw-resize::after { content: ""; position: absolute; right: 3px; bottom: 3px; width: 7px; height: 7px;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); opacity: .6; }
.vw-resize:hover::after { border-color: var(--accent-blue); opacity: 1; }
.vw-head { display: flex; align-items: center; height: 28px; padding: 0 6px 0 10px;
  background: var(--bg-panel-2); border-bottom: 1px solid var(--line); cursor: grab; }
.vw-title { display: flex; align-items: center; gap: 7px; color: var(--text-2); }
.vw-title svg { width: 14px; height: 14px; }
.vw-title b { font-family: var(--font-head); font-weight: 400; font-size: 12px; letter-spacing: .06em; }
.vw-head .grow { flex: 1; }
.vw-x { width: 22px; height: 22px; background: transparent; border: 0; color: var(--text-3);
  display: grid; place-items: center; border-radius: 3px; }
.vw-x:hover { background: var(--bg-hover); color: #fff; } .vw-x svg { width: 13px; height: 13px; }

.vw-main { display: flex; flex: 1; min-height: 0; }   /* fills the window so it resizes cleanly */
.vw-left { flex: 1; display: flex; flex-direction: column; min-width: 0;
  border-right: 1px solid var(--line); }
.vw-stage { position: relative; flex: 1; background: #000; overflow: hidden; }
.vw-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.vw-nostream { position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-head); letter-spacing: .2em; color: #2a2a2a; font-size: 13px; pointer-events: none; }
.vw-video[src] ~ .vw-nostream { display: none; }

.vw-transport { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px;
  background: var(--bg-panel-2); }
.vw-play, .vw-btn, .vw-full, .vw-list { width: 24px; height: 22px; display: grid; place-items: center;
  background: transparent; border: 0; color: var(--neutral-300); border-radius: 3px; }
.vw-play { color: #eef1f3; }
.vw-play:hover, .vw-btn:hover, .vw-full:hover, .vw-list:hover { background: var(--bg-hover); color: #fff; }
.vw-list.on { color: var(--accent-blue); background: rgba(59,130,214,.14); }
.vw-play svg, .vw-btn svg, .vw-full svg, .vw-list svg { width: 14px; height: 14px; }
.vw-time { font-size: 10.5px; color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 88px; }
.vw-seek { flex: 1; height: 4px; -webkit-appearance: none; appearance: none;
  background: var(--neutral-800); border-radius: 3px; }
.vw-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent-blue); cursor: pointer; }

.vw-toggles { display: flex; gap: 14px; padding: 7px 10px; background: var(--bg-panel);
  border-top: 1px solid var(--line); flex-wrap: wrap; }
.vw-toggle { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-2); cursor: pointer; }
.vw-toggle .tg { width: 26px; height: 14px; border-radius: 8px; background: var(--neutral-800);
  border: 0; position: relative; padding: 0; transition: background var(--dur); }
.vw-toggle .tg .knob { position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--neutral-400); transition: transform var(--dur), background var(--dur); }
.vw-toggle .tg[aria-checked="true"] { background: var(--accent-blue); }
.vw-toggle .tg[aria-checked="true"] .knob { transform: translateX(12px); background: #fff; }

.vidwin.lib-collapsed .vw-right { display: none; }
.vw-right { width: 192px; display: flex; flex-direction: column; background: var(--bg-panel-2);
  border-left: 1px solid var(--line); }
.vw-lib-title { height: 26px; display: flex; align-items: center; gap: 7px; padding: 0 4px 0 10px;
  font-family: var(--font-head); font-size: 11px; letter-spacing: .1em; color: var(--text-2);
  border-bottom: 1px solid var(--accent-blue); }
.vw-lib-title svg { width: 13px; height: 13px; }
.vw-lib-title .grow { flex: 1; }
.vw-lib-x { width: 20px; height: 20px; display: grid; place-items: center; background: transparent;
  border: 0; color: var(--text-3); border-radius: 3px; }
.vw-lib-x:hover { background: var(--bg-hover); color: #fff; } .vw-lib-x svg { width: 12px; height: 12px; }
.vw-plat-tabs { display: flex; gap: 4px; padding: 6px 6px 0; }
.vw-plat-tab { flex: 1; padding: 4px 6px; font-family: var(--font-head); font-size: 10px;
  letter-spacing: .06em; color: var(--text-3); background: var(--bg-panel);
  border: 1px solid var(--line); border-radius: 3px; }
.vw-plat-tab:hover { color: var(--text-1); }
.vw-plat-tab.on { color: #fff; border-color: var(--accent-blue); background: #223049; }
.vw-lib { flex: 1; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.vw-item { display: flex; gap: 8px; padding: 5px; background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: 4px; text-align: left; align-items: center; }
.vw-item:hover { background: var(--bg-hover); }
.vw-item.on { border-color: var(--accent-blue); box-shadow: inset 0 0 0 1px var(--accent-blue); }
.vw-thumb { width: 52px; height: 32px; flex: 0 0 auto; border-radius: 2px; background-size: cover;
  background-position: center; border: 1px solid var(--line); }
.vw-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; cursor: pointer; }
.vw-meta b { font-size: 10.5px; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vw-meta em { font-size: 9px; color: var(--text-3); font-style: normal; }
.vw-meta i { font-size: 8.5px; color: var(--text-3); font-style: normal; font-variant-numeric: tabular-nums; }
.vw-thumb { cursor: pointer; }
.vw-item-actions { display: flex; flex-direction: column; gap: 3px; flex: 0 0 auto; }
.vw-mini { width: 20px; height: 15px; display: grid; place-items: center; background: transparent;
  border: 1px solid var(--line); border-radius: 3px; color: var(--text-3); cursor: pointer; }
.vw-mini:hover { color: #fff; border-color: var(--accent-blue); background: var(--bg-hover); }
.vw-mini svg { width: 11px; height: 11px; }

/* ---- HUD overlays ---- */
.vw-hud { position: absolute; inset: 0; pointer-events: none; font-family: "Roboto Mono", monospace; }
.hud-c { position: absolute; font-size: 10px; line-height: 1.35; letter-spacing: .03em; }
.hud-c span { opacity: .8; font-size: 9px; }
.hud-c.tl { top: 7px; left: 9px; } .hud-c.tr { top: 7px; right: 9px; text-align: right; }
.hud-c.bl { bottom: 7px; left: 9px; } .hud-c.br { bottom: 7px; right: 9px; text-align: right; }
.hud-reticle { position: absolute; inset: 0; width: 100%; height: 100%; }
.vw-hud.mq9 { color: rgba(255,255,255,.9); text-shadow: 0 0 3px #000; }
.vw-hud.mq9 .hud-reticle { stroke: rgba(255,255,255,.85); stroke-width: 0.6; fill: rgba(255,255,255,.85); }
.vw-hud.tb2 { color: #6dff9e; text-shadow: 0 0 4px #000; }
.vw-hud.tb2 .hud-reticle { stroke: #6dff9e; stroke-width: 0.8; fill: none; }
