/*!
 * Desert PW — site.css
 * «Пустыня / Египет»: ночная синева, песок и золото. Тёмная тема по умолчанию, светлая «папирус».
 * CSP-safe: никаких inline-стилей в разметке — все компоненты здесь. Описание классов: templates/README.md
 *
 *  1. Tokens            6. Components (btn, card, badge, alert, form, table, tabs, pagination,
 *  2. Base                 stats, steps, timeline, accordion, empty, kv, subnav, prose, frieze)
 *  3. Layout            7. Pages (home, about, bosses, rankings, files, news, errors)
 *  4. Header & nav      8. Utilities
 *  5. Footer            9. Motion / print
 */

/* ============================== 1. Tokens ============================== */
:root {
  color-scheme: dark;

  /* palette */
  --night-950: #070b16;
  --night-900: #0a0f1e;
  --night-850: #0e1528;
  --night-800: #131b31;
  --night-700: #1a2440;
  --night-600: #253257;
  --sand-50: #fbf4e2;
  --sand-100: #f3e6c8;
  --sand-300: #dcc393;
  --sand-500: #b3a88c;
  --gold-300: #ffd98a;
  --gold-400: #f2c566;
  --gold-500: #e6b04a;
  --gold-600: #c68a2d;
  --gold-700: #8f5f1c;
  --lapis-400: #7ea6ff;
  --lapis-600: #1d3a6e;
  --turq-400: #4fd1c1;
  --carnelian-400: #f07a5e;
  --amber-400: #f4a93b;

  /* semantic (dark) */
  --bg: var(--night-900);
  --bg-alt: var(--night-850);
  --surface: var(--night-800);
  --surface-2: var(--night-700);
  --surface-glass: rgba(14, 21, 40, .72);
  --border: rgba(230, 176, 74, .16);
  --border-strong: rgba(230, 176, 74, .36);
  --text: #eadfc4;
  --text-strong: var(--sand-50);
  --text-muted: var(--sand-500);
  --heading: #f8edd3;
  --accent: var(--gold-500);
  --accent-strong: var(--gold-400);
  --link: var(--gold-400);
  --link-hover: var(--gold-300);
  --on-accent: #1b1304;
  --success: var(--turq-400);
  --danger: var(--carnelian-400);
  --warning: var(--amber-400);
  --info: var(--lapis-400);
  --focus: #5fe0d0;
  --fiber: rgba(230, 176, 74, .028);
  --shadow: 0 14px 34px rgba(0, 0, 0, .38);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, .28);
  --gold-grad: linear-gradient(180deg, #ffe3a1 0%, #eeb44c 55%, #c68a2d 100%);
  --gold-text: linear-gradient(180deg, #ffeab8 10%, #f2c566 50%, #d4952f 90%);

  /* always-dark chrome (header, hero, footer) */
  --chrome-bg: #080d1b;
  --chrome-text: #eadfc4;
  --chrome-muted: #a89d82;
  --chrome-border: rgba(230, 176, 74, .18);

  /* type */
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-display: "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", P052, Georgia, "DejaVu Serif", serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", Menlo, monospace;

  /* metrics */
  --container: 1180px;
  --gutter: 16px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --header-h: 68px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #efe2c3;
  --bg-alt: #e8d6ad;
  --surface: #fbf4e2;
  --surface-2: #f3e6c6;
  --surface-glass: rgba(251, 244, 226, .86);
  --border: rgba(120, 82, 24, .22);
  --border-strong: rgba(120, 82, 24, .42);
  --text: #2d2313;
  --text-strong: #1c150a;
  --text-muted: #5e5137;
  --heading: #1d1609;
  --accent: #7a4b0a;
  --accent-strong: #653c05;
  --link: #7a4b0a;
  --link-hover: #1d3a6e;
  --success: #0f766b;
  --danger: #b23a22;
  --warning: #9a5a00;
  --info: #1d4f9e;
  --focus: #1d3a6e;
  --fiber: rgba(120, 82, 24, .045);
  --shadow: 0 12px 28px rgba(80, 52, 12, .16);
  --shadow-sm: 0 3px 10px rgba(80, 52, 12, .12);
  --gold-text: linear-gradient(180deg, #a86d14 10%, #8a560c 60%, #6d430a 100%);
}

/* ============================== 2. Base ============================== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 400 16px/1.6 var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1100px 520px at 85% -8%, rgba(230, 176, 74, .07), transparent 62%),
    var(--bg);
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
h1, h2, h3, h4 {
  margin: 0 0 .6em;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--heading);
  letter-spacing: .01em;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
code, kbd { font-family: var(--font-mono); font-size: .92em; }
code { padding: .1em .38em; border-radius: 6px; background: var(--surface-2); color: var(--text-strong); overflow-wrap: anywhere; }
strong { color: var(--text-strong); }
::selection { background: rgba(230, 176, 74, .35); color: var(--text-strong); }

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: .6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--gold-500);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }

/* ============================== 3. Layout ============================== */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container-narrow { max-width: calc(760px + 2 * var(--gutter)); }
.container-tight { max-width: calc(480px + 2 * var(--gutter)); }

.site-main { flex: 1 0 auto; outline: none; }
.section { padding: clamp(40px, 6vw, 80px) 0; }
.section-alt {
  background:
    repeating-linear-gradient(90deg, var(--fiber) 0 2px, transparent 2px 9px),
    var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 28px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--text-muted); max-width: 60ch; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--accent);
  font: 700 .78rem/1.2 var(--font-body);
  letter-spacing: .18em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 12px;
  height: 10px;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.stack > * + * { margin-top: 16px; }
.cluster { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
ol.cluster, ul.cluster { list-style: none; margin: 0 0 1em; padding: 0; }
ol.cluster > li, ul.cluster > li { margin: 0; }
/* grid/flex children may shrink below their content (long words, tables) — no page overflow */
.grid > *, .split > *, .hero-grid > *, .khufu > *, .with-sidebar > *, .rules-layout > *, .news-row > *, .boss-card > *, .card-grid > * { min-width: 0; }
.split { display: grid; gap: 32px; align-items: start; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 48px; }
  .split-rev { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
}

.frieze {
  height: 14px;
  border: 0;
  margin: 0;
  background: url("../img/frieze.svg") repeat-x center / auto 14px;
  opacity: .8;
}

/* ============================== 4. Header & nav ============================== */
.topbar {
  background: var(--chrome-bg);
  color: var(--chrome-muted);
  border-bottom: 1px solid var(--chrome-border);
  font-size: .85rem;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.topbar-links { display: flex; align-items: center; gap: 6px; }
.topbar a { color: var(--chrome-text); text-decoration: none; }
.topbar a:hover { color: var(--gold-300); }

/* language switcher (top bar): RU / UA / EN segmented pill */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--chrome-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
}
.topbar .lang-link {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  color: var(--chrome-muted);
  font: 700 .72rem/1 var(--font-body);
  letter-spacing: .08em;
}
.topbar .lang-link:hover { color: var(--gold-300); background: rgba(230, 176, 74, .1); }
.topbar .lang-link[aria-current="true"] {
  color: var(--on-accent);
  background: var(--gold-grad);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
}
.topbar-register { white-space: nowrap; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #7d7a70;
  box-shadow: 0 0 0 3px rgba(125, 122, 112, .18);
  flex: none;
}
.status-online .status-dot { background: var(--turq-400); box-shadow: 0 0 0 3px rgba(79, 209, 193, .18), 0 0 12px rgba(79, 209, 193, .7); }
.status-offline .status-dot { background: var(--carnelian-400); box-shadow: 0 0 0 3px rgba(240, 122, 94, .18); }
.status-label { color: var(--chrome-text); font-weight: 600; }
.status-sep { opacity: .45; }
.status-players b { color: var(--gold-300); font-variant-numeric: tabular-nums; }

.theme-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--chrome-border);
  border-radius: 50%;
  background: transparent;
  color: var(--chrome-text);
  cursor: pointer;
}
.js .theme-toggle { display: inline-flex; }
.theme-toggle:hover { color: var(--gold-300); border-color: rgba(230, 176, 74, .5); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background:
    url("../img/stars.svg") repeat 0 0 / 360px,
    linear-gradient(180deg, rgba(10, 15, 30, .97), rgba(12, 18, 36, .95));
  border-bottom: 1px solid var(--chrome-border);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
  color: var(--chrome-text);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex: none; line-height: 0; border-radius: 6px; }
