:root {
  --bg: #07131c;
  --bg-soft: rgba(8, 25, 36, 0.82);
  --panel-border: rgba(152, 211, 242, 0.18);
  --panel-shadow: rgba(1, 10, 15, 0.52);
  --text: #e4f3ef;
  --muted: #91aeb6;
  --accent: #f2b84b;
  --signal: #7dddc3;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --keyboard-offset: 0px;
  --app-fixed-height: 100lvh;
  --surface-title-font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --surface-body-font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --surface-title-size: 0.74rem;
  --surface-full-title-size: 0.88rem;
  --surface-body-size: 0.76rem;
  --surface-title-weight: 600;
  --surface-full-title-weight: 700;
  --surface-body-weight: 400;
  --surface-font-style: normal;
  --surface-text-transform: none;
  --surface-title-spacing: 0.035em;
  --surface-full-title-spacing: 0.02em;
  --surface-body-line-height: 1.5;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  min-height: 100%;
  touch-action: pan-x pan-y;
}

html {
  overscroll-behavior: none;
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at 18% 18%, rgba(32, 109, 140, 0.3), transparent 36%),
    radial-gradient(circle at 82% 22%, rgba(242, 184, 75, 0.18), transparent 28%),
    radial-gradient(circle at 50% 88%, rgba(40, 103, 84, 0.18), transparent 32%),
    linear-gradient(180deg, #0a1821 0%, #07131c 54%, #040b10 100%);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-text-size-adjust: 100%;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(157, 211, 242, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(157, 211, 242, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black 36%, transparent 85%);
  opacity: 0.28;
}

.app-shell {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: var(--app-fixed-height);
  min-height: var(--app-fixed-height);
  overflow: hidden;
}

.stage {
  position: relative;
  flex: 1;
  height: 100%;
  min-height: 100%;
  background:
    radial-gradient(circle at center, rgba(18, 55, 69, 0.35), transparent 48%),
    linear-gradient(180deg, rgba(6, 14, 19, 0.76), rgba(4, 9, 13, 0.92));
  overflow: hidden;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  border: 1px solid rgba(242, 184, 75, 0.08);
  filter: blur(0.2px);
  pointer-events: none;
}

.scene-host {
  position: absolute;
  inset: 0;
  touch-action: none;
}

.scene-host canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.graph-overlay,
.link-overlay,
.surface-hud-overlay,
.surface-overlay,
.target-assist-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  touch-action: none;
}

.graph-overlay {
  overflow: hidden;
}

.link-overlay {
  z-index: 1;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 18px rgba(72, 160, 194, 0.12));
}

.graph-link {
  stroke: rgba(136, 175, 189, 0.52);
  stroke-linecap: round;
}

.surface-overlay {
  z-index: 4;
  isolation: isolate;
}

.target-assist-overlay {
  z-index: 2;
  overflow: hidden;
  isolation: isolate;
  opacity: 0;
  transition: opacity 180ms ease;
}

.surface-hud-overlay {
  z-index: 3;
  isolation: isolate;
}

.target-assist-overlay.is-visible {
  opacity: 1;
}

.target-assist-overlay__svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter:
    drop-shadow(0 0 10px rgba(247, 207, 119, 0.16))
    drop-shadow(0 0 26px rgba(247, 207, 119, 0.06));
}

.target-assist-overlay__anchor {
  --assist-size: 44px;
  --assist-angle: 0deg;
  --assist-accent-rgb: 125, 221, 195;
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  opacity: 0;
  transition: opacity 140ms ease;
}

.target-assist-overlay__anchor.is-visible {
  opacity: 1;
}

.target-assist__reticle,
.target-assist__sweep,
.target-assist__core,
.target-assist__panel {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

.target-assist__reticle {
  width: var(--assist-size);
  height: var(--assist-size);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(var(--assist-angle));
  border: 1px solid rgba(247, 207, 119, 0.76);
  background: radial-gradient(circle at center, rgba(247, 207, 119, 0.08), transparent 70%);
  box-shadow: 0 0 14px rgba(247, 207, 119, 0.2);
}

.target-assist__reticle::before,
.target-assist__reticle::after,
.target-assist__core::before,
.target-assist__core::after {
  content: "";
  position: absolute;
}

.target-assist__reticle::before {
  inset: -24%;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 48.5%, rgba(247, 207, 119, 0.8) 49.5%, rgba(247, 207, 119, 0.8) 50.5%, transparent 51.5%),
    linear-gradient(180deg, transparent 48.5%, rgba(247, 207, 119, 0.8) 49.5%, rgba(247, 207, 119, 0.8) 50.5%, transparent 51.5%);
  mask-image: radial-gradient(circle at center, transparent 20%, black 22%, black 78%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at center, transparent 20%, black 22%, black 78%, transparent 80%);
  opacity: 0.84;
}

