@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-200-normal.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-300-normal.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-300-normal.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}

:root {
  --bg: #03050a;
  --panel: rgba(5, 10, 19, 0.78);
  --panel-hover: rgba(12, 22, 38, 0.88);
  --text: #f3f6fb;
  --text-muted: #9aa9bd;
  --text-dim: #64748b;
  --cyan: #38bdf8;
  --gold: #f5b841;
  --crimson: #ff3352;
  --emerald: #22c55e;
  --border: rgba(148, 163, 184, 0.16);
  --border-gold: rgba(245, 184, 65, 0.28);
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html,
body {
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

.view-toggle {
  position: fixed;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   60FPS LIVE REAL-TIME WORLD ATTACK CANVAS STAGE
   ========================================================= */
.map-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 85% 70% at 50% 46%, #0a1424 0%, #04070e 66%, #020306 100%);
  transition: background 0.7s var(--ease);
}

#globe-gl,
#attack-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.94;
  filter: blur(0.9px) saturate(0.9);
  transition: filter 0.7s var(--ease), opacity 0.7s var(--ease);
}

#globe-gl {
  z-index: 0;
  pointer-events: none;
}

#attack-canvas {
  z-index: 1;
}

/* Matte / Frosted ("Fosco") Veil */
.frost-veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle 420px at 50% 42%, rgba(245, 184, 65, 0.045) 0%, transparent 65%),
    radial-gradient(ellipse 72% 62% at 50% 50%, rgba(4, 7, 14, 0.44) 0%, rgba(3, 5, 10, 0.7) 68%, rgba(2, 3, 6, 0.9) 100%);
  backdrop-filter: blur(4px) saturate(0.88);
  -webkit-backdrop-filter: blur(4px) saturate(0.88);
  transition:
    opacity 0.7s var(--ease),
    backdrop-filter 0.7s var(--ease),
    -webkit-backdrop-filter 0.7s var(--ease);
}

.matte-grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.04;
  background-image:
    repeating-radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.35) 0, rgba(0, 0, 0, 0) 2px);
  background-size: 4px 4px;
  transition: opacity 0.7s var(--ease);
}

.frame-corners {
  position: fixed;
  inset: 16px;
  z-index: 4;
  pointer-events: none;
  opacity: 0.34;
  transition: opacity 0.7s var(--ease);
}

.frame-corners::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(245, 184, 65, 0.5) 18px, transparent 18px) top left / 24px 1px no-repeat,
    linear-gradient(to bottom, rgba(245, 184, 65, 0.5) 18px, transparent 18px) top left / 1px 24px no-repeat,
    linear-gradient(to left, rgba(56, 189, 248, 0.5) 18px, transparent 18px) top right / 24px 1px no-repeat,
    linear-gradient(to bottom, rgba(56, 189, 248, 0.5) 18px, transparent 18px) top right / 1px 24px no-repeat,
    linear-gradient(to right, rgba(56, 189, 248, 0.5) 18px, transparent 18px) bottom left / 24px 1px no-repeat,
    linear-gradient(to top, rgba(56, 189, 248, 0.5) 18px, transparent 18px) bottom left / 1px 24px no-repeat,
    linear-gradient(to left, rgba(245, 184, 65, 0.5) 18px, transparent 18px) bottom right / 24px 1px no-repeat,
    linear-gradient(to top, rgba(245, 184, 65, 0.5) 18px, transparent 18px) bottom right / 1px 24px no-repeat;
}

/* =========================================================
   MINIMAL STATIC PRESENTATION FOREGROUND (DEFAULT)
   ========================================================= */
.shell {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  padding: 32px 34px 28px;
  transition:
    opacity 0.7s var(--ease),
    filter 0.7s var(--ease),
    transform 0.8s var(--ease);
}

.top-mark {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.62);
}

.top-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.top-brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  opacity: 0.96;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(226, 232, 240, 0.64);
}

.live-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--crimson);
  box-shadow: 0 0 12px rgba(255, 51, 82, 0.95);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.78); }
}

.hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 16px 84px;
}

.emblem-wrap {
  position: relative;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
}

.emblem-aura {
  position: absolute;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 184, 65, 0.16) 0%, rgba(56, 189, 248, 0.05) 45%, transparent 72%);
  pointer-events: none;
}

.emblem {
  position: relative;
  width: 158px;
  height: 158px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 26px rgba(245, 184, 65, 0.3))
    drop-shadow(0 16px 36px rgba(0, 0, 0, 0.8));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px;
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  background: rgba(8, 12, 20, 0.62);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(248, 210, 128, 0.92);
  margin-bottom: 22px;
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-weight: 200;
  line-height: 1.02;
  letter-spacing: 0.16em;
  margin-bottom: 20px;
  text-shadow: 0 12px 44px rgba(0, 0, 0, 0.72);
}

.title-primary {
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  color: var(--text);
}

.title-accent {
  font-size: clamp(1.85rem, 4.7vw, 3.65rem);
  background: linear-gradient(95deg, #fff8eb 0%, #f5d084 36%, #bae6fd 72%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  max-width: 560px;
  font-size: clamp(0.95rem, 1.4vw, 1.08rem);
  font-weight: 300;
  line-height: 1.72;
  color: rgba(203, 213, 225, 0.82);
  letter-spacing: 0.015em;
}

.divider {
  width: 72px;
  height: 1px;
  margin: 26px auto 0;
  background: linear-gradient(90deg, transparent, rgba(245, 184, 65, 0.65), rgba(56, 189, 248, 0.65), transparent);
}

.bottom-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.56);
}

.bottom-domain {
  color: rgba(56, 189, 248, 0.8);
}

/* =========================================================
   DEEP REAL-TIME WAR-ROOM HUD (VISIBLE ONLY WHEN INVERTED)
   ========================================================= */
.map-hud {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.015);
  transition:
    opacity 0.6s var(--ease),
    transform 0.7s var(--ease),
    visibility 0s linear 0.6s;
}

.hud-bar {
  position: absolute;
  top: 24px;
  left: 28px;
  right: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: auto;
}

.hud-bar-left,
.hud-bar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 6px;
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(241, 245, 249, 0.92);
}

.infocon-pill {
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.14);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: #86efac;
}

.infocon-pill.is-yellow {
  border-color: rgba(245, 184, 65, 0.5);
  background: rgba(245, 184, 65, 0.16);
  color: #fde68a;
}

.infocon-pill.is-orange,
.infocon-pill.is-red {
  border-color: rgba(255, 51, 82, 0.55);
  background: rgba(255, 51, 82, 0.18);
  color: #fda4af;
}

.hud-kpis {
  display: flex;
  gap: 14px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-mono);
}

.hud-kpi {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.hud-kpi-lbl {
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}

.hud-kpi-val {
  font-size: 12px;
  color: var(--cyan);
}

.hud-kpi-val.is-gold { color: var(--gold); }
.hud-kpi-val.is-red { color: var(--crimson); }

.hud-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(203, 213, 225, 0.82);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.leg-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
}

