/* ==========================================================================
   CrystalMarket — Crystal UI design system
   Single source of truth for colours, glass, depth and spacing: the :root
   and [data-theme] token blocks below. Nothing else hard-codes a colour
   that should change with the theme.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  --brand-1: #3b5bff;            /* overridden by /brand.css (admin settings) */
  --brand-2: #8a5cff;
  --accent-grad: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 100%);

  --r-xs: 10px; --r-sm: 14px; --r-md: 20px; --r-lg: 28px; --r-xl: 36px; --r-pill: 999px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
  --blur: 18px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --ok: #14a86a; --warn: #e59a12; --danger: #e5384f; --info: #3b82f6;

  /* light theme (default) */
  --bg-1: #c9dcff; --bg-2: #e3d9ff; --bg-3: #ffd6ec; --bg-4: #bfe9ff;
  --text: #15224f; --text-soft: #4a5a8d; --text-faint: #7d8ab3;
  --glass: rgba(255, 255, 255, .44);
  --glass-strong: rgba(255, 255, 255, .72);
  --glass-inner: rgba(255, 255, 255, .58);
  --glass-border: rgba(255, 255, 255, .78);
  --glass-edge: rgba(120, 140, 255, .22);
  --shadow-1: 0 2px 6px rgba(52, 70, 160, .10);
  --shadow-2: 0 10px 30px rgba(52, 70, 160, .16), 0 2px 8px rgba(52, 70, 160, .08);
  --shadow-3: 0 24px 60px rgba(52, 70, 160, .24), 0 6px 16px rgba(52, 70, 160, .10);
  --input-bg: rgba(255, 255, 255, .78);
  --price: #1f3fd8;
  --on-accent: #fff;
  --dark-chip: #1b2455;
  --shard-a: rgba(111, 140, 255, .55); --shard-b: rgba(255, 150, 215, .45); --shard-c: rgba(120, 220, 255, .5);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg-1: #080d2b; --bg-2: #1a1250; --bg-3: #0b2a5e; --bg-4: #21104a;
  --text: #ecf1ff; --text-soft: #b4c0ee; --text-faint: #7f8cc0;
  --glass: rgba(24, 32, 82, .56);
  --glass-strong: rgba(28, 38, 96, .86);
  --glass-inner: rgba(40, 52, 120, .55);
  --glass-border: rgba(150, 170, 255, .26);
  --glass-edge: rgba(150, 170, 255, .18);
  --shadow-1: 0 2px 6px rgba(0, 0, 0, .35);
  --shadow-2: 0 12px 34px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);
  --shadow-3: 0 26px 64px rgba(0, 0, 0, .55), 0 6px 18px rgba(0, 0, 0, .35);
  --input-bg: rgba(14, 20, 60, .72);
  --price: #8fb0ff;
  --dark-chip: #0a0f33;
  --shard-a: rgba(80, 110, 255, .5); --shard-b: rgba(170, 90, 255, .45); --shard-c: rgba(40, 160, 255, .4);
  color-scheme: dark;
}

[data-theme="green"] {
  --bg-1: #c4f1d9; --bg-2: #d6f6ff; --bg-3: #e6ffcf; --bg-4: #b8ecd0;
  --text: #0f3a2c; --text-soft: #3d6b59; --text-faint: #75a08e;
  --glass: rgba(255, 255, 255, .42);
  --glass-border: rgba(255, 255, 255, .8);
  --glass-edge: rgba(40, 170, 120, .25);
  --shadow-1: 0 2px 6px rgba(20, 110, 80, .10);
  --shadow-2: 0 10px 30px rgba(20, 110, 80, .16), 0 2px 8px rgba(20, 110, 80, .08);
  --shadow-3: 0 24px 60px rgba(20, 110, 80, .24), 0 6px 16px rgba(20, 110, 80, .10);
  --price: #0b8f58;
  --dark-chip: #0f3a2c;
  --shard-a: rgba(60, 220, 150, .5); --shard-b: rgba(170, 240, 90, .45); --shard-c: rgba(80, 220, 235, .5);
}
[data-theme="green"] { --accent-grad: linear-gradient(135deg, #12b76a 0%, #0aa6a0 100%); }

[data-theme="pink"] {
  --bg-1: #ffd3e8; --bg-2: #f1d4ff; --bg-3: #ffe2d2; --bg-4: #ffc9e0;
  --text: #4a1238; --text-soft: #84496c; --text-faint: #b384a0;
  --glass-edge: rgba(255, 90, 160, .25);
  --shadow-1: 0 2px 6px rgba(150, 40, 100, .10);
  --shadow-2: 0 10px 30px rgba(150, 40, 100, .16), 0 2px 8px rgba(150, 40, 100, .08);
  --shadow-3: 0 24px 60px rgba(150, 40, 100, .24), 0 6px 16px rgba(150, 40, 100, .10);
  --price: #d6217d;
  --dark-chip: #4a1238;
  --shard-a: rgba(255, 110, 180, .5); --shard-b: rgba(190, 110, 255, .45); --shard-c: rgba(255, 170, 130, .5);
}
[data-theme="pink"] { --accent-grad: linear-gradient(135deg, #ff4f9a 0%, #b34dff 100%); }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; font: 400 15px/1.5 var(--font); color: var(--text);
  background:
    radial-gradient(1200px 700px at 8% 0%, var(--bg-4), transparent 60%),
    radial-gradient(900px 700px at 95% 10%, var(--bg-3), transparent 60%),
    radial-gradient(1000px 800px at 50% 100%, var(--bg-2), transparent 65%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2));
  background-color: var(--bg-1);
  background-attachment: fixed;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
img { display: block; height: auto; }
a { color: var(--price); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 var(--sp-2); line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 var(--sp-3); }
ul, ol { margin: 0; padding: 0; list-style: none; }
code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--glass-inner); padding: 2px 6px; border-radius: 6px; }
.muted { color: var(--text-soft); }
.hint { color: var(--text-faint); font-size: .85rem; margin: 2px 0 var(--sp-3); }
.small { font-size: .85rem; }
.ok { color: var(--ok); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--dark-chip); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); transition: top .15s; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--brand-1); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }

/* floating crystal background */
.bg-crystal { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.shard { position: absolute; display: block; filter: blur(.5px); opacity: .85; }
.shard.s1 { width: 46vmax; height: 46vmax; left: -14vmax; top: 34vh; background: conic-gradient(from 210deg at 50% 50%, transparent 0 30%, var(--shard-c) 38%, transparent 46% 60%, var(--shard-a) 72%, transparent 82%); clip-path: polygon(10% 0, 100% 24%, 70% 100%, 0 70%); transform: rotate(-12deg); }
.shard.s2 { width: 34vmax; height: 34vmax; right: -10vmax; top: -8vmax; background: linear-gradient(135deg, var(--shard-b), transparent 70%); clip-path: polygon(30% 0, 100% 40%, 60% 100%, 0 60%); transform: rotate(18deg); }
.shard.s3 { width: 30vmax; height: 30vmax; right: 6vmax; bottom: -12vmax; background: linear-gradient(200deg, var(--shard-a), transparent 70%); clip-path: polygon(0 30%, 60% 0, 100% 70%, 40% 100%); }
.shard.s4 { width: 22vmax; height: 22vmax; left: 34vw; top: -10vmax; background: linear-gradient(160deg, var(--shard-c), transparent 70%); clip-path: polygon(20% 0, 100% 20%, 80% 100%, 0 80%); opacity: .6; }

/* ---------- 3. Glass primitives ---------- */
.glass {
  background: linear-gradient(145deg, var(--glass-strong) -30%, var(--glass) 38%, var(--glass) 100%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-2), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -1px 0 var(--glass-edge);
  border-radius: var(--r-lg);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.3);
  backdrop-filter: blur(var(--blur)) saturate(1.3);
}
.glass-inner {
  background: var(--glass-inner); border: 1px solid var(--glass-border); border-radius: var(--r-md);
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255, 255, 255, .5);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-strong); }
}
.block { padding: var(--sp-5); margin-bottom: var(--sp-5); }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.block-head h2, .block > h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.block > h2 { margin-bottom: var(--sp-4); }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: .9rem; color: var(--price); }
.flame { color: #ff5a3c; display: inline-flex; } .crown { color: #f3b21a; display: inline-flex; }

/* ---------- 4. Icons, buttons, chips ---------- */
.ic { width: 22px; height: 22px; flex: none; }
.ic-sm { width: 16px; height: 16px; } .ic-lg { width: 30px; height: 30px; } .ic-xl { width: 40px; height: 40px; }

.btn {
  --btn-bg: var(--glass-strong); --btn-fg: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  font: 600 .95rem/1 var(--font); color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--glass-border); border-radius: var(--r-pill); cursor: pointer; text-decoration: none;
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease, background .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-2), inset 0 1px 0 rgba(255, 255, 255, .7); }
.btn:active { transform: translateY(0) scale(.985); box-shadow: var(--shadow-1); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.is-loading { position: relative; color: transparent; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-primary { --btn-bg: var(--accent-grad); --btn-fg: var(--on-accent); background: var(--accent-grad); border-color: rgba(255, 255, 255, .45); box-shadow: 0 10px 24px rgba(59, 91, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 14px 30px rgba(59, 91, 255, .42), inset 0 1px 0 rgba(255, 255, 255, .55); }
.btn-ghost { background: var(--glass-inner); }
.btn-dark { --btn-bg: var(--dark-chip); --btn-fg: #fff; background: var(--dark-chip); border-color: transparent; }
.btn-danger { --btn-fg: #fff; background: linear-gradient(135deg, #ff5d73, #d9243f); border-color: rgba(255, 255, 255, .35); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .85rem; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: var(--sp-3); align-items: center; margin: var(--sp-3) 0; }
.btn-row.wrap { flex-wrap: wrap; }
.btn-row form { margin: 0; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; position: relative; width: 44px; height: 44px; padding: 0;
  color: var(--text); background: var(--glass-inner); border: 1px solid var(--glass-border); border-radius: 50%; cursor: pointer;
  box-shadow: var(--shadow-1); transition: transform .15s, box-shadow .2s, background .2s;
}
.icon-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); text-decoration: none; }
.icon-btn.sm { width: 34px; height: 34px; }
.icon-btn.glass { border-radius: 50%; }
.icon-btn.danger { color: var(--danger); } .icon-btn.ok { color: var(--ok); }
.badge-dot { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; font: 700 11px/1 var(--font); color: #fff; background: linear-gradient(135deg, #ff5d73, #e5233f); border: 2px solid var(--glass-strong); border-radius: var(--r-pill); }
.badge-dot.sm { top: -6px; right: -8px; min-width: 18px; height: 18px; font-size: 10px; }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; font: 700 .75rem/1 var(--font); border-radius: var(--r-pill); }
.chip-premium { color: #fff; background: var(--dark-chip); box-shadow: var(--shadow-1); } .chip-premium .ic { color: #f3b21a; }
.chip-status { color: #fff; background: var(--warn); }
.chip-primary { color: #fff; background: var(--accent-grad); }
.chip.sm { padding: 3px 7px; }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; font: 700 .72rem/1.4 var(--font); border-radius: var(--r-pill); background: var(--glass-inner); border: 1px solid var(--glass-border); }
.badge-published, .badge-u-active { color: #0b7a4b; background: rgba(20, 168, 106, .15); }
.badge-pending, .badge-u-restricted { color: #8a5a00; background: rgba(229, 154, 18, .18); }
.badge-draft { color: var(--text-soft); }
.badge-rejected, .badge-suspended, .badge-u-suspended { color: #b3162f; background: rgba(229, 56, 79, .14); }
.badge-archived { color: var(--text-soft); background: rgba(120, 130, 170, .18); }
[data-theme="dark"] .badge-published, [data-theme="dark"] .badge-u-active { color: #5ee0a6; }
[data-theme="dark"] .badge-pending, [data-theme="dark"] .badge-u-restricted { color: #ffcb62; }
[data-theme="dark"] .badge-rejected, [data-theme="dark"] .badge-suspended, [data-theme="dark"] .badge-u-suspended { color: #ff8a9c; }

.avatar { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: none; overflow: hidden; font-weight: 800; color: #fff; background: var(--accent-grad); border-radius: 50%; border: 2px solid var(--glass-border); }
.avatar.lg { width: 64px; height: 64px; font-size: 1.5rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.flag { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; margin-left: auto; font: 700 .72rem/1 var(--font); color: var(--text-soft); background: var(--glass-inner); border-radius: var(--r-pill); }
.count.hot { color: #fff; background: linear-gradient(135deg, #ff5d73, #e5233f); }

/* ---------- 5. Forms ---------- */
.field { margin-bottom: var(--sp-4); }
.field > label, .field > legend, legend { display: block; margin-bottom: 6px; font-weight: 600; font-size: .88rem; color: var(--text-soft); }
fieldset { border: 0; padding: 0; margin: 0 0 var(--sp-4); min-width: 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="tel"], input[type="number"], input[type="url"], select, textarea {
  width: 100%; min-height: 46px; padding: 11px 16px; font: inherit; color: var(--text); background: var(--input-bg);
  border: 1px solid var(--glass-border); border-radius: var(--r-sm); box-shadow: inset 0 1px 3px rgba(40, 60, 140, .08);
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 96px; }
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-1) 28%, transparent); }
input[type="color"] { width: 64px; height: 44px; padding: 4px; border: 1px solid var(--glass-border); border-radius: var(--r-sm); background: var(--input-bg); }
input[type="file"] { width: 100%; font: inherit; color: var(--text-soft); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--brand-1); flex: none; }
.field.check label, label.inline { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--text); cursor: pointer; }
label.inline { display: inline-flex; margin-right: 16px; margin-bottom: 6px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.field-error { margin: 5px 2px 0; color: var(--danger); font-size: .82rem; font-weight: 600; }
.input-ic { position: relative; }
.input-ic > .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }
.input-ic > input, .input-ic > select { padding-left: 42px; }
.row-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 var(--sp-4); }
.inline-form { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; margin-bottom: var(--sp-3); }
.inline-form select, .inline-form input { width: auto; min-width: 140px; }
.inline-form label { margin: 0; font-weight: 600; font-size: .88rem; }
.narrow { width: 90px !important; min-width: 0 !important; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; padding: 0; min-height: 0; border: 0; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--brand-1), var(--brand-2)); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .15); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--brand-1); box-shadow: var(--shadow-2); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--brand-1); box-shadow: var(--shadow-2); cursor: pointer; }
.range-field label { display: block; font-size: .88rem; }
.range-field output { font-weight: 700; color: var(--price); }

.alert { display: flex; align-items: flex-start; gap: 10px; padding: 14px 18px; margin-bottom: var(--sp-4); border-radius: var(--r-md); font-weight: 500; }
.alert .ic { margin-top: 2px; }
.alert-success { border-left: 5px solid var(--ok); } .alert-success .ic { color: var(--ok); }
.alert-error { border-left: 5px solid var(--danger); } .alert-error .ic { color: var(--danger); }
.alert-info { border-left: 5px solid var(--info); } .alert-info .ic { color: var(--info); }
.wrap-code { display: block; margin-top: 6px; word-break: break-all; }

/* ---------- 6. App shell ---------- */
.app-shell {
  display: grid; grid-template-columns: 212px minmax(0, 1fr); grid-template-areas: "top top" "side main" "foot foot";
  gap: var(--sp-5); max-width: 1480px; margin: 0 auto; padding: var(--sp-5); align-items: start;
}
.topbar { grid-area: top; display: grid; grid-template-columns: 300px minmax(0, 1fr) auto; gap: var(--sp-5); align-items: center; position: relative; z-index: 20; }
.brand { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: var(--r-xl); }
.brand-link { display: flex; align-items: center; gap: 12px; color: var(--text); min-width: 0; }
.brand-link:hover { text-decoration: none; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; flex: none; color: #fff; background: var(--accent-grad); border-radius: 16px; box-shadow: 0 8px 18px rgba(59, 91, 255, .4), inset 0 1px 0 rgba(255, 255, 255, .5); overflow: hidden; }
.brand-mark.sm { width: 38px; height: 38px; border-radius: 12px; } .brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-text strong { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: .72rem; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-toggle { display: none; }

.searchbar { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 20px; border-radius: var(--r-pill); }
.searchbar input { flex: 1; min-width: 0; min-height: 40px; padding: 0 8px; background: transparent; border: 0; box-shadow: none; }
.searchbar input:focus { box-shadow: none; }
.search-ic { color: var(--text-faint); } .search-go { width: 40px; height: 40px; background: var(--accent-grad); color: #fff; border-color: transparent; }
.suggest-box { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; padding: 6px; border-radius: var(--r-md); background: var(--glass-strong); }
.suggest-box a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: var(--r-sm); color: var(--text); }
.suggest-box a:hover, .suggest-box a[aria-selected="true"] { background: var(--glass-inner); text-decoration: none; }
.suggest-box small { color: var(--text-soft); white-space: nowrap; }

.top-actions { display: flex; align-items: center; gap: 10px; }
.dropdown { position: relative; border-radius: var(--r-pill); }
.dropdown > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; cursor: pointer; list-style: none; font-weight: 600; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 190px; padding: 6px; border-radius: var(--r-md); background: var(--glass-strong); }
.dropdown-panel a, .dropdown-panel button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; font: 500 .92rem var(--font); color: var(--text); background: none; border: 0; border-radius: var(--r-sm); cursor: pointer; text-align: left; }
.dropdown-panel a:hover, .dropdown-panel button:hover { background: var(--glass-inner); text-decoration: none; }
.dropdown-panel [aria-current="true"] { font-weight: 800; }
.dropdown-panel form { margin: 0; }
.user-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar { grid-area: side; position: sticky; top: var(--sp-5); padding: 14px; display: flex; flex-direction: column; gap: var(--sp-4); max-height: calc(100vh - 48px); overflow-y: auto; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; font-weight: 600; color: var(--text); border-radius: var(--r-md); transition: background .2s, color .2s; }
.nav-item:hover { background: var(--glass-inner); text-decoration: none; }
.nav-item.is-active { color: #fff; background: var(--accent-grad); box-shadow: 0 8px 18px rgba(59, 91, 255, .32), inset 0 1px 0 rgba(255, 255, 255, .45); }
.nav-item.is-active .count { color: var(--text); }
.nav-ic { position: relative; display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; }
.side-card { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 14px; font-size: .85rem; }
.side-card strong { display: block; } .side-card small { color: var(--text-soft); }
.side-card .btn, .side-card .pwa-hint { grid-column: 1 / -1; }
.side-card-ic { display: inline-flex; width: 44px; height: 56px; align-items: center; justify-content: center; color: #fff; background: var(--accent-grad); border-radius: 14px; }
.pwa-hint { margin: 0; font-size: .78rem; color: var(--text-faint); }
.theme-dots { display: flex; justify-content: center; gap: 12px; padding: 4px 0 2px; }
.theme-dot { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--glass-border); box-shadow: var(--shadow-1); }
.theme-dot.is-current { outline: 2px solid var(--brand-1); outline-offset: 2px; }
.dot-light { background: linear-gradient(135deg, #fff, #c9dcff); } .dot-dark { background: linear-gradient(135deg, #1a1250, #080d2b); }
.dot-green { background: linear-gradient(135deg, #c4f1d9, #12b76a); } .dot-pink { background: linear-gradient(135deg, #ffd3e8, #ff4f9a); }

.content { grid-area: main; min-width: 0; outline: none; }
.footer { grid-area: foot; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4) var(--sp-5); padding: 18px 28px; }
.footer-brand { display: flex; align-items: center; gap: 12px; color: var(--text); } .footer-brand:hover { text-decoration: none; }
.footer-brand .brand-text strong { font-size: 1.1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; } .footer-links a { color: var(--text-soft); font-size: .88rem; }
.footer-social { display: flex; gap: 8px; } .soc { font: 700 .7rem var(--font); }
.copyright { margin: 0; color: var(--text-soft); font-size: .82rem; }

.bottom-nav { display: none; }

/* ---------- 7. Page blocks ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-5); margin-bottom: var(--sp-5); }
.page-head h1 { margin: 0; display: flex; align-items: center; gap: 10px; }
.page-head p { margin: 4px 0 0; }
.head-user { display: flex; align-items: center; gap: var(--sp-4); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: var(--sp-4); font-size: .88rem; color: var(--text-soft); }
.crumbs span { color: var(--text); font-weight: 600; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 256px; gap: var(--sp-5); align-items: start; }
.home-main, .home-aside { min-width: 0; }
.home-aside .block { margin-bottom: var(--sp-5); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); align-items: start; }
.two-col.wide-left { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.stack > .block { margin-bottom: var(--sp-5); }

/* hero */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--sp-5); padding: var(--sp-6); margin-bottom: var(--sp-5); border-radius: var(--r-xl); overflow: hidden; min-height: 340px; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 300px at 80% 110%, color-mix(in srgb, var(--brand-1) 28%, transparent), transparent 70%), radial-gradient(400px 260px at 100% 0%, color-mix(in srgb, var(--brand-2) 22%, transparent), transparent 70%); pointer-events: none; }
.hero-copy { position: relative; display: flex; flex-direction: column; justify-content: center; gap: var(--sp-3); }
.hero-copy h1 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 800; margin: 0; }
.hero-sub { font-size: 1.12rem; font-weight: 600; margin: 0 0 var(--sp-2); }
.trust-row { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-bottom: var(--sp-4); }
.trust-row li { display: flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 600; line-height: 1.2; max-width: 150px; }
.trust-ic { display: inline-flex; width: 38px; height: 38px; flex: none; align-items: center; justify-content: center; color: var(--price); background: var(--glass-strong); border: 1px solid var(--glass-border); border-radius: 12px; box-shadow: var(--shadow-1); }
.hero-copy .btn { align-self: flex-start; }
.hero-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 280px; }
.hero-slides { position: relative; width: 100%; height: 100%; min-height: 280px; }
.hero-slide { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transform: scale(.97); transition: opacity .5s ease, transform .5s ease, visibility .5s; }
.hero-slide.is-active { opacity: 1; visibility: visible; transform: none; }
.hero-slide img { position: relative; z-index: 1; width: 100%; max-height: 300px; object-fit: contain; border-radius: var(--r-lg); filter: drop-shadow(0 24px 30px rgba(20, 30, 100, .35)); }
.hero-pedestal { position: absolute; left: 6%; right: 6%; bottom: 8px; height: 46px; border-radius: 50%; background: radial-gradient(ellipse at center, color-mix(in srgb, var(--brand-1) 55%, white) 0, transparent 70%); border: 2px solid rgba(255, 255, 255, .6); box-shadow: 0 0 40px color-mix(in srgb, var(--brand-1) 60%, transparent); }
.hero-slide .chip-premium { position: absolute; top: 4px; right: 4px; z-index: 2; }
.hero-price { position: absolute; right: 0; bottom: 0; z-index: 3; display: flex; flex-direction: column; gap: 2px; min-width: 190px; padding: 12px 16px; color: var(--text); background: var(--glass-strong); }
.hero-price:hover { text-decoration: none; } .hero-price .price { font-size: 1.3rem; font-weight: 800; color: var(--price); }
.hero-price small { color: var(--text-soft); display: flex; align-items: center; gap: 4px; }
.hero-ctrl { position: absolute; left: 0; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 10px; }
.hero-dots { display: flex; gap: 6px; } .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--glass-border); border: 1px solid var(--glass-edge); } .dot.is-on { width: 22px; border-radius: 6px; background: var(--accent-grad); }
.hero-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.crystal-art { position: relative; width: 240px; height: 240px; }
.crystal-art i { position: absolute; display: block; background: linear-gradient(135deg, rgba(255, 255, 255, .85), var(--shard-a) 60%, var(--shard-b)); border: 1px solid rgba(255, 255, 255, .8); box-shadow: var(--shadow-3); }
.crystal-art i:nth-child(1) { inset: 20px 60px 40px 20px; clip-path: polygon(50% 0, 100% 35%, 80% 100%, 20% 100%, 0 35%); }
.crystal-art i:nth-child(2) { inset: 80px 10px 20px 110px; clip-path: polygon(50% 0, 100% 40%, 70% 100%, 10% 90%, 0 30%); opacity: .85; }
.crystal-art i:nth-child(3) { inset: 120px 130px 10px 10px; clip-path: polygon(40% 0, 100% 30%, 90% 100%, 0 80%); opacity: .75; }

