/* ==========================================================================
   BATAN-ROLE — «Реестр боевых испытаний» — v3 design: MINECRAFT STYLE

   Полностью новая визуальная тема:
   — шрифт Monocraft (открытый шрифт, стилизованный под майнкрафтовский,
     без ассетов Mojang, лицензия OFL 1.1, файл лежит в static/fonts/);
   — никаких скруглений — только блочные пиксельные панели и «бевели»
     (светлый край сверху-слева / тёмный снизу-справа — как GUI-кнопки
     и слоты инвентаря);
   — классические майнкрафтовские цвета текста (§6 золото, §a зелень,
     §c красный, §b аква) вместо прежней «латуни»;
   — текст с фирменной пиксельной тенью (как рендерится текст в игре);
   — никаких «стеклянных» свечений/спиннеров — простые, почти мгновенные
     наведения, как в ванильном меню игры.
   ========================================================================== */

@font-face {
  font-family: "Monocraft";
  src: url("../fonts/Monocraft.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* фон / панели / слоты — тёмный камень */
  --stone-950: #0e0e10;
  --stone-900: #1b1c1e;
  --stone-850: #242527;
  --stone-800: #2d2e31;
  --stone-700: #3a3b3f;
  --stone-line: #000000;

  --bevel-light: rgba(255, 255, 255, 0.16);
  --bevel-lighter: rgba(255, 255, 255, 0.3);
  --bevel-dark: rgba(0, 0, 0, 0.55);
  --bevel-darker: rgba(0, 0, 0, 0.75);

  --paper: #e8dfc3;
  --paper-dim: #cabf99;

  /* майнкрафтовские цвета форматирования (§-коды) */
  --gold: #ffaa00;
  --gold-bright: #ffd479;
  --gold-rgb: 255, 170, 0;

  --red: #ff5555;
  --red-dark: #aa0000;
  --red-rgb: 255, 85, 85;

  --green: #55ff55;
  --green-dark: #00aa00;
  --green-rgb: 85, 255, 85;

  --aqua: #55ffff;
  --aqua-rgb: 85, 255, 255;

  --purple: #ff55ff;
  --purple-rgb: 255, 85, 255;

  --text: #e9e9e9;
  --text-dim: #a8a8a8;
  --text-faint: #6e6e6e;

  --font-display: "Monocraft", "IBM Plex Mono", ui-monospace, monospace;
  --font-body: "Monocraft", "IBM Plex Mono", ui-monospace, monospace;
  --font-mono: "Monocraft", "IBM Plex Mono", ui-monospace, monospace;

  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;

  --wrap: 1120px;

  --shadow-panel: 0 10px 0 rgba(0, 0, 0, 0.45);
  --ease-out: ease-out;

  /* ── навигация: отдельная «плоская» тема для шапки (не пиксельный GUI,
     а current-gen тёмный UI — вдохновлено разметкой/палитрой, которую
     прислал пользователь; ничьи ассеты/изображения не копируются) ──── */
  --font-ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-h: 64px;
  --nav-bg: rgba(14, 14, 16, 0.86);
  --nav-border: rgba(255, 255, 255, 0.07);
  --muted-fg: #8b93a3;
  --pill-bg: rgba(148, 163, 184, 0.08);
  --pill-bg-hover: rgba(148, 163, 184, 0.14);
  --pill-bg-active: rgba(255, 170, 0, 0.13);
  --discord-blurple: #5865f2;
  --discord-blurple-hover: #4752c4;
}

/* ── reset ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }
img, picture { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

/* ── scrollbar ───────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--stone-950); }
::-webkit-scrollbar-thumb {
  background: var(--stone-700);
  border: 2px solid var(--stone-950);
  box-shadow: inset 1px 1px 0 var(--bevel-light), inset -1px -1px 0 var(--bevel-dark);
}
::-webkit-scrollbar-thumb:hover { background: var(--stone-800); }
* { scrollbar-color: var(--stone-700) var(--stone-950); scrollbar-width: thin; }

/* ── фон: тёмный камень с едва заметным «шумом» блоков ──────────────── */
body {
  background-color: var(--stone-950);
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012) 0px, rgba(255, 255, 255, 0.012) 2px, transparent 2px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.1) 0px, rgba(0, 0, 0, 0.1) 2px, transparent 2px, transparent 4px);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  text-shadow: 1.5px 1.5px 0 rgba(0, 0, 0, 0.5);
}