.leg-red { background: var(--crimson); box-shadow: 0 0 8px var(--crimson); }
.leg-gold { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.leg-cyan { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

/* Left & Right Deep Telemetry Rails */
.hud-rail {
  position: absolute;
  top: 78px;
  bottom: 84px;
  width: 268px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.hud-rail-left { left: 28px; }
.hud-rail-right { right: 28px; width: 292px; }

.hud-panel {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}

.hud-panel-grow {
  flex: 1 1 auto;
  min-height: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.85);
}

.panel-head-tag {
  color: var(--cyan);
  font-size: 9px;
}

/* Top Ports Bars */
.ports-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.port-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.port-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 10px;
}

.port-name { color: var(--text); }
.port-count { color: var(--text-muted); font-size: 9px; }

.port-bar {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border: none;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
}

.port-bar::-webkit-progress-bar {
  background: rgba(148, 163, 184, 0.14);
  border-radius: 999px;
}

.port-bar::-webkit-progress-value {
  background: linear-gradient(90deg, var(--gold), var(--crimson));
  border-radius: 999px;
}

.port-bar::-moz-progress-bar {
  background: linear-gradient(90deg, var(--gold), var(--crimson));
  border-radius: 999px;
}

/* CISA KEV List */
.kev-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.kev-row {
  width: 100%;
  text-align: left;
  padding: 7px 9px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 5px;
  background: rgba(8, 15, 28, 0.62);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.kev-row:hover {
  border-color: rgba(255, 51, 82, 0.45);
  background: var(--panel-hover);
}

.kev-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  margin-bottom: 2px;
}

.kev-id { color: #fda4af; }
.kev-date { color: var(--text-dim); font-size: 9px; }

.kev-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Forensic Node Inspector */
.insp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.insp-ip {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 0.04em;
}

.insp-badge {
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  border: 1px solid rgba(255, 51, 82, 0.45);
  background: rgba(255, 51, 82, 0.16);
  color: #fda4af;
}

.insp-badge.is-gold {
  border-color: rgba(245, 184, 65, 0.5);
  background: rgba(245, 184, 65, 0.16);
  color: #fde68a;
}

.insp-badge.is-cyan {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.15);
  color: #bae6fd;
}

.insp-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
}

.insp-row {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.insp-key {
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.insp-val {
  color: rgba(226, 232, 240, 0.9);
  line-height: 1.4;
  word-break: break-word;
}

.insp-note {
  font-size: 9.5px;
  color: var(--text-dim);
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding-top: 6px;
}

/* Clickable Live Threat Sources List */
.threat-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  padding-right: 2px;
}

.threat-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: rgba(8, 14, 26, 0.54);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 10px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.threat-row:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: var(--panel-hover);
}

.threat-row.is-selected {
  border-color: rgba(245, 184, 65, 0.55);
  background: rgba(245, 184, 65, 0.1);
}

.threat-left {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.threat-ip { color: #e2e8f0; }

.threat-right {
  color: var(--text-muted);
  font-size: 9px;
  white-space: nowrap;
}

/* =========================================================
   MINIMALIST FOREGROUND / BACKGROUND SWAP BUTTON
   ========================================================= */
.toggle-btn {
  position: fixed;
  left: 50%;
  bottom: 62px;
  transform: translateX(-50%);
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(5, 10, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(235, 242, 252, 0.9);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.11em;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease,
    bottom 0.45s var(--ease);
}

.toggle-btn:hover {
  border-color: rgba(245, 184, 65, 0.58);
  background: rgba(8, 15, 27, 0.88);
  color: #ffffff;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.65),
    0 0 22px rgba(245, 184, 65, 0.16);
  transform: translateX(-50%) translateY(-1px);
}

.view-toggle:focus-visible ~ .toggle-btn {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.toggle-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--crimson);
  box-shadow: 0 0 10px rgba(255, 51, 82, 0.95);
  animation: pulse 2.2s ease-in-out infinite;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.toggle-btn .lbl-on {
  display: none;
}

/* =========================================================
   INVERTED STATE: LIVE TELEMETRY WAR ROOM IN FRONT
   ========================================================= */
.view-toggle:checked ~ .map-stage {
  z-index: 6;
  background:
    radial-gradient(ellipse 92% 76% at 50% 48%, rgba(8, 17, 30, 0.72) 0%, rgba(4, 7, 13, 0.86) 74%, rgba(2, 3, 6, 0.95) 100%);
}

.view-toggle:checked ~ .map-stage #globe-gl,
.view-toggle:checked ~ .map-stage #attack-canvas {
  opacity: 1;
  filter: none;
}

.view-toggle:checked ~ .map-stage #attack-canvas {
  cursor: grab;
  touch-action: none;
}

.view-toggle:checked ~ .map-stage #attack-canvas:active {
  cursor: grabbing;
}

