﻿:root {
  --bg: #0B0E1A;
  --bg-2: #11152B;
  --surface: #161B33;
  --surface-2: #1B2140;
  --surface-fade: rgba(22, 27, 51, 0.55);
  --surface-soft: rgba(22, 27, 51, 0.8);
  --inset: rgba(11, 14, 26, 0.5);
  --veil: rgba(11, 14, 26, 0.88);
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.12);
  --silver: #C9D6FF;
  --silver-2: #8FA8E8;
  --amber: #F2A65A;
  --orange: #F2701E;
  --orange-soft: #FF8A4C;
  --text: #EDEFF7;
  --text-dim: rgba(237, 239, 247, 0.65);
  --ridge-far: #1A2142;
  --ridge-mid: #12172F;
  --ridge-near: #0A0E1E;
  --font-display: "Unbounded", sans-serif;
  --font-body: "Onest", sans-serif;
  --font-pixel: "Press Start 2P", monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 20px;
  --radius-sm: 12px;
  --z-nav: 30;
  --z-menu: 40;
  --container: 1200px;
  color-scheme: dark;
}

@property --hue {
  syntax: "<number>";
  initial-value: 0;
  inherits: true;
}

:root[data-theme="light"] {
  --bg: #EEF1FA;
  --bg-2: #E3E8F5;
  --surface: #FFFFFF;
  --surface-2: #F7F9FE;
  --surface-fade: rgba(255, 255, 255, 0.72);
  --surface-soft: rgba(255, 255, 255, 0.9);
  --inset: rgba(232, 236, 248, 0.85);
  --veil: rgba(244, 246, 253, 0.9);
  --line: rgba(18, 24, 48, 0.1);
  --line-strong: rgba(18, 24, 48, 0.18);
  --silver: #3A4780;
  --silver-2: #5B6BA8;
  --orange: #D95A0F;
  --orange-soft: #E8722A;
  --amber: #D9821E;
  --text: #141A33;
  --text-dim: rgba(20, 26, 51, 0.68);
  --ridge-far: #C4CCE6;
  --ridge-mid: #AFB9DB;
  --ridge-near: #94A0C9;
  color-scheme: light;
}

:root[data-theme="rgb"] {
  animation: huecycle 12s linear infinite;
  --bg: #07070F;
  --bg-2: #0C0B1A;
  --surface: hsl(calc(var(--hue) + 240) 30% 12%);
  --surface-2: hsl(calc(var(--hue) + 240) 32% 16%);
  --surface-fade: hsl(calc(var(--hue) + 240) 30% 10% / 0.72);
  --surface-soft: hsl(calc(var(--hue) + 240) 30% 14% / 0.85);
  --inset: hsl(calc(var(--hue) + 250) 40% 6% / 0.6);
  --veil: hsl(calc(var(--hue) + 250) 40% 5% / 0.9);
  --line: hsl(var(--hue) 80% 60% / 0.16);
  --line-strong: hsl(var(--hue) 85% 65% / 0.32);
  --silver: hsl(calc(var(--hue) + 180) 85% 78%);
  --silver-2: hsl(calc(var(--hue) + 200) 75% 68%);
  --orange: hsl(var(--hue) 90% 58%);
  --orange-soft: hsl(calc(var(--hue) + 20) 95% 68%);
  --amber: hsl(calc(var(--hue) + 30) 90% 60%);
  --text: #F2F4FF;
  --text-dim: rgba(242, 244, 255, 0.66);
  --ridge-far: hsl(calc(var(--hue) + 250) 40% 16%);
  --ridge-mid: hsl(calc(var(--hue) + 255) 45% 12%);
  --ridge-near: hsl(calc(var(--hue) + 260) 50% 8%);
  color-scheme: dark;
}

@keyframes huecycle {
  from { --hue: 0; }
  to { --hue: 360; }
}

:root[data-theme="light"] body {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -webkit-touch-callout: none;
  background:
    radial-gradient(1200px 800px at 82% -10%, rgba(217, 90, 15, 0.07), transparent 60%),
    radial-gradient(900px 700px at -10% 40%, rgba(91, 107, 168, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 55%, var(--bg) 100%);
}

:root[data-theme="light"] .cursor-glow { position: fixed; z-index: 0; left: 0; top: 0; width: 300px; height: 300px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(242, 112, 30, .16), rgba(143, 168, 232, .07) 34%, transparent 70%); filter: blur(10px); opacity: .8; mix-blend-mode: screen; will-change: translate; }

body::before { opacity: 0.35; filter: invert(1) hue-rotate(180deg); }
:root[data-theme="light"] .nav.scrolled { background: rgba(255, 255, 255, 0.78); }
:root[data-theme="light"] .mobile-menu { background: rgba(238, 241, 250, 0.94); }
:root[data-theme="light"] .stats { background: rgba(255, 255, 255, 0.55); }
:root[data-theme="light"] .footer { background: rgba(255, 255, 255, 0.5); }
:root[data-theme="light"] .lightbox { background: rgba(230, 234, 246, 0.94); }
:root[data-theme="light"] .faq-tabs button[aria-selected="true"],
:root[data-theme="light"] .wiki-search:focus-visible { color: #FFF; background: var(--silver); }
:root[data-theme="light"] .skip-link { color: #FFF; }
:root[data-theme="light"] .step::before,
:root[data-theme="light"] .grid3 .cell {
  border-color: #FFF rgba(18, 24, 48, 0.18) rgba(18, 24, 48, 0.18) #FFF;
  background: linear-gradient(180deg, #FFF, #E8ECF7);
}
:root[data-theme="light"] .craft-img,
:root[data-theme="light"] .recipe-img,
:root[data-theme="light"] .team-avatar { background: #FFF; }

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}

body {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -webkit-touch-callout: none;
  background:
    radial-gradient(1200px 800px at 82% -10%, rgba(143, 168, 232, 0.09), transparent 60%),
    radial-gradient(900px 700px at -10% 40%, rgba(143, 168, 232, 0.05), transparent 60%),
    radial-gradient(1100px 700px at 50% 115%, rgba(242, 112, 30, 0.07), transparent 65%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 55%, var(--bg) 100%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100vw;
}

.cursor-glow { position: fixed; z-index: 0; left: 0; top: 0; width: 300px; height: 300px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(242, 112, 30, .16), rgba(143, 168, 232, .07) 34%, transparent 70%); filter: blur(10px); opacity: .8; mix-blend-mode: screen; will-change: translate; }

/* Звёздная пыль. Слой растянут на 640px за края и едет трансформом, а не
   background-position: transform уходит на GPU, background-position заставлял
   браузер перерисовывать весь экран каждый кадр — на слабых машинах это и был
   основной источник лагов при скролле. Сдвиг ровно на размер тайла — стык не виден. */
body::before {
  content: "";
  position: fixed;
  inset: -640px;
  z-index: -2;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 25% 20%, rgba(201, 214, 255, 0.5), transparent 100%),
    radial-gradient(1px 1px at 70% 60%, rgba(201, 214, 255, 0.35), transparent 100%),
    radial-gradient(1px 1px at 45% 85%, rgba(201, 214, 255, 0.3), transparent 100%),
    radial-gradient(1.5px 1.5px at 90% 35%, rgba(201, 214, 255, 0.4), transparent 100%),
    radial-gradient(1px 1px at 10% 55%, rgba(201, 214, 255, 0.3), transparent 100%);
  background-size: 640px 640px;
  animation: drift 140s linear infinite;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(640px, 640px, 0); }
}

body::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(242, 112, 30, 0.04), transparent),
    radial-gradient(closest-side, rgba(143, 168, 232, 0.04), transparent);
  background-size: 55% 55%, 45% 45%;
  background-position: 12% 18%, 82% 72%;
  background-repeat: no-repeat;
}

@keyframes aurora {
  0% { background-position: 12% 18%, 82% 72%; }
  50% { background-position: 26% 34%, 66% 56%; }
  100% { background-position: 8% 46%, 88% 40%; }
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  scale: 0 1;
  background: linear-gradient(90deg, var(--orange), var(--silver));
  z-index: calc(var(--z-nav) + 1);
  pointer-events: none;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  text-wrap: balance;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 5.5vw, 4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.1rem; font-weight: 500; }

p { max-width: 62ch; }

a { color: inherit; }

.mono { font-family: var(--font-pixel); font-size: 0.78em; color: var(--silver); white-space: nowrap; }

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 50;
  background: var(--silver);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.25s var(--ease);
}

.skip-link:focus-visible { top: 16px; }

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

.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  translate: -50% 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 10px 12px 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
  max-width: calc(100vw - 32px);
}

.nav.scrolled {
  background: rgba(17, 21, 43, 0.72);
  border-color: var(--line-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 40px rgba(4, 6, 14, 0.5);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}

.nav-links { display: flex; gap: 4px; }

.nav-links a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav-links a:hover { color: var(--text); background: rgba(201, 214, 255, 0.08); }

.nav-links a[aria-current="page"] { color: var(--text); background: rgba(201, 214, 255, 0.1); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), translate 0.25s var(--ease);
}

.btn:hover { background: rgba(201, 214, 255, 0.08); border-color: rgba(201, 214, 255, 0.3); }

.btn:active { translate: 0 1px; }

.nav-cta { padding: 9px 18px; font-size: 0.88rem; }

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--inset);
}

:root[data-theme="light"] .theme-switch { background: rgba(255, 255, 255, 0.5); }

.theme-switch button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.theme-switch button:hover { color: var(--text); background: rgba(201, 214, 255, 0.1); }

.theme-switch button[aria-pressed="true"] {
  color: var(--bg);
  background: var(--silver);
}

.theme-switch button[data-theme="rgb"][aria-pressed="true"] {
  background: conic-gradient(#FF4D4D, #FFD24D, #4DFF88, #4DD2FF, #B84DFF, #FF4D4D);
  color: #0B0E1A;
}

.burger {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  border-radius: 999px;
}

.burger span {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: rotate 0.35s var(--ease), translate 0.35s var(--ease);
}

.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 25px; }

.burger[aria-expanded="true"] span:nth-child(1) { translate: 0 4px; rotate: 45deg; }
.burger[aria-expanded="true"] span:nth-child(2) { translate: 0 -4px; rotate: -45deg; }

.mobile-menu[hidden] { display: none; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-nav) - 1);
  background: var(--veil);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: grid;
  place-items: center;
}

.mobile-menu nav { display: grid; gap: 8px; text-align: center; }

.mobile-menu a {
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text);
  padding: 10px 24px;
  opacity: 0;
  translate: 0 16px;
  transition: opacity 0.5s var(--ease), translate 0.5s var(--ease);
  transition-delay: calc(var(--i) * 60ms);
}

.mobile-menu.open a { opacity: 1; translate: 0 0; }

.hero {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 120px 20px 160px;
}

.hero-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Луна едет параллаксом, т.е. её transform меняется каждый кадр скролла.
   Широкий drop-shadow(0 0 150px) при этом пересчитывался заново на каждом кадре
   и был главным источником лагов на всей странице. Ближнее свечение оставили
   фильтром (радиус маленький, это дёшево), дальний ореол вынесли в отдельный
   слой .hero-moon-glow на радиальном градиенте — градиент растеризуется один
   раз и дальше просто композитится. */
.hero-moon {
  --moon-size: clamp(140px, 18vw, 260px);
  position: absolute;
  top: 9%;
  right: 11%;
  width: var(--moon-size);
  filter: drop-shadow(0 0 50px rgba(242, 112, 30, 0.4));
  pointer-events: none;
  will-change: transform;
}

.hero-moon-glow {
  --moon-size: clamp(140px, 18vw, 260px);
  position: absolute;
  top: calc(9% - var(--moon-size));
  right: calc(11% - var(--moon-size));
  width: calc(var(--moon-size) * 3);
  height: calc(var(--moon-size) * 3);
  pointer-events: none;
  background: radial-gradient(circle,
    rgba(242, 112, 30, 0.20) 0%,
    rgba(242, 112, 30, 0.11) 26%,
    rgba(242, 112, 30, 0.04) 45%,
    transparent 66%);
  will-change: transform;
}

.hero-ridge {
  position: absolute;
  left: -2%;
  bottom: -2px;
  width: 104%;
  pointer-events: none;
}

.hero-ridge-far { height: 32vh; }
.hero-ridge-mid { height: 25vh; }
.hero-ridge-near { height: 18vh; }

/* Window lights animation */
.hero-ridge-near .window {
  filter: drop-shadow(0 0 4px var(--amber)) drop-shadow(0 0 8px rgba(242, 112, 30, 0.5));
  animation: window-flicker 5s ease-in-out infinite;
}
.window.w1 { opacity: 1; animation-delay: 0s; }
.window.w2 { opacity: 0.9; animation-delay: 1.2s; }
.window.w3 { opacity: 0.95; animation-delay: 2.4s; }
.window.w4 { opacity: 0.85; animation-delay: 3.6s; }
.window.w5 { opacity: 0.8; animation-delay: 0.5s; }
.window.w6 { opacity: 0.9; animation-delay: 1.8s; }
.window.w7 { opacity: 0.85; animation-delay: 3s; }
.window.w8 { opacity: 0.9; animation-delay: 4s; }
.window.w9 { opacity: 0.85; animation-delay: 0.9s; }
.window.w10 { opacity: 0.9; animation-delay: 2.1s; }
.window.w11 { opacity: 0.8; animation-delay: 3.3s; }
.window.w12 { opacity: 0.75; animation-delay: 4.5s; }

@keyframes window-flicker {
  0%, 100% { opacity: 1; }
  40% { opacity: 0.5; }
  60% { opacity: 0.9; }
  80% { opacity: 0.6; }
}

/* Fireflies - round glowing orbs */
.hero-fireflies {
  position: absolute;
  bottom: 8%;
  left: 0;
  right: 0;
  height: 35%;
  pointer-events: none;
  overflow: hidden;
}

.firefly {
  position: absolute;
  width: 3px;
  height: 3px;
  background: radial-gradient(circle, rgba(255, 230, 180, 0.9) 0%, rgba(242, 180, 100, 0.5) 50%, transparent 100%);
  border-radius: 50%;
  box-shadow:
    0 0 4px 2px rgba(255, 220, 150, 0.3),
    0 0 8px 4px rgba(242, 165, 90, 0.15);
  animation: firefly-move 12s ease-in-out infinite;
}

.firefly:nth-child(1) { left: 10%; bottom: 45%; animation-delay: 0s; }
.firefly:nth-child(2) { left: 25%; bottom: 60%; animation-delay: -2s; }
.firefly:nth-child(3) { left: 45%; bottom: 35%; animation-delay: -4s; }
.firefly:nth-child(4) { left: 60%; bottom: 55%; animation-delay: -6s; }
.firefly:nth-child(5) { left: 78%; bottom: 42%; animation-delay: -8s; }
.firefly:nth-child(6) { left: 90%; bottom: 65%; animation-delay: -10s; }

@keyframes firefly-move {
  0% { transform: translate(0, 0) scale(0.8); opacity: 0.3; }
  15% { transform: translate(30px, -20px) scale(1.2); opacity: 1; }
  30% { transform: translate(10px, -50px) scale(0.9); opacity: 0.7; }
  45% { transform: translate(-25px, -35px) scale(1.1); opacity: 0.9; }
  60% { transform: translate(-40px, -15px) scale(0.8); opacity: 0.5; }
  75% { transform: translate(-15px, -40px) scale(1); opacity: 0.8; }
  90% { transform: translate(20px, -10px) scale(1.2); opacity: 1; }
  100% { transform: translate(0, 0) scale(0.8); opacity: 0.3; }
}

@keyframes firefly-glow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Shooting stars / Comets */
.hero-comets {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.comet {
  position: absolute;
  width: 120px;
  height: 1px;
  opacity: 0;
}

/* Падает вниз-влево: головка внизу слева */
.comet-left {
  top: 8%;
  right: 25%;
  background: linear-gradient(90deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.4) 30%, transparent 100%);
  animation: star-fall-left 25s ease-out 3s infinite;
}

.comet-left::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px 2px #fff, 0 0 12px 4px rgba(200,220,255,0.7);
}

/* Падает вниз-вправо: головка внизу справа */
.comet-right {
  top: 12%;
  left: 30%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 70%, rgba(255,255,255,1) 100%);
  animation: star-fall-right 30s ease-out 15s infinite;
}

.comet-right::before {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 6px 2px #fff, 0 0 12px 4px rgba(200,220,255,0.7);
}

@keyframes star-fall-left {
  0% {
    transform: rotate(-40deg) translate(0, 0);
    opacity: 0;
  }
  1% { opacity: 1; }
  10% { opacity: 0.9; }
  12% {
    transform: rotate(-40deg) translate(-400px, 280px);
    opacity: 0;
  }
  100% {
    transform: rotate(-40deg) translate(-400px, 280px);
    opacity: 0;
  }
}

@keyframes star-fall-right {
  0% {
    transform: rotate(40deg) translate(0, 0);
    opacity: 0;
  }
  1% { opacity: 1; }
  9% { opacity: 0.9; }
  11% {
    transform: rotate(40deg) translate(400px, 280px);
    opacity: 0;
  }
  100% {
    transform: rotate(40deg) translate(400px, 280px);
    opacity: 0;
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 22px;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--silver-2);
  font-weight: 600;
}

.hero-sub { color: var(--text-dim); font-size: 1.08rem; max-width: 46ch; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}

.ip-plate {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 8px 8px 8px 22px;
  border-radius: 999px;
  border: 1px solid rgba(242, 112, 30, 0.5);
  background: linear-gradient(180deg, rgba(242, 112, 30, 0.18), rgba(242, 112, 30, 0.08));
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 30px rgba(242, 112, 30, 0.15);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), translate 0.25s var(--ease);
}

.ip-plate:hover {
  border-color: rgba(255, 138, 76, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 8px 40px rgba(242, 112, 30, 0.3);
}

.ip-plate:active { translate: 0 1px; }

.ip-text { padding-top: 2px; }

.ip-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(242, 112, 30, 0.22);
  color: var(--orange-soft);
  transition: background-color 0.25s var(--ease);
}

.ip-plate:hover .ip-icon { background: rgba(242, 112, 30, 0.35); }

.ip-icon svg { grid-area: 1 / 1; transition: opacity 0.2s var(--ease), scale 0.3s var(--ease); }

.ip-icon .icon-check { opacity: 0; scale: 0.5; }

.ip-plate.copied .icon-copy { opacity: 0; scale: 0.5; }
.ip-plate.copied .icon-check { opacity: 1; scale: 1; }
.ip-plate.copied { border-color: rgba(140, 220, 160, 0.6); }

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-fade);
  font-size: 0.85rem;
  color: var(--text-dim);
}

.badge-version { color: var(--silver); font-weight: 600; letter-spacing: 0.04em; }

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7FD99A;
  box-shadow: 0 0 10px rgba(127, 217, 154, 0.7);
}

