:root {
  --bg: #0d1117;
  --bg-2: #151c24;
  --card: #1a222c;
  --card-hover: #212b36;
  --line: #2a3440;
  --text: #e7edf3;
  --muted: #8a98a8;
  --accent: #4aa8bf;
  --accent-2: #7fcfdf;
  --common: #9aa6b2;
  --rare: #4f9dde;
  --epic: #b06ad8;
  --legendary: #e0a94f;
  --header-bg: rgba(13,17,23,.82);
}

/* СВЕТЛАЯ ТЕМА */
:root[data-theme="light"] {
  --bg: #f5f7fa;
  --bg-2: #ffffff;
  --card: #ffffff;
  --card-hover: #eef2f7;
  --line: #dce3ea;
  --text: #1a2632;
  --muted: #5a6776;
  --accent: #2c8499;
  --accent-2: #1f6d80;
  --common: #6b7682;
  --rare: #2f6fb0;
  --epic: #8a46b0;
  --legendary: #b07d22;
  --header-bg: rgba(255,255,255,.85);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

a { color: var(--accent-2); }

/* TOPBAR: только переключатель темы (+ кнопка меню на мобиле) */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 28px; }
.lang-toggle {
  margin-left: auto;
  border: 1px solid var(--line); background: transparent; color: var(--text);
  height: 38px; padding: 0 12px; border-radius: 8px; font-weight: 700; font-size: 13px; cursor: pointer;
}
.lang-toggle:hover { border-color: var(--accent); }
.theme-toggle {
  border: 1px solid var(--line); background: transparent; color: var(--text);
  width: 38px; height: 38px; border-radius: 8px; font-size: 17px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { border-color: var(--accent); }
/* Видимый фокус для клавиатуры — единым правилом на все интерактивные элементы */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: inherit; }

/* LAYOUT: левый сайдбар категорий + контент */
.layout { max-width: none; margin: 0; padding: 0 28px; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 36px; align-items: start; }
.sidenav { grid-column: 1; grid-row: 1; }
.content { grid-column: 2; grid-row: 1; min-width: 0; }

/* ВИДЫ: показываем по одной категории-«странице» */
.view { display: none; }
.view.active { display: block; animation: viewIn .18s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .view.active { animation: none; } }

/* SIDENAV (справа) — простой список ссылок */
.sidenav { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 2px; padding-top: 28px; }
.sidenav .brand { font-weight: 700; color: var(--text); text-decoration: none; font-size: 15px; padding: 0 10px 14px; margin-bottom: 6px; }
.sidenav-links { display: flex; flex-direction: column; gap: 1px; }
.sidenav-links a {
  display: block; padding: 8px 10px; border-radius: 6px;
  color: var(--muted); text-decoration: none; font-size: 14px;
  transition: color .15s, border-color .15s, background .15s;
}
.sidenav-links a:hover { color: var(--text); }
.sidenav-links a.active { color: var(--text); font-weight: 700; border-left: 2px solid var(--accent); border-radius: 0; padding-left: 12px; }
/* группа «Вики» */
.sidenav-group { display: flex; flex-direction: column; gap: 1px; margin: 8px 0; }
.sidenav-group-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 4px 10px; }
.sidenav-group a { padding-left: 22px; }
.sidenav-group a.active { padding-left: 24px; }
.sidenav-createip { display: flex; flex-direction: column; gap: 0; }
.sidenav-sub { font-size: 11px; font-weight: 400; color: var(--muted); }

/* кликабельное выделение-ссылка */
.hl-link { text-decoration: none; cursor: pointer; border-bottom: 1px solid transparent; transition: border-color .12s, color .12s; }
.hl-link:hover { color: var(--accent); border-bottom-color: currentColor; }

/* РП-плашка на странице ролей */
.rp-note { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; color: var(--text); }

