/* Spawn — Discover galaxy map (redesign) */

.zone-discover {
  background: var(--bg-app);
  overflow: hidden;
}
.zone-discover.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.zone-discover::before { display: none; }

.discover-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.discover-toolbar {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  padding-top: max(var(--space-4), env(safe-area-inset-top));
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
}

.discover-title { flex: 1; min-width: 140px; }
.discover-kicker {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-family: var(--font-body);
  margin-bottom: 2px;
}
.discover-title h1 {
  font-size: clamp(1.75rem, 5vw, 2.125rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.discover-search {
  flex: 1 1 200px;
  max-width: 320px;
}
.discover-search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.45);
  color: var(--text);
  font-size: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3 3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
}
.discover-search input::placeholder { color: var(--muted); }
.discover-search input:focus {
  outline: none;
  border-color: rgba(0, 212, 238, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 212, 238, 0.1);
}

.discover-stats {
  display: flex;
  gap: 8px;
}
.discover-stats span {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
}
.discover-stats span:first-child { color: var(--accent-bright); border-color: rgba(0, 212, 238, 0.25); }

/* Stage — immersive map */
.discover-shell {
  display: flex;
  flex: 1;
  min-height: 0;
  align-items: stretch;
  align-self: stretch;
}

.discover-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.discover-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.zone-discover #discover-map,
.zone-discover #discover-world,
.zone-discover #discover-hub {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.zone-discover.active > .discover-shell {
  flex: 1;
  min-height: 0;
}

.zone-discover .map-viewport,
.zone-discover .galaxy-stage,
.zone-discover .world-stage {
  flex: 1;
  min-height: 0;
}

/* === Pannable map viewport ===
   Height is driven by the flex chain (.zone-discover override sets min-height:0).
   This dvh-based floor only acts as a fallback outside the active flex context. */
.map-viewport {
  position: relative;
  flex: 1;
  min-height: min(50dvh, 480px);
  overflow: hidden;
  isolation: isolate;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.map-viewport.is-dragging { cursor: grabbing; }

.map-tile-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.map-surface {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
  z-index: 2;
  background: transparent;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

.galaxy-surface {
  width: 2800px;
  height: 2000px;
}

.world-surface {
  width: 2400px;
  height: 2400px;
}

#galaxy-canvas { display: none; }

.map-vignette {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 80% at 50% 45%, transparent 35%, rgba(3, 3, 8, 0.5) 100%),
    linear-gradient(180deg, transparent 55%, rgba(3, 3, 8, 0.8) 100%);
}

.map-controls {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: var(--radius-lg);
  background: rgba(8, 8, 14, 0.88);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}
.map-controls__btn {
  width: var(--touch);
  height: var(--touch);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-controls__btn:hover {
  border-color: rgba(0, 212, 238, 0.45);
  color: var(--accent-bright);
}
.map-controls__btn--reset { font-size: 14px; }
.map-controls__level {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
  min-width: 36px;
  text-align: center;
}

.map-hud, .galaxy-hud {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  pointer-events: none;
}

.galaxy-orbits { display: none !important; }

.galaxy-nebula {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 40% at 50% 46%, rgba(196, 77, 42, 0.14), transparent 68%),
    radial-gradient(ellipse 40% 30% at 28% 62%, rgba(0, 212, 238, 0.07), transparent 70%),
    radial-gradient(ellipse 35% 25% at 72% 34%, rgba(120, 80, 200, 0.08), transparent 72%);
  animation: nebulaDrift 72s ease-in-out infinite alternate;
}

.galaxy-core {
  position: absolute;
  left: 50%;
  top: 48%;
  width: clamp(64px, 14vw, 110px);
  height: clamp(64px, 14vw, 110px);
  transform: translate(-50%, -50%);
  z-index: 3;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.75), rgba(255,200,120,0.15) 45%, transparent 72%);
  opacity: 0.55;
  box-shadow:
    0 0 40px rgba(255, 180, 80, 0.25),
    0 0 80px rgba(196, 77, 42, 0.12);
  animation: corePulse 5s ease-in-out infinite;
}
.galaxy-core::after {
  content: '';
  position: absolute;
  inset: -40%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 160, 60, 0.08), transparent 65%);
  animation: corePulse 5s ease-in-out infinite reverse;
}

@keyframes nebulaDrift {
  0% { opacity: 0.85; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.04); }
}
@keyframes corePulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.85; transform: translate(-50%, -50%) scale(1.06); }
}

