/* ═══════════════════════════════════════════════════════════
   DEEP FIELD — Cinematic sci-fi atlas
   Typography: Unbounded (display) · Geist Mono (HUD) · Sora (body)
   Aesthetic: Plasma-contained orbs drifting in a nebula field
   ═══════════════════════════════════════════════════════════ */

:root {
  --ink-0: #03061a;
  --ink-1: #050a26;
  --ink-2: #0a1240;
  --ink-3: #122158;

  --hud: #93EBFE;
  --hud-dim: rgba(147,235,254,0.55);
  --hud-faint: rgba(147,235,254,0.18);
  --hud-line: rgba(147,235,254,0.22);

  --warn: #FFC75E;
  --signal: #5EFFB9;

  --display: 'Unbounded', 'Sora', system-ui, sans-serif;
  --body: 'Sora', system-ui, sans-serif;
  --mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;

  --orb-size: clamp(110px, 14vmin, 150px);
  --orb-size-small: clamp(92px, 12vmin, 122px);
  --raccoon-size: clamp(360px, 52vmin, 560px);

  --pane-w: min(420px, 92vw);

  /* Cinematic easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.83, 0, 0.17, 1);
}

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

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--ink-0);
  color: #e6f3ff;
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
  touch-action: none;
}

body {
  position: fixed;
  inset: 0;
  isolation: isolate;
}

/* ═══════════════════════ BACKGROUND LAYERS ═══════════════════════ */

.scene-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Layered nebula gradients */
.nebula {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  will-change: transform;
}

.nebula-a {
  top: -20%;
  left: -10%;
  width: 75vmax;
  height: 75vmax;
  background: radial-gradient(circle at 40% 40%,
    rgba(95, 60, 220, 0.55) 0%,
    rgba(45, 35, 160, 0.30) 30%,
    rgba(20, 30, 100, 0) 60%);
  animation: nebula-drift-a 60s ease-in-out infinite alternate;
}

.nebula-b {
  bottom: -20%;
  right: -15%;
  width: 80vmax;
  height: 80vmax;
  background: radial-gradient(circle at 60% 50%,
    rgba(255, 90, 150, 0.30) 0%,
    rgba(180, 50, 220, 0.22) 25%,
    rgba(60, 20, 120, 0) 60%);
  animation: nebula-drift-b 80s ease-in-out infinite alternate;
}

.nebula-c {
  top: 20%;
  left: 35%;
  width: 60vmax;
  height: 60vmax;
  background: radial-gradient(circle at 50% 50%,
    rgba(80, 220, 255, 0.20) 0%,
    rgba(40, 120, 200, 0.10) 35%,
    rgba(20, 60, 120, 0) 70%);
  animation: nebula-drift-c 100s ease-in-out infinite alternate;
}

@keyframes nebula-drift-a {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(12vw, 8vh) scale(1.15); }
}
@keyframes nebula-drift-b {
  0%   { transform: translate(0, 0) scale(1.1); }
  100% { transform: translate(-10vw, -10vh) scale(0.95); }
}
@keyframes nebula-drift-c {
  0%   { transform: translate(0, 0) scale(0.95); }
  100% { transform: translate(8vw, -12vh) scale(1.1); }
}

/* Star fields — using radial-gradients of tiny dots */
.stars {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  background-repeat: repeat;
  background-image:
    radial-gradient(1px 1px at 12% 17%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 87% 23%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 47% 67%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1px 1px at 22% 88%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 73% 52%, rgba(220,240,255,1), transparent),
    radial-gradient(1px 1px at 92% 81%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1px 1px at 33% 33%, rgba(255,235,210,0.7), transparent),
    radial-gradient(1px 1px at 58% 12%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 7% 60%, rgba(180,220,255,0.75), transparent),
    radial-gradient(1.5px 1.5px at 67% 78%, rgba(255,255,255,0.85), transparent);
  background-size: 600px 600px;
  animation: twinkle 4s ease-in-out infinite alternate;
}

.stars-far {
  background-size: 400px 400px;
  opacity: 0.45;
  animation-duration: 7s;
}
.stars-mid {
  background-size: 720px 720px;
  opacity: 0.7;
  animation-duration: 4s;
  animation-delay: -1s;
}
.stars-near {
  background-size: 1100px 1100px;
  opacity: 0.95;
  animation-duration: 3s;
  animation-delay: -2s;
}

@keyframes twinkle {
  0%, 100% { opacity: var(--o, 1); }
  50%      { opacity: calc(var(--o, 1) * 0.55); }
}

