:root {
  --bg: #0c0a09;
  --panel: rgba(21, 17, 15, 0.92);
  --ink: #f6efe6;
  --muted: #a4978b;
  --line: rgba(246, 239, 230, 0.11);
  --accent: #ff5722;
  --accent-mid: #ff7849;
  --accent-soft: #ffa477;
  --accent-deep: #c63b10;
  --accent-dim: rgba(255, 87, 34, 0.15);
  --ok: #34d399;
  --ok-dim: rgba(52, 211, 153, 0.13);
  --warn: #f59e0b;
  --warn-dim: rgba(245, 158, 11, 0.14);
  --bad: #f87171;
  --bad-dim: rgba(248, 113, 113, 0.14);
  --font-display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --ease: cubic-bezier(0.2, 0.9, 0.28, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#bg-stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hidden { display: none !important; }

/* AUTH GATE */
.auth-gate {
  position: relative;
  z-index: 50;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-card {
  width: min(460px, 100%);
  padding: 32px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border-color: rgba(255, 87, 34, 0.35);
}
.auth-card h2 { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.auth-card p { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.auth-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

/* TOPBAR + CORE/TOOLS SWITCHER */
.tools-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 24px;
  background: rgba(7, 9, 11, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 152, 56, 0.18);
  transition: border-color 0.22s ease;
  flex-wrap: wrap;
}
.brand-wrap {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
}
.brand-orb {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: linear-gradient(135deg, #ff7849, #ff5722 60%, #c63b10);
  color: #fff8f2;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  display: grid;
  place-items: center;
  box-shadow: 0 0 18px rgba(255, 87, 34, 0.42);
  transition: background 0.22s ease, box-shadow 0.22s ease;
}
.brand-title { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; letter-spacing: 0.01em; }
.brand-sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.04em; }

.app-switcher {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 8px;
  background: rgba(238, 241, 237, 0.04);
  border: 1px solid var(--line);
  gap: 3px;
}
.switch-pill {
  padding: 5px 13px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.16s, color 0.16s;
}
.switch-pill:hover { color: var(--ink); }
.switch-pill.active {
  background: var(--accent);
  color: #0a0907;
  box-shadow: 0 2px 14px rgba(255, 138, 52, 0.34);
}

.top-actions { display: flex; align-items: center; gap: 8px; }

/* PILLS & BUTTONS */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}
.pill-accent { background: var(--accent-dim); color: var(--accent-soft); border-color: rgba(255, 138, 52, 0.36); }
.pill-ok { background: var(--ok-dim); color: var(--ok); border-color: rgba(57, 255, 136, 0.34); }
.pill-warn { background: var(--warn-dim); color: var(--warn); border-color: rgba(242, 201, 76, 0.36); }
.pill-bad { background: var(--bad-dim); color: var(--bad); border-color: rgba(255, 98, 89, 0.36); }
.pill-muted { background: rgba(238, 241, 237, 0.05); color: var(--muted); border-color: var(--line); }

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}

.btn-primary {
  background: linear-gradient(135deg, #ff7849, #ff5722);
  color: #fffaf5;
  border: 1px solid rgba(255, 164, 119, 0.48);
  border-radius: 7px;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.14s var(--ease), box-shadow 0.16s ease, filter 0.16s ease;
  box-shadow: 0 6px 20px rgba(255, 87, 34, 0.30);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 10px 26px rgba(255, 87, 34, 0.46); }
.btn-primary:disabled { opacity: 0.55; cursor: wait; }

.btn-ghost {
  background: rgba(238, 241, 237, 0.04);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.btn-ghost:hover { border-color: rgba(255, 150, 56, 0.48); background: rgba(255, 138, 52, 0.10); }

.glass-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 11px;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 38px rgba(0, 0, 0, 0.46);
}

.auth-crt-badge {
  width: 92px;
  height: 66px;
  color: var(--accent-soft);
  filter: drop-shadow(0 0 10px rgba(255, 138, 52, 0.35));
}

.crt-loader-ring {
  width: 64px;
  height: 64px;
  margin: 0 auto 10px;
  color: var(--accent-soft);
  animation: wireSlowSpin 2.4s linear infinite;
  filter: drop-shadow(0 0 10px rgba(255, 138, 52, 0.4));
}

/* CARTOONY CRAFTYPRESS MASCOT ANIMATIONS */
.cp-mascot-wrap {
  width: 176px;
  height: 152px;
  margin: 4px auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cp-mascot-wrap.sm { width: 126px; height: 112px; margin: 0 auto; }
.cp-mascot-wrap.working { width: 205px; height: 174px; margin: 0 auto 4px; }
.cp-mascot { width: 100%; height: 100%; overflow: visible; }

.cp-body-float {
  animation: cpFloat 3.1s ease-in-out infinite;
  transform-origin: center center;
}
.cp-shadow {
  animation: cpShadow 3.1s ease-in-out infinite;
  transform-origin: center center;
}
.cp-eyes {
  animation: cpBlink 4.6s infinite;
  transform-origin: 105px 73px;
}
.cp-antenna-dot {
  animation: cpPulse 1.8s ease-in-out infinite;
}
.cp-pencil-arm {
  animation: cpWave 2.8s ease-in-out infinite;
  transform-origin: 152px 108px;
}
.cp-scribble-arm {
  animation: cpScribble 0.42s ease-in-out infinite;
  transform-origin: 148px 112px;
}
.cp-scanline {
  animation: cpScan 1.3s ease-in-out infinite;
}
.cp-sparks {
  animation: cpSparks 1.1s ease-in-out infinite;
  transform-origin: center center;
}

@keyframes cpFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
}
@keyframes cpShadow {
  0%, 100% { transform: scaleX(1); opacity: 0.45; }
  50% { transform: scaleX(0.86); opacity: 0.28; }
}
@keyframes cpBlink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.12); }
}
@keyframes cpPulse {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 87, 34, 0.5)); }
  50% { filter: drop-shadow(0 0 10px rgba(255, 87, 34, 0.95)); }
}
@keyframes cpWave {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-6deg); }
}
@keyframes cpScribble {
  0% { transform: translate(0px, 0px) rotate(0deg); }
  25% { transform: translate(-5px, 2px) rotate(-6deg); }
  50% { transform: translate(2px, -3px) rotate(4deg); }
  75% { transform: translate(-4px, 3px) rotate(-5deg); }
  100% { transform: translate(0px, 0px) rotate(0deg); }
}
@keyframes cpScan {
  0%, 100% { transform: translateY(0px); opacity: 0.25; }
  50% { transform: translateY(38px); opacity: 0.7; }
}
@keyframes cpSparks {
  0%, 100% { opacity: 0.35; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.06); }
}

