/* Sims4Mods — v2 design + responsive overhaul (2026-06-14)
   Aesthetic: dark mode with soft pink/lavender accents, lots of breathing room, real image-driven layout
   Responsive breakpoints:
     - Desktop:    1280px+
     - Laptop:     1024–1279px
     - Tablet:      768–1023px
     - Mobile lg:   481–767px
     - Mobile sm:   ≤480px   */

:root {
  --bg: #0c0a10;
  --bg-2: #15121c;
  --bg-3: #1f1a2a;
  --bg-4: #2a2438;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 110, 199, 0.4);

  --text: #f5f3f7;
  --text-dim: #b8b3c4;
  --text-mute: #6e6a7a;

  --pink: #ff6ec7;
  --pink-2: #ff85d3;
  --pink-glow: rgba(255, 110, 199, 0.25);
  --purple: #b48cff;
  --lavender: #d4b3ff;
  --cyan: #7ee8ff;

  --grad-1: linear-gradient(135deg, #ff6ec7 0%, #b48cff 100%);
  --grad-2: linear-gradient(135deg, #ff6ec7 0%, #ff85d3 50%, #b48cff 100%);
  --grad-soft: linear-gradient(180deg, rgba(255, 110, 199, 0.08) 0%, transparent 100%);

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 30px rgba(255, 110, 199, 0.15);

  /* Standard spacing tokens */
  --gutter: 24px;
  --gutter-sm: 16px;
  --container-max: 1280px;
  --section-y: 32px;            /* vertical padding for standard page sections */
  --section-y-sm: 20px;         /* mobile equivalent */
  --section-y-lg: 48px;         /* hero / big landing sections */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;          /* prevent any horizontal scroll from a child */
}

a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--pink); }

img, svg, video { max-width: 100%; display: block; }

/* Prevent iOS zoom on input focus — must be at least 16px */
input, select, textarea { font-size: 16px; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
}
@media (max-width: 768px) {
  .container { padding: var(--section-y-sm) var(--gutter-sm); }
}

/* Container variants — applied via class, never inline style */

/* Narrow content (about, 404, single outfit) */
.container--narrow { max-width: 700px; }
@media (max-width: 768px) { .container--narrow { max-width: 100%; } }

/* Medium (outfit detail, outfit-idea detail) */
.container--medium { max-width: 1000px; }

/* Tight (404, centered card pages) */
.container--tight { max-width: 600px; }

/* Hero (full-bleed interior) — extra top/bottom padding */
.container--hero { padding: 64px var(--gutter) 48px; }
@media (max-width: 768px) { .container--hero { padding: 40px var(--gutter-sm) 28px; } }

/* Section spacing — none on sides, vertical only */
.container--bleed { padding-left: 0; padding-right: 0; }

/* ===== HEADER ===== */
header.site {
  background: rgba(12, 10, 16, 0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
header.site .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
  max-width: var(--container-max);
  margin: 0 auto;
  gap: 20px;
  min-height: 64px;
}
.logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.logo::before { content: '💕'; font-size: 20px; }
.logo b { font-weight: 800; color: var(--text); }
.logo b:last-child {
  background: var(--grad-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* DESKTOP nav (≥801px) */
nav.main {
  display: flex;
  gap: 24px;
  align-items: center;
  flex: 1;
  justify-content: center;
  min-width: 0;
}
nav.main a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  white-space: nowrap;
}
nav.main a:hover { color: var(--text); }
nav.main a.active { color: var(--text); }
nav.main a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--grad-1);
  border-radius: 2px;
}

.search-box {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 16px;            /* 16px prevents iOS zoom on focus */
  width: 220px;
  transition: all 0.2s;
  flex-shrink: 0;
  -webkit-appearance: none;
  appearance: none;
}
.search-box:focus {
  outline: none;
  border-color: var(--pink);
  background: var(--bg-2);
  box-shadow: 0 0 0 4px var(--pink-glow);
}
.search-box::placeholder { color: var(--text-mute); }

.auth-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.auth-nav .login-link {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.auth-nav .login-link:hover { color: var(--text); }
.auth-nav .signup-btn {
  background: var(--grad-1);
  color: white;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.auth-nav .signup-btn:hover {
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--pink-glow);
}
.auth-nav .user-chip {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

/* Hamburger — hidden on desktop, shown ≤800px */
.hamburger {
  display: none;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 40px; height: 40px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.hamburger:hover { background: var(--bg-4); }
.hamburger:active { transform: scale(0.96); }
.hamburger .bars {
  display: block;
  width: 20px; height: 2px;
  background: currentColor;
  position: relative;
  transition: background 0.15s;
}
.hamburger .bars::before,
.hamburger .bars::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s, top 0.2s, bottom 0.2s;
}
.hamburger .bars::before { top: -6px; }
.hamburger .bars::after  { bottom: -6px; }
.hamburger[aria-expanded="true"] .bars { background: transparent; }
.hamburger[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.hamburger[aria-expanded="true"] .bars::after  { bottom: 0; transform: rotate(-45deg); }

/* Mobile drawer — hidden on desktop, slides in from the right at ≤800px */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
}
.mobile-drawer .scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.2s;
}
.mobile-drawer .panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(360px, 90vw);
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  padding: 80px 24px 24px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
  -webkit-overflow-scrolling: touch;
}
.mobile-drawer .close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px; height: 36px;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.mobile-drawer .close:hover { background: var(--bg-4); }
.mobile-drawer a {
  display: flex;
  align-items: center;
  padding: 14px 12px;
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 16px;
  font-weight: 500;
  min-height: 48px;
}
.mobile-drawer a:hover,
.mobile-drawer a.active { background: var(--bg-3); color: var(--text); }
.mobile-drawer .drawer-section {
  margin: 16px 0 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-mute);
  font-weight: 700;
  padding: 0 12px;
}
.mobile-drawer .drawer-search {
  margin: 8px 0 16px;
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 16px;            /* >=16px prevents iOS zoom on focus */
  -webkit-appearance: none;
  appearance: none;
}
.mobile-drawer .drawer-search:focus {
  outline: none;
  border-color: var(--pink);
}
.mobile-drawer .drawer-auth {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mobile-drawer .drawer-auth a {
  justify-content: center;
  font-weight: 600;
}
.mobile-drawer .drawer-auth .signup-btn-mobile {
  background: var(--grad-1);
  color: white;
}
.mobile-drawer[data-open="true"] {
  pointer-events: auto;
  visibility: visible;
}
.mobile-drawer[data-open="true"] .scrim { opacity: 1; }
.mobile-drawer[data-open="true"] .panel { transform: translateX(0); }
body.drawer-open { overflow: hidden; }

@media (max-width: 768px) {
  nav.main { display: none; }
  .hamburger { display: inline-flex; }
  .search-box { width: 160px; }
  header.site .inner { gap: 10px; padding: 12px var(--gutter-sm); }
}
@media (max-width: 600px) {
  /* Hide the inline search box at small widths — use the drawer search */
  header.site form[role="search"] { display: none; }
  .auth-nav .login-link { display: none; }
  .auth-nav .signup-btn { display: none; }
  .hamburger { margin-left: 4px; }
}
@media (max-width: 480px) {
  .search-box { width: 130px; padding: 9px 12px; font-size: 16px; }
  .logo { font-size: 18px; }
  .logo::before { font-size: 18px; }
  .auth-nav .signup-btn { padding: 7px 12px; font-size: 13px; }
}

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding: 100px var(--gutter) 60px;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 110, 199, 0.15) 0%, transparent 60%),
              radial-gradient(ellipse 60% 40% at 30% 20%, rgba(180, 140, 255, 0.1) 0%, transparent 50%),
              var(--grad-soft);
  position: relative;
  overflow: hidden;
}
@media (max-width: 600px) {
  .hero { padding: 60px var(--gutter-sm) 40px; }
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, var(--bg) 100%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 900;
  letter-spacing: -2.5px;
  line-height: 1;
  margin-bottom: 20px;
}
.hero h1 .grad {
  background: var(--grad-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  color: var(--text-dim);
  font-size: 18px;
  max-width: 620px;
  margin: 0 auto 32px;
  line-height: 1.6;
}
.hero .stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero .stat { text-align: center; }
.hero .stat-num {
  font-size: 32px;
  font-weight: 800;
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}
.hero .stat-label {
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  margin-top: 4px;
}
.hero .search-large {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px;
  box-shadow: var(--shadow);
}
.hero .search-large input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 20px;
  color: var(--text);
  font-size: 16px;            /* 16px prevents iOS zoom on focus */
}
.hero .search-large input:focus { outline: none; }
.hero .search-large input::placeholder { color: var(--text-mute); }
.hero .search-large button {
  background: var(--grad-1);
  border: none;
  color: white;
  font-weight: 700;
  padding: 0 28px;
  border-radius: 100px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s;
}
.hero .search-large button:hover { transform: scale(1.04); }

