/* ============ Шрифты (файлы кладутся в static/fonts при установке) ============ */
@font-face { font-family: "Unbounded"; src: url("../fonts/unbounded.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

/* ================================ Цвета ================================ */
:root {
  --bg: #070d1c;
  --bg-2: #0b1428;
  --card: #0f1b35;
  --card-2: #142345;
  --line: #1f3160;
  --text: #e8efff;
  --muted: #8fa3cc;
  --accent: #2f7bff;
  --accent-2: #37c6ff;
  --accent-ink: #ffffff;
  --glow: 0 0 0 1px rgba(47,123,255,.45), 0 8px 28px -6px rgba(47,123,255,.55);
  --shadow: 0 10px 30px -12px rgba(0,0,0,.6);
  --danger: #ff6b7d;
  --ok: #3ddc97;
  --r-lg: 22px; --r-md: 16px; --r-sm: 12px;
  --tabbar-h: 64px;
  --font-head: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eef3ff;
  --bg-2: #e3ebff;
  --card: #ffffff;
  --card-2: #f3f7ff;
  --line: #d3def7;
  --text: #0c1733;
  --muted: #5b6d94;
  --accent: #1f63f0;
  --accent-2: #0fa9e6;
  --glow: 0 0 0 1px rgba(31,99,240,.35), 0 8px 24px -8px rgba(31,99,240,.45);
  --shadow: 0 10px 28px -14px rgba(20,40,90,.35);
  color-scheme: light;
}

/* ================================ Основа ================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 16px/1.55 var(--font-body);
  background-image: radial-gradient(1200px 600px at 85% -10%, rgba(47,123,255,.16), transparent 60%),
                    radial-gradient(900px 500px at -10% 10%, rgba(55,198,255,.08), transparent 60%);
  background-attachment: fixed;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 16px);
}
a { color: var(--accent-2); }
:root[data-theme="light"] a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.8rem); font-weight: 700; }
svg { display: block; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.grad { background: linear-gradient(95deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font: 700 .78rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); margin: 0 0 .9rem; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 16px; }

/* ================================ Кнопки ================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 46px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 700; text-decoration: none; transition: transform .15s, box-shadow .2s, background .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-primary { background: linear-gradient(95deg, var(--accent), var(--accent-2)); color: var(--accent-ink) !important; box-shadow: var(--glow); }
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(55,198,255,.6), 0 10px 34px -6px rgba(47,123,255,.75); }
.btn-ghost { background: var(--card-2); color: var(--text) !important; border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-wide { width: 100%; }
.linklike { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-decoration: underline; }

.input {
  width: 100%; min-height: 46px; padding: 0 16px; border-radius: var(--r-sm);
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text); font: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--glow); }

/* ============================ Шапка и таб-бар ============================ */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px;
  padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text) !important; text-decoration: none; font: 700 1.1rem var(--font-head); }
.brand b { color: var(--accent-2); font-weight: 800; margin-left: 2px; }
.brand-mark { width: 30px; height: 30px; color: var(--accent); }
.topnav { display: none; }
.theme-btn { margin-left: auto; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer; display: grid; place-items: center; }
.theme-btn svg, .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="dark"] .i-sun, :root[data-theme="light"] .i-moon { display: none; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px);
  background: color-mix(in srgb, var(--card) 90%, transparent); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a, .tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted) !important; text-decoration: none; font-size: .72rem; font-weight: 600; background: none; border: 0; cursor: pointer;
}
.tabbar [aria-current="page"] { color: var(--accent-2) !important; }
.tabbar [aria-current="page"] svg { filter: drop-shadow(0 0 6px rgba(55,198,255,.7)); }

