/* ============================================================
   L2DEX — Redesign 2026 v3 «Royal»
   Cinematic, engraved, hand-crafted. Original L2Dex artwork,
   Angelus Medieval + Gilroy, metallic gold, SVG filigree.
   ============================================================ */

/* ---------- Original site fonts ---------- */
@font-face {
  font-family: "Angelus Medieval";
  src: url("../assets/fonts/Angelus-Medieval.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face { font-family: "Gilroy"; src: url("../assets/fonts/Gilroy-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gilroy"; src: url("../assets/fonts/Gilroy-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Gilroy"; src: url("../assets/fonts/Gilroy-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Gilroy"; src: url("../assets/fonts/Gilroy-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Gilroy"; src: url("../assets/fonts/Gilroy-ExtraBold.woff") format("woff"); font-weight: 800; font-display: swap; }

:root {
  /* Night */
  --bg-0: #06080f;
  --bg-1: #0a0e1a;
  --bg-2: #101627;
  --surface: rgba(16, 22, 39, 0.78);
  --surface-solid: #121a2e;
  /* Metallic gold spectrum */
  --gold-100: #f9edc8;
  --gold-300: #f0d795;
  --gold-500: #d9b45e;
  --gold-700: #a97e2b;
  --gold-900: #6d4b12;
  --gold: var(--gold-300);
  --gold-metal: linear-gradient(168deg, #f9edc8 0%, #e8c976 28%, #b98d38 52%, #8a6420 66%, #d9b45e 84%, #f4e3ae 100%);
  --gold-text-grad: linear-gradient(180deg, #fbf2d5 0%, #eed394 38%, #c99f47 62%, #f3dfa5 100%);
  --hairline: rgba(217, 180, 94, 0.22);
  --hairline-strong: rgba(217, 180, 94, 0.45);
  --text: #e9edf7;
  --text-dim: #9aa5c0;
  --text-faint: #626d8a;
  --green: #57d98a;
  --radius: 4px;
  --font-display: "Angelus Medieval", serif;
  --font-body: "Gilroy", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-luxe: cubic-bezier(0.25, 0.9, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(217, 180, 94, 0.4); color: #fff; }
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: #070a12; }
::-webkit-scrollbar-thumb { background: linear-gradient(#2c3856, #1d2438); border-radius: 4px; border: 2px solid #070a12; }
::-webkit-scrollbar-thumb:hover { background: #3d4d75; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container { width: min(1240px, 92%); margin: 0 auto; }

/* ============================================================
   ATMOSPHERE LAYERS
   ============================================================ */
.ambient {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    linear-gradient(rgba(6, 8, 15, 0.66), rgba(6, 8, 15, 0.9)),
    url("../assets/img/bg/site_bg.jpg") center top / cover no-repeat fixed;
}
#embers { position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0.75; mix-blend-mode: screen; }

/* Film grain — kills the flat "AI" cleanliness */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  width: 200%; height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.04; mix-blend-mode: overlay;
}

/* Scroll progress hairline */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: linear-gradient(90deg, #8a6420, #f0d795, #8a6420);
  z-index: 120; box-shadow: 0 0 12px rgba(240, 215, 149, 0.6);
}

/* ============================================================
   PRELOADER — emblem draws itself
   ============================================================ */
.preloader {
  position: fixed; inset: 0; z-index: 300; background: #05070d;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  transition: opacity 0.7s ease 0.1s, visibility 0.7s;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader svg { width: 120px; height: 120px; overflow: visible; }
.preloader .draw {
  fill: none; stroke: var(--gold-500); stroke-width: 1.6;
  stroke-dasharray: 600; stroke-dashoffset: 600;
  animation: drawPath 1.6s var(--ease-luxe) forwards;
  filter: drop-shadow(0 0 6px rgba(240, 215, 149, 0.5));
}
.preloader .draw.d2 { animation-delay: 0.25s; }
.preloader .draw.d3 { animation-delay: 0.5s; }
@keyframes drawPath { to { stroke-dashoffset: 0; } }
.preloader .pre-title {
  font-family: var(--font-display); font-size: 22px; letter-spacing: 0.5em; text-indent: 0.5em;
  text-transform: uppercase; color: var(--gold-300); opacity: 0;
  animation: fadeUp 0.9s var(--ease-luxe) 0.9s forwards;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ============================================================
   TYPOGRAPHY — engraved & metallic
   ============================================================ */
h1, h2, h3, .display {
  font-family: var(--font-display); font-weight: 400;
  letter-spacing: 0.035em; text-transform: uppercase;
}

/* Metallic gold headline — solid color + engraved shadows.
   No background-clip:text / transparent fill: that combo kept
   rendering invisible text, so it is banned in this project. */
.gold-metal-text, .stat .num, .cd-cell .val {
  color: #f0d795;
  -webkit-text-fill-color: currentColor;
  text-shadow:
    0 1px 0 rgba(94, 66, 16, 0.6),
    0 2px 8px rgba(0, 0, 0, 0.5),
    0 0 26px rgba(217, 180, 94, 0.2);
}

/* Kicker: thin letterspaced line with side rules */
.kicker {
  display: inline-flex; align-items: center; gap: 16px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.34em; text-indent: 0.34em;
  text-transform: uppercase; color: var(--gold-500); margin-bottom: 18px;
}
.kicker::before, .kicker::after {
  content: ""; height: 1px; width: 44px;
  background: linear-gradient(90deg, transparent, var(--gold-700));
}
.kicker::after { background: linear-gradient(90deg, var(--gold-700), transparent); }

.section-title { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.06; margin-bottom: 14px; }
.section-sub { color: var(--text-dim); max-width: 580px; font-size: 16px; font-weight: 500; }

/* SVG filigree divider */
.filigree { display: block; margin: 22px auto 0; width: 320px; max-width: 70%; color: var(--gold-500); opacity: 0.9; }
.left-align .filigree { margin-left: 0; }

section { padding: 110px 0; position: relative; }
.center { text-align: center; }

/* ============================================================
   BUTTONS — jeweler's work
   ============================================================ */
.btn {
  --btn-pad: 15px 34px;
  display: inline-flex; align-items: center; justify-content: center; gap: 11px;
  padding: var(--btn-pad); border-radius: 3px;
  font-family: var(--font-body); font-weight: 700; font-size: 13.5px;
  letter-spacing: 0.14em; text-indent: 0.14em; text-transform: uppercase;
  position: relative; overflow: hidden; white-space: nowrap;
  transition: transform 0.3s var(--ease-luxe), box-shadow 0.3s var(--ease-luxe), filter 0.3s;
  will-change: transform;
}
.btn:active { transform: scale(0.97); }

.btn-gold {
  background: var(--gold-metal); color: #231604;
  border: 1px solid #f4e3ae;
  outline: 1px solid rgba(169, 126, 43, 0.65); outline-offset: 3px;
  box-shadow:
    0 10px 34px rgba(217, 180, 94, 0.22),
    inset 0 1px 0 rgba(255, 250, 230, 0.8),
    inset 0 -8px 14px rgba(109, 75, 18, 0.45);
  text-shadow: 0 1px 0 rgba(255, 246, 214, 0.5);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 44px rgba(217, 180, 94, 0.38),
    inset 0 1px 0 rgba(255, 250, 230, 0.8),
    inset 0 -8px 14px rgba(109, 75, 18, 0.45);
  filter: saturate(1.1) brightness(1.04);
}
.btn-gold::after {
  content: ""; position: absolute; top: -20%; left: -90%;
  width: 45%; height: 140%;
  background: linear-gradient(105deg, transparent, rgba(255, 252, 240, 0.75), transparent);
  transform: skewX(-22deg); transition: left 0.7s var(--ease-luxe);
}
.btn-gold:hover::after { left: 140%; }

.btn-ghost {
  background: linear-gradient(180deg, rgba(20, 27, 47, 0.6), rgba(10, 14, 26, 0.75));
  color: var(--gold-300);
  border: 1px solid var(--hairline-strong);
  outline: 1px solid rgba(217, 180, 94, 0.12); outline-offset: 3px;
  box-shadow: inset 0 1px 0 rgba(240, 215, 149, 0.14), 0 8px 24px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { border-color: var(--gold-500); color: var(--gold-100); transform: translateY(-2px); background: rgba(217, 180, 94, 0.08); }

.btn-sm { --btn-pad: 10px 20px; font-size: 12px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent 2%, var(--hairline) 20%, var(--hairline-strong) 50%, var(--hairline) 80%, transparent 98%);
  opacity: 0; transition: opacity 0.4s;
}
.site-header.scrolled {
  background: linear-gradient(180deg, rgba(6, 9, 16, 0.92), rgba(6, 9, 16, 0.78));
  backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.site-header.scrolled::after { opacity: 1; }

.header-inner { display: flex; align-items: center; gap: 26px; height: 78px; }

.logo { display: flex; align-items: center; gap: 11px; }
.logo-img {
  height: 36px; width: auto;
  filter: drop-shadow(0 0 12px rgba(130, 165, 240, 0.45));
  transition: transform 0.4s var(--ease-luxe);
}
.logo:hover .logo-img { transform: scale(1.08); }
.logo .logo-word { font-family: var(--font-display); font-size: 21px; letter-spacing: 0.08em; color: var(--text); }
.logo .logo-word em { font-style: normal; color: var(--gold-300); }

.main-nav { display: flex; gap: 0; margin-left: 10px; }
.main-nav a {
  padding: 9px 15px; font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.16em; text-indent: 0.16em; text-transform: uppercase;
  color: var(--text-dim); position: relative; transition: color 0.25s;
}
.main-nav a::after {
  content: ""; position: absolute; left: 15px; right: 15px; bottom: 2px; height: 1px;
  background: var(--gold-500); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease-luxe);
}
.main-nav a:hover, .main-nav a.active { color: var(--gold-100); }
/* зелёный пульс «есть эфир» у пункта Streams */
.live-nav-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); margin: 0 0 1px 6px; vertical-align: middle;
  animation: pulse 2s infinite;
}
.main-nav a:hover::after, .main-nav a.active::after { transform: scaleX(1); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.search-trigger {
  display: flex; align-items: center; gap: 10px;
  background: rgba(8, 12, 22, 0.65); border: 1px solid var(--hairline);
  color: var(--text-faint); border-radius: 3px; padding: 10px 14px;
  font-size: 13px; min-width: 210px; transition: border-color 0.25s, color 0.25s;
}
.search-trigger:hover { border-color: var(--gold-500); color: var(--text-dim); }
.search-trigger kbd {
  margin-left: auto; font-family: inherit; font-size: 10.5px; padding: 2px 7px;
  background: rgba(217, 180, 94, 0.08); border: 1px solid var(--hairline);
  border-radius: 3px; color: var(--gold-500); letter-spacing: 0.06em;
}

/* ---------- Language selector (flags, like the original) ---------- */
.lang-dd { position: relative; }
.lang-current {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--hairline); color: var(--text-dim);
  border-radius: 3px; padding: 8px 11px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em;
  transition: color 0.25s, border-color 0.25s;
}
.lang-current img { width: 18px; height: 18px; border-radius: 50%; }
.lang-current i { font-size: 9px; opacity: 0.7; transition: transform 0.25s; }
.lang-dd.open .lang-current i { transform: rotate(180deg); }
.lang-current:hover, .lang-dd.open .lang-current { color: var(--gold-300); border-color: var(--gold-500); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 120; min-width: 168px;
  background: #0c1120; border: 1px solid var(--hairline-strong); border-radius: 4px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7); overflow: hidden;
  display: none;
}
.lang-dd.open .lang-menu { display: block; animation: dropIn 0.22s var(--ease-luxe); }
.lang-menu button {
  display: flex; align-items: center; gap: 11px; width: 100%;
  background: none; border: none; color: var(--text-dim);
  padding: 11px 15px; font-size: 13.5px; font-weight: 700; text-align: left;
  transition: background 0.15s, color 0.15s;
}
.lang-menu button + button { border-top: 1px solid rgba(217, 180, 94, 0.08); }
.lang-menu button:hover { background: rgba(217, 180, 94, 0.07); color: var(--gold-100); }
.lang-menu button.active { color: var(--gold-300); background: rgba(217, 180, 94, 0.05); }
.lang-menu img { width: 18px; height: 18px; border-radius: 50%; }

.burger { display: none; background: none; border: none; color: var(--text); font-size: 22px; }

/* ============================================================
   HERO — cinematic layered scene
   ============================================================ */
.hero {
  min-height: 100svh; display: flex; align-items: center;
  padding: 160px 0 130px; position: relative; overflow: hidden;
}
/* Real L2 key-art, animated in layers: JS parallax on the wrapper,
   slow breathing zoom on the inner layer, atmosphere on top. */
.hero-bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero-art {
  position: absolute; inset: -5%; will-change: transform;
}
.hero-art-img {
  position: absolute; inset: 0;
  background: url("../assets/img/bg/header_bg.jpg") center 22% / cover no-repeat;
  animation: artBreath 36s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes artBreath {
  from { transform: scale(1.04); }
  to   { transform: scale(1.13) translateY(-1.2%); }
}
/* cinematic grade + vignette */
.hero-bg::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6,8,15,0.55) 0%, rgba(6,8,15,0.08) 32%, rgba(6,8,15,0.4) 70%, var(--bg-0) 100%),
    radial-gradient(ellipse 72% 62% at 25% 44%, rgba(4, 6, 12, 0.5), transparent 72%),
    radial-gradient(ellipse 120% 100% at 50% 50%, transparent 62%, rgba(3, 5, 9, 0.55) 100%);
}
/* warm pulses over the art's own window lights / embers */
.hero-glow {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 176, 84, 0.2), transparent 65%);
  mix-blend-mode: screen; filter: blur(10px);
  animation: glowPulse 7s ease-in-out infinite;
}
.hero-glow.g1 { width: 240px; height: 190px; left: 12%; top: 46%; }
.hero-glow.g2 { width: 200px; height: 160px; right: 16%; top: 34%; animation-delay: -2.6s; }
.hero-glow.g3 { width: 300px; height: 200px; left: 42%; bottom: 12%; animation-delay: -4.8s; animation-duration: 9s; }
@keyframes glowPulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.85; } }

/* distant lightning inside the storm clouds (triggered by JS) */
.storm-flash {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 0;
  background:
    radial-gradient(ellipse 42% 30% at 68% 12%, rgba(173, 200, 255, 0.5), transparent 65%),
    radial-gradient(ellipse 60% 40% at 60% 4%, rgba(140, 170, 240, 0.28), transparent 70%);
  mix-blend-mode: screen;
  transition: opacity 90ms ease-out;
}

/* Drifting fog banks */
.fog { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.fog i {
  position: absolute; border-radius: 50%; filter: blur(34px);
  mix-blend-mode: screen; opacity: 0.42; will-change: transform;
}
.fog .f1 {
  width: 90vw; height: 44vh; left: -22%; bottom: -6%;
  background: radial-gradient(ellipse, rgba(96, 122, 190, 0.24), transparent 65%);
  animation: fogDrift 34s ease-in-out infinite alternate;
}
.fog .f2 {
  width: 70vw; height: 36vh; right: -18%; bottom: 4%;
  background: radial-gradient(ellipse, rgba(70, 92, 150, 0.2), transparent 65%);
  animation: fogDrift 27s ease-in-out -12s infinite alternate-reverse;
}
.fog .f3 {
  width: 55vw; height: 30vh; left: 18%; top: 6%;
  background: radial-gradient(ellipse, rgba(150, 130, 90, 0.1), transparent 65%);
  animation: fogDrift 40s ease-in-out -20s infinite alternate;
}
@keyframes fogDrift {
  from { transform: translateX(-6%) translateY(1%) scale(1); }
  to   { transform: translateX(7%) translateY(-3%) scale(1.12); }
}

/* God rays from the top */
.rays {
  position: absolute; top: -30%; left: 30%; width: 40%; height: 90%;
  z-index: -1; pointer-events: none; mix-blend-mode: screen; opacity: 0.5;
  background: conic-gradient(from 178deg at 50% 0%,
    transparent 0deg, rgba(240, 215, 149, 0.10) 3deg, transparent 7deg,
    transparent 10deg, rgba(200, 190, 160, 0.07) 13deg, transparent 17deg,
    transparent 21deg, rgba(240, 215, 149, 0.09) 24deg, transparent 28deg);
  filter: blur(6px);
  animation: raysPulse 9s ease-in-out infinite;
}
@keyframes raysPulse { 0%, 100% { opacity: 0.32; } 50% { opacity: 0.6; } }

/* Floating stones (original asset) */
.stones { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.stone {
  position: absolute; background: url("../assets/img/bg/header_stones.png") no-repeat;
  filter: drop-shadow(0 22px 26px rgba(0,0,0,0.55));
  will-change: transform; animation: floatStone 9s ease-in-out infinite;
}
.stone-1 { width: 340px; height: 230px; background-position: 0 0; background-size: 1900px; left: -4%; top: 13%; }
.stone-2 { width: 120px; height: 110px; background-position: -1060px -120px; background-size: 1900px; right: 31%; bottom: 15%; animation-delay: -3s; }
.stone-3 { width: 300px; height: 200px; background-position: -1610px -40px; background-size: 1900px; right: -3%; top: 7%; animation-delay: -6s; }
@keyframes floatStone {
  0%, 100% { transform: translateY(0) rotate(0.4deg); }
  50% { transform: translateY(-24px) rotate(-0.6deg); }
}

.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; position: relative; z-index: 1; }

.hero-logo {
  width: min(300px, 62%); height: auto; margin-bottom: 22px;
  filter: drop-shadow(0 8px 28px rgba(110, 145, 230, 0.5));
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(7, 11, 20, 0.78); border: 1px solid rgba(87, 217, 138, 0.35);
  color: var(--green); border-radius: 2px; padding: 8px 18px;
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.22em; text-indent: 0.22em; text-transform: uppercase;
  margin-bottom: 26px; backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(87, 217, 138, 0.15);
}
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(87, 217, 138, 0.6); }
  70% { box-shadow: 0 0 0 9px rgba(87, 217, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(87, 217, 138, 0); }
}

.hero h1 {
  font-size: clamp(46px, 6.8vw, 92px); line-height: 0.96; margin-bottom: 8px;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line span { display: inline-block; transform: translateY(110%); animation: riseIn 1.1s var(--ease-luxe) forwards; }
.hero h1 .line:nth-child(2) span { animation-delay: 0.12s; }
@keyframes riseIn { to { transform: translateY(0); } }

.hero .filigree { margin: 20px 0 24px; }

.hero-sub { font-size: 17.5px; color: #c9d2e8; max-width: 540px; margin-bottom: 38px; text-shadow: 0 2px 14px rgba(0,0,0,0.85); font-weight: 500; }
.hero-sub strong { color: var(--gold-300); font-weight: 700; }

.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 52px; }

/* Engraved stat plaques */
.hero-stats { display: flex; }
.stat {
  padding: 6px 34px 6px 0; margin-right: 34px;
  border-right: 1px solid var(--hairline);
}
.stat:last-child { border-right: none; }
.stat .num {
  font-family: var(--font-display); font-size: 34px; line-height: 1.1;
}
.stat .lbl { font-size: 11px; color: #8d99ba; text-transform: uppercase; letter-spacing: 0.2em; font-weight: 700; }

/* ---------- Ornate royal panel (countdown) ---------- */
.hero-panel {
  background:
    linear-gradient(168deg, rgba(22, 30, 52, 0.85), rgba(9, 13, 24, 0.94));
  border: 1px solid var(--hairline-strong);
  outline: 1px solid rgba(217, 180, 94, 0.14); outline-offset: 5px;
  border-radius: 4px;
  padding: 40px 38px 36px; backdrop-filter: blur(16px);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(240, 215, 149, 0.16);
  position: relative;
}
.frame-corner {
  position: absolute; width: 34px; height: 34px; color: var(--gold-500);
  pointer-events: none;
}
.frame-corner.tl { top: -6px; left: -6px; }
.frame-corner.tr { top: -6px; right: -6px; transform: scaleX(-1); }
.frame-corner.bl { bottom: -6px; left: -6px; transform: scaleY(-1); }
.frame-corner.br { bottom: -6px; right: -6px; transform: scale(-1); }

.hero-panel .panel-kicker {
  font-size: 10.5px; letter-spacing: 0.3em; text-indent: 0.3em; text-transform: uppercase;
  color: var(--gold-500); font-weight: 800; text-align: center; margin-bottom: 8px;
}
.hero-panel h3 { font-size: 26px; margin-bottom: 6px; text-align: center; }
.hero-panel .panel-sub { color: var(--text-dim); font-size: 13.5px; margin-bottom: 28px; text-align: center; }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 28px; }
.cd-cell {
  background: linear-gradient(180deg, rgba(5, 8, 15, 0.85), rgba(10, 14, 26, 0.7));
  border: 1px solid var(--hairline);
  border-radius: 3px; padding: 18px 6px 14px; text-align: center;
  box-shadow: inset 0 3px 10px rgba(0,0,0,0.6), inset 0 -1px 0 rgba(240, 215, 149, 0.08);
  position: relative;
}
.cd-cell::after {
  content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 1px; background: var(--hairline-strong);
}
.cd-cell .val {
  font-family: var(--font-display); font-size: 34px; line-height: 1;
}
.cd-cell .unit { font-size: 9.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.24em; margin-top: 8px; font-weight: 700; }

.hero-panel .btn { width: 100%; }

/* stage 2/3: bonus lists inside the panel */
.bonus-list { list-style: none; display: flex; flex-direction: column; gap: 13px; margin: 2px 0 26px; }
.bonus-list li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 14px; color: var(--text-dim); font-weight: 600; line-height: 1.45;
  text-align: left;
}
.bonus-list li i {
  color: var(--gold-500); font-size: 12px; margin-top: 4px; flex-shrink: 0;
  width: 20px; height: 20px; display: grid; place-items: center;
  border: 1px solid var(--hairline-strong); border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, rgba(217, 180, 94, 0.16), transparent 70%);
}
.promo-count .bonus-list { max-width: 400px; margin: 14px auto 6px; }

/* admin-managed bonus lists (plain <ul> from the wiki editor) */
.cms-bonus { margin: 2px 0 26px; }
.cms-bonus ul { list-style: none; display: flex; flex-direction: column; gap: 13px; margin: 0; padding: 0; }
.cms-bonus li {
  display: flex; gap: 12px; align-items: flex-start; text-align: left;
  font-size: 14px; color: var(--text-dim); font-weight: 600; line-height: 1.45;
}
.cms-bonus li::before {
  content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  color: var(--gold-500); font-size: 11px; flex-shrink: 0;
  width: 20px; height: 20px; display: grid; place-items: center; margin-top: 2px;
  border: 1px solid var(--hairline-strong); border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, rgba(217, 180, 94, 0.16), transparent 70%);
}
.cms-bonus p { margin: 0 0 10px; color: var(--text-dim); font-size: 13.5px; }
.cms-bonus strong { color: var(--text); }
.promo-count .cms-bonus { max-width: 400px; margin: 14px auto 6px; }