/* ===== SECTIONS ===== */
section { padding: 12px 0; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-head h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-head .see-all {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.section-head .see-all:hover { color: var(--pink); }
.section-head .see-all::after { content: '→'; transition: transform 0.2s; }
.section-head .see-all:hover::after { transform: translateX(3px); }

/* ===== CATEGORY PILLS ===== */
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pill:hover {
  background: var(--bg-3);
  border-color: var(--border-hover);
  color: var(--text);
  text-decoration: none;
}
.pill.active {
  background: var(--grad-1);
  color: white;
  border-color: transparent;
}
.pill .count {
  color: var(--text-mute);
  font-size: 11px;
  font-weight: 600;
}
.pill.active .count { color: rgba(255,255,255,0.7); }

/* ===== THUMBNAIL CARDS (homepage categories + styles) ===== */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
@media (max-width: 600px) { .thumb-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

.thumb-card {
  display: block;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s;
  color: var(--text);
}
.thumb-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  color: var(--text);
}
.thumb-card__tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 4 / 5;
  gap: 1px;
  background: var(--bg-3);
}
.thumb-card__tile {
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2)) center / cover no-repeat;
  transition: transform 0.4s, filter 0.2s;
}
.thumb-card__tile--placeholder {
  background: linear-gradient(135deg, rgba(255, 110, 199, 0.18), rgba(180, 140, 255, 0.18));
}
.thumb-card:hover .thumb-card__tile { filter: brightness(1.05); }
.thumb-card__body {
  padding: 14px 16px 16px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.thumb-card__body h3 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  text-transform: capitalize;
}
.thumb-card__count {
  font-size: 12px;
  color: var(--text-mute);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.thumb-card:hover .thumb-card__count { color: var(--pink); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.grid.cols-4 {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
@media (max-width: 768px) {
  .grid, .grid.cols-4 {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }
}
@media (max-width: 480px) {
  .grid, .grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}
.card .img-wrap {
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2)) center / cover no-repeat;
  position: relative;
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.card:hover img { transform: scale(1.08); }
.card .card-body, .card > .body { padding: 14px 16px 16px; }
.card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .creator {
  font-size: 12px;
  color: var(--text-mute);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.card .badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* === Modern minimal badges ===
   All badges share the same shape (pill), size, and neutral glass background.
   Color is only an accent (border + text) so the card stays calm and
   professional, not a rainbow. */
.badge {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 10px;
  border-radius: 999px;          /* pill — same shape for every badge type */
  font-size: 10.5px;
  line-height: 1.3;
  color: var(--text-dim);
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.1px;
  text-transform: none;          /* keep original casing — Title Case in DB */
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
/* Category — pink accent (the only "loud" colour — anchors the card) */
.badge.cat {
  background: rgba(255, 110, 199, 0.10);
  color: #ff8fc8;
  border-color: rgba(255, 110, 199, 0.28);
  font-weight: 600;
}
/* Style — purple accent (aesthetic vibe) */
.badge.style {
  color: #c9b3ff;
  border-color: rgba(180, 140, 255, 0.22);
}
/* Colour (rarely shown on browse cards) — cyan accent */
.badge.color {
  color: #7ee8ff;
  border-color: rgba(126, 232, 255, 0.22);
}
/* Body type (maxis-match / alpha) — amber accent */
.badge.body {
  color: #ffd28a;
  border-color: rgba(255, 200, 100, 0.22);
}
/* Attribute (physical trait) — teal accent (matches browse card attr styling) */
.badge.attr {
  color: #7ee8d4;
  border-color: rgba(126, 232, 212, 0.22);
}
/* Low-poly — green */
.badge.lowpoly {
  color: #78ffaa;
  border-color: rgba(120, 255, 170, 0.25);
}
/* Early access (admin only) — red */
.badge.early {
  color: #ff8a8a;
  border-color: rgba(255, 110, 110, 0.25);
}
/* Demographics fallback */
.badge.demo {
  color: var(--text-dim);
}

/* ===== LISTICLE PAGE (single item rows) ===== */
/* ===== LISTICLE PAGE — modern magazine layout ===== */

/* ---- Hero (gradient bg + image tile mosaic) ---- */
.listicles-hero {
  position: relative;
  padding: 36px var(--gutter) 56px;
  background: radial-gradient(ellipse 70% 60% at 80% 20%, rgba(180, 140, 255, 0.15) 0%, transparent 60%),
              radial-gradient(ellipse 60% 50% at 20% 80%, rgba(255, 110, 199, 0.15) 0%, transparent 60%),
              linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 768px) {
  .listicles-hero { padding: 24px var(--gutter-sm) 40px; }
}
.listicles-hero__bg {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  padding: 24px var(--gutter);
  opacity: 0.12;
  filter: blur(2px);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 80%);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 80%);
  pointer-events: none;
}
.listicles-hero__bg .listicles-hero__tile {
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2)) center / cover no-repeat;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 800;
  color: var(--text-mute);
  background-color: var(--bg-3);
}
.listicles-hero__bg .listicles-hero__tile.is-placeholder {
  background: linear-gradient(135deg, rgba(255, 110, 199, 0.15), rgba(180, 140, 255, 0.15));
}
.listicles-hero__inner {
  position: relative;
  max-width: var(--container-max);
  margin: 0 auto;
  z-index: 2;
}
.listicles-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 12px 0 10px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  backdrop-filter: blur(8px);
}
.listicles-hero__eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.listicles-hero__title {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 12px;
  max-width: 900px;
}
.listicles-hero__title-accent {
  background: var(--grad-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.listicles-hero__subtitle {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 720px;
  margin-bottom: 20px;
}
.listicles-hero__subtitle strong {
  color: var(--text);
  font-weight: 700;
}
.listicles-hero__stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.listicles-hero__stat {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 18px;
  min-width: 110px;
  backdrop-filter: blur(12px);
  transition: border-color 0.2s, transform 0.2s;
}
.listicles-hero__stat:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.listicles-hero__stat-num {
  font-size: 24px;
  font-weight: 800;
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 3px;
}
.listicles-hero__stat-label {
  font-size: 10px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

/* ---- Featured picks strip (top 3) ---- */
.featured-strip {
  margin-top: -32px;
  position: relative;
  z-index: 5;
}
.featured-strip .section-head { margin-bottom: 22px; }
.featured-strip__kicker {
  font-size: 11px;
  color: var(--pink);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  margin-bottom: 6px;
}
.featured-strip__hint {
  font-size: 12px;
  color: var(--text-mute);
  font-weight: 500;
}
.featured-strip__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 800px) { .featured-strip__grid { grid-template-columns: 1fr; gap: 14px; } }
.featured-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s;
  display: block;
  color: var(--text);
}
.featured-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  color: var(--text);
}
.featured-card--rank1 {
  background: linear-gradient(135deg, rgba(255, 110, 199, 0.12), rgba(180, 140, 255, 0.06) 60%, var(--bg-2) 100%);
  border-color: rgba(255, 110, 199, 0.3);
}
.featured-card__img {
  position: relative;
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.featured-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.featured-card:hover .featured-card__img img { transform: scale(1.06); }
.featured-card__img.is-placeholder {
  background: linear-gradient(135deg, rgba(255, 110, 199, 0.2), rgba(180, 140, 255, 0.2));
}
.featured-card__placeholder-letter {
  font-size: 96px;
  font-weight: 900;
  color: var(--text-mute);
  opacity: 0.5;
}
.featured-card__rank {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 100px;
  letter-spacing: 0.5px;
}
.featured-card--rank1 .featured-card__rank { background: var(--grad-1); }
.featured-card__badge {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
}
.featured-card__body { padding: 18px 20px 20px; }
.featured-card__body h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
  color: var(--text);
}
.featured-card__creator {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.featured-card__creator span { color: var(--pink); font-weight: 500; }
.featured-card__meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-mute);
  font-weight: 500;
}