/* categories strip (reference: coloured glass tiles) */
.cat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: var(--sp-2); margin-bottom: var(--sp-5); }
.cat-tile, .cat-card .cat-art { --t1: #6f86ff; --t2: #b79bff; }
.tile-voitures { --t1: #5f7bff; --t2: #b7a2ff; } .tile-immobilier { --t1: #35c9a0; --t2: #a9f0cf; } .tile-electronique { --t1: #3d8bff; --t2: #8fd0ff; }
.tile-maison { --t1: #8a6bff; --t2: #d3b5ff; } .tile-mode { --t1: #ff7ab8; --t2: #ffc4dc; } .tile-sports { --t1: #3fc979; --t2: #b7ef9f; }
.tile-services { --t1: #ffa23d; --t2: #ffd89a; } .tile-autres { --t1: #7e8cff; --t2: #cdd3ff; }
.cat-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 6px; min-height: 124px; padding: 12px 8px 10px; color: var(--text); font-weight: 700; font-size: .85rem; text-align: center; border-radius: var(--r-lg);
  background: linear-gradient(160deg, color-mix(in srgb, var(--t1) 38%, transparent), color-mix(in srgb, var(--t2) 30%, transparent)); border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-2), inset 0 1px 0 rgba(255, 255, 255, .6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: transform .2s, box-shadow .2s; }
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-3), inset 0 1px 0 rgba(255, 255, 255, .7); text-decoration: none; }
.cat-art { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; color: #fff; background: linear-gradient(145deg, var(--t1), var(--t2)); border-radius: 20px; box-shadow: 0 10px 20px color-mix(in srgb, var(--t1) 45%, transparent), inset 0 2px 0 rgba(255, 255, 255, .5); }
.cat-art .ic { width: 34px; height: 34px; }
.cat-name { line-height: 1.15; }

/* listing cards (reference: raised glass cards) */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: var(--sp-4); }
.card-listing { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: var(--shadow-2), inset 0 1px 0 rgba(255, 255, 255, .7); transition: transform .22s ease, box-shadow .22s ease; }
.card-listing:hover, .card-listing:focus-within { transform: translateY(-5px); box-shadow: var(--shadow-3), inset 0 1px 0 rgba(255, 255, 255, .8); }
.card-media { position: relative; margin: 8px 8px 0; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 20px; background: var(--glass-inner); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card-listing:hover .card-media img { transform: scale(1.05); }
.card-media .chip { position: absolute; top: 10px; left: 10px; z-index: 2; }
.card-media .chip-status { top: auto; bottom: 10px; }
.fav-form { position: absolute; top: 10px; right: 10px; z-index: 4; margin: 0; }
.fav-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; color: var(--text-soft); background: rgba(255, 255, 255, .92); border: 0; border-radius: 50%; box-shadow: var(--shadow-1); cursor: pointer; transition: transform .15s, color .15s; }
.fav-btn:hover { transform: scale(1.1); text-decoration: none; }
.fav-btn.is-on { color: #ff3b6b; } .fav-btn.is-on .ic, .fav-wide.is-on .ic { fill: currentColor; }
a.fav-btn { position: absolute; top: 10px; right: 10px; z-index: 4; }
.card-body { padding: 12px 16px 6px; }
.card-title { margin: 0 0 4px; font-size: .98rem; font-weight: 700; }
.card-title a { color: var(--text); } .card-title a:hover { text-decoration: none; }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-price { margin: 0 0 4px; font-size: 1.3rem; font-weight: 800; color: var(--price); }
.card-loc { display: flex; align-items: center; gap: 4px; margin: 0; font-size: .85rem; color: var(--text-soft); }
.card-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding: 10px 16px 12px; font-size: .78rem; color: var(--text-soft); }
.card-foot span { display: inline-flex; align-items: center; gap: 4px; }

.mini-list { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.mini-item { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; }
.mini-item img { width: 72px; height: 56px; object-fit: cover; border-radius: 12px; box-shadow: var(--shadow-1); }
.mini-item a { display: block; font-weight: 700; color: var(--text); font-size: .88rem; line-height: 1.25; }
.mini-item strong { display: block; color: var(--price); } .mini-item small { display: flex; align-items: center; gap: 3px; color: var(--text-soft); font-size: .75rem; }
.premium-box h2 { margin-bottom: var(--sp-4); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--sp-3); padding: var(--sp-4); margin-bottom: var(--sp-5); }
.feature { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.feature strong { display: block; font-size: .88rem; line-height: 1.2; } .feature small { display: block; color: var(--text-soft); font-size: .76rem; line-height: 1.25; margin-top: 2px; }
.feature-ic { display: inline-flex; width: 42px; height: 42px; flex: none; align-items: center; justify-content: center; color: #fff; background: var(--accent-grad); border-radius: 50%; box-shadow: 0 6px 14px rgba(59, 91, 255, .35); }

.themes { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 3fr); gap: var(--sp-5); align-items: center; padding: var(--sp-5); margin-bottom: var(--sp-5); }
.themes h2 { font-size: 1.2rem; } .themes p { color: var(--text-soft); font-size: .85rem; margin: 0; }
.theme-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); }
.theme-card { display: flex; flex-direction: column; gap: 8px; padding: 8px; color: var(--text); border-radius: var(--r-md); background: var(--glass-inner); border: 1px solid var(--glass-border); }
.theme-card:hover { text-decoration: none; box-shadow: var(--shadow-2); }
.theme-card.is-current { outline: 2px solid var(--brand-1); }
.theme-prev { display: grid; grid-template-columns: 1fr 2fr; grid-template-rows: 1fr 1fr; gap: 4px; aspect-ratio: 16 / 10; padding: 6px; border-radius: 10px; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.theme-prev i { border-radius: 5px; background: rgba(255, 255, 255, .55); } .theme-prev i:first-child { grid-row: 1 / 3; }
.th-light { --c1: #c9dcff; --c2: #ffd6ec; } .th-dark { --c1: #1a1250; --c2: #0b2a5e; } .th-green { --c1: #bff0d6; --c2: #e6ffcf; } .th-pink { --c1: #ffd3e8; --c2: #f1d4ff; }
.th-dark .theme-prev i { background: rgba(120, 140, 255, .35); }
.theme-label { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 600; }
.radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--text-faint); } .is-current .radio { border: 5px solid var(--brand-1); }