.target-assist__reticle::after {
  inset: 12%;
  border-radius: inherit;
  border: 1px dashed rgba(255, 244, 217, 0.58);
  opacity: 0.9;
}

.target-assist__sweep {
  width: calc(var(--assist-size) * 1.38);
  height: calc(var(--assist-size) * 1.38);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    conic-gradient(
      from 180deg,
      rgba(247, 207, 119, 0.28) 0deg 18deg,
      rgba(247, 207, 119, 0.06) 18deg 46deg,
      transparent 46deg 238deg,
      rgba(var(--assist-accent-rgb), 0.12) 238deg 268deg,
      transparent 262deg 360deg
    );
  filter: blur(10px);
  opacity: 0.62;
  animation: target-assist-sweep 3.2s linear infinite;
}

.target-assist__core {
  width: calc(var(--assist-size) * 0.16);
  height: calc(var(--assist-size) * 0.16);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 248, 226, 0.9);
  background:
    radial-gradient(circle at center, rgba(255, 250, 238, 0.92) 0 22%, rgba(247, 207, 119, 0.36) 42%, transparent 78%);
  box-shadow: 0 0 12px rgba(247, 207, 119, 0.22);
}

.target-assist__core::before {
  left: 50%;
  top: -128%;
  width: 1px;
  height: 356%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(255, 244, 217, 0.84) 28%, rgba(255, 244, 217, 0.84) 72%, transparent);
}

.target-assist__core::after {
  left: -128%;
  top: 50%;
  width: 356%;
  height: 1px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, rgba(255, 244, 217, 0.84) 28%, rgba(255, 244, 217, 0.84) 72%, transparent);
}

.target-assist__panel {
  display: none;
}

.target-assist__scope-arc {
  fill: none;
  stroke: rgba(247, 207, 119, 0.08);
  stroke-width: 1.5;
}

.target-assist__frame-ring {
  fill: none;
  stroke: rgba(247, 207, 119, 0.74);
  stroke-width: 2;
  stroke-linecap: round;
}

