/* =========================================================
   WCLIENT — дизайн-система «Строгий минимализм»
   Чёрный фон, белый как единственный акцент, тонкие рамки 1px,
   Geist + Geist Mono, крупная типографика, минимум эффектов.
   ========================================================= */


:root {
  --bg: #000;
  --bg-1: #050505;
  --surface: #0a0a0a;
  --surface-2: #111;
  --surface-3: #1a1a1a;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --line-3: rgba(255, 255, 255, 0.26);
  --text: #ededed;
  --muted: #a1a1a1;
  --dim: #666;
  --accent: #fff;
  --ok: #2ec27e;
  --warn: #f5a524;
  --bad: #f2555a;
  --info: #3e8bff;

  --r-xs: 6px;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --container: 1200px;
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --font-display: 'Geist', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Geist', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'Cascadia Code', monospace;
  --font-pixel: 'Press Start 2P', ui-monospace, monospace;

  color-scheme: dark;
}

@property --angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

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

html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  /* фон задаёт html: иначе фон body перекроет слои с z-index:-1 */
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; }
::selection { background: #fff; color: #000; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--font-mono); }

/* ---------- Фон страниц: сетка и едва заметные фигуры ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: var(--bg); }
.ambient::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: center top;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 10%, transparent 75%);
}
.ambient::after {
  content: '';
  position: absolute;
  inset: -20% 10% auto;
  height: 60vh;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.07), transparent 65%);
}
.ambient .dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1.2px); background-size: 24px 24px; mask-image: linear-gradient(180deg, transparent 30%, #000 60%, transparent 100%); }
.ambient .rays, .ambient .orb { display: none; }
.ambient .noise { position: absolute; inset: 0; opacity: 0.035; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.ambient .shape { position: absolute; height: auto; color: rgba(255, 255, 255, 0.05); will-change: transform; animation: shape-float 80s linear infinite; }
.ambient .s1 { width: 320px; top: 18%; left: -100px; }
.ambient .s2 { width: 440px; top: 55%; right: -160px; animation-duration: 110s; animation-direction: reverse; }
.ambient .s3 { width: 140px; top: 76%; left: 14%; animation-duration: 70s; }
.ambient .s4 { width: 200px; top: 10%; right: 12%; animation-duration: 95s; animation-direction: reverse; }
.ambient .s5 { width: 60px; top: 42%; left: 47%; color: rgba(255, 255, 255, 0.08); animation-duration: 40s; }
.ambient .s6 { width: 110px; bottom: 6%; right: 32%; animation-duration: 85s; }
.ambient .s7 { width: 260px; top: 30%; left: 30%; color: rgba(255, 255, 255, 0.035); animation-duration: 140s; }
@keyframes shape-float {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(24px, -32px, 0) rotate(180deg); }
  100% { transform: translate3d(0, 0, 0) rotate(360deg); }
}

.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 1px; z-index: 100; transform-origin: 0 50%; transform: scaleX(0); background: #fff; pointer-events: none; }

/* ---------- Поверхности ---------- */
.glass { background: rgba(10, 10, 10, 0.72); border: 1px solid var(--line); }
@media (min-width: 900px) {
  .glass { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
}

/* ---------- Кнопки ---------- */
.btn {
  --btn-h: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  padding: 0 16px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: #ededed; color: #000; }
.btn-primary:hover { background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08); }
.btn-glass { background: var(--surface); border-color: var(--line-2); color: var(--text); }
.btn-glass:hover { background: var(--surface-2); border-color: var(--line-3); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.btn-danger { background: rgba(242, 85, 90, 0.08); border-color: rgba(242, 85, 90, 0.3); color: #ff8f93; }
.btn-danger:hover { background: rgba(242, 85, 90, 0.15); }
.btn-ms { width: 100%; --btn-h: 48px; font-size: 15px; background: #ededed; color: #111; border-radius: 10px; }
.btn-ms:hover { background: #fff; }
.btn-ms svg { width: 18px; height: 18px; }
.btn-sm { --btn-h: 34px; padding: 0 12px; font-size: 13px; }
.btn-xs { --btn-h: 28px; padding: 0 10px; font-size: 12.5px; gap: 6px; border-radius: var(--r-xs); }
.btn-xs svg { width: 14px; height: 14px; }
.btn-lg { --btn-h: 48px; padding: 0 22px; font-size: 15px; border-radius: 10px; }
.btn-icon { width: var(--btn-h); padding: 0; }
.btn[disabled] { opacity: 0.4; pointer-events: none; }
.glow-border { position: relative; }

/* ---------- Шапка ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--header-h); border-bottom: 1px solid transparent; transition: background-color 0.3s, border-color 0.3s; }
.site-header.scrolled { background: rgba(0, 0, 0, 0.72); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
.nav { height: 100%; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { width: 24px; height: 24px; color: #fff; flex: none; }
.brand-word { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: 0.24em; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links.glass { background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
.nav-links a { padding: 6px 10px; border-radius: var(--r-xs); font-size: 14px; color: var(--muted); transition: color 0.15s, background-color 0.15s; }
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-links a.active { color: #fff; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.locale { position: relative; }
.locale-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: var(--r-sm); font-size: 13px; font-weight: 500; color: var(--text); }
.locale-btn.glass { background: transparent; border-color: var(--line-2); }
.locale-btn:hover { border-color: var(--line-3); }
.locale-btn .sep { width: 1px; height: 12px; background: var(--line-2); }
.locale-btn .cur { color: var(--muted); }
.locale-btn > svg { width: 13px; height: 13px; color: var(--dim); transition: transform 0.2s; }
.locale.open .locale-btn > svg { transform: rotate(180deg); }
.locale-panel {
  position: absolute; top: calc(100% + 8px); right: 0; width: 300px; padding: 8px; z-index: 60;
  border-radius: var(--r); background: rgba(10, 10, 10, 0.94); border: 1px solid var(--line-2);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity 0.15s, transform 0.2s var(--ease);
}
.locale.open .locale-panel { opacity: 1; transform: none; pointer-events: auto; }
.locale-section + .locale-section { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.locale-label { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); margin: 6px 8px 6px; }
.locale-grid { display: grid; gap: 2px; }
.locale-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.locale-opt { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: var(--r-xs); font-size: 13.5px; text-align: left; color: var(--muted); transition: background-color 0.12s, color 0.12s; }
.locale-opt:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.locale-opt.active { background: rgba(255, 255, 255, 0.08); color: #fff; }
.locale-opt .code { margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); }
.locale-opt .check { margin-left: auto; width: 15px; height: 15px; color: #fff; }

.flag { display: inline-block; flex: none; width: 20px; height: 14px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); }
.flag svg { width: 100%; height: 100%; }
.flag--round { width: 16px; height: 16px; border-radius: 50%; }

.user-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 3px; border-radius: var(--r-sm); font-weight: 500; font-size: 13.5px; transition: border-color 0.15s; }
.user-chip.glass { background: transparent; border-color: var(--line-2); }
.user-chip:hover { border-color: var(--line-3); }
.user-chip img { width: 26px; height: 26px; border-radius: 5px; image-rendering: pixelated; background: #222; }
.user-chip .nick { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.burger { display: none; }

.drawer { position: fixed; inset: 0; z-index: 80; visibility: hidden; pointer-events: none; }
.drawer.open { visibility: visible; pointer-events: auto; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.7); opacity: 0; transition: opacity 0.3s; }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(340px, 88vw); padding: 16px; display: flex; flex-direction: column; gap: 16px; background: #050505; border-left: 1px solid var(--line-2); transform: translateX(100%); transition: transform 0.4s var(--ease); overflow-y: auto; }
.drawer.open .drawer-panel { transform: none; }
.drawer-top { display: flex; align-items: center; justify-content: space-between; }
.drawer-links { display: grid; border-top: 1px solid var(--line); }
.drawer-links a { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 18px; font-weight: 500; letter-spacing: -0.02em; opacity: 0; transform: translateX(16px); transition: opacity 0.3s, transform 0.4s var(--ease), color 0.15s; color: var(--muted); }
.drawer-links a.active, .drawer-links a:hover { color: #fff; }
.drawer.open .drawer-links a { opacity: 1; transform: none; }
.drawer.open .drawer-links a:nth-child(2) { transition-delay: 0.03s; }
.drawer.open .drawer-links a:nth-child(3) { transition-delay: 0.06s; }
.drawer.open .drawer-links a:nth-child(4) { transition-delay: 0.09s; }
.drawer.open .drawer-links a:nth-child(5) { transition-delay: 0.12s; }
.drawer-links a svg { width: 16px; height: 16px; color: var(--dim); }
.drawer .locale-panel { position: static; width: auto; opacity: 1; transform: none; pointer-events: auto; box-shadow: none; background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
.drawer-bottom { margin-top: auto; display: grid; gap: 8px; }

/* ---------- Типографика и секции ---------- */
main { position: relative; }
.section { position: relative; padding: 128px 0; }
.section-tight { padding: 72px 0; }
.lazy-section { content-visibility: visible; }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ''; width: 6px; height: 6px; background: #fff; }
.eyebrow.glass { background: none; border: 0; padding: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }

.section-head { max-width: 760px; margin: 0 auto 64px; text-align: center; display: grid; justify-items: center; gap: 16px; }
.section-head.left { margin-left: 0; text-align: left; justify-items: start; }
.h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 4.6vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  background: linear-gradient(180deg, #fff 30%, #9a9a9a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.08em;
}
.h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1.3; letter-spacing: -0.02em; }
.lead { color: var(--muted); font-size: clamp(15px, 1.3vw, 18px); max-width: 600px; line-height: 1.55; }
.text-grad { color: #8a8a8a; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.reveal-scale { opacity: 0; transform: scale(0.98); transition: opacity 0.9s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.reveal-scale.in { opacity: 1; transform: none; }
.fade-up { opacity: 0; transform: translateY(12px); animation: fade-up 0.9s var(--ease) forwards; animation-delay: var(--d, 0.5s); }
@keyframes fade-up { to { opacity: 1; transform: none; } }
.fade-swap { animation: fade-swap 0.35s var(--ease); }
@keyframes fade-swap { from { opacity: 0; transform: translateY(4px); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(46, 194, 126, 0.55); } 80%, 100% { box-shadow: 0 0 0 7px rgba(46, 194, 126, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Первый экран ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--header-h) + 48px) 0 96px; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, rgba(0, 0, 0, 0.5) 78%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 55%, rgba(0, 0, 0, 0.5) 78%, transparent 100%);
}
.hero-scene { position: absolute; inset: 0; overflow: hidden; background: #000; transform: translate3d(0, var(--scene-y, 0px), 0); will-change: transform; animation: scene-in 1.6s var(--ease) backwards; }
@keyframes scene-in { from { opacity: 0; } }
.hero-scene canvas, .hero-scene .hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-scene canvas { image-rendering: pixelated; }
.hero-scene .hero-photo { object-fit: cover; filter: saturate(0.85) contrast(1.05); }
.hero-scene.has-media canvas, .hero-scene.has-media .scene-nametag, .hero-scene.has-media .hud { display: none; }
.scene-veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.86) 36%, rgba(0, 0, 0, 0.4) 62%, rgba(0, 0, 0, 0.2) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, transparent 22%);
}
.scene-veil::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px); background-size: 80px 80px; mask-image: linear-gradient(90deg, #000, transparent 60%); }

.hero-copy { display: grid; gap: 28px; justify-items: start; max-width: 720px; }
.hero-badge { display: inline-flex; align-items: center; gap: 10px; height: 30px; padding: 0 12px 0 4px; border-radius: 999px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.hero-badge.glass { background: rgba(0, 0, 0, 0.5); border-color: var(--line-2); }
.hero-badge .pulse { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: rgba(46, 194, 126, 0.12); color: var(--ok); font-weight: 600; font-size: 11px; letter-spacing: 0.06em; }
.hero-badge .pulse::before { content: ''; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--ok); animation: ping 1.8s infinite; }
.hero h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(44px, 6.6vw, 92px); line-height: 0.98; letter-spacing: -0.055em; }
/* запас снизу под «хвосты» букв (у, р, д) */
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.1em; }
.hero h1 .word { display: inline-block; transform: translateY(105%); opacity: 0; animation: word-up 1s var(--ease) forwards; animation-delay: calc(0.2s + var(--i) * 0.07s); }
.hero h1 .text-grad { color: #7d7d7d; }
@keyframes word-up { to { transform: none; opacity: 1; } }
.hero-sub { color: #b4b4b4; font-size: clamp(16px, 1.3vw, 19px); max-width: 520px; line-height: 1.55; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.platforms { display: flex; align-items: center; gap: 14px; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); }
.platforms-list { display: flex; gap: 6px; }
.platform-pill { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border-radius: var(--r-xs); font-family: var(--font-body); font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--text); transition: border-color 0.15s; }
.platform-pill.glass { background: rgba(0, 0, 0, 0.5); border-color: var(--line-2); }
.platform-pill:hover { border-color: var(--line-3); }
.platform-pill svg { width: 14px; height: 14px; }
.scroll-hint, .hero .scroll-hint { display: none; }

/* HUD и ник — только для запасной пиксельной сцены */
.hud { position: absolute; z-index: 2; font-family: var(--font-pixel); font-size: clamp(7px, 0.58vw, 11px); line-height: 1.5; color: #fff; text-shadow: 0.14em 0.14em 0 #3a3a3a; pointer-events: none; }
.hud-top { top: calc(var(--header-h) + 22px); right: 2.2vw; display: flex; gap: 1.4em; align-items: flex-start; }
.hud-col { display: grid; gap: 0.55em; justify-items: end; }
.hud-col b { color: #fff; font-weight: 400; }
.hud-box { background: rgba(0, 0, 0, 0.4); padding: 0.45em 0.7em; }
.hud-armor { display: grid; gap: 0.35em; }
.hud-armor div, .hud-effects div { display: flex; align-items: center; gap: 0.6em; justify-content: flex-end; }
.hud-armor i { width: 1.3em; height: 1.3em; display: inline-block; background: linear-gradient(135deg, #b9fff6, #33d6c4 50%, #188c84); }
.hud-effects i { width: 0.8em; height: 0.8em; border-radius: 50%; display: inline-block; }
.keystrokes { display: grid; grid-template-columns: repeat(3, 3.7em); gap: 0.35em; }
.keystrokes .k { height: 3.7em; display: grid; place-items: center; background: rgba(0, 0, 0, 0.45); transition: background-color 0.08s, color 0.08s; }
.keystrokes .k.on { background: rgba(255, 255, 255, 0.85); color: #000; text-shadow: none; }
.keystrokes .k.w { grid-column: 2; }
.keystrokes .mouse { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0.35em; }
.keystrokes .mouse .k { height: 4.3em; line-height: 1.4; text-align: center; }
.keystrokes .mouse small { display: block; font-size: 0.75em; opacity: 0.8; }
.keystrokes .space { grid-column: 1 / -1; height: 1.9em; }
.keystrokes .space::after { content: ''; width: 40%; height: 0.2em; background: currentColor; }
.scene-nametag { position: absolute; z-index: 1; left: 0; top: 0; white-space: nowrap; font-family: var(--font-pixel); font-size: clamp(7px, 0.55vw, 10px); color: #fff; background: rgba(0, 0, 0, 0.4); padding: 0.4em 0.6em; pointer-events: none; will-change: transform; }
.scene-nametag .hp { color: #ff5e5e; margin-left: 0.6em; }

/* ---------- Цифры ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats.glass { background: transparent; border-left: 0; border-right: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
.stat { padding: 36px 28px; display: grid; gap: 8px; position: relative; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-value { font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -0.045em; line-height: 1; }
.stat-label { font-family: var(--font-mono); color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Бенто: ячейки разделены линиями 1px ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.card { --mx: 50%; --my: 50%; position: relative; padding: 32px; overflow: hidden; isolation: isolate; transition: background-color 0.25s; }
.card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(360px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.06), transparent 50%); opacity: 0; transition: opacity 0.3s; }
.card:hover::before { opacity: 1; }
.bento .card, .bento .card.glass { background: #050505; border: 0; border-radius: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
.card .ico { width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center; margin-bottom: 24px; border: 1px solid var(--line-2); color: #fff; }
.card .ico svg { width: 18px; height: 18px; }
.card p { color: var(--muted); margin-top: 8px; font-size: 15px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }

.fps-chart { margin-top: 28px; display: grid; gap: 12px; }
.fps-row { display: grid; grid-template-columns: 84px 1fr 48px; align-items: center; gap: 14px; font-family: var(--font-mono); font-size: 12px; color: var(--dim); }
.fps-row .bar { height: 8px; border-radius: 2px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.fps-row .bar i { display: block; height: 100%; width: var(--w); background: #444; transform-origin: left; transform: scaleX(0); transition: transform 1.4s var(--ease) 0.2s; }
.fps-row.ours { color: #fff; }
.fps-row.ours .bar i { background: #fff; }
.in .fps-row .bar i { transform: scaleX(1); }
.fps-row b { text-align: right; font-weight: 500; }

.mods-cloud { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-xs); font-family: var(--font-mono); font-size: 12px; color: var(--muted); border: 1px solid var(--line); background: transparent; transition: color 0.15s, border-color 0.15s; }
.chip.glass { background: var(--surface); }
.chip:hover { color: var(--text); border-color: var(--line-3); }
.chip.on { color: #fff; border-color: var(--line-2); }
.chip.on::before { content: ''; width: 5px; height: 5px; background: #fff; }

.latency { margin-top: 26px; display: flex; align-items: flex-end; gap: 3px; height: 60px; }
.latency i { flex: 1; background: #2a2a2a; height: var(--h); transform-origin: bottom; animation: eq 1.6s var(--ease-in-out) infinite alternate; animation-delay: var(--d); }
.latency i.low { background: #fff; }
@keyframes eq { to { transform: scaleY(0.55); } }

.lang-flags { margin-top: 22px; display: flex; gap: 6px; flex-wrap: wrap; }
.lang-flags .tag { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px 0 8px; border-radius: var(--r-xs); border: 1px solid var(--line); font-size: 13px; }
.os-row { margin-top: 22px; display: flex; gap: 6px; }
.os-row span { width: 44px; height: 44px; border-radius: var(--r-sm); display: grid; place-items: center; border: 1px solid var(--line); }
.os-row svg { width: 20px; height: 20px; }

.marquee { position: relative; overflow: hidden; padding: 4px 0; mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.marquee + .marquee { margin-top: 8px; }
.marquee-track { display: flex; gap: 8px; width: max-content; animation: marquee 50s linear infinite; }
.marquee.reverse .marquee-track { animation-direction: reverse; animation-duration: 56s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee .chip { height: 36px; padding: 0 14px; font-size: 13px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Сравнение ---------- */
.compare-wrap { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.compare-wrap.glass { background: #050505; }
.compare-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare { width: 100%; border-collapse: collapse; min-width: 720px; }
.compare th, .compare td { padding: 18px 20px; text-align: center; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.compare th:first-child, .compare td:first-child { text-align: left; color: var(--muted); }
.compare thead th { font-family: var(--font-mono); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare .ours { background: rgba(255, 255, 255, 0.03); }
.compare thead .ours { color: #fff; }
.compare thead .ours .brand-mini { display: inline-flex; align-items: center; gap: 8px; }
.compare thead .ours svg { width: 16px; height: 16px; }
.mark { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; }
.mark svg { width: 14px; height: 14px; }
.mark.yes { color: #fff; }
.mark.no { color: #444; }
.mark.partial { color: var(--muted); }
.ours .mark.yes { background: #fff; color: #000; }
.compare-note { margin-top: 16px; text-align: center; font-size: 12.5px; color: var(--dim); }
.compare tbody tr { opacity: 0; transition: opacity 0.6s var(--ease), background-color 0.15s; transition-delay: calc(var(--i) * 0.05s); }
.compare tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.in .compare tbody tr { opacity: 1; }

/* ---------- Загрузка ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.dl-card { padding: 32px; display: grid; gap: 20px; align-content: start; background: #050505; transition: background-color 0.2s; }
.dl-card.glass { border: 0; background: #050505; -webkit-backdrop-filter: none; backdrop-filter: none; }
.dl-card:hover { background: #0a0a0a; }
.dl-card .os-ico { width: 48px; height: 48px; border-radius: var(--r); display: grid; place-items: center; border: 1px solid var(--line-2); }
.dl-card .os-ico svg { width: 22px; height: 22px; }
.dl-card .req { color: var(--muted); font-size: 14px; margin-top: 4px; }
.dl-card .meta { font-family: var(--font-mono); color: var(--dim); font-size: 12px; }
.dl-card .btn { width: 100%; }
.dl-card.recommended, .dl-card.recommended.glass { background: #0c0c0c; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.dl-card .rec-badge { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #000; background: #fff; padding: 3px 8px; border-radius: 4px; }
.dl-card .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.reqs { margin-top: 16px; padding: 18px 22px; border-radius: var(--r); display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; border: 1px solid var(--line); }
.reqs.glass { background: transparent; }
.reqs h4 { font-family: var(--font-mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); }
.reqs span { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.reqs svg { width: 15px; height: 15px; color: #fff; }
.dl-terms { margin-top: 16px; text-align: center; font-size: 12.5px; color: var(--dim); }
.dl-terms a, .prose a, .auth-terms a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }

/* ---------- FAQ: список с разделителями ---------- */
.faq { max-width: 860px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq-item, .faq-item.glass { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 24px 0; text-align: left; font-size: 17px; font-weight: 500; letter-spacing: -0.02em; color: var(--text); transition: color 0.15s; }
.faq-q:hover { color: #fff; }
.faq-q .pm { flex: none; width: 28px; height: 28px; border-radius: var(--r-xs); display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--muted); transition: transform 0.4s var(--ease), background-color 0.2s, color 0.2s; }
.faq-q .pm svg { width: 14px; height: 14px; }
.faq-item.open .pm { transform: rotate(45deg); background: #fff; color: #000; border-color: #fff; }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--ease); }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { padding: 0 48px 24px 0; color: var(--muted); max-width: 720px; }

/* ---------- Призыв ---------- */
.cta { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-lg); padding: 96px 32px; text-align: center; display: grid; justify-items: center; gap: 20px; border: 1px solid var(--line); background: #050505; }
.cta.glass { background: #050505; }
.cta::before { content: ''; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000, transparent 80%); }
.cta::after { content: ''; position: absolute; left: 50%; top: 0; width: 60%; height: 1px; translate: -50% 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent); }
.cta .big-mark { width: 48px; height: 48px; color: #fff; }
.cta .h2 { max-width: 720px; }

/* ---------- Подвал ---------- */
.site-footer { position: relative; padding: 72px 0 32px; margin-top: 40px; border-top: 1px solid var(--line); background: #000; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer-brand p { color: var(--muted); margin: 14px 0 20px; max-width: 280px; font-size: 14px; }
.socials { display: flex; gap: 6px; }
.socials a { width: 36px; height: 36px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line-2); transition: color 0.25s, border-color 0.25s, box-shadow 0.3s, background-color 0.25s; }
.socials a.glass { background: transparent; }
.socials a svg { width: 16px; height: 16px; transition: filter 0.3s; }
.socials a[data-brand='discord']:hover { color: #5865f2; border-color: rgba(88, 101, 242, 0.55); background: rgba(88, 101, 242, 0.1); box-shadow: 0 0 22px -4px rgba(88, 101, 242, 0.7); }
.socials a[data-brand='discord']:hover svg { filter: drop-shadow(0 0 6px rgba(88, 101, 242, 0.8)); }
.socials a[data-brand='telegram']:hover { color: #29b6f6; border-color: rgba(41, 182, 246, 0.55); background: rgba(41, 182, 246, 0.1); box-shadow: 0 0 22px -4px rgba(41, 182, 246, 0.7); }
.socials a[data-brand='telegram']:hover svg { filter: drop-shadow(0 0 6px rgba(41, 182, 246, 0.8)); }
.socials a[data-brand='youtube']:hover { color: #ff0033; border-color: rgba(255, 0, 51, 0.55); background: rgba(255, 0, 51, 0.1); box-shadow: 0 0 22px -4px rgba(255, 0, 51, 0.7); }
.socials a[data-brand='youtube']:hover svg { filter: drop-shadow(0 0 6px rgba(255, 0, 51, 0.8)); }
.socials a[data-brand='tiktok']:hover { color: #fff; border-color: rgba(254, 44, 85, 0.5); background: rgba(37, 244, 238, 0.06); box-shadow: -6px 0 20px -6px rgba(37, 244, 238, 0.7), 6px 0 20px -6px rgba(254, 44, 85, 0.7); }
.socials a[data-brand='tiktok']:hover svg { filter: drop-shadow(-1.5px -1px 0 #25f4ee) drop-shadow(1.5px 1px 0 #fe2c55); }
.footer-col h4 { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); margin-bottom: 14px; }
.footer-col ul { list-style: none; display: grid; gap: 9px; }
.footer-col a { color: var(--muted); font-size: 14px; transition: color 0.15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-family: var(--font-mono); color: var(--dim); font-size: 12px; }
.footer-word { display: block; width: 100%; height: auto; margin-top: 40px; }
.footer-word text { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.04em; }

/* ---------- Внутренние страницы ---------- */
.page-hero { padding: calc(var(--header-h) + 88px) 0 48px; }
.page-hero .section-head { margin-bottom: 0; }
.page-hero h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(38px, 6vw, 76px); letter-spacing: -0.055em; line-height: 1; background: linear-gradient(180deg, #fff 30%, #8f8f8f); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 0.08em; }

.panel { border-radius: var(--r-lg); padding: 28px; }
.panel.glass, .stat-card.glass, .pf-stat.glass, .news-card.glass, .item-card.glass, .empty-state.glass, .auth-card.glass, .prose section.glass, .toc.glass, .status-banner.glass, .pf-head.glass { background: rgba(8, 8, 8, 0.8); border-color: var(--line); }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.panel-title h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.panel-title .meta { font-size: 13px; color: var(--dim); }
.stack { display: grid; gap: 16px; }
.hint { font-size: 12.5px; color: var(--dim); }
.sec-label { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; display: block; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid transparent; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.operational { color: var(--ok); background: rgba(46, 194, 126, 0.08); border-color: rgba(46, 194, 126, 0.2); }
.pill.degraded { color: var(--warn); background: rgba(245, 165, 36, 0.08); border-color: rgba(245, 165, 36, 0.2); }
.pill.down { color: var(--bad); background: rgba(242, 85, 90, 0.08); border-color: rgba(242, 85, 90, 0.2); }
.pill.maintenance { color: var(--info); background: rgba(62, 139, 255, 0.08); border-color: rgba(62, 139, 255, 0.2); }
.pill.neutral { color: var(--muted); border-color: var(--line-2); }
.pill.neutral::before { display: none; }

/* Статус */
.status-banner { display: flex; align-items: center; gap: 18px; padding: 24px 28px; border-radius: var(--r-lg); margin-bottom: 16px; border: 1px solid var(--line); }
.status-banner .big-dot { position: relative; width: 12px; height: 12px; border-radius: 50%; background: currentColor; flex: none; }
.status-banner .big-dot::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid currentColor; opacity: 0.4; animation: ring 2s var(--ease) infinite; }
@keyframes ring { from { transform: scale(0.6); opacity: 0.6; } to { transform: scale(1.7); opacity: 0; } }
.status-banner h2 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.status-banner p { color: var(--dim); font-size: 13px; }
.status-banner.operational { color: var(--ok); }
.status-banner.degraded { color: var(--warn); }
.status-banner.down { color: var(--bad); }
.status-banner.maintenance { color: var(--info); }
.status-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 16px; align-items: start; }
.svc { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.svc:last-child { border-bottom: 0; padding-bottom: 0; }
.svc:first-child { padding-top: 0; }
.svc-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 500; }
.uptime { display: flex; gap: 2px; height: 28px; }
.uptime i { flex: 1; border-radius: 1px; background: var(--ok); opacity: 0.8; }
.uptime i.degraded { background: var(--warn); }
.uptime i.down { background: var(--bad); }
.uptime i.maintenance { background: var(--info); }
.uptime i.nodata { background: rgba(255, 255, 255, 0.07); opacity: 1; }
.uptime-meta { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); }
.kv { display: grid; gap: 12px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.kv span { color: var(--muted); }
.kv b { font-family: var(--font-mono); font-weight: 500; font-size: 13px; }
.timeline { display: grid; }
.tl-item { position: relative; padding: 0 0 22px 22px; border-left: 1px solid var(--line-2); margin-left: 4px; }
.tl-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.tl-item::before { content: ''; position: absolute; left: -5px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: #000; border: 1px solid #fff; }
.tl-item .ver { font-family: var(--font-mono); font-weight: 500; font-size: 13px; }
.tl-item .date { color: var(--dim); font-size: 12px; margin-left: 8px; }
.tl-item .kind { margin: 0 0 0 8px; }
.tl-item ul, .log-item ul { list-style: none; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.tl-item li, .log-item li { position: relative; padding-left: 14px; }
.tl-item li::before, .log-item li::before { content: ''; position: absolute; left: 0; top: 10px; width: 5px; height: 1px; background: var(--muted); }
.kind { display: inline-flex; height: 20px; align-items: center; padding: 0 7px; border-radius: 4px; font-family: var(--font-mono); font-size: 11px; border: 1px solid var(--line-2); color: var(--muted); }
.kind.major { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.kind.hotfix { color: #ff8f93; border-color: rgba(242, 85, 90, 0.35); }

/* Вкладки-сегменты (белая подсветка ездит под активной) */
.tabs { display: inline-flex; flex-wrap: nowrap; gap: 2px; padding: 3px; border-radius: 10px; position: relative; max-width: 100%; overflow-x: auto; scrollbar-width: none; cursor: grab; touch-action: pan-x; -webkit-user-select: none; user-select: none; border: 1px solid var(--line-2); }
.tabs.glass { background: var(--surface); }
.tabs::-webkit-scrollbar { display: none; }
.tabs.dragging { cursor: grabbing; }
.tabs.dragging .tab { pointer-events: none; }
.tab { position: relative; z-index: 1; flex: none; white-space: nowrap; padding: 7px 14px; border-radius: 7px; font-size: 13.5px; font-weight: 500; color: var(--muted); transition: color 0.2s; }
.tab:hover { color: var(--text); }
.tab.active { color: #000; }
.tabs .tab-ind { position: absolute; z-index: 0; top: 0; left: 0; border-radius: 7px; background: #ededed; transition: transform 0.4s var(--ease), width 0.4s var(--ease); }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-sm); border: 1px solid var(--line); }
.seg button { padding: 5px 11px; border-radius: 5px; font-size: 13px; font-weight: 500; color: var(--muted); transition: background-color 0.15s, color 0.15s; white-space: nowrap; }
.seg button.active { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* Магазин */
.shop-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.shop-cur { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: var(--r-sm); font-size: 13px; color: var(--muted); }
.shop-cur.glass { background: transparent; border-color: var(--line-2); }
[data-shop] { min-height: 420px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.shop-cat-empty { grid-column: 1 / -1; text-align: center; padding: 48px 24px; }
.shop-cat-empty .lead { margin: 0 auto; }
.item-card { border-radius: var(--r-lg); overflow: hidden; display: grid; transition: border-color 0.2s, transform 0.3s var(--ease); }
.item-card:hover { border-color: var(--line-3); transform: translateY(-2px); }
.item-media { aspect-ratio: 1; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.06), transparent 70%); border-bottom: 1px solid var(--line); }
.item-media img { width: 70%; height: 70%; object-fit: contain; }
.item-media .ph { width: 56px; height: 56px; color: var(--dim); }
.item-body { padding: 16px; display: grid; gap: 10px; }
.item-body .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.item-price { font-family: var(--font-mono); font-weight: 500; }
.rarity { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.rarity.common { color: #a1a1a1; }
.rarity.rare { color: #6fb6ff; }
.rarity.epic { color: #c08bff; }
.rarity.legendary { color: #f5a524; }

.empty-state { border-radius: var(--r-lg); padding: 80px 28px; text-align: center; display: grid; justify-items: center; gap: 14px; position: relative; overflow: hidden; border: 1px solid var(--line); }
.empty-state .lead { margin: 0 auto; }
.empty-state .h2 { font-size: clamp(24px, 3vw, 34px); }
.empty-art { position: relative; width: 120px; height: 120px; margin-bottom: 8px; }
.empty-art .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed var(--line-3); animation: spin 40s linear infinite; }
.empty-art .ring.r2 { inset: 16px; border-style: solid; border-color: var(--line); animation-duration: 28s; animation-direction: reverse; }
.empty-art .core { position: absolute; inset: 34px; border-radius: 14px; display: grid; place-items: center; border: 1px solid var(--line-2); background: #0a0a0a; }
.empty-art .core svg { width: 24px; height: 24px; }
.empty-art .sat { position: absolute; top: -3px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #fff; }

/* Вход */
.auth-page { min-height: 100svh; display: grid; place-items: center; padding: calc(var(--header-h) + 40px) 0 60px; }
.auth-card { width: min(420px, 100%); border-radius: var(--r-lg); padding: 36px 32px; display: grid; gap: 22px; position: relative; overflow: hidden; }
.auth-card .logo-big { width: 52px; height: 52px; border-radius: var(--r); display: grid; place-items: center; border: 1px solid var(--line-2); margin: 0 auto; }
.auth-card .logo-big svg { width: 26px; height: 26px; }
.auth-card h1 { font-size: 26px; font-weight: 600; text-align: center; letter-spacing: -0.04em; }
.auth-card .lead { text-align: center; font-size: 14.5px; margin: 0 auto; }
.auth-perks { display: grid; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.auth-perks li { list-style: none; display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.auth-perks svg { width: 16px; height: 16px; color: #fff; flex: none; }
.auth-terms { font-size: 12px; color: var(--dim); text-align: center; }
.auth-alt { font-size: 13.5px; color: var(--muted); text-align: center; }
.auth-alt a { color: var(--text); font-weight: 500; }
.why { border-radius: var(--r); padding: 14px 16px; font-size: 13px; color: var(--muted); display: flex; gap: 12px; }
.why.glass { background: transparent; border-color: var(--line); }
.why svg { width: 16px; height: 16px; flex: none; color: #fff; margin-top: 2px; }
.why b { color: var(--text); display: block; margin-bottom: 2px; font-weight: 500; }
.demo-badge { position: absolute; top: 16px; right: 16px; }

/* Формы */
.field { display: grid; gap: 8px; }
.field label { font-size: 13px; font-weight: 500; color: var(--muted); }
.field small { font-size: 12px; color: var(--dim); }
.input, .select, .textarea { width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r-sm); background: #0a0a0a; border: 1px solid var(--line-2); color: var(--text); font-size: 14px; transition: border-color 0.15s, box-shadow 0.15s; }
.input.glass { background: rgba(10, 10, 10, 0.8); border-color: var(--line-2); }
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1a1' stroke-width='2'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; background-size: 15px; padding-right: 34px; }
.select option { background: #0a0a0a; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: #666; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08); }
.input.invalid { border-color: var(--bad); }
.form-error { font-size: 13px; color: var(--bad); min-height: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.lang-fields { display: grid; gap: 10px; }
.lang-field { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.lang-field .flag { margin-top: 13px; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--muted); user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; width: 34px; height: 20px; border-radius: 99px; background: #222; border: 1px solid var(--line-2); transition: background-color 0.2s, border-color 0.2s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #888; transition: transform 0.25s var(--ease), background-color 0.2s; }
.switch input:checked + .track { background: #ededed; border-color: #ededed; }
.switch input:checked + .track::after { transform: translateX(14px); background: #000; }
.switch input:focus-visible + .track { outline: 2px solid #fff; outline-offset: 2px; }
.switch.danger input:checked + .track { background: var(--bad); border-color: var(--bad); }

/* Модалка, боковая панель, тосты */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; visibility: hidden; }
.modal.open { visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.75); opacity: 0; transition: opacity 0.25s; }
.modal.open .modal-backdrop, .sheet.open .modal-backdrop { opacity: 1; }
.modal-card { position: relative; width: min(440px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 28px; border-radius: var(--r-lg); display: grid; gap: 16px; background: #0a0a0a; border: 1px solid var(--line-2); box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.9); opacity: 0; transform: translateY(8px) scale(0.98); transition: opacity 0.2s, transform 0.3s var(--ease); }
.modal.open .modal-card { opacity: 1; transform: none; }
.modal-card h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.modal-card p { color: var(--muted); font-size: 14px; }
.modal-close { position: absolute; top: 12px; right: 12px; }
.lightbox .modal-card { width: min(1100px, 100%); padding: 8px; background: #000; }
.lightbox .modal-card img { width: 100%; max-height: 82vh; object-fit: contain; border-radius: var(--r); }
.sheet { position: fixed; inset: 0; z-index: 90; visibility: hidden; }
.sheet.open { visibility: visible; }
.sheet-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); display: flex; flex-direction: column; background: #0a0a0a; border-left: 1px solid var(--line-2); box-shadow: -30px 0 80px -20px rgba(0, 0, 0, 0.8); transform: translateX(100%); transition: transform 0.4s var(--ease); }
.sheet.open .sheet-panel { transform: none; }
.sheet-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.sheet-head .close { margin-left: auto; }
.sheet-body { flex: 1; overflow-y: auto; padding: 20px; display: grid; gap: 22px; align-content: start; }
.sheet-foot { display: flex; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.sheet-foot .grow { flex: 1; }
.toasts { position: fixed; z-index: 120; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-sm); font-size: 13.5px; font-weight: 500; background: #ededed; color: #000; box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.8); animation: toast-in 0.35s var(--ease); }
.toast svg { width: 16px; height: 16px; flex: none; }
.toast.out { animation: toast-out 0.25s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r); font-size: 13.5px; color: #f5c46b; border: 1px solid rgba(245, 165, 36, 0.25); background: rgba(245, 165, 36, 0.05); }
.notice svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.notice.info { color: #9cc2ff; border-color: rgba(62, 139, 255, 0.25); background: rgba(62, 139, 255, 0.05); }
.notice[hidden] { display: none; }
.badge-demo { font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border: 1px solid var(--line-2); padding: 3px 8px; border-radius: 4px; }

/* Роли и присутствие */
.role-chip { --c: var(--muted); display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--text); border: 1px solid var(--line-2); white-space: nowrap; }
.role-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.role-pick { display: grid; gap: 4px; }
.role-pick label { --c: var(--muted); display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.role-pick label:hover { border-color: var(--line-2); }
.role-pick label .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.role-pick label b { font-weight: 500; font-size: 14px; flex: 1; }
.role-pick input { width: 16px; height: 16px; accent-color: #fff; }
.role-pick label:has(input:checked) { border-color: var(--line-3); background: rgba(255, 255, 255, 0.03); }
.role-pick label.locked { opacity: 0.55; cursor: not-allowed; }
.presence { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--dim); }
.presence::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #444; }
.presence.online { color: var(--ok); }
.presence.online::before { background: var(--ok); animation: ping 2s infinite; }

/* Поиск */
.search-box { position: relative; width: min(320px, 100%); display: block; }
.search-box > [data-icon], .search-box > svg { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 15px; height: 15px; color: var(--dim); display: flex; pointer-events: none; z-index: 1; }
.search-box > [data-icon] svg { width: 100%; height: 100%; }
.search-box .input { padding-left: 36px; }

/* Профиль */
.pf-search { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.pf-head { position: relative; display: flex; align-items: center; gap: 28px; padding: 32px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.pf-avatar { position: relative; width: 112px; height: 112px; flex: none; }
.pf-avatar img { width: 100%; height: 100%; border-radius: 14px; image-rendering: pixelated; background: #111; border: 1px solid var(--line-2); }
.pf-avatar .dot { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; background: #444; border: 4px solid #080808; }
.pf-avatar .dot.online { background: var(--ok); }
.pf-info { display: grid; gap: 10px; min-width: 0; flex: 1; }
.pf-info h1 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 600; letter-spacing: -0.05em; line-height: 1; word-break: break-all; }
.pf-roles { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 13px; color: var(--dim); }
/* кнопки профиля всегда в одну строку — «выйти» не съезжает вниз */
.pf-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: nowrap; flex: none; align-self: flex-start; }
.pf-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; margin-top: 12px; align-items: start; }
.pf-grid > * { min-width: 0; }
.pf-side { display: grid; gap: 12px; align-content: start; }
.pf-stat { border-radius: var(--r-lg); padding: 18px 20px; display: grid; gap: 4px; }
.pf-stat .v { font-size: 26px; font-weight: 600; letter-spacing: -0.04em; }
.pf-stat .l { font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dim); }
.heatmap-wrap { overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.heatmap { display: grid; grid-template-columns: 26px auto; gap: 6px; width: max-content; }
.hm-months { grid-column: 2; position: relative; height: 14px; font-family: var(--font-mono); font-size: 11px; color: var(--dim); }
.hm-months span { position: absolute; top: 0; white-space: nowrap; }
.hm-days { display: grid; grid-template-rows: repeat(7, 12px); gap: 3px; font-family: var(--font-mono); font-size: 10px; color: var(--dim); line-height: 12px; }
.hm-grid { display: grid; grid-template-rows: repeat(7, 12px); grid-auto-flow: column; grid-auto-columns: 12px; gap: 3px; }
.hm-grid i { width: 12px; height: 12px; border-radius: 2px; background: #161616; transition: transform 0.12s; }
.hm-grid i.l1, .hm-legend i.l1 { background: #3a3a3a; }
.hm-grid i.l2, .hm-legend i.l2 { background: #6e6e6e; }
.hm-grid i.l3, .hm-legend i.l3 { background: #b0b0b0; }
.hm-grid i.l4, .hm-legend i.l4 { background: #fff; }
.hm-grid i.future { visibility: hidden; }
.hm-grid i:hover { transform: scale(1.35); outline: 1px solid #fff; }
.hm-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 12px; font-family: var(--font-mono); font-size: 11px; color: var(--dim); }
.hm-legend i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; background: #161616; }
.hm-legend span { margin: 0 4px; }
.hm-tip { position: fixed; z-index: 120; pointer-events: none; padding: 6px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 500; background: #ededed; color: #000; white-space: nowrap; transform: translate(-50%, calc(-100% - 8px)); opacity: 0; transition: opacity 0.1s; }
.hm-tip.on { opacity: 1; }
.cosm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cosm { border-radius: var(--r); padding: 12px; display: grid; gap: 8px; border: 1px solid var(--line); transition: border-color 0.15s; }
.cosm:hover { border-color: var(--line-3); }
.cosm .thumb { aspect-ratio: 1; border-radius: var(--r-sm); display: grid; place-items: center; background: #0d0d0d; overflow: hidden; }
.cosm .thumb img { width: 80%; height: 80%; object-fit: contain; }
.cosm .thumb svg { width: 32px; height: 32px; color: var(--dim); }
.cosm b { font-size: 14px; font-weight: 500; }
.mini-empty { display: grid; justify-items: center; gap: 12px; padding: 36px 16px; text-align: center; color: var(--muted); }
.mini-empty > svg { width: 26px; height: 26px; color: var(--dim); }

/* Новости */
.news-filters { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 28px; }
.news-filters button { height: 32px; padding: 0 12px; border-radius: var(--r-sm); font-size: 13px; color: var(--muted); border: 1px solid var(--line-2); transition: color 0.15s, border-color 0.15s, background-color 0.15s; }
.news-filters button:hover { color: var(--text); border-color: var(--line-3); }
.news-filters button.active { color: #000; background: #ededed; border-color: #ededed; }
.cover-art { position: relative; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; background: #070707; }
.cover-art::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px); background-size: 32px 32px; mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%); }
.cover-art svg { position: relative; width: 18%; max-width: 72px; color: #fff; }
.news-feature { display: grid; grid-template-columns: 1.35fr 1fr; border-radius: var(--r-lg); overflow: hidden; margin-bottom: 12px; border: 1px solid var(--line); transition: border-color 0.2s; }
.news-feature.glass { background: #050505; }
.news-feature:hover { border-color: var(--line-3); }
.news-feature .media { position: relative; min-height: 360px; overflow: hidden; border-right: 1px solid var(--line); }
.news-feature .media img, .news-card .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.news-feature:hover .media img, .news-card:hover .media img { transform: scale(1.03); }
.news-feature .body { padding: 40px; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.news-feature h2 { font-size: clamp(26px, 2.8vw, 38px); font-weight: 600; letter-spacing: -0.045em; line-height: 1.05; }
.news-feature p { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.news-card { border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.2s; }
.news-card:hover { border-color: var(--line-3); }
.news-card .media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line); }
.news-card .body { padding: 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.news-card h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.25; }
.news-card p { color: var(--muted); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-family: var(--font-mono); font-size: 12px; color: var(--dim); }
.news-meta .pill { font-family: var(--font-body); }
.read-more { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; color: var(--text); margin-top: auto; }
.read-more svg { width: 15px; height: 15px; transition: transform 0.25s var(--ease); }
a:hover .read-more svg { transform: translateX(3px); }
.pin-badge { display: inline-flex; align-items: center; gap: 6px; color: #fff; }
.article { max-width: 780px; margin: 0 auto; display: grid; gap: 28px; }
.article-back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; justify-self: start; transition: color 0.15s; }
.article-back:hover { color: #fff; }
.article-back svg { width: 15px; height: 15px; transform: scaleX(-1); }
.article h1 { font-size: clamp(34px, 5vw, 60px); font-weight: 600; letter-spacing: -0.055em; line-height: 1.02; }
.article-cover { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 8; border: 1px solid var(--line); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-body { display: grid; gap: 18px; font-size: 17px; line-height: 1.75; color: #cfcfcf; }
.article-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.article-media .m { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #0a0a0a; aspect-ratio: 16 / 10; }
.article-media .m.wide { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.article-media img, .article-media video, .article-media iframe { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.article-media button.m { cursor: zoom-in; padding: 0; }

/* Юридическое */
.legal-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); border-radius: var(--r); padding: 8px; display: grid; gap: 2px; }
.toc a { padding: 8px 10px; border-radius: var(--r-xs); color: var(--muted); font-size: 13.5px; transition: background-color 0.15s, color 0.15s; }
.toc a:hover, .toc a.active { color: #fff; background: rgba(255, 255, 255, 0.06); }
.prose { display: grid; gap: 12px; }
.prose section { border-radius: var(--r-lg); padding: 32px; display: grid; gap: 14px; scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.prose p { color: var(--muted); }

/* 404 */
.nf { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 120px 24px 60px; }
.nf .code { font-weight: 700; font-size: clamp(110px, 24vw, 240px); line-height: 0.9; letter-spacing: -0.07em; background: linear-gradient(180deg, #fff, rgba(255, 255, 255, 0.05)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf .inner { display: grid; gap: 18px; justify-items: center; }
.no-access { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.no-access .panel { max-width: 420px; display: grid; gap: 14px; justify-items: center; border: 1px solid var(--line); }
.no-access .panel > svg { width: 32px; height: 32px; color: var(--dim); }
.tab-panel { animation: panel-in 0.4s var(--ease); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* =========================================================
   Админка
   ========================================================= */
.adm { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; background: #000; }
.adm-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 20px 12px 16px; border-right: 1px solid var(--line); background: #000; overflow-y: auto; z-index: 70; }
.adm-brand { display: flex; align-items: center; gap: 9px; padding: 0 8px 18px; font-weight: 600; font-size: 13px; letter-spacing: 0.18em; white-space: nowrap; }
.adm-brand svg { width: 20px; height: 20px; flex: none; }
.adm-brand span { font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.08em; color: var(--dim); padding: 2px 6px; border: 1px solid var(--line-2); border-radius: 4px; }
.adm-group { display: grid; gap: 1px; margin-bottom: 14px; }
.adm-label { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: #4a4a4a; padding: 0 8px 6px; }
.adm-link { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border-radius: 6px; font-size: 13.5px; font-weight: 500; color: #8f8f8f; text-align: left; transition: color 0.12s, background-color 0.12s; }
.adm-link svg { width: 15px; height: 15px; opacity: 0.6; }
.adm-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.adm-link.active { color: #fff; background: rgba(255, 255, 255, 0.07); }
.adm-link.active svg { opacity: 1; }
.adm-link .count { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--dim); }
.adm-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.adm-langs { display: flex; gap: 4px; }
.adm-langs button { flex: 1; display: grid; place-items: center; padding: 6px; border-radius: 6px; opacity: 0.4; transition: opacity 0.12s, background-color 0.12s; }
.adm-langs button.active, .adm-langs button:hover { opacity: 1; background: rgba(255, 255, 255, 0.05); }
.adm-me { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: 13px; font-weight: 500; transition: background-color 0.12s; }
.adm-me:hover { background: rgba(255, 255, 255, 0.04); }
.adm-me img { width: 28px; height: 28px; border-radius: 6px; image-rendering: pixelated; }
.adm-me small { display: block; font-size: 11.5px; color: var(--dim); }
.adm-me > svg { margin-left: auto; width: 14px; height: 14px; color: var(--dim); }
.adm-main { min-width: 0; padding: 28px 40px 80px; }
.adm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.adm-head h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.045em; }
.adm-head p { color: var(--dim); font-size: 14px; margin-top: 2px; }
.adm-head .titles { display: flex; align-items: center; gap: 12px; }
.adm-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.adm-menu { display: none; }
.adm-view { animation: panel-in 0.35s var(--ease); display: grid; gap: 16px; }
.adm-view.still { animation: none; }
.a-card { border-radius: var(--r); border: 1px solid var(--line); background: #050505; padding: 20px; min-width: 0; }
.a-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.a-card-head h3 { font-size: 14px; font-weight: 600; }
.a-card-head .meta { font-size: 12.5px; color: var(--dim); }
.a-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.a-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.a-kpi { padding: 18px 20px; display: grid; gap: 6px; background: #050505; }
.a-kpi .l { font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dim); display: flex; align-items: center; gap: 8px; }
.a-kpi .l svg { width: 14px; height: 14px; }
.a-kpi .v { font-size: 30px; font-weight: 600; letter-spacing: -0.04em; }
.a-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.a-row:last-child { border-bottom: 0; padding-bottom: 0; }
.a-row:first-child { padding-top: 0; }
.a-row .grow { flex: 1; min-width: 0; }
.a-row .grow b { display: block; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-row .grow small { display: block; color: var(--dim); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-row img.head { width: 28px; height: 28px; border-radius: 6px; image-rendering: pixelated; flex: none; }
.a-row .thumb { width: 54px; height: 34px; border-radius: 6px; overflow: hidden; flex: none; border: 1px solid var(--line); }
.a-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.a-row .thumb .cover-art svg { width: 36%; }
.status-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.status-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-dot.operational { color: var(--ok); }
.status-dot.degraded { color: var(--warn); }
.status-dot.down { color: var(--bad); }
.status-dot.maintenance { color: var(--info); }
.status-dot.unknown, .status-dot.checking, .status-dot.nodata { color: var(--dim); }
.status-dot.checking::before { animation: ping 1.2s infinite; }
.a-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.a-toolbar .search-box { width: 260px; }
.a-toolbar .search-box .input { height: 34px; }
.a-toolbar .meta { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--dim); }
.a-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.a-table th { text-align: left; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); padding: 4px 14px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.a-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.a-table tbody tr { cursor: pointer; transition: background-color 0.12s; }
.a-table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.a-table tbody tr:last-child td { border-bottom: 0; }
.a-table .who { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.a-table .av { position: relative; flex: none; }
.a-table .av img { width: 30px; height: 30px; border-radius: 7px; image-rendering: pixelated; display: block; }
.a-table .av i { position: absolute; right: -3px; bottom: -3px; width: 10px; height: 10px; border-radius: 50%; background: #444; border: 2px solid #050505; }
.a-table .av i.on { background: var(--ok); }
.a-table .roles { display: flex; gap: 4px; flex-wrap: wrap; }
.a-table td.end { text-align: right; width: 30px; }
.a-table td.end svg { width: 15px; height: 15px; color: var(--dim); transform: rotate(-90deg); }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.svc-card { border-radius: var(--r); border: 1px solid var(--line); background: #000; padding: 16px; display: grid; gap: 12px; transition: border-color 0.15s; }
.svc-card:hover { border-color: var(--line-2); }
.svc-card .top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.svc-card .name { font-weight: 500; font-size: 14px; }
.svc-card .lat { font-size: 24px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.svc-card .lat small { font-size: 12px; color: var(--dim); font-weight: 400; letter-spacing: 0; margin-left: 8px; }
.svc-card .url { font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-card .bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.mini-bars { display: flex; gap: 2px; height: 20px; }
.mini-bars i { flex: 1; border-radius: 1px; background: #1a1a1a; }
.mini-bars i.operational { background: rgba(46, 194, 126, 0.75); }
.mini-bars i.degraded { background: var(--warn); }
.mini-bars i.down { background: var(--bad); }
.ver-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ver-tile { padding: 18px 20px; display: grid; gap: 6px; background: #000; }
.ver-tile .l { font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dim); }
.ver-tile .v { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.log-item { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.log-item:last-child { border-bottom: 0; padding-bottom: 0; }
.log-item:first-child { padding-top: 0; }
.log-item .ver { font-family: var(--font-mono); font-weight: 500; font-size: 14px; }
.log-item .date { font-size: 12.5px; color: var(--dim); margin-top: 4px; }
.log-item .kind { margin-top: 8px; }
.log-item .acts { display: flex; gap: 4px; align-items: flex-start; }
.rates-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.a-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.a-item { text-align: left; border-radius: var(--r); border: 1px solid var(--line); background: #050505; overflow: hidden; display: grid; grid-template-rows: auto 1fr; transition: border-color 0.15s; }
.a-item:hover { border-color: var(--line-3); }
.a-item .img { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.05), transparent 70%); }
.a-item .img img { width: 70%; height: 70%; object-fit: contain; }
.a-item .img > svg { width: 32px; height: 32px; color: var(--dim); }
.a-item .img .pill { position: absolute; top: 10px; left: 10px; }
.a-item .info { padding: 14px; display: grid; gap: 6px; align-content: start; }
.a-item .info b { font-size: 14px; font-weight: 500; }
.a-item .price { font-family: var(--font-mono); font-weight: 500; font-size: 16px; }
.a-item .conv { font-size: 12px; color: var(--dim); }
.a-item.add { place-items: center; align-content: center; gap: 10px; min-height: 230px; border-style: dashed; color: var(--muted); font-size: 14px; grid-template-rows: none; background: transparent; }
.a-item.add svg { width: 22px; height: 22px; }
.price-preview { display: flex; flex-wrap: wrap; gap: 6px; }
.price-preview span { font-family: var(--font-mono); font-size: 12px; padding: 3px 7px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }
.news-admin { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.news-list { display: grid; gap: 2px; max-height: calc(100vh - 230px); overflow-y: auto; overflow-x: hidden; }
.news-list button { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 10px; border-radius: var(--r-sm); text-align: left; border: 1px solid transparent; transition: background-color 0.12s, border-color 0.12s; }
.news-list button:hover { background: rgba(255, 255, 255, 0.03); }
.news-list button.active { background: rgba(255, 255, 255, 0.05); border-color: var(--line-2); }
.news-list .thumb { width: 64px; height: 40px; border-radius: 6px; overflow: hidden; flex: none; border: 1px solid var(--line); }
.news-list .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-list .thumb .cover-art svg { width: 34%; }
.news-list .grow { min-width: 0; flex: 1; }
.news-list b { display: block; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-list small { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--dim); margin-top: 3px; overflow: hidden; white-space: nowrap; }
.st-pill { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; border: 1px solid; }
.st-pill.published { color: var(--ok); border-color: rgba(46, 194, 126, 0.3); }
.st-pill.draft { color: var(--warn); border-color: rgba(245, 165, 36, 0.3); }
.editor { display: grid; gap: 20px; }
.editor-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.editor-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--dim); }
.editor-meta b { color: var(--muted); font-weight: 500; }
.editor .title-input { height: 50px; font-size: 20px; font-weight: 600; letter-spacing: -0.03em; }
.editor .textarea { min-height: 220px; }
.editor-foot { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--line); }
.editor-foot .grow { flex: 1; }
.dropzone { position: relative; display: grid; place-items: center; align-content: center; gap: 8px; min-height: 140px; padding: 20px; border-radius: var(--r); border: 1px dashed var(--line-3); text-align: center; color: var(--muted); font-size: 14px; cursor: pointer; overflow: hidden; transition: border-color 0.15s, background-color 0.15s; }
.dropzone:hover, .dropzone.drag { border-color: #fff; background: rgba(255, 255, 255, 0.03); }
.dropzone > svg { width: 22px; height: 22px; color: var(--dim); }
.dropzone.has { padding: 0; border-style: solid; border-color: var(--line-2); aspect-ratio: 16 / 8; min-height: 0; cursor: default; }
.dropzone.has img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dropzone.square.has { aspect-ratio: 4 / 3; }
.dropzone.square.has img { object-fit: contain; padding: 12%; }
.dropzone .dz-actions { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.media-tile { position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line-2); background: #0a0a0a; display: grid; place-items: center; color: var(--muted); }
.media-tile img, .media-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-tile .kind-b { position: absolute; left: 6px; bottom: 6px; padding: 2px 6px; border-radius: 4px; background: rgba(0, 0, 0, 0.75); color: #fff; font-family: var(--font-mono); font-size: 10.5px; }
.media-tile .rm { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, 0.8); color: #fff; }
.media-tile .rm svg { width: 13px; height: 13px; }
.inline-add { display: flex; gap: 8px; }
.lang-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-sm); border: 1px solid var(--line); }
.lang-tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 5px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.lang-tabs button.active { background: rgba(255, 255, 255, 0.1); color: #fff; }
.lang-tabs .filled { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }

/* =========================================================
   Адаптив
   ========================================================= */
@media (max-width: 1080px) {
  .hero-copy { justify-items: center; text-align: center; margin: 0 auto; }
  .hero-sub { margin: 0 auto; }
  .hero-cta, .platforms { justify-content: center; }
  .scene-veil { background: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.8) 40%, rgba(0, 0, 0, 0.7) 100%); }
  .hero h1 .text-grad { color: #9a9a9a; }
  .scene-veil::after { mask-image: linear-gradient(180deg, #000, transparent 70%); }
  .keystrokes { display: none; }
  .bento .span-2, .bento .span-3, .bento .span-4 { grid-column: span 3; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .status-grid { grid-template-columns: 1fr; }
  .news-feature { grid-template-columns: 1fr; }
  .news-feature .media { min-height: 0; aspect-ratio: 16 / 9; border-right: 0; border-bottom: 1px solid var(--line); }
  .pf-grid { grid-template-columns: minmax(0, 1fr); }
  .pf-side { grid-template-columns: repeat(2, 1fr); }
  .news-admin { grid-template-columns: 1fr; }
  .news-list { max-height: 300px; }
  .a-grid-2 { grid-template-columns: 1fr; }
  .a-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --header-h: 58px; }
  .nav-links, .nav-actions .hide-m { display: none; }
  .burger { display: inline-flex; }
  .auth-slot .user-chip { padding: 0 3px; }
  .auth-slot .user-chip .nick, .auth-slot .btn span { display: none; }
  .auth-slot .btn { width: 34px; padding: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .dl-grid { grid-template-columns: 1fr; }
  .legal-layout { grid-template-columns: 1fr; }
  .toc { position: static; display: flex; overflow-x: auto; gap: 2px; }
  .toc a { white-space: nowrap; }
  .adm { grid-template-columns: 1fr; }
  .adm-side { position: fixed; left: 0; width: 250px; transform: translateX(-100%); transition: transform 0.35s var(--ease); box-shadow: 30px 0 60px -20px rgba(0, 0, 0, 0.8); }
  .adm-side.open { transform: none; }
  .adm-menu { display: inline-flex; }
  .adm-main { padding: 18px 16px 60px; }
  .ver-tiles { grid-template-columns: 1fr; }
  .log-item { grid-template-columns: 1fr auto; }
  .log-item ul { grid-column: 1 / -1; grid-row: 2; }
  .a-toolbar .search-box { width: 100%; }
  .a-table .hide-sm { display: none; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 88px 0; }
  .section-head { margin-bottom: 40px; }
  .hero { padding: calc(var(--header-h) + 32px) 0 64px; }
  .hero h1 { font-size: clamp(36px, 11vw, 52px); }
  .hero-copy { gap: 22px; }
  .hero-sub { font-size: 15.5px; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1 1 100%; }
  .platforms { flex-direction: column; gap: 10px; }
  .hud-top { display: none; }
  .bento { grid-template-columns: 1fr; }
  .bento .span-2, .bento .span-3, .bento .span-4 { grid-column: auto; }
  .card { padding: 24px; }
  .stat { padding: 24px 16px; }
  .compare th, .compare td { padding: 14px 12px; font-size: 13.5px; }
  .faq-q { font-size: 16px; padding: 20px 0; }
  .faq-a p { padding-right: 0; }
  .cta { padding: 64px 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; }
  .locale-panel { width: min(300px, calc(100vw - 32px)); }
  .pf-head { flex-direction: column; text-align: center; padding: 26px 18px; }
  .pf-roles, .pf-meta { justify-content: center; }
  .pf-actions { margin: 0; justify-content: center; align-self: center; flex-wrap: wrap; }
  .pf-search { justify-content: stretch; }
  .search-box { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .news-feature .body { padding: 22px; }
  .auth-card { padding: 30px 20px; }
  .prose section { padding: 24px 20px; }
  .uptime { gap: 1px; height: 24px; }
  .uptime-meta span:first-child, .uptime-meta span:last-child { display: none; }
  .a-kpi .v { font-size: 22px; }
  .ambient .s2, .ambient .s4, .ambient .s7 { display: none; }
}

@media (hover: none) {
  .item-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal, .reveal-scale, .hero h1 .word, .fade-up { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}
.heatmap-wrap { scrollbar-width: thin; scrollbar-color: #2a2a2a transparent; }
.heatmap-wrap::-webkit-scrollbar { height: 6px; }
.heatmap-wrap::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }
/* Логотип: знак «W» + слово CLIENT читаются вместе как WCLIENT */
.brand { gap: 6px; }
.brand-mark { width: 26px; height: 26px; }
.brand-word { font-size: 16px; font-weight: 600; letter-spacing: 0.14em; }
.adm-brand { gap: 6px; }

/* =========================================================
   Changelog
   ========================================================= */
.cl-filter { margin-top: 12px; }
.cl-current { border-radius: var(--r-lg); padding: 36px; display: grid; gap: 32px; position: relative; overflow: hidden; }
.cl-current.glass { background: #070707; border-color: var(--line-2); }
.cl-current::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent); }
.cl-current-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cl-current-title { display: grid; gap: 12px; justify-items: start; }
.cl-badge { display: inline-flex; align-items: center; gap: 8px; height: 24px; padding: 0 10px; border-radius: 999px; font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; color: #000; background: #fff; }
.cl-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.cl-ver { font-family: var(--font-mono); font-weight: 500; font-size: clamp(36px, 5vw, 64px); letter-spacing: -0.04em; line-height: 1; color: #fff; }
.cl-ver.sm { font-size: 20px; letter-spacing: -0.02em; }
.cl-ver:hover { text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 6px; }
.cl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.cl-meta .kind { margin: 0; }
.cl-date { font-family: var(--font-mono); font-size: 12px; color: var(--dim); }
.cl-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cl-sec { background: #050505; padding: 20px 22px; display: grid; gap: 12px; align-content: start; }
.cl-sec h4 { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.cl-glyph { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 13px; font-weight: 600; border: 1px solid currentColor; }
.cl-n { margin-left: auto; font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--dim); }
.cl-sec.added .cl-glyph { color: var(--ok); }
.cl-sec.fixed .cl-glyph { color: var(--info); }
.cl-sec.changed .cl-glyph { color: var(--warn); }
.cl-sec.removed .cl-glyph { color: var(--bad); }
.cl-sec ul { list-style: none; display: grid; gap: 8px; }
.cl-sec li { position: relative; padding-left: 16px; color: #c9c9c9; font-size: 14.5px; line-height: 1.5; }
.cl-sec li::before { content: ''; position: absolute; left: 2px; top: 10px; width: 6px; height: 1px; background: var(--muted); }
/* если раздел один — на всю ширину */
.cl-sections > .cl-sec:only-child, .cl-sections > .cl-sec:nth-child(odd):last-child { grid-column: 1 / -1; }
.cl-older-label { margin: 56px 0 8px; }
.cl-list { border-top: 1px solid var(--line); }
.cl-item { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; padding: 32px 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 24px); }
.cl-current { scroll-margin-top: calc(var(--header-h) + 24px); }
.cl-side { display: grid; gap: 10px; align-content: start; position: sticky; top: calc(var(--header-h) + 24px); }
.cl-side .cl-meta { flex-direction: column; align-items: flex-start; }
.cl-item .cl-sections { grid-template-columns: 1fr; background: none; border: 0; gap: 20px; border-radius: 0; }
.cl-item .cl-sec { background: none; padding: 0; }
@media (max-width: 900px) {
  .cl-item { grid-template-columns: 1fr; gap: 16px; }
  .cl-side { position: static; }
  .cl-side .cl-meta { flex-direction: row; align-items: center; }
  .cl-sections { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cl-current { padding: 24px 18px; gap: 24px; }
  .cl-current-head .btn { width: 100%; }
  .cl-filter { max-width: 100%; overflow-x: auto; }
}
/* Changelog в админке */
.st-pill.cur { color: #000; background: #fff; border-color: #fff; }
.cl-form { grid-template-columns: 1.2fr 1fr 1fr; }
.cl-blocks { display: grid; gap: 10px; }
.cl-block { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: grid; gap: 10px; background: #000; }
.cl-block-head { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.cl-block-head .btn { margin-left: auto; }
.cl-block .textarea { min-height: 96px; }
.cl-block.added .cl-glyph, .cl-add-btn.added .cl-glyph { color: var(--ok); }
.cl-block.fixed .cl-glyph, .cl-add-btn.fixed .cl-glyph { color: var(--info); }
.cl-block.changed .cl-glyph, .cl-add-btn.changed .cl-glyph { color: var(--warn); }
.cl-block.removed .cl-glyph, .cl-add-btn.removed .cl-glyph { color: var(--bad); }
.cl-add { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-add-btn .cl-glyph { width: 18px; height: 18px; font-size: 11px; }
.cl-add-btn::before { content: '+'; font-family: var(--font-mono); color: var(--dim); margin-right: -2px; }
@media (max-width: 640px) { .cl-form { grid-template-columns: 1fr; } }

/* Вкладки: белую плашку можно зажать и перетащить на другую категорию */
.tabs .tab.active { cursor: grab; }
.tabs.pill-drag { cursor: grabbing; }
.tabs.pill-drag .tab-ind { transition: width 0.25s var(--ease); box-shadow: 0 6px 24px -6px rgba(255, 255, 255, 0.45); }
.tabs.pill-drag .tab { pointer-events: none; transition: color 0.15s; }
.tabs.pill-drag .tab.active { color: var(--muted); }
.tabs.pill-drag .tab.peek { color: #000; }
/* Первый экран: бейдж версии и текущий онлайн */
.hero-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-online { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.hero-online.glass { background: rgba(0, 0, 0, 0.5); border-color: var(--line-2); }
.hero-online i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: ping 1.8s infinite; }
.hero-online b { color: #fff; font-weight: 500; font-variant-numeric: tabular-nums; }
@media (max-width: 1080px) { .hero-pills { justify-content: center; } }

/* =========================================================
   Статистика в админке: плитки и линейные графики
   ========================================================= */
.a-kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat-tile .v { font-size: 28px; }
.stat-tile .delta { font-size: 12.5px; color: var(--dim); min-height: 18px; }
.stat-tile .delta.up { color: var(--ok); }
.stat-tile .delta.down { color: var(--bad); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: ping 1.8s infinite; }
.chart-card { --chart-surface: #050505; }
.chart-card .a-card-head h3 { display: flex; align-items: center; gap: 8px; }
.chart-card .key { width: 14px; height: 2px; border-radius: 2px; }
.chart-card .key.online { background: #3987e5; }
.chart-card .key.revenue { background: #d95926; }
.chart { position: relative; width: 100%; outline: none; touch-action: pan-y; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart:focus-visible { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3); border-radius: 8px; }
.chart-grid line { stroke: #1a1a1a; stroke-width: 1; }
.chart-axis { fill: #6b6b6b; font-family: var(--font-mono); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-label { fill: #a1a1a1; font-family: var(--font-mono); font-size: 11.5px; }
.chart-label.strong { fill: #ededed; font-weight: 500; }
.chart-cross { stroke: #3a3a3a; stroke-width: 1; }
.chart-tip { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; background: #ededed; color: #000; white-space: nowrap; opacity: 0; transition: opacity 0.1s; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.8); }
.chart-tip.on { opacity: 1; }
.chart-tip b { font-size: 14px; font-weight: 600; }
.chart-tip span { font-size: 12px; color: #555; }
.chart-table { margin-top: 12px; }
.chart-table summary { cursor: pointer; font-size: 13px; color: var(--muted); width: max-content; }
.chart-table summary:hover { color: var(--text); }
.chart-table .table-wrap { max-height: 260px; overflow: auto; margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; }
.a-table.static tbody tr { cursor: default; }
.a-table td.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
@media (max-width: 1080px) { .a-kpis.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .a-kpis.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Оформленные выпадающие списки ---------- */
.dd { position: relative; }
.dd > select { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.dd-btn { width: 100%; height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: var(--r-sm); background: #0a0a0a; border: 1px solid var(--line-2); color: var(--text); font-size: 14px; text-align: left; transition: border-color 0.15s, box-shadow 0.15s; }
.dd-btn:hover { border-color: var(--line-3); }
.dd.open .dd-btn, .dd-btn:focus-visible { outline: none; border-color: #666; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08); }
.dd-btn .dd-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn > svg { width: 15px; height: 15px; color: var(--dim); flex: none; transition: transform 0.2s var(--ease); }
.dd.open .dd-btn > svg { transform: rotate(180deg); }
.dd-menu { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px); max-height: 280px; overflow-y: auto; padding: 4px; border-radius: 10px; background: #0d0d0d; border: 1px solid var(--line-2); box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.9); opacity: 0; transform: translateY(-4px) scale(0.98); transform-origin: top center; pointer-events: none; transition: opacity 0.14s, transform 0.18s var(--ease); }
.dd.up .dd-menu { top: auto; bottom: calc(100% + 6px); transform-origin: bottom center; transform: translateY(4px) scale(0.98); }
.dd.open .dd-menu { opacity: 1; transform: none; pointer-events: auto; }
.dd-opt { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; font-size: 14px; color: var(--muted); text-align: left; transition: background-color 0.1s, color 0.1s; }
.dd-opt:hover, .dd-opt:focus-visible { outline: none; background: rgba(255, 255, 255, 0.06); color: var(--text); }
.dd-opt.active { color: #fff; }
.dd-opt > span:not(.dd-dot):not(.dd-ico):not(.dd-check) { flex: 1; }
.dd-check { display: flex; width: 15px; height: 15px; color: #fff; }
.dd-check svg { width: 100%; height: 100%; }
.dd-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }
.dd-ico { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--text); }
.dd-ico svg { width: 14px; height: 14px; }

/* ---------- Роли в админке ---------- */
.role-row .role-swatch { width: 14px; height: 14px; border-radius: 4px; background: var(--c); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 20%, transparent); }
.role-row .grow b .badge-demo { margin-left: 6px; font-size: 10px; padding: 1px 6px; }
.color-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.color-pick .sw { position: relative; width: 30px; height: 30px; border-radius: 8px; background: var(--c); border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3); cursor: pointer; transition: transform 0.12s; }
.color-pick .sw:hover { transform: scale(1.08); }
.color-pick .sw.active { border-color: #fff; }
.color-pick .sw.custom { background: conic-gradient(#ff6b6b, #f5a524, #3ee09a, #3987e5, #c08bff, #ff6b6b); overflow: hidden; }
.color-pick .sw.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.link-btn { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; font-size: inherit; }
.cosm-pick { max-height: 320px; overflow-y: auto; padding-right: 4px; }
.cosm-pick label[hidden] { display: none; }
/* Changelog: все разделы в одну колонку */
.cl-sections { grid-template-columns: 1fr; }
.cl-sections > .cl-sec:only-child, .cl-sections > .cl-sec:nth-child(odd):last-child { grid-column: auto; }

/* ---------- Витрина косметики в профиле ---------- */
.cosm-panel .panel-title h3 { display: flex; align-items: baseline; gap: 10px; }
.cosm-rarity { display: flex; flex-wrap: wrap; gap: 6px; }
.r-chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); transition: border-color 0.15s, color 0.15s, background-color 0.15s; }
.r-chip b { font-family: var(--font-mono); font-weight: 500; color: var(--text); }
.r-chip:hover { border-color: var(--line-3); color: var(--text); }
.r-chip.active { background: #ededed; border-color: #ededed; color: #000; }
.r-chip.active b { color: #000; }
.rarity-dot { width: 8px; height: 8px; border-radius: 50%; }
.rarity-dot.common { background: #a1a1a1; }
.rarity-dot.rare { background: #6fb6ff; }
.rarity-dot.epic { background: #c08bff; }
.rarity-dot.legendary { background: #f5a524; }
.cosm-toolbar { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr) 190px; gap: 10px; align-items: center; margin-bottom: 16px; }
.cosm-toolbar .search-box { width: 100%; }
.cosm-toolbar .search-box .input { height: 38px; border-radius: 10px; }
.cosm-toolbar .tabs { justify-self: start; }
.tab-n { font-family: var(--font-mono); font-size: 11px; opacity: 0.6; margin-left: 2px; }
.cosm-panel .cosm-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cosm { --rc: #a1a1a1; position: relative; overflow: hidden; }
.cosm::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--rc); opacity: 0.8; }
.cosm .thumb { background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--rc) 22%, transparent), transparent 70%), #0b0b0b; }
.cosm .thumb svg { color: color-mix(in srgb, var(--rc) 70%, #fff); }
.cosm.r-rare { --rc: #6fb6ff; }
.cosm.r-epic { --rc: #c08bff; }
.cosm.r-legendary { --rc: #f5a524; }
.cosm.r-legendary { box-shadow: 0 0 24px -12px rgba(245, 165, 36, 0.6); }
.cosm:hover { border-color: color-mix(in srgb, var(--rc) 50%, transparent); }
.cosm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cosm-meta { display: flex; justify-content: space-between; gap: 6px; font-size: 11.5px; color: var(--dim); }
.cosm-more { display: flex; margin: 16px auto 0; }
@media (max-width: 900px) {
  .cosm-toolbar { grid-template-columns: 1fr 160px; }
  .cosm-toolbar .tabs { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 640px) {
  .cosm-panel .panel-title { flex-direction: column; align-items: flex-start; }
  .cosm-panel .cosm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =========================================================
   Главная: отступы между блоками вдвое меньше
   ========================================================= */
body[data-page='home'] .section { padding: 64px 0; }
body[data-page='home'] .section-tight { padding: 36px 0; }
body[data-page='home'] .section-head { margin-bottom: 40px; }
body[data-page='home'] .hero { min-height: 92svh; padding-bottom: 48px; }
@media (max-width: 640px) {
  body[data-page='home'] .section { padding: 44px 0; }
  body[data-page='home'] .section-tight { padding: 24px 0; }
  body[data-page='home'] .section-head { margin-bottom: 28px; }
}

/* =========================================================
   Скроллбар всего сайта
   ========================================================= */
html { scrollbar-width: thin; scrollbar-color: #3a3a3a #000; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #2e2e2e; border-radius: 10px; border: 2px solid #000; }
::-webkit-scrollbar-thumb:hover { background: #4a4a4a; }
::-webkit-scrollbar-thumb:active { background: #ededed; }
::-webkit-scrollbar-corner { background: #000; }

/* Быстрое появление: первый экран без задержек, остальное проявляется короче */
.reveal.instant, .reveal-scale.instant { transition: none; }
.reveal { transition-duration: 0.55s; }
.reveal-scale { transition-duration: 0.6s; }

[data-online][hidden] { display: none; }

/* Первый экран: постер видео виден сразу, ещё до загрузки скриптов и видео.
   Холст и HUD тестовой пиксельной сцены скрыты, пока сцена реально не запущена. */
.hero-scene { background: #000 url('../media/hero-poster.jpg') center / cover no-repeat; animation: none; }
.hero-scene:not(.scene-live) canvas,
.hero-scene:not(.scene-live) .hud,
.hero-scene:not(.scene-live) .scene-nametag { display: none; }
@media (max-width: 900px) { .hero-scene { background-position: 40% center; } }

/* Порядок ролей: ручка, номер позиции, перетаскивание */
.role-order-hint { margin: 0 0 12px; max-width: 70ch; }
.role-list .a-row:last-child { border-bottom: 1px solid var(--line); padding-bottom: 11px; }
.role-list .a-row { position: relative; background: #050505; }
.role-grip { flex: none; display: grid; place-items: center; width: 22px; height: 30px; margin-left: -6px; border: 0; border-radius: 6px; background: none; color: var(--dim); cursor: grab; touch-action: none; }
.role-grip:hover, .role-grip:focus-visible { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.role-grip svg { width: 15px; height: 15px; }
.role-pos { flex: none; width: 18px; text-align: right; font-size: 12px; color: var(--dim); }
.role-list.sorting .a-row { transition: transform 0.18s cubic-bezier(0.2, 0.7, 0.2, 1); }
.role-list.sorting, .role-list.sorting * { cursor: grabbing; user-select: none; }
.role-list .a-row.dragging { z-index: 2; transition: none; background: #0c0c0c; border-radius: 10px; border-bottom-color: transparent; box-shadow: 0 0 0 1px var(--line-2), 0 12px 32px rgba(0, 0, 0, 0.6); }
