/* DOUBLE IT presentation site. Built from the game's deep-space palette,
   restrained glass UI, liquid bubbles, and circular gameplay language. */

:root {
  color-scheme: dark;
  --bg-void: #02030d;
  --bg: #050614;
  --bg-raised: #0b0e24;
  --bg-soft: #101531;
  --ink: #eef0ff;
  --ink-soft: #d6def7;
  --ink-muted: #929fc7;
  --ink-faint: #707ba5;
  --accent: #8fd8ff;
  --accent-blue: #668dff;
  --accent-violet: #a58bff;
  --gold: #ffd98f;
  --glass: rgba(148, 158, 255, 0.065);
  --glass-strong: rgba(148, 158, 255, 0.11);
  --glass-edge: rgba(190, 200, 255, 0.15);
  --glass-edge-bright: rgba(190, 210, 255, 0.28);
  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 32px;
  --wrap: 1180px;
  --ease-out: cubic-bezier(0.2, 0.72, 0.2, 1);
}

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

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 82px;
}

body {
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 70% -10%, rgba(62, 79, 162, 0.2), transparent 48%),
    linear-gradient(180deg, #050618 0%, var(--bg) 42%, var(--bg-void) 100%);
  font-family: "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 28%, rgba(45, 78, 149, 0.085), transparent 24%),
    radial-gradient(circle at 82% 54%, rgba(98, 58, 154, 0.07), transparent 28%),
    radial-gradient(circle at 52% 88%, rgba(27, 114, 156, 0.055), transparent 30%);
}

main,
.site-foot,
.site-head {
  position: relative;
  z-index: 1;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  color: #ccecff;
}

p {
  color: var(--ink-soft);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 8px;
}

::selection {
  color: #071021;
  background: #b9e9ff;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 11px 18px;
  border: 1px solid var(--glass-edge-bright);
  border-radius: 999px;
  color: var(--ink);
  background: #10152e;
  text-decoration: none;
  transform: translateY(-80px);
  transition: transform 180ms ease;
}

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

/* ---------- lightweight animated space ---------- */

.space {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}

.star-layer {
  position: absolute;
  inset: -12vmax;
  will-change: transform, opacity;
  background-repeat: repeat;
  transform: translate3d(0, 0, 0);
}

.stars-far {
  opacity: 0.42;
  background-image:
    radial-gradient(circle, rgba(205, 221, 255, 0.8) 0 0.55px, transparent 0.9px),
    radial-gradient(circle, rgba(255, 239, 211, 0.55) 0 0.45px, transparent 0.85px),
    radial-gradient(circle, rgba(153, 195, 255, 0.48) 0 0.5px, transparent 0.9px);
  background-size: 43px 43px, 79px 79px, 127px 127px;
  background-position: 7px 13px, 31px 19px, 58px 71px;
  animation: starDriftFar 82s ease-in-out infinite alternate, starTwinkleFar 11s ease-in-out infinite alternate;
}

.stars-mid {
  opacity: 0.36;
  background-image:
    radial-gradient(circle, rgba(213, 229, 255, 0.95) 0 0.85px, transparent 1.25px),
    radial-gradient(circle, rgba(168, 200, 255, 0.72) 0 0.7px, transparent 1.15px),
    radial-gradient(circle, rgba(255, 228, 183, 0.6) 0 0.65px, transparent 1.1px);
  background-size: 137px 137px, 191px 191px, 269px 269px;
  background-position: 19px 43px, 103px 17px, 67px 151px;
  animation: starDriftMid 60s ease-in-out infinite alternate, starTwinkleMid 8s ease-in-out infinite alternate;
}

.stars-near {
  opacity: 0.28;
  background-image:
    radial-gradient(circle, rgba(230, 239, 255, 0.95) 0 1.1px, rgba(165, 202, 255, 0.2) 1.4px, transparent 2.6px),
    radial-gradient(circle, rgba(255, 232, 196, 0.78) 0 0.9px, transparent 1.7px);
  background-size: 347px 347px, 487px 487px;
  background-position: 41px 101px, 283px 57px;
  animation: starDriftNear 46s ease-in-out infinite alternate, starTwinkleNear 6.5s ease-in-out infinite alternate;
}

/* Layered dust, a dark rift and stellar knots give the background a visible Milky Way. */
.milky-way {
  position: absolute;
  top: 46%;
  left: 50%;
  width: 150vmax;
  height: 60vmax;
  opacity: 0.96;
  transform: translate3d(-50%, -50%, 0) rotate(-17deg);
  background:
    radial-gradient(ellipse at 50% 50%, rgba(221, 232, 255, 0.21) 0 3%, rgba(112, 150, 224, 0.16) 13%, rgba(63, 91, 168, 0.095) 31%, transparent 68%),
    linear-gradient(180deg, transparent 34%, rgba(45, 72, 143, 0.055) 39%, rgba(111, 141, 207, 0.17) 45%, rgba(192, 204, 235, 0.18) 49%, rgba(100, 105, 181, 0.15) 55%, rgba(62, 42, 119, 0.075) 60%, transparent 67%);
}