.target-assist__frame-arc {
  fill: none;
  stroke: rgba(247, 207, 119, 0.48);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.target-assist__frame-ticks,
.target-assist__frame-bracket,
.target-assist__frame-module {
  fill: none;
  stroke: rgba(247, 207, 119, 0.84);
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.target-assist__frame-axis {
  stroke: rgba(247, 207, 119, 0.82);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.target-assist__desired-marker {
  fill: rgba(247, 207, 119, 0.08);
  stroke: rgba(255, 244, 217, 0.96);
  stroke-width: 1.3;
  display: none;
}

.target-assist__trajectory {
  fill: none;
  stroke: rgba(247, 207, 119, 0.82);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 14 10;
  display: none;
}

.target-assist__lead-line {
  stroke: rgba(247, 207, 119, 0.5);
  stroke-width: 1.6;
  stroke-dasharray: 7 8;
  display: none;
}

.target-assist__lead-ring {
  fill: rgba(247, 207, 119, 0.04);
  stroke: rgba(255, 245, 220, 0.9);
  stroke-width: 1.5;
  display: none;
}

.target-assist__marker {
  fill: rgba(247, 207, 119, 0.32);
  stroke: rgba(255, 245, 220, 0.82);
  stroke-width: 1.2;
  display: none;
}

.target-assist-overlay__anchor[data-phase="releasing"] .target-assist__reticle {
  border-color: rgba(255, 229, 162, 0.66);
  opacity: 0.88;
}

.target-assist-overlay__anchor[data-phase="transit"] .target-assist__reticle {
  border-color: rgba(255, 244, 217, 0.96);
}

.target-assist-overlay__anchor[data-phase="transit"] .target-assist__sweep {
  animation-duration: 1.4s;
  opacity: 0.82;
}

.target-assist-overlay__anchor[data-phase="locking"] .target-assist__reticle,
.target-assist-overlay__anchor[data-phase="tracking"] .target-assist__reticle {
  border-color: rgba(247, 207, 119, 0.94);
}

.target-assist-overlay__anchor[data-phase="locking"] .target-assist__sweep {
  animation-duration: 1.8s;
}

@keyframes target-assist-sweep {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.node-engagement-marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 4rem;
  height: 4rem;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 120ms linear, transform 120ms linear;
  will-change: transform, opacity;
}

.node-engagement-marker__svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.node-engagement-marker__ring,
.node-engagement-marker__crosshair {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.node-engagement-marker.is-targeted-marker .node-engagement-marker__ring--outer {
  stroke: rgba(247, 207, 119, 0.74);
  stroke-width: 1.4;
  filter: drop-shadow(0 0 8px rgba(247, 207, 119, 0.16));
}

.node-engagement-marker.is-targeted-marker .node-engagement-marker__ring--inner {
  stroke: rgba(255, 245, 220, 0.46);
  stroke-width: 1;
  stroke-dasharray: 5 5;
}

.node-engagement-marker.is-targeted-marker .node-engagement-marker__crosshair {
  stroke: rgba(247, 207, 119, 0.62);
  stroke-width: 1;
}

.node-engagement-marker.is-focused-marker .node-engagement-marker__ring--outer {
  stroke: rgba(247, 207, 119, 0.42);
  stroke-width: 1.6;
  filter: drop-shadow(0 0 10px rgba(247, 207, 119, 0.12));
}

.node-engagement-marker.is-focused-marker .node-engagement-marker__ring--inner {
  stroke: rgba(247, 207, 119, 0.24);
  stroke-width: 1.2;
}

.node-engagement-marker.is-focused-marker .node-engagement-marker__crosshair {
  stroke: rgba(247, 207, 119, 0.28);
  stroke-width: 1;
}

.focus-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(18vw, 12rem);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px solid rgba(247, 207, 119, 0.92);
  background: radial-gradient(circle at center, transparent 59%, rgba(247, 221, 156, 0.14) 65%, transparent 73%);
  box-shadow:
    0 0 0 1px rgba(255, 238, 195, 0.08),
    0 0 14px rgba(255, 228, 157, 0.12),
    0 0 42px rgba(242, 184, 75, 0.16),
    inset 0 0 26px rgba(242, 184, 75, 0.12);
  pointer-events: none;
  filter: saturate(115%);
}

.focus-ring::before,
.focus-ring::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.focus-ring::before {
  inset: -14%;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, transparent 55%, rgba(255, 225, 145, 0.22) 61%, rgba(242, 184, 75, 0.08) 69%, transparent 79%);
  filter: blur(12px);
  opacity: 0.7;
}

.focus-ring::after {
  left: 50%;
  top: 50%;
  width: 150%;
  height: 184%;
  transform: translate(-50%, -10%);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 22%, rgba(247, 206, 111, 0.16) 0%, rgba(247, 206, 111, 0.08) 18%, rgba(242, 184, 75, 0.04) 36%, transparent 66%);
  filter: blur(20px);
  opacity: 0.42;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.72) 26%, rgba(0, 0, 0, 0.2) 58%, transparent 86%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.72) 26%, rgba(0, 0, 0, 0.2) 58%, transparent 86%);
}

.node-surface {
  --surface-density: 1;
  --node-accent: #96b6bf;
  --node-accent-rgba: rgba(150, 182, 191, 0.72);
  --surface-title-color: rgba(228, 243, 239, 0.96);
  --surface-body-color: var(--muted);
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(150, 182, 191, 0.22);
  border-radius: 1.05rem;
  background:
    linear-gradient(180deg, rgba(7, 18, 25, calc(0.68 + (var(--surface-density) * 0.14))), rgba(5, 14, 20, calc(0.82 + (var(--surface-density) * 0.08))));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 18px 48px -28px rgba(0, 0, 0, 0.8),
    0 0 26px -18px var(--node-accent-rgba);
  backdrop-filter: blur(12px);
  contain: layout paint style;
  transform-origin: center;
  opacity: 0;
  transition: opacity 120ms linear, transform 120ms linear, box-shadow 140ms ease;
  will-change: transform, opacity;
  overflow: hidden;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: 100% 100%;
  mask-composite: intersect;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: 100% 100%;
  -webkit-mask-composite: source-in;
}

.node-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 42%);
  opacity: var(--surface-gloss-opacity, 0.65);
}

.node-surface__drag-handle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(4.5rem, calc(100% - 1.2rem));
  height: 1rem;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  touch-action: none;
  background: transparent;
  border: 0;
  transform:
    translate(
      calc(-50% + var(--drag-handle-shift-x, 0px)),
      calc(-50% + var(--drag-handle-shift-y, 0px))
    )
    rotate(var(--drag-axis-angle, 0deg))
    scale(0.94);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.node-surface__drag-handle::before,
.node-surface__drag-handle::after {
  content: none;
}

.node-surface.is-visible {
  align-items: center;
  justify-content: center;
  padding: 0.85rem;
  border-radius: 1rem;
}