/* ================================ Hero ================================ */
.hero, .promo {
  position: relative; overflow: hidden; display: grid; gap: 16px; align-items: center;
  padding: 26px 22px; border-radius: var(--r-lg); margin-bottom: 18px;
  background: linear-gradient(135deg, var(--card-2), var(--card)); border: 1px solid var(--line);
}
.hero p, .promo p { color: var(--muted); max-width: 520px; margin: 0; }
.hero-art { position: absolute; right: -50px; top: -30px; width: 190px; height: 190px; opacity: .3; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(2px); }
.o1 { width: 140px; height: 140px; right: 20px; top: 20px; background: radial-gradient(circle at 30% 30%, var(--accent-2), var(--accent) 60%, transparent 70%); opacity: .6; }
.o2 { width: 50px; height: 50px; right: 150px; top: 120px; background: var(--accent); opacity: .35; }
.o3 { width: 26px; height: 26px; right: 10px; top: 150px; background: var(--accent-2); opacity: .5; }
.hero-gift { position: absolute; right: 35px; top: 35px; width: 110px; fill: rgba(255,255,255,.08); stroke: #fff; stroke-width: 3; stroke-linejoin: round; }
.hero-text { position: relative; z-index: 1; }

/* ================================ Фильтры ================================ */
.filters { position: relative; margin-bottom: 16px; }
.filter-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.filter-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 46px; padding: 0 12px 0 14px;
  border-radius: var(--r-sm); background: var(--card); border: 1px solid var(--line); cursor: pointer; font-weight: 600; font-size: .9rem;
  transition: border-color .2s, box-shadow .2s;
}
.filter-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.filter-btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-btn.active { border-color: var(--accent); box-shadow: var(--glow); }
.filter-btn .count:not(:empty) { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: .72rem; display: grid; place-items: center; }
.sort { grid-column: 1 / -1; }
.sort select {
  width: 100%; min-height: 42px; border-radius: var(--r-sm); background: var(--card); border: 1px solid var(--line);
  color: var(--text); padding: 0 12px; font: inherit; font-size: .9rem;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  font-size: .85rem; font-weight: 600; cursor: pointer;
}
.chip i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); }
.chip:hover i { background: var(--danger); color: #fff; }
.chip-reset { background: none; border: 1px dashed var(--line); }

/* Шторка (мобильные) */
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(3,8,20,.6); backdrop-filter: blur(3px); animation: fade .2s; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; top: 8vh; display: flex; flex-direction: column; gap: 12px;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--bg-2);
  border-radius: var(--r-lg) var(--r-lg) 0 0; border-top: 1px solid var(--line); animation: up .25s ease-out;
}
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 4px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { font-size: 1.15rem; margin: 0; }
.sheet-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.sheet-list li label {
  display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: var(--r-sm); cursor: pointer;
}
.sheet-list li label:hover { background: var(--card); }
.sheet-list input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.sheet-list .nm { flex: 1; font-weight: 600; }
.sheet-list .pr { color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.swatch { width: 22px; height: 22px; border-radius: 50%; flex: none; border: 1px solid rgba(255,255,255,.2); }
.sheet-foot { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.sheet-empty { color: var(--muted); padding: 20px 10px; }
.modal-x { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 1.4rem; line-height: 1; }

/* ================================ Сетка ================================ */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, border-color .2s, box-shadow .2s;
  animation: pop .3s ease-out both;
}
.card-art {
  position: relative; aspect-ratio: 1; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, var(--bgc, #2a4f9e), var(--bge, #0d1d42) 75%);
}
.card-art img { width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 10px 16px rgba(0,0,0,.35)); }
.card-art .num { position: absolute; top: 8px; right: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.35); color: #fff; font-size: .72rem; font-weight: 700; }
.card-art .ph { width: 44%; opacity: .8; fill: none; stroke: #fff; stroke-width: 3; stroke-linejoin: round; }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; flex: 1; }
.card-title { font-weight: 700; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-sub { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price { font: 800 1.3rem/1.2 var(--font-head); font-variant-numeric: tabular-nums; margin: 6px 0 8px; letter-spacing: -.02em; }
.price small { font-size: .7em; color: var(--muted); font-weight: 600; }
.card .btn { margin-top: auto; min-height: 42px; }

/* Карточка юзернейма */
.u-art { background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--accent) 45%, var(--card-2)), var(--card) 78%); }
.u-plane { width: 46%; opacity: .95; }
.u-badge {
  position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%) rotate(-3deg); max-width: 88%;
  padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: .88rem; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-shadow: 0 6px 18px -6px rgba(0,0,0,.6);
}
.u-domain { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.no-photo .u-art { aspect-ratio: auto; padding: 18px 10px; background: var(--card-2); }
.no-photo .u-plane { display: none; }
.no-photo .u-badge { position: static; transform: none; }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.loader { display: flex; justify-content: center; gap: 8px; padding: 24px; }
.loader span { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: bounce 1s infinite; }
.loader span:nth-child(2) { animation-delay: .15s; } .loader span:nth-child(3) { animation-delay: .3s; }
.skeleton { background: linear-gradient(90deg, var(--card) 25%, var(--card-2) 50%, var(--card) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--r-lg); aspect-ratio: .72; }

/* ============================== Юзернеймы ============================== */
.promo { grid-template-columns: 1fr; }
.promo h1 { font-size: clamp(1.35rem, 3.6vw, 2.2rem); }
.toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-bottom: 16px; align-items: center; }
.search { position: relative; grid-column: 1 / -1; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; }
.search .input { padding-left: 44px; }
.toolbar .sort { grid-column: auto; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.switch-row span { display: flex; flex-direction: column; }
.switch-row small { color: var(--muted); font-size: .8rem; }
.switch-row.compact { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); min-height: 42px; padding: 0 12px; font-weight: 600; font-size: .9rem; }
.switch-row input {
  appearance: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; cursor: pointer; flex: none; transition: background .2s;
}
.switch-row input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch-row input:checked { background: var(--accent); box-shadow: var(--glow); }
.switch-row input:checked::after { transform: translateX(18px); }
.switch-row input:disabled { opacity: .6; cursor: not-allowed; }