/* ---- Toolbar (count + sort) ---- */
.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  margin: 8px 0 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.list-toolbar__count {
  font-size: 14px;
  color: var(--text-dim);
}
.list-toolbar__count strong { color: var(--text); font-weight: 700; }
.list-toolbar__page { color: var(--text-mute); }
.list-toolbar__sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-dim);
}
.list-toolbar__sort select {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b8b3c4' stroke-width='2.5'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  transition: border-color 0.2s;
}
.list-toolbar__sort select:focus,
.list-toolbar__sort select:hover {
  border-color: var(--border-hover);
  outline: none;
}

/* ---- Item row (magazine card) ---- */
.listicles { display: grid; gap: 16px; }
.listicles .row {
  display: grid;
  grid-template-columns: 240px 1fr 200px;
  gap: 24px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.listicles .row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--grad-1);
  opacity: 0;
  transition: opacity 0.2s;
}
.listicles .row:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.listicles .row:hover::before { opacity: 1; }
.listicles .row__media {
  position: relative;
  display: block;
  width: 240px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.listicles .row__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.listicles .row:hover .row__media img { transform: scale(1.05); }
.listicles .row__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 110, 199, 0.18), rgba(180, 140, 255, 0.18));
  gap: 4px;
}
.listicles .row__placeholder-letter {
  font-size: 80px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1;
}
.listicles .row__placeholder-sub {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}
.listicles .row__num {
  position: absolute;
  top: 10px; left: 10px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 0.5px;
}
.listicles .row__pill {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(255, 110, 110, 0.2);
  backdrop-filter: blur(8px);
  color: #ff8a8a;
  border: 1px solid rgba(255, 110, 110, 0.3);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
  letter-spacing: 0.3px;
}
.listicles .row__rank-mobile {
  display: none;
  font-size: 12px;
  font-weight: 800;
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}
.listicles .row__body { min-width: 0; padding: 4px 0; }
.listicles .row__title-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}
.listicles .row__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin: 0;
}
.listicles .row__title a { color: var(--text); }
.listicles .row__title a:hover { color: var(--pink); }
.listicles .row__creator {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.listicles .row__creator a { color: var(--pink); font-weight: 500; }
.listicles .row__desc {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.listicles .row__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}
.listicles .row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--text-mute);
}
.listicles .row__meta b {
  color: var(--text);
  font-weight: 700;
}
.listicles .row__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: center;
  min-width: 200px;
}
.listicles .row__actions .btn { width: 100%; }
.listicles .row__cta { font-size: 14px; padding: 12px 18px; }

/* ---- Related pills ---- */
.related-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.related-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  transition: all 0.2s;
}
.related-pill:hover {
  background: var(--bg-3);
  border-color: var(--border-hover);
  color: var(--text);
  transform: translateY(-1px);
}
.related-pill__name { font-weight: 600; }
.related-pill__count {
  background: var(--bg-3);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
}
.related-pill:hover .related-pill__count {
  background: var(--pink);
  color: white;
}

/* ---- Pro tip footer ---- */
.protip {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  background: linear-gradient(135deg, rgba(255, 110, 199, 0.06), rgba(180, 140, 255, 0.04));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 32px 0 16px;
}
.protip__icon {
  font-size: 36px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-2);
  border-radius: 50%;
  border: 1px solid var(--border);
}
.protip h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.protip p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
}

@media (max-width: 800px) {
  .listicles .row {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
  .listicles .row__media { width: 100%; }
  .listicles .row__rank-mobile { display: inline-block; }
  .listicles .row__num { display: none; }
  .listicles .row__actions { flex-direction: row; min-width: 0; }
  .listicles .row__actions .btn { flex: 1; }
  .protip { grid-template-columns: 1fr; padding: 20px; }
  .protip__icon { margin: 0 auto; }
  .featured-strip { margin-top: -20px; }
}

/* ===== LISTICLES INDEX PAGE ===== */
.listicles-index-hero {
  position: relative;
  padding: 36px 0 28px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.listicles-index-hero__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 110, 199, 0.18) 0%, transparent 60%),
              radial-gradient(ellipse 50% 40% at 80% 100%, rgba(180, 140, 255, 0.12) 0%, transparent 60%);
  pointer-events: none;
}
.listicles-index-hero .container { position: relative; z-index: 2; }
.listicles-index-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin: 10px 0 8px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  backdrop-filter: blur(8px);
}
.listicles-index-hero__eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
  animation: pulse 2s infinite;
}
.listicles-index-hero__title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 10px;
  max-width: 900px;
}
.listicles-index-hero__title-accent {
  background: var(--grad-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.listicles-index-hero__subtitle {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 720px;
  margin-bottom: 16px;
}
.listicles-index-hero__quicknav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.listicles-index-hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s;
}
.listicles-index-hero__pill:hover {
  background: var(--bg-4);
  border-color: var(--border-hover);
  color: var(--text);
  transform: translateY(-1px);
}
.listicles-index-hero__pill span {
  background: var(--bg-2);
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 100px;
}

/* ---- Featured lists (large cards) ---- */
.featured-lists {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 800px) { .featured-lists { grid-template-columns: 1fr; } }
.featured-list {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s;
  color: var(--text);
}
.featured-list:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  color: var(--text);
}
.featured-list__img {
  position: relative;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 180px;
}
.featured-list__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.featured-list:hover .featured-list__img img { transform: scale(1.05); }
.featured-list__img.is-placeholder {
  background: linear-gradient(135deg, rgba(255, 110, 199, 0.18), rgba(180, 140, 255, 0.18));
}
.featured-list__placeholder-letter {
  font-size: 80px;
  font-weight: 900;
  color: var(--text-mute);
  opacity: 0.5;
}
.featured-list__overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 14px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.7));
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.featured-list__count {
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a1a;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 100px;
}
.featured-list__body { padding: 18px 22px 20px; }
.featured-list__cat {
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  margin-bottom: 6px;
}
.featured-list__body h3 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text);
}
.featured-list__desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured-list__cta {
  font-size: 13px;
  color: var(--pink);
  font-weight: 600;
  transition: gap 0.2s;
}

