/* VindictaMarket: очень тёмный фиолет, стекло (полупрозрачные панели), ворон и снайперка как фирменные мотивы.
   Вся графика оригинальная (силуэты нарисованы кодом), это не арт игры. */

:root {
  --ink: #07040e;
  --glass: rgba(26, 15, 46, 0.58);
  --glass-hi: rgba(44, 26, 76, 0.66);
  --glass-solid: #150c26;
  --line: rgba(176, 132, 255, 0.16);
  --line-hi: rgba(176, 132, 255, 0.36);
  --bone: #efe9fa;
  --mute: #a99cc4;
  --accent: #8b4dff;
  --accent-hi: #a273ff;
  --accent-text: #c9a6ff;
  --moon: #dccaff;
  --rose: #ff6f93;
  --bad: #ff9a8a;
  --ok: #7bd4a0;
  --warn: #e8bd5a;
  --info: #82b4f0;

  --display: "Montserrat", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r: 10px;
  --gutter: clamp(14px, 3.5vw, 36px);
  --raven: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 64 64%27%3E%3Cpath fill-rule=%27evenodd%27 d=%27M3 59 C4 38 14 19 31 12.5 C37 10.3 43 10.5 47 12.5 C53 12.5 59 15.5 63 22 L50.5 26.5 C49.5 30.5 47 33.5 43.5 35.5 L48 41 L39.5 39.5 L43 46.5 L34 43 L36 51 L27 46.5 L27.5 56.5 L16 52 L14 59 Z M38.8 18.6 a2.5 2.5 0 1 0 5 0 a2.5 2.5 0 1 0 -5 0%27/%3E%3C/svg%3E");
  --bird: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 36 24%27%3E%3Cpath d=%27M1 14 C6 5 13 5 18 12 C23 5 30 5 35 14 C29 10 23 11 18 18 C13 11 7 10 1 14 Z%27/%3E%3C/svg%3E");
  --rifle: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 620 140%27%3E%3Cpath d=%27M6 70 L58 62 L70 56 L196 54 L196 78 L150 80 L132 118 L116 118 L112 92 L92 92 L82 124 L56 124 L48 98 L22 94 Z%27/%3E%3Cpath d=%27M196 58 H556 V67 H196 Z%27/%3E%3Cpath d=%27M552 52 H598 V73 H552 Z%27/%3E%3Cpath d=%27M206 40 H246 V58 H206 Z%27/%3E%3Cpath d=%27M330 40 H370 V58 H330 Z%27/%3E%3Cpath d=%27M196 22 H386 V40 H196 Z%27/%3E%3Cpath d=%27M386 24 L412 18 V44 L386 38 Z%27/%3E%3Cpath d=%27M196 24 L180 17 V45 L196 38 Z%27/%3E%3Cpath d=%27M150 46 H184 V53 H150 Z%27/%3E%3Cpath d=%27M236 66 V98 H262 L270 66 Z%27/%3E%3Cpath d=%27M300 67 L282 126 L290 128 L312 70 Z%27/%3E%3Cpath d=%27M330 67 L350 126 L358 124 L346 68 Z%27/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; }

body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background:
    radial-gradient(900px 600px at 88% -8%, rgba(125, 60, 230, 0.30), transparent 62%),
    radial-gradient(800px 600px at -8% 38%, rgba(70, 28, 140, 0.34), transparent 62%),
    radial-gradient(700px 500px at 60% 110%, rgba(110, 30, 90, 0.20), transparent 60%),
    var(--ink);
  background-attachment: fixed;
  color: var(--bone);
  font: 400 1rem/1.55 var(--body);
}

main { flex: 1; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }
a { color: var(--accent-text); }
a:hover { color: var(--bone); }
img { max-width: 100%; }

.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.muted { color: var(--mute); }
.small { font-size: 0.88rem; }
.num { font-variant-numeric: tabular-nums; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -48px; z-index: 100; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 6px; }
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--moon); outline-offset: 2px; }

/* ---------- Стекло ---------- */

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  backdrop-filter: blur(14px) saturate(1.25);
}

/* ---------- Шапка (компактная) ---------- */

.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(9, 5, 17, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 14px; min-height: 52px; }
.topbar-spacer { flex: 1; }

.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--bone); flex: none; }
.brand:hover { color: var(--bone); }
.brand-mark {
  width: 36px; height: 36px; flex: none;
  background: url("/logo-sm.png") center / contain no-repeat;
}
.brand-name { font-family: var(--display); font-size: 1.2rem; font-weight: 700; line-height: 1; letter-spacing: 0.01em; }
.brand-name span { color: var(--accent-text); }

.mainnav { display: flex; align-items: center; gap: 2px; }
.navlink {
  padding: 6px 11px; border-radius: 7px; color: var(--mute); text-decoration: none;
  font: 500 0.95rem/1.2 var(--body); white-space: nowrap; background: none; border: 0; cursor: pointer;
}
.navlink:hover { color: var(--bone); background: rgba(176, 132, 255, 0.1); }
.navlink[aria-current="page"] { color: var(--bone); background: rgba(139, 77, 255, 0.22); }

.top-search { position: relative; width: min(260px, 26vw); }
.top-search input { padding-left: 32px; }
.top-search::before {
  content: ""; position: absolute; left: 11px; top: 50%; width: 11px; height: 11px; translate: 0 -60%;
  border: 2px solid var(--mute); border-radius: 50%; pointer-events: none;
}
.top-search::after {
  content: ""; position: absolute; left: 21px; top: 50%; width: 6px; height: 2px; translate: 0 5px; rotate: 45deg;
  background: var(--mute); pointer-events: none;
}

.top-tools { display: flex; align-items: center; gap: 8px; }
.mini-select {
  padding: 5px 8px; background: rgba(176, 132, 255, 0.08); color: var(--bone);
  border: 1px solid var(--line); border-radius: 7px; font: 500 0.85rem/1.2 var(--body); cursor: pointer;
}
.mini-select:hover { border-color: var(--line-hi); }
.mini-select option { background: var(--glass-solid); color: var(--bone); }

.balance-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line-hi); background: rgba(139, 77, 255, 0.16); color: var(--bone);
  text-decoration: none; font: 600 0.9rem/1.2 var(--body); white-space: nowrap;
}
.balance-chip:hover { background: rgba(139, 77, 255, 0.3); color: #fff; }
.balance-chip .plus { position: relative; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); font-size: 0; line-height: 0; }
.balance-chip .plus::before, .balance-chip .plus::after { content: ""; position: absolute; left: 50%; top: 50%; background: #fff; border-radius: 1px; transform: translate(-50%, -50%); }
.balance-chip .plus::before { width: 10px; height: 2px; }
.balance-chip .plus::after { width: 2px; height: 10px; }

.avatar { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-hi); background: var(--glass-solid); object-fit: cover; }
.user-name { max-width: 13ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar.big { width: 44px; height: 44px; }
.avatar-empty { display: inline-block; }
.usermenu { position: relative; }
.user-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px 3px 4px; border-radius: 999px; cursor: pointer;
  background: var(--glass); border: 1px solid var(--line); color: var(--bone); font: 500 0.9rem/1.2 var(--body);
}
.user-btn:hover, .user-btn[aria-expanded="true"] { border-color: var(--line-hi); background: rgba(139, 77, 255, 0.18); }
.caret { width: 7px; height: 7px; border-right: 2px solid var(--mute); border-bottom: 2px solid var(--mute); transform: rotate(45deg) translateY(-2px); }
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 270px; padding: 8px; display: flex; flex-direction: column; gap: 2px;
  background: rgba(16, 10, 28, 0.96); border: 1px solid var(--line-hi); border-radius: 12px; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}
.menu-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; min-width: 0; }
.menu-head > div { display: flex; flex-direction: column; min-width: 0; }
.menu-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item {
  display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; color: var(--bone); text-decoration: none;
  background: none; border: 0; cursor: pointer; font: 500 0.95rem/1.2 var(--body);
}
.menu-item:hover { background: rgba(139, 77, 255, 0.2); color: #fff; }
.menu-item.danger { color: var(--bad); margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; padding-top: 12px; }
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; color: var(--mute); font-size: 0.9rem; }


.count-badge {
  display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; margin-left: 4px;
  border-radius: 10px; background: var(--accent); color: #fff; font-size: 0.78rem; font-weight: 600;
}

