/* ==========================================================================
   MU Code — рамка страницы: верхняя строка, боковая панель, шапка страницы.
   Свои решения сайта (docs/independence.md): без выпадающих меню, заголовок
   страницы слева с «путём» над ним и вкладками раздела под ним; всё личное —
   в панели справа.
   ========================================================================== */

:root { --wrap: 1240px; --side: clamp(16px, 4vw, 40px); --bar-h: 68px; }

/* --- Верхняя строка ------------------------------------------------------- */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 10, 13, 0.82);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.hdr__row {
  display: flex; align-items: center; gap: 14px;
  max-width: 1680px; height: var(--bar-h); margin: 0 auto; padding: 0 var(--side);
}
.hdr__logo { display: inline-flex; align-items: center; flex: none; line-height: 0; }
.hdr__img { width: auto; height: 40px; image-rendering: pixelated; }
.hdr__nav { flex: 1 1 auto; display: flex; justify-content: center; min-width: 0; }
.hdr__links { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.hdr__links a {
  position: relative; display: block; padding: 10px 14px;
  font-weight: 650; font-size: 15px; color: var(--fg-2); text-decoration: none; white-space: nowrap;
  transition: color 140ms ease;
}
.hdr__links a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--ember-1), var(--ember-3));
  transform: scaleX(0); transform-origin: left; transition: transform 200ms var(--ease-out);
}
.hdr__links a[aria-current] { color: var(--fg); }
.hdr__links a[aria-current]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
  .hdr__links a:hover { color: var(--fg); }
  .hdr__links a:hover::after { transform: scaleX(1); }
}
.hdr__end { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
.hdr__lang {
  min-width: 42px; height: 40px; padding: 0 10px; border-radius: 10px;
  background: transparent; border: 1px solid var(--border-2); color: var(--fg-2);
  font: 600 13px/1 var(--mono); letter-spacing: 0.06em; cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease, transform 120ms var(--ease-out);
}
.hdr__lang:active { transform: scale(0.96); }
.hdr__signin { padding: 10px 12px; font-weight: 650; font-size: 15px; color: var(--fg-2); text-decoration: none; white-space: nowrap; }
.hdr__me {
  display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 12px 0 4px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border-2); color: var(--fg); cursor: pointer;
  font: 650 14px/1 var(--font-text); transition: border-color 140ms ease, transform 120ms var(--ease-out);
}
.hdr__me:active { transform: scale(0.97); }
.hdr__badge, .sheet__badge {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: linear-gradient(140deg, var(--ember-1), var(--ember-3)); color: #1a0d05; font: 800 14px/1 var(--font-text);
}
.hdr__who { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdr__burger {
  display: none; width: 42px; height: 40px; border-radius: 10px; padding: 0;
  background: transparent; border: 1px solid var(--border-2); cursor: pointer; place-content: center; gap: 6px;
}
.hdr__burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--fg); }
.mc-btn.mc-btn--sm { min-height: 40px; padding: 0 16px; font-size: 14.5px; border-radius: 11px; }
@media (hover: hover) and (pointer: fine) {
  .hdr__lang:hover, .hdr__me:hover { border-color: var(--ember-2); color: var(--fg); }
  .hdr__signin:hover { color: var(--fg); }
}
/* Узкая шапка: ссылки уходят в панель, остаются логотип, вход и кнопка меню. */
@media (max-width: 1180px) {
  .hdr__nav { display: none; }
  .hdr__burger { display: grid; }
}
@media (max-width: 560px) {
  .hdr__row { gap: 8px; }
  .hdr__img { height: 32px; }
  .hdr__signin, .hdr__lang { display: none; }
  .hdr__who { display: none; }
  .hdr__me { padding: 0 4px; }
}
@media (max-width: 380px) { .hdr__join { display: none; } }