/* Planet nodes */
.galaxy-nodes {
  position: absolute;
  inset: 0;
  z-index: 5;
}

.galaxy-node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: auto;
  height: auto;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.galaxy-node:hover:not(:disabled) .galaxy-node__visual { transform: scale(1.08); }
.galaxy-planet-host:hover:not(:disabled) { transform: translate(-50%, -50%); }
.galaxy-node:disabled { cursor: not-allowed; }
.galaxy-node__visual {
  position: relative;
  width: var(--planet-size, 88px);
  height: var(--planet-size, 88px);
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  transition: transform var(--duration-normal) var(--ease-spring);
}

.galaxy-node__ring {
  display: none;
}

.galaxy-node__body {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-elevated);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  border: 2px solid var(--border-strong);
}
.galaxy-node__body img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}

.galaxy-node__pulse {
  display: none;
}

.galaxy-node__lock {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.galaxy-node__info {
  text-align: center;
  min-width: 100px;
  max-width: 140px;
}
.galaxy-node__info strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.2;
}
.galaxy-node__info span {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.galaxy-node--active .galaxy-node__body {
  border-color: var(--accent);
}
.galaxy-node--active .galaxy-node__info span { color: var(--success); }
.galaxy-node:disabled .galaxy-node__info strong { color: var(--muted); }

.galaxy-node--rust:not(.galaxy-planet-host) { --planet-size: clamp(128px, 26vw, 180px); }
.galaxy-node--mc { --planet-size: clamp(64px, 14vw, 88px); }
.galaxy-node--ark { --planet-size: clamp(64px, 14vw, 88px); }

/* Hide planet labels on map — game list lives in left rail */
.galaxy-node__info { display: none; }

/* ── Living planets — canvas globe + 3D orbit ── */
.galaxy-planet-host {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --planet-size: 200px;
  display: block;
  width: 320px;
  height: 300px;
  min-width: 320px;
  min-height: 300px;
}
.galaxy-planet-host.galaxy-planet--minecraft,
.galaxy-planet-host.galaxy-planet--ark {
  --planet-size: 168px;
  width: 272px;
  height: 254px;
  min-width: 272px;
  min-height: 254px;
}
.galaxy-planet-host.search-hit {
  filter: drop-shadow(0 0 24px rgba(0, 212, 238, 0.55));
  z-index: 3;
}
.galaxy-planet-host.search-dim {
  opacity: 0.35;
  filter: grayscale(0.4);
}
body.view-phone .galaxy-planet-host.galaxy-planet--minecraft,
body.view-phone .galaxy-planet-host.galaxy-planet--ark {
  --planet-size: 152px;
  width: 248px;
  height: 232px;
  min-width: 248px;
  min-height: 232px;
}

.galaxy-planet--minecraft .galaxy-planet__logo { width: 74%; top: 52%; }
.galaxy-planet--ark .galaxy-planet__logo { width: 54%; top: 54%; }

body.view-phone .galaxy-planet-host {
  --planet-size: 176px;
  width: 280px;
  height: 262px;
  min-width: 280px;
  min-height: 262px;
}

.galaxy-planet__system {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  transform: perspective(720px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform 0.35s var(--ease-spring);
}
.galaxy-planet-host.is-hovered .galaxy-planet__system,
.galaxy-planet-host:hover .galaxy-planet__system {
  transform: perspective(720px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) scale(1.03);
}

.galaxy-planet__orbit-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.galaxy-planet__satellite {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
}
.galaxy-planet__satellite-body {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.galaxy-planet__satellite-body img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.galaxy-planet__globe-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: none;
}
.galaxy-planet__globe {
  position: relative;
  display: block;
  width: var(--planet-size);
  height: var(--planet-size);
  min-width: var(--planet-size);
  min-height: var(--planet-size);
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 120, 60, 0.2),
    0 14px 44px rgba(0, 0, 0, 0.55),
    0 0 52px var(--planet-glow, rgba(196, 77, 42, 0.4));
}

.galaxy-planet__globe-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  z-index: 1;
}

.galaxy-planet__globe-atmo {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, var(--planet-glow), transparent 58%);
  animation: globeAtmoPulse 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.galaxy-planet__logo {
  position: absolute;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%) rotate(-6deg);
  width: 62%;
  height: auto;
  object-fit: contain;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 12px rgba(196, 77, 42, 0.35));
}