/* ---- Section sub ---- */
.section-sub {
  font-size: 13px;
  color: var(--text-mute);
  margin-top: 4px;
  font-weight: 500;
}

/* ---- Listicle tile grid (small cards) ---- */
.listicles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
@media (max-width: 600px) { .listicles-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.listicle-tile {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s;
  display: block;
  color: var(--text);
}
.listicle-tile:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: var(--text);
}
.listicle-tile__img {
  position: relative;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.listicle-tile__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.listicle-tile:hover .listicle-tile__img img { transform: scale(1.06); }
.listicle-tile__img.is-placeholder {
  background: linear-gradient(135deg, rgba(255, 110, 199, 0.2), rgba(180, 140, 255, 0.2));
}
.listicle-tile__placeholder-letter {
  font-size: 72px;
  font-weight: 900;
  color: var(--text-mute);
  opacity: 0.5;
}
.listicle-tile__count {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 100px;
}
.listicle-tile__body { padding: 14px 16px 16px; }
.listicle-tile__body h3 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
  color: var(--text);
}
.listicle-tile__sub {
  font-size: 12px;
  color: var(--text-mute);
  font-weight: 500;
}
.listicle-tile__style { color: var(--pink); font-weight: 600; }
.listicle-tile__cat { color: var(--purple); font-weight: 600; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s;
  white-space: nowrap;
  text-align: center;
}
.btn-primary {
  background: var(--grad-1);
  color: white;
  border: none;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--pink-glow);
  color: white;
  text-decoration: none;
}
.btn-secondary {
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-4);
  color: var(--text);
  text-decoration: none;
}

/* ===== ITEM DETAIL ===== */
.item-page {
  display: grid;
  grid-template-columns: minmax(300px, 450px) 1fr;
  gap: 48px;
  padding: 32px 0 48px;
}
.item-page .gallery .main-img {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  aspect-ratio: 2 / 3;
  background: var(--bg-3) center / cover no-repeat;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.item-page h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
  line-height: 1.15;
}
.item-page .creator-link {
  color: var(--text-dim);
  margin-bottom: 20px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.item-page .creator-link .avatar-sm {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--grad-1); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.item-page .creator-link a { color: var(--pink); font-weight: 600; }
.item-page .desc {
  color: var(--text-dim);
  margin-bottom: 24px;
  line-height: 1.7;
  font-size: 15px;
}
.item-page .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.item-page .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.item-page .meta-block {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 24px;
  color: var(--text-mute);
  font-size: 12px;
}
@media (max-width: 800px) {
  .item-page { grid-template-columns: 1fr; gap: 24px; }
}

/* ===== BROWSE PAGE (sidebar) ===== */
.browse-page { display: grid; grid-template-columns: 240px 1fr; gap: 40px; padding: 32px 0 48px; }
@media (max-width: 1024px) {
  .browse-page { grid-template-columns: 220px 1fr; gap: 24px; }
}
.browse-page .sidebar {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  height: fit-content;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-4) transparent;
}
.browse-page .sidebar::-webkit-scrollbar { width: 6px; }
.browse-page .sidebar::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 3px; }
.browse-page .sidebar::-webkit-scrollbar-track { background: transparent; }

/* ===== COLLAPSIBLE FILTER GROUPS ===== */
.browse-page .sidebar .filt {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding: 4px 0;
}
.browse-page .sidebar .filt:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}
.browse-page .sidebar .filt > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 4px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-mute);
  font-weight: 700;
  user-select: none;
  transition: color 0.15s;
}
.browse-page .sidebar .filt > summary::-webkit-details-marker { display: none; }
.browse-page .sidebar .filt > summary:hover { color: var(--text); }
.browse-page .sidebar .filt[open] > summary { color: var(--text); }
.browse-page .sidebar .filt > summary span:first-child { flex: 1; }
.browse-page .sidebar .filt .chev {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-mute);
  width: 14px;
  text-align: center;
  letter-spacing: 0;
}
.browse-page .sidebar .filt[open] .chev { color: var(--pink); }
.browse-page .sidebar .filt .dot-active {
  width: 7px; height: 7px;
  background: var(--pink);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--pink-glow);
  flex-shrink: 0;
}
.browse-page .sidebar .filt .filt-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 0 6px;
}
.browse-page .sidebar a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  margin: 0 -10px;
  color: var(--text-dim);
  font-size: 14px;
  border-radius: 6px;
  transition: all 0.15s;
  border-left: 3px solid transparent;
  padding-left: 13px; /* compensate for the 3px bar so text doesn't shift */
}
.browse-page .sidebar a:hover {
  background: var(--bg-3);
  color: var(--text);
  text-decoration: none;
  border-left-color: var(--border);
}
.browse-page .sidebar a.active {
  background: var(--pink-glow);
  color: var(--pink);
  font-weight: 600;
  border-left-color: var(--pink);
  box-shadow: inset 4px 0 12px -4px rgba(255,110,199,0.25);
}
.browse-page .sidebar a .c {
  font-size: 11px;
  color: var(--text-mute);
  background: var(--bg-3);
  padding: 2px 7px;
  border-radius: 100px;
  transition: all 0.15s;
}
.browse-page .sidebar a.active .c { background: rgba(255,110,199,0.2); color: var(--pink); }
/* "×" remove hint that appears on hover/active filter rows in the sidebar */
.browse-page .sidebar a .l {
  display: inline-flex; align-items: center; gap: 6px;
  flex: 1; min-width: 0;
}
.browse-page .sidebar a .x {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: var(--pink);
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(255,110,199,0.18);
  text-align: center; line-height: 16px;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
  flex-shrink: 0;
}
.browse-page .sidebar a:hover .x { opacity: 0.6; }
.browse-page .sidebar a.active .x { opacity: 1; background: var(--pink); color: #fff; }
.browse-page .sidebar a:hover .x:hover { opacity: 1; background: var(--pink); color: #fff; }
.browse-page .sidebar a.show-more {
  color: var(--text-mute);
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 4px;
  padding: 6px 10px;
  justify-content: flex-start;
}
.browse-page .sidebar a.show-more:hover {
  color: var(--pink);
  background: transparent;
}

/* ===== ADVANCED FILTERS ===== */
.filter-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.filter-head .clear-all {
  font-size: 12px; color: var(--pink); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.filter-head .clear-all:hover { color: #fff; }

.sidebar .toggle {
  display: flex !important; align-items: center; gap: 10px;
  padding: 8px 12px !important; font-size: 13px !important;
  border-radius: 6px;
}
.sidebar .toggle .dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: transparent; border: 2px solid var(--text-mute);
  flex-shrink: 0; transition: all 0.15s;
}
.sidebar .toggle.on { color: var(--pink) !important; }
.sidebar .toggle.on .dot { background: var(--pink); border-color: var(--pink); box-shadow: 0 0 8px var(--pink); }

.swatch-form { padding: 0 4px; }
.swatch-slider {
  width: 100%; -webkit-appearance: none; appearance: none;
  height: 4px; background: var(--border); border-radius: 2px; outline: none;
  margin: 8px 0;
}
.swatch-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--pink); cursor: pointer;
  box-shadow: 0 0 8px rgba(255,110,199,0.5);
}
.swatch-slider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--pink); cursor: pointer; border: 0;
}
.swatch-label {
  font-size: 12px; color: var(--text-mute); text-align: center;
  text-transform: uppercase; letter-spacing: 1px; font-weight: 600;
}

