/* ==========================================================================
   AniLive.MOE — Ethereal Stage-Cosmos Editorial Theme
   Inspired by nayumi.dev's cosmic minimalism, infused with AniLive's
   secondary-dimension idol concert aura (rose pink + 3-penlight spectrum).
   ========================================================================== */

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("assets/fonts/outfit-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --void: #080b16;
  --ink: #12182b;
  --pearl: #f0ede6;
  --muted: #b6b9ce;
  --muted-strong: #d4d5e3;
  --muted-soft: #969ab4;

  /* AniLive Idol-Stage Palette */
  --rose: #f472b6;
  --magenta: #e0007f;
  --lavender: #b9a7eb;
  --ice: #a7d9f8;
  --pen-cyan: #38bdf8;
  --pen-gold: #facc15;
  --pen-orange: #fb923c;

  --line: rgb(208 205 239 / 16%);
  --line-strong: rgb(224 218 248 / 28%);

  --display-font: "Outfit", "PingFang SC", "Hiragino Sans GB", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --body-font: "Outfit", "PingFang SC", "Hiragino Sans GB", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;

  --page-gutter: clamp(24px, 5.6vw, 96px);
  --page-progress: 0;
  --hero-offset: 0px;
  --hero-opacity: 1;
}

@media (min-width: 1600px) {
  :root {
    --page-gutter: max(96px, calc((100vw - 1440px) / 2));
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background-color: var(--void);
  color: var(--pearl);
  font-family: var(--body-font);
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--void);
  color: var(--pearl);
  overflow-x: hidden;
  line-height: 1.75;
}

::selection {
  background: var(--rose);
  color: var(--void);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 1.5px solid var(--ice);
  outline-offset: 4px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Reading Progress Bar
   -------------------------------------------------------------------------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 60;
  pointer-events: none;
  transform-origin: 0 50%;
  transform: scaleX(var(--page-progress));
  background: linear-gradient(90deg, var(--rose) 0%, var(--lavender) 52%, var(--pen-cyan) 100%);
  box-shadow: 0 0 12px rgb(244 114 182 / 55%);
}

/* --------------------------------------------------------------------------
   Fixed Cosmic Stage Background & Fallbacks
   -------------------------------------------------------------------------- */
.universe {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 70% at 72% 38%, rgb(92 34 94 / 22%), transparent 62%),
    radial-gradient(ellipse 75% 60% at 22% 76%, rgb(36 74 116 / 20%), transparent 65%),
    var(--void);
}

#universe-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.fallback-sky {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.is-fallback .fallback-sky {
  opacity: 1;
}

.fallback-nebula {
  position: absolute;
  inset: -15%;
  background:
    radial-gradient(circle at 68% 48%, rgb(224 68 158 / 26%), transparent 38%),
    radial-gradient(circle at 56% 52%, rgb(137 81 198 / 26%), transparent 46%),
    radial-gradient(circle at 75% 44%, rgb(56 189 248 / 20%), transparent 40%);
  filter: blur(42px);
}

.fallback-portal {
  position: absolute;
  top: 50%;
  left: 68%;
  width: min(46vw, 540px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgb(244 176 226 / 68%);
  box-shadow:
    0 0 42px rgb(232 77 162 / 42%),
    0 0 110px rgb(120 144 244 / 28%),
    inset 0 0 60px rgb(196 142 238 / 24%);
  background: radial-gradient(circle, rgb(18 14 38 / 52%) 0%, rgb(14 17 42 / 78%) 72%, rgb(148 92 204 / 20%) 100%);
}

.universe-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 75% at 50% 48%, transparent 38%, rgb(8 11 22 / 64%) 100%),
    linear-gradient(180deg, rgb(8 11 22 / 36%) 0%, transparent 20%, transparent 82%, rgb(8 11 22 / 65%) 100%);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 112px;
  padding: 0 var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 30;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display-font);
  letter-spacing: -0.02em;
  transition: opacity 0.25s ease;
}

.brand:hover {
  opacity: 0.92;
}

.brand-star {
  color: var(--pearl);
  filter: drop-shadow(0 0 10px rgb(244 114 182 / 55%));
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease;
}

.brand:hover .brand-star {
  transform: rotate(90deg) scale(1.06);
  color: var(--rose);
}

.brand-name {
  font-size: 21px;
  font-weight: 500;
  color: var(--pearl);
  line-height: 1;
}

.brand-tld {
  font-size: 0.64em;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--muted-strong);
  margin-left: 1px;
}

