@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #09090b;
  --sidebar-bg: #09090b;
  --panel: #18181b;
  --panel-2: #27272a;
  --line: #27272a;
  --ink: #fff;
  --muted: #a1a1aa;
  --muted-2: #71717a;
  --blue: #3ea6ff;
  --blue-soft: #70b8ff;
  --blue-btn: #3ea6ff;
  --sidebar-w: 240px;
  --header-h: 56px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --gap: 20px; /* BabeWiki lg:gap-5 */
  --radius-card: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

.text-blue {
  display: inline-block;
  background: linear-gradient(90deg, #63c2ff 0%, #f098ff 50%, #fff75f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ===== TOP HEADER (full width) ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px 0 12px;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #141414;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px; /* BabeWiki gap-2 */
  flex-shrink: 0;
  min-width: 0;
  padding-left: 0;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px; /* BabeWiki p-2 */
  border-radius: 12px; /* BabeWiki rounded-xl */
  background: #141414;
  box-sizing: border-box;
  flex: none;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  font-size: 18px; /* BabeWiki text-lg */
  font-weight: 700;
  line-height: 28px; /* BabeWiki text-lg line-height */
  letter-spacing: -0.05em; /* BabeWiki tracking-tighter */
  color: #fff;
}
.brand-mark--logo {
  position: relative;
  width: 52px;
  height: 44px; /* BabeWiki mark height: p-2 + text-lg */
  padding: 8px;
  box-sizing: border-box;
  background: #141414;
  border-radius: 12px; /* BabeWiki rounded-xl */
  overflow: hidden;
  line-height: 0;
  font-size: 0;
}
.brand-mark--logo img {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
/* White bb glyph inside blue tile (mask drops black PNG background) */
.brand-mark--logo::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: #fff;
  -webkit-mask-image: url("../img/logo-bb.png");
  mask-image: url("../img/logo-bb.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.brand-text {
  font-size: 1.05rem; /* BabeWiki text-[1.05rem] */
  font-weight: 700;
  letter-spacing: -0.025em; /* BabeWiki tracking-tight */
  line-height: 1; /* BabeWiki leading-none */
  white-space: nowrap;
  background: linear-gradient(90deg, #63c2ff 0%, #f098ff 50%, #fff75f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.brand-text em {
  font-style: normal;
  background: inherit;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.topbar-search {
  flex: 1;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
}
.topbar-search .ico-left,
.topbar-search .ico-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.topbar-search .ico-left { left: 4px; pointer-events: none; }
.topbar-search .ico-right { right: 4px; }
.topbar-search input {
  width: 100%;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #2a2a2a;
  background: #141414;
  color: #fff;
  padding: 0 16px 0 40px;
  font-size: 14px;
  outline: none;
}
.topbar-search input::placeholder { color: #6b6b6b; }
.topbar-search input:focus { border-color: var(--blue); }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}
.btn-ghost {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #3a3a3a;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.btn-ghost:hover { background: #161616; color: #fff; }
.btn-text {
  color: #d4d4d4;
  font-size: 13px;
  font-weight: 500;
  padding: 0 6px;
}
.btn-text:hover { color: #fff; }
.btn-primary {
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 0;
  background: var(--blue-btn);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.btn-primary:hover { background: #1d4ed8; color: #fff; }
.sidebar-toggle {
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: 0;
  color: #a0a0a0;
  padding: 6px;
  cursor: pointer;
  border-radius: 8px;
  flex-shrink: 0;
}
.sidebar-toggle:hover { color: #fff; background: #141414; }

.mobile-search-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: auto;
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #e4e4e7;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.mobile-search-toggle:hover,
.mobile-search-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.mobile-search {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: #09090b;
  color: #fafafa;
  overscroll-behavior: contain;
}
.mobile-search[hidden] { display: none !important; }
body.mobile-search-open {
  overflow: hidden;
}
body.mobile-search-open .topbar,
body.mobile-search-open .app-shell,
body.mobile-search-open .site-footer,
body.mobile-search-open .sidebar-backdrop {
  visibility: hidden;
  pointer-events: none;
}

.mobile-search-top {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid #18181b;
  flex-shrink: 0;
}
.mobile-search-form {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  margin: 0;
}
.mobile-search-ico {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #a1a1aa;
  pointer-events: none;
  display: inline-flex;
  line-height: 0;
}
.mobile-search-form input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 42px;
  margin: 0;
  padding: 0 14px 0 40px;
  border: 0;
  border-radius: 12px;
  background: #27272a;
  color: #fafafa;
  font-size: 16px;
  line-height: 42px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.mobile-search-form input::placeholder { color: #71717a; }
.mobile-search-cancel {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #fafafa;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 2px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
}
.mobile-search-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 8px 0 28px;
  -webkit-overflow-scrolling: touch;
}
.mobile-search-section {
  padding: 18px 16px 8px;
}
.mobile-search-section h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.mobile-search-terms {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mobile-search-terms a {
  display: block;
  padding: 10px 0;
  color: #fafafa;
  font-size: 15px;
  text-decoration: none;
}
.mobile-search-terms a:hover { color: #7dd3fc; }
.mobile-search-people {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.mobile-search-people a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  color: #fafafa;
  text-decoration: none;
}
.mobile-search-people a:hover .mobile-search-name { color: #7dd3fc; }
.mobile-search-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  overflow: hidden;
  background: #27272a;
  flex-shrink: 0;
}
.mobile-search-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mobile-search-name {
  font-size: 15px;
  font-weight: 500;
}
.mobile-search-empty {
  margin: 8px 0 0;
  color: #71717a;
  font-size: 14px;
}

/* ===== SHELL ===== */
.app-shell {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - var(--header-h));
}
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid #141414;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 10px 24px;
  transition: width 0.22s ease, padding 0.22s ease;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  color: #cfcfcf;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.9; }
.nav-item:hover { background: #141414; color: #fff; }
.nav-item.is-active {
  background: #fff;
  color: #000;
  font-weight: 600;
}
.nav-item.is-active svg { opacity: 1; }

.nav-section {
  margin-top: 18px;
  margin-bottom: 6px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #666;
}
.nav-list-link {
  display: block;
  position: relative;
  padding: 8px 12px 8px 24px;
  border-radius: 8px;
  color: #bdbdbd;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-list-link::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue, #3ea6ff);
  transform: translateY(-50%);
}
.nav-list-link:hover { background: #141414; color: #fff; }
.nav-more {
  display: block;
  padding: 8px 12px;
  color: #6b6b6b;
  font-size: 13px;
}
.nav-more:hover { color: #fff; }

.main-column {
  flex: 1;
  min-width: 0;
  padding: 0 var(--bw-page-px, 16px) 48px;
}

/* ===== HERO ===== */
.hero {
  text-align: center;
  padding: 48px 12px 36px;
}
.hero h1 {
  margin: 0;
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: #fff;
}
.hero p {
  margin: 12px auto 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

/* ===== SECTION ===== */
.section { margin-bottom: 36px; }
.home-browse-cta {
  display: flex;
  justify-content: center;
  padding: 48px 16px;
  text-align: center;
}
.browse-all-btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 9999px;
  background: #2563eb;
  color: #fff;
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 700;
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2), 0 4px 6px -4px rgba(37, 99, 235, 0.2);
  transition: background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.browse-all-btn:hover {
  background: #1d4ed8;
  color: #fff;
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3), 0 4px 6px -4px rgba(37, 99, 235, 0.3);
}
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.section-head h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.section-kicker {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #777;
}
.view-all {
  color: var(--blue);
  font-size: 13px;
  font-weight: 500;
  padding-top: 6px;
  white-space: nowrap;
}
.view-all:hover { color: var(--blue-soft); }

/* ===== GRID / CARDS — fluid on inner pages; home uses fixed 8-col ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--gap);
  column-gap: var(--gap);
  row-gap: var(--gap);
}
body.page-home .grid,
body.page-shell .grid {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 20px;
  column-gap: 20px;
  row-gap: 20px;
}
/* Performers browse: 6 thumbs per row (next to refine panel) */
body.page-inner .performers-layout .grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
  column-gap: 20px;
  row-gap: 20px;
}
@media (max-width: 1400px) {
  body.page-home .grid,
  body.page-shell .grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  body.page-inner .performers-layout .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  body.page-home .grid,
  body.page-shell .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  body.page-inner .performers-layout .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  body.page-home .grid,
  body.page-shell .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body.page-inner .performers-layout .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body.page-home .grid,
  body.page-shell .grid,
  body.page-inner .performers-layout .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
}
.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #111;
}
.card-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  min-width: 36px;
  height: 28px;
  padding: 0 8px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
  backdrop-filter: blur(6px);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.55s ease, filter 0.55s ease;
}
.card:hover .card-media img {
  transform: scale(1.04);
  filter: brightness(1.06);
}
.card-media .ph {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #555;
  font-size: 12px;
  background: #151515;
}
.card-meta { min-width: 0; padding: 0 2px; }
.card-name {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #f5f5f5;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card:hover .card-name { color: var(--blue-soft); }
.card-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  font-size: 11px;
  color: #9a9a9a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-sub .flag { font-size: 12px; line-height: 1; flex-shrink: 0; }

@media (max-width: 1200px) {
  :root { --sidebar-w: 220px; }
}
@media (max-width: 1024px) {
  .topbar {
    position: sticky;
    justify-content: space-between;
    gap: 8px;
    padding: 0 12px;
  }
  .brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    min-width: auto;
    justify-content: center;
    pointer-events: auto;
  }
  .topbar-search { display: none !important; }
  .mobile-search-toggle {
    display: inline-flex !important;
    margin-left: 0;
  }
  .topbar-actions .btn-ghost { display: none; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 80;
    height: 100%;
    width: 260px;
    padding: 18px 12px 24px;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    border-right: 1px solid #222;
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-collapsed { --sidebar-w: 0px; }
  body.sidebar-collapsed .sidebar {
    width: 260px;
    padding: 18px 12px 24px;
  }
  body.sidebar-collapsed .nav-item {
    width: auto;
    height: 40px;
    margin: 0 0 2px;
    justify-content: flex-start;
    padding: 0 12px;
    gap: 10px;
  }
  body.sidebar-collapsed .nav-item .nav-label,
  body.sidebar-collapsed .nav-section,
  body.sidebar-collapsed .nav-list-link,
  body.sidebar-collapsed .nav-more { display: revert; }
  body.sidebar-collapsed .nav-item .nav-label { display: inline; }
  body.sidebar-collapsed .nav-section { display: block; }
  body.sidebar-collapsed .nav-list-link,
  body.sidebar-collapsed .nav-more { display: block; }
  body.sidebar-collapsed .nav-item svg {
    width: 18px;
    height: 18px;
  }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(0,0,0,0.55);
  }
  .sidebar-backdrop[hidden] { display: none; }
  .hero h1 { font-size: 30px; }
  .main-column { padding: 0 14px 40px; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .topbar-search { max-width: none; }
  .btn-text { display: none; }
}

/* page helpers */
.page-title { margin: 24px 0 6px; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.page-sub { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.az-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
  padding: 12px;
  border-radius: 12px;
  background: #121212;
  border: 1px solid #1f1f1f;
}
.az-bar a {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #1a1a1a;
  color: #bbb;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}
.az-bar a.is-active,
.az-bar a:hover {
  background: #fff;
  color: #000;
}
.az-bar a.is-empty {
  opacity: 0.35;
  pointer-events: none;
}

/* profile */
.profile {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  padding: 24px 0 40px;
  align-items: start;
}
@media (max-width: 800px) { .profile { grid-template-columns: 1fr; } }
.profile-photo {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #111;
}
.profile-photo img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
}
.profile-main h1 {
  margin: 0 0 6px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.aliases { color: var(--muted); margin: 0 0 16px; }
.stats {
  width: 100%;
  border-collapse: collapse;
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  overflow: hidden;
}
.stats th, .stats td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid #1f1f1f;
  font-size: 14px;
}
.stats th { width: 36%; color: #888; font-weight: 500; background: #0a0a0a; }
.stats tr:last-child th, .stats tr:last-child td { border-bottom: 0; }
.bio {
  margin-top: 16px;
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  padding: 16px;
}
.bio h2 { margin: 0 0 8px; font-size: 16px; }
.bio p { margin: 0; color: #cfcfcf; white-space: pre-wrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag {
  padding: 4px 10px;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  color: #999;
  font-size: 12px;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.gallery a { border-radius: 8px; overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: top; }

.pagination {
  display: flex;
  gap: 8px;
  margin: 28px 0 12px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.pagination a,
.pagination span {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 0;
  background: #27272a;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}
.pagination a:hover {
  background: #3f3f46;
  color: #fff;
}
.pagination .is-current {
  background: #2563eb;
  color: #fff;
}
.pagination-ellipsis {
  background: #27272a;
  pointer-events: none;
}
.pagination-next,
.pagination-last {
  min-width: auto;
  padding: 0 16px;
}

.site-footer {
  border-top: 1px solid #141414;
  color: #666;
  font-size: 12px;
  text-align: center;
  padding: 28px 16px 36px;
  margin-left: var(--sidebar-w);
  transition: margin-left 0.22s ease;
}
.footer-inner {
  max-width: 1152px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}
.footer-nav a {
  color: #9a9a9a;
  font-size: 13px;
  font-weight: 500;
}
.footer-nav a:hover { color: #fff; }
.site-footer p { margin: 0; }
@media (max-width: 1024px) { .site-footer { margin-left: 0; } }

.error-page {
  padding: 64px 16px 80px;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}
.error-page .page-title {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.03em;
}
.error-page .page-sub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 15px;
}
.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0;
}
.error-actions .btn-primary,
.error-actions .btn-ghost {
  text-decoration: none;
}

/* ===== PERFORMERS PAGE (grid + right filters) ===== */
.performers-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19.5rem; /* BabeWiki xl:w-[19.5rem] */
  gap: 20px;
  align-items: start;
  padding-top: 18px;
}
.performers-toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.count-muted {
  color: #777;
  font-size: 16px;
  font-weight: 500;
  margin-left: 6px;
}
.sort-menu { position: relative; }
.sort-menu > summary {
  list-style: none;
  cursor: pointer;
  color: #bbb;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  background: #121212;
}
.sort-menu > summary::-webkit-details-marker { display: none; }
.sort-menu > summary:hover { color: #fff; border-color: #3a3a3a; }
.sort-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 180px;
  padding: 6px;
  border-radius: 10px;
  background: #121212;
  border: 1px solid #2a2a2a;
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
}
.sort-menu-list a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: #ccc;
  font-size: 13px;
}
.sort-menu-list a:hover { background: #1a1a1a; color: #fff; }
.sort-menu-list a.is-on {
  background: rgba(37, 99, 235, 0.18);
  color: #93c5fd;
}
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  align-items: center;
}
.chip-clear {
  color: #888;
  font-size: 12px;
}
.chip-clear:hover { color: #fff; }

.filters-panel {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  max-height: calc(100vh - var(--header-h) - 24px);
  overflow-y: auto;
  padding: 4px 4px 28px 2px;
}
.filters-panel::-webkit-scrollbar { width: 4px; }
.filters-panel::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 4px; }
.filters-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}
.filters-disclaimer {
  margin: 0 0 18px;
  color: #666;
  font-size: 11px;
  line-height: 1.45;
}
.filter-block { margin-bottom: 22px; }
.filter-block h3 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}
.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  background: #121212;
  color: #cfcfcf;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.chip:hover { border-color: #444; color: #fff; }
.chip.is-on {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.check-list { display: flex; flex-direction: column; gap: 2px; }
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border-radius: 8px;
  color: #cfcfcf;
  font-size: 13px;
}
.check-row:hover { background: #141414; color: #fff; }
.check-row.is-on { color: #fff; }
.check-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid #3a3a3a;
  display: grid;
  place-items: center;
  font-size: 10px;
  color: #000;
  background: transparent;
  flex-shrink: 0;
}
.check-row.is-on .check-box {
  background: #fff;
  border-color: #fff;
}

.pair-toggles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pair-btn {
  display: grid;
  place-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #2a2a2a;
  background: #121212;
  color: #ddd;
  font-size: 13px;
  font-weight: 600;
}
.pair-btn:hover { border-color: #444; color: #fff; }
.pair-btn.is-on {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.cup-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}
.cup-btn {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-height: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #2a2a2a;
  background: #121212;
  color: #ccc;
  font-size: 10px;
  font-weight: 700;
}
.cup-btn:hover { border-color: #444; color: #fff; }
.cup-btn.is-on {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.nation-search {
  width: 100%;
  margin-bottom: 8px;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  background: #0e0e0e;
  color: #fff;
  font-size: 13px;
  outline: none;
}
.nation-search:focus { border-color: var(--blue); }
.nation-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 280px;
  overflow-y: auto;
}
.nation-row {
  display: grid;
  grid-template-columns: 16px 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 8px;
  color: #cfcfcf;
  font-size: 13px;
}
.nation-row:hover, .nation-row.is-on { background: #141414; color: #fff; }
.nation-check { color: var(--blue-soft); font-size: 12px; }
.nation-code { color: #777; font-size: 11px; font-weight: 700; }
.nation-count { color: #666; font-size: 11px; }

@media (max-width: 1100px) {
  .performers-layout { grid-template-columns: 1fr; }
  .filters-panel {
    position: static;
    max-height: none;
    order: -1;
    border: 1px solid #1f1f1f;
    border-radius: 12px;
    padding: 14px;
    background: #0a0a0a;
  }
}

/* ===== PROFILE PAGE (BabeWiki tokens via babewiki-layout.css) ===== */
.profile-page {
  width: 100%;
  padding: 16px 0 48px;
}
.crumbs {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #777;
  font-size: 12px;
  margin-bottom: 16px;
}
.crumbs a { color: #aaa; }
.crumbs a:hover { color: #fff; }
.profile-hero {
  display: grid;
  grid-template-columns: minmax(260px, var(--bw-photo-max, 340px)) minmax(0, 1fr);
  gap: var(--bw-gap, 32px);
  align-items: start;
  margin-bottom: 40px;
}
.profile-copy {
  min-width: 0;
  max-width: none;
}
.bio-section {
  margin-top: 28px;
  padding-top: 8px;
  max-width: none;
  width: 100%;
}
.bio-panel {
  background: var(--bw-bio-bg, #18181b4d);
  border: 1px solid var(--bw-bio-border, #27272a80);
  border-radius: var(--bw-radius-2xl, 1rem);
  padding: var(--bw-bio-pad, 24px);
  backdrop-filter: blur(var(--bw-blur-sm, 8px));
  -webkit-backdrop-filter: blur(var(--bw-blur-sm, 8px));
}
.bio-panel-inner { position: relative; }
.profile-bio {
  color: var(--bw-zinc-300, #d4d4d8);
  font-size: 15px;
  line-height: 1.625;
  margin: 0;
}
.profile-bio.is-collapsed {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--bw-bio-clamp, 9);
  line-clamp: var(--bw-bio-clamp, 9);
  overflow: hidden;
  max-height: none;
  mask-image: none;
}
.markdown-content h2 {
  margin: 0 0 12px;
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.2;
}
.markdown-content h2:not(:first-child) {
  margin-top: 22px;
}
.markdown-content p {
  margin: 0 0 16px;
  color: var(--bw-zinc-300, #d4d4d8);
}
.markdown-content p:last-child { margin-bottom: 0; }
.markdown-content a,
.bio-link {
  color: var(--bw-bio-link, #2060df);
  font-weight: 500;
}
.markdown-content a:hover,
.bio-link:hover {
  color: var(--bw-bio-link-hover, #3b7be8);
  text-decoration: underline;
}
.bio-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--bw-bio-link, #2060df);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.bio-more:hover { color: var(--bw-bio-link-hover, #3b7be8); }
.bio-chevron {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.profile-media {
  position: sticky;
  top: var(--bw-sticky-top, 80px);
  z-index: 2;
  align-self: start;
  width: 100%;
  max-width: var(--bw-photo-max, 340px);
}
.profile-media .editorial-note {
  margin-top: 16px;
  max-width: none;
}
.profile-media .profile-photo {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
}
.profile-media .profile-photo img,
.profile-media .profile-photo .ph {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
}
.profile-media .ph {
  display: grid;
  place-items: center;
  color: #666;
  background: #111;
}
.photo-chip {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(6px);
}
.photo-chip:hover { background: rgba(0, 0, 0, 0.75); color: #fff; }
.photo-expand {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ddd;
  font-size: 11px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: pointer;
}
.profile-photo:hover .photo-expand { opacity: 1; }
.profile-photo #main-photo { cursor: zoom-in; }
.thumb-strip {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  min-width: 0;
}
.thumb-nav {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #2a2a2a;
  background: #121212;
  color: #ccc;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}
.thumb-nav:hover { background: #1a1a1a; color: #fff; }
.thumb-row {
  flex: 1;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.thumb-row::-webkit-scrollbar { display: none; }
.thumb-btn {
  flex: 0 0 calc((100% - 24px) / 5);
  width: calc((100% - 24px) / 5);
  max-width: calc((100% - 24px) / 5);
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  background: #111;
  cursor: pointer;
  display: block;
}
.thumb-btn img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: top;
  display: block;
}
.thumb-btn:hover { border-color: #444; }
.thumb-btn.is-active {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}
.social-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  width: 100%;
}
.social-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 0;
  overflow: hidden;
  box-sizing: border-box;
  border: 0;
  text-decoration: none;
}
.social-btn svg {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
}
.social-btn .social-label {
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.social-x { background: #000; color: #fff; border: 1px solid #333; }
.social-of { background: #00aff0; color: #fff; }
.social-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }
.social-tt { background: #010101; color: #fff; border: 1px solid #333; }
.social-btn:hover { filter: brightness(1.12); color: #fff; }
.social-btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
  filter: grayscale(0.4);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.88);
  display: grid;
  place-items: center;
  padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(900px, 100%);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 10px;
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #1a1a1a;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}
.claim-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
}
.claim-links a { color: #888; }
.claim-links a:hover { color: var(--blue-soft); }

.profile-head-inline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.profile-head-inline h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.profile-actions { display: flex; gap: 8px; flex-shrink: 0; }
.icon-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  flex: 0 0 40px;
  border-radius: 999px;
  border: 1px solid #27272a;
  background: #18181b80;
  color: #a1a1aa;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.icon-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}
.icon-btn:hover {
  background: #18181bcc;
  color: #fff;
  border-color: #3f3f46;
}
.icon-btn.is-on {
  background: rgba(244, 114, 182, 0.15);
  color: #f472b6;
  border-color: rgba(244, 114, 182, 0.35);
}
.icon-btn[title="Add to favorites"]:hover,
.icon-btn[title="Remove from favorites"]:hover { color: #f472b6; }
.profile-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #aaa;
  font-size: 13px;
  margin: 10px 0 16px;
}
.profile-meta-line .dot { color: #555; }
.rank-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 16px;
}
.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(24, 24, 27, 0.85);
  border: 1px solid #27272a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.rank-badge--rose { color: #fb7185; }
.rank-badge--orange { color: #fb923c; }
.rank-badge--purple { color: #c084fc; }
.rank-badge--blue { color: #60a5fa; }
.rank-badge:hover { border-color: #52525b; color: #fff; }
.profile-stats-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  margin: 14px 0 0;
  padding: 12px 10px;
  border-radius: 12px;
  background: #141414;
  border: 1px solid #1f1f1f;
}
.profile-stats-row--media {
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.star-rate {
  --star-slot: 40px;
  --star-gap: 4px;
  --star-span: calc(5 * var(--star-slot) + 4 * var(--star-gap));
  --star-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m12 2 3.1 6.3L22 9.3l-5 4.9 1.2 7L12 17.8 5.8 21.2 7 14.2 2 9.3l6.9-1L12 2z'/%3E%3C/svg%3E");
  --star-grad: linear-gradient(90deg, #63c2ff 0%, #f098ff 50%, #fff75f 100%);
  display: inline-flex;
  gap: var(--star-gap);
}
.star-btn {
  --i: 0;
  width: var(--star-slot);
  height: var(--star-slot);
  padding: 0;
  border: 0;
  background: transparent;
  color: #3a3a3a;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: transform 0.12s ease;
}
.star-btn svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
  display: block;
  pointer-events: none;
}
.star-btn.is-on,
.star-rate:hover .star-btn {
  background-image: var(--star-grad);
  background-size: var(--star-span) 100%;
  background-position: calc(var(--i) * (var(--star-slot) + var(--star-gap)) * -1) 0;
  background-repeat: no-repeat;
  -webkit-mask-image: var(--star-mask);
  mask-image: var(--star-mask);
  -webkit-mask-size: 30px 30px;
  mask-size: 30px 30px;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.star-btn.is-on svg,
.star-rate:hover .star-btn svg {
  opacity: 0;
}
.star-btn:hover { transform: scale(1.1); }
.star-rate:hover .star-btn:hover ~ .star-btn {
  background-image: none;
  -webkit-mask-image: none;
  mask-image: none;
}
.star-rate:hover .star-btn:hover ~ .star-btn svg {
  opacity: 1;
  fill: currentColor;
  color: #3a3a3a;
}
.rating-summary {
  color: #aaa;
  font-size: 14px;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.rating-summary strong {
  color: #fff;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.views-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #888;
  font-size: 13px;
}
.views-stat svg {
  width: 16px;
  height: 16px;
  opacity: 0.85;
}
.views-stat strong {
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.meta-link { color: #aaa; }
.meta-link:hover { color: #fff; }
.profile-cards.stacked {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.info-card {
  background: var(--bw-card-bg, #18181b66);
  border: 1px solid var(--bw-bio-border, #27272a80);
  border-radius: var(--bw-radius-2xl, 1rem);
  padding: 14px;
  backdrop-filter: blur(var(--bw-blur-sm, 8px));
  -webkit-backdrop-filter: blur(var(--bw-blur-sm, 8px));
}
.info-card h2 {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  font-weight: 700;
}
.attr-list { margin: 0; }
.attr-list > div {
  position: relative;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  padding: 9px 8px;
  margin: 0 -8px;
  border-radius: 8px;
  border-bottom: 1px solid #1c1c1c;
}
.attr-list > div:last-child { border-bottom: 0; }
.attr-list > div.is-link { cursor: pointer; }
.attr-list > div.is-link:hover {
  background: #1a1a1a;
}
.attr-list > div.is-link:hover dd {
  color: var(--blue-soft);
}
.attr-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 8px;
}
.attr-list dt {
  margin: 0;
  color: #777;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: relative;
  z-index: 0;
}
.attr-list dd {
  margin: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  position: relative;
  z-index: 0;
}
.attr-list .sub {
  margin-top: 2px;
  color: #777;
  font-size: 12px;
  font-weight: 400;
}
.meta-link { color: #aaa; }
.meta-link:hover { color: var(--blue-soft); }
.similar-section { margin-top: 36px; }
.similar-head { margin-bottom: 16px; }
.similar-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.similar-title-row h2 { margin: 0; }
.section-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  color: #9a9a9a;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.editorial-note {
  margin: 16px 0 0;
  color: #555;
  font-size: 12px;
  line-height: 1.5;
}
.similar-section .grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .profile-hero { grid-template-columns: 1fr; }
  .profile-media {
    position: static;
    top: auto;
    max-width: none;
  }
  .profile-cards.stacked { grid-template-columns: 1fr; }
  .thumb-nav { display: none; }
  .similar-section .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .similar-section .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Collapsed icon rail (desktop hamburger toggle) */
body.sidebar-collapsed { --sidebar-w: 72px; }
body.sidebar-collapsed .sidebar {
  width: 72px;
  padding: 10px 8px;
}
body.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 0;
  width: 100%;
  height: 40px;
  margin: 0 0 4px;
  gap: 0;
  border-radius: 10px;
}
body.sidebar-collapsed .nav-item .nav-label { display: none; }
body.sidebar-collapsed .nav-item svg {
  width: 20px;
  height: 20px;
  margin: 0;
}
body.sidebar-collapsed .nav-section,
body.sidebar-collapsed .nav-list-link,
body.sidebar-collapsed .nav-more { display: none; }

/* ===== MODEL LISTS (BabeWiki parity) ===== */
.lists-page { padding: 24px 0 64px; }
.lists-hero {
  text-align: center;
  margin: 0 auto 40px;
  max-width: 720px;
}
.lists-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.lists-hero p {
  margin: 0 auto;
  max-width: 560px;
  color: #a1a1aa;
  font-size: 18px;
  line-height: 1.55;
}
.lists-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px; /* BabeWiki md:gap-8 */
  max-width: 1152px; /* BabeWiki max-w-6xl */
  margin: 0 auto;
}
.list-card {
  display: block;
  height: 260px;
  padding: 32px; /* BabeWiki sm:p-8 */
  border-radius: 12px; /* BabeWiki rounded-xl */
  background: #1a1a1a;
  border: 1px solid #333;
  color: inherit;
  text-decoration: none;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.list-card:hover {
  background: #222;
  border-color: #444;
  box-shadow: 0 10px 15px -3px rgb(59 130 246 / 0.1);
}
.list-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.list-accent {
  display: block;
  width: 48px; /* BabeWiki w-12 */
  height: 6px; /* BabeWiki h-1.5 */
  margin: 0 0 16px;
  border-radius: 9999px;
  background: linear-gradient(to right, var(--accent-from, #a855f7), var(--accent-to, #4f46e5));
  flex: none;
}
.list-title {
  margin: 0 0 12px;
  font-size: 24px; /* BabeWiki sm:text-2xl */
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #fff;
  transition: color 0.2s ease;
}
.list-card:hover .list-title {
  color: #60a5fa; /* BabeWiki group-hover:text-blue-400 */
}
.list-desc {
  margin: 0 0 24px;
  color: #888;
  font-size: 16px;
  line-height: 1.625;
  flex: 1;
}
.list-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  color: #666;
  font-size: 14px;
  font-weight: 500;
}
.list-arrow {
  color: #666;
  flex: none;
  transition: transform 0.2s ease, color 0.2s ease;
}
.list-card:hover .list-arrow {
  color: #60a5fa;
  transform: translateX(4px);
}

/* ===== NEAR ME ===== */
.near-page { padding: 20px 0 48px; }
.near-hero {
  text-align: center;
  margin-bottom: 40px;
}
.near-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.035em;
}
.near-hero p {
  margin: 0 auto 16px;
  max-width: 520px;
  color: var(--muted);
  font-size: 15px;
}
.near-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
}
.near-pill,
.near-btn,
.near-change > summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #2a2a2a;
  background: #121212;
  color: #ddd;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.near-change > summary::-webkit-details-marker { display: none; }
.near-pill.is-active {
  background: #1a1a1a;
  border-color: #3a3a3a;
  color: #fff;
}
.near-btn:hover,
.near-change > summary:hover {
  background: #1a1a1a;
  color: #fff;
}
.near-change { position: relative; }
.near-change-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  width: min(320px, 80vw);
  max-height: 320px;
  overflow: auto;
  padding: 8px;
  border-radius: 12px;
  background: #121212;
  border: 1px solid #2a2a2a;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}
.near-change-menu a {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 10px;
  border-radius: 8px;
  color: #ddd;
  font-size: 13px;
}
.near-change-menu a:hover { background: #1a1a1a; color: #fff; }
.near-change-menu strong { color: #fff; }
.near-change-menu em { color: #777; font-style: normal; font-size: 12px; }
.near-ico { opacity: 0.85; font-size: 12px; }

.country-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
}
.country-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 14px;
  border-radius: 12px;
  background: #121212;
  border: 1px solid #1f1f1f;
  min-height: 96px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.country-card:hover,
.country-card.is-active {
  border-color: #333;
  background: #161616;
}
.country-code {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.country-name {
  color: #9a9a9a;
  font-size: 13px;
}
.country-count {
  margin-top: auto;
  padding-top: 8px;
  color: #777;
  font-size: 12px;
  font-weight: 500;
}

@media (max-width: 1200px) {
  .country-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .lists-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}
@media (max-width: 900px) {
  .country-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .lists-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .list-card {
    height: auto;
    min-height: 220px;
    padding: 24px;
  }
  .list-title { font-size: 20px; }
  .list-desc { font-size: 14px; margin-bottom: 16px; }
  .country-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* age gate */
.age-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(ellipse at top, rgba(37,99,235,0.18), transparent 50%), #000;
}
.age-box {
  width: min(400px, 100%);
  background: #111;
  border: 1px solid #222;
  border-radius: 14px;
  padding: 24px;
  text-align: center;
}
.age-box h1 { margin: 12px 0; font-size: 22px; }
.age-box p { color: #999; }
.age-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }

/* ===== ADMIN (scoped) ===== */
.admin-body {
  --a-bg: #07080b;
  --a-panel: rgba(18, 20, 26, 0.88);
  --a-panel-solid: #12141a;
  --a-line: rgba(255, 255, 255, 0.08);
  --a-line-strong: rgba(255, 255, 255, 0.14);
  --a-text: #f3f1ec;
  --a-muted: #9a968c;
  --a-faint: #6d6a63;
  --a-accent: #7dd3fc;
  --a-accent-2: #38bdf8;
  --a-accent-dim: rgba(56, 189, 248, 0.14);
  --a-danger: #fb7185;
  --a-ok: #4ade80;
  --a-font: "Figtree", ui-sans-serif, sans-serif;
  --a-display: "Syne", ui-sans-serif, sans-serif;
  --a-radius: 18px;
  --a-side: 260px;
  margin: 0;
  min-height: 100vh;
  color: var(--a-text);
  font-family: var(--a-font);
  background:
    radial-gradient(900px 480px at 12% -10%, rgba(56, 189, 248, 0.16), transparent 55%),
    radial-gradient(700px 420px at 90% 8%, rgba(251, 191, 36, 0.08), transparent 50%),
    linear-gradient(180deg, #0b0d12 0%, var(--a-bg) 40%, #05060a 100%);
  background-attachment: fixed;
}
.admin-body *, .admin-body *::before, .admin-body *::after { box-sizing: border-box; }
.admin-body a { color: inherit; text-decoration: none; }
.admin-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  color: #c7dff7;
  background: rgba(255,255,255,0.04);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}

.admin-shell { display: grid; grid-template-columns: var(--a-side) 1fr; min-height: 100vh; }
.admin-sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--a-line);
  background: rgba(8, 9, 12, 0.72);
  backdrop-filter: blur(18px);
}
.admin-logo {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 18px; margin-bottom: 4px;
}
.admin-logo-mark {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  font-family: var(--a-display); font-weight: 800; font-size: 15px; letter-spacing: -0.04em;
  color: #041018;
  background: linear-gradient(145deg, #e8f7ff 0%, var(--a-accent) 45%, #38bdf8 100%);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.25);
}
.admin-logo-text { display: grid; gap: 1px; }
.admin-logo-text strong {
  font-family: var(--a-display); font-size: 1.05rem; font-weight: 700; letter-spacing: -0.03em;
}
.admin-logo-text small { color: var(--a-faint); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.admin-nav-label {
  margin: 8px 10px 6px; color: var(--a-faint); font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.admin-side-nav { display: grid; gap: 4px; }
.admin-side-link {
  display: grid; gap: 2px; padding: 11px 12px; border-radius: 14px;
  border: 1px solid transparent; transition: 0.18s ease;
}
.admin-side-link:hover { background: rgba(255,255,255,0.03); border-color: var(--a-line); }
.admin-side-link.is-active {
  background: var(--a-accent-dim);
  border-color: rgba(125, 211, 252, 0.28);
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.08);
}
.admin-side-link-title { font-weight: 650; font-size: 14px; }
.admin-side-link-hint { color: var(--a-faint); font-size: 11px; }
.admin-sidebar-foot { margin-top: auto; display: grid; gap: 4px; padding-top: 16px; border-top: 1px solid var(--a-line); }
.admin-side-quiet {
  padding: 10px 12px; border-radius: 12px; color: var(--a-muted); font-size: 13px; font-weight: 500;
}
.admin-side-quiet:hover { color: var(--a-text); background: rgba(255,255,255,0.03); }
.admin-side-logout:hover { color: var(--a-danger); }

.admin-main { min-width: 0; padding: 28px 28px 56px; }
.admin-top {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.admin-kicker {
  margin: 0 0 6px; color: var(--a-accent); font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.admin-page-title {
  margin: 0; font-family: var(--a-display); font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 780; letter-spacing: -0.045em; line-height: 1.05;
}
.admin-top-actions, .admin-hero-actions, .admin-empty-actions, .admin-form-actions {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.admin-content { max-width: 1120px; }

.admin-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--a-font); font-size: 13.5px; font-weight: 650; cursor: pointer;
  transition: 0.18s ease; text-decoration: none; white-space: nowrap;
}
.admin-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.admin-btn-primary {
  color: #041018;
  background: linear-gradient(135deg, #eaf8ff 0%, var(--a-accent) 40%, var(--a-accent-2) 100%);
  box-shadow: 0 10px 28px rgba(56, 189, 248, 0.22);
}
.admin-btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.admin-btn-ghost {
  color: var(--a-text); background: rgba(255,255,255,0.03); border-color: var(--a-line-strong);
}
.admin-btn-ghost:hover { background: rgba(255,255,255,0.06); }
.admin-btn-danger { color: #fff; background: linear-gradient(135deg, #e11d48, #be123c); }
.admin-btn-block { width: 100%; }

.admin-alert {
  padding: 12px 14px; border-radius: 14px; margin-bottom: 16px; font-size: 14px;
  border: 1px solid transparent;
}
.admin-alert a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.admin-alert-ok { background: rgba(74, 222, 128, 0.08); border-color: rgba(74, 222, 128, 0.28); color: #86efac; }
.admin-alert-err { background: rgba(251, 113, 133, 0.08); border-color: rgba(251, 113, 133, 0.28); color: #fda4af; }

.admin-stat-grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px;
}
.admin-stat-grid-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.admin-stat-card {
  position: relative; overflow: hidden;
  padding: 16px 14px 14px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
  border: 1px solid var(--a-line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.admin-stat-card::after {
  content: ""; position: absolute; inset: auto -20% -40% auto; width: 90px; height: 90px;
  background: radial-gradient(circle, rgba(125,211,252,0.18), transparent 70%);
  pointer-events: none;
}
.admin-stat-hint { margin: 0; color: var(--a-faint); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.admin-stat-value {
  margin: 8px 0 2px; font-family: var(--a-display); font-size: 1.7rem; font-weight: 750;
  letter-spacing: -0.04em; line-height: 1;
}
.admin-stat-label { margin: 0; color: var(--a-muted); font-size: 13px; font-weight: 550; }

.admin-panel {
  background: var(--a-panel);
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius);
  padding: 18px 18px 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.22);
}
.admin-panel-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.admin-panel-head h2 {
  margin: 0; font-family: var(--a-display); font-size: 1.15rem; font-weight: 700; letter-spacing: -0.03em;
}
.admin-panel-head p { margin: 4px 0 0; color: var(--a-faint); font-size: 12px; }
.admin-search { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.admin-search input {
  min-width: min(260px, 70vw); height: 42px; border-radius: 999px; padding: 0 14px;
  border: 1px solid var(--a-line-strong); background: rgba(0,0,0,0.28); color: var(--a-text);
  font: inherit;
}
.admin-search input:focus { outline: none; border-color: rgba(125, 211, 252, 0.55); box-shadow: 0 0 0 3px rgba(56,189,248,0.12); }

.admin-empty-state {
  text-align: center; padding: 48px 20px 40px; position: relative;
}
.admin-empty-orb {
  width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 24px;
  background:
    radial-gradient(circle at 30% 30%, #eaf8ff, var(--a-accent) 45%, transparent 70%),
    linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid rgba(125,211,252,0.25);
  box-shadow: 0 18px 40px rgba(56,189,248,0.18);
  animation: admin-orb 4.5s ease-in-out infinite;
}
@keyframes admin-orb {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.admin-empty-state h3 {
  margin: 0 0 8px; font-family: var(--a-display); font-size: 1.45rem; letter-spacing: -0.03em;
}
.admin-empty-state p {
  margin: 0 auto 18px; max-width: 420px; color: var(--a-muted); font-size: 14px; line-height: 1.55;
}
.admin-empty-actions { justify-content: center; }

.admin-table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--a-line); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
  padding: 12px 12px; text-align: left; font-size: 13px; vertical-align: middle;
  border-bottom: 1px solid var(--a-line);
}
.admin-table th {
  color: var(--a-faint); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(255,255,255,0.02);
}
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr { transition: background 0.15s ease; }
.admin-table tbody tr:hover { background: rgba(255,255,255,0.025); }
.admin-thumb-cell { width: 56px; }
.admin-thumb {
  width: 42px; height: 56px; object-fit: cover; border-radius: 10px; display: block;
  background: #0c0d11; border: 1px solid var(--a-line);
}
.admin-thumb-empty { display: block; }
.admin-name { color: var(--a-text); font-weight: 650; }
.admin-name:hover { color: var(--a-accent); }
.admin-slug { color: var(--a-faint); font-size: 11px; margin-top: 2px; }
.admin-flags { white-space: nowrap; }
.admin-pill {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,0.06); color: #ddd8ce; margin-right: 4px;
}
.admin-pill-of { background: rgba(56,189,248,0.14); color: #bae6fd; }
.admin-row-actions { display: flex; gap: 12px; align-items: center; white-space: nowrap; }
.admin-row-actions a { color: var(--a-muted); font-size: 12px; font-weight: 600; }
.admin-row-actions a:hover { color: var(--a-text); }
.admin-row-actions form { display: inline; margin: 0; }
.admin-link-danger {
  background: none; border: 0; color: var(--a-danger); cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; padding: 0;
}
.admin-link-danger:hover { text-decoration: underline; }

.admin-pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.admin-pager a {
  min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--a-line); color: var(--a-muted); font-size: 13px; font-weight: 600; padding: 0 8px;
}
.admin-pager a.is-active {
  color: #041018; border-color: transparent;
  background: linear-gradient(135deg, #eaf8ff, var(--a-accent));
}

.admin-danger {
  margin-top: 28px; border: 1px solid rgba(251, 113, 133, 0.28); border-radius: 16px;
  padding: 12px 14px; background: rgba(127, 29, 29, 0.18); color: #fecdd3;
}
.admin-danger summary { cursor: pointer; font-weight: 700; color: #fda4af; }
.admin-wipe-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.admin-wipe-form input {
  max-width: 160px; height: 42px; border-radius: 12px; padding: 0 12px;
  border: 1px solid rgba(251,113,133,0.35); background: rgba(0,0,0,0.35); color: #fff; font: inherit;
}

.admin-bot-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; margin-bottom: 14px; }
.admin-lede { margin: 0 0 16px; color: var(--a-muted); font-size: 14px; line-height: 1.55; max-width: 62ch; }
.admin-lede a { color: var(--a-accent); text-decoration: underline; text-underline-offset: 3px; }
.admin-muted { color: var(--a-muted); font-size: 13px; }
.admin-bot-badge {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 8px 12px; border-radius: 999px; border: 1px solid var(--a-line);
}
.admin-bot-badge.is-on { background: rgba(74,222,128,0.12); border-color: rgba(74,222,128,0.3); color: #86efac; }
.admin-bot-badge.is-off { background: rgba(255,255,255,0.03); color: var(--a-muted); }
.admin-meta-list { margin: 18px 0 0; display: grid; gap: 10px; }
.admin-meta-list > div { display: grid; gap: 3px; }
.admin-meta-list dt { font-size: 10px; color: var(--a-faint); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.admin-meta-list dd { margin: 0; font-size: 13px; color: #d7d3ca; word-break: break-all; }
.admin-log {
  margin: 0; max-height: 420px; overflow: auto; background: #05060a; border: 1px solid var(--a-line);
  border-radius: 14px; padding: 14px; font-size: 12px; line-height: 1.5; color: #c8d0db; white-space: pre-wrap;
}
.admin-code {
  margin: 0; background: #05060a; border: 1px solid var(--a-line); border-radius: 14px;
  padding: 14px; overflow: auto; font-size: 12px; color: #c8d0db;
}

.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-form-grid .full { grid-column: 1 / -1; }
.admin-form-actions { margin-top: 16px; }
.admin-body .admin-form-grid label,
.admin-body .admin-field span {
  display: block; font-size: 12px; color: var(--a-muted); margin-bottom: 6px; font-weight: 600;
}
.admin-body .admin-form-grid input,
.admin-body .admin-form-grid textarea,
.admin-body .admin-form-grid select,
.admin-body .admin-field input {
  width: 100%; background: rgba(0,0,0,0.28); border: 1px solid var(--a-line-strong); color: var(--a-text);
  border-radius: 12px; padding: 11px 12px; font: inherit;
}
.admin-body .admin-form-grid textarea { min-height: 140px; resize: vertical; }
.admin-body .admin-form-grid input:focus,
.admin-body .admin-form-grid textarea:focus,
.admin-body .admin-form-grid select:focus,
.admin-body .admin-field input:focus {
  outline: none; border-color: rgba(125, 211, 252, 0.55); box-shadow: 0 0 0 3px rgba(56,189,248,0.12);
}
.admin-check-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding-top: 6px; }
.admin-check-row label {
  display: inline-flex !important; gap: 8px; align-items: center; color: #ddd8ce; margin: 0 !important; font-weight: 550;
}
.admin-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.admin-gallery-item {
  margin: 0; background: #0c0d11; border-radius: 12px; overflow: hidden; border: 1px solid var(--a-line);
}
.admin-gallery-item img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.admin-gallery-item figcaption { font-size: 11px; text-align: center; padding: 5px; color: #86efac; }

/* Login */
.admin-body-login { display: grid; place-items: center; padding: 24px; }
.admin-login { width: min(420px, 100%); }
.admin-login-panel {
  padding: 28px 26px 24px; border-radius: 24px;
  background: rgba(14, 16, 22, 0.9); border: 1px solid var(--a-line);
  box-shadow: 0 30px 80px rgba(0,0,0,0.45); backdrop-filter: blur(18px);
}
.admin-login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.admin-login-brand strong {
  display: block; font-family: var(--a-display); font-size: 1.05rem; letter-spacing: -0.03em;
}
.admin-login-brand span { color: var(--a-faint); font-size: 12px; }
.admin-login h1 {
  margin: 0 0 8px; font-family: var(--a-display); font-size: 1.85rem; letter-spacing: -0.04em; line-height: 1.1;
}
.admin-login-sub { margin: 0 0 20px; color: var(--a-muted); font-size: 14px; }
.admin-login-form { display: grid; gap: 12px; }
.admin-field { display: block; }

@media (max-width: 1100px) {
  .admin-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: relative; height: auto; border-right: 0; border-bottom: 1px solid var(--a-line);
  }
  .admin-side-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-sidebar-foot { margin-top: 12px; grid-template-columns: 1fr 1fr; }
  .admin-main { padding: 20px 16px 48px; }
  .admin-bot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .admin-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-form-grid { grid-template-columns: 1fr; }
  .admin-side-nav { grid-template-columns: 1fr; }
  .admin-top-actions { width: 100%; }
  .admin-top-actions .admin-btn { flex: 1; }
}

/* ===== EXPLORE / LIST PAGES (BabeWiki hero parity) ===== */
.explore-page { padding: 8px 0 48px; }
.list-hero {
  text-align: left;
  margin: 0 0 28px;
  max-width: none;
}
.list-hero .crumbs {
  margin: 0 0 16px;
  font-size: 13px;
  color: #666;
}
.list-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: #fff;
}
.list-hero-desc {
  max-width: 768px;
  margin: 0 0 20px;
}
.list-hero-desc p {
  margin: 0;
  color: #a0a0a0;
  font-size: 16px;
  line-height: 1.65;
}
.list-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin: 0 0 8px;
}
.list-hero-count {
  margin: 0;
  color: #666;
  font-size: 14px;
}
.list-hero-count strong { color: #fff; font-weight: 600; }
.view-toggle {
  display: inline-flex;
  gap: 8px;
}
.view-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  background: #141414;
  color: #888;
}
.view-btn svg { width: 16px; height: 16px; }
.view-btn:hover { color: #fff; border-color: #3a3a3a; }
.view-btn.is-active {
  background: #fff;
  border-color: #fff;
  color: #000;
}

.model-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.model-list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #141414;
  border: 1px solid #1f1f1f;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.model-list-row:hover {
  background: #1a1a1a;
  border-color: #2a2a2a;
}
.ml-rank {
  min-width: 40px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.ml-avatar {
  width: 48px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: #0a0a0a;
  flex: none;
}
.ml-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.ml-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ml-name {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ml-sub {
  color: #888;
  font-size: 13px;
}

/* legacy centered explore hero (favorites etc.) */
.explore-hero {
  text-align: center;
  margin: 0 auto 32px;
  max-width: 720px;
}
.explore-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.explore-kicker {
  margin: 0 auto 8px;
  max-width: 540px;
  color: #a1a1aa;
  font-size: 16px;
  line-height: 1.5;
}
.explore-count {
  margin: 0;
  color: #666;
  font-size: 13px;
  font-weight: 500;
}
.explore-back {
  margin: 0 0 12px;
  font-size: 13px;
}
.explore-back a { color: #888; }
.explore-back a:hover { color: #fff; }

.favorites-empty {
  text-align: center;
  padding: 48px 16px;
  color: #888;
}
.favorites-empty p { margin: 0 0 16px; }

.leaderboard-table {
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid #222;
  border-radius: 14px;
  overflow: hidden;
  background: #121212;
}
.lb-head, .lb-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 88px 100px 160px;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
}
.lb-head {
  background: #181818;
  color: #777;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.lb-row {
  border-top: 1px solid #1f1f1f;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}
.lb-row:hover { background: #191919; }
.lb-rank {
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.lb-performer {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.lb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  background: #222;
  flex: none;
}
.lb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lb-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-score, .lb-views {
  font-variant-numeric: tabular-nums;
  color: #ccc;
  font-weight: 600;
}
.lb-country {
  color: #888;
  font-size: 13px;
  text-align: right;
}
@media (max-width: 800px) {
  .lb-head, .lb-row { grid-template-columns: 56px minmax(0, 1fr) 64px 72px; }
  .lb-country { display: none; }
}

.game-page .game-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px;
  border-radius: 16px;
  background: #141414;
  border: 1px solid #222;
  text-align: center;
}
.game-photo {
  width: min(280px, 100%);
  aspect-ratio: 3 / 4;
  margin: 0 auto 18px;
  border-radius: 14px;
  overflow: hidden;
  background: #0a0a0a;
}
.game-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.game-choices {
  display: grid;
  gap: 10px;
}
.game-choice {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #333;
  background: #1a1a1a;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.game-choice:hover:not(:disabled) { border-color: #555; background: #222; }
.game-choice.is-correct { border-color: #22c55e; background: rgba(34,197,94,0.12); color: #4ade80; }
.game-choice.is-wrong { border-color: #ef4444; background: rgba(239,68,68,0.12); color: #f87171; }
.game-feedback {
  min-height: 24px;
  margin: 14px 0 0;
  color: #aaa;
  font-size: 14px;
}
.hl-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}
.hl-vs {
  align-self: center;
  font-weight: 800;
  color: #666;
}
.hl-item h2 {
  margin: 0 0 4px;
  font-size: 15px;
}
.hl-height {
  margin: 0;
  color: #888;
  font-size: 13px;
}
.hl-height.is-hidden { opacity: 0.5; }
.hl-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.games-grid .list-card { height: 200px; }
@media (max-width: 700px) {
  .hl-pair { grid-template-columns: 1fr; }
  .hl-vs { display: none; }
}
