/* ============================================================
   Matt Portfolio — dark control-room geospatial UI
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* accent (cyan-azure HUD — tweakable) */
  --accent: #1f93cc;
  --accent-bright: #4ccdf0;
  --accent-dim: color-mix(in srgb, var(--accent) 22%, transparent);
  --accent-glow: color-mix(in srgb, var(--accent-bright) 40%, transparent);

  /* control-room surfaces */
  --panel: rgba(17, 19, 23, 0.78);
  --panel-solid: #141619;
  --panel-2: rgba(28, 31, 36, 0.72);
  --hair: rgba(255, 255, 255, 0.09);
  --hair-strong: rgba(255, 255, 255, 0.16);
  --blur: 18px;

  --ink: #eef1f4;
  --ink-dim: #aab1bb;
  --ink-faint: #6b7280;

  --radius: 12px;
  --radius-sm: 9px;
  --shadow: 0 10px 34px -8px rgba(0, 0, 0, 0.6), 0 2px 8px -2px rgba(0, 0, 0, 0.5);

  --pad: 12px;
  --gap: 8px;
  --row-h: 13px;
}

:root[data-panel="solid"] {
  --panel: var(--panel-solid);
  --panel-2: #1b1e23;
  --blur: 0px;
}
:root[data-density="compact"] {
  --pad: 9px;
  --gap: 6px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  color: var(--ink);
  background: #0a0b0d;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

#map { position: absolute; inset: 0; }
#map-compare { position: absolute; inset: 0; z-index: 5; display: none; pointer-events: none; }

/* MapLibre canvas tone-down so overlays read clearly */
.maplibregl-map { font-family: 'IBM Plex Sans', sans-serif; }
.mono { font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }

/* ---------- generic glass panel ---------- */
.panel {
  background: var(--panel);
  backdrop-filter: blur(var(--blur)) saturate(1.3);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.3);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ============================================================
   TOP-LEFT  — title + file list
   ============================================================ */
#tl {
  position: absolute;
  top: 14px; left: 14px;
  width: 312px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 20;
  max-height: calc(100% - 28px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
}
.brand .mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 30% 30%, var(--accent-bright), var(--accent) 70%);
  box-shadow: 0 0 0 1px var(--hair-strong), 0 0 16px -2px var(--accent-glow);
  flex: none;
}
.brand h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.brand .sub {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--ink-faint);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

/* file list ------------------------------------------------ */
.filelist { display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.fl-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px var(--pad);
  border-bottom: 1px solid var(--hair);
}
.fl-head .t { font-size: 11px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--ink-dim); }
.fl-head .count {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--ink-faint);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--hair);
  border-radius: 20px;
  padding: 2px 8px;
}
.fl-body { overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 4px; min-height: 0; }

.layer {
  position: relative;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 8px 8px 9px;
  cursor: default;
  transition: background .14s, border-color .14s;
  user-select: none;
}
.layer:hover { background: rgba(255,255,255,.035); border-color: var(--hair); }
.layer.dragging { opacity: .4; }
.layer.drop-before { box-shadow: inset 0 2px 0 -0.5px var(--accent-bright); }
.layer.hidden .l-name, .layer.hidden .l-meta { opacity: .4; }

.l-top { display: flex; align-items: center; gap: 8px; }
.l-name-row { display: flex; align-items: center; gap: 6px; }
.grip {
  color: var(--ink-faint);
  cursor: grab;
  font-size: 13px;
  line-height: 1;
  letter-spacing: -2px;
  flex: none;
  padding: 0 1px;
}
.grip:active { cursor: grabbing; }

