/* Marktplaats parser — тёмная чёрно-розовая тема */
:root {
  --bg: #08060b;
  --surface: #141019;
  --surface-2: #1b1622;
  --surface-3: #231c2c;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .14);
  --text: #f5eff7;
  --muted: #a79fb3;
  --pink: #ff2e8b;
  --violet: #c21fd6;
  --purple: #8b22e8;
  --grad: linear-gradient(120deg, #ff2e8b, #c21fd6, #8b22e8);
  --ok: #27d07f;
  --warn: #ffb020;
  --err: #ff4d6d;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 32px -12px rgba(8, 2, 14, .9), 0 2px 6px rgba(0, 0, 0, .35);
  --glow: 0 0 0 1px rgba(255, 46, 139, .35), 0 14px 40px -12px rgba(194, 31, 214, .45);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font: 15px/1.5 var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 480px at 15% -10%, rgba(255, 46, 139, .16), transparent 60%),
    radial-gradient(800px 460px at 85% -12%, rgba(139, 34, 232, .18), transparent 62%),
    var(--bg);
  background-attachment: fixed;
}
img { max-width: 100%; display: block; }
a { color: #ff7ab8; text-decoration: none; }
a:hover { color: #ffa3cf; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.01em; margin: 0 0 .4em; line-height: 1.2; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.15rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .82rem; margin: .4rem 0 0; }
.warn-text { color: var(--warn); }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.ic { flex: none; vertical-align: -0.15em; }

:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; border-radius: 6px; }

.container { max-width: 1240px; margin: 0 auto; padding: 28px 20px 64px; }

/* ---------------------------------------------------------------- header */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 7, 14, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 20px; height: 64px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); white-space: nowrap; }
.brand:hover { color: var(--text); }
.logo-mark { flex: none; filter: drop-shadow(0 0 6px rgba(255, 46, 139, .35)); }
.wordmark { font-family: var(--font); font-weight: 700; font-size: 1.22rem; letter-spacing: -.02em; color: var(--text); }
.wm-accent {
  background: linear-gradient(90deg, #e01fb0, #b21fe0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo-tile {
  display: inline-grid; place-items: center; flex: none; border-radius: 26%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 46, 139, .38), rgba(255, 46, 139, 0) 62%), #140c18;
  border: 1px solid rgba(255, 46, 139, .35);
  box-shadow: 0 10px 30px -10px rgba(224, 31, 176, .55);
}
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.tab {
  position: relative; padding: 20px 14px; color: var(--muted); font-weight: 500; white-space: nowrap;
  transition: color .15s;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); }
