/* ==========================================================================
   MonsaStudio Official Portal Stylesheet (Futuristic Minimalist Commercial UI)
   ========================================================================== */

:root {
  --bg-deep: #030712;
  --bg-void: #000000;
  --cyan-core: #38bdf8;
  --cyan-glow: rgba(56, 189, 248, 0.45);
  --blue-primary: #0ea5e9;
  --purple-accent: #a855f7;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #64748b;
  --card-bg: rgba(15, 23, 42, 0.72);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover-border: rgba(56, 189, 248, 0.4);
  --dock-width: 64px;
  --dock-width-expanded: 240px;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-void);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Canvas (Stars, Comets, Asteroids & Mascot Spaceships)
   ========================================================================== */
#spaceCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 1;
  pointer-events: auto;
}

/* ==========================================================================
   Top Right Utilities (Language Selector & Network Pulse)
   ========================================================================== */
.top-nav {
  position: fixed;
  top: max(16px, env(safe-area-inset-top, 0px));
  right: max(20px, env(safe-area-inset-right, 0px));
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 50;
}

.lang-selector {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  border-radius: 22px;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  min-height: 36px;
  min-width: 40px;
  padding: 4px 10px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  color: var(--text-main);
}

.lang-btn.active {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  font-weight: 600;
}

/* ==========================================================================
   Left Sidebar Glassmorphism Dock
   ========================================================================== */
.sidebar-dock {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--dock-width);
  height: 100vh;
  height: 100dvh;
  background: rgba(8, 12, 22, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--card-border);
  z-index: 40;
  display: flex;
  flex-direction: column;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
  overflow: hidden;
}

.sidebar-dock:hover {
  width: var(--dock-width-expanded);
  background: rgba(8, 12, 22, 0.92);
  border-right-color: rgba(56, 189, 248, 0.25);
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.6);
}

.dock-brand {
  height: 72px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 16px;
  text-decoration: none;
  color: var(--text-main);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dock-logo {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}

.dock-logo svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.dock-brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.25s ease;
}

.sidebar-dock:hover .dock-brand-name {
  opacity: 1;
  transform: translateX(0);
}

.dock-menu {
  flex: 1;
  padding: 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dock-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.dock-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transform: translateX(4px);
}

.dock-item:hover .dock-icon {
  transform: scale(1.15);
}

.dock-icon {
  font-size: 18px;
  min-width: 26px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s ease;
}

.dock-label {
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.25s ease;
}

.sidebar-dock:hover .dock-label {
  opacity: 1;
  transform: translateX(0);
}

.dock-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-sub);
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 10px #22c55e;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.status-text {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-dock:hover .status-text {
  opacity: 1;
}

/* ==========================================================================
   Central Stage & Orbital System
   ========================================================================== */
.stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding-left: var(--dock-width);
}

.title-banner {
  text-align: center;
  margin-bottom: 24px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.title-banner.expanded {
  opacity: 0.15;
  transform: translateY(-20px) scale(0.96);
}

.title-eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: #38bdf8;
  margin-bottom: 8px;
  opacity: 0.85;
}

.title-banner h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.title-sub {
  font-size: 14.5px;
  color: var(--text-muted);
  font-weight: 400;
}

.orb-stage {
  position: relative;
  width: 660px;
  height: 660px;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbital-system {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 12;
}

/* Celestial Constellation SVG & Rays */
.constellation-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}

.orbital-system.active .constellation-svg {
  opacity: 1;
}

