/* Админка Танков (30.10): стиль ВКонтакте — серый фон, белые карточки, синие кнопки, тонкие разделители, системный шрифт */
:root { /* токены vkcom_light (VKUI): фон, бумага, тексты, акцент, поля, разделители; кнопки 36/44/30, скругление 8, бумага 12 */
  --bg: #edeef0; --card: #fff; --text: #000; --text2: #818c99; --text3: #99a2ad;
  --accent: #0077ff; --accent-h: #0071f2; --on-accent: #fff; --link: #2688eb; --accent-bg: #ebf2fa; --accent-t: #2688eb; --focus: #0077ff;
  --sep: #e7e8ec; --field: #f2f3f5; --field-b: #dce1e6; --hover: rgba(0, 28, 61, .04); --active: rgba(0, 28, 61, .08); --outline: rgba(0, 0, 0, .12);
  --bub-in: #f2f3f5; --bub-out: #cce4ff; --bub-meta: #818c99; --badge-blue: #ebf2fa; --red: #e64646; --red-bg: #faebeb; --green: #4bb34b; --green-bg: #e8f4e8; --orange: #ffa000; --chip: #fff;
  --r: 12px; --r-s: 8px; --shadow: 0 1px 0 0 #d7d8db, 0 0 0 1px #e3e4e8; --pop: 0 0 2px rgba(0, 0, 0, .08), 0 4px 16px rgba(0, 0, 0, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root { /* vkcom_dark: фон #141414, бумага #222, главная кнопка — светлая (accent_themed) */
  --bg: #141414; --card: #222; --text: #e1e3e6; --text2: #939393; --text3: #76787a;
  --accent: #e1e3e6; --accent-h: #d8dbdf; --on-accent: #19191a; --link: #71aaeb; --accent-bg: rgba(255, 255, 255, .08); --accent-t: #e1e3e6; --focus: #71aaeb;
  --sep: #2c2d2e; --field: #292929; --field-b: #3a3a3a; --hover: rgba(255, 255, 255, .04); --active: rgba(255, 255, 255, .08); --outline: rgba(255, 255, 255, .16);
  --bub-in: #2c2d2e; --bub-out: #2e4d70; --bub-meta: #a3adb8; --badge-blue: rgba(113, 170, 235, .14); --red: #ff5c5c; --red-bg: rgba(255, 92, 92, .12); --green: #4bb34b; --green-bg: rgba(75, 179, 75, .14); --chip: #333;
  --shadow: none; --pop: 0 0 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .3);
  color-scheme: dark;
} }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 13px/16px -apple-system, BlinkMacSystemFont, "Roboto", "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--link); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
svg.ic { width: 20px; height: 20px; flex: none; display: block; fill: currentColor; }   /* иконки ВК: заливка currentColor в самих рисунках */
svg.ic.s16 { width: 16px; height: 16px; }
.hidden { display: none !important; }

/* шапка */
.top { position: sticky; top: 0; z-index: 20; height: 48px; background: var(--card); box-shadow: 0 1px 0 var(--sep); }
.top-in { max-width: 1240px; margin: 0 auto; height: 48px; padding: 0 16px; display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; width: 200px; flex: none; }
.logo-mark { width: 28px; height: 28px; border-radius: 8px; background: #2c2d2e; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.logo-mark img { width: 68%; height: auto; display: block; margin: 4% 0 0 7%; }   /* знак тяжелее слева — на глаз по центру со сдвигом вправо */   /* знак Cerpish (белый кулак) */
.search { flex: 1; max-width: 420px; position: relative; }
.search input { width: 100%; height: 32px; border: none; border-radius: var(--r-s); background: var(--field); padding: 0 12px 0 34px; outline: none; }
.search input:focus { background: var(--card); box-shadow: 0 0 0 1px var(--focus) inset; }
.search svg { position: absolute; left: 10px; top: 8px; color: var(--text3); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--text2); }

