@import url('https://fonts.googleapis.com/css2?family=Onest:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

/* ---------- токены дизайна: палитра fomo.family ---------- */
:root {
  --bg: #060510;            /* фон страницы */
  --bg-deep: #0b0a15;       /* поля ввода, вложенные панели */
  --panel: #12111a;         /* карточки, шапка, панели */
  --bg-3: #1b1a27;          /* кнопки, чипы, ховер */
  --bg-4: #242335;          /* ховер кнопок */
  --line: rgba(203,208,235,.10);
  --line-strong: rgba(203,208,235,.22);
  --text: #f7f7f7; --muted: #9899a3; --dim: #5c5f6c;
  --accent: #516af6; --accent-2: #7c8cff; --accent-soft: rgba(81,106,246,.16); --accent-ring: rgba(81,106,246,.35);
  --user: var(--accent);
  --token: #f5b544; --token-soft: rgba(245,181,68,.16);
  --ok: #21c95e; --ok-soft: rgba(33,201,94,.16);
  --danger: #ff622e; --danger-soft: rgba(255,98,46,.16);
  --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 24px; --pill: 999px;
  --shadow: 0 10px 40px rgba(0,0,0,.45);
  --ice: #eaedff; --lavender: #cbd0eb;
  --font: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; scrollbar-color: var(--bg-4) var(--bg); }
html { background: var(--bg); }   /* фон на корне: между документами браузер не показывает белый холст */
*::-webkit-scrollbar { width: 10px; height: 10px; } *::-webkit-scrollbar-track { background: transparent; } *::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 5px; border: 2px solid transparent; background-clip: padding-box; } *::-webkit-scrollbar-thumb:hover { background-color: var(--dim); }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
body { background: radial-gradient(1200px 500px at 50% -200px, rgba(81,106,246,.16), transparent 70%), var(--bg); }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-ring); }