/* Dust motes drifting */
.dust {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 23% 14%, rgba(180,220,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 67% 84%, rgba(255,200,160,0.35), transparent),
    radial-gradient(2px 2px at 81% 31%, rgba(200,180,255,0.4), transparent),
    radial-gradient(1px 1px at 41% 56%, rgba(255,255,255,0.5), transparent);
  background-size: 900px 900px;
  opacity: 0.6;
}

/* Comet shooting across slowly */
.comet {
  position: absolute;
  top: 25%;
  left: -15%;
  width: 320px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(180,220,255,0.9), rgba(255,255,255,1) 95%, transparent 100%);
  filter: blur(0.6px) drop-shadow(0 0 8px rgba(180,220,255,0.8));
  opacity: 0;
  transform: rotate(15deg) translateX(0);
  animation: comet-pass 24s ease-in infinite;
  animation-delay: 6s;
}

@keyframes comet-pass {
  0%   { opacity: 0; transform: rotate(15deg) translate3d(-30vw, -10vh, 0); }
  4%   { opacity: 1; }
  18%  { opacity: 1; }
  22%  { opacity: 0; transform: rotate(15deg) translate3d(140vw, 60vh, 0); }
  100% { opacity: 0; transform: rotate(15deg) translate3d(140vw, 60vh, 0); }
}

/* Vignette darkens edges */
.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center,
    transparent 30%,
    rgba(3, 6, 26, 0.55) 75%,
    rgba(3, 6, 26, 0.92) 100%);
}

/* Subtle film grain */
.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ═══════════════════════ HUD OVERLAY ═══════════════════════ */

.hud {
  position: fixed;
  z-index: 30;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hud-dim);
  user-select: none;
  -webkit-user-select: none;
}

.hud-tl { top: 22px; left: 22px; }
.hud-tr { top: 22px; right: 22px; text-align: right; }
.hud-bl { bottom: 22px; left: 22px; }
.hud-br { bottom: 22px; right: 22px; text-align: right; }

/* TOP LEFT — brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  color: var(--hud);
  filter: drop-shadow(0 0 8px rgba(147,235,254,0.6));
  animation: brand-spin 22s linear infinite;
}

@keyframes brand-spin { to { transform: rotate(360deg); } }

.brand-name {
  font-family: var(--display);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.18em;
  color: #e6f3ff;
  text-shadow: 0 0 14px rgba(147,235,254,0.45);
}

.brand-sub {
  margin-top: 3px;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--hud);
}

/* TOP RIGHT — clock + coordinates */
.clock {
  font-family: var(--display);
  font-weight: 300;
  font-size: 22px;
  letter-spacing: 0.12em;
  color: #e6f3ff;
  text-shadow: 0 0 12px rgba(147,235,254,0.4);
  font-variant-numeric: tabular-nums;
}

.clock-sub {
  margin-top: 4px;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--hud-dim);
}

.clock-sub [data-mission] {
  color: var(--hud);
}

.coords {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-end;
}

.coords-pair {
  display: inline-flex;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.18em;
}

.coords-pair .ck {
  color: var(--hud-dim);
  width: 24px;
  text-align: right;
}

.coords-pair .cv {
  color: var(--hud);
  font-variant-numeric: tabular-nums;
}

/* BOTTOM LEFT — prompt */
.prompt-row {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border: 1px solid var(--hud-line);
  background: rgba(8, 14, 40, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--hud);
  font-size: 10px;
  letter-spacing: 0.22em;
  position: relative;
}
.prompt-row::before, .prompt-row::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border: 1px solid var(--hud);
}
.prompt-row::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.prompt-row::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.caret {
  color: var(--signal);
  animation: blink 1.4s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0.2; } }

.signal-bar {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 9px;
  letter-spacing: 0.22em;
}

.sig-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 10px var(--signal);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(0.6); opacity: 0.55; }
}

.sig-bars { display: inline-flex; gap: 2px; align-items: end; }
.sig-bars i {
  display: block;
  width: 2px;
  background: var(--hud);
  opacity: 0.85;
}
.sig-bars i:nth-child(1) { height: 4px; }
.sig-bars i:nth-child(2) { height: 6px; }
.sig-bars i:nth-child(3) { height: 9px; }
.sig-bars i:nth-child(4) { height: 12px; opacity: 0.5; }
.sig-bars i:nth-child(5) { height: 15px; opacity: 0.25; }

/* BOTTOM RIGHT — sector */
.sector {
  font-family: var(--display);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.32em;
  color: #e6f3ff;
}

.sector-sub {
  margin-top: 3px;
  font-size: 9px;
  letter-spacing: 0.24em;
  color: var(--hud-dim);
}

