/* ─────────────────────────────────────────────────────────────────────────────
   ModGrade. Палитра и повадки — как у программ 4lex4nde: угольный фон,
   бирюзовый акцент, Manrope, мелкие радиусы, сдержанное движение.

   Раскладка пишется для телефона, а всё, что отличается на ПК, — только внутри
   @media (min-width: 900px). Правка одной версии не должна трогать другую.
   ───────────────────────────────────────────────────────────────────────────── */

@font-face { font-family: Manrope; src: url("/static/fonts/Manrope-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Manrope; src: url("/static/fonts/Manrope-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Manrope; src: url("/static/fonts/Manrope-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: Manrope; src: url("/static/fonts/Manrope-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
/* Подпись «by 4lex4nde» — моноширинным, как в «Отклике». В файле только буквы подписи (2 КБ). */
@font-face { font-family: "IBM Plex Mono"; src: url("/static/fonts/IBMPlexMono-by.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+20, U+34, U+62, U+64-65, U+6C, U+6E, U+78-79; }

:root {
  --bg: #0F1315; --card: #141A1D; --line: #232B30; --line-hi: #3A454B; --surface: #1B2226; --off: #1D2529;
  --text: #E8ECEE; --soft: #C7CFD3; --muted: #8A969C; --faint: #5A6469;
  --accent: #14807F; --accent-hi: #189794; --bright: #35B8B4; --warn: #8A6A3A; --danger: #C0615A;
  --r-lg: 12px; --r-md: 8px; --r-sm: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 16px/1.55 Manrope, "Segoe UI", system-ui, sans-serif;
  overflow-x: hidden;
}
h1, h2, h3, p, li, dd, summary, a, span { overflow-wrap: break-word; }
a { color: var(--bright); text-decoration: none; }
a:hover { color: #5fd0cc; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--bright); outline-offset: 2px;
}
svg text { font-family: inherit; }
img { max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.dim { color: var(--muted); font-weight: 600; }
.mark { display: block; flex: 0 0 auto; width: 34px; height: 34px; }
.mark--lg { width: 52px; height: 52px; }

/* ── Шапка ──────────────────────────────────────────────────────────────── */

.bar {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60% 140% at 8% -40%, rgba(20, 128, 127, .22), transparent 60%),
    var(--bg);
}
.bar__in { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px 14px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 20px; letter-spacing: -.01em; min-height: 44px; }
.brand:hover { color: #fff; }
.brand .mark { width: 32px; height: 32px; }
.bar__admin { justify-self: end; font-size: 14px; font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.nav {
  grid-column: 1 / -1; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px; padding: 0 16px;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: 0 0 auto; padding: 9px 13px; border-radius: var(--r-sm); color: var(--soft);
  font-size: 14.5px; font-weight: 600; transition: background-color .15s, color .15s;
}
.nav a:hover { background: var(--surface); color: #fff; }
.nav a.on { background: rgba(20, 128, 127, .18); color: var(--bright); }
.find { grid-column: 1 / -1; }
.find input {
  width: 100%; min-height: 44px; padding: 0 14px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font: inherit; font-size: 16px;
}
.find input::placeholder { color: var(--faint); }

@media (min-width: 900px) {
  .bar__in { grid-template-columns: auto 1fr minmax(220px, 300px) auto; gap: 18px; padding-top: 14px; padding-bottom: 14px; }
  .nav { grid-column: auto; margin: 0; padding: 0; justify-content: flex-start; }
  .find { grid-column: auto; }
  .find input { min-height: 40px; font-size: 14.5px; }
  .bar__admin { grid-column: auto; }
}

/* ── Общие блоки ───────────────────────────────────────────────────────── */

.page { flex: 1; padding-top: 22px; padding-bottom: 40px; }
@media (min-width: 900px) { .page { padding-top: 32px; padding-bottom: 56px; } }

.hero { padding: 8px 0 18px; max-width: 760px; }
.hero h1 { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.hero p { margin: 12px 0 0; color: var(--soft); font-size: 15.5px; }
.hero--small { text-align: center; margin: 40px auto; }
.hero--small .mark { margin: 0 auto 18px; }
@media (min-width: 900px) { .hero h1 { font-size: 34px; } .hero p { font-size: 16.5px; } }

/* Первый экран главной: искры собираются в кристалл знака (рисует /static/stage.js).
   Место и размер кристалла задаёт .stage__spot — скрипт берёт их отсюда.
   Телефон: кристалл над текстом. ПК: текст слева, кристалл справа. */
.stage {
  position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 0 0 26px; margin-bottom: 6px;
}
.stage__gl {
  position: absolute; z-index: -1; top: -22px; left: 50%; width: 100vw; height: calc(100% + 22px);
  transform: translateX(-50%); pointer-events: none;
  /* Подсветка за кристаллом: место и радиус ставит скрипт (--gx, --gy, --gr). */
  background: radial-gradient(circle var(--gr, 0px) at var(--gx, 50%) var(--gy, 50%), rgba(20, 128, 127, .30), rgba(20, 128, 127, .08) 60%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 80%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 80%, transparent);
}
.stage__spot { order: -1; position: relative; width: min(290px, 76vw); aspect-ratio: 1; margin: 0 auto 8px; }
.stage__spot::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(20, 128, 127, .30), rgba(20, 128, 127, .08) 60%, transparent);
}
.stage--live .stage__spot::before { display: none; }
.stage__logo { position: absolute; inset: 12%; width: 76%; height: 76%; transition: opacity .7s; }
.stage--live .stage__logo { opacity: 0; }
.stage__text h1 { margin: 0; font-size: 27px; font-weight: 800; line-height: 1.18; letter-spacing: -.015em; }
.stage__text p { margin: 12px auto 0; max-width: 34em; color: var(--soft); font-size: 15.5px; }
.stage__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
@media (prefers-reduced-motion: no-preference) {
  .stage__text > * { animation: stage-rise .9s cubic-bezier(.2, .7, .2, 1) both; }
  .stage__text > :nth-child(2) { animation-delay: .12s; }
  .stage__text > :nth-child(3) { animation-delay: .24s; }
}
@keyframes stage-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (min-width: 900px) {
  .stage {
    display: grid; grid-template-columns: minmax(0, 1fr) 440px; align-items: center; gap: 48px;
    min-height: 500px; padding: 0 0 24px; text-align: left;
  }
  .stage__gl { top: -32px; height: calc(100% + 32px); }
  .stage__spot { order: 0; width: 420px; margin: 0 auto; }
  .stage__text h1 { font-size: 44px; line-height: 1.12; }
  .stage__text p { margin-left: 0; font-size: 17px; }
  .stage__cta { justify-content: flex-start; margin-top: 28px; }
}

.block { margin-top: 30px; }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.block__head h2 { margin: 0; font-size: 19px; font-weight: 800; }
.block__head a { font-size: 14px; font-weight: 600; }

.page__head { margin-bottom: 18px; }
.page__head h1 { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.2; }
@media (min-width: 900px) { .page__head h1 { font-size: 30px; } }
/* Вступление раздела и другие названия игры — под заголовком страницы. */
.page__lede { margin: 10px 0 0; max-width: 760px; color: var(--soft); font-size: 15.5px; }
.page__aka { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
/* «Умный трейнер для …»: игра в заголовке тише названия работы. */
.h1__for { color: var(--soft); font-weight: 700; }
.install { margin-top: 26px; }
.install h2 { margin: 0 0 10px; font-size: 20px; font-weight: 800; }

.empty { color: var(--muted); padding: 18px 0; }
.banner { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--r-md); background: rgba(138, 106, 58, .12); border: 1px solid rgba(138, 106, 58, .5); color: #C9A46A; font-size: 14px; }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--faint); font-size: 13.5px; margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--bright); }

/* ── Карточки ──────────────────────────────────────────────────────────── */

.grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); transition: border-color .15s, background-color .15s; }
.card:hover { border-color: var(--line-hi); background: #161d20; }
.card__link { display: flex; flex-direction: column; height: 100%; padding: 16px; color: inherit; }
.card__link:hover { color: inherit; }
.card__head { display: flex; gap: 12px; align-items: flex-start; }
.card__name { min-width: 0; }
.card__name h3 { margin: 0; font-size: 16.5px; font-weight: 800; line-height: 1.3; color: var(--text); }
.card__name p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.card__sum {
  margin: 12px 0 0; color: var(--soft); font-size: 14px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card__meta { margin: auto 0 0; padding-top: 12px; color: var(--faint); font-size: 12.5px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--filter { margin-bottom: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--soft); font-size: 14px; font-weight: 600;
  transition: background-color .15s, border-color .15s;
}
.chip span { color: var(--faint); font-weight: 700; }
.chip:hover { background: var(--surface); border-color: var(--line-hi); color: #fff; }
.chip.on { border-color: var(--accent); color: var(--bright); background: rgba(20, 128, 127, .12); }

.list { display: grid; gap: 8px; }
.row {
  display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--card); color: inherit; transition: border-color .15s;
}
.row:hover { border-color: var(--line-hi); color: inherit; }
.row__title { font-weight: 800; font-size: 16px; color: var(--text); }
.row__sum { color: var(--soft); font-size: 14px; }
.row__sum mark { background: rgba(53, 184, 180, .22); color: #fff; border-radius: 3px; padding: 0 2px; }
.row__meta { color: var(--faint); font-size: 12.5px; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; color: var(--muted); font-size: 14px; }
.pager a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; }

/* ── Кнопки ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border: 0; border-radius: var(--r-sm); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  text-decoration: none; transition: background-color .15s, border-color .15s, color .15s;
}
.btn--main { background: var(--accent); color: #fff; }
.btn--main:hover { background: var(--accent-hi); color: #fff; }
.btn--ghost { background: transparent; border: 1px solid #2A3338; color: var(--soft); font-weight: 600; }
.btn--ghost:hover { background: var(--surface); border-color: var(--line-hi); color: #fff; }
.btn--off { background: var(--off); color: var(--faint); cursor: default; }
.btn--wide { width: 100%; }
.linkish { background: none; border: 0; padding: 0; color: var(--bright); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; min-height: 32px; }
.linkish--danger { color: var(--danger); }

/* ── Страница файла ────────────────────────────────────────────────────── */

.item__head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.item__head h1 { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.2; }
.item__game { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.item { display: grid; gap: 22px; }
.item__main { min-width: 0; }
.item__side { display: grid; gap: 14px; align-content: start; }
/* На телефоне скачивание — сразу под заголовком, а не после всего описания. */
@media (max-width: 899px) {
  .item__side { order: -1; }
}
@media (min-width: 900px) {
  .item__head h1 { font-size: 30px; }
  .item { grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; }
  .item__side { position: sticky; top: 20px; }
}

.lede { margin: 0 0 18px; color: var(--soft); font-size: 16.5px; line-height: 1.6; }

.shots { display: grid; gap: 10px; margin: 0 0 22px; }
@media (min-width: 640px) { .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); } .shots--one { grid-template-columns: 1fr; } }
.shot { margin: 0; }
.shot a { display: block; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: #0B0E10; }
.shot a:hover { border-color: var(--line-hi); }
.shot img { display: block; width: 100%; }
.shot figcaption { margin-top: 6px; color: var(--faint); font-size: 12.5px; }

.dl { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.dl__file { margin: 0; color: var(--faint); font-size: 12.5px; word-break: break-all; }
.hash { display: grid; gap: 3px; margin: 0; color: var(--faint); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.hash code { font-family: Consolas, ui-monospace, monospace; font-size: 11px; letter-spacing: 0; text-transform: none; color: var(--muted); word-break: break-all; user-select: all; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.facts dt { color: var(--faint); font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.facts dd { margin: 4px 0 0; font-size: 14px; font-weight: 700; }

.versions .ver { padding: 10px 0; border-top: 1px solid var(--line); }
.versions .ver:first-child { border-top: 0; }
.ver__head { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.ver__head b { color: var(--text); }

/* ── Текст описаний и статей ───────────────────────────────────────────── */

.prose { color: var(--soft); font-size: 15.5px; line-height: 1.7; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 28px 0 10px; color: var(--text); font-size: 20px; font-weight: 800; line-height: 1.3; }
.prose h3 { margin: 22px 0 8px; color: var(--text); font-size: 17px; font-weight: 800; }
.prose p { margin: 0 0 12px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin: 0 0 6px; }
.prose li::marker { color: var(--accent); }
.prose b { color: var(--text); }
.prose code { font-family: Consolas, ui-monospace, monospace; font-size: .88em; color: var(--text); background: var(--surface); padding: 1px 5px; border-radius: 4px; word-break: break-word; }
.prose pre { margin: 0 0 14px; padding: 14px; overflow-x: auto; background: #0B0E10; border: 1px solid var(--line); border-radius: var(--r-md); }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 0 0 14px; padding: 2px 0 2px 14px; border-left: 2px solid var(--accent); color: var(--muted); }
.prose--lede { margin-top: 10px; max-width: 760px; }

.note { margin: 16px 0; padding: 12px 14px; border-radius: var(--r-md); font-size: 14.5px; line-height: 1.6; }
.note > b { display: block; margin-bottom: 4px; font-weight: 800; }
.note p:last-child { margin-bottom: 0; }
.note--warn { background: rgba(138, 106, 58, .12); border: 1px solid rgba(138, 106, 58, .5); color: var(--muted); }
.note--warn > b { color: #C9A46A; }
.note--info { background: #11171A; border: 1px solid var(--line); color: var(--muted); }
.note--info > b { color: var(--soft); }

.more { margin: 14px 0 0; border-top: 1px solid var(--line); }
.more summary {
  display: flex; align-items: center; gap: 9px; min-height: 44px; color: var(--bright);
  font-size: 15px; font-weight: 700; cursor: pointer; list-style: none;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::before {
  content: ""; flex: 0 0 auto; width: 0; height: 0; border: 5px solid transparent;
  border-left-color: var(--bright); transition: transform .15s;
}
.more[open] summary::before { transform: rotate(90deg); }
.more__body { padding: 2px 0 14px; }

.article { max-width: 760px; }
.article__head h1 { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.25; }
.article__meta { margin: 8px 0 20px; color: var(--faint); font-size: 13.5px; }
@media (min-width: 900px) { .article__head h1 { font-size: 34px; } }

.find--big { margin-top: 14px; max-width: 640px; }

/* ── Подвал ────────────────────────────────────────────────────────────── */

.foot { border-top: 1px solid var(--line); }
.foot__in { display: flex; justify-content: space-between; gap: 12px; padding-top: 16px; padding-bottom: 20px; color: var(--faint); font-size: 12.5px; }
.foot__by { font-weight: 700; }

/* ── Панель ────────────────────────────────────────────────────────────── */

.admin__tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.admin__tabs a { padding: 8px 12px; border-radius: var(--r-sm); color: var(--soft); font-weight: 700; font-size: 14.5px; }
.admin__tabs a.on { background: rgba(20, 128, 127, .18); color: var(--bright); }
.admin__tabs form { margin-left: auto; }
.admin__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.admin__head h1 { margin: 0; font-size: 24px; font-weight: 800; }
.admin__block { margin-top: 30px; }
.admin__block h2, .admin__sub { margin: 0 0 12px; font-size: 18px; font-weight: 800; }
.admin__sub { margin-top: 26px; }
.admin__game summary small { color: var(--faint); font-weight: 600; }
.flash { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--r-md); background: rgba(20, 128, 127, .14); color: var(--bright); font-weight: 600; font-size: 14px; }

.table { display: grid; gap: 6px; }
.trow {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); color: inherit;
}
.trow:hover { border-color: var(--line-hi); color: inherit; }
.trow--static:hover { border-color: var(--line); }
.trow__title { font-weight: 700; color: var(--text); }
.trow__title small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.trow__meta { color: var(--faint); font-size: 12.5px; }
@media (min-width: 900px) { .trow { grid-template-columns: minmax(0, 1fr) auto auto; } }

.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill--published { background: rgba(20, 128, 127, .18); color: var(--bright); }
.pill--draft { background: var(--surface); color: var(--muted); }
.pill--pending { background: rgba(138, 106, 58, .18); color: #C9A46A; }
.pill--rejected { background: rgba(192, 97, 90, .15); color: var(--danger); }

.form { display: grid; gap: 14px; }
.form--card { margin-top: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
.form__row { display: grid; gap: 14px; }
@media (min-width: 900px) { .form__row { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
.field { display: grid; gap: 6px; }
.field > span { color: var(--muted); font-size: 13px; font-weight: 700; }
.field small { color: var(--faint); font-size: 12px; line-height: 1.5; }
.field input, .field select, .field textarea, .thumb__form input {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 16px;
}
.field textarea { line-height: 1.55; resize: vertical; font-family: Consolas, ui-monospace, monospace; font-size: 14.5px; }
.field input[type=file] { padding: 9px; }
.form__actions { display: flex; gap: 10px; }
.form__err { margin: 0; padding: 10px 14px; border-radius: var(--r-md); background: rgba(192, 97, 90, .12); color: #E0908A; font-size: 14px; }
.hint { margin: 0; color: var(--faint); font-size: 13px; }
.danger { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); }

.thumbs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.thumb { margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); display: grid; gap: 8px; }
.thumb img { border-radius: var(--r-sm); aspect-ratio: 16 / 10; object-fit: cover; width: 100%; background: #0B0E10; }
.thumb__form { display: grid; grid-template-columns: 1fr 70px; gap: 6px; }
.thumb__form .linkish { grid-column: 1 / -1; justify-self: start; }

.login { max-width: 380px; margin: 40px auto; }
.login h1 { font-size: 24px; font-weight: 800; }
.login label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.login input { min-height: 44px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 16px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ── Второй этап: вход, кабинет, модерация, VirusTotal ─────────────────── */

.bar__me { display: flex; gap: 14px; justify-self: end; align-items: center; font-size: 14px; font-weight: 700; }
.bar__me a { min-height: 44px; display: inline-flex; align-items: center; }
@media (min-width: 900px) { .bar__me { grid-column: auto; } }

.vt { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 10px; border-radius: var(--r-sm); font-size: 13px; font-weight: 700; line-height: 1.35; }
.vt--ok { background: rgba(20, 128, 127, .14); color: var(--bright); }
.vt--bad { background: rgba(192, 97, 90, .15); color: #E0908A; }
.vt--wait { background: var(--surface); color: var(--muted); }
.dl .vt { justify-content: center; }
.trow__title .vt { margin-top: 6px; }

.ok { color: var(--bright); }
.bad { color: #E0908A; }

.check { display: flex; gap: 10px; align-items: flex-start; color: var(--soft); font-size: 14.5px; line-height: 1.5; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 1px; flex: 0 0 auto; accent-color: var(--accent); }
.check--big { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
.rules-pick { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.rules-pick legend { margin-bottom: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }

.ready { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; font-size: 14.5px; }
.ready .ok { color: var(--bright); }
.ready .bad { color: var(--muted); }

.decide { display: grid; gap: 14px; }
.decide__ok .btn { min-width: 200px; }
.facts--wide { margin: 14px 0; }
@media (min-width: 900px) { .facts--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.trow--wrap { grid-template-columns: 1fr; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-return { display: flex; gap: 6px; flex: 1 1 260px; }
.inline-return input, .inline-role select {
  flex: 1; min-height: 40px; padding: 6px 10px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; font-size: 16px;
}
.inline-role { display: flex; gap: 8px; align-items: center; }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.prose--small { font-size: 14px; margin-top: 6px; }

.rules { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 14px; }
.rules li { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
.rules li b { color: var(--text); font-size: 16px; }
.rules li p { margin: 6px 0 0; color: var(--soft); }
.my .empty p { margin: 0 0 10px; }

/* ── Знак ModGrade ─────────────────────────────────────────────────────── */
.logo { display: block; flex: 0 0 auto; }
.brand .logo { width: 34px; height: 34px; }
.brand b { color: var(--bright); font-weight: 800; }
/* Под названием — подпись автора, приглушённая, чтобы не спорить с названием (как в «Отклике»). */
.brand__name { display: flex; flex-direction: column; line-height: 1.1; }
.brand__by, .foot__by {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 400; letter-spacing: .02em;
}
.brand__by { margin-top: 3px; font-size: 10px; color: var(--muted); }
.hero--small .logo--lg { margin: 0 auto 18px; }
.mark text { font-family: Manrope, "Segoe UI", sans-serif; }

/* ── Статьи: журнальная страница ───────────────────────────────────────────
   Телефон: обложка от края до края, заголовок под ней. ПК: обложка 21:9 со скруглением,
   заголовок лежит на ней поверх затемнения. Текст — узкой колонкой, снимки шире неё. */
.post__head { margin-bottom: 18px; }
.post__cover { margin: 0 -16px 16px; background: var(--card); }
.post__cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.post__game { display: inline-block; margin-bottom: 8px; color: var(--bright); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.post__title h1 { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.15; letter-spacing: -.015em; }
.post__meta { margin: 10px 0 0; color: var(--faint); font-size: 13.5px; }
.post__lede { margin: 0 0 20px; color: var(--text); font-size: 17px; font-weight: 600; line-height: 1.55; }
.prose--post { font-size: 16px; line-height: 1.75; }
.prose--post h2 { margin: 34px 0 12px; font-size: 22px; }
.prose--post h3 { margin: 26px 0 10px; font-size: 18px; }
.post__files { margin-top: 40px; }

/* Снимки в тексте */
.fig { margin: 24px 0; }
.fig__zoom { display: block; cursor: zoom-in; border-radius: 10px; overflow: hidden; background: var(--card); }
.fig img { display: block; width: 100%; height: auto; }
.fig figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.fig__credit { color: var(--faint); font-size: 12px; }
.figs { display: grid; gap: 12px; margin: 24px 0; }
.figs .fig { margin: 0; }
.figs .fig img { aspect-ratio: 16 / 9; object-fit: cover; }

@media (min-width: 900px) {
  .post__head--cover { position: relative; border-radius: 14px; overflow: hidden; margin-bottom: 30px; }
  .post__head--cover .post__cover { margin: 0; }
  .post__head--cover .post__cover img { aspect-ratio: 21 / 9; }
  .post__head--cover .post__title {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 140px 40px 30px;
    background: linear-gradient(to bottom, rgba(15, 19, 21, 0), rgba(15, 19, 21, .7) 45%, rgba(15, 19, 21, .95));
  }
  .post__head--cover .post__game { color: #5fd0cc; }
  .post__head--cover .post__meta { color: var(--muted); }
  .post__title h1 { max-width: 920px; font-size: 44px; line-height: 1.1; }
  .post__head--cover h1 { text-shadow: 0 2px 18px rgba(0, 0, 0, .45); }
  .post__body { max-width: 720px; margin: 0 auto; }
  .post__lede { font-size: 19px; margin-bottom: 24px; }
  .prose--post { font-size: 17px; }
  .prose--post h2 { margin-top: 42px; font-size: 26px; }
  .fig { margin: 30px 0; }
  .figs--2 { grid-template-columns: 1fr 1fr; }
  .figs--3 { grid-template-columns: 1fr 1fr 1fr; }
  .fig__zoom img { transition: transform .35s ease; }
  .fig__zoom:hover img { transform: scale(1.02); }
}
/* На широком экране снимки выходят за колонку текста — до 960 px. */
@media (min-width: 1100px) {
  .prose--post > .fig, .prose--post > .figs { margin-left: -120px; margin-right: -120px; }
}

/* Снимок во весь экран */
html.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(8, 10, 11, .95); }
.lb[hidden] { display: none; }
.lb__fig { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100vw; }
.lb__img { display: block; max-width: 100vw; max-height: 80vh; object-fit: contain; }
.lb__cap { max-width: 900px; margin-top: 10px; padding: 0 16px; color: var(--soft); font-size: 14px; text-align: center; }
.lb__cap .fig__credit { margin-left: 10px; }
.lb__close, .lb__nav {
  position: absolute; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%;
  background: rgba(20, 26, 29, .8); color: #fff; font: 400 30px/1 Manrope, sans-serif; cursor: pointer;
}
.lb__close { top: 12px; right: 12px; width: 44px; height: 44px; }
.lb__nav { top: 50%; width: 44px; height: 44px; margin-top: -22px; }
.lb__nav--prev { left: 8px; }
.lb__nav--next { right: 8px; }
.lb__close:hover, .lb__nav:hover { background: var(--accent); }
.lb__count { position: absolute; bottom: 12px; right: 16px; color: var(--faint); font-size: 13px; }
@media (min-width: 900px) {
  .lb__img { max-width: 92vw; max-height: 86vh; border-radius: 6px; }
  .lb__nav { width: 52px; height: 52px; margin-top: -26px; }
  .lb__nav--prev { left: 20px; }
  .lb__nav--next { right: 20px; }
}

/* Карточки статей */
.acards { display: grid; gap: 14px; }
.acard { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); overflow: hidden; transition: border-color .15s; }
.acard:hover { border-color: var(--line-hi); }
.acard__link { display: block; color: inherit; }
.acard__link:hover { color: inherit; }
.acard__img { aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #16312F, var(--bg)); }
.acard__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.acard__blank { display: block; width: 100%; height: 100%; }
.acard__text { padding: 14px 16px 16px; }
.acard__game { margin: 0 0 4px; color: var(--bright); font-size: 12.5px; font-weight: 700; }
.acard h3 { margin: 0; color: var(--text); font-size: 17px; font-weight: 800; line-height: 1.3; }
.acard__sum { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.acard__meta { margin: 8px 0 0; color: var(--faint); font-size: 12.5px; }
@media (min-width: 900px) {
  .acards { grid-template-columns: 1fr 1fr; gap: 16px; }
  .acard__img img { transition: transform .35s ease; }
  .acard:hover .acard__img img { transform: scale(1.03); }
}
@media (min-width: 1100px) { .acards { grid-template-columns: 1fr 1fr 1fr; } }

/* Панель: снимки статьи */
.form__ok { margin: 0 0 12px; color: var(--bright); font-size: 14px; font-weight: 600; }
.form__hint { margin: 12px 0; color: var(--muted); font-size: 13.5px; }
.aimg { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.aimg__one { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
.aimg__one--cover { border-color: var(--accent); }
.aimg__one img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; }
.aimg__code { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--text); font: 12px Consolas, ui-monospace, monospace; }
.aimg__act { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.aimg__badge { color: var(--bright); font-size: 13px; font-weight: 700; }
.aimg__one small { color: var(--faint); font-size: 12px; overflow-wrap: anywhere; }

/* «Поделиться» под статьёй */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.share__label { width: 100%; color: var(--faint); font-size: 13px; }
.share__btn {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid #2A3338; border-radius: var(--r-sm);
  background: transparent; color: var(--soft); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color .15s, border-color .15s;
}
.share__btn:hover { background: var(--surface); border-color: var(--line-hi); color: #fff; }
@media (min-width: 900px) { .share__label { width: auto; margin-right: 6px; } }

/* Проверка VirusTotal у кнопки «Скачать» и в карточках */
.vtbox { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 10px; padding: 12px; border-radius: var(--r-md); }
.vtbox--ok { background: rgba(20, 128, 127, .12); color: var(--bright); }
.vtbox--note { background: rgba(138, 106, 58, .16); color: #D9B77A; }
.vtbox--bad { background: rgba(192, 97, 90, .15); color: #E0908A; }
.vtbox__icon { width: 26px; height: 26px; flex: 0 0 auto; }
.vtbox__text { display: grid; gap: 2px; min-width: 0; }
.vtbox__text b { font-size: 14px; font-weight: 800; }
.vtbox__text span { color: var(--soft); font-size: 13px; line-height: 1.45; }
.vtbox__flags { margin: 4px 0 0; padding-left: 16px; color: var(--soft); font-size: 12.5px; overflow-wrap: anywhere; }
.vtbox__text .vtbox__rest { color: var(--muted); }
.vtbox__link { align-self: center; font-size: 13px; font-weight: 700; color: inherit; white-space: nowrap; }
.vtbox__link:hover { color: #fff; }
.vtchip { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; color: var(--bright); font-size: 12px; font-weight: 700; }
.vtchip .vtbox__icon { width: 15px; height: 15px; }

/* Другая сборка той же версии (лайт) — под главной кнопкой, со своей проверкой */
.dl__alt { display: grid; gap: 10px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.dl__note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
/* Строка проверки у файла в списке версий */
.vtline { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.vtline .vtbox__icon { width: 14px; height: 14px; }
.vtline--ok { color: var(--bright); }
.vtline--note { color: #D9B77A; }