.eye {
  flex: none;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 6px;
  border: 1px solid var(--hair);
  background: rgba(255,255,255,.03);
  cursor: pointer;
  color: var(--ink-dim);
  transition: all .14s;
}
.eye.on { color: #0c0d0f; background: var(--accent); border-color: var(--accent); box-shadow: 0 0 12px -2px var(--accent-glow); }
.eye svg { width: 13px; height: 13px; display: block; }

.swatch {
  flex: none;
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 1px solid var(--hair-strong);
}

.l-id { min-width: 0; flex: 1; }
.l-name {
  flex: 1; min-width: 0;
  font-size: 12.5px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: -0.2px;
}
.l-meta {
  font-size: 10px; color: var(--ink-faint);
  font-family: 'IBM Plex Mono', monospace;
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.l-pct { flex: none; font-size: 10.5px; color: var(--ink-dim); font-family: 'IBM Plex Mono', monospace; width: 32px; text-align: right; }
.zoomto {
  flex: none;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
  opacity: 0;
  transition: all .14s;
}
.layer:hover .zoomto { opacity: 1; }
.zoomto:hover { color: var(--ink); border-color: var(--hair); background: rgba(255,255,255,.05); }
.zoomto svg { width: 13px; height: 13px; }

/* thin opacity slider */
.l-op { margin-top: 8px; padding: 0 1px; }
.op-track {
  position: relative;
  height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,.09);
  cursor: pointer;
}
.op-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-bright)); }
.op-knob {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 11px; height: 11px; border-radius: 50%;
  background: #f4f6f8; box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 0 10px -1px var(--accent-glow);
  cursor: grab;
}

/* ============================================================
   TOP-RIGHT — basemap selector + maplibre controls
   ============================================================ */
#tr {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.basemap {
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 188px;
}
.basemap .bm-label {
  font-size: 10px; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--ink-faint); padding: 0 2px;
  display: flex; align-items: center; gap: 6px;
}
.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 3px;
  background: rgba(0,0,0,.28);
  border: 1px solid var(--hair);
  border-radius: 8px;
  padding: 3px;
}
.seg button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-dim);
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all .14s;
}
.seg button:hover { color: var(--ink); }
.seg button.active {
  background: var(--accent);
  color: #0c0d0f;
  box-shadow: 0 0 14px -3px var(--accent-glow);
}
.seg button svg { width: 13px; height: 13px; }

/* style maplibre native controls to match */
.maplibregl-ctrl-group {
  background: var(--panel) !important;
  backdrop-filter: blur(var(--blur)) saturate(1.3);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.3);
  border: 1px solid var(--hair) !important;
  border-radius: 10px !important;
  box-shadow: var(--shadow) !important;
  overflow: hidden;
}
.maplibregl-ctrl-group button { width: 32px !important; height: 32px !important; background: transparent !important; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--hair) !important; }
.maplibregl-ctrl-group button .maplibregl-ctrl-icon { filter: invert(1) brightness(1.4) opacity(.8); }
.maplibregl-ctrl-group button:hover { background: rgba(255,255,255,.06) !important; }
.maplibregl-ctrl-attrib {
  background: rgba(10,11,13,.7) !important;
  color: var(--ink-faint) !important;
  border-radius: 8px 0 0 0 !important;
  font-size: 10px !important;
}
.maplibregl-ctrl-attrib a { color: var(--ink-dim) !important; }
.maplibregl-ctrl-scale {
  background: var(--panel) !important;
  border: 1px solid var(--hair) !important;
  border-top: 0 !important;
  color: var(--ink-dim) !important;
  border-radius: 0 0 6px 6px;
  font-family: 'IBM Plex Mono', monospace !important;
  font-size: 10px !important;
  backdrop-filter: blur(var(--blur));
}
.maplibregl-ctrl-bottom-right { margin-bottom: 0; }

/* ============================================================
   BOTTOM-LEFT — coordinate readout
   ============================================================ */
#coords {
  position: absolute;
  bottom: 14px; left: 14px;
  z-index: 20;
  padding: 8px 12px;
  display: flex;
  gap: 16px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-dim);
}
#coords b { color: var(--ink-faint); font-weight: 400; margin-right: 6px; }
#coords .v { color: var(--ink); }