.view-toggle:checked ~ .frost-veil {
  opacity: 0;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

.view-toggle:checked ~ .matte-grain {
  opacity: 0.015;
}

.view-toggle:checked ~ .frame-corners {
  opacity: 0.55;
}

.view-toggle:checked ~ .shell {
  z-index: 1;
  opacity: 0.14;
  filter: blur(7px);
  transform: scale(0.94);
  pointer-events: none;
}

.view-toggle:checked ~ .map-hud {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition:
    opacity 0.6s var(--ease),
    transform 0.7s var(--ease),
    visibility 0s linear 0s;
}

.view-toggle:checked ~ .toggle-btn {
  bottom: 24px;
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(4, 9, 17, 0.88);
}

.view-toggle:checked ~ .toggle-btn .toggle-dot {
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.95);
}

.view-toggle:checked ~ .toggle-btn .lbl-off {
  display: none;
}

.view-toggle:checked ~ .toggle-btn .lbl-on {
  display: inline;
}

/* =========================================================
   CITY TOPOLOGY LAUNCHER (INSPECTOR BUTTON & BOTTOM DOCK)
   ========================================================= */
.insp-topo-btn {
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(245, 184, 65, 0.48);
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(245, 184, 65, 0.16), rgba(245, 184, 65, 0.05));
  color: #fde68a;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.insp-topo-btn:hover {
  border-color: rgba(245, 184, 65, 0.9);
  background: rgba(245, 184, 65, 0.24);
  color: #ffffff;
}

.hud-city-dock-wrap {
  position: absolute;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(5, 9, 16, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
  max-width: calc(100vw - 32px);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.hud-city-dock-wrap::-webkit-scrollbar {
  display: none;
}

.city-dock-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245, 184, 65, 0.85);
  white-space: nowrap;
  padding-left: 4px;
  flex-shrink: 0;
}

.hud-city-dock {
  display: flex;
  align-items: center;
  gap: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hud-city-dock::-webkit-scrollbar {
  display: none;
}

.city-dock-btn {
  flex-shrink: 0;
  padding: 4px 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(12, 18, 30, 0.72);
  color: rgba(226, 232, 240, 0.84);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.city-dock-btn:hover {
  border-color: rgba(245, 184, 65, 0.72);
  background: rgba(245, 184, 65, 0.18);
  color: #ffffff;
}

/* =========================================================
   3D MONOCHROME-OBSIDIAN CITY TOPOLOGY MODAL (COSMOS STYLE)
   ========================================================= */
.topo-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #060709;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.45s var(--ease), visibility 0s linear 0.45s;
}

.topo-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.45s var(--ease), visibility 0s linear 0s;
}

#topo-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#topo-canvas:active {
  cursor: grabbing;
}

#topo-canvas.is-pointer {
  cursor: pointer;
}

.topo-hud-left {
  position: absolute;
  top: 26px;
  left: 28px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.topo-close {
  pointer-events: auto;
  align-self: flex-start;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 4px;
  background: rgba(10, 11, 14, 0.76);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #f1f5f9;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.topo-close:hover {
  border-color: rgba(245, 184, 65, 0.8);
  background: rgba(20, 22, 28, 0.92);
}

.topo-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(90deg, rgba(8, 9, 12, 0.78), rgba(8, 9, 12, 0.1));
  font-family: var(--font-mono);
}

.topo-meta-title {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: #f8fafc;
}

.topo-meta-sub {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  color: rgba(185, 195, 208, 0.72);
}

.topo-meta-ip {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: rgba(245, 184, 65, 0.9);
  margin-top: 2px;
}

/* Exact Cosmos Top-Right Corner Readout (Code + Clock + Golden Ring Gauge) */
.topo-hud-right {
  position: absolute;
  top: 26px;
  right: 32px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  font-family: var(--font-mono);
}

.topo-clock-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: rgba(215, 222, 232, 0.72);
}

.topo-clock-sub {
  font-size: 7.5px;
  letter-spacing: 0.2em;
  color: rgba(160, 170, 184, 0.55);
  margin-top: -6px;
}