main { flex: 1; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--gold);
  box-shadow: inset -2px -2px 0 rgba(0, 0, 0, 0.45);
}

.section-head { max-width: 640px; margin: 0 0 36px; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: normal;
  margin-top: 10px;
  text-shadow: 1px 0 currentColor, 2px 2px 0 rgba(0, 0, 0, 0.55);
}
.section-head p {
  color: var(--text-dim);
  margin-top: 10px;
  font-size: 14px;
}

section { padding: 60px 0; }

/* ── reveal-on-scroll (простое, без пружин) ─────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.02s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.06s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.10s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.14s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.18s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.22s; }

/* ── pixel bevel helpers ─────────────────────────────────────────────── */
.bevel-out {
  border: 2px solid var(--stone-line);
  box-shadow: inset 2px 2px 0 var(--bevel-light), inset -2px -2px 0 var(--bevel-dark);
}
.bevel-in {
  border: 2px solid var(--stone-line);
  box-shadow: inset 2px 2px 0 var(--bevel-darker), inset -2px -2px 0 var(--bevel-light);
}

/* ── buttons: как GUI-кнопки меню ────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: normal;
  border: 2px solid var(--stone-line);
  background: var(--stone-700);
  color: var(--text);
  box-shadow: inset 2px 2px 0 var(--bevel-light), inset -2px -2px 0 var(--bevel-dark);
  transition: color 0.1s linear, background-color 0.1s linear;
  white-space: nowrap;
  text-shadow: 1.5px 1.5px 0 rgba(0, 0, 0, 0.5);
}
.btn:hover { color: var(--gold-bright); background: #45464a; }
.btn:active {
  box-shadow: inset -2px -2px 0 var(--bevel-light), inset 2px 2px 0 var(--bevel-darker);
  transform: translate(1px, 1px);
}

.btn__ripple { display: none; }

.btn--primary {
  background: #2f6b1f;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.22), inset -2px -2px 0 rgba(0, 0, 0, 0.55);
  color: #eafce0;
}
.btn--primary:hover { background: #3a8226; color: var(--gold-bright); }
.btn--primary:active {
  box-shadow: inset -2px -2px 0 rgba(255, 255, 255, 0.22), inset 2px 2px 0 rgba(0, 0, 0, 0.6);
}

.btn--ghost {
  background: var(--stone-800);
}
.btn--ghost:hover { color: var(--gold-bright); }

.btn--sm { padding: 8px 12px; font-size: 12px; }
.btn--arrow::after { content: "→"; margin-left: 2px; }

/* ── header: плоский тёмный UI, sticky + blur, без бевелей/пикселей ────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--nav-border);
  box-shadow: none;
}
.site-header__inner {
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-right: 28px;
  flex-shrink: 0;
}
.brand__crest {
  width: 26px;
  height: 26px;
  color: var(--gold);
  flex-shrink: 0;
  border: none;
  background: none;
  box-shadow: none;
  padding: 0;
}
.brand__crest svg { width: 100%; height: 100%; }
.brand__word {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.01em;
  color: var(--text);
  text-shadow: 1px 0 currentColor, 2px 2px 0 rgba(0, 0, 0, 0.55);
}
.brand__accent { color: var(--gold); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: auto;
  flex-wrap: wrap;
}
.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--muted-fg);
  padding: 8px 14px;
  border: none;
  border-radius: 999px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
  transition: color 0.12s ease, background-color 0.12s ease;
}
.site-nav__link:hover {
  color: var(--text);
  background: var(--pill-bg-hover);
  border-color: transparent;
  box-shadow: none;
}
.site-nav__link--active {
  color: var(--gold-bright);
  background: var(--pill-bg-active);
}
.site-nav__icon { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.85; }
.site-nav__link:hover .site-nav__icon,
.site-nav__link--active .site-nav__icon { opacity: 1; }

.site-header__auth { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.auth-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px 4px 4px;
  border: none;
  border-radius: 999px;
  background: var(--pill-bg);
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--muted-fg);
  box-shadow: none;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
  transition: color 0.12s ease, background-color 0.12s ease;
}
.auth-chip:hover { color: var(--text); background: var(--pill-bg-hover); }
.auth-chip__avatar {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  image-rendering: auto;
  border-radius: 999px;
  border: none;
}

.site-header__auth .btn--primary {
  border-radius: 999px;
  border: none;
  background: var(--discord-blurple);
  color: #fff;
  box-shadow: none;
}
.site-header__auth .btn--primary:hover { background: var(--discord-blurple-hover); color: #fff; }
.site-header__auth .btn--primary:active { box-shadow: none; transform: none; }

.site-header__auth .btn--ghost {
  border-radius: 999px;
  border: none;
  background: transparent;
}
.site-header__auth .btn--ghost:hover { background: var(--pill-bg-hover); color: var(--gold-bright); }
.site-header__auth .btn--ghost:active { box-shadow: none; transform: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border: none;
  border-radius: 999px;
  background: var(--pill-bg);
}
.nav-toggle:hover { background: var(--pill-bg-hover); }
.nav-toggle span { width: 16px; height: 2px; border-radius: 2px; background: var(--text); display: block; }

/* ── footer ──────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 3px solid var(--stone-line);
  background: var(--stone-900);
  padding: 22px 0 32px;
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
}

/* ── docket panel: блочная GUI-панель ───────────────────────────────── */
.docket {
  position: relative;
  background: var(--stone-900);
  border: 3px solid var(--stone-line);
  box-shadow: inset 2px 2px 0 var(--bevel-light), inset -2px -2px 0 var(--bevel-dark), var(--shadow-panel);
}
.docket__corner {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--gold);
  opacity: 0.9;
  pointer-events: none;
}
.docket__corner--tl { top: -3px; left: -3px; }
.docket__corner--tr { top: -3px; right: -3px; }
.docket__corner--bl { bottom: -3px; left: -3px; }
.docket__corner--br { bottom: -3px; right: -3px; }