.node-surface.is-full {
  min-width: 12rem;
  min-height: 0;
  border-radius: 1.2rem;
  padding: 0.95rem 1rem 0.85rem;
}

.node-surface.is-highlighted,
.node-surface.is-targeted,
.node-surface.is-focused,
.node-surface.is-locked {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 20px 54px -30px rgba(0, 0, 0, 0.86),
    0 0 38px -16px var(--node-accent-rgba);
}

.node-surface.is-targeted {
  border-color: rgba(242, 184, 75, 0.34);
}

.node-surface.is-focused {
  border-color: rgba(125, 221, 195, 0.32);
}

.node-surface.is-draggable {
  cursor: grab;
}

.node-surface.is-draggable .node-surface__drag-handle {
  opacity: 0;
  pointer-events: auto;
}

.node-surface.is-dragging {
  cursor: grabbing;
}

.node-surface.is-dragging .node-surface__drag-handle {
  transform:
    translate(
      calc(-50% + var(--drag-handle-shift-x, 0px)),
      calc(-50% + var(--drag-handle-shift-y, 0px))
    )
    rotate(var(--drag-axis-angle, 0deg))
    scale(calc(0.97 + (var(--drag-progress, 0) * 0.08)));
}

.node-surface-drag-affordance {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 120ms linear, transform 120ms linear, filter 120ms ease;
  will-change: transform, opacity;
}

.node-surface-drag-affordance__svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.node-surface-drag-affordance__axis,
.node-surface-drag-affordance__handle,
.node-surface-drag-affordance__chevron {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.node-surface-drag-affordance__axis {
  stroke: rgba(247, 207, 119, 0.56);
  stroke-width: 2;
}

.node-surface-drag-affordance__handle {
  stroke: rgba(247, 207, 119, 0.34);
  stroke-width: 1.1;
}

.node-surface-drag-affordance__chevron {
  stroke: rgba(255, 244, 217, 0.92);
  stroke-width: 2;
}

.node-surface.is-locked {
  border-color: rgba(255, 255, 255, 0.2);
}

.node-surface__title {
  position: relative;
  overflow: hidden;
  color: var(--surface-title-color);
  font-family: var(--surface-title-font);
  font-size: var(--surface-title-size);
  font-style: var(--surface-font-style);
  font-weight: var(--surface-title-weight);
  letter-spacing: var(--surface-title-spacing);
  line-height: 1.35;
  text-align: center;
  text-transform: var(--surface-text-transform);
  text-wrap: balance;
}

.node-surface.is-full .node-surface__title {
  text-align: left;
  font-size: var(--surface-full-title-size);
  font-weight: var(--surface-full-title-weight);
  letter-spacing: var(--surface-full-title-spacing);
}

.node-surface__body {
  position: relative;
  display: block;
  flex: 0 1 auto;
  color: var(--surface-body-color);
  font-family: var(--surface-body-font);
  font-size: var(--surface-body-size);
  font-style: var(--surface-font-style);
  font-weight: var(--surface-body-weight);
  line-height: var(--surface-body-line-height);
  overflow-y: auto;
  white-space: pre-wrap;
  min-height: 0;
  padding-right: 0.15rem;
  overscroll-behavior: contain;
  pointer-events: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(239, 236, 229, 0.42) rgba(7, 18, 25, 0.14);
}

.node-surface.is-full .node-surface__body {
  flex: 1 1 auto;
  pointer-events: auto;
  touch-action: pan-y;
  padding-top: 1rem;
}

.node-surface__body::-webkit-scrollbar {
  width: 0.34rem;
}

.node-surface__body::-webkit-scrollbar-track {
  margin-block: 0.28rem;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, rgba(7, 18, 25, 0.1), rgba(5, 14, 20, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.025);
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.14),
    0 0 12px -6px rgba(255, 244, 217, 0.08),
    0 0 22px -8px var(--node-accent-rgba);
}

.node-surface__body::-webkit-scrollbar-thumb {
  min-height: 2.4rem;
  border-radius: 999px;
  border: 0.06rem solid transparent;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02)),
    linear-gradient(180deg, rgba(244, 210, 132, 0.4), color-mix(in srgb, var(--node-accent-rgba) 68%, rgba(255, 255, 255, 0.08)));
  background-clip: padding-box;
  box-shadow:
    inset 0 0 10px rgba(255, 255, 255, 0.04),
    0 0 8px 1px rgba(255, 240, 204, 0.1),
    0 0 18px 0 rgba(244, 210, 132, 0.1),
    0 0 24px -1px var(--node-accent-rgba);
}