.active-chips-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.chip-clear-all {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--pink);
  background: transparent;
  border: 1.5px solid rgba(255,110,199,0.4);
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.chip-clear-all:hover {
  background: var(--pink);
  border-color: var(--pink);
  color: #fff;
}
.active-chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  flex: 1; min-width: 0;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; font-size: 12px; font-weight: 600;
  background: rgba(255,110,199,0.15); color: var(--pink);
  border-radius: 100px; transition: all 0.15s;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
}
.chip:hover { background: var(--pink); color: #fff; }
.clear-link {
  display: inline-block; margin-top: 12px;
  color: var(--pink); font-weight: 600; text-decoration: underline;
}
@media (max-width: 900px) {
  .browse-page { grid-template-columns: 1fr; }
  .browse-page .sidebar { position: static; }
}

/* ===== CREATOR PAGE ===== */
.creator-hero {
  display: flex;
  gap: 24px;
  padding: 48px 0 32px;
  align-items: center;
}
.creator-hero .avatar {
  width: 110px; height: 110px;
  border-radius: 50%;
  background: var(--grad-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; font-weight: 800; color: white;
  flex-shrink: 0;
  box-shadow: 0 8px 30px var(--pink-glow);
  overflow: hidden;
  padding: 0;
}
.creator-hero .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.creator-hero .avatar .avatar-initial {
  line-height: 1;
}
.creator-hero h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 4px;
}
.creator-hero .meta { color: var(--text-dim); font-size: 14px; }
.creator-hero .meta a { color: var(--pink); }
.creator-hero .stats { display: flex; gap: 24px; margin-top: 12px; }
.creator-hero .stat-num {
  font-size: 20px; font-weight: 700;
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.creator-hero .stat-label {
  font-size: 11px; color: var(--text-mute);
  text-transform: uppercase; letter-spacing: 1px;
}
@media (max-width: 600px) {
  .creator-hero { flex-direction: column; align-items: flex-start; }
}

/* ===== EMPTY STATE ===== */
.empty {
  background: var(--bg-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 60px 20px;
  text-align: center;
  color: var(--text-dim);
}
.empty h3 { font-size: 18px; margin-bottom: 8px; color: var(--text); font-weight: 700; }

/* ===== FOOTER ===== */
footer.site {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 48px 0 24px;
  color: var(--text-dim);
  font-size: 14px;
}
footer.site .inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
footer.site h4 {
  color: var(--text);
  font-size: 12px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
}
footer.site a { display: block; padding: 5px 0; color: var(--text-dim); font-size: 14px; }
footer.site a:hover { color: var(--pink); text-decoration: none; }
footer.site .brand p { margin: 12px 0; line-height: 1.6; color: var(--text-dim); }
footer.site .copyright {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-mute);
  font-size: 12px;
  text-align: center;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
@media (max-width: 900px) {
  footer.site .inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  footer.site { margin-top: 48px; padding: 32px 0 16px; }
  footer.site .inner { grid-template-columns: 1fr; gap: 24px; padding: 0 var(--gutter-sm); }
  footer.site .copyright { margin-top: 24px; padding-top: 16px; font-size: 11px; padding-left: var(--gutter-sm); padding-right: var(--gutter-sm); }
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  padding: 20px 0 0;
  color: var(--text-mute);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--pink); }
.breadcrumb .sep { color: var(--text-mute); opacity: 0.5; }
.breadcrumb .current { color: var(--text); }

/* ===== PAGE TITLE (for sub-pages) ===== */
.page-title {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: -1px;
  margin: 16px 0 12px;
  line-height: 1.15;
}
.page-subtitle {
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 36px;
  max-width: 700px;
  line-height: 1.6;
}

/* ===== AUTH NAV (header) ===== */
.auth-nav {
  display: flex; align-items: center; gap: 8px; margin-left: 12px;
  flex-shrink: 0; white-space: nowrap;
}
.auth-nav .login-link {
  color: var(--text-dim); font-size: 14px; font-weight: 600;
  padding: 8px 14px; transition: color 0.15s; white-space: nowrap;
}
.auth-nav .login-link:hover { color: var(--pink); }
.auth-nav .signup-btn {
  background: var(--grad-1);
  color: #fff; font-size: 13px; font-weight: 700;
  padding: 8px 18px; border-radius: 100px; white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.15s;
}
.auth-nav .signup-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(255,110,199,0.4); text-decoration: none; }
.user-chip {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  color: #fff; font-weight: 700; font-size: 14px;
  text-decoration: none; box-shadow: 0 0 0 2px rgba(255,255,255,0.1);
  transition: transform 0.15s, box-shadow 0.15s;
}
.user-chip:hover { transform: scale(1.08); box-shadow: 0 0 0 2px var(--pink), 0 4px 12px rgba(255,110,199,0.4); }

/* ===== AUTH PAGES (signup/login) ===== */

/* Page wrapper: vertical centering, full viewport */
main:has(.auth-card),
main:has(> .auth-card) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 44px 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

/* Subtle gradient glow at the top */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120px;
  background: radial-gradient(ellipse 80% 100% at 50% 0%, rgba(255, 110, 199, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.auth-card > * { position: relative; }

.auth-card h1 {
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 8px;
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-sub {
  text-align: center;
  color: var(--text-dim);
  margin: 0 0 32px;
  font-size: 15px;
  line-height: 1.5;
}

.auth-form { display: block; }

.auth-form label,
.auth-form .field { display: block; margin-bottom: 16px; }

.auth-form label > span,
.auth-form .field > span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-form label > span em,
.auth-form .field > span em {
  font-style: normal;
  color: var(--text-mute);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  margin-left: 4px;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 16px;                  /* >=16px prevents iOS zoom on focus */
  font-family: inherit;
  font-weight: 500;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.auth-form input::placeholder {
  color: var(--text-mute);
  font-weight: 400;
}

.auth-form input:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.auth-form input:focus {
  outline: none;
  border-color: var(--pink);
  background: rgba(255, 110, 199, 0.04);
  box-shadow: 0 0 0 4px rgba(255, 110, 199, 0.15);
}

.auth-form .hint,
.auth-form small.hint {
  display: block;
  color: var(--text-mute);
  font-size: 12px;
  margin-top: 6px;
  padding-left: 2px;
}

/* Primary submit button — big, gradient, full-width */
.auth-form button[type="submit"] {
  display: block;
  width: 100%;
  margin: 24px 0 0;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #fff;
  background: var(--grad-1);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.15s;
  box-shadow: 0 4px 14px rgba(255, 110, 199, 0.3);
}

.auth-form button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 110, 199, 0.45);
  filter: brightness(1.05);
}

.auth-form button[type="submit"]:active {
  transform: translateY(0);
}

.auth-form button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-error {
  background: rgba(255, 100, 100, 0.08);
  border: 1px solid rgba(255, 100, 100, 0.3);
  color: #ff8a8a;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-error::before {
  content: '⚠';
  font-size: 14px;
  flex-shrink: 0;
}

/* Divider with "or" */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-mute);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-switch {
  text-align: center;
  margin: 28px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 14px;
}

.auth-switch a {
  color: var(--pink);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s;
}

.auth-switch a:hover {
  color: var(--pink-2);
  text-decoration: underline;
}

@media (max-width: 500px) {
  .auth-card { padding: 36px 24px 32px; }
  .auth-card h1 { font-size: 24px; }
}

/* ===== PROFILE AVATARS (shared) ===== */
.avatar-lg {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.avatar-sm {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.avatar-xl {
  width: 120px; height: 120px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 48px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}

.collections-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.coll-card {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; transition: transform 0.15s, border-color 0.15s;
}
.coll-card:hover { transform: translateY(-2px); border-color: var(--pink); }
.coll-cover {
  height: 100px; position: relative; display: flex; align-items: center; justify-content: center;
}
.coll-count { font-size: 36px; font-weight: 800; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,0.4); }
.coll-body { padding: 12px 14px; }
.coll-body h3 { margin: 0 0 4px; font-size: 15px; }
.coll-body p { margin: 0; color: var(--text-mute); font-size: 12px; }

.follow-card {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px; text-align: center; transition: all 0.15s;
}
.follow-card:hover { transform: translateY(-2px); border-color: var(--pink); }
.follow-avatar {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 24px;
}
.follow-card h3 { margin: 0; font-size: 14px; }
.follow-card p { margin: 4px 0 0; color: var(--text-mute); font-size: 12px; }

/* ===== PUBLIC PROFILE / ACCOUNT — HORIZONTAL HEADER (no cover banner) ===== */
.profile-banner {
  margin: 24px 0 0;
}
.profile-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 24px 28px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}
.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 44px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  user-select: none;
  text-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.profile-avatar-initial {
  line-height: 1;
}
.profile-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-name-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-name {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.profile-username {
  color: var(--text-mute);
  font-size: 14px;
  font-weight: 500;
}
.profile-bio-text {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.5;
  max-width: 60ch;
  white-space: pre-wrap;
}
.profile-socials {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
  flex-wrap: wrap;
}
.profile-social-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 6px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: transform 0.12s, border-color 0.12s, background 0.12s;
  max-width: 100%;
  min-width: 0;
}
.profile-social-chip:hover {
  transform: translateY(-1px);
  border-color: var(--pink);
  background: var(--bg-2);
  text-decoration: none;
}
.profile-social-handle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}
.profile-social-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-3);
  border: 1px dashed var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.profile-social-add:hover {
  border-color: var(--pink);
  color: var(--pink);
  background: var(--bg-2);
}
.profile-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.btn-edit-profile,
.btn-view-collections {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  font-family: inherit;
}
.btn-edit-profile:hover,
.btn-view-collections:hover {
  border-color: var(--pink);
  color: var(--pink);
  background: var(--bg-2);
  text-decoration: none;
}

