:root {
  color-scheme: dark;
  --ink: #f7fbff;
  --ink-soft: #cfe9ff;
  --ink-muted: #96bddc;
  --night-950: #04122f;
  --night-900: #071b3d;
  --night-800: #0b2a5b;
  --blue-500: #4fb5ff;
  --cyan-300: #91dcff;
  --ice-100: #eaf7ff;
  --violet-300: #b6a8ff;
  --gold-300: #ffd98a;
  --line: rgba(167, 220, 255, 0.24);
  --line-strong: rgba(190, 231, 255, 0.48);
  --panel: rgba(7, 30, 67, 0.68);
  --panel-light: rgba(236, 248, 255, 0.92);
  --navy-text: #08234b;
  --shadow-blue: 0 24px 80px rgba(14, 101, 196, 0.24);
  --display: "Segoe UI Variable Display", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  --body: "Segoe UI Variable Text", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  --ease-space: cubic-bezier(0.2, 0.75, 0.15, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--night-950);
  overflow-x: clip;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--body);
  font-synthesis: none;
  line-height: 1.5;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(circle at 72% 18%, rgba(111, 198, 255, 0.22), transparent 28%),
    radial-gradient(circle at 18% 66%, rgba(93, 111, 255, 0.16), transparent 30%),
    linear-gradient(135deg, var(--night-950), var(--night-900) 46%, var(--night-800));
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -4;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(ellipse at 68% 54%, rgba(206, 241, 255, 0.2), transparent 18%),
    radial-gradient(ellipse at 68% 54%, rgba(80, 181, 255, 0.16), transparent 35%),
    linear-gradient(116deg, transparent 20%, rgba(135, 218, 255, 0.08) 48%, transparent 74%);
}

a {
  color: inherit;
}

.keep {
  white-space: nowrap;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--gold-300);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--navy-text);
  background: var(--ice-100);
  transform: translateY(-160%);
  transition: transform 180ms ease-out;
}

.skip-link:focus {
  transform: translateY(0);
}

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

.cosmic-haze {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.9;
  background:
    radial-gradient(ellipse at 67% 42%, rgba(238, 250, 255, 0.22) 0 6%, transparent 22%),
    radial-gradient(ellipse at 53% 74%, rgba(118, 210, 255, 0.16), transparent 30%),
    radial-gradient(ellipse at 27% 25%, rgba(184, 168, 255, 0.1), transparent 24%);
  filter: saturate(118%);
  animation: haze-breathe 12s ease-in-out infinite alternate;
}

.cosmic-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(164, 220, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(164, 220, 255, 0.08) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(to bottom, black, transparent 74%);
}

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1500px, calc(100% - 72px));
  min-height: 88px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--night-900);
  font-size: 12px;
  font-weight: 800;
  background:
    radial-gradient(circle at 34% 28%, #fff, var(--cyan-300) 44%, var(--blue-500) 72%, #2868d7);
  box-shadow: 0 0 28px rgba(145, 220, 255, 0.45);
}

.brand-copy {
  display: grid;
  gap: 4px;
}

.brand-copy strong {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 660;
  line-height: 1;
  letter-spacing: 0.22em;
}

.brand-copy small,
.header-status,
.eyebrow,
.section-kicker,
.planet-index,
.meta-label {
  color: var(--ink-muted);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-copy small {
  letter-spacing: 0.2em;
}

.header-status,
.eyebrow {
  letter-spacing: 0.12em;
}

.section-kicker,
.planet-index,
.meta-label {
  letter-spacing: 0.2em;
}

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

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.header-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: var(--cyan-300);
  box-shadow: 0 0 14px rgba(145, 220, 255, 0.9);
}

.motion-toggle,
.back-link,
.text-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--ink-soft);
  font: 600 12.5px/1.2 var(--body);
  letter-spacing: 0.04em;
  text-decoration: none;
  background: rgba(9, 38, 82, 0.44);
  cursor: pointer;
  transition: border-color 160ms ease-out, background 160ms ease-out, transform 160ms ease-out;
}

.motion-toggle:hover,
.back-link:hover,
.text-link:hover {
  border-color: var(--cyan-300);
  background: rgba(27, 79, 137, 0.6);
  transform: translateY(-1px);
}

.home-main {
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(620px, 1.35fr);
  width: min(1500px, calc(100% - 72px));
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  padding: 7vh 0 5vh;
}

.hero-copy {
  position: relative;
  z-index: 8;
  align-self: center;
  padding-left: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  color: var(--cyan-300);
}

.eyebrow::before {
  width: 34px;
  height: 1px;
  content: "";
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.hero-copy h1,
.collection-title,
.detail-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 660;
  letter-spacing: -0.045em;
}