/* demo stage switcher (?demo) */
.stage-demo {
  position: fixed; left: 18px; bottom: 18px; z-index: 250;
  display: flex; align-items: center; gap: 8px;
  background: rgba(8, 12, 22, 0.92); border: 1px solid var(--hairline-strong);
  border-radius: 4px; padding: 9px 12px; backdrop-filter: blur(10px);
  box-shadow: 0 14px 44px rgba(0,0,0,0.6);
  font-size: 11px; color: var(--text-faint); font-weight: 700;
}
.stage-demo button {
  background: rgba(217, 180, 94, 0.07); border: 1px solid var(--hairline);
  color: var(--text-dim); border-radius: 3px; padding: 6px 10px;
  font-size: 11px; font-weight: 800; transition: color 0.2s, border-color 0.2s;
}
.stage-demo button:hover { color: var(--gold-300); border-color: var(--gold-500); }

/* Scroll hint */
.scroll-hint {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--gold-500); font-size: 10px; letter-spacing: 0.34em; text-indent: 0.34em;
  text-transform: uppercase; font-weight: 800; z-index: 2; opacity: 0.85;
}
.scroll-hint i { width: 1px; height: 44px; background: linear-gradient(var(--gold-500), transparent); position: relative; overflow: hidden; }
.scroll-hint i::after {
  content: ""; position: absolute; top: -40%; left: 0; width: 100%; height: 40%;
  background: var(--gold-100); animation: scrollDrop 2.2s var(--ease-luxe) infinite;
}
@keyframes scrollDrop { to { top: 110%; } }

