:root {
  --bg: #07090f;
  --white: #e8eef5;
  --muted: rgba(232, 238, 245, 0.42);
  --gold: #8f6d18; /* brand bar / attribution only */
  --gold-dim: #7a5c12;
  --cyan: #5ee7ff;
  --cyan-dim: rgba(94, 231, 255, 0.35);
  --amber: #ffc857;
  --hud: rgba(8, 14, 22, 0.82);
  --border: rgba(94, 231, 255, 0.1);
  --border2: rgba(94, 231, 255, 0.22);
}

/* Reserve space under fixed 360 AXE brand bar */
:root {
  --brand-h: calc(44px + env(safe-area-inset-top, 0px));
}
body.has-brand #cesiumContainer,
body.has-brand #globe-canvas,
body.has-brand .vignette,
body.has-brand #ui {
  /* Full viewport under brand bar, never a side column */
  inset: var(--brand-h) 0 0 0;
  top: var(--brand-h);
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
}
body.has-brand .wordmark {
  top: 0.7rem;
}
body.has-brand .panel {
  top: 3.2rem;
}



*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: var(--bg);
  color: var(--white);
  font-family: Syne, sans-serif;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#cesiumContainer,
#globe-canvas {
  position: fixed;
  inset: 0;
  left: 0;
  right: 0;
  width: 100vw;
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  display: block;
  background: var(--bg);
  touch-action: none;
  cursor: grab;
  z-index: 0;
}

#cesiumContainer .cesium-viewer,
#cesiumContainer .cesium-viewer-cesiumWidgetContainer,
#cesiumContainer .cesium-widget,
#cesiumContainer .cesium-widget canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  display: block;
}

#cesiumContainer .cesium-viewer-bottom,
#cesiumContainer .cesium-viewer-toolbar {
  display: none !important;
}

#globe-canvas.grabbing {
  cursor: grabbing;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 48%,
    transparent 28%,
    rgba(7, 9, 15, 0.28) 62%,
    rgba(7, 9, 15, 0.72) 100%
  );
}

#ui {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

body.embed #ui,
body.embed .vignette {
  display: none;
}