/* разметка */
.wrap { max-width: 1240px; margin: 0 auto; padding: 16px; display: flex; gap: 16px; align-items: flex-start; }
.nav { width: 200px; flex: none; position: sticky; top: 64px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 10px; border-radius: var(--r-s); color: var(--text); text-decoration: none; }
.nav a svg { color: var(--link); }
.nav a:hover { background: var(--hover); }
.nav a.on { background: var(--active); font-weight: 500; }
.nav .sep { height: 1px; background: var(--field-b); margin: 8px 10px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }

/* карточки */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 8px; min-height: 54px; padding: 0 16px; font-size: 16px; font-weight: 500; }
.card-h .sub { font-weight: 400; color: var(--text2); font-size: 13px; }
.card-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; font-weight: 400; }
.card-b { padding: 0 16px 16px; }
.page-title { font-size: 20px; line-height: 26px; font-weight: 600; margin: 4px 4px 0; }

/* цифры обзора */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.stat { padding: 14px 16px; }
.stat .k { color: var(--text2); display: flex; align-items: center; gap: 6px; }
.stat .k svg { width: 16px; height: 16px; color: var(--text3); }
.stat .v { font-size: 24px; line-height: 30px; font-weight: 600; margin-top: 6px; letter-spacing: -.3px; }
.stat .d { color: var(--text2); margin-top: 2px; }
.stat .d b { color: var(--green); font-weight: 500; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 1000px) { .grid2 { grid-template-columns: 1fr; } .nav { width: 52px; } .nav a span, .logo span { display: none; } .logo { width: auto; } }

/* график */
.chart { height: 150px; display: flex; align-items: flex-end; gap: 3px; padding-top: 8px; position: relative; }
.bar { flex: 1; background: var(--link); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; position: relative; transition: opacity .15s; }
.bar:hover { opacity: 1; }
.bar.zero { background: var(--field-b); }
.chart-x { display: flex; justify-content: space-between; color: var(--text3); font-size: 11px; margin-top: 6px; }
.tip { position: fixed; z-index: 50; background: rgba(0, 0, 0, .8); color: #fff; padding: 4px 8px; border-radius: 6px; font-size: 12px; pointer-events: none; white-space: nowrap; }
.hbar { display: flex; align-items: center; gap: 10px; height: 28px; }
.hbar .n { width: 150px; flex: none; color: var(--text); }
.hbar .t { flex: 1; height: 8px; background: var(--field); border-radius: 4px; overflow: hidden; }
.hbar .t i { display: block; height: 100%; background: var(--link); border-radius: 4px; }
.hbar .c { width: 50px; text-align: right; color: var(--text2); }

/* таблица */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 500; color: var(--text2); padding: 8px 12px; border-bottom: 1px solid var(--sep); white-space: nowrap; }
.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--sep); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--hover); }
.tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl .muted { color: var(--text2); }
.scroll-x { overflow-x: auto; }