/* ================================ Помощь ================================ */
.about { padding: 24px 22px; border-radius: var(--r-lg); background: linear-gradient(135deg, var(--card-2), var(--card)); border: 1px solid var(--line); margin-bottom: 28px; }
.about p { color: var(--muted); margin: 0; max-width: 760px; }
.about b { color: var(--text); }
.section-title { font-size: 1.2rem; margin: 26px 0 14px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); }
.step-ic { position: relative; flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 20%, var(--card-2)); box-shadow: var(--glow); }
.step-ic svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.step-ic::after { content: counter(s); position: absolute; right: -4px; top: -4px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font: 800 .72rem/20px var(--font-body); text-align: center; }
.steps h3 { font-size: 1rem; margin: 2px 0 4px; font-family: var(--font-body); font-weight: 800; }
.steps p { margin: 0; color: var(--muted); font-size: .94rem; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; }
.faq p { color: var(--muted); margin: 0 0 14px; }

.doc { max-width: 820px; margin: 0 auto; }
.doc h2 { font-size: 1.1rem; margin-top: 28px; }
.doc p, .doc li { color: var(--muted); }
.doc b { color: var(--text); }
.notfound { text-align: center; padding: 60px 16px; }
.big-num { font: 800 5rem/1 var(--font-head); margin: 0 0 10px; }

/* ================================ Футер ================================ */
.footer { max-width: 1440px; margin: 40px auto 0; padding: 20px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; display: grid; gap: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-links a { color: var(--muted); }
.footer-note { margin: 0; font-size: .78rem; }

/* ============================== Cookie / Модалка ============================== */
.cookie {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 12px); z-index: 70;
  padding: 18px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); box-shadow: 0 20px 50px -10px rgba(0,0,0,.6);
  display: grid; gap: 14px; animation: up .3s ease-out;
}
.cookie[hidden], .modal[hidden], .sheet[hidden] { display: none; }
.cookie h2 { font-size: 1rem; margin: 0 0 6px; }
.cookie p { margin: 0; color: var(--muted); font-size: .88rem; }
.cookie-opts { display: grid; gap: 12px; margin-top: 14px; }
.cookie-btns { display: grid; gap: 8px; }