.topo-gauge-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topo-gold-ring-svg {
  width: 34px;
  height: 34px;
  transform: rotate(-90deg);
  filter: drop-shadow(0 0 10px rgba(229, 169, 60, 0.36));
}

.topo-ring-track {
  fill: none;
  stroke: rgba(229, 169, 60, 0.22);
  stroke-width: 2;
}

.topo-ring-arc {
  fill: none;
  stroke: #e5a93c;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 87.96;
  transition: stroke-dashoffset 0.55s var(--ease);
}

.topo-node-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-left: 1px solid rgba(229, 169, 60, 0.65);
  background: linear-gradient(90deg, rgba(10, 12, 16, 0.78), rgba(10, 12, 16, 0.14));
  font-family: var(--font-mono);
}

.topo-node-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #ffffff;
}

.topo-node-role {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(229, 169, 60, 0.88);
}

.topo-node-stats {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(186, 198, 214, 0.76);
}

.topo-controls {
  position: absolute;
  right: 28px;
  bottom: 24px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(8, 9, 12, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.topo-ctrl-btn {
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(205, 214, 226, 0.8);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.topo-ctrl-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.topo-ctrl-btn.is-active {
  color: #fde68a;
  border-color: rgba(229, 169, 60, 0.72);
  background: rgba(229, 169, 60, 0.16);
}

.topo-load-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
}

.topo-load-val {
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: rgba(242, 246, 252, 0.92);
}

.topo-load-cap {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: rgba(190, 200, 214, 0.65);
}

/* Bottom City Switcher Strip inside Modal */
.topo-switcher {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(8, 9, 12, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  max-width: calc(100vw - 28px);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.topo-switcher::-webkit-scrollbar {
  display: none;
}

.topo-city-btn {
  flex-shrink: 0;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(190, 200, 214, 0.72);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.topo-city-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
}

.topo-city-btn.is-active {
  color: #ffffff;
  border-color: rgba(229, 169, 60, 0.75);
  background: rgba(229, 169, 60, 0.16);
}

/* =========================================================
   MANDATORY COOKIE & PRIVACY AUTHORIZATION GATE (LGPD/GDPR)
   ========================================================= */
.cookie-manage-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.68);
  cursor: pointer;
  transition: color 0.2s ease;
}

.cookie-manage-btn:hover {
  color: var(--gold);
}

.consent-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 4, 9, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s;
}

.consent-gate.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.35s var(--ease), visibility 0s linear 0s;
}

.consent-card {
  width: 100%;
  max-width: 520px;
  padding: 28px 26px 24px;
  border: 1px solid rgba(245, 184, 65, 0.34);
  border-radius: 12px;
  background: rgba(6, 10, 18, 0.94);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.consent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.consent-tag {
  padding: 3px 8px;
  border: 1px solid rgba(245, 184, 65, 0.4);
  border-radius: 4px;
  background: rgba(245, 184, 65, 0.12);
  font-size: 9px;
}

.consent-card h2 {
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: #f8fafc;
}

.consent-copy {
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--text-muted);
}

.consent-prefs {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(3, 6, 12, 0.72);
}

.consent-prefs.is-open {
  display: flex;
}

.consent-opt {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.consent-opt:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.consent-opt-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.consent-opt-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e2e8f0;
}

.consent-opt-desc {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.consent-opt-lock {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--cyan);
  white-space: nowrap;
  padding-top: 2px;
}