/* ============================================================
   SECTION DIVIDER (between blocks)
   ============================================================ */
.divider-row { display: flex; justify-content: center; padding: 0 0 4px; }
.divider-row svg { width: 460px; max-width: 80%; color: var(--gold-700); opacity: 0.8; }

/* ============================================================
   SERVERS — art relic cards
   ============================================================ */
.servers-section {
  background:
    linear-gradient(rgba(6, 8, 15, 0.9), rgba(6, 8, 15, 0.95)),
    url("../assets/img/bg/servers_bg.jpg") center / cover no-repeat;
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}

.server-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 60px; perspective: 1400px; }

.server-card {
  background: var(--surface); border: 1px solid var(--hairline);
  outline: 1px solid rgba(217, 180, 94, 0.08); outline-offset: 4px;
  border-radius: var(--radius);
  position: relative; overflow: hidden;
  transition: border-color 0.35s, box-shadow 0.45s var(--ease-luxe);
  transform-style: preserve-3d; will-change: transform;
}
.server-card:hover {
  border-color: var(--hairline-strong);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 60px rgba(217, 180, 94, 0.07);
}
.server-card.featured { border-color: rgba(217, 180, 94, 0.5); outline-color: rgba(217, 180, 94, 0.18); }
.server-card.featured::before {
  content: "RECOMMENDED"; position: absolute; top: 17px; left: -34px; z-index: 3;
  transform: rotate(-45deg);
  background: var(--gold-metal); color: #231604;
  font-size: 9px; font-weight: 800; letter-spacing: 0.18em; text-indent: 0.18em;
  padding: 5px 40px; box-shadow: 0 4px 14px rgba(0,0,0,0.5);
}

/* pointer glare */
.glare {
  position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(240, 215, 149, 0.12), transparent 45%);
  transition: opacity 0.35s;
}
.server-card:hover .glare, .news-card:hover .glare { opacity: 1; }

.card-art { height: 168px; position: relative; overflow: hidden; }
.card-art img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 25%;
  transition: transform 0.8s var(--ease-luxe), filter 0.8s;
  filter: saturate(0.92) contrast(1.04);
}
.server-card:hover .card-art img { transform: scale(1.09); filter: saturate(1.05) contrast(1.05); }
.card-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,8,15,0.15) 0%, transparent 35%, rgba(16, 22, 39, 0.4) 70%, var(--surface-solid) 100%);
}
.card-art .status-chip { position: absolute; top: 14px; right: 14px; z-index: 2; backdrop-filter: blur(8px); }

.server-body { padding: 24px 28px 28px; position: relative; }
/* thin gold rule above name */
.server-body::before {
  content: ""; position: absolute; top: 0; left: 28px; right: 28px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline-strong), transparent);
}
.server-head { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 18px; }
.server-name { font-family: var(--font-display); font-size: 25px; }
.server-rate { color: var(--gold-500); font-size: 12px; font-weight: 800; letter-spacing: 0.14em; }

.status-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.18em; text-indent: 0.18em;
  border-radius: 2px; padding: 6px 12px; text-transform: uppercase;
}
.status-chip.live { background: rgba(8, 26, 15, 0.82); color: var(--green); border: 1px solid rgba(87, 217, 138, 0.45); }
.status-chip.soon { background: rgba(36, 26, 6, 0.82); color: var(--gold-300); border: 1px solid rgba(217, 180, 94, 0.5); }
.status-chip .pulse-dot { width: 6px; height: 6px; }
.status-chip.soon .pulse-dot { background: var(--gold-500); animation: none; }

.server-meta { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.server-meta .row { display: flex; justify-content: space-between; font-size: 13.5px; align-items: baseline; }
.server-meta .row span:first-child { color: var(--text-faint); font-weight: 600; letter-spacing: 0.04em; }
.server-meta .row span:last-child { font-weight: 700; }
.server-meta .row i.dots {
  flex: 1; margin: 0 10px; border-bottom: 1px dotted rgba(217, 180, 94, 0.2); transform: translateY(-3px);
}

.online-bar {
  height: 5px; border-radius: 2px; background: rgba(0,0,0,0.5); overflow: hidden; margin-bottom: 22px;
  border: 1px solid rgba(217, 180, 94, 0.12); box-shadow: inset 0 1px 4px rgba(0,0,0,0.7);
}
.online-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, #8a6420, #e8c976);
  box-shadow: 0 0 12px rgba(232, 201, 118, 0.55);
  width: 0; transition: width 1.4s var(--ease-luxe) 0.35s;
}

.server-card .actions { display: flex; gap: 10px; }
.server-card .actions .btn { flex: 1; }

/* ============================================================
   PILLARS — three monumental reasons, art-backed expanding panels
   ============================================================ */
.pillars { padding: 100px 0; }
/* Адаптивная сетка: 3 карточки в ряд, автоматически переносится и
   схлопывается в колонку — под любое число карточек из админки. */
.pillar-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px; margin-top: 56px;
}

.pillar {
  --ch: 20px;
  position: relative; overflow: hidden; min-width: 0; height: 540px;
  clip-path: polygon(
    var(--ch) 0, calc(100% - var(--ch)) 0, 100% var(--ch),
    100% calc(100% - var(--ch)), calc(100% - var(--ch)) 100%,
    var(--ch) 100%, 0 calc(100% - var(--ch)), 0 var(--ch));
  cursor: default; isolation: isolate;
}

/* gold inlay edge */
.pillar::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(160deg,
    rgba(217, 180, 94, 0.55), rgba(217, 180, 94, 0.1) 30%,
    rgba(217, 180, 94, 0.06) 70%, rgba(217, 180, 94, 0.4));
  clip-path: polygon(
    var(--ch) 0, calc(100% - var(--ch)) 0, 100% var(--ch),
    100% calc(100% - var(--ch)), calc(100% - var(--ch)) 100%,
    var(--ch) 100%, 0 calc(100% - var(--ch)), 0 var(--ch),
    var(--ch) 0,
    calc(var(--ch) + 0.4px) 1px, 1px calc(var(--ch) + 0.4px),
    1px calc(100% - var(--ch) - 0.4px), calc(var(--ch) + 0.4px) calc(100% - 1px),
    calc(100% - var(--ch) - 0.4px) calc(100% - 1px), calc(100% - 1px) calc(100% - var(--ch) - 0.4px),
    calc(100% - 1px) calc(var(--ch) + 0.4px), calc(100% - var(--ch) - 0.4px) 1px,
    calc(var(--ch) + 0.4px) 1px);
}

.pillar-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center 22%;
  filter: saturate(0.55) brightness(0.72);
  transform: scale(1.04);
  transition: filter 0.7s, transform 0.9s var(--ease-luxe);
}
.pillar:hover .pillar-bg, .pillar:focus-within .pillar-bg {
  filter: saturate(1) brightness(0.92); transform: scale(1.1);
}
.pillar::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(6,8,15,0.32) 0%, rgba(6,8,15,0.05) 38%, rgba(6,8,15,0.62) 70%, rgba(4,6,11,0.96) 100%);
}

.pillar-content {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 30px 32px 32px;
  display: flex; flex-direction: column; align-items: flex-start;
}
.pillar-icon {
  width: 76px; height: 76px; object-fit: contain; margin-bottom: 14px;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.6));
  transition: transform 0.6s var(--ease-luxe);
}
.pillar:hover .pillar-icon { transform: scale(1.12) translateY(-4px); }
.pillar-stat {
  font-family: var(--font-display); font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-300); margin-bottom: 6px;
  text-shadow: 0 1px 0 rgba(94, 66, 16, 0.6), 0 2px 10px rgba(0, 0, 0, 0.8), 0 0 22px rgba(217, 180, 94, 0.3);
  display: inline-flex; align-items: center; gap: 10px;
}
.pillar-stat::before { content: ""; width: 26px; height: 1px; background: var(--gold-500); }
.pillar-content h3 {
  font-size: clamp(22px, 2vw, 30px); color: #fff; margin-bottom: 10px;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.9);
}
.pillar-content p {
  color: #cdd6ec; font-size: 14.5px; font-weight: 600; line-height: 1.6; max-width: 420px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9);
  opacity: 0; transform: translateY(14px); max-height: 0;
  transition: opacity 0.55s var(--ease-luxe) 0.15s, transform 0.55s var(--ease-luxe) 0.15s, max-height 0.6s var(--ease-luxe);
}
.pillar:hover .pillar-content p, .pillar:focus-within .pillar-content p {
  opacity: 1; transform: none; max-height: 140px;
}

/* Планшет и уже: сетка сама даёт 2→1 колонку (auto-fit minmax 280px);
   описание раскрываем сразу, т.к. hover на тач-экранах не работает. */
@media (max-width: 1080px) {
  .pillar { height: 420px; }
  .pillar-content p { opacity: 1; transform: none; max-height: 160px; }
  .pillar-bg { filter: saturate(0.85) brightness(0.85); }
}
@media (max-width: 640px) {
  .pillar { height: 360px; }
  .pillar-content { padding: 22px 22px 26px; }
  .pillar-icon { width: 58px; height: 58px; }
}

/* ============================================================
   FEATURES — editorial strip with hairlines (promo page)
   ============================================================ */
.features { padding: 84px 0; }
.feature-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}
.feature-cell {
  padding: 44px 40px; text-align: center; position: relative;
  transition: background 0.4s;
}
.feature-cell + .feature-cell::before {
  content: ""; position: absolute; left: 0; top: 18%; bottom: 18%; width: 1px;
  background: linear-gradient(transparent, var(--hairline-strong), transparent);
}
.feature-cell:hover { background: radial-gradient(ellipse 70% 80% at 50% 100%, rgba(217, 180, 94, 0.05), transparent 70%); }
.feature-icon {
  width: 92px; height: 92px; margin: 0 auto 20px; object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(217, 180, 94, 0.22));
  transition: transform 0.5s var(--ease-luxe);
}
.feature-cell:hover .feature-icon { transform: scale(1.1) translateY(-6px); }
.feature-cell h3 { font-size: 23px; margin-bottom: 10px; color: var(--gold-100); }
.feature-cell p { color: var(--text-dim); font-size: 14px; max-width: 300px; margin: 0 auto; }

/* ============================================================
   WIKI — royal library
   ============================================================ */
.wiki-section {
  background:
    linear-gradient(rgba(6, 8, 15, 0.84), rgba(6, 8, 15, 0.93)),
    url("../assets/img/bg/footer_bg.jpg") center / cover no-repeat;
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}

.wiki-search-hero { margin: 44px auto 48px; max-width: 660px; position: relative; }
.wiki-search-hero input {
  width: 100%; padding: 21px 26px 21px 60px;
  background: linear-gradient(180deg, rgba(5, 8, 15, 0.88), rgba(10, 14, 26, 0.8));
  border: 1px solid var(--hairline-strong);
  outline: 1px solid rgba(217, 180, 94, 0.1); outline-offset: 4px;
  border-radius: 3px; color: var(--text); font-family: inherit; font-size: 15.5px; font-weight: 500;
  box-shadow: inset 0 3px 12px rgba(0,0,0,0.6);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.wiki-search-hero input:focus {
  border-color: var(--gold-500); outline-color: rgba(217, 180, 94, 0.25);
  box-shadow: inset 0 3px 12px rgba(0,0,0,0.6), 0 0 44px rgba(217, 180, 94, 0.12);
}
.wiki-search-hero input::placeholder { color: var(--text-faint); }
.wiki-search-hero .icon { position: absolute; left: 24px; top: 50%; transform: translateY(-50%); color: var(--gold-500); font-size: 17px; }

.wiki-results {
  position: absolute; top: calc(100% + 12px); left: 0; right: 0; z-index: 20;
  background: #0e1424; border: 1px solid var(--hairline-strong); border-radius: 3px;
  overflow: hidden; box-shadow: 0 34px 90px rgba(0,0,0,0.75);
  display: none; max-height: 380px; overflow-y: auto;
}
.wiki-results.open { display: block; animation: dropIn 0.28s var(--ease-luxe); }
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.wiki-results a {
  display: flex; align-items: center; gap: 14px; padding: 15px 22px;
  border-bottom: 1px solid rgba(217, 180, 94, 0.07); transition: background 0.15s;
}
.wiki-results a:last-child { border-bottom: none; }
.wiki-results a:hover { background: rgba(217, 180, 94, 0.06); }
.wiki-results .cat {
  font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--gold-300); background: rgba(217, 180, 94, 0.1); border: 1px solid var(--hairline);
  padding: 4px 10px; border-radius: 2px; white-space: nowrap; margin-left: auto;
}
.wiki-results .empty { padding: 24px; text-align: center; color: var(--text-faint); font-size: 14px; }

