.product-galaxy-root {
  position: relative;
  width: 100%;
  margin: 0 0 2.5rem;
  overflow: hidden;
  background: radial-gradient(
    ellipse 90% 75% at 50% 48%,
    #030508 0%,
    #010102 55%,
    #000000 100%
  );
}

.product-galaxy {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 70vh;
  cursor: grab;
  touch-action: pan-y;
}

.product-galaxy.is-dragging {
  cursor: grabbing;
}

.product-galaxy canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.product-galaxy--no-drag {
  cursor: default;
}

.galaxy-labels-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 3;
}

.tess-cell-wall {
  position: absolute;
  left: 0;
  top: 0;
  box-sizing: border-box;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
}

.tess-cell-wall.is-debug {
  border-color: rgba(255, 160, 60, 0.55);
  background: rgba(255, 160, 60, 0.05);
}

.tess-cell-label {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.5rem 0.7rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid rgba(0, 212, 255, 0.22);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6) inset,
    0 4px 20px rgba(0, 0, 0, 0.55);
  opacity: 0.55;
  transform-origin: center center;
  transition: opacity 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  pointer-events: auto;
  cursor: pointer;
  max-width: 210px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tess-cell-label__name {
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

.tess-cell-label__tag {
  font-family: "Inter", sans-serif;
  font-size: 0.62rem;
  line-height: 1.35;
  color: #9aa3ad;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.tess-cell-label__enter {
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: rgba(0, 212, 255, 0.75);
  margin-top: 0.15rem;
}

.tess-cell-label[data-tier="hero"] {
  border-color: rgba(0, 212, 255, 0.38);
  opacity: 0.72;
}

.tess-cell-label[data-tier="hero"] .tess-cell-label__name {
  color: #e8f4ff;
}

.tess-cell-label[data-tier="secondary"] {
  opacity: 0.58;
}

.tess-cell-label[data-tier="developer"] {
  opacity: 0.48;
  border-color: rgba(255, 255, 255, 0.12);
}

.tess-cell-label[data-tier="developer"] .tess-cell-label__tag {
  display: none;
}

.tess-cell-label.is-hovered,
.tess-cell-label:hover {
  opacity: 1 !important;
  border-color: rgba(0, 212, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(0, 212, 255, 0.15) inset,
    0 0 24px rgba(0, 212, 255, 0.2);
}

.tess-cell-label.is-hovered[data-tier="developer"] .tess-cell-label__tag,
.tess-cell-label[data-tier="developer"]:hover .tess-cell-label__tag {
  display: block;
}

.galaxy-hint {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  margin: 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(200, 208, 218, 0.7);
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.galaxy-hint.is-faded {
  opacity: 0;
}

.galaxy-reduced-msg {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  margin: 0;
  padding: 0.75rem 1rem;
  font-size: 0.78rem;
  color: #9aa3ad;
  text-align: center;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.galaxy-reduced-link {
  color: #00d4ff;
  text-decoration: none;
  font-weight: 600;
}

.galaxy-reduced-link:hover {
  text-decoration: underline;
}

.galaxy-debug-hud {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 6;
  padding: 0.35rem 0.55rem;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  color: rgba(126, 232, 255, 0.85);
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(0, 168, 204, 0.25);
  border-radius: 4px;
  pointer-events: none;
  white-space: pre-wrap;
  max-width: 90%;
}

.galaxy-layout-debug {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.galaxy-layout-debug__bounds {
  position: absolute;
  border: 1px dashed rgba(0, 255, 136, 0.2);
  box-sizing: border-box;
}

.galaxy-layout-debug__box {
  position: absolute;
  border: 1px solid rgba(255, 180, 60, 0.65);
  background: rgba(255, 180, 60, 0.06);
  box-sizing: border-box;
}

.galaxy-layout-debug__anchor {
  position: absolute;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 6px rgba(0, 255, 136, 0.8);
}

.galaxy-layout-debug__pref {
  position: absolute;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: rgba(126, 200, 255, 0.9);
}

.galaxy-layout-debug__orbit--hero {
  border-color: rgba(0, 212, 255, 0.45);
}

.galaxy-layout-debug__orbit--secondary {
  border-color: rgba(126, 200, 255, 0.28);
}

.galaxy-layout-debug__orbit--developer {
  border-color: rgba(160, 170, 190, 0.22);
}

.galaxy-layout-debug__orbit {
  position: absolute;
  border: 1px dashed rgba(0, 255, 136, 0.35);
  border-radius: 50%;
  box-sizing: border-box;
  pointer-events: none;
}

.galaxy-layout-debug__sep {
  position: absolute;
  height: 1px;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(126, 200, 255, 0.8), rgba(255, 120, 60, 0.5));
}

.galaxy-layout-debug__hud {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 8px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  color: #00ff88;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(0, 255, 136, 0.25);
}

/* Product page entry fade (continuous with galaxy transition) */
.galaxy-entry-fade {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 9999;
  pointer-events: none;
  animation: galaxyEntryFade 0.8s ease-out forwards;
}

@keyframes galaxyEntryFade {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@media (max-width: 767px) {
  .product-galaxy-root {
    margin-bottom: 1.25rem;
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
  }

  .product-galaxy-root.is-mobile-galaxy {
    background: radial-gradient(
      ellipse 85% 70% at 50% 46%,
      rgba(0, 40, 55, 0.35) 0%,
      #030508 38%,
      #010102 58%,
      #000000 100%
    );
  }

  .product-galaxy-root.is-mobile-galaxy .product-galaxy {
    height: min(58dvh, 520px);
    min-height: min(58dvh, 320px);
    touch-action: none;
  }

  .product-galaxy.is-mobile {
    cursor: default;
  }

  .product-galaxy.is-mobile.is-dragging {
    cursor: grab;
  }

  .galaxy-labels-layer {
    padding-top: env(safe-area-inset-top, 0);
  }

  .tess-cell-label {
    max-width: 128px;
    padding: 0.32rem 0.45rem;
    gap: 0.12rem;
    opacity: 0.62;
  }

  .tess-cell-label[data-tier="hero"] {
    max-width: 138px;
    opacity: 0.82;
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.6) inset,
      0 0 18px rgba(0, 168, 204, 0.12),
      0 4px 20px rgba(0, 0, 0, 0.55);
  }

  .tess-cell-label[data-tier="secondary"] {
    max-width: 122px;
    opacity: 0.64;
  }

  .tess-cell-label[data-tier="developer"] {
    max-width: 108px;
    opacity: 0.52;
  }

  .tess-cell-label__name {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }

  .tess-cell-label__tag {
    font-size: 0.5rem;
    line-height: 1.25;
  }

  .tess-cell-label__enter {
    font-size: 0.5rem;
    margin-top: 0.08rem;
  }

  .galaxy-hint {
    bottom: calc(0.85rem + env(safe-area-inset-bottom, 0));
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    max-width: 92%;
    text-align: center;
  }

  .galaxy-mobile-debug-hud {
    position: absolute;
    top: calc(0.5rem + env(safe-area-inset-top, 0));
    right: 0.5rem;
    z-index: 7;
    padding: 0.35rem 0.5rem;
    font-family: ui-monospace, monospace;
    font-size: 0.52rem;
    line-height: 1.45;
    color: #7ee8a8;
    background: rgba(0, 0, 0, 0.78);
    border: 1px solid rgba(0, 255, 136, 0.28);
    border-radius: 4px;
    pointer-events: none;
    max-width: 46%;
    text-align: right;
  }

  .galaxy-hint--desktop {
    display: none;
  }
}

@media (min-width: 768px) {
  .product-galaxy-root {
    background: radial-gradient(
      ellipse 95% 82% at 50% 46%,
      rgba(0, 48, 68, 0.42) 0%,
      rgba(3, 5, 8, 0.95) 32%,
      #010102 58%,
      #000000 100%
    );
  }

  .product-galaxy {
    height: 70vh;
    min-height: 70vh;
  }

  .tess-cell-label {
    opacity: 0.62;
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.6) inset,
      0 4px 24px rgba(0, 0, 0, 0.55),
      0 0 18px rgba(0, 212, 255, 0.08);
  }

  .tess-cell-label[data-tier="hero"] {
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.6) inset,
      0 4px 28px rgba(0, 0, 0, 0.6),
      0 0 28px rgba(0, 212, 255, 0.14);
  }

  .galaxy-hint--mobile {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-galaxy {
    cursor: default;
  }

  .galaxy-hint {
    display: none;
  }
}

.product-standalone {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

.product-standalone ul {
  padding-left: 1.2rem;
  margin: 1rem 0;
  color: var(--il-muted);
}

.product-standalone li {
  margin-bottom: 0.35rem;
}