/* ============================================================
   BOTTOM-RIGHT — tools FAB + submenu
   ============================================================ */
#tools-wrap {
  position: absolute;
  bottom: 98px; right: 14px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
#tools-btn {
  appearance: none;
  display: flex; align-items: center; gap: 9px;
  padding: 12px 16px;
  border-radius: 13px;
  border: 1px solid var(--accent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, white 8%), var(--accent));
  color: #07150e;
  font: inherit; font-weight: 600; font-size: 13px;
  cursor: pointer;
  box-shadow: 0 8px 26px -6px var(--accent-glow), var(--shadow);
  transition: transform .12s, box-shadow .2s;
}
#tools-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 32px -6px var(--accent-glow), var(--shadow); }
#tools-btn:active { transform: translateY(0); }
#tools-btn svg { width: 16px; height: 16px; }
#tools-btn .chev { transition: transform .2s; opacity: .8; }
#tools-wrap.open #tools-btn .chev { transform: rotate(180deg); }

.tools-menu {
  width: 286px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transform-origin: bottom right;
  transition: opacity .16s, transform .16s;
}
.tools-menu .tm-head {
  padding: 8px 10px 9px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--hair);
  margin-bottom: 4px;
}
.tools-menu .tm-head .t { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-dim); }
.tools-menu .tm-head .hint { margin-left: auto; font-size: 10px; color: var(--ink-faint); }
#tools-wrap:not(.open) .tools-menu { opacity: 0; transform: translateY(8px) scale(.97); pointer-events: none; }

.tool {
  display: flex; align-items: center; gap: 11px;
  padding: 10px;
  border-radius: 9px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .14s, border-color .14s;
  text-align: left;
}
.tool:hover { background: rgba(255,255,255,.04); border-color: var(--hair); }
.tool.active { background: var(--accent-dim); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.tool .ic {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--hair);
  color: var(--accent-bright);
}
.tool.active .ic { background: var(--accent); color: #08160e; border-color: var(--accent); box-shadow: 0 0 14px -3px var(--accent-glow); }
.tool .ic svg { width: 17px; height: 17px; }
.tool .tx { min-width: 0; }
.tool .tn { font-size: 12.5px; font-weight: 600; }
.tool .td { font-size: 10.5px; color: var(--ink-faint); margin-top: 1px; }
.tool .kbd {
  margin-left: auto; flex: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; color: var(--ink-faint);
  border: 1px solid var(--hair); border-radius: 5px;
  padding: 2px 5px;
}

/* ============================================================
   Active-tool scrims drawn on the map
   ============================================================ */
#swipe {
  position: absolute; inset: 0; z-index: 15; pointer-events: none; display: none;
}
#swipe.on { display: block; }
.compare-hint {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(520px, calc(100vw - 360px));
  padding: 8px 14px;
  font-size: 11.5px;
  color: var(--ink-dim);
  text-align: center;
  pointer-events: none;
  z-index: 2;
}
.compare-hint.hidden { display: none; }
.compare-hint strong { color: var(--accent-bright); font-weight: 600; }
#swipe .divider {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; background: linear-gradient(180deg, transparent, var(--accent-bright), transparent);
  box-shadow: 0 0 14px 1px var(--accent-glow);
  pointer-events: auto;
}
#swipe .handle {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--accent);
  display: grid; place-items: center; color: var(--accent-bright);
  cursor: ew-resize; pointer-events: auto;
  backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow), 0 0 16px -3px var(--accent-glow);
}
#swipe .handle svg { width: 18px; height: 18px; }
#swipe .tag {
  position: absolute; bottom: 18px;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 7px;
  padding: 5px 6px 5px 5px; border-radius: 8px;
  background: var(--panel); border: 1px solid var(--hair); color: var(--ink);
  backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow);
  pointer-events: auto; cursor: pointer;
  transition: border-color .14s;
  white-space: nowrap;
}
#swipe .tag:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
#swipe .tag .ab {
  flex: none;
  width: 18px; height: 18px; border-radius: 5px;
  display: grid; place-items: center;
  background: var(--accent); color: #06151c;
  font-family: 'IBM Plex Sans', sans-serif; font-weight: 700; font-size: 11px;
}
#swipe .tag .tag-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
#swipe .tag .nm { font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 500; }
#swipe .tag .tag-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--accent-bright);
  line-height: 1.2;
}
#swipe .tag .cv { display: grid; place-items: center; color: var(--ink-faint); flex: none; }
#swipe .tag .cv svg { width: 12px; height: 12px; }