.brand-kana {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted-soft);
  border-left: 1px solid var(--line);
  padding-left: 10px;
  margin-left: 2px;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--muted-strong);
  transition: color 0.25s ease;
}

.nav-link:hover {
  color: var(--pearl);
}

.motion-toggle {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgb(167 163 198 / 6%);
  color: var(--pearl);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.motion-toggle:hover {
  border-color: rgb(244 114 182 / 55%);
  background: rgb(244 114 182 / 12%);
  transform: scale(1.04);
}

.motion-toggle .icon-play {
  display: none;
}

[data-motion="paused"] .motion-toggle .icon-pause {
  display: none;
}

[data-motion="paused"] .motion-toggle .icon-play {
  display: block;
}

/* --------------------------------------------------------------------------
   Main Layout Wrapper
   -------------------------------------------------------------------------- */
main,
.site-footer {
  position: relative;
  z-index: 10;
}

/* --------------------------------------------------------------------------
   Section 1: Full-Viewport Editorial Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: max(100svh, 740px);
  max-height: 1200px;
  padding: 130px var(--page-gutter) 38px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-inner {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  transform: translate3d(0, var(--hero-offset), 0);
  opacity: var(--hero-opacity);
  will-change: transform, opacity;
}

.hero-copy {
  max-width: 720px;
}

.hero-eyebrow {
  margin: 0 0 26px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted-strong);
}

.eyebrow-star {
  color: var(--rose);
  font-size: 13px;
  text-shadow: 0 0 12px rgb(244 114 182 / 75%);
}

.hero-title {
  margin: 0 0 28px;
  font-family: var(--display-font);
  font-size: clamp(58px, 8.2vw, 136px);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.058em;
  color: var(--pearl);
  text-shadow: 0 2px 32px rgb(8 11 22 / 55%);
}

.hero-title span {
  display: block;
}

.hero-subtitle {
  margin: 0 0 38px;
  max-width: 52ch;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.95;
  letter-spacing: 0.02em;
  color: var(--muted-strong);
  text-shadow: 0 1px 16px rgb(8 11 22 / 75%);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.explore-link {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 8px 8px 8px 24px;
  border-radius: 40px;
  border: 1px solid rgb(208 202 232 / 34%);
  background: rgb(167 163 198 / 6%);
  backdrop-filter: blur(8px);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--pearl);
  transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.explore-link:hover {
  border-color: rgb(244 114 182 / 58%);
  background: rgb(244 114 182 / 10%);
  box-shadow: 0 0 28px rgb(244 114 182 / 16%);
}

.explore-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgb(208 202 232 / 26%);
  background: rgb(255 255 255 / 4%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.explore-link:hover .explore-badge {
  transform: translateY(2px);
  border-color: rgb(244 114 182 / 55%);
  color: var(--rose);
}

.qq-quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 40px;
  border: 1px solid var(--line);
  background: rgb(12 16 32 / 36%);
  backdrop-filter: blur(8px);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--muted-strong);
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

.qq-quick-pill:hover {
  border-color: rgb(251 146 60 / 50%);
  color: var(--pearl);
  background: rgb(251 146 60 / 8%);
}

.penlight-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.penlight-dots i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 0 8px var(--dot);
}

/* Right-side subtle orbit caption */
.hero-orbit-label {
  align-self: flex-end;
  margin-bottom: 54px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 240px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.85;
  letter-spacing: 0.04em;
}

.hero-orbit-label p {
  margin: 0;
}

.orbit-rule {
  width: 34px;
  height: 1px;
  margin-top: 10px;
  background: var(--line-strong);
  flex-shrink: 0;
}

/* Hero Bottom Hairline Bar */
.hero-bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.hero-quick-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--muted-strong);
}

.hero-quick-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.25s ease;
}

.hero-quick-links a .arrow {
  font-size: 11px;
  color: var(--muted-soft);
  transition: transform 0.25s ease, color 0.25s ease;
}

.hero-quick-links a:hover {
  color: var(--pearl);
}

.hero-quick-links a:hover .arrow {
  color: var(--rose);
  transform: translate(2px, -2px);
}

.quick-upcoming {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-soft);
  cursor: default;
  user-select: none;
}

.upcoming-tag {
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid rgb(56 189 248 / 28%);
  color: rgb(147 219 252 / 85%);
  background: rgb(56 189 248 / 8%);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pen-cyan);
  box-shadow: 0 0 8px var(--pen-cyan);
  animation: pulse-soft 2.6s ease-in-out infinite;
}

