.hero {
  min-height: min(680px, 82svh);
  grid-template-columns: minmax(320px, .85fr) minmax(0, 1.15fr);
  isolation: isolate;
  gap: 0;
}

.hero-copy { position: relative; z-index: 2; padding: 60px 0; pointer-events: none; }
.hero-copy a { pointer-events: auto; }
.hero-copy h1 { font-size: clamp(64px, 7.8vw, 120px); line-height: 1.03; letter-spacing: -.08em; }
.hero-copy h1 span { color: #dbf5bc; }
.hero-copy h1 span:last-child {
  background: linear-gradient(111deg, #f0ffd7 3%, #d7f7af 50%, #95bfac 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-copy p { color: #b4c1bf; }
.hero-actions .primary { justify-content: center; min-width: 156px; box-shadow: 0 0 28px #caf99c25; }
.hero-actions .primary:hover { background: #e0ffbf; box-shadow: 0 0 32px #caf99c50; }

.planet-stage {
  width: min(74vw, 1060px);
  min-height: 0;
  height: min(640px, 72svh);
  justify-self: end;
  margin: 0 -30px 0 0;
  overflow: hidden;
  background: radial-gradient(ellipse at 61% 44%, #192a28 0%, transparent 60%);
}

.planet-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.planet-stage[data-renderer="webgl"] .planet-photo { visibility: hidden; }
.planet-stage:not([data-renderer="webgl"]) .planet-canvas { visibility: hidden; }

.world-drag {
  position: absolute;
  z-index: 2;
  inset: 13% 3% 22% 23%;
  cursor: grab;
  touch-action: none;
  user-select: none;
  border-radius: 50%;
}
.world-drag:focus-visible { outline: 1px dashed #c7f78c; outline-offset: 3px; }
.world-dragging .world-drag { cursor: grabbing; }
.world-controls { position: absolute; z-index: 3; top: 8%; right: 3%; display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.world-controls .motion-control { position: static; }
.world-controls .motion-control:focus-visible, .signal-button:focus-visible {
  outline: 2px solid #d8f5b8;
  outline-offset: 3px;
}
.world-camera-tools:not([hidden]) { display: flex; gap: 6px; align-items: center; }
.world-camera-tools output { min-width: 3.2rem; text-align: center; color: #d4e5dc; font-size: 13px; font-variant-numeric: tabular-nums; }
.world-camera-tools .zoom-button { min-width: 34px; padding-inline: 8px; font-weight: 700; font-size: 16px; line-height: 1.45; }
.drag-hint { position: absolute; z-index: 2; right: 4%; bottom: 5%; margin: 0; font-size: 13px; color: #adbfbd; pointer-events: none; }
html[lang="en"] .hero-copy h1 { font-size: clamp(65px, 7.1vw, 108px); letter-spacing: -.085em; }
.hero-copy h1 span:first-child { color: var(--text); }

.planet-stage::before {
  position: absolute;
  inset: 0;
  content: '';
  background: url('genesis-nebula.png') center / cover;
  opacity: .52;
  mask-image: radial-gradient(ellipse at 56% 47%, #000 6%, #000 25%, transparent 70%);
  pointer-events: none;
}

.planet-stage::after {
  position: absolute;
  inset: 0;
  content: '';
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, #080d16 0%, #080d16b8 12%, transparent 35%);
}

.planet-photo {
  position: absolute;
  top: 49%;
  left: 58%;
  width: 105%;
  height: auto;
  max-width: none;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 24px #b5cd9c15);

  pointer-events: none;
}

.planet-light {
  position: absolute;
  width: 66%; height: 66%; left: 26%; top: 9%;
  background: radial-gradient(ellipse, #accb8733, #65868a13 42%, transparent 70%);
  animation: breathe 12s ease-in-out infinite alternate;
  pointer-events: none;
}

.world-telemetry {
  position: absolute; z-index: 2; left: 42%; bottom: 7%; right: 3%;
  display: grid; gap: 9px; justify-items: start;
  font-size: 13px; font-variant-numeric: tabular-nums;
}
.world-telemetry::before {
  content: ''; position: absolute; inset: -10px auto auto 0; width: min(76%, 245px); height: 1px;
  transform-origin: left;
  background: linear-gradient(90deg, #cbf4abcf, #a1cad76b 47%, transparent);
}
.world-rank { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.world-rank strong {
  border: 1px solid #a5cc694a; border-radius: 4px; background: #1a291dcf;
  padding: 5px 8px; font: 700 12px Consolas, monospace;
  color: #e4f9cc; letter-spacing: .13em;
}
.world-rank span { color: #b8c8c8; font-size: 12px; }
.world-telemetry ul { display: flex; flex-wrap: wrap; gap: 5px; list-style: none; padding: 0; margin: 0; }
.signal-button {
  display: flex; align-items: center; gap: 5px; padding: 5px 7px; min-height: 30px;
  color: #d5dfe2; background: #101923ef; border: 1px solid #8aacab40; border-radius: 5px;
  font-size: 12px; line-height: 1.15; white-space: nowrap;
}
.signal-button::before { content: ''; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--signal-color); }
.signal-button span:last-child { color: var(--signal-color); font: 600 11px Consolas, monospace; }
.signal-button:is(:hover,:focus-visible), .signal-button.effect-live { border-color: var(--signal-color); color: #fff; }
.research, [data-role="0"], .world-feedback[data-effect="0"], .join-feedback[data-effect="0"] { --signal-color: #c7f78c; }
.building, [data-role="1"], .world-feedback[data-effect="1"], .join-feedback[data-effect="1"] { --signal-color: #a9d1ff; }
.guarding, [data-role="2"], .world-feedback[data-effect="2"], .join-feedback[data-effect="2"] { --signal-color: #ffd3af; }
.world-feedback {
  position: absolute; z-index: 3; top: 18%; right: 3%; max-width: 55%;
  pointer-events: none; border: 1px solid color-mix(in srgb, var(--signal-color) 52%, transparent);
  border-left: 3px solid var(--signal-color); border-radius: 5px; padding: 7px 10px;
  color: var(--signal-color); background: #0b131dee; font-size: 13px; overflow-wrap: anywhere;
}
.world-feedback[data-source="preview"] { border-left-width: 1px; }
.join-feedback:not([hidden]) {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 7px 12px; margin-top: 12px; padding: 8px 10px;
  color: var(--signal-color); background: #101c29; border-left: 2px solid var(--signal-color);
  border-radius: 4px; font-size: 13px; overflow-wrap: anywhere;
}
.join-feedback button {
  color: var(--signal-color); background: transparent; border: 0; padding: 3px 0;
  font-size: 12px; text-decoration: underline; text-underline-offset: 3px;
}
.motion-control {
  position: absolute; z-index: 2; right: 3%; top: 8%; color: #c2cfcd;
  background: linear-gradient(180deg, #1b2932d9, #0c151ed9); border: 1px solid #8aacab50;
  border-radius: 6px; padding: 7px 11px; font-size: 13px;
}
.motion-control:hover { border-color: #b7d4b0; color: #edf4ed; }
.evolution-pulse {
  position: absolute; z-index: 1; left: 58%; top: 47%; width: min(70%, 400px);
  aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none;
}
.evolution-pulse::before, .evolution-pulse::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 100%; aspect-ratio: 1;
  border: 1px solid #cdf9ac; border-radius: 50%; opacity: 0; box-shadow: 0 0 24px #c7f78c80;
}
.world-evolved:not(.motion-paused) .evolution-pulse::before { animation: evolve 2s ease-out both; }
.world-evolved:not(.motion-paused) .evolution-pulse::after { animation: evolve 1.8s .26s ease-out both; border-color: #b1ddff; }
.evolution-status { position: absolute; z-index: 2; left: 42%; bottom: 19%; color: #e2f9cc; background: #13291ee8; border: 1px solid #b4dc8090; border-radius: 6px; padding: 8px 13px; font-size: 14px; }
.motion-paused .planet-light, .offscreen .planet-light { animation-play-state: paused; }

.metrics {
  position: relative; border-color: #36524980;
  background: linear-gradient(115deg,#18292387,#0f1823 56%,#101e2a);
  box-shadow: 0 12px 40px #05090e48;
}
.metrics::before {
  content: ''; position: absolute; inset: 0 8% auto; height: 1px; transform-origin: left;
  background: linear-gradient(90deg, #bbe6ac00, #bbe6ac88 32%, #9acae96b 68%, #9acae900);
  pointer-events: none;
}
.epoch-track { height: 2px; margin-top: 10px; background: #29343c; border-radius: 2px; overflow: hidden; }
.epoch-track i { display: block; height: 100%; background: #c7f78c; transform-origin: left; transform: scaleX(var(--epoch-progress, 0)); transition: transform .85s linear; }
.growth-panel {
  margin-top: 22px; padding: clamp(16px, 3vw, 28px);
  background: radial-gradient(ellipse at top right, #20342b88, transparent 60%), #0d1620;
  border: 1px solid #293d42; border-radius: 12px;
}
.growth-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 17px; }
.growth-heading h2 { margin: 0; color: #ecf3ef; font-size: clamp(21px, 3vw, 29px); line-height: 1.1; letter-spacing: -.03em; }
.growth-heading p, .growth-note { margin: 6px 0 0; color: #b2c1c4; font-size: 13px; line-height: 1.45; }
.growth-target {
  display: flex; gap: 8px; align-items: center; flex-shrink: 0; padding: 5px 8px;
  border: 1px solid #43594a; border-radius: 5px; color: #c1d3c3; font-size: 12px;
}
.growth-target strong { color: #d4fcab; font: 700 18px Consolas, monospace; }
.growth-tracks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.growth-track {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 9px;
  padding: 12px; border: 1px solid #2a3b48; border-radius: 7px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--signal-color) 4%, #101c29), #101c29 72%);
}
.growth-track.track-ready { border-color: color-mix(in srgb, var(--signal-color) 42%, #243543); }
.growth-icon {
  display: grid; place-content: center; height: 28px; color: var(--signal-color);
  border: 1px solid color-mix(in srgb, var(--signal-color) 30%, transparent); border-radius: 6px;
  background: color-mix(in srgb, var(--signal-color) 8%, #101c29); font-size: 17px;
}
.growth-track h3 { color: #e1e9ec; margin: 0; font-size: 13px; line-height: 1.3; }
.growth-value { margin: 5px 0 7px; color: var(--signal-color); font: 600 12px Consolas, monospace; overflow-wrap: anywhere; }
.growth-track progress {
  appearance: none; display: block; width: 100%; height: 4px; border: 0; border-radius: 4px;
  background: #2a3a48; accent-color: var(--signal-color); overflow: hidden;
}
.growth-track progress::-webkit-progress-bar { background: #2a3a48; }
.growth-track progress::-webkit-progress-value { background: var(--signal-color); transition: width .45s ease; }
.growth-track progress::-moz-progress-bar { background: var(--signal-color); }
.growth-track progress:not([value]) { opacity: .65; }
.growth-note { margin-top: 12px; }
.growth-note[hidden] { display: none; }
.role { transition: background .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease; }
.role.selected { border-color: var(--signal-color); box-shadow: inset 0 2px 0 color-mix(in srgb, var(--signal-color) 48%, transparent); }
.role.effect-live {
  border-color: var(--signal-color);
  box-shadow: inset 0 0 34px color-mix(in srgb, var(--signal-color) 18%, transparent);
}
.role:nth-child(2).selected { background: linear-gradient(145deg, #223347, #101a25 82%); }
.role:nth-child(3).selected { background: linear-gradient(145deg, #382c2d, #1a1c26 82%); }
.role:hover { transform: translateY(-3px); }
.role:active { transform: translateY(0); }
.manifesto { background: linear-gradient(#080d16 1%, #080d1670 40%, #080d16 99%), url('genesis-nebula.png') center / cover; }
@keyframes breathe { from { opacity: .52; transform: scale(.93); } to { opacity: 1; transform: scale(1.11); } }
@keyframes evolve { from { opacity: .85; transform: translate(-50%, -50%) scale(.5); } to { opacity: 0; transform: translate(-50%, -50%) scale(1.72); } }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy h1, .hero-copy p, .hero-actions { animation: enter-world .85s cubic-bezier(.2,.7,.2,1) both; }
  .hero-copy p { animation-delay: .12s; }
  .hero-actions { animation-delay: .20s; }
  .metrics::before { animation: extend-light 1.55s .45s cubic-bezier(.18,.76,.35,1) both; }
  .world-telemetry { animation: enter-world .9s .62s cubic-bezier(.2,.7,.2,1) both; }
  .world-telemetry::before { animation: extend-light 1.15s .64s cubic-bezier(.18,.76,.35,1) both; }
  .planet-stage[data-renderer="fallback"] .planet-photo { animation: reveal-planet 1.3s ease-out both; }
  .motion-paused :is(.world-telemetry, .planet-photo), .motion-paused .world-telemetry::before {
    animation-play-state: paused;
  }
}
@keyframes enter-world {
  from { opacity: .68; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes extend-light {
  from { opacity: .2; transform: scaleX(.06); }
  to { opacity: 1; transform: scaleX(1); }
}
@keyframes reveal-planet {
  from { opacity: .58; }
  to { opacity: 1; }
}

@media (max-width: 850px) {
  .hero { min-height: 550px; }
  .hero-copy h1 { font-size: clamp(60px, 10vw, 90px); }
  .planet-stage { width: 75vw; height: 520px; margin-right: -16px; }
  .world-telemetry { left: 40%; bottom: 7%; }
  .drag-hint { bottom: 2%; }
}

@media (max-width: 650px) {
  .hero { min-height: 0; grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding: 46px 0 0; }
  .hero-copy h1 { font-size: clamp(56px, 14vw, 83px); }
  .hero-copy p { font-size: 15px; }
  .hero-actions { margin-top: 22px; }
  .hero-actions .primary { min-width: 142px; }
  .planet-stage { width: 100%; height: clamp(275px, 77vw, 430px); margin: 5px 0 14px; }
  .world-drag { inset: 18% 3% 23%; }
  .world-controls { top: 2%; right: 0; }
  .drag-hint { bottom: 21%; right: 2%; font-size: 11px; }
  html[lang="en"] .hero-copy h1 { font-size: clamp(51px, 13.5vw, 85px); }
  .planet-stage::after { background: linear-gradient(180deg, #080d16 0%, transparent 20%); }
  .planet-photo { left: 50%; top: 45%; width: 124%; }
  .world-telemetry { left: 4px; bottom: 1%; right: 0; gap: 4px; }
  .world-feedback { top: 17%; right: 0; max-width: 88%; }
  .motion-control { top: 4%; right: 0; }
  .evolution-status { bottom: 24%; left: 12px; }
  .evolution-pulse { left: 50%; }
}

@media (max-width: 550px) {
  .growth-tracks { grid-template-columns: minmax(0, 1fr); }
  .growth-heading p, .growth-note { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .growth-track progress::-webkit-progress-value { transition: none; }
  .epoch-track i { transition: none; }
}