.meters {
  margin-top: 10px;
  display: inline-flex;
  gap: 14px;
  justify-content: flex-end;
}

.meter {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.18em;
}

.mk { color: var(--hud-dim); }
.mv { color: var(--hud); font-variant-numeric: tabular-nums; }

/* ═══════════════════════ SCENE ═══════════════════════ */

.scene {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow: hidden;
}

/* ── Orb (energy sphere) ── */

.orb {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--orb-size);
  height: var(--orb-size);
  border-radius: 50%;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
  will-change: transform;
  transition: filter 0.4s ease;
  filter: drop-shadow(0 0 16px color-mix(in oklab, var(--orb-c) 45%, transparent));
}

.orb.is-small {
  width: var(--orb-size-small);
  height: var(--orb-size-small);
}

.orb:hover,
.orb.is-near {
  filter: drop-shadow(0 0 22px color-mix(in oklab, var(--orb-c) 55%, transparent));
}

.orb.is-grabbing {
  cursor: grabbing;
}

.orb-shell {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--orb-c2) 45%, transparent);
  background:
    /* specular highlight top-left */
    radial-gradient(circle at 32% 24%,
      rgba(255,255,255,0.38) 0%,
      rgba(255,255,255,0.10) 18%,
      transparent 36%),
    /* warm rim bottom-right */
    radial-gradient(circle at 70% 76%,
      color-mix(in oklab, var(--orb-c2) 35%, transparent) 0%,
      transparent 42%),
    /* plasma core body — muted */
    radial-gradient(circle at center,
      color-mix(in oklab, var(--orb-c) 45%, #0a1240) 0%,
      color-mix(in oklab, var(--orb-c) 55%, #0a1240) 28%,
      color-mix(in oklab, var(--orb-c) 35%, #050a26) 65%,
      color-mix(in oklab, var(--orb-c) 18%, #03061a) 100%);
  box-shadow:
    inset 0 0 38px color-mix(in oklab, var(--orb-c) 35%, transparent),
    inset 0 0 14px color-mix(in oklab, var(--orb-c2) 40%, transparent),
    0 0 24px color-mix(in oklab, var(--orb-c) 28%, transparent),
    0 0 60px color-mix(in oklab, var(--orb-c) 14%, transparent);
}

/* Inner rotating plasma current */
.orb-shell::before {
  content: '';
  position: absolute;
  inset: -10%;
  background: conic-gradient(from 0deg,
    transparent 0%,
    color-mix(in oklab, var(--orb-c2) 28%, transparent) 12%,
    transparent 24%,
    color-mix(in oklab, var(--orb-c) 20%, transparent) 50%,
    transparent 62%,
    color-mix(in oklab, var(--orb-c2) 16%, transparent) 80%,
    transparent 95%);
  border-radius: 50%;
  animation: plasma-spin 9s linear infinite;
  opacity: 0.35;
  pointer-events: none;
}

@keyframes plasma-spin     { to { transform: rotate(360deg); } }
@keyframes plasma-spin-rev { to { transform: rotate(-360deg); } }

/* Outer hud rings (SVG) */
.orb-rings {
  position: absolute;
  inset: -8%;
  pointer-events: none;
  color: color-mix(in oklab, var(--orb-c2) 70%, white);
  filter: drop-shadow(0 0 4px color-mix(in oklab, var(--orb-c) 60%, transparent));
  animation: plasma-spin 38s linear infinite;
}

.orb-rings svg { width: 100%; height: 100%; display: block; }

.orb-rings .ring-tick {
  stroke: currentColor;
  stroke-width: 1;
  fill: none;
  opacity: 0.6;
}

/* Label */
.orb-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12%;
  text-align: center;
  pointer-events: none;
  text-shadow: 0 0 12px color-mix(in oklab, var(--orb-c) 80%, transparent);
}

.orb-title {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0.04em;
  color: #f0f6ff;
  text-transform: uppercase;
  text-shadow:
    0 0 8px color-mix(in oklab, var(--orb-c) 55%, transparent),
    0 1px 2px rgba(0,0,0,0.55);
}

.orb-title small {
  display: block;
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  opacity: inherit;
  margin-top: 2px;
}

/* X icon orb */
.orb-x .orb-title {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.25;
}
.orb-x-logo {
  display: inline-block;
  width: 1.6em;
  height: 1.6em;
  vertical-align: -0.38em;
  margin-left: 0.25em;
  color: #ffffff;
  filter: drop-shadow(0 0 6px color-mix(in oklab, var(--orb-c) 80%, transparent))
          drop-shadow(0 1px 2px rgba(0,0,0,0.55));
}
.orb-x-logo svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Tap pulse on click */
.orb.is-tapped .orb-shell {
  animation: tap-pulse 0.5s var(--ease-out);
}
@keyframes tap-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}

/* ── Central raccoon ── */

.raccoon {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--raccoon-size);
  height: var(--raccoon-size);
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
  will-change: transform;
}

.raccoon.is-grabbing { cursor: grabbing; }

.raccoon-img {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  object-fit: contain;
  animation: raccoon-bob 4.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes raccoon-bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-4px) rotate(1deg); }
}