.banner { padding: 10px 0; background: rgba(255, 111, 147, 0.14); border-bottom: 1px solid rgba(255, 111, 147, 0.4); color: #ffd3dd; font-size: 0.95rem; }

/* ---------- Кнопки и поля ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0.6em 1.15em; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 8px;
  background: linear-gradient(180deg, var(--accent-hi), var(--accent) 55%, #6f33d9);
  color: #fff; font: 600 0.97rem/1.2 var(--body); text-decoration: none; cursor: pointer;
  box-shadow: 0 6px 22px -8px rgba(139, 77, 255, 0.7);
  transition: filter 0.15s, transform 0.1s;
}
.btn:hover { filter: brightness(1.12); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }
.btn.ghost { background: rgba(176, 132, 255, 0.07); border-color: var(--line-hi); color: var(--bone); box-shadow: none; }
.btn.ghost:hover { background: rgba(176, 132, 255, 0.18); filter: none; }
.btn.danger { background: rgba(255, 111, 147, 0.12); border-color: rgba(255, 111, 147, 0.5); color: #ffc2d0; box-shadow: none; }
.btn.danger:hover { background: rgba(255, 111, 147, 0.26); filter: none; }
.btn.small { padding: 0.38em 0.8em; font-size: 0.88rem; }
.btn.block { width: 100%; }

.link-btn {
  background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--bone);
  font: 500 0.95rem/1.2 var(--body); border-bottom: 1px solid transparent;
}
.link-btn:hover { border-bottom-color: var(--accent-text); }
a.link-btn { text-decoration: none; }

.field input, .field select, .field textarea, .input {
  width: 100%; padding: 0.55em 0.8em; background: rgba(8, 4, 16, 0.55); color: var(--bone);
  border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 0.95rem;
}
.field textarea { resize: vertical; min-height: 84px; }
.field select option { background: var(--glass-solid); color: var(--bone); }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent-hi);
}
.field.block { display: grid; gap: 6px; margin-top: 14px; }
.field.block > span { color: var(--mute); font-size: 0.88rem; }
.form-error { min-height: 1.3em; margin-top: 8px; color: var(--bad); font-size: 0.92rem; }
.form-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.form-row .field { flex: 1 1 140px; }

/* ---------- Верхний блок главной ---------- */

.hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center;
  min-height: calc(100vh - 62px); min-height: calc(100svh - 62px);
  padding-block: clamp(34px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}
.hero-inner { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.hero-inner { position: relative; }
.hero h1 { max-width: 18ch; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.08; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--accent-text); }
.lede { max-width: 54ch; margin-top: 16px; color: var(--mute); font-size: 1.1rem; }

/* прицел и снайперка: декоративный фон, не мешает чтению */
.hero { --ret: min(500px, 120vw); --ret-right: 3%; --ret-top: calc(var(--ret) / 2 - 6px); }
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  right: var(--ret-right); top: var(--ret-top); translate: 0 -50%; width: var(--ret); aspect-ratio: 1; border-radius: 50%;
}
.hero::before {
  background:
    linear-gradient(rgba(190, 150, 255, 0.28), rgba(190, 150, 255, 0.28)) center / 1px 100% no-repeat,
    linear-gradient(rgba(190, 150, 255, 0.28), rgba(190, 150, 255, 0.28)) center / 100% 1px no-repeat,
    repeating-radial-gradient(circle closest-side, transparent 0, transparent calc(25% - 1px), rgba(190, 150, 255, 0.2) calc(25% - 1px), rgba(190, 150, 255, 0.2) 25%);
}
.hero::after {
  background: repeating-conic-gradient(from -0.5deg, rgba(190, 150, 255, 0.5) 0 1deg, transparent 1deg 9deg);
  -webkit-mask-image: radial-gradient(circle closest-side, transparent 90%, #000 90.5%, #000 99%, transparent 99.5%);
  mask-image: radial-gradient(circle closest-side, transparent 90%, #000 90.5%, #000 99%, transparent 99.5%);
}
.hero-rifle {
  position: absolute; z-index: -1; pointer-events: none; right: 2%; bottom: 10px; width: min(560px, 90vw); aspect-ratio: 620 / 140;
  background: linear-gradient(90deg, transparent, rgba(167, 120, 255, 0.34));
  -webkit-mask: var(--rifle) center / contain no-repeat; mask: var(--rifle) center / contain no-repeat;
  rotate: -4deg;
}
.hero-raven {
  position: absolute; z-index: -1; pointer-events: none; top: var(--ret-top); translate: 0 -50%;
  width: calc(var(--ret) * 0.4); aspect-ratio: 1; right: calc(var(--ret-right) + var(--ret) * 0.3);
  background: url("/logo.png") center / contain no-repeat; opacity: 0.92;
}
.bird {
  position: absolute; z-index: -1; pointer-events: none; aspect-ratio: 36 / 24;
  background: rgba(201, 166, 255, 0.5);
  -webkit-mask: var(--bird) center / contain no-repeat; mask: var(--bird) center / contain no-repeat;
}
.bird.b1 { left: 52%; top: 18%; width: 30px; }
.bird.b2 { left: 60%; top: 34%; width: 20px; opacity: 0.7; }
.bird.b3 { left: 46%; top: 44%; width: 16px; opacity: 0.55; }
.bird.b4 { left: 68%; top: 12%; width: 14px; opacity: 0.5; }
.bird.b5 { left: 38%; top: 24%; width: 12px; opacity: 0.4; }

.route {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin: 38px 0 0; padding: 0; list-style: none;
}
.route li { display: grid; gap: 4px; align-content: start; padding: 16px 16px 14px; position: relative; }
.route strong { font-weight: 600; padding-left: 0; }
.route li > span:not(.route-n) { color: var(--mute); font-size: 0.9rem; }
.route-n {
  display: grid; place-items: center; width: 26px; height: 26px; margin-bottom: 6px;
  border: 1px solid var(--accent-text); border-radius: 50%; color: var(--accent-text); font-family: var(--display); font-size: 0.95rem;
}

/* ---------- Разделы страниц ---------- */

.page { padding-block: 26px 64px; }
.page > h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 18px; }
.section { padding-block: 34px 8px; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 20px; margin-bottom: 16px; }
.section-head h2 { font-size: 1.7rem; }
.count { color: var(--mute); font-size: 0.92rem; min-height: 1.4em; }

/* ---------- Фильтры и каталог ---------- */

.filters-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 12px; margin-bottom: 14px; }
.filters-bar .field { flex: 1 1 130px; min-width: 0; }
.filters-bar .field.grow { flex: 2 1 220px; }
.filters-bar label > span { display: block; margin-bottom: 4px; color: var(--mute); font-size: 0.78rem; letter-spacing: 0.02em; }
.filters-bar .btn { flex: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }

/* Каталог: фильтры слева у края экрана, сетка справа */
.shop-section { padding-inline: clamp(12px, 1.6vw, 24px); padding-top: 84px; }
.shop-head { margin-bottom: 12px; }
.shop { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.shop-side { position: sticky; top: 74px; }
.shop-side .filters-bar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; margin-bottom: 0; padding: 14px; }
.shop-side .filters-bar .field, .shop-side .filters-bar .field.grow { flex: none; }
.shop-side .filters-bar .btn { width: 100%; }
.shop-main .count { margin-top: 0; }
.shop .card-body { padding: 9px 11px 11px; gap: 6px; }
.shop .card-title { font-size: 0.98rem; }
.shop .price { font-size: 1.15rem; }

.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 14px 0 0; padding: 0; list-style: none; }
.perks li { display: grid; gap: 4px; padding: 14px 16px; }
.perks strong { font-weight: 600; color: var(--accent-text); }
.perks li > span { color: var(--mute); font-size: 0.9rem; }
.scroll-hint {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; padding: 12px 22px;
  border: 1px solid var(--accent-hi); border-radius: 999px; background: rgba(139, 77, 255, 0.22);
  color: #fff; font: 600 1.05rem/1.2 var(--display); text-decoration: none;
  box-shadow: 0 8px 28px -10px rgba(139, 77, 255, 0.9);
}
.scroll-hint:hover { background: var(--accent); color: #fff; }
.scroll-hint .arrow { display: inline-block; font-size: 1.3em; line-height: 1; }
@media (prefers-reduced-motion: no-preference) {
  .scroll-hint .arrow { animation: hint-bounce 1.4s ease-in-out infinite; }
}
@keyframes hint-bounce { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(4px); } }

.card {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: var(--bone);
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--r);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: border-color 0.15s, transform 0.15s, background-color 0.15s;
}
.card:hover { border-color: var(--accent-hi); background: var(--glass-hi); color: var(--bone); transform: translateY(-2px); }
.thumb {
  position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3;
  background: radial-gradient(circle at 50% 42%, rgba(120, 70, 210, 0.45), rgba(20, 10, 36, 0.2) 72%);
}
.thumb img { max-width: 82%; max-height: 82%; object-fit: contain; }
.thumb-fallback {
  width: 56px; height: 56px; background: url("/logo-sm.png") center / contain no-repeat; opacity: 0.35;
}
.card-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 12px 14px 14px; }
.card-title { font: 500 1rem/1.3 var(--body); overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 1px 8px; border: 1px solid var(--line-hi); border-radius: 999px; color: var(--mute); font-size: 0.78rem; }
.tag.hot { border-color: var(--accent-hi); color: var(--accent-text); }
.card-foot { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; }
.price { display: block; font-family: var(--display); font-weight: 700; font-size: 1.4rem; line-height: 1.1; color: var(--moon); }
.stock { display: block; color: var(--mute); font-size: 0.8rem; }
.sel-mark {
  position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line-hi); background: rgba(8, 4, 16, 0.6);
}
.card.selectable { cursor: pointer; text-align: left; font: inherit; padding: 0; }
.card.selectable.on { border-color: var(--accent-hi); box-shadow: 0 0 0 1px var(--accent-hi), 0 8px 28px -10px rgba(139, 77, 255, 0.8); }
.card.selectable.on .sel-mark { background: var(--accent); border-color: var(--accent-hi); }
.card.selectable.on .sel-mark::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; rotate: 45deg; }
.card.selectable.off { opacity: 0.5; cursor: not-allowed; }

.skeleton { min-height: 280px; border-radius: var(--r); border: 1px solid var(--line); background: var(--glass); }
.empty { grid-column: 1 / -1; padding: 36px 20px; text-align: center; border: 1px dashed var(--line-hi); border-radius: var(--r); color: var(--mute); }
.empty strong { display: block; margin-bottom: 4px; color: var(--bone); font-family: var(--display); font-weight: 400; font-size: 1.25rem; }

.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 22px; color: var(--mute); }

/* ---------- Страница предмета ---------- */