/* PORTAL STAGE — MODERN RETRO-CYBERPUNK TERMINAL */
.portal-stage {
  position: relative;
  z-index: 2;
  max-width: 1120px;
  margin: 0 auto;
  padding: 34px 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.portal-intro {
  text-align: center;
  max-width: 640px;
  margin-bottom: 22px;
}
.portal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 4px;
  background: rgba(255, 146, 54, 0.08);
  border: 1px solid rgba(255, 152, 56, 0.34);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: var(--accent-soft);
}
.portal-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 12px 0 8px;
}
.portal-intro p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

.orbit-arena {
  position: relative;
  width: 100%;
  min-height: 430px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 18px 8px;
}
.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(255, 150, 56, 0.10);
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.ring-1 { width: 460px; height: 460px; }
.ring-2 { width: 720px; height: 720px; border-color: rgba(238, 241, 237, 0.05); }

/* DECK UNIT CARDS (CRAFTYPRESS & CRAFTYADMIN) */
.bot-planet.deck-unit {
  position: relative;
  z-index: 4;
  width: min(390px, 100%);
  text-align: left;
  padding: 0;
  border-radius: 10px;
  background: rgba(11, 14, 17, 0.92);
  border: 1px solid rgba(255, 152, 56, 0.30);
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 46px rgba(0, 0, 0, 0.56);
  transition: transform 0.18s var(--ease), border-color 0.18s ease, box-shadow 0.2s ease;
}
.deck-unit.unit-amber:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 162, 68, 0.78);
  box-shadow: 0 22px 52px rgba(255, 138, 52, 0.18);
}
.deck-unit.unit-pip {
  border-color: rgba(57, 255, 136, 0.28);
  background: rgba(8, 14, 11, 0.93);
}
.deck-unit.unit-pip:hover {
  transform: translateY(-4px);
  border-color: rgba(57, 255, 136, 0.78);
  box-shadow: 0 22px 52px rgba(57, 255, 136, 0.18);
}

.unit-corner {
  position: absolute;
  width: 11px;
  height: 11px;
  pointer-events: none;
  z-index: 5;
  opacity: 0.7;
  transition: opacity 0.18s ease;
}
.unit-amber .unit-corner { border-color: #ff9c3b; }
.unit-pip .unit-corner { border-color: #39ff88; }
.deck-unit:hover .unit-corner { opacity: 1; }
.unit-corner.tl { top: 6px; left: 6px; border-top: 1.5px solid; border-left: 1.5px solid; }
.unit-corner.tr { top: 6px; right: 6px; border-top: 1.5px solid; border-right: 1.5px solid; }
.unit-corner.bl { bottom: 6px; left: 6px; border-bottom: 1.5px solid; border-left: 1.5px solid; }
.unit-corner.br { bottom: 6px; right: 6px; border-bottom: 1.5px solid; border-right: 1.5px solid; }

.unit-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 152, 56, 0.16);
  background: rgba(255, 146, 54, 0.05);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}
.unit-pip .unit-bar {
  border-bottom-color: rgba(57, 255, 136, 0.16);
  background: rgba(57, 255, 136, 0.05);
}
.unit-id { color: var(--muted); font-weight: 600; }
.unit-amber .unit-status { color: #ffb366; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.unit-pip .unit-status { color: #54ff9c; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.amber-dot { background: #ff9c3b !important; box-shadow: 0 0 8px #ff9c3b !important; }
.pip-dot { background: #39ff88 !important; box-shadow: 0 0 8px #39ff88 !important; }

/* MINI CRT TACTICAL SCREEN INSIDE EACH PORTAL CARD */
.unit-crt-screen {
  position: relative;
  margin: 14px 16px 0;
  height: 158px;
  border-radius: 7px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 152, 56, 0.24);
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 145, 56, 0.14), rgba(9, 11, 13, 0.96) 72%),
    linear-gradient(rgba(255, 150, 56, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 150, 56, 0.05) 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
  color: #ff9c3b;
}
.unit-crt-screen.pip-crt {
  border-color: rgba(57, 255, 136, 0.24);
  background:
    radial-gradient(circle at 50% 45%, rgba(57, 255, 136, 0.14), rgba(5, 11, 8, 0.97) 72%),
    linear-gradient(rgba(57, 255, 136, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 255, 136, 0.05) 1px, transparent 1px);
  background-size: auto, 24px 24px, 24px 24px;
  color: #39ff88;
}
.unit-crt-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.20) 3px,
    transparent 4px
  );
  opacity: 0.32;
}
.unit-radar-mini {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255, 152, 56, 0.22) 0deg, transparent 64deg, transparent 360deg);
  animation: wireSlowSpin 6.5s linear infinite;
  pointer-events: none;
}
.unit-radar-mini.pip-mini {
  background: conic-gradient(from 0deg, rgba(57, 255, 136, 0.22) 0deg, transparent 64deg, transparent 360deg);
}
.unit-brand-emblem {
  position: relative;
  z-index: 2;
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 0 14px rgba(255, 87, 34, 0.38));
  transition: transform 0.22s var(--ease);
}
.pip-crt .unit-brand-emblem {
  filter: drop-shadow(0 0 14px rgba(52, 211, 153, 0.35));
}
.deck-unit:hover .unit-brand-emblem { transform: scale(1.06); }
.emblem-spin {
  transform-origin: 60px 60px;
  animation: wireSlowSpin 22s linear infinite;
}
.deck-unit:hover .emblem-spin { animation-duration: 8s; }
.term-brand-svg {
  width: 94px;
  height: 74px;
  filter: drop-shadow(0 0 12px rgba(255, 87, 34, 0.42));
}
.admin-term .term-brand-svg {
  filter: drop-shadow(0 0 12px rgba(52, 211, 153, 0.36));
}

/* Craft Core Retention Sync Banner */
.retention-sync-banner {
  margin-bottom: 14px;
  padding: 13px 16px;
  border-radius: 9px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  border: 1px solid rgba(255, 120, 73, 0.32);
  background: rgba(255, 87, 34, 0.08);
}
.retention-sync-banner.synced {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.10);
}
.retention-sync-banner.needs-link {
  border-color: rgba(255, 164, 119, 0.48);
  background: rgba(255, 87, 34, 0.12);
}
.retention-sync-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.retention-select {
  background: rgba(12, 10, 9, 0.92);
  color: var(--ink);
  border: 1px solid rgba(255, 164, 119, 0.38);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12.5px;
  min-width: 220px;
}

.unit-wire-emblem {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 88px;
  filter: drop-shadow(0 0 10px currentColor);
  animation: wireSlowSpin 26s linear infinite;
  transition: transform 0.2s ease;
}
.deck-unit:hover .unit-wire-emblem { animation-duration: 8s; }
.unit-crt-readout {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 7px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.07em;
  opacity: 0.78;
}