.filter-card .field { margin-bottom: var(--sp-3); }
.sortbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: var(--sp-4); }
.sortbar select { width: auto; min-height: 40px; }
.sortbar label { font-weight: 600; color: var(--text-soft); font-size: .88rem; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-5); }
.cat-card { padding: var(--sp-5); }
.cat-card header { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-3); } .cat-card h2 { margin: 0; } .cat-card h2 a { color: var(--text); }
.cat-card small { color: var(--text-soft); }
.cat-card li a { display: flex; align-items: center; gap: 8px; padding: 9px 4px; color: var(--text); border-top: 1px solid var(--glass-edge); } .cat-card li a:hover { color: var(--price); text-decoration: none; }

.empty { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); padding: var(--sp-6) var(--sp-4); text-align: center; color: var(--text-soft); }
.empty p { margin: 0; } .empty-ic { display: inline-flex; width: 72px; height: 72px; align-items: center; justify-content: center; color: var(--price); background: var(--glass-strong); border-radius: 50%; box-shadow: var(--shadow-1); }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: var(--sp-5); }
.page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 10px; font-weight: 700; color: var(--text); background: var(--glass-inner); border: 1px solid var(--glass-border); border-radius: 12px; }
.page-btn:hover { text-decoration: none; box-shadow: var(--shadow-2); } .page-btn.is-current { color: #fff; background: var(--accent-grad); border-color: transparent; } .page-gap { color: var(--text-faint); }

/* listing detail */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: var(--sp-5); margin-bottom: var(--sp-5); align-items: start; }
.gallery { padding: 14px; } .gallery-main { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-md); background: var(--glass-inner); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; } .gallery-main .chip { position: absolute; top: 12px; left: 12px; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumb { padding: 0; width: 84px; height: 64px; flex: none; overflow: hidden; border: 2px solid transparent; border-radius: 12px; background: none; cursor: pointer; opacity: .75; }
.thumb img { width: 100%; height: 100%; object-fit: cover; } .thumb.is-on, .thumb:hover { opacity: 1; border-color: var(--brand-1); }
.detail-title { font-size: 1.5rem; } .detail-price { margin: 0 0 var(--sp-3); font-size: 2rem; font-weight: 800; color: var(--price); }
.facts { display: grid; gap: 8px; margin-bottom: var(--sp-4); color: var(--text-soft); font-size: .92rem; } .facts li { display: flex; align-items: center; gap: 8px; }
.seller { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: var(--sp-4); } .seller small { display: flex; align-items: center; gap: 4px; color: var(--text-soft); }
.contact-form textarea { min-height: 110px; }
.fav-wide { margin: var(--sp-3) 0; }
.report-box { margin-top: var(--sp-3); } .report-box summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--text-soft); font-size: .88rem; font-weight: 600; }
.report-box form { margin-top: var(--sp-3); }
.prose { line-height: 1.7; } .prose h2 { margin-top: var(--sp-5); } .prose p { max-width: 75ch; }
.thumb-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--sp-4); } .thumb-row img { border-radius: 12px; box-shadow: var(--shadow-1); }