.stats {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(rgba(201, 214, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 214, 255, 0.022) 1px, transparent 1px),
    var(--inset);
  background-size: 30px 30px, 30px 30px, auto;
}

.stats::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242, 112, 30, 0.5), transparent);
  translate: -100% 0;
  animation: sweep 9s ease-in-out infinite;
}

@keyframes sweep {
  0%, 100% { translate: -100% 0; }
  50% { translate: 100% 0; }
}

.stats-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 44px 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
  position: relative;
}

/* Removed vertical dividers between stats */

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  font-weight: 600;
  color: var(--silver);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--silver-2);
  margin-top: -6px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* Trailer */
.trailer {
  text-align: center;
  padding-top: 60px;
}

.trailer h2 {
  margin-bottom: 32px;
}

.trailer-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.trailer-frame {
  position: relative;
  padding-bottom: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow:
    0 0 0 1px var(--line),
    0 20px 60px -20px rgba(0, 0, 0, 0.5),
    0 0 80px -20px var(--orange);
}

.trailer-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

:root[data-theme="light"] .trailer-frame {
  box-shadow:
    0 0 0 1px var(--line),
    0 20px 60px -20px rgba(0, 0, 0, 0.15),
    0 0 60px -20px rgba(242, 112, 30, 0.3);
}

.map-card {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-fade) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.map-body {
  padding: 44px 40px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 14px;
}

.map-live {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--inset);
  font-size: 0.82rem;
  color: var(--text-dim);
}

.map-live b { color: var(--text); font-weight: 600; }
.map-live[hidden] { display: none; }

.map-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.map-actions .btn { padding: 11px 20px; font-size: 0.9rem; }

.map-body h2 { margin-bottom: 0; }
.map-body p { color: var(--text-dim); }

.map-frame {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  background: var(--bg);
}

.map-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--line), inset 0 22px 44px -28px rgba(4, 6, 14, 0.9);
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border: 0;
  display: block;
}

.map-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.map-overlay::after {
  content: "Открыть карту целиком";
  position: absolute;
  left: 50%;
  bottom: 16px;
  translate: -50% 0;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--veil);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.25s var(--ease), translate 0.25s var(--ease);
}

.map-overlay:hover::after,
.map-overlay:focus-visible::after { opacity: 1; translate: -50% -4px; }

.map-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background: var(--surface);
}

.map-fallback[hidden] { display: none; }
.map-fallback p { color: var(--text-dim); }

.map-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  background: rgba(6, 8, 18, 0.94);
  backdrop-filter: blur(10px);
  display: grid;
  grid-template-rows: auto 1fr;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.map-modal[hidden] { display: none; }
.map-modal.open { opacity: 1; }

.map-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.map-modal-bar strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

.map-modal-tools { display: flex; align-items: center; gap: 10px; }

.map-newtab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.map-newtab:hover { color: var(--text); border-color: var(--line-strong); }

.map-modal iframe { width: 100%; height: 100%; border: 0; }

.map-close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.map-close:hover { background: rgba(242, 112, 30, 0.2); border-color: rgba(242, 112, 30, 0.6); }

.teaser-head { display: grid; gap: 10px; margin-bottom: 34px; }
.teaser-head h2 { margin-bottom: 0; }
.teaser-head p { color: var(--text-dim); }

.teaser-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.teaser-card {
  position: relative;
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-fade) 100%);
  text-decoration: none;
  transition: border-color 0.3s var(--ease), translate 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.teaser-card:hover {
  translate: 0 -4px;
  border-color: rgba(242, 112, 30, 0.35);
  box-shadow: 0 18px 50px rgba(4, 6, 14, 0.45);
}

.teaser-art {
  position: relative;
  width: 100%;
  height: 108px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background:
    linear-gradient(rgba(201, 214, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 214, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, var(--inset), var(--surface-2));
  background-size: 18px 18px, 18px 18px, auto;
  display: grid;
  place-items: center;
}

.teaser-art i { position: absolute; display: block; }

.art-stones .gem {
  width: 17px;
  height: 17px;
  rotate: 45deg;
  border-radius: 3px;
  transition: translate 0.5s var(--ease);
}
.art-stones .g1 { background: #7FD99A; translate: 0 -25px; box-shadow: 0 0 14px rgba(127,217,154,.6); }
.art-stones .g2 { background: #FF7A8A; translate: -25px 0; box-shadow: 0 0 14px rgba(255,122,138,.6); }
.art-stones .g3 { background: var(--orange); translate: 25px 0; box-shadow: 0 0 14px rgba(242,112,30,.6); }
.art-stones .g4 { background: #C08CE8; translate: 0 25px; box-shadow: 0 0 14px rgba(192,140,232,.6); }
.art-stones .core {
  width: 22px; height: 22px; rotate: 0deg; border-radius: 5px;
  background: linear-gradient(150deg, #EDEFF7, #8FA8E8);
  box-shadow: 0 0 20px rgba(201,214,255,.5);
}
.teaser-card:hover .art-stones .g1 { translate: 0 -32px; }
.teaser-card:hover .art-stones .g2 { translate: -32px 0; }
.teaser-card:hover .art-stones .g3 { translate: 32px 0; }
.teaser-card:hover .art-stones .g4 { translate: 0 32px; }

.art-radio .wave {
  width: 7px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--orange-soft), var(--orange));
  box-shadow: 0 0 12px rgba(242,112,30,.45);
  animation: eq 1.3s ease-in-out infinite alternate;
}
.art-radio .w1 { height: 26px; translate: -36px 0; animation-delay: 0s; }
.art-radio .w2 { height: 46px; translate: -18px 0; animation-delay: .18s; }
.art-radio .w3 { height: 62px; translate: 0 0; animation-delay: .36s; }
.art-radio .w4 { height: 44px; translate: 18px 0; animation-delay: .54s; }
.art-radio .w5 { height: 24px; translate: 36px 0; animation-delay: .72s; }

@keyframes eq { from { scale: 1 .45; } to { scale: 1 1; } }

.art-skips { background-color: rgba(20, 40, 70, 0.35); }
.art-skips .ripple {
  border-radius: 50%;
  border: 2px solid rgba(143, 168, 232, 0.55);
  animation: ripple 2.6s ease-out infinite;
}
.art-skips .r1 { width: 30px; height: 12px; animation-delay: 0s; }
.art-skips .r2 { width: 30px; height: 12px; animation-delay: .8s; }
.art-skips .r3 { width: 30px; height: 12px; animation-delay: 1.6s; }
.art-skips .stone {
  width: 14px; height: 14px; border-radius: 3px;
  background: linear-gradient(150deg, #9AA3B8, #5C6480);
  translate: -34px -22px;
  animation: skip 2.6s cubic-bezier(.4,0,.6,1) infinite;
}

@keyframes ripple {
  0% { scale: .3; opacity: 0; }
  25% { opacity: .9; }
  100% { scale: 2.6; opacity: 0; }
}
@keyframes skip {
  0% { translate: -40px -26px; }
  25% { translate: -18px 2px; }
  40% { translate: 0 -16px; }
  60% { translate: 16px 2px; }
  75% { translate: 30px -8px; }
  100% { translate: 44px 8px; opacity: 0; }
}

.art-seeds .soil {
  width: 84%; height: 16px; bottom: 20px;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, #4A3524 0 10px, #573F2B 10px 20px);
  box-shadow: inset 0 2px 0 rgba(0,0,0,.3);
}
.art-seeds .sprout {
  width: 5px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #A8E6A0, #4E9E5C);
  bottom: 34px;
  transform-origin: bottom center;
  animation: grow 3s ease-in-out infinite;
}
.art-seeds .s1 { height: 26px; translate: -30px 0; animation-delay: 0s; }
.art-seeds .s2 { height: 38px; translate: 0 0; animation-delay: .5s; }
.art-seeds .s3 { height: 22px; translate: 30px 0; animation-delay: 1s; }

@keyframes grow {
  0%, 100% { scale: 1 .55; }
  50% { scale: 1 1; }
}

.teaser-tag {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--orange-soft);
}

.teaser-card h3 { font-size: 1.05rem; font-weight: 600; }
.teaser-card p { color: var(--text-dim); font-size: 0.9rem; }

.teaser-all { margin-top: 26px; }

.sponsor-card {
  position: relative;
  overflow: hidden;
  padding: 48px 44px;
  border-radius: var(--radius);
  border: 1px solid rgba(242, 112, 30, 0.28);
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(242, 112, 30, 0.1), transparent 70%),
    linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  display: grid;
  gap: 28px;
}

.sponsor-head { display: grid; gap: 10px; }
.sponsor-head h2 { margin-bottom: 0; }
.sponsor-head p { color: var(--text-dim); }

.sponsor-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.sponsor-list li {
  display: grid;
  gap: 3px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--inset);
  border-left: 2px solid rgba(242, 112, 30, 0.5);
}

.sponsor-list strong { font-size: 0.96rem; font-weight: 600; }
.sponsor-list span { font-size: 0.86rem; color: var(--text-dim); }

.sponsor-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.faq-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.faq-tabs button {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.faq-tabs button:hover { color: var(--text); border-color: var(--line-strong); }

.faq-tabs button[aria-selected="true"] {
  color: var(--bg);
  background: var(--silver);
  border-color: var(--silver);
}

.faq-empty { color: var(--text-dim); padding: 16px 4px; }

.section {
  position: relative;
  padding: 110px 20px;
  max-width: var(--container);
  margin: 0 auto;
}

.section::before {
  content: "";
  position: absolute;
  top: 8%;
  width: min(620px, 80%);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}

.section.lit-glow::before { opacity: 1; }

/* Section dividers */
.section-divider {
  position: relative;
  height: 40px;
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.section-divider::before {
  content: "";
  position: absolute;
  width: min(500px, 70%);
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--line) 15%,
    var(--line-strong) 50%,
    var(--line) 85%,
    transparent 100%
  );
}

.section-divider::after {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--orange);
  border-radius: 2px;
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(242, 112, 30, 0.6), 0 0 24px rgba(242, 112, 30, 0.3);
  animation: divider-pulse 3s ease-in-out infinite;
}

@keyframes divider-pulse {
  0%, 100% { opacity: 0.6; transform: rotate(45deg) scale(1); }
  50% { opacity: 1; transform: rotate(45deg) scale(1.2); }
}

.section-divider i {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--silver-2);
  border-radius: 1px;
  transform: rotate(45deg);
  opacity: 0.4;
}

.section-divider i:first-of-type { left: calc(50% - 60px); }
.section-divider i:last-of-type { right: calc(50% - 60px); }

:root[data-theme="light"] .section-divider::after {
  box-shadow: 0 0 8px rgba(242, 112, 30, 0.4), 0 0 16px rgba(242, 112, 30, 0.2);
}

.section:nth-of-type(odd)::before {
  left: -12%;
  background: radial-gradient(circle, rgba(242, 112, 30, 0.08), transparent 68%);
}

.section:nth-of-type(even)::before {
  right: -12%;
  background: radial-gradient(circle, rgba(143, 168, 232, 0.07), transparent 68%);
}

.voxel-strip {
  position: relative;
  height: 34px;
  margin: 0 auto;
  max-width: var(--container);
  pointer-events: none;
  overflow: hidden;
}

.voxel-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, var(--line-strong) 1px, transparent 1px);
  background-size: 34px 100%;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  opacity: 0.35;
}

.voxel-strip i {
  position: absolute;
  top: 13px;
  width: 8px;
  height: 8px;
  background: var(--orange);
  box-shadow: 0 0 12px rgba(242, 112, 30, 0.6);
  animation: blip 6s ease-in-out infinite;
}

.voxel-strip i:nth-child(1) { left: 18%; animation-delay: 0s; }
.voxel-strip i:nth-child(2) { left: 47%; background: var(--silver); box-shadow: 0 0 12px rgba(201, 214, 255, 0.6); animation-delay: 2s; }
.voxel-strip i:nth-child(3) { left: 78%; animation-delay: 4s; }

@keyframes blip {
  0%, 100% { opacity: 0.25; scale: 1; }
  50% { opacity: 1; scale: 1.35; }
}

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

.floaters i {
  position: absolute;
  display: block;
  border-radius: 2px;
  opacity: 0;
  animation: rise linear infinite;
}

@keyframes rise {
  0% { translate: 0 40px; opacity: 0; rotate: 0deg; }
  12% { opacity: 0.55; }
  88% { opacity: 0.4; }
  100% { translate: 0 -110vh; opacity: 0; rotate: 180deg; }
}

.section h2 { margin-bottom: 40px; }

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

.bento-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(201, 214, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 214, 255, 0.028) 1px, transparent 1px),
    linear-gradient(180deg, var(--surface) 0%, var(--surface-fade) 100%);
  background-size: 26px 26px, 26px 26px, auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  min-height: 240px;
  display: flex;
  align-items: flex-end;
  transition: border-color 0.3s var(--ease), translate 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.bento-card:hover {
  translate: 0 -4px;
  border-color: rgba(201, 214, 255, 0.22);
  box-shadow: 0 18px 50px rgba(4, 6, 14, 0.45);
}

.bento-card::after,
.teaser-card::after,
.sponsor-card::after,
.map-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(242, 112, 30, 0.13), transparent 70%);
  transition: opacity 0.35s var(--ease);
}

.bento-card:hover::after,
.teaser-card:hover::after,
.sponsor-card:hover::after,
.map-card:hover::after { opacity: 1; }

.teaser-card, .sponsor-card, .map-card { position: relative; }

.bento-wide { grid-column: span 2; min-height: 300px; }

.bento-orb {
  position: absolute;
  top: -40%;
  right: -8%;
  width: min(420px, 70%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 112, 30, 0.13), transparent 65%);
  pointer-events: none;
}

.bento-wave {
  position: absolute;
  right: 40px;
  top: 50%;
  translate: 0 -50%;
  width: clamp(160px, 24%, 240px);
  fill: rgba(201, 214, 255, 0.22);
  pointer-events: none;
}

.bento-wave rect {
  transform-box: fill-box;
  transform-origin: center;
  animation: wave 1.6s ease-in-out infinite alternate;
}

.bento-wave rect:nth-child(2n) { animation-delay: 0.4s; }
.bento-wave rect:nth-child(3n) { animation-delay: 0.8s; }
.bento-wave rect:nth-child(5n) { animation-delay: 1.1s; }

@keyframes wave {
  from { transform: scaleY(0.4); }
  to { transform: scaleY(1); }
}

.tps-bars {
  position: absolute;
  top: 28px;
  right: 28px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 28px;
  pointer-events: none;
}

.tps-bars i {
  width: 7px;
  background: #7FD99A;
  box-shadow: 0 0 8px rgba(127, 217, 154, 0.45);
}

.tps-bars i:nth-child(1) { height: 10px; }
.tps-bars i:nth-child(2) { height: 16px; }
.tps-bars i:nth-child(3) { height: 22px; }
.tps-bars i:nth-child(4) { height: 28px; }

.crew-pixels {
  position: absolute;
  top: 28px;
  right: 28px;
  display: flex;
  pointer-events: none;
}

.crew-pixels i {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid var(--bg);
  background: var(--silver-2);
}

.crew-pixels i:nth-child(2) { background: var(--orange); margin-left: -7px; }
.crew-pixels i:nth-child(3) { background: #7FD99A; margin-left: -7px; }

.bento-body { position: relative; padding: 30px; display: grid; gap: 12px; }

.card-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(201, 214, 255, 0.07);
  color: var(--silver);
  margin-bottom: 6px;
}

.bento-card p { color: var(--text-dim); font-size: 0.97rem; }

.gallery-head { display: grid; gap: 10px; margin-bottom: 36px; }
.gallery-head h2 { margin-bottom: 0; }
.gallery-head p { color: var(--text-dim); }

.carousel { display: grid; gap: 18px; }

.carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.carousel-viewport { padding: 16px; }

.carousel-track {
  display: flex;
  gap: 16px;
  transition: transform 0.7s var(--ease);
  touch-action: pan-y;
  cursor: grab;
}

.carousel-track.dragging { transition: none; cursor: grabbing; }

.carousel-slide {
  flex: 0 0 calc((100% - 32px) / 3);
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}

.carousel-dots { display: flex; justify-content: center; gap: 4px; }

.carousel-dots button {
  position: relative;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
}

.carousel-dots button::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(201, 214, 255, 0.25);
  transition: background-color 0.3s var(--ease), width 0.3s var(--ease), border-radius 0.3s var(--ease);
}

.carousel-dots button:hover::before { background: rgba(201, 214, 255, 0.5); }

.carousel-dots button[aria-current="true"]::before {
  width: 22px;
  border-radius: 999px;
  background: var(--silver);
}

.steps {
  list-style: none;
  counter-reset: step;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.steps::before,
.steps::after {
  content: "";
  position: absolute;
  top: 26px;
  left: calc(16.66% + 40px);
  height: 8px;
  pointer-events: none;
}

.steps::before {
  right: calc(16.66% + 40px);
  background: repeating-linear-gradient(90deg, #1D2340 0 12px, #262D52 12px 24px);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.4), inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

.steps::after {
  width: 0;
  background: repeating-linear-gradient(90deg, #7FD99A 0 12px, #5FBF7E 12px 24px);
  box-shadow: 0 0 14px rgba(127, 217, 154, 0.4);
  transition: width 1.6s var(--ease) 0.3s;
}

.start.lit .steps::after { width: calc(66.68% - 80px); }

.step {
  counter-increment: step;
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
}

.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 10px;
  background: linear-gradient(180deg, #262D52 0%, #1B2140 100%);
  border: 3px solid;
  border-color: #414B7D #10142A #10142A #414B7D;
  font-family: var(--font-pixel);
  font-size: 1rem;
  color: var(--silver);
  padding-top: 4px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), translate 0.25s var(--ease);
}

.step:hover::before {
  border-color: rgba(237, 239, 247, 0.85);
  box-shadow: 0 0 18px rgba(201, 214, 255, 0.25);
  translate: 0 -3px;
}

.start.lit .step::before { color: #7FD99A; }

.step-copy { cursor: pointer; }

.step-copy h3 button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-bottom: 1px dashed rgba(255, 138, 76, 0.6);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.step-copy h3 button:hover { color: var(--orange-soft); border-bottom-color: var(--orange-soft); }

.step-copy.copied::before {
  content: "✓";
  color: #7FD99A;
  border-color: rgba(127, 217, 154, 0.8) #10142A #10142A rgba(127, 217, 154, 0.8);
}

.step h3 { margin-bottom: 0; }
.step p { color: var(--text-dim); font-size: 0.95rem; max-width: 30ch; }

.start-note {
  margin-top: 52px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  padding: 18px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(242, 166, 90, 0.25);
  background: rgba(242, 166, 90, 0.06);
  color: var(--text-dim);
  max-width: 640px;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 48px;
  align-items: start;
}

.faq-intro { position: sticky; top: 110px; display: grid; gap: 12px; }
.faq-intro h2 { margin-bottom: 0; }
.faq-intro p { color: var(--text-dim); }

.faq-list { display: grid; gap: 10px; }

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-fade);
  transition: border-color 0.25s var(--ease);
}

.faq-item:hover { border-color: var(--line-strong); }

.faq-item h3 { font-size: 1rem; }

.faq-item button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-marker {
  position: relative;
  flex: 0 0 18px;
  height: 18px;
}

.faq-marker::before,
.faq-marker::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  background: var(--silver-2);
  border-radius: 2px;
  transition: rotate 0.35s var(--ease);
}

.faq-marker::before { width: 14px; height: 2px; }
.faq-marker::after { width: 2px; height: 14px; }

.faq-item button[aria-expanded="true"] .faq-marker::after { rotate: 90deg; }
.faq-item button[aria-expanded="true"] .faq-marker::before { rotate: 180deg; }

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease);
}