/* ── hero ────────────────────────────────────────────────────────────── */
.hero { padding: 48px 0 0; }
.hero__docket {
  padding: 44px 36px 36px;
  text-align: center;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero__eyebrow::before, .hero__eyebrow::after {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--gold);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: clamp(34px, 6vw, 56px);
  margin: 20px 0 8px;
  line-height: 1.15;
  text-shadow: 2px 0 currentColor, 3px 3px 0 rgba(0, 0, 0, 0.6);
}
.hero h1 em {
  font-style: normal;
  color: var(--gold);
}
.hero__tagline {
  max-width: 560px;
  margin: 0 auto;
  color: var(--text-dim);
  font-size: 14.5px;
}
.hero__cta {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.hero__setup-note {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  border: 2px dashed var(--stone-700);
  padding: 10px 14px;
  display: inline-block;
}

/* ── kit-tabs: вкладки китов, прилепленные к панели-витрине ───────────
   Форма по референсу (mctiers): скруглённые сверху табы «торчат» над
   верхним краем панели, активная вкладка светлее и держит цветную
   полоску-индикатор снизу. Шрифт и цвета — свои, майнкрафтовские
   (Monocraft + золото), никакие чужие ассеты не используются.          */
.kit-strip-section { padding: 48px 0 0; }
/* Секция чуть шире общего .wrap (1120px) — иначе 9 вкладок по 118px
   не помещаются в контент-зону (1072px) и появляется горизонтальный
   скролл даже на широком экране. На остальные секции это не влияет,
   т.к. переопределяем max-width только внутри .kit-strip-section. */
.kit-strip-section .wrap { max-width: 1200px; }
.kit-tabs-wrap { position: relative; }
.kit-tabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  position: relative;
  z-index: 2;
  margin-bottom: -2px;
}
.kit-tab {
  flex-shrink: 0;
  width: 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 12px 18px;
  background: var(--stone-950);
  border: 2px solid var(--stone-line);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  color: var(--text-faint);
  cursor: pointer;
  position: relative;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.kit-tab:hover { background: var(--stone-850); color: var(--text-dim); }
.kit-tab.is-active {
  background: var(--stone-800);
  color: var(--gold-bright);
}
.kit-tab.is-active::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}
.kit-tab__icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
.kit-tab__icon svg { width: 100%; height: 100%; }
.kit-tab__label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: capitalize;
  text-align: center;
  word-break: break-word;
  line-height: 1.2;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.kit-panel {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 32px;
  flex-wrap: wrap;
  min-height: 148px;
}
.kit-panel__icon {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  background-image: var(--kit-icon, none);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}
.kit-panel__info { min-width: 200px; flex: 1; }
.kit-panel__name {
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--gold-bright);
  text-shadow: 1px 0 currentColor, 2px 2px 0 rgba(0, 0, 0, 0.55);
}
.kit-panel__desc {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--text-dim);
  max-width: 480px;
}

