    :root {
      --bg-space: #05070b;
      --bg-surface: #0a0e17;
      --bg-surface-elevated: #121824;
      --border-subtle: #1c2638;
      --border-bright: #2d3b55;
      --text-main: #e2e8f0;
      --text-muted: #94a3b8;
      --text-dim: #64748b;
      
      --theos-gold: #ffd166;
      --gaia-emerald: #06d6a0;
      --cosmo-violet: #b5179e;
      --info-cyan: #4cc9f0;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }
    
    body {
      background-color: var(--bg-space);
      color: var(--text-main);
      font-family: 'Inter', -apple-system, sans-serif;
      min-height: 100vh;
      overflow-x: hidden;
      display: flex;
      flex-direction: column;
    }

    header {
      background: rgba(10, 14, 23, 0.94);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border-subtle);
      padding: 0.85rem 1.8rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      position: sticky;
      top: 0;
      z-index: 100;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }
    .brand-logo {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: conic-gradient(from 180deg, var(--theos-gold), var(--gaia-emerald), var(--cosmo-violet), var(--info-cyan), var(--theos-gold));
      animation: spin 20s linear infinite;
      box-shadow: 0 0 12px rgba(76, 201, 240, 0.5);
    }
    @keyframes spin { 100% { transform: rotate(360deg); } }

    .brand-title {
      font-family: 'Outfit', sans-serif;
      font-weight: 800;
      font-size: 1.15rem;
      letter-spacing: 0.05em;
      background: linear-gradient(120deg, #fff, #94a3b8);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }
    .brand-badge {
      font-size: 0.68rem;
      font-family: 'JetBrains Mono', monospace;
      padding: 0.2rem 0.5rem;
      border-radius: 4px;
      background: rgba(76, 201, 240, 0.1);
      border: 1px solid rgba(76, 201, 240, 0.25);
      color: var(--info-cyan);
    }

    /* Zero-Input Autonomous Indicator */
    .deck-mode-indicator {
      display: flex;
      align-items: center;
      gap: 0.55rem;
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.75rem;
      color: var(--gaia-emerald);
      background: rgba(6, 214, 160, 0.08);
      border: 1px solid rgba(6, 214, 160, 0.25);
      padding: 0.35rem 0.8rem;
      border-radius: 6px;
      letter-spacing: 0.03em;
    }
    .status-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--gaia-emerald);
      box-shadow: 0 0 8px var(--gaia-emerald);
      animation: pulse-dot 1.8s infinite ease-in-out;
    }
    @keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

    /* Habitat Slider Header Bar */
    .habitat-bar {
      background: #090d16;
      border-bottom: 1px solid var(--border-subtle);
      padding: 0.6rem 1.8rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .nav-arrow-btn {
      background: var(--bg-surface-elevated);
      border: 1px solid var(--border-subtle);
      color: var(--text-main);
      padding: 0.35rem 0.85rem;
      border-radius: 6px;
      font-size: 0.8rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 0.4rem;
      transition: all 0.2s ease;
      font-family: 'JetBrains Mono', monospace;
    }
    .nav-arrow-btn:hover {
      border-color: var(--border-bright);
      background: #1a2233;
      color: #fff;
    }
    .habitat-title-box {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }
    .habitat-species-name {
      font-family: 'Outfit', sans-serif;
      font-size: 1.05rem;
      font-weight: 700;
      color: var(--active-species-color, var(--gaia-emerald));
      transition: color 0.3s ease;
    }
    .habitat-telos {
      font-size: 0.76rem;
      color: var(--text-muted);
      border-left: 1px solid var(--border-subtle);
      padding-left: 0.75rem;
    }

    main {
      padding: 1.2rem 1.8rem;
      flex: 1;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 440px;
      gap: 1.5rem;
      max-width: 1800px;
      margin: 0 auto;
      width: 100%;
    }

    @media (max-width: 1200px) {
      main { grid-template-columns: minmax(0, 1fr); }
    }

    .site-footer {
      border-top: 1px solid var(--border-subtle);
      background: rgba(10, 14, 23, 0.94);
      padding: 0.9rem 1.8rem;
      text-align: center;
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.7rem;
      letter-spacing: 0.04em;
      color: var(--text-dim);
    }

    .terrarium-viewport {
      display: flex;
      flex-direction: column;
      gap: 1.2rem;
    }

    .canvas-3d-box {
      background: radial-gradient(circle at center, #090e1a 0%, #020306 100%);
      border: 1px solid var(--border-subtle);
      border-radius: 12px;
      position: relative;
      overflow: hidden;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
      height: 580px;
      width: 100%;
      transition: border-color 0.4s ease;
    }
    #three-canvas {
      width: 100%;
      height: 100%;
      display: block;
    }

    /* In-Canvas Slider Navigation Overlay */
    .slider-nav-left, .slider-nav-right {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      background: rgba(10, 14, 23, 0.75);
      border: 1px solid var(--border-bright);
      color: #fff;
      width: 44px;
      height: 60px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      border-radius: 8px;
      font-size: 1.4rem;
      transition: all 0.2s ease;
      z-index: 10;
      backdrop-filter: blur(8px);
      user-select: none;
    }
    .slider-nav-left { left: 1rem; }
    .slider-nav-right { right: 1rem; }
    .slider-nav-left:hover, .slider-nav-right:hover {
      background: rgba(30, 42, 66, 0.9);
      border-color: var(--active-species-color, var(--gaia-emerald));
      color: var(--active-species-color, var(--gaia-emerald));
      transform: translateY(-50%) scale(1.05);
    }

    .viewport-overlay {
      position: absolute;
      top: 1rem;
      left: 1.2rem;
      pointer-events: none;
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
      font-size: 0.75rem;
      font-family: 'JetBrains Mono', monospace;
      color: var(--text-dim);
      z-index: 5;
    }
    .habitat-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--active-species-color, var(--gaia-emerald));
      background: rgba(0, 0, 0, 0.55);
      padding: 0.25rem 0.6rem;
      border-radius: 4px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      width: fit-content;
    }

    /* Slider Indicators (Dots) */
    .slider-dots-container {
      position: absolute;
      bottom: 1.2rem;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      gap: 0.8rem;
      background: rgba(10, 14, 23, 0.85);
      padding: 0.45rem 1rem;
      border-radius: 20px;
      border: 1px solid var(--border-subtle);
      z-index: 10;
      backdrop-filter: blur(8px);
    }
    .slider-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: #2a374f;
      cursor: pointer;
      transition: all 0.3s ease;
      position: relative;
    }
    .slider-dot:hover {
      transform: scale(1.3);
    }
    .slider-dot.active {
      transform: scale(1.4);
      box-shadow: 0 0 10px var(--dot-color, #fff);
      background: var(--dot-color, #fff);
    }

    /* Habitat Switcher Tabs under canvas */
    .habitat-tabs {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 0.75rem;
    }
    .habitat-tab-btn {
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: 8px;
      padding: 0.8rem 1rem;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      gap: 0.3rem;
      transition: all 0.25s ease;
      text-align: left;
    }
    .habitat-tab-btn:hover {
      border-color: var(--border-bright);
      background: #111724;
    }
    .habitat-tab-btn.active {
      border-color: var(--tab-color);
      background: rgba(255, 255, 255, 0.03);
      box-shadow: 0 0 16px rgba(0, 0, 0, 0.4), inset 0 0 12px rgba(255, 255, 255, 0.02);
    }
    .tab-species-name {
      font-family: 'Outfit', sans-serif;
      font-size: 0.88rem;
      font-weight: 700;
      color: var(--tab-color);
    }
    .tab-cells-count {
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.72rem;
      color: var(--text-muted);
    }

    /* Active Organism Spotlight Card */
    .spotlight-card {
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: 10px;
      padding: 1.2rem;
      display: flex;
      flex-direction: column;
      gap: 0.8rem;
      border-left: 4px solid var(--active-species-color, var(--gaia-emerald));
    }
    .spotlight-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .spotlight-title {
      font-family: 'Outfit', sans-serif;
      font-size: 1.15rem;
      font-weight: 700;
      color: var(--active-species-color, var(--gaia-emerald));
    }
    .spotlight-phase {
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.72rem;
      padding: 0.2rem 0.5rem;
      border-radius: 4px;
      background: rgba(255, 255, 255, 0.08);
      color: var(--text-muted);
      text-transform: uppercase;
    }

    .vital-bar-container {
      margin-bottom: 0.2rem;
    }
    .vital-bar-label {
      display: flex;
      justify-content: space-between;
      font-size: 0.74rem;
      color: var(--text-muted);
      margin-bottom: 0.25rem;
    }
    .vital-bar-track {
      height: 6px;
      background: #192130;
      border-radius: 3px;
      overflow: hidden;
    }
    .vital-bar-fill {
      height: 100%;
      border-radius: 3px;
      background: var(--active-species-color, #4cc9f0);
      transition: width 0.4s ease;
    }

    .spotlight-meta-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.6rem;
      font-size: 0.75rem;
      font-family: 'JetBrains Mono', monospace;
      color: var(--text-dim);
      background: #06090e;
      padding: 0.75rem;
      border-radius: 6px;
      border: 1px solid #161f2c;
    }

    /* Multi-Organism Colony Selector */
    .colony-selector {
      position: relative;
      display: flex;
      flex-wrap: nowrap;
      gap: 0.45rem;
      margin-bottom: 0.75rem;
      align-items: center;
      overflow-x: auto;
      overscroll-behavior-x: contain;
      scroll-snap-type: x proximity;
      scrollbar-width: thin;
      padding-bottom: 0.35rem;
    }
    .colony-selector > span:first-child { flex: 0 0 auto; white-space: nowrap; }
    .colony-chip {
      flex: 0 0 auto;
      scroll-snap-align: center;
      white-space: nowrap;
      background: #0d1422;
      border: 1px solid var(--border-subtle);
      border-radius: 6px;
      padding: 0.3rem 0.6rem;
      font-size: 0.74rem;
      font-family: 'JetBrains Mono', monospace;
      color: var(--text-muted);
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 0.4rem;
      transition: all 0.2s ease;
    }
    .chip-name {
      max-width: 11rem;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .chip-born {
      font-size: 0.62rem;
      color: var(--text-dim);
    }
    .spotlight-birth {
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.74rem;
      color: var(--text-muted);
    }
    .spotlight-birth strong { color: var(--text-main); font-weight: 600; }
    .spotlight-birth span { color: var(--text-dim); }
    .colony-chip:hover {
      border-color: var(--border-bright);
      color: #fff;
    }
    .colony-chip.active {
      background: rgba(76, 201, 240, 0.12);
      border-color: var(--active-species-color, #4cc9f0);
      color: #fff;
      font-weight: 600;
    }
    .lineage-tag {
      font-size: 0.64rem;
      padding: 0.1rem 0.35rem;
      border-radius: 3px;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.15);
      font-family: 'JetBrains Mono', monospace;
    }
    .lineage-ancestor {
      background: rgba(6, 214, 160, 0.15);
      border-color: rgba(6, 214, 160, 0.4);
      color: #06d6a0;
    }
    .lineage-parasite {
      background: rgba(239, 71, 111, 0.18);
      border-color: rgba(239, 71, 111, 0.45);
      color: #ef476f;
    }
    .lineage-hyper {
      background: rgba(255, 209, 102, 0.18);
      border-color: rgba(255, 209, 102, 0.45);
      color: #ffd166;
    }
    .lineage-mutant {
      background: rgba(181, 23, 158, 0.18);
      border-color: rgba(181, 23, 158, 0.45);
      color: #b5179e;
    }

    /* Right Sidebar: Neural Stream & Crystals */
    .sidebar-panel {
      display: flex;
      flex-direction: column;
      gap: 1.2rem;
    }

    .panel-box {
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: 12px;
      padding: 1.1rem;
      display: flex;
      flex-direction: column;
    }
    .panel-header {
      font-family: 'Outfit', sans-serif;
      font-size: 0.92rem;
      font-weight: 700;
      color: var(--text-main);
      margin-bottom: 0.75rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .pulse-stream {
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.75rem;
      height: 380px;
      overflow-y: auto;
      display: flex;
      flex-direction: column-reverse;
      gap: 0.55rem;
      background: #06090e;
      padding: 0.75rem;
      border-radius: 6px;
      border: 1px solid #161f2c;
    }
    .pulse-item {
      padding-bottom: 0.45rem;
      border-bottom: 1px dashed #1a2332;
      line-height: 1.4;
    }
    .pulse-tag {
      font-weight: 600;
      margin-right: 0.35rem;
    }

    .crystals-feed {
      max-height: 250px;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }
    .crystal-chip {
      background: #06090e;
      border: 1px solid var(--border-subtle);
      border-radius: 6px;
      padding: 0.45rem 0.6rem;
      font-size: 0.75rem;
    }
    .crystal-title {
      font-weight: 600;
      color: #38bdf8;
      margin-bottom: 0.15rem;
    }
    .crystal-insight {
      color: var(--text-muted);
      font-size: 0.7rem;
      overflow-wrap: anywhere;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 4;
      line-clamp: 4;
      overflow: hidden;
    }

    .signal-relay[hidden] { display: none; }
    .pr-tag {
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.6rem;
      letter-spacing: 0.08em;
      padding: 0.1rem 0.35rem;
      border-radius: 3px;
      border: 1px solid var(--border-bright);
      color: var(--text-dim);
    }
    .signal-relay-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.72rem;
    }
    .signal-relay-list li { display: flex; flex-direction: column; gap: 0.1rem; }
    .signal-relay-list a {
      color: var(--text-muted);
      text-decoration: none;
      border-bottom: 1px dotted var(--border-bright);
      width: fit-content;
      max-width: 100%;
      overflow-wrap: anywhere;
    }
    .signal-relay-list a::before { content: "↳ "; color: var(--text-dim); }
    .signal-relay-list a:hover { color: var(--active-species-color, var(--gaia-emerald)); }
    .signal-relay-note { color: var(--text-dim); font-size: 0.64rem; overflow-wrap: anywhere; }

    .hint-touch { display: none; }
    @media (hover: none) and (pointer: coarse) {
      .hint-pointer { display: none; }
      .hint-touch { display: inline; }
    }

    @media (max-width: 768px) {
      header {
        position: static;
        padding: 0.7rem 0.9rem;
        flex-wrap: wrap;
        gap: 0.5rem;
      }
      .brand { flex-wrap: wrap; gap: 0.45rem; }
      .brand-title { font-size: 0.95rem; flex-basis: calc(100% - 2rem); }
      .brand-badge { font-size: 0.6rem; white-space: nowrap; }
      .deck-mode-indicator { display: none; }

      .habitat-bar { padding: 0.55rem 0.9rem; justify-content: center; }
      .habitat-bar .nav-arrow-btn { display: none; }
      .habitat-title-box { flex-direction: column; gap: 0.15rem; text-align: center; }
      .habitat-telos { border-left: none; padding-left: 0; font-size: 0.7rem; }

      main { padding: 0.75rem; gap: 1rem; }
      .terrarium-viewport, .sidebar-panel { gap: 1rem; }

      .canvas-3d-box { height: 58vh; min-height: 320px; max-height: 520px; }
      .viewport-overlay { top: 0.6rem; left: 0.7rem; right: 0.7rem; font-size: 0.64rem; }
      .habitat-badge { font-size: 0.7rem; }
      .slider-nav-left, .slider-nav-right { width: 38px; height: 50px; font-size: 1.15rem; }
      .slider-nav-left { left: 0.5rem; }
      .slider-nav-right { right: 0.5rem; }
      .slider-dots-container { bottom: 0.8rem; gap: 1rem; }
      .slider-dot { width: 12px; height: 12px; }

      .habitat-tabs { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
      .habitat-tab-btn { padding: 0.65rem 0.75rem; }

      .spotlight-card { padding: 0.9rem; }
      .spotlight-header { flex-wrap: wrap; gap: 0.5rem; }
      .spotlight-header > div:first-child > div:first-child { flex-wrap: wrap; }

      .panel-box { padding: 0.85rem; }
      .pulse-stream { height: 260px; }
      .crystals-feed { max-height: 220px; }
      .site-footer { padding: 0.8rem 0.9rem; }
    }

    @media (max-width: 480px) {
      .spotlight-meta-grid { grid-template-columns: 1fr; }
    }
  