/* form helpers */
.form-grid { display: grid; gap: 0; }
.form-actions { position: sticky; bottom: 12px; z-index: 10; display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: flex-end; padding: 14px 18px; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--sp-5); text-align: center; color: var(--text-soft); border: 2px dashed var(--glass-edge); border-radius: var(--r-md); background: var(--glass-inner); cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--brand-1); background: var(--glass-strong); }
.dropzone input { max-width: 260px; margin-top: 8px; }
.preview-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--sp-3); } .preview-list li { width: 86px; height: 66px; overflow: hidden; border-radius: 10px; box-shadow: var(--shadow-1); } .preview-list img { width: 100%; height: 100%; object-fit: cover; }
.img-manager { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-4); }
.img-item { position: relative; overflow: hidden; border-radius: var(--r-md); border: 2px solid transparent; background: var(--glass-inner); } .img-item.is-primary { border-color: var(--brand-1); }
.img-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; } .img-item .chip { position: absolute; top: 8px; left: 8px; }
.img-actions { display: flex; justify-content: center; gap: 4px; padding: 6px; }

/* auth */
.auth-card { max-width: 460px; margin: var(--sp-5) auto; padding: var(--sp-6); text-align: center; }
.auth-card form { text-align: left; } .auth-ic { display: inline-flex; width: 72px; height: 72px; margin-bottom: var(--sp-3); align-items: center; justify-content: center; color: #fff; background: var(--accent-grad); border-radius: 22px; box-shadow: 0 12px 26px rgba(59, 91, 255, .38); }
.auth-links { margin: var(--sp-3) 0 0; font-size: .9rem; }

/* account / lists */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-5); }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; color: var(--text); } .stat:hover { text-decoration: none; }
.stat strong { font-size: 1.7rem; font-weight: 800; color: var(--price); } .stat span { color: var(--text-soft); font-size: .84rem; font-weight: 600; }
.stat-ic { display: inline-flex; width: 36px; height: 36px; margin-bottom: 6px; align-items: center; justify-content: center; color: #fff; background: var(--accent-grad); border-radius: 12px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; margin-bottom: var(--sp-5); border-radius: var(--r-pill); }
.tab { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 16px; font-weight: 600; font-size: .88rem; color: var(--text); border-radius: var(--r-pill); } .tab:hover { background: var(--glass-inner); text-decoration: none; }
.tab.is-on { color: #fff; background: var(--accent-grad); } .tab .count { margin: 0; }
.row-list { display: grid; gap: var(--sp-3); }
.row-item { display: flex; align-items: center; gap: var(--sp-4); padding: 12px; background: var(--glass-inner); border: 1px solid var(--glass-border); border-radius: var(--r-md); }
.row-item.unread { border-left: 5px solid var(--brand-1); }
.row-item > img { width: 96px; height: 72px; object-fit: cover; border-radius: 12px; flex: none; }
.row-main { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.row-title { font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; } .row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .82rem; color: var(--text-soft); }
.row-excerpt { font-size: .85rem; color: var(--text-soft); } .row-reason { font-size: .85rem; color: var(--danger); font-weight: 600; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .row-actions form { margin: 0; }
.notif-ic { display: inline-flex; width: 42px; height: 42px; flex: none; align-items: center; justify-content: center; color: var(--price); background: var(--glass-strong); border-radius: 50%; }
.chat-log { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding: 4px 2px var(--sp-4); }
.bubble { align-self: flex-start; max-width: min(560px, 85%); padding: 10px 16px; background: var(--glass-strong); border: 1px solid var(--glass-border); border-radius: 20px 20px 20px 6px; } .bubble p { margin: 0 0 4px; }
.bubble small { color: var(--text-faint); font-size: .74rem; } .bubble.mine { align-self: flex-end; color: #fff; background: var(--accent-grad); border-color: transparent; border-radius: 20px 20px 6px 20px; } .bubble.mine small { color: rgba(255, 255, 255, .8); }
.chat-form { display: flex; gap: var(--sp-3); align-items: flex-end; } .chat-form textarea { min-height: 52px; }

/* error pages */
body.plain { display: grid; place-items: center; padding: var(--sp-5); }
.error-card { width: min(520px, 100%); padding: var(--sp-6); text-align: center; } .error-code { margin: 0; font-size: 5rem; font-weight: 800; line-height: 1; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- 8. Motion & responsive ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); } 50% { transform: translateY(-14px) rotate(var(--rot, 0deg)); } }
.shard.s2 { --rot: 18deg; animation: floaty 16s ease-in-out infinite; } .shard.s3 { --rot: 0deg; animation: floaty 20s ease-in-out infinite reverse; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 1180px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .home-aside { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--sp-5); } .home-aside .block { margin-bottom: 0; }
  .topbar { grid-template-columns: 1fr auto; } .searchbar { grid-column: 1 / -1; order: 3; }
}
@media (max-width: 960px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main" "foot"; padding: var(--sp-3); gap: var(--sp-4); }
  .menu-toggle { display: inline-flex; }
  .sidebar { position: fixed; z-index: 60; left: 12px; top: 12px; bottom: 12px; width: min(300px, calc(100vw - 24px)); max-height: none; transform: translateX(-120%); transition: transform .25s ease; background: var(--glass-strong); }
  .sidebar.is-open { transform: none; }
  .two-col, .two-col.wide-left, .detail-grid, .themes { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr); padding: var(--sp-5); } .hero-stage { min-height: 260px; }
  .user-name, .lang-code { display: none; }
}
@media (max-width: 720px) {
  body { padding-bottom: 76px; }
  .topbar { gap: var(--sp-3); } .brand-text small { display: none; } .brand-text strong { font-size: 1.2rem; }
  .top-actions { gap: 6px; } .top-actions > .icon-btn:nth-child(2) { display: none; }
  .block, .page-head { padding: var(--sp-4); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); } .card-price { font-size: 1.1rem; } .card-foot { flex-direction: column; gap: 2px; }
  .theme-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } .cat-tile { min-height: 104px; font-size: .74rem; } .cat-art { width: 48px; height: 48px; border-radius: 16px; } .cat-art .ic { width: 26px; height: 26px; }
  .hero-price { position: relative; margin-top: var(--sp-3); } .hero-stage { flex-direction: column; } .hero-ctrl { position: static; margin-top: 8px; }
  .row-item { flex-wrap: wrap; } .row-item > img { width: 72px; height: 54px; }
  .footer { flex-direction: column; align-items: flex-start; }
  .bottom-nav { position: fixed; z-index: 50; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-around; padding: 6px 8px; border-radius: var(--r-xl); }
  .bottom-nav a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; padding: 6px 2px; font-size: .68rem; font-weight: 600; color: var(--text-soft); border-radius: 14px; }
  .bottom-nav a:hover { text-decoration: none; } .bottom-nav a.is-active { color: var(--price); }
  .bottom-nav .bn-add { flex: none; width: 52px; height: 52px; margin-top: -26px; justify-content: center; color: #fff; background: var(--accent-grad); border-radius: 50%; box-shadow: 0 10px 22px rgba(59, 91, 255, .45); }
  .bottom-nav .badge-dot { top: 0; right: 14px; }
  .form-actions { bottom: 88px; }
  .auth-card { padding: var(--sp-5); }
}
@media (max-width: 420px) {
  .card-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .trust-row li { max-width: none; }
}
@media print { .sidebar, .topbar, .footer, .bottom-nav, .bg-crystal { display: none !important; } .app-shell { display: block; } }