/* Stat row sits below the header card */
.profile-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 4px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 16px 16px;
  padding: 16px 28px;
  margin-bottom: 32px;
}
.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 2px;
  min-width: 0;
}
.profile-stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.profile-stat-label {
  font-size: 10px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
.profile-stat-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}

/* Below the banner */
.profile-content-section {
  margin: 0 0 40px;
}
.section-h {
  font-size: 22px;
  font-weight: 800;
  margin: 32px 0 18px;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* Mobile */
@media (max-width: 720px) {
  .profile-head {
    grid-template-columns: auto 1fr;
    grid-template-areas: "avatar meta" "actions actions";
    gap: 14px 16px;
    padding: 18px;
  }
  .profile-avatar-wrap { grid-area: avatar; }
  .profile-avatar { width: 84px; height: 84px; font-size: 34px; }
  .profile-meta { grid-area: meta; }
  .profile-actions { grid-area: actions; padding-bottom: 0; justify-content: flex-end; }
  .profile-name { font-size: 22px; }
  .profile-stat-row { padding: 14px 12px; gap: 0; }
  .profile-stat-value { font-size: 17px; }
  .profile-stat-label { font-size: 9px; letter-spacing: 0.5px; }
  .profile-stat-divider { height: 20px; }
}

/* Account-page-specific (when owner views their own profile) */
.account-content { margin: 32px 0 60px; }
.account-section { margin: 0 0 40px; }
.account-section .section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.account-section .section-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.account-section-logout { text-align: right; }
.account-section-logout .btn { display: inline-flex; align-items: center; gap: 6px; }

/* Empty-card pattern (used in account + public) */
.empty-card {
  background: var(--bg-2);
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 32px 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
}
.empty-card p { margin: 0; }
.empty-card a.btn { margin-top: 12px; display: inline-block; }

/* ===== EDIT PROFILE MODAL ===== */
.edit-modal {
  position: fixed; inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.18s;
  pointer-events: none;
}
.edit-modal[hidden] { display: none; }
.edit-modal.open { opacity: 1; pointer-events: auto; }
.edit-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.edit-modal-card {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 28px 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.18s;
}
.edit-modal.open .edit-modal-card { transform: translateY(0) scale(1); }
.edit-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.edit-modal-close:hover {
  color: var(--text);
  border-color: var(--text-dim);
}
.edit-modal-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}
.edit-modal-sub {
  margin: 0 0 22px;
  color: var(--text-mute);
  font-size: 13px;
}
.edit-row {
  margin: 0 0 18px;
  position: relative;
}
.edit-row-avatar { padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.edit-row-socials { padding-top: 16px; border-top: 1px solid var(--border); margin-top: 4px; }
.edit-row-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-mute);
}
.edit-label {
  display: block;
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  margin-bottom: 8px;
}
.edit-row input[type="text"],
.edit-row textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  resize: vertical;
}
.edit-row input[type="text"]:focus,
.edit-row textarea:focus {
  border-color: var(--pink);
  background: var(--bg-2);
}
.edit-row input::placeholder,
.edit-row textarea::placeholder { color: var(--text-mute); }
.edit-counter {
  position: absolute;
  right: 4px; bottom: 6px;
  font-size: 11px;
  color: var(--text-mute);
  pointer-events: none;
}
.edit-row input[type="text"] { padding-right: 48px; }
.edit-swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.edit-swatch {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s, border-color 0.12s;
  position: relative;
}
.edit-swatch:hover { transform: scale(1.08); }
.edit-swatch.selected {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--bg-2);
}
.edit-swatch.selected::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* Per-platform toggle rows: icon + name | handle input | toggle switch */
.edit-social-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.edit-social-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.15s, opacity 0.15s;
  opacity: 0.55;
}
.edit-social-row.on {
  border-color: var(--pink);
  opacity: 1;
}
.edit-social-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.edit-social-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.edit-social-input {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  min-width: 0;
  width: 130px;
  transition: border-color 0.15s, background 0.15s, opacity 0.15s;
}
.edit-social-input:focus {
  border-color: var(--pink);
}
.edit-social-input:disabled {
  opacity: 0.5;
  background: transparent;
  border-style: dashed;
  cursor: not-allowed;
}
.edit-social-row:not(.on) .edit-social-input {
  border-style: dashed;
  color: var(--text-mute);
}

/* Toggle switch (iOS-style) */
.edit-social-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.18s, border-color 0.18s;
}
.edit-social-row.on .edit-social-toggle {
  background: var(--pink);
  border-color: var(--pink);
}
.edit-social-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.18s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.edit-social-row.on .edit-social-toggle-knob {
  transform: translateX(18px);
}

.edit-error {
  margin: 8px 0 0;
  padding: 10px 12px;
  background: rgba(255, 90, 90, 0.1);
  border: 1px solid rgba(255, 90, 90, 0.3);
  border-radius: 8px;
  color: #ff6b6b;
  font-size: 13px;
}
.edit-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
@media (max-width: 540px) {
  .edit-modal { padding: 10px; }
  .edit-modal-card { padding: 24px 20px 20px; max-height: calc(100vh - 20px); }
  .edit-social-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .edit-social-input { width: 100%; }
  .edit-social-toggle { justify-self: end; }
}