.raccoon-tag {
  position: absolute;
  bottom: -6%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.32em;
  color: var(--hud);
  background: rgba(8, 14, 40, 0.6);
  border: 1px solid var(--hud-line);
  padding: 4px 12px;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.raccoon-tag::before, .raccoon-tag::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 18px;
  height: 1px;
  background: var(--hud-line);
}
.raccoon-tag::before { right: 100%; margin-right: 6px; }
.raccoon-tag::after  { left: 100%;  margin-left: 6px; }

/* Connecting hairlines from raccoon to other orbs are decorative -- not implemented */

/* ═══════════════════════ HOLOGRAM PANE ═══════════════════════ */

.hologram-host {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.hologram-host.is-open {
  pointer-events: auto;
}

.hologram-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 26, 0.55);
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.hologram-host.is-open .hologram-backdrop { opacity: 1; }

.pane {
  position: relative;
  width: var(--pane-w);
  max-height: calc(100vh - 80px);
  background:
    linear-gradient(180deg,
      rgba(15, 22, 60, 0.85) 0%,
      rgba(8, 12, 40, 0.92) 100%);
  border: 1px solid color-mix(in oklab, var(--pane-c, var(--hud)) 50%, transparent);
  color: #e6f3ff;
  font-family: var(--body);
  overflow: hidden;
  transform: scale(0.85) translateY(20px);
  opacity: 0;
  transition: transform 0.55s var(--ease-out), opacity 0.45s var(--ease-out);
  box-shadow:
    inset 0 0 60px color-mix(in oklab, var(--pane-c, var(--hud)) 18%, transparent),
    0 0 60px color-mix(in oklab, var(--pane-c, var(--hud)) 35%, transparent),
    0 30px 80px rgba(0,0,0,0.55);
}

.hologram-host.is-open .pane {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Corner brackets */
.pane::before, .pane::after,
.pane > .pane-corner-tl, .pane > .pane-corner-tr,
.pane > .pane-corner-bl, .pane > .pane-corner-br {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid color-mix(in oklab, var(--pane-c, var(--hud)) 90%, white);
  content: '';
}
.pane::before               { top: -1px; left: -1px;  border-right: none; border-bottom: none; }
.pane::after                { top: -1px; right: -1px; border-left: none;  border-bottom: none; }
.pane > .pane-corner-bl     { bottom: -1px; left: -1px;  border-right: none; border-top: none; }
.pane > .pane-corner-br     { bottom: -1px; right: -1px; border-left: none;  border-top: none; }

/* Pane header */
.pane-head {
  position: relative;
  padding: 20px 22px 14px;
  border-bottom: 1px solid color-mix(in oklab, var(--pane-c, var(--hud)) 30%, transparent);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.pane-head-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 24%, rgba(255,255,255,0.55), transparent 30%),
    radial-gradient(circle at center, color-mix(in oklab, var(--pane-c) 28%, rgba(8,12,40,0.6)), color-mix(in oklab, var(--pane-c) 22%, rgba(8,12,40,0.85)) 100%);
  border: 1px solid color-mix(in oklab, var(--pane-c) 60%, transparent);
  box-shadow:
    inset 0 0 12px color-mix(in oklab, var(--pane-c) 50%, transparent),
    0 0 18px color-mix(in oklab, var(--pane-c) 50%, transparent);
}

.pane-head-text {
  flex: 1 1 auto;
  min-width: 0;
}

.pane-id {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--pane-c) 80%, white);
  opacity: 0.85;
  margin-bottom: 4px;
}

.pane-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1.15;
  text-shadow: 0 0 14px color-mix(in oklab, var(--pane-c) 70%, transparent);
}

.pane-sub {
  margin-top: 8px;
  font-family: var(--body);
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(220, 235, 255, 0.7);
}

.pane-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: color-mix(in oklab, var(--pane-c) 90%, white);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.pane-close:hover {
  background: transparent;
  color: #fff;
  transform: rotate(90deg);
}

/* Pane body */
.pane-body {
  padding: 14px 22px 22px;
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in oklab, var(--pane-c) 60%, transparent) transparent;
}