/* ---------- шапка ---------- */
nav { display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 16px;
  border-bottom: 1px solid var(--line); background: rgba(18,17,26,.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 30; }
nav .brand { font-weight: 600; font-size: 17px; letter-spacing: -.02em; margin-right: 18px; color: var(--text); white-space: nowrap; }
nav .brand b { color: var(--accent-2); font-weight: 800; }
nav .brand { display: inline-flex; align-items: center; gap: 0; }
nav .brand .logo { height: 30px; width: auto; display: block; margin: 0 8px 0 -2px; }
nav .brand { font-weight: 800; }
nav a { padding: 8px 14px; border-radius: var(--pill); color: var(--muted); font-weight: 600; font-size: 13.5px; transition: background .15s, color .15s; }
nav a:hover { color: var(--text); background: var(--bg-3); }
nav a.active { color: var(--text); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-ring); }
nav .spacer { flex: 1; }
nav .status { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
nav .status b { color: var(--ok); }
nav .status b.off { color: var(--danger); }
nav .status a:hover { color: var(--text); background: none; }
nav .status a { padding: 4px 6px; }

main { padding: 24px 20px 40px; max-width: 1100px; margin: 0 auto; }
h1, h2, h3 { color: var(--ice); text-wrap: balance; letter-spacing: -.025em; }
h1 { font-size: 22px; font-weight: 800; letter-spacing: -.025em; margin: 0 0 16px; }
.row { display: flex; gap: 8px; align-items: center; }

/* ---------- элементы форм ---------- */
input[type=text], input[type=number], input[type=search], select, textarea {
  background: var(--bg-deep); border: 1px solid var(--line-strong); color: var(--text);
  padding: 9px 14px; border-radius: var(--r-sm); outline: none; font: inherit; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder, textarea::placeholder { color: var(--dim); }
select { padding-right: 30px; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%239899a3' stroke-width='1.8' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
input[type=date] { background: var(--bg-deep); border: 1px solid var(--line-strong); color: var(--text); border-radius: var(--r-sm); padding: 6px 10px; font: inherit; color-scheme: dark; }
input[type=date]:disabled { opacity: .4; }
button, .btn { background: var(--bg-3); color: var(--text); border: 1px solid transparent; padding: 9px 16px;
  border-radius: var(--pill); cursor: pointer; font: inherit; font-weight: 600; transition: background .15s, transform .08s, box-shadow .15s; }
button:hover { background: var(--bg-4); }
button:active { transform: translateY(1px); }
button.primary { background: var(--accent); color: #fff; box-shadow: 0 4px 16px rgba(81,106,246,.35); }
button.primary:hover { background: #6377ff; }
button.danger { color: var(--danger); background: var(--danger-soft); }
button.danger:hover { background: rgba(255,98,46,.26); }
button:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }

/* ---------- таблицы ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; background: rgba(255,255,255,.02); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255,255,255,.025); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); }
.err { color: var(--danger); font-size: 12px; }
.muted { color: var(--muted); }
.empty { padding: 48px; text-align: center; color: var(--muted); background: var(--panel); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); margin-top: 16px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(8px); background: var(--bg-3);
  border: 1px solid var(--line-strong); padding: 10px 18px; border-radius: var(--pill); opacity: 0; transition: opacity .2s, transform .2s; z-index: 60; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: var(--danger); color: var(--danger); }

/* ---------- переключатель ---------- */
.switch { position: relative; display: inline-block; width: 38px; height: 22px; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: var(--bg-4); border-radius: 20px; transition: .15s; cursor: pointer; }
.switch i:before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: var(--muted); border-radius: 50%; transition: .15s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i:before { transform: translateX(16px); background: #fff; }
tr.off td { opacity: .45; }
tr.off td:last-child, tr.off td.sw { opacity: 1; }

.badge { display: inline-block; padding: 2px 9px; border-radius: var(--pill); font-size: 11px; font-weight: 600; background: var(--bg-3); color: var(--muted); white-space: nowrap; }
.badge.ok { color: var(--ok); background: var(--ok-soft); } .badge.warn { color: var(--token); background: var(--token-soft); }
.progress { display: flex; align-items: center; gap: 10px; margin: 12px 0; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); font-size: 13px; }
.progress .bar { flex: 1; height: 6px; background: var(--bg-4); border-radius: 3px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .3s; }
.avatar { width: 24px; height: 24px; border-radius: 50%; vertical-align: middle; margin-right: 6px; background: var(--bg-3); object-fit: cover; }
.pos { color: var(--ok); } .neg { color: var(--danger); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }

.mark { vertical-align: -2px; margin-right: 3px; }
.mark-crown_gold { filter: drop-shadow(0 0 2px rgba(245,197,24,.6)); }
.mark-select { padding: 4px 6px; font-size: 12px; max-width: 150px; }

/* ---------- глобальный поиск в шапке ---------- */
.gsearch { position: relative; margin: 0 14px 0 auto; flex: 0 1 300px; min-width: 160px; }
nav .gsearch + .status { margin-left: 0; }
.gsearch input { width: 100%; padding: 7px 12px 7px 32px; font-size: 13px; border-radius: var(--pill); background: var(--bg-deep) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239899a3' stroke-width='2.2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3.5-3.5'/></svg>") no-repeat 11px center; }
.gsearch input::-webkit-search-cancel-button { -webkit-appearance: none; }
.gresults { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 320px; z-index: 50; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; max-height: 70vh; overflow-y: auto; }
.gitem { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; font-size: 13px; }
.gitem:hover, .gitem.sel { background: var(--accent-soft); }
.gitem img, .gitem .ph { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: var(--bg-3); flex-shrink: 0; display: inline-block; }
.gitem .u { border: 2px solid var(--user); } .gitem .t { border: 2px solid var(--token); } .gitem .f { border: 2px dashed var(--dim); }
.gitem b { white-space: nowrap; } .gitem .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.gitem .tag { margin-left: auto; font-size: 10px; color: var(--muted); white-space: nowrap; background: var(--bg-3); padding: 1px 7px; border-radius: var(--pill); }
.gempty { padding: 10px 12px; font-size: 12px; color: var(--muted); }
nav .gsearch-btn { display: none; }
nav a.gsearch-btn::before { content: "🔍"; }

/* ---------- бейджи токенов ---------- */
.tbadges { display: inline-flex; gap: 1px; align-items: center; vertical-align: middle; margin-left: 4px; }
.tb { font-size: 13px; line-height: 1; cursor: help; filter: saturate(.9); }
.tb.tb-good { filter: drop-shadow(0 0 3px rgba(33,201,94,.45)); } .tb.tb-bad { filter: drop-shadow(0 0 3px rgba(255,98,46,.45)); }
.tbadges.big .tb { font-size: 18px; }
.tb.tb-more { font-size: 10px; color: var(--muted); background: var(--bg-3); border-radius: var(--pill); padding: 1px 5px; margin-left: 2px; filter: none; }

.cnt { font-weight: 600; opacity: .8; }

/* ---------- алерты на сайте: чат слева внизу ---------- */
.achat { --h: 240px; position: fixed; left: 12px; bottom: 12px; z-index: 55; width: min(420px, calc(100vw - 24px)); display: flex; flex-direction: column;
  background: rgba(18,17,26,.72); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font-size: 12px; transition: background .15s; }
.achat:hover { background: rgba(18,17,26,.94); }
.achat-n { color: var(--dim); font-weight: 600; }
.achat-btns { display: flex; gap: 2px; }
.achat-b { width: 24px; height: 22px; padding: 0; border: 0; background: transparent; border-radius: 6px; font-size: 12px; color: var(--muted); }
.achat-b:hover { background: var(--bg-3); color: var(--text); }
.achat-tabs { display: flex; align-items: flex-end; gap: 2px; padding: 4px 4px 0 6px; border-bottom: 1px solid var(--line); cursor: move; user-select: none; }
.achat-tabs .atabs { display: flex; gap: 2px; flex: 1 1 auto; min-width: 0; overflow: hidden; }
.achat-tabs .achat-btns { display: flex; gap: 2px; padding-bottom: 3px; cursor: default; }
.atab-ghost { position: fixed; z-index: 70; pointer-events: none; padding: 4px 10px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; box-shadow: var(--shadow); }
.achat.drop-target { outline: 2px dashed var(--accent); outline-offset: 2px; }
.atab.drop-before { box-shadow: inset 2px 0 0 var(--accent); } .atab.drop-after { box-shadow: inset -2px 0 0 var(--accent); }
.achat.muted .achat-tabs .achat-b[data-act=mute] { color: var(--danger); }
.atab { position: relative; cursor: grab; background: transparent; border: 0; border-radius: 8px 8px 0 0; padding: 4px 10px 5px; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.atab:hover { color: var(--text); background: var(--bg-3); } .atab.on { color: var(--text); background: rgba(81,106,246,.16); box-shadow: inset 0 -2px 0 var(--accent); }
.atab { --tc: var(--muted); } .atab.t-alerts { --tc: #f5b544; } .atab.t-theses { --tc: #a9b6ff; } .atab.t-chat { --tc: #4fd1c5; } .atab.t-all { --tc: #e6e8ee; }
.atab .tdot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--tc); margin-right: 6px; vertical-align: 1px; opacity: .8; }
.atab.on { color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, transparent); box-shadow: inset 0 -2px 0 var(--tc); }
.aline.thesis .at, .aline.thesis .ak { color: #a9b6ff; } .aline.thesis .athesis { border-left-color: rgba(169,182,255,.45); }
.aline.chat .at { color: #4fd1c5; opacity: .8; } .aline.chat .amsg { color: #e6f7f5; }
.atab .acnt { margin-left: 5px; padding: 0 5px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 9px; font-weight: 800; vertical-align: 1px; }
.achat-log { height: var(--h); overflow-y: auto; padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; scrollbar-width: thin; scrollbar-color: var(--bg-4) transparent; }
.achat-log::-webkit-scrollbar { width: 8px; } .achat-log::-webkit-scrollbar-track { background: transparent; } .achat-log::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 4px; border: 2px solid transparent; background-clip: padding-box; } .achat-log::-webkit-scrollbar-thumb:hover { background-color: var(--dim); }
.achat-resize { position: absolute; left: 0; right: 0; top: -3px; height: 6px; cursor: ns-resize; }
.achat-resize-w { position: absolute; top: 0; bottom: 0; right: -3px; width: 6px; cursor: ew-resize; }
.achat-resize-b { position: absolute; left: 0; right: 0; bottom: -3px; height: 6px; cursor: ns-resize; }
.achat.dragging, .achat-pill.dragging { background: rgba(18,17,26,.96); box-shadow: var(--shadow); }
.aline { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 6px; line-height: 1.35; cursor: pointer; white-space: nowrap; }
.aline .atext { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.aline .abtns { flex: 0 0 auto; display: flex; gap: 3px; opacity: .75; } .aline:hover .abtns { opacity: 1; }
.aline .ab { display: inline-flex; width: 20px; height: 18px; align-items: center; justify-content: center; border-radius: 5px; background: var(--bg-3); text-decoration: none; font-size: 11px; } .aline .ab img { width: 12px; height: 12px; border-radius: 3px; } .aline .ab:hover { background: var(--bg-4); }
.aline:hover { background: var(--bg-3); }
.aline .at { color: var(--dim); margin-right: 6px; font-variant-numeric: tabular-nums; }
.aline .ak { font-weight: 800; letter-spacing: .05em; margin-right: 6px; font-size: 11px; }
.aline.buy .ak { color: var(--ok); } .aline.sell .ak { color: var(--danger); }
.aline .au { color: var(--accent-2); border: 0; } .aline .ausd { font-weight: 700; } .aline .atok { color: #ffe3b0; }
.aline.fresh { background: var(--accent-soft); }
.aline.system { cursor: default; white-space: normal; } .aline.system .atext { white-space: normal; overflow: visible; } .aline.system .ak { color: var(--token); } .aline.system .amsg { color: var(--muted); font-style: italic; }
.aline.chat { cursor: default; white-space: normal; } .aline.chat .atext { white-space: normal; overflow: visible; word-break: break-word; }
.aline.chat .anick { font-weight: 800; } .aline.chat .amsg { color: var(--text); } .aline.chat.mine { background: rgba(81,106,246,.08); }
.aline .adel, .aline .adel-sys { color: var(--danger); } .aline.chat .abtns, .aline.system .abtns { opacity: 0; } .aline.chat:hover .abtns, .aline.system:hover .abtns { opacity: 1; }
.aline.system { align-items: flex-start; }
.achat-input { display: flex; gap: 6px; padding: 6px 8px; border-top: 1px solid var(--line); }
.achat-input input { flex: 1; min-width: 0; padding: 6px 10px; font-size: 12px; border-radius: var(--pill); background: var(--bg-deep); border: 1px solid var(--line-strong); color: var(--text); outline: none; font: inherit; font-size: 12px; }
.achat-input input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.achat-input button { padding: 4px 10px; font-size: 12px; border-radius: var(--pill); }
.aline.thesis { white-space: normal; align-items: flex-start; } .aline.thesis .atext { white-space: normal; overflow: visible; }
.aline.thesis .ak { color: var(--accent-2); } .aline.thesis .athesis { color: var(--text); opacity: .92; margin: 2px 0 2px 2px; padding-left: 8px; border-left: 2px solid var(--accent-ring); line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.aempty { color: var(--muted); padding: 10px 6px; white-space: normal; line-height: 1.45; }
.achat.muted .achat-head { color: var(--danger); }
.achat-pill { position: fixed; left: 12px; bottom: 12px; cursor: grab; user-select: none; z-index: 55; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--pill); background: rgba(18,17,26,.85); border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-size: 12px; font-weight: 700; color: var(--text); backdrop-filter: blur(6px); }
.achat-pill:hover { background: var(--bg-3); } .achat-pill.muted { color: var(--muted); }
.achat-pill .nbadge { position: static; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 760px) {
  .achat, .achat-pill { left: 6px; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
  .achat { --h: 160px !important; width: calc(100vw - 12px) !important; font-size: 11px; left: 6px !important; top: auto !important; }
  .achat-tabs { cursor: default; } .achat-resize-w, .achat-resize-b, .achat-resize { display: none; }
  .achat-pill span:not(.nbadge) { display: none; }
}

/* ---------- пагинация ---------- */
.pager { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 4px; font-size: 12px; }
.pager .pages { display: inline-flex; gap: 4px; align-items: center; }
.pager .pages button { padding: 4px 10px; font-size: 12px; min-width: 32px; }
.pager .pages button.cur { background: var(--accent); color: #fff; }
.pager .dots { color: var(--dim); padding: 0 2px; }
.pager select { padding: 4px 26px 4px 10px; font-size: 12px; }
.pager label { margin-left: auto; }

/* ---------- иконки площадок (fomo / gmgn / axiom / карта) ---------- */
.plat { display: inline-flex; gap: 4px; align-items: center; vertical-align: middle; margin-left: 8px; position: relative; top: -1px; }
.plat a { display: inline-flex; width: 20px; height: 20px; border-radius: 6px; align-items: center; justify-content: center; background: var(--bg-3); opacity: .75; transition: opacity .12s, transform .12s; font-size: 12px; line-height: 1; text-decoration: none; }
.plat a:hover { opacity: 1; transform: translateY(-1px); }
.plat img { width: 14px; height: 14px; border-radius: 3px; display: block; }

/* ---------- иконки вкладок (мобильная панель) ---------- */
nav a::before { display: none; font-size: 18px; line-height: 1; }
nav a[href="/dashboard"]::before { content: "🏠"; }
nav a[href="/dashboard/users"]::before { content: "👥"; }
nav a[href="/dashboard/leaderboard"]::before { content: "🏆"; }
nav a[href="/dashboard/feed"]::before { content: "⚡"; }
nav a[href="/dashboard/tokens"]::before { content: "🪙"; }
nav a[href="/dashboard/map"]::before { content: "🫧"; }
nav a[href="/dashboard/settings"]::before { content: "⚙️"; }
nav a[href="/dashboard/billing"]::before { content: "💎"; }
nav a[href="/dashboard/admin"]::before { content: "🛠"; }
nav a[href="/dashboard/connect"]::before { content: "🔗"; }

/* ---------- мобильная / Mini App ---------- */
html.twa nav .lang { display: none; }
nav .lang { position: relative; margin-left: 10px; }
nav .lang .lang-btn { padding: 5px 10px; font-size: 12px; font-weight: 700; border-radius: var(--pill); background: var(--bg-3); border: 1px solid transparent; color: var(--text); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
nav .lang .lang-btn .caret { color: var(--muted); font-size: 10px; margin-left: 2px; }
nav .lang .lang-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 150px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r); box-shadow: var(--shadow); padding: 4px; z-index: 60; }
nav .lang .lang-menu a { display: flex; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 8px; color: var(--text); font-size: 13px; }
nav .lang .lang-menu a:hover { background: var(--bg-3); } nav .lang .lang-menu a.on { background: var(--accent-soft); }
nav .lang .lang-menu a b { width: 24px; color: var(--muted); font-size: 11px; }
@media (max-width: 760px) {
  html, body { overflow-x: hidden; max-width: 100vw; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .row, .toolbar { flex-wrap: wrap; }
  .row.bulk { margin-left: 0 !important; }
  .card .head { flex-wrap: wrap; position: relative; padding-right: 44px; }
  .card .head > div:last-child { position: absolute; right: 0; top: 0; }
  .card h2 { font-size: 17px; }
  .card .head img, .card .head .ph { width: 52px; height: 52px; }
  .card .head .sub { font-size: 12px; }
  nav .lang { display: flex !important; align-items: center; margin: 0 !important; flex: 0 0 auto; padding: 0 4px; }
  nav .lang .lang-btn { padding: 4px 8px; font-size: 10px; } nav .lang .lang-menu { position: fixed; right: 8px; left: auto; top: auto; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }   /* у панели overflow, меню выносим из неё */
  nav { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    border-bottom: 0; border-top: 1px solid var(--line); background: rgba(12,11,20,.92); gap: 0; justify-content: space-around; overflow-x: auto; -webkit-overflow-scrolling: touch; z-index: 40; }
  nav .brand { display: none; }
  nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; font-size: 10.5px; font-weight: 600; white-space: nowrap; border-radius: var(--r-sm); min-width: 56px; flex: 1 1 0; color: var(--muted); }
  nav a::before { display: block; }
  nav a.active { background: none; box-shadow: none; color: var(--accent-2); }
  nav a.active::before { filter: drop-shadow(0 0 6px var(--accent-ring)); }
  nav .spacer, nav .status { display: none; }
  nav .gsearch-btn { display: flex; }
  .gsearch { display: none; position: fixed; left: 8px; right: 8px; top: 8px; margin: 0; z-index: 45; flex: none; }
  .gsearch.open { display: block; }
  .gsearch input { font-size: 15px; padding: 11px 14px 11px 36px; background-color: var(--panel); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
  .gresults { min-width: 0; max-height: 60vh; }
  main { padding: 14px 12px 20px; }
  h1 { font-size: 19px; margin-bottom: 12px; }
  .toolbar { gap: 6px; }
  .toolbar input[type=text] { min-width: 0 !important; flex: 1 1 160px; }
  #list, #tlist, #tokTable, .card table, #pays { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-lg); }
  table { min-width: 640px; font-size: 12px; }
  th, td { padding: 7px 8px; }
  .hide-m { display: none !important; }
  .modal { padding: 8px 8px calc(72px + env(safe-area-inset-bottom, 0px)); }
  .card { padding: 14px; border-radius: var(--r-lg); }
  .grid { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr !important; }
  .kv { grid-template-columns: 1fr !important; }
}

/* футер с дисклеймером */
footer.sitefoot { max-width: 1100px; margin: 0 auto; padding: 18px 20px 28px; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 12px; line-height: 1.5; border-top: 1px solid var(--line); }
footer.sitefoot a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); } footer.sitefoot a:hover { color: var(--text); }
footer.sitefoot .flinks { white-space: nowrap; }
@media (max-width: 760px) { footer.sitefoot { padding-bottom: 96px; } }