.galaxy-planet__globe-shade {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(118deg, transparent 34%, rgba(0, 0, 0, 0.35) 56%, rgba(0, 0, 0, 0.72) 100%);
  z-index: 5;
  pointer-events: none;
}
.galaxy-planet__globe-spec {
  position: absolute;
  top: 14%;
  left: 20%;
  width: 26%;
  height: 16%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.45), transparent 68%);
  filter: blur(1px);
  z-index: 6;
  animation: specularShift 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes globeAtmoPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.05); }
}
@keyframes specularShift {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .galaxy-planet__globe-atmo { animation: none !important; }
}

/* ── Game worlds rail (Discord-style left sidebar) ── */
.discover-games-rail {
  width: 80px;
  flex-shrink: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  padding-bottom: max(var(--space-3), env(safe-area-inset-bottom));
  background:
    linear-gradient(180deg, rgba(12, 12, 18, 0.98) 0%, rgba(6, 6, 10, 0.99) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset -1px 0 0 rgba(0, 212, 238, 0.04);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  z-index: 12;
  min-height: 100%;
  transition:
    transform 0.45s var(--ease-spring),
    opacity 0.35s var(--ease-smooth),
    box-shadow 0.35s,
    border-color 0.35s;
}
.discover-games-rail::-webkit-scrollbar { display: none; }

.discover-games-rail__home {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 5px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: border-radius 0.22s var(--ease-spring), background 0.22s, box-shadow 0.22s, transform 0.22s;
}
.discover-games-rail__home-glow {
  position: absolute;
  inset: -4px;
  border-radius: 22px;
  background: radial-gradient(circle, rgba(0, 212, 238, 0.18), transparent 68%);
  opacity: 0;
  transition: opacity 0.22s;
  pointer-events: none;
}
.discover-games-rail__home img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}
.discover-games-rail__home:hover {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  transform: translateY(-1px);
}
.discover-games-rail__home:hover .discover-games-rail__home-glow { opacity: 1; }
.discover-games-rail__home.is-active {
  border-radius: 16px;
  background: rgba(0, 212, 238, 0.08);
  box-shadow: 0 0 0 2px rgba(0, 212, 238, 0.45), 0 0 20px rgba(0, 212, 238, 0.15);
}
.discover-games-rail__home.is-active .discover-games-rail__home-glow { opacity: 1; }

.discover-games-rail__divider {
  width: 36px;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  flex-shrink: 0;
}

.discover-games-rail__section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 6px;
}

.discover-games-rail__section-tag {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  padding: 2px 0 4px;
}

.discover-games-rail__spacer { flex: 1; min-height: var(--space-2); }

.discover-games-rail__add {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: var(--accent-bright);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.22s, border-color 0.22s, border-radius 0.22s, transform 0.22s;
}
.discover-games-rail__add:hover {
  background: rgba(0, 212, 238, 0.08);
  border-color: rgba(0, 212, 238, 0.35);
  border-radius: 16px;
  transform: translateY(-1px);
}

.discover-game-icon {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding: 0 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
}
.discover-game-icon__rail-marker {
  position: absolute;
  left: -2px;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 0 2px 2px 0;
  background: var(--world-accent, var(--accent));
  transform: translateY(-50%);
  opacity: 0;
  transition: height 0.22s var(--ease-spring), opacity 0.22s;
}
.discover-game-icon__thumb {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.08), transparent 55%),
    rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  transition: border-radius 0.22s var(--ease-spring), border-color 0.22s, box-shadow 0.22s, transform 0.22s;
}
.discover-game-icon__thumb img,
.discover-game-icon__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  display: block;
}
.discover-game-icon__thumb--rail {
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.1), transparent 58%),
    rgba(8, 8, 12, 0.92);
}
.discover-game-icon__thumb--rail .discover-game-icon__img {
  padding: 0;
  object-fit: cover;
  border-radius: 14px;
}
.discover-game-icon__thumb--rail .discover-game-icon__img--fallback {
  padding: 6px;
  object-fit: contain;
}
.discover-game-icon__label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  max-height: 0;
  transition: opacity 0.22s, max-height 0.22s, color 0.22s;
}
.discover-game-icon:hover .discover-game-icon__thumb {
  border-radius: 16px;
  border-color: color-mix(in srgb, var(--world-accent, var(--accent)) 45%, transparent);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}