.tab.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--grad);
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--grad); color: #fff; font-family: var(--display); font-weight: 700;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px rgba(255, 46, 139, .45);
}
.avatar:hover { color: #fff; filter: brightness(1.1); }

.subbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px;
  padding: 10px 20px; font-size: .9rem;
  background: linear-gradient(90deg, rgba(255, 46, 139, .16), rgba(139, 34, 232, .16));
  border-bottom: 1px solid rgba(255, 46, 139, .25);
}
.subbar span { display: inline-flex; align-items: center; gap: 8px; }
.subbar-link { font-weight: 600; color: #fff; padding: 4px 12px; border-radius: 999px; background: rgba(255, 46, 139, .25); }
.subbar-link:hover { color: #fff; background: rgba(255, 46, 139, .4); }

/* ---------------------------------------------------------------- buttons/forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font: 600 .95rem var(--font); cursor: pointer; white-space: nowrap;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s, filter .2s;
}
.btn-grad { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -10px rgba(255, 46, 139, .8); }
.btn-grad:hover { color: #fff; filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 12px 30px -10px rgba(255, 46, 139, .9); }
.btn-grad:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: grayscale(.4); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { color: var(--text); border-color: rgba(255, 46, 139, .5); background: var(--surface-3); }
.btn-ghost.is-saved { color: var(--pink); border-color: rgba(255, 46, 139, .5); }
.btn-ghost.is-saved .ic { fill: currentColor; }
.btn-lg { height: 52px; padding: 0 28px; font-size: 1rem; }
.btn-block { width: 100%; }

.stack { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-size: .85rem; color: var(--muted); }
.field > span { font-weight: 500; }
input[type=text], input[type=search], input[type=password], input[type=number], input[type=date], input:not([type]) {
  width: 100%; height: 42px; padding: 0 12px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font: 400 .95rem var(--font);
  transition: border-color .15s, box-shadow .15s;
}
input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 46, 139, .2); }
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.8); }
.radio { display: flex; align-items: center; gap: 10px; padding: 7px 4px; color: var(--text); cursor: pointer; font-size: .92rem; }
.radio input { accent-color: var(--pink); width: 16px; height: 16px; }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin: 0 0 18px; font-size: .92rem; border: 1px solid; }
.alert-err { background: rgba(255, 77, 109, .1); border-color: rgba(255, 77, 109, .35); color: #ffc2cd; }
.alert-ok { background: rgba(39, 208, 127, .1); border-color: rgba(39, 208, 127, .35); color: #b6f5d4; }
.alert-warn { background: rgba(255, 176, 32, .1); border-color: rgba(255, 176, 32, .35); color: #ffe0a3; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}

/* ---------------------------------------------------------------- auth */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card {
  width: 100%; max-width: 400px; padding: 36px 32px;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              linear-gradient(140deg, rgba(255, 46, 139, .5), rgba(255, 255, 255, .06) 40%, rgba(139, 34, 232, .45)) border-box;
  border: 1px solid transparent; border-radius: 22px;
  box-shadow: 0 30px 80px -30px rgba(194, 31, 214, .45), var(--shadow);
}
.auth-card h1 { margin-top: 22px; }
.auth-card > .muted { margin-bottom: 22px; }
.auth-brand { display: flex; align-items: center; gap: 14px; }
.auth-brand .wordmark { font-size: 1.45rem; }
.auth-alt { margin: 20px 0 0; text-align: center; color: var(--muted); font-size: .92rem; }

/* ---------------------------------------------------------------- filters */
.filters { margin-bottom: 26px; }
.pill-search {
  display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 20px; margin-bottom: 14px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px;
  color: var(--muted); box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.pill-search:focus-within { border-color: rgba(255, 46, 139, .6); box-shadow: 0 0 0 4px rgba(255, 46, 139, .14), var(--shadow); }
.pill-search input { border: 0; background: transparent; height: 100%; padding: 0; font-size: 1.02rem; }
.pill-search input:focus { box-shadow: none; }

.pill-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
details.pill { position: relative; }
.pill-sum {
  list-style: none; display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 14px; border-radius: 999px; cursor: pointer; user-select: none;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
  font-size: .88rem; font-weight: 500; white-space: nowrap;
  transition: border-color .15s, background .15s;
}
.pill-sum::-webkit-details-marker { display: none; }
.pill-sum:hover { border-color: rgba(255, 255, 255, .25); background: var(--surface-2); }
.pill-sum .ic-chevron { color: var(--muted); transition: transform .2s; }
details[open] > .pill-sum .ic-chevron { transform: rotate(180deg); }
details[open] > .pill-sum { border-color: rgba(255, 46, 139, .55); background: var(--surface-2); }
details.pill.is-active > .pill-sum {
  background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--grad) border-box;
  border-color: transparent;
}
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 8px var(--pink); }
.slow { color: var(--warn); display: inline-flex; }
.panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40;
  min-width: 260px; padding: 16px;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 14px;
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 46, 139, .08);
  display: grid; gap: 10px;
  animation: pop .14s ease-out;
}
.panel-right { left: auto; right: 0; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filter-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.filter-actions .btn { height: 40px; }
.reset { color: var(--muted); font-size: .9rem; }
.reset:hover { color: var(--text); }
.legend { margin: 12px 0 0; font-size: .8rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.legend .ic { color: var(--warn); }

/* ---------------------------------------------------------------- catalog filters */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.search-row { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.search-row .pill-search { flex: 1; margin-bottom: 0; }
.live-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .88rem; white-space: nowrap; }
.live-link:hover { color: var(--text); }

.panel-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 14px;
  margin: 6px -16px -16px; padding: 12px 16px; border-top: 1px solid var(--border);
}
.btn-link { background: none; border: 0; padding: 0; color: var(--muted); font: 500 .88rem var(--font); cursor: pointer; }
.btn-link:hover { color: var(--text); }
.btn-light { height: 36px; padding: 0 16px; background: #f5eff7; color: #141019; border-radius: 10px; font-weight: 600; }
.btn-light:hover { background: #fff; color: #141019; }

.check { display: flex; align-items: center; gap: 12px; padding: 9px 4px; color: var(--text); font-size: .92rem; cursor: pointer; border-bottom: 1px solid var(--border); }
.check:last-of-type { border-bottom: 0; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; margin: 0; border-radius: 5px; border: 1.5px solid var(--border-strong); background: var(--bg); display: grid; place-items: center; cursor: pointer; }
.check-radio input { border-radius: 50%; }
.check input:checked { background: var(--grad); border-color: transparent; }
.check input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.check-radio input:checked::after { width: 6px; height: 6px; border: 0; border-radius: 50%; background: #fff; transform: none; }
.check span { flex: 1; }
.check em { font-style: normal; color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }

.input-unit { position: relative; display: block; }
.input-unit i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); pointer-events: none; }
.panel-range { min-width: 320px; }

.panel-cats { width: min(760px, calc(100vw - 40px)); padding: 0; gap: 0; }
.panel-cats .panel-foot { margin: 0; }
.cats-summary { margin-right: auto; font-size: .85rem; }
.cats { display: grid; grid-template-columns: 260px 1fr; height: 380px; }
.cats-l1 { list-style: none; margin: 0; padding: 8px; overflow-y: auto; border-right: 1px solid var(--border); }
.cat-l1 { width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 500 .9rem var(--font); text-align: left; cursor: pointer; }
.cat-l1 span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-l1:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.cat-l1.is-on { color: var(--text); background: rgba(255, 46, 139, .1); }
.cats-l2 { overflow-y: auto; padding: 4px 18px 10px; }
.cat-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 10px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface-2); z-index: 1; }
.check-all span { font-weight: 600; }

