/* Giftora Market — биржа цифровых товаров Telegram */

/* ---------- тёмная тема (по умолчанию) ---------- */
:root {
  color-scheme: dark;
  --ink: 255, 255, 255;
  --bg: #070a12;
  --bg-2: #0c111d;
  --surface: rgba(var(--ink), 0.035);
  --surface-2: rgba(var(--ink), 0.06);
  --surface-3: rgba(var(--ink), 0.09);
  --border: rgba(var(--ink), 0.08);
  --border-2: rgba(var(--ink), 0.15);
  --card-bg: linear-gradient(180deg, rgba(var(--ink), .045), rgba(var(--ink), .02));
  --panel: #111827;
  --header-bg: rgba(7, 10, 18, .78);
  --tabbar-bg: rgba(9, 12, 20, .9);
  --side-bg: rgba(9, 12, 20, .9);
  --chip-bg: rgba(7, 10, 18, .7);
  --backdrop: rgba(2, 4, 10, .7);
  --glow-1: rgba(37, 99, 235, .18);
  --glow-2: rgba(14, 165, 233, .10);
  --text: #eef2fb;
  --text-2: #c3cad9;
  --muted: #8a93a8;
  --dim: #586178;
  --accent: #7cc4ff;
  --accent-2: #2f7cf6;
  --accent-deep: #3b82f6;
  --blue: #5b8dff;
  --cyan: #52d6ff;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #fb7185;
  --up: #22c55e;
  --grad: linear-gradient(120deg, #5cb4ff 0%, #3a8bff 40%, #2563eb 75%, #2b4fd8 100%);
  --grad-text: linear-gradient(120deg, #e0f2ff 0%, #8fd0ff 35%, #4a9dff 70%, #7aa7ff 100%);
  --star: #ffc94a;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px var(--border);
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --header-h: 72px;
}

/* ---------- светлая тема ---------- */
:root[data-theme="light"] {
  color-scheme: light;
  --ink: 15, 23, 42;
  --bg: #f4f6fb;
  --bg-2: #e9eef7;
  --surface: #ffffff;
  --surface-2: rgba(var(--ink), 0.045);
  --surface-3: rgba(var(--ink), 0.08);
  --border: rgba(var(--ink), 0.09);
  --border-2: rgba(var(--ink), 0.17);
  --card-bg: #ffffff;
  --panel: #ffffff;
  --header-bg: rgba(255, 255, 255, .82);
  --tabbar-bg: rgba(255, 255, 255, .92);
  --side-bg: rgba(255, 255, 255, .92);
  --chip-bg: rgba(255, 255, 255, .85);
  --backdrop: rgba(15, 23, 42, .35);
  --glow-1: rgba(37, 99, 235, .10);
  --glow-2: rgba(14, 165, 233, .08);
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --dim: #94a3b8;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-deep: #2563eb;
  --blue: #2563eb;
  --cyan: #0891b2;
  --success: #059669;
  --warning: #d97706;
  --danger: #e11d48;
  --up: #16a34a;
  --grad-text: linear-gradient(120deg, #1e40af 0%, #2563eb 40%, #0284c7 75%, #3b82f6 100%);
  --shadow: 0 24px 60px -28px rgba(15, 23, 42, .25), 0 0 0 1px var(--border);
}
:root[data-theme="light"] .card, :root[data-theme="light"] .lot-card, :root[data-theme="light"] .cat-card,
:root[data-theme="light"] .stat, :root[data-theme="light"] .kpi, :root[data-theme="light"] .chart-card { box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -16px rgba(15, 23, 42, .12); }
html { transition: background-color .3s; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
img, svg { display: block; }
::selection { background: rgba(59, 130, 246, .45); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(var(--ink), .08); border-radius: 10px; border: 3px solid var(--bg); }

/* ---------- фон: сетка биржевого терминала ---------- */
.bg-fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-fx::before {
  content: ''; position: absolute; inset: -10%;
  background:
    radial-gradient(45% 40% at 12% 0%, var(--glow-1), transparent 70%),
    radial-gradient(40% 35% at 95% 10%, var(--glow-2), transparent 70%);
}
.bg-fx .grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(var(--ink), .035) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--ink), .035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(80% 60% at 50% 0%, #000, transparent);
}

/* ---------- типографика ---------- */
.display { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; line-height: 1.08; }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: ui-monospace, 'JetBrains Mono', Consolas, monospace; }
.nowrap { white-space: nowrap; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { margin-top: 64px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.section-head p { color: var(--muted); margin-top: 4px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.link-more { color: var(--muted); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; transition: color .2s; white-space: nowrap; }
.link-more:hover { color: var(--text); }

/* ---------- анонс ---------- */
.announce {
  position: relative; z-index: 31; text-align: center; font-size: 13px; padding: 8px 40px; color: var(--text-2);
  background: linear-gradient(90deg, rgba(56, 189, 248,.08), rgba(59, 130, 246,.12), rgba(91,141,255,.08));
  border-bottom: 1px solid var(--border);
}
.announce b { color: var(--accent); font-weight: 600; }

/* ---------- шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 30; height: var(--header-h);
  background: var(--header-bg); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}
.header .container { height: 100%; display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.logo-mark { width: 36px; height: 36px; }
.logo-word { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: .12em; }
.logo-word small { display: block; font-family: var(--font); font-size: 9.5px; letter-spacing: .28em; color: var(--muted); font-weight: 500; margin-top: -2px; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 10px; color: var(--text-2); font-size: 14px; font-weight: 500; transition: .2s; }
.nav a:hover, .nav a.active { color: var(--text); background: var(--surface-2); }
.search { flex: 1; max-width: 440px; position: relative; margin-left: auto; }
.search input {
  width: 100%; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  padding: 0 14px 0 42px; outline: none; transition: .2s; font-size: 14px;
}
.search input:focus { border-color: rgba(59, 130, 246,.5); background: var(--surface-2); box-shadow: 0 0 0 4px rgba(59, 130, 246,.12); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--dim); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; font-family: inherit; }
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.balance-pill {
  display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 6px 0 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: 14px; transition: .2s;
}
.balance-pill:hover { border-color: var(--border-2); }
.balance-pill .plus { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--grad); color: #ffffff; }
.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2); transition: .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-2); }
.badge-dot {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg);
}
.avatar-btn { border-radius: 12px; padding: 3px; border: 1px solid var(--border); background: var(--surface); }
.menu-wrap { position: relative; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); width: 260px; padding: 8px; border-radius: 16px;
  background: var(--panel); backdrop-filter: blur(24px); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none; transition: .18s var(--ease); transform-origin: top right;
}
.dropdown.open { opacity: 1; transform: none; pointer-events: auto; }
.dropdown .dd-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown a, .dropdown button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-size: 14px; text-align: left; }
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); color: var(--text); }
.dropdown hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: 12px; font-weight: 600; font-size: 14.5px; white-space: nowrap; transition: transform .15s var(--ease), box-shadow .25s, background .2s, border-color .2s, opacity .2s;
  border: 1px solid transparent; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--grad); color: #ffffff; box-shadow: 0 10px 30px -10px rgba(59, 130, 246, .55), inset 0 1px 0 rgba(255, 255, 255, .4); background-size: 140% 100%; }
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 14px 40px -10px rgba(59, 130, 246, .75), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn-ghost { background: var(--surface-2); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-3); border-color: var(--border-2); }
.btn-outline { border-color: var(--border-2); }
.btn-outline:hover { background: var(--surface-2); }
.btn-danger { background: rgba(255, 95, 128, .12); color: #ff8fa6; border-color: rgba(255, 95, 128, .25); }
.btn-danger:hover { background: rgba(255, 95, 128, .2); }
.btn-success { background: rgba(63, 224, 160, .14); color: #6ff0bd; border-color: rgba(63, 224, 160, .3); }
.btn-success:hover { background: rgba(63, 224, 160, .22); }
.btn-lg { height: 54px; padding: 0 28px; font-size: 16px; border-radius: 15px; }
.btn-sm { height: 34px; padding: 0 13px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------- карточки ---------- */
.card {
  position: relative; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}
.card-glow::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(186, 230, 253,.45), rgba(59, 130, 246,.25) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.card h3 { font-size: 17px; font-weight: 600; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.2vw, 66px); margin: 18px 0 20px; }
.hero p.lead { font-size: 18px; color: var(--text-2); max-width: 540px; }
.hero-cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 32px; margin-top: 44px; flex-wrap: wrap; }
.hero-trust .num { font-family: var(--display); font-size: 26px; font-weight: 600; }
.hero-trust .lbl { color: var(--muted); font-size: 13px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; color: var(--text-2);
}
.pill .tag { background: var(--grad); color: #ffffff; font-weight: 700; padding: 2px 9px; border-radius: 999px; font-size: 11px; letter-spacing: .04em; }


/* ---------- категории ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat-card {
  position: relative; overflow: hidden; padding: 20px; border-radius: 20px; min-height: 150px;
  background: var(--card-bg); border: 1px solid var(--border);
  display: flex; flex-direction: column; transition: transform .35s var(--ease), border-color .3s, box-shadow .35s;
}
.cat-card::after {
  content: ''; position: absolute; width: 180px; height: 180px; right: -60px; top: -60px; border-radius: 50%;
  background: radial-gradient(circle, var(--c1), transparent 70%); opacity: .22; transition: opacity .35s, transform .5s var(--ease);
}
.cat-card:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: 0 24px 60px -24px var(--c1); }
.cat-card:hover::after { opacity: .4; transform: scale(1.2); }
.cat-icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 10px 24px -8px var(--c1), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.cat-card .name { margin-top: auto; padding-top: 22px; font-weight: 600; font-size: 16px; }
.cat-card .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.cat-card .arrow { position: absolute; right: 18px; bottom: 20px; color: var(--dim); transition: .3s var(--ease); }
.cat-card:hover .arrow { color: var(--text); transform: translateX(3px); }

/* ---------- лоты ---------- */
.lot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lot-card {
  position: relative; display: flex; flex-direction: column; border-radius: 20px; overflow: hidden;
  background: var(--card-bg); border: 1px solid var(--border);
  transition: transform .35s var(--ease), border-color .3s, box-shadow .35s;
}
.lot-card:hover { transform: translateY(-4px); border-color: var(--border-2); box-shadow: 0 30px 60px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(var(--ink), .04); }
.lot-cover {
  position: relative; height: 128px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--c1) 40%, transparent), transparent 70%), linear-gradient(180deg, rgba(var(--ink), .03), transparent);
  border-bottom: 1px solid var(--border);
}
.lot-cover .big-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 18px 40px -12px var(--c1), inset 0 1px 0 rgba(255, 255, 255, .4); transition: transform .5s var(--ease); }
.lot-card:hover .big-icon { transform: scale(1.08) rotate(-4deg); }
.lot-cover .orb { position: absolute; border-radius: 50%; border: 1px solid rgba(var(--ink), .07); }
.lot-cover .orb.o1 { width: 160px; height: 160px; }
.lot-cover .orb.o2 { width: 240px; height: 240px; }
.lot-badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 8px; font-size: 11.5px; font-weight: 600;
  background: var(--chip-bg); border: 1px solid var(--border); backdrop-filter: blur(8px); color: var(--text-2);
}
.chip.gold { color: var(--accent); border-color: rgba(125, 211, 252,.3); }
.chip.green { color: var(--success); border-color: rgba(63,224,160,.3); }
.chip.violet { color: #93c5fd; border-color: rgba(59, 130, 246,.35); }
.lot-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.lot-title { font-weight: 600; font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.lot-seller { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); min-width: 0; }
.lot-seller .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lot-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 8px; }
.price { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -.01em; white-space: nowrap; }
.rating { display: inline-flex; align-items: center; gap: 4px; color: var(--star); font-weight: 600; font-size: 13px; }
.rating .cnt { color: var(--muted); font-weight: 400; }
.verified { color: var(--cyan); flex-shrink: 0; }
.official-mark { color: var(--accent); flex-shrink: 0; }
.online { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(63,224,160,.15); flex-shrink: 0; }