.discover-game-icon:hover .discover-game-icon__label,
.discover-game-icon--active .discover-game-icon__label {
  opacity: 1;
  max-height: 14px;
  color: var(--text-secondary);
}
.discover-game-icon--active .discover-game-icon__rail-marker {
  height: 22px;
  opacity: 1;
}
.discover-game-icon--active .discover-game-icon__thumb {
  border-color: color-mix(in srgb, var(--world-accent, var(--accent)) 70%, white 10%);
  border-radius: 16px;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--world-accent, var(--accent)) 25%, transparent),
    0 0 16px color-mix(in srgb, var(--world-accent, var(--accent)) 30%, transparent);
}
.discover-game-icon--active { color: var(--text); }

.discover-game-icon__live {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid #08080d;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.6);
}

.discover-game-icon__lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 16px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.discover-game-icon__pin {
  position: absolute;
  top: 0;
  right: 4px;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: var(--muted);
  font-size: 10px;
  line-height: 18px;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
  z-index: 2;
}
.discover-game-icon:hover .discover-game-icon__pin,
.discover-game-icon__pin.is-pinned { opacity: 1; }
.discover-game-icon__pin.is-pinned { color: #fbbf24; background: rgba(0, 0, 0, 0.85); }
.discover-game-icon__pin:hover { color: #fbbf24; }

.discover-game-icon--promo .discover-game-icon__thumb {
  border-color: rgba(251, 191, 36, 0.45);
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.12), rgba(0, 212, 238, 0.08));
}
.discover-game-icon--promo:hover .discover-game-icon__thumb {
  border-color: rgba(251, 191, 36, 0.7);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.2);
}
.discover-game-icon__promo-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  padding: 2px 0;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.9), rgba(245, 158, 11, 0.85));
  color: #1a1200;
}

.discover-game-icon--locked { cursor: not-allowed; }
.discover-game-icon--locked:hover .discover-game-icon__thumb { transform: none; }

@media (min-width: 768px) {
  body.view-desktop .discover-games-rail {
    padding-top: var(--space-3);
  }
}

body.view-phone .discover-games-rail {
  width: 56px;
  padding-top: max(var(--space-2), env(safe-area-inset-top));
}
body.view-phone .discover-games-rail__home,
body.view-phone .discover-game-icon__thumb,
body.view-phone .discover-games-rail__add {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
body.view-phone .discover-game-icon__label { display: none; }

.discover-games-rail__hint {
  font-size: 8px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  padding: 4px 8px 0;
  max-width: 72px;
}
.discover-games-rail__empty {
  font-size: 9px;
  line-height: 1.35;
  color: var(--muted);
  text-align: center;
  padding: 8px 6px;
  max-width: 64px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}
.discover-games-rail__browse {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 48px;
  padding: 8px 4px;
  border: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.discover-games-rail__browse span:first-child { font-size: 18px; }
.discover-games-rail__browse:hover { background: rgba(0, 212, 238, 0.1); transform: scale(1.04); }

/* === Game world hub (5-card launcher) === */
.discover-hub {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--bg-app);
}
.discover-hub.hidden,
#discover-map.hidden,
#discover-world.hidden { display: none !important; }

.world-hub-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  background: rgba(7, 7, 13, 0.95);
  flex-shrink: 0;
  z-index: 10;
}
.world-hub-toolbar__back {
  border: none;
  background: transparent;
  color: var(--accent-bright);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  white-space: nowrap;
}
.world-hub-toolbar__title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.world-hub-toolbar__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid rgba(196, 77, 42, 0.45);
  box-shadow: 0 0 12px rgba(196, 77, 42, 0.25);
}
.world-hub-toolbar__kicker {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.world-hub-toolbar__title h2 {
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.world-hub-toolbar__fav {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}
.world-hub-toolbar__fav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.world-hub-toolbar__fav.is-active {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.1);
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.15);
}
.world-hub-toolbar__fav.is-active svg { fill: currentColor; }
.world-hub-toolbar__fav:hover { transform: scale(1.06); }

.world-hub-stage {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.world-hub-hero {
  position: relative;
  min-height: min(28dvh, 220px);
  background:
    linear-gradient(120deg, rgba(8, 8, 13, 0.92) 0%, rgba(8, 8, 13, 0.55) 45%, rgba(8, 8, 13, 0.85) 100%),
    var(--hub-banner) center/cover no-repeat;
  border-bottom: 1px solid var(--border);
}
.world-hub-hero__shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 40%, rgba(196, 77, 42, 0.22), transparent 55%);
  pointer-events: none;
}
.world-hub-hero__content {
  position: relative;
  z-index: 1;
  padding: var(--space-5) var(--space-4);
  max-width: 640px;
}
.world-hub-hero__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 6px;
}
.world-hub-hero__content h3 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.world-hub-hero__meta {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}
.world-hub-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.world-hub-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}
.world-hub-chip--live {
  color: var(--success);
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
}