/* ===== COMMUNITY (item page: comments + ratings) ===== */
.community-section { margin: 50px 0 80px; padding: 32px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; }
.community-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
@media (max-width: 900px) { .community-grid { grid-template-columns: 1fr; } }
.count-badge { background: var(--bg); color: var(--text-mute); font-size: 12px; padding: 2px 10px; border-radius: 100px; margin-left: 8px; vertical-align: middle; font-weight: 600; }
.login-prompt { background: var(--bg); border: 1px dashed var(--border); padding: 14px; border-radius: 8px; text-align: center; color: var(--text-dim); font-size: 14px; margin-bottom: 16px; }
.login-prompt a { color: var(--pink); font-weight: 600; }

.comment-form { margin-bottom: 24px; }
.comment-form textarea {
  width: 100%; padding: 12px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); font-family: inherit; font-size: 16px; resize: vertical; /* 16px = no iOS zoom */
  -webkit-appearance: none; appearance: none;
}
.comment-form textarea:focus { outline: none; border-color: var(--pink); }
.comment-form button { margin-top: 8px; }

.comments-list { display: flex; flex-direction: column; gap: 18px; }
.comment { padding: 14px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }
.comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-name { color: var(--text); font-weight: 600; font-size: 14px; }
.comment-time { color: var(--text-mute); font-size: 12px; margin-left: 6px; }
.comment-body { margin: 0; line-height: 1.5; color: var(--text-dim); }
.comment-replies { margin-left: 32px; margin-top: 12px; padding-left: 12px; border-left: 2px solid var(--border); }
.comment.reply { padding: 10px 0; }

.rating-summary { text-align: center; padding: 20px 0; }
.rating-big { font-size: 36px; color: var(--pink); margin-bottom: 8px; }
.rating-breakdown { display: flex; flex-direction: column; gap: 4px; margin: 12px 0; font-size: 13px; color: var(--text-dim); }
.rating-count { font-size: 12px; color: var(--text-mute); margin: 8px 0 0; }

.rate-form-wrap { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.rate-form-wrap label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 13px; color: var(--text-dim); }
.rate-form-wrap textarea {
  width: 100%; padding: 10px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); font-family: inherit; font-size: 16px; resize: vertical; /* 16px = no iOS zoom */
  margin: 8px 0;
  -webkit-appearance: none; appearance: none;
}
.rate-form-wrap button { margin-top: 8px; width: 100%; }

/* ===== COLLECTION PAGE ===== */
.collection-header { margin: 20px 0 32px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.collection-header h1 { font-size: 32px; margin: 0 0 6px; }

/* Section/headings inside main pages */
.page-title { font-size: 32px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.5px; }
.page-subtitle { color: var(--text-dim); font-size: 16px; margin-bottom: 24px; }
@media (max-width: 600px) {
  .page-title { font-size: 24px; }
  .page-subtitle { font-size: 14px; }
}

/* Generic container-on-page padding (for pages that don't have a .container) */
.page-pad { padding: 24px var(--gutter); }
@media (max-width: 600px) {
  .page-pad { padding: 16px var(--gutter-sm); }
}

/* Section header inside pages */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 32px 0 16px;
  gap: 16px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: 20px; font-weight: 700; margin: 0; }