@keyframes pulse-soft {
  0%, 100% {
    opacity: 0.95;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.8);
  }
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.25s ease;
}

.scroll-cue:hover {
  color: var(--pearl);
}

.scroll-line {
  width: 1px;
  height: 22px;
  background: linear-gradient(180deg, transparent, var(--rose), transparent);
  animation: scroll-bob 2.4s ease-in-out infinite;
}

@keyframes scroll-bob {
  0%, 100% {
    transform: translateY(-2px);
    opacity: 0.45;
  }
  50% {
    transform: translateY(3px);
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   Section 2: Core Portals (.worlds asymmetric 2-column layout)
   -------------------------------------------------------------------------- */
.worlds {
  padding: clamp(96px, 13vh, 160px) var(--page-gutter);
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  column-gap: 7.5%;
  align-items: start;
}

.worlds-intro {
  position: sticky;
  top: 17vh;
}

.section-glyph {
  font-size: 20px;
  line-height: 1;
  color: var(--muted-strong);
  margin-bottom: 24px;
}

.worlds-intro h2 {
  margin: 0 0 24px;
  font-family: var(--display-font);
  font-size: clamp(36px, 4.1vw, 62px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.04em;
  color: var(--pearl);
}

.section-lead {
  margin: 0 0 12px;
  max-width: 34ch;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.9;
  color: var(--muted);
}

.section-prompt {
  margin: 26px 0 38px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--pearl);
}

.worlds-orbit {
  width: 190px;
  height: auto;
  color: var(--pearl);
  overflow: visible;
}

.worlds-orbit .orbit-dot {
  filter: drop-shadow(0 0 5px currentColor);
}

/* Editorial Hairline Rows (no heavy boxed cards) */
.world-links {
  border-top: 1px solid var(--line);
}

.world-link {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 26px;
  min-height: 176px;
  padding: 34px 20px;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.35s ease;
  isolation: isolate;
}

.world-link::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--world-color, var(--rose)) 11%, transparent) 0%,
    color-mix(in srgb, var(--world-color, var(--rose)) 3%, transparent) 62%,
    transparent 100%
  );
  transition: opacity 0.35s ease;
}

.world-link:not(.is-upcoming):hover::before {
  opacity: 1;
}

.world-link:not(.is-upcoming):hover {
  border-bottom-color: color-mix(in srgb, var(--world-color, var(--rose)) 38%, var(--line));
}

.world-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgb(10 14 28 / 45%);
  backdrop-filter: blur(6px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-strong);
  transition: border-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

.world-link:not(.is-upcoming):hover .world-icon {
  border-color: color-mix(in srgb, var(--world-color) 65%, transparent);
  color: var(--world-color);
  box-shadow: 0 0 24px color-mix(in srgb, var(--world-color) 25%, transparent);
}

.world-body {
  min-width: 0;
  text-shadow: 0 1px 14px rgb(8 11 22 / 86%);
}

.world-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.world-domain {
  font-family: var(--display-font);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--muted-strong);
  background: rgb(255 255 255 / 3%);
}

.meta-badge.is-live {
  border-color: rgb(244 114 182 / 34%);
  color: #f9a8d4;
  background: rgb(244 114 182 / 10%);
}

.meta-badge.is-upcoming-badge {
  border-color: rgb(56 189 248 / 34%);
  color: #7dd3fc;
  background: rgb(56 189 248 / 10%);
}

.world-link h3 {
  margin: 0 0 8px;
  font-family: var(--display-font);
  font-size: clamp(26px, 2.7vw, 36px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--pearl);
  transition: color 0.3s ease;
}

.world-link:not(.is-upcoming):hover h3 {
  color: var(--world-color);
}

.title-sub {
  font-size: 0.56em;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--muted);
  vertical-align: middle;
  margin-left: 4px;
}

.world-link p {
  margin: 0;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--muted);
}

.qq-number {
  font-family: var(--display-font);
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--pearl);
}

.world-arrow {
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease;
}

.world-link:hover .world-arrow {
  color: var(--world-color);
  transform: translate(3px, -3px);
}

/* Upcoming Non-Link Row (New Library — No <a> jump) */
.world-link.is-upcoming {
  cursor: default;
  opacity: 0.84;
}

.world-link.is-upcoming .world-icon {
  border-style: dashed;
  border-color: rgb(56 189 248 / 38%);
  color: rgb(125 211 252 / 80%);
}

.world-link.is-upcoming h3 {
  color: rgb(240 237 230 / 82%);
}