/* --- Боковая панель ------------------------------------------------------- */
.sheet {
  position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0;
  width: min(380px, 100vw); height: 100dvh; max-height: none; max-width: none;
  background: #121015; color: var(--fg-2); border: 0; border-left: 1px solid var(--border);
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.5);
  transform: translateX(100%); transition: transform 280ms var(--ease-out), overlay 280ms allow-discrete, display 280ms allow-discrete;
}
.sheet[open] { transform: translateX(0); }
@starting-style { .sheet[open] { transform: translateX(100%); } }
.sheet::backdrop { background: rgba(5, 4, 7, 0.6); opacity: 0; transition: opacity 280ms ease, overlay 280ms allow-discrete, display 280ms allow-discrete; }
.sheet[open]::backdrop { opacity: 1; }
@starting-style { .sheet[open]::backdrop { opacity: 0; } }
.sheet__inner { display: flex; flex-direction: column; gap: 22px; height: 100%; overflow-y: auto; padding: 18px 22px 28px; }
.sheet__top { display: flex; align-items: center; justify-content: space-between; }
.sheet__title { margin: 0; font: 600 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); }
.sheet__x { width: 38px; height: 38px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; display: grid; place-items: center; }
.sheet__x svg { width: 18px; height: 18px; fill: none; stroke: var(--fg); stroke-width: 2; stroke-linecap: round; }
.sheet__part { display: flex; flex-direction: column; gap: 10px; }
.sheet__part + .sheet__part { padding-top: 20px; border-top: 1px solid var(--border); }
.sheet__who { display: flex; align-items: center; gap: 12px; }
.sheet__who .sheet__badge { width: 44px; height: 44px; border-radius: 12px; font-size: 18px; }
.sheet__who b { display: block; color: var(--fg); font-size: 17px; }
.sheet__who small { color: var(--fg-3); font-size: 13px; }
.sheet__h { margin: 4px 0 0; font: 600 11.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); }
.sheet__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.sheet__list--two { grid-template-columns: 1fr 1fr; }
.sheet__list a {
  display: block; padding: 10px 12px; border-radius: 10px; color: var(--fg-2); text-decoration: none; font-weight: 600; font-size: 15px;
  transition: background-color 140ms ease, color 140ms ease;
}
.sheet__list a[aria-current], .sheet__list a:focus-visible { background: var(--surface-2); color: var(--fg); }
.sheet__out { align-self: flex-start; padding: 8px 12px; color: var(--fg-3); font-weight: 600; text-decoration: none; }
.sheet__note { margin: 0; color: var(--fg-3); font-size: 14px; }
.sheet__pair { display: grid; gap: 8px; }
.sheet__pair .mc-btn { min-height: 46px; font-size: 15.5px; }
.sheet__langs { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sheet__langs a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--border); color: var(--fg-2); text-decoration: none; font-weight: 600; font-size: 14.5px;
  transition: border-color 140ms ease, color 140ms ease;
}
.sheet__langs code { font: 600 11px/1 var(--mono); color: var(--fg-3); background: none; padding: 0; }
.sheet__langs a[aria-current] { border-color: var(--ember-2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--ember-2); }
.sheet__discord {
  display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 12px 14px; border-radius: 12px;
  background: rgba(88, 101, 242, 0.12); border: 1px solid rgba(88, 101, 242, 0.35); color: #c9cdfb; text-decoration: none; font-weight: 600; font-size: 14.5px;
}
.sheet__discord svg { width: 20px; height: 20px; flex: none; }
@media (hover: hover) and (pointer: fine) {
  .sheet__list a:hover { background: var(--surface-2); color: var(--fg); }
  .sheet__langs a:hover { border-color: var(--border-2); color: var(--fg); }
  .sheet__out:hover { color: var(--fg); }
  .sheet__x:hover { border-color: var(--border-2); }
}
/* На широком экране ссылки сайта уже в строке — в панели их нет. */
@media (min-width: 1181px) { .sheet__part--nav { display: none; } .sheet__part--nav + .sheet__part { padding-top: 0; border-top: 0; } }
html.sheet-open { overflow: hidden; }