.hero-copy h1 {
  max-width: 8ch;
  font-size: clamp(64px, 7.4vw, 132px);
  line-height: 0.92;
  text-wrap: balance;
}

.hero-copy h1 span {
  display: block;
  color: transparent;
  background: linear-gradient(110deg, #fff 5%, var(--cyan-300) 48%, var(--violet-300) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  filter: drop-shadow(0 10px 30px rgba(78, 181, 255, 0.22));
}

.hero-copy p {
  max-width: 30em;
  margin: 32px 0 0;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.88;
  letter-spacing: 0.015em;
  text-wrap: pretty;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: none;
  margin-top: 36px;
  color: var(--ink-muted);
  font-size: 12.5px;
  line-height: 1.6;
  letter-spacing: 0.035em;
  white-space: nowrap;
}

.hero-note::before {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  content: "↗";
  color: var(--cyan-300);
  line-height: 26px;
  text-align: center;
}

.universe-scene {
  position: relative;
  min-height: 690px;
  align-self: center;
  isolation: isolate;
}

.universe-scene::before {
  position: absolute;
  top: 50%;
  left: 52%;
  z-index: -2;
  width: min(51vw, 740px);
  aspect-ratio: 1;
  border: 1px solid rgba(162, 219, 255, 0.18);
  border-radius: 50%;
  content: "";
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 0 70px rgba(104, 202, 255, 0.028),
    0 0 0 145px rgba(164, 184, 255, 0.018);
}

.astronaut-wrap {
  position: absolute;
  top: 50%;
  left: 52%;
  z-index: 3;
  width: min(34vw, 520px);
  transform: translate(-48%, -48%);
  filter: drop-shadow(0 34px 52px rgba(0, 32, 84, 0.5)) drop-shadow(0 0 28px rgba(121, 216, 255, 0.26));
  animation: astronaut-float 6s ease-in-out infinite;
}

.astronaut-wrap::after {
  position: absolute;
  top: 5%;
  left: 8%;
  width: 23%;
  aspect-ratio: 1;
  border: 1px solid rgba(218, 244, 255, 0.3);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 28px rgba(151, 222, 255, 0.22);
  animation: hello-pulse 2.4s ease-out infinite;
}

.astronaut-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.directory-star {
  --star-size: 150px;
  position: absolute;
  z-index: 7;
  display: grid;
  width: var(--star-size);
  height: var(--star-size);
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--night-950);
  text-align: center;
  text-decoration: none;
  background:
    radial-gradient(circle at 34% 28%, #fff 0 5%, var(--ice-100) 18%, var(--cyan-300) 45%, var(--blue-500) 68%, #2353cc 100%);
  box-shadow:
    0 0 24px rgba(145, 220, 255, 0.78),
    0 0 70px rgba(79, 181, 255, 0.46),
    inset -16px -20px 32px rgba(25, 73, 177, 0.26),
    inset 12px 10px 24px rgba(255, 255, 255, 0.86);
  transition: transform 200ms var(--ease-space);
  will-change: transform;
}

.directory-star::before,
.directory-star::after {
  position: absolute;
  inset: -22%;
  border: 1px solid rgba(187, 231, 255, 0.4);
  border-radius: 50%;
  content: "";
  opacity: 0.62;
  transform: rotateX(68deg) rotateZ(-16deg) scale(0.96);
  transition: opacity 180ms ease-out, transform 200ms var(--ease-space);
}

.directory-star::after {
  inset: -38%;
  border-style: dashed;
  opacity: 0.46;
  transform: rotateX(72deg) rotateZ(24deg);
  transition: opacity 180ms ease-out;
  animation: star-ring-spin 12s linear infinite;
}

.directory-star:hover,
.directory-star:focus-visible {
  z-index: 10;
  transform: translateY(-5px) scale(1.07);
  animation-play-state: paused;
}

.directory-star:hover::before,
.directory-star:focus-visible::before {
  opacity: 0.9;
  transform: rotateX(68deg) rotateZ(-16deg) scale(1.08);
}

.directory-star:hover::after,
.directory-star:focus-visible::after {
  opacity: 0.68;
}

.directory-star:active {
  transform: translateY(-2px) scale(1.02);
}

.directory-star .star-label {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 7px;
  padding: 16px;
}

.directory-star strong {
  font-size: 17px;
  font-weight: 780;
  line-height: 1.3;
  letter-spacing: 0.035em;
  white-space: nowrap;
}

.directory-star small {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  opacity: 0.66;
}

.directory-star .star-description {
  position: absolute;
  top: calc(100% + 44px);
  left: 50%;
  width: 220px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
  background: rgba(7, 30, 67, 0.84);
  box-shadow: 0 18px 40px rgba(1, 11, 31, 0.3);
  opacity: 0;
  transform: translate(-50%, -6px);
  transition: opacity 200ms ease-out, transform 260ms var(--ease-space);
  pointer-events: none;
}

.directory-star:hover .star-description,
.directory-star:focus-visible .star-description {
  opacity: 1;
  transform: translate(-50%, 0);
}

.star-skills {
  --star-size: 132px;
  top: 12%;
  left: 3%;
  animation: star-drift-a 6.8s ease-in-out infinite;
}

.star-software {
  --star-size: 168px;
  right: 0;
  bottom: 14%;
  animation: star-drift-b 7.4s ease-in-out infinite;
}

.orbit-caption {
  position: absolute;
  right: 2%;
  top: 12%;
  z-index: 2;
  color: rgba(202, 234, 255, 0.5);
  font-size: 10px;
  letter-spacing: 0.24em;
  writing-mode: vertical-rl;
}

.scene-coordinates {
  position: absolute;
  bottom: 0;
  left: 7%;
  display: flex;
  gap: 24px;
  color: rgba(188, 226, 255, 0.45);
  font: 700 9px/1.4 Consolas, monospace;
  letter-spacing: 0.12em;
}

/* Collection galaxy */
.collection-page {
  background:
    radial-gradient(circle at 58% 48%, rgba(197, 240, 255, 0.24), transparent 22%),
    radial-gradient(circle at 80% 18%, rgba(162, 175, 255, 0.18), transparent 25%),
    linear-gradient(130deg, #04122f, #082654 52%, #0d3c72);
}

.collection-main {
  display: grid;
  grid-template-columns: minmax(260px, 0.56fr) minmax(620px, 1.22fr) minmax(240px, 0.48fr);
  align-items: center;
  gap: 16px;
  width: min(1500px, calc(100% - 72px));
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  padding: 44px 0 48px;
}

.collection-copy {
  position: relative;
  z-index: 6;
  align-self: center;
}

.collection-title {
  max-width: none;
  font-size: clamp(58px, 5.1vw, 88px);
  line-height: 0.9;
}

.collection-title .collection-name {
  display: grid;
  gap: 0.07em;
  margin: 0;
  color: inherit;
  font-size: 1em;
  font-weight: 660;
  line-height: 0.9;
  letter-spacing: -0.035em;
}

.collection-title .collection-name > span {
  display: block;
}

.collection-title .collection-en {
  display: block;
  margin-top: 18px;
  color: var(--cyan-300);
  font-size: 0.145em;
  font-weight: 760;
  line-height: 1.4;
  letter-spacing: 0.22em;
}

.collection-copy p {
  max-width: 24em;
  margin: 30px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.88;
  letter-spacing: 0.015em;
  text-wrap: pretty;
}

.collection-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 310px;
  margin-top: 28px;
}

.collection-stat {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.collection-stat strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ice-100);
  font-size: 20px;
  font-weight: 600;
}