.pane-body::-webkit-scrollbar { width: 6px; }
.pane-body::-webkit-scrollbar-thumb {
  background: color-mix(in oklab, var(--pane-c) 50%, transparent);
}

.pane-section {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--hud-dim);
  text-transform: uppercase;
  margin: 8px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pane-section::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, color-mix(in oklab, var(--pane-c) 30%, transparent), transparent);
}

.pane-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pane-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 12px 6px;
  background: rgba(20, 30, 70, 0.35);
  border: 1px solid transparent;
  color: #e6f3ff;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, padding-left 0.2s ease;
  position: relative;
}

.pane-link:hover {
  background: rgba(40, 60, 130, 0.5);
  border-color: color-mix(in oklab, var(--pane-c) 60%, transparent);
}

.pane-link.is-static,
.pane-link.is-static:hover {
  cursor: default;
  background: rgba(20, 30, 70, 0.35);
  border-color: transparent;
}

.pane-link-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: color-mix(in oklab, var(--pane-c) 75%, white);
  flex: 0 0 28px;
}

.pane-link-text {
  flex: 1 1 auto;
  min-width: 0;
}

.pane-link-title {
  font-family: var(--body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #fff;
}

.pane-link-desc {
  margin-top: 2px;
  font-size: 11.5px;
  color: rgba(220, 235, 255, 0.6);
  line-height: 1.4;
}

.pane-link-arrow {
  flex: 0 0 auto;
  color: color-mix(in oklab, var(--pane-c) 80%, white);
  font-family: var(--mono);
  font-size: 14px;
  transition: transform 0.2s ease;
}

.pane-link:hover .pane-link-arrow {
  transform: none;
}

/* Scan line over pane */
.pane-body::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom,
    transparent 0%,
    color-mix(in oklab, var(--pane-c) 10%, transparent) 50%,
    transparent 100%);
  animation: pane-scan 6s linear infinite;
  pointer-events: none;
}

@keyframes pane-scan {
  0%   { top: -10%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 110%; opacity: 0; }
}

/* ═══════════════════════ INTRO CURTAIN ═══════════════════════ */

.intro-curtain {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--ink-0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  transition: opacity 0.8s var(--ease-out) 0.2s, visibility 0.8s 1s;
}

.intro-curtain.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 1px solid var(--hud-line);
  border-top-color: var(--hud);
  animation: intro-spin 1s linear infinite;
  box-shadow:
    0 0 20px rgba(147,235,254,0.3),
    inset 0 0 20px rgba(147,235,254,0.2);
}

@keyframes intro-spin { to { transform: rotate(360deg); } }

.intro-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--hud);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.intro-progress {
  display: block;
  width: 180px;
  height: 2px;
  background: var(--hud-line);
  overflow: hidden;
}

.intro-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--hud);
  box-shadow: 0 0 10px var(--hud);
  animation: intro-fill 1s var(--ease-out) forwards;
}

@keyframes intro-fill {
  to { width: 100%; }
}

/* ═══════════════════════ RESPONSIVE ═══════════════════════ */

@media (max-width: 720px) {
  :root {
    --orb-size: 100px;
    --orb-size-small: 86px;
    --raccoon-size: 340px;
  }

  .hud-tl, .hud-tr, .hud-bl, .hud-br {
    top: 14px; bottom: 14px; left: 14px; right: 14px;
  }
  .hud-tl { right: auto; bottom: auto; }
  .hud-tr { left: auto; bottom: auto; }
  .hud-bl { right: auto; top: auto; }
  .hud-br { left: auto; top: auto; }

  .brand-name { font-size: 12px; letter-spacing: 0.14em; }
  .brand-sub { font-size: 8px; }
  .brand-mark { width: 24px; height: 24px; }

  .clock { font-size: 16px; }
  .clock-sub { font-size: 8px; }
  .coords-pair { font-size: 9px; }
  .coords { margin-top: 0; }

  .prompt-row { padding: 6px 10px; font-size: 9px; letter-spacing: 0.18em; }
  .signal-bar { font-size: 8px; margin-top: 6px; }

  .sector { font-size: 11px; letter-spacing: 0.24em; }
  .sector-sub { font-size: 8px; }
  .meters { gap: 10px; margin-top: 6px; }
  .meter { font-size: 9px; }

  .orb-title { font-size: 10px; line-height: 1.15; }
  .orb-x .orb-title { font-size: 9px; }

  .raccoon-tag { font-size: 8px; letter-spacing: 0.24em; padding: 3px 8px; }
}

@media (max-width: 380px) {
  :root {
    --orb-size: 86px;
    --orb-size-small: 76px;
    --raccoon-size: 280px;
  }
  .orb-title { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}