.faq-answer > p {
  overflow: hidden;
  color: var(--text-dim);
  padding: 0 22px;
  transition: padding 0.4s var(--ease);
}

.faq-item.open .faq-answer { grid-template-rows: 1fr; }
.faq-item.open .faq-answer > p { padding: 0 22px 20px; }

.cta { padding-bottom: 140px; }

.cta-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 90px 24px 150px;
  border-radius: 28px;
  border: 1px solid rgba(242, 112, 30, 0.22);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  display: grid;
  justify-items: center;
  gap: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.cta-card h2, .cta-card p, .cta-actions { position: relative; z-index: 1; }

.cta-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(201, 214, 255, 0.5), transparent 100%),
    radial-gradient(1px 1px at 60% 20%, rgba(255, 138, 76, 0.5), transparent 100%),
    radial-gradient(1px 1px at 80% 55%, rgba(201, 214, 255, 0.4), transparent 100%),
    radial-gradient(1.5px 1.5px at 35% 70%, rgba(201, 214, 255, 0.35), transparent 100%);
  background-size: 380px 380px;
  animation: twinkle 4.5s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.cta-crescent {
  position: relative;
  z-index: 1;
  width: 88px;
  filter: drop-shadow(0 0 28px rgba(242, 112, 30, 0.5));
  animation: floaty 5s ease-in-out infinite alternate;
  /* свой слой: иначе свечение перерисовывается на каждом кадре анимации */
  will-change: transform;
}

@keyframes floaty {
  from { translate: 0 -6px; }
  to { translate: 0 6px; }
}

.cta-ridge {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 90px;
  pointer-events: none;
}

.cta-card p { color: var(--text-dim); }

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 48px 20px 32px;
  background: rgba(8, 10, 20, 0.6);
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-nav { display: flex; flex-wrap: wrap; gap: 6px; }

.footer-nav a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.2s var(--ease);
}

.footer-nav a:hover { color: var(--text); }

.footer-social { display: flex; gap: 8px; }

.footer-social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--text-dim);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer-social a:hover { color: var(--silver); border-color: var(--line-strong); }

.footer-legal {
  max-width: var(--container);
  margin: 28px auto 0;
  color: rgba(237, 239, 247, 0.4);
  font-size: 0.85rem;
}

html.js .reveal {
  opacity: 0;
  translate: 0 16px;
  transition: opacity 0.7s var(--ease), translate 0.7s var(--ease);
  transition-delay: var(--d, 0s);
}

html.js .reveal.in { opacity: 1; translate: 0 0; }

html.js .reveal-tilt {
  opacity: 0;
  translate: 0 30px;
  rotate: x 8deg;
  transform-origin: 50% 100%;
  transition: opacity 0.8s var(--ease), translate 0.8s var(--ease), rotate 0.8s var(--ease);
  transition-delay: var(--d, 0s);
}

html.js .reveal-tilt.in { opacity: 1; translate: 0 0; rotate: x 0deg; }

.tilt-scene { perspective: 1000px; }

.tilt {
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.stat-num { transition: color 0.3s var(--ease), text-shadow 0.3s var(--ease); }

.stats.counted .stat-num {
  text-shadow: 0 0 24px rgba(201, 214, 255, 0.25);
}

.section h2 {
  position: relative;
  display: inline-block;
}

.section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--orange) 0%, var(--amber) 40%, transparent 100%);
  border-radius: 3px;
  box-shadow: 0 0 12px rgba(242, 112, 30, 0.5), 0 0 24px rgba(242, 112, 30, 0.2);
  transition: width 0.9s var(--ease) 0.2s;
}

.section h2::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 2px;
  transform: translateY(-50%) rotate(45deg);
  opacity: 0;
  box-shadow: 0 0 8px var(--orange);
  transition: opacity 0.4s var(--ease) 0.6s;
}

.section h2.in::after,
.reveal.in h2::after { width: 100%; }

.section h2.in::before,
.reveal.in h2::before { opacity: 1; }

@media (max-width: 1080px) {
  .nav { gap: 14px; }
  .nav-cta { display: none; }
  .carousel-slide { flex-basis: calc((100% - 16px) / 2); }
}

@media (max-width: 640px) {
  .carousel-slide { flex-basis: 100%; }
  .carousel-viewport { padding: 10px; }
  .carousel-track { gap: 10px; }
}

@media (max-width: 1080px) {
  .teaser-grid { grid-template-columns: repeat(2, 1fr); }
  .sponsor-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .map-card { grid-template-columns: 1fr; }
  .map-body { padding: 34px 26px; }
  .map-preview { min-height: 200px; order: -1; }
  .sponsor-card { padding: 36px 26px; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
  .stat:nth-child(3)::before { display: none; }
  .faq-grid { grid-template-columns: 1fr; gap: 24px; }
  .faq-intro { position: static; }
  .hero-moon { --moon-size: clamp(100px, 22vw, 170px); right: 6%; top: 7%; width: var(--moon-size); }
  .hero-moon-glow { --moon-size: clamp(100px, 22vw, 170px); right: calc(6% - var(--moon-size)); top: calc(7% - var(--moon-size)); }
  .section { padding: 88px 20px; }
  .bento-wide { min-height: 260px; }
  .bento-wave { width: 150px; right: 24px; opacity: 0.6; }
  .cta-card { padding: 70px 20px 130px; }
}

@media (max-width: 768px) {
  .nav { gap: 8px; width: calc(100vw - 32px); justify-content: space-between; }
  .nav-links { display: none; }
  .burger { display: block; }
  .theme-switch { margin-left: auto; }
  .theme-switch button { width: 30px; height: 30px; }
  .bento { grid-template-columns: 1fr; }
  .bento-wide { grid-column: span 1; }
  .bento-card { min-height: 200px; }
  .section { padding: 72px 16px; }
  .section h2 { margin-bottom: 28px; }
  .hero { padding: 100px 16px 120px; }
  .hero-ridge-far { height: 24vh; }
  .hero-ridge-mid { height: 19vh; }
  .hero-ridge-near { height: 14vh; }
  .hero-sub { font-size: 1rem; }
  .ip-plate { font-size: 0.68rem; }
  .bento-wave { display: none; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .steps::before,
  .steps::after {
    left: 26px;
    right: auto;
    top: 72px;
    width: 8px;
    height: auto;
  }
  .steps::before {
    bottom: 12px;
    background: repeating-linear-gradient(180deg, #1D2340 0 12px, #262D52 12px 24px);
  }
  .steps::after {
    bottom: auto;
    height: 0;
    width: 8px;
    background: repeating-linear-gradient(180deg, #7FD99A 0 12px, #5FBF7E 12px 24px);
    transition: height 1.6s var(--ease) 0.3s;
  }
  .start.lit .steps::after { width: 8px; height: calc(100% - 96px); }
  .step {
    grid-template-columns: 60px 1fr;
    grid-auto-rows: min-content;
    column-gap: 18px;
    row-gap: 4px;
    justify-items: start;
    text-align: left;
  }
  .step::before { grid-row: 1 / 3; margin-bottom: 0; }
  .step p { max-width: none; }
  .start-note { text-align: left; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
}

@media (max-width: 768px) {
  .teaser-grid { grid-template-columns: 1fr; }
  .sponsor-list { grid-template-columns: 1fr; }
  .stats-inner { padding: 34px 16px; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .sponsor-actions .btn { width: 100%; justify-content: center; }
  .hero { padding: 88px 14px 104px; }
  .hero-inner { gap: 18px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .ip-plate, .hero-actions .btn { width: 100%; justify-content: center; }
  .ip-plate { font-size: 0.75rem; padding-left: 16px; }
  .ip-icon { width: 34px; height: 34px; }
  .hero-meta { flex-wrap: wrap; justify-content: center; }
  .bento-body { padding: 22px; }
  .step { padding-left: 58px; }
  .step::before { width: 42px; height: 42px; font-size: 0.72rem; }
  .step::after { left: 20.5px; top: 50px; }
  .faq-item button { padding: 16px 16px; }
  .faq-item.open .faq-answer > p { padding: 0 16px 16px; }
  .faq-answer > p { padding: 0 16px; }
  .cta-card { padding: 56px 16px 110px; border-radius: 20px; }
  .cta-actions { flex-direction: column; width: 100%; }
  .cta-actions .ip-plate, .cta-actions .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .floaters, .voxel-strip i, .stats::after { animation: none; }
  .section::before { opacity: 1; transition: none; }
  html.js .reveal { opacity: 1; translate: 0 0; transition: none; }
  .mobile-menu a { transition: none; }
  .gallery-item img { transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.page-head {
  padding: 170px 20px 30px;
  max-width: var(--container);
  margin: 0 auto;
}

.page-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 14px; }
.page-head p { color: var(--text-dim); }

.team { padding-top: 40px; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.team-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(201, 214, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 214, 255, 0.028) 1px, transparent 1px),
    linear-gradient(180deg, var(--surface) 0%, var(--surface-fade) 100%);
  background-size: 26px 26px, 26px 26px, auto;
  padding: 30px 20px;
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  transition: border-color 0.3s var(--ease), translate 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.team-card:hover {
  translate: 0 -4px;
  border-color: rgba(242, 112, 30, 0.35);
  box-shadow: 0 18px 50px rgba(4, 6, 14, 0.45);
}

.team-avatar {
  width: 84px;
  height: 84px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  image-rendering: pixelated;
}

.team-name { font-family: var(--font-display); font-size: 1.02rem; font-weight: 500; }

.team-role {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--silver-2);
  font-weight: 600;
}

.team-card.lead { border-color: rgba(242, 112, 30, 0.3); }
.team-card.lead .team-role { color: var(--orange-soft); }

.team-card.vacant {
  border-style: dashed;
  border-color: rgba(201, 214, 255, 0.16);
  background: transparent;
}

.team-card.vacant .team-avatar {
  display: grid;
  place-items: center;
  color: var(--silver-2);
  font-family: var(--font-pixel);
  font-size: 1.3rem;
  background: rgba(201, 214, 255, 0.05);
}

.team-card.vacant .team-name { color: var(--text-dim); }

.team-note {
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 30px;
  border-radius: var(--radius);
  border: 1px solid rgba(242, 112, 30, 0.25);
  background: rgba(242, 112, 30, 0.06);
}

.team-note p { color: var(--text); font-weight: 500; }

.wiki { padding-top: 40px; }

.wiki-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
}

.wiki-side {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 18px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.wiki-side::-webkit-scrollbar {
  width: 6px;
}

.wiki-side::-webkit-scrollbar-track {
  background: transparent;
}

.wiki-side::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 3px;
}

.wiki-side::-webkit-scrollbar-thumb:hover {
  background: var(--line);
}

.wiki-search {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-fade);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s var(--ease);
}

.wiki-search::placeholder { color: rgba(237, 239, 247, 0.45); }

.wiki-search:focus-visible {
  outline: none;
  border-color: rgba(242, 112, 30, 0.6);
}

.wiki-nav { display: grid; gap: 2px; }

.wiki-nav a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: 10px;
  border-left: 2px solid transparent;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.wiki-nav a:hover {
  color: var(--text);
  background: rgba(201, 214, 255, 0.06);
  border-left-color: rgba(242, 112, 30, 0.6);
}

.wiki-list { display: grid; gap: 16px; }

.wiki-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(201, 214, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 214, 255, 0.028) 1px, transparent 1px),
    linear-gradient(180deg, var(--surface) 0%, var(--surface-fade) 100%);
  background-size: 26px 26px, 26px 26px, auto;
  padding: 30px;
  display: grid;
  gap: 12px;
  justify-items: start;
  scroll-margin-top: 100px;
  transition: border-color 0.3s var(--ease);
}

.wiki-card:hover { border-color: var(--line-strong); }

.wiki-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0;
}

.wiki-card p { color: var(--text-dim); }

.wiki-card a:not(.btn) { color: var(--orange-soft); }

.wiki-card .ip-plate { margin-top: 6px; }

.wiki-empty { color: var(--text-dim); padding: 20px 4px; }

.wiki-card ul, .wiki-card dl { width: 100%; }

.wiki-mods {
  list-style: none;
  display: grid;
  gap: 8px;
}

.wiki-mods li { display: block; }

.wiki-mods a {
  display: grid;
  grid-template-columns: minmax(150px, 210px) 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 15px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--inset);
  text-decoration: none;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease), translate 0.25s var(--ease);
}

.wiki-mods a:hover {
  border-color: rgba(242, 112, 30, 0.45);
  background: rgba(242, 112, 30, 0.07);
  translate: 3px 0;
}

.mod-name {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}

.mod-desc {
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.45;
}

.mod-get {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.wiki-mods a:hover .mod-get {
  color: var(--orange-soft);
  border-color: rgba(242, 112, 30, 0.5);
  background: rgba(242, 112, 30, 0.1);
}

.mod-get svg { transition: translate 0.25s var(--ease); }
.wiki-mods a:hover .mod-get svg { translate: 0 2px; }

@media (max-width: 720px) {
  .wiki-mods a {
    grid-template-columns: 1fr auto;
    gap: 4px 14px;
    align-items: start;
  }
  .mod-name { grid-column: 1; }
  .mod-desc { grid-column: 1; }
  .mod-get { grid-column: 2; grid-row: 1 / 3; align-self: center; }
}

.wiki-keys { display: grid; gap: 6px; }

.wiki-keys > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--inset);
}

.wiki-keys dt {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--silver);
  padding: 5px 9px;
  border-radius: 6px;
  background: rgba(201, 214, 255, 0.08);
  border: 1px solid var(--line-strong);
  white-space: nowrap;
}

.wiki-keys dd { color: var(--text-dim); font-size: 0.94rem; }

.wiki-steps { list-style: none; display: grid; gap: 10px; }

.wiki-steps li {
  position: relative;
  padding-left: 20px;
  color: var(--text-dim);
}

.wiki-steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 7px;
  height: 7px;
  background: var(--orange);
}

.wiki-steps strong { color: var(--text); }

.wiki-note, .wiki-warn {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
}

.wiki-note {
  border: 1px solid rgba(127, 217, 154, 0.3);
  background: rgba(127, 217, 154, 0.07);
  color: var(--text-dim);
}

.wiki-warn {
  border: 1px solid rgba(242, 112, 30, 0.35);
  background: rgba(242, 112, 30, 0.08);
  color: var(--text);
}

.recipes {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 4px;
}

.recipe {
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--inset);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.recipe h3 {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--orange-soft);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.recipe-img {
  width: 100%;
  max-width: 150px;
  aspect-ratio: 27 / 25;
  object-fit: contain;
  margin: 0 auto 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--inset);
  padding: 6px;
  image-rendering: pixelated;
}

.recipe ul { list-style: none; display: grid; gap: 7px; }

.recipe li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.recipe b {
  font-family: var(--font-pixel);
  font-size: 0.58rem;
  color: var(--silver);
  flex: none;
}

.craft {
  width: 100%;
  display: grid;
  gap: 10px;
  justify-items: start;
}

.craft-img {
  max-width: 340px;
  width: 100%;
  min-height: 90px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--inset);
  padding: 10px;
  image-rendering: pixelated;
}

.craft figcaption {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.craft-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.craft-row .craft-img { max-width: none; }

.craft-img.craft-wide { max-width: 100%; image-rendering: auto; }

.wiki-shots {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 6px;
}

.wiki-shots img { width: 100%; }

.calc {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--inset);
}

.calc-side {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-fade);
  transition: border-color 0.25s var(--ease);
}

.calc-side:focus-within { border-color: rgba(242, 112, 30, 0.5); }
.calc-side[data-world="nether"] { border-color: rgba(180, 60, 40, 0.28); }

.calc-label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--silver-2);
}

.calc-side[data-world="nether"] .calc-label { color: var(--orange-soft); }

.calc-side label {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  color: var(--silver);
}

.calc-side input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--inset);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.calc-side input::-webkit-outer-spin-button,
.calc-side input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc-side input:focus { outline: none; border-color: rgba(242, 112, 30, 0.6); }

.calc-arrows {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--silver-2);
}

.calc-op {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--orange-soft);
}

.calc-out {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.calc-copy { font-size: 0.72rem; }

.calc-out-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--silver-2);
  flex: 1 0 100%;
}

@media (max-width: 620px) {
  .calc { grid-template-columns: 1fr; gap: 12px; padding: 16px; }
  .calc-arrows { grid-auto-flow: column; gap: 12px; }
  .calc-arrows svg { rotate: 90deg; }
}

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

.disc-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 18px;
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid rgba(242, 112, 30, 0.28);
  background:
    radial-gradient(520px 260px at 100% 0%, rgba(242, 112, 30, 0.12), transparent 70%),
    linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.disc-visual { display: grid; place-items: center; padding: 6px 0 2px; }

.vinyl {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,0.05) 0 2px, transparent 2px 5px),
    radial-gradient(circle at 50% 50%, #23283f 0 32%, #14182b 33% 100%);
  box-shadow: 0 0 30px rgba(242, 112, 30, 0.22), inset 0 0 0 1px var(--line-strong);
  animation: spin 7s linear infinite;
}

.vinyl i {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--orange-soft), var(--orange));
  box-shadow: 0 0 16px rgba(242, 112, 30, 0.6);
}

@keyframes spin { to { rotate: 360deg; } }

.disc-drop {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 32px 20px;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--line-strong);
  background: var(--inset);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease), scale 0.25s var(--ease);
}

.disc-drop:hover, .disc-drop.over {
  border-color: rgba(242, 112, 30, 0.7);
  background: rgba(242, 112, 30, 0.08);
}

.disc-drop.over { scale: 1.01; }
.disc-drop.filled { border-style: solid; border-color: rgba(127, 217, 154, 0.6); background: rgba(127, 217, 154, 0.07); }

.disc-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 4px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(201, 214, 255, 0.07);
  color: var(--orange-soft);
}

.disc-drop strong { font-size: 1rem; font-weight: 600; }
.disc-drop span { color: var(--text-dim); font-size: 0.9rem; }