/* ── тестер(ы) кита — отдельно в панели, рядом с описанием, а не строкой
   в общем списке снизу (см. build_kit_data в app.py и kit.html) ──────── */
.kit-panel__testers {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.kit-panel__testers-label {
  font-family: var(--font-display);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gold);
}
.kit-panel__tester {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px 4px 4px;
  background: var(--stone-800);
  border: 2px solid var(--stone-line);
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text);
}
.kit-panel__tester-skin {
  width: 24px;
  height: 24px;
  object-fit: cover;
  image-rendering: pixelated;
  border: 1px solid var(--stone-line);
  flex-shrink: 0;
}

/* ── panel «Overall»: тот же докет, но вместо кита показывает главную
   информацию про сайт (раньше это был отдельный hero-блок сверху) ──── */
.kit-panel__kit { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; width: 100%; }
.kit-panel__overall { display: none; width: 100%; text-align: center; padding: 10px 4px; }
.kit-panel.is-overall .kit-panel__kit { display: none; }
.kit-panel.is-overall .kit-panel__overall { display: block; }

.kit-panel__title {
  font-family: var(--font-display);
  font-weight: normal;
  font-size: clamp(28px, 4.6vw, 42px);
  margin: 16px 0 8px;
  line-height: 1.15;
  text-shadow: 2px 0 currentColor, 3px 3px 0 rgba(0, 0, 0, 0.6);
}
.kit-panel__title em { font-style: normal; color: var(--gold); }

@media (max-width: 620px) {
  .kit-tab { width: 108px; border-radius: 16px 16px 0 0; }
  .kit-tab__icon { width: 36px; height: 36px; }
  .kit-panel { gap: 18px; padding: 24px; }
  .kit-panel__icon { width: 96px; height: 96px; }
}