/* ---------- 99. Fine-tuning after visual comparison ---------- */
.card-foot { flex-wrap: wrap; gap: 2px 8px; padding: 8px 12px 10px; font-size: .72rem; }
.card-foot span { white-space: nowrap; }
.card-media .chip { top: 8px; left: 8px; padding: 3px 8px; font-size: .68rem; }
.home-aside select, .filters select { font-size: .86rem; padding-right: 28px; text-overflow: ellipsis; }
@media (max-width: 1100px) { .topbar { grid-template-columns: minmax(0, 1fr) auto; } .topbar > * { min-width: 0; } .searchbar { min-width: 0; } }
@media (max-width: 640px) {
  .app-shell, .topbar, .main { max-width: 100%; }
  .brand-link small, .brand-tag, .brand-text small { display: none; }
  .top-actions { gap: 6px; } .top-actions .icon-btn { width: 40px; height: 40px; }
  .top-actions .btn { padding-inline: 12px; }
  .shard { max-width: 100vw; }
  .bg-crystal { overflow: hidden; contain: paint; }
}
html, body { max-width: 100%; overflow-x: clip; }
@media (max-width: 900px) {
  .hero-slides { min-height: 340px; }
  .hero-slide { flex-direction: column; gap: var(--sp-3); justify-content: flex-start; }
  .hero-slide img { max-height: 210px; }
  .hero-price { position: relative; right: auto; bottom: auto; margin-top: 0; width: 100%; min-width: 0; }
}
@media (max-width: 640px) { .top-actions > a.btn { display: none; } .brand { padding: 8px 10px; } }