.node-surface__body::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.03)),
    linear-gradient(180deg, rgba(249, 220, 152, 0.5), color-mix(in srgb, var(--node-accent-rgba) 74%, rgba(255, 255, 255, 0.14)));
}

.node-surface__body::-webkit-scrollbar-thumb:active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02)),
    linear-gradient(180deg, rgba(244, 210, 132, 0.56), rgba(255, 255, 255, 0.22));
}

.node-surface__body::-webkit-scrollbar-corner {
  background: transparent;
}

.dg.ac {
  z-index: 60 !important;
  margin-top: 0.75rem !important;
  margin-right: 0.75rem !important;
}

.dg.main {
  border-radius: 0.8rem;
  overflow: hidden;
  box-shadow: 0 22px 50px -32px rgba(0, 0, 0, 0.8);
}

@media (max-width: 720px) {
  .dg.ac {
    margin-top: max(0.5rem, var(--safe-top)) !important;
    margin-right: max(0.5rem, var(--safe-right)) !important;
  }

  .dg.main {
    width: min(calc(100vw - 1rem), 18rem) !important;
    max-width: min(calc(100vw - 1rem), 18rem);
    max-height: min(70dvh, 32rem);
    overflow: auto;
  }

  .stage::before {
    inset: 9%;
  }

  .target-assist__panel {
    min-width: 8.6rem;
    max-width: min(11.5rem, calc(100vw - 1.25rem));
    padding: 0.5rem 0.62rem 0.56rem;
  }

  .target-assist__eyebrow {
    font-size: 0.54rem;
    letter-spacing: 0.14em;
  }

  .target-assist__title {
    font-size: 0.74rem;
  }

  .target-assist__stats {
    font-size: 0.58rem;
  }

  .node-surface {
    padding: 0.72rem 0.8rem;
  }

  .node-surface__title {
    font-size: calc(var(--surface-title-size) * 0.92);
  }

  .node-surface.is-full .node-surface__title {
    font-size: calc(var(--surface-full-title-size) * 0.93);
  }

  .node-surface__body {
    font-size: calc(var(--surface-body-size) * 0.95);
  }
}

.graph-search-bar {
  position: fixed;
  left: max(12px, calc(var(--safe-left) + 12px));
  right: max(12px, calc(var(--safe-right) + 12px));
  bottom: calc(max(12px, calc(var(--safe-bottom) + 12px)) + var(--keyboard-offset));
  z-index: 20;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(140, 202, 231, 0.22);
  border-radius: 14px;
  background: rgba(5, 17, 26, 0.84);
  backdrop-filter: blur(10px);
}

.graph-search-bar__input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(140, 202, 231, 0.28);
  border-radius: 10px;
  background: rgba(4, 13, 20, 0.92);
  color: var(--text);
  padding: 10px 12px;
  font-size: 0.92rem;
}

.graph-search-bar__button {
  border: 1px solid rgba(140, 202, 231, 0.26);
  background: rgba(8, 24, 36, 0.9);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 600;
}

.graph-search-bar__button--accent {
  border-color: rgba(242, 184, 75, 0.42);
  color: #ffd88d;
}

.graph-search-bar__button--ghost {
  background: rgba(13, 31, 45, 0.86);
}

.synthetic-editor-surface {
  position: absolute;
  left: 50%;
  top: 14%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 2rem));
  min-height: 180px;
  max-height: min(52dvh, 380px);
  z-index: 35;
  pointer-events: auto;
  border-radius: 1.05rem;
  border: 1px solid rgba(242, 184, 75, 0.44);
  background:
    linear-gradient(180deg, rgba(8, 24, 36, 0.94), rgba(4, 14, 22, 0.96));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 18px 48px -28px rgba(0, 0, 0, 0.8),
    0 0 26px -18px rgba(242, 184, 75, 0.62);
  display: flex;
  flex-direction: column;
  padding: 0.85rem;
  gap: 0.6rem;
}

.synthetic-editor-surface__hint {
  color: rgba(255, 216, 141, 0.92);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.synthetic-editor-surface__input {
  width: 100%;
  min-height: 138px;
  flex: 1;
  resize: vertical;
  border: 1px solid rgba(140, 202, 231, 0.26);
  border-radius: 0.85rem;
  background: rgba(4, 13, 20, 0.92);
  color: var(--text);
  padding: 0.72rem 0.82rem;
  font-family: var(--surface-body-font);
  font-size: 0.92rem;
  line-height: 1.42;
  outline: none;
}

.synthetic-editor-surface__input:focus-visible {
  border-color: rgba(242, 184, 75, 0.65);
  box-shadow: 0 0 0 2px rgba(242, 184, 75, 0.24);
}