/* ── testers: список тестеров с их правами по китам ──────────────────── */
.testers-section { padding-top: 20px; }
.testers-list {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--stone-line);
}
.tester-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--stone-900);
  border-bottom: 2px solid var(--stone-line);
}
.testers-list .tester-row:last-child { border-bottom: none; }
.tester-row:nth-child(odd) { background: var(--stone-850); }
.tester-row__player { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tester-row__avatar {
  width: 40px;
  height: 40px;
  object-fit: cover;
  image-rendering: pixelated;
  border: 2px solid var(--stone-line);
  flex-shrink: 0;
}
.tester-row__nick {
  font-family: var(--font-display);
  font-size: 14.5px;
  color: var(--text);
}

/* ── ledger stats strip ─────────────────────────────────────────────── */
.ledger {
  margin-top: 38px;
  border-top: 2px solid var(--stone-700);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.ledger__item {
  padding: 20px 12px;
  text-align: center;
  border-right: 2px solid var(--stone-700);
}
.ledger__item:last-child { border-right: none; }
.ledger__value {
  font-family: var(--font-mono);
  font-size: 26px;
  color: var(--gold-bright);
  text-shadow: 1px 0 currentColor, 2px 2px 0 rgba(0, 0, 0, 0.6);
}
.ledger__label {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── case-file steps ─────────────────────────────────────────────────── */
.case-file { position: relative; }
.case-file__entry {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  padding-bottom: 32px;
}
.case-file__entry:last-child { padding-bottom: 0; }
.case-file__entry::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 42px;
  bottom: -6px;
  width: 2px;
  background: var(--stone-700);
}
.case-file__entry:last-child::before { display: none; }
.case-file__num {
  width: 52px;
  height: 52px;
  border: 2px solid var(--stone-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--gold-bright);
  background: var(--stone-800);
  box-shadow: inset 2px 2px 0 var(--bevel-light), inset -2px -2px 0 var(--bevel-dark);
  flex-shrink: 0;
}
.case-file__body h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: normal;
  text-shadow: 1px 0 currentColor, 2px 2px 0 rgba(0, 0, 0, 0.55);
}
.case-file__body p {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 13.5px;
  max-width: 520px;
}
.case-file__tag {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  border: 2px solid var(--stone-700);
  padding: 3px 10px;
}

/* ── feature grid ────────────────────────────────────────────────────── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2px;
  background: var(--stone-line);
  border: 2px solid var(--stone-line);
}
.feature-card {
  background: var(--stone-900);
  padding: 22px 20px;
}
.feature-card:hover { background: var(--stone-850); }
.feature-card__mark {
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 12px;
}
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  margin-top: 10px;
  font-weight: normal;
}
.feature-card p {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ── verdict stamp ───────────────────────────────────────────────────── */
.stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 2px solid currentColor;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
  background: rgba(0, 0, 0, 0.2);
}
.stamp--verdict { color: var(--green); }
.stamp--wax { color: var(--red); }
.stamp--brass { color: var(--gold); }

/* ── CTA banner ──────────────────────────────────────────────────────── */
.cta-banner {
  text-align: center;
  padding: 48px 28px;
}
.cta-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: normal;
  text-shadow: 1px 0 currentColor, 2px 2px 0 rgba(0, 0, 0, 0.55);
}
.cta-banner p { margin-top: 10px; color: var(--text-dim); }
.cta-banner .btn { margin-top: 24px; }

/* ── страницы: профиль / реестр / ошибки ────────────────────────────── */
.page-head { padding: 40px 0 8px; }
.page-head .eyebrow { display: block; margin-bottom: 10px; }
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.6vw, 32px);
  font-weight: normal;
  text-shadow: 2px 0 currentColor, 3px 3px 0 rgba(0, 0, 0, 0.6);
}
.page-head p { margin-top: 8px; color: var(--text-dim); max-width: 560px; }

/* ── /batandar — общее фото команды ──────────────────────────────────── */
.batandar-photo {
  max-width: 640px;
  margin: 8px auto 70px;
  background: var(--stone-800);
  padding: 10px 10px 0;
}
.batandar-photo img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid var(--stone-line);
  box-shadow: inset 2px 2px 0 var(--bevel-light), inset -2px -2px 0 var(--bevel-dark);
}
.batandar-photo figcaption {
  padding: 16px 4px 20px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: .06em;
  color: var(--gold-bright);
  text-shadow: 2px 0 currentColor, 3px 3px 0 rgba(0, 0, 0, 0.6);
}
.batandar-photo__credit {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--text-dim);
  text-shadow: none;
}