.disc-formats {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--silver) !important;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.disc-submit { justify-content: center; }
.disc-submit[disabled] { opacity: 0.45; cursor: not-allowed; }

.disc-steps {
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-fade) 100%);
}

.disc-steps h2 { font-size: 1.3rem; margin-bottom: 22px; }

.disc-list {
  list-style: none;
  counter-reset: dstep;
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
}

.disc-list li {
  counter-increment: dstep;
  display: grid;
  gap: 3px;
  padding-left: 44px;
  position: relative;
}

.disc-list li::before {
  content: counter(dstep);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(242, 112, 30, 0.4);
  background: rgba(242, 112, 30, 0.1);
  color: var(--orange-soft);
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  padding-top: 2px;
}

.disc-list strong { font-size: 0.98rem; font-weight: 600; }
.disc-list span { color: var(--text-dim); font-size: 0.92rem; }

@media (max-width: 900px) {
  .disc-grid { grid-template-columns: 1fr; }
  .disc-card, .disc-steps { padding: 26px 20px; }
}

.wiki-desc {
  width: 100%;
  color: var(--text-dim);
  font-size: 1rem;
  padding-bottom: 4px;
}

.wiki-buttons {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.btn-cta {
  border-color: rgba(242, 112, 30, 0.7);
  background: linear-gradient(180deg, rgba(242, 112, 30, 0.35), rgba(242, 112, 30, 0.18));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 4px 16px rgba(242, 112, 30, 0.25);
}

.btn-cta:hover {
  border-color: var(--orange);
  background: linear-gradient(180deg, rgba(242, 112, 30, 0.45), rgba(242, 112, 30, 0.25));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 6px 24px rgba(242, 112, 30, 0.35);
  transform: translateY(-2px);
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(76px, 96px));
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--inset);
  border: 1px solid var(--line-strong);
}

.grid3 .cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-dim);
  background: linear-gradient(180deg, #1B2140 0%, #151A33 100%);
  border: 2px solid;
  border-color: #3A4370 #0D1122 #0D1122 #3A4370;
}