.world-hub-cards-wrap {
  flex: 1;
  padding: var(--space-5) var(--space-4) var(--space-6);
}
.world-hub-cards__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
  text-align: center;
}
.world-hub-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(8px, 2vw, 16px);
  align-items: end;
  max-width: 980px;
  margin: 0 auto;
}

.world-hub-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  animation: hubCardIn 0.55s var(--ease-spring) forwards;
  animation-delay: calc(0.08s + var(--hub-i) * 0.07s);
}
.world-hub-card--soon { cursor: default; }
.world-hub-card__frame {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s, border-color 0.25s;
}
.world-hub-card--featured .world-hub-card__frame {
  aspect-ratio: 4 / 5;
  transform: translateY(-12px) scale(1.06);
  border-color: rgba(0, 212, 238, 0.45);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(0, 212, 238, 0.15),
    0 0 32px rgba(0, 212, 238, 0.12);
}
.world-hub-card--live:hover .world-hub-card__frame {
  transform: translateY(-16px) scale(1.08);
  border-color: var(--accent);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5), 0 0 28px rgba(0, 212, 238, 0.2);
}
.world-hub-card__art {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform 0.4s var(--ease-smooth);
}
.world-hub-card--live:hover .world-hub-card__art { transform: scale(1.08); }
.world-hub-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.2) 55%, rgba(0, 0, 0, 0.35) 100%);
}
.world-hub-card--soon .world-hub-card__art { filter: grayscale(0.7) brightness(0.55); }
.world-hub-card__soon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
}
.world-hub-card__soon span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.55);
}
.world-hub-card__soon--open {
  inset: auto 10px 10px auto;
  display: block;
  width: auto;
  height: auto;
  background: transparent;
  backdrop-filter: none;
}
.world-hub-card__soon--open span {
  color: var(--accent);
  border-color: rgba(0, 212, 238, 0.35);
  background: rgba(0, 212, 238, 0.12);
}
.world-hub-card__icon {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 20px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}
.world-hub-card__map-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  background: rgba(0, 212, 238, 0.2);
  color: var(--accent-bright);
  border: 1px solid rgba(0, 212, 238, 0.35);
}
.world-hub-card__pulse {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 2px solid rgba(0, 212, 238, 0.35);
  animation: hubCardPulse 2.4s ease-in-out infinite;
  pointer-events: none;
}
.world-hub-card__copy strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}
.world-hub-card__copy span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}
.world-hub-card--featured .world-hub-card__copy strong { color: var(--accent-bright); }

@keyframes hubCardIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.world-hub-card--featured {
  animation-name: hubCardInFeatured;
}
@keyframes hubCardInFeatured {
  to { opacity: 1; transform: translateY(-12px) scale(1.06); }
}
@keyframes hubCardPulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.02); }
}

@media (max-width: 860px) {
  .world-hub-cards {
    grid-template-columns: repeat(2, 1fr);
    max-width: 420px;
  }
  .world-hub-card--featured {
    grid-column: 1 / -1;
    order: -1;
  }
  .world-hub-card--featured .world-hub-card__frame {
    transform: none;
    aspect-ratio: 16 / 10;
  }
  .world-hub-card--featured { animation-name: hubCardIn; }
  .world-hub-card--live:hover .world-hub-card__frame { transform: scale(1.03); }
}

/* === World map (per-game ocean) === */
.discover-world {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.world-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  background: rgba(7, 7, 13, 0.95);
  flex-shrink: 0;
  z-index: 10;
}
.world-toolbar__back {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent-bright);
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}
.world-toolbar__title { flex: 1; min-width: 0; }
.world-toolbar__kicker {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--font-cyber);
}
.world-toolbar__title h2 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.world-toolbar__count {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
}

.world-toolbar__filter-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 212, 238, 0.25);
  background: var(--accent-muted);
  white-space: nowrap;
}
.world-toolbar__filter-badge.is-active {
  color: var(--accent-bright);
  border-color: rgba(0, 212, 238, 0.45);
}