/* --- Страница ------------------------------------------------------------- */
.page { position: relative; z-index: 1; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 36px var(--side) 96px; min-height: 60vh; flex: 1 0 auto; }
.at-home .page, .at-studio .page { max-width: none; padding: 0; }

/* --- Шапка страницы: путь, заголовок слева, вкладки раздела --------------- */
.phead { margin: 0 0 30px; }
.phead__trail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; font: 500 12.5px/1.4 var(--mono); letter-spacing: 0.04em; color: var(--fg-3); }
.phead__trail a { color: var(--fg-3); text-decoration: none; }
.phead__trail a:hover { color: var(--ember-1); }
.phead__trail span { opacity: 0.5; }
.phead__title { margin: 0; font-family: var(--font-text); font-weight: 800; font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -0.03em; color: var(--fg); text-align: left; }
.phead__title::after { content: none; }
.phead__lead { max-width: 68ch; margin: 12px 0 0; color: var(--fg-2); font-size: 16.5px; line-height: 1.55; }
.phead__tabs { margin-top: 24px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.phead__tabs::-webkit-scrollbar { display: none; }
.phead__tabs ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.phead__tabs a {
  position: relative; display: block; padding: 12px 14px 14px; white-space: nowrap;
  color: var(--fg-3); font-weight: 650; font-size: 15px; text-decoration: none; transition: color 140ms ease;
}
.phead__tabs a::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0;
  background: var(--ember-2); transform: scaleY(0); transform-origin: bottom; transition: transform 180ms var(--ease-out);
}
.phead__tabs a[aria-current] { color: var(--fg); }
.phead__tabs a[aria-current]::after { transform: scaleY(1); }
@media (hover: hover) and (pointer: fine) { .phead__tabs a:hover { color: var(--fg); } }
@media (max-width: 640px) { .phead { margin-bottom: 22px; } .phead__tabs { margin-left: calc(var(--side) * -1); margin-right: calc(var(--side) * -1); padding: 0 var(--side); } }

@media (prefers-reduced-motion: reduce) {
  .sheet, .sheet::backdrop { transition: opacity 200ms ease; transform: none; }
  .sheet:not([open]) { opacity: 0; }
}