.grid3 .c-core { color: #EDEFF7; border-color: #6B77B5 #10142A #10142A #6B77B5; }
.grid3 .c-time { color: #7FD99A; }
.grid3 .c-real { color: #FF7A8A; }
.grid3 .c-soul { color: var(--orange-soft); }
.grid3 .c-power { color: #C08CE8; }

.zoomable { cursor: zoom-in; transition: border-color 0.25s var(--ease); }

.zoomable:hover { border-color: rgba(242, 112, 30, 0.5); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 8, 18, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.lightbox[hidden] { display: none; }

.lightbox.open { opacity: 1; }

.lightbox figure {
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: min(1100px, 100%);
  max-height: 100%;
  scale: 0.96;
  transition: scale 0.3s var(--ease);
}

.lightbox.open figure { scale: 1; }

.lightbox img {
  max-width: 100%;
  max-height: calc(100dvh - 140px);
  width: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--inset);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.lightbox img.pixel { image-rendering: pixelated; padding: 12px; }

.lightbox figcaption {
  color: var(--text-dim);
  font-size: 0.92rem;
  text-align: center;
  max-width: 60ch;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.lightbox-close:hover {
  background: rgba(242, 112, 30, 0.2);
  border-color: rgba(242, 112, 30, 0.6);
}

@media (max-width: 640px) {
  .lightbox { padding: 16px; }
  .lightbox-close { top: 12px; right: 12px; width: 44px; height: 44px; }
  .lightbox img { max-height: calc(100dvh - 160px); }
}

.craft-video {
  width: 100%;
  max-width: 720px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--inset);
  display: block;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1px solid rgba(242, 112, 30, 0.5);
  background: linear-gradient(180deg, rgba(242, 112, 30, 0.16), rgba(242, 112, 30, 0.07));
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), translate 0.25s var(--ease);
}

.btn-download:hover {
  border-color: rgba(255, 138, 76, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 30px rgba(242, 112, 30, 0.22);
}

.btn-download:active { translate: 0 1px; }

.btn-download svg { color: var(--orange-soft); flex: none; }

.file-meta {
  font-family: var(--font-pixel);
  font-size: 0.52rem;
  color: var(--text-dim);
  font-weight: 400;
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
}

.wiki-sub {
  width: 100%;
  font-size: 1rem;
  font-weight: 600;
  color: var(--silver);
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .wiki-grid { grid-template-columns: 1fr; gap: 20px; }
  .wiki-side {
    position: sticky;
    top: 76px;
    z-index: 5;
    padding: 12px 0;
    background: var(--veil);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    border-bottom: 1px solid var(--line);
  }
  .wiki-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
    mask-image: linear-gradient(90deg, #000 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
  }
  .wiki-nav::-webkit-scrollbar { display: none; }
  .wiki-nav a {
    flex: none;
    white-space: nowrap;
    border-left: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 15px;
    font-size: 0.88rem;
  }
  .wiki-nav a:hover { border-color: rgba(242, 112, 30, 0.5); background: rgba(242, 112, 30, 0.08); }
  .wiki-card { padding: 24px 20px; scroll-margin-top: 150px; }
  .wiki-card h2 { font-size: 1.15rem; }
  .page-head { padding: 150px 16px 20px; }
}

@media (max-width: 620px) {
  .wiki-card { padding: 20px 16px; border-radius: var(--radius-sm); }
  .recipes { grid-template-columns: 1fr; gap: 12px; }
  .recipe { padding: 16px; }
  .recipe-img { max-width: 130px; }
  .craft-row { grid-template-columns: 1fr; gap: 12px; }
  .craft-img { max-width: 100%; }
  .wiki-keys > div { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 14px; }
  .wiki-keys dt { font-size: 0.55rem; }
  .wiki-mods a { padding: 13px 14px; gap: 10px; }
  .mod-name { font-size: 0.92rem; }
  .mod-desc { font-size: 0.85rem; }
  .mod-get { padding: 6px 11px; font-size: 0.74rem; }
  .wiki-shots { grid-template-columns: 1fr; }
  .wiki-search { font-size: 16px; }
  .btn-download { padding: 12px 18px; font-size: 0.88rem; flex-wrap: wrap; }
  .file-meta { padding-left: 0; border-left: none; }
}

.upload-page { min-height: 100dvh; display: flex; flex-direction: column; overflow-x: hidden; }
.upload-main { position: relative; isolation: isolate; flex: 1; display: grid; place-items: center; padding: 140px 20px 80px; overflow: hidden; }
.upload-card { position: relative; z-index: 1; width: min(680px, 100%); padding: 42px clamp(22px, 5vw, 64px) 48px; text-align: center; border: 1px solid var(--line-strong); border-radius: 28px; background: linear-gradient(145deg, rgba(22,27,51,.86), rgba(11,14,26,.76)); box-shadow: 0 30px 100px rgba(4,6,14,.42), inset 0 1px 0 rgba(255,255,255,.08); backdrop-filter: blur(14px); }
.upload-card::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; background: conic-gradient(from 180deg, transparent 15%, rgba(242,112,30,.38), transparent 35%, rgba(143,168,232,.25), transparent 65%); filter: blur(18px); opacity: .45; animation: upload-border 8s linear infinite; }
.upload-card > .eyebrow { display: block; width: 100%; margin: 0 auto 10px; text-align: center; }
.upload-card h1 { width: 100%; font-family: var(--font-display); font-size: clamp(1.4rem, 3.5vw, 2.2rem); line-height: 1.25; text-align: center; }
.upload-lead { max-width: 48ch; margin: 14px auto 26px; color: var(--text-dim); }
.upload-card-art { position: relative; height: 116px; margin-bottom: 20px; }
.upload-vinyl { position: absolute; left: 50%; top: 50%; width: 104px; height: 104px; translate: -50% -50%; border-radius: 50%; background: repeating-radial-gradient(circle, #101326 0 3px, #25294a 4px 5px, #101326 7px 8px); box-shadow: 0 0 34px rgba(242,112,30,.26); animation: upload-spin 8s linear infinite; }
.upload-vinyl::before { content: ""; position: absolute; inset: 15%; border-radius: 50%; background: radial-gradient(circle, var(--orange) 0 9%, #512035 10% 16%, transparent 17%); }
.upload-vinyl i { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; translate: -50% -50%; border-radius: 50%; background: var(--silver); }
.upload-spark { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 15px var(--orange); animation: upload-spark 3s ease-in-out infinite; }
.spark-a { left: 28%; top: 25%; }.spark-b { right: 27%; top: 18%; animation-delay: -1s; }.spark-c { left: 32%; bottom: 12%; animation-delay: -2s; }
.upload-form { display: grid; gap: 16px; }
.upload-drop { display: grid; place-items: center; gap: 5px; min-height: 150px; padding: 22px; border: 1px dashed rgba(201,214,255,.3); border-radius: var(--radius-sm); color: var(--text-dim); cursor: pointer; transition: border-color .25s var(--ease), background .25s var(--ease), translate .25s var(--ease); }
.upload-drop:hover, .upload-drop:focus-within { border-color: rgba(242,112,30,.72); background: rgba(242,112,30,.07); translate: 0 -2px; }
.upload-drop strong { color: var(--text); font-size: 1.03rem; }.upload-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-submit { justify-content: center; }.upload-message { margin-bottom: 18px; padding: 13px 16px; border-radius: var(--radius-sm); }.upload-message.error { color: #ffb3aa; border: 1px solid rgba(255,110,95,.35); background: rgba(150,40,35,.16); }
.upload-result { display: grid; gap: 12px; text-align: left; }.upload-status { color: #7fd99a; font-family: var(--font-pixel); font-size: .58rem; letter-spacing: .08em; }.upload-result strong { overflow-wrap: anywhere; }.upload-url { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--inset); color: var(--silver); font-size: .86rem; overflow-wrap: anywhere; }.upload-actions { display: flex; flex-wrap: wrap; gap: 10px; }.upload-audio { width: 100%; margin-top: 4px; }
.upload-orbit { position: absolute; border: 1px solid rgba(201,214,255,.12); border-radius: 50%; pointer-events: none; }.upload-orbit-a { width: 720px; height: 360px; rotate: -18deg; animation: upload-orbit 18s linear infinite; }.upload-orbit-b { width: 480px; height: 240px; rotate: 35deg; border-color: rgba(242,112,30,.15); animation: upload-orbit 12s linear infinite reverse; }
@keyframes upload-spin { to { rotate: 360deg; } } @keyframes upload-spark { 0%,100% { scale: .6; opacity: .25; } 50% { scale: 1.8; opacity: 1; } } @keyframes upload-orbit { to { rotate: 342deg; } } @keyframes upload-border { to { rotate: 360deg; } }
@media (max-width: 620px) { .upload-main { padding: 112px 14px 58px; }.upload-card { padding: 30px 18px 34px; border-radius: 20px; }.upload-actions { flex-direction: column; }.upload-actions .btn { justify-content: center; }.upload-orbit-a { width: 120vw; }.upload-orbit-b { width: 90vw; } }

.error-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.error-page .nav { position: relative; top: auto; left: auto; translate: none; margin: 16px auto 0; }
.error-nav-note { color: var(--text-dim); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.error-nav { width: min(var(--container), calc(100% - 40px)); }
@media (min-width: 769px) { .error-page .nav { margin-top: 24px; } }

.error-page .theme-switch { display: inline-flex; }

.error-main { position: relative; isolation: isolate; flex: 1; display: grid; place-items: center; min-height: 620px; padding: 70px 20px 90px; overflow: hidden; }
.error-content { position: relative; z-index: 1; width: min(650px, 100%); text-align: center; }
.error-content .eyebrow { display: none; }
.error-code { margin: 10px 0 8px; color: transparent; font-family: var(--font-display); font-size: clamp(6rem, 21vw, 13rem); font-weight: 700; line-height: .9; letter-spacing: -.08em; -webkit-text-stroke: 1px rgba(201, 214, 255, .35); background: linear-gradient(135deg, var(--silver) 10%, var(--orange) 52%, var(--silver-2) 90%); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 30px rgba(242, 112, 30, .18)); animation: error-code-float 5s ease-in-out infinite; }
.error-content h1 { font-family: var(--font-display); font-size: clamp(1.35rem, 3.2vw, 2.2rem); line-height: 1.25; }
.error-text { max-width: 43ch; margin: 16px auto 28px; color: var(--text-dim); }
.error-button { padding: 14px 24px; }
.error-scene { position: absolute; z-index: -1; width: min(760px, 92vw); aspect-ratio: 1; left: 50%; top: 50%; translate: -50% -50%; opacity: .85; pointer-events: none; animation: error-scene-drift 12s ease-in-out infinite; }
.error-moon { position: absolute; width: 28%; aspect-ratio: 1; left: 36%; top: 28%; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #fff4dd 0 3%, transparent 3.5%), radial-gradient(circle at 64% 60%, rgba(242, 166, 90, .5) 0 5%, transparent 5.5%), radial-gradient(circle at 48% 42%, #f2a65a, #f2701e 68%, #a83a13); box-shadow: 0 0 70px rgba(242, 112, 30, .28), 0 0 160px rgba(242, 112, 30, .1); animation: error-moon-pulse 5s ease-in-out infinite; }
.error-moon::after { content: ""; position: absolute; inset: 10%; border-radius: inherit; background: radial-gradient(circle at 26% 58%, rgba(90, 31, 22, .3) 0 7%, transparent 7.5%), radial-gradient(circle at 72% 34%, rgba(90, 31, 22, .25) 0 9%, transparent 9.5%); }
.error-scan { position: absolute; left: 18%; top: 16%; width: 64%; height: 1px; background: linear-gradient(90deg, transparent, var(--orange), transparent); box-shadow: 0 0 18px var(--orange); opacity: .45; animation: error-scan 5s ease-in-out infinite; }
.error-portal { position: absolute; left: 27%; top: 22%; width: 46%; height: 46%; border: 1px solid rgba(242, 166, 90, .42); border-radius: 50%; transform: rotateX(68deg) rotateZ(-18deg); box-shadow: 0 0 30px rgba(242, 112, 30, .2), inset 0 0 30px rgba(242, 112, 30, .16); animation: error-portal-spin 9s linear infinite; }
.error-shard { position: absolute; width: 18px; height: 42px; border: 1px solid rgba(201, 214, 255, .5); background: linear-gradient(180deg, rgba(201, 214, 255, .22), rgba(242, 112, 30, .04)); clip-path: polygon(50% 0, 100% 30%, 70% 100%, 0 62%); animation: error-shard-float 7s ease-in-out infinite; }
.error-shard-one { left: 12%; top: 47%; rotate: 28deg; }
.error-shard-two { right: 12%; top: 30%; scale: .7; rotate: -24deg; animation-delay: -2s; }
.error-shard-three { right: 22%; bottom: 18%; scale: .5; rotate: 56deg; animation-delay: -4s; }

.error-portal::before, .error-portal::after { content: ""; position: absolute; inset: 10%; border: 1px dashed rgba(201, 214, 255, .38); border-radius: inherit; }
.error-portal::after { inset: 22%; border-style: solid; border-color: rgba(242, 112, 30, .45); }
.error-portal i { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 12px var(--orange); transform-origin: 0 0; animation: error-portal-particle 3s ease-in-out infinite; }
.error-portal i:nth-child(1) { transform: rotate(20deg) translateX(110px); }
.error-portal i:nth-child(2) { transform: rotate(150deg) translateX(80px); animation-delay: -1s; }
.error-portal i:nth-child(3) { transform: rotate(280deg) translateX(92px); animation-delay: -2s; }
.error-cube { position: absolute; right: 18%; bottom: 17%; width: 70px; height: 70px; transform-style: preserve-3d; transform: rotateX(-22deg) rotateY(35deg) rotateZ(8deg); animation: error-cube-float 6s ease-in-out infinite; }
.error-cube i { position: absolute; inset: 0; border: 1px solid rgba(201, 214, 255, .35); background: linear-gradient(135deg, rgba(201, 214, 255, .12), rgba(242, 112, 30, .08)); box-shadow: inset 0 0 18px rgba(201, 214, 255, .08); }
.error-cube i:nth-child(1) { transform: translateZ(35px); }
.error-cube i:nth-child(2) { transform: rotateY(180deg) translateZ(35px); }
.error-cube i:nth-child(3) { transform: rotateY(90deg) translateZ(35px); }
.error-cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(35px); }
.error-cube i:nth-child(5) { transform: rotateX(90deg) translateZ(35px); }
.error-cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(35px); }
.error-orbit { position: absolute; left: 14%; top: 14%; width: 72%; height: 72%; border: 1px solid rgba(201, 214, 255, .18); border-radius: 50%; rotate: -22deg; }
.error-orbit::after { content: ""; position: absolute; width: 9px; height: 9px; top: 9%; left: 10%; border-radius: 50%; background: var(--silver); box-shadow: 0 0 16px var(--silver); }
.error-orbit-one { animation: error-orbit 16s linear infinite; }
.error-orbit-two { inset: 24%; width: 52%; height: 52%; border-color: rgba(242, 166, 90, .2); rotate: 42deg; animation: error-orbit 10s linear infinite reverse; }
.error-orbit-two::after { background: var(--orange); box-shadow: 0 0 16px var(--orange); }
.error-pixel { position: absolute; width: 12px; height: 12px; background: var(--silver); box-shadow: 0 0 16px rgba(201, 214, 255, .65); animation: error-pixel 4s ease-in-out infinite; }
.error-pixel-one { left: 17%; top: 32%; }
.error-pixel-two { right: 14%; top: 66%; width: 8px; height: 8px; animation-delay: -1.4s; background: var(--orange); }
.error-pixel-three { left: 76%; top: 20%; width: 6px; height: 6px; animation-delay: -2.6s; }
.error-stars { position: absolute; inset: 0; pointer-events: none; }
.error-stars i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--silver); opacity: .45; animation: error-twinkle 3s ease-in-out infinite; }
.error-stars i:nth-child(1) { left: 12%; top: 24%; }
.error-stars i:nth-child(2) { left: 24%; top: 72%; animation-delay: -1s; }
.error-stars i:nth-child(3) { left: 80%; top: 24%; animation-delay: -2s; }
.error-stars i:nth-child(4) { left: 88%; top: 74%; animation-delay: -.4s; }
.error-stars i:nth-child(5) { left: 68%; top: 12%; animation-delay: -1.7s; }
.error-stars i:nth-child(6) { left: 7%; top: 58%; animation-delay: -2.4s; }
.error-stars i:nth-child(7) { left: 92%; top: 42%; animation-delay: -.8s; }
.error-footer { padding: 0 20px 26px; text-align: center; color: rgba(237, 239, 247, .4); font-size: .82rem; }
.error-footer span { margin: 0 8px; color: var(--orange); }
@keyframes error-code-float { 0%, 100% { translate: 0; filter: drop-shadow(0 0 30px rgba(242, 112, 30, .18)); } 50% { translate: 0 -10px; filter: drop-shadow(0 0 44px rgba(242, 112, 30, .38)); } }
@keyframes error-moon-pulse { 0%, 100% { scale: .96; } 50% { scale: 1.04; } }
@keyframes error-scan { 0%, 100% { translate: 0 -130px; opacity: 0; } 20%, 75% { opacity: .55; } 50% { translate: 0 180px; opacity: .8; } }
@keyframes error-shard-float { 0%, 100% { translate: 0 0; opacity: .4; } 50% { translate: 12px -24px; opacity: 1; } }
@keyframes error-scene-drift { 0%, 100% { rotate: -2deg; scale: 1; } 50% { rotate: 2deg; scale: 1.035; } }
@keyframes error-orbit { to { rotate: 338deg; } }
@keyframes error-portal-spin { to { rotate: 342deg; } }
@keyframes error-portal-particle { 0%, 100% { opacity: .25; scale: .7; } 50% { opacity: 1; scale: 1.8; } }
@keyframes error-cube-float { 0%, 100% { translate: 0 0; rotate: 0 0 1 8deg; } 50% { translate: 0 -18px; rotate: 1 1 .4 32deg; } }
@keyframes error-pixel { 0%, 100% { translate: 0; opacity: .4; } 50% { translate: 0 -16px; opacity: 1; } }
@keyframes error-twinkle { 0%, 100% { scale: .7; opacity: .25; } 50% { scale: 1.8; opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .cursor-glow { display: none; } .error-code, .error-scene, .error-orbit, .error-portal, .error-portal i, .error-cube, .error-shard, .error-scan, .error-moon, .error-pixel, .error-stars i { animation: none; } }
@media (max-width: 620px) { .error-nav { width: min(var(--container), calc(100% - 28px)); margin-top: 16px; } .error-nav-note { display: none; } .error-main { min-height: 560px; padding: 40px 16px 70px; } .error-scene { width: 125vw; } .error-cube { right: 8%; bottom: 12%; scale: .7; } .error-text { font-size: .95rem; } }
.error-page .mobile-menu { z-index: 40; }
.error-cursor-glow { width: 360px; height: 360px; opacity: .95; }

/* --- Rules page --- */
.rules-hero-inner { z-index: 2; }
.rules-hero-art { position: absolute; z-index: 1; width: min(570px, 48vw); aspect-ratio: 1; right: clamp(4%, calc((100vw - var(--container)) / 2), 12%); top: 50%; translate: 0 -43%; pointer-events: none; filter: drop-shadow(0 0 45px rgba(242,112,30,.16)); }
.rules-portal { position: absolute; inset: 16%; border: 1px solid rgba(242,166,90,.42); border-radius: 50%; transform: rotateX(64deg) rotateZ(-22deg); box-shadow: 0 0 35px rgba(242,112,30,.2), inset 0 0 40px rgba(242,112,30,.14); animation: rules-portal-spin 13s linear infinite; }
.rules-portal::before, .rules-portal::after { content: ""; position: absolute; inset: 9%; border: 1px dashed rgba(201,214,255,.4); border-radius: inherit; }
.rules-portal::after { inset: 20%; border-style: solid; border-color: rgba(242,112,30,.55); box-shadow: inset 0 0 20px rgba(242,112,30,.32); }
.rules-portal i { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 15px var(--orange); transform-origin: 0 0; animation: rules-particle 3s ease-in-out infinite; }
.rules-portal i:nth-child(1) { transform: rotate(20deg) translateX(150px); }.rules-portal i:nth-child(2) { transform: rotate(130deg) translateX(120px); animation-delay: -1s; }.rules-portal i:nth-child(3) { transform: rotate(240deg) translateX(138px); animation-delay: -2s; }.rules-portal i:nth-child(4) { transform: rotate(310deg) translateX(96px); animation-delay: -1.5s; }
.rules-moon { position: absolute; left: 34%; top: 27%; width: 31%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 31% 27%, #fff4dd 0 3%, transparent 3.5%), radial-gradient(circle at 68% 60%, rgba(90,31,22,.24) 0 8%, transparent 8.5%), radial-gradient(circle at 42% 76%, rgba(90,31,22,.18) 0 6%, transparent 6.5%), linear-gradient(135deg, #ffd69a, var(--orange) 72%, #9d3417); box-shadow: 0 0 50px rgba(242,112,30,.35), 0 0 125px rgba(242,112,30,.16); animation: rules-moon-float 5s ease-in-out infinite; }
.rules-moon::after { content: ""; position: absolute; inset: 8%; border-radius: inherit; border: 1px solid rgba(255,244,221,.25); }
.rules-quick-stats { display: flex; gap: 0; margin-top: 42px; width: fit-content; border: 1px solid var(--line-strong); border-radius: 15px; background: rgba(11,14,26,.38); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); overflow: hidden; }
.rules-quick-stats div { min-width: 105px; padding: 13px 18px; border-right: 1px solid var(--line); }.rules-quick-stats div:last-child { border-right: 0; }.rules-quick-stats strong { display: block; color: var(--silver); font-family: var(--font-display); font-size: 1.15rem; }.rules-quick-stats span { display: block; margin-top: 3px; color: var(--text-dim); font-size: .7rem; }
.rules-art-pixel { position: absolute; width: 8px; height: 8px; background: var(--silver); box-shadow: 0 0 16px var(--silver); animation: rules-pixel 4s ease-in-out infinite; }.pixel-a { left: 10%; top: 44%; }.pixel-b { right: 6%; top: 22%; width: 5px; height: 5px; background: var(--orange); box-shadow: 0 0 14px var(--orange); animation-delay: -1.2s; }.pixel-c { left: 75%; bottom: 9%; width: 6px; height: 6px; animation-delay: -2.4s; }
.rules-search-wrap { margin-bottom: 23px; }.rules-search-wrap label { display: block; margin-bottom: 8px; color: var(--text-dim); font-family: var(--font-pixel); font-size: .5rem; letter-spacing: .06em; text-transform: uppercase; }.rules-search-box { position: relative; }.rules-search-box input { width: 100%; padding: 11px 34px 11px 13px; border: 1px solid var(--line-strong); border-radius: 10px; outline: 0; background: rgba(11,14,26,.45); color: var(--text); font: inherit; font-size: .8rem; transition: border-color .25s var(--ease), box-shadow .25s var(--ease); }.rules-search-box input::placeholder { color: var(--text-dim); }.rules-search-box input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(242,112,30,.12), 0 0 25px rgba(242,112,30,.12); }.rules-search-box button { position: absolute; right: 7px; top: 50%; translate: 0 -50%; border: 0; background: transparent; color: var(--text-dim); cursor: pointer; font-size: 1.25rem; line-height: 1; }.rules-search-status { min-height: 16px; margin-top: 7px; color: var(--orange-soft); font-size: .7rem; }.rules-toc a.active { border-color: var(--orange); color: var(--text); background: rgba(242,112,30,.08); }.rules-match { padding: 1px 3px; border-radius: 4px; background: rgba(242,166,90,.3); color: var(--text); }.rules-card.search-hidden { display: none; }
.rules-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(201,214,255,.1), transparent 70%); transition: opacity .3s ease; }.rules-card:hover::after { opacity: 1; }.rules-progress { position: fixed; z-index: calc(var(--z-nav) + 2); right: 22px; bottom: 22px; display: flex; align-items: center; gap: 9px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(11,14,26,.78); box-shadow: 0 8px 30px rgba(4,6,14,.28); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--silver); font-family: var(--font-pixel); font-size: .48rem; }.rules-progress span { display: block; width: 52px; height: 3px; transform-origin: 0 50%; scale: 0 1; border-radius: 999px; background: linear-gradient(90deg, var(--orange), var(--silver)); box-shadow: 0 0 9px rgba(242,112,30,.5); }.rules-progress b { min-width: 25px; font-weight: 400; }
.rules-cursor-glow { position: fixed; z-index: 0; left: 0; top: 0; width: 360px; height: 360px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(242,112,30,.12), rgba(143,168,232,.05) 35%, transparent 70%); filter: blur(10px); mix-blend-mode: screen; }
@keyframes rules-portal-spin { to { rotate: 338deg; } } @keyframes rules-particle { 0%,100% { opacity:.2; scale:.65; } 50% { opacity:1; scale:1.7; } } @keyframes rules-moon-float { 0%,100% { translate:0 0; scale:.97; } 50% { translate:0 -13px; scale:1.03; } } @keyframes rules-pixel { 0%,100% { translate:0; opacity:.35; } 50% { translate:0 -18px; opacity:1; } }
@media (max-width: 1100px) { .rules-hero-art { right: -7%; opacity: .56; }.rules-hero::before { background: linear-gradient(90deg, var(--bg) 18%, rgba(11,14,26,.72) 72%, var(--bg) 100%), linear-gradient(180deg, transparent 55%, var(--bg) 100%); } }
@media (max-width: 900px) { .rules-search-wrap { display: none; } }
@media (max-width: 620px) { .rules-hero-art { width: 430px; right: -44%; top: 45%; opacity: .34; }.rules-quick-stats { width: 100%; }.rules-quick-stats div { flex: 1; min-width: 0; padding: 12px 10px; }.rules-quick-stats strong { font-size: 1rem; }.rules-quick-stats span { font-size: .6rem; }.rules-progress { right: 12px; bottom: 12px; }.rules-cursor-glow { display: none; } }
@media (prefers-reduced-motion: reduce) { .rules-portal, .rules-portal i, .rules-moon, .rules-art-pixel { animation: none; }.rules-card:hover { transform: none !important; }.rules-card::after, .rules-cursor-glow { display: none; } }

/* Mobile rules layout: keep the reading flow calm and touch-friendly. */
@media (max-width: 768px) {
  .rules-page { min-width: 0; }
  .rules-page .nav { width: calc(100vw - 28px); }
  .rules-hero { min-height: auto; display: block; padding: 112px 16px 48px; }
  .rules-hero-inner { width: 100%; }
  .rules-hero h1 { max-width: 9ch; margin: 12px 0 18px; font-size: clamp(2.15rem, 12vw, 3.6rem); line-height: 1.08; }
  .rules-lead { max-width: 42ch; font-size: .96rem; line-height: 1.55; }
  .rules-hero-actions { align-items: stretch; gap: 14px; margin-top: 25px; }
  .rules-hero-actions .btn { justify-content: center; width: 100%; }
  .rules-status { justify-content: center; font-size: .46rem; }
  .rules-hero-art { width: 390px; height: 390px; right: -185px; top: 280px; translate: none; opacity: .12; }
  .rules-hero::before { background: linear-gradient(180deg, transparent 20%, var(--bg) 78%), radial-gradient(ellipse at 50% 20%, rgba(143,168,232,.1), transparent 52%); }
  .rules-hero-grid { height: 45%; bottom: -14%; opacity: .18; background-size: 34px 34px; }
  .rules-quick-stats { position: relative; z-index: 2; width: 100%; margin-top: 30px; }
  .rules-quick-stats div { flex: 1; min-width: 0; padding: 11px 7px; text-align: center; }
  .rules-quick-stats strong { font-size: .95rem; }
  .rules-quick-stats span { font-size: .57rem; white-space: nowrap; }
  .rules-layout { display: block; width: 100%; padding: 28px 16px 60px; }
  .rules-toc { position: sticky; top: 60px; width: calc(100% + 32px); margin: 0 -16px 18px; padding: 10px 16px; }
  .rules-toc nav { gap: 7px; padding: 1px 0 3px; }
  .rules-toc a { min-height: 36px; padding: 8px 12px; font-size: .77rem; }
  .rules-toc a b { font-size: .45rem; }
  .rules-search-wrap { display: block; margin: 0 0 10px; }
  .rules-search-wrap label { font-size: .46rem; }
  .rules-search-box input { min-height: 42px; font-size: 16px; }
  .rules-search-status { margin: 5px 0 0; font-size: .68rem; }
  .rules-card { width: 100%; padding: 22px 16px; border-radius: 16px; scroll-margin-top: 150px; }
  .rules-card-head { flex-wrap: wrap; gap: 8px 10px; margin-bottom: 14px; }
  .rules-kicker { flex: 1 1 100%; order: 3; margin-top: 2px; }
  .rules-card h2 { margin-bottom: 14px; font-size: 1.25rem; line-height: 1.25; }
  .rules-card-lead { margin-bottom: 17px; font-size: .91rem; line-height: 1.52; }
  .rule-grid, .rule-list, .territory-grid, .software-list { gap: 8px; }
  .rule { padding: 14px; border-radius: 12px; }
  .rule h3 { font-size: .93rem; line-height: 1.35; }
  .rule p, .territory-item p, .territory-item li, .software-item p { font-size: .88rem; line-height: 1.52; }
  .rule strong { display: block; margin-top: 8px; font-size: .75rem; line-height: 1.45; }
  .territory-item, .software-item { align-items: flex-start; gap: 10px; padding: 14px 12px; border-radius: 12px; }
  .territory-item > span, .software-item > span { font-size: 1.25rem; }
  .territory-item h3, .software-item h3 { font-size: .91rem; line-height: 1.35; }
  .territory-item ol { margin-left: 17px; font-size: .87rem; }
  .warn-callout { gap: 12px; padding: 14px; }
  .warn-callout > span { width: 42px; height: 42px; border-radius: 11px; font-size: 1rem; }
  .warn-callout p { font-size: .88rem; line-height: 1.45; }
  .rules-finale { padding: 28px 0 12px; font-size: .84rem; }
  .rules-finale small { font-size: .45rem; }
  .rules-progress { right: 10px; bottom: 10px; padding: 7px 9px; }
}
@media (max-width: 768px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  .rules-page, .rules-page main, .rules-page .footer { width: 100%; max-width: 100%; overflow-x: clip; }
  .rules-page .rules-hero, .rules-page .rules-layout { width: 100%; max-width: 100%; }
  .rules-page .rules-layout { box-sizing: border-box; }
  .rules-page .rules-list, .rules-page .rules-card, .rules-page .rule, .rules-page .territory-item, .rules-page .software-item { min-width: 0; max-width: 100%; }
  .rules-page .rules-card *, .rules-page .rule *, .rules-page .territory-item *, .rules-page .software-item * { max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
  .rules-page .rules-card h2, .rules-page .rules-card h3, .rules-page .rule h3 span { overflow-wrap: anywhere; }
  .rules-page .rules-toc { max-width: 100vw; overflow: hidden; }
  .rules-page .rules-toc nav { max-width: 100%; }
}
@media (max-width: 390px) {
  .rules-hero { padding-top: 103px; }
  .rules-hero h1 { font-size: 2.05rem; }
  .rules-lead { font-size: .91rem; }
  .rules-quick-stats span { font-size: .5rem; }
  .rules-card { padding-left: 13px; padding-right: 13px; }
  .rules-card h2 { font-size: 1.15rem; }
  .rules-number { font-size: .5rem; }
  .rules-icon { font-size: 1.15rem; }
  .rules-kicker { font-size: .44rem; }
  .rules-progress span { width: 40px; }
}

/* --- Rules page --- */
.wiki-rules-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; padding: 6px 12px; border: 1px solid rgba(242,112,30,.34); border-radius: 999px; background: rgba(242,112,30,.08); color: var(--orange-soft) !important; font-weight: 600; text-decoration: none; transition: translate .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease); }
.wiki-rules-link span { transition: translate .25s var(--ease); }
.wiki-rules-link:hover { translate: 0 -2px; border-color: rgba(242,112,30,.72); background: rgba(242,112,30,.14); }
.wiki-rules-link:hover span { translate: 3px -3px; }

.rules-page { background: radial-gradient(1000px 600px at 72% 0%, rgba(242,112,30,.09), transparent 62%), var(--bg); }
.rules-hero { position: relative; isolation: isolate; min-height: 620px; display: grid; align-items: center; padding: 170px 20px 100px; overflow: hidden; }
.rules-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(ellipse at 50% 35%, rgba(143,168,232,.12), transparent 48%), linear-gradient(180deg, transparent 55%, var(--bg) 100%); }
.rules-hero::after { content: ""; position: absolute; inset: 0; z-index: -3; opacity: .5; background-image: radial-gradient(1px 1px at 18% 30%, var(--silver), transparent 100%), radial-gradient(1px 1px at 76% 22%, var(--silver), transparent 100%), radial-gradient(2px 2px at 87% 68%, var(--orange), transparent 100%), radial-gradient(1px 1px at 35% 74%, var(--silver), transparent 100%); background-size: 280px 280px, 360px 360px, 460px 460px, 520px 520px; animation: rules-stars 24s linear infinite; }
.rules-hero-grid { position: absolute; z-index: -1; width: 110%; height: 55%; left: -5%; bottom: -18%; opacity: .35; transform: perspective(500px) rotateX(58deg); transform-origin: bottom; background-image: linear-gradient(rgba(143,168,232,.17) 1px, transparent 1px), linear-gradient(90deg, rgba(143,168,232,.17) 1px, transparent 1px); background-size: 52px 52px; mask-image: linear-gradient(180deg, transparent, #000 45%); animation: rules-grid 12s linear infinite; }
.rules-hero-inner { position: relative; width: min(var(--container), 100%); margin: 0 auto; }
.rules-hero h1 { max-width: 750px; margin: 16px 0 22px; font-size: clamp(2.6rem, 7vw, 5.8rem); letter-spacing: -.045em; line-height: 1.04; }
.rules-hero h1 span { color: transparent; background: linear-gradient(110deg, var(--silver), var(--orange-soft) 70%); background-clip: text; -webkit-background-clip: text; }
.rules-lead { max-width: 580px; color: var(--text-dim); font-size: clamp(1rem, 2vw, 1.2rem); }
.rules-hero-actions { display: flex; align-items: center; gap: 20px; margin-top: 34px; }
.rules-status { display: inline-flex; align-items: center; gap: 8px; color: var(--text-dim); font-family: var(--font-pixel); font-size: .52rem; letter-spacing: .06em; text-transform: uppercase; }
.rules-status i { width: 7px; height: 7px; border-radius: 50%; background: #7fd99a; box-shadow: 0 0 14px #7fd99a; animation: rules-pulse 2s ease-in-out infinite; }
.rules-orbit { position: absolute; border: 1px solid rgba(201,214,255,.13); border-radius: 50%; pointer-events: none; }
.rules-orbit-one { width: min(720px, 75vw); height: min(360px, 38vw); right: -8%; top: 22%; rotate: -18deg; animation: rules-orbit 18s linear infinite; }
.rules-orbit-two { width: min(510px, 55vw); height: min(250px, 28vw); right: 2%; top: 37%; border-color: rgba(242,112,30,.2); rotate: 24deg; animation: rules-orbit 13s linear infinite reverse; }
.rules-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 42px; align-items: start; padding-top: 30px; }
.rules-toc { position: sticky; top: 92px; padding: 18px 0; }
.rules-toc-label { margin-bottom: 14px; color: var(--orange-soft); font-family: var(--font-pixel); font-size: .54rem; letter-spacing: .08em; text-transform: uppercase; }
.rules-toc nav { display: grid; gap: 3px; border-left: 1px solid var(--line-strong); }
.rules-toc a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-left: 2px solid transparent; color: var(--text-dim); font-size: .88rem; text-decoration: none; transition: color .2s var(--ease), border-color .2s var(--ease), translate .2s var(--ease); }
.rules-toc a b { color: var(--silver-2); font-family: var(--font-pixel); font-size: .48rem; font-weight: 400; }
.rules-toc a:hover { translate: 4px 0; border-color: var(--orange); color: var(--text); }
.rules-toc-note { margin-top: 26px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text-dim); font-size: .78rem; line-height: 1.5; }
.rules-list { display: grid; gap: 18px; min-width: 0; }
.rules-card { position: relative; overflow: hidden; padding: clamp(25px, 4vw, 48px); border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(145deg, rgba(22,27,51,.84), rgba(11,14,26,.72)); box-shadow: 0 20px 70px rgba(4,6,14,.18), inset 0 1px 0 rgba(255,255,255,.035); scroll-margin-top: 100px; transition: border-color .35s var(--ease), translate .35s var(--ease), box-shadow .35s var(--ease); }
.rules-card::before { content: ""; position: absolute; width: 240px; aspect-ratio: 1; top: -100px; right: -80px; border-radius: 50%; background: radial-gradient(circle, rgba(143,168,232,.12), transparent 68%); pointer-events: none; }
.rules-card:hover { translate: 0 -3px; border-color: var(--line-strong); box-shadow: 0 28px 80px rgba(4,6,14,.27), inset 0 1px 0 rgba(255,255,255,.06); }
.rules-card-intro { border-color: rgba(201,214,255,.19); }
.rules-card-warn { border-color: rgba(254,231,92,.24); }
.rules-card-software { border-color: rgba(237,66,69,.22); }
.rules-card-head { position: relative; display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.rules-number { color: var(--orange); font-family: var(--font-pixel); font-size: .58rem; letter-spacing: .08em; }
.rules-icon { font-size: 1.35rem; filter: drop-shadow(0 0 10px rgba(242,112,30,.22)); }
.rules-kicker { color: var(--text-dim); font-family: var(--font-pixel); font-size: .5rem; letter-spacing: .08em; text-transform: uppercase; }
.rules-card h2 { position: relative; margin-bottom: 20px; font-size: clamp(1.35rem, 3vw, 2rem); }
.rules-card-lead { position: relative; max-width: 70ch; margin-bottom: 24px; color: var(--text-dim); }
.rule-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.rule-list { display: grid; gap: 9px; }
.rule { position: relative; padding: 17px 18px; border: 1px solid var(--line); border-radius: 13px; background: rgba(11,14,26,.3); transition: background .25s var(--ease), border-color .25s var(--ease), translate .25s var(--ease); }
.rule:hover { translate: 3px 0; border-color: rgba(201,214,255,.22); background: rgba(143,168,232,.06); }
.rule h3 { margin-bottom: 7px; color: var(--silver); font-family: var(--font-body); font-size: .98rem; font-weight: 700; }
.rule h3 span { color: var(--text); font-weight: 600; }
.rule p { color: var(--text-dim); font-size: .93rem; line-height: 1.55; }
.rule p b { color: var(--text); }
.rule strong { display: inline-block; margin-top: 9px; color: var(--orange-soft); font-size: .78rem; font-weight: 600; }
.warn-callout { display: flex; align-items: center; gap: 18px; width: min(580px, 100%); padding: 20px 24px; border: 1px solid rgba(254,231,92,.36); border-radius: 16px; background: linear-gradient(105deg, rgba(254,231,92,.12), rgba(242,112,30,.06)); }
.warn-callout > span { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 15px; color: var(--bg); background: var(--amber); box-shadow: 0 0 24px rgba(254,231,92,.22); font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.warn-callout p { color: var(--text); }
.territory-grid { display: grid; gap: 12px; }
.territory-item { display: flex; gap: 17px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: rgba(11,14,26,.3); }
.territory-item > span, .software-item > span { flex: none; font-size: 1.5rem; }
.territory-item h3, .software-item h3 { margin-bottom: 8px; color: var(--silver); font-size: 1rem; }
.territory-item p, .territory-item li, .software-item p { color: var(--text-dim); font-size: .92rem; }
.territory-item ol { display: grid; gap: 5px; margin: 10px 0 10px 20px; color: var(--text-dim); }
.territory-item small, .software-item small { color: var(--text-dim); font-size: .78rem; }
.software-list { display: grid; gap: 10px; }
.software-item { display: flex; gap: 18px; padding: 20px; border: 1px solid rgba(237,66,69,.14); border-radius: 15px; background: rgba(237,66,69,.035); }
.software-item h3 { color: #ff9a97; }
.rules-finale { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 42px 20px 80px; color: var(--text-dim); text-align: center; }
.rules-finale > span { color: var(--orange); font-size: 1.25rem; animation: rules-pulse 2.5s ease-in-out infinite; }
.rules-finale small { color: var(--silver-2); font-family: var(--font-pixel); font-size: .5rem; letter-spacing: .06em; }
@keyframes rules-stars { to { background-position: 280px 120px, -360px 180px, 460px -130px, -520px 260px; } }
@keyframes rules-grid { to { background-position: 0 52px, 52px 0; } }
@keyframes rules-orbit { to { rotate: 342deg; } }
@keyframes rules-pulse { 0%, 100% { opacity: .45; scale: .8; } 50% { opacity: 1; scale: 1.2; } }
@media (max-width: 900px) {
  .rules-hero { min-height: 560px; padding-top: 145px; }
  .rules-layout { grid-template-columns: 1fr; gap: 18px; padding-top: 18px; }
  .rules-toc { position: sticky; top: 72px; z-index: 5; margin: 0 -16px; padding: 12px 16px; background: var(--veil); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .rules-toc-label, .rules-toc-note { display: none; }
  .rules-toc nav { display: flex; gap: 6px; overflow-x: auto; border: 0; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .rules-toc nav::-webkit-scrollbar { display: none; }
  .rules-toc a { flex: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; font-size: .8rem; }
  .rules-toc a:hover { translate: 0 -2px; }
}
@media (max-width: 620px) {
  .rules-hero { min-height: 540px; padding: 125px 16px 74px; }
  .rules-hero h1 { font-size: clamp(2.35rem, 13vw, 4rem); }
  .rules-hero-actions { align-items: flex-start; flex-direction: column; gap: 16px; }
  .rules-status { font-size: .46rem; }
  .rules-orbit-one { right: -40%; top: 30%; width: 500px; height: 260px; }
  .rules-orbit-two { right: -25%; top: 46%; width: 390px; height: 190px; }
  .rules-card { padding: 23px 16px; border-radius: 17px; }
  .rule-grid { grid-template-columns: 1fr; }
  .rule { padding: 15px; }
  .rule p { font-size: .9rem; }
  .territory-item, .software-item { gap: 12px; padding: 16px 14px; }
  .warn-callout { padding: 16px; }
  .warn-callout > span { width: 46px; height: 46px; font-size: 1.2rem; }
  .rules-finale { gap: 10px; padding-bottom: 50px; font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .rules-hero::after, .rules-hero-grid, .rules-orbit, .rules-status i, .rules-finale > span { animation: none; }
  .rules-card:hover, .rule:hover, .wiki-rules-link:hover { translate: none; }
  .hero-fireflies, .hero-comets { display: none; }
  .window { animation: none; }
}

@media (max-width: 768px) {
  .firefly:nth-child(n+4) { display: none; }
}

.error-page .mobile-menu { z-index: 40; }
.error-cursor-glow { width: 360px; height: 360px; opacity: .95; }

/* Secret Konami easter egg */
.secret-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--secret-x, 50%) var(--secret-y, 50%), rgba(255,214,154,.2), transparent 28%); opacity: .7; mix-blend-mode: screen; }
.secret-chaos .secret-card { animation: secret-chaos-card .55s steps(2, end) infinite; }
.secret-chaos .secret-card h2 span { text-shadow: 3px 0 rgba(242,112,30,.8), -3px 0 rgba(143,168,232,.8); }
.secret-chaos .secret-code { animation: secret-code-glitch .8s steps(2, end) infinite; }
.secret-chaos .secret-card::before { background: conic-gradient(from 0deg, transparent, rgba(255,60,60,.34), transparent 20%, rgba(80,180,255,.3), transparent 42%, rgba(255,220,70,.25), transparent 65%); animation-duration: 1.2s; }
.secret-chaos .secret-global-particles i { background: #ff5964; box-shadow: 0 0 18px #ff5964; animation-duration: .9s; }
.secret-chaos .secret-badge { color: #ff6973; border-color: rgba(255,89,100,.7); }
.secret-chaos .secret-ok { translate: var(--escape-x, 0) var(--escape-y, 0); transition: translate .16s steps(2, end); }
.secret-card-bonk { animation: secret-card-bonk .28s ease !important; }
.secret-chaos .secret-overlay { background: repeating-linear-gradient(0deg, rgba(255,60,60,.04) 0 1px, transparent 1px 5px), rgba(5,7,16,.82); }
@keyframes secret-chaos-card { 0%,100% { rotate: 0deg; } 25% { rotate: -.7deg; } 75% { rotate: .7deg; } } @keyframes secret-code-glitch { 0%,100% { translate: 0; } 35% { translate: 3px -1px; } 70% { translate: -3px 1px; } } @keyframes secret-card-bonk { 0% { scale: 1; } 45% { scale: .96 .92; rotate: -2deg; } 100% { scale: 1; rotate: 0; } }
.secret-chaos .secret-card h2::after { content: " // НЕ ТРОГАЙ"; display: block; margin-top: 7px; color: #ff6973; font-family: var(--font-pixel); font-size: .42em; letter-spacing: .06em; animation: secret-warning-blink .6s steps(2,end) infinite; }
@keyframes secret-warning-blink { 50% { opacity: .2; } }
.secret-chaos .secret-moon { filter: grayscale(.25) drop-shadow(0 0 35px #ff5964); }
.secret-chaos .secret-close { animation: secret-close-dodge 1.6s ease-in-out infinite; }
@keyframes secret-close-dodge { 0%,100% { rotate: 0; } 50% { rotate: 12deg; } }

.secret-badge { position: fixed; right: 18px; bottom: 18px; z-index: 98; padding: 8px 11px; border: 1px solid rgba(242,166,90,.4); border-radius: 999px; color: var(--amber); background: rgba(11,14,26,.72); box-shadow: 0 0 24px rgba(242,112,30,.18); font-family: var(--font-pixel); font-size: .48rem; letter-spacing: .08em; opacity: 0; translate: 0 12px; animation: secret-badge-in .6s var(--ease) .35s forwards, secret-badge-pulse 2.4s ease-in-out 1s infinite; }
.secret-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; opacity: 0; visibility: hidden; background: rgba(5,7,16,.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: opacity .4s var(--ease), visibility .4s var(--ease); }
.secret-overlay.is-visible { opacity: 1; visibility: visible; }
.secret-card { position: relative; isolation: isolate; width: min(540px, 100%); padding: 44px clamp(22px, 6vw, 58px) 40px; overflow: hidden; border: 1px solid rgba(242,166,90,.4); border-radius: 26px; background: linear-gradient(145deg, rgba(22,27,51,.97), rgba(11,14,26,.96)); box-shadow: 0 30px 100px rgba(0,0,0,.5), 0 0 60px rgba(242,112,30,.14), inset 0 1px 0 rgba(255,255,255,.1); text-align: center; transform: translateY(18px) scale(.96); transition: transform .55s var(--ease); }
.secret-overlay.is-visible .secret-card { transform: translateY(0) scale(1); }
.secret-card::before { content: ""; position: absolute; inset: -35%; z-index: -1; background: conic-gradient(from 0deg, transparent, rgba(242,112,30,.18), transparent 25%, rgba(143,168,232,.13), transparent 55%); animation: secret-spin 12s linear infinite; }
.secret-close { position: absolute; top: 12px; right: 15px; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--text-dim); cursor: pointer; font-size: 1.4rem; line-height: 1; transition: color .2s ease, border-color .2s ease, background .2s ease; }
.secret-close:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255,255,255,.08); }
.secret-moon { width: 76px; height: 76px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff2d7 0 4%, transparent 5%), linear-gradient(135deg, #ffd69a, var(--orange)); box-shadow: 0 0 35px rgba(242,112,30,.4); font-size: 2.15rem; animation: secret-float 3.5s ease-in-out infinite; }
.secret-card h2 { margin: 11px 0 15px; font-size: clamp(1.45rem, 5vw, 2.1rem); }.secret-card h2 span { color: transparent; background: linear-gradient(110deg, var(--silver), var(--orange-soft)); background-clip: text; -webkit-background-clip: text; }.secret-card > p:not(.eyebrow) { color: var(--text-dim); font-size: .98rem; }.secret-card > p b { color: var(--orange-soft); }.secret-code { display: inline-block; margin: 21px 0 24px; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--silver); background: rgba(11,14,26,.58); font-family: var(--font-pixel); font-size: .52rem; letter-spacing: .06em; }.secret-ok { justify-content: center; }.secret-stars { position: absolute; inset: 0; pointer-events: none; }.secret-stars i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--silver); box-shadow: 0 0 12px var(--silver); animation: secret-twinkle 2.5s ease-in-out infinite; }.secret-stars i:nth-child(1) { left: 12%; top: 18%; }.secret-stars i:nth-child(2) { left: 82%; top: 25%; animation-delay: -.5s; }.secret-stars i:nth-child(3) { left: 18%; top: 78%; animation-delay: -1s; }.secret-stars i:nth-child(4) { left: 88%; top: 72%; animation-delay: -1.6s; }.secret-stars i:nth-child(5) { left: 50%; top: 10%; animation-delay: -2s; }
@keyframes secret-spin { to { rotate: 360deg; } } @keyframes secret-float { 0%,100% { translate: 0 0; } 50% { translate: 0 -8px; } } @keyframes secret-twinkle { 0%,100% { opacity: .2; scale: .7; } 50% { opacity: 1; scale: 1.6; } }
@media (max-width: 520px) { .secret-overlay { padding: 14px; }.secret-card { padding: 34px 18px 28px; border-radius: 20px; }.secret-card > p:not(.eyebrow) { font-size: .9rem; }.secret-code { font-size: .42rem; letter-spacing: .02em; }.secret-ok { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .secret-card::before, .secret-moon, .secret-stars i { animation: none; }.secret-card { transition: none; } }

/* Whole-page effect while the hidden lunar mode is active */
.secret-alert { position: fixed; left: 50%; top: 92px; z-index: 98; padding: 10px 16px; border: 1px solid rgba(242,166,90,.45); border-radius: 999px; color: var(--text); background: rgba(11,14,26,.82); box-shadow: 0 0 30px rgba(242,112,30,.22); font-family: var(--font-display); font-size: .72rem; opacity: 0; translate: -50% -16px; animation: secret-alert-in 1s var(--ease) .5s forwards, secret-alert-float 3s ease-in-out 1.5s infinite; pointer-events: none; }
.secret-badge { position: fixed; right: 18px; bottom: 18px; z-index: 98; padding: 8px 11px; border: 1px solid rgba(242,166,90,.4); border-radius: 999px; color: var(--amber); background: rgba(11,14,26,.72); box-shadow: 0 0 24px rgba(242,112,30,.18); font-family: var(--font-pixel); font-size: .48rem; letter-spacing: .08em; opacity: 0; translate: 0 12px; animation: secret-badge-in .6s var(--ease) .35s forwards, secret-badge-pulse 2.4s ease-in-out 1s infinite; }
.secret-mode .hero-moon, .secret-mode .rules-moon, .secret-mode .error-moon { animation: secret-big-moon 2.8s ease-in-out infinite; }
.secret-mode .hero-ridge-near rect, .secret-mode .cta-ridge rect { animation: secret-window-flicker 1.6s ease-in-out infinite alternate; }
.secret-mode .wiki-card, .secret-mode .team-card, .secret-mode .bento-card, .secret-mode .rules-card { transition: border-color .35s ease, box-shadow .35s ease, translate .35s ease; }
.secret-mode .wiki-card:hover, .secret-mode .team-card:hover, .secret-mode .bento-card:hover, .secret-mode .rules-card:hover { border-color: rgba(242,166,90,.52); box-shadow: 0 18px 50px rgba(242,112,30,.14), 0 0 20px rgba(143,168,232,.08); }
@keyframes secret-alert-in { to { opacity: .95; translate: -50% 0; } } @keyframes secret-alert-float { 0%,100% { margin-top: 0; } 50% { margin-top: 6px; } } @keyframes secret-badge-in { to { opacity: .9; translate: 0 0; } } @keyframes secret-badge-pulse { 0%,100% { box-shadow: 0 0 18px rgba(242,112,30,.14); } 50% { box-shadow: 0 0 30px rgba(242,112,30,.34); } } @keyframes secret-big-moon { 0%,100% { filter: drop-shadow(0 0 50px rgba(242,112,30,.4)); scale: 1; } 50% { filter: drop-shadow(0 0 90px rgba(242,112,30,.8)); scale: 1.06; } } @keyframes secret-window-flicker { 0%,100% { opacity: .65; } 50% { opacity: 1; filter: drop-shadow(0 0 9px var(--amber)); } }
@media (max-width: 620px) { .secret-alert { top: 76px; max-width: calc(100% - 24px); text-align: center; font-size: .58rem; }.secret-badge { right: 10px; bottom: 10px; font-size: .38rem; }.secret-mode .wiki-card:hover, .secret-mode .team-card:hover, .secret-mode .bento-card:hover, .secret-mode .rules-card:hover { box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .secret-badge, .secret-mode .hero-moon, .secret-mode .rules-moon, .secret-mode .error-moon, .secret-mode .hero-ridge-near rect, .secret-mode .cta-ridge rect { animation: none; opacity: .9; translate: none; } }

/* Whole-page effect while the hidden lunar mode is active */
.secret-global-particles { position: fixed; inset: 0; z-index: 99; overflow: hidden; pointer-events: none; }
.secret-global-particles::before, .secret-global-particles::after { content: ""; position: absolute; inset: -18%; background: radial-gradient(circle at 20% 30%, rgba(242,112,30,.14), transparent 25%), radial-gradient(circle at 82% 68%, rgba(143,168,232,.13), transparent 27%); opacity: 0; animation: secret-global-aura 1.2s ease forwards, secret-global-drift 12s ease-in-out 1.2s infinite alternate; }
.secret-global-particles::after { background: linear-gradient(105deg, transparent 15%, rgba(255,214,154,.08) 48%, transparent 53%); transform: translateX(-120%); animation: secret-sweep 3.2s ease-in-out .15s infinite; }
.secret-global-particles i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: var(--amber); box-shadow: 0 0 14px var(--amber); opacity: 0; animation: secret-global-spark 2.8s ease-in-out var(--delay) infinite; }
.secret-global-particles i:nth-child(1) { --x:8%; --y:22%; --s:4px; --delay:.1s; }.secret-global-particles i:nth-child(2) { --x:17%; --y:72%; --s:3px; --delay:-1.4s; }.secret-global-particles i:nth-child(3) { --x:28%; --y:42%; --s:5px; --delay:-.7s; }.secret-global-particles i:nth-child(4) { --x:38%; --y:84%; --s:3px; --delay:-2s; }.secret-global-particles i:nth-child(5) { --x:47%; --y:18%; --s:4px; --delay:-1.1s; }.secret-global-particles i:nth-child(6) { --x:57%; --y:77%; --s:5px; --delay:-.3s; }.secret-global-particles i:nth-child(7) { --x:66%; --y:34%; --s:3px; --delay:-1.8s; }.secret-global-particles i:nth-child(8) { --x:73%; --y:88%; --s:4px; --delay:-.9s; }.secret-global-particles i:nth-child(9) { --x:81%; --y:16%; --s:5px; --delay:-2.3s; }.secret-global-particles i:nth-child(10) { --x:89%; --y:52%; --s:3px; --delay:-1.6s; }.secret-global-particles i:nth-child(11) { --x:94%; --y:28%; --s:4px; --delay:-.5s; }.secret-global-particles i:nth-child(12) { --x:61%; --y:9%; --s:3px; --delay:-2.1s; }
.secret-mode::before { animation-duration: 34s, 8s; opacity: .9; }
.secret-mode::after { animation-duration: 10s; opacity: .95; }
.secret-mode .nav { animation: secret-nav-pulse 2.4s ease-in-out infinite; }
.secret-mode .nav-logo img { animation: secret-logo-orbit 2.8s ease-in-out infinite; filter: drop-shadow(0 0 18px rgba(242,112,30,.75)); }
.secret-mode .btn, .secret-mode .ip-plate { animation: secret-control-glow 2.2s ease-in-out infinite; }
.secret-mode .section h2::after { animation: secret-line-pulse 1.8s ease-in-out infinite; }
.secret-mode .footer { box-shadow: inset 0 1px 0 rgba(242,166,90,.24), 0 -18px 70px rgba(242,112,30,.08); }
@keyframes secret-global-aura { to { opacity: 1; } } @keyframes secret-global-drift { from { translate: -2% -1%; scale: .98; } to { translate: 2% 1%; scale: 1.04; } } @keyframes secret-sweep { 0%, 100% { transform: translateX(-120%); opacity: 0; } 25%, 65% { opacity: 1; } 85% { transform: translateX(120%); opacity: 0; } } @keyframes secret-global-spark { 0%,100% { opacity: 0; scale: .5; translate: 0 8px; } 45%,65% { opacity: .9; scale: 1.4; translate: 0 -8px; } } @keyframes secret-nav-pulse { 0%,100% { box-shadow: 0 8px 34px rgba(0,0,0,.2); } 50% { box-shadow: 0 8px 40px rgba(242,112,30,.22), 0 0 20px rgba(143,168,232,.12); } } @keyframes secret-logo-orbit { 0%,100% { rotate: 0deg; scale: 1; } 50% { rotate: 8deg; scale: 1.12; } } @keyframes secret-control-glow { 0%,100% { box-shadow: 0 0 0 rgba(242,112,30,0); } 50% { box-shadow: 0 0 22px rgba(242,112,30,.18); } } @keyframes secret-line-pulse { 0%,100% { opacity: .65; } 50% { opacity: 1; box-shadow: 0 0 14px rgba(242,112,30,.5); } }
@media (max-width: 620px) { .secret-global-particles i:nth-child(n+7) { display: none; } .secret-mode .btn, .secret-mode .ip-plate { animation: none; } }
@media (prefers-reduced-motion: reduce) { .secret-global-particles::before, .secret-global-particles::after, .secret-global-particles i, .secret-mode .nav, .secret-mode .nav-logo img, .secret-mode .btn, .secret-mode .ip-plate, .secret-mode .section h2::after { animation: none; } .secret-mode::before, .secret-mode::after { opacity: .65; } }

/* Snake Game Easter Egg */
.snake-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: opacity .4s var(--ease), visibility .4s var(--ease);
}
.snake-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}
.snake-card {
  position: relative;
  width: min(420px, 100%);
  padding: 28px 24px 24px;
  border: 1px solid rgba(242,166,90,.5);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(22,27,51,.98), rgba(11,14,26,.97));
  box-shadow: 0 30px 100px rgba(0,0,0,.55), 0 0 60px rgba(242,112,30,.18), inset 0 1px 0 rgba(255,255,255,.1);
  text-align: center;
  transform: translateY(18px) scale(.96);
  transition: transform .5s var(--ease);
}
.snake-overlay.is-visible .snake-card {
  transform: translateY(0) scale(1);
}
.snake-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.snake-close:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255,255,255,.08);
}
.snake-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}
.snake-header h2 {
  font-family: var(--font-pixel);
  font-size: .85rem;
  color: var(--amber);
  text-shadow: 0 0 20px rgba(242,112,30,.5);
}
.snake-header span {
  font-size: 1.3rem;
}
.snake-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 14px;
  font-family: var(--font-pixel);
  font-size: .55rem;
  color: var(--text-dim);
}
.snake-stats span {
  color: var(--silver);
}
.snake-canvas-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
#snake-canvas {
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(11,14,26,.9);
  image-rendering: pixelated;
  box-shadow: inset 0 0 30px rgba(0,0,0,.4);
}
.snake-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.snake-start {
  padding: 12px 28px;
  border: 1px solid var(--orange);
  border-radius: 999px;
  background: transparent;
  color: var(--orange);
  font-family: var(--font-pixel);
  font-size: .55rem;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.snake-start:hover {
  background: var(--orange);
  color: var(--bg);
  box-shadow: 0 0 24px rgba(242,112,30,.4);
}
.snake-start:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.snake-hint {
  font-family: var(--font-body);
  font-size: .72rem;
  color: var(--text-dim);
}
.snake-mobile-controls {
  display: none;
  grid-template-columns: repeat(3, 48px);
  grid-template-rows: repeat(2, 48px);
  gap: 6px;
  margin-top: 12px;
}
.snake-mobile-controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(22,27,51,.8);
  color: var(--silver);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.snake-mobile-controls button:active {
  background: rgba(242,112,30,.25);
  border-color: var(--orange);
}
.snake-mobile-controls .btn-up { grid-column: 2; }
.snake-mobile-controls .btn-left { grid-column: 1; grid-row: 2; }
.snake-mobile-controls .btn-down { grid-column: 2; grid-row: 2; }
.snake-mobile-controls .btn-right { grid-column: 3; grid-row: 2; }
.snake-game-over {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(11,14,26,.88);
  border-radius: 6px;
}
.snake-game-over.visible {
  display: flex;
}
.snake-game-over h3 {
  font-family: var(--font-pixel);
  font-size: .7rem;
  color: var(--orange);
}
.snake-game-over p {
  font-family: var(--font-pixel);
  font-size: .5rem;
  color: var(--text-dim);
}

@media (max-width: 520px) {
  .snake-card {
    padding: 22px 16px 20px;
  }
  .snake-header h2 {
    font-size: .7rem;
  }
  .snake-stats {
    gap: 18px;
    font-size: .48rem;
  }
  #snake-canvas {
    max-width: 280px;
    max-height: 280px;
  }
  .snake-mobile-controls {
    display: grid;
  }
  .snake-hint {
    display: none;
  }
}
@media (pointer: coarse) {
  .snake-mobile-controls {
    display: grid;
  }
  .snake-hint {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .snake-overlay, .snake-card {
    transition: none;
  }
}

/* Snake Game - Light theme fixes */
:root[data-theme="light"] .snake-card {
  border-color: rgba(217,90,15,.5);
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(247,249,254,.97));
  box-shadow: 0 30px 100px rgba(0,0,0,.12), 0 0 60px rgba(217,90,15,.1), inset 0 1px 0 rgba(255,255,255,.8);
}
:root[data-theme="light"] .snake-header h2 {
  color: var(--orange);
}
:root[data-theme="light"] .snake-stats {
  color: var(--text-dim);
}
:root[data-theme="light"] .snake-stats span {
  color: var(--silver);
}
:root[data-theme="light"] #snake-canvas {
  border-color: var(--line-strong);
  background: rgba(20,26,51,.95);
}
:root[data-theme="light"] .snake-game-over {
  background: rgba(20,26,51,.92);
}
:root[data-theme="light"] .snake-game-over h3,
:root[data-theme="light"] .snake-game-over p {
  color: #fff;
}
:root[data-theme="light"] .snake-close {
  border-color: var(--line-strong);
  color: var(--text-dim);
}
:root[data-theme="light"] .snake-close:hover {
  background: rgba(0,0,0,.06);
  color: var(--text);
}
:root[data-theme="light"] .snake-mobile-controls button {
  background: rgba(247,249,254,.9);
  border-color: var(--line-strong);
  color: var(--silver);
}
:root[data-theme="light"] .snake-mobile-controls button:active {
  background: rgba(217,90,15,.15);
  border-color: var(--orange);
}

