/* OPLOT panel — monochrome dark, framed layout (HOSTIVA style). */
:root {
    --page: #000;
    --frame: #0a0a0a;
    --card: #0d0d0d;
    --card-hi: #141414;
    --hover: #171717;
    --active: #1c1c1c;
    --line: #1f1f1f;
    --line-hi: #2a2a2a;
    --text: #fafafa;
    --muted: #a3a3a3;
    --faint: #6b6b6b;
    --green: #22c55e;
    --red: #ef4444;
    --amber: #f59e0b;
    --radius: 16px;
    --display: "Unbounded", "Manrope", system-ui, sans-serif;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--text); font-family: "Manrope", system-ui, sans-serif; font-weight: 500; font-size: 14.5px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── Boot / login ───────────────────────────────────────────────────── */
/* Text for crawlers without JS (index.html, src/web/seo.js): visually hidden, replaced when the page mounts. */
.seo-static { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.boot { display: grid; place-items: center; min-height: 100vh; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line-hi); border-top-color: var(--text); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.login-card { width: min(420px, 100%); background: var(--frame); border: 1px solid var(--line); border-radius: 24px; padding: 40px 32px; text-align: center; }
.mark { width: 44px; height: 44px; border-radius: 12px; background: none; color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 15px; flex: none; overflow: hidden; }
.mark img { width: 100%; height: 100%; object-fit: cover; }
.login-card .mark { width: 64px; height: 64px; border-radius: 18px; font-size: 22px; margin: 0 auto 20px; }
.login-card h1 { font-family: var(--display); font-weight: 800; font-size: 26px; margin: 0 0 10px; }
.login-card p { color: var(--muted); line-height: 1.55; margin: 0 0 26px; }
.login-error { margin-top: 16px; color: var(--red); font-size: 13.5px; }

/* ── Buttons & pills ────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-hi); background: transparent; border-radius: 999px; padding: 9px 16px; font-weight: 700; font-size: 13.5px; transition: background 0.15s, border-color 0.15s, transform 0.1s; text-decoration: none; color: var(--text); white-space: nowrap; }
.btn:hover { background: var(--hover); border-color: #333; }
.btn:active { transform: scale(0.98); }
.btn.white { background: #fff; color: #000; border-color: #fff; }
.btn.white:hover { background: #e5e5e5; }
.btn.red { border-color: rgba(239, 68, 68, 0.45); color: #fca5a5; }
.btn.red:hover { background: rgba(239, 68, 68, 0.12); }
.btn.green { border-color: rgba(34, 197, 94, 0.45); color: #86efac; }
.btn.green:hover { background: rgba(34, 197, 94, 0.1); }
.btn.sm { padding: 6px 12px; font-size: 12.5px; }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn-discord { background: #5865f2; border-color: #5865f2; color: #fff; padding: 13px 22px; font-size: 14.5px; }
.btn-discord:hover { background: #4752c4; border-color: #4752c4; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); }
.icon-btn:hover { background: var(--hover); color: var(--text); }
kbd { font-family: "Manrope", sans-serif; font-size: 11px; color: var(--faint); border: 1px solid var(--line-hi); border-radius: 6px; padding: 2px 6px; }

/* ── Frame layout ───────────────────────────────────────────────────── */
body:has(.frame) { padding: 16px; }
.frame { display: grid; grid-template-columns: 250px 1fr; max-width: 1640px; min-height: calc(100vh - 32px); margin: 0 auto; background: var(--frame); border: 1px solid var(--line); border-radius: 24px; overflow: clip; } /* clip, not hidden: keeps the sticky top bar working */
.frame.collapsed { grid-template-columns: 72px 1fr; }

.side { border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; max-height: calc(100vh - 34px); position: sticky; top: 16px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 14px; }
.brand b { display: block; font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: 0.02em; }
.brand small { display: flex; align-items: center; gap: 4px; color: var(--green); font-weight: 700; font-size: 12px; margin-top: 3px; }
.brand small svg.i { width: 13px; height: 13px; }
.guild-switch { display: flex; align-items: center; gap: 10px; margin: 0 4px 12px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.guild-switch img, .guild-switch .gi { width: 26px; height: 26px; border-radius: 8px; flex: none; }
.gi { display: grid; place-items: center; background: var(--active); font-weight: 800; font-size: 12px; }
.guild-switch select { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; font-weight: 700; font-size: 13px; }
.guild-switch select option { background: var(--card); }
.nav-label { margin: 16px 10px 6px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.nav { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 600; font-size: 13.5px; text-align: left; text-decoration: none; }
.nav:hover { background: var(--hover); color: var(--text); }
.nav.active { background: var(--active); color: var(--text); }
.nav .dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.nav .dot.on { background: var(--green); }
.side hr { border: 0; border-top: 1px solid var(--line); margin: 14px 4px; width: calc(100% - 8px); }
.side .spacer { flex: 1; min-height: 10px; }
.frame.collapsed .side .brand > div:last-child, .frame.collapsed .nav-label, .frame.collapsed .nav span.t, .frame.collapsed .nav .dot, .frame.collapsed .guild-switch select { display: none; }
.frame.collapsed .nav { justify-content: center; }
.frame.collapsed .guild-switch { justify-content: center; padding: 7px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(10, 10, 10, 0.85); backdrop-filter: blur(10px); z-index: 10; }
.crumbs { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; min-width: 0; }
.crumbs span { color: var(--muted); }
.crumbs b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-help { flex: none; width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-hi); color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; }
.doc-help:hover { color: var(--text, #fff); border-color: currentColor; }
.doc-btn .doc-ico { margin-right: 6px; }
.top .grow { flex: 1; }
.search-btn { display: flex; align-items: center; gap: 10px; min-width: 210px; padding: 8px 10px 8px 14px; border: 1px solid var(--line-hi); border-radius: 999px; background: transparent; color: var(--muted); font-weight: 600; font-size: 13.5px; }
.search-btn:hover { border-color: #333; color: var(--text); }
.search-btn kbd { margin-left: auto; }
.content { padding: 28px clamp(16px, 3vw, 34px) 120px; }

.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { display: flex; align-items: center; gap: 12px; margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.01em; }
.page-head h1 svg.i { width: 30px; height: 30px; stroke-width: 1.7; }
.page-head p { margin: 8px 0 0; color: var(--muted); font-size: 15px; max-width: 760px; line-height: 1.5; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; }

/* ── Cards ──────────────────────────────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 15px; font-weight: 800; }
.card h3 small { margin-left: auto; color: var(--faint); font-weight: 600; font-size: 12.5px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wide { grid-column: 1 / -1; }
.stack { display: grid; gap: 16px; }

.hero { display: grid; gap: 0; padding: 0; }
.hero-row { display: flex; align-items: center; gap: 14px; padding: 20px 22px; }
.hero-row + .hero-row { border-top: 1px solid var(--line); }
.hero-row > div:not(.circle) { flex: 1 1 200px; min-width: 0; }
.hero-row b { display: block; font-family: var(--display); font-weight: 700; font-size: 15px; }
.hero-row span.sub { display: block; color: var(--muted); margin-top: 4px; font-size: 13.5px; }
.hero-row .btn { margin-left: auto; }
.circle { width: 38px; height: 38px; border-radius: 50%; background: var(--active); display: grid; place-items: center; flex: none; color: var(--text); }
.circle.red { background: rgba(239, 68, 68, 0.14); color: #fca5a5; }
.circle.green { background: rgba(34, 197, 94, 0.14); color: #86efac; }
/* Card headers (publish panels, lockdown…) use the same rounded tile as the other settings cards. */
.hero-row > .circle { border-radius: 11px; border: 1px solid var(--line-hi); }
.hero-row > .circle:not(.red):not(.green) { color: #e5e5e5; }
/* Icon stays at the title line when the text wraps; buttons and switches stay centred. */
.hero-row:not(.publish-row) { align-items: flex-start; }
.hero-row > div:not(.circle), .hero-row > .btn { align-self: center; }

.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.stat .circle { margin-bottom: 16px; }
.stat b { display: block; font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; }
.stat span { display: block; color: var(--muted); margin-top: 10px; font-weight: 600; }
.stat.line b { font-size: 26px; margin-top: 10px; }
.stat.line span { margin-top: 0; }
.g { color: var(--green); } .r { color: var(--red); } .a { color: var(--amber); }
.stats-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.alert { display: flex; align-items: center; gap: 12px; border-radius: var(--radius); padding: 14px 18px; border: 1px solid; font-weight: 600; }
.alert.amber { background: rgba(245, 158, 11, 0.07); border-color: rgba(245, 158, 11, 0.35); }
.alert.red { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.4); }
.alert .btn { margin-left: auto; }

/* Lists */
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-top: 1px solid var(--line); min-width: 0; }
.list-row:first-child { border-top: 0; }
.list-row .t { min-width: 0; flex: 1; }
.list-row .t b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .t p { margin: 3px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.list-row time { color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.ava { width: 34px; height: 34px; border-radius: 50%; background: var(--active); flex: none; object-fit: cover; }
.ava.lg { width: 72px; height: 72px; }
.place { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 12px; background: var(--active); flex: none; }
.place.p1 { background: #fff; color: #000; }
.empty { color: var(--faint); padding: 10px 0; }

/* ── Fields ─────────────────────────────────────────────────────────── */
.field { padding: 14px 0; border-top: 1px solid var(--line); }
.field:first-of-type { border-top: 0; padding-top: 0; }
.field:last-child { padding-bottom: 0; }
.field .label { display: block; font-size: 12.5px; color: var(--muted); font-weight: 700; margin-bottom: 9px; }
.field.changed .label::after { content: " • изменено"; color: var(--amber); }
.field .err { color: #fca5a5; font-size: 12.5px; margin-top: 7px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-weight: 600; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line-hi); transition: background 0.2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #737373; transition: transform 0.2s, background 0.2s; }
.switch input:checked + i { background: #fff; }
.switch input:checked + i::after { transform: translateX(18px); background: #000; }
.switch input:focus-visible + i { outline: 2px solid #fff; outline-offset: 2px; }

.input { width: 100%; background: transparent; border: 1px solid var(--line-hi); border-radius: 999px; padding: 10px 16px; outline: none; font-weight: 600; transition: border-color 0.15s; }
.input:focus { border-color: #555; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
select.input option, select.input optgroup { background: var(--card); }
textarea.input { border-radius: 14px; min-height: 110px; resize: vertical; line-height: 1.55; font-weight: 500; }
textarea.words { min-height: 260px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.suffix { display: flex; align-items: center; gap: 10px; }
.suffix span { color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.hint { color: var(--faint); font-size: 12.5px; margin-top: 7px; }
/* Grey explanation under a card title (feature cards, whitelist, staff report…). */
p.sub { color: var(--muted); font-size: 12.5px; line-height: 1.45; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-hi); border-radius: 999px; padding: 5px 7px 5px 12px; font-size: 12.5px; font-weight: 700; background: transparent; color: var(--text); }
.chip img { width: 18px; height: 18px; border-radius: 50%; }
.chip .sw { width: 9px; height: 9px; border-radius: 50%; }
.chip .x { border: 0; background: transparent; color: var(--faint); font-size: 15px; line-height: 1; padding: 0 3px; }
.chip .x:hover { color: var(--red); }
.chip.pick { padding: 7px 13px; color: var(--muted); }
.chip.pick:hover { border-color: #444; color: var(--text); }
.chip.pick.on { background: #fff; border-color: #fff; color: #000; }
.search-wrap { position: relative; }
.results { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); background: var(--card-hi); border: 1px solid var(--line-hi); border-radius: 14px; max-height: 260px; overflow-y: auto; padding: 4px; }
.results button { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: transparent; padding: 8px 10px; border-radius: 10px; text-align: left; }
.results button:hover { background: var(--hover); }
.results img { width: 24px; height: 24px; border-radius: 50%; }
.rows { display: grid; gap: 8px; margin-bottom: 12px; }
.row-item { display: grid; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.row-item.level { grid-template-columns: 120px 1fr 34px; }
.row-item.shop { grid-template-columns: 1.3fr 0.8fr 0.7fr 1.5fr 34px; }
.row-labels { display: grid; grid-template-columns: 1.3fr 0.8fr 0.7fr 1.5fr 34px; gap: 8px; padding: 0 11px 6px; color: var(--faint); font-size: 12px; font-weight: 700; }

/* ── Members table ──────────────────────────────────────────────────── */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .input { max-width: 320px; }
.toolbar .count { margin-left: auto; color: var(--faint); font-weight: 700; }
.table { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tr { display: grid; grid-template-columns: minmax(200px, 2fr) minmax(160px, 2fr) 80px 100px 70px 110px; gap: 14px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.tr.head { border-top: 0; color: var(--faint); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 14px; padding-bottom: 10px; }
.tr.click { cursor: pointer; }
.tr.click:hover { background: var(--hover); }
.who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.who div { min-width: 0; }
.who b { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { display: block; color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roles-mini { display: flex; gap: 5px; flex-wrap: wrap; min-width: 0; }
.rpill { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-hi); border-radius: 999px; padding: 2px 9px 2px 7px; font-size: 11.5px; font-weight: 700; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rpill .sw { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.num { font-family: var(--display); font-weight: 700; font-size: 13px; }
.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 8px; font-size: 11.5px; font-weight: 800; }
.badge.red { background: rgba(239, 68, 68, 0.14); color: #fca5a5; }
.badge.amber { background: rgba(245, 158, 11, 0.14); color: #fcd34d; }
.badge.pink { background: rgba(244, 114, 182, 0.14); color: #f9a8d4; }
.badge.grey { background: var(--active); color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; color: var(--muted); font-weight: 700; }
.mono { color: var(--faint); font-size: 12.5px; white-space: nowrap; }

/* ── Drawer ─────────────────────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 40; animation: fade 0.15s; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 12px; right: 12px; bottom: 12px; width: min(520px, calc(100% - 24px)); background: var(--frame); border: 1px solid var(--line-hi); border-radius: 20px; z-index: 41; overflow-y: auto; animation: slide 0.2s ease-out; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; gap: 16px; align-items: center; padding: 22px; border-bottom: 1px solid var(--line); position: relative; }
.drawer-head h2 { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.drawer-head p { margin: 5px 0 0; color: var(--faint); font-size: 12.5px; }
.drawer-head .badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.drawer-head .icon-btn { position: absolute; top: 14px; right: 14px; }
.drawer-body { padding: 18px 22px 30px; display: grid; gap: 18px; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.mini-stats div { border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.mini-stats b { display: block; font-family: var(--display); font-weight: 700; font-size: 18px; }
.mini-stats span { color: var(--faint); font-size: 12px; font-weight: 700; }
.act-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.act-form { border: 1px solid var(--line-hi); border-radius: 16px; padding: 14px; display: grid; gap: 10px; }
.act-form .row { display: flex; gap: 8px; }
.section-t { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }

/* ── Palette, save bar, toasts ──────────────────────────────────────── */
.palette { position: fixed; top: 12vh; left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 24px)); background: var(--frame); border: 1px solid var(--line-hi); border-radius: 18px; z-index: 50; overflow: hidden; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 16px 18px; outline: none; font-size: 15px; font-weight: 600; }
.palette .opts { max-height: 50vh; overflow-y: auto; padding: 6px; }
.palette .opts button { display: flex; align-items: center; gap: 11px; width: 100%; border: 0; background: transparent; padding: 10px 12px; border-radius: 10px; text-align: left; color: var(--muted); font-weight: 600; }
.palette .opts button.sel, .palette .opts button:hover { background: var(--active); color: var(--text); }
.palette .opts small { margin-left: auto; color: var(--faint); font-size: 12px; }
.savebar { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 160%); display: flex; align-items: center; gap: 10px; background: #111; border: 1px solid var(--line-hi); border-radius: 999px; padding: 8px 8px 8px 20px; z-index: 30; transition: transform 0.25s; width: min(520px, calc(100% - 24px)); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); }
.savebar.show { transform: translate(-50%, 0); }
.savebar span { flex: 1; font-weight: 700; }
#toasts { position: fixed; top: 18px; right: 18px; display: grid; gap: 8px; z-index: 60; }
.toast { background: #111; border: 1px solid var(--line-hi); border-radius: 14px; padding: 12px 16px; font-weight: 700; max-width: 360px; display: flex; gap: 10px; align-items: center; animation: slide 0.2s; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.toast.err::before { background: var(--red); }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1280px) { .stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1100px) {
    .tr { grid-template-columns: minmax(180px, 2fr) 70px 90px 60px; }
    .tr .c-roles, .tr .c-joined { display: none; }
}
@media (max-width: 900px) {
    body:has(.frame) { padding: 0; }
    .frame, .frame.collapsed { grid-template-columns: minmax(0, 1fr); border-radius: 0; border: 0; min-height: 100vh; }
    .side { position: fixed; z-index: 45; left: 0; top: 0; bottom: 0; width: min(290px, 86vw); max-height: none; background: var(--frame); transform: translateX(-105%); transition: transform 0.25s; }
    .frame.nav-open .side { transform: none; }
    .frame.nav-open .scrim { display: block; }
    .search-btn { min-width: 0; }
    .search-btn .t, .search-btn kbd, .top .btn .t { display: none; }
    .doc-btn .doc-ico { margin-right: 0; }
    .cols-2, .stats-3 { grid-template-columns: minmax(0, 1fr); }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid { grid-template-columns: minmax(0, 1fr); }
    .row-item.shop { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .row-item.shop .desc { grid-column: 1 / -1; }
    .row-labels { display: none; }
    .content { padding-top: 20px; }
}
@media (max-width: 560px) {
    .tr { grid-template-columns: minmax(0, 1fr) 60px 50px; }
    .tr .c-coins { display: none; }
    .mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .savebar { border-radius: 18px; flex-wrap: wrap; padding: 10px; }
    .savebar span { flex-basis: 100%; text-align: center; }
    .savebar .btn { flex: 1; }
    .hero-row { flex-wrap: wrap; }
    .hero-row .btn { margin-left: 52px; }
}
.scrim { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 44; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.list-row.click { cursor: pointer; border-radius: 10px; }
.list-row.click:hover { background: var(--hover); }

/* ── Compact pass (matches the HOSTIVA admin density) ───────────────── */
html, body { font-size: 14px; }
@media (min-width: 901px) {
    .frame { grid-template-columns: 236px 1fr; max-width: 1600px; }
    .search-btn { min-width: 190px; }
}
.side { padding: 16px 10px; gap: 1px; scrollbar-width: none; }
.side::-webkit-scrollbar { width: 0; }
/* Sidebar scrolls with the wheel, without a visible scrollbar. */
.brand { gap: 10px; padding: 2px 8px 12px; }
.brand .mark { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; }
.brand b { font-size: 12px; }
.brand small { font-size: 11.5px; margin-top: 2px; }
.guild-switch { gap: 8px; margin: 0 2px 8px; padding: 5px 8px; border-radius: 10px; }
.guild-switch img, .guild-switch .gi { width: 22px; height: 22px; border-radius: 6px; }
.guild-switch select { font-size: 12.5px; }
.nav { gap: 10px; padding: 7px 10px; font-size: 13px; border-radius: 9px; }
.nav svg.i { width: 16px; height: 16px; }
.nav-label { margin: 12px 10px 4px; font-size: 10px; }
.side hr { margin: 8px 4px; }
.side .spacer { min-height: 4px; }
.top { height: 56px; padding: 0 18px; }
.search-btn { padding: 7px 10px 7px 13px; font-size: 13px; }
.top .btn { padding: 7px 14px; font-size: 13px; }
.content { padding: 24px clamp(16px, 2.6vw, 30px) 110px; }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: clamp(24px, 3vw, 30px); }
.page-head h1 svg.i { width: 26px; height: 26px; }
.page-head p { font-size: 14px; margin-top: 6px; }
.card { padding: 18px; }
.hero-row { padding: 16px 20px; }
.hero-row b { font-size: 14px; }
.hero-row span.sub { font-size: 13px; }
/* Row cards carry their own padding — the card around them must not add more (the global .card padding above wins otherwise). */
.card.hero { padding: 0; }
.circle { width: 34px; height: 34px; }
.circle svg.i { width: 16px; height: 16px; }
.stat { padding: 18px; }
.stat .circle { margin-bottom: 14px; }
.stat b { font-size: 26px; }
.stat span { margin-top: 8px; font-size: 13.5px; }
.stat.line b { font-size: 22px; margin-top: 8px; }
.stats, .stats-3, .cols-2, .grid, .stack { gap: 14px; }
.list-row { padding: 9px 4px; }
.tr { padding: 10px 16px; }
.nav-label.fold { display: flex; align-items: center; justify-content: space-between; width: calc(100% - 20px); border: 0; background: transparent; padding: 0; cursor: pointer; text-align: left; font-family: inherit; }
.nav-label.fold:hover { color: var(--muted); }
.nav-label.fold svg.i { width: 13px; height: 13px; transition: transform 0.2s; }
.nav-label.fold.closed svg.i { transform: rotate(-90deg); }

/* ── Billing, locks, admin ───────────────────────────────────────────── */
.nav .lock { margin-left: auto; color: var(--faint); display: grid; }
.nav .lock svg.i { width: 13px; height: 13px; }
.badge.green { background: rgba(34, 197, 94, 0.14); color: #86efac; }
.block-title { font-family: var(--display); font-size: 16px; font-weight: 700; margin: 10px 0 0; }
.locked-card { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 40px 24px; }
.locked-card h2 { font-family: var(--display); font-size: 22px; margin: 6px 0 0; }
.locked-card p { color: var(--muted); max-width: 520px; line-height: 1.55; margin: 0; }
.locked-offers { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 10px 0; }
.locked-offers > div { border: 1px solid var(--line-hi); border-radius: 14px; padding: 12px 18px; display: grid; gap: 4px; }
.locked-offers b { font-family: var(--display); font-size: 18px; }
.locked-offers small, .price small { font-family: "Manrope", sans-serif; color: var(--faint); font-size: 12px; font-weight: 600; margin-left: 2px; }
.locked-offers span { color: var(--faint); font-size: 12.5px; font-weight: 600; }
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.plan { display: flex; flex-direction: column; gap: 14px; }
.plan.featured { border-color: #3a3a3a; background: linear-gradient(180deg, #141414, var(--card)); }
.plan-head { display: flex; align-items: center; gap: 8px; }
.plan-head b { font-family: var(--display); font-size: 16px; }
.price { font-family: var(--display); font-weight: 800; font-size: 28px; }
.price.sm { font-size: 18px; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: 1; }
.plan li { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.plan li svg.i { width: 15px; height: 15px; color: var(--green); }
.plan li.off { color: var(--faint); }
.plan li.off svg.i { color: var(--faint); }
.plan .btn { width: 100%; }
.module { display: flex; flex-direction: column; gap: 10px; }
.module-head { display: flex; align-items: center; gap: 10px; }
.module-head b { font-weight: 800; }
.module-head .badge { margin-left: auto; }
.module-ico { font-size: 20px; }
.module p { color: var(--muted); margin: 0; line-height: 1.5; flex: 1; }
.module-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.palette.pay .pay-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.palette.pay .opts button { padding: 14px 12px; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.price-item { display: grid; gap: 6px; }
.price-item span { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.price-item .row { display: flex; gap: 6px; }
.table.flat { border: 0; background: transparent; }
.tr.admin { grid-template-columns: minmax(220px, 2fr) 160px minmax(160px, 2fr) 110px; }
@media (max-width: 900px) {
    .plans { grid-template-columns: minmax(0, 1fr); }
    .tr.admin { grid-template-columns: minmax(0, 1fr) auto; }
    .tr.admin > div:nth-child(2), .tr.admin > div:nth-child(3) { display: none; }
}

/* ── First steps (overview) ─────────────────────────────────────────── */
.circle.amber { background: rgba(245, 158, 11, 0.14); color: #fcd34d; }
.setup-row .t b { display: flex; align-items: center; gap: 8px; white-space: normal; }
.setup-row.ok .t b { color: var(--muted); }
.setup-row .btn { flex: none; }
button.link { border: 0; background: none; padding: 0; color: var(--muted); font-weight: 700; font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; }
button.link:hover { color: var(--text); }

/* ── Public landing & server picker ─────────────────────────────────── */
.land { max-width: 1120px; margin: 0 auto; padding: 0 16px 60px; }
.land-top { display: flex; align-items: center; gap: 10px; padding: 18px 0; }
.land-top .brand { padding: 0; }
.land-top .grow { flex: 1; }
.land-top .who { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--muted); }
.land-top .who .ava { width: 28px; height: 28px; }
.land-hero { text-align: center; padding: clamp(48px, 9vw, 110px) 0 clamp(40px, 7vw, 80px); display: grid; justify-items: center; gap: 18px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-hi); border-radius: 999px; padding: 6px 14px; color: var(--muted); font-weight: 700; font-size: 13px; }
.eyebrow svg.i { width: 15px; height: 15px; color: var(--green); }
.land-hero h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(30px, 6vw, 58px); line-height: 1.08; letter-spacing: -0.02em; max-width: 880px; }
.land-hero p { margin: 0; color: var(--muted); font-size: clamp(15px, 1.8vw, 17px); line-height: 1.6; max-width: 640px; }
.land-cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.btn.lg { padding: 13px 24px; font-size: 15px; }
.land-note { color: var(--faint); font-weight: 600; font-size: 13px; }
p.land-note { text-align: center; margin: 14px 0 0; }
.land-sec { padding: 26px 0; display: grid; gap: 16px; }
.land-sec h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(22px, 3vw, 28px); }
.land-sec .grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.muted { color: var(--muted); margin: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step { display: grid; gap: 8px; align-content: start; }
.step-n { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; font-family: var(--display); font-weight: 800; }
.step b { font-family: var(--display); font-size: 15px; margin-top: 6px; }
.step p { margin: 0; color: var(--muted); line-height: 1.55; }
.land-foot { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 20px; color: var(--faint); font-size: 13px; }
.center-spin { margin: 0 auto 18px; }

.srv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.srv { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.srv img, .srv .gi { width: 44px; height: 44px; border-radius: 12px; flex: none; }
.srv .t { flex: 1; min-width: 0; }
.srv .t b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srv .t span { color: var(--muted); font-size: 13px; }
.srv-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.srv-foot .muted { font-size: 13px; }

@media (max-width: 900px) {
    .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
    .land-top .who { display: none; }
    .land-sec .grid, .srv-grid { grid-template-columns: minmax(0, 1fr); }
    .setup-row { flex-wrap: wrap; }
    .setup-row .t { flex: 1 1 calc(100% - 60px); } /* text takes the line, the button drops under it */
    .setup-row .btn { margin-left: 50px; }
}

/* ── List of cards (topics, forms, servers) ─────────────────────────── */
.items { display: grid; gap: 10px; margin-bottom: 12px; }
.item-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 14px; background: var(--card-hi); }
.item-head { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.item-head b { font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-head .grow { flex: 1; }
/* Shop items (Экономика → Магазин): kind switch, codes of auto items. */
.item-card.off { opacity: 0.6; }
.item-card .seg.shop-kind { margin-bottom: 12px; }
.codes-box { display: grid; gap: 8px; }
.codes-box .word-chips { max-height: 160px; }
.shop-orders-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 6px; }
/* Shop item picture: thumbnail + link / upload buttons. */
.shop-pic { display: flex; gap: 12px; align-items: flex-start; }
.shop-pic-thumb { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); background: var(--active); flex: none; }
.shop-pic-ctl { display: grid; gap: 8px; min-width: 0; flex: 1; }
.shop-pic-ctl .btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 12px; }
/* Label on top, control at the bottom: a label that wraps no longer pushes its input out of line. */
.item-field { display: grid; grid-template-rows: 1fr auto; gap: 6px; align-items: end; min-width: 0; }
.item-field.wide { grid-column: 1 / -1; }
.item-field .label { font-size: 12px; color: var(--muted); font-weight: 700; }
.item-field textarea.input { min-height: 90px; }

/* ── Module cards ───────────────────────────────────────────────────── */
.publish-row { gap: 10px; flex-wrap: wrap; }
.publish-row select { flex: 1 1 220px; width: auto; }
.publish-row .btn { margin-left: 0; align-self: stretch; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.card > .btn-row { margin-top: 16px; }
.brand-preview { padding: 0; overflow: hidden; }
.brand-status.err { color: #f87171; }
.brand-status:empty { display: none; }
.btn.loading::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: brand-spin 0.7s linear infinite; }
@keyframes brand-spin { to { transform: rotate(360deg); } }
.brand-banner { height: 120px; background: linear-gradient(135deg, #1c1c1c, #2a2a2a); background-size: cover; background-position: center; }
.brand-body { padding: 0 20px 20px; display: grid; justify-items: start; gap: 6px; }
.brand-ava { width: 88px; height: 88px; border-radius: 50%; border: 6px solid var(--card); margin-top: -44px; object-fit: cover; background: var(--active); }
.brand-body b { font-family: var(--display); font-size: 18px; }
.brand-body p { margin: 4px 0 0; color: var(--muted); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 900px) { .cols-2.wide { grid-template-columns: minmax(0, 1fr); } }

/* "Подключить модули" under the menu: sections of unbought modules are hidden */
.nav.more-modules { color: var(--faint); margin-top: 6px; }
.nav.more-modules:hover { color: var(--text); }
.nav .count { margin-left: auto; font-size: 11.5px; font-weight: 800; color: var(--faint); border: 1px solid var(--line-hi); border-radius: 999px; padding: 1px 7px; }
.frame.collapsed .nav .count { display: none; }

/* ── Our own dropdowns (replace the browser's grey <select> list) ───── */
.fsel { position: relative; min-width: 0; }
.fsel-native { display: none !important; }
.fsel-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; background: transparent; border: 1px solid var(--line-hi); border-radius: 999px; padding: 10px 14px 10px 16px; font-weight: 600; text-align: left; transition: border-color 0.15s, background 0.15s; }
.fsel-btn:hover { border-color: #3a3a3a; background: var(--hover); }
.fsel.open .fsel-btn { border-color: #fff; }
.fsel-btn:disabled { opacity: 0.5; pointer-events: none; }
.fsel-btn svg.i { width: 15px; height: 15px; color: var(--muted); margin-left: auto; transition: transform 0.15s; }
.fsel.open .fsel-btn svg.i { transform: rotate(180deg); }
.fsel-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fsel-text.muted { color: var(--faint); }
.guild-switch .fsel { flex: 1; }
.guild-switch .fsel-btn { border: 0; padding: 0; background: none; font-weight: 700; font-size: 13px; }
.guild-switch .fsel-btn:hover { background: none; }

.fsel-pop { position: fixed; z-index: 100; background: #181818; border: 1px solid #333; border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.65); padding: 6px; display: grid; gap: 6px; animation: pop-in 0.12s ease-out; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } }
.fsel-search { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; outline: none; font-weight: 600; }
.fsel-search:focus { border-color: var(--line-hi); }
.fsel-list { max-height: 280px; overflow-y: auto; display: grid; gap: 1px; scrollbar-width: thin; scrollbar-color: #2a2a2a transparent; }
.fsel-opt { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; border-radius: 9px; padding: 8px 10px; text-align: left; font-weight: 600; font-size: 13.5px; color: var(--text); }
.fsel-opt span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fsel-opt.active { background: #262626; }
.fsel-opt.selected { color: #fff; }
.fsel-opt.muted { color: var(--faint); }
.fsel-opt:disabled { color: var(--faint); opacity: 0.55; cursor: not-allowed; }
.fsel-opt svg.i { width: 15px; height: 15px; color: var(--green); }
.fsel-empty { color: var(--faint); padding: 10px; font-size: 13px; }

/* ── Settings page: one main card ───────────────────────────────────── */
.toggles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.toggles .field { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.toggles .field.changed { border-color: rgba(245, 158, 11, 0.45); }
.toggles + .fields-grid { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.fields-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px 20px; align-items: start; }
.fields-grid .field, .fields-grid .field:first-of-type { border: 0; padding: 0; }
.fields-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .fields-grid.three { grid-template-columns: minmax(0, 1fr); } }
.stack > .card.hero + .card.hero { margin-top: 0; }

/* Sidebar "connect modules" never wraps */
.nav.more-modules .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Thin dark scrollbars everywhere instead of the bright default ones */
* { scrollbar-width: thin; scrollbar-color: #262626 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #262626; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
.publish-row .fsel { flex: 1 1 220px; }

/* ── Owner admin ────────────────────────────────────────────────────── */
.stats.admin-kpi { grid-template-columns: repeat(4, 1fr); }
.input.sm { padding: 7px 14px; font-size: 13px; width: 220px; }
.admin-row { display: grid; grid-template-columns: minmax(220px, 1.6fr) 150px minmax(240px, 1.4fr) auto; gap: 16px; align-items: center; padding: 12px 4px; border-top: 1px solid var(--line); }
.admin-row.head { border-top: 0; padding-top: 0; color: var(--faint); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.admin-rows .admin-row:last-child { padding-bottom: 0; }
.plan-cell { display: grid; justify-items: start; gap: 4px; }
.plan-cell small { color: var(--faint); font-size: 12px; font-weight: 600; }
.mod-icons { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mod-ico { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); font-size: 14px; filter: grayscale(1); opacity: 0.3; }
.mod-ico.on { filter: none; opacity: 1; border-color: var(--line-hi); background: var(--card-hi); }
.mod-icons small { margin-left: 6px; color: var(--muted); font-weight: 700; font-size: 12px; }

.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.nav-label.flat { margin: 14px 0 4px; }
.card h3 + .nav-label.flat { margin-top: 0; }
.price-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.nav-label.flat + .price-row { border-top: 0; }
.price-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--card-hi); border: 1px solid var(--line); display: grid; place-items: center; font-size: 16px; flex: none; }
.price-row .t { flex: 1; min-width: 0; }
.price-row .t b { display: block; font-weight: 700; }
.price-row .t small { color: var(--faint); font-size: 12px; }
.price-input { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line-hi); border-radius: 999px; padding: 6px 14px; width: 118px; transition: border-color 0.15s; }
.price-input:focus-within { border-color: #fff; }
.price-input input { width: 100%; min-width: 0; background: none; border: 0; outline: none; font-weight: 800; font-size: 14px; text-align: right; -moz-appearance: textfield; }
.price-input input::-webkit-inner-spin-button, .price-input input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.price-input span { color: var(--faint); font-weight: 700; }
.price-row.changed .price-input { border-color: rgba(245, 158, 11, 0.6); }

.empty-state { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 28px 10px; }
.empty-state .circle { margin-bottom: 4px; }
.empty-state p { margin: 0; color: var(--muted); max-width: 340px; line-height: 1.5; font-size: 13.5px; }

@media (max-width: 1100px) {
    .admin-cols { grid-template-columns: minmax(0, 1fr); }
    .stats.admin-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .admin-row { grid-template-columns: minmax(0, 1fr) auto; }
    .admin-row > :nth-child(2), .admin-row > :nth-child(3) { display: none; }
    .input.sm { width: 150px; }
}

/* ── Game servers: rows with status-bot controls ────────────────────── */
.game-row { flex-wrap: wrap; }
.game-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.card .hint { margin: 12px 0 0; }
.howto-step { display: flex; gap: 12px; align-items: flex-start; line-height: 1.55; color: var(--muted); }
.howto-step .step-n { width: 26px; height: 26px; font-size: 12px; flex: none; }
.howto-step b { color: var(--text); }
.howto-step a { color: #fff; }
.drawer-body .muted { line-height: 1.55; }
.drawer-body > .btn { justify-self: start; }
.admin-acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* ══ Messages page (rules / info / links builder) ═════════════════════ */
.posts-hint { margin: -4px 0 16px; line-height: 1.55; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.tpl { display: grid; gap: 4px; justify-items: start; align-content: start; text-align: left; border: 1px solid var(--line-hi); background: var(--card-hi); border-radius: 14px; padding: 14px; transition: border-color 0.15s, transform 0.15s; }
.tpl:hover { border-color: #fff; transform: translateY(-2px); }
.tpl-e { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #1a1a1a; font-size: 20px; line-height: 1; margin-bottom: 6px; }
.tpl b { font-size: 14.5px; }
.tpl small { color: var(--muted); font-size: 12.5px; }

.post-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 16px; align-items: start; }
.post-side { position: sticky; top: 76px; display: grid; gap: 8px; }
.post-side > .label { font-size: 12px; color: var(--muted); font-weight: 700; }
.pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.pf-grid .wide { grid-column: 1 / -1; display: grid; gap: 8px; }
.pf { display: grid; gap: 6px; min-width: 0; }
.pf .label, .pf-grid .wide > .label { font-size: 12px; color: var(--muted); font-weight: 700; }
.pf .hint { margin: 0; }
.pf-fields { display: grid; gap: 8px; margin-bottom: 8px; }
.pf-field { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr) auto auto; gap: 8px; align-items: start; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.pf-field textarea.input { min-height: 42px; }
.pf-inline { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; font-weight: 700; padding-top: 10px; white-space: nowrap; }
.pf-button { display: grid; grid-template-columns: 70px minmax(0, 0.8fr) minmax(0, 1.4fr) auto; gap: 8px; align-items: center; }
.color-pick input { width: 34px; height: 26px; border: 1px solid var(--line-hi); border-radius: 8px; background: none; padding: 2px; cursor: pointer; }
/* one clean round swatch instead of a box in a box */
.color-pick.card-color { width: 28px; height: 28px; padding: 0; border: 0; background: none; border-radius: 50%; position: relative; display: block; flex: none; margin-right: 4px; }
.color-pick.card-color input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 1px solid var(--line-hi); border-radius: 50%; background: none; cursor: pointer; -webkit-appearance: none; appearance: none; overflow: hidden; transition: transform 0.15s, border-color 0.15s; }
.color-pick.card-color input::-webkit-color-swatch-wrapper { padding: 0; }
.color-pick.card-color input::-webkit-color-swatch { border: 0; border-radius: 50%; }
.color-pick.card-color input::-moz-color-swatch { border: 0; border-radius: 50%; }
.color-pick.card-color:hover input { transform: scale(1.08); border-color: #fff; }
.post-embed-empty { color: #80848e; font-size: 13px; font-style: italic; padding: 6px 0; }
.pf-fields.empty { display: none; }
.post-actions { position: static; background: none; border: 0; padding: 4px 0 24px; justify-self: start; } /* in flow, not sticky: never covers content */

/* preview */
.dc.post-dc { border-radius: 12px; }
.dc.post-dc .dc-msgs { padding: 12px 0; }
.dc.post-dc .dc-msg { margin-top: 0; }
.post-embed { max-width: 100%; }
.post-image { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: 4px; margin-top: 6px; }
.md-line, .md-li { min-height: 1.3em; }
.md-h1 { font-size: 20px; font-weight: 700; color: #f2f3f5; margin: 4px 0; }
.md-h2 { font-size: 17px; font-weight: 700; color: #f2f3f5; margin: 4px 0; }
.md-h3 { font-size: 15px; font-weight: 700; color: #f2f3f5; margin: 2px 0; }
.md-link { color: #00a8fc; }
.dc-btn .ext { opacity: 0.6; font-size: 12px; margin-left: 2px; }

@media (max-width: 1100px) {
    .post-editor { grid-template-columns: minmax(0, 1fr); }
    .post-side { position: static; order: -1; }
}
@media (max-width: 700px) {
    .pf-grid { grid-template-columns: minmax(0, 1fr); }
    .pf-field { grid-template-columns: minmax(0, 1fr) auto; }
    .pf-field textarea { grid-column: 1 / -1; }
    .pf-button { grid-template-columns: 56px minmax(0, 1fr) auto; }
    .pf-button input:nth-child(3) { grid-column: 1 / -1; }
}

/* messages builder: tidy form */
.post-editor .input { border-radius: 12px; }
.pf-grid { align-items: start; }
.pf { align-content: start; }
.pf-grid .wide { align-content: start; }
.pf-grid .wide > .btn, .card > .btn.sm { justify-self: start; }
.pf-field { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 10px; background: var(--card-hi); }
.pf-field-top { display: flex; align-items: center; gap: 8px; }
.pf-field-top .input { flex: 1; min-width: 0; font-weight: 700; }
.pf-field-top .chip { flex: none; }
.pf-num { width: 26px; height: 26px; border-radius: 8px; background: var(--active); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--muted); flex: none; }
.pf-field textarea.input { min-height: 64px; }
.pf-button { background: var(--card-hi); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }

/* OPLOT logo: the raster mark itself (transparent webp), fills its box without a plate */
.logo { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }

/* Card look (branding) */
.brand-stack { display: grid; gap: 16px; }
.cards-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cards-head h3 { margin: 0 0 4px; }
.cards-head .sub { margin: 0; color: var(--muted); }
.cards-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; }
.cards-tabs button { border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: 12.5px; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.cards-tabs button.on { background: #fff; color: #000; }
.cards-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cards-preview { border-radius: 14px; background: var(--active); min-height: 140px; display: grid; place-items: center; overflow: hidden; }
.cards-img { width: 100%; height: auto; display: block; transition: opacity 0.2s; }
.cards-img.loading { opacity: 0.45; }
.cards-side { display: grid; gap: 10px; align-content: start; }
.cards-side .label { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.swatch { display: grid; justify-items: center; gap: 6px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--muted); font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; }
.swatch i { width: 28px; height: 28px; border-radius: 50%; display: block; }
.swatch.on { border-color: #fff; color: var(--text); }
.btn-row.colors input[type="color"] { width: 42px; height: 34px; padding: 2px; border: 1px solid var(--line-hi); border-radius: 10px; background: transparent; cursor: pointer; }
@media (max-width: 900px) { .cards-grid { grid-template-columns: minmax(0, 1fr); } }

/* Overview charts */
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.chart-card.wide { grid-column: 1 / -1; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.chart-head h3 { margin: 0 0 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .bar { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.trend { font-size: 13px; font-weight: 800; white-space: nowrap; }
.trend small { color: var(--faint); font-weight: 600; }
.trend.up { color: var(--green); } .trend.down { color: var(--red); }
.chart .bars { height: 150px; display: flex; align-items: flex-end; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 1px;
    background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 25%; }
.chart .col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; border-radius: 6px; cursor: default; }
.chart .col:hover { background: rgba(255,255,255,0.04); }
.chart .group-bar { width: 100%; max-width: 38px; height: 100%; display: flex; align-items: flex-end; gap: 3px; }
.chart .stack-bar { width: 100%; max-width: 30px; height: 100%; display: flex; flex-direction: column-reverse; }
.chart .group-bar .bar { flex: 1; }
.chart .bar { display: block; height: 0; border-radius: 5px 5px 2px 2px; transition: height 0.7s cubic-bezier(.2,.8,.2,1); }
.chart .stack-bar .bar { border-radius: 0; }
.chart .stack-bar .bar:last-of-type { border-radius: 5px 5px 0 0; }
.chart .col.today .bar { box-shadow: 0 0 0 1px rgba(255,255,255,0.35) inset; }
.bar.violet { background: linear-gradient(180deg, #d4d4d4, #737373); }
.bar.green { background: linear-gradient(180deg, var(--green), #16a34a); }
.bar.red { background: linear-gradient(180deg, #f87171, #dc2626); }
.bar.amber { background: linear-gradient(180deg, var(--amber), #d97706); }
.chart .bars-x { display: flex; gap: 6px; margin-top: 8px; }
.chart .bars-x span { flex: 1; text-align: center; color: var(--faint); font-size: 11px; font-weight: 700; white-space: nowrap; overflow: visible; }
.chart-empty { height: 172px; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; color: var(--muted); border: 1px dashed var(--line-hi); border-radius: 14px; padding: 0 16px; }
.chart-empty svg.i { width: 26px; height: 26px; color: var(--faint); }
.chart-empty span { font-size: 13px; color: var(--faint); }
@media (max-width: 900px) {
    .charts { grid-template-columns: minmax(0, 1fr); }
    .chart .bars-x span.odd { visibility: hidden; }
    .chart .bars, .chart .bars-x { gap: 3px; }
}
.chart .bars-x span.today { color: var(--text); }

/* Skeleton placeholders */
.skel { display: block; background: linear-gradient(90deg, #141414 0%, #1f1f1f 40%, #141414 80%); background-size: 300% 100%; animation: skel 1.4s ease-in-out infinite; border-radius: 8px; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.skel-list { display: grid; gap: 14px; padding: 4px 0; }
.skel-row { display: flex; align-items: center; gap: 12px; }
.skel.circle { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.skel-lines { display: grid; gap: 7px; flex: 1; }
.skel.line { height: 11px; width: 70%; }
.skel.line.short { width: 45%; height: 9px; }
.skel.line.shorter { width: 30%; }
.skel-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.skel.block { height: 104px; border-radius: 16px; }
@media (max-width: 900px) { .skel-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Phones: bottom menu and bigger tap targets */
.bottom-nav { display: none; }
@media (max-width: 900px) {
    .bottom-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
        background: rgba(8, 8, 8, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line-hi);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
    .bottom-nav button { display: grid; justify-items: center; gap: 3px; border: 0; background: none; color: var(--faint); font: inherit; font-size: 10.5px; font-weight: 700; padding: 6px 0; min-height: 50px; border-radius: 12px; }
    .bottom-nav button svg.i { width: 21px; height: 21px; }
    .bottom-nav button.on { color: var(--text); }
    .bottom-nav button.on svg.i { filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.35)); }
    .content { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
    .btn { min-height: 42px; }
    .btn.sm { min-height: 36px; }
    .icon-btn { width: 42px; height: 42px; }
    .input, select, textarea { font-size: 16px; }
    .input { min-height: 44px; }
    .nav { min-height: 44px; }
    .savebar { bottom: calc(76px + env(safe-area-inset-bottom)); transform: translate(-50%, calc(100% + 120px)); }
    .savebar.show { transform: translate(-50%, 0); }
}

/* ── Owner admin ─────────────────────────────────────────────────────── */
.adm-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.adm-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.adm-tabs button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: 13.5px; padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.adm-tabs button svg.i { width: 16px; height: 16px; }
.adm-tabs button:hover { color: var(--text); }
.adm-tabs button.on { background: #fff; color: #000; }
.adm-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.adm-kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adm-kpi { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; min-width: 0; }
.adm-kpi::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, 0.05), transparent 70%); pointer-events: none; }
.adm-kpi-top { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 700; font-size: 12.5px; }
.adm-kpi-ico { width: 30px; height: 30px; border-radius: 9px; background: var(--active); border: 1px solid var(--line-hi); display: grid; place-items: center; flex: none; color: var(--text); }
.adm-kpi-ico svg.i { width: 15px; height: 15px; }
.adm-kpi b { display: block; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.1; margin-top: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-kpi small { display: block; color: var(--faint); font-weight: 600; font-size: 12px; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-toolbar { display: flex; gap: 10px; margin-bottom: 12px; }
.adm-toolbar .input { flex: 1; }
.adm-toolbar select.input { flex: 0 0 190px; }
.admin-row .count { text-align: right; text-transform: none; letter-spacing: 0; font-size: 12px; }
.days-bar { width: 120px; height: 5px; border-radius: 3px; background: var(--line-hi); overflow: hidden; }
.days-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #22c55e, var(--green)); }
.days-bar.low i { background: linear-gradient(90deg, #ef4444, #f97316); }
.icon-btn.star { width: 34px; height: 34px; color: var(--faint); }
.icon-btn.star.on { color: var(--amber); border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.08); }
.icon-btn.star svg.i { width: 16px; height: 16px; }
.admin-acts { display: flex; align-items: center; gap: 8px; }
.sys-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.sys-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sys-head h3 { margin: 0; flex: 1; }
.sys-head small { color: var(--muted); font-weight: 700; font-size: 12px; }
.sys-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.sys-dot.ok { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15); }
.sys-dot.bad { background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15); }
.sys-dot.idle { background: var(--faint); }
.sys-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.sys-line span { color: var(--muted); font-weight: 600; }
.sys-line b { text-align: right; overflow-wrap: anywhere; }
.meter { height: 6px; border-radius: 3px; background: var(--line-hi); overflow: hidden; margin: 0 0 6px; }
.meter i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #737373, #e5e5e5); transition: width 0.6s; }
.meter.mid i { background: linear-gradient(90deg, #f59e0b, var(--amber)); }
.meter.high i { background: linear-gradient(90deg, #ef4444, #f87171); }
.sys-list { display: grid; gap: 6px; margin-top: 10px; }
.sys-list div { display: flex; align-items: center; gap: 8px; font-size: 12.5px; min-width: 0; }
.sys-list svg.i { width: 14px; height: 14px; color: #d4d4d4; flex: none; }
.sys-list span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sys-err { margin: 10px 0 0; color: #fca5a5; font-size: 12.5px; overflow-wrap: anywhere; }
@media (max-width: 1200px) { .adm-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
    .adm-kpis, .adm-kpis.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .adm-tabs { width: 100%; justify-content: space-between; }
    .adm-tabs button { padding: 8px 10px; }
    .adm-tabs button span { display: none; }
    .adm-toolbar { flex-direction: column; }
    .adm-toolbar select.input { flex: none; }
    .days-bar { width: 90px; }
}
.admin-row .mod-ico { width: 24px; height: 24px; font-size: 12px; border-radius: 7px; }
.admin-row .mod-icons { gap: 3px; flex-wrap: nowrap; }
/* System tab: an even 3 × 2 grid, cards of equal height. */
.sys-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; align-items: stretch; }
.sys-card { display: flex; flex-direction: column; }
.sys-list div { display: grid; grid-template-columns: 14px minmax(0, 40%) minmax(0, 1fr); }
.sys-list b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1200px) { .sys-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .sys-grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; } }

/* Settings groups: sections as tabs */
.sec-tabs { display: flex; flex-wrap: wrap; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px; margin: 4px 0 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.sec-tabs::-webkit-scrollbar { display: none; }
.sec-tab { display: inline-flex; align-items: center; gap: 8px; flex: none; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: 13.5px; padding: 9px 14px; border-radius: 12px; cursor: pointer; white-space: nowrap; transition: background 0.15s, color 0.15s; }
.sec-tab svg.i { width: 16px; height: 16px; }
.sec-tab:hover { color: var(--text); background: var(--hover); }
.sec-tab.on { background: #fff; color: #000; }
.sec-tab .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-hi); flex: none; }
.sec-tab .dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15); }
.sec-tab.on .dot:not(.on) { background: #c4c4c4; }
.sec-tab .lock { display: grid; color: var(--faint); }
.sec-tab .lock svg.i { width: 12px; height: 12px; }
.sec-about { margin: 0 2px 16px; color: var(--muted); line-height: 1.55; max-width: 900px; }
@media (max-width: 900px) {
    /* Phones: one scrolling row (ten tabs would take four lines). */
    .sec-tabs { margin-left: -2px; margin-right: -2px; flex-wrap: nowrap; }
    .sec-tab { padding: 9px 12px; }
}

/* ── Hand-made section layouts (sections.js) ─────────────────────────── */
.sec-hero { display: flex; align-items: center; gap: 16px; background: radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, 0.05), transparent 55%), var(--card); }
.sec-hero-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14); color: #e5e5e5; }
.sec-hero-ico svg.i { width: 22px; height: 22px; }
.sec-hero-t { flex: 1; min-width: 0; }
.sec-hero-t b { display: block; font-family: var(--display); font-size: 17px; margin-bottom: 4px; }
.sec-hero-t p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 13.5px; max-width: 760px; }
.hero-switch { display: flex; align-items: center; gap: 10px; flex: none; color: var(--muted); font-weight: 700; font-size: 13px; }
.alert-box { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.08); color: #fecaca; font-size: 13.5px; }
.alert-box svg.i { color: #f87171; flex: none; margin-top: 1px; }

.rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
/* An odd block left alone in the last row takes the whole width (no empty half). */
.rule-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.rule-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; transition: border-color 0.15s, opacity 0.15s; min-width: 0; }
.rule-card:not(.off):hover { border-color: var(--line-hi); }
.rule-card.off { opacity: 0.62; }
.rule-card.off .rule-ico { filter: grayscale(1); }
.rule-card.changed, .card.changed { border-color: rgba(245, 158, 11, 0.55); }
.rule-top { display: flex; align-items: flex-start; gap: 12px; }
.rule-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--active); border: 1px solid var(--line-hi); color: #e5e5e5; }
.rule-ico svg.i { width: 18px; height: 18px; }
.rule-t { flex: 1; min-width: 0; align-self: center; }
.rule-t b { display: block; font-weight: 800; font-size: 14.5px; }
.rule-t p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.rule-top .switch { margin-top: 7px; }
/* A settings sentence: "Больше [5] сообщений за [6] сек" — numbers sit in the text line. */
.rule-extra { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-height: 46px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-hi); color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.4; }
.rule-extra.col { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; }
.rule-extra.col > .field + .field, .rule-extra.col > .field + .sentence, .rule-extra.col > .sentence + .field { border-top: 1px solid var(--line-hi); padding-top: 12px; }
.rule-extra .label { font-size: 12px; color: var(--faint); font-weight: 700; }
.inline-num { height: 30px; min-width: 44px; padding: 0 6px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.09); background: rgba(255, 255, 255, 0.07); color: var(--text); font: inherit; font-weight: 800; font-size: 13.5px; line-height: 28px; text-align: center; vertical-align: middle; -moz-appearance: textfield; transition: border-color 0.15s, background 0.15s; }
.inline-num::-webkit-inner-spin-button, .inline-num::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.inline-num:hover { border-color: rgba(255, 255, 255, 0.2); }
.inline-num:focus { outline: none; border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.05); }
.inline-num.changed { border-color: rgba(245, 158, 11, 0.7); }
/* Footer of a filter card: "Наказание  [Удалить + варн | Только удалить]   Список →" */
.rule-bottom { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--faint); }
.rule-bottom > span { white-space: nowrap; }
.seg { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; padding: 3px; border-radius: 999px; border: 1px solid var(--line-hi); background: var(--active); vertical-align: middle; }
.seg button { display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; line-height: 16px; padding: 6px 13px; border-radius: 999px; white-space: nowrap; cursor: pointer; transition: background 0.15s, color 0.15s; }
.seg button:not(.on):hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.seg button.on { background: #fff; color: #000; }
@media (max-width: 520px) {
    /* Phones: "Наказание" on its own line, the two choices share the full width. */
    .rule-card { padding: 16px; }
    .rule-bottom .seg { flex: 1 1 100%; }
    .rule-bottom .seg button { flex: 1 1 0; padding-left: 8px; padding-right: 8px; }
}
.rule-link { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: #e5e5e5; font: inherit; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.rule-link svg.i { width: 14px; height: 14px; transform: rotate(-90deg); }
.card.dim { opacity: 0.55; }

/* Word lists */
.words-add { display: flex; gap: 8px; margin-bottom: 12px; }
.words-add .input:first-child { flex: 1; }
.words-add .input.sm { width: 180px; flex: none; }
.word-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 340px; overflow-y: auto; padding: 2px; }
.word-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 6px 5px 11px; border-radius: 999px; background: var(--active); border: 1px solid var(--line-hi); font-size: 13px; font-weight: 700; }
.word-chip button { border: 0; background: none; color: var(--faint); font-size: 15px; line-height: 1; padding: 0 4px; cursor: pointer; border-radius: 50%; }
.word-chip button:hover { color: var(--red); }
.words-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--faint); font-size: 12.5px; font-weight: 700; }
.words-foot .grow { flex: 1; }
.words-ed textarea.words { margin-top: 12px; min-height: 220px; }
.words-ed .hidden { display: none; }
.muted { color: var(--faint); }

/* AI: modes and categories */
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice { display: grid; justify-items: start; gap: 6px; text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--line-hi); background: transparent; color: var(--text); font: inherit; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.choice p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.choice.on { border-color: #fff; background: rgba(255, 255, 255, 0.05); box-shadow: 0 0 0 1px #fff inset; }
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cat { position: relative; display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 12px; border-radius: 14px; border: 1px solid var(--line-hi); background: transparent; color: var(--text); font: inherit; cursor: pointer; opacity: 0.55; transition: opacity 0.15s, border-color 0.15s; }
.cat.on { opacity: 1; border-color: rgba(34, 197, 94, 0.5); background: rgba(34, 197, 94, 0.05); }
.cat-emoji { font-size: 20px; line-height: 1.1; }
.cat b { display: block; font-size: 13.5px; }
.cat p { margin: 2px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.cat-check { position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--line-hi); color: transparent; }
.cat-check svg.i { width: 11px; height: 11px; }
.cat.on .cat-check { background: var(--green); color: #000; }

/* Escalation ladder */
.ladder { display: flex; align-items: stretch; gap: 10px; }
.ladder-step { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 16px 10px 14px; border-radius: 16px; border: 1px solid var(--line-hi); background: var(--active); }
/* Same height for the text and the input rows; the note sits at the bottom. */
.ladder-at, .ladder-detail { min-height: 34px; }
.ladder-detail { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.ladder-step small { margin-top: auto; padding-top: 4px; }
.ladder-step.clash { border-color: rgba(245, 158, 11, 0.5); }
.ladder-step.clash small { color: var(--amber); }
.ladder-step b { font-family: var(--display); font-size: 15px; }
.ladder-step small { color: var(--faint); font-size: 11.5px; font-weight: 600; }
.ladder-at { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.ladder-ico { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; }
.ladder-ico svg.i { width: 19px; height: 19px; }
.ladder-step.warn .ladder-ico { background: rgba(250, 204, 21, 0.15); color: #facc15; }
.ladder-step.mute .ladder-ico { background: rgba(251, 146, 60, 0.15); color: #fb923c; }
.ladder-step.kick .ladder-ico { background: rgba(248, 113, 113, 0.15); color: #f87171; }
.ladder-step.ban .ladder-ico { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.ladder-step.off { opacity: 0.45; }
.ladder-arrow { align-self: center; color: var(--faint); font-size: 18px; font-weight: 800; }
.nick-demo { font-size: 13px; color: var(--muted); }
.nick-demo s { color: #f87171; }
.nick-demo b { color: var(--green); }

@media (max-width: 1100px) { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
    .rule-grid, .choice-grid { grid-template-columns: minmax(0, 1fr); }
    .sec-hero { flex-wrap: wrap; }
    .ladder { flex-direction: column; }
    .ladder-arrow { transform: rotate(90deg); }
    .words-add { flex-wrap: wrap; }
    .words-add .input.sm { width: 100%; }
}

/* Feature cards for Защита / Сообщество / Инструменты */
.feat-card { display: grid; gap: 16px; align-content: start; }
.feat-head { display: flex; align-items: flex-start; gap: 12px; }
.feat-head > div { flex: 1; min-width: 0; align-self: center; }
.feat-head h3 { margin: 0; font-size: 14.5px; }
.feat-head .sub { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.feat-card .field { margin: 0; }
/* The header already separates the block: no extra rule line above its field. */
.feat-card > .field, .feat-card > .field:first-of-type { border-top: 0; padding: 0; }
.rule-grid.dim, .feat-card.dim { opacity: 0.55; }
.sentence { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-height: 30px; }
.sentences { display: grid; gap: 10px; }
.sentences > div { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; min-height: 30px; }
.rule-extra.col .field { margin: 0; }
.rule-extra.col .label { color: var(--faint); }
.mini-toggles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mini-toggles .toggle-row { padding: 10px 12px; }
@media (max-width: 900px) { .mini-toggles { grid-template-columns: minmax(0, 1fr); } }
/* One field in a card: the card title already names it. */
.feat-card .fields-grid .field:only-child > .label { display: none; }
.feat-card .fields-grid:has(> .field:only-child) { grid-template-columns: minmax(0, 420px); }
.sec-tabs { position: relative; }
.words-foot { flex-wrap: wrap; }
.mini-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-hi); background: #0b0b0b; color: var(--text); font-weight: 700; font-size: 13px; }
.mini-toggle .switch { flex: none; }

/* Page / tab transitions */
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }
.content.enter .page-head, .content.enter .sec-tabs { animation: page-in 0.3s ease-out both; }
.content.enter .stack > *, .content.enter > .stack > .rule-grid > * { animation: page-in 0.38s cubic-bezier(.2, .8, .2, 1) both; }
.content.enter .stack > *:nth-child(2) { animation-delay: 0.04s; }
.content.enter .stack > *:nth-child(3) { animation-delay: 0.08s; }
.content.enter .stack > *:nth-child(4) { animation-delay: 0.12s; }
.content.enter .stack > *:nth-child(5) { animation-delay: 0.16s; }
.content.enter .stack > *:nth-child(n + 6) { animation-delay: 0.2s; }
.content.enter .rule-grid > *:nth-child(even) { animation-delay: 0.06s; }
@media (prefers-reduced-motion: reduce) { .content.enter * { animation: none !important; } }

/* Save bar: success state */
.savebar { transition: transform 0.25s, background 0.25s, border-color 0.25s; }
.savebar.done { background: #0c1f14; border-color: rgba(34, 197, 94, 0.55); }
.savebar.done span { color: #86efac; }
.savebar.done #save-btn { background: #22c55e; border-color: #22c55e; color: #000; min-width: 48px; animation: save-pop 0.35s ease-out; }
@keyframes save-pop { 40% { transform: scale(1.15); } }
.savebar.done .btn:not(#save-btn) { visibility: hidden; }

/* Switches: smooth */
.switch i, .switch i::after { transition: background 0.2s, transform 0.22s cubic-bezier(.3, 1.4, .5, 1); }
.rule-card, .cat, .choice, .sec-tab { transition: background 0.18s, color 0.18s, border-color 0.18s, opacity 0.18s, transform 0.12s; }
.cat:active, .choice:active, .sec-tab:active { transform: scale(0.97); }
.lang-btn { font-weight: 800; font-size: 12px; letter-spacing: 0.04em; line-height: 32px; }
.search-btn, .badge, .toolbar .count { white-space: nowrap; }
.ar-result { margin-top: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-hi); background: var(--bg-2, #0f0f0f); font-size: 13.5px; }
.ar-result.hit { border-color: rgba(34, 197, 94, 0.5); }
.ar-result small { color: var(--faint); }
.ar-reply { margin-top: 6px; white-space: pre-wrap; color: var(--muted); }
.icon-btn.lang-btn:hover { color: var(--text, #fff); }
/* A wide block with its own heading: the field label under it would repeat it. */
.feat-card > .feat-head + .field > .label { display: none; }
@media (max-width: 700px) {
    /* Phones: only the section name in the top bar, so it never runs under the buttons. */
    .crumbs { min-width: 0; overflow: hidden; }
    .crumbs > span { display: none; }
    .crumbs b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ── Member card (drawer) ─────────────────────────────────────────────── */
.drawer-head { align-items: flex-start; padding-right: 56px; }
.dr-who { min-width: 0; padding-top: 4px; }
.drawer-body { gap: 16px; }
.dr-block { display: grid; gap: 10px; }
.dr-block .section-t { margin: 0; }
.dr-block .chips { margin: 0; }

/* Level: number, XP, place, progress bar. */
.dr-level { border: 1px solid var(--line-hi); border-radius: 16px; padding: 16px; background: radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, 0.05), transparent 55%), var(--card); display: grid; gap: 10px; }
.dr-level-top { display: flex; align-items: center; gap: 14px; }
.dr-lvl { display: flex; align-items: baseline; gap: 8px; }
.dr-lvl span { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.dr-lvl b { font-family: var(--display); font-size: 28px; line-height: 1; }
.dr-xp { margin-left: auto; color: var(--faint); font-weight: 700; font-size: 13px; white-space: nowrap; }
.dr-xp b { color: var(--text); }
.dr-rank { line-height: 1; align-self: center; font-family: var(--display); font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-hi); background: var(--card-hi); }
.dr-rank.gold { color: var(--amber); border-color: rgba(251, 191, 36, 0.4); }
.dr-bar { height: 10px; border-radius: 999px; background: #1f1f1f; overflow: hidden; }
.dr-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #737373, #e5e5e5); transition: width 0.6s ease-out; }
.dr-level-foot { display: flex; justify-content: space-between; gap: 10px; color: var(--faint); font-size: 12px; font-weight: 700; }

/* Four numbers in one even row (two on phones). */
.dr-stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.dr-stats > div { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px; background: var(--card); min-width: 0; }
.dr-stats svg.i { display: none; }
.dr-stats b { font-family: var(--display); font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-stats span { color: var(--faint); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.dr-stats > div.warn { border-color: rgba(245, 158, 11, 0.45); }
.dr-stats > div.warn b, .dr-stats > div.warn svg.i { color: var(--amber); }

/* Action tiles: same size, three per row. */
.act-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.act-btn { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-hi); background: var(--card); color: var(--text); font-weight: 700; font-size: 13px; cursor: pointer; min-width: 0; transition: background 0.15s, border-color 0.15s; }
.act-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-btn svg.i { width: 15px; height: 15px; flex: none; color: var(--muted); }
.act-btn:hover:not(:disabled) { background: var(--hover); border-color: #3a3a3a; }
.act-btn.danger { color: #fca5a5; border-color: rgba(239, 68, 68, 0.35); }
.act-btn.danger svg.i { color: #f87171; }
.act-btn.danger:hover:not(:disabled) { background: rgba(239, 68, 68, 0.08); }
.act-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* History / warnings / notes tabs. */
.dr-tabs { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.dr-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 8px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; }
.dr-tabs button em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--faint); border: 1px solid var(--line-hi); border-radius: 999px; padding: 0 6px; }
.dr-tabs button.on { background: #fff; color: #000; }
.dr-tabs button.on em { color: #000; border-color: rgba(0, 0, 0, 0.2); }
.dr-list .list-row:first-child { border-top: 0; }
.dr-list .list-row .t b { font-weight: 700; font-size: 13.5px; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 520px) {
    .dr-stats { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .act-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.act-tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ── Subscription page ────────────────────────────────────────────────── */
.bill-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: radial-gradient(120% 160% at 0% 0%, rgba(255, 255, 255, 0.05), transparent 55%), var(--card); }
.bill-hero-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; background: var(--card-hi); border: 1px solid var(--line-hi); color: var(--muted); }
.bill-hero-ico svg.i { width: 22px; height: 22px; }
.bill-hero-ico.on { color: #e5e5e5; border-color: rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05); }
.bill-hero-ico.gold { color: var(--amber); border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.1); }
.bill-hero-t { display: grid; gap: 2px; min-width: 0; }
.bill-hero-t span { color: var(--faint); font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.bill-hero-t b { font-family: var(--display); font-size: 20px; }
.bill-hero-t p { margin: 0; color: var(--muted); font-size: 13px; }
.bill-hero-mods { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 60%; }
.bill-period { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bill-period .seg button { font-size: 13px; padding: 7px 16px; }

.bplans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.bplan { display: flex; flex-direction: column; gap: 12px; position: relative; }
.bplan.featured { border-color: rgba(255, 255, 255, 0.14); background: radial-gradient(130% 90% at 100% 0%, rgba(255, 255, 255, 0.05), transparent 60%), radial-gradient(130% 90% at 0% 0%, rgba(255, 255, 255, 0.05), transparent 60%), var(--card); }
.bplan.current { border-color: rgba(34, 197, 94, 0.45); }
.bplan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bplan-head b { font-family: var(--display); font-size: 17px; }
.bplan-price { display: flex; align-items: baseline; gap: 8px; min-height: 40px; }
.bplan-price b { font-family: var(--display); font-weight: 800; font-size: 30px; }
.bplan-price small { color: var(--faint); font-weight: 700; font-size: 13px; }
.bplan-save { min-height: 18px; color: #86efac; font-size: 12.5px; font-weight: 700; }
.bplan-list { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 7px; flex: 1; align-content: start; }
.bplan-list li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.bplan-list li svg.i { width: 15px; height: 15px; flex: none; color: var(--green); }
.bplan-list li.off { color: var(--faint); }
.bplan-list li.off svg.i { color: #3f3f3f; }
.bplan-list em { font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--faint); border: 1px solid var(--line-hi); border-radius: 999px; padding: 0 6px; }
.bplan > .btn { width: 100%; justify-content: center; }

.bmods { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.bmod { display: flex; flex-direction: column; gap: 10px; }
.bmod.owned { border-color: rgba(34, 197, 94, 0.35); }
.bmod-head { display: flex; align-items: center; gap: 10px; }
.bmod-head b { font-weight: 800; min-width: 0; }
.bmod-head .badge { margin-left: auto; flex: none; }
.bmod-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: var(--card-hi); border: 1px solid var(--line-hi); flex: none; }
.bmod p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; flex: 1; }
.bmod-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; padding-top: 10px; border-top: 1px solid var(--line); }
.bmod-price { display: flex; align-items: baseline; gap: 4px; font-family: var(--display); font-weight: 800; font-size: 18px; }
.bmod-price small { font-family: "Manrope", sans-serif; color: var(--faint); font-weight: 700; font-size: 12px; }
@media (max-width: 1100px) { .bplans { grid-template-columns: minmax(0, 1fr); } .bill-hero-mods { max-width: 100%; margin-left: 0; justify-content: flex-start; } }

/* Admin prices: month + forever, "free" switch. */
.price-pair { display: flex; gap: 8px; margin-left: auto; }
.price-pair > div { display: grid; gap: 3px; }
.price-pair small { color: var(--faint); font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding-left: 12px; }
.price-pair .price-input { width: 108px; }
.price-free { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; }
.price-row.free .price-input { opacity: 0.4; }
.price-row .t { min-width: 0; }
.check-line { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
@media (max-width: 700px) { .price-row { flex-wrap: wrap; } .price-pair { margin-left: 0; } }

/* ── Verification: settings + live Discord preview ────────────────────── */
.vf-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 16px; align-items: start; }
.vf-side { position: sticky; top: 16px; display: grid; gap: 8px; }
.vf-side .label { font-size: 12px; font-weight: 700; color: var(--muted); }
.vf-preview .dc-msgs { display: grid; gap: 4px; }
.vf-after { text-align: center; color: var(--faint); font-size: 11.5px; font-weight: 700; margin: 6px 0; }
.vf-eph { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: #949ba4; font-size: 12px; }
.vf-eph svg.i { width: 14px; height: 14px; }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-pick { width: 44px; height: 42px; padding: 3px; border: 1px solid var(--line-hi); border-radius: 12px; background: var(--card); cursor: pointer; flex: none; }
.color-row .input { flex: 1; min-width: 0; }
@media (max-width: 1100px) { .vf-grid { grid-template-columns: minmax(0, 1fr); } .vf-side { position: static; } }

/* ── Subscription page v2 ─────────────────────────────────────────────── */
.bs-status { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.bs-status .t { display: grid; gap: 2px; min-width: 0; }
.bs-status .t b { font-family: var(--display); font-size: 16px; }
.bs-status .t span { color: var(--muted); font-size: 13px; }
.bs-dot { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--card-hi); border: 1px solid var(--line-hi); color: var(--muted); }
.bs-dot svg.i { width: 18px; height: 18px; }
.bs-dot.on { color: #e5e5e5; background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.14); }
.bs-dot.gold { color: var(--amber); background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.4); }
.bs-mods { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.bs-mod { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--card-hi); border: 1px solid var(--line); font-size: 14px; }
.bs-more { color: var(--faint); font-weight: 800; font-size: 12px; padding-left: 4px; }
.bs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.bs-head .block-title { margin: 0; }
.bs-seg button { font-size: 13px; padding: 7px 16px; }

.bs-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bs-plan { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.bs-plan.premium { border-color: rgba(255, 255, 255, 0.14); background: radial-gradient(120% 70% at 100% 0%, rgba(255, 255, 255, 0.05), transparent 60%), radial-gradient(120% 70% at 0% 0%, rgba(255, 255, 255, 0.05), transparent 60%), var(--card); }
.bs-plan.current { border-color: rgba(34, 197, 94, 0.45); }
.bs-plan-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.bs-plan-top > div { display: grid; gap: 2px; }
.bs-plan-top b { font-family: var(--display); font-size: 18px; }
.bs-plan-top span { color: var(--faint); font-size: 12.5px; font-weight: 600; }
.bs-price { display: flex; align-items: baseline; gap: 8px; }
.bs-price b { font-family: var(--display); font-weight: 800; font-size: 34px; letter-spacing: -0.01em; }
.bs-price small { color: var(--faint); font-weight: 700; }
.bs-save { min-height: 18px; margin-top: -8px; color: #86efac; font-size: 12.5px; font-weight: 700; }
.bs-plan > .btn { width: 100%; justify-content: center; height: 42px; }
.bs-inc { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.bs-inc > span { color: var(--faint); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.bs-inc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.bs-inc li { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.bs-inc li svg.i { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--green); }

.bs-mods-list { padding: 4px 18px; }
.bs-mod-card { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.bs-mod-card:first-child { border-top: 0; }
.bs-mod-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: var(--card-hi); border: 1px solid var(--line-hi); flex: none; }
.bs-mod-t { flex: 1; min-width: 0; display: grid; gap: 3px; }
.bs-mod-name { display: flex; align-items: center; gap: 8px; }
.bs-mod-name b { font-weight: 800; }
.bs-mod-t p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.bs-mod-buy { display: flex; align-items: center; gap: 12px; flex: none; }
.bs-mod-price { display: flex; align-items: baseline; gap: 3px; min-width: 82px; justify-content: flex-end; }
.bs-mod-price b { font-family: var(--display); font-weight: 800; font-size: 16px; }
.bs-mod-price small { color: var(--faint); font-weight: 700; font-size: 12px; }
.bs-mod-buy .btn { min-width: 96px; justify-content: center; }
@media (max-width: 1100px) { .bs-plans { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
    .bs-mods { display: none; }
    .bs-mod-card { flex-wrap: wrap; }
    .bs-mod-buy { width: 100%; justify-content: space-between; padding-left: 54px; }
}

/* Purchase request window and admin list. */
/* A small centred window (not the search palette: its input style is different). */
.modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 24px)); max-height: calc(100vh - 24px); overflow-y: auto; background: var(--frame); border: 1px solid var(--line-hi); border-radius: 20px; z-index: 50; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); animation: fade 0.15s; }
.modal .pay-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal .pay-head b { font-family: var(--display); font-size: 15px; }
.modal .input { width: 100%; }
.modal textarea.input { resize: vertical; min-height: 64px; }
.req-body { display: grid; gap: 14px; padding: 16px 18px 18px; }
.req-body .muted { margin: 0; font-size: 13px; line-height: 1.5; }
.req-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line-hi); border-radius: 14px; background: var(--card-hi); }
.req-item > div { display: grid; gap: 2px; }
.req-item span { color: var(--muted); font-size: 12.5px; }
.field-l { display: grid; gap: 6px; }
.field-l > span { font-size: 12px; font-weight: 700; color: var(--muted); }
.req-body > .btn { justify-content: center; height: 42px; }

/* Buyer fields (Discord nick + invite): a full bordered input everywhere, also inside .palette (which strips input borders). */
.buyer-f { gap: 6px; min-width: 0; }
.buyer-f .buyer-in, .palette .buyer-in, .modal .buyer-in { display: block; width: 100%; max-width: 100%; height: 42px; padding: 0 14px; border: 1px solid var(--line-hi); border-radius: 12px; background: var(--card); color: var(--text); font-size: 14px; font-weight: 600; outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.buyer-f .buyer-in::placeholder { color: var(--faint); font-weight: 500; }
.buyer-f .buyer-in:hover { border-color: #3a3a3a; }
.buyer-f .buyer-in:focus { border-color: var(--text); box-shadow: 0 0 0 3px rgba(250, 250, 250, 0.14); }
.buyer-f .buyer-in.bad, .buyer-f .buyer-in.bad:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14); }
.buyer-err { color: var(--red); font-size: 12px; font-weight: 600; line-height: 1.35; }
.buyer-err[hidden], .pay-lock[hidden] { display: none; }
.buyer-hint { color: var(--faint); font-size: 11.5px; line-height: 1.4; margin-top: -2px; }
.pay-sep { display: flex; align-items: center; gap: 10px; margin-top: 4px; color: var(--faint); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.pay-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pay-lock { color: var(--amber); font-size: 12px; font-weight: 600; margin-top: -6px; }
.pay-methods { display: grid; gap: 8px; }
.palette .pay-methods button.pay-m, .pay-m { display: grid; grid-template-columns: 20px auto 1fr auto; align-items: center; gap: 4px 12px; width: 100%; padding: 13px 14px; border: 1px solid var(--line-hi); border-radius: 12px; background: var(--card); color: var(--text); text-align: left; transition: background 0.15s, border-color 0.15s, opacity 0.15s; }
.pay-m b { font-size: 14px; font-weight: 700; }
.pay-m small { justify-self: end; text-align: right; color: var(--muted); font-size: 12px; font-weight: 500; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-move .card { display: grid; gap: 12px; margin: 14px 0; }
.sub-move .btn { justify-self: start; }
.tr-details { white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid var(--line-hi); border-radius: 12px; padding: 12px 14px; background: var(--card); font-size: 14px; margin: 6px 0 12px; }
.tr-code { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.tr-code code { font-size: 16px; font-weight: 700; letter-spacing: 0.04em; border: 1px solid var(--line-hi); border-radius: 10px; padding: 6px 12px; background: var(--card); }
.fee-chip { justify-self: end; border: 1px solid var(--line-hi); border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.fee-chip.free { color: #4ade80; border-color: rgba(74, 222, 128, 0.4); background: rgba(74, 222, 128, 0.08); }
.pay-fee-note { min-height: 18px; margin: 8px 2px 0; font-size: 12.5px; color: var(--muted); }
.pay-m:hover { background: var(--hover); border-color: #3a3a3a; }
.pay-m:focus-visible { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px rgba(250, 250, 250, 0.14); }
.pay-m.off, .pay-m.off:hover { opacity: 0.45; cursor: not-allowed; background: var(--card); border-color: var(--line-hi); }
.palette.pay { top: 6vh; max-height: calc(100vh - 12vh); overflow-y: auto; width: min(460px, calc(100% - 24px)); }
@media (max-width: 520px) {
    .palette.pay { top: 3vh; max-height: 94vh; }
    .palette .pay-methods button.pay-m, .pay-m { grid-template-columns: 20px minmax(0, 1fr); }
    .pay-m small { grid-column: 2; justify-self: start; text-align: left; }
    .fee-chip { grid-column: 2; justify-self: start; }
    .buyer-f .buyer-in { font-size: 16px; }
}

/* ── Проверка сервера ── */
.audit-hero { flex-wrap: wrap; }
.audit-score { width: 78px; height: 78px; border-radius: 50%; flex: none; display: grid; place-content: center; text-align: center; border: 3px solid var(--line); line-height: 1; }
.audit-score b { font-family: "Unbounded", sans-serif; font-size: 24px; }
.audit-score span { font-size: 11px; color: var(--faint); margin-top: 3px; }
.audit-score.green { border-color: #22c55e; box-shadow: 0 0 30px -8px rgba(34, 197, 94, 0.6); }
.audit-score.amber { border-color: #f59e0b; box-shadow: 0 0 30px -8px rgba(245, 158, 11, 0.6); }
.audit-score.red { border-color: #ef4444; box-shadow: 0 0 30px -8px rgba(239, 68, 68, 0.6); }
.audit-list { display: grid; gap: 0; padding: 6px 18px; }
.audit-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.audit-row:first-child { border-top: 0; }
.audit-row p { margin: 0; flex: 1; min-width: 0; line-height: 1.5; }
.audit-row .btn { flex: none; }
.audit-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15); }
.audit-row.bad .audit-dot { background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15); }
@media (max-width: 600px) { .audit-row { flex-wrap: wrap; } .audit-row .btn { margin-left: 22px; } }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.row-between h3 { margin: 0; }
.audit-list.flat { padding: 0; }
.audit-dot.ok { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15); }

/* ── Игровые серверы: вайпы, баны, особый список ── */
.g-list { display: grid; gap: 12px; }
.g-list.flat { gap: 0; }
.g-row { display: grid; gap: 10px; }
.g-row-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.g-row-head b { font-family: "Unbounded", sans-serif; font-size: 15px; }
.g-row-next { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.g-row-next svg.i { width: 16px; height: 16px; color: #d4d4d4; }
.g-row-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.g-row-acts .input { width: auto; max-width: 230px; padding: 7px 12px; }
.g-field { display: grid; gap: 6px; }
.g-submit { margin-top: 14px; }
.g-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.g-item:first-child { border-top: 0; }
.g-item p { margin: 0; flex: 1; min-width: 0; line-height: 1.5; }
.g-item .btn { flex: none; }
.g-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15); }
.g-item.expired .g-dot { background: #6b7280; box-shadow: none; }
.g-item.lifted .g-dot { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15); }
.g-item.wait .g-dot { background: var(--amber); box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.15); }
.g-emoji { font-size: 18px; flex: none; width: 24px; text-align: center; }
.sub.red { color: #f87171; }
.g-toggles { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.g-wide { margin-top: 18px; }

/* ── Emoji picker in the message builder ── */
.emo-wrap { position: relative; }
.emo-wrap > .input { padding-right: 44px; }
.emo-wrap > textarea.input { padding-right: 46px; }
.emo-btn { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border-radius: 9px; border: 1px solid transparent; background: transparent; font-size: 16px; line-height: 1; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.emo-btn:hover { background: var(--active, #1c1c1c); border-color: var(--line-hi); }
.emo-wrap > .input:not(textarea) + .emo-btn { top: 50%; margin-top: -14px; }
.emo-pop { position: fixed; left: 0; top: 0; z-index: 400; overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; align-content: start; width: min(340px, 86vw); background: #0d0d0d; border: 1px solid var(--line-hi); border-radius: 16px; padding: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); display: grid; gap: 8px; }
.emo-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.emo-search { padding: 7px 12px; }
.emo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 4px; max-height: 240px; overflow-y: auto; }
.emo-cell { width: 38px; height: 38px; border-radius: 9px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; }
.emo-cell:hover { background: #1c1c1c; }
.emo-cell img { width: 28px; height: 28px; object-fit: contain; }
.emo-upload { grid-column: 1 / -1; display: grid; gap: 8px; }
.emo-upload .sub { margin: 0; }
.dc-cemo { width: 20px; height: 20px; vertical-align: -4px; object-fit: contain; }
.md-h1 .dc-cemo, .md-h2 .dc-cemo { width: 26px; height: 26px; }
.emo-tabs .chip { padding: 5px 12px; cursor: pointer; }
.emo-tabs .chip.on { background: #fff; color: #000; border-color: #fff; }
.sched-opts { display: grid; gap: 8px; margin-top: 12px; }
.check-line { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.check-line input { width: 18px; height: 18px; accent-color: #d4d4d4; }

/* Events: form + live card preview side by side */
.ev-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ev-prev-card { position: sticky; top: 16px; }
.ev-preview .dc-e-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ev-grid .fields-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
@media (max-width: 1100px) { .ev-grid { grid-template-columns: minmax(0, 1fr); } .ev-prev-card { position: static; } }

/* Steam check */
.sc-search { display: flex; gap: 10px; margin-bottom: 10px; }
.sc-search .input { flex: 1; min-width: 0; }
.sc-result { margin-top: 14px; border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: grid; gap: 14px; background: #0b0b0b; }
.sc-result.ok { border-color: rgba(34, 197, 94, 0.35); }
.sc-result.warn { border-color: rgba(245, 158, 11, 0.4); }
.sc-result.bad { border-color: rgba(239, 68, 68, 0.45); box-shadow: 0 0 30px -12px rgba(239, 68, 68, 0.5); }
.sc-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sc-head img { width: 52px; height: 52px; border-radius: 12px; }
.sc-head > div { display: grid; gap: 2px; min-width: 0; flex: 1; }
.sc-head a { font-family: "Unbounded", sans-serif; font-size: 16px; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.sc-badge { font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 999px; background: #151515; }
.sc-badge.ok { color: var(--green); } .sc-badge.warn { color: var(--amber); } .sc-badge.bad { color: #f87171; }
.sc-flags { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--text); }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.sc-cell { display: grid; gap: 3px; padding: 10px 12px; border-radius: 12px; background: #111; }
.sc-cell b { font-size: 14px; overflow-wrap: anywhere; }
@media (max-width: 640px) { .sc-search { flex-direction: column; } }

/* «Работа команды» table and «Игрок недели» board */
.wk-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.wk-scroll { overflow-x: auto; }
.wk-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.wk-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.wk-table td { padding: 10px; border-bottom: 1px solid #151515; white-space: nowrap; }
.wk-table tr.idle td { opacity: 0.45; }
.wk-table td.zero { color: #3f3f46; }
.wk-table td.red { color: #f87171; font-weight: 700; } .wk-table td.orange { color: #fb923c; font-weight: 700; } .wk-table td.yellow { color: #facc15; font-weight: 700; } .wk-table td.green { color: var(--green); font-weight: 700; }
.wk-name { font-weight: 700; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.wk-n { width: 30px; text-align: center; }
.wk-score { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.wk-bar { display: inline-block; width: 90px; height: 6px; border-radius: 3px; background: #1a1a1a; overflow: hidden; }
.wk-bar i { display: block; height: 100%; background: linear-gradient(90deg, #737373, #e5e5e5); border-radius: 3px; }
.potw { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; }
.potw-list, .potw-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.potw-list li { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: #0f0f0f; border: 1px solid #1a1a1a; }
.potw-list li.first { border-color: rgba(251, 191, 36, 0.45); background: linear-gradient(90deg, rgba(251, 191, 36, 0.08), #0f0f0f); }
.potw-n { grid-row: span 2; text-align: center; font-weight: 800; font-size: 16px; }
.potw-list li b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.potw-list li .sub { grid-column: 2; }
.potw-score { grid-row: 1 / span 2; grid-column: 3; font-family: "Unbounded", sans-serif; font-size: 16px; color: #fcd34d; }
.potw-hist li { padding: 8px 0; border-bottom: 1px solid #151515; }
@media (max-width: 900px) { .potw { grid-template-columns: minmax(0, 1fr); } }

/* Server news */
.news-img { display: block; width: 100%; border-radius: 14px; }
.news-img:not([src]) { display: none; }
.news-block { margin-top: 14px; }
.news-block .label { display: inline-flex; align-items: center; gap: 8px; }
.news-block .label i { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; }
.news-block.fixed .label i { background: #3b82f6; } .news-block.changed .label i { background: #f59e0b; } .news-block.removed .label i { background: #ef4444; }
.news-block textarea { width: 100%; }

/* Tournaments */
.tn-list { display: grid; gap: 14px; }
.tn-card { display: grid; gap: 12px; }
.tn-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tn-head > div { display: grid; gap: 3px; min-width: 0; }
.tn-head b { font-family: "Unbounded", sans-serif; font-size: 15px; }
.tn-badge { font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: #151515; }
.tn-badge.active { color: var(--green); } .tn-badge.warn { color: #d4d4d4; } .tn-badge.done { color: #fcd34d; } .tn-badge.lifted { color: #71717a; }
.tn-champ { margin: 0; color: #fcd34d; }
.tn-teams { display: flex; flex-wrap: wrap; gap: 6px; }
.tn-team { padding: 5px 10px; border-radius: 999px; background: #121212; border: 1px solid #1f1f1f; font-size: 13px; font-weight: 600; }
.tn-team em { font-style: normal; color: var(--muted); font-weight: 500; }
.tn-matches { display: grid; gap: 8px; }
.tn-match { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 12px; background: #0f0f0f; }
.tn-match .sub { min-width: 96px; }
.tn-vs { color: var(--muted); font-size: 12px; font-weight: 700; }
.tn-bracket { display: block; width: 100%; border-radius: 14px; }
.tn-bracket:not([src]) { display: none; }
.tn-acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* News card look */
.nd { display: grid; gap: 14px; }
.nd-row { display: grid; gap: 8px; }
.nd-themes { display: flex; flex-wrap: wrap; gap: 6px; }
.nd-theme { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px 6px 7px; border-radius: 999px; border: 1px solid var(--line); background: #0f0f0f; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.nd-theme i { width: 18px; height: 18px; border-radius: 50%; }
.nd-theme:hover { border-color: #3a3a3a; }
.nd-theme.on { border-color: #fff; background: #1a1a1a; }
.nd-colors, .nd-bg { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nd-color { width: 44px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: none; cursor: pointer; }
.nd-file { display: none; }
.nd-bg label.btn { cursor: pointer; }
.nd-range { width: 100%; accent-color: #d4d4d4; }

/* Chip buttons (week switch, news style, …): the chosen one is white */
button.chip { padding: 5px 12px; cursor: pointer; font-family: inherit; transition: background 0.2s, color 0.2s, border-color 0.2s; }
button.chip:hover { border-color: #555; }
button.chip.on { background: #fff; color: #000; border-color: #fff; }
.wk-table td.stars { color: #fcd34d; font-weight: 700; }
.nd-theme.preset { font-weight: 800; }

/* Server template */
/* gallery: search, filters, cards with the game icon */
.tp-ico { flex: none; width: 26px; height: 26px; border-radius: 7px; object-fit: cover; background: #151515; }
.tp-ico.sm { width: 28px; height: 28px; }
.tp-ico.lg { width: 44px; height: 44px; border-radius: 11px; }
.tp-ico.xl { width: 64px; height: 64px; border-radius: 16px; }
.tp-ico.com { display: inline-grid; place-items: center; background: #d4d4d4; color: #0b0b0b; }
.tp-ico.com svg.i { width: 55%; height: 55%; }
.tp-ico.let { display: inline-grid; place-items: center; color: #fff; font-weight: 800; font-family: "Unbounded", sans-serif; font-size: 13px; }
.tp-ico.lg.let { font-size: 19px; }
.tp-ico.xl.let { font-size: 28px; }
.st-gallery { display: grid; gap: 14px; }
.st-gallery-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.st-gallery-head h3 { margin: 0; }
.st-tools { display: grid; gap: 10px; }
.st-search-wrap { position: relative; }
.st-search-wrap svg.i { position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: #71717a; pointer-events: none; }
.st-search-wrap .st-search { width: 100%; padding-left: 40px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.st-chip-n { margin-left: 4px; font-size: 11px; opacity: 0.55; font-weight: 700; }
.st-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; max-height: 520px; overflow-y: auto; padding: 2px 6px 2px 2px; scrollbar-width: thin; scrollbar-color: #2a2a2a transparent; }
.st-card { display: flex; align-items: flex-start; gap: 12px; text-align: left; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: #0f0f0f; color: var(--text); font: inherit; cursor: pointer; min-width: 0; transition: border-color 0.2s, background 0.2s, transform 0.15s; }
.st-card:hover { border-color: #3a3a3a; transform: translateY(-1px); }
.st-card.on { border-color: #fff; background: #1a1a1a; }
.st-card-t { display: grid; gap: 3px; min-width: 0; }
.st-card-t b { font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-card-t span { font-size: 12.5px; line-height: 1.4; color: var(--muted); font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-card-t small { font-size: 11.5px; font-weight: 700; color: #a1a1aa; }
.st-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 8px; padding: 28px 12px; text-align: center; }
.st-sel { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.st-sel-t { display: grid; gap: 4px; flex: 1 1 240px; min-width: 0; }
.st-sel-t b { font-family: "Unbounded", sans-serif; font-size: 17px; }
.st-sel-t .st-about { margin: 0; }
.st-meta { font-size: 12.5px; font-weight: 700; color: #a1a1aa; }
.st-modal { width: min(560px, calc(100% - 24px)); }
.st-modal-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.st-modal-body { display: grid; gap: 14px; padding: 16px 18px 20px; }
.st-modal-body p { margin: 0; }
.st-tree { display: grid; gap: 12px; }
.st-cat { display: grid; gap: 6px; }
.st-cat-name { display: flex; align-items: center; gap: 8px; font-family: "Unbounded", sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; color: #d4d4d8; }
.st-cat-name em { font-style: normal; font-family: inherit; font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: #151515; color: #71717a; font-weight: 700; }
.st-cat ul { list-style: none; margin: 0; padding: 0 0 0 10px; display: grid; gap: 2px; border-left: 1px solid #1f1f1f; }
.st-cat li { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 13.5px; font-weight: 600; min-width: 0; }
.st-cat li .st-emo { width: 24px; height: 24px; font-size: 13px; }
.st-tn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.st-cat li small { margin-left: auto; flex: none; font-size: 11px; color: #71717a; font-weight: 700; }
.st-roles { display: flex; flex-wrap: wrap; gap: 6px; }
.st-role { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.05); }
@media (max-width: 700px) { .st-cards { grid-template-columns: minmax(0, 1fr); max-height: 440px; } .st-sel .btn { width: 100%; } .st-modal-body { padding: 14px 14px 18px; } }
.st-warn { border-color: rgba(245, 158, 11, 0.5); color: #fcd34d; }
.st-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.st-block { display: grid; gap: 12px; align-content: start; transition: opacity 0.2s, border-color 0.2s; }
.st-block.off { opacity: 0.4; }
.st-block-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.st-block-head > div { display: grid; gap: 4px; min-width: 0; }
.st-block-head b { font-family: "Unbounded", sans-serif; font-size: 14px; }
.st-block-head span { font-size: 13px; line-height: 1.45; color: var(--muted); font-weight: 500; }
.st-block-head .switch { flex: none; }
.st-count { justify-self: start; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #141414; color: #71717a; }
.st-count.new { background: rgba(34, 197, 94, 0.14); color: var(--green); }
.st-chans { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.st-chans li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; border-radius: 10px; background: #0d0d0d; border: 1px solid #161616; }
.st-emo { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #151515; font-size: 15px; color: #71717a; font-weight: 700; }
.st-emo.role { background: rgba(255, 255, 255, 0.05); }
.st-name { display: grid; min-width: 0; font-size: 14px; font-weight: 600; }
.st-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-name small { font-size: 12px; color: var(--muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-chans li.have .st-name { color: #a1a1aa; }
.st-tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #151515; color: #71717a; }
.st-chans li.new .st-tag { background: rgba(34, 197, 94, 0.14); color: var(--green); }
.st-go { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.st-go > div { display: grid; gap: 3px; }
.st-go .g-submit { margin: 0; }
.st-done { border-color: rgba(34, 197, 94, 0.45); }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.st-grid > div { display: grid; gap: 2px; padding: 12px; border-radius: 12px; background: #0f0f0f; }
.st-grid b { font-family: "Unbounded", sans-serif; font-size: 22px; }
.st-block.wide { grid-column: span 2; }
.st-block.wide .st-chans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .st-block.wide { grid-column: auto; } .st-block.wide .st-chans { grid-template-columns: minmax(0, 1fr); } }
.st-about { margin: 14px 0 0; color: var(--muted); font-size: 14px; }

/* Activation codes */
.code-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.code-card .t { display: grid; gap: 3px; }
.code-row { display: flex; gap: 10px; flex: 1 1 340px; max-width: 520px; }
.code-input { flex: 1; min-width: 0; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.06em; text-transform: uppercase; }
.code-list { display: grid; gap: 8px; }
.code-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: #0e0e0e; border: 1px solid #1a1a1a; }
.code-item.dim { opacity: 0.55; }
.code-main { display: grid; gap: 3px; min-width: 0; }
.code-value { display: inline-flex; align-items: center; gap: 8px; justify-self: start; background: none; border: 0; padding: 0; color: var(--text); font: 700 15px ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.05em; cursor: pointer; }
.code-value svg.i { width: 14px; height: 14px; opacity: 0.5; }
.code-value:hover svg.i { opacity: 1; }
.code-used { font-size: 12px; color: var(--green); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-made { margin-top: 14px; padding: 12px; border-radius: 12px; border: 1px solid rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.06); display: grid; gap: 10px; }
.code-made-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.code-pre { margin: 0; font: 600 14px ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.05em; white-space: pre-wrap; user-select: all; max-height: 260px; overflow: auto; }
@media (max-width: 640px) { .code-item { grid-template-columns: minmax(0, 1fr) auto; } .code-item .btn { grid-column: 1 / -1; justify-self: start; } .code-row { flex-direction: column; } }

/* «Работа команды»: leaderboard */
.sr { display: grid; gap: 16px; }
.sr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sr-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.sr-kpi { --c: #d4d4d4; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 14px; border-radius: 14px; background: radial-gradient(160px 90px at 0% 0%, color-mix(in srgb, var(--c) 12%, transparent), transparent 70%), #0e0e0e; border: 1px solid #1a1a1a; }
.sr-kpi.red { --c: #f87171; } .sr-kpi.green { --c: var(--green); } .sr-kpi.gold { --c: var(--amber); } .sr-kpi.violet { --c: #d4d4d4; }
.sr-kpi-ico { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.sr-kpi-ico svg.i { width: 20px; height: 20px; }
.sr-kpi b { font-family: "Unbounded", sans-serif; font-size: 20px; line-height: 1.1; }
.sr-kpi span:last-child { font-size: 12px; color: var(--muted); }
.sr-list { display: grid; gap: 8px; }
.sr-row { display: grid; grid-template-columns: 30px 40px minmax(0, 1fr) 130px; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #0d0d0d; border: 1px solid #171717; }
.sr-place { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #171717; color: #a1a1aa; font-weight: 800; font-size: 13px; }
.sr-row.top1 { border-color: rgba(251, 191, 36, 0.35); background: linear-gradient(90deg, rgba(251, 191, 36, 0.06), #0d0d0d 40%); }
.sr-row.top1 .sr-place { background: linear-gradient(135deg, #fde047, #f59e0b); color: #1a1204; }
.sr-row.top2 .sr-place { background: linear-gradient(135deg, #e5e7eb, #9ca3af); color: #111; }
.sr-row.top3 .sr-place { background: linear-gradient(135deg, #fdba74, #c2410c); color: #1a0d04; }
.sr-ava { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.sr-ava.none { display: grid; place-items: center; background: #1f1f1f; font-weight: 800; color: #a1a1aa; }
.sr-main { display: grid; gap: 7px; min-width: 0; }
.sr-name { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.sr-name b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-stars { font-size: 13px; font-weight: 700; color: #fcd34d; white-space: nowrap; }
.sr-stars small { color: var(--muted); font-weight: 500; }
.sr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sr-chip { --c: #a1a1aa; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.sr-chip svg.i { width: 12px; height: 12px; }
.sr-chip.red { --c: #f87171; } .sr-chip.orange { --c: #fb923c; } .sr-chip.yellow { --c: #facc15; } .sr-chip.green { --c: var(--green); } .sr-chip.violet { --c: #d4d4d4; } .sr-chip.grey { --c: #a1a1aa; }
.sr-score { display: grid; gap: 6px; justify-items: end; }
.sr-score b { font-family: "Unbounded", sans-serif; font-size: 16px; }
.sr-bar { width: 100%; height: 6px; border-radius: 3px; background: #1a1a1a; overflow: hidden; }
.sr-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #737373, #e5e5e5); }
.sr-empty { display: grid; justify-items: center; gap: 6px; padding: 28px 12px; text-align: center; color: var(--muted); }
.sr-empty svg.i { width: 28px; height: 28px; opacity: 0.6; }
.sr-empty b { color: var(--text); }
.sr-idle { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: #0b0b0b; border: 1px dashed #222; color: var(--muted); font-size: 13px; }
.sr-idle-name { padding: 2px 9px; border-radius: 999px; background: #151515; color: #a1a1aa; font-weight: 600; }
.sr-settings { display: grid; gap: 16px; }
.sr-set-head { display: flex; align-items: flex-start; gap: 12px; }
.sr-set-head > div { flex: 1; min-width: 0; align-self: center; }
.sr-set-head h3 { margin: 0 0 4px; font-size: 14.5px; }
.sr-set-head p { margin: 0; }
.sr-set-head .switch { flex: none; margin-top: 7px; }
.sr-set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; align-items: start; }
.sr-settings > .sub { margin: 0; }
@media (max-width: 760px) {
    .sr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sr-row { grid-template-columns: 28px 36px minmax(0, 1fr); }
    .sr-score { grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-items: stretch; }
    .sr-set-grid { grid-template-columns: minmax(0, 1fr); }
}
.sr-set-grid .hint { display: none; }
.sr-set-grid .field, .sr-set-grid .field:first-of-type { border: 0; padding: 0; }

/* Admin → Система: planned restarts */
/* Full-width cards: own height (not the 1fr row height of the small status cards). */
.sys-grid { grid-auto-rows: auto; }
.sys-grid .rp-card { grid-column: 1 / -1; gap: 16px; }
.rp-card .sys-head { margin-bottom: 0; }
.rp-card .sys-head h3 { font-size: 14.5px; }
.sys-state { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border-radius: 999px; border: 1px solid var(--line-hi); background: var(--card-hi); }
.rp-card > .sub { margin: -6px 0 0 48px; max-width: 720px; }
.rp-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px 24px; align-items: start; }
.rp-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (max-width: 900px) { .rp-body { grid-template-columns: minmax(0, 1fr); } .rp-card > .sub { margin-left: 0; } }
.rp-days { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.rp-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; gap: 8px 12px; min-height: 36px; }
.rp-row .label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.rp-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.rp-time { width: 110px; height: 34px; padding: 0 12px; }
@media (max-width: 520px) { .rp-row { grid-template-columns: minmax(0, 1fr); } }
/* Status box on the right: lines separated inside, not floating rules. */
.rp-status { padding: 4px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-hi); }
.rp-status .sys-line:first-child, .rp-lines > div:first-child > .sys-line { border-top: 0; }
.rp-hist { margin: 0; padding: 10px 0; border-top: 1px solid var(--line); }
.rp-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ── Технические работы (public/maintenance.js) ── */
.mt-body { margin: 0; background: #000; overflow-x: hidden; }
.mt-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; background: #000; }
.mt { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; box-sizing: border-box; font-family: "Manrope", system-ui, sans-serif; color: #fafafa; }
.mt-shade { position: fixed; inset: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,.12) 0%, rgba(0,0,0,.45) 80%); pointer-events: none; }
.mt-nogl { background: linear-gradient(120deg, #161616, #0b0b0b, #1c1c1c, #101010); background-size: 400% 400%; animation: mtGrad 18s ease-in-out infinite; }
@keyframes mtGrad { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.mt-card { position: relative; width: min(560px, 100%); box-sizing: border-box; padding: 34px 32px 28px; border-radius: 26px; background: rgba(8, 8, 12, .5); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); box-shadow: 0 30px 80px rgba(0,0,0,.55); text-align: center; animation: mtIn .7s cubic-bezier(.2,.8,.2,1) both; }
@keyframes mtIn { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.mt-brand { display: inline-flex; align-items: center; gap: 10px; font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 15px; letter-spacing: .04em; }
.mt-logo { width: 34px; height: 34px; flex: none; }
.mt-pill { margin: 22px auto 0; width: max-content; display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.35); color: var(--amber); font-weight: 800; font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; }
.mt-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; box-shadow: 0 0 0 0 currentColor; animation: mtPulse 1.8s ease-out infinite; }
@keyframes mtPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
.mt h1 { margin: 16px 0 10px; font-family: "Unbounded", sans-serif; font-weight: 800; font-size: clamp(28px, 6vw, 42px); line-height: 1.1; letter-spacing: -.02em; }
.mt-text { margin: 0 auto; max-width: 440px; color: #d4d4d4; font-size: 15.5px; line-height: 1.6; }
.mt-eta { margin: 20px auto 0; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #a3a3a3; font-size: 13px; }
.mt-time { font-family: "Unbounded", sans-serif; font-size: 30px; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.mt-svcs { margin-top: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mt-svc { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px 14px; border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025)); border: 1px solid rgba(255,255,255,.09); min-width: 0; }
.mt-svc-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 4px; }
.mt-svc.ok .mt-svc-ico { color: var(--green); background: rgba(74,222,128,.1); box-shadow: inset 0 0 0 1px rgba(74,222,128,.25), 0 0 24px rgba(74,222,128,.12); }
.mt-svc.wait .mt-svc-ico { color: var(--amber); background: rgba(251,191,36,.1); box-shadow: inset 0 0 0 1px rgba(251,191,36,.25), 0 0 24px rgba(251,191,36,.12); }
.mt-svc-ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.mt-svc b { font-size: 14px; font-weight: 800; color: #fff; }
.mt-svc small { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.mt-svc.ok small { color: var(--green); }
.mt-svc.wait small { color: var(--amber); }
.mt-svc .mt-dot { width: 6px; height: 6px; }
/* bot: blinking eyes, glowing antenna */
.mt-eyes { fill: currentColor; stroke: none; transform-origin: 12px 13px; animation: mtBlink 4s infinite; }
@keyframes mtBlink { 0%, 44%, 50%, 100% { transform: scaleY(1); } 47% { transform: scaleY(.1); } }
.mt-ant { animation: mtAnt 1.6s ease-in-out infinite; }
circle.mt-ant { fill: currentColor; }
@keyframes mtAnt { 50% { opacity: .35; } }
/* shield: the tick draws itself again and again */
.mt-tick { stroke-dasharray: 12; stroke-dashoffset: 12; animation: mtTick 2.8s ease-in-out infinite; }
@keyframes mtTick { 0% { stroke-dashoffset: 12; } 30%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -12; } }
/* panel: spinning arrows */
.mt-spin { transform-origin: 12px 12px; animation: mtSpin 2.4s linear infinite; }
@keyframes mtSpin { to { transform: rotate(360deg); } }
.mt-actions { margin-top: 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mt-btn { font: inherit; font-weight: 800; font-size: 14px; padding: 12px 26px; border-radius: 999px; border: 0; background: #fff; color: #000; cursor: pointer; transition: transform .15s; }
.mt-btn:hover { transform: translateY(-1px); }
.mt-link { color: #8a8a8a; font-size: 12.5px; font-weight: 700; text-decoration: none; }
.mt-link:hover { color: #fff; }
.mt-preview { margin-top: 18px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14); color: #e5e5e5; font-size: 12.5px; font-weight: 700; }
@media (max-width: 560px) {
    .mt-card { padding: 26px 18px 22px; border-radius: 22px; }
    .mt-svcs { gap: 6px; }
    .mt-svc { padding: 12px 4px 10px; }
    .mt-svc-ico { width: 40px; height: 40px; }
    .mt-svc small { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) { .mt-card, .mt-dot, .mt-nogl, .mt-eyes, .mt-ant, .mt-tick, .mt-spin { animation: none; } .mt-tick { stroke-dashoffset: 0; } }

/* Owner sees the site during maintenance: a bar on top. */
.mt-ownerbar { position: relative; z-index: 20; display: flex; justify-content: center; align-items: center; gap: 4px 14px; flex-wrap: wrap; padding: 7px 44px; background: #f59e0b; color: #000; font-weight: 800; font-size: 12.5px; text-align: center; }
.mt-ownerbar-x { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border: 0; border-radius: 8px; background: rgba(0,0,0,.12); color: #000; font: inherit; font-size: 16px; line-height: 1; cursor: pointer; }
.mt-ownerbar-x:hover { background: rgba(0,0,0,.22); }
.mt-ownerbar a { color: #000; }

.mt-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.mt-btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.mt-dc { background: #5865f2; color: #fff; box-shadow: 0 8px 24px rgba(88,101,242,.35); }
.mt-dc svg { width: 18px; height: 18px; fill: currentColor; }

/* Role panels builder (public/rolepanels.js) */
.rpn-checks { display: grid; gap: 10px; margin: 12px 0; }
.rpn-check { align-items: flex-start; font-weight: 700; }
.rpn-check .hint { display: block; font-weight: 500; margin-top: 2px; }
.rpn-legend { display: grid; gap: 3px; font-size: 14px; }
.rpn-legend .emo { margin-right: 4px; }
.dc-e-img { max-width: 100%; border-radius: 6px; margin-top: 4px; }

/* ── ИИ-модерация (sections.js aiView) ── */
.ai-hero { position: relative; overflow: hidden; display: grid; gap: 18px; background: radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, 0.05), transparent 55%), var(--frame, #0d0d0d); }
.ai-hero::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.05), transparent 70%); background-size: 250% 100%; animation: aiShine 6s linear infinite; }
@keyframes aiShine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.ai-hero-top { display: flex; align-items: center; gap: 18px; position: relative; z-index: 1; }
.ai-hero-t { flex: 1; min-width: 0; }
.ai-hero-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ai-hero-title b { font-family: "Unbounded", sans-serif; font-size: 20px; }
.ai-hero-t p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; max-width: 640px; }
.ai-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.ai-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ai-pill.ok { color: var(--green); background: rgba(74, 222, 128, .12); }
.ai-pill.ok i { animation: aiBlink 1.6s ease-in-out infinite; }
.ai-pill.off { color: #a3a3a3; background: rgba(255, 255, 255, .06); }
.ai-pill.warn { color: var(--amber); background: rgba(251, 191, 36, .12); }
@keyframes aiBlink { 50% { opacity: .35; } }
.ai-orb { position: relative; width: 64px; height: 64px; flex: none; display: grid; place-items: center; }
.ai-orb-ring { display: none; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, #737373, #e5e5e5, #737373); opacity: .55; animation: aiSpin 5s linear infinite; }
.ai-hero:not(.on) .ai-orb-ring { animation-play-state: paused; opacity: .2; filter: grayscale(1); }
.ai-orb-core { position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #0a0a0d; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); color: #e5e5e5; }
.ai-orb-core svg.i { width: 24px; height: 24px; }
.ai-orb-cv { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; overflow: hidden; }
@keyframes aiSpin { to { transform: rotate(360deg); } }
@keyframes aiPulse { 50% { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); } }
.ai-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; position: relative; z-index: 1; }
.ai-tile { padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ai-tile-top { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.ai-tile-top svg.i { width: 15px; height: 15px; color: #d4d4d4; }
.ai-tile > b { font-family: "Unbounded", sans-serif; font-size: 22px; }
.ai-tile .sub { margin: 0; font-size: 12px; line-height: 1.45; }
.ai-meter { display: grid; gap: 5px; }
.ai-meter::before { content: ""; grid-area: 1 / 1; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .07); }
.ai-meter > i { grid-area: 1 / 1; height: 6px; border-radius: 99px; background: linear-gradient(90deg, #737373, #e5e5e5); min-width: 4px; }
.ai-meter small { color: var(--muted); font-size: 11.5px; }
.ai-spark { display: flex; align-items: flex-end; gap: 4px; height: 30px; }
.ai-spark i { flex: 1; border-radius: 3px 3px 1px 1px; background: linear-gradient(180deg, #d4d4d4, #737373); min-height: 3px; }
.ai-spark i.zero { background: rgba(255, 255, 255, .08); }
.ai-steps { display: flex; align-items: stretch; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.ai-step { flex: 1 1 0; min-width: 116px; display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.ai-step span { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); color: #d4d4d4; margin-bottom: 4px; }
.ai-step span svg.i { width: 16px; height: 16px; }
.ai-step b { font-size: 13px; }
.ai-step small { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.ai-step.hl { border-color: rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05); }
.ai-step.hl span { background: rgba(255, 255, 255, 0.05); color: #e5e5e5; }
.ai-step.end span { background: rgba(34, 197, 94, .14); color: var(--green); }
.ai-arrow { align-self: center; color: #525252; font-weight: 800; flex: none; }
.ai-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ai-mode { position: relative; text-align: left; display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); color: inherit; font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.ai-mode:hover { border-color: var(--line-hi); }
.ai-mode.on { border-color: rgba(255, 255, 255, 0.2); background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 10px 30px rgba(255, 255, 255, 0.05); }
.ai-mode-ico { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); color: #d4d4d4; }
.ai-mode.on .ai-mode-ico { background: rgba(255, 255, 255, 0.05); color: #e5e5e5; }
.ai-mode b { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ai-mode p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; padding-right: 18px; }
.ai-rec { font-style: normal; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #e5e5e5; background: rgba(255, 255, 255, 0.05); padding: 2px 7px; border-radius: 99px; }
.ai-radio { position: absolute; top: 14px; right: 14px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #404040; box-sizing: border-box; }
.ai-mode.on .ai-radio { border-color: #d4d4d4; background: radial-gradient(circle, #d4d4d4 0 3px, transparent 4px); }
.ai-cats-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ai-cats-head h3 { margin: 0; }
.ai-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.ai-cat { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s, opacity .15s; opacity: .62; }
.ai-cat:hover { opacity: .9; }
.ai-cat.on { opacity: 1; border-color: rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05); }
.ai-cat-e { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: rgba(255, 255, 255, .05); }
.ai-cat.on .ai-cat-e { background: rgba(255, 255, 255, 0.05); }
.ai-cat-t { flex: 1; min-width: 0; }
.ai-cat-t b { font-size: 13.5px; }
.ai-cat-t p { margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.35; }
.ai-cat-sw { width: 34px; height: 20px; flex: none; border-radius: 99px; background: #2a2a2a; position: relative; transition: background .15s; }
.ai-cat-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #737373; transition: transform .15s, background .15s; }
.ai-cat.on .ai-cat-sw { background: #d4d4d4; }
.ai-cat.on .ai-cat-sw::after { transform: translateX(14px); background: #fff; }
@media (max-width: 900px) {
    .ai-tiles, .ai-modes { grid-template-columns: minmax(0, 1fr); }
    .ai-hero-top { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; }
    .ai-hero-top .hero-switch { justify-self: end; }
    .ai-hero-t { grid-column: 1 / -1; order: 3; }
}
@media (prefers-reduced-motion: reduce) { .ai-hero::after, .ai-orb-ring, .ai-orb-core, .ai-pill i { animation: none !important; } }
.ai-more { color: #e5e5e5; font-weight: 700; text-decoration: none; }
.ai-more:hover { text-decoration: underline; }
.badge.violet { color: #e5e5e5; background: rgba(255, 255, 255, 0.05); }
.bs-needs { white-space: nowrap; }
.ai-meter > i.inf { background: linear-gradient(90deg, #22c55e, #d4d4d4); }
.ai-guards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ai-guard { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.ai-guard.on { border-color: rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05); }
.ai-guard-top { display: flex; gap: 12px; align-items: flex-start; }
.ai-guard-top > div { flex: 1; min-width: 0; }
.ai-guard-top b { font-size: 14px; }
.ai-guard-top p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.ai-guard.on .ai-mode-ico { background: rgba(255, 255, 255, 0.05); color: #e5e5e5; }
.ai-guard-extra { margin-top: auto; }
.ai-guard-extra .field { border: 0; padding: 0; }
.ai-guard-extra .label { font-size: 12px; }
@media (max-width: 900px) { .ai-guards { grid-template-columns: minmax(0, 1fr); } }
.journal-search { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.journal-search .search-wrap { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px; position: relative; }
.journal-search .search-wrap > svg.i { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); }
.journal-search .search-wrap .input { padding-left: 36px; width: 100%; }

/* ── Overview (Обзор) — only .ov* classes, nothing shared ───────────── */
.ov { container-type: inline-size; }
.ov .t-violet { --c: #d4d4d4; } .ov .t-sky { --c: #38bdf8; } .ov .t-green { --c: var(--green); } .ov .t-amber { --c: var(--amber); }
.ov .t-yellow { --c: #facc15; } .ov .t-orange { --c: #fb923c; } .ov .t-red { --c: #f87171; } .ov .t-pink { --c: #f472b6; } .ov .t-grey { --c: #a1a1aa; }
.ov-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; color: var(--c, #d4d4d4); background: color-mix(in srgb, var(--c, #d4d4d4) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c, #d4d4d4) 28%, transparent); }
.ov-ico svg.i { width: 17px; height: 17px; }

/* KPI tiles */
.ov-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ov-kpi { position: relative; overflow: hidden; display: flex; flex-direction: column; min-width: 0; padding: 18px 18px 0; border-radius: var(--radius); border: 1px solid var(--line); background: radial-gradient(220px 120px at 0% 0%, color-mix(in srgb, var(--c) 9%, transparent), transparent 70%), var(--card); transition: border-color 0.2s, transform 0.2s; }
.ov-kpi:hover { border-color: color-mix(in srgb, var(--c) 35%, var(--line)); transform: translateY(-1px); }
.ov-kpi-top { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 700; font-size: 12.5px; line-height: 1.3; min-width: 0; }
.ov-kpi-top .ov-ico { width: 32px; height: 32px; border-radius: 10px; }
.ov-kpi-top .ov-ico svg.i { width: 15px; height: 15px; }
.ov-kpi-num { display: block; font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1.05; letter-spacing: -0.01em; margin: 18px 0 10px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-spark { display: block; width: calc(100% + 36px); height: 56px; margin: auto -18px 0; padding-top: 10px; color: var(--c); flex: none; }
.ov-delta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-width: 0; }
.ov-delta-row small { color: var(--faint); font-size: 12px; font-weight: 600; }
.ov-delta { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 6px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ov-delta svg.i { width: 13px; height: 13px; stroke-width: 2.4; }
.ov-delta.good { color: var(--green); background: rgba(34, 197, 94, 0.12); }
.ov-delta.bad { color: #f87171; background: rgba(239, 68, 68, 0.12); }
.ov-delta.flat { color: var(--muted); background: var(--active); }

/* Small tiles */
.ov-minis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.ov-mini { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); min-width: 0; align-content: start; }
.ov-mini .ov-ico { width: 34px; height: 34px; border-radius: 10px; }
.ov-mini .ov-ico svg.i { width: 16px; height: 16px; }
.ov-mini-t { min-width: 0; }
.ov-mini-t b { display: block; font-family: var(--display); font-weight: 800; font-size: 19px; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-mini-t span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-mini.hot b { color: var(--c); }
.ov-tier, .ov-meter { grid-column: 1 / -1; }
.ov-tier { display: flex; gap: 4px; }
.ov-tier i { flex: 1; height: 4px; border-radius: 2px; background: #1c1c1c; }
.ov-tier i.on { background: var(--c); box-shadow: 0 0 8px color-mix(in srgb, var(--c) 50%, transparent); }
.ov-meter { height: 4px; border-radius: 2px; background: #1c1c1c; overflow: hidden; }
.ov-meter i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #737373, #e5e5e5); transition: width 0.8s cubic-bezier(.2, .8, .2, 1); }

/* Cards */
.ov-card { padding: 20px; }
.ov-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-bottom: 18px; }
.ov-head-t { flex: 1 1 160px; min-width: 0; }
.ov-head-t h3 { margin: 0; display: block; font-family: var(--display); font-weight: 700; font-size: 14.5px; letter-spacing: 0.005em; }
.ov-head-t p { margin: 4px 0 0; color: var(--faint); font-size: 12.5px; font-weight: 600; }
.ov-head-r { margin-left: auto; display: flex; align-items: center; }
.ov-link { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-hi); background: transparent; color: var(--text); border-radius: 999px; padding: 6px 12px 6px 14px; font: inherit; font-size: 12.5px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.ov-link svg.i { width: 14px; height: 14px; transition: transform 0.15s; }
.ov-link:hover { background: #fff; color: #000; border-color: #fff; }
.ov-link:hover svg.i { transform: translateX(2px); }
.ov-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ov-legend span { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 700; }
.ov-legend i { width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.ov-legend em { font-style: normal; color: var(--muted); }
.ov-legend b { font-variant-numeric: tabular-nums; }

/* Charts */
.ov-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ov-wide { grid-column: 1 / -1; }
.ov-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ov-fig { padding: 12px 14px; min-width: 0; }
.ov-fig + .ov-fig { border-left: 1px solid var(--line); }
.ov-fig span { display: block; color: var(--faint); font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-fig b { display: block; font-family: var(--display); font-weight: 700; font-size: 18px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.ov-fig small { display: block; color: var(--faint); font-size: 11.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ovc { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; }
.ovc-y { position: relative; }
.ovc-y span { position: absolute; right: 0; transform: translateY(50%); color: var(--faint); font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.ovc-main { min-width: 0; }
.ovc-plot { position: relative; }
.ovc-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed #1d1d1d; }
.ovc-grid.base { border-top: 1px solid var(--line-hi); }
.ovc-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; clip-path: inset(0 100% 0 0); transition: clip-path 1.1s cubic-bezier(.3, .7, .2, 1); }
.ovc-plot.in .ovc-svg { clip-path: inset(-12px -12px 0 0); }
.ovc-svg path, .ovc-svg linearGradient { color: var(--c); }
.ovc-svg path[stroke] { filter: drop-shadow(0 6px 10px color-mix(in srgb, var(--c) 45%, transparent)); }
.ovc-guide { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed rgba(255, 255, 255, 0.28); opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.ovc-guide.on { opacity: 1; }
.ovc-dot { position: absolute; width: 11px; height: 11px; border-radius: 50%; background: var(--c); border: 2px solid var(--card); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); transform: translate(-50%, 50%); opacity: 0; pointer-events: none; transition: opacity 0.15s, left 0.12s, bottom 0.12s; z-index: 2; }
.ovc-dot.on { opacity: 1; }
.ovc-cols { position: absolute; inset: 0; display: flex; gap: 4px; }
.ovc-col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; border-radius: 7px 7px 0 0; transition: background 0.15s, opacity 0.15s; min-width: 0; }
.ovc-plot.hovering .ovc-col:not(.hl) { opacity: 0.45; }
.ovc-col.hl { background: rgba(255, 255, 255, 0.035); }
.ovc-group { width: 100%; max-width: 32px; height: 100%; display: flex; align-items: flex-end; gap: 3px; }
.ovc-group .ovc-bar { flex: 1; }
.ovc-stack { width: 100%; max-width: 24px; height: 100%; display: flex; flex-direction: column-reverse; gap: 2px; }
.ovc-bar { display: block; height: 0; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 45%, #0d0d0d)); transition: height 0.75s cubic-bezier(.2, .8, .2, 1); }
.ovc-stack .ovc-bar { border-radius: 4px; }
.ovc-col.today .ovc-bar { box-shadow: 0 0 14px color-mix(in srgb, var(--c) 35%, transparent); }
.ovc-hit { position: absolute; inset: 0; display: flex; z-index: 3; }
.ovc-hit span { flex: 1; cursor: crosshair; }
.ovc-tip { position: absolute; top: 4px; left: 0; z-index: 4; min-width: 150px; max-width: 220px; padding: 10px 12px; border-radius: 12px; background: rgba(16, 16, 16, 0.96); border: 1px solid var(--line-hi); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55); font-size: 12.5px; pointer-events: none; opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity 0.12s, transform 0.12s, visibility 0.12s; }
.ovc-tip.on { opacity: 1; visibility: visible; transform: none; }
.ovc-tip > b { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; margin-bottom: 7px; white-space: nowrap; }
.ovc-tip > b em { font-style: normal; font-size: 10.5px; color: #e5e5e5; background: rgba(255, 255, 255, 0.05); border-radius: 999px; padding: 1px 7px; }
.ovc-tip-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.ovc-tip-row i { width: 8px; height: 8px; border-radius: 3px; background: var(--c); flex: none; }
.ovc-tip-row span { flex: 1; color: var(--muted); white-space: nowrap; }
.ovc-tip-row b { font-variant-numeric: tabular-nums; }
.ovc-tip-row.total { border-top: 1px solid var(--line); margin-top: 7px; padding-top: 7px; }
.ovc-x { display: flex; gap: 4px; margin-top: 9px; }
.ovc-x span { flex: 1; text-align: center; color: var(--faint); font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 0; }
.ovc-x span.today { color: var(--text); font-weight: 800; }
.ov-types { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.ov-types-l { color: var(--faint); font-size: 12px; font-weight: 700; margin-right: 2px; }
.ov-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: color-mix(in srgb, var(--c) 75%, #fff); background: color-mix(in srgb, var(--c) 10%, transparent); border: 1px solid color-mix(in srgb, var(--c) 24%, transparent); }
.ov-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.ov-chip b { color: var(--text); font-variant-numeric: tabular-nums; }
.ov-empty { position: relative; overflow: hidden; display: grid; place-items: center; border: 1px dashed var(--line-hi); border-radius: 14px; }
.ov-empty-ghost { position: absolute; inset: 22px 22px 0; display: flex; align-items: flex-end; gap: 8px; opacity: 0.6; -webkit-mask-image: linear-gradient(0deg, #000, transparent); mask-image: linear-gradient(0deg, #000, transparent); }
.ov-empty-ghost i { flex: 1; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)); }
.ov-empty-t { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 0 20px; }
.ov-empty-t .ov-ico { margin-bottom: 4px; }
.ov-empty-t b { font-size: 14px; }
.ov-empty-t span { color: var(--faint); font-size: 13px; max-width: 340px; line-height: 1.5; }

/* Lists: recent actions and top */
.ov-bottom { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; align-items: stretch; }
.ov-bottom > .ov-card { display: flex; flex-direction: column; }
.ov-bottom > .ov-card .ov-rows { flex: 1; grid-auto-rows: 1fr; }
.ov-rows { display: grid; margin: 0 -10px; }
.ov-row, .ov-top { display: grid; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; min-width: 0; position: relative; }
.ov-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.ov-row + .ov-row::before, .ov-top + .ov-top::before { content: ""; position: absolute; left: 10px; right: 10px; top: 0; border-top: 1px solid var(--line); }
.ov-row.click { cursor: pointer; transition: background 0.15s; }
.ov-row.click:hover { background: var(--hover); }
.ov-row.click:hover::before, .ov-row.click:hover + .ov-row::before { opacity: 0; }
.ov-ava { position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: linear-gradient(145deg, #222, #121212); border: 1px solid var(--line-hi); font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--muted); }
.ov-ava-type { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #0b0b0b; border: 2px solid var(--card); }
.ov-ava-type svg.i { width: 10px; height: 10px; stroke-width: 2.8; }
.ov-row-main, .ov-top-main { min-width: 0; }
.ov-row-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ov-name { min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-type { flex: none; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 26%, transparent); white-space: nowrap; }
.ov-row-sub { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 12.5px; min-width: 0; }
.ov-mod { display: inline-flex; align-items: center; gap: 4px; flex: 0 1 auto; max-width: 45%; min-width: 0; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-mod svg.i { width: 12px; height: 12px; color: var(--faint); flex: none; }
.ov-reason { flex: 1 1 0; min-width: 0; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-reason::before { content: "·"; margin-right: 8px; color: #3a3a3a; }
.ov-row time { color: var(--faint); font-size: 12px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ov-top { grid-template-columns: auto auto minmax(0, 1fr) auto; }
.ov-top.r1 { background: linear-gradient(90deg, rgba(245, 158, 11, 0.08), transparent 70%); }
.ov-rank { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-family: var(--display); font-weight: 700; font-size: 11.5px; color: var(--muted); background: var(--active); border: 1px solid var(--line-hi); }
.ov-rank svg.i { width: 13px; height: 13px; stroke-width: 2.4; }
.ov-rank.m1 { color: #3b2300; border: 0; background: linear-gradient(145deg, #fde68a, #f59e0b); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14), 0 4px 14px rgba(245, 158, 11, 0.28); }
.ov-rank.m2 { color: #1f2937; border: 0; background: linear-gradient(145deg, #f3f4f6, #9ca3af); box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.12); }
.ov-rank.m3 { color: #2a1300; border: 0; background: linear-gradient(145deg, #fdba74, #c2410c); box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12); }
.ov-top-main .ov-row-top small { margin-left: auto; flex: none; color: var(--faint); font-size: 11.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ov-xp { height: 6px; margin-top: 8px; border-radius: 99px; background: #1a1a1a; overflow: hidden; }
.ov-xp i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #737373, #e5e5e5); transition: width 0.9s cubic-bezier(.2, .8, .2, 1); }
.ov-top.r1 .ov-xp i { background: linear-gradient(90deg, #f59e0b, #fde68a); }
.ov-lvl { flex: none; font-family: var(--display); font-weight: 700; font-size: 11px; padding: 4px 9px; border-radius: 999px; color: #e5e5e5; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14); white-space: nowrap; }
.ov-list .empty-state { padding: 34px 10px; }

@container (max-width: 1180px) {
    .ov-minis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container (max-width: 900px) {
    .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ov-bottom { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 720px) {
    .ov-charts { grid-template-columns: minmax(0, 1fr); }
    .ov-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ov-fig:nth-child(3) { border-left: 0; }
    .ov-fig:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@container (max-width: 540px) {
    .ov-kpis, .ov-minis { gap: 10px; }
    .ov-minis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ov-kpi { padding: 14px 14px 0; }
    .ov-kpi-num { font-size: 24px; margin: 14px 0 8px; }
    .ov-spark { width: calc(100% + 28px); margin: auto -14px 0; }
    .ov-kpi .ov-delta-row small { display: none; }
    .ov-mini { padding: 12px; }
    .ov-mini-t span { white-space: normal; line-height: 1.3; }
    .ov-card { padding: 16px; }
    .ovc { grid-template-columns: 28px minmax(0, 1fr); gap: 6px; }
    .ovc-x span.odd { visibility: hidden; }
    .ovc-cols, .ovc-x { gap: 2px; }
    .ov-mod { max-width: 50%; }
    .ov-top-main .ov-row-top small { display: none; }
}

/* Language picker (RU / UA / EN) */
.lang-wrap { position: relative; display: inline-flex; }
.lang-menu { position: absolute; top: calc(100% + 8px); right: 0; display: none; flex-direction: column; gap: 2px; min-width: 170px; padding: 6px; border-radius: 14px; border: 1px solid var(--line-hi); background: #0b0b0d; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6); z-index: 60; }
.lang-menu.open { display: flex; }
.lang-menu button { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; padding: 8px 10px; border-radius: 9px; cursor: pointer; text-align: left; }
.lang-menu button:hover { background: rgba(255, 255, 255, 0.06); }
.lang-menu button.on { background: #fff; color: #000; }
.lang-menu button b { width: 22px; font-weight: 800; }

/* Admin → Фильмотека (public/cinema-admin.js) */
.cm-grid .rp-card { grid-column: 1 / -1; }
.cm-row2 { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 12px; }
.cm-year { -moz-appearance: textfield; }
.cm-hint { color: var(--faint); font-size: 12px; }
.cm-check { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line-hi); background: var(--card-hi); font-weight: 700; font-size: 13px; cursor: pointer; }
.cm-check input { margin-top: 2px; accent-color: #fff; }
.cm-hidden { display: none; }
.cm-list { display: grid; gap: 10px; }
.cm-film { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--card-hi); }
.cm-film.cm-edit { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
.cm-poster { width: 54px; height: 78px; border-radius: 8px; overflow: hidden; background: #0b0b0b; border: 1px solid var(--line-hi); display: grid; place-items: center; color: var(--faint); }
.cm-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-info { display: grid; gap: 4px; min-width: 0; }
.cm-info small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.cm-info .cm-rights { color: var(--faint); }
.cm-title { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.cm-title b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.cm-title > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.cm-title .cm-st { padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-hi); font-size: 11px; }
.cm-st.ready { color: #86efac; border-color: rgba(34, 197, 94, 0.4); }
.cm-st.processing, .cm-st.uploading { color: #fcd34d; border-color: rgba(245, 158, 11, 0.4); }
.cm-st.error { color: #fca5a5; border-color: rgba(239, 68, 68, 0.45); }
.cm-progress { display: grid; gap: 2px; margin-top: 4px; }
.cm-progress .meter { margin: 0; }
.cm-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cm-prog { display: grid; gap: 6px; }
.cm-pitem { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto 34px 34px; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-hi); }
.cm-pitem b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-pitem small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.cm-num { color: var(--faint); font-weight: 800; font-size: 12px; text-align: center; }
.cm-gapl { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.cm-gap { width: 70px; padding: 6px 10px; }
.cm-today div.now b, .cm-today div.now span { color: #fff; }
.cm-today div.now svg.i { color: #22c55e; }
@media (max-width: 700px) {
    .cm-film { grid-template-columns: 54px minmax(0, 1fr); }
    .cm-acts { grid-column: 1 / -1; justify-content: flex-start; }
    .cm-pitem { grid-template-columns: 24px minmax(0, 1fr) 34px 34px; }
    .cm-pitem small, .cm-gapl { grid-column: 2 / -1; }
}
.cm-file { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cm-file .btn { cursor: pointer; }
.cm-fname { color: var(--muted); font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* Игровые серверы: превью вида сообщения со статусом */
.gs-pv-title { margin: 18px 0 8px; font-size: 13px; font-weight: 600; color: var(--sub, #9a9a9a); }
.gs-preview .dc-e-field { min-width: 0; }
.gs-preview .dc-e-fields { display: grid; gap: 10px; }
.gs-quote { border-left: 4px solid rgba(128, 132, 142, .45); padding-left: 8px; margin-top: 2px; }
.gs-line { font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.gs-line code { background: rgba(128, 132, 142, .22); border-radius: 3px; padding: 0 4px; }
.gs-card { padding: 0; border-left-color: transparent; background: transparent; }
.gs-card .post-image { margin: 0; border-radius: 8px; max-width: 100%; }
/* The picture is shown whole at its own aspect ratio (the generic .post-image crops to 260px). */
.gs-preview .post-image { width: auto; max-width: 100%; height: auto; max-height: none; object-fit: contain; margin-top: 8px; }
.gs-preview .dc-e-fields { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
/* Bold inside a field line stays inline (landing.css makes every field <b> a block). */
.gs-preview .gs-line b { display: inline; font-size: inherit; color: inherit; margin: 0; }
.gs-preview .dc-e-desc { margin-bottom: 8px; }

/* Новички: плитки тем входа и выхода */
.banners-card { display: flex; flex-direction: column; gap: 12px; }
.banners-card .cards-tabs { align-self: flex-start; }
.prem-badge { margin-left: 8px; vertical-align: middle; font-size: 10.5px; padding: 1px 7px; letter-spacing: 0.02em; }
.prem-hint { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.prem-hint svg { width: 13px; height: 13px; flex: none; }
.prem-hint a { color: var(--text); text-decoration: underline; }
.seg button.locked, .banner-tile.locked, .switch.locked { opacity: 0.5; cursor: not-allowed; }
.banner-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.banner-tiles.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .banner-tiles, .banner-tiles.n4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .banner-tiles, .banner-tiles.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.banner-group { display: flex; flex-direction: column; gap: 8px; }
.banner-group > .label { margin: 0; }
.banner-preview { display: block; width: 100%; max-width: 520px; aspect-ratio: 934 / 360; border-radius: 12px; border: 1px solid var(--line); background: var(--active); object-fit: cover; }
.banners-card .hint { margin: 0; }
.field-with-hint { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hint.vars { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.hint.vars code { background: var(--active); border-radius: 6px; padding: 1px 6px; font-size: 11.5px; }
.mini-toggles.one { grid-template-columns: 1fr; }
.banners-card .btn-row { align-items: center; flex-wrap: wrap; }
.banner-tile { display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; text-align: left; transition: border-color 0.15s, background 0.15s; }
.banner-tile img { display: block; width: 100%; aspect-ratio: 1000 / 360; border-radius: 8px; object-fit: cover; background: var(--active); }
.banner-tile:hover { border-color: var(--line-hi); }
.banner-tile.on { border-color: #fff; color: var(--text); background: var(--active); }
@media (max-width: 520px) { .banners-card .seg { display: flex; flex-direction: column; align-items: stretch; border-radius: 16px; } .banners-card .seg button { white-space: normal; } }

/* ── Страница «Подписка» (billingPage): всё под префиксом .sub-…, новых цветов нет вне .sub-page ── */
@font-face { font-family: "OPLOT Pixel"; src: url("/fonts/PressStart2P-Regular.ttf") format("truetype"); font-display: swap; }
.sub-page {
    --sub-pink: #fafafa;
    --sub-violet: #d4d4d4;
    --sub-blue: #4fb3ff;
    --sub-gold: #ffc440;
    --sub-grad: linear-gradient(90deg, var(--sub-pink), var(--sub-violet));
    --sub-safe: #a3a3a3;
    --sub-act: #a3a3a3;
    --sub-srv: #a3a3a3;
    --sub-fun: #a3a3a3;
    --sub-pixel: "OPLOT Pixel", var(--display), monospace;
}
.sub-g-safe { --c: var(--sub-safe); }
.sub-g-act { --c: var(--sub-act); }
.sub-g-srv { --c: var(--sub-srv); }
.sub-g-fun { --c: var(--sub-fun); }
.sub-page.sub-calc-on { padding-bottom: 60px; }
.sub-cq { container-type: inline-size; display: grid; gap: 22px; }

/* сервер владельца */
.sub-owner { position: relative; overflow: hidden; display: flex; gap: 16px; align-items: center; padding: 16px 20px; border-radius: var(--radius); border: 1px solid #4a3c14; background: linear-gradient(100deg, #2a2108, #15130c 55%, var(--card)); }
.sub-owner::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, transparent 30%, rgba(255, 196, 64, 0.12) 45%, transparent 60%); background-size: 250% 100%; animation: sub-gl 5s linear infinite; }
@keyframes sub-gl { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.sub-crown { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex: none; background: rgba(255, 196, 64, 0.14); border: 1px solid rgba(255, 196, 64, 0.4); color: var(--sub-gold); }
.sub-crown svg.i { width: 22px; height: 22px; }
.sub-owner .t { display: grid; gap: 2px; min-width: 0; }
.sub-owner .t b { font-family: var(--display); font-size: 17px; }
.sub-owner .t span { color: var(--muted); font-size: 13px; }
.sub-ok { margin-left: auto; padding: 6px 12px; border-radius: 999px; background: rgba(255, 196, 64, 0.14); color: var(--sub-gold); font-weight: 800; font-size: 13px; white-space: nowrap; }

/* переключатели: вкладки, период, тариф — белая «таблетка» переезжает */
.sub-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.sub-page .seg.sub-seg { position: relative; display: inline-grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 0; }
.sub-seg button { position: relative; z-index: 1; gap: 8px; }
.sub-page .sub-seg button.on { background: transparent; color: #000; }
.sub-pill { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n, 2)); border-radius: 999px; background: #fff; transform: translateX(calc(var(--i, 0) * 100%)); transition: transform 0.28s cubic-bezier(0.3, 0.7, 0.3, 1); }
.sub-saving { font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: rgba(34, 197, 94, 0.16); color: var(--green); }
.sub-page .seg.sub-tabs button { font-size: 13.5px; padding: 8px 22px; }
.sub-period.gone { display: none; }

/* вкладки: плавная смена */
.sub-pane { display: none; opacity: 1; transform: none; filter: none; transition: opacity 0.16s ease, transform 0.2s ease; }
.sub-pane.on { display: block; }
.sub-pane.leave { opacity: 0; transform: translateY(-6px); }
.sub-pane.pre { opacity: 0; transform: translateY(10px); transition: none; }

/* вкладка «Тариф» (в духе pricing-7) */
.sub-hero { display: grid; justify-items: center; gap: 10px; text-align: center; margin-bottom: 22px; }
.sub-badge { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-hi); background: var(--active); color: var(--muted); font-size: 12px; font-weight: 700; }
.sub-hero h2 { margin: 0; font-family: var(--display); font-size: clamp(26px, 4.2vw, 40px); line-height: 1.1; letter-spacing: -0.02em; }
.sub-hero p { margin: 0; max-width: 460px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.sub-planseg { margin-top: 6px; }
.sub-planseg button { min-width: 96px; font-size: 13.5px; padding: 8px 20px; }
.sub-frame { max-width: 880px; margin: 0 auto; padding: 4px; border-radius: 32px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.sub-card { position: relative; overflow: hidden; border-radius: 24px; background: var(--card); border: 1px solid var(--line-hi); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 24px 48px -16px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.sub-card-in { display: grid; grid-template-columns: minmax(0, 1.15fr) 1px minmax(0, 1fr); gap: 0 32px; padding: 32px; transition: opacity 0.5s cubic-bezier(0.34, 1.4, 0.5, 1), transform 0.5s cubic-bezier(0.34, 1.4, 0.5, 1), filter 0.4s ease; }
.sub-card-in.out { opacity: 0; transform: translateY(-6px); filter: blur(2px); transition-duration: 0.14s; transition-timing-function: ease-in; }
.sub-card-in.pre { opacity: 0; transform: translateY(14px); filter: blur(2px); transition: none; }
.sub-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; align-content: start; }
.sub-feats li { display: flex; align-items: flex-start; gap: 12px; }
.sub-chk { width: 22px; height: 22px; flex: none; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--green)) 18%, transparent); color: var(--c, var(--green)); }
.sub-chk svg.i { width: 13px; height: 13px; }
.sub-feats li:has(.sub-g-safe) .sub-chk { --c: var(--sub-safe); }
.sub-feats li:has(.sub-g-act) .sub-chk { --c: var(--sub-act); }
.sub-feats li:has(.sub-g-srv) .sub-chk { --c: var(--sub-srv); }
.sub-feats li:has(.sub-g-fun) .sub-chk { --c: var(--sub-fun); }
.sub-fl { display: grid; gap: 2px; min-width: 0; }
.sub-fl b { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.sub-fl span { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.sub-div { background: var(--line-hi); }
.sub-pb { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.sub-pn { display: flex; align-items: center; gap: 10px; }
.sub-pn b { font-family: var(--display); font-size: 22px; }
.sub-pd { margin: 0 0 8px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.sub-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.sub-price b { font-family: var(--display); font-weight: 800; font-size: 48px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.sub-price s { color: var(--faint); font-size: 18px; font-weight: 700; }
.sub-per { color: var(--muted); font-size: 13px; font-weight: 700; }
.sub-save { margin-top: 4px; padding: 5px 12px; border-radius: 999px; background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.3); color: #86efac; font-size: 12.5px; font-weight: 800; }
.sub-pb > .btn { margin-top: auto; align-self: stretch; }
.sub-pb .sub-save + .btn, .sub-pb .sub-per + .btn { margin-top: 18px; }
.sub-page .sub-fancy { position: relative; overflow: hidden; height: 48px; gap: 8px; border-radius: 999px; font-weight: 800; font-size: 14.5px; }
.sub-page .sub-fancy.on { border: 0; background: var(--sub-grad); color: #0a0a0a; box-shadow: 0 10px 28px -8px rgba(255, 255, 255, 0.04); }
.sub-page .sub-fancy.on:hover { background: var(--sub-grad); filter: brightness(1.1); }
.sub-fancy.on::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.3) 50%, transparent 65%); background-size: 250% 100%; animation: sub-gl 3.4s linear infinite; }
.sub-fancy svg.i { width: 17px; height: 17px; transition: transform 0.2s; }
.sub-fancy:hover svg.i { transform: translateX(4px); }
.sub-thumbs { width: 100%; max-width: 870px; margin: 28px auto 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; transition: opacity 0.2s; }
.sub-thumbs.off { display: none; }
.sub-thumbs img { display: block; width: 100%; height: auto; aspect-ratio: 25 / 9; object-fit: contain; border-radius: 12px; background: transparent; }
.sub-thumbs-cap { max-width: 870px; margin: 12px auto 0; text-align: center; color: var(--faint); font-size: 12.5px; }
.sub-thumbs-cap.off { display: none; }
.sub-help { margin: 28px 0 0; text-align: center; color: var(--faint); font-size: 13.5px; }
.sub-help a, .sub-link { color: var(--text); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-hi); }
.sub-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; cursor: pointer; }
.sub-help a:hover, .sub-link:hover { text-decoration-color: var(--text); }

/* вкладка «Модули»: ItemGroup из строк (8bit) */
.sub-mhead { display: grid; gap: 10px; margin-bottom: 14px; }
.sub-mhead .muted { margin: 0; font-size: 13px; }
.sub-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sub-group { display: flex; flex-direction: column; padding-right: 4px; }
.sub-sep { height: 1px; margin: 8px 0; background: var(--line); }
.sub-item { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--line-hi); border-radius: 6px; background: var(--card); transition: border-color 0.15s, background 0.15s; }
.sub-item:hover { border-color: rgba(255, 255, 255, 0.28); }
.sub-media { position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 6px; font-size: 20px; background: color-mix(in srgb, var(--c, #888) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c, #888) 32%, var(--line)); }
.sub-media em { position: absolute; right: -6px; bottom: -6px; padding: 1px 5px; border-radius: 999px; background: var(--active); border: 1px solid var(--line-hi); color: var(--muted); font: 700 10px var(--display); font-style: normal; }
.sub-media.lg { width: 56px; height: 56px; font-size: 26px; }
.sub-content { flex: 1; min-width: 0; display: grid; gap: 4px; }
.sub-desc { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sub-dep { color: var(--faint); font-size: 11.5px; font-weight: 700; }
.sub-act { flex: none; display: flex; align-items: center; justify-content: flex-end; max-width: 190px; text-align: right; }
.sub-act-col { display: grid; justify-items: end; gap: 6px; }
.sub-note { color: var(--faint); font-size: 12.5px; font-weight: 700; line-height: 1.3; }
.sub-note.ok { color: #86efac; }
.sub-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; line-height: 18px; border: 1px solid var(--line-hi); border-radius: 6px; background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.sub-btn:hover { background: var(--active); border-color: rgba(255, 255, 255, 0.3); }
.sub-btn svg.i { width: 15px; height: 15px; }
.sub-page .sub-btn.on { background: var(--sub-violet); border-color: var(--sub-violet); color: #0a0a0a; }
/* retro: пиксельный шрифт — только название и цена; рамки жирнее, тени без размытия */
.sub-item:not(.sub-hrow) { border-width: 2px; }
.sub-item:not(.sub-hrow) .sub-btn { border-width: 2px; }
.sub-item:not(.sub-hrow) .sub-media { border-width: 2px; }
.sub-item.sel { border-color: var(--sub-violet);  }
.sub-ttl { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-family: var(--sub-pixel); font-size: 11px; line-height: 1.6; }
.sub-ttl b { font-weight: 400; color: var(--text); }
.sub-ttl i { font-style: normal; color: var(--faint); }
.sub-pr { color: var(--sub-gold); }

/* вкладка «История» */
.sub-code { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding: 16px; margin-bottom: 18px; border: 1px dashed var(--line-hi); border-radius: 12px; }
.sub-code .t { display: grid; gap: 2px; min-width: 0; }
.sub-code .t b { font-size: 14px; }
.sub-code .t span { color: var(--muted); font-size: 12.5px; }
.sub-code .code-row { flex: 1 1 320px; max-width: 480px; }
.sub-hist { display: grid; gap: 10px; }
.sub-month { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--faint); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.sub-month:first-child { margin-top: 0; }
.sub-month span { padding: 1px 7px; border-radius: 999px; background: var(--active); font-size: 11px; letter-spacing: 0; }
.sub-hrow .sub-media { --c: #8a8a8a; }
.sub-hname { font-size: 14.5px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.sub-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--muted); font-size: 12.5px; }
.sub-meta span + span { position: relative; }
.sub-meta span + span::before { content: ""; position: absolute; left: -8px; top: 50%; width: 3px; height: 3px; margin-top: -1.5px; border-radius: 50%; background: var(--faint); }
.sub-hright { flex: none; display: grid; justify-items: end; gap: 6px; }
.sub-hright b { font-family: var(--display); font-size: 16px; font-variant-numeric: tabular-nums; }
.sub-hright b.dim { color: var(--faint); }
.sub-st { padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; white-space: nowrap; background: var(--active); color: var(--muted); }
.sub-st.green { background: rgba(34, 197, 94, 0.14); color: #86efac; }
.sub-st.amber { background: rgba(245, 158, 11, 0.14); color: #fcd34d; }
.sub-st.red { background: rgba(239, 68, 68, 0.14); color: #fca5a5; }
.sub-empty { display: grid; justify-items: center; gap: 8px; padding: 44px 16px; text-align: center; border: 1px dashed var(--line-hi); border-radius: 12px; }
.sub-empty b { font-family: var(--display); font-size: 18px; }
.sub-empty p { margin: 0 0 8px; max-width: 360px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

/* калькулятор: выезжает снизу окна, когда выбран хотя бы один модуль */
.sub-dock { position: sticky; bottom: 18px; height: 0; z-index: 25; pointer-events: none; }
.sub-calc { position: absolute; left: 0; right: 0; bottom: 0; width: min(760px, 100%); margin: 0 auto; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 16px 14px 20px; border-radius: 18px; background: rgba(20, 20, 20, 0.96); border: 1px solid var(--line-hi); box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.8); backdrop-filter: blur(10px); transform: translateY(170%); opacity: 0; visibility: hidden; pointer-events: none; transition: transform 0.3s cubic-bezier(0.3, 0.7, 0.3, 1), opacity 0.2s, visibility 0s 0.3s; }
.sub-calc.show { transform: none; opacity: 1; visibility: visible; pointer-events: auto; transition: transform 0.3s cubic-bezier(0.3, 0.7, 0.3, 1), opacity 0.2s, visibility 0s; }
.sub-calc .s { flex: 1 1 220px; min-width: 0; display: grid; gap: 2px; }
.sub-calc-sum { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.sub-calc-sum b { font-family: var(--display); font-weight: 800; font-size: 18px; }
.sub-calc-sum small, .sub-calc-sum span { color: var(--muted); font-weight: 700; font-size: 13px; }
.sub-calc-hint { color: var(--muted); font-size: 12.5px; }
.sub-calc-hint.win { color: #86efac; }
.sub-calc .btn { height: 44px; white-space: nowrap; }
.sub-page .sub-cta { position: relative; overflow: hidden; border: 0; background: var(--sub-grad); color: #0a0a0a; font-weight: 800; font-size: 15px; box-shadow: 0 10px 30px -8px rgba(255, 255, 255, 0.04); }
.sub-page .sub-cta:hover { background: var(--sub-grad); filter: brightness(1.1); }
.sub-cta::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.35) 50%, transparent 65%); background-size: 250% 100%; animation: sub-gl 3.2s linear infinite; }

/* окно «Заявка» с корзиной (создаётся в body) */
.sub-cart-list { display: grid; gap: 8px; max-height: 240px; overflow-y: auto; }

@container (max-width: 720px) {
    .sub-card-in { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 24px 20px; }
    .sub-div { height: 1px; order: 0; }
    .sub-pb { order: -1; }
    .sub-feats { order: 1; }
    .sub-div { order: 0; }
    .sub-price b { font-size: 40px; }
}
@container (max-width: 560px) {
    .sub-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .sub-item { flex-wrap: wrap; padding: 14px; gap: 12px; }
    .sub-item .sub-content { flex-basis: calc(100% - 60px); }
    .sub-act { max-width: none; width: 100%; justify-content: flex-start; padding-left: 56px; text-align: left; }
    .sub-act-col { justify-items: start; }
    .sub-hrow { flex-wrap: nowrap; }
    .sub-hrow .sub-media { width: 38px; height: 38px; font-size: 17px; }
    .sub-hrow .sub-content { flex-basis: auto; }
    .sub-ttl { font-size: 10px; }
    .sub-bar .seg.sub-tabs { width: 100%; }
    .sub-page .seg.sub-tabs button { padding-left: 8px; padding-right: 8px; }
    .sub-bar .seg.sub-period { width: 100%; }
}
@media (max-width: 900px) { .sub-dock { bottom: 76px; } }
@media (max-width: 560px) {
    .sub-owner { flex-wrap: wrap; }
    .sub-ok { margin-left: 0; }
    .sub-calc .btn { flex: 1 1 140px; }
}
@media (prefers-reduced-motion: reduce) {
    .sub-page *, .sub-page *::before, .sub-page *::after { animation: none !important; transition: none !important; }
}

/* ── Layout polish: aligned fields, ladder, audit list ──────────────────── */
/* Fields in one row: equal height, label on top, control pinned to the bottom,
   so a wrapped label never pushes its neighbour's input out of line. */
.fields-grid { align-items: stretch; }
.fields-grid > .field { display: flex; flex-direction: column; min-width: 0; }
.fields-grid > .field > .label { flex: 1 0 auto; }
.fields-grid > .field > .fsel, .fields-grid > .field > .input, .fields-grid > .field > .suffix { width: 100%; }
/* Number fields fill the column; the range hint sits inside on the right. */
.field > .suffix { position: relative; display: block; }
.field > .suffix .input { padding-right: 92px; }
.field > .suffix span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); pointer-events: none; font-weight: 600; }
.field > .suffix input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.field > .suffix input[type=number]::-webkit-inner-spin-button, .field > .suffix input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* A lone toggle fills the row instead of leaving half of it empty. */
.toggles:has(> .field:only-child) { grid-template-columns: minmax(0, 1fr); }
/* Feature cards side by side: fields fill the card and sit on one bottom line. */
.feat-card .fields-grid:has(> .field:only-child) { grid-template-columns: minmax(0, 1fr); }
.feat-card .fields-grid:has(> .field:nth-child(2):last-child) { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.rule-grid > .feat-card:has(> .fields-grid:nth-child(2):last-child) { grid-template-rows: auto 1fr; }
.rule-grid > .feat-card > .fields-grid:nth-child(2):last-child { align-self: end; }
@media (max-width: 700px) {
    .feat-card .fields-grid:has(> .field:nth-child(2):last-child) { grid-template-columns: minmax(0, 1fr); }
    .fields-grid > .field > .label { flex: 0 0 auto; }
}
/* "Send panel": select and button are one height. */
.publish-row { align-items: stretch; }
.publish-row .fsel-btn, .publish-row select.input { min-height: 44px; height: 100%; }
.publish-row .btn { min-height: 44px; flex: none; }

/* Punishment ladder: every card has the same five rows. */
.ladder { gap: 8px; }
.ladder-step { display: grid; grid-template-rows: 42px 22px 34px 34px 1fr; row-gap: 8px; justify-items: center; align-items: center; padding: 18px 12px 14px; }
.ladder-step small { margin: 0; padding: 0; align-self: end; line-height: 1.35; }
.ladder-at, .ladder-detail { min-height: 0; width: 100%; justify-content: center; text-align: center; }
.ladder-arrow { align-self: center; flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-hi); background: var(--active); color: var(--muted); font-size: 14px; line-height: 1; }
@media (max-width: 900px) { .ladder-arrow { transform: rotate(90deg); margin: 0 auto; } }
/* Bottom cards: same structure, extra row pinned to the bottom. */
.rule-card.eq > .rule-extra { margin-top: auto; }
.rule-extra.between { justify-content: space-between; }

/* Security audit list */
.audit-list:not(.flat) { padding: 4px 8px; }
.audit-list:not(.flat) .audit-row { align-items: flex-start; gap: 14px; padding: 14px 10px; border-radius: 12px; }
.audit-list:not(.flat) .audit-row:hover { background: var(--hover); }
.audit-list:not(.flat) .audit-row .audit-dot { margin-top: 5px; }
.audit-list:not(.flat) .audit-row .btn { align-self: center; }
.audit-t { flex: 1; min-width: 0; display: grid; gap: 3px; }
.audit-t b { font-weight: 700; font-size: 14px; line-height: 1.45; }
.audit-t span { color: var(--faint); font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.audit-list:not(.flat) .audit-row.bad .audit-t b { color: #fff; }
@media (max-width: 600px) { .audit-list:not(.flat) .audit-row .btn { margin-left: 24px; align-self: flex-start; } }

/* ── «Рефералы» ───────────────────────────────────────────────────────── */
/* «Рефералы»: header with the link, stats strip, tabs card */
.ref-page { max-width: 1200px; margin-inline: auto; width: 100%; align-items: stretch; }
.ref-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 1.05fr); gap: 12px 24px; align-items: center; padding: 14px 18px; }
.ref-hero h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-family: var(--display); font-size: 18px; font-weight: 800; line-height: 1.25; }
.ref-hero p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.ref-partner { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-family: inherit; font-size: 12px; font-weight: 800; color: #fde68a; background: rgba(245, 158, 11, 0.16); }
.ref-partner svg.i { width: 13px; height: 13px; }
.ref-link { display: flex; gap: 10px; align-items: stretch; }
.ref-link-box { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-hi); background: rgba(0, 0, 0, 0.28); color: var(--muted); }
.ref-link-box svg.i { width: 18px; height: 18px; flex: none; }
.ref-link-box .input { flex: 1; min-width: 0; height: 38px; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: 15px; font-weight: 700; color: var(--text); text-overflow: ellipsis; }
.ref-link-btns { display: flex; gap: 10px; flex: none; }
.ref-link-btns .btn { height: 38px; padding: 0 14px; font-weight: 800; white-space: nowrap; }
.ref-copy.done { background: #22c55e; border-color: #22c55e; color: #04210f; }
.ref-stats { display: grid; gap: 0; padding: 2px 18px; }
.ref-cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ref-cell { display: grid; gap: 3px; align-content: start; min-width: 0; }
.ref-cell span { color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; font-weight: 700; }
.ref-cell b { font-family: var(--display); font-size: 16px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.ref-cell.hot b { color: #fff; }
.ref-cell small { color: var(--muted); font-size: 11px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ref-rate { display: grid; grid-template-columns: auto minmax(80px, 1fr); gap: 14px; align-items: center; padding: 8px 0 10px; font-size: 12.5px; color: var(--muted); }
.ref-rate b { color: var(--text); }
.ref-prog { height: 6px; border-radius: 3px; background: var(--line-hi); overflow: hidden; }
.ref-prog i { display: block; height: 100%; border-radius: 3px; background: #fafafa; transition: width 0.6s; }
.ref-tabbox { padding: 10px 18px 16px; }
.ref-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 0 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.ref-tabs::-webkit-scrollbar { display: none; }
.ref-panel[hidden] { display: none; }
.ref-form { display: grid; gap: 12px; max-width: 520px; }
.ref-row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.ref-fld { display: grid; gap: 6px; min-width: 0; }
.ref-fld span { color: var(--faint); font-size: 12px; font-weight: 700; }
.ref-form .btn { justify-content: center; height: 44px; }
.ref-form .btn.sm { height: 36px; }
.ref-note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.ref-list { display: grid; }
.ref-item { display: grid; grid-template-columns: minmax(0, 1fr) auto 120px; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.ref-item:first-child { border-top: 0; padding-top: 0; }
.ref-item-t { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.ref-item-t small { color: var(--faint); font-size: 12px; }
.ref-item .sub-st { justify-self: end; }
.pay-ref[hidden], .pay-fee-note:empty { display: none !important; }
.pay-ref { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: rgba(34, 197, 94, 0.1); color: #86efac; font-weight: 700; font-size: 13.5px; }
.pay-ref b { margin-left: auto; color: #fff; }
.pay-ref s { color: var(--faint); font-weight: 600; }
.pay-promo { display: flex; gap: 8px; align-items: center; }
.pay-promo .input { flex: 1; min-width: 0; }
.pay-promo .input { flex: 1; min-width: 0; text-transform: uppercase; }
.pay-promo .input::placeholder { text-transform: none; }
.sc-ctl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sc-st { display: block; margin-top: 2px; font-weight: 700; }
.sc-st.auto { color: #4ade80; }
.sc-st.pin { color: #f9a8d4; }
.sc-st.hide { color: #f87171; }
.adm-ref { display: grid; gap: 6px; }
.adm-ref-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.adm-ref-row span { color: var(--muted); }
@media (max-width: 760px) {
    .ref-hero, .ref-tabbox { padding-left: 16px; padding-right: 16px; }
    .ref-stats { padding: 2px 16px; }
    .ref-hero { grid-template-columns: minmax(0, 1fr); }
    .ref-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ref-rate { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .ref-link { flex-direction: column; }
    .ref-link-box { min-height: 46px; }
    .ref-link-btns .btn { flex: 1; justify-content: center; }
    .ref-cell span { font-size: 11.5px; }
    .ref-item { grid-template-columns: minmax(0, 1fr) auto; }
    .ref-item .sub-st { grid-column: 1 / -1; justify-self: start; }
}


/* ═══════════════════════════════════════════════════════════════════════
   Phone app layer. Desktop (> 900 px) is untouched: everything below sits
   behind max-width media queries. Shell: fixed top bar (back / title / server),
   scrolling content, tab bar (.bottom-nav), bottom sheets for dialogs and
   dropdowns, safe-area paddings for notch, home indicator and gesture bar.
   ═══════════════════════════════════════════════════════════════════════ */
:root {
    --safe-t: env(safe-area-inset-top, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
    --safe-l: env(safe-area-inset-left, 0px);
    --safe-r: env(safe-area-inset-right, 0px);
    --topbar-h: 52px;
    --tabbar-h: 58px;
    --gut: 14px;
}
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, a, input, select, textarea, label, summary, [role="button"], [role="tab"] { touch-action: manipulation; }
/* Landscape phones above 900 px keep the desktop layout: just stay clear of the notch. */
@media (min-width: 901px) { body:has(.frame) { padding-left: max(16px, var(--safe-l)); padding-right: max(16px, var(--safe-r)); } }
.top-back, .top-mark, .top-guild, .side-tools { display: none; }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes toast-up { from { transform: translateY(14px); opacity: 0; } }

@media (max-width: 900px) {
    html, body { overflow-x: clip; max-width: 100%; overscroll-behavior-y: none; }
    body { -webkit-touch-callout: none; }
    input, textarea, [contenteditable] { -webkit-touch-callout: default; -webkit-user-select: text; user-select: text; }
    .boot, .center { min-height: 100vh; min-height: 100dvh; padding-top: max(20px, var(--safe-t)); padding-bottom: max(20px, var(--safe-b)); }
    .frame, .frame.collapsed { min-height: 100vh; min-height: 100dvh; }
    body:not(:has(.frame)):not(:has(.l-nav)) { padding-top: var(--safe-t); padding-left: var(--safe-l); padding-right: var(--safe-r); }

    /* top bar */
    .top { height: auto; min-height: calc(var(--topbar-h) + var(--safe-t)); padding: var(--safe-t) max(12px, var(--safe-r)) 0 max(12px, var(--safe-l)); gap: 8px;
        background: rgba(10, 10, 10, 0.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
    .top-menu, .top .grow, .search-btn, .top-sound, .top-lang, .top > .btn, .top .doc-btn { display: none; }
    .top.root .top-back { display: none; }
    .top:not(.root) .top-back { display: grid; margin-left: -6px; color: var(--text); }
    .top.root .top-mark { display: block; }
    .top-mark .mark { width: 32px; height: 32px; border-radius: 9px; }
    .crumbs { flex: 1 1 auto; min-width: 0; }
    .crumbs > span:not(.doc-help) { display: none; }
    .crumbs b { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
    .top-guild { display: flex; align-items: center; gap: 8px; flex: 0 1 46%; min-width: 0; min-height: 40px; padding: 3px 10px 3px 5px; border: 1px solid var(--line-hi); border-radius: 999px; background: var(--card); }
    .top-guild img, .top-guild .gi { width: 28px; height: 28px; border-radius: 50%; flex: none; }
    .top-guild .fsel { flex: 1; min-width: 0; }
    .top-guild .fsel-btn { border: 0; padding: 0; background: none; min-height: 34px; font-weight: 700; font-size: 13px; }
    .top-guild .fsel-btn svg.i { width: 13px; height: 13px; }

    /* page */
    .content { padding: 14px max(var(--gut), var(--safe-r)) calc(var(--tabbar-h) + var(--safe-b) + 32px) max(var(--gut), var(--safe-l)); }
    body.has-save .content { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 120px); }
    .page-head { margin-bottom: 14px; gap: 10px; }
    .page-head h1 { display: none; }
    .page-head:not(:has(p, .actions)) { display: none; }
    .page-head p { margin: 0; font-size: 13.5px; }
    .page-head .actions { margin-left: 0; flex-wrap: wrap; width: 100%; }
    .card { padding: 16px; }
    .card.hero, .card.hero-row { padding: 0; }
    .hero-row { padding: 14px 16px; }
    .stats, .stats-3, .cols-2, .grid, .stack, .charts { gap: 12px; }
    .stat { padding: 14px; }
    .stat b { font-size: 22px; }
    .content p, .content h2, .content h3, .content .label, .content .hint, .content .sub, .content small, .content code, .content .mono,
    .drawer p, .drawer h2, .modal p, .modal h2, .modal .pay-head b { overflow-wrap: anywhere; }
    .mono { white-space: normal; }
    img, video, canvas, svg { max-width: 100%; }
    pre, code { white-space: pre-wrap; overflow-wrap: anywhere; }

    /* section tabs: one swipeable strip pinned under the top bar */
    .sec-tabs { position: sticky; top: calc(var(--topbar-h) + var(--safe-t)); z-index: 9; flex-wrap: nowrap; gap: 4px; margin: 0 calc(var(--gut) * -1) 14px; padding: 6px var(--gut);
        border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: rgba(10, 10, 10, 0.96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
        scroll-snap-type: x proximity; scroll-padding: 0 var(--gut); overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
    .sec-tab { scroll-snap-align: center; min-height: 42px; padding: 0 14px; border-radius: 999px; }
    .sec-about { margin-bottom: 12px; }

    /* tab bar */
    .bottom-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0 var(--safe-r) var(--safe-b) var(--safe-l); background: rgba(8, 8, 8, 0.94); z-index: 35; }
    .bottom-nav button { position: relative; gap: 2px; min-height: var(--tabbar-h); padding: 8px 2px 6px; border-radius: 0; font-size: 10.5px; letter-spacing: 0; align-content: center; }
    .bottom-nav button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .bottom-nav button svg.i { width: 22px; height: 22px; }
    .bottom-nav button.on::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: #fff; }
    .bottom-nav button:active { background: var(--hover); }

    /* save bar above the tab bar */
    .savebar { left: max(10px, var(--safe-l)); right: max(10px, var(--safe-r)); width: auto; bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px); transform: translateY(calc(100% + var(--tabbar-h) + 80px));
        border-radius: 18px; padding: 10px; flex-wrap: wrap; z-index: 36; }
    .savebar.show { transform: none; }
    .savebar span { flex: 1 0 100%; text-align: left; font-size: 13px; padding: 0 4px; }
    .savebar .btn { flex: 1; }

    /* toasts above the tab bar */
    #toasts { top: auto; left: max(12px, var(--safe-l)); right: max(12px, var(--safe-r)); bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); justify-items: center; z-index: 70; pointer-events: none; }
    body.has-save #toasts { bottom: calc(var(--tabbar-h) + var(--safe-b) + 128px); }
    body:not(:has(.bottom-nav)) #toasts { bottom: calc(var(--safe-b) + 16px); }
    .toast { max-width: 100%; animation: toast-up 0.2s; pointer-events: auto; }

    /* side menu */
    .side { padding-top: calc(16px + var(--safe-t)); padding-bottom: calc(16px + var(--safe-b)); padding-left: max(10px, var(--safe-l)); overscroll-behavior: contain; width: min(300px, 86vw); }
    .side-tools { display: flex; align-items: center; gap: 6px; padding: 2px 6px 6px; }
    .side-tools .lang-menu { top: auto; bottom: calc(100% + 8px); left: 0; right: auto; }
    .nav { min-height: 44px; padding: 10px; }
    .scrim { z-index: 44; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
    body:has(.frame.nav-open), body:has(.overlay), body:has(.sheet-backdrop) { overflow: hidden; }

    /* tap targets and no zoom on focus */
    .btn, .btn.sm { min-height: 44px; }
    .btn.sm { padding-left: 14px; padding-right: 14px; }
    .icon-btn, .icon-btn.star { width: 44px; height: 44px; }
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]), textarea, select, .input, .palette input, .fsel-search { font-size: 16px; }
    .input, .fsel-btn, .buyer-in { min-height: 44px; }
    .switch input { inset: -10px -6px; width: auto; height: auto; }
    .chip { min-height: 32px; }
    .chip .x { min-width: 28px; min-height: 28px; }
    .chip.pick { min-height: 40px; }
    .list-row.click, .results button, .palette .opts button { min-height: 44px; }
    .pager .btn { min-width: 44px; }
    .seg button { min-height: 40px; }
    .adm-tabs button { min-height: 40px; }
    .doc-help { width: 24px; height: 24px; }
    .toolbar .input { max-width: none; }
    /* hover-only states must not stick after a tap */
    .btn:hover, .nav:hover, .icon-btn:hover, .list-row.click:hover, .tr.click:hover, .sec-tab:hover { background-color: transparent; }
    .btn.white:hover { background: #fff; }
    .nav.active:hover { background: var(--active); }
    .sec-tab.on:hover { background: #fff; }
    .btn:active, .nav:active, .list-row.click:active, .tr.click:active { background: var(--hover); }
    .btn.white:active { background: #e5e5e5; }
}

/* Dialogs become bottom sheets on phones. */
@media (max-width: 700px) {
    .overlay { background: rgba(0, 0, 0, 0.62); z-index: 60; }
    .drawer, .modal, .palette.pay {
        top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; transform: none;
        max-height: min(92vh, calc(100vh - var(--safe-t) - 16px)); max-height: min(92dvh, calc(100dvh - var(--safe-t) - 16px));
        border-width: 1px 0 0; border-radius: 22px 22px 0 0; padding-bottom: var(--safe-b); z-index: 61; overscroll-behavior: contain; animation: sheet-up 0.24s ease-out;
    }
    .drawer::before, .modal::before, .palette.pay::before { content: ""; display: block; position: sticky; top: 0; z-index: 3; height: 22px;
        background: linear-gradient(#3b3b3b, #3b3b3b) center / 40px 5px no-repeat, var(--frame); border-radius: 22px 22px 0 0; }
    .drawer-head { padding: 8px 16px 14px; }
    .drawer-head .icon-btn { top: 4px; right: 8px; }
    .drawer-body { padding: 14px 16px 22px; }
    .modal .pay-head, .palette.pay .pay-head { padding: 6px 12px 10px 16px; }
    /* search palette stays at the top */
    .palette:not(.pay) { top: calc(var(--safe-t) + 10px); left: 10px; right: 10px; width: auto; transform: none; max-height: 80vh; max-height: 80dvh; z-index: 61; }
    .palette:not(.pay) .opts { max-height: calc(80dvh - 60px); }
    /* dropdown list */
    .sheet-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.58); animation: fade 0.15s; }
    .fsel-pop.sheet { left: 0; right: 0; bottom: 0; top: auto; width: auto; z-index: 101; border-width: 1px 0 0; border-radius: 22px 22px 0 0; padding: 0 10px calc(10px + var(--safe-b));
        max-height: 78vh; max-height: 78dvh; animation: sheet-up 0.22s ease-out; overscroll-behavior: contain; }
    .sheet-grip { display: block; width: 40px; height: 5px; border-radius: 3px; background: #3b3b3b; margin: 9px auto 3px; }
    .fsel-pop.sheet .fsel-list { max-height: calc(78dvh - 80px); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
    .fsel-pop.sheet .fsel-opt { min-height: 48px; font-size: 15px; padding: 10px 12px; border-radius: 12px; }
    .fsel-pop.sheet .fsel-opt:active { background: #262626; }
    .fsel-pop.sheet .fsel-search { min-height: 44px; }
}
@media (min-width: 701px) { .sheet-grip { display: none; } }

/* Landscape phone: a low tab bar and top bar. */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
    :root { --topbar-h: 44px; --tabbar-h: 46px; }
    .bottom-nav button { grid-auto-flow: column; justify-content: center; align-items: center; gap: 6px; padding: 4px 2px; }
    .bottom-nav button svg.i { width: 19px; height: 19px; }
    .bottom-nav button.on::before { top: auto; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; }
    .drawer, .modal, .palette.pay { max-height: calc(100vh - var(--safe-t) - 8px); }
}

/* Phone: grids and segmented controls must never be wider than the screen. */
@media (max-width: 900px) {
    .stack, .hero, .items, .rows, .codes-box, .act-form, .drawer-body, .sys-list, .skel-list, .srv-grid, .price-grid { grid-template-columns: minmax(0, 1fr); }
    .seg { display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
    .seg::-webkit-scrollbar { display: none; }
    .seg button { flex: 1 0 auto; scroll-snap-align: center; }
}
@media (max-width: 900px) {
    /* Grids without their own column list: the single column may shrink below its content instead of pushing the page wider. */
    :where(.main, .drawer, .modal, .palette) :where(div, ul, section, form, label, article) { grid-auto-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
    /* top bar: the arrow and the server chip keep their size, the title gives way */
    .top-back { flex: none; }
    .crumbs { flex: 1 1 0; }
    .top-guild { position: relative; flex: 0 1 auto; max-width: 46%; min-width: 96px; }
    .top-guild .fsel-btn::after { content: ""; position: absolute; inset: 0; border-radius: 999px; }
    /* small text controls get a 44 px target without moving the layout */
    button.link, .rule-link, .ov-link { min-height: 44px; }
    button.link { padding: 14px 8px; margin: -14px -8px; }
    .rule-link { padding: 0 6px; }
    .ov-link { padding-top: 0; padding-bottom: 0; }
    button.chip, .chip.on { min-height: 40px; }
    .inline-num { height: 40px; min-width: 52px; font-size: 16px; }
    .word-chip { padding: 2px 4px 2px 12px; min-height: 40px; }
    .word-chip button { min-width: 36px; min-height: 36px; font-size: 18px; }
    .cards-tabs button { min-height: 40px; padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 900px) {
    textarea.words, textarea.input { font-size: 16px; }
    .nd-theme { min-height: 40px; }
    .word-chip button { min-width: 40px; min-height: 40px; }
}

/* Phone: tables turn into card lists. */
@media (max-width: 700px) {
    .table:not(.flat) { display: grid; gap: 8px; background: none; border: 0; border-radius: 0; overflow: visible; }
    .table > .tr.head:not(.admin) { display: none; }
    .table > .tr:not(.admin) { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
    .table > .tr.click:active { background: var(--hover); }
    .table > .tr.click > :nth-child(1) { grid-column: 1 / 3; grid-row: 1; }
    .table > .tr.click > :nth-child(5) { grid-column: 3; grid-row: 1; justify-self: end; }
    .table > .tr.click > :nth-child(3) { grid-column: 1; grid-row: 2; }
    .table > .tr.click > :nth-child(4) { display: block; grid-column: 2; grid-row: 2; }
    .table > .tr.click > :nth-child(6) { display: block; grid-column: 3; grid-row: 2; justify-self: end; }
    .table > .tr.click > :nth-child(2) { display: flex; grid-column: 1 / -1; grid-row: 3; max-height: 54px; overflow: hidden; }
    .table > .tr.click > :nth-child(2):empty { display: none; }
    .table .tr .who b { font-size: 14.5px; }
}
@media (max-width: 399px) {
    /* narrow phones: the server chip is the icon and an arrow, the full name is in the list that opens */
    .top-guild { flex: none; min-width: 0; max-width: none; padding: 3px 9px 3px 5px; gap: 6px; }
    .top-guild .fsel { flex: none; }
    .top-guild .fsel-text { display: none; }
    .crumbs b { font-size: 15.5px; }
}
@media (max-width: 900px) {
    .adm-tabs { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; max-width: 100%; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
    .adm-tabs::-webkit-scrollbar { display: none; }
    .adm-tabs button { flex: none; scroll-snap-align: center; padding: 0 14px; }
    .adm-tabs button span { display: inline; }
    .adm-top > .btn { width: 100%; }
}
@media (max-width: 900px) {
    /* price fields and check lines (owner admin, forms): whole row is the target */
    .price-input { min-height: 44px; padding-top: 0; padding-bottom: 0; }
    .price-input input { height: 42px; font-size: 16px; }
    .price-free, .check-line { min-height: 44px; }
    .check-line input, .price-free input { width: 20px; height: 20px; }
}
@media (max-width: 900px) { label.tile { min-height: 44px; } .nd-color { min-height: 40px; min-width: 44px; } }
@media (max-width: 560px) {
    /* AI flow: a vertical list instead of a sideways scroller */
    .ai-steps { flex-direction: column; overflow: visible; gap: 2px; }
    .ai-step { min-width: 0; flex: none; display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 12px; row-gap: 1px; align-items: center; }
    .ai-step span { grid-row: 1 / span 2; margin: 0; }
    .ai-arrow { transform: rotate(90deg); align-self: center; line-height: 1; opacity: .5; }
}
@media (max-width: 900px) {
    /* sticky action bars sit above the tab bar, not behind it */
    .post-actions { bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px); z-index: 20; }
    .sub-dock { bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); }
}
@media (max-width: 420px) {
    /* server picker: name on top, the action under it */
    .srv { flex-wrap: wrap; }
    .srv .t { flex: 1 1 calc(100% - 60px); }
    .srv .t b { white-space: normal; overflow-wrap: anywhere; }
    .srv > .btn { flex: 1 1 100%; }
}
@media (max-width: 900px) {
    .land { padding-left: max(16px, var(--safe-l)); padding-right: max(16px, var(--safe-r)); padding-bottom: calc(60px + var(--safe-b)); }
    .land-top { padding-top: calc(14px + var(--safe-t)); }
    .btn.lg { min-height: 48px; }
}
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
    .sec-tabs { position: static; }
    .savebar { flex-wrap: nowrap; }
    .savebar span { flex: 1 1 auto; }
}

/* ── Phone polish: server picker sheet, chip strips, rows ─────────────── */
.chip-strip.contents { display: contents; }
@media (max-width: 900px) {
    :root { --gut: 16px; }
    .chip-strip, .chip-strip.contents { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity; overscroll-behavior-x: contain; margin: 0 calc(var(--gut) * -1) 12px; padding: 2px var(--gut); flex: 1 1 100%; width: calc(100% + var(--gut) * 2); }
    .chip-strip::-webkit-scrollbar { display: none; }
    .chip-strip > .chip { flex: none; scroll-snap-align: start; white-space: nowrap; }
    .chip-strip.chips { margin-bottom: 12px; }
    /* list rows: the date drops under the text instead of squeezing it */
    .list-row { flex-wrap: wrap; row-gap: 2px; }
    .list-row .t { flex: 1 1 0; min-width: 0; }
    .list-row .t b { white-space: normal; overflow-wrap: anywhere; }
    .list-row .circle ~ time { flex: 0 0 100%; margin-left: 46px; margin-top: -2px; }
    .list-row { padding-top: 12px; padding-bottom: 12px; }
}
@media (max-width: 700px) {
    .fsel-pop.sheet { display: flex; flex-direction: column; gap: 0; overflow: hidden; touch-action: pan-y; max-height: 85vh; max-height: 85dvh; padding: 0 var(--gut) calc(12px + var(--safe-b)); transition: transform 0.2s ease-in; }
    .fsel-pop.sheet.closing { transform: translateY(100%); animation: none; }
    .sheet-backdrop { transition: opacity 0.2s; }
    .sheet-backdrop.closing { opacity: 0; }
    .sheet-title { font-family: var(--display); font-weight: 700; font-size: 16px; padding: 6px 4px 12px; }
    .fsel-pop.sheet .fsel-search { flex: none; margin-bottom: 8px; width: 100%; }
    .fsel-pop.sheet .fsel-list { flex: 1 1 auto; min-height: 0; max-height: none; overflow-x: hidden; overflow-y: auto; touch-action: pan-y; gap: 2px; grid-template-columns: minmax(0, 1fr); }
    .fsel-pop.sheet .fsel-opt { min-width: 0; max-width: 100%; overflow: hidden; gap: 12px; }
    .fsel-pop.sheet .fsel-opt > span { flex: 1; min-width: 0; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
    .fsel-pop.sheet .fsel-opt.selected { background: #232323; }
    .fsel-opt-t { flex: 1; min-width: 0; display: grid; gap: 1px; }
    .fsel-opt-t b { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .fsel-opt-t small { color: var(--faint); font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .fsel-ava { width: 40px; height: 40px; border-radius: 12px; flex: none; object-fit: cover; display: grid; place-items: center; background: var(--active); font-weight: 800; font-size: 15px; color: var(--text); }
    .fsel-ava.add { background: transparent; border: 1px dashed #4a4a4a; color: var(--muted); }
    .fsel-ava svg.i { width: 18px; height: 18px; }
    .fsel-pop.sheet .fsel-opt > svg.i { flex: none; }
    .fsel-pop.sheet .fsel-opt { min-height: 56px; }
    .drawer-body, .modal .req-body { padding-left: var(--gut); padding-right: var(--gut); }
}
@media (max-width: 700px) { .fsel-pop.sheet .fsel-list { scrollbar-width: none; } .fsel-pop.sheet .fsel-list::-webkit-scrollbar { display: none; } }
@media (max-width: 900px) { .chip-strip, .adm-tabs, .seg { scroll-padding: 0 var(--gut); } }
@media (max-width: 900px) { .list-row .circle ~ time { flex: 1 0 calc(100% - 46px); } }

/* Mafia beta application form: full-width comment, compact button under it on the right. */
.beta-apply { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.beta-apply .field { margin: 0; }
.beta-apply-text { width: 100%; min-height: 84px; resize: vertical; }
.beta-apply-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.beta-apply-foot .btn { flex: 0 0 auto; height: 42px; padding: 0 20px; }
@media (max-width: 700px) {
    .beta-apply-foot { flex-direction: column-reverse; align-items: stretch; }
    .beta-apply-foot .btn { width: 100%; justify-content: center; }
}

/* Mafia host voices as cards with a quality mark. */
.voice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 12px; }
.voice-card { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--line, #262626); background: var(--card2, #141414); color: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.voice-card:hover { border-color: #3a3a3a; }
.voice-card.on { border-color: #fff; background: #1b1b1b; }
.voice-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.voice-q { align-self: flex-start; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.voice-q.best { background: rgba(34, 197, 94, .15); color: var(--green); }
.voice-q.good { background: rgba(250, 204, 21, .14); color: #facc15; }
.voice-q.mid { background: rgba(148, 163, 184, .14); color: #94a3b8; }
@media (max-width: 700px) { .voice-grid { grid-template-columns: 1fr 1fr; } }

/* ── Admin: unified cards (Сервер · Техработы · Бот · Мафия · Деньги) ─────────────────── */
.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; align-items: start; }
.adm-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.adm-card .sys-head { margin: 0; align-items: flex-start; gap: 12px; }
.adm-card .sys-head > .sys-state { margin-left: auto; flex: none; max-width: 55%; }
.adm-card .sys-state small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-ttl { flex: 1; min-width: 0; }
.adm-ttl h3 { margin: 0; font-size: 14.5px; }
.adm-hint { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; font-weight: 600; line-height: 1.35; }
.adm-card > .sub { margin: 0; font-size: 13px; }
.adm-card .sys-line:first-of-type { border-top: 0; }
.adm-card .rp-row { grid-template-columns: 84px minmax(0, 1fr); }
.adm-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.adm-wide { grid-column: 1 / -1; }
.adm-more summary { cursor: pointer; color: var(--muted); font-size: 12.5px; font-weight: 700; padding: 8px 0 2px; border-top: 1px solid var(--line); }
.adm-more[open] summary { margin-bottom: 4px; }
.adm-prog { display: grid; gap: 8px; }
.adm-prog small { color: var(--muted); }
.adm-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); column-gap: 20px; }
.adm-rows > .sub { grid-column: 1 / -1; margin: 0; }
.adm-app { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.adm-app-t { min-width: 0; }
.adm-app-t b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.adm-app-t small { display: block; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.adm-app-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.adm-app-acts:empty { display: none; }
@media (max-width: 700px) {
    .adm-grid { grid-template-columns: minmax(0, 1fr); }
    .adm-card .sys-head { flex-wrap: wrap; }
    .adm-card .sys-head > .sys-state { max-width: 100%; margin-left: 46px; order: 3; }
    .adm-acts .btn, .adm-app-acts .btn { flex: 1 1 auto; justify-content: center; }
}
.adm-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tabs button { white-space: nowrap; flex: none; }
.adm-top { flex-wrap: wrap; }
@media (max-width: 700px) {
    .adm-card .sys-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center; }
    .adm-card .sys-head > .sys-state { grid-column: 2; margin-left: 0; justify-self: start; max-width: 100%; }
}

/* Admin → Мафия → ElevenLabs: voice list as rows (info left, buttons right). */
.el-voices { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; max-height: 520px; overflow-y: auto; }
.el-voice { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line, #262626); border-radius: 12px; }
.el-voice.on { border-color: #fff; }
.el-voice-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.el-voice-info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.el-voice-info .sub { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.el-voice-acts { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.el-voice-acts .btn { white-space: nowrap; }
@media (max-width: 700px) { .el-voice { flex-direction: column; align-items: stretch; } .el-voice-acts .btn { flex: 1; } }

/* Админка → Сайт: choice of the home page */
.site-tpl { display: flex; flex-direction: column; gap: 10px; }
.site-tpl.on { outline: 2px solid var(--accent, #5865f2); }
.site-thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: #111; }

/* Trial Premium banner (panel top). */
.trial-banner { background: rgba(34, 197, 94, 0.07); border-color: rgba(34, 197, 94, 0.35); margin-bottom: 14px; flex-wrap: wrap; }
.trial-banner svg.i { color: var(--green); }

/* ── Админка на весь экран ───────────────────────────────────────────────
   Широкий экран: вкладки липким столбцом слева, вкладка занимает всё остальное (сетка карточек в 2-4 колонки).
   Уже 1100 px (телефон, планшет): прежний вид - полоса вкладок сверху, вкладка ниже в одну колонку. */
.adm-layout { display: grid; gap: 16px; }
.adm-content { min-width: 0; display: grid; gap: 16px; align-content: start; }
.adm-content > * { min-width: 0; }
@media (min-width: 1100px) {
    .frame.adm-full { max-width: none; }
    .frame.adm-full .content { padding-left: clamp(16px, 2vw, 32px); padding-right: clamp(16px, 2vw, 32px); }
    .adm-layout { grid-template-columns: 208px minmax(0, 1fr); gap: 22px; align-items: start; }
    .adm-top { position: sticky; top: 76px; z-index: 5; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 10px; max-height: calc(100vh - 96px); overflow-y: auto; scrollbar-width: none; }
    .adm-top::-webkit-scrollbar { display: none; }
    .adm-top .adm-tabs { display: flex; flex-direction: column; gap: 2px; padding: 6px; max-width: none; width: 100%; overflow: visible; border-radius: var(--radius); }
    .adm-top .adm-tabs button { width: 100%; justify-content: flex-start; padding: 0 12px; min-height: 38px; border-radius: 10px; }
    .adm-top .adm-tabs button span { display: inline; }
    .adm-top > .btn { width: 100%; justify-content: center; }
    /* Tab bodies: a card grid. Wide blocks (KPI rows, tables, lists) take the whole row. */
    /* Masonry: карточки текут по колонкам сверху вниз, без дыр между ними; широкие блоки на всю ширину. */
    .adm-content > .stack { display: block; column-width: 440px; column-gap: 16px; }
    .adm-content > .stack > * { break-inside: avoid; margin: 0 0 16px; min-width: 0; }
    .adm-content > .stack > .adm-kpis, .adm-content > .stack > .adm-grid, .adm-content > .stack > .adm-wide, .adm-content > .stack > .admin-cols,
    .adm-content > .stack > .alert, .adm-content > .stack > .sub, .adm-content > .stack > .toolbar, .adm-content > .stack > .adm-toolbar, .adm-content > .stack > .empty { column-span: all; }
    .adm-content > .stack > .card { min-width: 0; }
    .adm-content { container-type: inline-size; }
    /* Две колонки: нечётная последняя карточка занимает весь ряд, чтобы справа не было дыры. */
    @container (max-width: 1175px) { .adm-content .adm-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
    /* Ряды карточек (Рост, Бот...): одной высоты в ряду. */
    .adm-content .adm-grid, .adm-content .admin-cols { align-items: stretch; }
    .adm-content .admin-cols > .card { height: 100%; }
    .adm-content .adm-grid > .card { height: 100%; }
    /* Деньги: цены в две колонки на всю ширину. */
    .price-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(480px, 1fr)); column-gap: 32px; }
    .adm-content .adm-kpis { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
    .adm-content .adm-kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .adm-content .adm-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
    .adm-content .admin-cols { grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); }
    .adm-content .adm-rows { grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
}
@media (min-width: 1700px) {
    .adm-layout { grid-template-columns: 224px minmax(0, 1fr); gap: 28px; }
    .adm-content > .stack { column-width: 460px; }
}
/* Поддержка: таблица внутри карточки, колонки не выпирают. */
.adm-t-support .admin-row { grid-template-columns: minmax(200px, 1.4fr) minmax(90px, 0.5fr) minmax(220px, 1.6fr) minmax(150px, auto); }
.adm-t-support .admin-row > * { min-width: 0; }
.adm-t-support .admin-row .acts-h { text-align: right; }
.adm-t-support h3 small { font-weight: 700; }
/* Цены: одно поле у тарифа с одним способом продажи. */
.price-pair:has(> div:only-child) { grid-template-columns: minmax(0, 1fr); }
/* DayZ: канал = подпись, два списка и кнопки в одну строку. */
.dz-pick { display: grid; grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.dz-pick:first-of-type { border-top: 0; }
.dz-pick .label { font-weight: 700; font-size: 13.5px; }
.dz-pick .input { min-width: 0; }
.dz-acts { display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 1099px) { .dz-pick { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .dz-pick .label { grid-column: 1 / -1; } .dz-acts { grid-column: 1 / -1; justify-content: flex-start; } }
/* Кнопка-иконка и поля с адресом. */
.btn.icon-only { padding: 0; width: 42px; flex: none; justify-content: center; }
.adm-toolbar .input { min-width: 0; text-overflow: ellipsis; }
/* Сайт: две карточки одной высоты, кнопка и статус внизу. */
.site-tpl { height: 100%; }
.site-tpl > :last-child { margin-top: auto; }
.site-tpl .sub { margin: 0; }
/* Бейджик «Спонсор» в верхней панели и карточка тарифа «Спонсор». */
.sponsor-badge { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; color: #1a1200; background: linear-gradient(90deg, var(--amber), #f59e0b); box-shadow: 0 6px 18px -8px rgba(251, 191, 36, 0.7); }
.tier-badge { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.tier-badge svg.i { width: 14px; height: 14px; }
.tier-badge.premium { color: #fafafa; border: 1px solid #404040; background: linear-gradient(90deg, #404040, #262626); }
.tier-badge.trial { color: #e5e5e5; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14); }
.tier-badge.basic { color: var(--muted, #94a3b8); background: rgba(148, 163, 184, 0.1); font-weight: 700; }
@media (max-width: 900px) { .tier-badge.basic { display: none; } }
.sponsor-badge svg.i { width: 14px; height: 14px; }
.sub-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 1180px; margin: 0 auto; align-items: stretch; }
.sub-tier { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 28px 26px 26px; border-radius: 24px; background: var(--card); border: 1px solid var(--line-hi); }
.sub-tier.hot { border-color: rgba(255, 255, 255, 0.14); }
.sub-tier.sponsor { border-color: rgba(251, 191, 36, 0.5); background: var(--card); box-shadow: none; }
.sub-tier.current { outline: 0; border-color: rgba(255, 255, 255, 0.4); }
.sub-tier.sponsor.current { border-color: rgba(251, 191, 36, 0.5); }
.sub-tier, .sub-tier.hot, .sub-tier.sponsor { transform: none; margin: 0; align-self: stretch; }
.sub-ribbon { position: absolute; top: -12px; right: 22px; line-height: 16px; height: 24px; box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: #fff; color: #000; font-size: 11.5px; font-weight: 800; letter-spacing: 0.02em; }
.sub-ribbon svg.i { width: 12px; height: 12px; }
.sub-ribbon.gold { background: linear-gradient(90deg, var(--amber), #f59e0b); color: #1a1200; }
.sub-tier .sub-pd { margin: 0 0 8px; min-height: 40px; }
.sub-tier .sub-price b { font-size: 44px; }
.sub-tier .sub-per { margin-bottom: 14px; }
.sub-tier .sub-fancy { margin-bottom: 6px; }
.sub-tier .sub-div { display: block; height: 1px; margin: 12px 0 14px; background: var(--line-hi); }
.sub-tier .sub-feats { gap: 12px; }
.sub-tier .sub-lead { color: var(--muted); font-size: 13px; font-weight: 700; margin-bottom: -2px; }
/* единая галочка во всех тарифах: одинаковый размер и нейтральный цвет */
.sub-tier .sub-feats li { align-items: flex-start; gap: 12px; }
.sub-tier .sub-chk, .sub-tier .sub-feats li:has(.sub-g-safe) .sub-chk, .sub-tier .sub-feats li:has(.sub-g-act) .sub-chk, .sub-tier .sub-feats li:has(.sub-g-srv) .sub-chk, .sub-tier .sub-feats li:has(.sub-g-fun) .sub-chk, .sub-tier.sponsor .sub-chk { --c: var(--green); width: 22px; height: 22px; margin-top: 0; background: color-mix(in srgb, var(--green) 16%, transparent); border: 1px solid color-mix(in srgb, var(--green) 45%, transparent); color: var(--green); box-sizing: border-box; }
.sub-tier .sub-chk svg.i { width: 12px; height: 12px; }
.sub-tier .sub-fl { flex: 1; }
.sub-tier .sub-fl b { font-size: 14px; line-height: 22px; }
.sub-tier .sub-fl span { margin-top: 0; }
@media (max-width: 1000px) { .sub-tiers { grid-template-columns: minmax(0, 1fr); max-width: 520px; } }

/* ── Рамка панели - карточка на весь экран с внутренней прокруткой ──────────
   Прокручивается только .main (контент); боковое меню и верхняя панель стоят, а скруглённая рамка видна целиком.
   Телефон (до 900 px) остаётся как был: прокручивается страница. */
@media (min-width: 901px) {
    html:has(.frame), body:has(.frame) { height: 100vh; height: 100dvh; overflow: hidden; }
    body:has(.frame) { box-sizing: border-box; }
    .frame, .frame.collapsed { height: calc(100vh - 32px); height: calc(100dvh - 32px); min-height: 0; overflow: hidden; grid-template-rows: minmax(0, 1fr); }
    .side { position: static; max-height: none; height: 100%; min-height: 0; }
    /* The top bar stays outside the scroll area: only .content scrolls, so its scrollbar starts under the
       bar and never cuts the bar or the frame's rounded corner. */
    .main { height: 100%; min-height: 0; overflow: hidden; }
    .main > .top { position: static; flex: none; }
    .main > .content { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #262626 transparent; }
    .main > .content::-webkit-scrollbar-track { margin-bottom: 14px; }
    .adm-top { top: 16px; max-height: calc(100dvh - 180px); }
}
.sub-modsec { margin-top: 52px; }
.sub-hero.sub-hero-sm h2 { font-size: clamp(22px, 3vw, 30px); }
.sub-modsec .sub-mhead { margin-bottom: 14px; }

/* ── Статистика сервера (редактор шаблонов + предпросмотр) ─────────────── */
.stats-ed .stats-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 4px; }
.stats-ed .stats-head h3 { margin: 0; }
.stats-plan { font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--line-hi); border-radius: 999px; padding: 3px 11px; }
.stats-plan.prem { color: #000; background: #fff; border-color: #fff; }
.stats-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; margin-top: 14px; align-items: start; }
.stats-left { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.stats-left .label { margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.stats-left .chips { margin-bottom: 0; }
.stats-left > .btn { align-self: flex-start; }
.chip.pick.locked { opacity: 0.6; }
.stats-notes:empty { display: none; }
.stats-note, .stats-warns > div { color: var(--amber); font-size: 12.5px; line-height: 1.4; }
.stats-note { border: 1px solid rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.08); border-radius: 10px; padding: 8px 12px; margin-bottom: 6px; }
.stats-err { color: var(--red); font-size: 12.5px; margin-top: 3px; }
.stats-rows { display: flex; flex-direction: column; gap: 8px; }
.stats-row-main { display: flex; align-items: center; gap: 6px; }
.stats-row-main .input { flex: 1; min-width: 0; }
.stats-num { width: 22px; flex: none; text-align: center; color: var(--faint); font-weight: 700; font-size: 12.5px; }
.stats-warns { padding-left: 28px; }
.btn.icon-btn { padding: 7px 10px; font-size: 11px; line-height: 1; flex: none; }
.btn.icon-btn[disabled] { opacity: 0.35; pointer-events: none; }
.btn.icon-btn.danger:hover { border-color: var(--red); color: var(--red); }
.stats-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.stats-actions.main { margin-top: 8px; }
.stats-vars { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
.stats-var { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 1px solid var(--line-hi); background: transparent; border-radius: 10px; padding: 7px 10px; min-width: 0; }
.stats-var:hover { border-color: #444; background: var(--hover); }
.stats-var code { font-size: 12.5px; font-weight: 700; color: var(--text); }
.stats-var span { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.stats-var em { font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--amber); }
.stats-var.locked { opacity: 0.6; }
.stats-right { min-width: 0; }
.stats-right .label { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.stats-side { background: #2b2d31; border-radius: 10px; padding: 12px 8px; margin-bottom: 8px; font-family: "gg sans", "Segoe UI", system-ui, sans-serif; }
.stats-cat { display: flex; align-items: center; gap: 4px; color: #949ba4; font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; padding: 2px 6px 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.stats-chev { font-size: 14px; line-height: 1; }
.stats-ch { display: flex; align-items: center; gap: 6px; color: #949ba4; padding: 5px 8px; border-radius: 6px; font-size: 15px; font-weight: 500; }
.stats-ch:hover { background: #35373c; color: #dbdee1; }
.stats-ch svg.i { width: 18px; height: 18px; color: #80848e; }
.stats-ch span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-ch.empty { font-size: 13px; font-style: italic; }
@media (max-width: 900px) {
    .stats-cols { grid-template-columns: minmax(0, 1fr); }
    .stats-right { position: static; order: -1; }
}

/* «Соцсети и стримы» (public/social.js) */
.soc-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.soc-ch { border: 1px solid var(--line-hi); border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.soc-ch-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.soc-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.soc-ch-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.soc-ch-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soc-ch-t b small { color: var(--muted); font-weight: 600; }
.soc-ch-t .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soc-err { color: var(--red); font-size: 12.5px; line-height: 1.4; margin: 4px 0; }
.soc-warn { color: var(--amber); font-size: 12.5px; line-height: 1.4; margin: 4px 0; }
.soc-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; margin-top: 12px; align-items: start; }
.soc-left { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.soc-left .label, .soc-right .label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.soc-btns { display: flex; flex-direction: column; gap: 8px; }
.soc-btn-row { display: grid; grid-template-columns: 56px minmax(90px, 1fr) minmax(120px, 1.6fr) auto auto auto; gap: 6px; align-items: center; }
.soc-btn-row .input { min-width: 0; padding-left: 12px; padding-right: 12px; }
.soc-emoji { text-align: center; }
.soc-card .toggle-row { margin: 6px 0; }
.soc-prev { background: #313338; border-radius: 10px; padding: 14px; font-family: "gg sans", "Segoe UI", system-ui, sans-serif; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.soc-embed { border-left: 4px solid #d4d4d4; background: #2b2d31; border-radius: 4px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; max-width: 100%; }
.soc-embed-t { color: #f2f3f5; font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.soc-embed-d { color: #dbdee1; font-size: 13.5px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.soc-row { display: flex; flex-wrap: wrap; gap: 6px; }
.soc-dbtn { display: inline-flex; align-items: center; gap: 6px; background: #4e5058; color: #fff; font-size: 13px; font-weight: 600; border-radius: 4px; padding: 5px 12px; max-width: 100%; }
.soc-dbtn svg.i { width: 12px; height: 12px; opacity: 0.8; }
@media (max-width: 900px) {
    .soc-cols { grid-template-columns: minmax(0, 1fr); }
    .soc-right { order: -1; }
    .soc-btn-row { grid-template-columns: 52px minmax(0, 1fr) auto auto auto; }
    .soc-btn-row .soc-url { grid-column: 1 / -1; grid-row: 2; }
}
.soc-root .stats-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 4px; }
.soc-root .stats-head h3 { margin: 0; }
.soc-root .stats-head .grow { flex: 1; }
.soc-root .stats-note { margin-top: 8px; }
.soc-root .soc-left .stats-actions .btn, .soc-root .soc-left > .btn { align-self: flex-start; }
.soc-card > .stats-actions.main { justify-content: flex-start; }


/* Поддержка на сайте (раздел «Поддержка») */
.ss { display: flex; flex-direction: column; gap: 14px; }
.ss-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.ss-head h3 { margin: 0 0 4px; }
.ss-stats { display: flex; gap: 18px; }
.ss-stats span { display: flex; flex-direction: column; align-items: center; font-size: 12px; color: var(--faint); }
.ss-stats b { font-size: 22px; color: var(--text, #fff); }
.ss-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-top: 12px; }
.ss-mode { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.ss-mode b { font-size: 14px; }
.ss-mode span { font-size: 12.5px; color: var(--faint); line-height: 1.45; }
.ss-mode.on { border-color: #fff; background: var(--active); }
.ss-mode:disabled { opacity: .5; cursor: not-allowed; }
.ss-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; align-items: end; }
.ss-fields label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--faint); }
.ss-code { background: var(--active); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 12.5px; overflow-x: auto; white-space: pre; margin: 12px 0 0; }
.ss-dots { display: flex; gap: 6px; margin: 10px 0 4px; }
.ss-dots i { width: 30px; height: 8px; border-radius: 99px; background: var(--line); display: block; }
.ss-dots i.on { background: #fff; }
.ss-dots i.wait { background: var(--faint); opacity: .6; }
.ss-staff { margin-top: 8px; }
.ss-invite { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.ss-link { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ss-link span { font-size: 12.5px; color: var(--faint); }

/* Деньги: вкладки, таблица цен, ИИ-карточки */
.money { display: grid; gap: 16px; min-width: 0; }
.money-seg { justify-self: start; }
.money-body, .money-stack { display: grid; gap: 16px; min-width: 0; }
.money-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
.money-cols > * { min-width: 0; margin: 0; }
.money-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.money-head h3 { margin: 0 0 6px; }
.money-head .sub { margin: 0; }
.money-total { color: var(--muted); font-size: 13.5px; }
.money-total b { color: var(--text); font-size: 16px; }
.money-table { margin-top: 14px; }
.money-row { display: grid; grid-template-columns: minmax(0, 1fr) 132px 132px 96px; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.money-row.head { border-top: 0; padding: 4px 0 8px; color: var(--faint); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.money-row .mc { min-width: 0; }
.money-row .num { text-align: right; }
.money-row .num .price-input { width: 100%; box-sizing: border-box; }
.money-row .free-c { display: flex; justify-content: center; }
.money-row.head .num { text-align: right; padding-right: 14px; }
.money-row.head .free-c { justify-content: center; }
.money-row .who { display: flex; align-items: center; gap: 12px; }
.money-row .who .t { min-width: 0; }
.money-row .who .t b { display: block; font-weight: 700; }
.money-row .who .t small { display: block; color: var(--faint); font-size: 12px; }
.money-row .dash { color: var(--faint); font-weight: 700; padding-right: 14px; }
.money-row .free-c .dash { padding: 0; }
.money-row.changed .price-input { border-color: rgba(245, 158, 11, 0.6); }
.money-row.free .price-input { opacity: 0.4; }
.money-group { margin: 14px 0 2px; padding: 8px 0 2px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.money-group + .money-row { border-top: 0; }
.money-savebar { position: sticky; bottom: 14px; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: var(--radius); border: 1px solid rgba(245, 158, 11, 0.5); background: var(--card-hi); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); font-weight: 700; }
.money-savebar[hidden] { display: none; }
.money-savebar .acts { display: flex; gap: 8px; }
.money-card h3 { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mfield { display: grid; gap: 6px; min-width: 0; }
.mfield > span { font-size: 13px; font-weight: 700; white-space: nowrap; }
.mfield > .input { width: 100%; box-sizing: border-box; }
.mfield > small { color: var(--faint); font-size: 12px; line-height: 1.3; }
.mgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-top: 14px; }
.msub { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.mgive { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 10px; align-items: center; }
.mgive .input { width: 100%; box-sizing: border-box; min-width: 0; }
.money-dlg-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.money-preset { max-height: 50vh; overflow-y: auto; }
@media (max-width: 760px) {
    .money-seg { justify-self: stretch; }
    .money-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .money-row.head { display: none; }
    .money-row .who { grid-column: 1 / -1; }
    .money-row .mc[data-l]::before { content: attr(data-l); display: block; color: var(--faint); font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; }
    .money-row .num { text-align: left; }
    .money-row .free-c { display: block; }
    .money-row .dash { padding: 6px 0; display: inline-block; }
    .mgrid { grid-template-columns: minmax(0, 1fr); }
    .mgive { grid-template-columns: minmax(0, 1fr); }
    .money-savebar { flex-direction: column; align-items: stretch; bottom: 8px; }
    .money-savebar .acts .btn { flex: 1; justify-content: center; }
}
.money-row.head .mc { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
@media (max-width: 760px) { .money-savebar { bottom: 78px; } .money-row .mc[data-l]::before { font-size: 10.5px; } }

/* Автомодерация: подгруппы фильтров с подзаголовками */
.am-group { display: flex; flex-direction: column; gap: 10px; }
.am-group-t { margin: 8px 2px 0; font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #a3a3a3; }
.am-group .rule-top .btn.sm { flex: none; }

/* Referrals: money balance, admin payout requests */
.ref-bal { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ref-bal .adm-kpi small { white-space: normal; }
.adm-ref .card-sub { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.adm-ref .card-sub p { margin: 0; font-size: 12.5px; }
.adm-ref .row-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ref-apply .ref-fld:nth-child(1) { grid-column: 1 / -1; }
.ref-apply .ref-fld:nth-child(3) { grid-column: 1 / -1; }
@media (max-width: 720px) { .ref-bal { grid-template-columns: minmax(0, 1fr); } }

/* Referrals: withdrawal form (full width: choices on the left, summary on the right) */
.ref-fld[hidden], .ref-note[hidden] { display: none; }
.ref-wd { display: grid; grid-template-columns: minmax(0, 65fr) minmax(280px, 35fr); gap: 16px; align-items: start; }
.ref-wd-form { display: grid; gap: 12px; min-width: 0; }
.ref-wd-side { display: grid; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-hi); background: rgba(0, 0, 0, 0.22); min-width: 0; }
.ref-wd-side .btn { justify-content: center; height: 40px; }
.ref-grp { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: start; }
.ref-grp > span { color: var(--faint); font-size: 12px; font-weight: 700; padding-top: 9px; }
.ref-tiles { display: flex; flex-wrap: wrap; gap: 6px; }
.ref-tile { display: inline-flex; align-items: center; gap: 7px; min-width: 0; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line-hi); background: rgba(0, 0, 0, 0.2); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.ref-tile:hover { border-color: var(--muted); }
.ref-tile.on { border-color: #fafafa; background: rgba(255, 255, 255, 0.07); }
.ref-tile:disabled { opacity: 0.45; cursor: not-allowed; }
.crypto-ico { width: 20px; height: 20px; flex: none; border-radius: 50%; object-fit: cover; display: block; }
.ref-tile .crypto-ico { width: 22px; height: 22px; }
.ref-tile-t { display: flex; align-items: baseline; gap: 6px; min-width: 0; white-space: nowrap; }
.ref-tile-t b { font-size: 13px; font-weight: 800; }
.ref-tile-t small { color: var(--faint); font-size: 11px; }
.ref-fields { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px; align-items: start; }
.ref-fields:has(.ref-memo[hidden]) { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.3fr); }
.ref-amt { display: flex; gap: 6px; align-items: stretch; }
.ref-amt .input { flex: 1; min-width: 0; }
.ref-amt .btn { flex: none; white-space: nowrap; }
.ref-sumrows { display: grid; gap: 0; }
.ref-sumrow { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.ref-sumrow:first-child { border-top: 0; padding-top: 0; }
.ref-sumrow span { color: var(--muted); }
.ref-sumrow b { text-align: right; overflow-wrap: anywhere; }
.ref-sumrow.total { align-items: baseline; padding-top: 8px; }
.ref-sumrow.total b { font-family: var(--display); font-size: 20px; color: #fff; }
.ref-warn { color: #fca5a5; font-size: 12px; line-height: 1.3; }
.ref-mini { font-size: 12px; line-height: 1.4; }
.ref-terms summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 700; }
.ref-terms .ref-note { margin-top: 6px; font-size: 12px; }
.adm-ref-set { display: grid; gap: 10px; }
.adm-ref-set .btn { justify-self: start; }
.adm-ref-fees { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.ref-fee-l { display: flex; align-items: center; gap: 6px; }
.ref-fee-l .crypto-ico { width: 18px; height: 18px; }
@media (max-width: 720px) {
    .ref-wd { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .ref-fields, .ref-fields:has(.ref-memo[hidden]) { grid-template-columns: minmax(0, 1fr); }
    .ref-grp { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .ref-grp > span { padding-top: 0; }
}
@media (max-width: 1000px) { .ref-wd { grid-template-columns: minmax(0, 1fr); } }
.adm-set-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(90px, 140px) minmax(0, 1.4fr); gap: 10px; align-items: center; font-size: 13px; }
.adm-set-row.fee { grid-template-columns: minmax(150px, 1.4fr) repeat(3, minmax(70px, 1fr)); }
.adm-set-row.head small { color: var(--faint); }
.adm-set-row .input { height: 34px; min-width: 0; padding: 0 10px; }
.adm-set-check { display: flex; gap: 8px; align-items: center; font-size: 13px; }
@media (max-width: 720px) {
    .adm-set-row, .adm-set-row.fee { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .adm-set-row.head { display: none; }
    .adm-set-row.fee > span { grid-column: 1 / -1; }
}

/* Admin: prices, rate and network fees card (Money -> Payments and partners), full width under the grid */
.rs-card { display: grid; gap: 18px; min-width: 0; }
.rs-sec { display: grid; gap: 12px; min-width: 0; }
.rs-mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rs-top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 24px; }
.rs-rate { display: grid; gap: 2px; }
.rs-rate b { font-size: 16px; }
.rs-note { margin: 0; font-size: 12.5px; line-height: 1.45; }
.rs-field { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.rs-field small { font-size: 11.5px; }
.rs-card .input { height: 34px; min-width: 0; padding: 0 10px; }
.rs-card .rs-num { width: 120px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-variant-numeric: tabular-nums; text-align: right; }
.rs-prices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rs-chip { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .02); min-width: 0; }
.rs-chip-h { display: flex; align-items: center; gap: 6px; }
.rs-chip-h .crypto-ico { width: 20px; height: 20px; }
.rs-chip-p { font-size: 13px; text-align: right; }
.rs-chip small { grid-column: 1 / -1; font-size: 11.5px; }
.rs-chip .input { grid-column: 1 / -1; width: 100%; margin-top: 4px; }
.rs-params { display: flex; flex-wrap: wrap; gap: 12px 18px; }
.rs-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.rs-table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 13px; }
.rs-table th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--faint); padding: 9px 12px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.rs-table td { padding: 7px 12px; vertical-align: middle; }
.rs-table tr.rs-first td { border-top: 1px solid var(--line); }
.rs-table tbody tr.rs-first:first-child td { border-top: 0; }
.rs-table .ref-fee-l { gap: 6px; white-space: nowrap; }
.rs-table .ref-fee-l .crypto-ico { width: 18px; height: 18px; }
.rs-now { display: grid; gap: 1px; justify-items: start; }
.rs-now b { font-size: 13.5px; }
.rs-now small { font-size: 11.5px; line-height: 1.3; }
.rs-src.auto { color: var(--green); }
.rs-src.manual { color: var(--amber); }
.rs-src.default { color: var(--faint); }
.rs-card .rs-fee { width: 130px; }
.rs-card .rs-pct { width: 90px; }
.rs-card .rs-min { width: 100px; }
.rs-card .rs-mode { width: 120px; text-align: left; }
.rs-save { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 16px; padding: 0; }
.rs-save .btn { background: var(--card-hi, #1a1a1a); border: 1px solid var(--line-hi, #333);  }
.rs-save .rs-dirty { background: var(--card-hi, #1a1a1a); border: 1px solid var(--line-hi, #333); border-radius: 999px; padding: 6px 12px;  }
.rs-dirty { color: var(--amber); font-size: 12.5px; }
@media (max-width: 1100px) { .rs-prices { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .rs-prices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .rs-card .rs-num { width: 100%; } .rs-top > * { flex: 1 1 100%; } }

/* «Доступ команды»: the «Модератор» level reads sections without changing them */
.alert.ro-note { border-color: var(--line); background: var(--card); font-weight: 500; color: var(--muted); }
.ro-view .card, .ro-view .rule-grid { pointer-events: none; }
.ta-rights { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; color: var(--muted); }
.ta-log .list-row .badge { flex-shrink: 0; }

/* Админка → «Реклама» (ролики в музыке бесплатных серверов) */
.ad-wrap { display: grid; gap: 14px; min-width: 0; }
.ad-card .sub { margin: 0 0 12px; }
.ad-field { padding: 10px 0; }
.ad-field .label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12.5px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.ad-count { color: var(--faint); font-weight: 600; }
.ad-text { width: 100%; min-height: 96px; resize: vertical; font: inherit; }
.ad-num { width: 100%; max-width: 160px; }
.ad-choice { display: grid; gap: 8px; }
.ad-opt { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.ad-opt.off { color: var(--faint); cursor: default; }
.ad-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.ad-file { max-width: 100%; font-size: 13px; color: var(--muted); }
.ad-progress { height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 12px; }
.ad-progress i { display: block; height: 100%; width: 35%; background: #fff; border-radius: 99px; animation: ad-slide 1.1s ease-in-out infinite; }
@keyframes ad-slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
.ad-draft { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.ad-draft audio, .ad-clip audio { width: 100%; }
.ad-list { display: grid; gap: 12px; }
.ad-clip { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 10px; min-width: 0; }
.ad-clip-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ad-clip-name { display: grid; gap: 2px; min-width: 0; }
.ad-clip-name b { overflow-wrap: anywhere; }
.ad-clip-name small { color: var(--faint); }
.ad-clip-text { margin: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 700px) { .ad-num { max-width: none; } .ad-row .btn { flex: 1 1 auto; } }

/* ── «Бусты» (announcement) ───────────────────────────────────────────── */
.sb-page { max-width: 1000px; margin-inline: auto; width: 100%; align-items: stretch; }
.sb-hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 22px; padding: 34px 30px; }
.sb-grid { position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px); background-size: 18px 18px; -webkit-mask-image: linear-gradient(90deg, transparent 10%, #000 100%); mask-image: linear-gradient(90deg, transparent 10%, #000 100%); }
.sb-glow { position: absolute; right: -80px; top: -110px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(34, 197, 94, 0.2), transparent 68%); }
.sb-tile { position: relative; flex: none; width: 76px; height: 76px; border-radius: 20px; display: grid; place-items: center; background: var(--card-hi); border: 1px solid var(--line-hi); color: var(--green); }
.sb-tile svg.i { width: 36px; height: 36px; }
.sb-hero-txt { position: relative; display: grid; gap: 10px; justify-items: start; min-width: 0; }
.sb-hero h2 { margin: 0; font-family: var(--display); font-size: 26px; font-weight: 800; line-height: 1.2; }
.sb-hero p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.sb-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sb-feat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 8px; align-content: start; }
.sb-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--active); color: var(--text); }
.sb-ico svg.i { width: 20px; height: 20px; }
.sb-feat h3 { margin: 4px 0 0; font-size: 14.5px; font-weight: 800; }
.sb-feat p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.sb-road h3 { margin: 0 0 14px; font-size: 14.5px; font-weight: 800; }
.sb-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; position: relative; }
.sb-step { position: relative; display: grid; gap: 10px; padding-top: 22px; }
.sb-step::before { content: ""; position: absolute; left: 0; right: -12px; top: 6px; height: 2px; background: var(--line-hi); }
.sb-step:last-child::before { right: 0; background: linear-gradient(90deg, var(--line-hi), transparent); }
.sb-dot { position: absolute; left: 0; top: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--card); border: 2px solid var(--line-hi); z-index: 1; }
.sb-step.now .sb-dot { background: var(--green); border-color: var(--green); box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); }
.sb-step.now::before { background: linear-gradient(90deg, var(--green), var(--line-hi)); }
.sb-step div { display: grid; gap: 2px; }
.sb-step b { font-size: 13.5px; }
.sb-step div span { color: var(--muted); font-size: 13px; }
.sb-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sb-cta p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.sb-link { text-decoration: none; }
.sb-hero, .sb-feat, .sb-road, .sb-cta { animation: sb-in 0.5s ease both; }
.sb-feat:nth-child(2) { animation-delay: 0.08s; }
.sb-feat:nth-child(3) { animation-delay: 0.16s; }
.sb-road { animation-delay: 0.2s; }
.sb-cta { animation-delay: 0.28s; }
@keyframes sb-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sb-hero, .sb-feat, .sb-road, .sb-cta { animation: none !important; } }
@media (max-width: 720px) {
    .sb-hero { flex-direction: column; align-items: flex-start; padding: 24px 18px; }
    .sb-hero h2 { font-size: 21px; }
    .sb-feats, .sb-steps { grid-template-columns: 1fr; }
    .sb-step::before { display: none; }
    .sb-step { padding: 0 0 0 26px; }
    .sb-dot { top: 2px; }
}

/* «Бусты»: the hero gets the picture (img/boosts-hero.webp) on the right, the text stays on the left over a dark fade */
.sb-hero { min-height: 300px; background: #0a0a0a url("/img/boosts-hero.webp") right center / auto 100% no-repeat; }
.sb-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0a0a0a 0%, rgba(10, 10, 10, 0.92) 38%, rgba(10, 10, 10, 0.35) 62%, rgba(10, 10, 10, 0) 100%); pointer-events: none; }
.sb-glow { display: none; }
@media (max-width: 720px) {
    .sb-hero { min-height: 340px; background-position: right bottom; background-size: auto 62%; align-items: flex-start; }
    .sb-hero::before { background: linear-gradient(180deg, #0a0a0a 0%, rgba(10, 10, 10, 0.94) 45%, rgba(10, 10, 10, 0.2) 100%); }
}
/* «Бусты»: the page is short, so the default bottom padding of .content must not make the window scroll */
.content:has(.sb-page) { padding-bottom: 24px; }
@media (max-width: 720px) { .content:has(.sb-page) { padding-bottom: calc(150px + env(safe-area-inset-bottom)); } }

/* OplotCoin tab (subscription page) */
.coin-ico { width: 1.1em; height: 1.1em; min-width: 16px; min-height: 16px; vertical-align: -0.2em; object-fit: contain; display: inline-block; }
.sub-badge .coin-ico { margin-right: 6px; width: 14px; height: 14px; min-width: 14px; min-height: 14px; vertical-align: -3px; }
.coin-box { display: grid; gap: 18px; max-width: 1180px; margin: 0 auto; }
.coin-bal { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 16px 20px; border-radius: 24px; background: var(--card); border: 1px solid var(--line-hi); text-align: center; color: var(--muted); font-size: 15px; }
.coin-bal b { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font: 800 26px var(--display); letter-spacing: -0.02em; }
.coin-bal b .coin-ico { width: 26px; height: 26px; }
.coin-bal.none { line-height: 1.5; }
.coin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.coin-pack { align-items: center; text-align: center; padding: 24px 20px 22px; gap: 10px; }
.coin-pack .sub-price b { font-size: 36px; }
.coin-arrow { display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 16px; margin-bottom: 6px; }
.coin-arrow b { color: var(--text); font: 800 20px var(--display); }
.coin-arrow .coin-ico { width: 20px; height: 20px; }
.coin-pack .btn { width: 100%; margin-top: auto; }
.coin-buy { height: 44px; border-radius: 14px; border: 0; background: #fff; color: #0a0a0a; font-weight: 800; font-size: 14.5px; }
.coin-buy:hover { background: #e6e6e6; }
.coin-buy:active { transform: scale(0.98); }
.coin-custom { border-color: rgba(255, 255, 255, 0.22); }
.coin-field { position: relative; width: 100%; }
.coin-field .coin-input { width: 100%; height: 44px; border-radius: 14px; padding-right: 34px; text-align: center; font-size: 18px; font-weight: 700; }
.coin-field > span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; pointer-events: none; }
.coin-off { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 28px 20px; }
.coin-off p { margin: 0; }
.coin-sum { display: flex; align-items: center; justify-content: center; gap: 8px; }
.coin-sum .coin-ico { width: 20px; height: 20px; }
.sub-media .coin-ico { width: 26px; height: 26px; }
@media (max-width: 560px) {
    .coin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .coin-pack { padding: 18px 12px 16px; }
    .coin-pack .sub-price b { font-size: 28px; }
    .coin-custom { grid-column: 1 / -1; }
    .coin-bal b { font-size: 22px; }
}

.expiry-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 14px; border-radius: 10px; background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.35); border-left: 3px solid #f59e0b; font-size: 13.5px; }
.expiry-banner > span { flex: 1; min-width: 0; }
.expiry-x { background: none; border: 0; color: var(--muted, #9ca3af); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; }
.expiry-x:hover { color: #f59e0b; }
.info-banner { background: rgba(59, 130, 246, 0.08); border-color: rgba(59, 130, 246, 0.35); border-left-color: #3b82f6; }
.info-banner .expiry-x:hover { color: #3b82f6; }
.suffix[hidden] { display: none; }

/* Резервный сервер: небольшая плашка внизу экрана вместо полосы на всю ширину */
.safe-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px);
    padding: 10px 10px 10px 14px; border-radius: 14px; background: rgba(18, 20, 16, 0.96); border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.03) inset; animation: safeBarIn .4s cubic-bezier(.2,.7,.2,1) both; }
.safe-bar-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); animation: safeBarPulse 2s infinite; }
.safe-bar-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.25; }
.safe-bar-txt b { font-size: 13px; font-weight: 600; color: #f3f4ef; }
.safe-bar-txt span { font-size: 12px; color: #a1a59b; }
.safe-bar-x { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 0; background: transparent; color: #8c9187; font-size: 18px; line-height: 1; cursor: pointer; }
.safe-bar-x:hover { background: rgba(255, 255, 255, 0.06); color: #f3f4ef; }
@keyframes safeBarPulse { 0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); } }
@keyframes safeBarIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .safe-bar, .safe-bar-dot { animation: none; } }

/* Экран ошибки панели (renderFatal) в стиле главной */
.fatal { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background:
    radial-gradient(520px 360px at 50% 38%, rgba(195, 245, 60, 0.09), transparent 70%),
    radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1.2px) 0 0 / 22px 22px, #060706; }
.fatal-card { width: min(440px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
    padding: 36px 30px 28px; border-radius: 24px; border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(24, 27, 22, 0.9), rgba(12, 14, 11, 0.92)); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
    animation: fatalIn .5s cubic-bezier(.2,.7,.2,1) both; }
.fatal-logo { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 20px; margin-bottom: 8px;
    background: radial-gradient(circle at 50% 40%, #23271f, #0d0f0b); border: 1px solid rgba(195, 245, 60, 0.25);
    box-shadow: 0 0 40px rgba(195, 245, 60, 0.18); }
.fatal-logo > * { max-width: 44px; max-height: 44px; }
.fatal-cap { font: 500 11px/1 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; color: #c3f53c; }
.fatal-title { margin: 2px 0 0; font: 800 clamp(22px, 4vw, 28px)/1.15 Unbounded, var(--font, sans-serif); letter-spacing: -.03em; color: #f3f4ef; }
.fatal-text { margin: 0; max-width: 34ch; font-size: 14px; line-height: 1.55; color: #a1a59b; }
.fatal-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.fatal-btn { height: 42px; padding: 0 22px; border-radius: 99px; font-size: 14px; font-weight: 600; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(20, 23, 18, 0.8); color: #f3f4ef; transition: transform .2s, box-shadow .3s, background .2s; }
.fatal-btn:hover { background: rgba(32, 36, 29, 0.9); }
.fatal-btn.fatal-btn-main { background: #c3f53c; color: #0b0d0a; border-color: transparent; }
.fatal-btn.fatal-btn-main:hover { transform: translateY(-1px); box-shadow: 0 8px 30px -6px rgba(195, 245, 60, 0.55); background: #c3f53c; }
.fatal-link { margin-top: 10px; font-size: 12.5px; color: #8c9187; text-decoration: none; border-bottom: 1px dashed rgba(140, 145, 135, 0.5); }
.fatal-link:hover { color: #f3f4ef; }
@keyframes fatalIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fatal-card { animation: none; } }
.fatal-logo .mark { width: 44px; height: 44px; background: none; border: 0; box-shadow: none; padding: 0; } .fatal-logo .mark img { width: 100%; height: 100%; object-fit: contain; }
.fatal-btn { display: inline-flex; align-items: center; justify-content: center; line-height: 1; font-family: inherit; }

/* Резервный сервер: выключенные разделы серые, открываются как заглушка */
.nav.safe-off, .sec-tab.safe-off, .palette button.safe-off { opacity: 0.4; cursor: not-allowed; }
.nav.safe-off:hover, .sec-tab.safe-off:hover, .palette button.safe-off:hover { background: transparent; color: var(--muted); }
.safe-off .lock { margin-left: auto; display: inline-flex; }
.safe-off .lock svg { width: 13px; height: 13px; }

/* Админка → Серверы: кнопки в колонке фиксированной ширины (у своих серверов нет «Заблокировать», колонки не должны ездить),
   значки модулей переносятся, а не залезают под кнопки */
@media (min-width: 901px) {
    .adm-t-servers .admin-row { grid-template-columns: minmax(200px, 1.3fr) 150px minmax(0, 1.5fr) 430px; }
    .adm-t-support .admin-row { grid-template-columns: minmax(200px, 1.4fr) minmax(90px, 0.5fr) minmax(220px, 1.6fr) minmax(150px, auto); }
    .adm-t-servers .admin-row > :nth-child(3) { min-width: 0; overflow: hidden; }
    .adm-t-servers .admin-row .mod-icons { flex-wrap: wrap; row-gap: 3px; }
    .adm-t-servers .admin-acts { justify-content: flex-end; flex-wrap: nowrap; }
    .adm-t-servers .admin-acts .sc-ctl { flex-wrap: nowrap; }
}

/* Админка → Серверы: значки модулей - линейные иконки, цвет = статус */
.admin-row .mod-ico { filter: none; opacity: 1; width: 26px; height: 26px; border-radius: 8px; color: #6f746a; background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.06); }
.admin-row .mod-ico svg { width: 15px; height: 15px; }
.admin-row .mod-ico.mi-off { opacity: 0.45; }
.admin-row .mod-ico.mi-free { color: #c3f53c; background: rgba(195, 245, 60, 0.08); border-color: rgba(195, 245, 60, 0.28); }
.admin-row .mod-ico.mi-paid { color: #f5c542; background: rgba(245, 197, 66, 0.09); border-color: rgba(245, 197, 66, 0.32); }

/* Админка: группы вкладок, шапка вкладки, единая сетка карточек. */
.adm-grp { flex: none; align-self: center; width: 1px; height: 20px; margin: 0 6px; background: var(--line-hi, var(--line)); font-size: 0; color: transparent; overflow: hidden; }
.adm-grp:first-child { display: none; }
.adm-content { width: 100%; max-width: 1280px; gap: 16px; }
.adm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 2px 2px 0; }
.adm-head-t { min-width: 0; }
.adm-head h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1.15; }
.adm-head p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.4; }
.adm-head .btn { flex: none; }
.adm-content .card { border-radius: 16px; padding: 18px 20px; border: 1px solid var(--line); }
.adm-content .adm-grid { gap: 16px; }
.adm-content .adm-kpis { gap: 16px; }
.adm-content > .stack > .adm-toolbar, .adm-content > .stack > .toolbar { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 20px; margin-bottom: 16px; }
@media (min-width: 1100px) {
    .adm-top .adm-tabs { gap: 2px; }
    .adm-grp { align-self: stretch; width: auto; height: auto; margin: 12px 0 4px; padding: 0 12px; background: none; font-family: ui-monospace, Consolas, monospace; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); overflow: visible; }
    .adm-grp:first-child { display: block; margin-top: 4px; }
}
@media (max-width: 600px) {
    .adm-head { flex-direction: column; align-items: stretch; }
    .adm-head h2 { font-size: 21px; }
    .adm-head .btn { width: 100%; justify-content: center; }
}
.adm-layout { width: 100%; }

/* Админка → Аналитика */
.ana-bar { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.ana-bar .chip-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.ana-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto 44px; gap: 12px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.ana-row .meter { margin: 0; }
.ana-row .ana-k { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ana-row small { color: var(--faint); font-weight: 600; text-align: right; }
.ana-fn { padding: 10px 0; border-top: 1px solid var(--line); }
.ana-fn:first-of-type { border-top: 0; }
.ana-fn-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 13.5px; }
.ana-fn-top span { color: var(--muted); font-weight: 600; }
.ana-fn .meter { height: 10px; margin-bottom: 6px; }
.ana-fn small { color: var(--faint); font-weight: 600; font-size: 12px; }
@media (max-width: 640px) {
    .ana-row { grid-template-columns: minmax(0, 1fr) auto 40px; }
    .ana-row .meter { grid-column: 1 / -1; order: 5; }
}

/* Аналитика: без «газетных» колонок общей раскладки Админки - блоки идут сверху вниз на всю ширину */
.adm-content.adm-t-analytics > .stack { display: flex !important; flex-direction: column; gap: 16px; column-width: auto !important; columns: auto !important; }
.adm-content.adm-t-analytics > .stack > * { margin: 0 !important; break-inside: auto; }
.adm-t-analytics .adm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .adm-t-analytics .adm-grid { grid-template-columns: 1fr; } }

/* Меню Админки на широком экране: компактнее, чтобы влезало целиком; если экран низкий - видимая тонкая прокрутка */
@media (min-width: 1100px) {
    .adm-top { top: 72px; max-height: calc(100vh - 88px); scrollbar-width: thin; scrollbar-color: var(--line-hi, #333) transparent; }
    .adm-top::-webkit-scrollbar { display: block; width: 4px; }
    .adm-top::-webkit-scrollbar-thumb { background: var(--line-hi, #333); border-radius: 4px; }
    .adm-top .adm-tabs > button { padding-top: 7px; padding-bottom: 7px; min-height: 0; }
    .adm-grp { margin: 8px 0 2px !important; }
    .adm-grp:first-child { margin-top: 2px !important; }
}

/* Аналитика: бенто-сетка (классы ab-*) */
.ab-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.ab-card { background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 24px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ab-a, .ab-d { grid-column: span 5; }
.ab-b, .ab-c { grid-column: span 7; }
.ab-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ab-lbl { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.ab-sub { font-size: 12px; font-weight: 600; color: var(--faint); }
.ab-live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--muted); }
.ab-live i { width: 7px; height: 7px; border-radius: 50%; background: #7ef0b0; box-shadow: 0 0 0 3px rgba(126, 240, 176, 0.18); }
.ab-bigrow { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.ab-big { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; font-size: 44px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; color: var(--text); }
.ab-delta { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 700; }
.ab-up { color: #4ade80; }
.ab-down { color: #f87171; }
.ab-na { color: var(--faint); font-family: "Manrope", sans-serif; font-weight: 600; font-size: 12px; }
.ab-note { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.ab-chartbox { margin-top: auto; padding-top: 8px; }
.ab-svg { width: 100%; height: auto; display: block; overflow: visible; }
.ab-svg .ab-gl { stroke: var(--line); stroke-width: 1; }
.ab-svg .ab-center { stroke: var(--line-hi); stroke-dasharray: 3 4; }
.ab-ax { fill: var(--faint); font-size: 11px; font-weight: 600; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; }
.ab-axl { fill: var(--muted); font-family: "Manrope", sans-serif; font-weight: 700; font-size: 12px; }
.ab-stroke, .ab-wl, .ab-rstroke { stroke-linecap: round; stroke-linejoin: round; fill: none; }
.ab-cross { stroke: var(--line-hi); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.ab-hdot { fill: #7ef0b0; stroke: var(--card); stroke-width: 2; pointer-events: none; }
.ab-enddot { stroke: var(--card); stroke-width: 2; }
.ab-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.ab-lg { display: inline-flex; align-items: center; gap: 8px; }
.ab-lg i { width: 18px; height: 4px; border-radius: 2px; }
.ab-lg-d i { background: linear-gradient(90deg, #22D3EE, #6a5cff); }
.ab-lg-m i { background: linear-gradient(90deg, #FFB800, #FF3DA5); }
.ab-lg-p i { background: var(--muted); opacity: 0.5; height: 2px; }
.ab-groups { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ab-grp { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.ab-grp i { width: 10px; height: 10px; border-radius: 3px; }
.ab-pbtns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ab-pbtn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border-radius: 18px; border: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; transition: background 0.15s, border-color 0.15s; }
.ab-pbtn:hover { background: var(--hover); }
.ab-pbtn.on { background: var(--active); border-color: var(--line-hi); }
.ab-pl { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.ab-pbtn b { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; font-size: 18px; }
.ab-tm { position: relative; width: 100%; aspect-ratio: 100 / 62; min-height: 220px; border-radius: 18px; overflow: hidden; }
.ab-tile { position: absolute; padding: 2px; transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease; }
.ab-tin { width: 100%; height: 100%; border-radius: 12px; background: var(--c); color: var(--ink); padding: 8px 10px; display: flex; flex-direction: column; justify-content: space-between; gap: 4px; overflow: hidden; transition: filter 0.15s; }
.ab-tile:hover .ab-tin { filter: brightness(1.12); }
.ab-tn { font-size: 12.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-tc { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; }
.ab-tc b { font-size: 15px; }
.ab-tc em { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(0, 0, 0, 0.18); }
.ab-tiny .ab-tn, .ab-tiny .ab-tc { display: none; }
.ab-tiny .ab-tin { padding: 0; }
.ab-empty { color: var(--faint); font-size: 13px; font-weight: 600; }
.ab-tm-empty { position: absolute; inset: 0; display: grid; place-items: center; border: 1px dashed var(--line-hi); border-radius: 18px; }
.ab-st { margin-top: 6px; }
.ab-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ab-tbl th { text-align: right; font-size: 11.5px; font-weight: 700; color: var(--faint); padding: 6px 0; }
.ab-tbl th:first-child, .ab-tbl td:first-child { text-align: left; }
.ab-tbl td { text-align: right; padding: 8px 0; border-top: 1px solid var(--line); font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; }
.ab-tbl td:first-child { font-family: "Manrope", sans-serif; font-weight: 600; color: var(--text); }
.ab-seg { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 999px; background: var(--active); border: 1px solid var(--line); }
.ab-thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px; background: var(--line-hi); transition: transform 0.28s cubic-bezier(0.3, 0.8, 0.3, 1); }
.ab-segb { position: relative; z-index: 1; border: 0; background: transparent; padding: 6px 14px; font-size: 12px; font-weight: 700; color: var(--muted); border-radius: 999px; white-space: nowrap; }
.ab-segb.on { color: var(--text); }
.ab-radarbox { width: min(100%, 330px); margin: 0 auto; }
.ab-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.ab-hex { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linejoin: round; opacity: 0.7; }
.ab-rfill { stroke: none; }
.ab-rdot { fill: #c3f53c; stroke: var(--card); stroke-width: 1.6; }
.ab-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ab-stat { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.ab-srow { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ab-srow b { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; font-size: 22px; }
.ab-drow { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.ab-dbar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--line); gap: 2px; }
.ab-dbar i { display: block; height: 100%; }
.ab-dleg { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ab-dleg span { display: inline-flex; align-items: center; gap: 6px; }
.ab-dleg i { width: 8px; height: 8px; border-radius: 50%; }
.ab-dleg b { color: var(--text); }
.ab-tip { position: fixed; z-index: 9999; pointer-events: none; display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 12px; background: #151515; border: 1px solid var(--line-hi); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5); font-size: 12.5px; font-weight: 600; color: var(--muted); max-width: 280px; }
.ab-tip b { color: var(--text); font-weight: 800; overflow-wrap: anywhere; }
@media (max-width: 999px) {
    .ab-a, .ab-b, .ab-c, .ab-d { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .ab-grid { gap: 12px; }
    .ab-card { padding: 16px; border-radius: 22px; }
    .ab-big { font-size: 32px; }
    .ab-srow b { font-size: 19px; }
    .ab-pbtn { padding: 8px 10px; }
    .ab-pbtn b { font-size: 15px; }
    .ab-tm { min-height: 260px; aspect-ratio: 100 / 90; }
    .ab-tn { font-size: 11px; }
    .ab-tc b { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .ab-tile, .ab-thumb { transition: none; }
}


/* Роли-цвета: превью палитры */
.crole-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.crole-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; border: 1px solid var(--border, rgba(127, 127, 127, .25)); font-size: 13px; }
.crole-sw { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }

/* Админка → Обновления (changelog-admin.js) */
.admchl-form { display: grid; gap: 12px; }
.admchl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admchl-field { display: grid; gap: 6px; min-width: 0; }
.admchl-field > span { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.admchl-field textarea.input { border-radius: 18px; resize: vertical; font-weight: 500; font-family: inherit; }
.admchl-check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.admchl-list { display: grid; gap: 8px; }
.admchl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.admchl-row:first-child { border-top: 0; }
.admchl-info { flex: 1 1 260px; min-width: 0; display: grid; gap: 3px; }
.admchl-info b { overflow-wrap: anywhere; }
.admchl-info small { color: var(--muted); }
.admchl-pill { display: inline-block; padding: 2px 10px; border-radius: 99px; border: 1px solid var(--line-hi); font-size: 11.5px; color: var(--muted); }
.admchl-pill.on { color: #c3f53c; border-color: rgba(195, 245, 60, 0.45); }
.admchl-btns { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 700px) { .admchl-grid { grid-template-columns: minmax(0, 1fr); } }

/* Админка -> Вакансии (vacancies-admin.js) */
.admvac-form { display: grid; gap: 12px; margin-top: 10px; }
.admvac-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.admvac-field { display: grid; gap: 6px; min-width: 0; }
.admvac-field > span { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.admvac-field textarea.input { border-radius: 18px; resize: vertical; font-weight: 500; font-family: inherit; }
.admvac-field input[type="color"] { padding: 4px; height: 44px; }
.admvac-check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.admvac-list { display: grid; gap: 4px; margin-top: 8px; }
.admvac-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.admvac-list > .admvac-row:first-child, .admvac-list > .admvac-app:first-child > .admvac-row { border-top: 0; }
.admvac-info { flex: 1 1 260px; min-width: 0; display: grid; gap: 3px; }
.admvac-info b { overflow-wrap: anywhere; }
.admvac-info small { color: var(--muted); overflow-wrap: anywhere; }
.admvac-pill { display: inline-block; padding: 2px 10px; border-radius: 99px; border: 1px solid var(--line-hi); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.admvac-pill.on, .admvac-pill.st-accepted { color: #c3f53c; border-color: rgba(195, 245, 60, 0.45); }
.admvac-pill.st-new, .admvac-pill.st-review { color: #5cc8e8; border-color: rgba(92, 200, 232, 0.45); }
.admvac-pill.st-rejected { color: #ff9a9a; border-color: rgba(255, 120, 120, 0.4); }
.admvac-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.admvac-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.admvac-filters .input { max-width: 260px; }
.admvac-more { padding: 4px 0 14px; display: grid; gap: 6px; font-size: 14px; }
.admvac-more p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.admvac-app { border-top: 1px solid var(--line); }
@media (max-width: 700px) { .admvac-grid { grid-template-columns: minmax(0, 1fr); } }

/* Админка -> Партнёры (partners-admin.js) */
.admprt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 12px 0; }
.admprt-field { display: grid; gap: 6px; min-width: 0; }
.admprt-field > span { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.admprt-sub { margin: 18px 0 8px; }
.admprt-tiers { display: grid; gap: 10px; margin-bottom: 12px; }
.admprt-tier { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.admprt-list { display: grid; gap: 4px; margin-top: 8px; }
.admprt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.admprt-list > .admprt-row:first-child { border-top: 0; }
.admprt-info { flex: 1 1 280px; min-width: 0; display: grid; gap: 3px; }
.admprt-info b { overflow-wrap: anywhere; }
.admprt-info small { color: var(--muted); overflow-wrap: anywhere; }
.admprt-pill { display: inline-block; padding: 2px 10px; border-radius: 99px; border: 1px solid var(--line-hi); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.admprt-pill.on { color: #c3f53c; border-color: rgba(195, 245, 60, 0.45); }
.admprt-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admprt-lv { width: auto; min-width: 160px; }
@media (max-width: 700px) { .admprt-tier { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* Панель сервера -> Сотрудничество (sections.js coopPage) */
.coop-page { display: grid; gap: 16px; }
.coop-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-start; }
.coop-head h2 { margin: 0 0 6px; }
.coop-head .muted { max-width: 560px; margin: 0; }
.coop-sum { display: grid; gap: 8px; justify-items: end; }
.coop-sum b { font-size: 22px; }
.coop-pill { display: inline-block; padding: 3px 11px; border-radius: 99px; border: 1px solid var(--line-hi); font-size: 12.5px; color: var(--muted); margin-left: 8px; }
.coop-sum .coop-pill { margin-left: 0; }
.coop-pill.good { color: #c3f53c; border-color: rgba(195, 245, 60, 0.5); }
.coop-rows { display: grid; gap: 16px; }
.coop-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: baseline; }
.coop-l { display: flex; align-items: center; gap: 9px; min-width: 0; }
.coop-dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--muted); flex: none; display: grid; place-items: center; font-size: 11px; line-height: 1; color: #10150a; }
.coop-row.ok .coop-dot { background: #c3f53c; border-color: #c3f53c; }
.coop-v { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.coop-row.ok .coop-v { color: inherit; }
.coop-bar { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: rgba(127, 127, 127, 0.18); overflow: hidden; }
.coop-bar i { display: block; height: 100%; border-radius: 99px; background: #c3f53c; }
.coop-row:not(.ok) .coop-bar i { background: #f5b942; }
.coop-lvs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.coop-lv { text-align: left; display: grid; gap: 6px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line-hi); background: none; cursor: pointer; color: inherit; }
.coop-lv span { color: var(--muted); font-size: 13px; }
.coop-lv.on { border-color: #c3f53c; box-shadow: 0 0 0 1px #c3f53c inset; }
.coop-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 12px 0; }
.coop-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 8px; }
.coop-form label { display: grid; gap: 6px; flex: 1 1 180px; }
.coop-form label span { font-size: 12.5px; color: var(--muted); font-weight: 700; }
@media (max-width: 700px) { .coop-lvs { grid-template-columns: minmax(0, 1fr); } .coop-sum { justify-items: start; } }

/* Маскот: загрузка, ошибка, мастер ИИ, благодарность (классы msc-*) */
.msc-boot { --s: 104px; }
.msc-boot .msc-d, .msc-boot .msc-b { width: 100%; height: 100%; }
.fatal-msc { display: grid; place-items: center; margin-bottom: 2px; }
.sub-pn .msc { margin-left: auto; margin-top: -6px; margin-bottom: -6px; }
.msc-thanks { display: flex; align-items: center; gap: 14px; padding: 10px 18px; border-color: rgba(198, 244, 50, .25); }
.msc-thanks .t { display: grid; gap: 2px; min-width: 0; }
.msc-thanks .t span { color: var(--muted); font-size: 13px; }

/* ── ИИ-помощник: плавающий чат (aiwc-*), виджет справа внизу на страницах сервера ── */
.aiwc-root { display: none; font-size: 14px; } /* без position и z-index: иначе окно чата попадает в чужой слой и прячется под нижним меню */
body:has(.frame):not(:has(.frame.adm-full)) .aiwc-root { display: block; }
body.has-save .aiwc-launcher { bottom: calc(88px + var(--safe-b)); }
.aiwc-launcher { position: fixed; right: max(18px, var(--safe-r)); bottom: calc(18px + var(--safe-b)); z-index: 33; width: 58px; height: 58px; border-radius: 50%; border: 1px solid rgba(198, 244, 50, .4); background: #0d0d0d; display: grid; place-items: center; padding: 0; cursor: pointer; box-shadow: 0 0 0 4px rgba(198, 244, 50, .06), 0 8px 26px rgba(198, 244, 50, .18), 0 10px 30px rgba(0, 0, 0, .55); transition: transform .18s, box-shadow .18s, border-color .18s; }
.aiwc-launcher:hover { transform: translateY(-2px) scale(1.04); border-color: rgba(198, 244, 50, .7); box-shadow: 0 0 0 5px rgba(198, 244, 50, .1), 0 10px 32px rgba(198, 244, 50, .28), 0 10px 30px rgba(0, 0, 0, .55); }
.aiwc-launcher:focus-visible { outline: 2px solid #c6f432; outline-offset: 3px; }
.aiwc-launcher .msc { --s: 44px; margin-top: 2px; }
.aiwc-launcher::after { content: attr(data-tip); position: absolute; right: 100%; top: 50%; margin-right: 10px; transform: translate(6px, -50%); padding: 6px 11px; border-radius: 999px; background: #141414; border: 1px solid var(--line-hi); color: var(--text); font-size: 12.5px; font-weight: 700; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
.aiwc-launcher:hover::after, .aiwc-launcher:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
.aiwc-root.is-open .aiwc-launcher { display: none; }

.aiwc-panel { position: fixed; right: max(18px, var(--safe-r)); bottom: calc(18px + var(--safe-b)); width: 400px; height: min(620px, calc(100vh - 36px)); display: flex; flex-direction: column; background: var(--frame); border: 1px solid var(--line-hi); border-radius: 22px; overflow: hidden; z-index: 44; box-shadow: 0 24px 70px rgba(0, 0, 0, .65), 0 0 0 1px rgba(198, 244, 50, .06); animation: aiwc-in .22s ease-out; transform-origin: 100% 100%; }
@keyframes aiwc-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.aiwc-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(198, 244, 50, .07), transparent); flex: none; }
.aiwc-ava { width: 42px; height: 42px; border-radius: 50%; background: #111; border: 1px solid rgba(198, 244, 50, .35); display: grid; place-items: center; flex: none; overflow: hidden; }
.aiwc-ava .msc { --s: 36px; margin-top: 3px; }
.aiwc-title { display: grid; gap: 1px; min-width: 0; flex: 1; }
.aiwc-title b { font-family: var(--display); font-size: 13.5px; }
.aiwc-title small { color: var(--faint); font-size: 12px; }
.aiwc-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; padding: 0; }
.aiwc-x:hover { background: var(--hover); color: var(--text); }
.aiwc-thread-box { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px; display: grid; gap: 14px; align-content: start; }
.aiwc-quick p { margin: 0 0 12px; line-height: 1.5; color: var(--muted); font-size: 13.5px; }
.aiwc-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.aiwc-chip { border: 1px solid var(--line-hi); background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 12.8px; font-weight: 700; color: var(--text); transition: background .15s, border-color .15s; text-align: left; }
.aiwc-chip:hover { background: var(--hover); border-color: rgba(198, 244, 50, .5); }
.aiwc-chip.on { background: #fff; color: #000; border-color: #fff; }
.aiwc-chip.big { padding: 8px 14px; font-size: 13px; }
.aiwc-chip:disabled { opacity: .4; pointer-events: none; }
.aiwc-thread { display: grid; gap: 12px; }
.aiwc-msg { display: grid; gap: 10px; min-width: 0; }
.aiwc-msg.me { justify-items: end; }
.aiwc-bubble { max-width: 92%; padding: 9px 13px; border-radius: 16px; line-height: 1.5; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.aiwc-msg.me .aiwc-bubble { background: #fff; color: #000; border-bottom-right-radius: 5px; font-weight: 600; }
.aiwc-msg.bot .aiwc-bubble { background: var(--card-hi); border: 1px solid var(--line); border-bottom-left-radius: 5px; justify-self: start; }
.aiwc-bubble.err { border-color: rgba(239, 68, 68, .45); color: #fecaca; }
.aiwc-thinking { display: flex; align-items: flex-end; gap: 2px; position: relative; min-height: 56px; }
.aiwc-qm { font-family: var(--display); font-weight: 800; font-size: 18px; color: #c6f432; animation: aiwc-q 1.5s ease-in-out infinite; opacity: 0; margin-bottom: 26px; }
.aiwc-qm.b { animation-delay: .35s; font-size: 14px; margin-bottom: 36px; }
.aiwc-qm.c { animation-delay: .7s; font-size: 11px; margin-bottom: 20px; }
@keyframes aiwc-q { 0%, 100% { opacity: 0; transform: translateY(5px) rotate(-8deg); } 40%, 70% { opacity: 1; transform: translateY(-3px) rotate(6deg); } }
.aiwc-qs { display: grid; gap: 12px; }
.aiwc-q { display: grid; gap: 7px; }
.aiwc-q b { font-size: 13px; }
.aiwc-other { width: 100%; }
.aiwc-qsend { display: flex; }
.aiwc-plans { display: grid; gap: 10px; }
.aiwc-plan { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line-hi); min-width: 0; }
.aiwc-plan.rec { border-color: rgba(198, 244, 50, .5); }
.aiwc-plan.off { opacity: .55; }
.aiwc-plan-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aiwc-plan-h b { font-family: var(--display); font-size: 13.5px; }
.aiwc-rec { background: #c6f432; color: #000; }
.aiwc-sum { margin: 0; color: var(--muted); font-size: 12.8px; line-height: 1.45; }
.aiwc-more summary { cursor: pointer; font-size: 12.5px; font-weight: 800; color: var(--muted); padding: 2px 0; }
.aiwc-more summary:hover { color: var(--text); }
.aiwc-more[open] summary { margin-bottom: 8px; }
.aiwc-groups { display: grid; gap: 8px; }
.aiwc-group { padding: 8px 10px; border-radius: 10px; background: var(--frame); border: 1px solid var(--line); }
.aiwc-group.prem { opacity: .7; border-style: dashed; }
.aiwc-group-h { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-weight: 800; font-size: 12.5px; margin-bottom: 5px; }
.aiwc-group ul { margin: 0; padding-left: 16px; display: grid; gap: 3px; color: #d4d4d4; font-size: 12.3px; line-height: 1.4; }
.aiwc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.aiwc-note { color: var(--faint); font-size: 12.3px; margin: 0; }
.aiwc-warn { color: #fcd34d; font-size: 12.3px; margin: 0; line-height: 1.45; }
.aiwc-done { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid rgba(34, 197, 94, .45); }
.aiwc-done-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.aiwc-done-h .msc { margin: -6px 0 -6px -4px; }
.aiwc-composer { flex: none; display: grid; gap: 6px; padding: 10px 12px calc(10px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--frame); }
.aiwc-input { display: flex; align-items: flex-end; gap: 8px; }
.aiwc-input textarea { flex: 1; min-height: 44px; max-height: 120px; resize: none; }
.aiwc-send { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #c6f432; color: #000; display: grid; place-items: center; padding: 0; transition: transform .15s, opacity .15s; }
.aiwc-send:hover { transform: scale(1.06); }
.aiwc-send:disabled { opacity: .4; pointer-events: none; }
.aiwc-left { color: var(--faint); font-size: 12px; min-height: 14px; }
@media (max-width: 900px) {
    .aiwc-launcher { bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); right: max(14px, var(--safe-r)); }
    body.has-save .aiwc-launcher { bottom: calc(var(--tabbar-h) + var(--safe-b) + 78px); }
    .aiwc-panel { bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); height: min(620px, calc(100vh - var(--tabbar-h) - var(--safe-b) - 28px)); }
}
@media (max-width: 640px) {
    .aiwc-panel { inset: 0; width: auto; height: auto; border-radius: 0; border: 0; z-index: 55; padding-top: var(--safe-t); animation-name: aiwc-sheet; transform-origin: 50% 100%; }
    .aiwc-launcher::after { display: none; }
    .aiwc-input textarea { font-size: 16px; }
}
@keyframes aiwc-sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .aiwc-panel { animation: none; }
    .aiwc-launcher, .aiwc-launcher::after, .aiwc-send { transition: none; }
    .aiwc-launcher:hover, .aiwc-send:hover { transform: none; }
    .aiwc-qm { animation: none; opacity: 1; }
}

/* Меню Админки: до прокрутки оно стоит ниже заголовка страницы (~170px от верха), поэтому высота с запасом,
   иначе низ меню уходил за край окна и обрезался рамкой панели. Остальное листается внутри меню. */
@media (min-width: 1100px) {
    .adm-top { max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); overscroll-behavior: contain; }
}
/* Меню Админки: обычный блок без собственной прокрутки и полосы - всегда виден целиком, листается вместе со страницей. */
@media (min-width: 1100px) {
    .adm-top { position: static; max-height: none; overflow: visible; }
}

/* Достижения: образец карточки в панели */
.achv-card { flex-direction: column; align-items: stretch; }
.achv-img { display: block; width: 100%; max-width: 560px; height: auto; margin-top: 12px; border-radius: 16px; }
.achv-img[hidden] { display: none; }

/* Достижения: список со значками */
.achv-h { margin-top: 18px; }
.achv-h small, .achv-list h3 small { margin-left: 8px; color: var(--muted); font-weight: 600; }
.achv-item .item-head { gap: 8px; flex-wrap: wrap; }
.achv-mini { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; flex: none; }
.achv-thumb { image-rendering: auto; }
.achv-none { display: grid; place-items: center; font-size: 30px; }
.achv-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.achv-tag.r-rare { color: #5cc8e8; border-color: #5cc8e855; }
.achv-tag.r-epic { color: #c27bff; border-color: #c27bff55; }
.achv-tag.r-legendary { color: #ffd45c; border-color: #ffd45c55; }
.achv-ai { margin-top: 10px; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; display: grid; gap: 10px; }
.achv-ai-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.achv-variants { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.achv-variant { padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--active); cursor: pointer; }
.achv-variant:hover, .achv-variant:focus-visible { border-color: var(--accent, #c3f53c); }
.achv-variant img { display: block; width: 100%; height: auto; }
