:root {
  --bg: #0d1117; --panel: #161b22; --line: #30363d; --text: #c9d1d9; --muted: #8b949e;
  --accent: #ffb000; --red: #f85149; --green: #3fb950; --white: #fff;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.5 "Segoe UI", Tahoma, Verdana, Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { color: var(--white); font-size: 26px; margin: 18px 0 12px; }
h2 { color: var(--white); font-size: 17px; margin: 0 0 10px; }
b { color: var(--white); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

.top { background: var(--panel); border-bottom: 2px solid var(--accent); }
.top-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
.brand { color: var(--accent); font-weight: bold; font-size: 18px; letter-spacing: 1px; display: inline-flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand span { color: var(--white); }
nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
nav a { color: var(--text); }
.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; padding: 0; }
button.link:hover { color: var(--accent); }

.btn { display: inline-block; background: var(--accent); color: #0d1117; border: 0; border-radius: 6px; padding: 8px 16px;
       font: bold 14px/1.4 inherit; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn.small { padding: 4px 12px; }
.btn.wide { width: 100%; margin-top: 6px; }

.hero { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 8px; padding: 18px 20px; margin-top: 18px; }
.hero h1 { color: var(--accent); margin-top: 0; }
.hero h1 span { color: var(--white); }
.server { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 10px; }
.server code { background: #21262d; border-radius: 4px; padding: 2px 8px; color: var(--white); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); display: inline-block; }
.dot.on { background: var(--green); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 16px 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; text-align: center; }
.card .num { color: var(--accent); font-size: 30px; font-weight: bold; }

.box { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; max-width: 460px; margin: 20px auto; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.grid2 .box { max-width: none; margin: 0; }

label { display: block; margin-bottom: 12px; color: var(--muted); font-size: 13px; }
input, select { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; background: var(--bg); color: var(--white);
                border: 1px solid var(--line); border-radius: 6px; font: inherit; }
input:focus, select:focus { outline: 2px solid var(--accent); border-color: transparent; }
small { display: block; margin-top: 3px; color: var(--muted); }
.hp { position: absolute; left: -9999px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters input { flex: 1 1 260px; margin: 0; }
.filters select { width: auto; margin: 0; }

.flash { padding: 10px 14px; border-radius: 6px; margin: 12px 0; background: #1f3a24; border: 1px solid var(--green); }
.flash.error { background: #3a1f1f; border-color: var(--red); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { padding: 8px 10px; border-bottom: 1px solid #21262d; text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: normal; font-size: 13px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.mono { font-family: Consolas, monospace; font-size: 13px; }
.nowrap { white-space: nowrap; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: #21262d; color: var(--white); }
.badge.red { background: var(--red); }
.badge.grey { background: #30363d; color: var(--muted); }

.pager { display: flex; gap: 6px; justify-content: center; margin: 14px 0; flex-wrap: wrap; }
.pager a { padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); }
.pager a.cur { background: var(--accent); color: #0d1117; border-color: var(--accent); }

.muted { color: var(--muted); }
.center { text-align: center; }
.empty { color: var(--muted); padding: 30px 0; text-align: center; }


@media (max-width: 560px) {
  h1 { font-size: 21px; }
  nav { gap: 10px; }
}

/* admin */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 18px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 14px; color: var(--text); border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; }
.tabs a.cur { background: var(--panel); border-color: var(--line); color: var(--accent); }
.wide-box { max-width: none; margin: 12px 0; }
details summary { cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 14px; margin-top: 12px; }
.form-grid .span2 { grid-column: 1 / -1; }
.btn.danger { background: var(--red); color: var(--white); }
.row-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.row-form select { width: auto; margin: 0; }
label.check { display: inline-flex; align-items: center; gap: 4px; margin: 0; color: var(--text); }
label.check input { width: auto; margin: 0; }
tr.dim td { opacity: .55; }

/* VIP */
.mt { margin-top: 16px; }
.mt-s { margin-top: 6px; }
h2.section { margin: 26px 0 10px; }
.nav-vip { color: var(--accent) !important; font-weight: bold; }
.badge.green { background: var(--green); color: #0d1117; }
.btn.ghost { background: #21262d; color: var(--text); }
.btn.big { font-size: 17px; padding: 12px 18px; text-align: center; }
.yes { color: var(--green); font-weight: bold; }
.perks td:first-child { width: 60%; }
.perks th.vipcol { color: var(--accent); }
ul, ol { margin: 8px 0; padding-left: 22px; }
li { margin: 3px 0; }
.notice { background: #2a2110; border: 1px solid var(--accent); border-radius: 8px; padding: 16px 18px; }
.notice p { margin: 8px 0; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.plan { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0; padding: 16px 10px;
        background: var(--panel); border: 2px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--text); text-align: center; }
.plan:hover { border-color: #6e7681; }
.plan.plus { border-top: 4px solid var(--accent); }
.plan input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.plan:has(input:checked) { border-color: var(--accent); background: #2a2110; }
.plan input:focus-visible + .plan-name { outline: 2px solid var(--accent); }
.plan-name { color: var(--white); font-weight: bold; font-size: 16px; }
.plan-price { color: var(--accent); font-size: 28px; font-weight: bold; }
.plan-days { color: var(--white); }
label.agree { display: flex; align-items: flex-start; gap: 8px; line-height: 1.4; }
label.agree input { margin-top: 3px; flex: none; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; }
.faq summary { color: var(--white); }
.faq p { margin: 8px 0 2px; }
table.kv th { width: 35%; }
.small-text { font-size: 13px; }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--accent);
           border-radius: 50%; animation: spin 1s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* forum */
.crumbs { margin: 16px 0 0; color: var(--muted); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.forum-list { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.forum-row { display: grid; grid-template-columns: 1fr 110px 220px; gap: 12px; align-items: center; padding: 12px 14px;
             background: var(--panel); border-bottom: 1px solid #21262d; }
.forum-row:last-child { border-bottom: 0; }
.forum-title { color: var(--white); font-weight: bold; font-size: 16px; }
.forum-main .badge { margin-right: 4px; }
.forum-stats, .forum-last { font-size: 13px; }
.mod-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; padding: 8px 12px;
           background: var(--panel); border: 1px dashed var(--line); border-radius: 8px; }
.mod-bar select { width: auto; margin: 0; padding: 4px 8px; }
.post { display: grid; grid-template-columns: 170px 1fr; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
        margin-bottom: 10px; overflow: hidden; }
.post:target { border-color: var(--accent); }
.post-author { padding: 12px; background: #11161d; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px;
               overflow-wrap: anywhere; }
.post-body { padding: 10px 14px; min-width: 0; }
.post-meta { font-size: 13px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; border-bottom: 1px solid #21262d; padding-bottom: 6px; }
.post-meta a { color: var(--muted); }
.post-actions { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.post-actions a { color: var(--accent); }
.post-text { padding-top: 8px; overflow-wrap: anywhere; white-space: normal; }
.danger-text { color: var(--red) !important; }
.badge.vip { background: var(--accent); color: #0d1117; }
textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; background: var(--bg); color: var(--white);
           border: 1px solid var(--line); border-radius: 6px; font: inherit; resize: vertical; }
textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
@media (max-width: 700px) {
  .forum-row { grid-template-columns: 1fr; gap: 4px; }
  .forum-stats br, .forum-last br { display: none; }
  .forum-stats::after { content: ""; }
  .post { grid-template-columns: 1fr; }
  .post-author { flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 12px; }
}

/* unban appeals */
.notice-inline { background: #2a2110; border: 1px solid #6b4f10; border-radius: 6px; padding: 8px 12px; }
.big-badge { font-size: 14px; padding: 4px 12px; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.shots a { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px; color: var(--muted); }
.shots a:hover { border-color: var(--accent); text-decoration: none; }
.shots img { display: block; width: 100%; height: 140px; object-fit: cover; border-radius: 4px; background: #000; }
.sys-msg { margin: 10px 0; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--muted); }
.post.staff-post { border-color: #6b4f10; }
.break { overflow-wrap: anywhere; }
.decide { border-color: #6b4f10; }
.decide .row-form { margin-top: 6px; }
input[type=file] { padding: 6px; }

/* articles */
.article-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-top: 14px; }
.article-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; color: var(--text); }
.article-card:hover { border-color: var(--accent); text-decoration: none; }
.article-card img { width: 100%; height: 170px; object-fit: cover; }
.article-card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px; }
.article-card-body b { font-size: 17px; }
.article { max-width: 820px; line-height: 1.65; }
.article h2 { margin-top: 30px; font-size: 21px; }
.article h3 { color: var(--white); margin-top: 20px; font-size: 17px; }
.article .lead { font-size: 17px; }
.article code, .article kbd { background: #21262d; border-radius: 4px; padding: 1px 6px; color: var(--white); font-family: Consolas, monospace; font-size: 14px; }
.article kbd { border: 1px solid var(--line); border-bottom-width: 2px; }
.article pre { background: #0b0f14; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow-x: auto; }
.article pre code { background: none; padding: 0; }
.article table { margin: 10px 0; border: 1px solid var(--line); border-radius: 8px; }
.article figure { margin: 18px 0; }
.article figure img { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; }
.article figcaption { color: var(--muted); font-size: 13px; margin-top: 6px; }
.article .warn { background: #2a2110; border: 1px solid #6b4f10; border-radius: 6px; padding: 10px 14px; }
.toc { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 16px 0; display: inline-block; }
.toc ol { margin: 6px 0 0; }
.img-missing { border: 1px dashed #6b4f10; color: #c9a44a; padding: 10px; border-radius: 6px; font-size: 13px; }
.kbd-map { width: 100%; max-width: 640px; display: block; margin: 12px 0; }
.kbd-map .k { fill: #21262d; stroke: #ffb000; stroke-width: 2; }
.kbd-map .kl { fill: #ffffff; font: bold 17px "Segoe UI", Arial, sans-serif; text-anchor: middle; }
.kbd-map .kd { fill: #8b949e; font: 11px "Segoe UI", Arial, sans-serif; text-anchor: middle; }
.kbd-map .kn { fill: #8b949e; font: 13px "Segoe UI", Arial, sans-serif; text-anchor: middle; }
code.ip { background: #21262d; border-radius: 4px; padding: 2px 8px; color: var(--white); }
.guide-link { margin: 10px 0 14px; }

/* layout: language menu, home grid, footer */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; font-size: 13px; color: var(--text); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: " \25BE"; color: var(--muted); }
.lang-menu[open] summary { border-color: var(--accent); }
.lang-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: flex; flex-direction: column; min-width: 150px;
             background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.lang-list a { padding: 6px 10px; border-radius: 5px; color: var(--text); }
.lang-list a:hover { background: #21262d; text-decoration: none; }
.lang-list a.cur { color: var(--accent); }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.home-side { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.side-box { margin: 0; max-width: none; padding: 14px 16px; }
.side-box h2 { font-size: 15px; margin-bottom: 8px; }
.side-list { list-style: none; padding: 0; margin: 0; }
.side-list li { padding: 6px 0; border-bottom: 1px solid #21262d; }
.side-list li:last-child { border-bottom: 0; }
.side-list small { display: block; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; margin-bottom: 8px; }
.mini-stats b { display: block; color: var(--accent); font-size: 22px; }
.mini-stats small { margin: 0; font-size: 11px; line-height: 1.2; }
.vip-promo { display: flex; flex-direction: column; gap: 4px; color: var(--text); border-color: #6b4f10;
             background: linear-gradient(135deg, #2a2110, var(--panel)); }
.vip-promo b { color: var(--accent); font-size: 20px; }
.vip-promo:hover { border-color: var(--accent); text-decoration: none; }
@media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; } .home-side { margin-top: 0; } }

.site-footer { margin-top: 50px; background: linear-gradient(180deg, #11161d, #0a0d12); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr 1.3fr; gap: 28px; padding-top: 34px; padding-bottom: 26px; }
.footer-grid h3 { color: var(--white); font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; margin: 4px 0 12px; }
.footer-grid > div > a { display: block; color: var(--muted); padding: 3px 0; }
.footer-grid > div > a:hover { color: var(--accent); text-decoration: none; }
.footer-brand p { color: var(--muted); font-size: 14px; margin: 10px 0 14px; }
.footer-server { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.footer-server code { background: #21262d; border-radius: 6px; padding: 4px 10px; color: var(--white); }
.footer-langs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; }
.footer-langs a { color: var(--muted); font-size: 14px; padding: 2px 0; }
.footer-langs a.cur { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid #1c2128;
                 padding-top: 14px; padding-bottom: 18px; color: #6e7681; font-size: 12px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid > .footer-brand > a.brand { color: var(--accent); display: inline-flex; padding: 0; font-size: 18px; }
.footer-grid > .footer-brand > a.brand:hover { color: var(--accent); }

/* ---- топ и статистика игрового сервера (/top, /stats) ---- */
.sprite { display: none; }
.top-table th, .top-table td { text-align: center; padding: 6px 7px; white-space: nowrap; vertical-align: middle; }
.top-table th.l, .top-table td.l { text-align: left; }
.top-table td.zero { color: #484f58; }
.top-table .xp { color: var(--accent); font-weight: bold; text-align: right; }
.top-table .place-n { color: var(--muted); font-weight: bold; width: 28px; }
.top-table tr.place1 td { background: #1c1a10; }
.top-table tr.place1 .place-n { color: #ffd700; font-size: 16px; }
.top-table tr.place2 .place-n { color: #d9d9d9; font-size: 15px; }
.top-table tr.place3 .place-n { color: #e0995e; font-size: 15px; }
.top-table tbody tr:hover td { background: #1b2230; }
.pname { display: inline-block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; color: var(--white); }
.rank-cell { color: #79b8ff; }
.rank-n { display: inline-block; min-width: 22px; padding: 0 4px; border-radius: 4px; background: #1f2d3d; color: #79b8ff; font-size: 12px; text-align: center; }
.badge-ic { width: 16px; height: 16px; vertical-align: middle; margin-left: 3px; }
.col-ic { width: 16px; height: 16px; vertical-align: middle; }
.badge-legend { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 6px 18px; }
.badge-legend li { color: var(--muted); }
.badge-legend .badge-ic { margin: 0 6px 0 0; }

.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; text-align: center; }
.kpi b { display: block; color: var(--accent); font-size: 28px; line-height: 1.2; }
.kpi small { color: var(--muted); font-size: 13px; }
@media (max-width: 700px) { .kpi-row { grid-template-columns: 1fr 1fr; } }

.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #21262d; stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .axis.dim { fill: #484f58; }
.chart .bar-a, .sw.bar-a { fill: var(--accent); background: var(--accent); }
.chart .bar-b, .sw.bar-b { fill: var(--green); background: var(--green); }
.chart .bar-xp { fill: #79b8ff; }
.chart rect:hover { filter: brightness(1.25); }
.chart-legend { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.chart-legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin: 0 5px -1px 12px; }
.chart-legend .sw:first-child { margin-left: 0; }

.stats-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; }
.stats-grid .box { max-width: none; margin: 0; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: 1fr; } }
table.compact th, table.compact td { padding: 5px 8px; text-align: center; white-space: nowrap; }
table.compact th.l, table.compact td.l { text-align: left; }
.rank-dist tr.zero td { color: #484f58; }
.hbar { width: 90px; height: 8px; margin-right: 8px; vertical-align: middle; }
.hbar rect { fill: var(--accent); }

/* всплывающие подсказки: значки в топе (.tip[data-tip]) и столбцы диаграмм (.col .tipg) */
.tip { position: relative; display: inline-flex; vertical-align: middle; cursor: help; outline: none; }
.tip::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px);
              width: max-content; max-width: 260px; white-space: normal; text-align: left; padding: 6px 10px; border-radius: 8px;
              background: #1f2630; color: #fff; font-size: 12px; font-weight: normal; line-height: 1.35;
              border: 1px solid rgba(255,255,255,.12); box-shadow: 0 8px 24px rgba(0,0,0,.5);
              opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s; z-index: 30; }
.tip::before { content: ""; position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translate(-50%, 4px);
               border: 6px solid transparent; border-top-color: #1f2630; border-bottom: 0;
               opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s; z-index: 31; }
.tip:hover::after, .tip:focus::after, .tip:hover::before, .tip:focus::before { opacity: 1; transform: translate(-50%, 0); }
.chart .hit { fill: transparent; }
.chart .col { outline: none; }
.chart .col:hover .hit, .chart .col:focus .hit { fill: rgba(255,255,255,.05); }
.chart .tipg { opacity: 0; pointer-events: none; transition: opacity .12s; }
.chart .col:hover .tipg, .chart .col:focus .tipg { opacity: 1; }
.chart .tipg rect { fill: #1f2630; stroke: rgba(255,255,255,.14); }
.chart .tipg text { fill: #e6edf3; font-size: 12px; }
.chart .tipg .tip-h { fill: #fff; font-weight: bold; }
/* в шапке таблицы подсказка открывается вниз (сверху её обрезал бы край таблицы) */
thead .tip::after { bottom: auto; top: calc(100% + 8px); transform: translate(-50%, -4px); }
thead .tip::before { bottom: auto; top: calc(100% + 2px); transform: translate(-50%, -4px); border-top-color: transparent; border-bottom: 6px solid #1f2630; border-top: 0; }
thead .tip:hover::after, thead .tip:focus::after, thead .tip:hover::before, thead .tip:focus::before { transform: translate(-50%, 0); }

/* блоки статистики не шире экрана: таблица званий прокручивается внутри блока */
.stats-grid > * { min-width: 0; }
.stats-grid .box { overflow-x: auto; }


/* миниатюра текущей карты справа в главном блоке */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.hero-map { margin: 0; text-align: center; }
.hero-map img, .hero-map .map-ph { display: block; width: 240px; height: 180px; object-fit: cover; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 12px 30px rgba(0,0,0,.45); background: #0b0f14; }
.hero-map .map-ph rect { fill: #11161e; }
.hero-map .map-ph circle, .hero-map .map-ph path { fill: none; stroke: rgba(255,176,0,.55); stroke-width: 2; }
.hero-map figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
@media (max-width: 760px) { .hero-grid { grid-template-columns: 1fr; } .hero-map img, .hero-map .map-ph { width: 100%; height: auto; aspect-ratio: 4 / 3; } }

/* messages, game link, giveaway, site lock (2026-10-16) */
.link-code { font-size: 1.6em; letter-spacing: .12em; margin: .4em 0; }
tr.unread td { font-weight: 600; }
.post.own-post { border-left: 3px solid #3fb950; }
.lock-box { max-width: 420px; margin: 12vh auto; }
.lock-box h1 { display: flex; align-items: center; gap: .5em; }
label.check { display: flex; align-items: center; gap: .5em; }
label.check input { width: auto; }
/* players list (2026-10-16) */
tr.registered td:first-child { font-weight: 600; }
tr.registered { background: rgba(63, 185, 80, .08); }
.players-mini li { display: flex; justify-content: space-between; gap: .5em; }
.players-mini li.registered > span { font-weight: 600; }
/* players in the hero box (2026-10-16) */
.hero-players { margin-top: 1em; max-width: 560px; }
.hero-players p { margin: 0 0 .3em; }
.players-table { width: 100%; border-collapse: collapse; }
.players-table td { padding: .25em .5em; border-bottom: 1px solid rgba(255,255,255,.06); }
.players-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.players-table tr.bot .pl-name { opacity: .6; }
.players-more summary { cursor: pointer; margin-top: .4em; color: #f0b429; font-weight: 600; }
.players-table { table-layout: fixed; }
.players-table td:nth-child(1) { width: 44%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.players-table td:nth-child(2) { width: 30%; }
.players-table td:nth-child(3) { width: 10%; }
.players-table td:nth-child(4) { width: 16%; }
.pl-rank { display: block; font-size: .8em; color: #f0b429; opacity: .85; overflow: hidden; text-overflow: ellipsis; }

label.agree + label.agree { margin-top: 6px; }
.agree-perks .lvl-vip, .agree-perks .lvl-vip_plus { display: none; }
form:has(input[data-level="vip"]:checked) .agree-perks .lvl-vip, form:has(select[name="level"] option[value="vip"]:checked) .agree-perks .lvl-vip,
form:has(input[data-level="vip_plus"]:checked) .agree-perks .lvl-vip_plus, form:has(select[name="level"] option[value="vip_plus"]:checked) .agree-perks .lvl-vip_plus { display: inline; }
form:has(input[name="plan"]:checked) .agree-perks .lvl-any, form:has(select[name="level"]) .agree-perks .lvl-any { display: none; }
.pw-notice { margin: 10px 0 14px; }
.pw-fields { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 8px 0 4px; }
.pw-fields label { display: flex; flex-direction: column; gap: 4px; }
.pw-fields input { width: 220px; max-width: 100%; }
.console-cmd { display: block; padding: 8px 10px; margin: 6px 0; background: rgba(0,0,0,.35); border-radius: 6px; font-family: Consolas, monospace; word-break: break-all; }
/* my account: side menu + content */
.account-layout { display: grid; grid-template-columns: 210px 1fr; gap: 18px; align-items: start; margin-top: 14px; }
.account-menu { display: flex; flex-direction: column; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px; position: sticky; top: 70px; align-items: stretch !important; }
.account-menu a { padding: 9px 12px; border-radius: 6px; color: var(--text); text-align: left; display: block; }
.account-menu a:hover { background: rgba(255,255,255,.04); }
.account-menu a.cur { background: rgba(255,170,0,.12); color: var(--accent); font-weight: 600; }
.account-main { min-width: 0; }
.account-main .box { max-width: none; margin: 0; padding: 24px 26px; }
.account-main .box h2 { margin-top: 0; font-size: 1.25rem; }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.account-grid .span2 { grid-column: 1 / -1; }
.account-main .row-form { flex-wrap: wrap; }
.account-main label input { width: 100%; }
.account-main .pw-fields label { flex: 1 1 200px; }
.account-main .pw-fields input { width: 100%; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
@media (max-width: 760px) {
  .account-layout { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
  .account-menu { flex-direction: row; overflow-x: auto; position: static; white-space: nowrap; }
}
/* site chat (home sidebar) */
.chat-box h2 { display: flex; align-items: center; gap: 8px; }
.chat-box h2::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.chat-list { height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 2px 4px 0; margin-bottom: 10px; font-size: 13.5px; line-height: 1.4; overscroll-behavior: contain; }
.chat-msg { position: relative; padding: 4px 6px; border-radius: 6px; word-wrap: break-word; overflow-wrap: anywhere; }
.chat-msg:hover { background: rgba(255,255,255,.04); }
.chat-time { color: var(--muted, #8b949e); font-size: 11.5px; margin-right: 2px; }
.chat-nick { color: var(--accent); }
.chat-nick.staff-mod { color: #58a6ff; }
.chat-nick.staff-admin { color: #f0883e; }
.chat-nick.staff-owner { color: #f85149; }
.chat-text { color: var(--text); }
.chat-tools { display: none; position: absolute; right: 4px; top: 2px; gap: 4px; margin: 0; }
.chat-msg:hover .chat-tools { display: inline-flex; }
.chat-del, .chat-ban { background: rgba(0,0,0,.6); border: 1px solid var(--line); color: var(--text); border-radius: 4px; font-size: 12px; line-height: 1; padding: 3px 6px; cursor: pointer; text-decoration: none; }
.chat-del:hover { color: var(--red); }
.chat-form { display: flex; gap: 6px; margin: 0; }
.chat-form input { flex: 1; min-width: 0; }
.chat-error { color: var(--red); margin: 6px 0 0; }
/* admins and privileges page */
.priv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.priv-col { margin: 0; }
.priv-col h3 { margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.priv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.priv-list li small { display: block; }
.badge.role-owner { background: #d93636; color: #fff; }
.badge.role-admin { background: #f0883e; color: #111; }
.badge.role-mod { background: #388bfd; color: #fff; }

/* "+3 days" free VIP box */
.vip-extend { border-color: rgba(255,176,0,.45); }
.vip-extend .vx-title { display: block; margin-bottom: 6px; color: var(--accent); }
.vip-extend form { margin: 8px 0; }
.vip-extend .btn.wide { width: 100%; }
.vip-extend .vx-premium { margin: 8px 0 0; color: var(--muted, #8b949e); }
.account-main .vip-extend { max-width: 460px; margin: 12px 0; }
.priv-table td, .priv-table th { padding-top: 8px; padding-bottom: 8px; }
.priv-table td:first-child, .priv-table th:first-child { width: 36px; }
.badge.role-premium { background: linear-gradient(135deg, #ffb000, #ff7a00); color: #111; }
.badge.role-vip { background: #2ea043; color: #fff; }