.milky-way::before,
.milky-way::after,
.distant-galaxy::before,
.distant-galaxy::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.milky-way::before {
  inset: 18% 4%;
  opacity: 1;
  background:
    radial-gradient(circle at 12% 52%, rgba(225, 236, 255, 0.22) 0 0.28%, transparent 1.8%),
    radial-gradient(circle at 19% 45%, rgba(140, 183, 247, 0.2) 0 0.34%, transparent 2.1%),
    radial-gradient(circle at 28% 55%, rgba(219, 226, 255, 0.2) 0 0.24%, transparent 1.6%),
    radial-gradient(circle at 38% 46%, rgba(123, 156, 225, 0.18) 0 0.44%, transparent 2.5%),
    radial-gradient(circle at 49% 52%, rgba(239, 241, 255, 0.25) 0 0.42%, transparent 2.8%),
    radial-gradient(circle at 58% 45%, rgba(158, 184, 235, 0.2) 0 0.3%, transparent 2.1%),
    radial-gradient(circle at 67% 55%, rgba(202, 214, 255, 0.18) 0 0.4%, transparent 2.4%),
    radial-gradient(circle at 77% 47%, rgba(116, 157, 229, 0.2) 0 0.32%, transparent 2%),
    radial-gradient(circle at 88% 53%, rgba(221, 228, 255, 0.2) 0 0.28%, transparent 1.8%);
}

.milky-way::after {
  inset: 0;
  opacity: 0.9;
  background: linear-gradient(
    180deg,
    transparent 43%,
    rgba(2, 4, 17, 0.09) 46%,
    rgba(2, 3, 15, 0.5) 49.5%,
    rgba(8, 8, 29, 0.32) 52%,
    transparent 56%
  );
}

/* Small spiral silhouettes add scale without becoming foreground decoration. */
.distant-galaxy {
  position: absolute;
  width: clamp(180px, 19vw, 300px);
  aspect-ratio: 2.15;
  border-radius: 50%;
  opacity: 0.42;
  mix-blend-mode: screen;
  background:
    radial-gradient(ellipse at center, rgba(255, 248, 234, 0.72) 0 1.5%, rgba(174, 204, 252, 0.36) 4%, rgba(91, 131, 211, 0.23) 18%, rgba(76, 61, 151, 0.13) 39%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 5%, transparent 76%);
  mask-image: radial-gradient(ellipse at center, #000 5%, transparent 76%);
}

.distant-galaxy::before {
  inset: -48% -16%;
  border-radius: 50%;
  opacity: 0.92;
  transform: scaleY(0.48) rotate(14deg);
  background: conic-gradient(
    from 26deg at center,
    transparent 0 8%,
    rgba(145, 180, 239, 0.48) 12%,
    transparent 18% 43%,
    rgba(177, 144, 231, 0.38) 49%,
    transparent 56% 76%,
    rgba(112, 157, 230, 0.34) 81%,
    transparent 88% 100%
  );
  animation: galaxyTurn 160s linear infinite;
}

.distant-galaxy::after {
  top: 50%;
  left: 50%;
  width: 12%;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0.92;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 248, 227, 0.9), rgba(174, 203, 255, 0.26) 28%, transparent 72%);
}

.galaxy-one {
  top: 11%;
  right: 5%;
  opacity: 0.46;
  transform: rotate(-13deg);
}

.galaxy-two {
  bottom: 7%;
  left: 5%;
  width: clamp(105px, 11vw, 170px);
  opacity: 0.3;
  transform: rotate(19deg);
}

.galaxy-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 700ms ease;
}

.galaxy-ready .galaxy-canvas {
  opacity: 0.98;
}

.galaxy-ready .star-layer {
  display: none;
}

.space-haze {
  position: absolute;
  inset: 0;
  opacity: 0.82;
  transform: scale(1);
  transition: opacity 650ms ease, transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
  background:
    radial-gradient(ellipse at 15% 21%, rgba(43, 92, 176, 0.17), transparent 29%),
    radial-gradient(ellipse at 83% 72%, rgba(92, 50, 151, 0.13), transparent 34%),
    radial-gradient(ellipse at 58% 44%, rgba(104, 143, 222, 0.11), transparent 25%);
}

.space-haze::before,
.space-haze::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

/* A broad, feathered Milky Way band. It is static, so the depth stays inexpensive. */
.space-haze::before {
  inset: -48%;
  opacity: 0.92;
  transform: rotate(-18deg) scaleX(1.08);
  background:
    radial-gradient(circle at 47% 49%, rgba(238, 244, 255, 0.16) 0 0.7%, transparent 3.8%),
    radial-gradient(circle at 54% 51%, rgba(123, 164, 237, 0.14) 0 0.55%, transparent 3.4%),
    radial-gradient(circle at 42% 48%, rgba(187, 205, 255, 0.1) 0 0.45%, transparent 3%),
    linear-gradient(
      180deg,
      transparent 33%,
      rgba(27, 57, 118, 0.045) 37%,
      rgba(70, 103, 176, 0.15) 43%,
      rgba(161, 181, 226, 0.125) 48%,
      rgba(73, 83, 151, 0.145) 54%,
      rgba(62, 34, 105, 0.07) 59%,
      transparent 66%
    );
}