/* --- Рейтинги: тройка лидеров карточками, дальше список ------------------- */
.lboard { display: flex; flex-direction: column; gap: 16px; }
.lboard__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.lboard__classes { display: flex; flex-wrap: wrap; gap: 6px; }
.lboard__classes button {
  height: 36px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--border-2); color: var(--fg-2);
  font: 600 14px/1 var(--font-text); transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 120ms var(--ease-out);
}
.lboard__classes button:active { transform: scale(0.96); }
.lboard__classes button[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: #121015; }
@media (hover: hover) and (pointer: fine) { .lboard__classes button:not([aria-pressed="true"]):hover { border-color: var(--ember-2); color: var(--fg); } }
.lboard__find { position: relative; display: block; width: min(300px, 100%); margin: 0; }
.lboard__find svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--fg-3); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.lboard__find input {
  width: 100%; height: 42px; padding: 0 14px 0 40px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border-2); color: var(--fg); font: 500 15px/1 var(--font-text);
}
.lboard__find input:focus { outline: none; border-color: var(--ember-2); box-shadow: 0 0 0 3px var(--ember-soft); }
.lboard__miss { flex-basis: 100%; margin: 0; color: var(--fg-3); font-size: 14px; text-align: right; }
.lboard__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.lboard__row {
  grid-column: 1 / -1; display: grid; grid-template-columns: 40px 44px minmax(0, 1fr) auto 128px; align-items: center; gap: 14px;
  padding: 10px 18px 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
}
.lboard__row[hidden] { display: none; }
.lboard__n { font: 700 15px/1 var(--mono); color: var(--fg-3); text-align: center; }
.lboard__ava { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: #0e0c11; }
.lboard__ava--mark { display: grid; place-items: center; overflow: hidden; }
.lboard__ava--mark img { width: 100%; height: 100%; image-rendering: pixelated; }
.lboard__who { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lboard__name { display: flex; align-items: center; min-width: 0; }
.lboard__name > a { color: var(--fg); font-weight: 700; font-size: 16px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lboard__name > a:hover { color: var(--ember-1); }
.lboard__who small { color: var(--fg-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lboard__who small a { color: var(--fg-2); text-decoration: none; }
.lboard__live { display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--ok); vertical-align: middle; box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18); }
.lboard__more { display: flex; gap: 22px; color: var(--fg-2); font: 600 15px/1 var(--mono); }
.lboard__more span, .lboard__main { display: flex; flex-direction: column; gap: 5px; }
.lboard__more small, .lboard__main small { font: 500 11px/1 var(--font-text); letter-spacing: 0.04em; color: var(--fg-3); }
.lboard__main { align-items: flex-end; text-align: right; font: 700 22px/1 var(--mono); color: var(--fg); }
/* Лидеры: три карточки в ряд */
.lboard__row.is-lead {
  grid-column: auto; grid-template-columns: 56px minmax(0, 1fr); grid-template-areas: "ava who" "more more" "main main";
  align-items: center; row-gap: 16px; padding: 20px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 122, 31, 0.10), rgba(255, 255, 255, 0.02) 55%);
  border-color: rgba(255, 122, 31, 0.22);
}
.lboard__row.is-lead .lboard__n { position: absolute; top: 14px; right: 18px; font-size: 34px; color: rgba(255, 180, 92, 0.28); }
.lboard__row.is-lead .lboard__ava { grid-area: ava; width: 56px; height: 56px; border-radius: 12px; }
.lboard__row.is-lead .lboard__who { grid-area: who; padding-right: 48px; }
.lboard__row.is-lead .lboard__name { display: flex; align-items: center; min-width: 0; }
.lboard__name > a { font-size: 18px; }
.lboard__row.is-lead .lboard__more { grid-area: more; }
.lboard__row.is-lead .lboard__main { grid-area: main; align-items: flex-start; text-align: left; padding-top: 14px; border-top: 1px solid var(--border); font-size: 30px; }
.lboard__row.is-lead:first-child { border-color: rgba(255, 122, 31, 0.5); }
.lboard__row.is-lead:first-child .lboard__n { color: rgba(255, 180, 92, 0.6); }
.lboard__none, .lboard-empty p { margin: 0; padding: 26px 22px; border-radius: 14px; border: 1px dashed var(--border-2); color: var(--fg-2); text-align: center; }
.lboard-empty b { color: var(--fg); }
.lboard__stamp { margin: 4px 0 0; color: var(--fg-3); font-size: 13px; }
.lboard__stamp time { font-family: var(--mono); }
@media (max-width: 900px) {
  .lboard__list { grid-template-columns: 1fr; }
  .lboard__row.is-lead { grid-column: 1 / -1; }
  .lboard__find { width: 100%; }
}
@media (max-width: 640px) {
  .lboard__row { grid-template-columns: 30px 40px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px 10px 8px; }
  .lboard__row:not(.is-lead) .lboard__more { display: none; }
  .lboard__ava { width: 40px; height: 40px; }
  .lboard__main { font-size: 18px; }
  .lboard__classes { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--side) * -1); padding: 0 var(--side); scrollbar-width: none; }
  .lboard__classes button { flex: none; }
}

/* --- Магазин «скоро» ------------------------------------------------------ */
.soon { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 0 0 18px; padding: 0; list-style: none; }
.soon__item { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); }
.soon__ico { width: 48px; height: 48px; image-rendering: pixelated; }
.soon__name { margin: 4px 0 0; font-size: 19px; font-weight: 750; color: var(--fg); letter-spacing: -0.01em; }
.soon__text { margin: 0; color: var(--fg-2); font-size: 15px; line-height: 1.55; }
.soon-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; border-radius: var(--r); border: 1px dashed var(--border-2); }
.soon-note p { flex: 1 1 420px; margin: 0; color: var(--fg-2); line-height: 1.55; }
.soon-note b { color: var(--fg); }