.wiki-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.wiki-cat {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(180deg, rgba(14, 20, 36, 0.85), rgba(9, 13, 24, 0.9));
  border: 1px solid var(--hairline); border-radius: 3px;
  padding: 24px 26px; position: relative; overflow: hidden;
  transition: transform 0.35s var(--ease-luxe), border-color 0.35s;
}
.wiki-cat::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(var(--gold-500), transparent);
  transform: scaleY(0); transform-origin: top; transition: transform 0.4s var(--ease-luxe);
}
.wiki-cat:hover { transform: translateY(-5px); border-color: var(--hairline-strong); }
.wiki-cat:hover::after { transform: scaleY(1); }
.wiki-cat .ic {
  width: 52px; height: 52px; flex-shrink: 0; display: grid; place-items: center;
  border: 1px solid var(--hairline-strong); border-radius: 50%;
  outline: 1px solid rgba(217, 180, 94, 0.12); outline-offset: 3px;
  color: var(--gold-300); font-size: 19px;
  background: radial-gradient(circle at 50% 30%, rgba(217, 180, 94, 0.14), transparent 70%);
}
.wiki-cat h4 { font-size: 15.5px; font-weight: 800; letter-spacing: 0.02em; }
.wiki-cat p {
  font-size: 12.5px; color: var(--text-faint); font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* счётчик просмотров у топ-статей вики */
.wc-views {
  position: absolute; top: 9px; right: 12px;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 800; color: var(--text-faint); letter-spacing: 0.04em;
}
.wc-views i { color: var(--gold-500); font-size: 10px; }

/* ============================================================
   NEWS — cinematic magazine layout
   ============================================================ */
.news-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; margin-top: 60px; }
/* стек растягивает карточки поровну на высоту lead — раскладка держит
   форму при 1, 2 или 3 новостях справа и любых картинках */
.news-stack { display: grid; gap: 22px; grid-auto-rows: 1fr; }
/* одна новость — на всю ширину, без пустой колонки */
.news-grid.single { grid-template-columns: 1fr; }
.news-grid.single .news-card.lead { min-height: 380px; }

.news-card {
  border: 1px solid var(--hairline); border-radius: var(--radius);
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 30px; min-height: 200px; background: #0b101d;
  transition: border-color 0.35s, box-shadow 0.45s var(--ease-luxe);
}
.news-card.lead { min-height: 480px; padding: 44px; }
.news-card:hover { border-color: var(--hairline-strong); box-shadow: 0 26px 70px rgba(0,0,0,0.6); }
.news-card .art {
  position: absolute; inset: 0; z-index: -1;
  background-size: cover; background-position: center 22%;
  transition: transform 0.9s var(--ease-luxe); filter: saturate(0.94);
}
.news-card:hover .art { transform: scale(1.06); }
.news-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(6,8,15,0.08) 25%, rgba(6,8,15,0.68) 65%, rgba(5,7,12,0.96) 100%);
}
.news-date {
  font-size: 10.5px; color: var(--gold-300); font-weight: 800; letter-spacing: 0.26em; text-indent: 0.26em;
  text-transform: uppercase; margin-bottom: 10px; text-shadow: 0 1px 8px rgba(0,0,0,0.9);
}
/* клэмп строк: длинные заголовки/анонсы не раздувают карточку */
.news-card h3 {
  font-size: 21px; margin-bottom: 6px; text-shadow: 0 2px 14px rgba(0,0,0,0.9);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card.lead h3 { font-size: 34px; max-width: 480px; -webkit-line-clamp: 3; }
.news-card p {
  color: #c2cbe2; font-size: 13.5px; text-shadow: 0 1px 8px rgba(0,0,0,0.9); max-width: 460px; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card .more {
  margin-top: 16px; color: var(--gold-300); font-size: 11px; font-weight: 800;
  letter-spacing: 0.22em; text-indent: 0.22em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 9px; transition: gap 0.3s;
}
.news-card:hover .more { gap: 15px; }

/* ============================================================
   STREAMS — live at season start
   ============================================================ */
.streams-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; }
.live-count {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-indent: 0.18em; text-transform: uppercase;
  color: #ff6b6b; border: 1px solid rgba(255, 107, 107, 0.4); border-radius: 2px;
  background: rgba(40, 10, 12, 0.6); padding: 7px 14px; margin-left: 16px; vertical-align: middle;
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #ff5252; animation: livePulse 1.6s infinite; }
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(255, 82, 82, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 82, 82, 0); }
}

.streams-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; margin-top: 48px; align-items: stretch; }