/* A restrained galactic core and two broken spiral arms. */
.space-haze::after {
  inset: -10%;
  opacity: 0.76;
  background:
    radial-gradient(ellipse 12% 8% at 58% 43%, rgba(241, 246, 255, 0.18), transparent 62%),
    radial-gradient(ellipse 23% 14% at 58% 43%, rgba(88, 133, 220, 0.15), transparent 70%),
    conic-gradient(
      from 218deg at 58% 43%,
      transparent 0 8%,
      rgba(92, 130, 205, 0.12) 12%,
      transparent 20% 47%,
      rgba(93, 63, 156, 0.1) 54%,
      transparent 63% 100%
    );
  -webkit-mask-image: radial-gradient(ellipse 38% 29% at 58% 43%, #000 5%, transparent 78%);
  mask-image: radial-gradient(ellipse 38% 29% at 58% 43%, #000 5%, transparent 78%);
}

.hyperspace .space-haze {
  opacity: 0.94;
  transform: scale(1.025);
}

.hyperspace .distant-galaxy {
  opacity: 0.25;
}

@keyframes galaxyTurn {
  to { transform: scaleY(0.48) rotate(374deg); }
}

@keyframes starDriftFar {
  to { transform: translate3d(-1.2vw, 2.8vh, 0); }
}

@keyframes starDriftMid {
  to { transform: translate3d(1.8vw, 4.2vh, 0); }
}

@keyframes starDriftNear {
  to { transform: translate3d(-2.4vw, 5.6vh, 0); }
}

@keyframes starTwinkleFar {
  40% { opacity: 0.35; }
  100% { opacity: 0.47; }
}

@keyframes starTwinkleMid {
  35% { opacity: 0.31; }
  100% { opacity: 0.41; }
}

@keyframes starTwinkleNear {
  50% { opacity: 0.22; }
  100% { opacity: 0.32; }
}

@media (max-width: 640px) {
  .milky-way {
    top: 48%;
    width: 175vmax;
    height: 70vmax;
    opacity: 0.86;
  }

  .galaxy-one {
    top: 16%;
    right: -8%;
    opacity: 0.3;
  }

  .galaxy-two {
    display: none;
  }
}

/* ---------- shared layout ---------- */

.wrap {
  width: min(100%, var(--wrap));
  margin-inline: auto;
  padding-inline: 28px;
}

.section {
  position: relative;
  padding-block: clamp(72px, 7vw, 104px);
  isolation: isolate;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.75;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: clamp(34px, 5vw, 56px);
}

.section-number {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--glass-edge);
  border-radius: 50%;
  color: var(--ink-faint);
  background: rgba(9, 12, 31, 0.7);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}

h2 {
  color: var(--ink);
  font-size: clamp(1.55rem, 3.2vw, 2.45rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-wrap: balance;
}

h3 {
  color: var(--ink);
  font-size: 1.04rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.prose {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.82;
}

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(186, 201, 255, 0.085);
  background: rgba(4, 5, 16, 0.74);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
}

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding-block: 12px;
  color: var(--ink);
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.31em;
  text-decoration: none;
}

.brand:hover {
  color: #fff;
}

.brand-orb {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(188, 224, 255, 0.8);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #fff, #82b7ff 34%, #4f5fc9 78%);
  box-shadow: 0 0 12px rgba(117, 173, 255, 0.65);
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background: rgba(115, 132, 212, 0.055);
}

.lang button {
  appearance: none;
  min-width: 46px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  color: var(--ink-faint);
  background: transparent;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease;
}

.lang button[aria-pressed="true"] {
  color: var(--ink);
  background: rgba(137, 154, 236, 0.15);
}

.lang button:focus-visible {
  outline-offset: -3px;
}

/* ---------- buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  gap: 13px;
  overflow: hidden;
  padding-inline: 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  line-height: 1;
  text-decoration: none;
  transition: transform 180ms var(--ease-out), border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.btn::before {
  content: "";
  position: absolute;
  top: -35%;
  bottom: -35%;
  left: -35%;
  width: 22%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-18deg) translateX(-260%);
  transition: transform 520ms var(--ease-out);
}

.btn:hover::before {
  transform: skewX(-18deg) translateX(760%);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn.primary {
  min-height: 58px;
  padding-inline: 36px 30px;
  border-color: rgba(177, 206, 255, 0.42);
  color: #fff;
  background: linear-gradient(135deg, #486fd4 0%, #565fcf 48%, #7057bf 100%);
  box-shadow: 0 14px 36px rgba(67, 95, 211, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn.primary:hover {
  color: #fff;
  border-color: rgba(201, 224, 255, 0.62);
  box-shadow: 0 18px 46px rgba(73, 107, 230, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn.ghost {
  border-color: var(--glass-edge);
  color: var(--ink-soft);
  background: var(--glass);
}

.btn.ghost:hover {
  border-color: var(--glass-edge-bright);
  color: #fff;
  background: var(--glass-strong);
}

.btn-small {
  min-height: 44px;
  padding-inline: 20px;
  font-size: 0.72rem;
}

.btn-arrow {
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 180ms var(--ease-out);
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

.btn > span {
  position: relative;
  z-index: 1;
}

/* ---------- liquid bubble system ---------- */

.bubble-blue { --bubble-rgb: 118 157 255; }
.bubble-ice { --bubble-rgb: 193 222 255; }
.bubble-cyan { --bubble-rgb: 56 194 255; }
.bubble-azure { --bubble-rgb: 46 123 255; }
.bubble-violet { --bubble-rgb: 143 87 255; }
.bubble-magenta { --bubble-rgb: 235 76 255; }
.bubble-rose { --bubble-rgb: 255 66 133; }
.bubble-amber { --bubble-rgb: 255 128 41; }
.bubble-gold { --bubble-rgb: 255 199 65; }
.bubble-green { --bubble-rgb: 52 225 143; }

.liquid-bubble,
.bubble-surface,
.step-bubble {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid rgb(var(--bubble-rgb) / 0.62);
  border-radius: 46% 54% 51% 49% / 52% 47% 53% 48%;
  color: #07102a;
  background:
    radial-gradient(circle at 27% 20%, rgba(255, 255, 255, 0.94) 0 3.5%, rgba(255, 255, 255, 0.24) 7%, transparent 15%),
    radial-gradient(circle at 68% 76%, rgb(var(--bubble-rgb) / 0.48), transparent 43%),
    radial-gradient(circle at 47% 40%, rgba(245, 250, 255, 0.64), rgb(var(--bubble-rgb) / 0.48) 44%, rgb(var(--bubble-rgb) / 0.2) 74%, rgb(var(--bubble-rgb) / 0.08));
  box-shadow:
    0 0 19px rgb(var(--bubble-rgb) / 0.32),
    0 0 48px rgb(var(--bubble-rgb) / 0.1),
    inset -8px -12px 18px rgb(var(--bubble-rgb) / 0.22),
    inset 7px 8px 14px rgba(255, 255, 255, 0.21);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  isolation: isolate;
}

.liquid-bubble::after,
.bubble-surface::after,
.step-bubble::after {
  content: "";
  position: absolute;
  inset: 5%;
  z-index: -1;
  border-radius: inherit;
  background:
    linear-gradient(118deg, transparent 34%, rgba(255, 255, 255, 0.28) 48%, transparent 61%),
    radial-gradient(ellipse at 72% 18%, rgba(183, 219, 255, 0.22), transparent 31%);
  opacity: 0.72;
  transform: rotate(-8deg);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: calc(100svh - 72px);
  overflow: clip;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -10% 0 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 72% 44%, rgba(85, 104, 208, 0.18), transparent 31%),
    radial-gradient(circle at 72% 44%, rgba(51, 145, 195, 0.08), transparent 48%),
    linear-gradient(180deg, rgba(6, 8, 27, 0.4), rgba(5, 6, 20, 0.05));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(420px, 1.06fr);
  align-items: center;
  gap: clamp(34px, 5vw, 82px);
  min-height: calc(100svh - 72px);
  padding-block: clamp(64px, 8vw, 110px) clamp(76px, 8vw, 110px);
}

.hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  max-width: 590px;
}

.official-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 23px;
  color: #a7c9eb;
  font-size: 0.69rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.official-mark::before {
  content: "";
  width: 7px;
  height: 7px;
  border: 1px solid rgba(177, 224, 255, 0.8);
  border-radius: 50%;
  background: #7fcfff;
  box-shadow: 0 0 11px rgba(100, 197, 255, 0.72);
}

.kicker {
  margin-bottom: 12px;
  color: var(--ink-muted);
  font-size: clamp(0.69rem, 1.1vw, 0.76rem);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.logotype {
  margin-right: -0.16em;
  color: #f6f8ff;
  font-size: clamp(3.1rem, 7.4vw, 6.35rem);
  font-weight: 350;
  line-height: 0.98;
  letter-spacing: 0.16em;
  text-shadow: 0 0 34px rgba(150, 190, 255, 0.25);
  white-space: nowrap;
}

.tagline {
  max-width: 32em;
  margin-block: 28px 34px;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.65vw, 1.28rem);
  line-height: 1.65;
  text-wrap: balance;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.soon {
  margin-top: 16px;
  color: var(--ink-faint);
  font-size: 0.79rem;
  letter-spacing: 0.09em;
}

.hero-visual {
  position: relative;
  width: min(100%, 550px);
  aspect-ratio: 1;
  justify-self: center;
  contain: layout paint;
}

.hero-aura {
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(105, 151, 255, 0.2), rgba(86, 95, 211, 0.07) 42%, transparent 72%);
}

.hero-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(139, 176, 255, 0.16);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-9deg);
  box-shadow: inset 0 0 50px rgba(92, 119, 210, 0.035), 0 0 36px rgba(92, 119, 210, 0.045);
}

.hero-orbit::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #bfe2ff;
  box-shadow: 0 0 10px rgba(143, 216, 255, 0.8);
}

.hero-orbit-wide {
  width: 82%;
  height: 58%;
  animation: orbitTurnWide 46s linear infinite;
}

.hero-orbit-close {
  width: 51%;
  height: 43%;
  transform: translate(-50%, -50%) rotate(13deg);
  animation: orbitTurnClose 34s linear infinite reverse;
}

.hero-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 29%;
  font-size: clamp(2.1rem, 5vw, 4rem);
  transform: translate(-50%, -50%);
  animation: heroCoreFloat 7s ease-in-out infinite;
}

.hero-core span,
.hero-orb span {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.25);
}

.hero-orb {
  position: absolute;
  width: 9.5%;
  min-width: 38px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.95rem, 2.2vw, 1.55rem);
  transform: translate(-50%, -50%);
  animation: heroOrbFloat 6.8s ease-in-out infinite;
}

.hero-phi { left: 14%; top: 56%; animation-delay: -2.7s; }
.hero-pi { left: 85%; top: 45%; animation-delay: -4.8s; width: 10.5%; }
.hero-e { left: 42%; top: 70%; animation-delay: -1.1s; width: 9%; }
.hero-infinity { left: 55%; top: 31%; animation-delay: -5.5s; width: 8.4%; }
.hero-sigma { left: 31%; top: 33%; animation-delay: -3.6s; width: 8.8%; }

