/* ============================================================
   pingvids — shared design system
   Подключать первым во всех экранах:
   <link rel="stylesheet" href="shared.css">
   ============================================================ */

/* Единый шрифт во всём Mini App — Outfit (Google Fonts). */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  /* Цвета фона */
  --bg:          #0f0f1b;
  --bg-s:        #0e0e1c;   /* surface */
  --bg-r:        #13131f;   /* raised */

  /* Акцент */
  --ac:          #534AB7;
  --ac-h:        #4A43A3;
  --ac-s:        rgba(83,74,183,.15);
  --ac-b:        rgba(83,74,183,.30);

  /* Текст */
  --txt:         #FFFFFF;
  --txt2:        rgba(255,255,255,.60);
  --txt3:        rgba(255,255,255,.35);
  --txt4:        rgba(255,255,255,.20);

  /* Границы */
  --brd:         rgba(255,255,255,.07);
  --brd2:        rgba(255,255,255,.12);

  /* Семантика */
  --ok:          #1D9E75;   --ok-s:   rgba(29,158,117,.15);
  --sp:          #EF9F27;   --sp-s:   rgba(239,159,39,.12);
  --lk:          #34d399;   --lk-d:   rgba(52,211,153,.14);
  --ds:          #f87171;   --ds-d:   rgba(248,113,113,.14);
  --warn:        #BA7517;   --warn-s: rgba(186,117,23,.13);
  --err:         #A32D2D;   --err-s:  rgba(163,45,45,.13);

  /* Категории */
  --c-m:         #378ADD;   --c-ms:   rgba(55,138,221,.18);
  --c-f:         #D4537E;   --c-fs:   rgba(212,83,126,.18);
  --c-mix:       #EF9F27;

  /* Типографика — единый Outfit во всём Mini App.
     Имя --font-pixel оставлено для обратной совместимости с локальными CSS-переменными страниц,
     но теперь оно содержит обычный sans-serif, а не пиксельный шрифт. */
  --font-pixel:  'Outfit', system-ui, -apple-system, sans-serif;
  --font:        var(--font-pixel);
  --brand:       var(--font-pixel);
  --mono:        ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Скорости */
  --t:           .14s ease;
  --ts:          .26s cubic-bezier(.4,0,.2,1);
  --tss:         .38s cubic-bezier(.4,0,.2,1);

  /* Лейаут */
  --max-w:       480px;
  --hdr:         52px;
  --nav:         60px;
  --ad:          42px;
  --radius-s:    8px;
  --radius-m:    12px;
  --radius-l:    16px;
  --radius-xl:   20px;
  --radius-pill: 999px;
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: #050508;
  font-family: var(--font);
  color: var(--txt);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: none;
  text-rendering: geometricPrecision;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── PHONE SHELL ─────────────────────────────────────────── */
.shell {
  width: 100%;
  max-width: var(--max-w);
  height: 100dvh;
  max-height: 844px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
@media (min-height: 900px) {
  body { padding: 24px 16px; }
  .shell {
    border-radius: var(--radius-xl);
    box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 32px 80px rgba(0,0,0,.7);
  }
}

/* ── HEADER ──────────────────────────────────────────────── */
.hdr {
  height: var(--hdr);
  background: var(--bg-s);
  border-bottom: .5px solid var(--brd);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 9px;
  flex-shrink: 0;
  z-index: 20;
}
.logo { font-family: var(--brand); font-size: 15px; flex: 1; letter-spacing: -.3px; }
.logo-p { font-weight: 300; color: rgba(255,255,255,.38); }
.logo-v { font-weight: 600; }

.bal-pill {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 11px; border-radius: var(--radius-pill);
  border: .5px solid var(--brd); cursor: pointer;
  transition: all var(--t);
}
.bal-pill:hover { border-color: var(--ac-b); background: var(--ac-s); }
.bal-item { display: flex; align-items: center; gap: 4px; }
.bal-num { font-family: var(--brand); font-size: 12px; font-weight: 600; }
.bal-sep { width: .5px; height: 13px; background: var(--brd); }

.hbtn {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-r); border: .5px solid var(--brd);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--t); color: var(--txt3);
  flex-shrink: 0; position: relative;
}
.hbtn:hover { border-color: var(--ac-b); color: var(--txt2); }
.hbtn i { font-size: 14px; }
.hbtn-back i { font-size: 14px; }