.stream-main {
  position: relative; border: 1px solid var(--hairline);
  outline: 1px solid rgba(217, 180, 94, 0.1); outline-offset: 4px;
  border-radius: 4px; overflow: hidden; background: #05080f;
  aspect-ratio: 16 / 9;
  /* размер всегда от ширины колонки: при высоком списке справа stretch
     задавал высоту, а aspect-ratio раздувал ширину поверх списка */
  align-self: start; width: 100%; max-width: 100%;
}
.stream-main iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stream-facade { position: absolute; inset: 0; cursor: pointer; }
.stream-facade img.thumb {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.95); transition: transform 0.6s var(--ease-luxe);
}
.stream-facade:hover img.thumb { transform: scale(1.04); }
.stream-facade::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,8,15,0.25) 0%, transparent 40%, rgba(5,7,12,0.85) 100%);
}
.stream-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  width: 84px; height: 84px; border-radius: 50%; border: 1px solid rgba(244, 227, 174, 0.9);
  outline: 1px solid rgba(169, 126, 43, 0.6); outline-offset: 5px;
  background: var(--gold-metal); color: #231604; font-size: 26px;
  display: grid; place-items: center; padding-left: 6px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.6), 0 0 60px rgba(217, 180, 94, 0.3);
  transition: transform 0.3s var(--ease-luxe), box-shadow 0.3s;
}
.stream-facade:hover .stream-play {
  transform: translate(-50%, -50%) scale(1.09);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.7), 0 0 80px rgba(217, 180, 94, 0.45);
}
.stream-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; gap: 14px; padding: 18px 22px;
}
.stream-overlay .live-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-indent: 0.16em; text-transform: uppercase;
  color: #fff; background: #e53e3e; border-radius: 2px; padding: 5px 10px;
  box-shadow: 0 2px 12px rgba(229, 62, 62, 0.5);
}
.live-chip.off {
  background: rgba(80, 90, 115, 0.85); color: #d5dcee;
  text-shadow: none;
}
.stream-overlay .s-name { font-family: var(--font-display); font-size: 20px; text-shadow: 0 2px 12px rgba(0,0,0,0.9); }
.stream-overlay .s-viewers { margin-left: auto; color: #f3b0b0; font-size: 12.5px; font-weight: 700; display: inline-flex; gap: 7px; align-items: center; text-shadow: 0 1px 8px rgba(0,0,0,0.9); }

/* список равен высоте плеера БЕЗ скроллбаров: карточки делят высоту
   поровну (1fr) и сами ужимаются, сколько бы стримов ни было */
.stream-list {
  display: grid; gap: 12px; grid-auto-rows: 1fr;
  height: 0; min-height: 100%; overflow: hidden;
}
.stream-card {
  display: flex; gap: 14px; align-items: center; text-align: left; width: 100%;
  min-height: 0;
  background: linear-gradient(180deg, rgba(15, 21, 38, 0.85), rgba(9, 13, 24, 0.92));
  border: 1px solid var(--hairline); border-radius: 4px; padding: 8px 12px;
  cursor: pointer; transition: transform 0.3s var(--ease-luxe), border-color 0.3s, background 0.3s;
  font-family: inherit; color: inherit;
}
.stream-card:hover { transform: translateX(4px); border-color: var(--hairline-strong); }
.stream-card.active { border-color: rgba(217, 180, 94, 0.5); background: linear-gradient(90deg, rgba(217, 180, 94, 0.08), rgba(9, 13, 24, 0.92) 60%); }
.stream-card .sc-thumb {
  /* миниатюра масштабируется от высоты карточки, 16:9, с потолком */
  height: 100%; max-height: 66px; max-width: 118px; aspect-ratio: 16/9;
  flex-shrink: 0; border-radius: 3px; overflow: hidden;
  border: 1px solid var(--hairline); position: relative; background: #05080f;
}
.stream-card .sc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.stream-card .sc-thumb .live-chip {
  position: absolute; top: 5px; left: 5px;
  font-size: 8px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff; background: #e53e3e; border-radius: 2px; padding: 2px 6px;
}
.stream-card .sc-body { min-width: 0; flex: 1; overflow: hidden; }
/* в сжатой карточке (много стримов) остаётся только имя */
.stream-card { container-type: size; }
@container (max-height: 58px) {
  .sc-game, .sc-viewers { display: none; }
}
.stream-card .sc-name { font-weight: 800; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stream-card .sc-game { font-size: 12px; color: var(--text-faint); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stream-card .sc-viewers { font-size: 11.5px; color: #f3a0a0; font-weight: 700; margin-top: 3px; display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 1080px) {
  .streams-grid { grid-template-columns: 1fr; }
  /* в одну колонку список раскрывается целиком, карточки обычного размера */
  .stream-list {
    /* minmax(0,1fr), а не 1fr: у «1fr» минимум равен min-content, поэтому
       карточка с длинным названием эфира раздувала свою колонку и забирала
       место у соседних — колонки получались разной ширины. Нулевой минимум
       делит место поровну, а длинный текст обрезается многоточием. */
    grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: auto;
    height: auto; min-height: 0; overflow: visible;
  }
  .stream-card .sc-thumb { height: auto; max-height: none; max-width: none; }
  .stream-card { flex-direction: column; align-items: stretch; }
  .stream-card .sc-thumb { width: 100%; }
  /* Тут строки авто-высоты, поэтому высоту задаёт содержимое. При
     container-type:size контент не влияет на размер — карточка схлопывалась
     в высоту паддингов (~18px). Контейнерный запрос по высоте нужен только
     в десктопной колонке, здесь его отключаем. */
  .stream-card { container-type: normal; }
}
@media (max-width: 640px) {
  .stream-list { grid-template-columns: minmax(0, 1fr); }
  .stream-card { flex-direction: row; height:300px; }
  .stream-card .sc-thumb {  }
}

/* ============================================================
   SHOP — treasury showcase: featured relic + obsidian minis
   ============================================================ */
.shop-filter {
  display: inline-flex; border: 1px solid var(--hairline); border-radius: 3px;
  overflow: hidden; background: rgba(5, 8, 15, 0.7); margin-top: 34px;
}
.filter-chip {
  border: none; background: none; color: var(--text-dim); font-weight: 800; font-size: 11px;
  letter-spacing: 0.14em; text-indent: 0.14em; text-transform: uppercase;
  padding: 10px 20px; transition: background 0.3s, color 0.3s; font-family: var(--font-body);
}
.filter-chip + .filter-chip { border-left: 1px solid var(--hairline); }
.filter-chip.active { background: var(--gold-metal); color: #231604; }


@media (max-width: 640px) {
 .filter-chip{
	 font-size: 8px;
 }
}
.shop-showcase { display: grid; grid-template-columns: 1.05fr 1.35fr; gap: 26px; margin-top: 30px; align-items: stretch; }
/* grid-элементы не должны распирать колонку своим min-content */
.shop-showcase > *, .shop-mini-grid > * { min-width: 0; }
.shop-feature-in h3 { overflow-wrap: anywhere; }
.sf-desc { max-width: 100%; }
.sf-foot { flex-wrap: wrap; justify-content: center; }
.shop-rays { max-width: 100%; }

.srv-chip {
  font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--gold-500); border: 1px solid var(--hairline);
  padding: 3px 9px; border-radius: 2px; white-space: nowrap;
}

/* --- featured relic (chamfered plaque, spinning rays, floating item) --- */
.shop-feature {
  --ch: 20px;
  clip-path: polygon(
    var(--ch) 0, calc(100% - var(--ch)) 0, 100% var(--ch),
    100% calc(100% - var(--ch)), calc(100% - var(--ch)) 100%,
    var(--ch) 100%, 0 calc(100% - var(--ch)), 0 var(--ch));
  background: linear-gradient(160deg,
    rgba(217, 180, 94, 0.65), rgba(217, 180, 94, 0.14) 28%,
    rgba(217, 180, 94, 0.08) 72%, rgba(217, 180, 94, 0.5));
  padding: 1px; transition: transform 0.35s var(--ease-luxe), filter 0.35s;
}
.shop-feature:hover { transform: translateY(-5px); filter: brightness(1.05); }
.shop-feature-in {
  --ch: 19px;
  clip-path: polygon(
    var(--ch) 0, calc(100% - var(--ch)) 0, 100% var(--ch),
    100% calc(100% - var(--ch)), calc(100% - var(--ch)) 100%,
    var(--ch) 100%, 0 calc(100% - var(--ch)), 0 var(--ch));
  background:
    radial-gradient(ellipse 80% 40% at 50% 12%, rgba(217, 180, 94, 0.1), transparent 70%),
    linear-gradient(180deg, rgba(13, 19, 34, 0.94), rgba(7, 10, 19, 0.97)),
    url("../assets/img/bg/inner_files_bg.jpg") center / cover;
  height: 100%; padding: 34px 34px 32px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.feature-tag {
  position: absolute; top: 18px; left: 18px; z-index: 2;
  font-size: 9px; font-weight: 800; letter-spacing: 0.2em; text-indent: 0.2em; text-transform: uppercase;
  color: #231604; background: var(--gold-metal); padding: 6px 13px; border-radius: 2px;
  box-shadow: 0 4px 16px rgba(217, 180, 94, 0.35);
}
.shop-rays { position: relative; width: 230px; height: 214px; display: grid; place-items: center; margin: 8px 0 16px; }
.shop-rays::before {
  content: ""; position: absolute; inset: -34%;
  background: repeating-conic-gradient(from 0deg,
    rgba(217, 180, 94, 0.13) 0deg 7deg, transparent 7deg 22deg);
  border-radius: 50%;
  -webkit-mask: radial-gradient(circle, #000 26%, transparent 66%);
  mask: radial-gradient(circle, #000 26%, transparent 66%);
  animation: raysSpin 30s linear infinite;
}
@keyframes raysSpin { to { transform: rotate(360deg); } }
.shop-rays img {
  width: 172px; height: 172px; object-fit: cover; border-radius: 4px; position: relative; z-index: 1;
  border: 1px solid rgba(217, 180, 94, 0.45);
  outline: 1px solid rgba(217, 180, 94, 0.16); outline-offset: 4px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65), 0 0 44px rgba(217, 180, 94, 0.12);
  animation: itemFloat 5.5s ease-in-out infinite;
}
@keyframes itemFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.shop-feature-in h3 { font-size: 26px; color: var(--gold-100); margin-bottom: 8px; }
.sf-desc { color: var(--text-dim); font-size: 14px; font-weight: 600; max-width: 340px; margin-bottom: 18px; flex: 1; }
.sf-foot { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.sf-foot .price { color: var(--gold-300); font-weight: 800; font-size: 16px; letter-spacing: 0.05em; }
.sf-foot .price small { color: var(--text-faint); font-weight: 700; font-size: 12px; }
.shop-feature-in .btn { min-width: 210px; }

/* --- compact obsidian minis --- */
.shop-mini-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; align-content: stretch; }
.shop-mini {
  --ch: 12px;
  clip-path: polygon(
    var(--ch) 0, calc(100% - var(--ch)) 0, 100% var(--ch),
    100% calc(100% - var(--ch)), calc(100% - var(--ch)) 100%,
    var(--ch) 100%, 0 calc(100% - var(--ch)), 0 var(--ch));
  background: linear-gradient(160deg,
    rgba(217, 180, 94, 0.4), rgba(217, 180, 94, 0.1) 30%,
    rgba(217, 180, 94, 0.06) 70%, rgba(217, 180, 94, 0.3));
  padding: 1px; transition: transform 0.3s var(--ease-luxe), filter 0.3s;
  cursor: pointer;
}
.shop-mini:hover { transform: translateY(-4px); filter: brightness(1.08); }
.shop-mini-in {
  --ch: 11px;
  clip-path: polygon(
    var(--ch) 0, calc(100% - var(--ch)) 0, 100% var(--ch),
    100% calc(100% - var(--ch)), calc(100% - var(--ch)) 100%,
    var(--ch) 100%, 0 calc(100% - var(--ch)), 0 var(--ch));
  background:
    linear-gradient(180deg, rgba(14, 20, 36, 0.93), rgba(8, 11, 20, 0.96)),
    url("../assets/img/bg/inner_files_bg.jpg") center / cover;
  height: 100%; display: flex; gap: 14px; align-items: center; padding: 14px 18px 14px 14px;
}
.shop-mini img {
  width: 72px; height: 72px; object-fit: cover; border-radius: 3px; flex-shrink: 0;
  border: 1px solid rgba(217, 180, 94, 0.35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  transition: transform 0.35s var(--ease-luxe);
}
.shop-mini:hover img { transform: scale(1.08); }
.sm-body { min-width: 0; flex: 1; }
/* span-ы должны быть блочными, иначе nowrap+ellipsis распирает карточку */
.sm-name { display: block; font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-desc { display: block; font-size: 11.5px; color: var(--text-faint); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.sm-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; }
.sm-foot .price { color: var(--gold-300); font-weight: 800; font-size: 12px; letter-spacing: 0.05em; white-space: nowrap; }
.sm-foot .price small { color: var(--text-faint); font-weight: 700; }

/* compact mode: an odd last card fills the full row */
.shop-mini-grid:not(.roomy) .shop-mini:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* roomy mode (few items after filtering): minis become full product
   cards and stretch to match the featured relic's height */
.shop-mini-grid.roomy { grid-auto-rows: 1fr; }
.shop-mini-grid.roomy .shop-mini:only-child { grid-column: 1 / -1; }
.shop-mini-grid.roomy .shop-mini-in {
  flex-direction: column; justify-content: center; text-align: center;
  padding: 30px 26px; gap: 18px;
}
.shop-mini-grid.roomy .shop-mini img {
  width: 128px; height: 128px;
  outline: 1px solid rgba(217, 180, 94, 0.14); outline-offset: 4px;
}
.shop-mini-grid.roomy .sm-body { flex: none; width: 100%; }
.shop-mini-grid.roomy .sm-name { font-size: 16.5px; white-space: normal; }
.shop-mini-grid.roomy .sm-desc { white-space: normal; margin-top: 7px; font-size: 12.5px; line-height: 1.55; }
.shop-mini-grid.roomy .sm-foot { justify-content: center; gap: 16px; margin-top: 14px; }
.shop-mini-grid.roomy .sm-foot .price { font-size: 14px; }

/* ============================================================
   RANKINGS — engraved ledger
   ============================================================ */
.rank-controls {
  display: flex; align-items: center; gap: 14px; margin-top: 40px; flex-wrap: wrap;
}
.rank-server {
  padding: 11px 14px; background: var(--surface-solid); color: var(--text);
  border: 1px solid var(--hairline-strong); border-radius: 3px;
  font-family: inherit; font-size: 13px; font-weight: 700; outline: none; cursor: pointer;
}
.rank-controls > .btn { margin-left: auto; }

.rank-tabs {
  display: inline-flex; gap: 0; border: 1px solid var(--hairline);
  border-radius: 3px; overflow: hidden;
  background: rgba(5, 8, 15, 0.7);
}
.rank-tab {
  border: none; background: none; color: var(--text-dim); font-weight: 800; font-size: 11.5px;
  letter-spacing: 0.14em; text-indent: 0.14em; text-transform: uppercase;
  padding: 12px 22px; transition: background 0.3s, color 0.3s;
  font-family: var(--font-body); display: inline-flex; align-items: center; gap: 9px;
}
.rank-tab i { font-size: 13px; opacity: 0.85; }
.rank-tab + .rank-tab { border-left: 1px solid var(--hairline); }
.rank-tab.active { background: var(--gold-metal); color: #231604; }

.rank-table {
  margin-top: 28px; background: var(--surface); border: 1px solid var(--hairline);
  outline: 1px solid rgba(217, 180, 94, 0.08); outline-offset: 4px;
  border-radius: var(--radius); overflow: hidden; backdrop-filter: blur(12px);
}
.rank-row {
  display: grid; align-items: center; gap: 12px;
  padding: 13px 24px; border-bottom: 1px solid rgba(217, 180, 94, 0.07);
  transition: background 0.2s; font-size: 13.5px;
}
/* column layouts per tab */
.cols-players .rank-row { grid-template-columns: 38px minmax(150px, 1.5fr) 1fr 52px 1.25fr 84px 60px; }
.cols-clans   .rank-row { grid-template-columns: 38px minmax(150px, 1.4fr) 1fr 1.25fr 1.25fr 80px 96px; }
.cols-castles .rank-row { grid-template-columns: 1.1fr 1.4fr 82px 1.1fr; }

.rank-row:last-child { border-bottom: none; }
.rank-row:hover { background: rgba(217, 180, 94, 0.04); }
.rank-row.head {
  color: var(--gold-300); font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase;
  font-family: var(--font-display);
  background: linear-gradient(180deg, rgba(48, 62, 97, 0.5), rgba(30, 40, 66, 0.5));
  border-bottom: 1px solid var(--hairline-strong);
}
.rank-row.first { background: linear-gradient(90deg, rgba(217, 180, 94, 0.07), transparent 65%); }
.rank-row.first:hover { background: linear-gradient(90deg, rgba(217, 180, 94, 0.1), rgba(217, 180, 94, 0.03) 65%); }

.rank-pos { font-family: var(--font-display); font-size: 16px; color: var(--text-faint); }
.rank-row.first .rank-pos { color: #f0d795; font-size: 20px; }

.rank-name { display: flex; align-items: center; gap: 9px; font-weight: 700; min-width: 0; }
.rank-name .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crests { display: inline-flex; gap: 3px; flex-shrink: 0; min-width: 20px; }
.crests img { height: 15px; width: auto; image-rendering: pixelated; }

.rank-num {
  text-align: right; font-weight: 800; color: var(--gold-300);
  font-variant-numeric: tabular-nums; letter-spacing: 0.03em;
}
.rank-sub { color: var(--text-dim); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-dim { color: var(--text-faint); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* CMS-rendered rating (MMOWEB template mode) */
.cols-cms { grid-template-columns: 44px 1fr 110px; }
.rank-name > img { height: 15px; width: auto; image-rendering: pixelated; margin-right: 3px; }
.cms-rank-server .cms-rank-block { display: none; margin-top: 28px; }
.cms-rank-server .cms-rank-block.show { display: block; }
.cms-rank-server .cms-rank-block:first-of-type { display: block; }
.cms-rank-server .cms-rank-block:first-of-type:not(.show).hidden-by-js { display: none; }

@media (max-width: 900px) {
  .rank-row .hide-md { display: none; }
  .cols-players .rank-row { grid-template-columns: 34px minmax(120px, 1.5fr) 1fr 76px; }
  .cols-clans   .rank-row { grid-template-columns: 34px minmax(120px, 1.5fr) 1fr 88px; }
  .cols-castles .rank-row { grid-template-columns: 1.1fr 1.3fr 1fr; }
  .rank-controls > .btn { margin-left: 0; }
}

/* ============================================================
   START — dragon battle stage
   ============================================================ */
.start-section { padding: 0; }
.start-banner {
  position: relative; overflow: hidden;
  background:
    linear-gradient(rgba(6, 8, 15, 0.5), rgba(6, 8, 15, 0.78)),
    url("../assets/img/bg/start_game_bg.png") center / cover fixed no-repeat;
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  padding: 120px 0;
}
.start-banner .center { margin-bottom: 64px; }

/* Obsidian plaques with gold inlay, strung on a golden thread */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; position: relative; }

/* модальное окно с файлами (кнопка шага → окно) */
.files-modal {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(6, 8, 15, 0.72); backdrop-filter: blur(8px);
}
.files-modal.open { display: flex; }
.files-modal-box {
  position: relative; width: 100%; max-width: 460px; max-height: 85vh; overflow-y: auto;
  background: linear-gradient(160deg, #121a2e, #0d1424);
  border: 1px solid rgba(217, 180, 94, 0.38); border-radius: 12px;
  padding: 34px 30px 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.files-modal-close {
  position: absolute; top: 10px; right: 14px; background: none; border: none;
  color: var(--gold-300); font-size: 28px; line-height: 1; cursor: pointer; opacity: 0.8;
}
.files-modal-close:hover { opacity: 1; }
.files-modal-title { font-size: clamp(22px, 3vw, 30px); margin-bottom: 8px; }
.files-modal-desc { color: #cdd6ec; font-size: 14px; line-height: 1.6; margin-bottom: 6px; }

/* строки файлов (общие для модалки) */
.files-group {
  font-family: var(--font-display); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold-500); margin: 20px 0 10px;
  display: flex; align-items: center; gap: 10px;
}
.files-group::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line2), transparent); }

.file-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin-bottom: 8px;
  text-decoration: none; border-radius: 10px;
  background: rgba(217, 180, 94, 0.045);
  border: 1px solid var(--line);
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.file-row:hover {
  background: rgba(217, 180, 94, 0.1); border-color: var(--line2); transform: translateX(3px);
}
.file-ic {
  width: 46px; height: 46px; border-radius: 12px; object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--line2); background: #0a101e;
}
.file-ic-fa {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, rgba(217, 180, 94, 0.18), rgba(217, 180, 94, 0.05));
  color: var(--gold-300); font-size: 19px;
}
.file-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.file-name {
  font-family: var(--font-display); font-size: 15px; letter-spacing: 0.05em; line-height: 1.25;
  text-transform: uppercase; color: var(--gold-300); transition: color 0.3s;
}
.file-row:hover .file-name { color: #fff; }
.file-size { font-size: 12px; color: var(--faint); margin-top: 2px; }
.file-arrow {
  color: var(--gold-700); font-size: 14px; margin-left: auto; flex-shrink: 0;
  transition: color 0.25s, transform 0.25s;
}
.file-row:hover .file-arrow { color: var(--gold-300); transform: translateY(2px); }
.steps-grid::before {
  content: ""; position: absolute; top: 36px; left: 11%; right: 11%; height: 1px; z-index: 0;
  background: linear-gradient(90deg, transparent, var(--gold-700) 18%, var(--gold-500) 50%, var(--gold-700) 82%, transparent);
  box-shadow: 0 0 10px rgba(217, 180, 94, 0.35);
  opacity: 0.6;
}
.step { position: relative; padding-top: 36px; }

/* wax-seal medallion, half-sunk into the plaque */
.step-seal {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 27px; color: var(--gold-300);
  background:
    radial-gradient(circle at 50% 28%, rgba(217, 180, 94, 0.22), rgba(8, 12, 22, 0.99) 72%);
  border: 1px solid var(--gold-500);
  outline: 1px solid rgba(217, 180, 94, 0.28); outline-offset: 4px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6), inset 0 2px 9px rgba(0, 0, 0, 0.65);
  transition: transform 0.35s var(--ease-luxe), box-shadow 0.35s;
  text-shadow: 0 1px 0 rgba(94, 66, 16, 0.6), 0 0 18px rgba(217, 180, 94, 0.3);
}
.step-seal::after {
  content: ""; position: absolute; bottom: -13px; left: 50%;
  width: 8px; height: 8px; transform: translateX(-50%) rotate(45deg);
  background: var(--gold-500);
  box-shadow: 0 0 10px rgba(217, 180, 94, 0.55);
}
.step:hover .step-seal {
  transform: translateX(-50%) translateY(-4px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.7), 0 0 40px rgba(217, 180, 94, 0.4), inset 0 2px 9px rgba(0, 0, 0, 0.65);
}

/* chamfered plaque: gold-inlay layer + obsidian core */
.step-card {
  --ch: 18px;
  clip-path: polygon(
    var(--ch) 0, calc(100% - var(--ch)) 0, 100% var(--ch),
    100% calc(100% - var(--ch)), calc(100% - var(--ch)) 100%,
    var(--ch) 100%, 0 calc(100% - var(--ch)), 0 var(--ch));
  background: linear-gradient(160deg,
    rgba(217, 180, 94, 0.65), rgba(217, 180, 94, 0.14) 28%,
    rgba(217, 180, 94, 0.08) 72%, rgba(217, 180, 94, 0.5));
  padding: 1px; height: 100%;
  transition: transform 0.35s var(--ease-luxe), filter 0.35s;
}
.step:hover .step-card { transform: translateY(-6px); filter: brightness(1.06); }
.step-in {
  --ch: 17px;
  clip-path: polygon(
    var(--ch) 0, calc(100% - var(--ch)) 0, 100% var(--ch),
    100% calc(100% - var(--ch)), calc(100% - var(--ch)) 100%,
    var(--ch) 100%, 0 calc(100% - var(--ch)), 0 var(--ch));
  background:
    radial-gradient(ellipse 70% 34% at 50% 0%, rgba(217, 180, 94, 0.13), transparent 70%),
    linear-gradient(180deg, rgba(13, 19, 34, 0.94), rgba(7, 10, 19, 0.97)),
    url("../assets/img/bg/inner_files_bg.jpg") center / cover;
  padding: 54px 32px 36px; text-align: center; height: 100%;
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center;
}
/* sheen sweep on hover */
.step-in::after {
  content: ""; position: absolute; top: 0; left: -130%;
  width: 55%; height: 100%; pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(240, 215, 149, 0.08), transparent);
  transform: skewX(-18deg); transition: left 0.85s var(--ease-luxe);
}
.step:hover .step-in::after { left: 165%; }

.step-in h3 { font-size: 22px; color: var(--gold-100); }
.step-div {
  display: flex; align-items: center; gap: 9px; justify-content: center;
  color: var(--gold-700); margin: 11px 0 13px; font-size: 7px;
}
.step-div::before, .step-div::after {
  content: ""; height: 1px; width: 34px;
  background: linear-gradient(90deg, transparent, var(--gold-700));
}
.step-div::after { background: linear-gradient(90deg, var(--gold-700), transparent); }
.step-in p { color: var(--text-dim); font-size: 14px; margin-bottom: 24px; flex: 1; }

/* ============================================================
   FOOTER — hall of the keep
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--hairline); padding: 80px 0 40px;
  background:
    linear-gradient(rgba(5, 7, 13, 0.8), rgba(4, 6, 10, 0.95)),
    url("../assets/img/bg/footer_bg.jpg") center / cover no-repeat;
  position: relative; overflow: hidden;
}
.footer-emblem-bg {
  position: absolute; right: -120px; bottom: -140px; width: 480px; height: 480px;
  color: rgba(217, 180, 94, 0.05); pointer-events: none;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 44px; margin-bottom: 52px; position: relative; }
.footer-grid h5 {
  font-family: var(--font-display); font-size: 15px; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--gold-300); margin-bottom: 20px;
}
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-grid ul a { color: var(--text-dim); font-size: 14px; font-weight: 500; transition: color 0.2s, padding-left 0.25s; }
.footer-grid ul a:hover { color: var(--gold-300); padding-left: 6px; }
.footer-about img { height: 42px; width: auto; }
.footer-about p { color: var(--text-dim); font-size: 13.5px; margin: 18px 0 24px; max-width: 300px; font-weight: 500; }

.socials { display: flex; gap: 10px; }
.socials a {
  width: 42px; height: 42px; display: grid; place-items: center;
  background: rgba(10, 14, 26, 0.8); border: 1px solid var(--hairline);
  border-radius: 2px; color: var(--text-dim); font-size: 15px;
  transition: transform 0.3s var(--ease-luxe), color 0.3s, border-color 0.3s;
}
.socials a:hover { transform: translateY(-4px); color: var(--gold-300); border-color: var(--gold-500); }

.footer-bottom {
  border-top: 1px solid rgba(217, 180, 94, 0.1); padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--text-faint); font-size: 12.5px; flex-wrap: wrap; gap: 10px; font-weight: 500;
}

/* ============================================================
   COMMAND PALETTE
   ============================================================ */
.palette-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(3, 5, 9, 0.8);
  backdrop-filter: blur(8px); display: none; align-items: flex-start; justify-content: center;
  padding-top: 13vh;
}
.palette-overlay.open { display: flex; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.palette {
  width: min(640px, 92%); background: #0c1120;
  border: 1px solid var(--hairline-strong);
  outline: 1px solid rgba(217, 180, 94, 0.12); outline-offset: 5px;
  border-radius: 4px; overflow: visible; box-shadow: 0 50px 140px rgba(0,0,0,0.85);
  animation: palIn 0.32s var(--ease-luxe); position: relative;
}
@keyframes palIn { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }
.palette-inner { overflow: hidden; border-radius: 4px; }

.palette-input { display: flex; align-items: center; gap: 14px; padding: 19px 24px; border-bottom: 1px solid rgba(217, 180, 94, 0.12); }
.palette-input .icon { color: var(--gold-500); font-size: 16px; }
.palette-input input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 16px; font-weight: 500;
}
.palette-input input::placeholder { color: var(--text-faint); }
.palette-input kbd {
  font-size: 10px; padding: 3px 9px; border-radius: 2px; color: var(--gold-500);
  background: rgba(217, 180, 94, 0.07); border: 1px solid var(--hairline); letter-spacing: 0.1em;
}

.palette-list { max-height: 46vh; overflow-y: auto; padding: 8px; }
.palette-group {
  font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.26em;
  color: var(--gold-500); padding: 14px 16px 6px;
}
.palette-item {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  border-radius: 3px; cursor: pointer; transition: background 0.12s;
  border: 1px solid transparent;
}
.palette-item:hover, .palette-item.sel { background: rgba(217, 180, 94, 0.06); border-color: rgba(217, 180, 94, 0.14); }
.palette-item .ic {
  width: 36px; height: 36px; display: grid; place-items: center; flex-shrink: 0;
  background: radial-gradient(circle at 50% 30%, rgba(217, 180, 94, 0.1), rgba(16, 22, 39, 0.6));
  border: 1px solid var(--hairline); border-radius: 2px; font-size: 14px; color: var(--gold-300);
}
.palette-item .body { flex: 1; min-width: 0; }
.palette-item .t { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-item .d { font-size: 12px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.palette-item .cat {
  font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--gold-300); background: rgba(217, 180, 94, 0.08); border: 1px solid var(--hairline);
  padding: 3px 9px; border-radius: 2px;
}
.palette-empty { padding: 36px; text-align: center; color: var(--text-faint); }

/* результаты из базы знаний: иконка предмета + чип грейда */
.palette-item .ic.ic-img img { width: 32px; height: 32px; object-fit: contain; image-rendering: auto; display: block; }
.pal-grade {
  flex-shrink: 0; width: 20px; height: 20px; display: grid; place-items: center;
  font-size: 10px; font-weight: 800; color: #0b0f1c; border-radius: 2px;
  background: linear-gradient(160deg, #f3dda2, #c9a24f); box-shadow: 0 1px 6px rgba(0,0,0,0.5);
}
.res-img {
  width: 30px; height: 30px; flex-shrink: 0; display: grid; place-items: center;
  background: rgba(16, 22, 39, 0.6); border: 1px solid var(--hairline); border-radius: 2px;
}
.res-img img { width: 26px; height: 26px; object-fit: contain; display: block; }
.palette-db-pending {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  color: var(--text-faint); font-size: 12.5px; font-weight: 600;
}
.palette-db-pending i { color: var(--gold-500); }

/* ============================================================
   FIXED SOCIALS — золотая панель у левого края (как на оригинале)
   ============================================================ */
.fixed-socials {
  position: fixed; left: 26px; top: 50%; transform: translateY(-50%);
  z-index: 70; display: flex; flex-direction: column; align-items: center; gap: 11px;
}
/* тонкие «нити» сверху и снизу — продолжение геральдической линии */
.fixed-socials::before, .fixed-socials::after {
  content: ""; width: 1px; height: 52px;
  background: linear-gradient(180deg, transparent, rgba(217, 180, 94, 0.5));
}
.fixed-socials::after { background: linear-gradient(0deg, transparent, rgba(217, 180, 94, 0.5)); }
.fixed-socials a {
  position: relative; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-size: 17px; color: var(--gold-300);
  background: radial-gradient(circle at 50% 28%, rgba(217, 180, 94, 0.12), rgba(10, 14, 26, 0.72));
  border: 1px solid rgba(217, 180, 94, 0.34);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform 0.35s var(--ease-luxe), color 0.3s, background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.fixed-socials a:hover {
  color: #131b30;
  background: linear-gradient(160deg, #f3dda2, #c9a24f);
  border-color: transparent; transform: translateX(5px);
  box-shadow: 0 10px 30px rgba(201, 162, 79, 0.35);
}
/* подпись сети — появляется справа от иконки */
.fixed-socials a::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 13px); top: 50%;
  transform: translateY(-50%);
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.2em; text-indent: 0.2em; text-transform: uppercase;
  color: var(--gold-300); background: rgba(10, 14, 26, 0.92);
  border: 1px solid var(--hairline); border-radius: 2px; padding: 5px 10px;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.fixed-socials a:hover::after { opacity: 1; }
/* на средних экранах прижимаемся к краю и уменьшаемся, ниже 1320 — скрыты
   (контейнер 1240px, панель не должна лечь на контент) */
@media (max-width: 1460px) {
  .fixed-socials { left: 10px; gap: 9px; }
  .fixed-socials a { width: 38px; height: 38px; font-size: 15px; }
  .fixed-socials::before, .fixed-socials::after { height: 38px; }
}
/* на узких экранах панель становится центрированным рядом внизу страницы
   (в подвале соцсетей больше нет — панель единственный их дом) */
@media (max-width: 1320px) {
  .fixed-socials {
    position: static; transform: none; flex-direction: row; justify-content: center;
    margin: 44px auto 30px;
  }
  .fixed-socials::before, .fixed-socials::after {
    width: 44px; height: 1px; align-self: center;
    background: linear-gradient(90deg, transparent, rgba(217, 180, 94, 0.5));
  }
  .fixed-socials::after { background: linear-gradient(270deg, transparent, rgba(217, 180, 94, 0.5)); }
  .fixed-socials a::after { display: none; }
}

/* каркас статьи вики на время догрузки полного текста */
.wa-loading {
  display: flex; align-items: center; gap: 12px; padding: 46px 0;
  color: var(--text-faint); font-size: 14px; font-weight: 600;
}
.wa-loading i { color: var(--gold-500); font-size: 18px; }

/* ============================================================
   REVEAL — cinematic (blur -> sharp)
   ============================================================ */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.85s var(--ease-luxe), transform 0.85s var(--ease-luxe);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
}

/* ============================================================
   WIKI PAGE
   ============================================================ */
.wiki-page-bg {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    linear-gradient(rgba(6, 8, 15, 0.76), rgba(6, 8, 15, 0.92)),
    url("../assets/img/bg/wiki_bg.jpg") center top / cover no-repeat fixed;
}
.wiki-layout {
  display: grid; grid-template-columns: 280px 1fr; gap: 44px;
  padding: 118px 0 90px; align-items: start;
}
/* сайдбар: поиск и выбор сервера закреплены, длинный список статей
   прокручивается внутри — с мягким фейдом снизу и тонким скроллбаром */
.wiki-sidebar {
  position: sticky; top: 100px;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 124px);
}
#wikiNav {
  overflow-y: auto; min-height: 0; flex: 1;
  padding-right: 8px; padding-bottom: 40px;
  scrollbar-width: thin; scrollbar-color: rgba(217, 180, 94, 0.35) transparent;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 46px), transparent);
  mask-image: linear-gradient(180deg, #000 calc(100% - 46px), transparent);
}
#wikiNav::-webkit-scrollbar { width: 5px; }
#wikiNav::-webkit-scrollbar-track { background: transparent; }
#wikiNav::-webkit-scrollbar-thumb {
  background: rgba(217, 180, 94, 0.25); border-radius: 3px;
}
#wikiNav:hover::-webkit-scrollbar-thumb { background: rgba(217, 180, 94, 0.45); }
.wiki-sidebar .server-select {
  width: 100%; padding: 13px 14px; margin-bottom: 24px;
  background: var(--surface-solid); color: var(--text);
  border: 1px solid var(--hairline-strong); border-radius: 3px;
  font-family: inherit; font-size: 13.5px; font-weight: 700; outline: none;
}
.wiki-nav-group { margin-bottom: 4px; }
.wiki-nav-group > button {
  width: 100%; display: flex; align-items: center; gap: 12px;
  background: none; border: none; color: var(--text); text-align: left;
  padding: 12px; border-radius: 3px; font-size: 13px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  transition: background 0.2s;
}
.wiki-nav-group > button:hover { background: rgba(217, 180, 94, 0.05); }
.wiki-nav-group > button .g-ic { color: var(--gold-500); width: 20px; text-align: center; }
.wiki-nav-group > button .chev { margin-left: auto; transition: transform 0.3s; font-size: 10px; color: var(--text-faint); }
.wiki-nav-group.open > button .chev { transform: rotate(90deg); }
.wiki-nav-items { display: none; padding: 2px 0 8px 36px; }
.wiki-nav-group.open .wiki-nav-items { display: block; animation: fadeIn 0.25s; }
.wiki-nav-items a {
  display: block; padding: 7px 12px;
  font-size: 13.5px; color: var(--text-dim); font-weight: 500;
  border-left: 1px solid rgba(217, 180, 94, 0.16); margin-left: -12px; padding-left: 16px;
  transition: color 0.15s, background 0.15s;
}
.wiki-nav-items a:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.wiki-nav-items a.active { color: var(--gold-300); border-left-color: var(--gold-500); background: rgba(217, 180, 94, 0.06); }

.wiki-article {
  min-width: 0; /* grid-колонка: широкий контент (таблицы) не раздувает страницу */
  background: linear-gradient(180deg, rgba(13, 18, 32, 0.92), rgba(9, 13, 24, 0.94));
  border: 1px solid var(--hairline);
  outline: 1px solid rgba(217, 180, 94, 0.08); outline-offset: 5px;
  border-radius: 4px;
  padding: 48px 52px; backdrop-filter: blur(12px); min-height: 60vh;
  position: relative;
}
.wiki-hero-art {
  margin: -48px -52px 38px; height: 220px; overflow: hidden;
  border-radius: 3px 3px 0 0; position: relative;
}
.wiki-hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.wiki-hero-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(13, 18, 32, 0.94) 97%);
}
.breadcrumbs { display: flex; gap: 9px; align-items: center; font-size: 12px; color: var(--text-faint); margin-bottom: 24px; font-weight: 600; letter-spacing: 0.04em; }
.breadcrumbs a { color: var(--text-dim); } .breadcrumbs a:hover { color: var(--gold-300); }
.wiki-article h1 { font-size: 38px; margin-bottom: 10px; }
.article-meta { display: flex; gap: 18px; color: var(--text-faint); font-size: 12.5px; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid rgba(217, 180, 94, 0.12); flex-wrap: wrap; font-weight: 600; }
.wiki-article h2 { font-size: 25px; margin: 36px 0 14px; color: var(--gold-300); }
.wiki-article p { color: var(--text-dim); margin-bottom: 15px; font-size: 15px; font-weight: 500; }
.wiki-article ul { margin: 0 0 16px 22px; color: var(--text-dim); }
.wiki-article li { margin-bottom: 8px; font-size: 14.5px; font-weight: 500; }
.wiki-article li strong, .wiki-article p strong { color: var(--text); }

.wiki-callout {
  display: flex; gap: 15px; padding: 19px 22px; border-radius: 3px; margin: 24px 0;
  background: linear-gradient(90deg, rgba(217, 180, 94, 0.08), rgba(217, 180, 94, 0.02));
  border: 1px solid rgba(217, 180, 94, 0.25); border-left: 2px solid var(--gold-500);
  font-size: 14px; color: var(--text-dim); font-weight: 500;
}
.wiki-callout .ic { color: var(--gold-500); font-size: 17px; }

.wiki-table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 14px; }
.wiki-table th {
  text-align: left; padding: 13px 18px; color: #fff;
  font-family: var(--font-display); font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 400;
  background: linear-gradient(180deg, #34426a, #2a3555);
  border-bottom: 1px solid var(--hairline-strong);
}
.wiki-table td { padding: 13px 18px; border-bottom: 1px solid rgba(217, 180, 94, 0.08); color: var(--text-dim); font-weight: 500; }
.wiki-table tr:hover td { background: rgba(217, 180, 94, 0.03); }

/* ============================================================
   WIKI APP — dynamic content coming from the CMS
   ============================================================ */
.wiki-side-search { position: relative; margin-bottom: 20px; }
.wiki-side-search .icon { position: absolute; left: 13px; top: 13px; color: var(--gold-500); font-size: 13px; }
.wiki-side-search input {
  width: 100%; padding: 11px 12px 11px 36px;
  background: rgba(6, 9, 17, 0.75); border: 1px solid var(--hairline);
  border-radius: 3px; color: var(--text); font-family: inherit; font-size: 13px; font-weight: 600;
  outline: none; transition: border-color 0.25s;
}
.wiki-side-search input:focus { border-color: var(--gold-500); }
.wiki-side-search input::placeholder { color: var(--text-faint); }
.wiki-results.side { max-height: 320px; }
.wiki-results.side a { padding: 10px 14px; }

.g-count {
  font-style: normal; font-size: 10px; font-weight: 800; color: var(--text-faint);
  border: 1px solid var(--hairline); border-radius: 2px; padding: 1px 6px; margin-left: auto;
}
.wiki-nav-group > button .chev { margin-left: 8px; }

.wiki-loading { display: grid; place-items: center; padding: 30px; color: var(--gold-500); font-size: 18px; }
.wiki-loading.big { min-height: 40vh; font-size: 28px; }

.lang-avail { display: inline-flex; gap: 5px; }
.lang-avail b {
  font-size: 9px; font-weight: 800; letter-spacing: 0.1em; padding: 2px 6px;
  border: 1px solid var(--hairline); border-radius: 2px; color: var(--text-faint);
}
.lang-avail b.on { color: var(--gold-300); border-color: var(--hairline-strong); }

/* CMS article body */
.wa-content { color: var(--text-dim); font-size: 15px; font-weight: 500; }
.wa-content h1 { font-size: 26px; margin: 30px 0 12px; color: var(--gold-300); }
.wa-content h2 { font-size: 22px; margin: 28px 0 12px; color: var(--gold-300); }
.wa-content h3 { font-size: 18px; margin: 22px 0 10px; color: var(--gold-100); }
.wa-content p { margin-bottom: 14px; line-height: 1.7; }
.wa-content strong { color: var(--text); }
.wa-content a { color: var(--gold-300); border-bottom: 1px solid rgba(217, 180, 94, 0.3); transition: border-color 0.2s; }
.wa-content a:hover { border-bottom-color: var(--gold-300); }
.wa-content ul, .wa-content ol { margin: 0 0 16px 22px; }
.wa-content li { margin-bottom: 7px; }
.wa-content img {
  max-width: 100%; height: auto; border-radius: 3px; margin: 10px 0;
  border: 1px solid var(--hairline); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}
.wa-content .image-area { margin: 18px 0; }
.wa-content .image-area img { display: block; margin: 0 auto; }
.wa-content .image-area.has-border img {
  border: 1px solid var(--hairline-strong);
  outline: 1px solid rgba(217, 180, 94, 0.12); outline-offset: 4px;
}
.wa-content table {
  width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 13.5px;
  background: rgba(6, 9, 17, 0.4);
  /* таблица шире экрана — скроллится внутри статьи, страницу не раздувает */
  display: block; max-width: 100%; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: rgba(217, 180, 94, 0.3) transparent;
}
.wa-content table::-webkit-scrollbar { height: 5px; }
.wa-content table::-webkit-scrollbar-thumb { background: rgba(217, 180, 94, 0.3); border-radius: 3px; }
.wa-content table th, .wa-content table thead td {
  text-align: left; padding: 11px 14px; color: #fff;
  font-family: var(--font-display); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 400;
  background: linear-gradient(180deg, #34426a, #2a3555);
  border: 1px solid rgba(217, 180, 94, 0.15);
}
.wa-content table td { padding: 10px 14px; border: 1px solid rgba(217, 180, 94, 0.09); }
.wa-content table tr:hover td { background: rgba(217, 180, 94, 0.03); }
.wa-content blockquote {
  margin: 20px 0; padding: 16px 20px; border-left: 2px solid var(--gold-500);
  background: rgba(217, 180, 94, 0.06); border-radius: 0 3px 3px 0;
}
.wa-content hr { border: none; height: 1px; background: var(--hairline); margin: 26px 0; }
.wa-content iframe, .wa-content video, .wa-content embed { max-width: 100%; border: 1px solid var(--hairline); border-radius: 3px; }
.wa-content { overflow-wrap: break-word; }
.wa-content pre { max-width: 100%; overflow-x: auto; }

/* ============================================================
   RULES PAGE
   ============================================================ */
.rules-toc { list-style: none; display: flex; flex-direction: column; }
.rules-toc a {
  display: flex; gap: 12px; align-items: baseline;
  padding: 10px 14px; font-size: 13.5px; color: var(--text-dim); font-weight: 600;
  border-left: 1px solid rgba(217, 180, 94, 0.16);
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.rules-toc a .n { font-family: var(--font-display); color: var(--gold-700); font-size: 13px; min-width: 22px; }
.rules-toc a:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }
.rules-toc a.active { color: var(--gold-300); border-left-color: var(--gold-500); background: rgba(217, 180, 94, 0.06); }
.rules-toc a.active .n { color: var(--gold-300); }

.rules-legend {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 16px 20px; margin: 26px 0 6px;
  background: rgba(8, 12, 22, 0.6); border: 1px solid var(--hairline); border-radius: 3px;
}
.rules-legend .lbl { font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); margin-right: 6px; }

.sev {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.14em; text-indent: 0.14em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 2px; white-space: nowrap; flex-shrink: 0;
}
.sev::before { content: ""; width: 6px; height: 6px; transform: rotate(45deg); background: currentColor; }
.sev-low  { color: #e8d27f; background: rgba(232, 210, 127, 0.08); border: 1px solid rgba(232, 210, 127, 0.35); }
.sev-mid  { color: #f0a95c; background: rgba(240, 169, 92, 0.08); border: 1px solid rgba(240, 169, 92, 0.35); }
.sev-high { color: #f07a6a; background: rgba(240, 122, 106, 0.09); border: 1px solid rgba(240, 122, 106, 0.4); }
.sev-ban  { color: #ffd7d2; background: rgba(178, 42, 42, 0.55); border: 1px solid rgba(240, 100, 90, 0.55); }

.rules-section { padding-top: 18px; margin-top: 26px; border-top: 1px solid rgba(217, 180, 94, 0.1); }
.rules-section:first-of-type { border-top: none; margin-top: 8px; }
.rules-section h2 { display: flex; align-items: baseline; gap: 14px; }
.rules-section h2 .n { font-family: var(--font-display); color: var(--gold-700); font-size: 19px; }

.rule {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 15px 18px; margin: 10px 0; border-radius: 3px;
  background: rgba(10, 15, 28, 0.55); border: 1px solid rgba(217, 180, 94, 0.09);
  transition: border-color 0.2s, background 0.2s;
}
.rule:hover { border-color: rgba(217, 180, 94, 0.25); background: rgba(14, 20, 36, 0.7); }
.rule .rn {
  font-family: var(--font-display); font-size: 15px; color: var(--gold-500);
  min-width: 38px; padding-top: 1px;
}
.rule .rb { flex: 1; min-width: 0; }
.rule .rb p { margin: 0 0 6px; color: var(--text-dim); font-size: 14px; font-weight: 500; }
.rule .rb p strong { color: var(--text); }
.rule .sev { margin-top: 3px; }

@media (max-width: 640px) {
  .rule { flex-wrap: wrap; }
  .rule .sev { order: 3; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* Header gets crowded before nav collapses — slim it down first */
@media (max-width: 5700px) {
  .header-inner { gap: 16px; }
  .main-nav a { padding: 9px 10px; font-size: 12px; }
  .search-trigger { min-width: 0; }
  .search-trigger .hint-text, .search-trigger kbd { display: none; }
}
@media (max-width: 1240px) {
  .header-actions .btn-ghost.btn-sm { display: none; }
}
@media (max-height: 800px) {
  .scroll-hint { display: none; }
}
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .server-grid, .wiki-cats, .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid::before { display: none; }
  .feature-strip { grid-template-columns: 1fr; }
  .feature-cell + .feature-cell::before { left: 18%; right: 18%; top: 0; bottom: auto; width: auto; height: 1px; background: linear-gradient(90deg, transparent, var(--hairline-strong), transparent); }
  .shop-showcase { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .news-card.lead { min-height: 340px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .wiki-layout { grid-template-columns: 1fr; }
  .wiki-sidebar { position: static; max-height: none; display: block; }
  #wikiNav {
    overflow: visible; padding-bottom: 0;
    -webkit-mask-image: none; mask-image: none;
  }
  .main-nav { display: none; }
  .search-trigger { min-width: 0; }
  .search-trigger .hint-text, .search-trigger kbd { display: none; }
  .burger { display: block; }
  .stone-2 { display: none; }
  .rays { display: none; }
}
@media (max-width: 640px) {
  section { padding: 70px 0; }
  .server-grid, .wiki-cats, .steps-grid, .shop-mini-grid { grid-template-columns: 1fr; }
  .news-card { min-height: 240px; }
  .countdown { gap: 7px; }
  .cd-cell .val { font-size: 24px; }
  .hero-stats { flex-wrap: wrap; gap: 18px 0; }
  .stat { padding-right: 20px; margin-right: 20px; }
  .rank-tab { padding: 11px 14px; }
  .rank-tab span { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .wiki-article { padding: 30px 24px; }
  /* длинные слова в заголовках статей не раздувают страницу */
  .wiki-article h1 { font-size: clamp(23px, 7.5vw, 32px); overflow-wrap: break-word; }
  .wa-content h1, .wa-content h2 { overflow-wrap: break-word; }
  .wiki-hero-art { margin: -30px -24px 28px; height: 150px; }
  .lang-dd .lang-current span, .lang-dd .lang-current i { display: none; }
  .header-actions .btn-gold.btn-sm { display: none; }
  .shop-feature-in { padding: 26px 18px; }
  .shop-feature-in .btn { min-width: 0; width: 100%; }
  .shop-rays { width: 200px; height: 190px; }
  .shop-rays img { width: 148px; height: 148px; }
  .header-inner { gap: 12px; }
  .stones, .fog .f3 { display: none; }
  .start-banner { background-attachment: scroll; }
}

/* Mobile nav drawer */
.mobile-nav {
  position: fixed; inset: 0; z-index: 150; background: rgba(4, 6, 11, 0.97);
  backdrop-filter: blur(18px); display: none; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
}
.mobile-nav.open { display: flex; animation: fadeIn 0.25s; }
.mobile-nav a {
  font-family: var(--font-display); font-size: 28px; padding: 12px;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em;
}
.mobile-nav a:hover { color: var(--gold-300); }
.mobile-nav .close { position: absolute; top: 24px; right: 28px; background: none; border: none; color: var(--text); font-size: 30px; }

/* ============================================================
   PROMO PAGE — стили рекламной посадочной.
   Раньше жили инлайном в <head> promo.html и не попадали в CMS-шаблон
   (у promo.tpl шапка из {$_SEO_HEAD}) — теперь единый источник здесь.
   ============================================================ */
/* promo-only styles */
.promo-hero {
  min-height: 100svh; display: flex; align-items: center; justify-content: center;
  text-align: center; position: relative; overflow: hidden; padding: 120px 0 90px;
}
.promo-hero-bg {
  position: absolute; inset: -4%; z-index: -2;
  background: url("../assets/img/bg/start_game_bg.png") center 30% / cover no-repeat;
  animation: artBreath 34s ease-in-out infinite alternate;
}
.promo-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6,8,15,0.62) 0%, rgba(6,8,15,0.25) 35%, rgba(6,8,15,0.55) 75%, var(--bg-0) 100%),
    radial-gradient(ellipse 120% 100% at 50% 50%, transparent 55%, rgba(3, 5, 9, 0.62) 100%);
}
.promo-logo { width: min(340px, 72%); margin: 0 auto 10px; filter: drop-shadow(0 10px 34px rgba(110, 145, 230, 0.55)); }
.promo-hero h1 { font-size: clamp(42px, 7vw, 88px); line-height: 1; margin: 14px 0 10px; }
.promo-hero .hero-sub { margin: 18px auto 34px; max-width: 640px; }
.promo-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 46px; }
.btn-xl { padding: 19px 46px; font-size: 15.5px; }
.promo-count { max-width: 460px; margin: 0 auto; }
.promo-count .panel-kicker { margin-bottom: 14px; }
.promo-count .countdown { margin-bottom: 0; }
.promo-strip { border-top: 1px solid var(--hairline); }
.promo-banner {
  position: relative; overflow: hidden; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  background:
    linear-gradient(90deg, rgba(6, 9, 16, 0.94) 30%, rgba(6, 9, 16, 0.45) 70%),
    url("../assets/img/bg/news_bg_7.jpg") center 30% / cover no-repeat;
  padding: 100px 0;
}
.promo-banner .inner { max-width: 560px; }
.promo-banner h2 { font-size: clamp(28px, 3.6vw, 44px); margin-bottom: 14px; }
.promo-banner p { color: var(--text-dim); font-size: 16px; margin-bottom: 28px; }
.promo-footer { padding: 34px 0; border-top: 1px solid var(--hairline); background: rgba(4, 6, 10, 0.9); }
.grades { display: flex; gap: 10px; margin-bottom: 26px; }
.grade {
  width: 52px; height: 52px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 24px; color: var(--gold-300);
  border: 1px solid var(--hairline-strong); border-radius: 3px;
  outline: 1px solid rgba(217, 180, 94, 0.12); outline-offset: 3px;
  background: radial-gradient(circle at 50% 28%, rgba(217, 180, 94, 0.16), rgba(10, 14, 26, 0.9));
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.5);
}
/* этапный блок (таймер/бонусы) под CTA */
.promo-count .panel-kicker {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.3em; text-indent: 0.3em;
  text-transform: uppercase; color: var(--gold-500); margin-bottom: 16px;
}
.promo-count .bonus-list, .promo-count .cms-bonus { text-align: left; }

@media (max-width: 640px) {
  .promo-banner { padding: 70px 0; }
  .btn-xl { width: 100%; }
}

/* ============================================================
   PLAYER MOVIES — «The history of Dex» (промо): большой ленивый
   плеер + миниатюры; фасад переиспользует стили стримов
   ============================================================ */
.movie-stage {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border: 1px solid var(--hairline); border-radius: var(--radius);
  background: #0a0e1a; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.movie-stage .stream-facade { position: absolute; inset: 0; cursor: pointer; }
.movie-stage .thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.movie-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.movie-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 14px; }
.movie-list button {
  aspect-ratio: 16 / 9; padding: 0; overflow: hidden; cursor: pointer;
  border: 1px solid var(--hairline); border-radius: var(--radius); background: #0a0e1a;
  opacity: 0.6; transition: opacity 0.25s, border-color 0.25s, transform 0.3s var(--ease-luxe);
}
.movie-list button:hover { opacity: 0.9; transform: translateY(-3px); }
.movie-list button.active {
  opacity: 1; border-color: var(--gold-500);
  box-shadow: 0 0 0 1px rgba(217, 180, 94, 0.35), 0 14px 30px rgba(0, 0, 0, 0.5);
}
.movie-list img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 720px) { .movie-list { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

/* ============================================================
   SEASON — «What's New in the Upcoming Season?» (промо):
   карточки фич сезона с артом, номером и описанием
   ============================================================ */
.season-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 48px; }
.season-card {
  position: relative; overflow: hidden; isolation: isolate;
  border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 26px; min-height: 240px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: #0b101d;
  transition: border-color 0.35s, box-shadow 0.45s var(--ease-luxe), transform 0.45s var(--ease-luxe);
}
.season-card:hover {
  border-color: var(--hairline-strong); transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55);
}
.season-card .art {
  position: absolute; inset: 0; z-index: -1;
  background-size: cover; background-position: center 25%;
  filter: saturate(0.9); transition: transform 0.8s var(--ease-luxe);
}
.season-card:hover .art { transform: scale(1.05); }
.season-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(6, 8, 15, 0.2) 12%, rgba(6, 8, 15, 0.72) 58%, rgba(5, 7, 12, 0.95) 100%);
}
.season-card .s-num {
  position: absolute; top: 18px; left: 22px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.24em; color: var(--gold-500);
  border-bottom: 1px solid rgba(217, 180, 94, 0.4); padding-bottom: 4px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}
.season-card h3 { font-size: 19px; margin-bottom: 8px; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9); }
.season-card p { font-size: 13px; color: #c2cbe2; font-weight: 500; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); }
@media (max-width: 1080px) { .season-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .season-grid { grid-template-columns: 1fr; } .season-card { min-height: 200px; } }