.side-picker {
  position: absolute;
  z-index: 40;
  width: 248px;
  max-height: min(340px, 50vh);
  overflow-y: auto;
  padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  pointer-events: auto;
}
.side-picker .sp-hint {
  font-size: 10.5px;
  color: var(--ink-faint);
  padding: 2px 8px 8px;
  line-height: 1.35;
}
.side-picker .sp-group {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.45px;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: 10px 8px 4px;
  border-top: 1px solid var(--hair);
  margin-top: 2px;
}
.side-picker .sp-group:first-of-type { border-top: 0; margin-top: 0; }
.side-picker .sp-item.sp-frame { padding-left: 14px; }
.side-picker .sp-head, .menu-pop .sp-head {
  font-size: 10px; letter-spacing: .5px; text-transform: uppercase;
  color: var(--ink-faint); padding: 5px 8px 7px;
}
.menu-pop {
  position: fixed; z-index: 60;
  width: 216px; padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
}
.sp-item {
  appearance: none; border: 1px solid transparent; background: transparent;
  display: flex; align-items: center; gap: 9px;
  padding: 8px; border-radius: 7px; cursor: pointer;
  color: var(--ink); font: inherit; text-align: left;
  transition: background .12s, border-color .12s;
}
.sp-item:hover { background: rgba(255,255,255,.05); border-color: var(--hair); }
.sp-item.on { background: var(--accent-dim); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.sp-item .sp-sw { flex: none; width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--hair-strong); }
.sp-item .sp-nm { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; }

/* floating tool card (difference / histogram / measure mockups) */
#tool-card {
  position: absolute;
  bottom: 160px; right: 14px;
  z-index: 55;
  width: 300px;
  padding: 0;
  overflow: hidden;
  display: none;
  pointer-events: auto;
}
#tool-card.on { display: block; }
.tc-head {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--hair);
}
.tc-head .ic { color: var(--accent-bright); display: grid; place-items: center; }
.tc-head .ic svg { width: 16px; height: 16px; }
.tc-head .t { font-size: 12.5px; font-weight: 600; }
.tc-head .x {
  margin-left: auto; cursor: pointer; color: var(--ink-dim);
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px;
  appearance: none; border: 0; background: transparent; padding: 0;
  font: inherit;
}
.tc-head .x:hover { color: var(--ink); background: rgba(255,255,255,.08); }
.tc-head .x:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.tc-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.tc-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-dim); }
.tc-row svg { width: 18px; height: 18px; }
.tc-pick .car svg { width: 14px; height: 14px; }
.tc-row .lab { width: 64px; color: var(--ink-faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; }
.tc-pick {
  flex: 1; display: flex; align-items: center; gap: 7px;
  padding: 7px 9px; border-radius: 7px;
  background: rgba(255,255,255,.04); border: 1px solid var(--hair);
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--ink);
  cursor: pointer;
}
.tc-pick .dot { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.tc-pick .pk-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tc-pick .car { margin-left: auto; color: var(--ink-faint); }
.tc-note {
  font-size: 10.5px; color: var(--ink-faint); line-height: 1.5;
  background: rgba(255,255,255,.03); border: 1px solid var(--hair);
  border-left: 2px solid var(--accent); border-radius: 0 7px 7px 0;
  padding: 8px 10px;
}
.tc-hist { width: 100%; height: 92px; display: block; border-radius: 7px; background: rgba(0,0,0,.3); border: 1px solid var(--hair); }
.tc-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.tc-stat { background: rgba(255,255,255,.03); border: 1px solid var(--hair); border-radius: 7px; padding: 7px 8px; }
.tc-stat .k { font-size: 9.5px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .4px; }
.tc-stat .v { font-size: 13px; font-family: 'IBM Plex Mono', monospace; margin-top: 2px; color: var(--accent-bright); }
.tc-btn {
  appearance: none; width: 100%;
  padding: 9px; border-radius: 8px;
  background: var(--accent); color: #07150e; border: 0;
  font: inherit; font-weight: 600; font-size: 12px; cursor: pointer;
  box-shadow: 0 0 14px -4px var(--accent-glow);
}
.tc-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.tc-btn.secondary {
  background: rgba(255,255,255,.1);
  color: var(--ink);
  border: 1px solid var(--hair-strong);
  box-shadow: none;
}
.tc-btn.secondary:hover:not(:disabled) {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.22);
}
.tc-legend {
  display: flex; align-items: center; gap: 7px;
  font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; color: var(--ink-faint);
}
.tc-legend .lg-bar {
  flex: 1; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, #286ed2, #f4f4f8 50%, #d6463c);
  border: 1px solid var(--hair);
}
.tc-legend .lg-tag { color: var(--ink-dim); }
.tc-measure-line { display: flex; align-items: baseline; gap: 8px; }
.tc-measure-line .big { font-family: 'IBM Plex Mono', monospace; font-size: 26px; font-weight: 500; color: var(--ink); }
.tc-measure-line .u { font-size: 12px; color: var(--ink-faint); }