.hero-fade {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 140px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(5, 6, 20, 0.84));
}

@keyframes orbitTurnWide {
  to { transform: translate(-50%, -50%) rotate(351deg); }
}

@keyframes orbitTurnClose {
  to { transform: translate(-50%, -50%) rotate(373deg); }
}

@keyframes heroCoreFloat {
  0%, 100% { transform: translate(-50%, -50%) translateY(-3px) scale(0.99); }
  50% { transform: translate(-50%, -50%) translateY(5px) scale(1.012); }
}

@keyframes heroOrbFloat {
  0%, 100% { transform: translate(-50%, -50%) translateY(-3px) rotate(-1.5deg); }
  50% { transform: translate(-50%, -50%) translateY(4px) rotate(1.5deg); }
}

/* Hero entrance is short and never blocks interaction. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-copy > *,
  .js .hero-visual {
    opacity: 0;
    animation: heroEnter 680ms var(--ease-out) both;
  }

  .js .hero-copy .official-mark { animation-delay: 60ms; }
  .js .hero-copy .kicker { animation-delay: 110ms; }
  .js .hero-copy .logotype { animation-delay: 170ms; }
  .js .hero-copy .tagline { animation-delay: 240ms; }
  .js .hero-copy .cta-row { animation-delay: 310ms; }
  .js .hero-copy .soon { animation-delay: 370ms; }
  .js .hero-visual { animation-delay: 180ms; animation-duration: 850ms; }
}

@keyframes heroEnter {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* ---------- mode cards ---------- */

.modes-section::before {
  background:
    radial-gradient(ellipse at 18% 25%, rgba(42, 93, 151, 0.09), transparent 31%),
    linear-gradient(180deg, rgba(8, 10, 31, 0.62), rgba(5, 6, 20, 0.08));
}

.modes-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  list-style: none;
}

.card {
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(22, 28, 66, 0.76), rgba(8, 10, 29, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025), 0 18px 60px rgba(0, 0, 0, 0.14);
}

.mode-card {
  position: relative;
  min-height: 308px;
  overflow: hidden;
  padding: 26px 25px 28px;
  transition: transform 260ms var(--ease-out), border-color 260ms ease, background-color 260ms ease;
}

.mode-card::after {
  content: "";
  position: absolute;
  right: -65px;
  bottom: -75px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(var(--mode-rgb) / 0.13), transparent 68%);
  opacity: 0.75;
  transition: transform 300ms var(--ease-out), opacity 300ms ease;
}

.mode-card:hover {
  transform: translateY(-5px);
  border-color: rgb(var(--mode-rgb) / 0.32);
  background: linear-gradient(155deg, rgba(25, 32, 78, 0.82), rgba(8, 10, 29, 0.87));
}

.mode-card:hover::after {
  opacity: 1;
  transform: scale(1.12);
}

.mode-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}

.glyph {
  display: grid;
  place-items: center;
  width: 58px;
  aspect-ratio: 1;
  border: 1px solid rgb(var(--mode-rgb) / 0.34);
  border-radius: 50%;
  color: rgb(var(--mode-rgb));
  background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.11), rgb(var(--mode-rgb) / 0.06) 58%, transparent 75%);
  box-shadow: 0 0 24px rgb(var(--mode-rgb) / 0.13), inset 0 0 16px rgb(var(--mode-rgb) / 0.07);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  line-height: 1;
}

.mode-index {
  color: var(--ink-faint);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.14em;
}

.mode-card h3 {
  margin-bottom: 12px;
}