.unit-body {
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.planet-badge {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: linear-gradient(135deg, #ffa142, #ff6b22);
  color: #0b0907;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(255, 138, 52, 0.30);
}
.planet-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.015em; }
.planet-desc { font-size: 13px; color: var(--muted); margin: 5px 0 14px; line-height: 1.5; }
.planet-branches { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.branch-chip {
  padding: 4px 9px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 146, 54, 0.38);
  background: rgba(255, 138, 52, 0.10);
  color: var(--accent-soft);
  transition: background 0.15s, border-color 0.15s;
}
.branch-chip:hover { background: rgba(255, 138, 52, 0.22); border-color: rgba(255, 172, 92, 0.75); }
.branch-chip.soon {
  border-color: var(--line);
  background: rgba(238, 241, 237, 0.04);
  color: var(--muted);
}
.branch-chip.ok {
  border-color: rgba(57, 255, 136, 0.36);
  background: rgba(57, 255, 136, 0.09);
  color: #5effa2;
}
.branch-chip.ok:hover { background: rgba(57, 255, 136, 0.20); border-color: rgba(57, 255, 136, 0.78); }

.unit-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 18px;
  border-top: 1px solid rgba(255, 152, 56, 0.18);
  background: rgba(255, 138, 52, 0.06);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: #ffb366;
  transition: background 0.16s ease, color 0.16s ease;
}
.unit-amber:hover .unit-cta {
  background: rgba(255, 138, 52, 0.16);
  color: #ffd099;
}
.unit-cta.pip-cta {
  border-top-color: rgba(57, 255, 136, 0.18);
  background: rgba(57, 255, 136, 0.06);
  color: #54ff9c;
}
.unit-pip:hover .unit-cta.pip-cta {
  background: rgba(57, 255, 136, 0.16);
  color: #a3ffc9;
}
.unit-arrow { transition: transform 0.16s var(--ease); }
.deck-unit:hover .unit-arrow { transform: translateX(4px); }

/* CRAFTYADMIN: DOMAIN QUOTE & PAYMENT CHAT */
.domain-quote {
  margin-top: 16px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(76, 175, 125, 0.08);
  border: 1px solid rgba(76, 175, 125, 0.36);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.domain-quote.taken {
  background: var(--bad-dim);
  border-color: rgba(255, 107, 91, 0.4);
}
.pay-chat-card { padding: 22px; }
.chat-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 430px;
  overflow-y: auto;
  padding: 14px;
  border-radius: 14px;
  background: rgba(12, 12, 17, 0.72);
  border: 1px solid var(--line);
}
.chat-msg { display: flex; flex-direction: column; gap: 4px; max-width: 85%; }
.chat-msg.user { align-self: flex-end; align-items: flex-end; }
.chat-msg.bot { align-self: flex-start; align-items: flex-start; }
.chat-author { font-size: 11px; color: var(--muted); font-weight: 600; }
.chat-bubble {
  padding: 10px 14px;
  border-radius: 13px;
  font-size: 13.5px;
  line-height: 1.48;
  background: rgba(243, 239, 232, 0.06);
  border: 1px solid var(--line);
}
.chat-msg.user .chat-bubble {
  background: var(--accent-dim);
  border-color: rgba(255, 87, 34, 0.4);
}
.chat-choices {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 8px;
  width: 100%;
}
.chat-choice-btn {
  text-align: left;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(20, 20, 28, 0.92);
  border: 1px solid rgba(76, 175, 125, 0.4);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  transition: background 0.15s, border-color 0.15s;
}
.chat-choice-btn:hover { background: rgba(76, 175, 125, 0.16); border-color: var(--ok); }

/* WORKSPACE */
.bot-workspace {
  position: relative;
  z-index: 2;
  max-width: 1260px;
  margin: 0 auto;
  padding: 22px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.workspace-head {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border-color: rgba(255, 87, 34, 0.30);
}
.ws-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ws-bot-id { display: flex; align-items: center; gap: 10px; }
.ws-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.ws-sub { font-size: 12px; color: var(--muted); }
.ws-branches { display: flex; gap: 8px; flex-wrap: wrap; }
.ws-branch-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(243, 239, 232, 0.04);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s var(--ease);
}
.ws-branch-btn:hover { color: var(--ink); border-color: rgba(255, 87, 34, 0.45); }
.ws-branch-btn.active {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--accent-dim);
}
.branch-dot { width: 8px; height: 8px; border-radius: 50%; }
.branch-dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.branch-dot.soon { background: var(--warn); }
.soon-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 99px;
  background: var(--warn-dim);
  color: var(--warn);
}