.upcoming-state {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px dashed rgb(56 189 248 / 34%);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: rgb(125 211 252 / 86%);
  background: rgb(56 189 248 / 6%);
  white-space: nowrap;
}

/* Copy Pill Button on QQ Row */
.copy-pill {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgb(251 146 60 / 42%);
  background: rgb(251 146 60 / 10%);
  color: #fed7aa;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.copy-pill:hover {
  background: rgb(251 146 60 / 20%);
  border-color: rgb(251 146 60 / 70%);
  color: var(--pearl);
}

.copy-pill:active {
  transform: scale(0.97);
}

.copy-pill.is-done {
  border-color: rgb(74 222 128 / 55%);
  background: rgb(74 222 128 / 16%);
  color: #bbf7d0;
}

/* --------------------------------------------------------------------------
   Section 3: Friend Links (.allies editorial hairline directory)
   -------------------------------------------------------------------------- */
.allies {
  padding: clamp(72px, 10vh, 128px) var(--page-gutter);
}

.allies-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 44px;
}

.section-kicker {
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--rose);
}

.allies-header h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: clamp(32px, 3.8vw, 54px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.04em;
  color: var(--pearl);
}

.allies-desc {
  margin: 0;
  max-width: 42ch;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--muted);
}

.ally-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.ally-item {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 26px 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgb(8 11 22 / 46%);
  backdrop-filter: blur(8px);
  transition: background-color 0.35s ease, border-color 0.35s ease;
  isolation: isolate;
}

.ally-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(
    circle at 14% 16%,
    color-mix(in srgb, var(--ally-color, var(--rose)) 14%, transparent) 0%,
    transparent 70%
  );
  transition: opacity 0.35s ease;
}

.ally-item:hover::before {
  opacity: 1;
}

.ally-item:hover {
  background: rgb(14 18 34 / 44%);
}

.ally-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.ally-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--muted-strong);
  transition: border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.ally-item:hover .ally-icon {
  border-color: color-mix(in srgb, var(--ally-color) 65%, transparent);
  color: var(--ally-color);
  box-shadow: 0 0 14px color-mix(in srgb, var(--ally-color) 32%, transparent);
}

.ally-host {
  font-family: var(--display-font);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted-soft);
}

.ally-arrow {
  margin-left: auto;
  font-size: 14px;
  color: var(--muted-soft);
  transition: transform 0.28s ease, color 0.28s ease;
}

.ally-item:hover .ally-arrow {
  color: var(--ally-color);
  transform: translate(2px, -2px);
}

.ally-item h3 {
  margin: 0 0 10px;
  font-family: var(--display-font);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--pearl);
}

.ally-primary-link {
  transition: color 0.25s ease;
}

/* Stretched primary link so whole tile is clickable without nesting <a> */
.ally-primary-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.ally-item:hover .ally-primary-link {
  color: var(--ally-color);
}

.ally-item p {
  margin: 0;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.78;
  color: var(--muted);
}

.ally-item p.is-subtle {
  color: var(--muted-soft);
}

.ally-extras {
  margin-top: 16px;
  padding-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ally-pill {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgb(8 11 22 / 55%);
  font-family: var(--display-font);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--muted-strong);
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

.ally-pill:hover {
  border-color: color-mix(in srgb, var(--ally-color) 65%, transparent);
  color: var(--pearl);
  background: color-mix(in srgb, var(--ally-color) 16%, rgb(8 11 22 / 75%));
}

.ally-item.is-archive {
  opacity: 0.78;
}

.ally-item.is-archive:hover {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Section 4: About & Tech Team (Centered Cosmic Finale)
   -------------------------------------------------------------------------- */
.about {
  padding: clamp(110px, 14vh, 175px) var(--page-gutter) clamp(88px, 11vh, 130px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-core {
  max-width: 680px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-emblem {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--rose);
  margin-bottom: 28px;
}

.about-emblem span {
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.about-logo-wrap {
  margin-bottom: 14px;
}

.about-logo {
  height: 44px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 20px rgb(224 0 127 / 32%));
}

.about-kicker {
  margin: 0 0 22px;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--muted-strong);
}

.about h2 {
  margin: 0 0 24px;
  font-family: var(--display-font);
  font-size: clamp(36px, 4.6vw, 66px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.045em;
  color: var(--pearl);
  text-shadow: 0 2px 26px rgb(8 11 22 / 60%);
}

.about-desc {
  margin: 0 0 38px;
  max-width: 48ch;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.95;
  color: var(--muted-strong);
  text-shadow: 0 1px 18px rgb(8 11 22 / 92%);
}

.about-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

.about-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-strong);
  font-size: 13.5px;
  letter-spacing: 0.03em;
  color: var(--pearl);
  transition: border-color 0.25s ease, color 0.25s ease;
}

.about-link:hover {
  border-color: var(--rose);
  color: #fbcfe8;
}

/* Tech Team Credits Panel */
.team-panel {
  width: 100%;
  max-width: 860px;
  margin-top: clamp(72px, 9vh, 110px);
  padding: 30px 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgb(8 11 22 / 54%);
  backdrop-filter: blur(12px);
}

.team-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.team-header h3 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--pearl);
}