.mode-card p {
  position: relative;
  z-index: 1;
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ---------- game scenes ---------- */

.screens-section::before {
  background:
    radial-gradient(ellipse at 76% 35%, rgba(81, 53, 151, 0.095), transparent 34%),
    linear-gradient(180deg, rgba(5, 6, 20, 0.08), rgba(10, 11, 31, 0.7) 45%, rgba(5, 6, 20, 0.1));
}

.strip-note {
  margin-top: 16px;
  color: var(--ink-faint);
  font-size: 0.79rem;
  letter-spacing: 0.015em;
}

/* ---------- how to play ---------- */

.how-section::before {
  background: radial-gradient(ellipse at 30% 64%, rgba(36, 103, 150, 0.08), transparent 34%);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  list-style: none;
}

.step-card {
  position: relative;
  min-height: 290px;
  overflow: hidden;
  padding: 26px;
}

.step-number {
  color: var(--ink-faint);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.step-card p {
  max-width: 29ch;
  color: var(--ink-soft);
  font-size: 0.96rem;
  line-height: 1.72;
}

/* ---------- editorial sections ---------- */

.editorial-section {
  padding-block: clamp(64px, 6.5vw, 90px);
}

.sound-section::before {
  background:
    radial-gradient(ellipse at 78% 50%, rgba(50, 98, 166, 0.11), transparent 30%),
    linear-gradient(90deg, rgba(12, 15, 39, 0.62), rgba(5, 6, 20, 0.04));
}

.dev-section::before {
  background:
    radial-gradient(ellipse at 18% 50%, rgba(84, 54, 148, 0.075), transparent 30%),
    linear-gradient(90deg, rgba(5, 6, 20, 0.04), rgba(12, 15, 39, 0.5));
}

.editorial-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
  align-items: start;
  gap: clamp(42px, 8vw, 118px);
}

.editorial-heading {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: start;
  gap: 22px;
}

.editorial-heading h2 {
  padding-top: 6px;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
}

.editorial-copy {
  padding-top: 5px;
}

.sound-wave {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 130px;
  height: 36px;
  margin-top: 28px;
  opacity: 0.55;
}

.sound-wave span {
  width: 1px;
  height: 10px;
  background: linear-gradient(180deg, transparent, #9ad7ff, transparent);
  transform-origin: center;
  animation: soundPulse 3.2s ease-in-out infinite;
}

.sound-wave span:nth-child(2) { height: 19px; animation-delay: -0.5s; }
.sound-wave span:nth-child(3) { height: 28px; animation-delay: -1s; }
.sound-wave span:nth-child(4) { height: 34px; animation-delay: -1.5s; }
.sound-wave span:nth-child(5) { height: 25px; animation-delay: -2s; }
.sound-wave span:nth-child(6) { height: 16px; animation-delay: -2.5s; }
.sound-wave span:nth-child(7) { height: 8px; animation-delay: -3s; }

@keyframes soundPulse {
  0%, 100% { transform: scaleY(0.65); opacity: 0.55; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---------- FAQ ---------- */

.faq-section::before {
  background:
    radial-gradient(ellipse at 75% 35%, rgba(48, 93, 158, 0.08), transparent 32%),
    linear-gradient(180deg, transparent, rgba(7, 8, 25, 0.7));
}

.faq-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
  align-items: start;
  gap: clamp(42px, 8vw, 118px);
}

.faq-grid .section-heading {
  position: sticky;
  top: 116px;
  margin-bottom: 0;
}

.qa-list {
  display: grid;
  gap: 12px;
}

.qa {
  overflow: hidden;
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, rgba(20, 25, 60, 0.62), rgba(8, 10, 28, 0.76));
  transition: border-color 180ms ease, background-color 180ms ease;
}

.qa:hover,
.qa[open] {
  border-color: rgba(174, 204, 255, 0.25);
}

.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  gap: 18px;
  padding: 17px 20px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.qa summary::-webkit-details-marker {
  display: none;
}

.qa summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 300;
  line-height: 1;
  transition: transform 220ms var(--ease-out), color 220ms ease;
}

.qa[open] summary::after {
  color: var(--gold);
  transform: rotate(45deg);
}

.qa p {
  max-width: 62ch;
  padding: 0 20px 20px;
  color: var(--ink-muted);
  font-size: 0.92rem;
  line-height: 1.72;
}

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid rgba(174, 194, 255, 0.09);
  padding-block: 34px 44px;
  background: rgba(3, 4, 13, 0.58);
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 30px;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.foot-brand p {
  color: var(--ink-faint);
  font-size: 0.8rem;
}

.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
}

.site-foot a {
  min-height: 44px;
  padding: 11px 8px;
  color: var(--ink-muted);
  font-size: 0.78rem;
  text-decoration: none;
}

.site-foot a:hover {
  color: var(--accent);
}

/* ---------- scroll reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px) scale(0.992);
    transition:
      opacity 680ms var(--ease-out) var(--delay, 0ms),
      transform 680ms var(--ease-out) var(--delay, 0ms);
  }

  .js .reveal.in {
    opacity: 1;
    transform: none;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(390px, 1.05fr);
    gap: 26px;
  }

  .modes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mode-card {
    min-height: 270px;
  }

}

@media (max-width: 820px) {
  .wrap {
    padding-inline: 24px;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    min-height: auto;
    padding-block: 76px 54px;
  }

  .hero-copy {
    max-width: 680px;
    text-align: center;
    justify-self: center;
  }

  .official-mark {
    justify-content: center;
  }

  .tagline {
    margin-inline: auto;
  }

  .cta-row {
    justify-content: center;
  }

  .hero-visual {
    width: min(76vw, 470px);
  }

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

  .step-card {
    display: grid;
    grid-template-columns: 46px 135px 1fr;
    align-items: center;
    gap: 18px;
    min-height: 0;
    padding: 24px;
  }

  .step-media {
    margin: 0;
  }

  .step-card p {
    max-width: none;
  }

  .editorial-grid,
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .faq-grid .section-heading {
    position: static;
    margin-bottom: 0;
  }
}

@media (max-width: 620px) {
  .head-row {
    min-height: 66px;
  }

  .brand {
    gap: 10px;
    font-size: 0.7rem;
    letter-spacing: 0.24em;
  }

  .btn-small {
    display: none;
  }

  .section {
    padding-block: 76px;
  }

  .section-heading,
  .editorial-heading {
    gap: 15px;
  }

  .section-number,
  .editorial-heading {
    --marker-size: 36px;
  }

  .section-number {
    width: 36px;
    height: 36px;
    font-size: 0.6rem;
  }

  h2 {
    font-size: clamp(1.35rem, 7.2vw, 1.8rem);
    letter-spacing: 0.13em;
  }

  .hero-grid {
    padding-block: 58px 44px;
  }

  .official-mark {
    margin-bottom: 19px;
  }

  .logotype {
    font-size: clamp(2.45rem, 14vw, 4rem);
    letter-spacing: 0.12em;
  }

  .tagline {
    margin-block: 22px 28px;
    font-size: 1rem;
    line-height: 1.62;
  }

  .btn.primary {
    width: min(100%, 300px);
  }

  .hero-visual {
    width: min(94vw, 360px);
    margin-top: 4px;
  }

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

  .mode-card {
    min-height: 0;
  }


  .step-card {
    grid-template-columns: 38px 1fr;
    gap: 8px 18px;
  }

  .step-media {
    grid-column: 2;
    margin-block: 2px 10px;
  }

  .step-card p {
    grid-column: 1 / -1;
  }

  .editorial-heading {
    grid-template-columns: 36px 1fr;
  }

  .editorial-heading h2 {
    padding-top: 4px;
  }

  .foot-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-foot nav {
    margin-inline: -8px;
  }
}

@media (max-width: 380px) {
  .wrap {
    padding-inline: 19px;
  }


  .brand-orb {
    display: none;
  }

  .lang button {
    min-width: 43px;
  }

  .hero-visual {
    width: min(102vw, 340px);
    margin-inline: -8px;
  }

  .logotype {
    font-size: clamp(2.2rem, 12vw, 3.2rem);
    letter-spacing: 0.1em;
  }

  .mode-card,
  .step-card {
    padding: 22px;
  }

  .qa summary,
  .qa p {
    padding-inline: 17px;
  }
}

/* ---------- accessibility and motion ---------- */