/* --- Подвал --------------------------------------------------------------- */
.foot { position: relative; z-index: 1; margin-top: auto; background: #08070a; border-top: 1px solid var(--border); }
.at-home .foot { margin-top: 120px; }
.foot__grid {
  display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(140px, 1fr)); gap: 32px 40px;
  max-width: 1680px; margin: 0 auto; padding: 48px var(--side) 30px;
}
.foot__brand img { display: block; width: 176px; height: auto; margin-bottom: 14px; image-rendering: pixelated; }
.foot__brand p { max-width: 28em; margin: 0; color: var(--fg-3); font-size: 14.5px; line-height: 1.55; }
.foot__social { display: flex; gap: 8px; margin-top: 16px; }
.foot__net { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); color: var(--fg-2); transition: color 140ms ease, border-color 140ms ease; }
.foot__net svg { width: 18px; height: 18px; }
.foot__col { display: flex; flex-direction: column; gap: 10px; }
.foot__h { margin: 0 0 4px; font: 600 11.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); }
.foot__col a { color: var(--fg-2); font-size: 15px; text-decoration: none; transition: color 140ms ease; }
.foot__meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 24px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--fg-3); font-size: 13px; }
.foot__meta p { margin: 0; }
.foot__meta a { color: var(--fg-2); }
@media (hover: hover) and (pointer: fine) {
  .foot__col a:hover, .foot__meta a:hover { color: var(--fg); }
  .foot__net:hover { color: var(--fg); border-color: var(--border-2); }
}
@media (max-width: 860px) { .foot__grid { grid-template-columns: 1fr 1fr; } .foot__brand { grid-column: 1 / -1; } }
@media (max-width: 420px) { .foot__grid { grid-template-columns: 1fr; } }