.brand img { width: 218px; height: auto; }
.nav-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--chrome-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  color: var(--chrome-text);
  cursor: pointer;
}
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }
.nav-open .nav-toggle .icon-menu { display: none; }

.site-nav { display: none; }
.nav-open .site-nav,
html:not(.js) .site-nav { display: block; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
  color: var(--chrome-text);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(230, 176, 74, .08);
}
.nav-link .icon { color: var(--gold-500); opacity: .85; }
.nav-link:hover { color: var(--gold-300); }
.nav-link[aria-current="page"] { color: var(--gold-400); }
.nav-account { display: flex; gap: 10px; padding: 14px 0 18px; }
.nav-account .btn { flex: 1; }
/* language row in the mobile menu (full native names) */
.nav-lang { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 16px 0 6px; }
.nav-lang-label { display: inline-flex; align-items: center; gap: 10px; color: var(--chrome-muted); font-weight: 600; font-size: .92rem; }
.nav-lang-label .icon { color: var(--gold-500); opacity: .85; }
.nav-lang-list { display: flex; flex-wrap: wrap; gap: 8px; }
.nav-lang-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 6px 14px;
  border: 1px solid var(--chrome-border);
  border-radius: 999px;
  color: var(--chrome-text);
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
}
.nav-lang-link:hover { color: var(--gold-300); border-color: rgba(230, 176, 74, .5); }
.nav-lang-link[aria-current="true"] { color: var(--on-accent); background: var(--gold-grad); border-color: transparent; }

@media (max-width: 1139px) {
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; background: #0b1122; border-bottom: 1px solid var(--chrome-border); box-shadow: 0 20px 40px rgba(0, 0, 0, .45); max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  html:not(.js) .site-nav { position: static; box-shadow: none; background: transparent; }
  .site-nav .container { padding-top: 4px; }
  .header-account { display: none; }
}
@media (min-width: 1140px) {
  .nav-toggle { display: none; }
  .site-nav, html:not(.js) .site-nav { display: block; margin-left: auto; }
  .site-nav > .container { padding: 0; max-width: none; }
  .nav-list { display: flex; align-items: center; gap: 2px; }
  .nav-link { padding: 8px 10px; border: 0; border-radius: 10px; font-size: .95rem; white-space: nowrap; }
  .nav-link .icon { display: none; }
  .nav-link:hover { background: rgba(230, 176, 74, .08); }
  .nav-link[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 12px;
    height: 7px;
    transform: translateX(-50%);
    background: var(--gold-500);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
  }
  .nav-account, .nav-lang { display: none; }
  .header-account { display: flex; flex: none; gap: 8px; margin-left: 8px; }
  .header-account .btn { white-space: nowrap; }
}
/* 1140–1439 px (e.g. 1366 laptops): 9 menu items + logo + account button must fit on one line in ru/uk/en */
@media (min-width: 1140px) and (max-width: 1439px) {
  .header-inner { gap: 12px; }
  .brand img { width: 184px; }
  .nav-list { gap: 0; }
  .nav-link { padding: 8px 7px; font-size: .9rem; }
  .header-account { margin-left: 4px; }
}
@media (max-width: 599px) {
  .topbar-register { display: none; }
}
@media (max-width: 420px) {
  .brand img { width: 176px; }
  .topbar-links .hide-xs { display: none; }
  .topbar-inner { gap: 8px; }
  .status-players-label { display: none; }
}

