/*!
 * 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: 4px; }
.cabinet > * + * { margin-top: 18px; }

/* v23: the cabinet menu — three short sections; a column on the left on wide screens, a button that opens the list on
   phones (site.js initCabinetNav adds .is-collapsible; without JS the list is simply shown). */
.cabinet-nav { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 6px; }
.cabinet-nav-toggle { display: none; }
.cabinet-nav.is-collapsible .cabinet-nav-toggle {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px;
  border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.cabinet-nav-toggle strong { color: var(--text-strong); }
.cabinet-nav-toggle > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cabinet-nav-toggle .icon { flex: none; color: var(--text-muted); }
.cabinet-nav-chev { transition: transform .15s ease; }
.cabinet-nav.is-open .cabinet-nav-chev { transform: rotate(180deg); }
.cabinet-nav.is-collapsible .cabinet-nav-list { display: none; padding: 4px 0 2px; border-top: 1px solid var(--border); margin-top: 4px; }
.cabinet-nav.is-collapsible.is-open .cabinet-nav-list { display: block; }
.cabinet-nav-sec + .cabinet-nav-sec { margin-top: 10px; }
.cabinet-nav-head { margin: 6px 0 2px; padding: 0 10px; color: var(--text-muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.cabinet-nav-link {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px;
  color: var(--text); font-weight: 500; text-decoration: none; line-height: 1.35;
}
.cabinet-nav-link .icon { flex: none; width: 1.05em; height: 1.05em; color: var(--text-muted); }
.cabinet-nav-link:hover { color: var(--text-strong); background: var(--surface-2); }
.cabinet-nav-link:hover .icon { color: var(--accent); }
.cabinet-nav-link[aria-current="page"] { color: var(--text-strong); background: var(--surface-2); font-weight: 600; }
.cabinet-nav-link[aria-current="page"] .icon { color: var(--accent); }
.cabinet-nav-link[aria-current="page"]::before {
  content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 3px; background: var(--accent);
}
@media (min-width: 960px) {
  .cabinet { display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: 28px; align-items: start; }
  .cabinet > * { grid-column: 2; }
  .cabinet > * + * { margin-top: 18px; }
  .cabinet > .cabinet-nav {
    grid-column: 1; grid-row: 1 / span 60; margin-top: 0; align-self: start;
    position: sticky; top: calc(var(--header-h) + 16px); padding: 8px;
  }
  .cabinet > h1 { margin-top: 0; }
  .cabinet-nav.is-collapsible .cabinet-nav-toggle { display: none; }
  .cabinet-nav.is-collapsible .cabinet-nav-list { display: block; border-top: 0; margin-top: 0; padding: 0; }
}
.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; } }

/* v16 clan icons (cabinet /cabinet/clan, admin /admin/clan-icons) */
.clan-icon-current { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px; margin: 8px 0 18px; }
.clan-icon-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-muted); font-size: .85rem; }
.clan-icon-big { width: 128px; height: 128px; border-radius: 10px; background: repeating-conic-gradient(rgba(127,127,127,.18) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.clan-icon-stage { display: inline-flex; align-items: center; justify-content: center; padding: 10px; border-radius: 8px; background: #2c2c2a; }
.clan-icon-zoom { image-rendering: pixelated; image-rendering: crisp-edges; }
.clan-icon-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.clan-icon-cell { display: flex; align-items: center; gap: 10px; }

/* v16 name styles (cabinet /cabinet/names, admin /admin/name-styles); colour classes = App\Names\Palette::COLORS */
.ns-preview { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px 12px; margin: 6px 0 14px; border-radius: 10px;
  background: linear-gradient(180deg, #3a4a5e, #26303c); font-family: Arial, Helvetica, sans-serif; font-size: 18px; line-height: 1.25;
  text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000; color: #fff; }
.ns-status { color: #ffd24a; }
.ns-status.is-empty { opacity: .45; font-style: italic; }
.ns-name { color: #fff; }
.ns-state { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 4px; }
.ns-pending { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--warning, #d9a400); }
.ns-form { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--border, rgba(127,127,127,.25)); }
.ns-h { font-size: 1rem; margin: 0 0 8px; }
.ns-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.ns-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.ns-swatch { position: relative; cursor: pointer; }
.ns-swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ns-dot { display: block; width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(0,0,0,.35); box-shadow: 0 0 0 2px transparent; transition: box-shadow .15s; }
.ns-swatch input:checked + .ns-dot { box-shadow: 0 0 0 3px var(--accent); }
.ns-swatch input:focus-visible + .ns-dot { box-shadow: 0 0 0 3px var(--accent-strong); outline: 2px dashed var(--accent-strong); outline-offset: 3px; }
.ns-chip { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; border: 1px solid rgba(0,0,0,.4); }
.ns-sample { padding: 2px 8px; border-radius: 6px; background: #26303c; font-family: Arial, Helvetica, sans-serif; text-shadow: 1px 1px 0 #000; }
.ns-c-ff8c00 { color: #ff8c00; } .ns-bg-ff8c00 { background: #ff8c00; }
.ns-c-ffd24a { color: #ffd24a; } .ns-bg-ffd24a { background: #ffd24a; }
.ns-c-fff176 { color: #fff176; } .ns-bg-fff176 { background: #fff176; }
.ns-c-b4e05a { color: #b4e05a; } .ns-bg-b4e05a { background: #b4e05a; }
.ns-c-3ddc84 { color: #3ddc84; } .ns-bg-3ddc84 { background: #3ddc84; }
.ns-c-2ee6d6 { color: #2ee6d6; } .ns-bg-2ee6d6 { background: #2ee6d6; }
.ns-c-3d7dff { color: #3d7dff; } .ns-bg-3d7dff { background: #3d7dff; }
.ns-c-9b6bff { color: #9b6bff; } .ns-bg-9b6bff { background: #9b6bff; }
.ns-c-c0c8d0 { color: #c0c8d0; } .ns-bg-c0c8d0 { background: #c0c8d0; }
.ns-c-cd7f32 { color: #cd7f32; } .ns-bg-cd7f32 { background: #cd7f32; }
.ns-c-ff3b3b { color: #ff3b3b; } .ns-bg-ff3b3b { background: #ff3b3b; }
.ns-c-d81b60 { color: #d81b60; } .ns-bg-d81b60 { background: #d81b60; }
.ns-c-ff8fd0 { color: #ff8fd0; } .ns-bg-ff8fd0 { background: #ff8fd0; }
.ns-c-7fd3ff { color: #7fd3ff; } .ns-bg-7fd3ff { background: #7fd3ff; }
.ns-c-ffffff { color: #ffffff; } .ns-bg-ffffff { background: #ffffff; }

/* ---------- Class change (v18, templates/classchange) ---------- */
.cc-how { margin-top: 10px; }
.cc-how summary { cursor: pointer; color: var(--accent); }
.cc-how ul { margin: 8px 0 0; padding-left: 20px; }
.cc-how li { margin: 4px 0; }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 8px; margin-top: 12px; }
.cc-opt { border: 1px solid var(--border); border-radius: 10px; padding: 8px 8px 8px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.cc-opt.is-owned { border-color: var(--border-strong); background: var(--surface-2); }
.cc-opt.is-off { opacity: .6; }
.cc-opt-head { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.cc-opt-head .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-opt form { margin: 0; flex: none; }
.cc-opt .btn { white-space: nowrap; }
.cc-role-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.cc-role-head .card-title { margin: 0; }
.cc-intro { margin-bottom: 6px; }
.cc-later { margin: 12px 0 0; }
/* v33: class change confirmation window */
.cc-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cc-modal[hidden] { display: none; }
.cc-modal-backdrop { position: absolute; inset: 0; background: rgba(4, 7, 15, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.cc-modal-box { position: relative; width: min(100%, 520px); max-height: calc(100vh - 32px); overflow-y: auto; margin: 0; box-shadow: var(--shadow); outline: none; }
.cc-modal-box .card-title { margin-top: 0; }
.cc-modal-warn { display: flex; flex-direction: column; gap: 4px; margin: 12px 0; }
.cc-modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 14px; }
html.cc-modal-open { overflow: hidden; }

/* ============================== v23: calmer working pages ==============================
   The cabinet and the admin are working screens: flat cards, smaller headings in the body font, one accent colour for
   the current item. The public pages keep their look except for the cards (no paper texture / gold line any more). */
.card {
  background: var(--surface);
  box-shadow: none;
}
.card::before { display: none; }
.tab[aria-current="page"], .tab.is-active { color: var(--text-strong); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--accent); }
.btn-primary { box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset; text-shadow: none; }
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset; filter: brightness(1.06); }

.cabinet > h1,
.admin-main h1 {
  font-family: var(--font-body);
  font-size: clamp(1.45rem, 1.25rem + .6vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0;
}
.cabinet h2, .cabinet h3,
.admin-main h2, .admin-main h3 {
  font-family: var(--font-body);
  letter-spacing: 0;
}
.cabinet .card h2, .admin-main .card h2,
.cabinet .card-title, .admin-main .card-title { font-size: 1.08rem; font-weight: 700; }
.cabinet .card h3, .admin-main .card h3 { font-size: 1rem; }
.cabinet .card, .admin-main .card { padding: 20px; }

/* v24: cabinet overview — account and balance side by side, small footer instead of three duplicate cards */
.cabinet-top { display: grid; gap: 18px; align-items: start; }
.cabinet-top > .card { margin: 0; }
@media (min-width: 1100px) {
  .cabinet-top { grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); }
}
.cabinet-top .shop-balance .card-footer { flex-wrap: wrap; }
.cabinet-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; color: var(--text-muted); font-size: .92rem; }
.cabinet-foot .inline-form { margin: 0; }
.cell-action { text-align: right; white-space: nowrap; width: 1%; }
.cabinet-top .shop-balance .stats { display: block; }
.cabinet-top .shop-balance .stat { display: flex; flex-direction: column; gap: 2px; width: 100%; }
.table-wrap + .muted, .table-wrap + p { margin-top: 12px; }

/* v25 titles: public list /titles, cabinet title picker */
.titles-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); margin-bottom: 24px; }
.title-card { display: flex; flex-direction: column; gap: 8px; }
.title-preview { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 10px; border-radius: 10px;
  background: linear-gradient(180deg, #3b4658, #252c38); text-align: center; text-shadow: 0 1px 0 #000, 0 0 3px #000; }
.title-preview .ns-name { color: #fff; font-weight: 600; }
.title-name { margin: 4px 0 0; font-family: var(--font-body); font-size: 1.1rem; letter-spacing: 0; }
.title-how { margin: 0; }
.ns-title-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ns-title-row select { min-height: 40px; max-width: 100%; }

/* v29: «Задачи и фиксы» — cabinet menu counter, the form of points, task cards with the thread (also used by the admin) */
.cabinet-nav-badge {
  flex: none; margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--gold-grad); color: var(--on-accent); font-size: .74rem; font-weight: 700; line-height: 1.55;
  text-align: center; font-variant-numeric: tabular-nums;
}
.cabinet-nav-toggle > .cabinet-nav-badge { flex: none; overflow: visible; }
.task-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.task-point-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.task-point-num { font-weight: 700; color: var(--text-strong); font-size: .95rem; }
.field .task-point-kind { width: auto; min-height: 38px; padding: 6px 12px; font-size: .92rem; }
.field.task-point textarea { min-height: 84px; }
.task-list { display: grid; gap: 14px; }
.task-card { position: relative; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--bg-alt); }
:root[data-theme="light"] .task-card { background: var(--bg); }
.task-card.is-unread { border-color: var(--border-strong); box-shadow: inset 3px 0 0 var(--accent); }
.task-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 8px; }
.task-card-meta { margin-left: auto; color: var(--text-muted); font-size: .84rem; }
.task-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.task-thread { list-style: none; margin: 12px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); display: grid; gap: 10px; }
.task-msg { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; background: var(--surface); }
.task-msg.is-admin { border-color: var(--border-strong); background: var(--surface-2); }
.task-msg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 2px; color: var(--text-muted); font-size: .84rem; }
.task-msg-head strong { color: var(--text-strong); }
.task-msg.is-admin .task-msg-head strong { color: var(--accent); }
.task-msg-head .inline-form { margin: 0 0 0 auto; }
.task-card-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 14px; margin-top: 12px; }
.task-card-actions .inline-form { margin: 0; }
.task-reply { flex: 1 1 280px; }
.task-reply > summary { display: inline-flex; align-items: center; min-height: 36px; color: var(--link); font-weight: 600; font-size: .92rem; }
.task-reply > summary:hover { color: var(--link-hover); }
.task-reply[open] > summary { margin-bottom: 8px; }
.task-reply .form { gap: 10px; }
.task-reply textarea { min-height: 80px; }

/* v31: public roadmap (/roadmap) — board of the players' points by status; column colour = status colour */
.roadmap-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 24px; }
.roadmap-toolbar .chips { margin: 0; }
.roadmap-board { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); align-items: start; }
.roadmap-col { --rc: var(--text-muted); border: 1px solid var(--border); border-top: 3px solid var(--rc); border-radius: var(--radius); background: var(--surface); padding: 14px; }
.rc-new { --rc: var(--info); }
.rc-planned { --rc: var(--accent); }
.rc-progress { --rc: var(--warning); }
.rc-done { --rc: var(--success); }
.rc-rejected { --rc: var(--danger); }
.roadmap-col-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.roadmap-col-head h2 { margin: 0; display: flex; align-items: center; gap: 9px; font-size: 1.12rem; }
.roadmap-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--rc); }
.roadmap-count { min-width: 30px; padding: 1px 8px; border: 1px solid var(--rc); border-radius: 999px; color: var(--rc); font-size: .85rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.roadmap-col-hint { margin: 4px 0 12px; color: var(--text-muted); font-size: .86rem; }
.roadmap-col-empty { margin: 0; padding: 18px 8px; border: 1px dashed var(--border); border-radius: var(--radius-sm); color: var(--text-muted); font-size: .9rem; text-align: center; }
.roadmap-cards { display: grid; gap: 10px; }
.roadmap-card { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-alt); padding: 10px 12px; }
:root[data-theme="light"] .roadmap-card { background: var(--bg); }
.roadmap-card:target { border-color: var(--rc); box-shadow: 0 0 0 2px var(--rc); }
.roadmap-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.roadmap-card-id { margin-left: auto; color: var(--text-muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.roadmap-card-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; font-size: .95rem; }
.roadmap-answer { margin-top: 8px; padding: 7px 10px; border-left: 3px solid var(--rc); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-2); }
.roadmap-answer-head { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; color: var(--accent); font-size: .8rem; font-weight: 700; }
.roadmap-answer-head .icon { width: 1em; height: 1em; }
.roadmap-card-meta { margin: 8px 0 0; color: var(--text-muted); font-size: .8rem; }
.roadmap-more { display: inline-block; margin-top: 12px; font-size: .9rem; font-weight: 600; }
.roadmap-rejected { margin: 20px 0 0; }
.roadmap-back { margin: 0 0 12px; }
.roadmap-list { max-width: 860px; }
.roadmap-list .roadmap-card-text { font-size: 1rem; }
.roadmap-note { margin: 28px 0 0; }
.task-roadmap-note { margin: 10px 0 0; }

/* --- Boss guide (/bosses/guide, v34) --- */
.bg-cta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; margin-bottom: 18px; padding-top: 16px; padding-bottom: 16px; }
.bg-cta b { display: block; color: var(--text-strong); }
.bg-cta > .icon { color: var(--accent); }
.bg-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.bg-list { display: grid; gap: 24px; margin-top: 24px; }
.bg-card { scroll-margin-top: calc(var(--header-h, 72px) + 16px); }
.bg-head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: center; }
.bg-head h2 { margin: 2px 0 0; }
.bg-text { margin: 14px 0 0; color: var(--text-muted); }
.bg-body { display: grid; gap: 22px; margin-top: 18px; }
@media (min-width: 900px) { .bg-body:not(.bg-body-wide) { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; } }
.bg-body > *, .bg-extra > * { min-width: 0; }
.bg-figs { display: grid; gap: 14px; }
.bg-figs-2 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.bg-fig { margin: 0; }
.bg-fig img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface-2); }
.bg-fig figcaption { margin-top: 8px; font-size: .88rem; color: var(--text-muted); }
.bg-kv { align-content: start; }
.bg-coords { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bg-tactics { margin: 24px 0 10px; font-size: 1.15rem; }
.bg-tips { margin: 0; padding-left: 1.4em; display: grid; gap: 8px; }
.bg-tips li::marker { color: var(--accent); font-weight: 700; }
.bg-extra { display: grid; gap: 18px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
@media (min-width: 900px) { .bg-extra { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: start; } }
.bg-extra h3 { display: flex; gap: 10px; align-items: center; margin: 0 0 8px; font-size: 1.15rem; }
.bg-extra h3 .icon { color: var(--accent); }
.bg-extra p { margin: 0; color: var(--text-muted); }
@media (max-width: 599px) { .bg-kv { grid-template-columns: 1fr; gap: 2px 0; } .bg-kv dd { margin-bottom: 10px; } }

/* --- About page: concept (17.10.2026) --- */
@media (min-width: 560px) {
  .hero-actions { flex-wrap: nowrap; }
  .hero-actions .btn-lg { padding-left: 20px; padding-right: 20px; white-space: nowrap; }
}
.ab-concept { display: grid; gap: 28px; align-items: start; }
@media (min-width: 960px) { .ab-concept { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; } }
.ab-lead { font-size: 1.08rem; color: var(--text); max-width: 60ch; }
.ab-label { margin: 18px 0 10px; color: var(--text-muted); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.ab-races { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ab-race {
  --race: 230, 176, 74;
  padding: 8px 18px; border-radius: 999px; font-weight: 700;
  color: var(--text-strong);
  border: 1px solid rgba(var(--race), .55);
  background: linear-gradient(180deg, rgba(var(--race), .22), rgba(var(--race), .07));
  box-shadow: inset 0 -2px 0 rgba(var(--race), .6);
}
.ab-race-0 { --race: 226, 84, 58; }
.ab-race-1 { --race: 96, 196, 110; }
.ab-race-2 { --race: 150, 200, 255; }
.ab-race-3 { --race: 230, 176, 74; }
.ab-race-4 { --race: 170, 120, 255; }
.ab-style { gap: 16px; }

.ab-gear { display: grid; gap: 20px; align-items: stretch; }
@media (min-width: 960px) { .ab-gear { grid-template-columns: minmax(0, .8fr) auto minmax(0, 1.2fr); } }
.ab-gear-arrow { display: none; align-self: center; color: var(--accent); }
.ab-gear-arrow .icon { width: 34px; height: 34px; }
@media (min-width: 960px) { .ab-gear-arrow { display: block; } }
.ab-gear-max { border-color: var(--border-strong); box-shadow: var(--shadow-sm), 0 0 0 1px rgba(230, 176, 74, .12), 0 0 40px rgba(230, 176, 74, .1); }
.ab-gear-max::before { opacity: 1; }
.ab-checklist { margin: 6px 0 0; }
.ab-checklist .icon { color: var(--accent); }
@media (min-width: 640px) {
  .ab-checklist-2 { display: block; columns: 2; column-gap: 26px; }
  .ab-checklist-2 li { break-inside: avoid; margin-bottom: 10px; }
}

.ab-coins { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.ab-coin {
  --m1: #f6c79a; --m2: #b8693a;
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.ab-coin h3 { margin: 0; font-size: 1.15rem; }
.ab-coin p { margin: 2px 0 0; color: var(--text-muted); font-size: .92rem; }
.ab-coin-icon {
  flex: none; display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  color: rgba(20, 12, 2, .78);
  background: radial-gradient(circle at 32% 28%, #fff8 0 12%, transparent 13%), linear-gradient(160deg, var(--m1), var(--m2));
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -3px 0 rgba(0, 0, 0, .18);
}
.ab-coin-icon .icon { width: 26px; height: 26px; }
.ab-coin-silver { --m1: #f2f5f8; --m2: #8d99a8; }
.ab-coin-gold { --m1: #ffe9a8; --m2: #d0952e; }
.ab-coin-crystal { --m1: #9ff3ea; --m2: #2a8f9e; border-color: rgba(79, 209, 193, .35); }
.ab-coin-crystal h3 { color: var(--success); }
.ab-extra { margin-top: 6px; }
.ab-extra .ab-label { margin-top: 22px; }

.ab-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ab-tags li {
  padding: 4px 11px; border-radius: 999px; font-size: .86rem; font-weight: 600;
  color: var(--text-strong); background: rgba(230, 176, 74, .1); border: 1px solid var(--border-strong);
}
.ab-tags-quest li { background: rgba(126, 166, 255, .08); border-color: rgba(126, 166, 255, .38); }
.ab-tags-lg li { padding: 7px 16px; font-size: .95rem; }

.ab-group { display: flex; align-items: center; gap: 12px; margin: 34px 0 16px; font-size: 1.3rem; }
.ab-group:first-of-type { margin-top: 8px; }
.ab-group-num {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  color: var(--on-accent); background: var(--gold-grad); font: 800 1rem/1 var(--font-body);
}
.ab-zones { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.ab-zone { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.ab-zone-name { margin: 0; font-size: 1.2rem; }
.ab-zone-row { display: grid; gap: 6px; }
.ab-zone-label { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.ab-zone-label .icon { width: 15px; height: 15px; color: var(--accent); }
.ab-premium .link-arrow { margin-top: auto; color: var(--link); }
.cta h2 .icon { width: .9em; height: .9em; vertical-align: -.08em; color: var(--gold-400); }