.galaxy-stage { flex: 1; min-height: 0; }
.world-stage { flex: 1; min-height: 0; position: relative; }

#world-viewport {
  --map-scale: 1;
}

.zone-discover .galaxy-stage,
.zone-discover .world-stage {
  min-height: 0;
}

.world-toolbar__coords {
  font-family: var(--font-cyber);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  background: rgba(0, 212, 238, 0.08);
  border: 1px solid rgba(0, 212, 238, 0.2);
  color: var(--accent-bright);
  white-space: nowrap;
}

.world-region-zones {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.world-region-zone {
  position: absolute;
  left: calc(var(--zx) * 1% - var(--zw) * 0.5%);
  top: calc(var(--zy) * 1% - var(--zh) * 0.5%);
  width: calc(var(--zw) * 1%);
  height: calc(var(--zh) * 1%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, var(--ztint), transparent 72%);
  border: 1px dashed rgba(255, 255, 255, 0.06);
}
.world-region-zone__label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-cyber);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.22);
  white-space: nowrap;
}


/* World map — islands on water */
.world-nodes {
  position: absolute;
  inset: 0;
  z-index: 5;
}
.world-nodes--animating .world-node-slot {
  transition: left 0.45s var(--ease-spring), top 0.45s var(--ease-spring);
}

.world-node-slot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  z-index: 1;
  animation: islandFloat 5.5s ease-in-out infinite;
  animation-delay: var(--node-delay, 0s);
  pointer-events: auto;
}
.world-node-slot:hover { z-index: 4; }
.world-node-slot.world-node-slot--hidden {
  display: none !important;
}
.world-node-slot.is-highlight .world-island-node__img {
  transform: scale(1.04) translateY(-2px);
}

.world-island-node-host {
  position: relative;
  display: block;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.world-island-node-host:focus-visible {
  outline: none;
}

.world-island-node {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: transparent;
}

.world-island-node__shadow {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(var(--island-size, 80px) * 1.1);
  height: calc(var(--island-size, 80px) * 0.22);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55), transparent 70%);
  filter: blur(4px);
  z-index: 0;
}

.world-island-node__water-ring {
  display: none;
}

.world-island-node__img {
  position: relative;
  z-index: 2;
  display: block;
  width: auto;
  height: var(--island-size, 156px);
  max-width: calc(var(--island-size, 156px) * 1.35);
  object-fit: contain;
  object-position: bottom center;
  background: transparent;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.42));
  transition: transform 0.25s var(--ease-spring);
  transform-origin: bottom center;
}
.world-island-node.is-fallback .world-island-node__img.is-missing {
  display: none;
}
.world-island-node.is-fallback::after {
  content: '';
  display: block;
  width: calc(var(--island-size, 80px) * 0.9);
  height: calc(var(--island-size, 80px) * 0.65);
  border-radius: 45% 55% 48% 52% / 55% 45% 55% 45%;
  background: radial-gradient(ellipse at 40% 35%, #3a8878, #1a4038 60%, #0a2018);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45), 0 0 20px var(--island-glow, rgba(0, 212, 238, 0.2));
}

.world-island-node__ripple {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(var(--island-size, 80px) * 0.7);
  height: calc(var(--island-size, 80px) * 0.12);
  border-radius: 50%;
  background: rgba(0, 212, 238, 0.06);
  animation: islandRipple 2.8s ease-in-out infinite reverse;
  z-index: 1;
}

.world-node-slot:hover .world-island-node__img {
  transform: scale(1.03) translateY(-2px);
}

.world-node-slot--promoted .world-island-node__img {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.42));
}

.world-node-slot--offline .world-island-node__img {
  filter: grayscale(0.7) brightness(0.7) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
  opacity: 0.72;
}

@keyframes islandRipple {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.5; }
  50% { transform: translateX(-50%) scale(1.08); opacity: 0.85; }
}

.world-node__fav {
  position: absolute;
  top: 0;
  right: -4px;
  z-index: 4;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid var(--border);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(calc(0.9 / var(--map-scale, 1)));
  transform-origin: center;
  transition: opacity 0.15s, transform 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
}
.world-node-slot:hover .world-node__fav,
.world-node__fav.is-active {
  opacity: 1;
  transform: scale(calc(1 / var(--map-scale, 1)));
}
.world-node__fav svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.world-node__fav.is-active {
  color: #fbbf24;
  background: rgba(0, 0, 0, 0.92);
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.25);
}
.world-node__fav.is-active svg { fill: currentColor; }
.world-node__fav:hover { transform: scale(calc(1.08 / var(--map-scale, 1))); }