/* AUDIT INPUT CARD */
.cp-branch { display: flex; flex-direction: column; gap: 18px; }
.audit-bar-card { padding: 22px; }
.audit-bar-head h2 { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.audit-bar-head p { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.audit-form {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.tools-input {
  flex: 1;
  min-width: 240px;
  background: rgba(12, 12, 17, 0.9);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 15px;
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s;
}
.tools-input:focus { border-color: var(--accent); }
.quick-examples {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.chip-btn {
  background: rgba(243, 239, 232, 0.05);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 99px;
  padding: 4px 11px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  cursor: pointer;
}
.chip-btn:hover { border-color: var(--accent); color: var(--accent-soft); }
.audit-error {
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--bad-dim);
  border: 1px solid rgba(255, 107, 91, 0.45);
  color: #ffb4ac;
  font-size: 13px;
}

/* LOADING */
.loading-card {
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.loading-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.loading-sub { font-size: 13px; color: var(--muted); max-width: 540px; }

/* RESULTS */
.results-wrap { display: flex; flex-direction: column; gap: 18px; }
.results-hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 16px;
}
.score-card {
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.gauge-wrap { position: relative; width: 148px; height: 148px; flex-shrink: 0; }
.score-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-track { fill: none; stroke: rgba(243, 239, 232, 0.08); stroke-width: 11; }
.gauge-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 11;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s var(--ease), stroke 0.3s;
}
.gauge-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.gauge-num { font-family: var(--font-display); font-size: 40px; font-weight: 700; line-height: 1; }
.gauge-max { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: 2px; }
.gauge-grade {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 99px;
  background: var(--accent-dim);
  color: var(--accent-soft);
}
.score-meta { flex: 1; min-width: 220px; }
.res-domain { font-family: var(--font-display); font-size: 21px; font-weight: 700; }
.res-url { font-size: 12px; color: var(--accent-soft); text-decoration: none; display: inline-block; margin-bottom: 14px; word-break: break-all; }
.pillar-bars { display: flex; flex-direction: column; gap: 11px; }
.pillar-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; }
.pillar-top strong { font-family: var(--font-mono); }
.meter-track { height: 8px; border-radius: 99px; background: rgba(243, 239, 232, 0.09); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ff5722, #ff8a5b); width: 0%; transition: width 0.7s var(--ease); }
.meter-fill.aio { background: linear-gradient(90deg, #4caf7d, #7de0ae); }
.score-actions { margin-top: 14px; }

.diag-card { padding: 22px; display: flex; flex-direction: column; gap: 11px; }
.diag-head { display: flex; justify-content: space-between; align-items: center; }
.diag-head h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.diag-summary { font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.verdict-box {
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(255, 87, 34, 0.08);
  border: 1px solid rgba(255, 87, 34, 0.28);
}
.verdict-lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-soft); font-weight: 700; margin-bottom: 3px; }
.verdict-txt { font-size: 13px; line-height: 1.45; }
.wins-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; margin-top: 2px; }
.wins-list { padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.45; }

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.metric-box {
  padding: 13px 15px;
  border-radius: 13px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.metric-lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.metric-val { font-family: var(--font-mono); font-size: 17px; font-weight: 700; margin-top: 4px; }

.checks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.checks-col { padding: 18px; }
.checks-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.checks-col-head h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.checks-list { display: flex; flex-direction: column; gap: 9px; }
.check-item {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(243, 239, 232, 0.03);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
}
.check-item.pass { border-left-color: var(--ok); }
.check-item.warn { border-left-color: var(--warn); }
.check-item.fail { border-left-color: var(--bad); }
.check-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.check-lbl { font-size: 13.5px; font-weight: 600; }
.check-pts { font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; }
.check-detail { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.check-fix {
  margin-top: 6px;
  font-size: 12px;
  color: var(--accent-soft);
  background: rgba(255, 87, 34, 0.07);
  padding: 6px 9px;
  border-radius: 8px;
  line-height: 1.4;
}

/* HISTORY */
.history-card { padding: 18px; }
.history-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.history-head h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.history-sub { font-size: 12px; color: var(--muted); }
.history-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}
.hist-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(243, 239, 232, 0.04);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.15s ease;
}
.hist-filter-btn:hover { color: var(--ink); border-color: rgba(243, 239, 232, 0.28); }
.hist-filter-btn.active {
  color: var(--ink);
  background: rgba(243, 239, 232, 0.12);
  border-color: rgba(243, 239, 232, 0.42);
}
.hist-filter-btn .f-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.f-dot.green { background: #4caf7d; }
.f-dot.orange { background: #ff8c42; }
.f-dot.yellow { background: #f2c94c; }
.f-dot.red { background: #ff5a5f; }
.hist-filter-cnt {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.8;
}

.pill-score-green {
  background: rgba(76, 175, 125, 0.18);
  color: #5ce1a6;
  border: 1px solid rgba(76, 175, 125, 0.45);
}
.pill-score-orange {
  background: rgba(255, 140, 66, 0.18);
  color: #ffa666;
  border: 1px solid rgba(255, 140, 66, 0.48);
}
.pill-score-yellow {
  background: rgba(242, 201, 76, 0.18);
  color: #f7d972;
  border: 1px solid rgba(242, 201, 76, 0.48);
}
.pill-score-red {
  background: rgba(255, 90, 95, 0.18);
  color: #ff7b7f;
  border: 1px solid rgba(255, 90, 95, 0.48);
}

.history-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 9px; }
.hist-item {
  text-align: left;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(243, 239, 232, 0.035);
  border: 1px solid var(--line);
  border-left-width: 3px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  transition: border-color 0.15s, background 0.15s;
}
.hist-item.band-green { border-left-color: #4caf7d; }
.hist-item.band-orange { border-left-color: #ff8c42; }
.hist-item.band-yellow { border-left-color: #f2c94c; }
.hist-item.band-red { border-left-color: #ff5a5f; }
.hist-item:hover { border-color: var(--accent); background: rgba(255, 87, 34, 0.09); }
.hist-card-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  border-radius: 12px;
  background: rgba(243, 239, 232, 0.035);
  border: 1px solid var(--line);
  border-left-width: 3px;
  transition: border-color 0.15s, background 0.15s;
}
.hist-card-wrap.band-green { border-left-color: #4caf7d; }
.hist-card-wrap.band-orange { border-left-color: #ff8c42; }
.hist-card-wrap.band-yellow { border-left-color: #f2c94c; }
.hist-card-wrap.band-red { border-left-color: #ff5a5f; }
.hist-card-wrap.band-rec { border-left-color: var(--accent); }
.hist-card-wrap:hover { border-color: var(--accent); background: rgba(255, 87, 34, 0.08); }
.hist-card-main {
  flex: 1;
  min-width: 0;
  text-align: left;
  padding: 11px 10px 11px 13px;
  background: transparent;
  border: none;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.hist-del-btn {
  flex-shrink: 0;
  width: 32px;
  background: transparent;
  border: none;
  border-left: 1px solid rgba(243, 239, 232, 0.07);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  border-radius: 0 11px 11px 0;
  transition: background 0.15s, color 0.15s;
}
.hist-del-btn:hover {
  background: rgba(255, 90, 95, 0.18);
  color: #ff7b7f;
}
.report-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.report-topbar-hint { font-size: 12px; color: var(--muted); }
.hist-dom { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-meta { font-size: 11px; color: var(--muted); margin-top: 2px; font-family: var(--font-mono); }

/* BLOGS PLACEHOLDER */
.blogs-placeholder {
  padding: 40px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.blogs-placeholder h2 { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.blogs-placeholder p { color: var(--muted); font-size: 14px; max-width: 580px; line-height: 1.55; }
.blogs-roadmap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 860px;
  margin: 8px 0 6px;
}
.rm-item {
  text-align: left;
  padding: 15px 16px;
  border-radius: 13px;
  background: rgba(243, 239, 232, 0.035);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.rm-item strong { font-size: 13.5px; color: var(--ink); }
.rm-item span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }

.tools-toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  padding: 10px 18px;
  border-radius: 99px;
  background: rgba(18, 18, 24, 0.96);
  border: 1px solid var(--accent);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

@media (max-width: 920px) {
  .results-hero, .checks-grid, .blogs-roadmap { grid-template-columns: 1fr; }
  .ring-2 { display: none; }
}

/* ============================================================
   RETRO-CYBERPUNK / FALLOUT CRT GALAXY WARP & TACTICAL RADAR
   ============================================================ */
body.sector-admin .tools-topbar {
  border-bottom-color: rgba(57, 255, 136, 0.28);
}
body.sector-admin .brand-orb {
  background: radial-gradient(circle at 32% 28%, #7affb2, #18c964);
  box-shadow: 0 0 22px rgba(57, 255, 136, 0.48);
  color: #06140c;
}
body.sector-admin .switch-pill.active {
  background: #22d374;
  color: #05130a;
  box-shadow: 0 2px 14px rgba(57, 255, 136, 0.35);
}
body.sector-admin #view-craftyadmin .btn-primary {
  background: linear-gradient(135deg, #39ff88, #16a34a);
  color: #04150a;
  border-color: rgba(110, 255, 168, 0.55);
  box-shadow: 0 6px 20px rgba(57, 255, 136, 0.28);
}
body.sector-admin #view-craftyadmin .btn-ghost:hover {
  border-color: rgba(57, 255, 136, 0.50);
  background: rgba(57, 255, 136, 0.10);
}
body.sector-admin #view-craftyadmin .ws-branch-btn.active {
  border-color: rgba(57, 255, 136, 0.55);
  background: rgba(57, 255, 136, 0.12);
  color: #7affb2;
}
body.sector-admin #view-craftyadmin .tools-input:focus {
  border-color: rgba(57, 255, 136, 0.58);
}

.warp-flash {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--wx, 50%) var(--wy, 50%), var(--wcolor, rgba(255, 145, 56, 0.45)), rgba(8, 10, 12, 0.06) 52%, transparent 74%);
  transition: opacity 0.14s ease;
}
.warp-flash.active { opacity: 1; }

/* Ultra-snappy GPU-only warp transitions (no heavy blur!) */
.portal-stage, .cp-galaxy-stage, .bot-workspace {
  transition: transform 0.19s cubic-bezier(0.2, 0.9, 0.28, 1), opacity 0.16s ease;
  transform-origin: var(--wx, 50%) var(--wy, 48%);
  will-change: transform, opacity;
}
.warp-exit-in {
  transform: scale(1.28) !important;
  opacity: 0 !important;
}
.warp-exit-out {
  transform: scale(0.80) !important;
  opacity: 0 !important;
}
.warp-enter-from-in {
  transform: scale(0.84);
  opacity: 0;
}
.warp-enter-from-out {
  transform: scale(1.18);
  opacity: 0;
}

.cp-galaxy-stage {
  position: relative;
  z-index: 2;
  max-width: 1220px;
  margin: 0 auto;
  padding: 16px 24px 44px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cp-galaxy-hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.galaxy-back-btn {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  border-radius: 6px;
}
.sector-coords {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 4px;
  background: rgba(255, 140, 46, 0.09);
  border: 1px solid rgba(255, 152, 56, 0.42);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #ffb15c;
  text-shadow: 0 0 10px rgba(255, 140, 46, 0.35);
}
.sector-coords.admin-coords {
  background: rgba(57, 255, 136, 0.08);
  border-color: rgba(57, 255, 136, 0.44);
  color: #5cff9e;
  text-shadow: 0 0 10px rgba(57, 255, 136, 0.4);
}
.coords-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  animation: pulseDot 1.6s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.45; }
}
.coords-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.coords-hint code {
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(243, 239, 232, 0.08);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink);
}
.sfx-btn {
  padding: 6px 10px;
  font-size: 11px;
  font-family: var(--font-mono);
  border-radius: 5px;
}

/* Craft Marketing Orange Spectrum for Module Nodes */
.cp-orbit-map.crt-deck {
  --deck-rgb: 255, 87, 34;
  --deck-hex: #ff7849;
  position: relative;
  width: 100%;
  height: 525px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 87, 34, 0.13) 0%, rgba(16, 12, 10, 0.95) 64%, rgba(11, 9, 8, 0.99) 100%);
  border: 1px solid rgba(255, 120, 73, 0.36);
  box-shadow:
    inset 0 0 70px rgba(255, 87, 34, 0.08),
    0 20px 55px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  perspective: 1100px;
  transform-style: preserve-3d;
  transition: transform 0.12s ease-out;
}
.cp-orbit-map.admin-deck {
  --deck-rgb: 52, 211, 153;
  --deck-hex: #34d399;
  background:
    radial-gradient(circle at 50% 50%, rgba(52, 211, 153, 0.10) 0%, rgba(9, 15, 13, 0.96) 64%, rgba(7, 11, 10, 0.99) 100%);
}

.crt-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.16) 3px,
    rgba(0, 0, 0, 0) 4px
  );
  opacity: 0.24;
}
.crt-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(var(--deck-rgb), 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--deck-rgb), 0.065) 1px, transparent 1px);
  background-size: 46px 46px;
}

/* Fallout Pip-Boy Rotating Radar Sweep */
.radar-sweep {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 660px;
  height: 660px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  background: conic-gradient(
    from 0deg,
    rgba(var(--deck-rgb), 0.19) 0deg,
    rgba(var(--deck-rgb), 0.04) 42deg,
    transparent 76deg,
    transparent 360deg
  );
  animation: radarSpin 7.5s linear infinite;
}
@keyframes radarSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* HUD Tactical Corners & Telemetry */
.hud-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 10;
  border-color: var(--deck-hex);
  opacity: 0.72;
}
.hud-corner.tl { top: 10px; left: 10px; border-top: 2px solid; border-left: 2px solid; }
.hud-corner.tr { top: 10px; right: 10px; border-top: 2px solid; border-right: 2px solid; }
.hud-corner.bl { bottom: 10px; left: 10px; border-bottom: 2px solid; border-left: 2px solid; }
.hud-corner.br { bottom: 10px; right: 10px; border-bottom: 2px solid; border-right: 2px solid; }

.hud-telemetry {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  color: rgba(var(--deck-rgb), 0.65);
}
.hud-telemetry.top-left { top: 14px; left: 36px; }
.hud-telemetry.top-right { top: 14px; right: 36px; }

.sys-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px dashed rgba(var(--deck-rgb), 0.18);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}
.sys-orbit-1 { width: 220px; height: 220px; }
.sys-orbit-2 { width: 420px; height: 420px; border-style: solid; border-color: rgba(var(--deck-rgb), 0.11); }
.sys-orbit-3 { width: 650px; height: 450px; border-color: rgba(var(--deck-rgb), 0.14); }