.profile-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  padding-bottom: 70px;
  align-items: start;
}

.card {
  background: var(--stone-900);
  border: 3px solid var(--stone-line);
  box-shadow: inset 2px 2px 0 var(--bevel-light), inset -2px -2px 0 var(--bevel-dark);
  padding: 24px;
}
.card + .card { margin-top: 18px; }
.card__title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.id-photo {
  border: 3px solid var(--stone-line);
  background: var(--paper);
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.4), inset -2px -2px 0 rgba(0, 0, 0, 0.25);
  padding: 14px;
  text-align: center;
}
.id-photo img {
  width: 100%;
  max-width: 170px;
  margin: 0 auto;
  image-rendering: pixelated;
}
.id-photo__nick {
  margin-top: 12px;
  font-family: var(--font-display);
  color: #26200f;
  font-size: 14px;
  word-break: break-word;
  text-shadow: none;
}
.id-photo__meta {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #5c5340;
  text-shadow: none;
}

.identity-row { display: flex; align-items: center; gap: 14px; }
.identity-row__avatar {
  width: 54px;
  height: 54px;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  image-rendering: pixelated;
  border: 2px solid var(--stone-line);
  flex-shrink: 0;
}
.identity-row .name { font-family: var(--font-display); font-size: 17px; }
.identity-row .id { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-top: 2px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.role-chip {
  --chip-color: #8f8a7c;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 2px solid var(--stone-line);
  font-size: 12.5px;
  background: var(--stone-850);
  box-shadow: inset 1px 1px 0 var(--bevel-light), inset -1px -1px 0 var(--bevel-dark);
}
.role-chip__dot { width: 8px; height: 8px; background: var(--chip-color); flex-shrink: 0; }
.role-chip--right {
  border-style: dashed;
  background: transparent;
  color: var(--text-dim);
  box-shadow: none;
}

.empty-note {
  font-size: 13px;
  color: var(--text-faint);
  font-style: normal;
}

.verify-cta {
  border: 2px dashed var(--stone-700);
  padding: 20px;
}
.verify-cta p { color: var(--text-dim); font-size: 13.5px; margin-bottom: 12px; }
.code-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--stone-950);
  border: 2px solid var(--stone-line);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--gold-bright);
}
.code-line button {
  color: var(--text-faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.code-line button:hover { color: var(--gold-bright); }

.mute-alert {
  border: 2px solid var(--red-dark);
  background: rgba(170, 0, 0, 0.12);
  padding: 18px 20px;
}
.mute-alert__row { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.mute-alert__countdown {
  font-family: var(--font-mono);
  font-size: 19px;
  color: var(--red);
}
.mute-alert p { color: var(--text-dim); font-size: 13px; margin-top: 8px; }

.clean-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 13.5px;
}
.clean-badge__dot { width: 8px; height: 8px; background: var(--green-dark); }

.notice {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-faint);
  border-top: 2px solid var(--stone-700);
  margin-top: 16px;
  padding-top: 12px;
}

/* ── verdict-card ────────────────────────────────────────────────────── */
.verdict-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 2px;
  background: var(--stone-line);
  border: 2px solid var(--stone-line);
  padding-bottom: 0;
  margin-bottom: 40px;
}
.verdict-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.verdict-card {
  position: relative;
  padding: 18px;
  background: var(--stone-900);
  border-top: 4px solid rgb(var(--role-rgb));
}
.verdict-card:hover { background: var(--stone-850); }

.verdict-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.verdict-card__role {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgb(var(--role-rgb));
  border: 2px solid rgb(var(--role-rgb));
  padding: 3px 9px;
  white-space: nowrap;
}
.verdict-card__tester {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
  text-align: right;
  line-height: 1.5;
}
.verdict-card__tester strong { display: block; color: var(--text-dim); font-weight: normal; font-size: 11.5px; }