.nbadge {
  position: absolute; top: -3px; right: -3px;
  min-width: 16px; height: 16px; border-radius: 9px; padding: 0 3px;
  background: var(--lk); color: #000; font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--bg-s);
}

/* Заголовок страницы внутри хедера (для вложенных экранов) */
.hdr-title {
  font-family: var(--brand);
  font-size: 13px;
  font-weight: 600;
  flex: 1;
  text-align: center;
  letter-spacing: -.2px;
}

/* ── BREADCRUMB / TYPE TABS ──────────────────────────────── */
.bc {
  background: var(--bg-s);
  border-bottom: .5px solid var(--brd);
  padding: 0 14px;
  height: 30px;
  display: flex; align-items: center; gap: 5px;
  flex-shrink: 0; z-index: 18;
  position: relative; overflow: hidden;
}
.bc-bg-ico {
  position: absolute; right: 40px; top: 50%; transform: translateY(-50%);
  font-size: 46px; opacity: .07; pointer-events: none; transition: color .2s;
}
.bc-cur { font-size: 11px; font-weight: 500; display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.bc-cur i { font-size: 10px; }
.bc-div { color: var(--txt4); font-size: 10px; flex-shrink: 0; }
.bc-subs { display: flex; align-items: center; gap: 3px; flex: 1; overflow: hidden; }
.bc-pill {
  font-size: 10px; padding: 2px 8px; border-radius: var(--radius-pill);
  border: .5px solid var(--brd); color: var(--txt4);
  cursor: pointer; transition: all var(--t);
  display: flex; align-items: center; gap: 3px; white-space: nowrap; flex-shrink: 0;
}
.bc-pill i { font-size: 9px; }
.bc-pill:hover { color: var(--txt2); border-color: var(--brd2); }
.c-n   { color: #AFA9EC; }
.c-mix { color: #EF9F27; }
.c-m   { color: #85B7EB; }
.c-f   { color: #ED93B1; }

/* ── SCROLLABLE CONTENT AREA ─────────────────────────────── */
.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  min-height: 0;
}
.content::-webkit-scrollbar { display: none; }

/* ── FOOTER / NAV (3 кнопки) ────────────────────────────── */
.ftr { background: var(--bg-s); border-top: .5px solid var(--brd); flex-shrink: 0; }

.ftr-ad {
  height: var(--ad); display: flex; align-items: center;
  padding: 0 13px; gap: 8px;
  border-top: .5px solid var(--brd2);
  border-bottom: .5px solid var(--brd2);
  background: var(--bg-r);
  cursor: pointer; transition: background var(--t);
}
.ftr-ad:hover { background: #1a1a28; }
.ad-lbl {
  font-size: 9px; font-weight: 700; letter-spacing: .06em;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(255,255,255,.07); color: var(--txt4);
  border: .5px solid var(--brd); flex-shrink: 0;
}
.ad-txt { flex: 1; font-size: 11px; color: var(--txt3); }
.ad-x { font-size: 13px; color: var(--txt4); padding: 4px; transition: color var(--t); }
.ad-x:hover { color: var(--txt2); }

.ftr-sub-bar {
  height: var(--ad); display: flex; align-items: center;
  padding: 0 12px; gap: 8px;
  border-top: .5px solid rgba(239,159,23,.15);
  border-bottom: .5px solid rgba(239,159,23,.15);
  background: rgba(239,159,39,.05);
}
.ftr-mod-bar {
  height: var(--ad); display: flex; align-items: center;
  padding: 0 10px; gap: 5px; overflow: hidden;
  border-top: .5px solid rgba(163,45,45,.3);
  border-bottom: .5px solid rgba(163,45,45,.3);
  background: rgba(163,45,45,.08);
}

.nav {
  height: var(--nav);
  display: flex; align-items: center;
  justify-content: space-around;
  padding: 0 24px;
}
.ni {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--txt4); font-size: 11px; cursor: pointer;
  transition: color var(--t); flex: 1;
  -webkit-tap-highlight-color: transparent;
}
.ni i { font-size: 20px; }
.ni.active { color: var(--ac); }
.ni:hover { color: var(--txt2); }
.ni-rec {
  flex: 0 0 56px; width: 56px; height: 56px; border-radius: 50%;
  background: var(--ac); color: #fff !important;
  border: 2.5px solid var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px; margin-bottom: 4px; font-size: 11px;
  transition: background var(--t), transform var(--t);
}
.ni-rec i { font-size: 22px; }
.ni-rec:hover { background: var(--ac-h); }
.ni-rec:active { transform: scale(.95); }

/* ── КНОПКИ ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 18px;
  border-radius: var(--radius-m); border: .5px solid transparent;
  font-family: var(--font); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all var(--t); white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-full { width: 100%; }

.btn-primary {
  background: var(--ac); color: #fff; border-color: transparent;
  font-family: var(--brand); font-size: 12px; font-weight: 600;
}
.btn-primary:hover { background: var(--ac-h); }

.btn-ghost {
  background: transparent; color: var(--txt3);
  border-color: var(--brd2);
}
.btn-ghost:hover { color: var(--txt2); border-color: var(--brd); }

.btn-ok     { background: var(--ok-s);   color: #5DCAA5; border-color: rgba(29,158,117,.3); }
.btn-warn   { background: var(--warn-s); color: #FAC775; border-color: rgba(186,117,23,.3); }
.btn-danger { background: var(--err-s);  color: #F09595; border-color: rgba(163,45,45,.3); }
.btn-spark  { background: var(--sp-s);   color: #EF9F27; border-color: rgba(239,159,39,.3); }

.btn-lg { padding: 13px 20px; font-size: 14px; border-radius: var(--radius-l); }
.btn-sm { padding: 6px 12px;  font-size: 11px; border-radius: var(--radius-s); }

/* ── КАРТОЧКИ ────────────────────────────────────────────── */
.card {
  background: var(--bg-s); border-radius: var(--radius-l);
  border: .5px solid var(--brd); padding: 14px;
  transition: border-color var(--t);
}
.card:hover { border-color: var(--brd2); }
.card-raised {
  background: var(--bg-r); border-radius: var(--radius-m);
  border: .5px solid var(--brd); padding: 12px;
}
.card-accent {
  border-color: var(--ac-b);
  background: linear-gradient(135deg, var(--bg-s), rgba(83,74,183,.05));
}

/* ── БЕЙДЖИ ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: var(--radius-pill);
  font-size: 10px; font-weight: 600; border: .5px solid transparent;
}
.badge-ac    { background: var(--ac-s);   border-color: var(--ac-b);               color: #AFA9EC; }
.badge-ok    { background: var(--ok-s);   border-color: rgba(29,158,117,.3);        color: #5DCAA5; }
.badge-sp    { background: var(--sp-s);   border-color: rgba(239,159,39,.3);        color: #EF9F27; }
.badge-err   { background: var(--err-s);  border-color: rgba(163,45,45,.3);         color: #F09595; }
.badge-warn  { background: var(--warn-s); border-color: rgba(186,117,23,.3);        color: #FAC775; }
.badge-muted { background: rgba(255,255,255,.05); border-color: var(--brd);         color: var(--txt3); }
.badge-m     { background: var(--c-ms);   border-color: rgba(55,138,221,.3);        color: #85B7EB; }
.badge-f     { background: var(--c-fs);   border-color: rgba(212,83,126,.3);        color: #ED93B1; }
.badge-mix   { background: rgba(239,159,39,.12); border-color: rgba(239,159,39,.28); color: #EF9F27; }
.badge-n     { background: var(--ac-s);   border-color: var(--ac-b);               color: #AFA9EC; }

/* ── ИНПУТЫ ─────────────────────────────────────────────── */
.input {
  width: 100%; padding: 10px 13px;
  border-radius: var(--radius-m);
  background: var(--bg-r); border: .5px solid var(--brd2);
  color: var(--txt); font-family: var(--font); font-size: 13px;
  outline: none; transition: border-color var(--t);
}
.input:focus { border-color: var(--ac-b); }
.input::placeholder { color: var(--txt4); }
.input-err { border-color: rgba(163,45,45,.5); }
.textarea { resize: vertical; min-height: 80px; }

/* ── ТУМБЛЕР / SWITCH ────────────────────────────────────── */
.switch {
  width: 38px; height: 22px; border-radius: 11px;
  background: var(--brd2); cursor: pointer;
  position: relative; transition: background var(--t);
  flex-shrink: 0; border: none;
}
.switch.on { background: var(--ok); }
.switch::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff;
  transition: transform var(--t);
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.switch.on::after { transform: translateX(16px); }

/* ── TABS (горизонтальные) ───────────────────────────────── */
.tabs {
  display: flex; gap: 4px;
  background: var(--bg-r); border-radius: var(--radius-m);
  padding: 4px; border: .5px solid var(--brd);
}
.tab {
  flex: 1; padding: 7px 10px; border-radius: var(--radius-s);
  font-size: 11px; font-weight: 500; color: var(--txt3);
  cursor: pointer; transition: all var(--t);
  display: flex; align-items: center; justify-content: center; gap: 5px;
  border: none; background: transparent;
}
.tab i { font-size: 11px; }
.tab.active { background: var(--bg-s); color: var(--txt); border: .5px solid var(--brd2); }
.tab:hover:not(.active) { color: var(--txt2); }

/* ── SORT / FILTER ROW ───────────────────────────────────── */
.sort-row { display: flex; gap: 6px; align-items: center; }
.sort-btn {
  padding: 5px 12px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 500;
  border: .5px solid var(--brd2); background: transparent; color: var(--txt3);
  cursor: pointer; transition: all var(--t);
}
.sort-btn.active { background: var(--ac-s); border-color: var(--ac-b); color: #AFA9EC; }
.sort-btn:hover:not(.active) { color: var(--txt2); }
.sort-ico {
  width: 30px; height: 30px; border-radius: var(--radius-s);
  border: .5px solid var(--brd2); background: transparent; color: var(--txt3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--t); font-size: 13px; flex-shrink: 0;
}
.sort-ico.active { background: var(--ac-s); border-color: var(--ac-b); color: #AFA9EC; }
.sort-ico:hover:not(.active) { color: var(--txt2); }

/* ── DIVIDER ─────────────────────────────────────────────── */
.divider { height: .5px; background: var(--brd); }
.divider-v { width: .5px; background: var(--brd); align-self: stretch; }

/* ── ПАГИНАЦИЯ ───────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 16px 0;
}
.page-btn {
  width: 32px; height: 32px; border-radius: var(--radius-s);
  border: .5px solid var(--brd2); background: transparent; color: var(--txt3);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; cursor: pointer; transition: all var(--t);
}
.page-btn.active { background: var(--ac-s); border-color: var(--ac-b); color: #AFA9EC; }
.page-btn:hover:not(.active) { color: var(--txt2); }
.page-btn:disabled { opacity: .35; cursor: not-allowed; }
.page-dots { font-size: 12px; color: var(--txt4); padding: 0 2px; }

/* ── КОНТЕНТ КАРТОЧКА (список/плитка) ────────────────────── */
.content-card {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 0; border-bottom: .5px solid var(--brd);
}
.content-card:last-child { border-bottom: none; }
/* Тамбнейл кружка */
.thumb-circle {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(145deg, #1e1830, #11172e 55%, #0d1826);
  border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.2); font-size: 18px; overflow: hidden;
}
/* Тамбнейл фото */
.thumb-photo {
  width: 52px; height: 52px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(145deg, #1e1830, #11172e);
  border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.2); font-size: 18px; overflow: hidden;
}
.content-card-body { flex: 1; min-width: 0; }
.content-card-title {
  font-size: 12px; font-weight: 500; margin-bottom: 4px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.content-card-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: var(--txt3);
}
.content-card-meta i { font-size: 10px; }
.content-card-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* Плиточный вид */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tile {
  border-radius: var(--radius-m); overflow: hidden;
  background: var(--bg-r); border: .5px solid var(--brd);
  cursor: pointer; transition: border-color var(--t);
  position: relative;
}
.tile:hover { border-color: var(--brd2); }
.tile-media {
  width: 100%; aspect-ratio: 1;
  background: linear-gradient(145deg, #1e1830, #11172e 55%, #0d1826);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.15); font-size: 28px;
}
.tile-media.photo-tile { border-radius: 0; }
.tile-meta {
  padding: 7px 8px;
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; color: var(--txt3);
}
.tile-meta i { font-size: 10px; }

/* ── МОДАЛКИ / ОВЕРЛЕИ ───────────────────────────────────── */
.ovl {
  position: absolute; inset: 0; z-index: 50;
  background: rgba(0,0,0,.72); backdrop-filter: blur(7px);
  display: flex; align-items: flex-end;
  opacity: 0; pointer-events: none; transition: opacity var(--ts);
}
.ovl.open { opacity: 1; pointer-events: auto; }
.sheet {
  width: 100%; background: var(--bg-s);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border: .5px solid var(--brd);
  padding: 18px 20px 30px;
  transform: translateY(28px); transition: transform var(--ts);
  max-height: 86dvh; display: flex; flex-direction: column;
}
.ovl.open .sheet { transform: translateY(0); }
.sheet-handle {
  width: 32px; height: 3px; border-radius: var(--radius-pill);
  background: var(--brd2); margin: 0 auto 16px; flex-shrink: 0;
}
.sheet-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin: 0 auto 12px;
}
.sheet-title {
  font-family: var(--brand); font-size: 15px; font-weight: 600;
  text-align: center; margin-bottom: 8px;
}
.sheet-desc {
  font-size: 12px; color: var(--txt2); text-align: center;
  line-height: 1.6; margin-bottom: 18px;
}
.sheet-btn {
  width: 100%; height: 46px; border-radius: var(--radius-m); border: none;
  font-family: var(--brand); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all var(--t);
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-bottom: 8px; flex-shrink: 0;
}
.sb-ac { background: var(--ac); color: #fff; }
.sb-ac:hover { background: var(--ac-h); }
.sb-gh { background: transparent; color: var(--txt3); border: .5px solid var(--brd2); }
.sb-gh:hover { color: var(--txt2); }
.sb-ok { background: var(--ok); color: #fff; }
.sb-ok:hover { filter: brightness(1.1); }

/* ── TOAST ───────────────────────────────────────────────── */
.toast {
  position: absolute;
  bottom: calc(var(--nav) + var(--ad) + 10px);
  left: 50%; transform: translateX(-50%) translateY(14px);
  max-width: calc(100% - 32px); width: max-content;
  background: var(--bg-r); border: .5px solid var(--brd2);
  border-radius: var(--radius-m); padding: 9px 13px;
  display: flex; align-items: center; gap: 9px;
  z-index: 30; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast i { font-size: 13px; flex-shrink: 0; }
.toast span { font-size: 12px; font-weight: 500; }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 24px; text-align: center; gap: 12px;
}
.empty-icon {
  width: 56px; height: 56px; border-radius: var(--radius-l);
  background: var(--bg-r); border: .5px solid var(--brd);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--txt4); margin-bottom: 4px;
}
.empty-title { font-family: var(--brand); font-size: 14px; font-weight: 600; }
.empty-sub { font-size: 12px; color: var(--txt3); line-height: 1.6; max-width: 240px; }

/* ── SKELETON ────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.skel {
  background: linear-gradient(90deg,
    rgba(255,255,255,.04) 25%,
    rgba(255,255,255,.08) 50%,
    rgba(255,255,255,.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease infinite;
  border-radius: var(--radius-s);
}
.skel-text  { height: 12px; border-radius: 4px; }
.skel-title { height: 16px; border-radius: 4px; }
.skel-thumb-circle { width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; }
.skel-thumb-photo  { width: 52px; height: 52px; border-radius: 10px; flex-shrink: 0; }

/* ── ПЛАШКА ЛИМИТА ───────────────────────────────────────── */
.limit-bar {
  background: var(--bg-r); border: .5px solid var(--brd2);
  border-radius: var(--radius-m); padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
}
.limit-track {
  flex: 1; height: 4px; background: var(--brd2); border-radius: 2px; overflow: hidden;
}
.limit-fill { height: 100%; border-radius: 2px; transition: width .4s ease; }
.limit-fill-ok   { background: var(--ok); }
.limit-fill-warn { background: var(--sp); }
.limit-fill-full { background: var(--ds); }
.limit-text { font-size: 11px; color: var(--txt3); white-space: nowrap; }
.limit-num  { font-family: var(--brand); font-size: 11px; font-weight: 600; }

/* ── ОНЛАЙН-ИНДИКАТОР ────────────────────────────────────── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.75); }
}
.online-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok); display: inline-block;
  animation: pulse-dot 1.8s ease infinite;
  flex-shrink: 0;
}

/* ── УТИЛИТЫ ─────────────────────────────────────────────── */
.flex   { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.w-full { width: 100%; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.p-4   { padding: 16px; }
.px-4  { padding-left: 16px; padding-right: 16px; }
.py-3  { padding-top: 12px; padding-bottom: 12px; }
.mt-2  { margin-top: 8px; }
.mt-3  { margin-top: 12px; }
.mt-4  { margin-top: 16px; }
.mb-2  { margin-bottom: 8px; }
.mb-3  { margin-bottom: 12px; }
.ml-auto { margin-left: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-center { text-align: center; }
.font-brand  { font-family: var(--brand); }
.font-bold   { font-weight: 600; }
.text-xs  { font-size: 11px; }
.text-sm  { font-size: 12px; }
.text-base{ font-size: 13px; }
.text-lg  { font-size: 16px; }
.text-muted    { color: var(--txt3); }
.text-disabled { color: var(--txt4); }
.text-accent   { color: #AFA9EC; }
.text-ok       { color: var(--ok); }
.text-sp       { color: var(--sp); }
.text-ds       { color: var(--ds); }

/* ── АНИМАЦИИ КАРТОЧКИ ───────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.anim { animation: fadeUp .35s ease both; }
.d1 { animation-delay: .05s; } .d2 { animation-delay: .1s; }
.d3 { animation-delay: .15s; } .d4 { animation-delay: .2s; }
.d5 { animation-delay: .25s; }

/* ── WELCOME PAGE ────────────────────────────────────────── */
.welcome-content {
  position: relative; z-index: 1;
  flex: 1; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none;
  display: flex; flex-direction: column;
  padding: 48px 24px 32px;
}
.welcome-content::-webkit-scrollbar { display: none; }

.glow-top {
  position: absolute; top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(83,74,183,.2) 0%, transparent 68%);
  pointer-events: none; z-index: 0;
}
.glow-bot {
  position: absolute; bottom: 40px; right: -80px;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(83,74,183,.1) 0%, transparent 68%);
  pointer-events: none; z-index: 0;
}

.logo-section {
  display: flex; flex-direction: column;
  align-items: center; gap: 14px;
  margin-bottom: 28px; position: relative;
}
.logo-icon { width: 48px; height: auto; }
.logo-wordmark { font-family: var(--brand); font-size: 21px; letter-spacing: -.4px; }
.logo-wordmark .lp { font-weight: 300; color: rgba(255,255,255,.38); }
.logo-wordmark .lv { font-weight: 600; }

/* Language switcher */
.lang-sw {
  position: absolute; top: 0; right: 0;
  display: flex; align-items: center;
  background: var(--bg-r); border: .5px solid var(--brd2);
  border-radius: var(--radius-pill); overflow: hidden;
}
.lang-btn {
  padding: 5px 11px; font-size: 10px; font-weight: 600;
  letter-spacing: .04em; color: var(--txt4);
  transition: all var(--t); cursor: pointer;
}
.lang-btn.active { background: var(--ac-s); color: #AFA9EC; }
.lang-div { width: .5px; height: 14px; background: var(--brd2); flex-shrink: 0; }

/* Hero */
.hero { text-align: center; margin-bottom: 24px; }
.hero-title {
  font-family: var(--brand); font-size: 19px; font-weight: 600;
  letter-spacing: -.4px; line-height: 1.35; margin-bottom: 8px;
}
.hero-sub { font-size: 12px; color: var(--txt2); line-height: 1.6; max-width: 280px; margin: 0 auto; }

/* How it works */
.how-label {
  font-size: 10px; font-weight: 500; text-transform: uppercase;
  letter-spacing: .07em; color: var(--txt4); margin-bottom: 7px;
}
.how-rows { display: flex; flex-direction: column; gap: 7px; margin-bottom: 24px; }
.how-row {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 10px 13px; background: var(--bg-s);
  border-radius: var(--radius-m); border: .5px solid var(--brd);
}
.how-icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 12px;
}
.ic-pu { background: var(--ac-s);  color: #AFA9EC; }
.ic-sp { background: var(--sp-s);  color: var(--sp); }
.ic-ok { background: var(--ok-s);  color: var(--ok); }
.how-title { font-size: 12px; font-weight: 600; margin-bottom: 1px; }
.how-desc  { font-size: 11px; color: var(--txt3); line-height: 1.45; }

.spacer { flex: 1; min-height: 12px; }

/* Gates */
.gates { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.gate {
  background: var(--bg-s); border-radius: var(--radius-m);
  border: .5px solid var(--brd); padding: 12px 14px;
  cursor: pointer; user-select: none; position: relative;
  transition: border-color var(--t), background var(--t);
}
.gate:hover { border-color: var(--brd2); }
.gate.gate-age.checked {
  border-color: rgba(29,158,117,.35);
  background: linear-gradient(135deg, var(--bg-s), rgba(29,158,117,.04));
}
.gate-inner { display: flex; align-items: flex-start; gap: 11px; }
.gate-box {
  width: 20px; height: 20px; border-radius: 6px;
  border: 1.5px solid var(--brd2); background: var(--bg-r);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
  transition: all var(--t); color: transparent; font-size: 11px;
}
.gate.checked .gate-box { color: white; }
.gate.gate-age.checked .gate-box { background: var(--ok); border-color: var(--ok); }
.gate-text-main { font-size: 12px; font-weight: 600; margin-bottom: 3px; line-height: 1.3; }
.gate-text-sub  { font-size: 11px; color: var(--txt3); line-height: 1.5; }
.gate-text-sub a { color: #AFA9EC; }
@keyframes pulse-warn {
  0%,100% { border-color: var(--brd); }
  40%      { border-color: rgba(239,159,39,.5); }
}
.gate.warn { animation: pulse-warn .4s ease 2; }

/* Auth method card */
.auth-card {
  background: var(--bg-s); border-radius: var(--radius-m);
  border: .5px solid var(--brd); overflow: hidden;
}
.auth-tabs-row { display: flex; border-bottom: .5px solid var(--brd); }
.auth-tab {
  flex: 1; padding: 9px 6px;
  font-size: 11px; font-weight: 500; color: var(--txt4);
  display: flex; align-items: center; justify-content: center; gap: 5px;
  cursor: pointer; transition: all var(--t);
  border-right: .5px solid var(--brd);
}
.auth-tab:last-child { border-right: none; }
.auth-tab i { font-size: 11px; }
.auth-tab.active.tg-tab    { background: var(--ac-s);              color: #AFA9EC; }
.auth-tab.active.email-tab { background: var(--ok-s);              color: #5DCAA5; }
.auth-tab.active.anon-tab  { background: rgba(255,255,255,.04);    color: var(--txt2); }
.auth-tab:hover:not(.active) { color: var(--txt2); background: rgba(255,255,255,.02); }
.auth-body { padding: 12px 14px; display: none; }
.auth-body.active { display: block; }
.auth-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--txt3); line-height: 1.45;
}
.auth-row i { font-size: 13px; color: var(--txt4); flex-shrink: 0; }

/* Anon limits */
.anon-limits { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.anon-limit-pill {
  display: flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--txt3);
  padding: 3px 8px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,.04); border: .5px solid var(--brd);
}
.anon-limit-pill i { font-size: 9px; color: var(--txt4); }

/* CTA button */
.btn-enter {
  width: 100%; height: 50px; border-radius: var(--radius-m);
  background: var(--bg-r); color: var(--txt4);
  border: .5px solid var(--brd);
  font-family: var(--brand); font-size: 12px; font-weight: 600;
  letter-spacing: .02em; cursor: not-allowed;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: all var(--t);
}
.btn-enter.active { background: var(--ac); color: white; border-color: transparent; cursor: pointer; }
.btn-enter.active:hover  { background: var(--ac-h); }
.btn-enter.active:active { transform: scale(.98); }
.btn-enter.anon-mode { background: var(--bg-r); border-color: rgba(83,74,183,.4); color: #AFA9EC; }
.btn-enter.anon-mode.active {
  background: rgba(83,74,183,.25); border-color: rgba(83,74,183,.5);
  color: #AFA9EC; cursor: pointer;
}
.btn-enter.anon-mode.active:hover { background: rgba(83,74,183,.35); }
.btn-enter.loading, .btn-enter.success { cursor: not-allowed; pointer-events: none; }
.btn-enter.success { background: var(--ok); color: white; border-color: transparent; }

.hint {
  margin-top: 10px; text-align: center; font-size: 11px;
  color: var(--txt4); display: flex; align-items: center;
  justify-content: center; gap: 5px;
}

/* ── ЕДИНЫЙ ШРИФТ ВО ВСЁМ MINI APP ─────────────────────────
   Outfit для всего интерфейса. FontAwesome-иконки исключены —
   у них собственное font-family для глифов. */
body,
body *:not(i):not(.fa):not(.fa-solid):not(.fa-regular):not(.fa-brands):not(.fa-light):not(.fa-thin):not([class*=" fa-"]):not([class^="fa-"]) {
  font-family: 'Outfit', system-ui, -apple-system, sans-serif !important;
}