/* Vector Targeting Lines */
.constellation-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.const-ray {
  stroke: rgba(var(--deck-rgb), 0.22);
  stroke-width: 1.25;
  stroke-dasharray: 5 6;
  transition: stroke 0.16s ease, stroke-width 0.16s ease;
}
.const-ray.active {
  stroke-width: 2.5;
  stroke-dasharray: 9 4;
  animation: dashFlow 0.55s linear infinite;
}
.const-ray.ray-seo.active { stroke: #ff9c3b; filter: drop-shadow(0 0 8px rgba(255, 156, 59, 0.85)); }
.const-ray.ray-gmb.active { stroke: #4df0d0; filter: drop-shadow(0 0 8px rgba(77, 240, 208, 0.85)); }
.const-ray.ray-nl.active { stroke: #d58cff; filter: drop-shadow(0 0 8px rgba(213, 140, 255, 0.85)); }
.const-ray.ray-blogs.active { stroke: #f2c94c; filter: drop-shadow(0 0 8px rgba(242, 201, 76, 0.85)); }
.const-ray.ray-admin.active { stroke: #39ff88; filter: drop-shadow(0 0 10px rgba(57, 255, 136, 0.9)); }
@keyframes dashFlow {
  from { stroke-dashoffset: 26; }
  to { stroke-dashoffset: 0; }
}

/* CENTRAL RETRO-TERMINAL UNIT */
.cp-core-station {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  pointer-events: none;
}
.core-terminal-box {
  width: 238px;
  border-radius: 6px;
  background: rgba(12, 11, 10, 0.94);
  border: 1px solid rgba(255, 156, 59, 0.55);
  box-shadow: 0 0 34px rgba(255, 140, 46, 0.22), inset 0 0 22px rgba(255, 140, 46, 0.08);
  color: #ffb15c;
  overflow: hidden;
}
.core-terminal-box.admin-term {
  background: rgba(6, 13, 9, 0.95);
  border-color: rgba(57, 255, 136, 0.58);
  box-shadow: 0 0 36px rgba(57, 255, 136, 0.24), inset 0 0 24px rgba(57, 255, 136, 0.09);
  color: #4eff96;
}
.core-term-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  background: rgba(var(--deck-rgb), 0.14);
  border-bottom: 1px solid rgba(var(--deck-rgb), 0.34);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
}
.term-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
.core-term-crt {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.term-wire-icon {
  width: 96px;
  height: 66px;
  filter: drop-shadow(0 0 6px currentColor);
}
.core-speech {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.38;
  text-align: center;
  color: currentColor;
  text-shadow: 0 0 8px rgba(var(--deck-rgb), 0.45);
  min-height: 30px;
}

/* WIREFRAME TACTICAL NODES */
.galaxy-planet {
  position: absolute;
  z-index: 6;
  background: transparent;
  border: none;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 8px;
  transform: translate(-50%, -50%);
  transition: transform 0.16s cubic-bezier(0.2, 0.9, 0.28, 1);
}
.planet-pos-1 { left: 21.5%; top: 25.5%; }
.planet-pos-2 { left: 78.5%; top: 25.5%; }
.planet-pos-3 { left: 21.5%; top: 75%; }
.planet-pos-4 { left: 78.5%; top: 75%; }
.planet-admin-left { left: 22.5%; top: 50%; }
.planet-admin-right { left: 77.5%; top: 50%; }

.galaxy-planet:hover, .galaxy-planet:focus-visible {
  transform: translate(-50%, -50%) scale(1.10);
  outline: none;
  z-index: 8;
}

/* Angular Targeting Reticle [ + ] */
.planet-reticle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 108px;
  height: 108px;
  transform: translateX(-50%) scale(0.86);
  opacity: 0;
  pointer-events: none;
  border: 1.5px solid var(--deck-hex);
  clip-path: polygon(
    0 22%, 0 0, 22% 0, 22% 8%, 8% 8%, 8% 22%,
    78% 0, 100% 0, 100% 22%, 92% 22%, 92% 8%, 78% 8%,
    100% 78%, 100% 100%, 78% 100%, 78% 92%, 92% 92%, 92% 78%,
    22% 100%, 0 100%, 0 78%, 8% 78%, 8% 92%, 22% 92%
  );
  background: var(--deck-hex);
  transition: opacity 0.15s ease, transform 0.16s ease;
}
.galaxy-planet:hover .planet-reticle, .galaxy-planet:focus-visible .planet-reticle {
  opacity: 0.9;
  transform: translateX(-50%) scale(1.04);
}

.wire-planet {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(16, 18, 20, 0.92) 45%, rgba(8, 10, 12, 0.96) 100%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.wire-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: wireSlowSpin 28s linear infinite;
}
.galaxy-planet:hover .wire-svg { animation-duration: 7s; }
@keyframes wireSlowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.wire-code {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-shadow: 0 0 10px currentColor;
}

.wire-amber { color: #ff5722; box-shadow: 0 0 26px rgba(255, 87, 34, 0.28), inset 0 0 16px rgba(255, 87, 34, 0.14); }
.theme-seo:hover .wire-amber { box-shadow: 0 0 42px rgba(255, 87, 34, 0.62), inset 0 0 22px rgba(255, 87, 34, 0.24); }

.wire-cyan { color: #ff7849; box-shadow: 0 0 24px rgba(255, 120, 73, 0.25), inset 0 0 16px rgba(255, 120, 73, 0.12); }
.theme-gmb:hover .wire-cyan { box-shadow: 0 0 40px rgba(255, 120, 73, 0.58), inset 0 0 22px rgba(255, 120, 73, 0.22); }

.wire-violet { color: #ffa477; box-shadow: 0 0 24px rgba(255, 164, 119, 0.22), inset 0 0 16px rgba(255, 164, 119, 0.12); }
.theme-nl:hover .wire-violet { box-shadow: 0 0 40px rgba(255, 164, 119, 0.52), inset 0 0 22px rgba(255, 164, 119, 0.20); }

.wire-gold { color: #e0632c; box-shadow: 0 0 22px rgba(224, 99, 44, 0.22), inset 0 0 14px rgba(224, 99, 44, 0.12); }
.theme-blogs:hover .wire-gold { box-shadow: 0 0 38px rgba(224, 99, 44, 0.52), inset 0 0 20px rgba(224, 99, 44, 0.20); }

.wire-pip { color: #34d399; box-shadow: 0 0 26px rgba(52, 211, 153, 0.26), inset 0 0 18px rgba(52, 211, 153, 0.14); }
.theme-admin-node:hover .wire-pip { box-shadow: 0 0 44px rgba(52, 211, 153, 0.58), inset 0 0 24px rgba(52, 211, 153, 0.24); }

/* Terminal Label Tags */
.planet-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px 6px 7px;
  border-radius: 5px;
  background: rgba(10, 12, 14, 0.92);
  border: 1px solid rgba(var(--deck-rgb), 0.34);
  text-align: left;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.planet-key {
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(var(--deck-rgb), 0.15);
  border: 1px solid rgba(var(--deck-rgb), 0.42);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--deck-hex);
}
.planet-name { font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em; line-height: 1.15; }
.planet-sub { font-size: 10px; color: var(--muted); font-family: var(--font-mono); margin-top: 2px; letter-spacing: 0.04em; }

/* RETRO TERMINAL HUD BAR */
.cp-mission-hud.crt-hud-bar {
  padding: 13px 18px;
  border-radius: 8px;
  background: rgba(12, 12, 16, 0.92);
  border: 1px solid rgba(255, 156, 59, 0.34);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.cp-mission-hud.admin-hud-bar {
  background: rgba(6, 13, 9, 0.94);
  border-color: rgba(57, 255, 136, 0.40);
}
.mission-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; flex: 1; min-width: 260px; }
.mission-title { font-family: var(--font-mono); font-size: 14px; font-weight: 700; letter-spacing: 0.04em; }
.mission-desc { font-size: 12px; color: var(--muted); margin-top: 2px; }

.btn-pip {
  background: linear-gradient(135deg, #2be876, #16a34a) !important;
  color: #04150a !important;
  border-color: rgba(110, 255, 168, 0.6) !important;
  box-shadow: 0 6px 22px rgba(57, 255, 136, 0.34) !important;
  font-family: var(--font-mono);
}
.btn-pip:hover:not(:disabled) {
  box-shadow: 0 10px 28px rgba(57, 255, 136, 0.52) !important;
}

@media (max-width: 860px) {
  .cp-orbit-map.crt-deck {
    height: auto;
    padding: 36px 14px 24px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    place-items: center;
  }
  .constellation-svg, .sys-orbit, .radar-sweep { display: none; }
  .cp-core-station {
    position: relative;
    top: auto; left: auto; transform: none;
    grid-column: 1 / -1;
    margin-bottom: 4px;
  }
  .galaxy-planet {
    position: relative;
    top: auto; left: auto; transform: none;
  }
  .galaxy-planet:hover { transform: scale(1.06); }
  .coords-hint, .hud-telemetry { display: none; }
}

/* ============================================================
   GALAXY LIVE OPPORTUNITIES RADAR
   ============================================================ */
.opp-radar-card {
  width: 100%;
  margin-top: 8px;
  padding: 18px 20px;
  border-color: rgba(255, 152, 56, 0.24);
}
.opp-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.opp-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  color: var(--accent-soft);
  margin-bottom: 4px;
}
.opp-head h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.opp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 10px;
}
.opp-loading {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  padding: 6px 2px;
}
.opp-item {
  text-align: left;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(238, 241, 237, 0.03);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: transform 0.14s var(--ease), border-color 0.15s ease, background 0.15s ease;
}
.opp-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 162, 68, 0.65);
  background: rgba(255, 138, 52, 0.08);
}
.opp-item.tone-red { border-left-color: #ff5a5f; }
.opp-item.tone-yellow { border-left-color: #f2c94c; }
.opp-item.tone-orange { border-left-color: #ff8c42; }
.opp-item.tone-cyan { border-left-color: #4df0d0; }
.opp-item.tone-violet { border-left-color: #d58cff; }
.opp-item.tone-cyan:hover { border-color: rgba(77, 240, 208, 0.65); background: rgba(77, 240, 208, 0.07); }
.opp-item.tone-violet:hover { border-color: rgba(213, 140, 255, 0.65); background: rgba(213, 140, 255, 0.07); }
.opp-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.opp-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
.opp-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
}
.opp-reason {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.42;
}
.opp-foot {
  margin-top: auto;
  padding-top: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-soft);
}
.opp-item.tone-cyan .opp-foot { color: #5effd8; }
.opp-item.tone-violet .opp-foot { color: #dda2ff; }

/* ============================================================
   CRAFT CORE-STYLE UNIFIED 3-COLUMN ORBITAL HUB & WIDGETS
   ============================================================ */
.tools-bridge-shell {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 20px 36px;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
  transition: transform 0.19s cubic-bezier(0.2, 0.9, 0.28, 1), opacity 0.16s ease;
  transform-origin: var(--wx, 50%) var(--wy, 48%);
}

/* Lateral Collapsible Widgets (Craft Core Design Language) */
.wing {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.wing-box {
  padding: 13px 14px;
  border-radius: 13px;
  background: rgba(21, 17, 15, 0.90);
  border: 1px solid rgba(246, 239, 230, 0.10);
}
.wing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.wing-head-btn {
  cursor: pointer;
  user-select: none;
}
.wing-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.wing-head-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wing-caret {
  font-size: 11px;
  color: var(--muted);
  transition: transform 0.18s ease;
}
.wing-collapsible.collapsed .wing-body { display: none; }
.wing-collapsible.collapsed .wing-caret { transform: rotate(-90deg); }
.wing-body {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.guide-dot.accent { background: var(--accent); box-shadow: 0 0 8px rgba(255, 87, 34, 0.7); }
.guide-dot.ok { background: var(--ok); box-shadow: 0 0 8px rgba(52, 211, 153, 0.7); }
.guide-dot.warn { background: var(--warn); box-shadow: 0 0 8px rgba(245, 158, 11, 0.6); }
.guide-dot.bad { background: var(--bad); box-shadow: 0 0 8px rgba(248, 113, 113, 0.7); }

.wing-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
}
.wing-stat-lbl { color: var(--muted); }
.wing-stat-val { font-family: var(--font-mono); font-weight: 700; color: var(--ink); font-size: 12px; }
.wing-sub-note { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.wing-cta-btn { width: 100%; text-align: center; padding: 7px 10px; font-size: 11.5px; margin-top: 2px; }

.wing-clock-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.soft-clock {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.wing-clock-date { font-size: 11.5px; color: var(--muted); text-align: right; }

/* Compact Opportunities List inside Right Wing */
.wing-opps-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 330px;
  overflow-y: auto;
}
.wing-opp-row {
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(246, 239, 230, 0.035);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: background 0.14s, border-color 0.14s;
}
.wing-opp-row:hover {
  background: rgba(255, 87, 34, 0.10);
  border-color: rgba(255, 120, 73, 0.55);
}
.wing-opp-row.tone-red { border-left-color: #ff5a5f; }
.wing-opp-row.tone-yellow { border-left-color: #f2c94c; }
.wing-opp-row.tone-orange { border-left-color: #ff7849; }
.wing-opp-row.tone-cyan { border-left-color: #34d399; }
.wing-opp-row.tone-violet { border-left-color: #ffa477; }
.wing-opp-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.wing-opp-title { font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wing-opp-sub { font-size: 11px; color: var(--muted); line-height: 1.35; }

.hi-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; }
.hi-desc { font-size: 12px; color: var(--muted); line-height: 1.45; }

/* CENTER ORBITAL STAGE (SAME SYSTEM AS CRAFT CORE) */
.orbit-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 620px;
  user-select: none;
}
.orbit-canvas {
  position: relative;
  width: min(710px, 100%);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.orbit-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.guide-beam {
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  opacity: 0.25;
  transition: opacity 0.2s ease, stroke-width 0.2s ease;
}
.guide-beam.beam-admin { stroke: var(--ok); }
.guide-beam.active {
  opacity: 0.95;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 8px rgba(255, 87, 34, 0.75));
}
.guide-beam.beam-admin.active {
  filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.75));
}

.sub-branch-curve {
  fill: none;
  stroke: rgba(246, 239, 230, 0.14);
  stroke-width: 1.3;
  stroke-dasharray: 4 5;
  transition: stroke 0.2s ease, stroke-width 0.2s ease, opacity 0.2s ease;
}
.sub-branch-curve.lit {
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-dasharray: 7 6;
  animation: dashFlow 0.8s linear infinite;
  filter: drop-shadow(0 0 8px rgba(255, 87, 34, 0.8));
}
.sub-branch-curve.curve-admin.lit {
  stroke: var(--ok);
  filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.8));
}
.sub-branch-curve.dim { opacity: 0.14; }

.orbit-guide-dot {
  fill: rgba(246, 239, 230, 0.22);
  transition: fill 0.2s ease, filter 0.2s ease;
}
.orbit-guide-dot.lit {
  fill: var(--accent);
  filter: drop-shadow(0 0 8px rgba(255, 87, 34, 0.9));
}
.orbit-guide-dot.lit-admin {
  fill: var(--ok);
  filter: drop-shadow(0 0 8px rgba(52, 211, 153, 0.9));
}

/* Central Craft Tools Orb (matching Craft Core) */
.craft-core-orb {
  position: relative;
  z-index: 6;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 120, 73, 0.24), rgba(22, 17, 15, 0.94) 62%, rgba(12, 10, 9, 0.98) 100%);
  border: 1px solid rgba(255, 87, 34, 0.42);
  box-shadow: 0 0 46px rgba(255, 87, 34, 0.26), inset 0 0 24px rgba(255, 87, 34, 0.16);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.22s ease;
}
.craft-core-orb:hover { transform: scale(1.04); border-color: rgba(255, 164, 119, 0.75); }
.core-eyebrow {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent-soft);
}
.core-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.05;
  margin: 2px 0;
  color: var(--ink);
}
.core-caption { font-size: 11px; color: var(--muted); }

/* Primary Bot Nodes on the Orbital Ring (CraftyPress Left, CraftyAdmin Right) */
.orbit-node {
  position: absolute;
  z-index: 12;
  transform: translate3d(-50%, -50%, 0);
  min-width: 158px;
  padding: 11px 13px;
  border-radius: 13px;
  background: rgba(22, 17, 15, 0.95);
  border: 1px solid rgba(255, 120, 73, 0.36);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.46);
  transition: transform 0.2s var(--ease), border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}
.orbit-node.node-admin {
  border-color: rgba(52, 211, 153, 0.34);
  background: rgba(13, 21, 18, 0.95);
}
.orbit-node:hover,
.orbit-node.branch-lit {
  transform: translate3d(-50%, -50%, 0) scale(1.04);
  border-color: var(--accent);
  background: rgba(38, 22, 17, 0.97);
  box-shadow: 0 12px 28px rgba(255, 87, 34, 0.26);
}
.orbit-node.node-admin:hover,
.orbit-node.node-admin.branch-lit {
  border-color: var(--ok);
  background: rgba(14, 30, 24, 0.97);
  box-shadow: 0 12px 28px rgba(52, 211, 153, 0.24);
}
.orbit-node.branch-dim { opacity: 0.28; transform: translate3d(-50%, -50%, 0) scale(0.96); }

.node-head { display: flex; align-items: center; gap: 8px; }
.node-emblem { width: 24px; height: 24px; flex-shrink: 0; display: grid; place-items: center; }
.node-emblem svg { width: 24px; height: 24px; }
.node-title { font-family: var(--font-display); font-size: 14.5px; font-weight: 700; }
.node-meta { font-size: 11px; color: var(--muted); }

/* Outer Sub-Branch Clickable Pills (Direct Entry to Tools!) */
.sub-node {
  position: absolute;
  z-index: 13;
  transform: translate3d(-50%, -50%, 0);
  padding: 7px 12px;
  border-radius: 99px;
  background: rgba(20, 16, 14, 0.94);
  border: 1px solid rgba(255, 120, 73, 0.32);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.42);
  transition: transform 0.18s var(--ease), border-color 0.18s ease, background 0.18s ease, opacity 0.2s ease, box-shadow 0.18s ease;
}
.sub-node.sub-admin {
  border-color: rgba(52, 211, 153, 0.32);
  background: rgba(12, 19, 16, 0.94);
}
.sub-node:hover,
.sub-node.branch-lit {
  transform: translate3d(-50%, -50%, 0) scale(1.06);
  border-color: var(--accent);
  background: rgba(42, 22, 16, 0.98);
  box-shadow: 0 10px 26px rgba(255, 87, 34, 0.28);
}
.sub-node.sub-admin:hover,
.sub-node.sub-admin.branch-lit {
  border-color: var(--ok);
  background: rgba(14, 32, 25, 0.98);
  box-shadow: 0 10px 26px rgba(52, 211, 153, 0.26);
}
.sub-node.branch-dim { opacity: 0.25; transform: translate3d(-50%, -50%, 0) scale(0.95); }
.sub-node.sub-soon { border-style: dashed; border-color: rgba(246, 239, 230, 0.20); }

.sub-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.sub-dot.press { background: var(--accent); box-shadow: 0 0 8px rgba(255, 87, 34, 0.75); }
.sub-dot.admin { background: var(--ok); box-shadow: 0 0 8px rgba(52, 211, 153, 0.75); }
.sub-dot.soon { background: var(--muted); }
.sub-label { font-family: var(--font-display); font-size: 12.5px; font-weight: 700; }
.sub-count {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  background: rgba(246, 239, 230, 0.08);
  color: var(--accent-soft);
}
.sub-node.sub-admin .sub-count { color: #6ee7b7; }
.sub-node.sub-soon .sub-count { color: var(--muted); }

.mobile-tools-hub { display: none; width: 100%; flex-direction: column; gap: 12px; }
.mobile-bot-group { padding: 14px; }
.m-group-head { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.m-branch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

@media (max-width: 1180px) {
  .tools-bridge-shell { grid-template-columns: 240px minmax(0, 1fr) 248px; gap: 12px; }
}
@media (max-width: 980px) {
  .tools-bridge-shell { grid-template-columns: 1fr; }
  .orbit-stage { order: -1; min-height: auto; }
  .orbit-canvas { display: none; }
  .mobile-tools-hub { display: flex; }
}

/* ============================================================
   SEAMLESS EMBEDDED MODE INSIDE CRAFT CORE (MUSIC & CANVAS LIVE)
   ============================================================ */
html.is-embedded,
body.is-embedded {
  background: transparent !important;
}
body.is-embedded #bg-stars,
body.is-embedded .tools-topbar {
  display: none !important;
}
body.is-embedded .tools-bridge-shell {
  padding-top: 6px;
}
body.is-embedded .bot-workspace {
  padding-top: 8px;
}
body.is-embedded .glass-card,
body.is-embedded .wing-box {
  background: rgba(18, 15, 13, 0.84);
  backdrop-filter: blur(14px);
}