/* Perimeter Orbit Ring (1안: 노란 방사선 완전 제거, 메인 메뉴 중심의 원형 궤도선) */
.perimeter-orbit-ring {
  fill: none;
  stroke: url(#orbitPerimeterGrad);
  stroke-width: 2;
  filter: url(#orbitGlow);
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.orbital-system.active .perimeter-orbit-ring {
  opacity: 0.85;
  animation: pulsePerimeterRing 3.5s infinite ease-in-out;
}

/* Photon Pulse Trail traveling around the perimeter ring */
.perimeter-photon-trail {
  fill: none;
  stroke: #fde047;
  stroke-width: 2.5;
  stroke-dasharray: 20 180;
  stroke-linecap: round;
  opacity: 0;
  transform-origin: 330px 330px;
  filter: drop-shadow(0 0 8px #f59e0b);
  transition: opacity 0.6s ease;
}

.orbital-system.active .perimeter-photon-trail {
  opacity: 1;
  animation: spinPerimeterClockwise 24s linear infinite;
}

@keyframes spinPerimeterClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulsePerimeterRing {
  0%, 100% {
    opacity: 0.55;
    filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.4));
  }
  50% {
    opacity: 0.95;
    filter: drop-shadow(0 0 14px rgba(251, 191, 36, 0.85));
  }
}

.constellation-star {
  fill: #ffffff;
  opacity: 0;
  transition: opacity 0.4s ease 0.3s;
}

.orbital-system.active .constellation-star {
  opacity: 1;
  animation: starBeaconPulse 2s infinite ease-in-out;
}

@keyframes starBeaconPulse {
  0%, 100% {
    r: 4.5px;
    fill: #ffffff;
    filter: drop-shadow(0 0 6px #38bdf8);
  }
  50% {
    r: 6.5px;
    fill: #f59e0b;
    filter: drop-shadow(0 0 14px #fbbf24);
  }
}

/* Concentric Orbital Rings */
.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  border-radius: 50%;
  border: 1px dashed rgba(56, 189, 248, 0.14);
  pointer-events: none;
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.orbit-ring-1 { width: 360px; height: 360px; }
.orbit-ring-2 { width: 540px; height: 540px; }

.orbital-system.active .orbit-ring {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.orbital-system.active .orbit-ring-1 {
  animation: rotateRing 60s linear infinite;
}

.orbital-system.active .orbit-ring-2 {
  animation: rotateRingReverse 90s linear infinite;
}

@keyframes rotateRing {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes rotateRingReverse {
  from { transform: translate(-50%, -50%) rotate(360deg); }
  to { transform: translate(-50%, -50%) rotate(0deg); }
}

/* Central Glowing Orb Core */
.core-orb {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #38bdf8 0%, #0369a1 55%, #082f49 100%);
  cursor: pointer;
  box-shadow: 0 0 50px rgba(56, 189, 248, 0.5), inset 0 0 30px rgba(255, 255, 255, 0.4);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  user-select: none;
}

.core-orb::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, #38bdf8 120deg, transparent 240deg, #38bdf8 360deg);
  opacity: 0.45;
  animation: spinGlow 4s linear infinite;
  filter: blur(8px);
  z-index: -1;
}

@keyframes spinGlow {
  to { transform: rotate(360deg); }
}

.core-orb:hover {
  transform: scale(1.08);
  box-shadow: 0 0 70px rgba(56, 189, 248, 0.75), inset 0 0 40px rgba(255, 255, 255, 0.6);
}

.core-orb.expanded {
  background: radial-gradient(circle at 35% 35%, #fcd34d 0%, #f59e0b 55%, #b45309 100%);
  box-shadow: 0 0 36px rgba(251, 191, 36, 0.45), inset 0 0 20px rgba(255, 255, 255, 0.25);
}

.core-orb.expanded::before {
  background: conic-gradient(from 0deg, transparent 0deg, #fef08a 120deg, transparent 240deg, #f59e0b 360deg);
  opacity: 0.3;
}

.core-orb.expanded:hover {
  box-shadow: 0 0 48px rgba(251, 191, 36, 0.6), inset 0 0 25px rgba(255, 255, 255, 0.35);
}

.orb-inner-content {
  text-align: center;
  pointer-events: none;
}

.orb-pulse-icon {
  font-size: 20px;
  margin-bottom: 2px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.orb-text {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}

.orb-sub {
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Radial Service Nodes (Fixed Celestial Anchors + Starlight Bloom Ignition)
   ========================================================================== */
.radial-node {
  position: absolute;
  width: 184px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 14px;
  padding: 9px 12px;
  text-decoration: none;
  color: var(--text-main);
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease,
              background 0.3s ease;
  z-index: 15;
}

/* 9 Enneagonal Orbital Anchoring (R=270px from Center (330,330) in 660x660 stage) */
/* 1. 12시 정점 (Top Anchor - 90°) */
.node-1,
.node-1:hover,
.node-1:active,
.orbital-system.active .node-1,
.orbital-system.active .node-1:hover,
.orbital-system.active .node-1:active {
  top: 12px;
  left: 50%;
  bottom: auto;
  right: auto;
  transform: translateX(-50%) !important;
}

/* 2. 1시 20분 (Top-Right - 50°) */
.node-2,
.node-2:hover,
.node-2:active,
.orbital-system.active .node-2,
.orbital-system.active .node-2:hover,
.orbital-system.active .node-2:active {
  top: 86px;
  right: 24px;
  left: auto;
  bottom: auto;
  transform: none !important;
}

/* 3. 2시 40분 (Mid-Upper-Right - 10°) */
.node-3,
.node-3:hover,
.node-3:active,
.orbital-system.active .node-3,
.orbital-system.active .node-3:hover,
.orbital-system.active .node-3:active {
  top: 250px;
  right: -16px;
  left: auto;
  bottom: auto;
  transform: none !important;
}

/* 4. 4시 (Mid-Lower-Right + 30°) */
.node-4,
.node-4:hover,
.node-4:active,
.orbital-system.active .node-4,
.orbital-system.active .node-4:hover,
.orbital-system.active .node-4:active {
  bottom: 130px;
  right: -4px;
  left: auto;
  top: auto;
  transform: none !important;
}

/* 5. 5시 20분 (Bottom-Right + 70°) */
.node-5,
.node-5:hover,
.node-5:active,
.orbital-system.active .node-5,
.orbital-system.active .node-5:hover,
.orbital-system.active .node-5:active {
  bottom: 12px;
  right: 142px;
  left: auto;
  top: auto;
  transform: none !important;
}

/* 6. 6시 40분 (Bottom-Left + 110°) */
.node-6,
.node-6:hover,
.node-6:active,
.orbital-system.active .node-6,
.orbital-system.active .node-6:hover,
.orbital-system.active .node-6:active {
  bottom: 12px;
  left: 142px;
  right: auto;
  top: auto;
  transform: none !important;
}

/* 7. 8시 (Mid-Lower-Left + 150°) */
.node-7,
.node-7:hover,
.node-7:active,
.orbital-system.active .node-7,
.orbital-system.active .node-7:hover,
.orbital-system.active .node-7:active {
  bottom: 130px;
  left: -4px;
  right: auto;
  top: auto;
  transform: none !important;
}

/* 8. 9시 20분 (Mid-Upper-Left + 190°) */
.node-8,
.node-8:hover,
.node-8:active,
.orbital-system.active .node-8,
.orbital-system.active .node-8:hover,
.orbital-system.active .node-8:active {
  top: 250px;
  left: -16px;
  right: auto;
  bottom: auto;
  transform: none !important;
}

/* 9. 10시 40분 (Top-Left + 230°) */
.node-9,
.node-9:hover,
.node-9:active,
.orbital-system.active .node-9,
.orbital-system.active .node-9:hover,
.orbital-system.active .node-9:active {
  top: 86px;
  left: 24px;
  right: auto;
  bottom: auto;
  transform: none !important;
}

/* Starlight Bloom Ignition when orbital menu is activated */
.orbital-system.active .radial-node {
  opacity: 1;
  pointer-events: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(245, 158, 11, 0.28);
}

.orbital-system.active .node-1 {
  animation: starlightBloom 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.03s;
}

.orbital-system.active .node-2 {
  animation: starlightBloom 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.06s;
}

.orbital-system.active .node-3 {
  animation: starlightBloom 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.09s;
}

.orbital-system.active .node-4 {
  animation: starlightBloom 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.12s;
}

.orbital-system.active .node-5 {
  animation: starlightBloom 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.15s;
}

.orbital-system.active .node-6 {
  animation: starlightBloom 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.18s;
}

.orbital-system.active .node-7 {
  animation: starlightBloom 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.21s;
}

.orbital-system.active .node-8 {
  animation: starlightBloom 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.24s;
}

.orbital-system.active .node-9 {
  animation: starlightBloom 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.27s;
}

/* Keyframes: Starlight Bloom Flash (브릴리언트 토파즈 골드 소프트 개화) */
@keyframes starlightBloom {
  0% {
    opacity: 0;
    filter: blur(8px) brightness(1.5);
    box-shadow: 0 0 28px rgba(251, 191, 36, 0.5);
  }
  60% {
    opacity: 1;
    filter: blur(0px) brightness(1.12);
    box-shadow: 0 0 22px rgba(245, 158, 11, 0.4);
  }
  100% {
    opacity: 1;
    filter: blur(0px) brightness(1.0);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(245, 158, 11, 0.28);
  }
}

/* Starlight Glow on Hover - Brilliant Topaz Amber Glow, Position stays rock-solid */
.radial-node:hover {
  border-color: rgba(252, 211, 77, 0.75);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65), 0 0 28px rgba(245, 158, 11, 0.45);
  background: rgba(15, 23, 42, 0.94);
  filter: brightness(1.1);
}

.radial-node:active {
  filter: brightness(0.95);
}

.node-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.node-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.node-title {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.node-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.click-hint {
  position: absolute;
  bottom: -36px;
  font-size: 12px;
  color: #64748b;
  letter-spacing: 0.04em;
  transition: opacity 0.3s ease;
  max-width: calc(100vw - 24px);
  text-align: center;
  white-space: nowrap;
}

.orbital-system.active + .click-hint,
.orbital-system.active ~ .click-hint {
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   Responsive Adaptations (Tablet, Short Screens & Mobile Phones)
   ========================================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
  .orb-stage {
    width: min(600px, calc(100vw - var(--dock-width) - 36px));
    height: min(600px, calc(100dvh - 130px));
  }

  .orbit-ring-1 { width: 320px; height: 320px; }
  .orbit-ring-2 { width: 480px; height: 480px; }

  .radial-node {
    width: 168px;
    padding: 8px 10px;
  }

  .node-3, .node-3:hover, .node-3:active,
  .orbital-system.active .node-3, .orbital-system.active .node-3:hover, .orbital-system.active .node-3:active {
    top: 228px;
    right: 0;
  }

  .node-4, .node-4:hover, .node-4:active,
  .orbital-system.active .node-4, .orbital-system.active .node-4:hover, .orbital-system.active .node-4:active {
    bottom: 118px;
    right: 4px;
  }

  .node-5, .node-5:hover, .node-5:active,
  .orbital-system.active .node-5, .orbital-system.active .node-5:hover, .orbital-system.active .node-5:active {
    bottom: 10px;
    right: 112px;
  }

  .node-6, .node-6:hover, .node-6:active,
  .orbital-system.active .node-6, .orbital-system.active .node-6:hover, .orbital-system.active .node-6:active {
    bottom: 10px;
    left: 112px;
  }

  .node-7, .node-7:hover, .node-7:active,
  .orbital-system.active .node-7, .orbital-system.active .node-7:hover, .orbital-system.active .node-7:active {
    bottom: 118px;
    left: 4px;
  }

  .node-8, .node-8:hover, .node-8:active,
  .orbital-system.active .node-8, .orbital-system.active .node-8:hover, .orbital-system.active .node-8:active {
    top: 228px;
    left: 0;
  }
}

@media (max-width: 1024px) and (max-height: 840px) {
  .title-banner {
    margin-bottom: 12px;
    max-height: 110px;
  }

  .title-banner h1 {
    font-size: 32px;
  }

  .title-banner.expanded {
    max-height: 0;
    margin-bottom: 0;
    opacity: 0;
    overflow: hidden;
  }

  .orb-stage {
    width: min(560px, calc(100vw - var(--dock-width) - 32px));
    height: min(560px, calc(100dvh - 80px));
  }

  .orbit-ring-1 { width: 300px; height: 300px; }
  .orbit-ring-2 { width: 450px; height: 450px; }

  .core-orb {
    width: 118px;
    height: 118px;
  }

  .radial-node {
    width: 162px;
    padding: 7px 10px;
  }

  .node-2, .node-2:hover, .node-2:active,
  .orbital-system.active .node-2, .orbital-system.active .node-2:hover, .orbital-system.active .node-2:active {
    top: 72px;
    right: 16px;
  }

  .node-3, .node-3:hover, .node-3:active,
  .orbital-system.active .node-3, .orbital-system.active .node-3:hover, .orbital-system.active .node-3:active {
    top: 206px;
    right: 0;
  }

  .node-4, .node-4:hover, .node-4:active,
  .orbital-system.active .node-4, .orbital-system.active .node-4:hover, .orbital-system.active .node-4:active {
    bottom: 108px;
    right: 4px;
  }

  .node-5, .node-5:hover, .node-5:active,
  .orbital-system.active .node-5, .orbital-system.active .node-5:hover, .orbital-system.active .node-5:active {
    bottom: 8px;
    right: 98px;
  }

  .node-6, .node-6:hover, .node-6:active,
  .orbital-system.active .node-6, .orbital-system.active .node-6:hover, .orbital-system.active .node-6:active {
    bottom: 8px;
    left: 98px;
  }

  .node-7, .node-7:hover, .node-7:active,
  .orbital-system.active .node-7, .orbital-system.active .node-7:hover, .orbital-system.active .node-7:active {
    bottom: 108px;
    left: 4px;
  }

  .node-8, .node-8:hover, .node-8:active,
  .orbital-system.active .node-8, .orbital-system.active .node-8:hover, .orbital-system.active .node-8:active {
    top: 206px;
    left: 0;
  }

  .node-9, .node-9:hover, .node-9:active,
  .orbital-system.active .node-9, .orbital-system.active .node-9:hover, .orbital-system.active .node-9:active {
    top: 72px;
    left: 16px;
  }
}

@media (max-height: 700px) {
  .title-banner {
    margin-bottom: 8px;
    max-height: 96px;
  }

  .title-banner h1 {
    font-size: 28px;
  }

  .title-banner.expanded {
    max-height: 0;
    margin-bottom: 0;
    opacity: 0;
    overflow: hidden;
  }

  .orb-stage {
    width: min(520px, calc(100vw - var(--dock-width) - 32px));
    height: min(500px, calc(100dvh - 56px));
  }

  .orbit-ring-1 { width: 270px; height: 270px; }
  .orbit-ring-2 { width: 410px; height: 410px; }

  .core-orb {
    width: 104px;
    height: 104px;
  }

  .radial-node {
    width: 154px;
    padding: 6px 9px;
  }

  .node-desc {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .node-1, .node-1:hover, .node-1:active,
  .orbital-system.active .node-1, .orbital-system.active .node-1:hover, .orbital-system.active .node-1:active {
    top: 6px;
  }

  .node-2, .node-2:hover, .node-2:active,
  .orbital-system.active .node-2, .orbital-system.active .node-2:hover, .orbital-system.active .node-2:active {
    top: 64px;
    right: 14px;
  }

  .node-3, .node-3:hover, .node-3:active,
  .orbital-system.active .node-3, .orbital-system.active .node-3:hover, .orbital-system.active .node-3:active {
    top: 184px;
    right: 0;
  }

  .node-4, .node-4:hover, .node-4:active,
  .orbital-system.active .node-4, .orbital-system.active .node-4:hover, .orbital-system.active .node-4:active {
    bottom: 96px;
    right: 4px;
  }

  .node-5, .node-5:hover, .node-5:active,
  .orbital-system.active .node-5, .orbital-system.active .node-5:hover, .orbital-system.active .node-5:active {
    bottom: 6px;
    right: 90px;
  }

  .node-6, .node-6:hover, .node-6:active,
  .orbital-system.active .node-6, .orbital-system.active .node-6:hover, .orbital-system.active .node-6:active {
    bottom: 6px;
    left: 90px;
  }

  .node-7, .node-7:hover, .node-7:active,
  .orbital-system.active .node-7, .orbital-system.active .node-7:hover, .orbital-system.active .node-7:active {
    bottom: 96px;
    left: 4px;
  }

  .node-8, .node-8:hover, .node-8:active,
  .orbital-system.active .node-8, .orbital-system.active .node-8:hover, .orbital-system.active .node-8:active {
    top: 184px;
    left: 0;
  }

  .node-9, .node-9:hover, .node-9:active,
  .orbital-system.active .node-9, .orbital-system.active .node-9:hover, .orbital-system.active .node-9:active {
    top: 64px;
    left: 14px;
  }
}

@media (max-width: 768px) {
  .top-nav {
    top: max(10px, env(safe-area-inset-top, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
  }

  .stage {
    padding-left: 0;
    padding-top: calc(46px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  }

  .title-banner {
    margin-bottom: 12px;
    max-height: 110px;
    padding: 0 14px;
  }

  .title-eyebrow {
    font-size: 10.5px;
    letter-spacing: 0.18em;
    margin-bottom: 4px;
  }

  .title-banner h1 {
    font-size: clamp(26px, 7.5vw, 34px);
    margin-bottom: 4px;
  }

  .title-sub {
    font-size: 12.5px;
  }

  .title-banner.expanded {
    max-height: 0;
    margin-bottom: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-10px) scale(0.96);
  }

  .sidebar-dock {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: calc(58px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    flex-direction: row;
    border-right: none;
    border-top: 1px solid var(--card-border);
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .sidebar-dock::-webkit-scrollbar {
    display: none;
  }

  .sidebar-dock:hover {
    width: 100vw;
  }

  .dock-brand, .dock-footer, .dock-label {
    display: none;
  }

  .dock-menu {
    flex-direction: row;
    width: max-content;
    min-width: 100%;
    justify-content: space-around;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
  }

  .dock-item {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 10px;
    justify-content: center;
  }

  .dock-item:hover {
    transform: none;
  }

  .orb-stage {
    width: min(348px, calc(100vw - 16px));
    height: min(500px, calc(100dvh - 165px));
  }

  .orbital-system.active ~ .core-orb,
  .core-orb.expanded {
    width: 76px;
    height: 76px;
    transform: translateY(18px);
  }

  .core-orb {
    width: 104px;
    height: 104px;
  }

  .core-orb.expanded:hover {
    transform: translateY(18px) scale(1.04);
  }

  .core-orb.expanded .orb-pulse-icon {
    font-size: 15px;
    margin-bottom: 0;
  }

  .core-orb.expanded .orb-text {
    font-size: 11px;
  }

  .core-orb.expanded .orb-sub {
    font-size: 8px;
  }

  .orbit-ring-1 { width: 220px; height: 220px; }
  .orbit-ring-2 { width: 320px; height: 320px; }

  .radial-node {
    width: calc(50% - 6px);
    padding: 5px 8px;
    border-radius: 11px;
  }

  .node-header {
    gap: 6px;
    margin-bottom: 2px;
  }

  .node-icon-box {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 6px;
    font-size: 12px;
  }

  .node-title {
    font-size: 10.5px;
    line-height: 1.2;
  }

  .node-desc {
    font-size: 9px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .click-hint {
    bottom: -28px;
    font-size: 11px;
    white-space: normal;
  }

  .node-1, .node-1:hover, .node-1:active,
  .orbital-system.active .node-1,
  .orbital-system.active .node-1:hover,
  .orbital-system.active .node-1:active {
    top: 0%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: min(190px, 58%);
    transform: translateX(-50%) !important;
  }

  .node-2, .node-2:hover, .node-2:active,
  .orbital-system.active .node-2,
  .orbital-system.active .node-2:hover,
  .orbital-system.active .node-2:active {
    top: 14.5%;
    right: 2px;
    left: auto;
    bottom: auto;
    transform: none !important;
  }

  .node-3, .node-3:hover, .node-3:active,
  .orbital-system.active .node-3,
  .orbital-system.active .node-3:hover,
  .orbital-system.active .node-3:active {
    top: 29%;
    right: 2px;
    left: auto;
    bottom: auto;
    transform: none !important;
  }

  .node-4, .node-4:hover, .node-4:active,
  .orbital-system.active .node-4,
  .orbital-system.active .node-4:hover,
  .orbital-system.active .node-4:active {
    bottom: 17%;
    right: 2px;
    left: auto;
    top: auto;
    transform: none !important;
  }

  .node-5, .node-5:hover, .node-5:active,
  .orbital-system.active .node-5,
  .orbital-system.active .node-5:hover,
  .orbital-system.active .node-5:active {
    bottom: 1.5%;
    right: 2px;
    left: auto;
    top: auto;
    transform: none !important;
  }

  .node-6, .node-6:hover, .node-6:active,
  .orbital-system.active .node-6,
  .orbital-system.active .node-6:hover,
  .orbital-system.active .node-6:active {
    bottom: 1.5%;
    left: 2px;
    right: auto;
    top: auto;
    transform: none !important;
  }

  .node-7, .node-7:hover, .node-7:active,
  .orbital-system.active .node-7,
  .orbital-system.active .node-7:hover,
  .orbital-system.active .node-7:active {
    bottom: 17%;
    left: 2px;
    right: auto;
    top: auto;
    transform: none !important;
  }

  .node-8, .node-8:hover, .node-8:active,
  .orbital-system.active .node-8,
  .orbital-system.active .node-8:hover,
  .orbital-system.active .node-8:active {
    top: 29%;
    left: 2px;
    right: auto;
    bottom: auto;
    transform: none !important;
  }

  .node-9, .node-9:hover, .node-9:active,
  .orbital-system.active .node-9,
  .orbital-system.active .node-9:hover,
  .orbital-system.active .node-9:active {
    top: 14.5%;
    left: 2px;
    right: auto;
    bottom: auto;
    transform: none !important;
  }
}

@media (max-width: 768px) and (max-height: 660px) {
  .orb-stage {
    height: min(440px, calc(100dvh - 118px));
  }

  .node-desc {
    -webkit-line-clamp: 1;
  }

  .core-orb.expanded {
    width: 64px;
    height: 64px;
    transform: translateY(14px);
  }
}