.collection-stat small {
  color: var(--ink-muted);
  font-size: 11.5px;
  line-height: 1.5;
  letter-spacing: 0.08em;
}

.galaxy-canvas {
  position: relative;
  width: min(48vw, 710px);
  aspect-ratio: 1;
  justify-self: center;
  isolation: isolate;
}

.galaxy-canvas::before {
  position: absolute;
  inset: 5%;
  z-index: -2;
  border-radius: 50%;
  content: "";
  background:
    conic-gradient(from 40deg, transparent, rgba(137, 218, 255, 0.1), transparent 28%, rgba(182, 168, 255, 0.1), transparent 62%),
    radial-gradient(circle, rgba(218, 247, 255, 0.18), transparent 55%);
  filter: blur(2px);
}

.galaxy-core {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: grid;
  width: 138px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  color: var(--night-900);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-align: center;
  background: radial-gradient(circle at 38% 32%, #fff 0 12%, #ddf7ff 28%, #8bdfff 54%, #4d8eff 76%, #4952c8);
  box-shadow:
    0 0 22px rgba(255, 255, 255, 0.9),
    0 0 90px rgba(96, 201, 255, 0.76),
    0 0 180px rgba(99, 115, 255, 0.35);
  transform: translate(-50%, -50%);
  animation: core-breathe 4s ease-in-out infinite;
}

.galaxy-core::before,
.galaxy-core::after {
  position: absolute;
  inset: -18px;
  border: 1px solid rgba(194, 237, 255, 0.52);
  border-radius: 50%;
  content: "";
}

.galaxy-core::after {
  inset: -36px;
  border-style: dashed;
  opacity: 0.44;
}

.orbit {
  --orbit-size: 260px;
  --orbit-time: 26s;
  --orbit-delay: 0s;
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: var(--orbit-size);
  height: var(--orbit-size);
  border: 1px solid rgba(161, 218, 255, 0.24);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: orbit-spin var(--orbit-time) linear infinite;
  animation-delay: var(--orbit-delay);
}

.orbit::before {
  position: absolute;
  inset: -1px;
  border-top: 1px solid rgba(234, 249, 255, 0.62);
  border-right: 1px solid transparent;
  border-bottom: 1px solid transparent;
  border-left: 1px solid transparent;
  border-radius: 50%;
  content: "";
}

.orbit--1 { --orbit-size: 250px; --orbit-time: 24s; --orbit-delay: -2s; }
.orbit--2 { --orbit-size: 355px; --orbit-time: 33s; --orbit-delay: -8.25s; animation-direction: reverse; }
.orbit--3 { --orbit-size: 465px; --orbit-time: 42s; --orbit-delay: -21s; }
.orbit--4 { --orbit-size: 585px; --orbit-time: 54s; --orbit-delay: -40.5s; animation-direction: reverse; }

.planet {
  --planet-size: 64px;
  position: absolute;
  top: calc(var(--planet-size) / -2);
  left: 50%;
  z-index: 4;
  width: var(--planet-size);
  height: var(--planet-size);
  border-radius: 50%;
  color: var(--ink);
  text-decoration: none;
  transform: translateX(-50%);
}

.planet::before {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(239, 251, 255, 0.68);
  border-radius: 50%;
  content: "";
  background: var(--planet-fill, radial-gradient(circle at 32% 24%, #fff, #6cd6ff 46%, #2758c8 100%));
  box-shadow: 0 0 24px var(--planet-glow, rgba(99, 205, 255, 0.66));
  transition: transform 180ms var(--ease-space);
  will-change: transform;
}

.planet--mixer {
  --planet-size: 74px;
  --planet-fill: radial-gradient(circle at 34% 26%, #fff, #8ce9ff 35%, #4b94ff 62%, #4a43c7 100%);
}

.planet--remark {
  --planet-fill: radial-gradient(circle at 38% 30%, #fff, #c9bcff 34%, #8370e8 66%, #3a3eaa 100%);
  --planet-glow: rgba(182, 168, 255, 0.7);
}

.planet--downloader {
  --planet-size: 70px;
  --planet-fill: radial-gradient(circle at 35% 25%, #fff, #8fffe8 38%, #35b9c5 64%, #1764a9 100%);
  --planet-glow: rgba(99, 255, 228, 0.58);
}

.planet--voice {
  --planet-fill: radial-gradient(circle at 38% 28%, #fff, #ffe1a1 36%, #f39c63 64%, #aa4a92 100%);
  --planet-glow: rgba(255, 217, 138, 0.54);
}

.planet-content {
  --label-offset: 58px;
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 210px;
  gap: 5px;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + var(--label-offset)));
  animation: counter-spin var(--orbit-time) linear infinite reverse;
  animation-delay: var(--orbit-delay);
}

.planet--mixer .planet-content {
  --label-offset: -56px;
}

.orbit:nth-of-type(even) .planet-content {
  animation-direction: normal;
}

.planet-content strong {
  font-size: 13.5px;
  font-weight: 720;
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-align: center;
  text-shadow: 0 3px 14px rgba(0, 9, 28, 0.92);
}

.planet-content small {
  color: var(--ink-muted);
  font-size: 10.5px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 180ms ease-out, transform 220ms ease-out;
}

.planet:hover::before,
.planet:focus-visible::before {
  transform: scale(1.1);
}

.planet:active::before {
  transform: scale(0.98);
}

.planet:hover .planet-content small,
.planet:focus-visible .planet-content small {
  opacity: 1;
  transform: translateY(0);
}

.galaxy-canvas.is-paused .orbit,
.galaxy-canvas.is-paused .planet-content {
  animation-play-state: paused;
}

.software-index {
  position: relative;
  z-index: 7;
  align-self: center;
}

.software-index h2 {
  margin: 0 0 18px;
  color: var(--ink-muted);
  font-size: 10.5px;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.software-index ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.software-index a {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 160ms ease-out, padding-left 180ms ease-out, border-color 160ms ease-out;
}

.software-index li:last-child a {
  border-bottom: 1px solid var(--line);
}

.software-index a:hover,
.software-index a:focus-visible {
  border-color: var(--cyan-300);
  color: #fff;
  padding-left: 6px;
}

.software-index .index-no {
  color: var(--cyan-300);
  font: 700 10.5px/1 Consolas, monospace;
}

.software-index strong {
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: 0.015em;
}

.software-index .index-arrow {
  color: var(--cyan-300);
}

.mobile-planet-list {
  display: none;
}

/* Star core detail */
.detail-page {
  color: var(--navy-text);
  background:
    radial-gradient(circle at 70% 14%, rgba(255, 255, 255, 0.82), transparent 12%),
    radial-gradient(circle at 58% 22%, rgba(147, 221, 255, 0.72), transparent 30%),
    linear-gradient(180deg, #0a2b62 0, #2376b8 26%, #b9e8ff 52%, #eef9ff 100%);
}

.detail-page .site-header {
  color: var(--ink);
}

.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(380px, 0.86fr) minmax(520px, 1.14fr);
  align-items: center;
  width: min(1400px, calc(100% - 72px));
  min-height: 720px;
  margin: 0 auto;
  padding: 70px 0 92px;
  isolation: isolate;
}

.detail-copy {
  position: relative;
  z-index: 6;
  color: var(--ink);
}

.detail-title {
  max-width: none;
  font-size: clamp(56px, 5.1vw, 88px);
  line-height: 0.95;
  white-space: nowrap;
}

.detail-summary {
  max-width: 34em;
  margin: 30px 0 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.78;
  letter-spacing: 0.015em;
  text-wrap: pretty;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.detail-meta span {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 13px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: 0.01em;
  background: rgba(6, 35, 77, 0.34);
}

.detail-scene {
  position: relative;
  min-height: 560px;
}

.detail-core {
  position: absolute;
  top: 50%;
  left: 44%;
  width: min(34vw, 500px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, #fff 0 8%, #e7fbff 22%, #9ce4ff 40%, #4fafff 63%, #6f78e8 80%, rgba(133, 106, 211, 0.86));
  box-shadow:
    0 0 38px rgba(255, 255, 255, 0.9),
    0 0 120px rgba(117, 216, 255, 0.84),
    0 0 230px rgba(77, 131, 255, 0.52);
  transform: translate(-50%, -50%);
  animation: core-breathe 5.4s ease-in-out infinite;
}

.detail-core::before,
.detail-core::after {
  position: absolute;
  inset: -10%;
  border: 1px solid rgba(234, 250, 255, 0.5);
  border-radius: 50%;
  content: "";
  transform: rotateX(68deg) rotateZ(18deg);
}

.detail-core::after {
  inset: -28%;
  border-style: dashed;
  opacity: 0.52;
  transform: rotateX(73deg) rotateZ(-20deg);
  animation: star-ring-spin 22s linear infinite reverse;
}

.detail-astronaut {
  position: absolute;
  right: 0;
  bottom: -10px;
  z-index: 4;
  width: min(20vw, 280px);
  filter: drop-shadow(0 20px 36px rgba(13, 54, 122, 0.36));
  animation: detail-astronaut-float 6.4s ease-in-out infinite;
}

.detail-platform {
  position: absolute;
  right: -2%;
  bottom: 0;
  z-index: 2;
  width: 46%;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.92), rgba(123, 214, 255, 0.52) 48%, transparent 72%);
  box-shadow: 0 0 52px rgba(194, 241, 255, 0.8);
}

.detail-content {
  position: relative;
  z-index: 5;
  width: min(1180px, calc(100% - 72px));
  margin: -36px auto 0;
  padding-bottom: 110px;
}

.detail-section {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  margin-top: 22px;
  border: 1px solid rgba(90, 164, 212, 0.3);
  border-radius: 28px;
  padding: clamp(30px, 4vw, 58px);
  background: var(--panel-light);
  box-shadow: 0 24px 70px rgba(25, 94, 145, 0.15);
  backdrop-filter: blur(12px);
}

.detail-section__title h2 {
  margin: 10px 0 0;
  color: var(--navy-text);
  font: 650 clamp(26px, 2.5vw, 36px)/1.22 var(--display);
  letter-spacing: -0.025em;
}

.detail-section__body {
  padding-top: 30px;
  color: #15365c;
  font-size: 15.5px;
  line-height: 1.78;
  letter-spacing: 0.012em;
  text-wrap: pretty;
}

.detail-section__body > p {
  max-width: 42em;
}

.detail-section__body p:first-child {
  margin-top: 0;
}

.detail-section__body p:last-child {
  margin-bottom: 0;
}

.capability-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.flow-node {
  position: relative;
  min-height: 142px;
  border: 1px solid rgba(50, 130, 194, 0.22);
  border-radius: 18px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.76);
}

.flow-node:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -19px;
  z-index: 2;
  width: 24px;
  color: #2d84c6;
  content: "→";
  text-align: center;
}

.flow-node .node-no {
  color: #378fd2;
  font: 700 10.5px/1 Consolas, monospace;
  letter-spacing: 0.08em;
}

.flow-node strong {
  display: block;
  margin-top: 16px;
  color: #092c59;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.flow-node small {
  display: block;
  margin-top: 8px;
  color: #507095;
  font-size: 13.5px;
  line-height: 1.68;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-list li {
  position: relative;
  min-height: 50px;
  padding: 11px 0 11px 27px;
  border-bottom: 1px solid rgba(40, 115, 173, 0.14);
  line-height: 1.7;
}

.detail-list li::before {
  position: absolute;
  top: 19px;
  left: 0;
  width: 10px;
  height: 10px;
  border: 2px solid #489ed8;
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 4px rgba(72, 158, 216, 0.1);
}

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

.release-fact {
  padding: 16px 18px;
  border: 1px solid rgba(50, 130, 194, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
}

.release-fact span {
  display: block;
  margin-bottom: 8px;
  color: #6280a0;
  font-size: 10.5px;
  font-weight: 760;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.release-fact strong {
  color: #0c3566;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

[data-detail-sha] {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 12px !important;
  font-weight: 650;
  line-height: 1.65 !important;
  letter-spacing: 0;
  word-break: break-all;
}

.download-panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(89, 169, 218, 0.44);
  background:
    radial-gradient(circle at 86% 30%, rgba(142, 220, 255, 0.42), transparent 28%),
    linear-gradient(135deg, rgba(245, 252, 255, 0.98), rgba(207, 238, 255, 0.98));
}

.download-panel::after {
  position: absolute;
  right: -90px;
  bottom: -130px;
  width: 320px;
  aspect-ratio: 1;
  border: 1px solid rgba(65, 152, 213, 0.24);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 44px rgba(75, 164, 222, 0.06), 0 0 0 88px rgba(75, 164, 222, 0.04);
}

.download-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #365d85;
  font-size: 12px;
}

.download-status::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  content: "";
  background: #f0a648;
  box-shadow: 0 0 0 5px rgba(240, 166, 72, 0.15);
}

.download-action {
  position: relative;
  z-index: 2;
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  border-radius: 999px;
  padding: 0 26px;
  color: #fff;
  font-size: 14px;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-decoration: none;
  background: linear-gradient(110deg, #1e66cf, #29a9df);
  box-shadow: 0 14px 34px rgba(28, 113, 187, 0.24);
  transition: transform 180ms ease-out, box-shadow 180ms ease-out;
}

.download-action:hover,
.download-action:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(28, 113, 187, 0.34);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  width: min(1180px, calc(100% - 72px));
  margin: 0 auto;
  padding: 26px 0 42px;
  border-top: 1px solid rgba(36, 115, 170, 0.2);
  color: rgba(14, 58, 99, 0.62);
  font-size: 11px;
}

/* Transition cue */
html {
  --portal-hot: #ffffff;
  --portal-light: #d2f6ff;
  --portal-mid: #67d3ff;
  --portal-deep: #347fdd;
  --portal-shadow: #123f86;
  --portal-edge: #04122f;
}

html[data-portal-theme="skill"] {
  --portal-light: #d3fbff;
  --portal-mid: #62dbff;
  --portal-deep: #287cd8;
  --portal-shadow: #123d82;
}

html[data-portal-theme="software"],
html[data-portal-theme="pro-mixer"] {
  --portal-light: #dcefff;
  --portal-mid: #7bbcff;
  --portal-deep: #456fe0;
  --portal-shadow: #263578;
}

html[data-portal-theme="remark-extension"] {
  --portal-light: #ece3ff;
  --portal-mid: #b59aff;
  --portal-deep: #735fd5;
  --portal-shadow: #382e82;
}

html[data-portal-theme="downloader"] {
  --portal-light: #d4fff5;
  --portal-mid: #5bdacf;
  --portal-deep: #288db2;
  --portal-shadow: #165a7b;
}

html[data-portal-theme="voice-clone"] {
  --portal-light: #fff3d8;
  --portal-mid: #ffc979;
  --portal-deep: #9173d9;
  --portal-shadow: #42357f;
}

html.portal-arrival::before {
  position: fixed;
  inset: 0;
  z-index: 300;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at var(--portal-origin, 50% 50%), var(--portal-hot) 0 1.5%, var(--portal-light) 4%, var(--portal-mid) 9%, var(--portal-deep) 17%, var(--portal-shadow) 28%, #071b3d 50%, var(--portal-edge) 100%);
  opacity: 1;
  transform: scale(1);
  transform-origin: var(--portal-origin, 50% 50%);
  contain: paint;
  will-change: opacity, transform;
  animation: portal-arrival 460ms 36ms cubic-bezier(0.22, 0.75, 0.2, 1) both;
}

body.is-leaving::after {
  position: fixed;
  top: var(--exit-y, 50%);
  left: var(--exit-x, 50%);
  z-index: 200;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  content: "";
  pointer-events: none;
  background: radial-gradient(circle, var(--portal-hot) 0 1.5%, var(--portal-light) 4%, var(--portal-mid) 9%, var(--portal-deep) 17%, var(--portal-shadow) 28%, #071b3d 50%, var(--portal-edge) 100%);
  opacity: 0.92;
  transform: translate3d(-50%, -50%, 0) scale(var(--portal-start-scale, 0.65));
  contain: paint;
  will-change: opacity, transform;
  animation: portal-exit 560ms linear forwards;
}

body.is-leaving a,
body.is-leaving button {
  pointer-events: none;
}

body.is-leaving .cosmic-haze,
body.is-leaving .astronaut-wrap,
body.is-leaving .astronaut-wrap::after,
body.is-leaving .directory-star,
body.is-leaving .directory-star::before,
body.is-leaving .directory-star::after,
body.is-leaving .galaxy-core,
body.is-leaving .orbit,
body.is-leaving .planet-content,
body.is-leaving .detail-core,
body.is-leaving .detail-core::after,
body.is-leaving .detail-astronaut {
  animation-play-state: paused !important;
}

body.motion-paused *,
body.motion-paused *::before,
body.motion-paused *::after {
  animation-play-state: paused !important;
}

@keyframes haze-breathe {
  from { opacity: 0.72; }
  to { opacity: 0.96; }
}

@keyframes astronaut-float {
  0%, 100% { transform: translate(-48%, -48%) translateY(0) rotate(-0.4deg); }
  50% { transform: translate(-48%, -48%) translateY(-16px) rotate(0.6deg); }
}

@keyframes hello-pulse {
  0% { opacity: 0; transform: scale(0.66); }
  22% { opacity: 0.72; }
  100% { opacity: 0; transform: scale(1.55); }
}

@keyframes detail-astronaut-float {
  0%, 100% { transform: translateY(0) rotate(0.3deg); }
  50% { transform: translateY(-12px) rotate(-0.6deg); }
}

@keyframes star-ring-spin {
  to { transform: rotateX(72deg) rotateZ(384deg); }
}

@keyframes star-drift-a {
  0%, 100% { translate: 0 0; }
  50% { translate: 8px -12px; }
}

@keyframes star-drift-b {
  0%, 100% { translate: 0 0; }
  50% { translate: -10px 12px; }
}

@keyframes core-breathe {
  0%, 100% { opacity: 0.92; }
  50% { opacity: 1; }
}

@keyframes orbit-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes counter-spin {
  to { transform: translate(-50%, calc(-50% + var(--label-offset))) rotate(-360deg); }
}

@keyframes portal-exit {
  0% {
    opacity: 0.92;
    transform: translate3d(-50%, -50%, 0) scale(var(--portal-start-scale, 0.65));
    animation-timing-function: cubic-bezier(0.33, 0, 0.67, 1);
  }
  12% {
    opacity: 1;
    transform: translate3d(-50%, -50%, 0) scale(var(--portal-press-scale, 0.61));
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  }
  100% {
    opacity: 1;
    transform: translate3d(-50%, -50%, 0) scale(var(--portal-scale, 10));
  }
}

@keyframes portal-arrival {
  0%, 12% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.035);
  }
}

@media (max-width: 1180px) {
  .home-main {
    grid-template-columns: minmax(320px, 0.78fr) minmax(520px, 1.22fr);
  }

  .collection-main {
    grid-template-columns: 250px 1fr;
  }

  .galaxy-canvas {
    width: min(62vw, 680px);
  }

  .software-index {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: -18px;
  }

  .software-index ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
  }
}

@media (max-width: 820px) {
  .site-header {
    width: min(100% - 32px, 720px);
    min-height: 72px;
  }

  .header-status {
    display: none;
  }

  .header-actions {
    gap: 8px;
  }

  .back-link {
    padding: 0 11px;
    font-size: 12px;
    white-space: nowrap;
  }

  .motion-toggle {
    min-width: 42px;
    padding: 0 12px;
    font-size: 0;
  }

  .motion-toggle::before {
    content: "Ⅱ";
    font-size: 12px;
  }

  .home-main {
    display: block;
    width: min(100% - 32px, 720px);
    min-height: auto;
    padding: 54px 0 30px;
  }

  .hero-copy {
    padding: 0;
  }

  .hero-copy h1 {
    max-width: 7ch;
    font-size: clamp(58px, 16vw, 86px);
    line-height: 0.98;
    letter-spacing: -0.025em;
  }

  .hero-copy p {
    margin-top: 24px;
    font-size: 16px;
    line-height: 1.8;
  }

  .hero-note {
    max-width: 34ch;
    margin-top: 24px;
    font-size: 12.5px;
    line-height: 1.6;
    white-space: normal;
  }

  .universe-scene {
    min-height: 660px;
    margin-top: -20px;
  }

  .astronaut-wrap {
    top: 48%;
    left: 50%;
    width: min(70vw, 380px);
    opacity: 0.92;
  }

  .star-skills {
    --star-size: 120px;
    top: 12%;
    left: 2%;
  }

  .star-software {
    --star-size: 132px;
    right: 0;
    bottom: 12%;
  }

  .directory-star .star-description {
    display: none;
  }

  .orbit-caption,
  .scene-coordinates {
    display: none;
  }

  .collection-main {
    display: block;
    width: min(100% - 32px, 720px);
    min-height: auto;
    padding: 52px 0 64px;
  }

  .collection-title {
    max-width: none;
    font-size: clamp(52px, 14vw, 70px);
    line-height: 1;
    letter-spacing: -0.025em;
  }

  .collection-title .collection-name {
    display: flex;
    gap: 0.02em;
    align-items: baseline;
    line-height: 1;
    letter-spacing: -0.025em;
    white-space: nowrap;
  }

  .collection-title .collection-name > span {
    display: inline;
  }

  .collection-title .collection-en {
    margin-top: 11px;
    font-size: 11.5px;
    line-height: 1.4;
    letter-spacing: 0.18em;
  }

  .collection-copy p {
    max-width: none;
    font-size: 15.5px;
    line-height: 1.8;
  }

  .collection-stats {
    max-width: none;
  }

  .galaxy-canvas,
  .software-index {
    display: none;
  }

  .mobile-planet-list {
    display: grid;
    gap: 12px;
    margin-top: 40px;
  }

  .mobile-planet-list a {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    align-items: center;
    gap: 14px;
    min-height: 88px;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 14px 18px;
    text-decoration: none;
    background: rgba(10, 47, 96, 0.64);
  }

  .mobile-planet-list .mini-planet {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--mini-fill);
    box-shadow: 0 0 24px rgba(115, 218, 255, 0.44);
  }

  .mobile-planet-list strong {
    display: block;
    font-size: 15.5px;
    line-height: 1.4;
    letter-spacing: 0.01em;
  }

  .mobile-planet-list small {
    display: block;
    margin-top: 5px;
    color: var(--ink-muted);
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0.01em;
  }

  .mobile-planet-list .arrow {
    color: var(--cyan-300);
  }

  .detail-hero {
    display: block;
    width: min(100% - 32px, 720px);
    min-height: auto;
    padding: 62px 0 40px;
  }

  .detail-title {
    max-width: none;
    font-size: clamp(43px, 11.8vw, 52px);
    line-height: 1;
    letter-spacing: -0.025em;
    white-space: nowrap;
  }

  .detail-summary {
    font-size: 16px;
    line-height: 1.8;
  }

  .detail-scene {
    min-height: 470px;
    margin-top: -20px;
  }

  .detail-core {
    left: 46%;
    width: min(82vw, 390px);
  }

  .detail-astronaut {
    right: 0;
    width: min(40vw, 190px);
  }

  .detail-content {
    width: min(100% - 32px, 720px);
    margin-top: 0;
  }

  .detail-section {
    display: block;
    border-radius: 22px;
    padding: 28px 22px;
  }

  .detail-section__title {
    margin-bottom: 20px;
  }

  .detail-section__title h2 {
    font-size: 28px;
    line-height: 1.25;
  }

  .detail-section__body {
    padding-top: 0;
    font-size: 15.5px;
    line-height: 1.78;
  }

  .flow-node {
    min-height: auto;
    padding: 20px;
  }

  .flow-node strong {
    margin-top: 14px;
    font-size: 17.5px;
  }

  [data-detail-sha] {
    font-size: 11.5px !important;
    line-height: 1.6 !important;
  }

  .capability-flow,
  .detail-list,
  .release-grid {
    grid-template-columns: 1fr;
  }

  .flow-node:not(:last-child)::after {
    top: auto;
    right: 50%;
    bottom: -22px;
    content: "↓";
    transform: translateX(50%);
  }

  .site-footer {
    display: grid;
    gap: 8px;
    width: min(100% - 32px, 720px);
    font-size: 11.5px;
    line-height: 1.6;
  }
}

@media (max-width: 360px) {
  .brand-copy small {
    display: none;
  }

  .brand {
    gap: 10px;
  }

  .header-actions {
    gap: 6px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  body.is-leaving::after,
  html.portal-arrival::before {
    display: none;
  }
}