.team-sub {
  font-family: var(--display-font);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted-soft);
}

.team-rows {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.team-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: baseline;
  gap: 16px;
}

.team-role {
  font-size: 12.5px;
  color: var(--muted-soft);
  letter-spacing: 0.04em;
}

.team-members {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgb(12 16 32 / 46%);
  backdrop-filter: blur(6px);
  font-size: 12.5px;
  color: var(--muted-strong);
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

a.member-chip:hover {
  border-color: rgb(244 114 182 / 52%);
  color: var(--pearl);
  background: rgb(244 114 182 / 12%);
}

a.member-chip span {
  font-size: 10.5px;
  color: var(--muted-soft);
  transition: color 0.25s ease;
}

a.member-chip:hover span {
  color: var(--rose);
}

.member-chip.is-lead {
  border-color: rgb(244 114 182 / 36%);
  color: #fbcfe8;
  background: rgb(244 114 182 / 10%);
}

.member-chip.is-plain {
  cursor: default;
  color: var(--muted);
  border-style: dashed;
  border-color: rgb(208 205 239 / 12%);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: rgb(8 11 22 / 64%);
  backdrop-filter: blur(10px);
  padding: 44px var(--page-gutter) 38px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding-bottom: 34px;
}

.footer-motto {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-align: center;
}

.back-to-top {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--muted-strong);
  transition: color 0.25s ease, transform 0.25s ease;
}

.back-to-top:hover {
  color: var(--pearl);
  transform: translateY(-2px);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 11.5px;
  color: var(--muted-soft);
}

.footer-bottom p {
  margin: 0;
}

.footer-sig {
  font-family: var(--display-font);
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   Toast Feedback
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 80;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgb(244 114 182 / 42%);
  background: rgb(14 18 34 / 92%);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 34px rgb(0 0 0 / 42%);
  font-size: 13px;
  color: var(--pearl);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .ally-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .worlds {
    grid-template-columns: 1fr;
    row-gap: 48px;
  }

  .worlds-intro {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    column-gap: 24px;
  }

  .worlds-intro .section-glyph,
  .worlds-intro h2,
  .worlds-intro .section-lead,
  .worlds-intro .section-prompt {
    grid-column: 1;
  }

  .worlds-orbit {
    grid-column: 2;
    grid-row: 1 / span 4;
    width: 150px;
  }
}

@media (max-width: 720px) {
  .site-header {
    height: 84px;
  }

  .brand-kana,
  .nav-link-secondary {
    display: none;
  }

  .site-nav {
    gap: 18px;
  }

  .hero {
    min-height: 100svh;
    max-height: none;
    padding: 108px var(--page-gutter) 28px;
  }

  .hero-eyebrow {
    font-size: 11px;
    letter-spacing: 0.03em;
    gap: 7px;
  }

  .team-panel {
    padding: 24px 20px;
  }

  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding-bottom: 24px;
  }

  .hero-orbit-label {
    display: none;
  }

  .hero-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .worlds-intro {
    display: block;
  }

  .worlds-orbit {
    margin-top: 8px;
    width: 150px;
  }

  .world-link {
    grid-template-columns: 42px minmax(0, 1fr);
    row-gap: 16px;
    column-gap: 16px;
    min-height: auto;
    padding: 26px 8px;
  }

  .world-icon {
    width: 42px;
    height: 42px;
  }

  .world-arrow,
  .upcoming-state,
  .copy-pill {
    grid-column: 2;
    justify-self: start;
  }

  .allies-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .ally-grid {
    grid-template-columns: 1fr;
  }

  .team-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 18px;
  }

  .footer-motto {
    text-align: left;
  }

  .back-to-top {
    justify-self: start;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .status-dot,
  .scroll-line {
    animation: none;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}