/* Smaller listicle / row on mobile */
@media (max-width: 600px) {
  .listicles .row {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .listicles .row .img-wrap {
    width: 100% !important;
    aspect-ratio: 16/9;
  }
  .listicles .row .actions {
    flex-direction: row !important;
  }
}

/* Account/profile/creator headers on small screens */
@media (max-width: 600px) {
  .profile-hero { flex-direction: column; text-align: center; align-items: center; }
  .creator-hero { flex-direction: column; align-items: flex-start; }
  .avatar-xl { width: 80px; height: 80px; font-size: 28px; }
}

/* Stats blocks (3-column) */
.profile-stats, .profile-stats-big {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.profile-stats > div, .profile-stats-big > div {
  text-align: center;
  flex: 1 1 60px;
  min-width: 60px;
}

/* Form pages (signup/login) — they have auth-card which has its own CSS, but make sure inputs are touch-friendly */
.auth-form input,
.auth-form button,
.auth-form .field {
  min-height: 44px;
}

/* Lists in the body — make sure nothing overflows */
ul, ol { padding-left: 20px; }
table { max-width: 100%; }

/* Force long URLs / words to break nicely */
body { word-wrap: break-word; overflow-wrap: break-word; }

/* Disable iOS tap highlight where it looks bad */
a, button { -webkit-tap-highlight-color: rgba(255, 110, 199, 0.1); }

/* Hide scrollbar utility (used by some carousels) */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { scrollbar-width: none; }

/* Tighter letter-spacing for big numbers (e.g. counter "39 items") */
.num { font-variant-numeric: tabular-nums; }

/* Page-level main element gets a min-height so footer doesn't float up */
main { min-height: 60vh; }

/* ===== LEGAL PAGES (about / contact / privacy / terms) ===== */
.legal-page { padding: 48px 0 80px; line-height: 1.7; color: var(--text-dim); }
.legal-page h1 { color: var(--text); font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -1.5px; margin-bottom: 24px; }
.legal-page h2 { color: var(--text); font-size: 22px; font-weight: 700; letter-spacing: -0.5px; margin: 36px 0 12px; }
.legal-page h3 { color: var(--text); font-size: 17px; font-weight: 600; margin: 24px 0 8px; }
.legal-page h4 { color: var(--text); font-size: 15px; font-weight: 600; margin: 18px 0 6px; }
.legal-page p { margin: 0 0 14px; font-size: 15px; }
.legal-page a { color: var(--pink); }
.legal-page a:hover { text-decoration: underline; }
.legal-page ul { margin: 0 0 16px; padding-left: 22px; }
.legal-page ul li { margin-bottom: 8px; font-size: 15px; }
.legal-page__lede { font-size: 17px !important; color: var(--text) !important; line-height: 1.6; margin-bottom: 20px; }
.legal-page__updated { font-size: 13px; color: var(--text-dim); opacity: 0.7; margin-bottom: 20px; }

/* Fix any inline-styled padding that doesn't account for gutter on mobile */
@media (max-width: 600px) {
  [style*="padding: 32px 0"],
  [style*="padding: 48px 0"],
  [style*="padding: 100px"] {
    padding-left: var(--gutter-sm) !important;
    padding-right: var(--gutter-sm) !important;
  }
  [style*="padding: 80px"] {
    padding: 48px var(--gutter-sm) !important;
  }
}

/* ============================================================
   Toast notifications (used for save / comment login gates)
   ============================================================ */
#toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--panel, #1a1620);
  color: var(--text, #f0eaf5);
  border: 1px solid var(--border, #2a2530);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.02);
  font-size: 14px;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.toast-show { opacity: 1; transform: translateX(0); }
.toast-icon {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--pink-soft, rgba(255, 100, 160, 0.15));
  color: var(--pink, #ff64a0);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.toast-info .toast-icon    { background: rgba(100, 160, 255, 0.15); color: #6aa3ff; }
.toast-success .toast-icon { background: rgba(80, 200, 120, 0.15); color: #50c878; }
.toast-error .toast-icon   { background: rgba(255, 80, 100, 0.15);  color: #ff5a78; }
.toast-warn .toast-icon    { background: rgba(255, 180, 80, 0.15);  color: #ffb450; }
.toast-content { min-width: 0; }
.toast-title { font-weight: 700; color: var(--text, #f0eaf5); }
.toast-body  { color: var(--text-dim, #a39ab0); font-size: 13px; margin-top: 2px; line-height: 1.4; }
.toast-action {
  background: var(--pink, #ff64a0);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s ease;
}
.toast-action:hover { filter: brightness(1.1); }
.toast-close {
  background: transparent;
  border: 0;
  color: var(--text-mute, #6a6470);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}
.toast-close:hover { color: var(--text, #f0eaf5); background: rgba(255,255,255,0.05); }

@media (max-width: 600px) {
  #toast-container { top: 70px; right: 10px; left: 10px; max-width: none; }
  .toast { grid-template-columns: 24px 1fr auto; font-size: 13px; }
  .toast .toast-action { grid-column: 1 / -1; margin-top: 4px; justify-self: stretch; text-align: center; }
  .toast-close { display: none; }
}

/* Save button "guest" state — subtle lock dot so users know it's gated */
.save-btn.guest { opacity: 0.85; }
.save-btn.guest::after {
  content: '';
  position: absolute;
  bottom: 4px; right: 4px;
  width: 6px; height: 6px;
  background: var(--text-mute, #6a6470);
  border-radius: 50%;
  border: 1.5px solid var(--img-bg, #1a1620);
}

/* ===== MODERN FILTER SYSTEM (2026-06-19 redesign) ===== */

/* Category header (h1 + count line) */
.cat-header {
  margin: 24px 0 8px;
}
.cat-title {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.cat-sub {
  font-size: 14px;
  color: var(--text-mute);
  margin: 0 0 16px;
}

/* Category sub-nav (Tops / Bottoms / Dresses / Full Body) */
.cat-nav {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  margin: 0 0 16px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.cat-nav-inner {
  display: flex;
  gap: 6px;
  min-width: max-content;
}
.cat-nav-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: transparent;
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.cat-nav-pill:hover {
  background: var(--bg-3);
  color: var(--text);
  text-decoration: none;
}
.cat-nav-pill.active {
  background: var(--pink);
  color: #fff;
}
.cat-nav-pill.active:hover {
  background: var(--pink);
  color: #fff;
}

/* Leaf nav (jeans/shorts/skirts/pants/leggings under Bottoms) */
.leaf-nav {
  margin: 0 0 20px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.leaf-nav-inner {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-width: max-content;
}
.leaf-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}
.leaf-pill:hover {
  background: var(--bg-3);
  color: var(--text);
  border-color: var(--text-dim);
  text-decoration: none;
}

/* Browse layout: 2-col on desktop (sidebar + results) */
.browse-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
  margin: 0 0 60px;
}
@media (max-width: 900px) {
  .browse-layout {
    grid-template-columns: 1fr;
  }
}

/* Filter bar (sidebar) */
.filter-bar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  scrollbar-width: thin;
}
.filter-bar-head {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.filter-bar-title {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
@media (max-width: 900px) {
  .filter-bar { display: none; }
}

/* Filter group (collapsible) */
.filter-group {
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.filter-group:last-of-type { border-bottom: none; }
.filter-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  list-style: none;
  padding: 4px 0;
  user-select: none;
}
.filter-group-head::-webkit-details-marker { display: none; }
.filter-group-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.filter-group-chev {
  font-size: 18px;
  color: var(--text-mute);
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s;
}
.filter-group[open] .filter-group-chev { transform: rotate(45deg); }
.filter-group-body {
  padding: 8px 0 4px;
}
.filter-empty {
  font-size: 12px;
  color: var(--text-mute);
  font-style: italic;
  margin: 0;
}
.filter-options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.filter-option-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-dim);
  transition: background 0.12s;
}
.filter-option-label:hover { background: var(--bg-3); }
.filter-cb {
  width: 14px;
  height: 14px;
  accent-color: var(--pink);
  cursor: pointer;
  flex-shrink: 0;
}
.filter-option-icon {
  font-size: 18px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.95;
  line-height: 1;
}
.filter-option-label:has(.filter-cb:checked) .filter-option-icon {
  opacity: 1;
  filter: drop-shadow(0 0 4px rgba(255,110,199,0.4));
}
.filter-option-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filter-option-count {
  color: var(--text-mute);
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-3);
  padding: 1px 6px;
  border-radius: 999px;
  flex-shrink: 0;
}
.filter-show-more {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--pink);
  text-decoration: none;
  font-weight: 600;
}
.filter-show-more:hover { text-decoration: underline; }

.filter-bar-toggles {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filter-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
}
.filter-toggle input { accent-color: var(--pink); }

/* Results area */
.browse-results { min-width: 0; }
.results-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 16px;
}
.results-toolbar-right {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}
.filter-trigger {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.filter-trigger:hover { border-color: var(--pink); color: var(--pink); }
.filter-trigger-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  background: var(--pink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
}
@media (max-width: 900px) {
  .filter-trigger { display: inline-flex; }
}
.sort-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sort-label {
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}
.sort-select {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}
.sort-select:focus { border-color: var(--pink); }

/* Active filter chips */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.12s;
  max-width: 100%;
}
.filter-chip:hover {
  background: var(--bg-3);
  border-color: var(--text-dim);
  text-decoration: none;
}
.filter-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}
.filter-chip-x {
  font-size: 14px;
  line-height: 1;
  color: var(--text-mute);
  font-weight: 400;
}
.filter-chip:hover .filter-chip-x { color: var(--pink); }
.filter-chip-clear {
  font-size: 12px;
  color: var(--text-mute);
  text-decoration: none;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
}
.filter-chip-clear:hover { color: var(--pink); background: var(--bg-2); text-decoration: none; }

/* Mobile filter drawer */
.filter-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear 0.25s;
}
.filter-drawer[data-open="true"] {
  pointer-events: auto;
  visibility: visible;
  transition: visibility 0s linear 0s;
}
.filter-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s;
}
.filter-drawer[data-open="true"] .filter-drawer-backdrop { opacity: 1; }
.filter-drawer-panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 90vh;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  transform: translateY(100%);
  transition: transform 0.25s;
  display: flex;
  flex-direction: column;
}
.filter-drawer[data-open="true"] .filter-drawer-panel {
  transform: translateY(0);
}
.filter-drawer-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 10px auto 6px;
}
.filter-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.filter-drawer-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}
.filter-drawer-close {
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}
.filter-drawer-close:hover { color: var(--text); border-color: var(--text-dim); }
.filter-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 18px;
}
.filter-drawer-body .filter-bar {
  position: static;
  max-height: none;
  background: transparent;
  border: none;
  padding: 0;
  display: block;
}
.filter-drawer-foot {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}
.filter-drawer-foot .btn { flex: 1; }

body.filter-drawer-open { overflow: hidden; }

/* Top category grid (on /browse landing) */
.top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 0 0 32px;
}
.top-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: all 0.18s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.top-card:hover {
  transform: translateY(-2px);
  border-color: var(--pink);
  box-shadow: 0 8px 24px rgba(255,110,199,0.15);
  text-decoration: none;
  color: var(--text);
}
.top-card-icon {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  border-bottom: 1px solid var(--border);
}
.top-card-body {
  padding: 14px 16px;
}
.top-card-name {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.top-card-count {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--text-mute);
  font-weight: 600;
}
.top-card-subs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.top-card-sub {
  display: inline-block;
  font-size: 11px;
  color: var(--text-dim);
  background: var(--bg-3);
  padding: 2px 8px;
  border-radius: 999px;
}

.browse-results-only { margin: 32px 0; }