/* человек */
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ava { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 14px; flex: none; }
.ava.staff { background: var(--field); color: var(--text2); }
.ava.staff svg { width: 60%; height: 60%; }
.ava.big { width: 80px; height: 80px; font-size: 30px; }
.who .nm { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .tg { color: var(--text2); font-size: 12px; }
.badge { white-space: nowrap; display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 12px; font-weight: 500; }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.grey { background: var(--field); color: var(--text2); }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.blue { background: var(--badge-blue); color: var(--link); }

/* кнопки и поля */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border: none; border-radius: var(--r-s); background: var(--accent); color: var(--on-accent); font-weight: 500; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, opacity .15s; }
.btn:hover { background: var(--accent-h); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sec { background: var(--accent-bg); color: var(--accent-t); }
.btn.sec:hover { filter: brightness(.97); }
.btn.out { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--outline); }
.btn.out:hover { background: var(--hover); }
.btn.l { height: 44px; font-size: 15px; }
.btn.ter { background: transparent; color: var(--accent-t); padding: 0 10px; }
.btn.ter:hover { background: var(--hover); }
.btn.red { background: var(--red-bg); color: var(--red); }
.btn.red:hover { filter: brightness(.96); }
.btn.s { height: 30px; padding: 0 12px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn svg { width: 18px; height: 18px; }
.inp, .sel, .ta { font-size: 14px; font-weight: 400; line-height: 18px; height: 36px; border: 1px solid var(--field-b); background: var(--field); border-radius: var(--r-s); padding: 0 12px; outline: none; transition: border-color .15s, background .15s; }
.ta { height: 96px; padding: 8px 12px; resize: vertical; width: 100%; }
.inp:focus, .sel:focus, .ta:focus { border-color: var(--focus); background: var(--card); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { color: var(--text2); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--text2); cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: #0077ff; }
.err { color: var(--red); }
.err:empty { display: none; }
.muted { color: var(--text2); }
.form { max-width: 440px; }
.form.wide { max-width: 640px; }
.card-h .inp, .card-h .sel { height: 32px; font-size: 13px; }
.card-h .check { font-size: 13px; }
.ok { color: var(--green); }
.more { display: flex; justify-content: center; padding: 8px 0 12px; }
.empty { color: var(--text2); text-align: center; padding: 28px 0; }

/* профиль игрока */
.profile { display: flex; gap: 20px; padding: 20px; align-items: center; flex-wrap: wrap; }
.profile .info { flex: 1; min-width: 220px; }
.profile h2 { margin: 0; font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile .meta { color: var(--text2); margin-top: 6px; display: flex; gap: 14px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.tile { background: var(--field); border-radius: var(--r-s); padding: 10px 12px; }
.tile .k { color: var(--text2); font-size: 12px; }
.tile .v { font-size: 17px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.plus { color: var(--green); } .minus { color: var(--red); }

/* окно */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 40; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: 100%; max-width: 440px; background: var(--card); border-radius: var(--r); box-shadow: var(--pop); animation: pop .18s; }
.modal-h { display: flex; align-items: center; padding: 16px 16px 8px; font-size: 17px; font-weight: 600; }
.modal-h .x { margin-left: auto; margin-right: -8px; }
.modal-b { padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.modal-f { display: flex; gap: 8px; justify-content: flex-end; padding: 0 16px 16px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }

/* вход (как вход ВКонтакте: бумага 360, поля 28, логотип 48, кнопки 36, сначала логин, потом пароль) */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-box { width: 360px; max-width: 100%; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 28px; display: flex; flex-direction: column; gap: 16px; animation: pop .2s; }
.login-box .logo-mark { width: 48px; height: 48px; font-size: 22px; border-radius: 12px; margin: 0 auto 4px; }
.login-box h1 { margin: 0; font-size: 20px; line-height: 24px; font-weight: 600; text-align: center; }
.login-box .sub { color: var(--text2); text-align: center; margin-top: -8px; font-size: 14px; line-height: 18px; }
.login-box .inp { width: 100%; height: 36px; font-size: 15px; background: var(--field); }
.login-box .btn { width: 100%; font-size: 15px; }
.login-box .err { text-align: center; min-height: 0; }
.login-box .err:empty { display: none; }
.who-chip { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border-radius: var(--r-s); background: var(--field); }
.who-chip .ava { width: 28px; height: 28px; font-size: 12px; }
.who-chip b { font-weight: 500; flex: 1; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border: none; border-radius: var(--r-s); background: transparent; color: var(--text2); cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--hover); color: var(--link); }
.foot { color: var(--text3); text-align: center; font-size: 12px; line-height: 16px; }
.me { display: flex; align-items: center; gap: 8px; padding: 0 6px; height: 32px; border-radius: var(--r-s); }
.me .ava { width: 28px; height: 28px; font-size: 12px; }
.me .r { color: var(--text2); font-size: 12px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #2c2d2e; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 60; box-shadow: 0 4px 16px rgba(0, 0, 0, .2); animation: pop .18s; }
.spin { width: 24px; height: 24px; border: 2.5px solid var(--field-b); border-top-color: var(--link); border-radius: 50%; animation: rot .7s linear infinite; margin: 30px auto; }
@keyframes rot { to { transform: rotate(360deg); } }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* журнал — лента (как уведомления ВК) */
.feed-day { padding: 14px 16px 6px; font-size: 13px; font-weight: 500; color: var(--text2); }
.feed-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 16px; transition: background .15s; }
.feed-row:hover { background: var(--hover); }
.feed-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; }
.feed-ic svg { width: 20px; height: 20px; }
.feed-ic.blue { background: #2688eb; } .feed-ic.green { background: #4bb34b; } .feed-ic.red { background: #e64646; }
.feed-ic.orange { background: #ffa000; } .feed-ic.purple { background: #792ec0; } .feed-ic.grey { background: var(--field-b); color: var(--text2); }
.feed-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 1px; }
.feed-t { font-size: 14px; line-height: 18px; }
.feed-t b { font-weight: 500; }
.feed-d { line-height: 18px; color: var(--text); overflow-wrap: anywhere; }
.feed-m { color: var(--text2); font-size: 12px; line-height: 16px; }
.feed-time { color: var(--text3); font-size: 12px; line-height: 18px; white-space: nowrap; padding-top: 1px; }

/* шапка: знак игры без подписи */
.logo { width: 200px; text-decoration: none !important; }
.logo-mark.tank { width: 32px; height: 32px; }
.logo-mark.tank img { width: 72%; margin: 2% 0 0 2%; }

/* карточка игрока — компактно (30.10) */
.pl-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
.pl-head .ava { width: 48px; height: 48px; font-size: 19px; }
.pl-id { flex: 1; min-width: 220px; }
.pl-name { font-size: 17px; line-height: 22px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pl-sub { color: var(--text2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.pl-act { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn.sm { width: 24px; height: 24px; border-radius: 6px; }
.icon-btn.sm svg { width: 16px; height: 16px; }
.counters { display: grid; grid-template-columns: repeat(6, 1fr); }
.cnt { padding: 12px 16px; border-left: 1px solid var(--sep); min-width: 0; }
.cnt:first-child { border-left: none; }
.cnt-v { font-size: 17px; line-height: 22px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cnt-k { color: var(--text2); font-size: 12px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1000px) { .counters { grid-template-columns: repeat(3, 1fr); } .cnt:nth-child(4) { border-left: none; } .cnt:nth-child(n+4) { border-top: 1px solid var(--sep); } }
.tabs { display: flex; gap: 4px; padding: 0 8px; border-bottom: 1px solid var(--sep); }
.tab { height: 48px; padding: 0 10px; border: none; background: none; color: var(--text2); font-size: 14px; font-weight: 500; cursor: pointer; position: relative; display: flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); }
.tab.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--link); }
.tab-n { color: var(--text3); font-weight: 400; font-size: 13px; }
.kv-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .kv-grid { grid-template-columns: 1fr; } }
.kv-col { padding: 8px 16px 12px; border-left: 1px solid var(--sep); }
.kv-col:first-child { border-left: none; }
.kv-h { color: var(--text2); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .3px; padding: 8px 0 4px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--sep); }
.kv:last-child { border-bottom: none; }
.kv span { color: var(--text2); }
.kv b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.row-item { display: flex; gap: 12px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--sep); }
.row-item:last-child { border-bottom: none; }
.row-item:hover { background: var(--hover); }
.ri-main { flex: 1; min-width: 0; line-height: 18px; }
.ri-sub { color: var(--text3); font-size: 12px; line-height: 16px; }
.ri-right { text-align: right; font-variant-numeric: tabular-nums; line-height: 18px; white-space: nowrap; }

/* 30.10 — проход по удобству: меню со значком, ссылки-карточки, пустые состояния, сегменты, плавное закрытие */
.nav a { position: relative; }
.nav-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font: 600 11px/18px inherit; font-style: normal; text-align: center; animation: pop .2s; }
.stat.link { color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.stat.link:hover { box-shadow: var(--pop); transform: translateY(-1px); }
.stat .go { margin-left: auto; color: var(--text3); opacity: 0; transition: opacity .15s; }
.stat.link:hover .go { opacity: 1; }
.stat.accent { box-shadow: inset 0 0 0 1.5px var(--red), var(--shadow); }
.stat .d b.red { color: var(--red); }
.stats { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.go { color: var(--text3); display: grid; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 16px; text-align: center; }
.empty-ic { width: 48px; height: 48px; border-radius: 50%; background: var(--field); color: var(--text3); display: grid; place-items: center; }
.empty-ic svg { width: 24px; height: 24px; }
.empty-t { color: var(--text); font-size: 14px; font-weight: 500; }
.empty-d { color: var(--text2); max-width: 340px; line-height: 18px; }
.empty.err .empty-t, .card.empty.err { color: var(--red); }
.nowrap { white-space: nowrap; }
.row.nowrap { flex-wrap: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 12px; background: var(--field); color: var(--text); font-size: 12px; border: none; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s; }
.chip:hover { background: var(--active); }
.chip.me { background: var(--badge-blue); color: var(--link); }
a.chip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: var(--r-s); background: var(--field); }
.seg-b { height: 28px; padding: 0 10px; border: none; border-radius: 6px; background: transparent; color: var(--text2); font-size: 13px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s; white-space: nowrap; }
.seg-b:hover { color: var(--text); }
.seg-b.on { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.seg-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--link); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.btn.green { background: var(--green-bg); color: var(--green); }
.btn.green:hover { filter: brightness(.96); }
a.btn { text-decoration: none !important; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.preview { padding: 10px 12px; border-radius: var(--r-s); background: var(--field); font-variant-numeric: tabular-nums; }
.check.warn { color: var(--red); }
.row-item.click { cursor: pointer; color: inherit; text-decoration: none !important; }
.row-item .ava { width: 36px; height: 36px; }
.row-item .feed-ic { width: 36px; height: 36px; }
.ri-text { color: var(--text2); line-height: 18px; margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ri-right .plus, .ri-right .minus { font-weight: 500; }
.amt { margin-right: 8px; }
.tab-body { min-height: 80px; }
.modal-bg.out { animation: fadeOut .16s forwards; }
.modal-bg.out .modal { animation: popOut .16s forwards; }
.toast.out { animation: fadeOut .2s forwards; }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes popOut { to { transform: scale(.96); opacity: 0; } }
.feed-day, .feed-row { animation: fade .2s; }
.card-h { flex-wrap: wrap; row-gap: 8px; padding-top: 8px; padding-bottom: 8px; }
.card-h .right .inp[type=search] { width: 180px; }
.me-t { line-height: 15px; }

/* поддержка: список слева, переписка справа */
.sup { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100vh - 96px); min-height: 480px; overflow: hidden; }
.sup-side { border-right: 1px solid var(--sep); display: flex; flex-direction: column; min-height: 0; }
.sup-side-h { padding: 12px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--sep); }
.sup-side-h .seg { align-self: stretch; } .sup-side-h .seg-b { flex: 1; justify-content: center; }
.sup-side-h .inp { width: 100%; height: 32px; font-size: 13px; }
.sup-items { overflow-y: auto; flex: 1; }
.sup-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: inherit; text-decoration: none !important; border-bottom: 1px solid var(--sep); transition: background .15s; }
.sup-item:hover { background: var(--hover); }
.sup-item.on { background: var(--active); }
.sup-item .ava { width: 44px; height: 44px; font-size: 16px; }
.sup-it { flex: 1; min-width: 0; }
.sup-it-top { display: flex; gap: 8px; align-items: baseline; }
.sup-it-top b { font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-it-time { color: var(--text3); font-size: 12px; white-space: nowrap; }
.sup-it-last { color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.sup-item.unread .sup-it-last { color: var(--text); }
.sup-item.unread { background: var(--accent-bg); }
.cnt-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--link); color: #fff; font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; flex: none; }
.sup-done { color: var(--green); display: grid; flex: none; }
.sup-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.sup-pane > .empty { margin: auto; }
.sup-pane > .spin { margin: auto; }
.sup-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--sep); flex-wrap: wrap; }
.sup-back { display: none; }
.sup-who { flex: 1; min-width: 200px; }
.sup-nm { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; flex-wrap: wrap; }
.sup-nm a { color: var(--text); }
.sup-facts { color: var(--text2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; margin-top: 2px; }
.sup-act { display: flex; gap: 8px; }
.sup-feed { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; scroll-behavior: smooth; }
.sup-sys { align-self: center; color: var(--text2); font-size: 12px; padding: 6px 10px; display: flex; align-items: center; gap: 6px; text-align: center; }
.sup-sys.ok { color: var(--green); }
.sup-sys svg { width: 16px; height: 16px; }
.sup-day { align-self: center; margin: 10px 0 4px; }
.sup-day span { display: inline-block; padding: 3px 10px; border-radius: 12px; background: var(--field); color: var(--text2); font-size: 12px; }
.msg { display: flex; animation: msgIn .22s ease-out; }
.msg.out { justify-content: flex-end; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }
.bub { max-width: min(560px, 78%); padding: 7px 12px 6px; border-radius: 16px; background: var(--bub-in); line-height: 19px; font-size: 14px; }
.msg.out .bub { background: var(--bub-out); border-bottom-right-radius: 6px; }
.msg.in .bub { border-bottom-left-radius: 6px; }
.bub-t { white-space: pre-wrap; overflow-wrap: anywhere; }
.bub-m { color: var(--bub-meta); font-size: 11px; line-height: 14px; text-align: right; margin-top: 2px; }
.sup-comp { border-top: 1px solid var(--sep); padding: 8px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.sup-tpl { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.sup-tpl .chip { font-family: inherit; }
.sup-in { display: flex; }
.sup-ta { flex: 1; resize: none; min-height: 40px; max-height: 160px; padding: 10px 12px; border: 1px solid var(--field-b); border-radius: var(--r-s); background: var(--field); font-size: 14px; line-height: 19px; outline: none; transition: border-color .15s, background .15s; }
.sup-ta:focus { border-color: var(--focus); background: var(--card); }
.sup-btns { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.sup-btns .err { margin-right: auto; }
.sup-cnt { color: var(--text3); font-size: 12px; margin-right: auto; }
.sup-btns .err:not(:empty) + .sup-cnt { margin-right: 0; }
.sup-ro { padding: 14px 16px; border-top: 1px solid var(--sep); text-align: center; }

/* узкий экран: меню — полосой сверху, поддержка — по одному экрану */
@media (max-width: 1000px) { .sup { grid-template-columns: 280px minmax(0, 1fr); } .me-t { display: none; } }
@media (max-width: 760px) {
  .top-in { gap: 10px; padding: 0 12px; } .logo { width: auto; }
  .wrap { flex-direction: column; padding: 12px; gap: 12px; }
  .nav { position: static; width: 100%; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .nav a { flex: none; height: 34px; } .nav a span { display: inline !important; }
  .stats { grid-template-columns: 1fr 1fr; } .stat .v { font-size: 20px; }
  .sup { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 150px); }
  .sup.has-thread .sup-side { display: none; } .sup:not(.has-thread) .sup-pane { display: none; }
  .sup-back { display: grid; } .sup-act .btn span, .pl-act .btn { font-size: 12px; }
  .grid-2 { grid-template-columns: 1fr; } .counters { grid-template-columns: repeat(3, 1fr); }
  .feed-m { display: none; }
}
@media (max-width: 1000px) and (min-width: 761px) { .nav-badge { position: absolute; top: 3px; left: 28px; min-width: 16px; height: 16px; line-height: 16px; font-size: 10px; padding: 0 4px; } }

/* пароль с «глазом» */
.pw { position: relative; display: flex; }
.pw .inp { flex: 1; width: 100%; padding-right: 40px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 30px; height: 28px; display: grid; place-items: center; border: none; border-radius: 6px; background: transparent; color: var(--text3); cursor: pointer; transition: color .15s, background .15s; }
.pw-eye:hover { color: var(--text); background: var(--hover); }

/* мини-карточка игрока */
.modal.mc-modal { max-width: 520px; }
.mc { display: flex; flex-direction: column; gap: 14px; min-height: 120px; }
.mc > .spin { margin: 30px auto; }
.mc-head { display: flex; align-items: center; gap: 12px; }
.mc-head .ava { width: 48px; height: 48px; font-size: 19px; }
.mc-id { min-width: 0; }
.mc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--sep); border-radius: var(--r-s); overflow: hidden; }
.mc-n { background: var(--field); padding: 8px 12px; display: flex; flex-direction: column; min-width: 0; }
.mc-n b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-n span { color: var(--text2); font-size: 12px; }
.mc-sec { display: flex; flex-direction: column; gap: 10px; }
.mc-sec .kv-h { padding: 0; }
.mc-step { display: flex; gap: 4px; align-items: center; }
.mc-step .inp { flex: 1; min-width: 0; text-align: center; }
.icon-btn.step { width: 32px; height: 36px; font-size: 18px; font-weight: 500; background: var(--field); color: var(--text); }
.icon-btn.step:hover { background: var(--active); }
.mc-foot { display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--sep); padding-top: 12px; flex-wrap: wrap; }
.grow { flex: 1; }
.btn.ter svg { width: 16px; height: 16px; }

.sup-in { gap: 8px; align-items: flex-end; }
.send-btn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: none; border-radius: var(--r-s); background: var(--accent); color: var(--on-accent); cursor: pointer; transition: background .15s, opacity .15s, transform .1s; }
.send-btn:hover { background: var(--accent-h); }
.send-btn:active { transform: scale(.94); }
.send-btn:disabled { opacity: .4; cursor: default; transform: none; }
.send-btn svg { width: 22px; height: 22px; }

/* 30.10: шапка, меню и заголовки разделов на месте — крутится только список (на телефоне — обычная прокрутка) */
@media (min-width: 761px) {
  html, body { height: 100%; overflow: hidden; }
  #app { height: 100%; display: flex; flex-direction: column; }
  .top { position: relative; flex: none; }
  .wrap { flex: 1; min-height: 0; width: 100%; align-items: stretch; padding-bottom: 0; }
  .nav { position: static; align-self: flex-start; }
  .main { overflow-y: auto; min-height: 0; padding-bottom: 16px; scrollbar-gutter: stable; }
  .main.fit { overflow: hidden; }
  .main.fit > .card:not(.fill), .main.fit > .split { flex: none; }
  .main.fit > .split { flex: 1; min-height: 0; }
  .card.fill { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  .card.fill > .card-h, .card.fill > .tabs { flex: none; }
  .fill-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
  .fill-body > .tbl thead th { position: sticky; top: 0; z-index: 1; background: var(--card); box-shadow: inset 0 -1px 0 var(--sep); border-bottom: none; }
  .fill-body .feed-day { position: sticky; top: 0; z-index: 1; background: var(--card); }
  .main.fit .sup { flex: 1; height: auto; min-height: 0; }
  .split { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 12px; align-items: stretch; }
  .split-l { overflow-y: auto; min-height: 0; }
  .split > .card.fill { min-height: 0; }
}
@media (max-width: 1000px) and (min-width: 761px) { .split { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); } .split-l { max-height: 45vh; } }
.sup-btns:has(.err:empty) .sup-cnt:empty { display: none; }
.sup-btns:has(.err:empty):has(.sup-cnt:empty) { display: none; }
.grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.mc-step { min-width: 0; }
.chip-k { margin-left: 5px; }
@media (min-width: 761px) { .main.fit > .card.sup { flex: 1; height: auto; min-height: 0; } }

.badge.gold { background: rgba(255, 176, 0, .16); color: #d08c00; }
@media (prefers-color-scheme: dark) { .badge.gold { color: #ffc43d; } }
.lbl { color: var(--text2); }
.feed-d .q { white-space: pre-wrap; }
.pass-seg .seg-b { min-width: 84px; justify-content: center; }