@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;
  }

  .star-layer {
    will-change: auto;
  }

  .galaxy-canvas,
  .space-haze {
    transition: none;
  }
}

@media (forced-colors: active) {
  .space,
  .hero-visual,
  .sound-wave {
    display: none;
  }

  .card,
  .qa,
  .lang,
  .btn,
  .scene-shell,
  .platform,
  .player {
    border: 1px solid CanvasText;
  }
}

@media (hover: none) {
  .mode-card:hover,
  .btn:hover {
    transform: none;
  }
}

/* ---------- in-game gallery (real captures) ---------- */

.gallery {
  display: grid;
  grid-template-columns: minmax(250px, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(34px, 5vw, 76px);
}

.gallery-tabs {
  display: none;
}

.js .gallery-tabs {
  display: grid;
  gap: 10px;
}

.gallery-tabs [role="tab"] {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  background: var(--glass);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.15em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease, background-color 200ms ease, transform 200ms var(--ease-out);
}

.gallery-tabs [role="tab"]:hover {
  color: var(--ink);
  border-color: var(--glass-edge-bright);
  transform: translateX(2px);
}

.gallery-tabs [role="tab"][aria-selected="true"] {
  color: var(--ink);
  border-color: rgba(174, 204, 255, 0.38);
  background: var(--glass-strong);
}

.tab-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid var(--glass-edge);
  border-radius: 50%;
  color: var(--ink-faint);
  background: rgba(9, 12, 31, 0.7);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
  letter-spacing: 0;
  transition: color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.gallery-tabs [role="tab"][aria-selected="true"] .tab-mark {
  color: var(--gold);
  border-color: rgba(255, 217, 143, 0.4);
  box-shadow: 0 0 16px rgba(255, 199, 101, 0.14);
}

.gallery-rail .strip-note {
  margin-top: 20px;
}

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

.js .gallery-stage {
  grid-template-columns: minmax(0, 1fr);
}

.scene {
  min-width: 0;
  text-align: center;
}

.js .gallery-stage .scene {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 340ms var(--ease-out), transform 340ms var(--ease-out), visibility 0s 340ms;
}

.js .gallery-stage .scene.is-active {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

.scene-shell {
  width: min(100%, 330px);
  margin-inline: auto;
  overflow: hidden;
  border: 1px solid rgba(167, 190, 255, 0.22);
  border-radius: clamp(20px, 2.2vw, 30px);
  background: #05061a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32), 0 0 48px rgba(80, 110, 220, 0.09);
}

.scene-shell img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 450ms var(--ease-out);
}

.scene:hover .scene-shell img {
  transform: scale(1.03);
}

.scene figcaption {
  max-width: 42ch;
  margin: 16px auto 0;
  color: var(--ink-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ---------- how-to-play media crops ---------- */

.step-media {
  height: 150px;
  margin-block: 16px 20px;
  overflow: hidden;
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-sm);
  background: #05061a;
}

.step-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms var(--ease-out);
}

.step-card:hover .step-media img {
  transform: scale(1.04);
}

.step-media-merge img { object-position: 50% 26%; }
.step-media-combo img { object-position: 50% 18%; }
.step-media-power img { object-position: 50% 48%; }

/* ---------- soundtrack player ---------- */

.player {
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(100%, 560px);
  margin-top: 30px;
  padding: 16px 20px;
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(22, 28, 66, 0.72), rgba(8, 10, 29, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 18px 50px rgba(0, 0, 0, 0.16);
}

.player-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(177, 206, 255, 0.42);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #486fd4 0%, #565fcf 48%, #7057bf 100%);
  box-shadow: 0 10px 26px rgba(67, 95, 211, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: transform 180ms var(--ease-out), box-shadow 180ms ease, border-color 180ms ease;
}

.player-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 224, 255, 0.62);
  box-shadow: 0 14px 32px rgba(73, 107, 230, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.player-toggle:active {
  transform: scale(0.96);
}

.player-toggle[disabled] {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.player-toggle svg {
  width: 20px;
  height: 20px;
}

.player-toggle .icon-pause { display: none; }
.player.playing .icon-play { display: none; }
.player.playing .icon-pause { display: block; }

.player-body {
  flex: 1;
  min-width: 0;
}

.player-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.player-track {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-sub {
  color: var(--ink-faint);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.player-seek-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
}

.player-time {
  flex: 0 0 auto;
  min-width: 34px;
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.player-time + .player-range + .player-time {
  text-align: right;
}

.player-range {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  min-width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #8fd8ff var(--fill, 0%), rgba(148, 158, 255, 0.18) var(--fill, 0%));
  cursor: pointer;
}

.player-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(150, 180, 255, 0.85);
  border-radius: 50%;
  background: #dfe9ff;
  box-shadow: 0 0 10px rgba(143, 216, 255, 0.5);
}

.player-range::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 1px solid rgba(150, 180, 255, 0.85);
  border-radius: 50%;
  background: #dfe9ff;
  box-shadow: 0 0 10px rgba(143, 216, 255, 0.5);
}

.player-range::-moz-range-track {
  background: transparent;
}

.player-range[disabled] {
  opacity: 0.4;
  cursor: default;
}

.player-side {
  display: grid;
  flex: 0 0 auto;
  gap: 9px;
  justify-items: center;
}

.player .sound-wave {
  width: 64px;
  height: 24px;
  gap: 5px;
  margin: 0;
  opacity: 0.4;
  transition: opacity 300ms ease;
}

.player .sound-wave span {
  animation-play-state: paused;
}

.player.playing .sound-wave {
  opacity: 0.9;
}

.player.playing .sound-wave span {
  animation-play-state: running;
}

.player-volume {
  width: 74px;
  flex: none;
}

/* ---------- platform selection modal ---------- */

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-root[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 3, 13, 0.64);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  opacity: 0;
  transition: opacity 240ms ease;
}

.modal-panel {
  position: relative;
  width: min(100%, 470px);
  max-height: min(100%, 86vh);
  overflow-y: auto;
  padding: 30px 26px 26px;
  border: 1px solid var(--glass-edge-bright);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(24, 30, 72, 0.94), rgba(9, 11, 32, 0.97));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out);
}

