
    :root {
      --primary: #89ff00;
      --secondary: #eaff00;
      --glow: #56ff00;

      --background: #03040a;
      --panel: rgba(10, 13, 24, 0.72);
      --panel-strong: rgba(10, 13, 24, 0.92);

      --text: #f4f7ff;
      --muted: #8d96ac;
      --danger: #ff4267;
      --success: #60ff9e;

      --pointer-x: 0;
      --pointer-y: 0;
      --entity-scale: 1;
      --aura-strength: 0.5;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      -webkit-tap-highlight-color: transparent;
    }

    html,
    body {
      width: 100%;
      min-height: 100%;
      overflow-x: hidden;
      overscroll-behavior: none;
      background: var(--background);
    }

    body {
      position: relative;
      min-height: 100dvh;
      color: var(--text);
      font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
      touch-action: manipulation;
      user-select: none;
    }

    button,
    input,
    select {
      font: inherit;
    }

    button {
      border: 0;
    }

    input,
    select {
      user-select: text;
    }

    #particleCanvas {
      position: fixed;
      inset: 0;
      z-index: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
    }

    .background-grid {
      position: fixed;
      inset: -40%;
      z-index: 0;
      opacity: 0.32;
      pointer-events: none;
      background-image:
        linear-gradient(
          rgba(120, 255, 0, 0.08) 1px,
          transparent 1px
        ),
        linear-gradient(
          90deg,
          rgba(120, 255, 0, 0.08) 1px,
          transparent 1px
        );
      background-size: 56px 56px;
      transform:
        perspective(700px)
        rotateX(65deg)
        translateY(24%);
      transform-origin: center;
      mask-image:
        radial-gradient(
          circle at center,
          black 0%,
          rgba(0, 0, 0, 0.8) 35%,
          transparent 74%
        );
      animation: gridMove 14s linear infinite;
    }

    .background-vignette {
      position: fixed;
      inset: 0;
      z-index: 0;
      pointer-events: none;
      background:
        radial-gradient(
          circle at 50% 35%,
          color-mix(in srgb, var(--glow) 14%, transparent),
          transparent 34%
        ),
        radial-gradient(
          circle at center,
          transparent 35%,
          rgba(0, 0, 0, 0.8) 100%
        );
    }

    .app {
      position: relative;
      z-index: 2;
      display: flex;
      flex-direction: column;
      width: 100%;
      min-height: 100dvh;
      padding:
        max(16px, env(safe-area-inset-top))
        max(16px, env(safe-area-inset-right))
        max(18px, env(safe-area-inset-bottom))
        max(16px, env(safe-area-inset-left));
    }

    .topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: min(1400px, 100%);
      margin: 0 auto;
      gap: 16px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }

    .brand-symbol {
      position: relative;
      display: grid;
      place-items: center;
      width: 44px;
      height: 44px;
      flex: 0 0 auto;
      border: 1px solid
        color-mix(in srgb, var(--primary) 52%, transparent);
      border-radius: 14px;
      background:
        linear-gradient(
          145deg,
          color-mix(in srgb, var(--primary) 20%, transparent),
          rgba(255, 255, 255, 0.02)
        );
      box-shadow:
        inset 0 0 20px
          color-mix(in srgb, var(--primary) 12%, transparent),
        0 0 30px
          color-mix(in srgb, var(--glow) 18%, transparent);
      overflow: hidden;
    }

    .brand-symbol::before,
    .brand-symbol::after {
      content: "";
      position: absolute;
      width: 19px;
      height: 19px;
      border: 1px solid var(--primary);
      transform: rotate(45deg);
      animation: symbolSpin 7s linear infinite;
    }

    .brand-symbol::after {
      width: 10px;
      height: 10px;
      border-color: var(--secondary);
      animation-direction: reverse;
      animation-duration: 3s;
    }

    .brand-copy {
      min-width: 0;
    }

    .brand-copy h1 {
      overflow: hidden;
      font-size: clamp(17px, 2vw, 22px);
      font-weight: 800;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    .brand-copy p {
      margin-top: 2px;
      color: var(--muted);
      font-size: 11px;
      letter-spacing: 0.16em;
      text-transform: uppercase;
    }

    .connection {
      display: flex;
      align-items: center;
      gap: 8px;
      flex: 0 0 auto;
      padding: 9px 12px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 999px;
      background: rgba(10, 13, 24, 0.68);
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      backdrop-filter: blur(18px);
    }

    .connection-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--danger);
      box-shadow: 0 0 12px var(--danger);
    }

    .connection.online .connection-dot {
      background: var(--success);
      box-shadow: 0 0 12px var(--success);
    }

    .main-layout {
      display: grid;
      grid-template-columns:
        minmax(240px, 310px)
        minmax(350px, 1fr)
        minmax(240px, 310px);
      gap: clamp(14px, 2vw, 24px);
      align-items: stretch;
      width: min(1400px, 100%);
      flex: 1;
      margin: 18px auto 0;
    }

    .glass-panel {
      position: relative;
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 24px;
      background:
        linear-gradient(
          145deg,
          rgba(255, 255, 255, 0.055),
          rgba(255, 255, 255, 0.014)
        ),
        var(--panel);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 30px 80px rgba(0, 0, 0, 0.34);
      backdrop-filter: blur(22px);
      overflow: hidden;
    }

    .glass-panel::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background:
        linear-gradient(
          110deg,
          transparent 0%,
          rgba(255, 255, 255, 0.035) 40%,
          transparent 70%
        );
    }

    .side-panel {
      display: flex;
      flex-direction: column;
      gap: 18px;
      padding: 20px;
    }

    .panel-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .panel-heading h2 {
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.16em;
      text-transform: uppercase;
    }

    .panel-heading span {
      color: var(--primary);
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.12em;
      text-transform: uppercase;
    }

    .entity-identity {
      padding: 16px;
      border: 1px solid
        color-mix(in srgb, var(--primary) 22%, transparent);
      border-radius: 18px;
      background:
        radial-gradient(
          circle at top right,
          color-mix(in srgb, var(--primary) 15%, transparent),
          transparent 55%
        ),
        rgba(255, 255, 255, 0.025);
    }

    .entity-id {
      color: var(--muted);
      font-family: monospace;
      font-size: 10px;
      letter-spacing: 0.07em;
      word-break: break-all;
    }

    .entity-identity h3 {
      margin-top: 12px;
      font-size: clamp(24px, 3vw, 34px);
      line-height: 1;
      letter-spacing: -0.04em;
    }

    .entity-species {
      margin-top: 7px;
      color: var(--primary);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.13em;
      text-transform: uppercase;
    }

    .mini-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .mini-card {
      min-width: 0;
      padding: 13px;
      border: 1px solid rgba(255, 255, 255, 0.07);
      border-radius: 15px;
      background: rgba(255, 255, 255, 0.025);
    }

    .mini-card label {
      display: block;
      margin-bottom: 7px;
      color: var(--muted);
      font-size: 9px;
      font-weight: 800;
      letter-spacing: 0.12em;
      text-transform: uppercase;
    }

    .mini-card strong {
      display: block;
      overflow: hidden;
      font-size: 13px;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    .stat-group {
      display: flex;
      flex-direction: column;
      gap: 13px;
    }

    .stat {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 7px 12px;
      align-items: center;
    }

    .stat-name {
      color: var(--muted);
      font-size: 10px;
      font-weight: 750;
      letter-spacing: 0.1em;
      text-transform: uppercase;
    }

    .stat-value {
      font-family: monospace;
      font-size: 11px;
      font-weight: 800;
    }

    .stat-track {
      grid-column: 1 / -1;
      height: 6px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.07);
      overflow: hidden;
    }

    .stat-fill {
      width: 0%;
      height: 100%;
      border-radius: inherit;
      background:
        linear-gradient(
          90deg,
          var(--primary),
          var(--secondary)
        );
      box-shadow: 0 0 14px var(--glow);
      transition: width 0.8s ease;
    }

    .trait-list {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
    }

    .trait {
      padding: 7px 10px;
      border: 1px solid
        color-mix(in srgb, var(--primary) 30%, transparent);
      border-radius: 999px;
      background:
        color-mix(in srgb, var(--primary) 8%, transparent);
      color: color-mix(in srgb, var(--primary) 75%, white);
      font-size: 9px;
      font-weight: 800;
      letter-spacing: 0.07em;
      text-transform: uppercase;
    }

    .entity-stage {
      position: relative;
      min-height: 630px;
      cursor: grab;
      touch-action: none;
      isolation: isolate;
    }

    .entity-stage:active {
      cursor: grabbing;
    }

    .stage-overlay {
      position: absolute;
      inset: 0;
      z-index: 5;
      pointer-events: none;
      border-radius: inherit;
      background:
        linear-gradient(
          to bottom,
          rgba(3, 4, 10, 0.16),
          transparent 24%,
          transparent 72%,
          rgba(3, 4, 10, 0.34)
        );
    }

    .stage-top {
      position: absolute;
      z-index: 10;
      top: 20px;
      left: 20px;
      right: 20px;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      pointer-events: none;
    }

    .stage-title {
      min-width: 0;
    }

    .stage-kicker {
      color: var(--primary);
      font-size: 9px;
      font-weight: 850;
      letter-spacing: 0.19em;
      text-transform: uppercase;
    }

    .stage-title h2 {
      margin-top: 6px;
      font-size: clamp(25px, 4vw, 48px);
      line-height: 0.95;
      letter-spacing: -0.055em;
    }

    .stage-number {
      flex: 0 0 auto;
      color: rgba(255, 255, 255, 0.1);
      font-size: clamp(46px, 8vw, 84px);
      font-weight: 900;
      line-height: 0.8;
    }

    .evolution-space {
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      perspective: 1100px;
      overflow: hidden;
    }

    .entity-rig {
      position: relative;
      width: min(68vw, 400px);
      height: min(68vw, 400px);
      max-width: 74%;
      max-height: 74%;
      transform-style: preserve-3d;
      transform:
        rotateX(calc(var(--pointer-y) * -9deg))
        rotateY(calc(var(--pointer-x) * 12deg))
        scale(var(--entity-scale));
      transition: transform 0.16s ease-out;
      animation: entityFloat 4.5s ease-in-out infinite;
    }

    .aura {
      position: absolute;
      inset: 4%;
      border-radius: 50%;
      background:
        radial-gradient(
          circle,
          color-mix(
            in srgb,
            var(--glow)
            calc(var(--aura-strength) * 35%),
            transparent
          ) 0%,
          color-mix(
            in srgb,
            var(--glow)
            calc(var(--aura-strength) * 12%),
            transparent
          ) 44%,
          transparent 72%
        );
      filter: blur(15px);
      transform: translateZ(-50px) scale(1.18);
      animation: auraPulse 3s ease-in-out infinite;
    }

    .orbit {
      position: absolute;
      inset: 7%;
      border: 1px solid
        color-mix(in srgb, var(--primary) 28%, transparent);
      border-radius: 50%;
      transform-style: preserve-3d;
      pointer-events: none;
    }

    .orbit-one {
      transform: rotateX(68deg) rotateZ(12deg);
      animation: orbitSpin 9s linear infinite;
    }

    .orbit-two {
      inset: 16%;
      border-color:
        color-mix(in srgb, var(--secondary) 24%, transparent);
      transform: rotateY(68deg) rotateZ(-24deg);
      animation: orbitSpinReverse 6s linear infinite;
    }

    .orbit-three {
      inset: 25%;
      border-style: dashed;
      transform: rotateX(48deg) rotateY(60deg);
      animation: orbitSpin 4s linear infinite;
    }

    .orbit-node {
      position: absolute;
      top: 50%;
      left: -5px;
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--secondary);
      box-shadow:
        0 0 8px var(--secondary),
        0 0 20px var(--glow);
      transform: translateY(-50%);
    }

    .egg-wrap {
      position: absolute;
      inset: 22%;
      display: grid;
      place-items: center;
      transform-style: preserve-3d;
    }

    .egg {
      position: relative;
      width: 72%;
      height: 96%;
      border: 1px solid
        color-mix(in srgb, var(--secondary) 62%, transparent);
      border-radius: 52% 48% 48% 52% / 60% 60% 40% 40%;
      background:
        radial-gradient(
          circle at 35% 24%,
          rgba(255, 255, 255, 0.72),
          transparent 8%
        ),
        radial-gradient(
          circle at 45% 36%,
          color-mix(in srgb, var(--secondary) 64%, transparent),
          transparent 18%
        ),
        repeating-conic-gradient(
          from 30deg,
          color-mix(in srgb, var(--primary) 74%, #090b14) 0deg 18deg,
          color-mix(in srgb, var(--secondary) 42%, #080912) 18deg 37deg,
          #080a13 37deg 56deg
        );
      box-shadow:
        inset -28px -30px 60px rgba(0, 0, 0, 0.7),
        inset 18px 18px 45px rgba(255, 255, 255, 0.12),
        0 0 22px
          color-mix(in srgb, var(--glow) 65%, transparent),
        0 0 70px
          color-mix(in srgb, var(--glow) 32%, transparent);
      transform: translateZ(22px);
      overflow: hidden;
      animation:
        eggBreathe 2.2s ease-in-out infinite,
        eggHue 9s linear infinite;
      transition:
        opacity 0.8s ease,
        transform 0.8s ease;
    }

    .egg::before {
      content: "";
      position: absolute;
      inset: -30%;
      opacity: 0.7;
      background:
        repeating-linear-gradient(
          120deg,
          transparent 0 15px,
          rgba(255, 255, 255, 0.12) 16px,
          transparent 18px 31px
        );
      mix-blend-mode: overlay;
      animation: shellFlow 8s linear infinite;
    }

    .egg::after {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: inherit;
      background:
        radial-gradient(
          ellipse at 40% 18%,
          rgba(255, 255, 255, 0.2),
          transparent 38%
        );
    }

    .cracks {
      position: absolute;
      inset: 0;
      opacity: 0;
      transition: opacity 0.8s ease;
    }

    .crack {
      position: absolute;
      top: 18%;
      left: 48%;
      width: 2px;
      height: 42%;
      background: rgba(255, 255, 255, 0.85);
      box-shadow:
        0 0 8px white,
        0 0 18px var(--glow);
      transform-origin: top;
      clip-path:
        polygon(
          40% 0,
          100% 0,
          65% 23%,
          100% 25%,
          45% 50%,
          74% 52%,
          0 100%,
          30% 58%,
          0 56%,
          45% 27%,
          10% 25%
        );
    }

    .crack:nth-child(2) {
      left: 42%;
      height: 34%;
      transform: rotate(55deg);
    }

    .crack:nth-child(3) {
      top: 44%;
      left: 58%;
      height: 30%;
      transform: rotate(-62deg);
    }

    .creature {
      position: absolute;
      inset: 15%;
      opacity: 0;
      transform:
        translateZ(42px)
        scale(0.3)
        translateY(40px);
      transition:
        opacity 1s ease,
        transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
      transform-style: preserve-3d;
    }

    .creature-body {
      position: absolute;
      inset: 26% 27% 15%;
      border: 1px solid
        color-mix(in srgb, var(--secondary) 60%, transparent);
      border-radius: 46% 54% 54% 46% / 38% 42% 58% 62%;
      background:
        linear-gradient(
          145deg,
          color-mix(in srgb, var(--primary) 78%, #080a10),
          #080a12 55%,
          color-mix(in srgb, var(--secondary) 34%, #05060a)
        );
      box-shadow:
        inset 12px 12px 24px rgba(255, 255, 255, 0.1),
        inset -16px -20px 30px rgba(0, 0, 0, 0.75),
        0 0 28px
          color-mix(in srgb, var(--glow) 42%, transparent);
      transform: translateZ(30px);
      overflow: hidden;
    }

    .creature-body::before {
      content: "";
      position: absolute;
      inset: 0;
      background:
        repeating-conic-gradient(
          from 20deg,
          transparent 0deg 16deg,
          color-mix(in srgb, var(--secondary) 13%, transparent) 17deg 22deg
        );
      animation: shellFlow 12s linear infinite reverse;
    }

    .creature-head {
      position: absolute;
      z-index: 2;
      top: 10%;
      left: 24%;
      width: 52%;
      height: 44%;
      border: 1px solid
        color-mix(in srgb, var(--primary) 70%, transparent);
      border-radius: 48% 52% 48% 52% / 45% 45% 55% 55%;
      background:
        linear-gradient(
          145deg,
          color-mix(in srgb, var(--secondary) 46%, #10131d),
          #07080e 65%
        );
      box-shadow:
        inset 10px 10px 18px rgba(255, 255, 255, 0.1),
        inset -12px -16px 24px rgba(0, 0, 0, 0.75),
        0 0 25px
          color-mix(in srgb, var(--glow) 38%, transparent);
      transform: translateZ(55px);
    }

    .face-line {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 55%;
      height: 1px;
      background:
        linear-gradient(
          90deg,
          transparent,
          var(--primary),
          transparent
        );
      transform: translate(-50%, -50%);
      box-shadow: 0 0 8px var(--glow);
      opacity: 0.45;
    }

    .eye {
      position: absolute;
      top: 38%;
      width: 16%;
      height: 11%;
      border-radius: 50%;
      background: white;
      box-shadow:
        0 0 8px white,
        0 0 18px var(--secondary),
        0 0 34px var(--glow);
      animation: eyeBlink 5s infinite;
    }

    .eye-left {
      left: 22%;
      transform: rotate(8deg);
    }

    .eye-right {
      right: 22%;
      transform: rotate(-8deg);
    }

    .core {
      position: absolute;
      z-index: 3;
      left: 50%;
      top: 52%;
      width: 25%;
      aspect-ratio: 1;
      border: 1px solid var(--secondary);
      transform:
        translate(-50%, -50%)
        translateZ(70px)
        rotate(45deg);
      background:
        radial-gradient(
          circle,
          white 0 5%,
          var(--secondary) 8%,
          var(--primary) 28%,
          rgba(0, 0, 0, 0.82) 72%
        );
      box-shadow:
        0 0 12px var(--secondary),
        0 0 34px var(--glow);
      animation: corePulse 1.5s ease-in-out infinite;
    }

    .horn {
      position: absolute;
      z-index: 1;
      top: 4%;
      width: 12%;
      height: 33%;
      opacity: 0;
      background:
        linear-gradient(
          to top,
          var(--primary),
          rgba(255, 255, 255, 0.8)
        );
      clip-path: polygon(50% 0, 100% 100%, 0 100%);
      filter: drop-shadow(0 0 8px var(--glow));
      transition:
        opacity 0.8s ease,
        transform 0.8s ease;
    }

    .horn-left {
      left: 26%;
      transform: rotate(-18deg) translateY(15px);
    }

    .horn-right {
      right: 26%;
      transform: rotate(18deg) translateY(15px);
    }

    .wing {
      position: absolute;
      z-index: -1;
      top: 34%;
      width: 42%;
      height: 44%;
      opacity: 0;
      border: 1px solid
        color-mix(in srgb, var(--primary) 62%, transparent);
      background:
        linear-gradient(
          135deg,
          color-mix(in srgb, var(--primary) 22%, transparent),
          transparent
        );
      box-shadow:
        0 0 25px
          color-mix(in srgb, var(--glow) 25%, transparent);
      transition:
        opacity 1s ease,
        transform 1s ease;
    }

    .wing-left {
      left: 6%;
      clip-path:
        polygon(
          100% 18%,
          8% 0,
          38% 38%,
          0 56%,
          44% 67%,
          20% 100%,
          100% 78%
        );
      transform:
        translateZ(5px)
        rotateY(55deg)
        scale(0.3);
      transform-origin: right center;
    }

    .wing-right {
      right: 6%;
      clip-path:
        polygon(
          0 18%,
          92% 0,
          62% 38%,
          100% 56%,
          56% 67%,
          80% 100%,
          0 78%
        );
      transform:
        translateZ(5px)
        rotateY(-55deg)
        scale(0.3);
      transform-origin: left center;
    }

    .shadow-platform {
      position: absolute;
      bottom: 16%;
      left: 50%;
      width: 44%;
      height: 8%;
      border-radius: 50%;
      background:
        radial-gradient(
          ellipse,
          color-mix(in srgb, var(--glow) 30%, transparent),
          transparent 68%
        );
      filter: blur(10px);
      transform:
        translateX(-50%)
        rotateX(72deg)
        translateZ(-100px);
      animation: platformPulse 3s ease-in-out infinite;
    }

    .entity-stage[data-stage="1"] .egg {
      animation-duration: 1.6s, 7s;
    }

    .entity-stage[data-stage="2"] .cracks {
      opacity: 1;
    }

    .entity-stage[data-stage="2"] .egg {
      animation:
        eggShake 0.7s ease-in-out infinite,
        eggBreathe 1.4s ease-in-out infinite;
    }

    .entity-stage[data-stage="3"] .egg,
    .entity-stage[data-stage="4"] .egg,
    .entity-stage[data-stage="5"] .egg,
    .entity-stage[data-stage="6"] .egg {
      opacity: 0;
      transform:
        translateZ(20px)
        scale(1.4);
      pointer-events: none;
    }

    .entity-stage[data-stage="3"] .creature,
    .entity-stage[data-stage="4"] .creature,
    .entity-stage[data-stage="5"] .creature,
    .entity-stage[data-stage="6"] .creature {
      opacity: 1;
      transform:
        translateZ(42px)
        scale(0.72)
        translateY(16px);
    }

    .entity-stage[data-stage="4"] .creature {
      transform:
        translateZ(42px)
        scale(0.86);
    }

    .entity-stage[data-stage="4"] .horn,
    .entity-stage[data-stage="5"] .horn,
    .entity-stage[data-stage="6"] .horn {
      opacity: 0.85;
      transform: rotate(var(--horn-angle)) translateY(0);
    }

    .entity-stage[data-stage="5"] .creature,
    .entity-stage[data-stage="6"] .creature {
      transform:
        translateZ(42px)
        scale(1);
    }

    .entity-stage[data-stage="5"] .wing,
    .entity-stage[data-stage="6"] .wing {
      opacity: 0.8;
    }

    .entity-stage[data-stage="5"] .wing-left,
    .entity-stage[data-stage="6"] .wing-left {
      transform:
        translateZ(5px)
        rotateY(5deg)
        scale(1);
    }

    .entity-stage[data-stage="5"] .wing-right,
    .entity-stage[data-stage="6"] .wing-right {
      transform:
        translateZ(5px)
        rotateY(-5deg)
        scale(1);
    }

    .entity-stage[data-stage="6"] .creature {
      filter:
        drop-shadow(
          0 0 16px
          color-mix(in srgb, var(--glow) 80%, transparent)
        );
      animation: ascendedPulse 2s ease-in-out infinite;
    }

    .entity-stage[data-stage="6"] .orbit {
      border-width: 2px;
      box-shadow:
        0 0 18px
          color-mix(in srgb, var(--glow) 30%, transparent);
    }

    .stage-bottom {
      position: absolute;
      z-index: 10;
      left: 20px;
      right: 20px;
      bottom: 20px;
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 18px;
      pointer-events: none;
    }

    .stage-description {
      max-width: 520px;
    }

    .stage-description p {
      color: rgba(238, 242, 255, 0.72);
      font-size: clamp(12px, 1.5vw, 14px);
      line-height: 1.55;
    }

    .next-evolution {
      flex: 0 0 auto;
      text-align: right;
    }

    .next-evolution label {
      display: block;
      margin-bottom: 5px;
      color: var(--muted);
      font-size: 8px;
      font-weight: 800;
      letter-spacing: 0.15em;
      text-transform: uppercase;
    }

    .next-evolution strong {
      color: var(--primary);
      font-family: monospace;
      font-size: 18px;
    }

    .interaction-panel {
      display: flex;
      flex-direction: column;
      gap: 17px;
      padding: 20px;
    }

    .action-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 9px;
    }

    .action-button {
      position: relative;
      min-height: 68px;
      padding: 13px 10px;
      border: 1px solid rgba(255, 255, 255, 0.075);
      border-radius: 15px;
      background:
        linear-gradient(
          145deg,
          rgba(255, 255, 255, 0.055),
          rgba(255, 255, 255, 0.015)
        );
      color: var(--text);
      cursor: pointer;
      overflow: hidden;
      transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
    }

    .action-button:hover,
    .action-button:focus-visible {
      border-color:
        color-mix(in srgb, var(--primary) 55%, transparent);
      background:
        color-mix(in srgb, var(--primary) 10%, transparent);
      transform: translateY(-2px);
      outline: none;
    }

    .action-button:active {
      transform: scale(0.96);
    }

    .action-icon {
      display: block;
      margin-bottom: 6px;
      font-size: 21px;
    }

    .action-name {
      display: block;
      font-size: 10px;
      font-weight: 850;
      letter-spacing: 0.1em;
      text-transform: uppercase;
    }

    .action-cost {
      display: block;
      margin-top: 3px;
      color: var(--muted);
      font-size: 8px;
      letter-spacing: 0.05em;
    }

    .primary-action {
      width: 100%;
      min-height: 48px;
      padding: 12px 16px;
      border: 1px solid
        color-mix(in srgb, var(--primary) 60%, transparent);
      border-radius: 15px;
      background:
        linear-gradient(
          100deg,
          color-mix(in srgb, var(--primary) 32%, #080b10),
          color-mix(in srgb, var(--secondary) 20%, #080b10)
        );
      color: white;
      font-size: 10px;
      font-weight: 900;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      cursor: pointer;
      box-shadow:
        inset 0 0 20px
          color-mix(in srgb, var(--primary) 12%, transparent),
        0 0 24px
          color-mix(in srgb, var(--glow) 13%, transparent);
      transition:
        transform 0.18s ease,
        filter 0.18s ease;
    }

    .primary-action:hover {
      filter: brightness(1.18);
      transform: translateY(-2px);
    }

    .primary-action:active {
      transform: scale(0.97);
    }

    .primary-action:disabled,
    .action-button:disabled {
      opacity: 0.45;
      cursor: not-allowed;
      transform: none;
    }

    .terminal {
      min-height: 105px;
      padding: 13px;
      border: 1px solid rgba(255, 255, 255, 0.065);
      border-radius: 15px;
      background: rgba(0, 0, 0, 0.27);
      font-family: monospace;
      font-size: 10px;
      line-height: 1.6;
      overflow: hidden;
    }

    .terminal-line {
      color: var(--muted);
      animation: terminalEnter 0.35s ease;
    }

    .terminal-line strong {
      color: var(--primary);
    }

    .form-section {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding-top: 16px;
      border-top: 1px solid rgba(255, 255, 255, 0.07);
    }

    .field {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .field label {
      color: var(--muted);
      font-size: 9px;
      font-weight: 800;
      letter-spacing: 0.12em;
      text-transform: uppercase;
    }

    .field input,
    .field select {
      width: 100%;
      min-height: 44px;
      padding: 0 13px;
      border: 1px solid rgba(255, 255, 255, 0.09);
      border-radius: 13px;
      outline: none;
      background: rgba(0, 0, 0, 0.25);
      color: var(--text);
      transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
    }

    .field input:focus,
    .field select:focus {
      border-color:
        color-mix(in srgb, var(--primary) 65%, transparent);
      box-shadow:
        0 0 0 3px
        color-mix(in srgb, var(--primary) 10%, transparent);
    }

    .field select option {
      background: #0a0d16;
      color: white;
    }

    .button-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 9px;
    }

    .secondary-button {
      min-height: 43px;
      padding: 10px;
      border: 1px solid rgba(255, 255, 255, 0.09);
      border-radius: 13px;
      background: rgba(255, 255, 255, 0.025);
      color: var(--muted);
      font-size: 9px;
      font-weight: 850;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      cursor: pointer;
      transition:
        color 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
    }

    .secondary-button:hover {
      color: white;
      border-color:
        color-mix(in srgb, var(--primary) 40%, transparent);
      background:
        color-mix(in srgb, var(--primary) 8%, transparent);
    }

    .secondary-button.danger:hover {
      border-color:
        color-mix(in srgb, var(--danger) 55%, transparent);
      background:
        color-mix(in srgb, var(--danger) 8%, transparent);
    }

    .toast-container {
      position: fixed;
      z-index: 100;
      right: max(16px, env(safe-area-inset-right));
      bottom: max(16px, env(safe-area-inset-bottom));
      display: flex;
      flex-direction: column;
      gap: 9px;
      width: min(360px, calc(100vw - 32px));
      pointer-events: none;
    }

    .toast {
      padding: 14px 16px;
      border: 1px solid
        color-mix(in srgb, var(--primary) 35%, transparent);
      border-radius: 15px;
      background: var(--panel-strong);
      color: var(--text);
      font-size: 12px;
      line-height: 1.45;
      box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.45),
        0 0 25px
          color-mix(in srgb, var(--glow) 10%, transparent);
      backdrop-filter: blur(20px);
      animation: toastIn 0.35s ease;
    }

    .touch-ripple {
      position: fixed;
      z-index: 90;
      width: 20px;
      height: 20px;
      border: 1px solid var(--primary);
      border-radius: 50%;
      pointer-events: none;
      transform: translate(-50%, -50%);
      box-shadow: 0 0 12px var(--glow);
      animation: rippleExpand 0.75s ease-out forwards;
    }

    .loading-cover {
      position: fixed;
      inset: 0;
      z-index: 999;
      display: grid;
      place-items: center;
      background: #03040a;
      transition:
        opacity 0.7s ease,
        visibility 0.7s ease;
    }

    .loading-cover.hidden {
      opacity: 0;
      visibility: hidden;
    }

    .loading-symbol {
      position: relative;
      width: 72px;
      height: 72px;
    }

    .loading-symbol::before,
    .loading-symbol::after {
      content: "";
      position: absolute;
      inset: 0;
      border: 1px solid var(--primary);
      transform: rotate(45deg);
      box-shadow:
        0 0 20px
          color-mix(in srgb, var(--glow) 30%, transparent);
      animation: loadingSpin 2s linear infinite;
    }

    .loading-symbol::after {
      inset: 17px;
      border-color: var(--secondary);
      animation-direction: reverse;
      animation-duration: 1s;
    }

    @keyframes gridMove {
      from {
        background-position: 0 0;
      }

      to {
        background-position: 56px 56px;
      }
    }

    @keyframes symbolSpin {
      to {
        transform: rotate(405deg);
      }
    }

    @keyframes entityFloat {
      0%,
      100% {
        translate: 0 -4px;
      }

      50% {
        translate: 0 12px;
      }
    }

    @keyframes auraPulse {
      0%,
      100% {
        opacity: 0.65;
        scale: 0.94;
      }

      50% {
        opacity: 1;
        scale: 1.08;
      }
    }

    @keyframes orbitSpin {
      to {
        rotate: 360deg;
      }
    }

    @keyframes orbitSpinReverse {
      to {
        rotate: -360deg;
      }
    }

    @keyframes eggBreathe {
      0%,
      100% {
        scale: 0.98;
      }

      50% {
        scale: 1.04;
      }
    }

    @keyframes eggHue {
      to {
        filter: hue-rotate(360deg);
      }
    }

    @keyframes eggShake {
      0%,
      100% {
        translate: 0;
        rotate: 0;
      }

      25% {
        translate: -4px 2px;
        rotate: -1deg;
      }

      50% {
        translate: 3px -1px;
        rotate: 1deg;
      }

      75% {
        translate: -2px -2px;
        rotate: -0.7deg;
      }
    }

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

    @keyframes corePulse {
      0%,
      100% {
        scale: 0.86;
        filter: brightness(0.8);
      }

      50% {
        scale: 1.08;
        filter: brightness(1.6);
      }
    }

    @keyframes eyeBlink {
      0%,
      46%,
      50%,
      100% {
        scale: 1 1;
      }

      48% {
        scale: 1 0.08;
      }
    }

    @keyframes platformPulse {
      0%,
      100% {
        opacity: 0.45;
        scale: 0.85;
      }

      50% {
        opacity: 0.85;
        scale: 1.1;
      }
    }

    @keyframes ascendedPulse {
      0%,
      100% {
        filter:
          drop-shadow(
            0 0 12px
            color-mix(in srgb, var(--glow) 60%, transparent)
          );
      }

      50% {
        filter:
          drop-shadow(
            0 0 34px
            color-mix(in srgb, var(--glow) 92%, transparent)
          );
      }
    }

    @keyframes terminalEnter {
      from {
        opacity: 0;
        transform: translateY(5px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes toastIn {
      from {
        opacity: 0;
        transform: translateY(18px) scale(0.96);
      }

      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    @keyframes rippleExpand {
      from {
        opacity: 1;
        scale: 0.2;
      }

      to {
        opacity: 0;
        scale: 8;
      }
    }

    @keyframes loadingSpin {
      to {
        transform: rotate(405deg);
      }
    }

    @media (max-width: 1100px) {
      .main-layout {
        grid-template-columns: minmax(240px, 290px) minmax(0, 1fr);
      }

      .interaction-panel {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
      }

      .interaction-panel > .panel-heading {
        grid-column: 1 / -1;
      }
    }

    @media (max-width: 760px) {
      .app {
        padding:
          max(12px, env(safe-area-inset-top))
          max(12px, env(safe-area-inset-right))
          max(16px, env(safe-area-inset-bottom))
          max(12px, env(safe-area-inset-left));
      }

      .brand-copy p {
        display: none;
      }

      .connection {
        padding: 8px 10px;
      }

      .connection span:last-child {
        display: none;
      }

      .main-layout {
        display: flex;
        flex-direction: column;
        margin-top: 13px;
      }

      .entity-stage {
        order: -1;
        min-height: 510px;
      }

      .side-panel {
        padding: 17px;
      }

      .interaction-panel {
        display: flex;
        padding: 17px;
      }

      .entity-rig {
        width: min(92vw, 390px);
        height: min(92vw, 390px);
        max-width: 90%;
        max-height: 90%;
      }

      .stage-top {
        top: 17px;
        left: 17px;
        right: 17px;
      }

      .stage-bottom {
        left: 17px;
        right: 17px;
        bottom: 17px;
      }

      .stage-description {
        max-width: 68%;
      }

      .stage-number {
        font-size: 56px;
      }
    }

    @media (max-width: 420px) {
      .entity-stage {
        min-height: 470px;
      }

      .stage-description {
        max-width: 72%;
      }

      .stage-description p {
        font-size: 11px;
      }

      .next-evolution strong {
        font-size: 15px;
      }

      .action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
      }
    }