/* ============================== 5. Footer ============================== */
.site-footer {
  margin-top: auto;
  color: var(--chrome-muted);
  background:
    url("../img/stars.svg") repeat 0 0 / 360px,
    linear-gradient(180deg, #0a0f1e, #060914);
  border-top: 1px solid var(--chrome-border);
  font-size: .95rem;
}
.site-footer .frieze { opacity: .55; }
.footer-grid { display: grid; gap: 32px; padding: 44px 0 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.footer-brand img { width: 200px; }
.footer-brand p { margin: 14px 0 0; max-width: 36ch; }
.footer-title { margin: 0 0 12px; color: var(--chrome-text); font: 700 .78rem/1.2 var(--font-body); letter-spacing: .16em; text-transform: uppercase; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li + li { margin-top: 8px; }
.site-footer a { color: var(--chrome-text); text-decoration: none; }
.site-footer a:hover { color: var(--gold-300); text-decoration: underline; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px solid var(--chrome-border); border-radius: 999px;
}
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  padding: 18px 0 28px; border-top: 1px solid var(--chrome-border); font-size: .82rem;
}

/* ============================== 6. Components ============================== */

/* --- Buttons --- */
.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text-strong);
  --btn-border: var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--btn-border);
  border-radius: 12px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 700 .98rem/1.2 var(--font-body);
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
  -webkit-user-select: none;
  user-select: none;
}
.btn:hover { color: var(--btn-fg); border-color: var(--accent); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  --btn-fg: var(--on-accent);
  --btn-border: #f7cf72;
  background: var(--gold-grad);
  box-shadow: 0 6px 18px rgba(230, 176, 74, .28), inset 0 1px 0 rgba(255, 255, 255, .45);
  text-shadow: 0 1px 0 rgba(255, 240, 200, .35);
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(230, 176, 74, .4), inset 0 1px 0 rgba(255, 255, 255, .5); filter: brightness(1.05); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--text-strong); }
.site-header .btn-ghost, .hero .btn-ghost, .topbar .btn-ghost { --btn-fg: var(--chrome-text); --btn-border: rgba(230, 176, 74, .4); }
.btn-danger { --btn-bg: transparent; --btn-fg: var(--danger); --btn-border: var(--danger); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .88rem; border-radius: 10px; }
.btn-lg { min-height: 52px; padding: 14px 28px; font-size: 1.05rem; border-radius: 14px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn.is-disabled, .btn[aria-disabled="true"] {
  opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; filter: grayscale(.4);
}
.btn .icon { width: 1.15em; height: 1.15em; }

/* --- Cards --- */
.card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(90deg, var(--fiber) 0 2px, transparent 2px 8px),
    repeating-linear-gradient(0deg, var(--fiber) 0 1px, transparent 1px 6px),
    var(--surface);
  box-shadow: var(--shadow-sm);
}
.card::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, transparent, var(--gold-500) 20%, var(--gold-300) 50%, var(--gold-500) 80%, transparent);
  opacity: .55;
}
.card > :last-child { margin-bottom: 0; }
.card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 1.25rem; }
.card-title .icon { color: var(--accent); }
.card-sub { margin-top: -6px; color: var(--text-muted); font-size: .92rem; }
.card-footer { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.card-link { text-decoration: none; color: inherit; display: block; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.card-link:hover { color: inherit; transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card-plain::before { display: none; }
.card-glass {
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* feature card */
.feature { display: flex; flex-direction: column; gap: 10px; }
.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  color: var(--gold-400);
  background: radial-gradient(circle at 30% 25%, rgba(255, 217, 138, .22), rgba(230, 176, 74, .06));
  border: 1px solid var(--border-strong);
}
:root[data-theme="light"] .feature-icon { color: var(--accent); }
.feature-icon .icon { width: 28px; height: 28px; }
.feature h3 { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.feature p { margin: 0; color: var(--text-muted); }

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font: 700 .74rem/1.4 var(--font-body);
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-muted);
  background: transparent;
}
.badge-gold { color: var(--accent); background: rgba(230, 176, 74, .1); }
.badge-success { color: var(--success); background: rgba(79, 209, 193, .08); }
.badge-danger { color: var(--danger); background: rgba(240, 122, 94, .08); }
.badge-warning { color: var(--warning); background: rgba(244, 169, 59, .08); }
.badge-info { color: var(--info); background: rgba(126, 166, 255, .08); }
.badge-muted { color: var(--text-muted); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* --- Alerts / flash --- */
.alert {
  --alert-c: var(--info);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  margin: 0 0 16px;
  border: 1px solid var(--alert-c);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}
.alert .icon { color: var(--alert-c); margin-top: 2px; }
.alert > div > :last-child { margin-bottom: 0; }
.alert-success { --alert-c: var(--success); }
.alert-error { --alert-c: var(--danger); }
.alert-warning { --alert-c: var(--warning); }
.alert-info { --alert-c: var(--info); }
.flash-stack { padding-top: 20px; }
.flash-stack .alert { box-shadow: var(--shadow-sm); }

/* --- Forms --- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; gap: 18px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
.field > label, .field-label { font-weight: 700; color: var(--text-strong); font-size: .95rem; }
.field .req { color: var(--danger); margin-left: 2px; }
.input,
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text-strong);
  font: 400 1rem/1.4 var(--font-body);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); opacity: .75; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230, 176, 74, .22);
  outline: none;
}
.field-hint { margin: 0; color: var(--text-muted); font-size: .86rem; }
.field-error { margin: 0; color: var(--danger); font-size: .88rem; font-weight: 600; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--gold-500); flex: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.form-actions .link-muted { margin-left: auto; }
.otp-input {
  font-family: var(--font-mono) !important;
  font-size: 1.5rem !important;
  letter-spacing: .5em;
  text-align: center;
}
.honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* --- Tables --- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  color: var(--text-muted);
  font: 700 .74rem/1.3 var(--font-body);
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(230, 176, 74, .045); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.table-compact th, .table-compact td { padding: 8px 12px; }

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  scrollbar-width: thin;
}
.tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.tab:hover { color: var(--text-strong); background: var(--surface-2); }
.tab[aria-current="page"], .tab.is-active { color: var(--on-accent); background: var(--gold-grad); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem;
}
.chip:hover { color: var(--text-strong); border-color: var(--accent); }
.chip[aria-current="page"] { color: var(--on-accent); background: var(--gold-grad); border-color: transparent; }

/* --- Pagination --- */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 32px; }
.pagination a, .pagination span {
  display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 700;
}
.pagination a:hover { border-color: var(--accent); color: var(--text-strong); }
.pagination [aria-current="page"] { background: var(--gold-grad); color: var(--on-accent); border-color: transparent; }
.pagination .gap { border: 0; min-width: 20px; }

/* --- Stats --- */
.stats { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat {
  position: relative;
  padding: 18px 18px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  right: -14px;
  bottom: -16px;
  width: 70px;
  height: 56px;
  background: var(--accent);
  opacity: .07;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.stat-value {
  display: block;
  font: 700 clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem)/1.1 var(--font-display);
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat-label { display: block; margin-top: 6px; color: var(--text-muted); font-size: .86rem; font-weight: 600; letter-spacing: .04em; }

/* --- Steps (how to start) --- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; } }
.step { position: relative; padding: 22px 20px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); counter-increment: step; }
.step::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 36px;
  margin-bottom: 14px;
  border: 2px solid var(--accent);
  border-radius: 18px;
  color: var(--accent);
  font: 700 1.1rem/1 var(--font-display);
  box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 4px rgba(230, 176, 74, .35);
}
@media (min-width: 900px) {
  .step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 40px;
    right: -23px;
    width: 24px;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--accent) 0 4px, transparent 4px 8px);
    opacity: .6;
  }
}
@media (min-width: 900px) {
  .steps-vertical { grid-template-columns: 1fr; gap: 16px; }
  .steps-vertical .step:not(:last-child)::after { display: none; }
}
.steps-vertical .step { display: grid; grid-template-columns: 46px minmax(0, 1fr); column-gap: 16px; }
.steps-vertical .step::before { grid-row: span 2; margin-bottom: 0; }
.step h3 { margin-bottom: 6px; font-size: 1.12rem; }
.step p { margin: 0 0 12px; color: var(--text-muted); font-size: .95rem; }
.step p:last-child { margin-bottom: 0; }

/* --- Timeline --- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 30px; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(230, 176, 74, .15));
}
.timeline-item { position: relative; padding: 0 0 26px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 3px;
  width: 20px;
  height: 17px;
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.timeline-item.is-future::before { opacity: .38; }
.timeline-when { display: block; color: var(--accent); font: 700 .78rem/1.3 var(--font-body); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 4px; }
.timeline-item h3 { margin-bottom: 6px; font-size: 1.1rem; }
.timeline-item p { margin: 0; color: var(--text-muted); }

/* --- Accordion (native <details>) --- */
.accordion { display: grid; gap: 12px; }
.accordion details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .15s ease;
}
.accordion details[open] { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.accordion summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  color: var(--text-strong);
  font-weight: 700;
  font-size: 1.04rem;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "";
  margin-left: auto;
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s ease;
}
.accordion details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.accordion summary:hover { color: var(--accent-strong); }
.accordion .answer { padding: 0 20px 18px; color: var(--text); }
.accordion .answer > :last-child { margin-bottom: 0; }

/* --- Empty state --- */
.empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 40px 20px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
}
.empty img { width: 200px; opacity: .92; }
.empty h3 { margin: 6px 0 0; }
.empty p { margin: 0; max-width: 46ch; color: var(--text-muted); }

/* --- Key/value list --- */
.kv { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 10px 20px; margin: 0; }
.kv dt { color: var(--text-muted); font-weight: 600; }
.kv dd { margin: 0; color: var(--text-strong); overflow-wrap: anywhere; }

/* --- Sub-navigation (cabinet sidebar) --- */
.subnav { display: flex; gap: 6px; overflow-x: auto; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.subnav a { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; white-space: nowrap; }
.subnav a:hover { background: var(--surface-2); color: var(--text-strong); }
.subnav a[aria-current="page"] { background: rgba(230, 176, 74, .14); color: var(--accent-strong); box-shadow: inset 3px 0 0 var(--accent); }
.subnav .icon { color: var(--accent); }
.with-sidebar { display: grid; gap: 24px; }
@media (min-width: 960px) {
  .with-sidebar { grid-template-columns: 250px minmax(0, 1fr); align-items: start; }
  .with-sidebar .subnav { flex-direction: column; position: sticky; top: calc(var(--header-h) + 16px); }
}

/* --- Prose (rendered markup) --- */
.prose { font-size: 1.04rem; line-height: 1.75; }
.prose > * + * { margin-top: 1em; }
.prose p, .prose ul { margin-bottom: 0; }
.prose h2 { margin-top: 1.6em; font-size: 1.55rem; }
.prose h3 { margin-top: 1.4em; font-size: 1.22rem; }
.prose ul { padding-left: 0; list-style: none; }
.prose li { position: relative; padding-left: 24px; }
.prose li + li { margin-top: .4em; }
.prose li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .62em;
  width: 10px;
  height: 8px;
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.prose a { overflow-wrap: anywhere; }

/* --- Code / backup codes (for cabinet) --- */
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; padding: 0; margin: 0; list-style: none; }
.codes li { padding: 8px 10px; border: 1px dashed var(--border-strong); border-radius: 8px; font-family: var(--font-mono); text-align: center; letter-spacing: .08em; }
.qr { display: inline-block; padding: 12px; border-radius: var(--radius-sm); background: #fff; line-height: 0; }

/* ============================== 7. Pages ============================== */

/* --- Hero (home) --- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--chrome-text);
  background: url("../img/hero.svg") center bottom / cover no-repeat, #0b1227;
  padding: clamp(72px, 11vw, 150px) 0 clamp(110px, 14vw, 190px);
  min-height: min(92vh, 860px);
  display: flex;
  align-items: center;
}
.hero > .container { width: 100%; }
.hero-bg {
  position: absolute;
  inset: -2%;
  z-index: -2;
  background: url("../img/home/hero.jpg") 62% center / cover no-repeat;
  background-image: image-set(url("../img/home/hero.webp") type("image/webp"), url("../img/home/hero.jpg") type("image/jpeg"));
  transform-origin: 65% 40%;
  animation: hero-drift 38s ease-in-out infinite alternate;
}
.hero-sand {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("../img/sand.svg") 0 0 / 400px 300px repeat;
  opacity: .55;
  animation: sand-flow 26s linear infinite;
  -webkit-mask: linear-gradient(180deg, transparent 0%, #000 45%, #000 100%);
  mask: linear-gradient(180deg, transparent 0%, #000 45%, #000 100%);
}
@keyframes hero-drift { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.1) translate3d(-1.5%, -1%, 0); } }
@keyframes sand-flow { from { background-position: 0 0; } to { background-position: -800px 120px; } }
@media (prefers-reduced-motion: reduce) { .hero-bg, .hero-sand { animation: none; } }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(6, 10, 22, .9) 0%, rgba(6, 10, 22, .62) 38%, rgba(6, 10, 22, .08) 72%, rgba(6, 10, 22, .25) 100%),
    linear-gradient(180deg, rgba(6, 10, 22, .55) 0%, rgba(6, 10, 22, 0) 30%, rgba(6, 10, 22, 0) 70%, rgba(6, 10, 22, .7) 100%);
}
@media (max-width: 979px) {
  .hero::before { background: linear-gradient(180deg, rgba(6, 10, 22, .55) 0%, rgba(6, 10, 22, .78) 55%, rgba(6, 10, 22, .92) 100%); }
  .hero { min-height: 0; }
}
.hero::after, .page-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 56px;
  background: var(--bg);
  -webkit-mask: url("../img/dunes-mask.svg") center bottom / 100% 100% no-repeat;
  mask: url("../img/dunes-mask.svg") center bottom / 100% 100% no-repeat;
}
.hero-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); } }
.hero h1 { margin-bottom: 18px; color: #fbf1d8; font-size: clamp(2.6rem, 1.5rem + 4.6vw, 5rem); line-height: 1.02; letter-spacing: .01em; text-shadow: 0 4px 30px rgba(0, 0, 0, .6), 0 0 60px rgba(242, 197, 102, .18); }
.hero h1 .gold {
  background: linear-gradient(180deg, #ffeab8 10%, #f2c566 50%, #d4952f 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .eyebrow { color: var(--gold-400); }
.hero-lead { max-width: 54ch; margin-bottom: 28px; font-size: clamp(1.02rem, .96rem + .3vw, 1.18rem); color: #e2d6b8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 559px) {
  .hero-actions .btn, .cta .cluster .btn { flex: 1 1 100%; }
  .eyebrow { letter-spacing: .12em; }
}
.hero-note { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; padding: 0; list-style: none; color: #cbbf9f; font-size: .92rem; }
.hero-note li { display: inline-flex; align-items: center; gap: 8px; }
.hero-note .icon { color: var(--gold-400); }

.hero-panel {
  --text: var(--chrome-text);
  --text-muted: var(--chrome-muted);
  --text-strong: #fbf1d8;
  --heading: #fbf1d8;
  --border: rgba(230, 176, 74, .22);
  --border-strong: rgba(230, 176, 74, .4);
  --surface: rgba(10, 16, 34, .72);
  --surface-2: rgba(26, 36, 64, .8);
  --accent: var(--gold-500);
  --fiber: rgba(230, 176, 74, .03);
  color: var(--text);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.hero-panel .card-title { font-size: 1.1rem; }
.panel-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.panel-status .status-label { font-size: 1.05rem; }
.panel-players { text-align: right; }
.panel-players b { display: block; font: 700 1.9rem/1 var(--font-display); color: var(--gold-300); font-variant-numeric: tabular-nums; }
.panel-players span { font-size: .8rem; color: var(--text-muted); white-space: nowrap; }
.panel-version { display: block; margin-top: 4px; }
.boss-mini { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.boss-mini-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--border-strong); color: var(--gold-400); background: rgba(230, 176, 74, .08); }
.boss-mini-icon .icon { width: 26px; height: 26px; }
.boss-mini h3 { margin: 0; font-size: 1.05rem; }
.boss-mini p { margin: 2px 0 0; font-size: .88rem; color: var(--text-muted); }
.boss-mini .countdown { color: var(--gold-300); }

/* --- Page head (inner pages) --- */
.page-head {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(40px, 6vw, 72px) 0 clamp(68px, 8vw, 96px);
  color: var(--chrome-text);
  background:
    url("../img/stars.svg") repeat 0 0 / 360px,
    radial-gradient(700px 300px at 85% 110%, rgba(230, 150, 70, .28), transparent 70%),
    linear-gradient(180deg, #0a1022 0%, #141c38 70%, #2a2440 100%);
}
.page-head::before {
  content: "";
  position: absolute;
  right: max(3vw, 12px);
  bottom: 30px;
  z-index: -1;
  width: clamp(160px, 26vw, 340px);
  aspect-ratio: 1.6;
  background: linear-gradient(115deg, rgba(230, 176, 74, .05) 0 50%, rgba(230, 176, 74, .16) 50% 100%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.page-head h1 { margin: 0; color: #fbf1d8; }
.page-head + .section { padding-top: clamp(28px, 4vw, 48px); }
.page-head .eyebrow { color: var(--gold-400); }
.page-head .lead { margin: 14px 0 0; max-width: 62ch; color: #d6caac; font-size: 1.08rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; font-size: .88rem; color: var(--chrome-muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.breadcrumbs a { color: var(--chrome-text); text-decoration: none; }
.breadcrumbs a:hover { color: var(--gold-300); }

/* --- News --- */
.news-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.news-card { display: flex; flex-direction: column; height: 100%; }
.news-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 12px; color: var(--text-muted); font-size: .86rem; }
.news-card h3 { margin-bottom: 10px; font-size: 1.24rem; }
.news-card h3 a { color: var(--heading); text-decoration: none; }
.news-card h3 a:hover { color: var(--accent-strong); }
.news-card p { color: var(--text-muted); }
.news-card .more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.news-list { display: grid; gap: 18px; }
.news-row { display: grid; gap: 8px 24px; }
@media (min-width: 760px) { .news-row { grid-template-columns: 150px minmax(0, 1fr); } }
.news-row h2 { margin-bottom: 8px; font-size: 1.32rem; }
.news-row h2 a { color: var(--heading); text-decoration: none; }
.news-row h2 a:hover { color: var(--accent-strong); }
.news-date { color: var(--text-muted); font-size: .9rem; }
.news-date b { display: block; font: 700 1.6rem/1.1 var(--font-display); color: var(--accent); }
.article { padding: clamp(24px, 4vw, 44px); }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 24px; color: var(--text-muted); font-size: .92rem; }
.article-meta .icon { color: var(--accent); }
.article-back { margin-top: 32px; }

/* --- About / Хеопс --- */
.khufu { display: grid; gap: 28px; align-items: center; }
@media (min-width: 960px) { .khufu { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; } }
.khufu-art { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-strong); box-shadow: var(--shadow); line-height: 0; }
.khufu-art img { width: 100%; }
.facts { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 12px; }
.facts li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.facts .icon-wrap { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--accent); background: rgba(230, 176, 74, .1); border: 1px solid var(--border); }
.facts b { display: block; color: var(--text-strong); }
.facts span { color: var(--text-muted); font-size: .95rem; }
.coords { font-family: var(--font-mono); color: var(--accent-strong); white-space: nowrap; }

/* --- Bosses --- */
.boss-list { display: grid; gap: 18px; }
.boss-card { display: grid; gap: 18px; }
@media (min-width: 820px) { .boss-card { grid-template-columns: 64px minmax(0, 1fr) 260px; align-items: center; } }
.boss-emblem { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; color: var(--gold-400); border: 1px solid var(--border-strong); background: radial-gradient(circle at 30% 25%, rgba(255, 217, 138, .22), rgba(230, 176, 74, .05)); }
:root[data-theme="light"] .boss-emblem { color: var(--accent); }
.boss-emblem .icon { width: 34px; height: 34px; }
.boss-card h2 { margin: 0 0 6px; font-size: 1.45rem; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.boss-info { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; color: var(--text-muted); font-size: .94rem; }
.boss-info li { display: inline-flex; align-items: center; gap: 6px; }
.boss-info .icon { color: var(--accent); }
.boss-note { margin: 10px 0 0; color: var(--text-muted); font-size: .94rem; }
.boss-timer { padding: 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); text-align: center; }
.boss-timer-label { display: block; color: var(--text-muted); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.countdown { display: block; margin: 6px 0 10px; font: 700 1.9rem/1.1 var(--font-mono); color: var(--accent-strong); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.boss-timer.is-alive .countdown { color: var(--success); font-family: var(--font-display); font-size: 1.5rem; }
.boss-timer.is-unknown .countdown { color: var(--text-muted); font-family: var(--font-display); font-size: 1.3rem; }
.boss-timer small { display: block; color: var(--text-muted); font-size: .82rem; }
.countdown-inline { font-family: var(--font-mono); color: var(--gold-300); font-variant-numeric: tabular-nums; }
.meter { display: block; width: 100%; height: 8px; border: 0; border-radius: 999px; background: var(--surface-2); overflow: hidden; -webkit-appearance: none; appearance: none; }
.meter::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
.meter::-webkit-progress-value { background: var(--gold-grad); border-radius: 999px; }
.meter::-moz-progress-bar { background: var(--gold-500); border-radius: 999px; }

/* --- Rankings --- */
.rank-pos { width: 64px; font-weight: 800; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rank-medal { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: .9rem; color: #1b1304; }
.rank-1 .rank-medal { background: linear-gradient(180deg, #ffe7a6, #e2a73c); box-shadow: 0 0 14px rgba(242, 197, 102, .45); }
.rank-2 .rank-medal { background: linear-gradient(180deg, #f2f1ea, #aeb3bd); }
.rank-3 .rank-medal { background: linear-gradient(180deg, #f5c79d, #b8733c); }
.rank-name { font-weight: 700; color: var(--text-strong); overflow-wrap: anywhere; }
.rank-meta { color: var(--text-muted); font-size: .88rem; }
@media (max-width: 559px) {
  .tab { flex: 1 0 auto; justify-content: center; padding: 8px 10px; font-size: .92rem; }
  .tab .icon { display: none; }
  .table .hide-sm { display: none; }
  .table th, .table td { padding: 10px 12px; }
  .rank-pos { width: 44px; }
  .table thead th { letter-spacing: .05em; }
}
.table-foot { margin-top: 12px; color: var(--text-muted); font-size: .86rem; display: flex; gap: 8px; align-items: center; }

/* --- Files --- */
.download-card { display: flex; flex-direction: column; gap: 14px; }
.download-card .btn { margin-top: auto; }
.download-size { color: var(--text-muted); font-size: .9rem; }
.download-launcher { border-color: rgba(230, 176, 74, .45); box-shadow: 0 0 0 1px rgba(230, 176, 74, .12) inset; }
.download-launcher-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.download-launcher-head .card-title { margin: 0; }
.download-launcher .checklist { margin: 0; }
.download-sha { margin: -6px 0 0; text-align: center; }
.download-sha-btn { background: none; border: 0; padding: 2px 4px; color: var(--text-muted); font: inherit; font-size: .82rem; cursor: copy; }
.download-sha-btn:hover, .download-sha-btn:focus-visible { color: var(--accent); }
.download-sha-btn code { font-size: inherit; }
@media (min-width: 960px) { .download-launcher { grid-column: span 2; } }
.req-table th { width: 34%; }

/* --- Rules --- */
.rules-nav { display: none; }
@media (min-width: 960px) {
  .rules-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; }
  .rules-nav { display: block; position: sticky; top: calc(var(--header-h) + 20px); }
}
.rules-nav ol { margin: 0; padding: 0; list-style: none; counter-reset: rn; }
.rules-nav li { counter-increment: rn; }
.rules-nav a { display: flex; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: .94rem; }
.rules-nav a::before { content: counter(rn) "."; color: var(--accent); min-width: 1.4em; }
.rules-nav a:hover { color: var(--text-strong); background: var(--surface); }
.rule-section { scroll-margin-top: calc(var(--header-h) + 16px); }
.rule-section + .rule-section { margin-top: 20px; }
.rule-section h2 { display: flex; gap: 12px; align-items: baseline; font-size: 1.45rem; }
.rule-num { color: var(--accent); font-size: 1.1rem; }
.rule-list { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.rule-list > li { position: relative; padding-left: 46px; counter-increment: r; }
.rule-list > li + li { margin-top: 12px; }
.rule-list > li::before {
  content: attr(data-n);
  position: absolute;
  left: 0;
  top: 1px;
  min-width: 36px;
  color: var(--accent);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: .92rem;
}
.penalty { color: var(--danger); font-weight: 700; }

/* --- CTA band --- */
.cta {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 20px;
  align-items: center;
  padding: clamp(28px, 5vw, 48px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(230, 176, 74, .35);
  color: var(--chrome-text);
  background:
    url("../img/stars.svg") repeat 0 0 / 360px,
    radial-gradient(500px 240px at 100% 100%, rgba(230, 150, 70, .35), transparent 70%),
    linear-gradient(135deg, #0e1631, #1d2346);
  box-shadow: var(--shadow);
}
@media (min-width: 860px) { .cta { grid-template-columns: 1fr auto; } }
.cta h2 { margin: 0 0 8px; color: #fbf1d8; }
.cta p { margin: 0; color: #d6caac; }
.cta .btn-ghost { --btn-fg: var(--chrome-text); --btn-border: rgba(230, 176, 74, .45); }

/* --- Home: bonuses and shop teaser --- */
.bonus-card { display: flex; flex-direction: column; gap: 10px; }
.bonus-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--on-accent);
  background: var(--gold-grad);
  box-shadow: 0 6px 16px rgba(230, 176, 74, .28), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.bonus-icon .icon { width: 24px; height: 24px; }
.bonus-card h3 { margin: 4px 0 0; }
.bonus-card p { margin: 0; color: var(--text-muted); }

.shop-teaser { display: grid; gap: 28px; align-items: center; }
.shop-teaser > * { min-width: 0; }
@media (min-width: 900px) { .shop-teaser { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 56px; } }
.shop-teaser h2 { margin-bottom: 10px; }
.checklist { list-style: none; margin: 18px 0 26px; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; align-items: flex-start; gap: 10px; }
.checklist .icon { color: var(--success); margin-top: .18em; }
.rate-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: clamp(28px, 4vw, 40px) 24px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(230, 176, 74, .35);
  color: var(--chrome-text);
  text-align: center;
  background:
    url("../img/stars.svg") repeat 0 0 / 360px,
    radial-gradient(320px 200px at 50% 0%, rgba(230, 176, 74, .28), transparent 70%),
    linear-gradient(135deg, #0e1631, #1d2346);
  box-shadow: var(--shadow);
}
.rate-card-icon { color: var(--gold-400); line-height: 0; }
.rate-card-icon .icon { width: 64px; height: 64px; }
.rate-card-usd {
  font: 700 clamp(2.8rem, 2.2rem + 2vw, 3.6rem)/1 var(--font-display);
  background: linear-gradient(180deg, #ffeab8 10%, #f2c566 50%, #d4952f 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rate-card-eq { color: var(--chrome-muted); font-size: 1.1rem; line-height: 1; }
.rate-card-scarabs { font: 700 1.35rem/1.25 var(--font-display); color: #fbf1d8; }

/* --- Files: hint under the Google Drive button --- */
.download-hint { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--text-muted); font-size: .85rem; line-height: 1.45; }
.download-hint .icon { flex: none; color: var(--info); margin-top: .1em; }

/* --- Errors --- */
.error-page { text-align: center; padding: clamp(48px, 8vw, 96px) 0; }
.error-code {
  display: block;
  font: 700 clamp(5rem, 3rem + 10vw, 9rem)/1 var(--font-display);
  background: var(--gold-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: .04em;
}
.error-page img { width: min(320px, 80%); margin: 8px auto 16px; display: block; }
.error-page p { max-width: 48ch; margin-left: auto; margin-right: auto; color: var(--text-muted); }
.error-page .cluster { justify-content: center; margin-top: 24px; }

/* --- Cabinet / account pages (templates/account/**, backend-accounts) ---
   Those templates are not wrapped in .container: top-level blocks are centred here. */
.site-main > .card,
.site-main > .cabinet,
.site-main > .page-body {
  width: calc(100% - 2 * var(--gutter));
  max-width: var(--container);
  margin: clamp(24px, 4vw, 56px) auto;
}
.site-main > .card-narrow { max-width: 480px; }
.card-narrow { max-width: 560px; }
.auth-card { padding: clamp(24px, 4vw, 36px); }
.auth-card h1 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2rem); }
.auth-links { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--border); color: var(--text-muted); text-align: center; }
.cabinet > h1 { margin-bottom: 18px; }
.cabinet > * + * { margin-top: 20px; }
.cabinet-nav { display: flex; gap: 6px; overflow-x: auto; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  -webkit-overflow-scrolling: touch; scrollbar-width: thin; scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.cabinet-nav-link { scroll-snap-align: start; }
@media (min-width: 760px) {
  .cabinet-nav, .cabinet-nav.subnav { flex-wrap: wrap; overflow-x: visible; -webkit-mask-image: none; mask-image: none; }
}
@media (min-width: 1140px) {
  .cabinet-nav { gap: 2px; }
  .cabinet-nav-link { padding: 9px 12px; font-size: .95rem; }
}
.cabinet-nav-link { flex: none; padding: 9px 16px; border-radius: 10px; color: var(--text); font-weight: 700; text-decoration: none; white-space: nowrap; }
.cabinet-nav-link:hover { color: var(--text-strong); background: var(--surface-2); }
.cabinet-nav-link.is-active, .cabinet-nav-link[aria-current="page"] { color: var(--on-accent); background: var(--gold-grad); }
.card-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.card h2 { font-size: 1.35rem; }
.card > .table { margin: 0 0 12px; }
.table-kv th { width: 38%; color: var(--text-muted); font-weight: 600; }
.card .table th, .card .table td { padding-left: 0; }
.card .table-wrap .table th, .card .table-wrap .table td { padding-left: 16px; }
.inline-form { display: inline-flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0 0; }
.btn-link { min-height: 0; padding: 4px 2px; border: 0; background: none; color: var(--link); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; box-shadow: none; }
.btn-link:hover { color: var(--link-hover); transform: none; }
.secret-key { display: inline-block; padding: 8px 12px; font-size: 1.05rem; letter-spacing: .12em; word-break: break-all; }
.otpauth-uri { display: block; padding: 8px 10px; font-size: .8rem; word-break: break-all; }
.qr svg, .qr img { display: block; width: 200px; height: 200px; }
.backup-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.backup-codes li { padding: 8px 10px; border: 1px dashed var(--border-strong); border-radius: 8px; text-align: center; }
.backup-codes code { background: none; padding: 0; letter-spacing: .08em; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li + li { margin-top: 8px; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.error-details { max-height: 360px; overflow: auto; padding: 14px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--border); font-size: .82rem; text-align: left; white-space: pre-wrap; }
details > summary { cursor: pointer; }
.topbar-logout { display: inline; margin: 0; }
.topbar-logout button { padding: 0 4px; border: 0; background: none; color: var(--chrome-muted); font: inherit; cursor: pointer; }
.topbar-logout button:hover { color: var(--gold-300); text-decoration: underline; }

/* ============================== 8. Utilities ============================== */
.sr-only, .visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.muted { color: var(--text-muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.gold { color: var(--accent); }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mt-4 { margin-top: 40px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }
.nowrap { white-space: nowrap; }
.mx-auto { margin-left: auto; margin-right: auto; }
.link-muted { color: var(--text-muted); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.link-arrow:hover .icon { transform: translateX(3px); }
.link-arrow .icon { transition: transform .15s ease; }

/* ============================== 9. Motion / print ============================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .topbar, .site-header, .site-footer, .hero::after, .page-head::after, .btn, .pagination { display: none !important; }
  body { background: #fff; color: #000; }
  .page-head, .hero { background: none; color: #000; padding: 16px 0; }
  .card { box-shadow: none; background: none; border-color: #999; }
}

/* --- Races & classes (home) --- */
.races { position: relative; }
.race-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.race-card { --race: 230, 176, 74; --chip-a: #ffe3a3; --chip-b: #e0a94a; --chip-fg: #1a1206; }
.race-humans { --race: 226, 84, 58; --chip-a: #ffc2a8; --chip-b: #d9543a; --chip-fg: #2a0b05; }
.race-untamed { --race: 96, 196, 110; --chip-a: #c9f2b8; --chip-b: #4fa35c; --chip-fg: #0b2210; }
.race-elves { --race: 150, 200, 255; --chip-a: #ffffff; --chip-b: #a9d2ff; --chip-fg: #0d2238; }
.race-tideborn { --race: 170, 120, 255; --chip-a: #b9f3ff; --chip-b: #8a6cff; --chip-fg: #120a2e; }
@media (max-width: 559px) {
  .race-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .race-card { scroll-snap-align: start; }
}
.race-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 480px;
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  border: 1px solid rgba(var(--race), .4);
  background: #0b1227;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 -3px 0 rgba(var(--race), .85);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.race-card picture, .race-card img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.race-card img { object-fit: cover; object-position: center 20%; transition: transform .6s ease; }
.race-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(6, 10, 22, 0) 35%, rgba(6, 10, 22, .72) 62%, rgba(6, 10, 22, .96) 100%);
}
.race-card:hover, .race-card:focus-within { transform: translateY(-6px); border-color: rgba(var(--race), .9); box-shadow: 0 18px 44px rgba(0, 0, 0, .45), 0 0 0 1px rgba(var(--race), .35), 0 0 46px rgba(var(--race), .3), inset 0 -3px 0 rgba(var(--race), 1); }
.race-card:hover img, .race-card:focus-within img { transform: scale(1.06); }
.race-body { padding: 18px 18px 20px; color: #e8dcc0; }
.race-body h3 { margin: 0 0 6px; font-size: 1.35rem; color: #fbf1d8; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.race-body p { margin: 0 0 12px; font-size: .9rem; line-height: 1.45; color: #d4c7a6; }
.race-classes { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.race-classes li { padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--chip-fg); background: linear-gradient(180deg, var(--chip-a), var(--chip-b)); }
.race-body h3 { text-shadow: 0 2px 12px rgba(0, 0, 0, .6), 0 0 22px rgba(var(--race), .45); }
@media (prefers-reduced-motion: reduce) { .race-card, .race-card img { transition: none; } }