/* список лотов (как на бирже) */
.lot-list { border: 1px solid var(--border); border-radius: 20px; overflow: hidden; background: var(--surface); }
.lot-row { display: grid; grid-template-columns: 1fr 220px 140px 130px; align-items: center; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--border); transition: background .2s; }
.lot-row:first-child { border-top: 0; }
.lot-row:hover { background: var(--surface-2); }
.lot-row.head { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding: 12px 20px; background: rgba(var(--ink), .02); }
.lot-row.head:hover { background: rgba(var(--ink), .02); }
.lot-row .t { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lot-row .t .mini-icon { flex-shrink: 0; }
.lot-row .t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.lot-row .p { text-align: right; font-family: var(--display); font-weight: 600; }
.mini-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); }

/* ---------- аватар ---------- */
.avatar { display: grid; place-items: center; border-radius: 30%; font-weight: 700; color: #fff; flex-shrink: 0; text-transform: uppercase; background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }

/* ---------- toolbar / фильтры ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-btn {
  height: 38px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font-size: 13.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; transition: .2s; white-space: nowrap;
}
.chip-btn:hover { color: var(--text); border-color: var(--border-2); }
.chip-btn.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip-btn .dotc { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.seg button { height: 32px; padding: 0 12px; border-radius: 9px; color: var(--muted); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.seg button.active { background: var(--surface-3); color: var(--text); }

/* ---------- формы ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .textarea, .select {
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: rgba(var(--ink), .03);
  outline: none; transition: .2s; font-size: 14.5px;
}
.textarea { padding: 12px 14px; min-height: 110px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238b88a3' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.select option { background: var(--panel); color: var(--text); }
.input:focus, .textarea:focus, .select:focus { border-color: rgba(59, 130, 246,.55); background: rgba(var(--ink), .05); box-shadow: 0 0 0 4px rgba(59, 130, 246,.12); }
.input-group { position: relative; }
.input-group .suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.switch { display: flex; align-items: center; gap: 14px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track { width: 44px; height: 26px; border-radius: 99px; background: var(--surface-3); position: relative; transition: .25s; flex-shrink: 0; border: 1px solid var(--border); }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .25s var(--ease); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.switch input:checked + .track { background: var(--accent-deep); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(18px); }
.choice-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; transition: .2s; font-size: 13.5px; font-weight: 500;
}
.choice:hover { border-color: var(--border-2); }
.choice.active { border-color: rgba(59, 130, 246,.6); background: rgba(59, 130, 246,.1); box-shadow: 0 0 0 3px rgba(59, 130, 246,.1); }
.choice .mini-icon { width: 30px; height: 30px; border-radius: 9px; }

/* ---------- страница лота ---------- */
.breadcrumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin: 28px 0 20px; flex-wrap: wrap; }
.breadcrumbs a:hover { color: var(--text); }
.lot-page { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.lot-hero { height: 260px; border-radius: 24px; overflow: hidden; }
.lot-hero.lot-cover { border: 1px solid var(--border); }
.lot-hero .big-icon { width: 104px; height: 104px; border-radius: 32px; }
.lot-hero .orb.o1 { width: 260px; height: 260px; }
.lot-hero .orb.o2 { width: 420px; height: 420px; }
.lot-h1 { font-family: var(--display); font-size: 30px; font-weight: 600; letter-spacing: -.02em; margin: 24px 0 12px; line-height: 1.15; }
.desc { color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0; }
.feature { padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.feature .ic { color: var(--accent); margin-bottom: 10px; }
.feature .v { font-weight: 600; }
.feature .l { font-size: 12.5px; color: var(--muted); }
.buy-card { position: sticky; top: calc(var(--header-h) + 20px); }
.buy-card .price-big { font-family: var(--display); font-size: 38px; font-weight: 600; letter-spacing: -.02em; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.qty button { width: 42px; height: 42px; display: grid; place-items: center; color: var(--text-2); font-size: 18px; }
.qty button:hover { color: var(--text); }
.qty input { width: 56px; text-align: center; background: none; border: 0; outline: none; font-weight: 600; height: 42px; }
.sum-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 14px; color: var(--text-2); }
.sum-row.total { color: var(--text); font-weight: 600; font-size: 16px; padding-top: 14px; border-top: 1px solid var(--border); margin-top: 6px; }
.guard { display: flex; gap: 12px; padding: 14px; border-radius: 14px; background: rgba(63,224,160,.06); border: 1px solid rgba(63,224,160,.18); font-size: 13px; color: var(--text-2); }
.guard svg { color: var(--success); flex-shrink: 0; margin-top: 1px; }
.seller-card { display: flex; align-items: center; gap: 14px; }
.seller-card .info { flex: 1; min-width: 0; }
.seller-card .nm { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat-inline { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.stat-inline b { color: var(--text); font-weight: 600; }

/* отзывы */
.review { padding: 18px 0; border-top: 1px solid var(--border); }
.review:first-child { border-top: 0; padding-top: 0; }
.review-head { display: flex; align-items: center; gap: 12px; }
.review-head .who { flex: 1; min-width: 0; }
.review-head .who b { font-weight: 600; font-size: 14px; }
.stars-row { display: inline-flex; gap: 2px; color: var(--star); }
.stars-row .off { color: var(--dim); }
.review p { margin-top: 10px; color: var(--text-2); font-size: 14px; }
.review .reply { margin-top: 10px; padding: 10px 14px; border-left: 2px solid var(--accent-deep); background: var(--surface); border-radius: 0 10px 10px 0; font-size: 13.5px; color: var(--text-2); }
.review-slider { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.review-slider .card { scroll-snap-align: start; padding: 20px; }

/* ---------- продавцы ---------- */
.seller-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.seller-tile { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); transition: .3s var(--ease); }
.seller-tile:hover { border-color: var(--border-2); transform: translateY(-3px); }
.profile-banner { position: relative; height: 180px; border-radius: 24px; overflow: hidden; background: radial-gradient(60% 120% at 20% 0%, rgba(59, 130, 246,.45), transparent 70%), radial-gradient(50% 120% at 90% 10%, rgba(56, 189, 248,.35), transparent 70%), var(--bg-2); border: 1px solid var(--border); }
.profile-banner::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(var(--ink), .04) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--ink), .04) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(to bottom, #000, transparent); }
.profile-head { display: flex; align-items: flex-end; gap: 20px; margin: -54px 0 0 28px; position: relative; z-index: 1; flex-wrap: wrap; }
.profile-head .avatar { border: 4px solid var(--bg); }
.profile-head h1 { font-family: var(--display); font-size: 28px; font-weight: 600; display: flex; align-items: center; gap: 10px; }

/* ---------- статистика ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.stat .l { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.stat .v { font-family: var(--display); font-size: 26px; font-weight: 600; margin-top: 8px; letter-spacing: -.01em; }

/* ---------- таблицы ---------- */
.table-wrap { border: 1px solid var(--border); border-radius: 18px; overflow-x: auto; background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .07em; padding: 13px 16px; background: rgba(var(--ink), .02); white-space: nowrap; }
.table td { padding: 14px 16px; border-top: 1px solid var(--border); vertical-align: middle; }
.table tr.clickable { cursor: pointer; transition: background .15s; }
.table tr.clickable:hover td { background: var(--surface-2); }
.status { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-paid { color: var(--warning); background: rgba(255,195,92,.1); }
.st-delivered { color: var(--blue); background: rgba(91,141,255,.12); }
.st-completed, .st-active, .st-approved { color: var(--success); background: rgba(63,224,160,.1); }
.st-refunded, .st-hidden, .st-expired { color: var(--muted); background: var(--surface-2); }
.st-dispute, .st-rejected, .st-banned { color: var(--danger); background: rgba(255,95,128,.1); }
.st-pending { color: #93c5fd; background: rgba(59, 130, 246,.12); }
.amount-pos { color: var(--success); font-weight: 600; }
.amount-neg { color: var(--text-2); font-weight: 600; }

/* ---------- заказ ---------- */
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.step { position: relative; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.step .n { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); font-weight: 700; font-size: 13px; margin-bottom: 10px; }
.step.done { color: var(--text); border-color: rgba(63,224,160,.25); }
.step.done .n { background: var(--success); color: #062218; }
.step.now { color: var(--text); border-color: rgba(59, 130, 246,.5); box-shadow: 0 0 0 3px rgba(59, 130, 246,.1); }
.step.now .n { background: var(--grad); color: #ffffff; }
.step.bad { color: var(--text); border-color: rgba(255,95,128,.35); }
.step.bad .n { background: var(--danger); color: #fff; }
.delivered-box { position: relative; padding: 16px; border-radius: 14px; background: rgba(63,224,160,.06); border: 1px dashed rgba(63,224,160,.35); white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; }
.chat { display: flex; flex-direction: column; height: 560px; padding: 0; overflow: hidden; }
.chat-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.chat-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 16px; font-size: 14px; word-break: break-word; white-space: pre-wrap; }
.msg .meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.msg.me { align-self: flex-end; background: linear-gradient(135deg, rgba(59, 130, 246,.35), rgba(91,141,255,.3)); border-bottom-right-radius: 5px; }
.msg.them { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 5px; }
.msg.system { align-self: center; max-width: 92%; text-align: center; background: transparent; border: 1px solid var(--border); color: var(--text-2); font-size: 12.5px; border-radius: 12px; }
.msg.admin { align-self: flex-start; background: rgba(125, 211, 252,.1); border: 1px solid rgba(125, 211, 252,.3); }
.msg .author { font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 2px; }
.chat-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--border); }
.chat-input textarea { flex: 1; min-height: 46px; max-height: 120px; resize: none; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); outline: none; }

/* ---------- кошелёк ---------- */
.wallet-card {
  position: relative; overflow: hidden; border-radius: 26px; padding: 30px; min-height: 230px; display: flex; flex-direction: column;
  background: radial-gradient(80% 120% at 0% 0%, rgba(56, 189, 248,.35), transparent 60%), radial-gradient(80% 120% at 100% 100%, rgba(59, 130, 246,.45), transparent 60%), #120f1f;
  border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 40px 80px -30px rgba(59, 130, 246,.4);
}
.wallet-card::after { content: ''; position: absolute; width: 380px; height: 380px; right: -120px; top: -160px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 0 0 40px rgba(255, 255, 255, .02), 0 0 0 80px rgba(255, 255, 255, .015); }
.wallet-card .bal { font-family: var(--display); font-size: 46px; font-weight: 600; letter-spacing: -.02em; margin-top: 8px; }
.wallet-card .row { display: flex; gap: 10px; margin-top: auto; padding-top: 24px; flex-wrap: wrap; position: relative; z-index: 1; }
.preset-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- модалки, тосты ---------- */
.modal-back { position: fixed; inset: 0; z-index: 100; background: var(--backdrop); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 20px; animation: fade .2s; overflow-y: auto; }
.modal { width: 100%; max-width: 480px; border-radius: 24px; padding: 28px; background: var(--panel); box-shadow: var(--shadow); animation: pop .3s var(--ease); position: relative; }
.modal h2 { font-family: var(--display); font-size: 22px; font-weight: 600; margin-bottom: 6px; }
.modal .close { position: absolute; right: 16px; top: 16px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.modal .close:hover { background: var(--surface-2); color: var(--text); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.toasts { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: 14px; background: var(--panel); box-shadow: var(--shadow); font-size: 14px; max-width: 380px; animation: pop .3s var(--ease); }
.toast.ok svg { color: var(--success); }
.toast.err svg { color: var(--danger); }

/* ---------- auth ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h) - 120px); display: grid; place-items: center; padding: 40px 0; }
.auth-card { width: 100%; max-width: 440px; padding: 36px; }
.auth-card h1 { font-family: var(--display); font-size: 28px; font-weight: 600; margin-bottom: 6px; }

/* ---------- разное ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .ic { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.empty h3 { color: var(--text); font-size: 18px; margin-bottom: 6px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; }
.tabs button, .tabs a { padding: 12px 16px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.tabs .active { color: var(--text); border-color: var(--accent-deep); }
.tabs .cnt { font-size: 11px; background: var(--surface-3); padding: 1px 7px; border-radius: 6px; }
.page-title { font-family: var(--display); font-size: 32px; font-weight: 600; letter-spacing: -.02em; margin: 36px 0 6px; }
.page-sub { color: var(--muted); margin-bottom: 28px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
.skeleton { background: linear-gradient(90deg, rgba(var(--ink), .04), rgba(var(--ink), .08), rgba(var(--ink), .04)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 20px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.fade-in { animation: fadeUp .5s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } }
.steps-how { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: s; }
.how { padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); position: relative; }
.how .num { font-family: var(--display); font-size: 40px; font-weight: 700; line-height: 1; margin-bottom: 18px; }
.how h3 { font-size: 16px; margin-bottom: 6px; }
.how p { color: var(--muted); font-size: 14px; }
.cta-band { position: relative; overflow: hidden; border-radius: 28px; padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: radial-gradient(60% 140% at 0% 50%, rgba(56, 189, 248,.25), transparent 70%), radial-gradient(60% 140% at 100% 50%, rgba(59, 130, 246,.35), transparent 70%), var(--bg-2); border: 1px solid var(--border-2); }
.cta-band h2 { font-family: var(--display); font-size: 30px; font-weight: 600; letter-spacing: -.02em; max-width: 560px; }
.footer { margin-top: 96px; border-top: 1px solid var(--border); padding: 48px 0 110px; color: var(--muted); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { color: var(--text); font-size: 14px; margin-bottom: 14px; }
.footer a { display: block; padding: 4px 0; }
.footer a:hover { color: var(--text); }
.copy-btn { position: absolute; top: 10px; right: 10px; }

/* ---------- мобильная навигация ---------- */
.tabbar { display: none; }
@media (max-width: 1100px) {
  .lot-grid { grid-template-columns: repeat(3, 1fr); }
  .nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .lot-page, .order-layout { grid-template-columns: 1fr; }
  .buy-card { position: static; }
  .steps-how { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  :root { --header-h: 62px; }
  .container { padding: 0 16px; }
  .search { display: none; }
  .header .container { gap: 12px; justify-content: space-between; }
  .header-actions .hide-m { display: none; }
  .logo-word small { display: none; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-card { min-height: 130px; padding: 16px; }
  .lot-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .lot-cover { height: 96px; }
  .lot-cover .big-icon { width: 48px; height: 48px; border-radius: 15px; }
  .lot-body { padding: 12px; gap: 10px; }
  .lot-title { font-size: 13.5px; min-height: 36px; }
  .price { font-size: 16px; }
  .lot-foot .btn { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .seller-grid, .footer-grid, .grid-2, .form-grid { grid-template-columns: 1fr; }
  .feature-row { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: repeat(2, 1fr); }
  .lot-row { grid-template-columns: 1fr auto; }
  .lot-row .hide-m { display: none; }
  .hero { padding: 36px 0 10px; }
  .hero-trust { gap: 22px; }
  .float-card.f1 { left: 0; } .float-card.f2 { right: 0; }
  .section { margin-top: 44px; }
  .section-head h2 { font-size: 21px; }
  .page-title { font-size: 25px; margin-top: 24px; }
  .lot-h1 { font-size: 23px; }
  .lot-hero { height: 190px; }
  .cta-band { padding: 28px; }
  .cta-band h2 { font-size: 22px; }
  .steps-how { grid-template-columns: 1fr; }
  .profile-head { margin-left: 16px; }
  .chat { height: 480px; }
  .toasts { left: 16px; right: 16px; bottom: 84px; }
  .footer { padding-bottom: 120px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); background: var(--tabbar-bg); backdrop-filter: blur(22px); border-top: 1px solid var(--border);
  }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; color: var(--muted); padding: 4px 0; }
  .tabbar a.active { color: var(--text); }
  .tabbar a.active svg { color: var(--accent); }
  .tabbar .sell svg { width: 42px; height: 42px; padding: 10px; border-radius: 14px; background: var(--grad); color: #ffffff !important; margin-top: -18px; box-shadow: 0 10px 30px -8px rgba(59, 130, 246,.7); }
  .tabbar .badge-dot { top: -4px; right: calc(50% - 22px); }
}

/* ================= анимации ================= */
/* появление при прокрутке */
.reveal { opacity: 0; transform: translateY(26px) scale(.985); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
/* переход между страницами */
#view.page-enter { animation: pageIn .55s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } }
/* подсветка за курсором на карточках */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(186, 230, 253, .10), rgba(59, 130, 246, .07) 40%, transparent 70%);
}
.spot:hover::before { opacity: 1; }
/* 3D-наклон */
.tilt { transform-style: preserve-3d; will-change: transform; }
.lot-card.tilt:hover, .cat-card.tilt:hover { transition: transform .12s linear, border-color .3s, box-shadow .35s; }
/* блик на главной кнопке */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: shine 5s ease-in-out infinite;
}
@keyframes shine { 0%, 70% { left: -60%; } 100% { left: 140%; } }
/* градиентный текст переливается */
.grad-text { background-size: 200% 100%; animation: gradMove 8s ease-in-out infinite alternate; }
@keyframes gradMove { to { background-position: 100% 0; } }
/* колокольчик */
.bell-shake { animation: bell .9s var(--ease); }
@keyframes bell { 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
.badge-dot { animation: popIn .4s var(--ease); }
@keyframes popIn { from { transform: scale(0); } }
/* бегущая строка доверия */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); border-block: 1px solid var(--border); padding: 18px 0; margin-top: 56px; }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marq 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; white-space: nowrap; }
.marquee-item .mini-icon { width: 28px; height: 28px; border-radius: 9px; }
@keyframes marq { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ================= уведомления ================= */
.notif-panel { width: 380px; padding: 0; max-height: 520px; display: flex; flex-direction: column; }
.notif-panel .np-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.notif-panel .np-list { overflow-y: auto; padding: 6px; }
.notif { display: flex; gap: 12px; padding: 12px; border-radius: 12px; font-size: 13.5px; color: var(--text-2); align-items: flex-start; }
.notif:hover { background: var(--surface-2); }
.notif.unread { color: var(--text); }
.notif .ni { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-3); }
.notif.unread .ni { box-shadow: 0 0 0 2px rgba(59, 130, 246,.5); }
.notif .nt { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ni.sale, .ni.money { color: var(--success); background: rgba(63,224,160,.12); }
.ni.warn { color: var(--danger); background: rgba(255,95,128,.12); }
.ni.order, .ni.chat { color: var(--blue); background: rgba(91,141,255,.12); }
.ni.ticket { color: var(--accent); background: rgba(125, 211, 252,.12); }
.ni.review { color: var(--accent); background: rgba(125, 211, 252,.12); }

/* ================= поддержка ================= */
.support-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.ticket-row { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-top: 1px solid var(--border); transition: background .15s; }
.ticket-row:first-child { border-top: 0; }
.ticket-row:hover { background: var(--surface-2); }
.st-open { color: #93c5fd; background: rgba(59, 130, 246,.12); }
.st-answered { color: var(--success); background: rgba(63,224,160,.1); }
.st-closed { color: var(--muted); background: var(--surface-2); }
.faq details { border-top: 1px solid var(--border); padding: 14px 0; }
.faq details:first-child { border-top: 0; padding-top: 0; }
.faq summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; color: var(--muted); font-size: 18px; line-height: 1; transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); font-size: 14px; margin-top: 10px; animation: fadeUp .35s var(--ease); }
.msg.staff { align-self: flex-start; background: rgba(125, 211, 252,.08); border: 1px solid rgba(125, 211, 252,.25); }
@media (max-width: 1100px) { .support-grid { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .notif-panel { position: fixed; left: 12px; right: 12px; top: 70px; width: auto; } }
.notif-panel .np-head button { width: auto; padding: 0 12px; height: 30px; }

/* ================= страница лота: цена сразу после заголовка на телефоне ================= */
.lot-page { grid-template-areas: "top aside" "bottom aside"; grid-template-rows: auto 1fr; }
.lot-top { grid-area: top; min-width: 0; }
.lot-bottom { grid-area: bottom; min-width: 0; }
.lot-page > .buy-card { grid-area: aside; align-self: start; }
html { -webkit-tap-highlight-color: transparent; }

@media (max-width: 1100px) {
  .lot-page { grid-template-areas: "top" "aside" "bottom"; grid-template-rows: auto; }
}

/* ================= телефоны ================= */
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  /* iOS не зумит поля, если шрифт >= 16px */
  .input, .textarea, .select, .search input, .chat-input textarea, .qty input { font-size: 16px; }

  /* шапка */
  .header .container { gap: 8px; }
  .logo-mark { width: 30px; height: 30px; }
  .logo-word { font-size: 16px; }
  .header-actions { gap: 6px; }
  .balance-pill { height: 38px; padding: 0 4px 0 10px; font-size: 13px; gap: 6px; }
  .balance-pill .plus { width: 28px; height: 28px; }
  .icon-btn { width: 38px; height: 38px; }
  .header-actions .btn { height: 38px; padding: 0 14px; font-size: 13.5px; }
  .announce { font-size: 12px; padding: 7px 12px; }

  /* главная */
  .hero { padding-top: 28px; }
  .hero h1 { font-size: 36px; margin: 14px 0 14px; }
  .hero p.lead { font-size: 15.5px; }
  .hero-cta { flex-direction: column; margin-top: 24px; }
  .hero-cta .btn { width: 100%; }
  .hero-trust { gap: 18px; margin-top: 30px; justify-content: space-between; }
  .hero-trust .num { font-size: 22px; }
  .hero-trust .lbl { font-size: 12px; }
  .pill { font-size: 12px; }
  .float-card { padding: 9px 12px 9px 9px; gap: 9px; border-radius: 13px; }
  .float-card .t { font-size: 12.5px; }
  .float-card .mini-icon { width: 28px; height: 28px; }
  .marquee { margin-top: 28px; padding: 14px 0; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .cat-card .name { font-size: 14.5px; padding-top: 16px; }
  .cat-card .meta { font-size: 12px; }
  .cat-icon { width: 42px; height: 42px; border-radius: 12px; }
  .cta-band { flex-direction: column; align-items: stretch; text-align: left; }
  .cta-band .btn { width: 100%; }
  .seller-tile { padding: 14px; }

  /* каталог */
  .toolbar { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .toolbar .search { grid-column: 1 / -1; max-width: none !important; }
  .toolbar .select { width: 100% !important; }
  .toolbar > .row { grid-column: 1 / -1; order: 3; }
  .toolbar > .row .input { flex: 1; width: auto !important; }
  .toolbar .seg { margin-left: 0 !important; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .chips::-webkit-scrollbar { display: none; }
  .lot-row { padding: 12px 14px; }

  /* лот */
  .lot-h1 { font-size: 21px; margin-top: 18px; }
  .lot-hero { height: 160px; border-radius: 20px; }
  .lot-hero .big-icon { width: 76px; height: 76px; border-radius: 24px; }
  .buy-card .price-big { font-size: 30px; }
  .feature-row { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .feature { padding: 12px 10px; }
  .feature .v { font-size: 13px; }
  .feature .l { font-size: 11px; }
  .card { padding: 18px; border-radius: 18px; }
  .breadcrumbs { margin: 18px 0 14px; font-size: 12px; }
  .breadcrumbs span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }

  /* заказ */
  .steps { gap: 6px; }
  .step { padding: 10px; }
  .step .n { width: 24px; height: 24px; margin-bottom: 6px; font-size: 12px; }
  .step > div:last-child { font-size: 12.5px !important; }
  .chat { height: calc(100svh - 190px); min-height: 420px; }
  .msg { max-width: 88%; }

  /* кошелёк и профиль */
  .wallet-card { padding: 22px; border-radius: 22px; min-height: 200px; }
  .wallet-card .bal { font-size: 36px; }
  .wallet-card .row .btn { flex: 1; }
  .profile-banner { height: 130px; }
  .profile-head { margin-top: -44px; gap: 14px; }
  .profile-head .avatar { width: 84px !important; height: 84px !important; font-size: 34px !important; }
  .profile-head h1 { font-size: 22px; }
  .stat .v { font-size: 20px; }
  .stat { padding: 14px; }
  .page-title { font-size: 24px; }
  .row-between > .row { flex-wrap: wrap; }

  /* таблицы -> карточки */
  .table-wrap { border: 0; background: none; overflow: visible; }
  table.table, .table tbody { display: block; }
  .table thead { display: none; }
  .table tr { display: block; margin-bottom: 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
  .table td { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 6px 0; border: 0; text-align: right; min-width: 0; }
  .table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; flex-shrink: 0; }
  .table td:empty, .table td[data-label=""]::before { display: none; }
  .table td > .row { justify-content: flex-end; text-align: left; }
  .table tr.clickable:hover td { background: none; }
  .table .actions { justify-content: flex-end; }

  /* модальные окна — снизу, как в приложениях */
  .modal-back { place-items: end center; padding: 0; }
  .modal { max-width: none; border-radius: 24px 24px 0 0; padding: 26px 18px calc(22px + env(safe-area-inset-bottom)); max-height: 92svh; overflow-y: auto; animation: sheet .35s var(--ease); }
  .modal::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--border-2); margin: -12px auto 14px; }
  @keyframes sheet { from { transform: translateY(100%); } }
  .modal .row { flex-wrap: wrap; }
  .modal .row .btn { flex: 1; }

  /* поддержка */
  .ticket-row { padding: 14px; gap: 12px; }
  .choice-grid { grid-template-columns: 1fr 1fr !important; }
  .auth-card { padding: 26px 20px; }
  .auth-wrap { padding: 20px 0; align-items: start; }
}

@media (max-width: 380px) {
  .logo-word small, .logo-word { font-size: 14px; }
  .hero h1 { font-size: 31px; }
  .lot-grid { gap: 8px; }
  .balance-pill { font-size: 12px; }
}

/* правки по итогам проверки на телефоне */
@media (max-width: 640px) {
  .hero-trust { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; }
  .toolbar > .row { min-width: 0; }
  .toolbar > .row .input { min-width: 0; }
  .table td[data-label]::before { font-weight: 400; }
  #actions .row .btn, #actions form .row .btn { flex: 1 1 100%; }
}

/* ================= биржевой стиль ================= */
.price, .buy-card .price-big, .lot-row .p, .stat .v, .kpi .v, .wallet-card .bal, .num-mono { font-family: var(--mono); font-weight: 700; letter-spacing: -.02em; }
.hero h1 { letter-spacing: -.035em; font-weight: 800; }
.display, .page-title, .section-head h2, .lot-h1, .modal h2, .auth-card h1, .profile-head h1, .cta-band h2 { font-weight: 800; letter-spacing: -.03em; }

/* терминал на главной: реальные лучшие предложения */
.terminal { border-radius: 20px; overflow: hidden; background: var(--panel); box-shadow: var(--shadow); border: 1px solid var(--border); }
.term-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 14px; }
.term-head .live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--up); letter-spacing: .08em; margin-left: auto; }
.term-head .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--up); animation: livePulse 2s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); } 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.term-cols, .term-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px 110px; gap: 12px; align-items: center; padding: 0 18px; }
.term-cols { height: 34px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.term-row { height: 52px; border-bottom: 1px solid var(--border); font-size: 13.5px; transition: background .15s; }
.term-row:hover { background: var(--surface-2); }
.term-row:last-child { border-bottom: 0; }
.term-row .t { display: flex; align-items: center; gap: 10px; min-width: 0; }
.term-row .t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.term-row .mini-icon { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; }
.term-row .s { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.term-row .p { text-align: right; font-family: var(--mono); font-weight: 700; }
.term-cols span:last-child { text-align: right; }
.term-empty { padding: 28px 18px; text-align: center; color: var(--muted); font-size: 14px; }
.term-depth { padding: 14px 18px 18px; border-top: 1px solid var(--border); }
.term-depth .ttl { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.depth-row { display: grid; grid-template-columns: 130px 1fr 34px; align-items: center; gap: 10px; font-size: 12px; color: var(--text-2); padding: 3px 0; }
.depth-row .bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.depth-row .bar i { display: block; height: 100%; border-radius: 0 3px 3px 0; background: var(--accent-deep); }
.depth-row b { font-family: var(--mono); font-weight: 600; text-align: right; }

/* бегущая строка цен */
.ticker .marquee-item b { font-family: var(--mono); font-weight: 700; color: var(--text); }

/* аватарки */
img.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--surface-2); box-shadow: 0 0 0 1px var(--border); }
.profile-head img.avatar { box-shadow: 0 0 0 4px var(--bg); }
.avatar-edit { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

/* кошелёк: «банковская карта» всегда тёмная */
.wallet-card { color: #fff; }
.wallet-card .btn-ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .22); }
.wallet-card .btn-ghost:hover { background: rgba(255, 255, 255, .2); }
:root[data-theme="light"] .wallet-card { background: radial-gradient(80% 120% at 0% 0%, rgba(56, 189, 248, .45), transparent 60%), radial-gradient(80% 120% at 100% 100%, rgba(37, 99, 235, .6), transparent 60%), #0f1b3d; }
:root[data-theme="light"] .cta-band { background: radial-gradient(60% 140% at 0% 50%, rgba(56, 189, 248, .18), transparent 70%), radial-gradient(60% 140% at 100% 50%, rgba(37, 99, 235, .16), transparent 70%), #fff; }
:root[data-theme="light"] .msg.me { background: #dbeafe; }
:root[data-theme="light"] .announce { background: linear-gradient(90deg, #e0ecff, #dbeafe, #e0f2fe); }
:root[data-theme="light"] .lot-cover { background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--c1) 28%, transparent), transparent 70%), #f8fafc; }
:root[data-theme="light"] .profile-banner { background: radial-gradient(60% 120% at 20% 0%, rgba(37, 99, 235, .25), transparent 70%), radial-gradient(50% 120% at 90% 10%, rgba(14, 165, 233, .2), transparent 70%), #fff; }

/* графики (сайт и админка) */
.chart-card { padding: 20px; border-radius: 18px; background: var(--card-bg); border: 1px solid var(--border); position: relative; }
.chart-card h3 { font-size: 14px; font-weight: 600; }
.chart-card .sub { font-size: 12px; color: var(--muted); }
.chart-svg { width: 100%; height: auto; overflow: visible; margin-top: 14px; }
.chart-svg .gridline { stroke: rgba(var(--ink), .07); stroke-width: 1; }
.chart-svg .axis { fill: var(--muted); font-size: 10.5px; font-family: var(--font); }
.chart-svg .bar { fill: var(--accent-deep); transition: opacity .15s; }
.chart-svg .bar:hover { opacity: .8; }
.chart-line { stroke: var(--accent-deep); }
.chart-cross { stroke: rgba(var(--ink), .3); }
.chart-dot { fill: var(--accent-deep); stroke: var(--panel); }
.chart-tip { position: absolute; pointer-events: none; padding: 8px 12px; border-radius: 10px; background: var(--panel); box-shadow: var(--shadow); font-size: 12px; white-space: nowrap; opacity: 0; transition: opacity .12s; z-index: 5; }
.chart-tip b { display: block; font-size: 13px; color: var(--text); font-family: var(--mono); }

/* ================= панель продавца ================= */
.sp { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 32px; }
.sp-side { position: sticky; top: calc(var(--header-h) + 20px); padding: 16px; }
.sp-shop { display: flex; align-items: center; gap: 12px; padding: 4px 4px 16px; border-bottom: 1px solid var(--border); margin-bottom: 10px; min-width: 0; }
.sp-shop .nm { font-weight: 700; display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-nav { display: flex; flex-direction: column; gap: 2px; }
.sp-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px; color: var(--text-2); font-weight: 500; font-size: 14px; transition: .15s; white-space: nowrap; }
.sp-nav a:hover { background: var(--surface-2); color: var(--text); }
.sp-nav a.active { background: rgba(59, 130, 246, .12); color: var(--text); box-shadow: inset 2px 0 0 var(--accent-deep); }
.sp-nav a.active svg { color: var(--accent); }
.sp-nav .cnt { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 7px; font-size: 11px; font-weight: 700; display: grid; place-items: center; background: var(--danger); color: #fff; }
.sp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.sp-head h1 { font-family: var(--display); font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.vacation-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--warning); background: rgba(251, 191, 36, .14); padding: 3px 9px; border-radius: 8px; }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.sp-grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; margin-top: 14px; }
.funnel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.funnel div { padding: 12px; border-radius: 12px; background: var(--surface-2); }
.funnel b { display: block; font-family: var(--mono); font-size: 18px; }
.funnel span { font-size: 12px; color: var(--muted); }
.review-card + .review-card { margin-top: 12px; }

/* ================= юридические страницы ================= */
.legal { max-width: 860px; margin: 0 auto; }
.legal .card { padding: 36px 40px; }
.legal h1 { font-family: var(--display); font-size: 32px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 6px; }
.legal h2 { font-size: 18px; font-weight: 700; margin: 30px 0 10px; }
.legal p, .legal li { color: var(--text-2); font-size: 15px; line-height: 1.7; }
.legal ul, .legal ol { padding-left: 22px; margin: 8px 0; }
.legal li { margin: 4px 0; }
.legal .note { padding: 14px 16px; border-radius: 12px; background: rgba(59, 130, 246, .08); border: 1px solid rgba(59, 130, 246, .2); font-size: 13.5px; color: var(--text-2); margin-top: 18px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent-deep); flex-shrink: 0; }
.check-row a { color: var(--accent); }

@media (max-width: 1100px) {
  .sp { grid-template-columns: 1fr; }
  .sp-side { position: static; padding: 8px; }
  .sp-shop { display: none; }
  .sp-nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .sp-nav::-webkit-scrollbar { display: none; }
  .sp-nav a.active { box-shadow: inset 0 -2px 0 var(--accent-deep); }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .sp-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .term-cols, .term-row { grid-template-columns: minmax(0, 1fr) 96px; padding: 0 14px; }
  .term-cols span:nth-child(2), .term-row .s { display: none; }
  .depth-row { grid-template-columns: 100px 1fr 28px; }
  .legal .card { padding: 22px 18px; }
  .legal h1 { font-size: 24px; }
  .sp-head h1 { font-size: 23px; }
  .kpi-row { gap: 10px; }
  .sp { margin-top: 18px; }
  .header-actions .theme-btn { width: 38px; height: 38px; }
}

@media (max-width: 1100px) { .sp-new { display: none; } }

/* сетка панели не должна растягиваться лентой вкладок */
@media (max-width: 1100px) { .sp { grid-template-columns: minmax(0, 1fr); } .sp-side, #spc { min-width: 0; } .sp-grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* ================= скидки, фото, уровни, промокоды, 2FA ================= */
.chip.sale { color: #fff; background: #ef4444; border-color: transparent; }
.old-price { font-family: var(--mono); font-size: 12.5px; color: var(--muted); text-decoration: line-through; }
.lot-cover.has-img { background: var(--surface-2); }
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.lot-card:hover .cover-img { transform: scale(1.04); }

.gallery { display: flex; flex-direction: column; gap: 10px; }
.g-main { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); cursor: zoom-in; padding: 0; }
.g-main img { width: 100%; height: 100%; object-fit: contain; }
.g-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.g-thumb { flex: 0 0 76px; height: 58px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; padding: 0; opacity: .7; transition: .2s; background: var(--surface-2); }
.g-thumb img { width: 100%; height: 100%; object-fit: cover; }
.g-thumb.active, .g-thumb:hover { border-color: var(--accent-deep); opacity: 1; }
.modal.modal-wide { max-width: min(1000px, 96vw); padding: 18px; }
.lightbox img { width: 100%; max-height: 78vh; object-fit: contain; border-radius: 14px; background: var(--surface-2); }

.promo-row { display: flex; gap: 8px; }
.promo-row .input { min-height: 42px; flex: 1; min-width: 0; font-family: var(--mono); letter-spacing: .05em; }
.promo-row .btn { height: 42px; }

.level-chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 7px; font-size: 11.5px; font-weight: 700;
  color: var(--lc); background: color-mix(in srgb, var(--lc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--lc) 35%, transparent); }
.level-card { border-color: color-mix(in srgb, var(--lc) 35%, var(--border)); }
.level-badge { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--lc) 85%, #fff), var(--lc)); box-shadow: 0 10px 24px -10px var(--lc); }
.lvl-bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.lvl-bar i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: linear-gradient(90deg, var(--accent-deep), var(--lc)); transition: width .8s var(--ease); }
.lvl-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.lvl-steps div { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); opacity: .55; }
.lvl-steps div.on { opacity: 1; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lc) 45%, transparent); }
.lvl-steps b { display: block; font-size: 13px; }
.lvl-steps span { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }

.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.img-tile { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.img-tile img { width: 100%; height: 100%; object-fit: cover; }
.img-tile .chip { position: absolute; top: 8px; left: 8px; z-index: 1; }
.img-actions { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; }
.img-actions .btn { height: 30px; padding: 0 8px; background: var(--panel); }
.img-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; color: var(--muted); border-style: dashed; border-width: 2px; transition: .2s; }
.img-add:hover { color: var(--accent); border-color: var(--accent-deep); }

.otp-input { font-family: var(--mono); font-size: 20px !important; letter-spacing: .35em; text-align: center; }
.tfa-setup { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.qr-box { width: 196px; height: 196px; padding: 8px; border-radius: 16px; background: #fff; flex-shrink: 0; display: grid; place-items: center; }
.qr-box svg { width: 100%; height: 100%; }
.backup-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.backup-codes span { font-family: var(--mono); font-weight: 600; text-align: center; padding: 10px; border-radius: 10px; background: var(--surface-2); letter-spacing: .08em; }

@media (max-width: 640px) {
  .g-main { border-radius: 18px; }
  .lvl-steps { grid-template-columns: repeat(2, 1fr); }
  .img-grid { grid-template-columns: repeat(3, 1fr); }
  .qr-box { margin: 0 auto; }
}

[hidden] { display: none !important; }

/* ================= личные сообщения ================= */
.dm { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; margin-top: 28px; height: calc(100vh - var(--header-h) - 120px); min-height: 520px; }
.dm-list { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.dm-list-head { padding: 18px 18px 12px; border-bottom: 1px solid var(--border); }
#dmItems { overflow-y: auto; flex: 1; padding: 6px; }
.dm-item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; transition: background .15s; }
.dm-item:hover { background: var(--surface-2); }
.dm-item.active { background: rgba(59, 130, 246, .12); }
.dm-item-body { flex: 1; min-width: 0; }
.dm-item-body b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.dm-conv { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.dm-conv .chat-body { flex: 1; }
.dm-back { display: none; width: 36px; height: 36px; }
.dm-lot { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.dm-warn { display: flex; align-items: center; gap: 8px; padding: 8px 18px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); }
.dm-warn svg { color: var(--success); flex-shrink: 0; }
.dm-risk { display: flex; gap: 6px; align-items: center; margin-top: 6px; padding: 6px 8px; border-radius: 8px; font-size: 11.5px; color: var(--danger); background: rgba(251, 113, 133, .1); }
.msg .meta .read { color: var(--accent); }

/* полоса Telegram-канала на главной */
.tg-band { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: 20px; background: var(--card-bg); border: 1px solid var(--border); transition: .2s; flex-wrap: wrap; }
.tg-band:hover { border-color: var(--border-2); transform: translateY(-2px); }
.tg-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #3ab8f5, #1d8fe0); flex-shrink: 0; }

@media (max-width: 820px) {
  .dm { grid-template-columns: 1fr; height: calc(100svh - var(--header-h) - 110px); margin-top: 14px; }
  .dm.has-open .dm-list { display: none; }
  .dm:not(.has-open) .dm-conv { display: none; }
  .dm-back { display: grid; }
}
@media (max-width: 640px) {
  .tg-band .btn { width: 100%; }
}

/* ================= личный кабинет ================= */
.cab { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; align-items: start; }
.cab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.cab-tile { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 16px; background: var(--card-bg); border: 1px solid var(--border); transition: .2s; }
.cab-tile:hover { border-color: var(--border-2); transform: translateY(-2px); }
.cab-tile b { display: block; font-size: 14.5px; }
.cab-tile span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.cab-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-2); color: var(--accent); }
.cab-tile.accent { border-color: rgba(59, 130, 246, .35); background: linear-gradient(135deg, rgba(59, 130, 246, .12), rgba(14, 165, 233, .06)), var(--card-bg); }
.cab-tile.accent .cab-ic { background: var(--grad); color: #fff; }

/* ================= реферальная программа ================= */
.ref-hero { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.ref-link { display: flex; gap: 8px; }
.ref-link .input { flex: 1; min-width: 0; font-size: 14px; }

@media (max-width: 1100px) { .cab { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .ref-link { flex-direction: column; }
  .ref-hero .qr-box { margin: 0 auto; }
  .cab-grid { grid-template-columns: 1fr; }
}

/* переключатель языка и блок «Внешний вид» */
.lang-btn { font-family: var(--mono); font-weight: 700; font-size: 12.5px; letter-spacing: .04em; color: var(--text-2); }
.lang-btn:hover { color: var(--text); }
.look-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.look-row .seg button { height: 34px; }
@media (max-width: 640px) { .look-row .seg { width: 100%; } .look-row .seg button { flex: 1; justify-content: center; padding: 0 6px; font-size: 12.5px; } }