.sort-select { position: relative; display: inline-flex; align-items: center; }
.sort-select select {
  appearance: none; -webkit-appearance: none; height: 38px; padding: 0 34px 0 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); font: 500 .88rem var(--font); cursor: pointer;
}
.sort-select select:hover { border-color: rgba(255, 255, 255, .25); }
.sort-select .ic { position: absolute; right: 12px; color: var(--muted); pointer-events: none; }

/* карточка каталога */
.lcard-status { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.lcard-status .badge { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.badge-closed, .badge-blocked { background: rgba(255, 77, 109, .08) !important; }
.age { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.save-form { margin: 0 0 0 auto; }
.save-btn { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--border-strong); background: transparent; color: var(--muted); cursor: pointer; }
.save-btn:hover { color: var(--pink); border-color: rgba(255, 46, 139, .5); }
.save-btn.is-on { color: var(--pink); border-color: rgba(255, 46, 139, .5); }
.save-btn.is-on .ic { fill: var(--pink); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.chips li { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 7px; border: 1px solid var(--border-strong); font-size: .8rem; color: var(--text); font-variant-numeric: tabular-nums; }
.chips .ic { color: var(--muted); }
.lcard-media { position: relative; }
.dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 4px; pointer-events: none; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .45); }
.dots i.on { background: #fff; }

/* ---------------------------------------------------------------- results */
.results-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.found { margin: 0; color: var(--muted); }
.found b { color: var(--text); font-family: var(--display); font-size: 1.1rem; }
.pager { display: flex; align-items: center; gap: 8px; }
.pager-bottom { justify-content: center; margin-top: 30px; }
.pager-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
}
.pager-btn:hover { color: var(--text); border-color: var(--pink); }
.pager-btn.is-disabled { opacity: .35; }
.pager-info { color: var(--muted); font-size: .9rem; min-width: 60px; text-align: center; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 18px; }
.lcard {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
}
.lcard:hover { transform: translateY(-3px); border-color: rgba(255, 46, 139, .4); box-shadow: var(--glow); }
.lcard-media { display: block; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.lcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.lcard:hover .lcard-media img { transform: scale(1.03); }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); }
.lcard-badge { position: absolute; top: 10px; left: 10px; }
.lcard-heart { position: absolute; top: 8px; right: 8px; margin: 0; }
.heart {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgba(8, 6, 11, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .15); color: #fff;
  transition: transform .15s, color .15s, background .15s;
}
.heart:hover { transform: scale(1.08); color: var(--pink); }
.heart.is-on { color: var(--pink); }
.heart.is-on .ic { fill: var(--pink); }
.lcard-body { padding: 14px 16px 8px; flex: 1; }
.lcard-title { font: 600 .98rem/1.35 var(--font); margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.lcard-title a { color: var(--text); }
.lcard-title a:hover { color: #ffa3cf; }
.lcard-date { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .82rem; margin: 0 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcard-stats { list-style: none; display: flex; gap: 14px; padding: 0; margin: 0; color: var(--muted); font-size: .85rem; }
.lcard-stats li { display: inline-flex; align-items: center; gap: 5px; }
.lcard-stats li span { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.lcard-stats.is-loading li span { color: var(--muted); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.lcard-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 16px 14px; border-top: 1px solid var(--border); }
.price { font-family: var(--display); font-weight: 700; font-size: 1.25rem; white-space: nowrap; color: #fff; }

.feed-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin: -8px 0 18px; scrollbar-width: none; }
.chip {
  flex: none; padding: 7px 14px; border-radius: 999px; font-size: .86rem; font-weight: 500;
  color: var(--muted); background: var(--surface); border: 1px solid var(--border-strong);
}
.chip:hover { color: var(--text); border-color: rgba(255, 46, 139, .5); }
.chip.is-on { color: #fff; background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--grad) border-box; border-color: transparent; }
.feed-title { color: var(--text); font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.cat { color: var(--muted); font-size: .78rem; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: .76rem; font-weight: 600; background: rgba(8, 6, 11, .7); backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .12); white-space: nowrap;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.badge-active { color: var(--ok); }
.badge-reserved { color: var(--warn); }
.badge-closed { color: var(--muted); }
.badge-blocked { color: var(--err); }

.empty { text-align: center; padding: 70px 20px; max-width: 520px; margin: 0 auto; }
.empty-mark { display: inline-grid; place-items: center; width: 88px; height: 88px; border-radius: 26px; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--border); color: var(--pink); }

/* ---------------------------------------------------------------- listing page */
.back { margin: 0 0 18px; }
.back a { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.back a:hover { color: var(--text); }
.vip { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.vip-main { display: grid; gap: 22px; min-width: 0; }
.gallery { padding: 12px; }
.gallery-main { aspect-ratio: 4 / 3; background: var(--bg); border-radius: 12px; overflow: hidden; display: grid; place-items: center; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-empty { gap: 8px; color: var(--muted); }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumb { flex: none; width: 76px; height: 58px; padding: 0; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; background: var(--surface-2); opacity: .7; transition: opacity .15s, border-color .15s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: 1; }
.thumb.is-on { border-color: var(--pink); opacity: 1; }
.desc { white-space: pre-line; color: #e2d9e6; line-height: 1.65; overflow-wrap: anywhere; }
.vip-side { position: sticky; top: 84px; }
.side-card { display: grid; gap: 14px; justify-items: start; }
.vip-title { font-size: 1.35rem; margin: 0; }
.vip-price { font-family: var(--display); font-weight: 700; font-size: 2.1rem; margin: 0; line-height: 1.1; color: #fff; background: none; -webkit-background-clip: border-box; background-clip: border-box; }
.side-actions { display: grid; gap: 10px; width: 100%; }
.side-actions .btn, .side-actions form { width: 100%; }
.side-actions form .btn { width: 100%; }

.kv { width: 100%; border-collapse: collapse; font-size: .9rem; }
.kv th, .kv td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.kv th { color: var(--muted); font-weight: 500; width: 44%; padding-right: 14px; }
.kv th .ic { margin-right: 4px; }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: 0; }
.kv td { overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- saved */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.page-head .badge { background: transparent; border-color: var(--border); padding: 2px 8px; }
.table-wrap { padding: 0; overflow-x: auto; margin-top: 18px; }
.saved-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.saved-table th { text-align: left; font-weight: 500; color: var(--muted); padding: 14px 18px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.saved-table td { padding: 12px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.saved-table tr:last-child td { border-bottom: 0; }
.saved-table tbody tr:hover { background: rgba(255, 46, 139, .04); }
.saved-title a { color: var(--text); font-weight: 500; }
.saved-title a:hover { color: #ffa3cf; }
.saved-title .ext { color: var(--muted); margin-left: 6px; }
.saved-table .badge { background: transparent; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.row-actions form { margin: 0; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text); cursor: pointer; }
.icon-btn:hover { color: var(--pink); border-color: rgba(255, 46, 139, .5); }
.icon-btn.heart { backdrop-filter: none; }

/* ---------------------------------------------------------------- billing */
.billing { max-width: 620px; margin: 10px auto 0; display: grid; gap: 20px; }
.plan { padding: 34px; position: relative; overflow: hidden; }
.plan::before {
  content: ""; position: absolute; inset: -40% -20% auto auto; width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 46, 139, .22), transparent 70%); pointer-events: none;
}
.plan-kicker { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: #ffb3d6; background: rgba(255, 46, 139, .12); border: 1px solid rgba(255, 46, 139, .3); margin-bottom: 14px; }
.plan-price { font-family: var(--display); font-weight: 700; font-size: 3rem; line-height: 1.05; margin: 6px 0 4px; }
.plan-list { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 10px; }
.plan-list li { display: flex; gap: 10px; align-items: flex-start; color: #ddd3e3; }
.plan-list .ic { color: var(--pink); margin-top: 3px; }
.plan-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.plan-actions form { margin: 0; }
.plan-active { border-color: rgba(39, 208, 127, .35); background: linear-gradient(160deg, rgba(39, 208, 127, .08), transparent 55%), var(--surface); }
.plan-active::before { background: radial-gradient(circle, rgba(39, 208, 127, .14), transparent 70%); }
.plan-head { display: flex; gap: 16px; align-items: center; margin-bottom: 22px; }
.plan-head h1 { margin: 0; }
.plan-head p { margin: 4px 0 0; }
.plan-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.plan-icon.ok { background: rgba(39, 208, 127, .14); color: var(--ok); }
.pending { margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--border-strong); }
.history h2 { margin-bottom: 8px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .vip { grid-template-columns: 1fr; }
  .vip-side { position: static; order: -1; }
}
@media (max-width: 720px) {
  .topbar-inner { gap: 12px; padding: 0 14px; }
  .brand .wordmark { display: none; }
  .tab { padding: 20px 10px; font-size: .9rem; }
  .container { padding: 20px 14px 48px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .lcard-body { padding: 10px 12px 6px; }
  .lcard-foot { padding: 10px 12px 12px; flex-direction: column; align-items: flex-start; gap: 2px; }
  .lcard-stats { gap: 10px; font-size: .8rem; }
  .price { font-size: 1.05rem; }
  .filter-actions { width: 100%; margin-left: 0; }
  .filter-actions .btn { flex: 1; }
  .panel { position: fixed; left: 12px; right: 12px; top: auto; bottom: 12px; min-width: 0; max-height: 75vh; overflow: auto; }
  .panel-cats { width: auto; }
  .cats { grid-template-columns: 1fr; height: auto; }
  .cats-l1 { max-height: 30vh; border-right: 0; border-bottom: 1px solid var(--border); }
  .cats-l2 { max-height: 34vh; }
  .search-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .live-link { align-self: flex-end; }
  .plan { padding: 24px; }
  .plan-price { font-size: 2.4rem; }
  .auth-card { padding: 28px 22px; }
}
@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .lcard:hover, .btn-grad:hover { transform: none; }
}