.item-layout { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 22px; align-items: start; }
.item-art { padding: 14px; }
.item-art .thumb { aspect-ratio: 1; border-radius: 8px; }
.item-title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.1; overflow-wrap: anywhere; }
.item-head { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 10px; }
.panel { padding: 18px; }
.panel + .panel, .panel + h2 + .panel { margin-top: 14px; }
.panel h2 { font-size: 1.35rem; margin-bottom: 12px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 0; }
.kv dt { color: var(--mute); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.big-price { font-family: var(--display); font-weight: 700; font-size: 2.2rem; color: var(--moon); line-height: 1.1; }

.data-table, .admin-table { width: 100%; border-collapse: collapse; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--glass); }
.data-table th, .data-table td, .admin-table th, .admin-table td { padding: 10px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.data-table th, .admin-table th { color: var(--mute); font-weight: 500; font-size: 0.85rem; white-space: nowrap; }
.data-table tr:last-child td, .admin-table tr:last-child td { border-bottom: 0; }
.data-table .r, .admin-table .num { text-align: right; white-space: nowrap; }
.seller { display: inline-flex; align-items: center; gap: 8px; }
.seller img { width: 22px; height: 22px; border-radius: 50%; }
.pos { color: var(--ok); }
.neg { color: var(--bad); }

/* ---------- Профиль и кошелёк ---------- */

.subtabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.subtab {
  padding: 9px 15px; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: var(--mute); font: 500 0.95rem/1.2 var(--body); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.subtab:hover { color: var(--bone); }
.subtab[aria-current="page"] { color: var(--bone); border-bottom-color: var(--accent-hi); }

.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.profile-head img { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--line-hi); }
.profile-head h1 { font-size: 1.9rem; }

.balances { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 18px; }
.bal { padding: 16px 18px; }
.bal-label { display: block; color: var(--mute); font-size: 0.88rem; }
.bal-value { display: block; margin-top: 2px; font-family: var(--display); font-weight: 700; font-size: 2.1rem; line-height: 1.15; color: var(--moon); }
.bal.frozen .bal-value { color: #b9a6dd; }
.bal-note { display: block; margin-top: 4px; color: var(--mute); font-size: 0.82rem; }

.methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 6px 0 4px; }
.method {
  display: grid; gap: 2px; padding: 12px 14px; text-align: left; cursor: pointer; color: var(--bone);
  background: rgba(8, 4, 16, 0.45); border: 1px solid var(--line); border-radius: 9px; font: inherit;
}
.method:hover { border-color: var(--line-hi); }
.method[aria-pressed="true"] { border-color: var(--accent-hi); background: rgba(139, 77, 255, 0.2); box-shadow: 0 0 0 1px var(--accent-hi); }
.method strong { font-weight: 600; }
.method span { color: var(--mute); font-size: 0.82rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip {
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--mute);
  font: 600 0.85rem/1.2 var(--body); cursor: pointer;
}
.chip:hover { border-color: var(--line-hi); color: var(--bone); }
.chip[aria-pressed="true"] { background: rgba(139, 77, 255, 0.25); border-color: var(--accent-hi); color: #fff; }
.preview { margin-top: 12px; padding: 12px 14px; border-radius: 9px; background: rgba(139, 77, 255, 0.12); border: 1px dashed var(--line-hi); }
.preview strong { color: var(--moon); font-family: var(--display); font-size: 1.4rem; font-weight: 400; }
.notice { padding: 12px 14px; border-radius: 9px; background: rgba(232, 189, 90, 0.1); border: 1px solid rgba(232, 189, 90, 0.4); color: #f1dba4; font-size: 0.92rem; }
.info-box { padding: 12px 14px; border-radius: 9px; background: rgba(130, 180, 240, 0.09); border: 1px solid rgba(130, 180, 240, 0.35); color: #cfe0f7; font-size: 0.92rem; }
.info-grid { align-items: stretch; }
.info-grid > .panel { margin: 0; height: 100%; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.stack > * + * { margin-top: 14px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

.list { display: grid; gap: 10px; }
.item-row {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 4px 14px; align-items: center; padding: 10px 12px;
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--r);
}
.item-row .order-thumb { grid-row: span 2; }
.order-thumb { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 8px; background: rgba(120, 70, 210, 0.28); }
.order-thumb img { max-width: 90%; max-height: 90%; object-fit: contain; }
.order-name { font-weight: 500; overflow-wrap: anywhere; }
.order-meta { color: var(--mute); font-size: 0.86rem; display: flex; flex-wrap: wrap; gap: 3px 14px; align-items: center; grid-column: 2; }
.item-row .row-end { grid-row: span 2; grid-column: 3; display: grid; gap: 6px; justify-items: end; }

.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-ok { color: var(--ok); }
.status-warn { color: var(--warn); }
.status-info { color: var(--info); }
.status-bad { color: var(--bad); }
.status-muted { color: var(--mute); }

.sell-bar {
  position: sticky; bottom: 10px; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 16px; padding: 12px 16px; background: rgba(21, 12, 38, 0.92); border: 1px solid var(--line-hi); border-radius: var(--r);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}

/* ---------- Окна и уведомления ---------- */

dialog {
  width: min(480px, calc(100vw - 28px)); padding: 0; color: var(--bone);
  background: rgba(20, 11, 36, 0.92); border: 1px solid var(--line-hi); border-radius: 14px;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(139, 77, 255, 0.12);
}
dialog::backdrop { background: rgba(4, 2, 9, 0.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog.wide { width: min(720px, calc(100vw - 28px)); }
.dialog-body { padding: 22px; }
.dialog-body h2 { font-size: 1.55rem; margin-bottom: 10px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.buy-name { font-weight: 500; font-size: 1.1rem; overflow-wrap: anywhere; }
.buy-price { margin: 4px 0 10px; font-family: var(--display); font-weight: 700; font-size: 1.9rem; color: var(--moon); }

.toasts { position: fixed; right: 14px; bottom: 14px; z-index: 80; display: grid; gap: 8px; width: min(380px, calc(100vw - 28px)); }
.toast {
  padding: 11px 14px; background: rgba(28, 16, 50, 0.94); border: 1px solid var(--line-hi);
  border-left: 4px solid var(--info); border-radius: 9px; box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.toast-ok { border-left-color: var(--ok); }
.toast-warn { border-left-color: var(--warn); }
.toast-bad { border-left-color: var(--bad); }

.footer { padding-block: 26px; border-top: 1px solid var(--line); color: var(--mute); font-size: 0.88rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; }
.footer a { color: var(--mute); }
.footer a:hover { color: var(--bone); }

/* ---------- Юридические страницы ---------- */

.legal { max-width: 760px; padding-block: 36px 72px; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 22px; }
.legal h2 { margin: 30px 0 8px; font-size: 1.35rem; }
.legal p, .legal li { color: #ddd5ea; }
.legal p + p, .legal p + ul, .legal p + ol { margin-top: 10px; }
.legal ul, .legal ol { margin: 8px 0 0; padding-left: 1.3em; }
.legal li + li { margin-top: 6px; }
.nav { display: flex; align-items: center; gap: 16px; margin-left: auto; }

/* ---------- Админка ---------- */

.admin { padding-block: 28px 72px; }
.admin h1 { font-size: 2.1rem; margin-bottom: 18px; }
.admin h2 { font-size: 1.4rem; margin: 30px 0 12px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.tab {
  padding: 9px 16px; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: var(--mute); font: 500 0.95rem/1.2 var(--body); cursor: pointer;
}
.tab:hover { color: var(--bone); }
.tab[aria-current="page"] { color: var(--bone); border-bottom-color: var(--accent-hi); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.stat { padding: 13px 15px; background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); }
.stat-label { display: block; color: var(--mute); font-size: 0.86rem; }
.stat-value { display: block; margin-top: 2px; font-family: var(--display); font-weight: 700; font-size: 1.9rem; line-height: 1.15; }
.stat.bad { border-color: var(--bad); }
.stat.bad .stat-value { color: var(--bad); }
.admin-table { min-width: 640px; }
.admin-table tr.attn td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.cell-sub { display: block; color: var(--mute); font-size: 0.82rem; overflow-wrap: anywhere; }
.cell-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.filters .field { width: min(280px, 100%); }
.price-form { display: flex; gap: 8px; align-items: center; }
.price-form input { width: 112px; padding: 0.4em 0.6em; background: rgba(8, 4, 16, 0.6); color: var(--bone); border: 1px solid var(--line-hi); border-radius: 7px; font: inherit; }
.price-form input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.admin .empty { grid-column: auto; }

/* ---------- Адаптивность ---------- */

@media (max-width: 980px) {
  .shop { grid-template-columns: 1fr; }
  .shop-side { position: static; }
  .top-search { display: none; }
  .item-layout { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .topbar-inner { flex-wrap: wrap; row-gap: 4px; padding-block: 6px; }
  .mainnav { order: 5; flex-basis: 100%; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .route { grid-template-columns: 1fr 1fr; }
  .perks { grid-template-columns: 1fr; }
  .hero { --ret-right: -55%; }
  .hero::before, .hero::after { opacity: 0.5; }
  .hero-rifle { opacity: 0.5; right: -20%; }
  .hero-raven { opacity: 0.5; }
  .user-name { display: none; }
  .menu-pop { width: min(270px, calc(100vw - 24px)); }
}
@media (max-width: 520px) {
  .route { grid-template-columns: 1fr; }
  .brand-name { font-size: 1.2rem; }
  .item-row { grid-template-columns: 44px 1fr; }
  .item-row .row-end { grid-row: auto; grid-column: 1 / -1; justify-items: start; }
  .balance-chip .lbl { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-body { padding: 10px; }
  .price { font-size: 1.2rem; }
}

/* ---------- Движение ---------- */

@media (prefers-reduced-motion: no-preference) {
  @keyframes lock-ticks { from { opacity: 0; transform: rotate(-50deg) scale(1.08); } to { opacity: 1; transform: none; } }
  @keyframes lock-rings { from { opacity: 0; transform: scale(1.16); } to { opacity: 1; transform: none; } }
  @keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
  @keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  @keyframes drift { from { transform: translate(0, 0); } 50% { transform: translate(-14px, 6px); } to { transform: translate(0, 0); } }
  .hero::before { animation: lock-rings 2.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero::after { animation: lock-ticks 3.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .bird { animation: drift 7s ease-in-out infinite; }
  .bird.b2 { animation-duration: 9s; } .bird.b3 { animation-duration: 6s; } .bird.b4 { animation-duration: 11s; } .bird.b5 { animation-duration: 8s; }
  dialog[open] { animation: pop 0.18s ease-out; }
  .toast { animation: pop 0.2s ease-out; }
  .skeleton {
    background: linear-gradient(100deg, rgba(26, 15, 46, 0.58) 30%, rgba(60, 36, 104, 0.6) 50%, rgba(26, 15, 46, 0.58) 70%);
    background-size: 200% 100%; animation: shimmer 1.6s linear infinite;
  }
}
.admin .panel h2 { margin-top: 0; }

/* ---------- Отправка скинов: таймер приёма обмена ---------- */
.deposit-state h2 { margin-bottom: 12px; }
.deposit-state.st-done { border-color: rgba(123, 212, 160, 0.5); }
.deposit-state.st-failed, .deposit-state.st-partial { border-color: rgba(255, 154, 138, 0.5); }
.deposit-timer { margin: 4px 0 16px; }
.timer-num { font: 700 3.2rem/1 var(--display); letter-spacing: 0.02em; color: var(--moon); font-variant-numeric: tabular-nums; }
.deposit-timer.low .timer-num { color: var(--bad); }
.timer-bar { height: 6px; margin: 12px 0 8px; border-radius: 999px; background: rgba(139, 77, 255, 0.18); overflow: hidden; }
.timer-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7a3fe0, #b084ff); transition: width 1s linear; }
.deposit-timer.low .timer-bar span { background: linear-gradient(90deg, #ff6f93, #ff9a8a); }
.steps-list { margin: 0 0 14px; padding-left: 1.3em; color: var(--mute); display: grid; gap: 6px; }
.steps-list li::marker { color: var(--accent-text); font-weight: 700; }
.deposit-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.change-list { margin: 8px 0 0; padding-left: 1.2em; display: grid; gap: 6px; color: var(--bone); }

/* Панель «Выбрать все» над карточками инвентаря: отступы от заметки сверху и от карточек снизу */
.inv-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin: 20px 0 24px; }

/* ---------- Юридические страницы ---------- */
.legal-docs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.legal-docs a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--mute); text-decoration: none; font-size: 0.92rem; background: var(--glass); }
.legal-docs a:hover { color: var(--bone); border-color: var(--line-hi); }
.legal-docs a[aria-current="page"] { color: var(--bone); background: rgba(139, 77, 255, 0.24); border-color: var(--line-hi); }
.legal-meta { margin-bottom: 18px; }
.legal-meta p { color: var(--mute); }
.legal-toc { margin: 0 0 8px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--glass); }
.legal-toc strong { display: block; margin-bottom: 8px; }
.legal-toc ol { margin: 0; padding-left: 1.4em; columns: 2 260px; column-gap: 28px; }
.legal-toc li { break-inside: avoid; margin: 3px 0; }
.legal-toc a { color: var(--accent-text); text-decoration: none; }
.legal-toc a:hover { text-decoration: underline; }
.legal h3 { margin: 22px 0 6px; font-size: 1.1rem; }
.legal h2 { scroll-margin-top: 72px; }
.legal p { overflow-wrap: anywhere; }
.legal a { color: var(--accent-text); }
.legal ul + p, .legal ul + h3, .legal p + h3 { margin-top: 12px; }

/* ---------- График цен ---------- */
.chart-svg { width: 100%; height: auto; display: block; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-label { fill: var(--mute); font: 9px var(--body); }
.chart-line { fill: none; stroke: var(--accent-text); stroke-width: 2; stroke-linejoin: round; }
.chart-area { fill: rgba(139, 77, 255, 0.16); stroke: none; }
.chart-dot { fill: var(--accent-text); }
.chart-sale { fill: var(--bone); stroke: var(--accent); stroke-width: 2; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }
.chart-legend i { display: inline-block; vertical-align: middle; margin-right: 6px; }
.lg-line { width: 18px; height: 3px; border-radius: 2px; background: var(--accent-text); }
.lg-sale { width: 10px; height: 10px; border-radius: 50%; background: var(--bone); border: 2px solid var(--accent); }

.chart-wrap { position: relative; }
.chart-tip {
  position: absolute; z-index: 3; pointer-events: none; min-width: 150px; padding: 8px 11px; border-radius: 9px;
  background: var(--glass-solid); border: 1px solid var(--accent-hi); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  font-size: 0.85rem; line-height: 1.4; transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap;
}
.chart-tip[hidden] { display: none; }
.chart-tip b { display: block; font-size: 1rem; color: var(--bone); }
.chart-tip .tip-kind { color: var(--accent-text); font-weight: 600; }
.chart-tip .tip-meta { color: var(--mute); }
.chart-dot, .chart-sale { cursor: pointer; }
.chart-hit { fill: transparent; cursor: pointer; }

/* ---------- Колокольчик уведомлений ---------- */
.bell-wrap { position: relative; }
.bell-btn {
  position: relative; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; cursor: pointer;
  border: 1px solid var(--line-hi); border-radius: 50%; background: rgba(139, 77, 255, 0.12); color: var(--bone);
}
.bell-btn:hover { background: rgba(139, 77, 255, 0.28); }
.bell-icon { width: 16px; height: 16px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22a2.5 2.5 0 0 0 2.4-1.8h-4.8A2.5 2.5 0 0 0 12 22zm7-6.5V11a7 7 0 0 0-5.5-6.8V3.5a1.5 1.5 0 0 0-3 0v.7A7 7 0 0 0 5 11v4.5L3 17.5V19h18v-1.5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22a2.5 2.5 0 0 0 2.4-1.8h-4.8A2.5 2.5 0 0 0 12 22zm7-6.5V11a7 7 0 0 0-5.5-6.8V3.5a1.5 1.5 0 0 0-3 0v.7A7 7 0 0 0 5 11v4.5L3 17.5V19h18v-1.5z'/%3E%3C/svg%3E") center / contain no-repeat; }
.bell-badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: var(--accent); color: #fff; font: 700 0.7rem/18px var(--body); text-align: center; border: 2px solid #0c0616; box-sizing: content-box;
}
.bell-pop { background: var(--glass-solid); position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: min(380px, calc(100vw - 24px)); border-radius: var(--r); overflow: hidden; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.bell-list { max-height: min(420px, 70vh); overflow-y: auto; }
.bell-item { display: grid; gap: 3px; padding: 11px 14px; text-decoration: none; color: var(--bone); border-bottom: 1px solid var(--line); }
.bell-item:hover { background: rgba(139, 77, 255, 0.14); color: var(--bone); }
.bell-item.unread { background: rgba(139, 77, 255, 0.1); box-shadow: inset 3px 0 0 var(--accent); }
.bell-item span { color: var(--mute); font-size: 0.88rem; }
.check-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- Карточки: значок цены и «сердечко» ---------- */
.card-cell { position: relative; display: flex; }
.card-cell > .card { flex: 1; min-width: 0; }
.deal-badge {
  position: absolute; left: 8px; top: 8px; z-index: 2; padding: 3px 8px; border-radius: 999px; pointer-events: none;
  background: rgba(46, 160, 100, 0.92); color: #fff; font: 700 0.74rem/1.3 var(--body); letter-spacing: 0.01em;
}
.fav-btn {
  position: absolute; right: 8px; top: 8px; z-index: 2; width: 32px; height: 32px; padding: 0; cursor: pointer; display: grid; place-items: center;
  border: 1px solid var(--line-hi); border-radius: 50%; background: rgba(12, 6, 22, 0.7); color: var(--bone);
}
.fav-btn::before {
  content: ""; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.4 2.7 5 6 5c2 0 3.4 1 4.2 2.3h3.6C14.6 6 16 5 18 5c3.3 0 5.1 3.4 3.6 6.8C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.4 2.7 5 6 5c2 0 3.4 1 4.2 2.3h3.6C14.6 6 16 5 18 5c3.3 0 5.1 3.4 3.6 6.8C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.6;
}
.fav-btn:hover { background: rgba(139, 77, 255, 0.4); }
.fav-btn[aria-pressed="true"] { color: #ff6aa0; border-color: #ff6aa0; }
.fav-btn[aria-pressed="true"]::before { opacity: 1; }
.subhead { margin: 22px 0 12px; font-size: 1.2rem; }

/* ---------- Блок доверия и вопросы ---------- */
.trust { padding-block: 28px 0; }
.recent { padding: 16px 18px; }
.recent h2 { font-size: 1.2rem; margin-bottom: 8px; }
.recent-list { display: grid; }
.recent-item { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--bone); }
.recent-item:last-child { border-bottom: 0; }
.recent-item:hover .recent-name { color: var(--accent-text); }
.recent-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.faq { padding-block: 34px 40px; display: grid; gap: 10px; }
.faq h2 { font-size: 1.7rem; margin-bottom: 4px; }
.faq-item { padding: 0; }
.faq-item summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent-text); font-size: 1.3rem; line-height: 1; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item.is-closing summary::after { transform: none; }
.faq-body { overflow: hidden; }
.faq-item p { padding: 0 18px 12px; margin: 0; line-height: 1.6; }
.faq-item p:last-child { padding-bottom: 16px; }

/* ---------- Страницы после оплаты ---------- */
.pay-card { max-width: 560px; margin: 40px auto; padding: 34px 28px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.pay-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font: 700 2rem/1 var(--display); border: 2px solid; }
.pay-card.ok .pay-icon { color: #5fd49a; border-color: #5fd49a; background: rgba(46, 160, 100, 0.15); }
.pay-card.bad .pay-icon { color: var(--bad); border-color: var(--bad); background: rgba(255, 90, 100, 0.12); }
.pay-status { min-height: 1.4em; color: var(--accent-text); font-weight: 600; }
.pay-status.done { color: #5fd49a; font-size: 1.15rem; }

/* Баннер cookie */
.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 14px 18px; background: var(--glass-solid); border: 1px solid var(--line-hi); border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.cookie-bar p { margin: 0; font-size: 14px; line-height: 1.45; }
.cookie-bar .btn { flex: none; }
@media (max-width: 560px) { .cookie-bar { flex-direction: column; align-items: stretch; } }

/* Статус подтверждения почты */
.email-status { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 2px 0 12px; }
.email-badge { font-size: 0.82rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-hi); color: var(--mute); }
.email-badge.ok { color: var(--ok); border-color: var(--ok); }
.email-badge.pending { color: var(--warn); border-color: var(--warn); }

.tg-panel .small a { margin-left: 4px; }

/* Помощь: обращения */
.help .faq { margin: 18px 0 26px; }
.help .faq h2 { margin-bottom: 12px; }
.help textarea { width: 100%; resize: vertical; }
.ticket-list { display: grid; gap: 8px; }
.ticket-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; }
.ticket-row:hover { border-color: var(--line-hi); }
.ticket-title { flex: 1 1 200px; font-weight: 600; overflow-wrap: anywhere; }
.tag.ticket-answered { color: var(--ok); border-color: var(--ok); }
.tag.ticket-open { color: var(--warn); border-color: var(--warn); }
.thread { display: grid; gap: 10px; margin: 14px 0; }
.msg { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; }
.msg.admin { border-color: var(--line-hi); background: rgba(139, 77, 255, 0.10); }
.msg-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.msg p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.recent-section { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); }

/* ---------- Нижняя навигация (телефон) ---------- */
.bottomnav { display: none; }
@media (max-width: 860px) {
  .bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: flex; justify-content: space-around; align-items: stretch;
    background: var(--glass-solid); border-top: 1px solid var(--line);
    padding: 4px max(4px, env(safe-area-inset-left)) calc(4px + env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-right));
  }
  body { padding-bottom: calc(54px + env(safe-area-inset-bottom)); }
  .cookie-bar { bottom: calc(16px + 54px + env(safe-area-inset-bottom)); }
}
.bn-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 6px 2px; color: var(--mute); text-decoration: none; font-size: 0.68rem; line-height: 1.1; min-width: 0;
}
.bn-item .bn-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bn-item[aria-current="page"] { color: var(--accent-text); }
.bn-icon { width: 20px; height: 20px; background: currentColor; -webkit-mask-position: center; mask-position: center; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: contain; mask-size: contain; }
.bn-icon-home { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3.2 3 10.5V21h6v-6h6v6h6V10.5L12 3.2Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3.2 3 10.5V21h6v-6h6v6h6V10.5L12 3.2Z'/%3E%3C/svg%3E"); }
.bn-icon-search { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.5 3a7.5 7.5 0 1 0 4.66 13.4l5.47 5.47 1.41-1.41-5.47-5.47A7.5 7.5 0 0 0 10.5 3Zm0 2a5.5 5.5 0 1 1 0 11 5.5 5.5 0 0 1 0-11Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.5 3a7.5 7.5 0 1 0 4.66 13.4l5.47 5.47 1.41-1.41-5.47-5.47A7.5 7.5 0 0 0 10.5 3Zm0 2a5.5 5.5 0 1 1 0 11 5.5 5.5 0 0 1 0-11Z'/%3E%3C/svg%3E"); }
.bn-icon-help { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm.1 15.5h-1.9v-1.9h1.9v1.9Zm1.63-6.14c-.5.5-.78.82-.78 1.64h-1.9v-.45c0-1.05.5-1.63 1.15-2.28.5-.5.84-.83.84-1.46 0-.72-.6-1.21-1.4-1.21-.77 0-1.33.4-1.56 1.1l-1.72-.72C8.8 6.63 9.98 5.6 11.99 5.6c1.95 0 3.4 1.2 3.4 2.9 0 1.1-.56 1.68-1.66 2.76Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm.1 15.5h-1.9v-1.9h1.9v1.9Zm1.63-6.14c-.5.5-.78.82-.78 1.64h-1.9v-.45c0-1.05.5-1.63 1.15-2.28.5-.5.84-.83.84-1.46 0-.72-.6-1.21-1.4-1.21-.77 0-1.33.4-1.56 1.1l-1.72-.72C8.8 6.63 9.98 5.6 11.99 5.6c1.95 0 3.4 1.2 3.4 2.9 0 1.1-.56 1.68-1.66 2.76Z'/%3E%3C/svg%3E"); }
.bn-icon-wallet { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 7H5a1 1 0 0 1 0-2h13V3H5a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h16v-6h-5a4 4 0 0 1 0-8h5V7h-5a2 2 0 0 0 0 4h5v4h-5a4 4 0 0 1 0-8Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 7H5a1 1 0 0 1 0-2h13V3H5a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h16v-6h-5a4 4 0 0 1 0-8h5V7h-5a2 2 0 0 0 0 4h5v4h-5a4 4 0 0 1 0-8Z'/%3E%3C/svg%3E"); }
.bn-icon-profile { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-4.4 0-9 2.2-9 5v3h18v-3c0-2.8-4.6-5-9-5Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-4.4 0-9 2.2-9 5v3h18v-3c0-2.8-4.6-5-9-5Z'/%3E%3C/svg%3E"); }
.bn-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.bn-item[aria-current="page"] .bn-avatar { outline: 2px solid var(--accent-text); }

/* ---------- Калькулятор инвентаря, оповещения по цене, публичное избранное ---------- */
.field-row { display: flex; gap: 10px; flex-wrap: wrap; }
.field-row .input { flex: 1 1 260px; }
.calc-summary { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.calc-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.calc-total { font-family: var(--display); font-size: 1.6rem; color: var(--moon); }
.alert-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.alert-form .input.small { width: 110px; padding: 6px 10px; }
.pubfav-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pubfav-row .input { flex: 1 1 260px; font-family: ui-monospace, monospace; font-size: 0.85rem; }

/* ---------- Конфетти при успешной покупке (уважает prefers-reduced-motion) ---------- */
.confetti-box { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.confetti-piece {
  position: absolute; top: -12px; width: 8px; height: 14px; opacity: 0.9; border-radius: 2px;
  animation-name: confetti-fall; animation-timing-function: cubic-bezier(.2,.6,.3,1); animation-fill-mode: forwards;
}
@keyframes confetti-fall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--drift), 100vh) rotate(var(--rot)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .confetti-box { display: none; }
}

/* Админка: график продаж */
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.chart-ctl { display: flex; gap: 6px; flex-wrap: wrap; }
.chart-bars { display: flex; align-items: flex-end; gap: 2px; height: 180px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.chart-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; }
.chart-bar { display: block; width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; opacity: 0.85; }
.chart-col:hover .chart-bar { opacity: 1; background: var(--moon); }
.chart-axis { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.8rem; color: var(--mute); }

/* ---------- P2P-сделка: шаги, таймер, спор ---------- */
.deal-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.order-thumb.big { width: 84px; height: 84px; flex: none; border-radius: 12px; }
.deal-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: deal; }
.deal-steps li { position: relative; padding-top: 28px; text-align: center; font-size: 0.82rem; color: var(--mute); }
.deal-steps li::before { content: ""; position: absolute; top: 8px; left: 0; right: 0; height: 2px; background: var(--line-hi); }
.deal-steps li:first-child::before { left: 50%; }
.deal-steps li:last-child::before { right: 50%; }
.deal-steps .dot { position: absolute; top: 2px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--ink); border: 2px solid var(--line-hi); z-index: 1; }
.deal-steps li.done { color: var(--bone); }
.deal-steps li.done::before { background: var(--ok); }
.deal-steps li.done .dot { background: var(--ok); border-color: var(--ok); }
.deal-steps li.now { color: var(--moon); }
.deal-steps li.now .dot { border-color: var(--accent-hi); box-shadow: 0 0 0 4px rgba(162, 115, 255, 0.28); }
.deal-timer { margin: 4px 0 8px; padding: 12px 14px; border-radius: 10px; background: rgba(139, 77, 255, 0.1); border: 1px solid var(--line-hi); }
.deal-timer .timer-num { font-size: 2.2rem; }
.deal-timer.low .timer-num { color: var(--bad); }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form .input { flex: 1 1 220px; min-width: 0; }
.plain-list { margin: 6px 0 0; padding-left: 1.2em; display: grid; gap: 4px; }
.dsp-msgs { display: grid; gap: 8px; margin: 8px 0 12px; max-height: 360px; overflow: auto; }
.dsp-msg { padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.dsp-msg.dsp-admin { border-color: var(--accent-hi); background: rgba(139, 77, 255, 0.12); }
.dsp-msg.dsp-system { color: var(--mute); font-style: italic; }
.dsp-meta { font-size: 0.78rem; color: var(--mute); margin-bottom: 2px; }
.dsp-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.dsp-form { display: grid; gap: 8px; }
.dsp-form textarea { width: 100%; }
.dispute-panel { border-color: rgba(255, 154, 138, 0.35); }
.seller-panel .subhead { margin: 14px 0 6px; font-size: 1rem; }
@media (max-width: 520px) {
  .deal-steps li { font-size: 0.7rem; }
  .deal-head { flex-direction: column; align-items: flex-start; }
}
.seller-panel { grid-column: 1 / -1; }
.seller-panel p { margin: 6px 0; }
.seller-panel .dialog-actions { margin: 10px 0; }
.dsp-form .btn { justify-self: start; }

/* ---------- Цена продавца, рейтинг, страница продавца ---------- */
.stars { display: inline-flex; align-items: center; gap: 2px; vertical-align: middle; }
.stars .star { color: var(--line-hi); font-size: 1.05rem; line-height: 1; }
.stars .star.on { color: #ffcf5c; }
.stars .stars-text { margin-left: 8px; font-size: 0.85rem; color: var(--mute); }
.stars.small .star { font-size: 0.85rem; }
.stars.small .stars-text { margin-left: 6px; font-size: 0.75rem; }
a.seller { color: inherit; text-decoration: none; }
a.seller:hover { color: var(--moon); }
td .seller { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.price-editor { display: grid; gap: 8px; }
.price-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.price-fields .field input.bad { border-color: var(--bad); }
.price-rec { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.9rem; }
.price-hint { margin: 0; min-height: 1.2em; color: var(--mute); }
.price-hint.ok { color: var(--ok); }
.price-hint.warn { color: #ffcf5c; }
.price-hint.neg { color: var(--bad); }
.price-fee { margin: 0; }
.price-total { margin: 12px 0 0; font-weight: 600; }
.price-pair strong { color: var(--moon); }
.sell-rows { display: grid; gap: 12px; margin: 12px 0; max-height: 52vh; overflow: auto; padding-right: 4px; }
.sell-row { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.03); }
.sell-row-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sell-row-head .order-thumb { width: 40px; height: 40px; }
.seller-hero { display: grid; gap: 18px; grid-template-columns: 1fr minmax(220px, 320px); align-items: center; margin-bottom: 8px; }
.seller-id { display: flex; gap: 16px; align-items: center; }
.avatar-lg { width: 72px; height: 72px; border-radius: 50%; background: rgba(120, 70, 210, 0.3); flex: none; object-fit: cover; }
.rating-dist { display: grid; gap: 4px; }
.dist-row { display: grid; grid-template-columns: 34px 1fr 28px; gap: 8px; align-items: center; font-size: 0.85rem; }
.dist-bar { display: block; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.dist-bar > span { display: block; height: 100%; background: #ffcf5c; }
.section-title { margin: 28px 0 12px; }
.reviews { display: grid; gap: 10px; }
.review { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); }
.review-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.review-text { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.rating-input { display: flex; align-items: center; gap: 4px; margin: 8px 0 12px; }
.star-btn { background: none; border: 0; padding: 2px 4px; font-size: 1.9rem; line-height: 1; cursor: pointer; color: var(--line-hi); transition: transform 0.12s, color 0.12s; }
.star-btn.on { color: #ffcf5c; }
.star-btn:hover { transform: scale(1.15); }
.rating-input .muted { margin-left: 10px; }
@media (max-width: 760px) { .seller-hero { grid-template-columns: 1fr; } .price-fields { grid-template-columns: 1fr; } }


/* =====================================================================
   Визуальное обновление (ветка feature/visual-upgrade): эффекты живут в fx.js.
   Всё движение выключается при prefers-reduced-motion, наклон и магнит только для мыши.
   ===================================================================== */

/* ---------- Hero: живой фон, параллакс, кольцо ---------- */
.hero { --px: 0; --py: 0; --rx: 0; --ry: 0; }
.hero-fx { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero-glow { position: absolute; border-radius: 50%; will-change: transform; }
.hero-glow.g1 { width: min(720px, 60vw); aspect-ratio: 1; left: -14%; top: -22%; background: radial-gradient(circle closest-side, rgba(139, 77, 255, 0.34), transparent); translate: calc(var(--px) * -34px) calc(var(--py) * -22px); }
.hero-glow.g2 { width: min(620px, 52vw); aspect-ratio: 1; right: 6%; bottom: -26%; background: radial-gradient(circle closest-side, rgba(110, 45, 210, 0.32), transparent); translate: calc(var(--px) * 28px) calc(var(--py) * 18px); }
.hero-glow.g3 { width: min(460px, 42vw); aspect-ratio: 1; left: 34%; top: 30%; background: radial-gradient(circle closest-side, rgba(180, 120, 255, 0.16), transparent); translate: calc(var(--px) * -18px) calc(var(--py) * 14px); }
.hero-particles { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-ring-glow {
  position: absolute; z-index: -1; pointer-events: none; right: var(--ret-right); top: var(--ret-top); width: var(--ret); aspect-ratio: 1; border-radius: 50%;
  translate: calc(var(--rx) * var(--ret) * 0.02) calc(-50% + var(--ry) * var(--ret) * 0.02);
  background: radial-gradient(circle closest-side, transparent 58%, rgba(139, 77, 255, 0.26) 90%, transparent 100%);
  box-shadow: 0 0 90px rgba(139, 77, 255, 0.32); opacity: 0; transition: opacity 0.5s ease;
}
.hero.ring-hot .hero-ring-glow { opacity: 1; }
/* кольцо, снайперка, ворон и птицы слегка смещаются за курсором (--px/--py и --rx/--ry задаёт fx.js) */
.hero::before, .hero::after { translate: calc(var(--rx) * var(--ret) * 0.02) calc(-50% + var(--ry) * var(--ret) * 0.02); }
.hero-raven { translate: calc(var(--rx) * var(--ret) * 0.02) calc(-50% + var(--ry) * var(--ret) * 0.02); transition: filter 0.5s ease; }
.hero.ring-hot .hero-raven { filter: drop-shadow(0 0 18px rgba(167, 120, 255, 0.65)); }
.hero::after { transition: filter 0.4s ease; }
.hero.ring-hot::after { filter: brightness(1.7); }
.hero-rifle { translate: calc(var(--px) * -16px) calc(var(--py) * -7px); }
.bird { translate: calc(var(--px) * -24px) calc(var(--py) * -11px); }
.bird.b3, .bird.b5 { translate: calc(var(--px) * -10px) calc(var(--py) * -5px); }

@media (prefers-reduced-motion: no-preference) {
  @keyframes ring-spin { from { rotate: 0deg; } to { rotate: 360deg; } }
  @keyframes glow-a { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(7vw, 5vh, 0) scale(1.14); } }
  @keyframes glow-b { 0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); } 50% { transform: translate3d(-8vw, -4vh, 0) scale(0.92); } }
  @keyframes glow-c { 0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.8; } 50% { transform: translate3d(5vw, -6vh, 0); opacity: 1; } }
  .hero::after { animation: lock-ticks 3.6s cubic-bezier(0.2, 0.7, 0.2, 1) both, ring-spin 150s linear infinite; }
  .hero-glow.g1 { animation: glow-a 42s ease-in-out infinite; }
  .hero-glow.g2 { animation: glow-b 54s ease-in-out infinite; }
  .hero-glow.g3 { animation: glow-c 36s ease-in-out infinite; }
}

/* ---------- Появление страниц и переход каталог -> предмет ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes page-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  .page-in { animation: page-in 0.38s cubic-bezier(0.2, 0.8, 0.2, 1); }
  ::view-transition-group(item-art) { animation-duration: 0.5s; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.28s; }
}
.item-art .thumb { view-transition-name: item-art; }

/* ---------- Карточки ---------- */
.card { position: relative; box-shadow: 0 0 0 0 rgba(139, 77, 255, 0); }
.card:hover { box-shadow: 0 0 0 1px rgba(162, 115, 255, 0.45), 0 18px 44px -20px rgba(139, 77, 255, 0.85); }
.card-cell { transition: opacity 0.5s ease; }
/* блик за курсором и подсветка границы там, где курсор */
.card::after {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.25s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(224, 206, 255, 0.17), transparent 62%);
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity 0.25s;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(206, 176, 255, 0.95), transparent 62%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.card-cell.is-tilt .card::after, .card-cell.is-tilt .card::before { opacity: 1; }

/* единый размер изображений, мягкое свечение под предметом, увеличение при наведении */
.thumb { aspect-ratio: 1; overflow: hidden; isolation: isolate; }
.thumb::before {
  content: ""; position: absolute; z-index: 0; left: 50%; bottom: 9%; width: 68%; height: 20%; translate: -50% 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(168, 112, 255, 0.8), transparent); filter: blur(9px); opacity: 0.55; transition: opacity 0.3s, scale 0.3s;
}
.thumb img {
  position: relative; z-index: 1; width: 82%; height: 82%; max-width: none; max-height: none; object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(60, 18, 140, 0.55)); transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s;
}
.thumb-fallback { position: relative; z-index: 1; }
.card:hover .thumb img { transform: scale(1.09) translateY(-2%); }
.card:hover .thumb::before { opacity: 1; scale: 1.18; }
.thumb.is-loading img { opacity: 0; }
.thumb.is-loading::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(100deg, rgba(26, 15, 46, 0.4) 30%, rgba(80, 48, 140, 0.5) 50%, rgba(26, 15, 46, 0.4) 70%); background-size: 200% 100%; }

/* цена заметнее */
.price { font-size: 1.5rem; color: #fff; text-shadow: 0 0 18px rgba(162, 115, 255, 0.55); letter-spacing: -0.01em; }
.shop .price { font-size: 1.32rem; }
.card-foot { border-top: 1px solid var(--line); margin-top: auto; padding-top: 9px; }

/* скидка */
.deal-badge { box-shadow: 0 4px 14px -4px rgba(46, 160, 100, 0.7); font-variant-numeric: tabular-nums; }
.deal-badge.inline { position: static; display: inline-block; }
.deal-badge.counting { filter: brightness(1.2); }

/* «сердечко» */
.fav-btn { transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s; }
.fav-btn[aria-pressed="true"] { background: rgba(255, 106, 160, 0.18); box-shadow: 0 0 14px -2px rgba(255, 106, 160, 0.6); }
.fav-burst { position: absolute; inset: 0; pointer-events: none; }
.fav-burst i { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: #ff6aa0; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes heart-pop { 0% { transform: scale(0.5); } 45% { transform: scale(1.55); } 100% { transform: scale(1); } }
  @keyframes fav-spark { from { transform: rotate(var(--a)) translateY(-8px) scale(1); opacity: 1; } to { transform: rotate(var(--a)) translateY(-27px) scale(0.2); opacity: 0; } }
  .fav-btn.pop::before { animation: heart-pop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1); }
  .fav-burst i { animation: fav-spark 0.65s ease-out forwards; }

  /* появление карточек и 3D-наклон (только для мыши) */
  .card-cell.enter { opacity: 0; translate: 0 18px; transition: opacity 0.5s ease var(--d, 0ms), translate 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) var(--d, 0ms), transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .card-cell.enter.in { opacity: 1; translate: 0 0; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .tilt { transform: perspective(900px) rotateX(calc(var(--ny, 0) * -9deg)) rotateY(calc(var(--nx, 0) * 9deg)); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .tilt.is-tilt, .card-cell.enter.is-tilt { transition: transform 0.08s linear; will-change: transform; }
  .item-art.tilt { transform: perspective(1200px) rotateX(calc(var(--ny, 0) * -5deg)) rotateY(calc(var(--nx, 0) * 5deg)); }
}

/* блик на большом изображении предмета */
.item-art { position: relative; overflow: hidden; }
.item-art::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.25s; background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(224, 206, 255, 0.14), transparent 62%); }
.item-art.is-tilt::after { opacity: 1; }

/* ---------- Боковая панель: теги, сброс, счётчик ---------- */
.filters-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: 1 1 100%; }
.filters-head strong { font: 700 1rem/1 var(--display); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 1 1 220px; }
.found-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 12px; min-height: 30px; }
.found-row .count { min-height: 0; margin: 0; font-weight: 600; color: var(--bone); }
.ftags { display: flex; flex-wrap: wrap; gap: 6px; }
.ftag {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 6px 4px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--accent-hi); background: rgba(139, 77, 255, 0.18); color: var(--bone); font: 500 0.82rem/1.2 var(--body);
  transition: background 0.15s, border-color 0.15s;
}
.ftag:hover { background: rgba(139, 77, 255, 0.34); border-color: var(--moon); }
.ftag i { position: relative; width: 16px; height: 16px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); flex: none; }
.ftag i::before, .ftag i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 1.5px; margin: -0.75px 0 0 -4px; background: currentColor; border-radius: 1px; rotate: 45deg; }
.ftag i::after { rotate: -45deg; }
.shop-results.busy .grid { opacity: 0.55; transition: opacity 0.2s; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes tag-in { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }
  @keyframes count-bump { 0% { transform: scale(1); color: var(--moon); } 40% { transform: scale(1.08); color: #fff; } 100% { transform: scale(1); } }
  .ftag { animation: tag-in 0.2s ease-out; }
  .count.bump { animation: count-bump 0.45s ease-out; transform-origin: left center; }
}

/* ---------- Заметная кнопка покупки ---------- */
.buy-xl {
  position: relative; overflow: hidden; width: 100%; margin-top: 16px; padding: 0.95em 1.4em; border-radius: 12px; font-size: 1.15rem; letter-spacing: 0.01em;
  box-shadow: 0 10px 34px -10px rgba(139, 77, 255, 0.95), 0 0 0 1px rgba(206, 176, 255, 0.25) inset;
}
.buy-xl:disabled { box-shadow: none; }
.buy-xl:not(:disabled)::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%); translate: -120% 0; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes buy-sheen { 0%, 55% { translate: -120% 0; } 100% { translate: 120% 0; } }
  @keyframes buy-glow { 0%, 100% { box-shadow: 0 10px 34px -10px rgba(139, 77, 255, 0.85), 0 0 0 1px rgba(206, 176, 255, 0.25) inset; } 50% { box-shadow: 0 12px 42px -8px rgba(160, 100, 255, 1), 0 0 0 1px rgba(206, 176, 255, 0.4) inset; } }
  .buy-xl:not(:disabled) { animation: buy-glow 3.2s ease-in-out infinite; }
  .buy-xl:not(:disabled)::after { animation: buy-sheen 4.2s ease-in-out infinite; }
}

/* ---------- Страница предмета ---------- */
.item-hero { display: grid; grid-template-columns: minmax(280px, 1.05fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.item-art { padding: 18px; position: sticky; top: 74px; }
.item-art .thumb { aspect-ratio: 1; border-radius: 12px; }
.item-art .thumb img { width: 88%; height: 88%; }
.item-info { min-width: 0; }
.buy-panel { margin-top: 16px; padding: 22px; }
.price-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 2px; }
.big-price { font-size: clamp(2.4rem, 4.6vw, 3.3rem); color: #fff; text-shadow: 0 0 26px rgba(162, 115, 255, 0.6); }
.buy-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; }
.buy-note { margin-top: 10px; }
.section-title { margin: 30px 0 12px; font-size: 1.5rem; }
.item-page .panel + .section-title { margin-top: 30px; }
.item-page > .panel { margin-top: 22px; }
.kv.specs { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.spec { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(8, 4, 16, 0.35); }
.spec dt { font-size: 0.8rem; }
.spec dd { margin-top: 2px; font-weight: 600; }

.pill { display: inline-flex; align-items: center; padding: 2px 9px; border: 1px solid; border-radius: 999px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: rgba(123, 212, 160, 0.5); background: rgba(123, 212, 160, 0.1); }
.pill.hot { color: var(--accent-text); border-color: var(--accent-hi); background: rgba(139, 77, 255, 0.18); }
.pill.muted { color: var(--mute); border-color: var(--line-hi); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }

.offers-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 16px; margin-top: 30px; }
.offers-head .section-title { margin: 0 0 12px; }
.offers-head .seg { margin-bottom: 12px; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line-hi); border-radius: 999px; background: rgba(8, 4, 16, 0.45); }
.seg button { padding: 6px 14px; border: 0; border-radius: 999px; background: none; color: var(--mute); font: 600 0.85rem/1.2 var(--body); cursor: pointer; transition: background 0.2s, color 0.2s; }
.seg button:hover { color: var(--bone); }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.offers-table .seller { gap: 10px; }
.offers-table .seller img, .seller-ph { width: 28px; height: 28px; border-radius: 50%; flex: none; }
.seller-ph { background: var(--glass-solid); border: 1px solid var(--line-hi); }
.seller-ph.shop { background: url("/logo-sm.png") center / 72% no-repeat var(--glass-solid); }
.seller-name { display: grid; line-height: 1.2; }
.seller-name small { font-size: 0.76rem; }
.offer-price { font-family: var(--display); font-size: 1.1rem; color: var(--moon); }
.offers-table tr.is-best td { background: rgba(139, 77, 255, 0.1); }
.offers-table tr { transition: background 0.15s; }
.offers-table tbody tr:hover td { background: rgba(139, 77, 255, 0.14); }
@media (prefers-reduced-motion: no-preference) {
  @keyframes rows-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  .offers-table tbody.swap tr { animation: rows-in 0.3s ease-out both; }
  .offers-table tbody.swap tr:nth-child(2) { animation-delay: 0.04s; } .offers-table tbody.swap tr:nth-child(3) { animation-delay: 0.08s; }
  .offers-table tbody.swap tr:nth-child(4) { animation-delay: 0.12s; } .offers-table tbody.swap tr:nth-child(n+5) { animation-delay: 0.16s; }
}

/* ---------- Интерактивный график ---------- */
.chart-stats { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 12px; }
.cstat { display: grid; }
.cstat b { font: 700 1.15rem/1.2 var(--display); }
.chart-svg { touch-action: pan-y; cursor: crosshair; border-radius: 8px; }
.chart-svg:focus-visible { outline: 2px solid var(--moon); outline-offset: 4px; }
.chart-dot, .chart-sale { cursor: crosshair; pointer-events: none; }
.chart-cross { stroke: var(--accent-text); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0; pointer-events: none; }
.chart-ring { fill: rgba(139, 77, 255, 0.28); stroke: var(--moon); stroke-width: 2; opacity: 0; pointer-events: none; }
.chart-svg.is-hover .chart-cross, .chart-svg.is-hover .chart-ring { opacity: 1; }
.chart-tip { display: grid; gap: 2px; min-width: 170px; }
.chart-tip .tip-date { color: var(--mute); font-size: 0.78rem; letter-spacing: 0.02em; }
.chart-tip .tip-kind.sale { margin-top: 4px; }
.chart-tip .tip-delta { font-size: 0.82rem; font-weight: 600; }
.chart-hint { margin-left: auto; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes chart-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  @keyframes chart-fade { from { opacity: 0; } to { opacity: 1; } }
  .chart-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: chart-draw 1.1s cubic-bezier(0.3, 0.6, 0.2, 1) 0.15s forwards; }
  .chart-area, .chart-dot, .chart-sale { animation: chart-fade 0.7s ease-out 0.5s both; }
}

/* ---------- Умные скелетоны (появляются только при задержке загрузки) ---------- */
.sk { border-radius: 8px; background: rgba(36, 21, 64, 0.7); }
@media (prefers-reduced-motion: no-preference) {
  .sk, .sk-card { background-image: linear-gradient(100deg, transparent 30%, rgba(120, 76, 210, 0.28) 50%, transparent 70%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
  .thumb.is-loading::after { animation: shimmer 1.4s linear infinite; }
}
.sk-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background-color: var(--glass); }
.sk-thumb { aspect-ratio: 1; border-radius: 0; }
.sk-body { display: grid; gap: 10px; padding: 12px 14px 16px; }
.sk-line { height: 14px; }
.sk-line.tall { height: 22px; margin-top: 8px; }
.sk-line.xl { height: 30px; }
.sk-line.w80 { width: 80%; } .sk-line.w50 { width: 50%; } .sk-line.w35 { width: 35%; } .sk-line.w25 { width: 25%; margin-bottom: 14px; }
.sk-side { height: 430px; border-radius: var(--r); }
.sk-hero { padding-block: clamp(48px, 9vw, 120px); border-bottom: 1px solid var(--line); }
.sk-hero .wrap { display: grid; gap: 16px; }
.sk-art { aspect-ratio: 1; border-radius: var(--r); }
.sk-col { display: grid; gap: 16px; align-content: start; }
.sk-btn { height: 58px; border-radius: 12px; }
.sk-panel { height: 150px; margin-top: 22px; border-radius: var(--r); }
.sk-chart { height: 280px; margin-top: 22px; border-radius: var(--r); }

/* ---------- Премиальные уведомления ---------- */
.toasts { pointer-events: none; }
.toast {
  --tone: var(--info); pointer-events: auto; position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 12px; padding: 13px 12px 16px 14px;
  border: 1px solid color-mix(in srgb, var(--tone) 38%, var(--line)); border-left-width: 1px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(40, 22, 70, 0.96), rgba(20, 11, 36, 0.97));
  box-shadow: 0 18px 44px -16px rgba(0, 0, 0, 0.8), 0 0 32px -14px var(--tone);
}
.toast-ok { --tone: var(--ok); } .toast-warn { --tone: var(--warn); } .toast-bad { --tone: var(--bad); } .toast-info { --tone: var(--info); }
.toast-icon { position: relative; width: 32px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--tone) 18%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 45%, transparent); }
.toast-icon::before { content: ""; position: absolute; inset: 7px; background: var(--tone); -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.toast-info .toast-icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm1 15h-2v-6h2v6Zm0-8h-2V7h2v2Z'/%3E%3C/svg%3E"); }
.toast-ok .toast-icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2Z'/%3E%3C/svg%3E"); }
.toast-warn .toast-icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1 21h22L12 2 1 21Zm12-3h-2v-2h2v2Zm0-4h-2v-4h2v4Z'/%3E%3C/svg%3E"); }
.toast-bad .toast-icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm4.2 12.8-1.4 1.4-2.8-2.8-2.8 2.8-1.4-1.4 2.8-2.8-2.8-2.8 1.4-1.4 2.8 2.8 2.8-2.8 1.4 1.4-2.8 2.8 2.8 2.8Z'/%3E%3C/svg%3E"); }
.toast-text { display: grid; gap: 1px; min-width: 0; padding-top: 1px; }
.toast-text strong { font: 700 0.92rem/1.25 var(--display); }
.toast-text span { color: #d9cdef; font-size: 0.9rem; line-height: 1.35; overflow-wrap: anywhere; }
.toast-x { position: relative; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--mute); cursor: pointer; }
.toast-x:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.toast-x::before, .toast-x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.6px; margin: -0.8px 0 0 -5.5px; background: currentColor; border-radius: 1px; rotate: 45deg; }
.toast-x::after { rotate: -45deg; }
.toast-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--tone); transform-origin: left; opacity: 0.85; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes toast-in { from { opacity: 0; transform: translateX(26px) scale(0.94); } to { opacity: 1; transform: none; } }
  @keyframes toast-out { to { opacity: 0; transform: translateX(26px) scale(0.94); } }
  @keyframes toast-life { from { transform: scaleX(1); } to { transform: scaleX(0); } }
  @keyframes toast-icon-pop { 0% { transform: scale(0.4); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }
  .toast { animation: toast-in 0.42s cubic-bezier(0.2, 1.1, 0.3, 1); }
  .toast.out { animation: toast-out 0.26s ease-in forwards; }
  .toast-icon { animation: toast-icon-pop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) 0.1s backwards; }
  .toast-bar { animation: toast-life var(--life) linear forwards; }
  .toast.paused .toast-bar { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) { .toast-bar { display: none; } }
@media (max-width: 860px) { .toasts { bottom: calc(14px + 58px + env(safe-area-inset-bottom)); } }

/* ---------- Адаптивность обновления ---------- */
@media (max-width: 980px) {
  .item-hero { grid-template-columns: 1fr; }
  .item-art { position: static; max-width: 520px; width: 100%; margin-inline: auto; }
}
@media (max-width: 520px) {
  .buy-panel { padding: 16px; }
  .chart-hint { display: none; }
  .toast { padding-right: 8px; }
}

/* Боковая панель: кнопка сброса не растягивается, пара полей цены не получает фиксированную высоту */
.shop-side .filters-bar .filters-head { flex: none; }
.shop-side .filters-bar .filters-head .btn { width: auto; }
.shop-side .filters-bar .field-pair { flex: none; }


/* =====================================================================
   Правки: анимации страниц «Информация» и «Частые вопросы», документов,
   окна уведомлений и списка отслеживаемых
   ===================================================================== */

.item-row { transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), max-height 0.38s ease, margin 0.38s ease, padding 0.38s ease, border-color 0.3s; }
.item-row.leaving { overflow: hidden; opacity: 0; transform: translateX(28px); max-height: 0 !important; margin-block: 0; padding-block: 0; border-width: 0; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes pop-in { from { opacity: 0; transform: translateY(-8px) scale(0.96); } to { opacity: 1; transform: none; } }
  @keyframes pop-out { to { opacity: 0; transform: translateY(-6px) scale(0.97); } }
  @keyframes bell-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-7deg); } 75% { transform: rotate(3deg); } }
  @keyframes badge-pop { 0% { transform: scale(0.4); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

  /* страницы «Информация» и «Частые вопросы»: заголовок и блоки появляются по очереди */
  :is(.info-grid, .faq, .help .two-col) > :nth-child(1) { --n: 0; } :is(.info-grid, .faq, .help .two-col) > :nth-child(2) { --n: 1; }
  :is(.info-grid, .faq, .help .two-col) > :nth-child(3) { --n: 2; } :is(.info-grid, .faq, .help .two-col) > :nth-child(4) { --n: 3; }
  :is(.info-grid, .faq, .help .two-col) > :nth-child(5) { --n: 4; } :is(.info-grid, .faq, .help .two-col) > :nth-child(6) { --n: 5; }
  :is(.info-grid, .faq, .help .two-col) > * { animation: rise 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--n, 0) * 70ms + 90ms); }
  .info-grid, .faq { --n: 0; }
  .page > h1, .help > p.muted { animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .help > p.muted { animation-delay: 0.05s; }
  .help .faq > h2 { animation-delay: 0.04s; }

  /* окно уведомлений: плавное открытие и закрытие, элементы появляются по очереди */
  .bell-pop { transform-origin: top right; }
  .bell-pop.pop-in { animation: pop-in 0.26s cubic-bezier(0.2, 1, 0.3, 1); }
  .bell-pop.out { animation: pop-out 0.17s ease-in forwards; pointer-events: none; }
  .bell-pop.pop-in .bell-item { animation: rise 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .bell-pop.pop-in .bell-item:nth-child(1) { animation-delay: 0.06s; } .bell-pop.pop-in .bell-item:nth-child(2) { animation-delay: 0.1s; }
  .bell-pop.pop-in .bell-item:nth-child(3) { animation-delay: 0.14s; } .bell-pop.pop-in .bell-item:nth-child(4) { animation-delay: 0.18s; }
  .bell-pop.pop-in .bell-item:nth-child(n+5) { animation-delay: 0.22s; }
  .bell-item { transition: background 0.2s, box-shadow 0.2s; }
  .bell-btn.ring .bell-icon { animation: bell-ring 0.9s ease-in-out; transform-origin: 50% 12%; }
  .bell-btn.ring .bell-badge { animation: badge-pop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1); }

  /* документы (Условия, Конфиденциальность, Возврат): плавный переход между страницами и появление блоков */
  @view-transition { navigation: auto; }
  .legal-docs { view-transition-name: legal-docs; }
  .legal > h1, .legal-meta, .legal-toc { animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .legal > h1 { animation-delay: 0.04s; } .legal-meta { animation-delay: 0.09s; } .legal-toc { animation-delay: 0.14s; }
  .legal-docs a { transition: color 0.2s, background 0.2s, border-color 0.2s; }
}


/* Блоки ниже первого экрана (FAQ на главной) появляются при прокрутке, а не при загрузке страницы */
@media (prefers-reduced-motion: no-preference) {
  .faq.reveal > * { animation: none; }
  .rv { opacity: 0; translate: 0 18px; transition: opacity 0.5s ease var(--d, 0ms), translate 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) var(--d, 0ms); }
  .rv.in { opacity: 1; translate: 0 0; }
}
.sell-row-head .order-thumb { overflow: hidden; border-radius: 8px; flex: none; }
.sell-row-head .order-thumb img, .sell-row-head .order-thumb .thumb-fallback { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Вкладка «Steam-подключение» ---------- */
.steam-tab { display: grid; gap: 16px; }
.st-hero { border-color: var(--line-hi); background: linear-gradient(160deg, rgba(139, 77, 255, 0.16), var(--glass) 60%); }
.st-hero h2 { margin-bottom: 6px; }
.st-guarantee { margin: 14px 0; padding: 14px 16px; border-radius: 12px; background: rgba(123, 212, 160, 0.08); border: 1px solid rgba(123, 212, 160, 0.35); }
.st-guarantee h3 { margin: 0 0 8px; color: var(--ok); font-size: 1.02rem; }
.st-guarantee .plain-list { margin: 0; }
.st-guarantee .plain-list li { margin: 6px 0; }
.st-status { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 8px; }
.st-status li { display: flex; gap: 10px; align-items: flex-start; }
.st-dot { flex: 0 0 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; background: rgba(232, 189, 90, 0.16); color: var(--warn); }
.st-status li.ok .st-dot { background: rgba(123, 212, 160, 0.18); color: var(--ok); }
.st-step { position: relative; }
.st-step.done { border-color: rgba(123, 212, 160, 0.4); }
.st-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.st-head h3 { margin: 0; }
.st-num { flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--accent); color: #fff; box-shadow: 0 0 18px rgba(139, 77, 255, 0.5); }
.st-step.done .st-num { background: var(--ok); color: #07040e; box-shadow: 0 0 18px rgba(123, 212, 160, 0.4); }
.st-list { margin: 10px 0 12px; padding-left: 22px; display: grid; gap: 8px; }
.st-list li::marker { color: var(--accent-text); font-weight: 700; }
.st-list a { overflow-wrap: anywhere; }
.st-code { display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; }
.st-code code { padding: 3px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); font-size: 0.9em; user-select: all; }
.st-tip { margin: 10px 0; }
@media (max-width: 560px) { .st-code { display: flex; margin: 6px 0 0; flex-wrap: wrap; } }

/* ===== Предупреждения: яркие, красные, чтобы их невозможно было не заметить ===== */
:root { --alert: #ff3b4e; --alert-hi: #ff6b78; }
.notice {
  position: relative; padding: 14px 16px 14px 52px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 59, 78, 0.24), rgba(255, 59, 78, 0.10));
  border: 1.5px solid var(--alert); color: #ffe6e9; font-size: 0.95rem; font-weight: 600; line-height: 1.45;
  box-shadow: 0 0 0 3px rgba(255, 59, 78, 0.12), 0 10px 28px -12px rgba(255, 59, 78, 0.75);
}
.notice::before {
  content: "!"; position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%; background: var(--alert); color: #fff;
  font: 800 16px/26px var(--body); text-align: center; box-shadow: 0 0 12px rgba(255, 59, 78, 0.8);
}
.notice a { color: #fff; text-decoration: underline; }
.notice strong { color: #fff; }
.btn.danger {
  background: linear-gradient(180deg, #ff4d5f, #d71c33); border-color: #ff8a96; color: #fff; font-weight: 700;
  box-shadow: 0 8px 24px -8px rgba(255, 59, 78, 0.9);
}
.btn.danger:hover { background: linear-gradient(180deg, #ff6272, #e5233a); filter: none; color: #fff; }
.price-hint.warn, .price-hint.neg { color: var(--alert-hi); font-weight: 700; }
.form-error { color: var(--alert-hi); font-weight: 600; }

/* Ордера покупателей */
.bid-panel { margin-top: 16px; padding: 16px 18px; display: grid; gap: 10px; }
.bid-panel h2 { margin: 0; font-size: 1.05rem; }
.bid-book { display: grid; gap: 4px; }
.bid-level { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.bid-form { display: flex; gap: 8px; flex-wrap: wrap; }
.bid-form .input { flex: 1 1 120px; min-width: 0; }
.bid-hint { margin: 8px 0 0; color: var(--muted); }
.bid-hint.hit { color: var(--ok); font-weight: 600; }
.list-row.glass { display: flex; align-items: center; gap: 12px; padding: 12px 14px; flex-wrap: wrap; }
.list-row .grow { flex: 1 1 200px; min-width: 0; }
.st-browsers { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 10px; }
.tg-qr-box { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.03); }
.tg-qr { width: 200px; height: 200px; border-radius: 10px; background: #fff; image-rendering: pixelated; flex: none; }
.tg-qr-text { flex: 1 1 220px; min-width: 0; display: grid; gap: 6px; }
.tg-qr-text p { margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat-grid .stat { padding: 14px 16px; }
.stat-grid .stat-v { font-size: 1.35rem; font-weight: 700; }

/* Вкладка «Информация»: интерактивные карточки */
.hub-ready-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hub-ready-head h2 { margin: 0; }
.hub-bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin: 12px 0; }
.hub-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--ok)); transition: width 0.6s ease; }
.hub-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.hub-check { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; transition: transform 0.15s, border-color 0.15s, background 0.15s; }
.hub-check:hover { transform: translateY(-2px); border-color: var(--accent-hi); background: rgba(139, 77, 255, 0.1); }
.hub-check span:last-child { display: grid; gap: 2px; }
.hub-mark { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; }
.hub-check.ok .hub-mark { background: rgba(123, 212, 160, 0.18); color: var(--ok); }
.hub-check.todo { border-color: rgba(255, 59, 78, 0.45); }
.hub-check.todo .hub-mark { background: rgba(255, 59, 78, 0.2); color: var(--alert-hi); }
.hub-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.hub-tile { display: grid; gap: 2px; padding: 14px 16px; color: inherit; text-decoration: none; transition: transform 0.15s, border-color 0.15s; }
.hub-tile:hover { transform: translateY(-3px); border-color: var(--accent-hi); }
.hub-tile-v { font-size: 1.5rem; font-weight: 700; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; align-items: start; margin-top: 12px; }
.about-item { display: grid; gap: 0; }
.about-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; text-align: left; color: inherit; cursor: pointer; font: inherit; transition: transform 0.15s, border-color 0.15s; }
.about-card:hover { transform: translateY(-2px); border-color: var(--accent-hi); }
.about-card[aria-expanded="true"] { border-color: var(--accent-hi); background: rgba(139, 77, 255, 0.12); }
.about-icon { font-size: 1.6rem; flex: none; }
.about-title { display: grid; gap: 2px; flex: 1; min-width: 0; }
.about-chev { transition: transform 0.2s; }
.about-card[aria-expanded="true"] .about-chev { transform: rotate(180deg); }
.about-body { padding: 12px 16px 4px; animation: aboutIn 0.2s ease; }
.about-body p { margin: 0 0 8px; }
@keyframes aboutIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .about-body, .hub-bar span { animation: none; transition: none; } }
.tg-qr-text .st-code { display: flex; flex-wrap: wrap; margin-left: 0; }
.tg-qr-text .st-code code { overflow-wrap: anywhere; }

/* Страница «Информация» */
.info-page { display: grid; gap: 28px; }
.info-hero { padding: clamp(22px, 4vw, 40px); background: radial-gradient(900px 300px at 85% -20%, rgba(139, 77, 255, 0.35), transparent 60%), var(--glass); }
.info-hero h1 { margin: 0 0 10px; font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.15; }
.info-lead { max-width: 70ch; margin: 0 0 18px; font-size: 1.05rem; color: var(--text-dim, var(--muted)); }
.info-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.info-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.04); font-size: 0.92rem; }
.info-badge i { font-style: normal; color: var(--ok); font-weight: 700; }
.info-section h2 { margin: 0 0 14px; }
.info-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; counter-reset: none; }
.info-step { padding: 16px; display: grid; gap: 6px; position: relative; transition: transform 0.18s, border-color 0.18s; outline: none; }
.info-step:hover, .info-step:focus-visible { transform: translateY(-4px); border-color: var(--accent-hi); }
.info-step p { margin: 0; }
.info-step-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 700; font-size: 0.9rem; }
.info-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.info-tab { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); color: inherit; font: inherit; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.info-tab:hover { border-color: var(--accent-hi); }
.info-tab[aria-selected="true"] { background: rgba(139, 77, 255, 0.25); border-color: var(--accent-hi); color: #fff; }
.info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.info-card { padding: 18px 18px 14px; position: relative; animation: aboutIn 0.25s ease; }
.info-card h3 { margin: 0 0 8px; padding-right: 34px; }
.info-card p { margin: 0; line-height: 1.55; }
.info-card-n { position: absolute; top: 14px; right: 16px; font-size: 1.6rem; font-weight: 800; color: rgba(139, 77, 255, 0.4); }
.info-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.info-num { padding: 16px; display: grid; gap: 4px; }
.info-num strong { font-size: 1.5rem; }
.info-help { padding: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.info-help h2 { margin: 0 0 6px; }
.info-help p { margin: 0 0 4px; }
@media (prefers-reduced-motion: reduce) { .info-card, .info-step { animation: none; transition: none; } }

/* Обязательная почта и объединённый блок контактов */
.three-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.contacts h3 { margin: 0 0 8px; font-size: 1rem; }
.tg-embedded { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.tg-embedded h3 { margin: 0 0 6px; }
dialog.email-gate { max-width: min(460px, calc(100vw - 28px)); }
.gate-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; background: rgba(139, 77, 255, 0.2); margin-bottom: 8px; }

/* Профиль в стиле CSFloat */
.profile-page { display: grid; gap: 16px; }
.profile-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; padding: 22px; }
.ph-left { display: flex; flex-direction: column; justify-content: flex-start; gap: 28px; }
.ph-id { display: flex; gap: 16px; align-items: center; }
.ph-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ph-badge { padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); font-size: 0.85rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.ph-badge.good { background: rgba(80, 200, 120, 0.18); color: var(--ok); }
.ph-badge.warn { background: rgba(255, 59, 78, 0.18); color: var(--alert-hi); }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ph-earn { padding: 16px 18px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.ph-earn-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ph-earn-head h2 { margin: 0; font-size: 1.1rem; }
.ph-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ph-rows > div:last-child { border-bottom: 0; }
.ph-rows dt { color: var(--muted); } .ph-rows dd { margin: 0; }
.ph-rows .total strong { font-size: 1.1rem; }
.icon-btn { background: transparent; border: 0; color: var(--muted); font-size: 1.05rem; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.icon-btn:hover:not(:disabled) { color: #fff; background: rgba(255, 255, 255, 0.08); }
.icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.standing { padding: 18px 22px 22px; }
.standing-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.standing-head h2 { margin: 0; }
.standing-bar { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.standing-bar::before { content: ''; position: absolute; left: 10%; right: 10%; top: 17px; height: 3px; background: rgba(90, 120, 200, 0.35); }
.st-node { display: grid; justify-items: center; gap: 6px; position: relative; text-align: center; font-size: 0.85rem; color: var(--muted); }
.st-circle { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--bg, #0b0614); border: 2px solid currentColor; opacity: 0.55; }
.st-node.s0 { color: #3fb56a; } .st-node.s1 { color: #4a8cff; } .st-node.s2 { color: #c9a227; } .st-node.s3 { color: #d9822b; } .st-node.s4 { color: #d44; }
.st-node.on { color: inherit; } .st-node.on .st-circle { opacity: 1; width: 42px; height: 42px; margin-top: -3px; background: currentColor; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1); }
.st-node.on.s0 .st-circle { background: #3fb56a; } .st-node.on.s1 .st-circle { background: #4a8cff; } .st-node.on.s2 .st-circle { background: #c9a227; } .st-node.on.s3 .st-circle { background: #d9822b; } .st-node.on.s4 .st-circle { background: #d44; }
.st-node.on .st-name { color: #fff; font-weight: 700; }
.pi { padding: 20px 22px; }
.pi-head { display: flex; gap: 14px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.pi-head h2, .pi-head p { margin: 0; }
.pi-icon { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-size: 1.5rem; background: rgba(74, 140, 255, 0.18); }
.pi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.pi-col { display: grid; gap: 8px; align-content: start; }
.pi-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--muted); }
.pi-find { font-size: 0.8rem; font-weight: 600; }
.pi-field { display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 14px; min-height: 46px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.03); }
.pi-value { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pi-trunc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.pi-edit { display: flex; gap: 8px; flex-wrap: wrap; } .pi-edit .input { flex: 1 1 200px; }
.pi-kv { margin-top: 18px; }
.sell-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
@media (max-width: 760px) { .profile-hero { grid-template-columns: 1fr; } .st-name { font-size: 0.7rem; } .st-circle { width: 30px; height: 30px; } .standing-bar::before { top: 14px; } }
.pi-col, .pi-field { min-width: 0; }
.ph-left { align-items: flex-start; }
