:root {
  --bg: #0b1016;
  --panel: #121a24;
  --panel-2: #172231;
  --line: #223044;
  --text: #e6edf3;
  --muted: #8b9bb0;
  --accent: #4ea1ff;
  --green: #3fb950;
  --red: #f85149;
  --amber: #d29922;
  --gold: #e3b341;
  --silver: #c0c8d2;
  --bronze: #d08b54;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Флаги стран на Windows: Windows не рисует эмодзи-флаги (вместо 🇵🇱 — буквы «PL»). Шрифт только с флагами
   (Twemoji Country Flags из npm country-flag-emoji-polyfill 0.1.10, код MIT, рисунки Twemoji CC-BY 4.0 —
   assets/fonts/TwemojiCountryFlags-LICENSE.md). unicode-range: шрифт берётся только для символов флагов. */
@font-face {
  font-family: "Twemoji Country Flags";
  src: url("/assets/fonts/TwemojiCountryFlags.woff2") format("woff2");
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  font-display: swap;
}
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -200px, #14304f 0%, var(--bg) 60%) no-repeat, var(--bg);
  color: var(--text);
  font: 15px/1.5 "Twemoji Country Flags", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 900px; margin: 0 auto; padding: 28px 16px 48px; }
/* широкие экраны — 1080, ниже остаётся 900 (и дальше адаптив под планшеты и телефоны) */
@media (min-width: 1140px) { .wrap { max-width: 1080px; } }

header.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
header.top h1 { margin: 0; font-size: 26px; letter-spacing: .3px; }
header.top h1 a { color: inherit; }
header.top h1 a:hover { text-decoration: none; }
header.top h1 span { color: var(--accent); }
header.top .sub { color: var(--muted); font-size: 13px; }
.updated { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(63,185,80,.6); animation: pulse 2s infinite; }
.pulse.stale { background: var(--amber); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(63,185,80,0); } 100% { box-shadow: 0 0 0 0 rgba(63,185,80,0); } }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }

.card { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; overflow: hidden; }
.card.off { opacity: .75; }
.head { display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; padding: 16px 18px; }
.icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 26px; background: #0e151e; border: 1px solid var(--line); }
.icon img.gicon { width: 34px; height: 34px; object-fit: contain; }
.icon img.gicon-cs { width: 36px; height: 36px; }
.icon img.gicon-mc { width: 48px; height: 48px; border-radius: 12px; image-rendering: pixelated; }
.icon:has(.gicon-mc) { overflow: hidden; padding: 0; }
.wimg { height: 22px; max-width: 70px; object-fit: contain; vertical-align: middle; margin-right: 10px; }
.mimg { width: 34px; height: 26px; object-fit: contain; vertical-align: middle; margin-right: 10px; }
.wcell { display: flex; align-items: center; }
.wcell .wimgbox { width: 80px; flex: none; display: flex; justify-content: flex-start; }
.favimg { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; min-height: 86px; }
.favimg img.big-w { max-height: 64px; max-width: 200px; object-fit: contain; }
.favimg img.big-m { width: 107px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.favimg img.big-m.is-radar { width: auto; height: auto; max-height: 80px; max-width: 120px; object-fit: contain; border: none; }
.head.has-thumb { grid-template-columns: auto 1fr auto auto auto; }
.headplay .btn { white-space: nowrap; }
.addr .cmdbtn { text-decoration: none; }
footer .copy { margin-top: 8px; font-size: 11px; opacity: .8; line-height: 1.5; }
/* название карты слева от картинки (в .meta то же название прячем — показываем, только если картинки нет) */
.mapblock { display: flex; align-items: center; gap: 10px; }
.mapname { display: flex; flex-direction: column; align-items: flex-end; text-align: right; line-height: 1.25; }
.mapname span { color: var(--muted); font-size: 12px; }
.mapname b { color: var(--text); font-weight: 600; font-size: 14px; }
.head.has-thumb .meta-map { display: none; }
.mthumbbox { height: 56px; width: 75px; display: grid; place-items: center; background: #0e151e; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mthumb { width: 100%; height: 100%; object-fit: cover; }          /* скриншот: заполняет рамку 4:3 */
.mthumb.is-radar { width: auto; height: auto; max-height: 50px; max-width: 70px; object-fit: contain; }
.title { min-width: 0; }
.title h2 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid; }
.pill.on { color: var(--green); border-color: rgba(63,185,80,.4); background: rgba(63,185,80,.08); }
.pill.off { color: var(--red); border-color: rgba(248,81,73,.4); background: rgba(248,81,73,.08); }
.pill.wait { color: var(--amber); border-color: rgba(210,153,34,.4); background: rgba(210,153,34,.08); }
.meta { color: var(--muted); font-size: 13px; margin-top: 3px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.meta b { color: var(--text); font-weight: 600; }
.addr { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; } .addr .btn { white-space: nowrap; }
code { font: 13px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text); background: #0e151e; border: 1px solid var(--line); padding: 4px 7px; border-radius: 7px; }
.btn { cursor: pointer; font: inherit; font-size: 12px; color: var(--accent); background: none; border: 1px solid rgba(78,161,255,.35); border-radius: 7px; padding: 3px 8px; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { background: rgba(78,161,255,.1); text-decoration: none; }
.btn.big { font-size: 14px; padding: 8px 14px; border-radius: 9px; }
.count { text-align: right; }
.count .num { font-size: 26px; font-weight: 700; line-height: 1; }
.count .num small { font-size: 15px; color: var(--muted); font-weight: 500; }
.bar { width: 120px; height: 6px; background: #0e151e; border-radius: 99px; margin-top: 8px; overflow: hidden; margin-left: auto; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--green)); border-radius: 99px; transition: width .4s; }

.body { border-top: 1px solid var(--line); padding: 6px 18px 14px; }
.section-title { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; margin: 14px 0 6px; }
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 7px 8px; text-align: right; white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: 12px; border-bottom: 1px solid var(--line); }
th.sort { cursor: pointer; user-select: none; }
th.sort:hover { color: var(--text); }
th.sort.active { color: var(--accent); }
td { border-bottom: 1px solid rgba(34,48,68,.6); font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(78,161,255,.04); }
th.l, td.l { text-align: left; }
td.name { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
td.name a { color: var(--text); }
td.name a:hover { color: var(--accent); }
.who { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; }
.who .nm { overflow: hidden; text-overflow: ellipsis; }
.flag { font-size: 17px; line-height: 1; }
.steam { display: inline-flex; width: 16px; height: 16px; flex: none; opacity: .75; }
.steam:hover { opacity: 1; }
.steam svg { width: 16px; height: 16px; fill: #c7d5e0; }
.kd.good { color: var(--green); } .kd.bad { color: var(--red); }
.rank { font-weight: 700; color: var(--muted); }
.rank.r1 { color: var(--gold); } .rank.r2 { color: var(--silver); } .rank.r3 { color: var(--bronze); }
.ping.hi { color: var(--amber); } .ping.vhi { color: var(--red); }
.empty { color: var(--muted); padding: 14px 0 6px; text-align: center; }
.note { color: var(--muted); font-size: 12px; margin-top: 8px; }
.more { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 12px 0 4px; }
/* метка у ника (GS.tag): одна форма, вид задаёт только цвет */
.tag { display: inline-block; flex: none; font-size: 11px; line-height: 16px; padding: 0 5px; border: 1px solid; border-radius: 5px; white-space: nowrap; }
.tag-lvl { color: var(--accent); border-color: rgba(78,161,255,.3); }
.tag-vip { color: #f5c542; border-color: rgba(245,197,66,.45); font-weight: 700; }
.tag-bot { color: var(--muted); border-color: var(--line); }
/* ник + уровень + значок браузера в одну строку, всё по центру по вертикали */
.namerow { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; vertical-align: middle; }
.namerow .who { min-width: 0; }
.web { display: inline-flex; flex: none; color: var(--accent); opacity: .85; cursor: help; }
.web svg { width: 15px; height: 15px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { cursor: pointer; font: inherit; font-size: 14px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 7px 14px; }
.tab.active { color: var(--text); border-color: var(--accent); background: rgba(78,161,255,.08); }
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 18px; }
input.search { font: inherit; color: var(--text); background: #0e151e; border: 1px solid var(--line); border-radius: 9px; padding: 7px 12px; width: 240px; max-width: 100%; }
input.search:focus { outline: none; border-color: var(--accent); }

.hero { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 18px; }
.avatar { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; font-size: 34px; background: #0e151e; border: 1px solid var(--line); }
.hero h2 { margin: 0; font-size: 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; word-break: break-word; }
.bigrank { text-align: right; }
.bigrank .num { font-size: 30px; font-weight: 800; line-height: 1; }
.bigrank .lbl { color: var(--muted); font-size: 12px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { background: #0e151e; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; }
.stat .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .k { color: var(--muted); font-size: 12px; }
.fav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.fav .stat .v { font-size: 18px; }
.share { height: 6px; background: #0e151e; border-radius: 99px; overflow: hidden; min-width: 80px; }
.share i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.body-hits { display: grid; grid-template-columns: 110px 1fr 70px; gap: 6px 10px; align-items: center; font-size: 13px; }
.body-hits .share { height: 8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

footer { color: var(--muted); font-size: 12px; text-align: center; margin-top: 26px; }

@media (max-width: 640px) {
  .wrap { padding-top: 18px; }
  header.top h1 { font-size: 22px; }
  .head, .hero { grid-template-columns: auto 1fr; }
  .head.has-thumb { grid-template-columns: auto 1fr auto; }
  .headplay { grid-column: 1 / -1; order: 10; }   /* телефон: «Грати» — на всю ширину под шапкой */
  .headplay .btn { width: 100%; justify-content: center; }
  .mthumbbox { width: 60px; height: 46px; }
  .mthumb { max-height: 40px; max-width: 56px; }
  .count, .bigrank { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; text-align: left; }
  .bar { margin: 0; width: 45%; }
  .hide-sm { display: none; }
  td.name { max-width: 150px; }
  th, td { padding: 7px 6px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .two, .fav { grid-template-columns: 1fr; }
  input.search { width: 100%; }
}

/* ---------- аккаунт: шапка, окно входа, кабинет ---------- */
.topright { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.acc-hello { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); flex-wrap: wrap; justify-content: flex-end; }
.acc-hello b { color: var(--text); font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.primary { color: #fff; background: #2f6fd1; border-color: #2f6fd1; justify-content: center; }
.btn.primary:hover { background: #3a7be0; }
.btn:disabled { opacity: .6; cursor: default; }
.linkbtn { background: none; border: 0; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; padding: 4px 0; }
.linkbtn:hover { text-decoration: underline; }

.m-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(5, 9, 14, .72); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(2px); }
.m-box { position: relative; width: min(400px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 18px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.m-x { position: absolute; top: 8px; right: 10px; background: none; border: 0; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 8px; }
.m-x:hover { color: var(--text); }
.m-title { font-size: 20px; font-weight: 700; margin-bottom: 14px; } .m-title span { color: var(--accent); }
.m-sub { font-size: 15px; font-weight: 600; margin: -6px 0 10px; }
.m-p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; } .m-p.muted { color: var(--muted); font-size: 13px; }
.m-score { width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: 14px; }
.m-score td { padding: 6px 0; border-bottom: 1px solid var(--line); text-align: left; } .m-score td:last-child { text-align: right; font-weight: 600; white-space: nowrap; padding-left: 12px; }
.m-tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.m-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: inherit; font-size: 14px; padding: 6px 4px 8px; margin-bottom: -1px; cursor: pointer; }
.m-tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.m-body form { display: grid; gap: 12px; }
label.f { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
label.f input, label.f textarea { font: inherit; font-size: 15px; color: var(--text); background: #0e151e; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; width: 100%; }
label.f input:focus, label.f textarea:focus { outline: none; border-color: var(--accent); }
.err { color: var(--red); font-size: 13px; min-height: 0; }
.err:empty { display: none; }
.okmsg { color: var(--green); font-size: 13px; margin-top: 8px; } .okmsg:empty { display: none; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.steam-btn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 14px; border-radius: 9px; background: #171a21; border: 1px solid #2a475e; color: #c7d5e0; font-weight: 600; }
.steam-btn:hover { background: #1b2838; text-decoration: none; color: #fff; }
.steam-ico { width: 20px; height: 20px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M15.97 0C7.6 0 .73 6.46.07 14.67l8.6 3.55a4.5 4.5 0 0 1 2.84-.87l3.83-5.54v-.08a6.07 6.07 0 1 1 6.07 6.07h-.14l-5.45 3.9.02.32a4.55 4.55 0 0 1-9.02.86L.6 20.22A16 16 0 1 0 15.97 0Zm-5.94 24.28-1.97-.81a3.42 3.42 0 1 0 1.87-4.68l2.04.84a2.52 2.52 0 1 1-1.94 4.65Zm15.29-12.45a4.05 4.05 0 1 0-8.1 0 4.05 4.05 0 0 0 8.1 0Zm-7.08 0a3.04 3.04 0 1 1 6.08 0 3.04 3.04 0 0 1-6.08 0Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M15.97 0C7.6 0 .73 6.46.07 14.67l8.6 3.55a4.5 4.5 0 0 1 2.84-.87l3.83-5.54v-.08a6.07 6.07 0 1 1 6.07 6.07h-.14l-5.45 3.9.02.32a4.55 4.55 0 0 1-9.02.86L.6 20.22A16 16 0 1 0 15.97 0Zm-5.94 24.28-1.97-.81a3.42 3.42 0 1 0 1.87-4.68l2.04.84a2.52 2.52 0 1 1-1.94 4.65Zm15.29-12.45a4.05 4.05 0 1 0-8.1 0 4.05 4.05 0 0 0 8.1 0Zm-7.08 0a3.04 3.04 0 1 1 6.08 0 3.04 3.04 0 0 1-6.08 0Z'/%3E%3C/svg%3E") center / contain no-repeat; }

/* кабинет */
.cab .row { display: grid; grid-template-columns: 160px 1fr; gap: 6px 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.cab .row:first-of-type { border-top: 0; }
.cab .row > span:first-child { color: var(--muted); font-size: 13px; }
.cab .val { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.cab .ava { width: 32px; height: 32px; border-radius: 6px; }
.badge { font-size: 11px; border-radius: 5px; padding: 1px 6px; border: 1px solid var(--line); color: var(--muted); }
.badge.ok { color: var(--green); border-color: rgba(63,185,80,.4); } .badge.warn { color: var(--amber); border-color: rgba(210,153,34,.4); }
.badge.bad { color: var(--red); border-color: rgba(248,81,73,.45); }
.cab form.inline { display: grid; gap: 10px; max-width: 360px; margin-top: 8px; }
.cab .soon { color: var(--muted); font-size: 13px; }
.notice { padding: 10px 14px; border-radius: 9px; margin-bottom: 14px; font-size: 14px; border: 1px solid var(--line); }
.notice.ok { border-color: rgba(63,185,80,.4); color: var(--green); } .notice.bad { border-color: rgba(248,81,73,.4); color: var(--red); }
@media (max-width: 600px) { .cab .row { grid-template-columns: 1fr; } .topright { align-items: flex-start; width: 100%; } }
/* выбор модели в кабинете */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.mcard { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; background: #0e151e; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.mcard.on { border-color: var(--green); box-shadow: 0 0 0 1px rgba(63,185,80,.35) inset; }
.mcard img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 7px; background: #0b1016; }
.mcard b { font-size: 13px; }
.mcard .by { font-size: 11px; color: var(--muted); }
/* маленькая иконка игры в шапке страницы игрока */
.gmini { display: inline-flex; align-items: center; }
.gmini .gicon, .gmini img { width: 18px; height: 18px; object-fit: contain; }
.mgroup { margin-top: 14px; }
.mcard img { aspect-ratio: 3 / 4; object-fit: contain; background: radial-gradient(circle at 50% 35%, #1d2c40, #0b1016 75%); }
/* спреи в кабинете */
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 10px; }
.scard { display: flex; flex-direction: column; align-items: center; gap: 6px; background: #0e151e; border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; }
.scard.on { border-color: var(--green); box-shadow: 0 0 0 1px rgba(63,185,80,.35) inset; }
.scard img, .scard .splus { width: 80px; height: 80px; object-fit: contain; image-rendering: pixelated;
  background: repeating-conic-gradient(#1a2534 0% 25%, #121a24 0% 50%) 50% / 16px 16px; border-radius: 6px; }
.scard .splus { display: grid; place-items: center; font-size: 34px; color: var(--muted); }
.scard b { font-size: 12px; }
.scard .srow { display: flex; align-items: center; gap: 6px; }
.scard .scolor { width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; cursor: pointer; }
.scard .scolor::-webkit-color-swatch-wrapper { padding: 2px; }
.scard .scolor::-webkit-color-swatch { border: 0; border-radius: 4px; }
.scard .scolor::-moz-color-swatch { border: 0; border-radius: 4px; }

/* редактор конфига в кабинете: прозрачный textarea поверх подсветки строк */
.cfged { position: relative; height: 320px; border: 1px solid var(--line); border-radius: 9px; background: #0b1118; overflow: hidden; }
.cfged-ta, .cfged-back { position: absolute; inset: 0; margin: 0; padding: 10px 12px; font: 13px/20px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre; overflow: auto; tab-size: 4; box-sizing: border-box; }
.cfged-ta { width: 100%; height: 100%; resize: none; border: 0; outline: none; background: transparent; color: var(--text); caret-color: var(--text); }
.cfged-ta:focus { box-shadow: 0 0 0 1px var(--accent) inset; border-radius: 9px; }
.cfged-back { color: transparent; pointer-events: none; scrollbar-width: none; }
.cfged-back::-webkit-scrollbar { display: none; }
.cfged-back > div { min-height: 20px; }
.cfged-back > .bad { background: rgba(248,81,73,.14); text-decoration: underline wavy #f85149; text-decoration-skip-ink: none; text-underline-offset: 4px; }
.cfged-errs { margin: 8px 0 0; padding: 0 0 0 18px; color: #ff9b95; font-size: 13px; max-height: 160px; overflow: auto; }
.cfged-errs:empty { display: none; }
.cfged-errs .linkbtn { color: #ff9b95; }
.cfged-bar { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cfged-st { margin: 0; }

/* после входа ради браузерной игры, если браузер не дал открыть вкладку сам */
.playbar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }

/* телефоны: шапка карточки сервера и таблицы без вылезания за край */
@media (max-width: 480px) {
  .head.has-thumb { grid-template-columns: auto 1fr; }
  .mapblock { display: none; }             /* картинка и название карты у картинки; название — текстом в .meta */
  .head.has-thumb .meta-map { display: inline; }
  .title h2 { font-size: 17px; }
  .addr { flex-wrap: wrap; }
  .addr code { font-size: 12px; }
  td .tag-lvl { display: none; }           /* уровень в таблицах на телефоне — место под ник */
  td.name { max-width: 130px; }
}
.m-row { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 6px; }
.guest-form .btn.big { display: block; width: 100%; margin: 14px 0 12px; }
/* код гостя (account.js guestPlay) */
.guest-code { text-align: center; }
.gcode { font: 700 28px/1.2 ui-monospace, monospace; letter-spacing: 4px; color: var(--accent); margin: 6px 0 12px; user-select: all; }
.mcard.locked img { opacity: .45; filter: grayscale(.6); }   /* VIP-модель без VIP */
/* «Стандартний скін»: вместо картинки — заглушка того же размера */
.mstd { width: 100%; aspect-ratio: 3 / 4; border-radius: 7px; display: grid; place-items: center; font-size: 48px; font-weight: 700; color: var(--muted);
  background: radial-gradient(circle at 50% 35%, #1d2c40, #0b1016 75%); }

/* загрузка: крутящийся спиннер (компонент: ui.loading() в _includes/ui.njk, GS.ui.loading() в assets/ui.js) */
.loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 56px 0; color: var(--muted); font-size: 13px; }
.loading.small { padding: 18px 0; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin .8s linear infinite; }
.loading.small .spinner { width: 22px; height: 22px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
/* текст только для экранного диктора (визуально скрыт) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- графики (assets/charts.js, GS.chart) ---------- */
.chart { position: relative; }
.chart svg { display: block; overflow: visible; }
.chart .ax { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.chart .base { stroke: var(--line); stroke-width: 1; }
.chart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .ln.c-main, .chart .dot.c-main { stroke: var(--accent); fill: var(--accent); }
.chart .ln.c-main { fill: none; }
.chart .ln.c-soft { stroke: rgba(78,161,255,.55); }
.chart .dot.c-soft { fill: #9ccaff; stroke: none; }
.chart .area.c-soft { fill: rgba(78,161,255,.16); stroke: none; }
.chart .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .hov { stroke: var(--panel); stroke-width: 2; }
.chart .hov.c-main { fill: var(--accent); } .chart .hov.c-soft { fill: #9ccaff; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart.bars .hit { cursor: default; }
.chart.bars .hit.on { fill: rgba(255,255,255,.04); }
.chart .bar { fill: var(--accent); }
.chart .bar.hl { fill: #9ccaff; }
.chart-tip { display: none; position: absolute; z-index: 5; pointer-events: none; min-width: 130px; background: #0b1016; border: 1px solid var(--line);
  border-radius: 9px; padding: 7px 10px; font-size: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.chart-tip .th { color: var(--muted); margin-bottom: 4px; white-space: nowrap; }
.chart-tip .tl { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.chart-tip .tl b { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.sw.c-main { background: var(--accent); } .sw.c-soft { background: rgba(78,161,255,.45); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.heat { display: grid; gap: 2px; font-size: 10px; color: var(--muted); }
.heat .hc { text-align: center; } .heat .hr { align-self: center; }
.heat .cell { height: 15px; min-width: 0; border-radius: 3px; background: rgba(78,161,255, var(--a, 0)); }
.heat .cell.none { background: transparent; outline: 1px dashed rgba(139,155,176,.18); outline-offset: -1px; }
.heat-scale { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); margin-top: 8px; }
.heat-scale i { width: 90px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(78,161,255,.1), rgba(78,161,255,1)); }

/* ---------- переключатели-фильтры и сетки страниц ---------- */
.tabs.seg .tab { font-size: 13px; padding: 5px 11px; }
.tab:disabled { opacity: .4; cursor: default; }
.stat .sub { color: var(--muted); font-size: 11px; margin-top: 2px; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cols2 > .card { margin-bottom: 18px; min-width: 0; }
@media (max-width: 860px) { .cols2 { grid-template-columns: 1fr; gap: 0; } }
/* значок/иконка после ника в таблице (новий, гість, браузер) */
.who ~ .badge, .who ~ .web { margin-left: 8px; }

/* ---------- выпадающий список и пагинация (GS.ui.select, GS.ui.pager) ---------- */
select.select { font: inherit; font-size: 14px; color: var(--text); background: #0e151e; border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; }
select.select:focus { outline: none; border-color: var(--accent); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 12px 0 4px; }
.pg-info { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.pg-nums { display: flex; gap: 4px; flex-wrap: wrap; }
.pg { cursor: pointer; font: inherit; font-size: 13px; min-width: 34px; height: 32px; padding: 0 8px; color: var(--muted); background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px; font-variant-numeric: tabular-nums; }
.pg:hover:not(:disabled) { color: var(--text); border-color: var(--accent); }
.pg.active { color: var(--text); border-color: var(--accent); background: rgba(78,161,255,.1); cursor: default; }
.pg:disabled:not(.active) { opacity: .35; cursor: default; }
.pg-gap { color: var(--muted); align-self: center; padding: 0 2px; }
.pg-size { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
@media (max-width: 640px) { .pager { justify-content: center; } }
.cab-tabs { margin: 0 0 14px; }
/* цвета модели Half-Life (кабинет): ползунок оттенка 0..255 со шкалой цветов */
.hue-box { margin-top: 18px; }
.hue-row { display: grid; grid-template-columns: 60px 1fr 22px 34px; gap: 10px; align-items: center; margin: 8px 0; font-size: 14px; color: var(--muted); }
.hue-row .hue-val { color: var(--text); font-variant-numeric: tabular-nums; text-align: right; }
.hue-sw { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); }
input.hue { -webkit-appearance: none; appearance: none; height: 12px; border-radius: 6px; cursor: pointer; width: 100%;
  background: linear-gradient(90deg, #f00 0%, #ff0 16.7%, #0f0 33.3%, #0ff 50%, #00f 66.7%, #f0f 83.3%, #f00 100%); }
input.hue::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid #0b1016; box-shadow: 0 0 0 1px var(--line); }
input.hue::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid #0b1016; }

/* ---------- дизайн 2026-11-30 («Пульт»): верхнее меню, главная — плитки серверов и блок статистики ---------- */
:root { --ua: #ffd43b; }
.topnav { position: sticky; top: 0; z-index: 40; background: rgba(11,16,22,.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topnav .navwrap { display: flex; align-items: center; gap: 22px; min-height: 60px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: .2px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo span { color: var(--accent); }
.logo i { width: 24px; height: 24px; border-radius: 7px; background: linear-gradient(180deg, var(--accent) 50%, var(--ua) 50%); flex: none; }
.navlinks { display: flex; gap: 18px; font-size: 14px; }
.navlinks a { color: var(--muted); white-space: nowrap; }
.navlinks a:hover { color: var(--text); text-decoration: none; }
.navlinks a.on { color: var(--text); }
.navright { margin-left: auto; display: flex; align-items: center; }
.navright .acc-hello { justify-content: flex-end; }
.topnav + .wrap { padding-top: 0; }
header.top { margin-top: 22px; }
header.top .ptitle { font-size: 22px; font-weight: 700; letter-spacing: .2px; }
.wrap > .crumbs:first-child { margin-top: 18px; }
@media (max-width: 720px) {
  .topnav { position: static; }
  .topnav .navwrap { gap: 8px 16px; }
  .navlinks { order: 3; width: 100%; overflow-x: auto; gap: 16px; scrollbar-width: none; }
  .navlinks::-webkit-scrollbar { display: none; }
}

.home-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 30px 0 20px; flex-wrap: wrap; }
.home-hero h1 { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -.3px; }
.home-hero h1 em { font-style: normal; color: var(--ua); }
.home-hero p { margin: 6px 0 0; color: var(--muted); }
.livepill { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px 8px 13px; font-size: 14px; color: var(--muted); }
.livepill b { color: var(--text); font-size: 17px; }

.servers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.servers > .loading, .servers > .empty { grid-column: 1 / -1; }
.tile { position: relative; min-width: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); cursor: pointer; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: #33506f; transform: translateY(-2px); }
.tile.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.tile.off { opacity: .8; }
.t-art { position: relative; height: 120px; background: radial-gradient(circle at 50% 30%, #1d2c40, #0e151e 75%); display: grid; place-items: center; overflow: hidden; }
.t-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,26,36,.1), var(--panel) 96%); }
/* превью карт маленькие (160×120) — растянутые выглядят мылом, поэтому размытый фон */
.t-art .t-shot { width: 100%; height: 100%; object-fit: cover; filter: blur(3px) saturate(1.15) brightness(.9); transform: scale(1.1); }
.t-art .t-shot.is-radar { width: auto; height: auto; max-width: 70%; max-height: 110px; object-fit: contain; opacity: .7; }
.t-icon { position: absolute; left: 14px; top: 14px; z-index: 1; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: rgba(11,16,22,.82); border: 1px solid var(--line); }
.t-icon .gicon { width: 26px; height: 26px; object-fit: contain; }
.t-pill { position: absolute; right: 12px; top: 14px; z-index: 1; }
.t-pill .pill { background: rgba(11,16,22,.82); }
.t-in { position: relative; z-index: 1; padding: 0 16px 14px; margin-top: -26px; }
.t-in h2 { margin: 0; font-size: 18px; }
.t-meta { color: var(--muted); font-size: 13px; display: flex; gap: 12px; flex-wrap: wrap; min-height: 19px; }
.t-meta b { color: var(--text); font-weight: 600; }
.t-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.t-count { font-size: 28px; font-weight: 800; line-height: 1; white-space: nowrap; }
.t-count small { font-size: 15px; color: var(--muted); font-weight: 500; }
.t-bots { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.logo b { font-weight: inherit; }
.t-row .btn.play { white-space: nowrap; flex: 1 0 auto; justify-content: center; }
.t-bar { height: 5px; background: #0e151e; border-radius: 99px; overflow: hidden; margin-top: 10px; }
.t-row.wrapped + .t-bar { display: none; }
.t-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--green)); border-radius: 99px; transition: width .4s; }
.t-addr { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.t-addr code { flex: 1 0 auto; min-width: 0; padding: 7px 9px; border-radius: 8px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.2; }
.t-addr .btn { flex: 1 0 auto; max-width: 100%; justify-content: center; }
.t-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font: 12.5px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.secline { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .9px; color: var(--muted); margin: 34px 0 12px; display: flex; align-items: center; gap: 10px; }
.secline::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#stats .tabs { margin-bottom: 12px; }
#stats .tab { display: inline-flex; align-items: center; gap: 8px; }
.statgrid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 14px; align-items: stretch; }
.panel { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 6px 6px 8px; }
.panel h3 { margin: 10px 10px 6px; font-size: 15px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel h3 span { color: var(--muted); font-weight: 400; font-size: 13px; }
.panel h3 a { font-weight: 400; font-size: 13px; }
/* «Зараз на сервері»: не выше топ-10 рядом, остальное — прокрутка; шапка таблицы прилипает */
.panel.now { display: flex; flex-direction: column; }
.panel.now .tablewrap { flex: 1 1 0; min-height: 260px; overflow-y: auto; contain: size; }
/* шапки таблиц в обоих блоках одинаковые: фон блока + линия снизу (линия тенью — у прилипшей шапки border не прилипает) */
.panel th { background: var(--panel); border-bottom: 0; box-shadow: inset 0 -1px 0 var(--line); }
.panel.now th { position: sticky; top: 0; z-index: 1; }
/* прокрутка в стиле сайта */
.tablewrap { scrollbar-width: thin; scrollbar-color: #2c3e54 transparent; }
.tablewrap::-webkit-scrollbar { width: 8px; height: 8px; }
.tablewrap::-webkit-scrollbar-track { background: transparent; }
.tablewrap::-webkit-scrollbar-thumb { background: #2c3e54; border-radius: 8px; border: 2px solid var(--panel); }
.tablewrap::-webkit-scrollbar-thumb:hover { background: var(--accent); }

@media (max-width: 980px) {
  .servers { grid-template-columns: 1fr; }
  .statgrid { grid-template-columns: 1fr; }
  .panel.now .tablewrap { contain: none; flex: none; min-height: 0; max-height: 420px; }
  .t-art { height: 90px; }
}
@media (max-width: 640px) {
  .home-hero { padding-top: 20px; }
  .home-hero h1 { font-size: 24px; }
  .t-row .btn.play { flex: 1; justify-content: center; }
}