.wordmark {
  position: absolute;
  top: 1.5rem;
  left: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.wordmark h1,
.hud-title h1 {
  font-family: "DM Mono", monospace;
  font-size: clamp(0.78rem, 1.6vw, 0.95rem);
  letter-spacing: 0.22em;
  font-weight: 400;
  color: var(--cyan);
}

.wordmark .by {
  font-family: "DM Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

/* WORLDVIEW-style perimeter panels, globe center clear */
.panel {
  position: absolute;
  top: 4.4rem;
  bottom: 6.4rem;
  width: min(15.5rem, 34vw);
  z-index: 6;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.7rem 0.65rem 0.75rem;
  background: var(--hud);
  border: 1px solid var(--border2);
  backdrop-filter: blur(14px);
  overflow: auto;
}

.panel-left {
  left: 0.7rem;
}

.panel-right {
  right: 0.7rem;
}

.panel-title {
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 0.35rem 0.1rem;
}

.layer-row {
  pointer-events: auto;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-align: left;
  padding: 0.48rem 0.45rem;
  background: rgba(236, 234, 227, 0.03);
  color: var(--white);
  border: 1px solid transparent;
  font-family: "DM Mono", monospace;
}

.layer-row:hover,
.layer-row:focus-visible {
  border-color: var(--cyan-dim);
  outline: none;
}

.layer-row.on {
  background: rgba(94, 231, 255, 0.1);
  border-color: rgba(94, 231, 255, 0.45);
}

.layer-row.action {
  margin-top: 0.35rem;
  justify-content: center;
  border: 1px solid var(--border2);
}

.layer-ico {
  flex: 0 0 1.1rem;
  width: 1.1rem;
  height: 1.1rem;
  background: none;
  color: var(--cyan);
  opacity: 0.95;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.layer-ico svg {
  display: block;
  width: 100%;
  height: 100%;
}

.layer-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.layer-name {
  font-family: "DM Mono", monospace;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.layer-src {
  font-family: "DM Mono", monospace;
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: none;
  font-weight: 400;
}

.layer-sw {
  flex: 0 0 1.7rem;
  width: 1.7rem;
  height: 0.85rem;
  border-radius: 999px;
  background: rgba(236, 234, 227, 0.18);
  position: relative;
}

.layer-sw::after {
  content: "";
  position: absolute;
  top: 0.1rem;
  left: 0.1rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: rgba(236, 234, 227, 0.55);
  transition: left 0.15s ease, background 0.15s ease;
}

.layer-row.on .layer-sw {
  background: rgba(94, 231, 255, 0.75);
}

.layer-row.on .layer-sw::after {
  left: 0.9rem;
  background: #eceae3;
}


body.hud-bloom #cesiumContainer {
  filter: contrast(1.05) saturate(1.08) brightness(1.04);
}
body.hud-clean .wordmark,
body.hud-clean .credits,
body.hud-clean .home,
body.hud-clean .hint {
  display: none !important;
}
body.hud-clean .panel {
  opacity: 0.2;
}
body.hud-clean .panel:hover,
body.hud-clean .panel:focus-within {
  opacity: 1;
}
body.hud-hide-wordmark .wordmark {
  display: none !important;
}

.hint {
  position: absolute;
  bottom: 5.4rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-align: center;
  max-width: 90vw;
}

.dock {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.7rem;
  align-items: center;
  pointer-events: auto;
}

#mic-btn {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 999px;
  border: 1px solid var(--cyan);
  background: var(--hud);
  color: var(--cyan);
  font-family: "DM Mono", monospace;
  font-size: 0;
  letter-spacing: 0;
  cursor: pointer;
  position: relative;
  box-shadow: 0 0 0 1px rgba(94, 231, 255, 0.15), 0 0 18px rgba(94, 231, 255, 0.12);
}
#mic-btn.mic-hud {
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}
#mic-btn.mic-hud svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}
#mic-btn.mic-hud::before,
#mic-btn::before {

  content: "";
  position: absolute;
  inset: 0.85rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 14a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.9V21h2v-3.1A7 7 0 0 0 19 11h-2z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 14a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.9V21h2v-3.1A7 7 0 0 0 19 11h-2z'/></svg>") center / contain no-repeat;
}

#mic-btn.listening {
  background: rgba(94, 231, 255, 0.2);
  color: var(--cyan);
  box-shadow: 0 0 0 1px var(--cyan), 0 0 28px rgba(94, 231, 255, 0.45);
}

#command {
  width: min(18rem, 58vw);
  height: 2.5rem;
  border: 1px solid var(--border2);
  background: rgba(7, 9, 15, 0.72);
  color: var(--white);
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 0 0.8rem;
}

#command:focus {
  outline: 1px solid var(--cyan);
}

.credits {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  font-family: "DM Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 42vw;
}

.home {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  pointer-events: auto;
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(94, 231, 255, 0.35);
}

.home:hover {
  color: var(--white);
}

.detail {
  position: absolute;
  left: 1.4rem;
  bottom: 6.8rem;
  width: min(20rem, 42vw);
  z-index: 3;
  pointer-events: auto;
  font-family: "DM Mono", monospace;
  color: var(--white);
  background: rgba(8, 14, 22, 0.72);
  border: 1px solid rgba(94, 231, 255, 0.45);
  border-radius: 0;
  padding: 0.55rem 1.8rem 0.55rem 0.7rem;
  box-shadow: none;
}

.detail-name {
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--cyan);
}

.detail-blurb,
.detail-meta {
  margin-top: 0.4rem;
  font-size: 0.66rem;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--white);
}

.detail-meta {
  color: var(--muted);
}