.world-toolbar__saved.is-active {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
}

.world-node__labels {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-top: 10px;
  min-height: 78px;
  width: max-content;
  max-width: 180px;
}

.world-node__pill {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(8, 10, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  font-family: var(--font-cyber);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text);
  white-space: nowrap;
  max-width: 148px;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateX(-50%) scale(calc(1 / var(--map-scale, 1)));
  transform-origin: center top;
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.34s var(--ease-spring),
    transform 0.34s var(--ease-spring),
    visibility 0.34s;
}

.world-node__card {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(8, 10, 18, 0.92);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(10px);
  min-width: 132px;
  max-width: 168px;
  transform: scale(calc(1 / var(--map-scale, 1)));
  transform-origin: center top;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.34s var(--ease-spring),
    transform 0.34s var(--ease-spring),
    visibility 0.34s,
    border-color var(--duration-fast),
    box-shadow var(--duration-normal);
}
.world-node-slot:hover .world-node__card {
  border-color: rgba(0, 212, 238, 0.45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.world-node__name {
  display: block;
  font-family: var(--font-cyber);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.world-node__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-bottom: 4px;
}

.world-node__tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.world-node__players {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-bright);
  font-family: var(--font-cyber);
}

.world-node__sep {
  color: var(--muted);
  font-weight: 500;
  margin: 0 1px;
}

.world-node__promo {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fbbf24;
  display: grid;
  place-items: center;
  font-size: 10px;
}

.world-node-slot--region-na-east .world-node__tag:nth-child(2) { color: var(--accent-bright); border-color: rgba(0, 212, 238, 0.25); }
.world-node-slot--region-na-west .world-node__tag:nth-child(2) { color: #fbbf24; border-color: rgba(251, 191, 36, 0.25); }
.world-node-slot--region-eu .world-node__tag:nth-child(2) { color: #93c5fd; border-color: rgba(147, 197, 253, 0.25); }
.world-node-slot--region-oce .world-node__tag:nth-child(2) { color: #34d399; border-color: rgba(52, 211, 153, 0.25); }

.world-node-slot--offline .world-node__players { color: var(--muted); }

.world-surface.is-ready .world-node-slot.is-reveal {
  animation: islandReveal 0.65s var(--ease-spring) backwards, islandFloat 5.5s ease-in-out 0.65s infinite;
  animation-delay: var(--node-delay, 0s), var(--node-delay, 0s);
}

/* Zoom level-of-detail — animated crossfade between card and pill */
#world-viewport[data-lod="full"] .world-node__card {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(calc(1 / var(--map-scale, 1))) translateY(0);
}
#world-viewport[data-lod="full"] .world-node__pill {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) scale(calc(1 / var(--map-scale, 1))) translateY(10px);
}

#world-viewport[data-lod="compact"] .world-node__card,
#world-viewport[data-lod="dot"] .world-node__card {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(calc(1 / var(--map-scale, 1))) translateY(-10px);
}
#world-viewport[data-lod="compact"] .world-node__pill,
#world-viewport[data-lod="dot"] .world-node__pill {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(calc(1 / var(--map-scale, 1))) translateY(0);
}

#world-viewport[data-lod="dot"] .world-node__fav {
  display: none;
}
#world-viewport[data-lod="compact"] .world-node__labels,
#world-viewport[data-lod="dot"] .world-node__labels {
  min-height: 0;
  margin-top: 12px;
}