.modal-root.open .modal-backdrop { opacity: 1; }
.modal-root.open .modal-panel { opacity: 1; transform: none; }

.modal-close {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--glass-edge);
  border-radius: 50%;
  color: var(--ink-muted);
  background: var(--glass);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.modal-close:hover {
  color: #fff;
  border-color: var(--glass-edge-bright);
  background: var(--glass-strong);
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-title {
  padding-right: 46px;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.modal-sub {
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.platform-list {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.platform {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  min-height: 74px;
  padding: 14px 16px;
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-sm);
  color: inherit;
  background: var(--glass);
  font: inherit;
  text-align: left;
  text-decoration: none;
  transition: transform 180ms var(--ease-out), border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

a.platform:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 224, 255, 0.55);
}

.platform-available {
  border-color: rgba(177, 206, 255, 0.42);
  background: linear-gradient(135deg, rgba(72, 111, 212, 0.3), rgba(112, 87, 191, 0.22));
  box-shadow: 0 12px 34px rgba(67, 95, 211, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.platform[disabled] {
  cursor: default;
}

.platform[disabled] .platform-icon,
.platform[disabled] .platform-copy {
  opacity: 0.55;
}

.platform-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--glass-edge);
  border-radius: 13px;
  color: var(--ink-soft);
  background: rgba(9, 12, 31, 0.72);
}

.platform-available .platform-icon {
  color: var(--accent);
  border-color: rgba(143, 216, 255, 0.34);
}

.platform-icon svg {
  width: 22px;
  height: 22px;
}

.platform-copy {
  min-width: 0;
}

.platform-copy strong {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.platform-copy em {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 0.77rem;
  font-style: normal;
}

.platform-state {
  padding: 7px 12px;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  color: var(--ink-faint);
  background: rgba(9, 12, 31, 0.55);
  font-size: 0.6rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.platform-available .platform-state {
  border-color: transparent;
  color: #0a1126;
  background: linear-gradient(135deg, #8fd8ff, #9db8ff);
}

body.modal-open {
  overflow: hidden;
}

/* ---------- responsive: gallery, player, modal ---------- */

@media (max-width: 1080px) {
  .gallery {
    gap: 30px;
  }
}

@media (max-width: 820px) {
  .gallery {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .js .gallery-tabs {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(146, 171, 235, 0.24) transparent;
  }

  .gallery-tabs [role="tab"] {
    min-height: 52px;
    white-space: nowrap;
  }

  .gallery-tabs [role="tab"]:hover {
    transform: none;
  }

  .gallery-rail .strip-note {
    margin-top: 12px;
  }

  .scene-shell {
    width: min(100%, 300px);
  }

  .step-media {
    height: 120px;
    width: 100%;
  }
}

@media (max-width: 620px) {
  .gallery-stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .player {
    flex-wrap: wrap;
    gap: 14px 16px;
    padding: 16px;
  }

  .player-body {
    flex: 1 1 200px;
  }

  .player-side {
    grid-auto-flow: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .modal-root {
    align-items: end;
    padding: 0;
  }

  .modal-panel {
    width: 100%;
    max-height: 88vh;
    padding: 26px 20px calc(22px + env(safe-area-inset-bottom, 0px));
    border-bottom: 0;
    border-radius: var(--radius) var(--radius) 0 0;
    transform: translateY(34px);
  }

  .platform {
    min-height: 70px;
    gap: 13px;
    padding: 12px 14px;
  }
}