/* «Детальнее» в карточке роли */
.class-more { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.class-more summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--accent-2); list-style: none; }
.class-more summary::-webkit-details-marker { display: none; }
.class-more summary::before { content: "▸ "; }
.class-more[open] summary::before { content: "▾ "; }
.class-more-body { margin-top: 8px; }

/* HERO */
.hero {
  position: relative;
  padding: 72px 28px 60px; text-align: left;
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(10,14,18,.55), rgba(10,14,18,.86)),
    url("assets/images/pictures/1_U8cFV25psiEAEiIALQMPfQ.jpg") center / cover no-repeat;
}
.hero .wrap { padding: 0; margin: 0; max-width: none; }
.kicker { display: inline-block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.hero h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.lead { color: var(--muted); margin: 12px 0 0; max-width: 620px; }
.btn-primary {
  display: inline-block; margin-top: 22px; padding: 11px 20px; border-radius: 8px;
  background: var(--accent); color: #06222a; font-weight: 700; text-decoration: none;
}
.btn-primary:hover { background: var(--accent-2); }
.hero-img { margin: 18px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.hero-img img { display: block; width: 100%; height: auto; }
.hero-logo { margin-bottom: 10px; }
.hero-logo img { display: block; width: auto; max-width: 340px; max-height: 130px; height: auto; }
.hero-tag { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }

/* SECTIONS */
.section { padding: 28px 0; }
.section.alt { background: none; border: none; }
.section h2 { font-size: clamp(20px, 3.5vw, 26px); font-weight: 800; letter-spacing: -.01em; margin-bottom: 8px; }
.section-lead { color: var(--muted); margin-bottom: 28px; max-width: 640px; }
.section.narrow p, .narrow p { margin-bottom: 14px; }
.hl { color: var(--accent-2); font-weight: 600; }
.about-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.about-imgs .thumb { aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 12px; }
@media (max-width: 560px) { .about-imgs { grid-template-columns: 1fr; } }

/* CITATION (скрытая ссылка на цифре) */
.cite {
  font-size: .68em; vertical-align: super; line-height: 0;
  color: var(--accent-2); text-decoration: none; font-weight: 700;
  margin-left: 2px; padding: 0 1px;
}
.cite:hover { text-decoration: underline; }

/* CLASSES — карточки персонажей (портрет + детали, стопкой) */
.class-grid { display: flex; flex-direction: column; gap: 14px; }
.class-card {
  display: grid; grid-template-columns: 160px 1fr; gap: 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; transition: border-color .15s;
}
/* card hover убран: карточка не кликабельна целиком */
.class-portrait { border-radius: 10px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); align-self: start; }
.class-portrait img { display: block; width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.class-info { min-width: 0; }
.class-name { font-size: 19px; font-weight: 800; margin-bottom: 12px; }
.class-block { margin-bottom: 14px; }
.class-block:last-child { margin-bottom: 0; }
.class-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.class-ability { font-size: 14.5px; color: var(--text); }
.class-extra { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.class-extra li { font-size: 13px; color: var(--muted); padding-left: 14px; position: relative; }
.class-extra li::before { content: "–"; position: absolute; left: 0; color: var(--accent); }
.class-items { display: flex; flex-wrap: wrap; gap: 8px; }
.class-item { display: inline-flex; align-items: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px 6px 6px; }
.ci-img { width: 32px; height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--card); border-radius: 6px; overflow: hidden; }
.ci-img img { width: 100%; height: 100%; object-fit: contain; }
.ci-img-none { color: var(--muted); font-size: 14px; }
.ci-name { font-size: 13px; font-weight: 600; }
@media (max-width: 560px) {
  .class-card { grid-template-columns: 1fr; }
  .class-portrait { max-width: 200px; }
}

/* CATEGORY CHIPS */
.cat-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, transform .1s;
}
.cat-chip:hover { color: var(--text); border-color: var(--accent); }
.cat-chip.active { background: var(--accent); color: #06222a; border-color: var(--accent); }
.cat-chip:active { transform: scale(.97); }
.cat-ico { font-size: 16px; line-height: 1; }

/* LINK GRID (гайды) */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.link-card {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; text-decoration: none; color: var(--text); transition: border-color .15s, background .15s, transform .15s;
}
.link-card:hover { border-color: var(--accent); background: var(--card-hover); }
.link-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.link-url { font-size: 12.5px; color: var(--muted); word-break: break-all; }

/* SKINS GRID */
.search {
  width: 100%; max-width: 420px; padding: 13px 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 15px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,176,198,.18); }
.search::placeholder { color: var(--muted); }
.count { color: var(--muted); font-size: 14px; margin: 16px 0 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 14px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s; }
/* .card hover убран (некликабельна целиком); подсветка — только на интерактивном .thumb ниже */
.thumb { position: relative; aspect-ratio: 4 / 3; background: #0d1217; cursor: zoom-in; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge { position: absolute; top: 10px; left: 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); }
.badge.common { color: var(--common); }
.badge.rare { color: var(--rare); }
.badge.epic { color: var(--epic); }
.badge.legendary { color: var(--legendary); }
.badge.skincat { color: var(--accent-2); }
.card-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-name { font-size: 16px; font-weight: 700; }
.card-desc { font-size: 13px; color: var(--muted); flex: 1; }
.btn-dl { margin-top: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: 10px; background: var(--accent); color: #06222a; font-weight: 700; font-size: 14px; text-decoration: none; transition: background .15s, transform .1s; border: none; cursor: pointer; font-family: inherit; width: 100%; }
.btn-dl:hover { background: var(--accent-2); }
.btn-dl:active { transform: scale(.98); }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* SOURCES */
.source-list { list-style: none; counter-reset: src; }
.source-list li { counter-increment: src; padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; font-size: 14px; }
.source-list li::before { content: counter(src); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--accent-2); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.source-list a { color: var(--text); text-decoration: none; word-break: break-word; }
.source-list a:hover { color: var(--accent-2); text-decoration: underline; }

/* FOOTER */
.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 13px; text-align: center; }
.muted-small { font-size: 12px; opacity: .7; margin-top: 4px; }

/* SKINS LAYOUT + LAUNCHERS */
.skins-layout { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
.skins-main { min-width: 0; }
.launchers { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.launchers h3 { font-size: 16px; margin-bottom: 4px; }
.launchers-lead { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.launcher-card { display: block; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); text-decoration: none; color: var(--text); margin-bottom: 10px; transition: border-color .15s, transform .15s; }
.launcher-card:hover { border-color: var(--accent); }
.launcher-name { font-weight: 700; font-size: 14px; }
.launcher-note { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* MOD: sub-tabs, icon grid, info list, table, rarity, pool */
.cat-bar.sub { margin-bottom: 20px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.thumb-icon { aspect-ratio: 1; background: #0d1217; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: zoom-in; display: flex; align-items: center; justify-content: center; transition: border-color .15s, transform .15s; }
.thumb-icon:hover { border-color: var(--accent); }
.thumb-icon img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.sub-h { font-size: 18px; margin: 28px 0 14px; }
.info-list { display: grid; gap: 10px; }
.info-row { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.info-row b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.info-row span { font-size: 13px; color: var(--muted); }

.warn { background: rgba(224,169,79,.1); border: 1px solid rgba(224,169,79,.4); color: #f0c98a; border-radius: 10px; padding: 12px 16px; font-size: 14px; margin-bottom: 20px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.sk-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.sk-table th { text-align: left; padding: 11px 14px; background: var(--bg-2); color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sk-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.sk-table tr:last-child td { border-bottom: none; }
.sk-name { font-weight: 600; }
.sk-note { color: var(--muted); }

/* SERVER GUIDE (вкладка «Сервер») */
.sg-intro { background: rgba(79,176,198,.08); border: 1px solid rgba(79,176,198,.35); border-radius: 10px; padding: 13px 16px; font-size: 14px; color: var(--accent-2); margin-bottom: 8px; }
.sg-section { margin-bottom: 6px; }
.sg-section .sub-h { display: flex; align-items: baseline; gap: 9px; }
.sg-num { color: var(--accent); font-weight: 800; }
.sg-h { font-size: 15px; font-weight: 700; color: var(--text); margin: 16px 0 8px; }
.sg-p { font-size: 14px; color: var(--muted); margin: 0 0 10px; max-width: 760px; }
.sg-note { background: rgba(224,169,79,.1); border-left: 3px solid var(--legendary); border-radius: 6px; padding: 10px 14px; font-size: 13.5px; color: #f0c98a; margin: 4px 0 14px; max-width: 760px; }
.sg-code { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 13px; color: var(--accent-2); margin: 0 0 12px; overflow-x: auto; }
.sg-link { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 9px 14px; margin: 0 8px 10px 0; text-decoration: none; color: var(--text); font-size: 13.5px; font-weight: 600; transition: border-color .15s, background .15s; }
.sg-link:hover { border-color: var(--accent); background: var(--card-hover); }
.sg-url { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.sg-figure { margin: 0 0 16px; max-width: 760px; }
.sg-thumb { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--bg-2); width: fit-content; max-width: 100%; }
.sg-thumb img { display: block; max-width: 100%; max-height: 380px; height: auto; }
.sg-thumb:hover { border-color: var(--accent); }
.sg-cap { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* MODE GRID (вкладка «Режимы») */
.mode-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.mode-card { transform: none; }
/* mode-card hover убран */
.mode-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mode-tag { flex: none; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.mt-main  { color: var(--accent-2); border-color: rgba(106,208,232,.4); }
.mt-roles { color: var(--epic); border-color: rgba(176,106,216,.4); }
.mt-wolf3 { color: var(--legendary); border-color: rgba(224,169,79,.4); }
.mt-addon { color: var(--common); }
.mode-det { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.mode-det summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent); list-style: none; }
.mode-det summary::-webkit-details-marker { display: none; }
.mode-det summary::before { content: "▸ "; }
.mode-det[open] summary::before { content: "▾ "; }
.mode-det-body { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.7; }

/* ROLES (вкладка «Роли») */
.role-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 8px 0 8px; }
.role-col { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.role-col .sg-h { margin-top: 0; }
.rc-good .sg-h { color: var(--accent-2); }
.rc-wolf .sg-h { color: var(--legendary); }
.rc-third .sg-h { color: var(--epic); }
.role-list { list-style: none; display: grid; gap: 8px; }
.role-list li { font-size: 13px; color: var(--text); padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.role-list li:last-child { border-bottom: none; }
.role-note { color: var(--muted); font-size: 12px; }
.about-credit { font-size: 12px; color: var(--muted); margin-top: 12px; }
.rar { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.rar-hidden { color: #c9b3e8; background: rgba(176,106,216,.14); }
.rar-mythic { color: #ff6b8a; background: rgba(255,107,138,.14); }
.rar-legendary { color: var(--legendary); background: rgba(224,169,79,.14); }
.rar-epic { color: var(--epic); background: rgba(176,106,216,.14); }
.rar-common { color: var(--rare); background: rgba(79,157,222,.14); }
.rar-plain { color: var(--common); background: rgba(154,166,178,.12); }
.rar-cheap { color: var(--muted); background: rgba(139,154,169,.1); }
.pool-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pool-tag { font-size: 12.5px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; color: var(--text); }

/* GUIDES extras */
.map-pending { aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; color: var(--muted); font-size: 13px; background: repeating-linear-gradient(45deg, #0d1217, #0d1217 10px, #11161c 10px, #11161c 20px); }
.src-tag { font-size: 12px; font-weight: 400; color: var(--accent-2); opacity: .85; }
.aes-key { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; word-break: break-all; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; color: var(--accent-2); }
.info-row b { color: var(--text); }

/* INTERACTIVE MAP */
.imap-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.imap-title { font-size: 18px; font-weight: 700; flex: 1; }
.imap-layout { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
.imap-stage { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0d1217; line-height: 0; }
.imap-stage img { width: 100%; display: block; }
.imap-stage.coord { cursor: crosshair; }
.imap-dot { position: absolute; width: 22px; height: 22px; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid #fff; background: rgba(79,176,198,.85); cursor: pointer; padding: 0; box-shadow: 0 0 0 4px rgba(79,176,198,.3); transition: transform .12s, background .12s; animation: dotpulse 2s infinite; }
.imap-dot:hover { background: var(--accent-2); transform: translate(-50%, -50%) scale(1.25); }
@keyframes dotpulse { 0%,100% { box-shadow: 0 0 0 4px rgba(79,176,198,.3); } 50% { box-shadow: 0 0 0 8px rgba(79,176,198,.08); } }
.imap-panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; position: sticky; top: 72px; min-height: 120px; }
.pt-name { font-size: 16px; margin-bottom: 12px; }
.pt-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.pt-row:last-child { border-bottom: none; }
.pt-row b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 2px; }
.pt-row span { font-size: 14px; }
@media (max-width: 760px) { .imap-layout { grid-template-columns: 1fr; } .imap-panel { position: static; } }

/* LIGHTBOX */
.lightbox { position: fixed; inset: 0; background: rgba(4,7,10,.92); display: flex; align-items: center; justify-content: center; padding: 30px; z-index: 50; }
.lightbox[hidden] { display: none; }
body.lb-open { overflow: hidden; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lightbox-close { position: absolute; top: 18px; right: 22px; width: 42px; height: 42px; border: none; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff; font-size: 18px; cursor: pointer; transition: background .15s; }
.lightbox-close:hover { background: rgba(255,255,255,.18); }

@media (max-width: 860px) {
  .skins-layout { grid-template-columns: 1fr; }
  .launchers { position: static; order: -1; }

  /* Категории → горизонтальная лента сверху, всегда видны */
  .layout { grid-template-columns: 1fr; gap: 16px; }
  .sidenav {
    grid-column: 1; position: sticky; top: 58px; z-index: 39;
    flex-direction: row; gap: 6px; padding: 10px 0; overflow-x: auto;
    background: var(--bg); border-bottom: 1px solid var(--line);
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    /* затухание справа — намёк, что лента прокручивается дальше */
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
  }
  .sidenav::-webkit-scrollbar { display: none; }
  .content { grid-column: 1; }
  .sidenav .brand { display: none; }
  .sidenav-links { flex-direction: row; gap: 6px; }
  .sidenav-links a { white-space: nowrap; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; }
  .sidenav-links a.active { border-left: 1px solid var(--accent); border-color: var(--accent); border-radius: 999px; padding-left: 12px; }
  /* группа «Вики» раскладывается в общий ряд чипов */
  .sidenav-group { display: contents; }
  .sidenav-group-label { display: none; }
  .sidenav-group a { padding-left: 12px; }
  .sidenav-group a.active { padding-left: 12px; }
  .sidenav-createip { flex-direction: row; align-items: baseline; gap: 5px; }
}
@media (max-width: 640px) {
  .hero { padding: 52px 0 38px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
}

/* CREATE IP (встроенный сервис dhs.moeyy.cn) */
.createip-note { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent-2); border-radius: 12px; padding: 12px 16px; margin: 14px 0; font-size: 14px; color: var(--muted); }
.createip-bar { margin: 14px 0 18px; }
.createip-frame { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0d1217; }
.createip-frame iframe { display: block; width: 100%; height: 760px; border: 0; }
@media (max-width: 640px) { .createip-frame iframe { height: 600px; } }

/* CREATE IP — конфигуратор сервера + демо-консоль */
.ci-builder { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin: 14px 0; }
.ci-lead { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.ci-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 6px; }
.ci-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ci-select, .ci-num, .ci-console-in input { background: #0d1217; border: 1px solid var(--line); border-radius: 8px; color: var(--text, #e8eef2); padding: 9px 10px; font-size: 14px; width: 100%; }
.ci-mods { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.ci-chk { display: flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.ci-chk input { accent-color: var(--accent-2); }
.ci-mods-box { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; }
.ci-mod label { display: block; font-size: 13px; margin-bottom: 4px; }
.ci-mod-en { color: var(--muted); font-size: 11px; }
.ci-mod-ctl { display: flex; align-items: center; gap: 10px; }
.ci-mod-ctl input[type=range] { flex: 1; accent-color: var(--accent-2); }
.ci-num { width: 64px; flex: 0 0 auto; text-align: center; }
.ci-summary { background: #0d1217; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.6; white-space: pre-wrap; color: var(--text, #cfe6ee); margin-top: 6px; }
.ci-actions { display: flex; gap: 10px; align-items: center; margin: 14px 0; flex-wrap: wrap; }
.ci-console { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.ci-console.hidden { display: none; }
.ci-console-hint { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.ci-console-out { background: #06090c; border: 1px solid var(--line); border-radius: 10px; min-height: 110px; max-height: 240px; overflow-y: auto; padding: 10px 12px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.ci-line { white-space: pre-wrap; word-break: break-word; }
.ci-cmd { color: #7fd6ea; }
.ci-demo { color: #d68a8a; margin-bottom: 6px; }
.ci-console-in { display: flex; gap: 8px; margin-top: 10px; }
.ci-console-in input { flex: 1; }
@media (max-width: 640px) { .ci-grid2, .ci-mods-box { grid-template-columns: 1fr; } }

/* CHANGELOG (вкладка «Обновления») */
.cl-list { display: grid; gap: 14px; }
.cl-entry { display: grid; grid-template-columns: 130px 1fr; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.cl-date { font-weight: 700; color: var(--accent-2); font-size: 13.5px; }
.cl-items { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.cl-items li { font-size: 13px; color: var(--muted); }
@media (max-width: 560px) { .cl-entry { grid-template-columns: 1fr; gap: 6px; } }

/* CREATE IP — блок Discord-бота */
.ci-bot { background: var(--card); border: 1px solid var(--line); border-left: 3px solid #5865F2; border-radius: 10px; padding: 16px 18px; margin: 14px 0; }
.ci-bot-lead { font-size: 14px; color: var(--muted); margin: 6px 0 14px; }
.ci-bot-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ci-bot-actions .cat-chip { text-decoration: none; display: inline-flex; align-items: center; }

/* CREATE IP — легенда перевода dhs.moeyy.cn */
.dhs-legend { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin: 14px 0; padding: 4px 14px; }
.dhs-legend > summary { cursor: pointer; padding: 10px 0; font-weight: 600; font-size: 15px; list-style: none; }
.dhs-legend > summary::-webkit-details-marker { display: none; }
.dhs-legend > summary::before { content: "▸ "; color: var(--accent-2); }
.dhs-legend[open] > summary::before { content: "▾ "; }
.dhs-legend-lead { font-size: 14px; color: var(--muted); margin: 6px 0 12px; }
.dhs-legend .lg-zh { font-weight: 600; white-space: nowrap; }

/* SKIN TAGS (фильтр по тегам вместо категорий) */
.skin-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 4px; }
.skin-tag { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); cursor: pointer; transition: border-color .12s, color .12s; }
.skin-tag:hover { border-color: var(--accent); color: var(--accent-2); }
.chip-n { font-size: 11px; opacity: .6; }

/* SKIN FILTER ROWS (sub + теги) */
.skinfilter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.skinfilter-row:first-child { padding-bottom: 10px; border-bottom: 1px solid var(--line); }

/* MAPS GRID — 1 карта в ряд, крупные карточки */
.maps-grid { grid-template-columns: 1fr; gap: 18px; max-width: 620px; }
.maps-grid .thumb { aspect-ratio: 16 / 10; }

/* WEAPON ICONS (Гайды → Оружие) */
.wpn { display: inline-flex; align-items: center; gap: 10px; }
.wpn-ico { width: 54px; height: 54px; object-fit: contain; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); flex: none; padding: 3px; }

/* ABILITIES cards */
.ab-list { display: grid; gap: 12px; margin-bottom: 16px; }
.ab-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.ab-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.ab-name { font-size: 15.5px; }
.ab-meta { font-size: 12.5px; color: var(--accent-2); }
.ab-desc { font-size: 13.5px; color: var(--muted); margin: 0; }

/* MODDING steps */
.mod-step { display: flex; align-items: baseline; gap: 10px; }
.mod-num { flex: none; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); color: var(--accent); font-size: 12px; font-weight: 700; }
.mod-stage { color: var(--accent-2); letter-spacing: .04em; font-size: 12.5px; white-space: nowrap; }

/* WIKI tactical guides */
.wg-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.wg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.wgt-wolf { color: var(--legendary); border-color: rgba(224,169,79,.4); }
.wgt-common { color: var(--accent-2); border-color: rgba(106,208,232,.4); }
.wgt-crew { color: var(--rare); border-color: rgba(79,157,222,.4); }

/* ABILITY + TOTEM icons */
.ab-head { display: flex; align-items: center; gap: 12px; }
.ab-head-txt { display: flex; flex-direction: column; gap: 2px; }
.ab-ico { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line); flex: none; padding: 3px; }
.ab-ico-none { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: 20px; }
.tot-cell { display: flex; align-items: center; gap: 8px; }
.tot-ico { width: 26px; height: 26px; object-fit: contain; flex: none; }

/* ============ ДИЗАЙН-ПРАВКИ (аудит) ============ */
/* Подсветка только у кликабельного превью (картинка-лайтбокс), не у всей карточки */
.card .thumb { transition: filter .15s; }
.card .thumb:hover { filter: brightness(1.12); }
/* Некликабельные блоки — без ховер-подсветки (явно) */
.ab-card, .wg-card, .role-col, .cl-entry, .info-row, .mode-card { transition: none; }

/* --- Create IP: кастомные чекбоксы --- */
.ci-chk input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none;
  width: 18px; height: 18px; border: 1px solid var(--line); border-radius: 5px;
  background: #0d1217; cursor: pointer; position: relative; transition: background .12s, border-color .12s;
}
.ci-chk input[type="checkbox"]:hover { border-color: var(--accent); }
.ci-chk input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.ci-chk input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid #06222a; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
/* --- кастомные селекты с кареткой --- */
.ci-select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' fill='none' stroke='%238b9aa9' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.ci-select:hover, .ci-num:hover { border-color: var(--accent); }
.ci-select:focus, .ci-num:focus, .ci-console-in input:focus { outline: none; border-color: var(--accent); }
/* --- кастомные слайдеры --- */
.ci-mod-ctl input[type="range"] {
  appearance: none; -webkit-appearance: none; height: 6px; border-radius: 999px;
  background: var(--line); cursor: pointer; flex: 1;
}
.ci-mod-ctl input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg); box-shadow: 0 1px 4px rgba(0,0,0,.5); cursor: pointer;
}
.ci-mod-ctl input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border: 2px solid var(--bg); border-radius: 50%; background: var(--accent); cursor: pointer;
}
/* высоты контролов в один уровень */
.ci-select, .ci-num { min-height: 38px; }
/* сноски-цифры — чуть отделить от данных */
.cite { margin-left: 3px; opacity: .72; }

/* РЕСУРСЫ — группировка по категориям в ряды */
.res-body { display: grid; gap: 26px; }
.res-group { display: grid; gap: 12px; }
.res-cat { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 700; color: var(--text); margin: 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.res-cat .cat-ico { font-size: 16px; }
.res-n { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.res-group .link-card { padding: 12px 14px; }