/* ---------- 100. Fixes from live-site review ---------- */
.app-shell { min-height: 100vh; grid-template-rows: auto 1fr auto; }
.app-shell > .sidebar, .app-shell > main { align-self: start; }
input[type="file"] { padding: 8px; border: 1px dashed var(--glass-border); border-radius: 14px; background: var(--glass-inner); cursor: pointer; }
input[type="file"]::file-selector-button { margin-right: 12px; padding: 8px 14px; border: 0; border-radius: 999px; font: 600 .85rem var(--font); color: #fff; background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); cursor: pointer; }
.home-aside select, .filters select, .filter-card select { font-size: .8rem; padding-left: 38px; padding-right: 22px; }

/* 101 - WhatsApp, consent banner, ads */
.btn-whatsapp { background: #1faa59; border-color: transparent; color: #fff; --btn-bg: #1faa59; --btn-fg: #fff; margin-top: 10px; }
.btn-whatsapp:hover { background: #178f49; color: #fff; }
.seller-phone { margin: 8px 0 0; font-size: .9rem; }
.ad-slot { display: block; margin: 18px 0; min-height: 90px; text-align: center; }
.ad-slot[hidden] { display: none; }
.ad-slot small { display: block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; opacity: .6; margin-bottom: 4px; }
.adsbygoogle { display: block; }
.consent-banner { position: fixed; z-index: 90; left: 16px; right: 16px; bottom: 76px; max-width: 640px; margin: 0 auto; padding: 16px 18px; display: grid; gap: 12px; }
.consent-banner[hidden] { display: none; }
.consent-banner p { margin: 0; font-size: .9rem; }
.consent-banner .btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
@media (min-width: 900px) { .consent-banner { bottom: 20px; } }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.btn-whatsapp { margin-bottom: 10px; }