#detail-close {
  position: absolute;
  top: 0.28rem;
  right: 0.3rem;
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  background: transparent;
  color: var(--cyan);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 6.9rem;
  transform: translateX(-50%);
  z-index: 4;
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--white);
  background: rgba(7, 9, 15, 0.78);
  border: 1px solid var(--border2);
  padding: 0.45rem 0.8rem;
  max-width: min(52vw, 28rem);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.toast.show {
  opacity: 1;
}

.fail {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: "DM Mono", monospace;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  padding: 2rem;
}

@media (max-width: 700px) {
  /* Phone full-bleed: canvas = full viewport; chips only as bottom strip */
  #cesiumContainer,
  #globe-canvas,
  body.has-brand #cesiumContainer,
  body.has-brand #globe-canvas {
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100% !important;
  }
  #cesiumContainer .cesium-widget canvas {
    width: 100% !important;
    height: 100% !important;
  }
  /* Phone: keep globe visible, layer chips as bottom strip, not side walls */
  .wordmark {
    top: 0.55rem;
    left: 0.75rem;
  }
  .wordmark h1 {
    font-size: 0.95rem;
  }
  .panel {
    top: auto !important;
    bottom: calc(5.1rem + env(safe-area-inset-bottom, 0px));
    left: 0.4rem;
    right: 0.4rem;
    width: auto !important;
    max-height: none;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.28rem;
    padding: 0.35rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .panel-left {
    left: 0.4rem;
    right: 0.4rem;
    bottom: calc(5.1rem + env(safe-area-inset-bottom, 0px));
  }
  .panel-right {
    display: none; /* Display panel desktop-only on phone */
  }
  .panel-title {
    display: none;
  }
  .layer-row {
    flex: 0 0 auto;
    width: auto;
    padding: 0.42rem 0.55rem;
  }
  .layer-name {
    font-size: 0.58rem;
  }
  .layer-src,
  .layer-ico,
  .layer-sw {
    display: none;
  }
  .detail {
    left: 0.8rem;
    right: 0.8rem;
    bottom: calc(8.6rem + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: none;
  }
  .toast {
    bottom: calc(8.7rem + env(safe-area-inset-bottom, 0px));
    max-width: min(88vw, 20rem);
  }
  .credits,
  .home {
    display: none;
  }
  .hint {
    bottom: calc(4.85rem + env(safe-area-inset-bottom, 0px));
  }
  .dock {
    bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
  }
}


/* axe-brand-clear: keep HUD below studio brand bar on phones */
@media (max-width: 700px) {
  body.has-brand .wordmark { top: 0.55rem; left: 0.85rem; }
  body.has-brand .panel { top: 2.7rem; }
  body.has-brand .wordmark h1 { font-size: 0.95rem; letter-spacing: 0.12em; }
  body.has-brand .wordmark .by { font-size: 0.58rem; }
}


/*  Intel overlay (Nora gates 1+2)  */
.intel-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}
.intel-bracket {
  position: absolute;
  width: 1.35rem;
  height: 1.35rem;
  border-color: var(--cyan);
  border-style: solid;
  opacity: 0.85;
}
.intel-bracket.tl { top: 0.55rem; left: 0.55rem; border-width: 2px 0 0 2px; }
.intel-bracket.tr { top: 0.55rem; right: 0.55rem; border-width: 2px 2px 0 0; }
.intel-bracket.bl { bottom: 0.55rem; left: 0.55rem; border-width: 0 0 2px 2px; }
.intel-bracket.br { bottom: 0.55rem; right: 0.55rem; border-width: 0 2px 2px 0; }
.intel-tl {
  position: absolute;
  top: 0.7rem;
  left: 2.1rem;
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--cyan);
  text-transform: uppercase;
}
.intel-tr {
  position: absolute;
  top: 0.7rem;
  right: 2.1rem;
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--cyan);
  display: flex;
  gap: 0.55rem;
  align-items: center;
}
.intel-rec {
  color: #ff5a5a;
  letter-spacing: 0.14em;
}
.intel-bl {
  position: absolute;
  bottom: 0.75rem;
  left: 2.1rem;
  font-family: "DM Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  color: var(--amber);
  max-width: min(52vw, 28rem);
}