.verdict-card__center { text-align: center; padding: 14px 0 10px; }
.verdict-card__center img {
  width: 80px;
  margin: 0 auto;
  image-rendering: pixelated;
}
.verdict-card__name {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 15px;
}

.verdict-card__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.verdict-card__score {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}
.verdict-card__date {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-faint);
  text-align: center;
}
.verdict-card .stamp {
  padding: 4px 10px;
  font-size: 10px;
}

.verdict-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 24px;
}

/* ── roster ──────────────────────────────────────────────────────────── */
.roster-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 26px;
}
.search-form { display: flex; gap: 8px; }
.search-form input {
  background: var(--stone-900);
  border: 2px solid var(--stone-line);
  box-shadow: inset 2px 2px 0 var(--bevel-dark), inset -2px -2px 0 var(--bevel-light);
  padding: 9px 12px;
  color: var(--text);
  font-size: 13px;
  min-width: 220px;
}
.search-form input::placeholder { color: var(--text-faint); }
.search-form input:focus { outline: 2px solid var(--gold-bright); outline-offset: 1px; }

.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 2px;
  background: var(--stone-line);
  border: 2px solid var(--stone-line);
  margin-bottom: 40px;
}
.roster-card {
  background: var(--stone-900);
  padding: 16px;
  text-align: center;
  position: relative;
}
.roster-card:hover { background: var(--stone-850); }
.roster-card img { width: 68px; margin: 0 auto; image-rendering: pixelated; }
.roster-card__nick {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  word-break: break-word;
}

/* .roster-card — карточка используется на публичном /roster (без тестеров);
   вариант --tester и бейдж под неё больше не нужны — теперь у ростера кита
   свой стиль строк, см. .kit-roster-row ниже. */

/* ── ростер конкретного кита под панелью на главной: одна вкладка = один
   ростер, остальные спрятаны; переключение в main.js, initKitTabs().
   Список строк (не сетка карточек, как в общем /roster) — тестер кита
   закреплён первым и подписан отдельно, ниже остальные держатели роли
   строго по алфавиту (это список, а не турнирная таблица — мест/рангов
   тут нет и не будет). ── */
.kit-roster { display: none; margin-top: 24px; }
.is-hidden { display: none !important; }
.kit-roster.is-active { display: block; }
.kit-roster .state-note { padding: 32px 20px; }

.kit-roster-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 40px;
}
.kit-roster-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 92px;
  padding-left: 16px;
  padding-right: 16px;
  background: var(--stone-900);
  border: 2px solid var(--stone-line);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .15s ease, background .15s ease;
}
.kit-roster-row:hover { background: var(--stone-850); }
@media (hover: hover) {
  .kit-roster-row:hover { transform: translateX(6px); }
}
.kit-roster-row:active { transform: scale(.99); }

/* ── плашка золота/серебра/бронзы — только на Overall, где есть за что
   ранжировать (число китов). Абсолютный фоновый слой (не участвует в
   flex-раскладке!), поэтому скин игрока стоит РОВНО там же, где и на
   строках без тира — плашка просто удлиняется у него под ногами, а не
   толкает его в сторону. Скошенный правый край (простой диагональный
   срез, без острого выступа — он раньше "протыкал" скин). Строка без
   тира — .kit-roster-row__rank в разметке вообще не появляется. ── */