/* Secret overlay - Light theme fixes */
:root[data-theme="light"] .secret-card {
  border-color: rgba(217,90,15,.45);
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(247,249,254,.97));
  box-shadow: 0 30px 100px rgba(0,0,0,.1), 0 0 60px rgba(217,90,15,.08), inset 0 1px 0 rgba(255,255,255,.8);
}
:root[data-theme="light"] .secret-card h2 {
  color: var(--text);
}
:root[data-theme="light"] .secret-card > p:not(.eyebrow) {
  color: var(--text-dim);
}
:root[data-theme="light"] .secret-code {
  background: rgba(232,236,248,.8);
  border-color: var(--line-strong);
  color: var(--silver);
}
:root[data-theme="light"] .secret-close {
  border-color: var(--line-strong);
  color: var(--text-dim);
}
:root[data-theme="light"] .secret-close:hover {
  background: rgba(0,0,0,.06);
}
:root[data-theme="light"] .secret-badge {
  background: rgba(255,255,255,.85);
  border-color: rgba(217,90,15,.35);
}
:root[data-theme="light"] .secret-alert {
  background: rgba(255,255,255,.9);
  border-color: rgba(217,90,15,.4);
}

/* Snake Game - RGB theme */
:root[data-theme="rgb"] .snake-card {
  border-color: hsl(var(--hue) 80% 55% / 0.6);
  background: linear-gradient(145deg, hsl(calc(var(--hue) + 240) 30% 14% / 0.98), hsl(calc(var(--hue) + 250) 35% 8% / 0.97));
  box-shadow: 0 30px 100px rgba(0,0,0,.5), 0 0 60px hsl(var(--hue) 80% 50% / 0.25), inset 0 1px 0 rgba(255,255,255,.1);
}
:root[data-theme="rgb"] .snake-header h2 {
  color: hsl(var(--hue) 85% 65%);
  text-shadow: 0 0 20px hsl(var(--hue) 80% 50% / 0.6);
}
:root[data-theme="rgb"] .snake-stats span {
  color: hsl(calc(var(--hue) + 180) 80% 75%);
}
:root[data-theme="rgb"] #snake-canvas {
  border-color: hsl(var(--hue) 70% 50% / 0.4);
  box-shadow: inset 0 0 30px rgba(0,0,0,.4), 0 0 20px hsl(var(--hue) 80% 50% / 0.15);
}
:root[data-theme="rgb"] .snake-start {
  border-color: hsl(var(--hue) 85% 60%);
  color: hsl(var(--hue) 85% 65%);
}
:root[data-theme="rgb"] .snake-start:hover {
  background: hsl(var(--hue) 85% 55%);
  color: #000;
  box-shadow: 0 0 24px hsl(var(--hue) 80% 50% / 0.5);
}
:root[data-theme="rgb"] .snake-close {
  border-color: hsl(var(--hue) 60% 50% / 0.4);
}
:root[data-theme="rgb"] .snake-close:hover {
  border-color: hsl(var(--hue) 70% 60%);
  background: hsl(var(--hue) 70% 50% / 0.15);
}
:root[data-theme="rgb"] .snake-mobile-controls button {
  border-color: hsl(var(--hue) 60% 50% / 0.4);
  background: hsl(calc(var(--hue) + 240) 30% 16% / 0.8);
  color: hsl(calc(var(--hue) + 180) 80% 75%);
}
:root[data-theme="rgb"] .snake-mobile-controls button:active {
  background: hsl(var(--hue) 70% 50% / 0.3);
  border-color: hsl(var(--hue) 80% 60%);
}