/* Sensor modes, CSS filters on globe only */
body.sensor-nvg #cesiumContainer {
  filter: grayscale(0.35) saturate(1.45) hue-rotate(70deg) brightness(0.92) contrast(1.15)
    drop-shadow(0 0 0.4px #3cff6a);
}
body.sensor-flir #cesiumContainer {
  filter: grayscale(0.2) saturate(2.2) hue-rotate(-35deg) contrast(1.35) brightness(1.05);
}
body.hud-bloom.sensor-nvg #cesiumContainer {
  filter: grayscale(0.3) saturate(1.5) hue-rotate(70deg) brightness(0.95) contrast(1.18);
}
body.hud-bloom.sensor-flir #cesiumContainer {
  filter: grayscale(0.15) saturate(2.3) hue-rotate(-35deg) contrast(1.4) brightness(1.08);
}
.panel-title.sensor-title {
  margin-top: 0.55rem;
}

/* Detail, tighter tick-box */
.detail {
  padding: 0.42rem 1.6rem 0.42rem 0.55rem;
  border: 1px solid rgba(94, 231, 255, 0.55);
  background: rgba(8, 14, 22, 0.78);
  box-shadow: inset 0 0 0 1px rgba(94, 231, 255, 0.08);
}
.detail-name {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.detail-blurb,
.detail-meta {
  margin-top: 0.28rem;
  font-size: 0.58rem;
  line-height: 1.35;
  word-break: break-word;
}

body.hud-clean .intel-overlay {
  opacity: 0.35;
}

/* Contact card, always in front, clear of side panels */
.detail,
body.has-brand .detail {
  position: absolute;
  left: 50%;
  right: auto;
  top: 6.2rem;
  bottom: auto;
  transform: translateX(-50%);
  width: min(24rem, 92vw);
  max-height: calc(100vh - 14rem);
  overflow-y: auto;
  z-index: 40;
  padding: 0.6rem 2rem 0.65rem 0.8rem;
  background: rgba(6, 12, 20, 0.92);
  border: 1px solid rgba(94, 231, 255, 0.6);
}
.detail-name { font-size: 0.82rem; letter-spacing: 0.08em; }
.detail-meta:not([hidden]) {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 0.8rem;
  row-gap: 0.2rem;
  margin-top: 0.5rem;
  font-size: 0.66rem;
}
.detail-meta .dk { color: var(--muted); letter-spacing: 0.08em; }
.detail-meta .dv { color: var(--white); word-break: break-word; }
@media (max-width: 760px) {
  .detail, body.has-brand .detail { top: auto; bottom: 7.4rem; max-height: 45vh; }
}

/* On-map attribution: imagery credit + data sources. Always visible, also in Clean UI. */
.map-attrib {
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;
  z-index: 7;
  max-width: min(30rem, calc(50vw - 14rem));
  pointer-events: auto;
  font-family: "DM Mono", monospace;
  font-size: 0.58rem;
  line-height: 1.45;
  letter-spacing: 0.03em;
  color: rgba(245, 243, 236, 0.86);
  text-shadow: 0 0 3px rgba(7, 9, 15, 0.9);
}
.map-credit,
.map-credit .cesium-credit-textContainer,
.map-credit .cesium-credit-textContainer * {
  display: inline !important;
  font: inherit;
  color: inherit;
}
.map-credit .cesium-credit-logoContainer,
.map-credit .cesium-credit-expand-link {
  display: none !important;
}
.map-credit a,
.map-sources a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.map-sources-btn {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid rgba(94, 231, 255, 0.35);
  cursor: pointer;
}
.map-sources-btn:hover,
.map-sources-btn:focus-visible {
  color: var(--white);
}
.map-sources {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.4rem);
  width: min(20rem, 80vw);
  z-index: 45;
  padding: 0.6rem 1.9rem 0.6rem 0.7rem;
  background: rgba(6, 12, 20, 0.94);
  border: 1px solid rgba(94, 231, 255, 0.5);
  color: var(--white);
  font-size: 0.64rem;
  line-height: 1.5;
  text-shadow: none;
}
.map-sources[hidden] {
  display: none;
}
.map-sources-close {
  position: absolute;
  top: 0.2rem;
  right: 0.25rem;
  width: 1.4rem;
  height: 1.4rem;
  border: 0;
  background: transparent;
  color: var(--cyan);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
@media (max-width: 700px) {
  .map-attrib {
    left: 0.5rem;
    right: 0.5rem;
    bottom: calc(0.25rem + env(safe-area-inset-bottom, 0px));
    max-width: none;
    font-size: 0.5rem;
    text-align: center;
  }
  .map-sources {
    left: 50%;
    transform: translateX(-50%);
    text-align: left;
  }
  .dock { bottom: calc(2.3rem + env(safe-area-inset-bottom, 0px)); }
  .hint { bottom: calc(6.3rem + env(safe-area-inset-bottom, 0px)); }
  .panel,
  .panel-left { bottom: calc(6.55rem + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(10.15rem + env(safe-area-inset-bottom, 0px)); }
  .detail,
  body.has-brand .detail { bottom: calc(10.05rem + env(safe-area-inset-bottom, 0px)); }
}

/* Attribution layout: credit flows inline (not Cesium's absolute box), sits above the CAM line, never covers the Data sources button. */
.map-credit .cesium-widget-credits {
  position: static !important;
  display: inline !important;
  padding: 0 !important;
  background: none !important;
}
.map-attrib { bottom: 2.1rem; }
.map-credit { margin-right: 0.6rem; }
@media (max-width: 700px) {
  .map-attrib { bottom: calc(0.25rem + env(safe-area-inset-bottom, 0px)); }
  .intel-bl { bottom: auto; top: 1.9rem; left: 0.9rem; }
}

/* Layer colour swatches: match the map icon colour of each layer. */
.layer-row[data-layer] .layer-ico { position: relative; }
.layer-row[data-layer] .layer-ico::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--layer-swatch, #ffffff);
  box-shadow: 0 0 0 1.5px rgba(8, 10, 16, 0.92);
}
.layer-row[data-layer="aircraft"] { --layer-swatch: #FFD400; }
.layer-row[data-layer="military"] { --layer-swatch: #FF3B3B; }
.layer-row[data-layer="ships"] { --layer-swatch: #22D3EE; }
.layer-row[data-layer="notable"] { --layer-swatch: #FF7A1A; }
.layer-row[data-layer="satellites"],
.layer-row[data-layer="starlink"] { --layer-swatch: #F5F7FA; }
.layer-row[data-layer]:not(.on) .layer-ico::after { opacity: 0.45; }
@media (max-width: 700px) {
  .layer-row[data-layer] .layer-name::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 0.35rem;
    border-radius: 50%;
    vertical-align: 0.05em;
    background: var(--layer-swatch, #ffffff);
    box-shadow: 0 0 0 1.5px rgba(8, 10, 16, 0.92);
  }
  .layer-row[data-layer]:not(.on) .layer-name::before { opacity: 0.45; }
}

/* Stack position on the contact card ("2/5") when icons overlap; repeat clicks cycle. */
.detail-stack {
  position: absolute;
  top: 0.55rem;
  right: 2rem;
  font-family: "DM Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  pointer-events: none;
}
.detail-stack[hidden] { display: none; }
.detail-stack:not([hidden]) + .detail-name { padding-right: 2.2rem; }