.kit-roster-row__rank {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -2px;
  width: 96px;
  clip-path: polygon(0 0, 100% 0, 62% 100%, 0 100%);
  z-index: 1;
  background: linear-gradient(160deg, var(--stone-850), var(--stone-900));
}
.kit-roster-row--rank-1 .kit-roster-row__rank { background: linear-gradient(160deg, var(--gold-bright), var(--gold)); box-shadow: inset -3px 0 6px rgba(0, 0, 0, .25); }
.kit-roster-row--rank-2 .kit-roster-row__rank { background: linear-gradient(160deg, #d8d8d8, #a8a8a8); box-shadow: inset -3px 0 6px rgba(0, 0, 0, .25); }
.kit-roster-row--rank-3 .kit-roster-row__rank { background: linear-gradient(160deg, #e0a262, #b5722c); box-shadow: inset -3px 0 6px rgba(0, 0, 0, .25); }
.kit-roster-row__skin-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  position: relative;
  z-index: 2;
}
.kit-roster-row__skin {
  width: 66px;
  height: 66px;
  object-fit: cover;
  object-position: top;
  image-rendering: pixelated;
  border-radius: 10px;
  filter: drop-shadow(-2px -1px 1px rgba(0, 0, 0, .5));
}
.kit-roster-row__nick {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kit-roster-row__badge {
  margin-left: auto;
  background: var(--gold);
  color: var(--stone-950);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── тестер, закреплённый первой строкой в ростере кита ── */
.kit-roster-row--tester {
  background: var(--stone-850);
  box-shadow: inset 3px 0 0 var(--gold);
}
.kit-roster-row--tester:hover { background: var(--stone-800); }
.kit-roster-row--tester .kit-roster-row__nick { font-weight: 700; }

/* ── маленькие иконки китов в общем /roster (рядом с ником) ──
   без HT/LT и без очков — просто факт, что эта роль кита сейчас реально
   висит на участнике (см. build_member_kit_badges в app.py). Иконка
   всегда вписана в свою рамку (object-fit: contain + внутренний паддинг),
   что бы ни было на самой картинке кита — наружу не вылезет. */
.kit-roster-row__kits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-right: 12px;
}
.kit-roster-badge {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--stone-800);
  border: 1px solid var(--stone-line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  overflow: hidden;
}
.kit-roster-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

@media (max-width: 620px) {
  .kit-roster-row--with-kits {
    height: auto;
    flex-wrap: wrap;
    row-gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .kit-roster-row--with-kits .kit-roster-row__kits { width: 100%; margin-left: 84px; margin-right: 0; }
  .kit-roster-row--with-kits .kit-roster-row__badge { margin-left: 84px; }
}

.pagination { display: flex; justify-content: center; gap: 10px; padding-bottom: 60px; }

.state-note {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-faint);
  font-size: 13.5px;
}

/* ── error / 404 ─────────────────────────────────────────────────────── */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.error-page .docket {
  max-width: 480px;
  padding: 36px 32px;
  text-align: center;
}
.error-page__code {
  font-family: var(--font-mono);
  color: var(--red);
  font-size: 12px;
  letter-spacing: 0.05em;
}
.error-page h1 {
  font-family: var(--font-display);
  font-size: 24px;
  margin-top: 12px;
  font-weight: normal;
  text-shadow: 1px 0 currentColor, 2px 2px 0 rgba(0, 0, 0, 0.55);
}
.error-page p { margin-top: 10px; color: var(--text-dim); font-size: 14px; }
.error-page .btn { margin-top: 22px; }

/* ── responsive ──────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 12px;
    right: 12px;
    background: var(--stone-900);
    border: 1px solid var(--nav-border);
    border-radius: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    display: flex;
    transition: max-height 0.2s var(--ease-out);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
  }
  .site-nav--open { max-height: 320px; padding: 8px; margin-top: 8px; }
  .site-nav__link { width: 100%; border-radius: 12px; }
  .nav-toggle { display: flex; }
  .site-header__auth .auth-chip span { display: none; }
  .profile-grid { grid-template-columns: 1fr; }
  .ledger { grid-template-columns: 1fr; }
  .ledger__item { border-right: none; border-bottom: 2px solid var(--stone-700); }
  .ledger__item:last-child { border-bottom: none; }
  .hero__docket { padding: 36px 18px 24px; }
  .tester-row { justify-content: flex-start; }
  section { padding: 44px 0; }
}

@media (max-width: 520px) {
  .case-file__entry { grid-template-columns: 40px 1fr; gap: 12px; }
  .case-file__num { width: 40px; height: 40px; font-size: 12px; }
  .case-file__entry::before { left: 19px; }
}