/* Rules Page - Light theme */
:root[data-theme="light"] .rules-hero {
  background: linear-gradient(180deg, rgba(247,249,254,.95) 0%, rgba(232,236,248,.9) 100%);
}
:root[data-theme="light"] .rules-hero h1 {
  color: var(--text);
}
:root[data-theme="light"] .rules-hero h1 span {
  color: var(--orange);
}
:root[data-theme="light"] .rules-lead {
  color: var(--text-dim);
}
:root[data-theme="light"] .rules-quick-stats {
  background: rgba(255,255,255,.7);
  border-color: var(--line-strong);
}
:root[data-theme="light"] .rules-quick-stats div {
  border-color: var(--line);
}
:root[data-theme="light"] .rules-quick-stats strong {
  color: var(--silver);
}
:root[data-theme="light"] .rules-card {
  background: linear-gradient(145deg, rgba(255,255,255,.95), rgba(247,249,254,.9));
  border-color: var(--line-strong);
  box-shadow: 0 12px 40px rgba(0,0,0,.06);
}
:root[data-theme="light"] .rules-card:hover {
  border-color: rgba(217,90,15,.4);
  box-shadow: 0 18px 50px rgba(0,0,0,.08), 0 0 20px rgba(217,90,15,.06);
}
:root[data-theme="light"] .rules-card h2 {
  color: var(--text);
}
:root[data-theme="light"] .rules-number {
  color: var(--orange);
}
:root[data-theme="light"] .rules-toc {
  background: rgba(255,255,255,.8);
  border-color: var(--line-strong);
}
:root[data-theme="light"] .rules-toc a {
  color: var(--text-dim);
  border-color: transparent;
}
:root[data-theme="light"] .rules-toc a:hover,
:root[data-theme="light"] .rules-toc a.active {
  color: var(--text);
  background: rgba(242,112,30,.08);
  border-color: var(--orange);
}
:root[data-theme="light"] .rules-progress {
  background: rgba(255,255,255,.9);
  border-color: var(--line-strong);
  color: var(--silver);
}
:root[data-theme="light"] .rules-search-box input {
  background: rgba(255,255,255,.85);
  border-color: var(--line-strong);
  color: var(--text);
}
:root[data-theme="light"] .rules-hero-grid {
  opacity: .15;
}
:root[data-theme="light"] .rules-portal {
  border-color: rgba(217,90,15,.35);
  box-shadow: 0 0 25px rgba(217,90,15,.12), inset 0 0 30px rgba(217,90,15,.08);
}
:root[data-theme="light"] .rules-moon {
  box-shadow: 0 0 40px rgba(217,90,15,.2), 0 0 90px rgba(217,90,15,.08);
}

/* Cabinet nav button */
.nav-cabinet {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(242,112,30,.15), rgba(242,112,30,.05));
  border: 1px solid rgba(242,112,30,.3);
  text-decoration: none;
  transition: all .2s;
}
.nav-cabinet svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--orange);
  stroke-width: 2;
}
.nav-cabinet:hover {
  border-color: var(--orange);
  background: rgba(242,112,30,.25);
  transform: scale(1.08);
  box-shadow: 0 0 16px rgba(242,112,30,.4);
}
.nav-cabinet:hover svg {
  stroke: var(--orange-soft);
}

/* Online Stats Modal */
.online-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  background: var(--veil);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity .3s var(--ease), visibility .3s var(--ease);
}
.online-modal[hidden] { display: none; }
.online-modal.is-visible { display: grid; opacity: 1; visibility: visible; }
.online-modal.is-visible .online-card { transform: translateY(0) scale(1); }
.online-card {
  position: relative;
  width: 100%;
  max-width: 600px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  transform: translateY(20px) scale(0.96);
  transition: transform .35s var(--ease);
}
.online-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  transition: color .2s;
}
.online-close:hover { color: var(--text); }
.online-card h2 {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}
.online-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 24px;
}
.online-stat { text-align: center; }
.online-stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--orange);
}
.online-stat-label {
  font-size: .85rem;
  color: var(--text-dim);
}
.online-chart-wrap {
  position: relative;
}
#online-chart {
  width: 100%;
  height: 180px;
  border-radius: var(--radius-sm);
  background: var(--inset);
  cursor: crosshair;
}
.online-tooltip {
  position: absolute;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: .85rem;
  color: var(--text);
  pointer-events: none;
  white-space: nowrap;
  transform: translate(-50%, -100%);
  margin-top: -10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 10;
}
.online-tooltip strong {
  color: var(--orange);
  font-weight: 600;
}
.online-hint {
  margin: 12px 0 0;
  font-size: .8rem;
  color: var(--text-dim);
  text-align: center;
}
.online-players {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.online-players-title {
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px;
}
.online-players-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
}
.online-player {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: .85rem;
  color: var(--text);
  transition: all .2s var(--ease);
}
.online-player:hover {
  border-color: var(--orange);
  transform: translateY(-1px);
}
.online-player-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
}
.online-players-empty {
  color: var(--text-dim);
  font-size: .85rem;
  text-align: center;
  padding: 16px;
}
@media (max-width: 520px) {
  .online-modal { padding: 12px; }
  .online-card { padding: 20px 14px; border-radius: 16px; }
  .online-card h2 { font-size: 1.1rem; margin-bottom: 16px; }
  .online-stats { gap: 20px; }
  .online-stat-num { font-size: 1.4rem; }
  #online-chart { height: 150px; }
  .online-tooltip { font-size: .75rem; padding: 6px 10px; }
  .online-hint { font-size: .75rem; }
  .online-players-list { max-height: 140px; gap: 6px; }
  .online-player { padding: 5px 10px 5px 5px; font-size: .8rem; }
  .online-player-avatar { width: 20px; height: 20px; }
}
:root[data-theme="light"] .online-modal {
  background: rgba(238, 241, 250, 0.92);
}
:root[data-theme="light"] .online-card {
  background: var(--surface);
  border-color: var(--line-strong);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
:root[data-theme="light"] #online-chart {
  background: var(--inset);
}

/* ═══════════════════════════════════════════════════════════════════════════
   NAIL IT! Rhythm Game Easter Egg
   ═══════════════════════════════════════════════════════════════════════════ */