/* Home island — game landmark at map origin */
.world-home-island {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: none;
}
.world-home-island__scene {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: homeIslandFloat 7s ease-in-out infinite;
}
.world-home-island__shadow {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 340px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55), transparent 72%);
  filter: blur(6px);
  z-index: 0;
}
.world-home-island__img {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  height: 340px;
  max-width: 460px;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 24px color-mix(in srgb, var(--home-accent, #00d4ee) 28%, transparent));
}
.world-home-island__title {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: min(96%, 960px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.world-home-island__title-img {
  display: block;
  width: 100%;
  max-height: 216px;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.65));
}
.world-home-island__title-text {
  display: none;
  font-family: var(--font-cyber);
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8), 0 0 20px color-mix(in srgb, var(--home-accent, #00d4ee) 45%, transparent);
  line-height: 1.15;
}
.world-home-island__title-text.is-visible,
.world-home-island__title-img[hidden] + .world-home-island__title-text {
  display: block;
}
.world-surface.is-ready .world-home-island__scene {
  animation: homeIslandReveal 0.85s var(--ease-spring) backwards, homeIslandFloat 7s ease-in-out 0.85s infinite;
}

@keyframes homeIslandFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes homeIslandReveal {
  from { opacity: 0; transform: translateY(24px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Filter pull sheet */
.world-filter-sheet__title {
  font-family: var(--font-cyber);
  color: var(--accent);
  font-size: 1.125rem;
  margin-bottom: 8px;
}
.world-filter-sheet__desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: var(--space-5);
}
.world-filter-sheet__section {
  margin-bottom: var(--space-4);
}
.world-filter-sheet__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}
.world-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.world-filter-chip {
  padding: 8px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  transition: border-color var(--duration-fast), background var(--duration-fast), color var(--duration-fast);
}
.world-filter-chip:hover {
  border-color: rgba(0, 212, 238, 0.35);
  background: var(--surface-raised);
}
.world-filter-chip.selected {
  border-color: rgba(0, 212, 238, 0.5);
  background: var(--accent-muted);
  color: var(--accent-bright);
}
.world-filter-online {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-5);
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.world-filter-online input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.world-ocean {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.world-ocean__deep {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 30% 40%, rgba(0, 80, 120, 0.35), transparent 60%),
    radial-gradient(ellipse 55% 50% at 75% 65%, rgba(0, 50, 90, 0.4), transparent 55%),
    linear-gradient(165deg, #041828 0%, #062a42 35%, #043550 65%, #021520 100%);
}
.world-ocean__shimmer {
  position: absolute;
  inset: -10%;
  background:
    repeating-linear-gradient(
      105deg,
      transparent,
      transparent 80px,
      rgba(0, 212, 238, 0.03) 80px,
      rgba(0, 212, 238, 0.03) 82px
    );
  animation: oceanShimmer 24s linear infinite;
}
.world-ocean__coast {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.25;
}
.world-ocean__coast--nw {
  width: 400px;
  height: 300px;
  top: 5%;
  left: 8%;
  background: rgba(0, 212, 238, 0.15);
}
.world-ocean__coast--se {
  width: 500px;
  height: 350px;
  bottom: 8%;
  right: 5%;
  background: rgba(30, 100, 140, 0.2);
}


.world-hud {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
  pointer-events: none;
  white-space: nowrap;
}

.world-vignette {
  background:
    radial-gradient(ellipse 85% 75% at 50% 45%, transparent 30%, rgba(2, 20, 32, 0.55) 100%),
    linear-gradient(180deg, transparent 50%, rgba(2, 15, 25, 0.85) 100%);
}

@keyframes oceanShimmer {
  from { transform: translateX(0); }
  to { transform: translateX(-160px); }
}

@keyframes galaxyNebulaDrift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(2%, -1.5%) scale(1.03); }
}
@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes corePulse {
  0%, 100% { opacity: 0.85; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}
@keyframes coreRing {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.15); opacity: 0.15; }
}
@keyframes nodeRing {
  0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
  50% { transform: translate(-50%, -50%) rotate(4deg); }
}
@keyframes nodePulse {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.35); opacity: 0; }
}

@media (hover: none) and (pointer: coarse) {
  .world-node-slot:hover .world-island-node__img,
  .world-node-slot:hover .world-node__card,
  .world-node-slot:hover .world-node__fav {
    transform: none;
  }

  .world-node-slot.is-pressed .world-island-node__img {
    transform: scale(calc(1.06 * var(--pop, 1) / var(--map-scale, 1)));
    filter: brightness(1.08);
  }

  .world-node-slot.is-pressed .world-node__card {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(calc(1 / var(--map-scale, 1)));
  }

  .galaxy-hub-pillar:hover .galaxy-hub-pillar__viewport,
  .galaxy-hub-pillar:hover .galaxy-hub-pillar__img {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .galaxy-nebula,
  .galaxy-core,
  .galaxy-core::after,
  .galaxy-node__ring,
  .galaxy-node__pulse,
  .orbit-dash,
  .galaxy-planet__orbit,
  .galaxy-planet__aurora,
  .galaxy-planet__ember,
  .galaxy-planet__atmosphere,
  .galaxy-planet__texture,
  .world-ocean__shimmer,
  .world-node-slot {
    animation: none !important;
  }
}