/* --- Вопрос перед действием (js/ask.js) ----------------------------------- */
.ask {
  width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border-2); border-radius: 18px;
  background: #16131a; color: var(--fg-2); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  opacity: 0; transform: translateY(8px) scale(0.98);
  transition: opacity 200ms ease, transform 220ms var(--ease-out), overlay 220ms allow-discrete, display 220ms allow-discrete;
}
.ask[open] { opacity: 1; transform: none; }
@starting-style { .ask[open] { opacity: 0; transform: translateY(8px) scale(0.98); } }
.ask::backdrop { background: rgba(5, 4, 7, 0.65); }
.ask__box { display: flex; flex-direction: column; gap: 12px; padding: 24px; }
.ask__head { margin: 0; color: var(--fg); font-size: 19px; font-weight: 750; letter-spacing: -0.01em; }
.ask__text { margin: 0; line-height: 1.55; }
.ask__rows { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 4px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--surface); }
.ask__rows dt { color: var(--fg-3); font-size: 14px; }
.ask__rows dd { margin: 0; color: var(--fg); font: 600 14px/1.4 var(--mono); text-align: right; }
.ask__btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.ask__btns .mc-btn { min-height: 44px; padding: 0 18px; font-size: 15px; }
.ask.is-danger .ask__yes { background: #c2321c; border-color: #c2321c; color: #fff; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .ask { transform: none; } }

/* --- Сообщения движка остаются на своём месте в странице ------------------ */
.alert {
  position: relative; display: block; margin: 0 0 18px; padding: 14px 46px 14px 16px; border-radius: 12px;
  border: 1px solid var(--border-2); border-left-width: 3px; background: var(--surface); color: var(--fg-2); line-height: 1.5;
}
.alert-success { border-left-color: var(--ok); }
.alert-info { border-left-color: var(--ember-1); }
.alert-warning { border-left-color: #f5b041; }
.alert-danger { border-left-color: #f0564a; color: var(--fg); }
.alert__x { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; cursor: pointer; display: grid; place-items: center; }
.alert__x svg { width: 14px; height: 14px; fill: none; stroke: var(--fg-3); stroke-width: 2; stroke-linecap: round; }
@media (hover: hover) and (pointer: fine) { .alert__x:hover { background: var(--surface-2); } }

/* --- Вики сервера: полоса на главной и в начале страницы «Сервер» --------- */
.wshelf {
  position: relative; display: flex; flex-direction: column; gap: 18px; margin: 0 0 32px; padding: 26px 26px 22px;
  border-radius: var(--r-lg); border: 1px solid rgba(255, 122, 31, 0.35);
  background: radial-gradient(120% 140% at 0% 0%, rgba(255, 122, 31, 0.16), rgba(255, 122, 31, 0) 55%), var(--surface);
  box-shadow: 0 0 0 1px rgba(255, 180, 92, 0.05) inset;
}
.wshelf--home { width: min(1240px, calc(100% - var(--side) * 2)); margin: 56px auto 0; }
.wshelf__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.wshelf__mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(140deg, var(--ember-1), var(--ember-3)); color: #1a0d05; }
.wshelf__mark svg { width: 28px; height: 28px; }
.wshelf__kicker { margin: 0 0 4px; font: 600 12px/1.3 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ember-1); }
.wshelf__title { margin: 0; color: var(--fg); font-size: clamp(21px, 2.4vw, 27px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.wshelf__text { margin: 6px 0 0; max-width: 64ch; color: var(--fg-2); font-size: 15.5px; line-height: 1.5; }
.wshelf__go { white-space: nowrap; }
.wshelf__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.wshelf__item {
  display: flex; align-items: flex-start; gap: 11px; height: 100%; padding: 12px 14px; border-radius: 12px;
  background: rgba(10, 9, 12, 0.55); border: 1px solid var(--border); color: var(--fg-2); text-decoration: none;
  transition: border-color 140ms ease, transform 160ms var(--ease-out);
}
.wshelf__item:active { transform: scale(0.98); }
.wshelf__ico { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--ember-soft); color: var(--ember-1); }
.wshelf__ico svg { width: 18px; height: 18px; }
.wshelf__item b { display: block; color: var(--fg); font-size: 15px; line-height: 1.3; }
.wshelf__item small { display: block; margin-top: 3px; color: var(--fg-3); font-size: 13px; line-height: 1.4; }
@media (hover: hover) and (pointer: fine) { .wshelf__item:hover { border-color: rgba(255, 122, 31, 0.55); } }
@media (max-width: 1000px) { .wshelf__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .wshelf { padding: 20px 16px 16px; }
  .wshelf__head { grid-template-columns: auto minmax(0, 1fr); }
  .wshelf__go { grid-column: 1 / -1; width: 100%; }
  .wshelf__mark { width: 46px; height: 46px; }
}
@media (max-width: 460px) { .wshelf__list { grid-template-columns: 1fr; } }

/* --- Кадры из игры: видео и скриншоты (mucodeShots) ----------------------- */
.shots { margin: 0 0 32px; }
.shots--home { width: min(1240px, calc(100% - var(--side) * 2)); margin: 56px auto 0; }
.shots__head { max-width: 46em; margin-bottom: 18px; }
.shots__title { margin: 8px 0 8px; color: var(--fg); font-size: clamp(24px, 2.8vw, 34px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
.shots__lead { margin: 0; color: var(--fg-3); font-size: 15.5px; line-height: 1.5; }
.shots__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.shots__film { grid-column: span 2; grid-row: span 2; }
.shots__cell {
  position: relative; display: block; height: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px;
  border: 1px solid var(--border); background: #0b0a0d; color: var(--fg); text-decoration: none;
  transition: border-color 140ms ease, transform 160ms var(--ease-out);
}
.shots__cell:active { transform: scale(0.98); }
.shots__cell img, .shots__film video { display: block; width: 100%; height: 100%; object-fit: cover; }
.shots__cell img { transition: transform 260ms var(--ease-out); }
.shots__cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 9px; font-size: 13.5px; line-height: 1.3;
  background: linear-gradient(to top, rgba(6, 5, 8, 0.85), rgba(6, 5, 8, 0)); pointer-events: none;
}
.shots__film .shots__cap { padding: 40px 18px 14px; font-size: 15px; color: var(--fg-2); }
.shots__film .shots__cap b { color: var(--fg); }
.shots__play {
  position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 72px; height: 72px; margin: -36px 0 0 -36px;
  border-radius: 50%; background: linear-gradient(140deg, var(--ember-1), var(--ember-3)); color: #1a0d05;
  box-shadow: 0 10px 40px rgba(255, 122, 31, 0.35); transition: transform 200ms var(--ease-out);
}
.shots__play svg { width: 30px; height: 30px; margin-left: 4px; fill: currentColor; }
.shots__film video { aspect-ratio: 16 / 9; border-radius: 12px; border: 1px solid var(--border); background: #000; }
@media (hover: hover) and (pointer: fine) {
  .shots__cell:hover { border-color: rgba(255, 122, 31, 0.55); }
  .shots__cell:hover img { transform: scale(1.03); }
  .shots__cell:hover .shots__play { transform: scale(1.06); }
}
@media (max-width: 860px) {
  .shots__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .shots__film { grid-row: auto; }
  .shots__cap { font-size: 12.5px; padding: 18px 9px 7px; }
  .shots__play { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
}

/* Просмотр кадра на весь экран */
.lbox {
  width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0;
  background: transparent; color: var(--fg-2);
  opacity: 0; transition: opacity 200ms ease, overlay 200ms allow-discrete, display 200ms allow-discrete;
}
.lbox[open] { opacity: 1; }
@starting-style { .lbox[open] { opacity: 0; } }
.lbox::backdrop { background: rgba(4, 3, 6, 0.92); }
.lbox__fig { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; height: 100%; margin: 0; padding: 56px 72px 20px; }
.lbox__img {
  display: block; max-width: 100%; max-height: calc(100dvh - 120px); width: auto; height: auto; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.98); transition: transform 240ms var(--ease-out);
}
.lbox[open] .lbox__img { transform: none; }
@starting-style { .lbox[open] .lbox__img { transform: scale(0.98); } }
.lbox__cap { margin: 0; font-size: 15px; text-align: center; }
.lbox__cap b { color: var(--fg); font-weight: 650; }
.lbox__n { margin-left: 10px; color: var(--fg-3); font: 500 13px/1 var(--mono); }
.lbox__btn {
  position: absolute; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border-radius: 12px; cursor: pointer;
  background: rgba(22, 19, 26, 0.85); border: 1px solid var(--border-2); color: var(--fg);
  transition: background 140ms ease, transform 160ms var(--ease-out);
}
.lbox__btn:active { transform: scale(0.95); }
.lbox__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lbox__x { top: 12px; right: 12px; }
.lbox__prev, .lbox__next { top: 50%; margin-top: -23px; }
.lbox__prev { left: 14px; }
.lbox__next { right: 14px; }
@media (hover: hover) and (pointer: fine) { .lbox__btn:hover { background: var(--surface-2); } }
@media (max-width: 700px) {
  .lbox__fig { padding: 60px 8px 76px; }
  .lbox__prev, .lbox__next { top: auto; bottom: 14px; margin-top: 0; }
  .lbox__prev { left: calc(50% - 56px); }
  .lbox__next { right: calc(50% - 56px); }
}
html.lbox-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .lbox__img, .lbox[open] .lbox__img { transform: none; }
  .shots__cell:hover img { transform: none; }
}