.nail-game-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.nail-game-overlay.is-visible { opacity: 1; }

.nail-game {
  background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
  border: 2px solid var(--orange);
  border-radius: var(--radius);
  padding: 20px;
  width: 95%;
  max-width: 380px;
  text-align: center;
  position: relative;
  box-shadow: 0 0 60px rgba(242, 112, 30, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}

.nail-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: #EDEFF7;
  font-size: 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}
.nail-close:hover { background: #e81123; transform: scale(1.1); }

.nail-header h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0 0 2px;
  background: linear-gradient(135deg, #F2701E, #ff9a4d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nail-subtitle {
  color: rgba(237, 239, 247, 0.65);
  font-size: 0.8rem;
  margin: 0 0 12px;
}

.nail-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-bottom: 12px;
}
.nail-score, .nail-combo {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: rgba(237, 239, 247, 0.65);
}
.nail-score span, .nail-combo span {
  color: #F2701E;
  font-weight: 700;
  font-size: 1rem;
}
.nail-lives {
  font-size: 1.2rem;
  letter-spacing: 2px;
}
.nail-speed {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: #F2A65A;
  margin-bottom: 8px;
}

.nail-field {
  position: relative;
  height: 320px;
  background: linear-gradient(180deg, #0a0a14 0%, #12121f 100%);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid rgba(255,255,255,0.05);
}

.nail-lanes {
  position: absolute;
  inset: 0;
  display: flex;
}
.nail-lane {
  flex: 1;
  border-right: 1px solid rgba(255,255,255,0.05);
  position: relative;
}
.nail-lane::before {
  content: attr(data-key);
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.2);
  font-weight: 600;
}
.nail-lane:last-child { border-right: none; }
.nail-lane.flash::before {
  color: #F2701E;
}
.nail-lane.flash::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(242, 112, 30, 0.4));
  animation: lane-flash 0.15s ease-out;
}
@keyframes lane-flash {
  from { opacity: 1; }
  to { opacity: 0; }
}

.nail-hitline {
  position: absolute;
  bottom: 50px;
  left: 10px;
  right: 10px;
  height: 4px;
  background: linear-gradient(90deg, transparent, #F2701E, transparent);
  border-radius: 2px;
  box-shadow: 0 0 20px #F2701E, 0 0 40px rgba(242, 112, 30, 0.5);
}

.nail-beat-indicator {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #F2701E;
  border-radius: 50%;
  opacity: 0.3;
  transition: all 0.08s;
}
.nail-beat-indicator.pulse {
  opacity: 1;
  transform: translateX(-50%) scale(1.5);
  box-shadow: 0 0 20px #F2701E;
}

.nail {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  border: 3px solid #333;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6), inset 0 0 20px rgba(0,0,0,0.5);
  transform: translateX(-50%);
}
.nail .vinyl-groove {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle at center,
    transparent 0px,
    transparent 2px,
    rgba(60,60,60,0.5) 2px,
    rgba(60,60,60,0.5) 3px
  );
}
.nail .vinyl-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F2701E, #ff6b00);
  box-shadow: 0 0 10px rgba(242, 112, 30, 0.5);
}
.nail .vinyl-label::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 4px;
  background: #000;
  border-radius: 50%;
}
.nail.hit {
  transform: translateX(-50%) scale(1.5);
  opacity: 0;
  border-color: #F2701E;
  box-shadow: 0 0 30px #F2701E;
  transition: all 0.15s ease-out;
}
.nail.gameover {
  opacity: 0.3;
  filter: grayscale(1);
}

.nail-feedback {
  height: 32px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px currentColor;
}
.nail-feedback.perfect { color: #4ADE80; animation: feedback-pop 0.2s ease-out; }
.nail-feedback.good { color: #F2701E; animation: feedback-pop 0.2s ease-out; }
.nail-feedback.ok { color: #F2A65A; }
.nail-feedback.miss { color: #F87171; animation: feedback-shake 0.3s ease-out; }

@keyframes feedback-pop {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes feedback-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

.nail-controls {
  padding-top: 4px;
}
.nail-controls p {
  color: rgba(237, 239, 247, 0.65);
  font-size: 0.8rem;
  margin: 0 0 10px;
}
.nail-controls kbd {
  display: inline-block;
  background: linear-gradient(180deg, #2a2a3e, #1a1a28);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 5px;
  padding: 3px 10px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: #EDEFF7;
  margin: 0 2px;
  box-shadow: 0 2px 0 rgba(0,0,0,0.3);
}

.nail-start {
  width: 100%;
  font-size: 1rem;
  padding: 12px 24px;
}
.nail-start:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ZOMBIE SLASH Easter Egg
   ═══════════════════════════════════════════════════════════════════════════ */
.zombie-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.zombie-overlay.is-visible { opacity: 1; }

.zombie-game {
  background: linear-gradient(180deg, #1a0a0a 0%, #0a0505 100%);
  border: 2px solid #8B0000;
  border-radius: 20px;
  padding: 16px;
  text-align: center;
  position: relative;
  box-shadow: 0 0 60px rgba(139, 0, 0, 0.4);
}

.zombie-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: #EDEFF7;
  font-size: 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}
.zombie-close:hover { background: #8B0000; }

.zombie-header h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0 0 8px;
  color: #ff4444;
  text-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
}

.zombie-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.zombie-score {
  color: rgba(237, 239, 247, 0.7);
}
.zombie-score b {
  color: #ff4444;
  font-size: 1.1rem;
}
.zombie-lives {
  font-size: 1rem;
  letter-spacing: 2px;
}

#zs-canvas {
  display: block;
  margin: 0 auto 12px;
  border-radius: 12px;
  border: 1px solid rgba(139, 0, 0, 0.3);
  cursor: crosshair;
  touch-action: none;
  max-width: 100%;
}

.zombie-info {
  color: rgba(237, 239, 247, 0.6);
  font-size: 0.85rem;
  margin-bottom: 12px;
  min-height: 20px;
}

.zombie-start {
  background: linear-gradient(135deg, #8B0000, #5a0000);
  border-color: #ff4444;
}
.zombie-start:hover {
  background: linear-gradient(135deg, #a00000, #700000);
  box-shadow: 0 0 20px rgba(255, 68, 68, 0.4);
}

/* Zombie Menu */
.zombie-menu {
  background: linear-gradient(180deg, #1a0a0a 0%, #0a0505 100%);
  border: 2px solid #8B0000;
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  position: relative;
  box-shadow: 0 0 60px rgba(139, 0, 0, 0.4);
  min-width: 320px;
}

.zombie-menu-header h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin: 0 0 4px;
  background: linear-gradient(135deg, #ff4444, #ff8866);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.zombie-menu-header p {
  color: rgba(237, 239, 247, 0.6);
  font-size: 0.9rem;
  margin: 0 0 20px;
}

.zombie-menu-games {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zombie-menu-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}
.zombie-menu-btn:hover {
  background: rgba(139, 0, 0, 0.3);
  border-color: #8B0000;
  transform: translateX(4px);
}
.zm-icon {
  font-size: 2rem;
}
.zm-title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #EDEFF7;
  display: block;
}
.zm-desc {
  font-size: 0.8rem;
  color: rgba(237, 239, 247, 0.5);
  display: block;
}

/* Tower Defense */
.zombie-td .zombie-header h2 {
  color: #4ade80;
  text-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
}

#td-canvas {
  display: block;
  margin: 0 auto 12px;
  border-radius: 8px;
  border: 1px solid rgba(74, 222, 128, 0.2);
  cursor: pointer;
}

.td-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.td-tower-btn {
  padding: 8px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: #EDEFF7;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.td-tower-btn:hover {
  background: rgba(74, 222, 128, 0.2);
  border-color: #4ade80;
}
.td-tower-btn:active {
  transform: scale(0.95);
}

/* Epic Dragon Tower Button */
.td-tower-epic {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(234, 179, 8, 0.3));
  border-color: #ef4444;
  animation: epic-glow 2s ease infinite;
}
.td-tower-epic:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.5), rgba(234, 179, 8, 0.5));
  border-color: #fbbf24;
}
@keyframes epic-glow {
  0%, 100% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.3); }
  50% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.6), 0 0 30px rgba(234, 179, 8, 0.3); }
}

.td-controls {
  flex-wrap: wrap;
}

/* TD Action Buttons */
.td-action-btn {
  padding: 6px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: #EDEFF7;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}
.td-action-btn:hover {
  background: rgba(255,255,255,0.1);
}
.td-action-btn.active {
  background: rgba(242, 112, 30, 0.3);
  border-color: #f2701e;
  color: #f2701e;
}
.td-action-btn:active {
  transform: scale(0.95);
}

/* TD Speed Buttons */
.td-speed-btn {
  padding: 6px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: #EDEFF7;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.td-speed-btn:hover {
  background: rgba(74, 222, 128, 0.2);
  border-color: #4ade80;
}
.td-speed-btn.active {
  background: rgba(74, 222, 128, 0.3);
  border-color: #4ade80;
  color: #4ade80;
}

/* ── Скины радио (вики) ────────────────────────────────────── */

.skin-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.skin-card {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 12px 12px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--inset);
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease), translate 0.25s var(--ease);
}

.skin-card:hover {
  border-color: rgba(242, 112, 30, 0.4);
  background: rgba(242, 112, 30, 0.05);
  translate: 0 -3px;
}

.skin-shot {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 6px;
}

/* высота в px, а не в %: внутри грид-строки auto процент даёт цикл,
   Chrome сбрасывает его в auto и картинка вылезает поверх текста */
.skin-shot img {
  width: 100%;
  height: 74px;
  object-fit: contain;
  image-rendering: pixelated;
}

.skin-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.25;
}

.skin-card .skin-desc {
  font-size: 0.76rem;
  color: var(--text-dim);
  line-height: 1.4;
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


:root[data-theme="light"] .skin-card { background: #FFF; }

@media (prefers-reduced-motion: reduce) {
  .skin-card:hover { translate: none; }
}

@media (max-width: 560px) {
  .skin-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
  .skin-shot img { height: 64px; }
  .skin-card { padding: 10px 10px 11px; }
}

.skin-banner {
  width: 100%;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
  margin: 2px 0 6px;
}

/* --- Саундтрек: альбом Lunify на Яндекс Музыке --- */

.music-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 560px;
  gap: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-fade) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.music-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(242, 112, 30, .13), transparent 70%);
  transition: opacity 0.35s var(--ease);
}

.music-card:hover::after { opacity: 1; }

.music-body {
  padding: 44px 40px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 14px;
}

.music-body h2 { margin-bottom: 0; max-width: 16ch; }
.music-body p { color: var(--text-dim); max-width: 44ch; }
.music-body p b { color: var(--text); font-weight: 600; }

.music-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--inset);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

/* эквалайзер: столбики живут своей жизнью */
.music-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }

.music-eq i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--orange);
  transform-origin: bottom;
  scale: 1 0.4;
  animation: music-eq-bounce 1.1s var(--ease) infinite;
}

.music-eq i:nth-child(2) { animation-delay: 0.18s; background: var(--amber); }
.music-eq i:nth-child(3) { animation-delay: 0.36s; }
.music-eq i:nth-child(4) { animation-delay: 0.54s; background: var(--silver); }

/* Имя было просто `eq` и перебивало одноимённый keyframes выше (полоски радио
   в «Механиках сервера») — из-за этого те растягивались на всю карточку.
   Заодно height → scale: анимация уезжает на GPU и не дёргает layout. */
@keyframes music-eq-bounce {
  0%, 100% { scale: 1 0.3; }
  50% { scale: 1 1; }
}

.music-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.music-actions .btn { padding: 11px 20px; font-size: 0.9rem; }

.music-frame {
  position: relative;
  width: 100%;
  min-height: 470px;
  padding: 24px;
  display: grid;
  align-items: center;
  border-left: 1px solid var(--line);
  background:
    radial-gradient(420px 300px at 70% 20%, rgba(242, 112, 30, 0.1), transparent 70%),
    var(--inset);
}

.music-frame iframe {
  width: 100%;
  height: 422px;
  border: 0;
  border-radius: var(--radius-sm);
  display: block;
  background: #0F0F12;
  box-shadow: 0 14px 40px rgba(4, 6, 14, 0.4);
  animation: music-in 0.45s var(--ease);
}

.music-frame iframe[hidden] { display: none; }

@keyframes music-in {
  from { opacity: 0; scale: 0.98; }
  to { opacity: 1; scale: 1; }
}

/* --- постер: то, что видно до нажатия --- */

.music-poster {
  cursor: pointer;
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 30px 24px 26px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(300px 200px at 50% 0%, rgba(242, 112, 30, 0.14), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 16px 44px rgba(4, 6, 14, 0.35);
}

.music-poster[hidden] { display: none; }

/* пластинка: крутится сама, ускоряется при наведении */
.music-disc {
  position: relative;
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.045) 0 2px, transparent 2px 6px),
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.14), transparent 46%),
    radial-gradient(circle at 50% 50%, #22232C 0 41%, #14151B 41% 100%);
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 40px rgba(4, 6, 14, 0.5), inset 0 0 30px rgba(0, 0, 0, 0.6);
  animation: spin 14s linear infinite;
}

.music-disc-ring {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1px solid rgba(242, 112, 30, 0.28);
}

.music-disc-core {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(242, 166, 90, 0.3), rgba(242, 112, 30, 0.22));
  border: 1px solid rgba(242, 112, 30, 0.5);
  box-shadow: 0 0 0 4px rgba(11, 14, 26, 0.85), 0 0 24px rgba(242, 112, 30, 0.3);
}

.music-disc-core img { border-radius: 50%; display: block; }

.music-frame:hover .music-disc { animation-duration: 5s; }

.music-meta { display: grid; justify-items: center; gap: 2px; text-align: center; }

.music-track {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.music-artist { font-size: 0.86rem; color: var(--text-dim); letter-spacing: 0.06em; text-transform: uppercase; }

/* звуковая дорожка: столбики дышат по синусоиде */
.music-wave {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  width: 100%;
  max-width: 250px;
  justify-content: center;
}

.music-wave i {
  width: 3px;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--amber), var(--orange));
  opacity: 0.75;
  transform-origin: bottom;
  scale: 1 0.3;
  animation: music-wave-bounce 1.6s var(--ease) infinite;
}

.music-wave i:nth-child(3n) { background: linear-gradient(180deg, var(--silver), var(--silver-2)); }
.music-wave i:nth-child(1) { animation-delay: 0s; }
.music-wave i:nth-child(2) { animation-delay: .08s; }
.music-wave i:nth-child(3) { animation-delay: .16s; }
.music-wave i:nth-child(4) { animation-delay: .24s; }
.music-wave i:nth-child(5) { animation-delay: .32s; }
.music-wave i:nth-child(6) { animation-delay: .4s; }
.music-wave i:nth-child(7) { animation-delay: .48s; }
.music-wave i:nth-child(8) { animation-delay: .56s; }
.music-wave i:nth-child(9) { animation-delay: .64s; }
.music-wave i:nth-child(10) { animation-delay: .72s; }
.music-wave i:nth-child(11) { animation-delay: .64s; }
.music-wave i:nth-child(12) { animation-delay: .56s; }
.music-wave i:nth-child(13) { animation-delay: .48s; }
.music-wave i:nth-child(14) { animation-delay: .4s; }
.music-wave i:nth-child(15) { animation-delay: .32s; }
.music-wave i:nth-child(16) { animation-delay: .24s; }
.music-wave i:nth-child(17) { animation-delay: .16s; }
.music-wave i:nth-child(18) { animation-delay: .08s; }
.music-wave i:nth-child(19) { animation-delay: .04s; }
.music-wave i:nth-child(20) { animation-delay: 0s; }

/* Тот же случай, что и с `eq`: имя `wave` перебивало keyframes выше, из-за
   чего полоски в карточке «Голосовой чат и эмоции» росли сверху вниз. */
@keyframes music-wave-bounce {
  0%, 100% { scale: 1 0.18; opacity: 0.55; }
  50% { scale: 1 1; opacity: 1; }
}

.music-play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid rgba(242, 112, 30, 0.7);
  background: linear-gradient(180deg, rgba(242, 112, 30, 0.4), rgba(242, 112, 30, 0.2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 6px 22px rgba(242, 112, 30, 0.3);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.music-play:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 30px rgba(242, 112, 30, 0.42);
}

.music-play:active { transform: translateY(0); }

.music-source { font-size: 0.74rem; color: var(--text-dim); letter-spacing: 0.04em; }

.music-collapse {
  position: absolute;
  right: 30px;
  top: 30px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--veil);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.music-collapse:hover { color: var(--text); border-color: rgba(242, 112, 30, 0.5); }
.music-collapse[hidden] { display: none; }

.music-fallback {
  position: absolute;
  inset: 24px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  text-align: center;
  padding: 24px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}

.music-fallback[hidden] { display: none; }
.music-fallback p { color: var(--text-dim); font-size: 0.92rem; max-width: 32ch; }

/* пластинка для запасного вида */
.music-vinyl {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 5px),
    radial-gradient(circle at 50% 50%, #24252E 0 40%, #15161C 40% 100%);
  border: 1px solid var(--line-strong);
  animation: spin 8s linear infinite;
}

.music-vinyl i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--amber), var(--orange));
  box-shadow: 0 0 0 3px rgba(11, 14, 26, 0.8);
}

@keyframes spin {
  from { rotate: 0deg; }
  to { rotate: 360deg; }
}

@media (max-width: 1080px) {
  .music-card { grid-template-columns: 1fr; }
  .music-body { padding: 34px 26px; }
  .music-frame {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 20px 20px 24px;
  }
}

@media (max-width: 560px) {
  .music-frame { min-height: 0; padding: 16px; }
  .music-frame iframe { height: 440px; }
  .music-fallback { inset: 16px; }
  .music-poster { padding: 26px 18px 22px; gap: 14px; }
  .music-disc { width: 124px; height: 124px; }
  .music-collapse { right: 22px; top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .music-eq i, .music-vinyl, .music-disc, .music-wave i { animation: none; }
}

/* ── Фасад трейлера: ютуб-плеер грузится только по клику ── */
.trailer-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  border-radius: inherit;
  background: var(--surface-2);
  cursor: pointer;
  display: block;
  overflow: hidden;
}
.trailer-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease), filter 0.4s var(--ease);
}
.trailer-poster:hover img,
.trailer-poster:focus-visible img { transform: scale(1.03); filter: brightness(1.06); }
.trailer-play {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
  transition: scale 0.3s var(--ease);
  pointer-events: none;
}
.trailer-poster:hover .trailer-play,
.trailer-poster:focus-visible .trailer-play { scale: 1.1; }
@media (prefers-reduced-motion: reduce) {
  .trailer-poster img, .trailer-play { transition: none; }
  .trailer-poster:hover img, .trailer-poster:focus-visible img { transform: none; }
}