/* ============================================================
   BOTTOM — universal temporal time slider
   ============================================================ */
#time-bar {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 380px));
  padding: 10px 16px 12px;
  z-index: 40;
  transition: opacity .25s, transform .25s;
}
#time-bar.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px);
}
.tb-ticks-wrap { margin-bottom: 8px; }
.tb-tick-legend {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 4px;
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}
.tb-leg::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.tb-leg.house::before { background: var(--accent-bright); }
.tb-leg.pond::before { background: #7ec87a; }
.tb-ticks {
  position: relative;
  height: 14px;
  margin: 0 4px;
}
.tb-tick-row {
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
}
.tb-tick-row.house { top: 0; }
.tb-tick-row.pond { top: 8px; }
.tb-tick {
  position: absolute;
  width: 2px;
  height: 6px;
  border-radius: 1px;
  transform: translateX(-50%);
  pointer-events: none;
}
.tb-tick.house { background: var(--accent-bright); opacity: 0.85; }
.tb-tick.pond { background: #7ec87a; opacity: 0.85; }
.tb-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}
.tb-date {
  text-align: center;
  font-size: 12px;
  color: var(--ink-dim);
}
#tb-range {
  width: 100%;
  height: 4px;
  margin: 0;
  accent-color: var(--accent-bright);
  cursor: pointer;
}
#tb-range::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 10px var(--accent-glow);
}
.layer .l-meta {
  display: block;
  font-size: 10.5px;
  color: var(--ink-faint);
  margin-top: 2px;
  font-family: 'IBM Plex Mono', monospace;
}
.layer.temporal .l-name { font-weight: 600; }

/* loading shimmer */
#boot {
  position: absolute; inset: 0; z-index: 50;
  background: #0a0b0d;
  display: grid; place-items: center;
  transition: opacity .5s;
}
#boot.gone { opacity: 0; pointer-events: none; }
#boot .b {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  color: var(--ink-faint); font-family: 'IBM Plex Mono', monospace; font-size: 11px;
  letter-spacing: 1px;
}
#boot .ring {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.12);
  border-top-color: var(--accent-bright);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* scrollbars */
.fl-body::-webkit-scrollbar { width: 8px; }
.fl-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 8px; }
.fl-body::-webkit-scrollbar-track { background: transparent; }