.consent-switch {
  accent-color: #f5b841;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  cursor: pointer;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.consent-btn {
  flex: 1 1 auto;
  padding: 10px 14px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.consent-btn-primary {
  border: 1px solid rgba(245, 184, 65, 0.72);
  background: linear-gradient(135deg, rgba(245, 184, 65, 0.26), rgba(245, 184, 65, 0.1));
  color: #fffbeb;
}

.consent-btn-primary:hover {
  border-color: var(--gold);
  background: rgba(245, 184, 65, 0.34);
}

.consent-btn-secondary {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(12, 18, 30, 0.72);
  color: #e2e8f0;
}

.consent-btn-secondary:hover {
  border-color: rgba(56, 189, 248, 0.55);
  color: #ffffff;
}

.consent-btn-save {
  width: 100%;
  margin-top: 4px;
  border: 1px solid rgba(56, 189, 248, 0.52);
  background: rgba(56, 189, 248, 0.14);
  color: #e0f2fe;
}

.consent-btn-save:hover {
  border-color: var(--cyan);
  background: rgba(56, 189, 248, 0.24);
}

.consent-legal-link {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: rgba(148, 163, 184, 0.72);
  text-decoration: underline;
  text-underline-offset: 3px;
  align-self: flex-start;
  transition: color 0.2s ease;
}

.consent-legal-link:hover {
  color: var(--gold);
}

/* =========================================================
   STATIC LEGAL, PRIVACY & ATTRIBUTION NOTICE PAGE (/legal)
   ========================================================= */
.legal-body {
  overflow-y: auto;
  overflow-x: hidden;
}

.legal-shell {
  position: relative;
  z-index: 5;
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px 72px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.legal-back {
  align-self: flex-start;
  padding: 7px 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 6px;
  background: rgba(6, 10, 18, 0.78);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.legal-back:hover {
  border-color: var(--gold);
  color: #fde68a;
}

.legal-header h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  font-weight: 200;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.legal-header p {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-transform: uppercase;
}

.legal-card {
  padding: 24px 26px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(6, 10, 18, 0.84);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-card h2 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

.legal-card p {
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.72;
  color: var(--text-muted);
}

/* 404 Page */
.error-card {
  position: relative;
  z-index: 5;
  max-width: 440px;
  padding: 40px 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(8, 12, 20, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--crimson);
  margin-bottom: 12px;
}

.error-card h1 {
  font-size: 1.4rem;
  font-weight: 200;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.error-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.error-link {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid rgba(56, 189, 248, 0.5);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(56, 189, 248, 0.12);
}

@media (max-width: 1080px) {
  .hud-rail-left {
    display: none;
  }

  .hud-rail-right {
    width: 260px;
  }

  .topo-controls {
    right: 20px;
    bottom: 78px;
  }
}

@media (max-width: 780px) {
  .hud-rail-right,
  .hud-legend {
    display: none;
  }

  .hud-bar {
    top: 16px;
    left: 16px;
    right: 16px;
  }

  .bottom-mark {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .topo-hud-left {
    top: 16px;
    left: 16px;
    max-width: calc(100vw - 180px);
  }

  .topo-hud-right {
    top: 16px;
    right: 16px;
  }

  .topo-node-card {
    display: none;
  }
}

@media (max-width: 640px) {
  .frame-corners {
    inset: calc(8px + env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom));
  }

  .shell {
    padding: calc(18px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
  }

  .top-mark {
    gap: 10px;
    font-size: 9.5px;
    letter-spacing: 0.1em;
  }

  .top-brand {
    gap: 7px;
    flex-shrink: 0;
  }

  .top-brand img {
    width: 22px;
    height: 22px;
  }

  .live-indicator {
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .hero-center {
    width: 100%;
    min-width: 0;
    padding: 12px 6px 104px;
  }

  .emblem-wrap {
    margin-bottom: 16px;
  }

  .emblem-aura {
    width: 168px;
    height: 168px;
  }

  .emblem {
    width: 108px;
    height: 108px;
  }

  .eyebrow {
    font-size: 9.5px;
    letter-spacing: 0.16em;
    padding: 6px 14px;
    margin-bottom: 16px;
    max-width: 100%;
  }

  .hero-title {
    letter-spacing: 0.1em;
    padding-left: 0.1em;
    gap: 4px;
    margin-bottom: 14px;
    max-width: 100%;
  }

  .title-primary {
    font-size: clamp(2.15rem, 10.5vw, 3.1rem);
  }

  .title-accent {
    font-size: clamp(1.36rem, 6.2vw, 2rem);
  }

  .hero-subtitle {
    max-width: 34ch;
    width: 100%;
    font-size: 0.9rem;
    line-height: 1.62;
    padding: 0 4px;
  }

  .divider {
    margin: 18px auto 0;
  }

  .bottom-mark {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 4px;
    column-gap: 8px;
    font-size: 9.5px;
    letter-spacing: 0.09em;
    line-height: 1.45;
    text-align: center;
    padding: 0 2px;
  }

  .bottom-mark > span:nth-child(4) {
    flex-basis: 100%;
    height: 0;
    overflow: hidden;
    font-size: 0;
  }

  .cookie-manage-btn {
    font-size: 9.5px;
    letter-spacing: 0.09em;
    white-space: nowrap;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
  }

  .toggle-btn {
    bottom: calc(74px + env(safe-area-inset-bottom));
    width: min(calc(100vw - 32px), 348px);
    max-width: calc(100vw - 32px);
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 10px;
    line-height: 1.35;
    letter-spacing: 0.05em;
    white-space: normal;
    text-align: center;
  }

  .view-toggle:checked ~ .toggle-btn {
    bottom: calc(14px + env(safe-area-inset-bottom));
    width: auto;
    max-width: calc(100vw - 24px);
    padding: 9px 16px;
    white-space: nowrap;
  }

  /* Live Attack Monitor HUD on smartphones */
  .hud-bar {
    top: calc(12px + env(safe-area-inset-top));
    left: 12px;
    right: 12px;
    gap: 6px;
  }

  .hud-bar-left {
    width: 100%;
    gap: 6px;
  }

  .hud-bar-left .hud-pill {
    flex: 1 1 auto;
    min-width: 0;
    padding: 5px 9px;
    font-size: 8.5px;
    letter-spacing: 0.08em;
  }

  .hud-bar-left .hud-pill span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .infocon-pill {
    flex-shrink: 0;
    padding: 5px 8px;
    font-size: 8.5px;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  .hud-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 4px;
    padding: 6px 8px;
    text-align: center;
  }

  .hud-kpi {
    align-items: center;
    min-width: 0;
  }

  .hud-kpi-lbl {
    font-size: 7px;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .hud-kpi-val {
    font-size: 11px;
  }

  .hud-bar-right {
    width: 100%;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .hud-legend {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px 8px;
    padding: 5px 8px;
    font-size: 8px;
    letter-spacing: 0.05em;
  }

  .legend-item {
    gap: 4px;
    white-space: nowrap;
  }

  .hud-bar-right .hud-pill {
    flex-shrink: 0;
    padding: 5px 8px;
    font-size: 8.5px;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  .hud-city-dock-wrap {
    bottom: calc(60px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    padding: 7px 10px;
    border-radius: 14px;
    overflow: hidden;
  }

  .city-dock-label {
    font-size: 8px;
    letter-spacing: 0.14em;
    padding-left: 2px;
    text-align: left;
  }

  .hud-city-dock {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    gap: 5px;
    padding: 0 18px 1px 0;
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 88%, transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, #000 88%, transparent 100%);
  }

  .city-dock-btn {
    padding: 5px 10px;
    font-size: 9.5px;
  }

  /* 3D Urban Cyber Topology View on smartphones */
  .topo-hud-left {
    top: calc(12px + env(safe-area-inset-top));
    left: 12px;
    right: 128px;
    max-width: none;
    gap: 6px;
  }

  .topo-close {
    padding: 6px 10px;
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .topo-meta {
    padding: 7px 10px;
    gap: 2px;
  }

  .topo-meta-title {
    font-size: 10.5px;
    letter-spacing: 0.1em;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .topo-meta-sub {
    font-size: 8.5px;
    letter-spacing: 0.08em;
    line-height: 1.3;
  }

  .topo-meta-ip {
    font-size: 8px;
    letter-spacing: 0.06em;
    line-height: 1.35;
  }

  .topo-hud-right {
    top: calc(12px + env(safe-area-inset-top));
    right: 12px;
    gap: 5px;
  }

  .topo-clock-row {
    font-size: 11px;
    gap: 6px;
  }

  .topo-clock-sub {
    font-size: 7px;
    letter-spacing: 0.14em;
    margin-top: -3px;
  }

  .topo-gauge-row {
    gap: 8px;
  }

  .topo-gold-ring-svg {
    width: 28px;
    height: 28px;
  }

  .topo-load-val {
    font-size: 13px;
  }

  .topo-load-cap {
    font-size: 10.5px;
  }

  .topo-controls {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: calc(64px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 24px);
    padding: 5px 8px;
    gap: 4px;
  }

  .topo-ctrl-btn {
    padding: 6px 10px;
    font-size: 9px;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  .topo-switcher {
    bottom: calc(14px + env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    padding: 6px 20px 6px 8px;
    gap: 4px;
    overscroll-behavior-x: contain;
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 90%, transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, #000 90%, transparent 100%);
  }

  .topo-city-btn {
    padding: 6px 10px;
    font-size: 9.5px;
    letter-spacing: 0.1em;
  }

  /* Cookie Consent Dialog on smartphones */
  .consent-gate {
    padding: calc(14px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
    overflow-y: auto;
  }

  .consent-card {
    max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 18px 18px;
    gap: 12px;
  }

  .consent-head {
    flex-wrap: nowrap;
    gap: 8px;
    font-size: 8.5px;
    letter-spacing: 0.1em;
  }

  .consent-tag {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 8px;
    padding: 3px 6px;
  }

  .consent-card h2 {
    font-size: 1.08rem;
    letter-spacing: 0.04em;
  }

  .consent-copy {
    font-size: 0.82rem;
    line-height: 1.55;
  }

  .consent-actions {
    gap: 8px;
  }

  .consent-btn {
    min-height: 40px;
    padding: 10px 12px;
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .consent-btn-primary {
    flex: 1 1 100%;
  }

  .consent-btn-secondary {
    flex: 1 1 calc(50% - 4px);
  }

  .consent-legal-link {
    font-size: 9px;
    line-height: 1.5;
  }

  /* Legal & 404 pages on smartphones */
  .legal-shell {
    padding: calc(28px + env(safe-area-inset-top)) 16px calc(48px + env(safe-area-inset-bottom));
    gap: 18px;
  }

  .legal-card {
    padding: 18px 16px;
  }

  .legal-card code {
    overflow-wrap: anywhere;
  }

  .error-card {
    width: 100%;
    padding: 28px 20px;
  }
}

@media (max-width: 375px) {
  .top-mark {
    font-size: 8.5px;
    letter-spacing: 0.07em;
  }

  .bottom-mark {
    font-size: 8.5px;
    letter-spacing: 0.06em;
    column-gap: 6px;
  }

  .cookie-manage-btn {
    font-size: 8.5px;
    letter-spacing: 0.06em;
  }

  .hud-legend {
    gap: 5px 6px;
    font-size: 7.5px;
  }

  .topo-hud-left {
    right: 118px;
  }

  .topo-ctrl-btn {
    padding: 6px 8px;
    font-size: 8.5px;
  }

  .consent-head {
    font-size: 8px;
    letter-spacing: 0.06em;
  }
}

@media (max-width: 640px) and (max-height: 700px) {
  .hero-center {
    padding: 8px 6px 96px;
  }

  .emblem {
    width: 84px;
    height: 84px;
  }

  .emblem-aura {
    width: 136px;
    height: 136px;
  }

  .emblem-wrap {
    margin-bottom: 12px;
  }

  .eyebrow {
    margin-bottom: 12px;
  }

  .hero-title {
    margin-bottom: 10px;
  }

  .hero-subtitle {
    font-size: 0.84rem;
    line-height: 1.52;
  }

  .divider {
    margin-top: 12px;
  }
}