.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: end center; background: rgba(3,8,20,.65); backdrop-filter: blur(4px); animation: fade .2s; }
.modal-card {
  position: relative; width: 100%; max-width: 440px; padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px));
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-lg) var(--r-lg) 0 0; animation: up .25s ease-out;
}
.modal-card .modal-x { position: absolute; top: 14px; right: 14px; }
.modal-card h2 { font-size: 1.15rem; padding-right: 44px; }
.lot-preview { width: 96px; height: 96px; border-radius: var(--r-md); overflow: hidden; margin-bottom: 14px; }
.lot-preview .card-art { width: 100%; height: 100%; }
.lot-price { font: 800 1.6rem var(--font-head); margin: 0 0 12px; font-variant-numeric: tabular-nums; }
.turnstile-box { min-height: 65px; margin: 12px 0; display: flex; justify-content: center; }
.lot-status { padding: 14px; border-radius: var(--r-sm); background: var(--card); margin-bottom: 14px; font-size: .92rem; }
.lot-status.err { border: 1px solid var(--danger); color: var(--danger); }
.lot-status.ok { border: 1px solid var(--ok); }

/* ================================ Анимации ================================ */
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
@keyframes bounce { 50% { transform: translateY(-8px); opacity: .5; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ========================= Планшет: 768–1023px ========================= */
@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .topnav { display: flex; gap: 4px; margin-left: 24px; }
  .topnav a { padding: 9px 16px; border-radius: 999px; color: var(--muted) !important; text-decoration: none; font-weight: 700; transition: background .2s, color .2s; }
  .topnav a:hover { color: var(--text) !important; background: var(--card); }
  .topnav a[aria-current="page"] { color: var(--text) !important; background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line); }
  .wrap { padding: 20px 24px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .hero { padding: 40px 36px; }
  .hero-art { width: 260px; height: 260px; right: 10px; top: 0; opacity: .9; }
  .o1 { width: 200px; height: 200px; } .hero-gift { width: 150px; right: 55px; top: 50px; }
  .filter-row { grid-template-columns: repeat(3, minmax(0, 1fr)) 220px; }
  .sort { grid-column: auto; }
  .toolbar { grid-template-columns: 1fr auto 220px; }
  .search { grid-column: auto; }
  .promo { grid-template-columns: 1fr auto; padding: 32px 36px; }
  .cookie { left: auto; right: 20px; bottom: 20px; max-width: 460px; }
  .cookie-btns { grid-template-columns: 1fr 1fr; }
  .cookie-btns .btn:first-child { grid-column: 1 / -1; }
  .modal { place-items: center; }
  .modal-card { border-radius: var(--r-lg); }
  .steps { grid-template-columns: 1fr 1fr; }
}

/* ========================= Десктоп: от 1024px ========================= */
@media (min-width: 1024px) {
  .topbar { padding-left: max(24px, calc((100vw - 1440px) / 2 + 24px)); padding-right: max(24px, calc((100vw - 1440px) / 2 + 24px)); }
  .grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .filters { position: sticky; top: 67px; z-index: 20; padding: 10px 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); }
  .filter-row { grid-template-columns: repeat(3, minmax(0, 240px)) 1fr; }
  .sort { justify-self: end; width: 220px; }
  .filter-btn:hover { border-color: var(--accent); }
  /* На десктопе фильтр — выпадающая панель под кнопкой, а не шторка */
  .sheet { position: absolute; inset: auto; top: 64px; left: var(--sheet-left, 0); width: 380px; z-index: 50; }
  .sheet-backdrop { position: fixed; background: transparent; backdrop-filter: none; }
  .sheet-panel { position: relative; top: auto; max-height: 460px; border-radius: var(--r-md); border: 1px solid var(--line); box-shadow: 0 24px 60px -16px rgba(0,0,0,.65); padding: 14px; animation: fade .15s; }
  .sheet-grip { display: none; }
  .card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); box-shadow: 0 18px 40px -16px rgba(47,123,255,.55); }
  .card:hover .card-art img { transform: scale(1.05) rotate(-2deg); }
  .card-art img { transition: transform .3s; }
  .footer { grid-template-columns: 1fr auto; align-items: center; padding: 24px; }
  .footer-note { grid-column: 1 / -1; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { flex-direction: column; }
}
@media (min-width: 1400px) {
  .grid { grid-template-columns: repeat(5, 1fr); }
}

/* Узкие телефоны: полные подписи фильтров без обрезки */
@media (max-width: 420px) {
  .filter-btn { padding: 0 8px; justify-content: center; font-size: .84rem; }
  .filter-btn svg { display: none; }
  .switch-row.compact { white-space: nowrap; gap: 8px; }
}
