:root {
  color-scheme: dark;
  --bg: #080a0f;
  --bg2: #111622;
  --bg3: #1a2233;
  --text: #eef1f8;
  --muted: #9aa3b8;
  --accent: #ff4757;
  --accent2: #ff7b92;
  --accent-glow: rgba(255, 71, 87, .35);
  --border: #2b3548;
  --border-soft: rgba(255, 255, 255, .06);
  --radius: 10px;
  --focus: #6c9eff;
  --header-h: 67px;
  --sidebar-w: 264px;
  --text-scale: 1.2;
  --side-title-size: .756rem;
  --side-link-size: .78rem;
  --page-pad: clamp(.75rem, 2vw, 1.5rem);
  --grid-cols: 6;
  --gap: 14px;
  --font: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --shadow-card: 0 4px 18px rgba(0, 0, 0, .38);
  --shadow-card-hover: 0 10px 28px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 107, 129, .22);
  --glass: rgba(17, 22, 34, .82);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  font-size: calc(100% * var(--text-scale));
}
body {
  margin: 0;
  font-family: var(--font);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 100% 70% at 0% -15%, rgba(255, 71, 87, .16), transparent 55%),
    radial-gradient(ellipse 80% 55% at 100% 0%, rgba(108, 158, 255, .12), transparent 50%),
    radial-gradient(ellipse 60% 45% at 50% 110%, rgba(255, 107, 129, .08), transparent 55%),
    url('/img/bg-dots.svg');
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.45;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent2); text-decoration: none; transition: color .15s ease; }
a:hover { text-decoration: underline; color: #ffb8c4; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  background: var(--focus); color: #000; padding: .5rem 1rem;
}
.skip-link:focus { left: 0; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(180deg, rgba(12, 15, 22, .97) 0%, rgba(10, 12, 18, .92) 100%);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
  backdrop-filter: blur(14px) saturate(1.2);
}
.site-header::after {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 129, .45), rgba(108, 158, 255, .35), transparent);
}
.header-top {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .75rem 1rem; padding: .6rem var(--page-pad); width: 100%;
}
.header-top-start {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .75rem 1rem; flex-shrink: 0;
}
.header-top-center {
  flex: 1 1 14rem;
  display: flex; justify-content: center; align-items: center;
  min-width: 0;
}
.header-top-end {
  flex-shrink: 0; margin-left: auto;
}
.header-search-form {
  width: 50%; min-width: 11rem; max-width: 32rem;
}
.header-search-input {
  width: 100%;
  padding: .45rem .95rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(26, 34, 51, .85);
  color: var(--text);
  font: inherit; font-size: .85rem; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.header-search-input::placeholder { color: var(--muted); font-weight: 500; }
.header-search-input:hover {
  border-color: rgba(255, 107, 129, .25);
}
.header-search-input:focus {
  outline: none;
  border-color: rgba(255, 107, 129, .45);
  box-shadow: 0 0 0 2px rgba(255, 71, 87, .18), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.lang-picker { position: relative; }
.lang-picker-toggle {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .15rem; min-width: 4.5rem; padding: .35rem .65rem .4rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(26, 34, 51, .85);
  color: var(--text); cursor: pointer; font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: border-color .15s ease, background .15s ease;
}
.lang-picker-toggle:hover {
  border-color: rgba(255, 107, 129, .25);
  background: rgba(37, 46, 64, .95);
}
.lang-picker-label {
  font-size: .62rem; font-weight: 700; line-height: 1.1;
  color: var(--muted); text-transform: uppercase; letter-spacing: .03em;
}
.lang-picker-flag-picture,
.lang-picker-flag {
  display: block; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
}
.lang-picker-menu {
  position: absolute; top: calc(100% + .35rem); right: 0; z-index: 120;
  min-width: 11rem; max-height: min(60dvh, 22rem); overflow: auto;
  margin: 0; padding: .35rem; list-style: none;
  background: linear-gradient(165deg, rgba(20, 26, 40, .98), rgba(14, 18, 28, .99));
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  box-shadow: var(--shadow-card-hover);
}
.lang-picker.open .lang-picker-menu[hidden] { display: block; }
.lang-picker-item {
  display: flex; align-items: center; gap: .55rem;
  width: 100%; padding: .45rem .55rem;
  border: 0; border-radius: 6px; background: transparent;
  color: var(--text); font: inherit; font-size: .82rem;
  text-align: left; cursor: pointer; opacity: .92;
  text-decoration: none;
}
.lang-picker-item:hover { background: rgba(255, 71, 87, .08); text-decoration: none; }
.lang-picker-item[aria-current="true"] {
  background: rgba(255, 71, 87, .12);
  font-weight: 600;
}
.lang-picker-item-label { flex: 1; min-width: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.logo {
  font-weight: 800; font-size: 1.25rem;
  letter-spacing: -.02em;
  background: linear-gradient(120deg, #fff 0%, #ffd4dc 40%, var(--accent2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 71, 87, .25));
}
.logo:hover { text-decoration: none; filter: drop-shadow(0 0 22px rgba(255, 71, 87, .4)); }
.gender-nav { display: flex; flex-wrap: wrap; gap: .35rem; }
.gender-tab {
  padding: .45rem .85rem; border-radius: 999px;
  background: rgba(26, 34, 51, .85); color: var(--text);
  font-weight: 600; font-size: .85rem;
  border: 1px solid var(--border-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.gender-tab:hover {
  background: rgba(37, 46, 64, .95); text-decoration: none;
  border-color: rgba(255, 107, 129, .25);
}
.gender-tab.active {
  background: linear-gradient(135deg, var(--accent) 0%, #e8354a 55%, #c0392b 100%);
  color: #fff; border-color: transparent;
  box-shadow: 0 4px 16px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.gender-tab.online-models-badge {
  cursor: default;
  border-color: rgba(61, 214, 140, .22);
  background: rgba(26, 34, 51, .92);
}
.gender-tab.online-models-badge .online-count {
  color: #3dd68c;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.breadcrumbs {
  padding: .35rem var(--page-pad) .55rem; font-size: .82rem; font-weight: 700;
  color: var(--muted); width: 100%;
  background: linear-gradient(90deg, rgba(255, 71, 87, .04), transparent 40%, transparent 60%, rgba(108, 158, 255, .04));
}
.breadcrumbs a { color: var(--muted); font-weight: 700; }
.breadcrumbs a:hover { color: var(--accent2); }
.breadcrumbs [aria-current="page"] { font-weight: 700; }
.bc-sep { opacity: .5; margin: 0 .25rem; }

.page-wrap {
  display: grid;
  grid-template-columns: minmax(0, var(--sidebar-w)) minmax(0, 1fr);
  gap: var(--gap);
  width: 100%;
  max-width: none;
  margin: 0;
  padding: var(--page-pad);
  align-items: start;
  flex: 1 0 auto;
}
.page-wrap-listing {
  grid-template-columns: minmax(0, 1fr);
}
.content-wide { grid-column: 1 / -1; }
.page-wrap:has(.content-wide) { grid-template-columns: 1fr; }

/* Profile / player page — sidebar + main (same sidebar sizing as listing) */
.content-profile {
  min-width: 0;
  grid-column: 1 / -1;
}
.content-profile > .profile-row {
  position: relative;
  min-width: 0;
  padding-left: calc(var(--sidebar-w) + var(--gap));
  container-type: inline-size;
  --sidebar-grid-h: calc(
    ((100cqi - var(--gap) * (var(--grid-cols, 6) - 1)) / var(--grid-cols, 6)) * 3 / 4 * var(--grid-rows, 8)
    + var(--gap) * (var(--grid-rows, 8) - 1)
    + 0.5px * var(--grid-rows, 8)
  );
}
.profile-row > .sidebar-left {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--sidebar-w);
  height: var(--sidebar-grid-h);
  display: flex;
  min-height: 0;
}
.profile-row > .sidebar-left .sidebar {
  flex: 1;
  width: 100%;
  position: relative;
  top: auto;
  max-height: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}
.profile-main {
  width: 100%;
  min-width: 0;
}

.content-listing {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, var(--sidebar-w)) minmax(0, 1fr);
  column-gap: var(--gap);
  row-gap: calc(var(--gap) * 0.75);
  align-items: start;
}
.content-listing > .page-title {
  grid-column: 1 / -1;
  margin-bottom: 0;
  text-align: center;
  justify-self: center;
  width: 100%;
}
.content-listing > .page-intro {
  grid-column: 1 / -1;
  margin: 0 auto .75rem;
  padding: 0 var(--page-pad);
  max-width: 72rem;
  font-size: var(--side-link-size);
  font-weight: 400;
  line-height: 1.55;
  color: var(--text);
  text-align: center;
}
.content-listing > .listing-row {
  grid-column: 1 / -1;
  position: relative;
  min-width: 0;
  padding-left: calc(var(--sidebar-w) + var(--gap));
  container-type: inline-size;
  --sidebar-grid-h: calc(
    ((100cqi - var(--gap) * (var(--grid-cols, 6) - 1)) / var(--grid-cols, 6)) * 3 / 4 * var(--grid-rows, 8)
    + var(--gap) * (var(--grid-rows, 8) - 1)
    + 0.5px * var(--grid-rows, 8)
  );
}
.listing-row > .sidebar-left {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--sidebar-w);
  height: var(--sidebar-grid-h);
  display: flex;
  min-height: 0;
}
.listing-row > .sidebar-left .sidebar {
  flex: 1;
  width: 100%;
  position: relative;
  top: auto;
  max-height: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}
.listing-row > .model-grid {
  width: 100%;
  min-width: 0;
  overflow: visible;
}
.content-listing > .pagination {
  grid-column: 2;
  justify-self: center;
  margin-top: 0;
  width: max-content;
  max-width: 100%;
}

.sidebar {
  position: sticky; top: calc(var(--header-h) + 8px);
  max-height: calc(100dvh - var(--header-h) - 16px);
  overflow: auto;
  background: linear-gradient(165deg, rgba(20, 26, 40, .95) 0%, rgba(14, 18, 28, .98) 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: .5rem .65rem;
  font-size: var(--side-link-size);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, .04);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 107, 129, .35) transparent;
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 107, 129, .35);
  border-radius: 999px;
}
.side-section { margin-bottom: .65rem; }
.side-section h3, .side-section summary {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); margin: .4rem 0 .25rem; cursor: pointer;
}
.side-section-primary > summary {
  font-size: var(--side-title-size);
  font-weight: 700;
  color: #b8c0d4;
  text-shadow: 0 0 20px rgba(255, 107, 129, .12);
}
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { margin: 0; }
.sidebar-left-inner .side-list a,
.sidebar-left-inner .side-list-programs .side-program-link {
  font-size: var(--side-link-size);
}
.side-list a {
  display: block; padding: .22rem 0; color: var(--text);
  font-size: var(--side-link-size);
  border-radius: 6px;
  transition: background .15s ease, color .15s ease;
}
.sidebar-left-inner .side-list a:hover,
.sidebar-left-inner .side-list a:focus-visible,
.sidebar-left-inner .side-list-programs .side-program-link:hover,
.sidebar-left-inner .side-list-programs .side-program-link:focus-visible,
.sidebar-left-inner .side-list-languages .side-language-link:hover,
.sidebar-left-inner .side-list-languages .side-language-link:focus-visible,
.sidebar-left-inner .side-list-tags .side-tag-link:hover,
.sidebar-left-inner .side-list-tags .side-tag-link:focus-visible {
  color: var(--accent2);
  background: rgba(255, 107, 129, .1);
  text-decoration: none;
}
.sidebar-left-inner .side-list-programs .side-program-link:hover span,
.sidebar-left-inner .side-list-programs .side-program-link:focus-visible span,
.sidebar-left-inner .side-list-languages .side-language-link:hover span,
.sidebar-left-inner .side-list-languages .side-language-link:focus-visible span,
.sidebar-left-inner .side-list-tags .side-tag-link:hover span,
.sidebar-left-inner .side-list-tags .side-tag-link:focus-visible span {
  color: var(--accent2);
}
.sidebar-left-inner .side-list-programs .side-program-link span,
.sidebar-left-inner .side-section-more .side-list a {
  text-transform: uppercase;
}
.side-section-more { margin-top: .35rem; padding-top: .5rem; border-top: 1px solid var(--border); }
.side-section > summary::-webkit-details-marker { display: none; }
.side-section > summary::marker { content: ''; }
.side-section > summary::before {
  content: '▸';
  display: inline-block;
  margin-right: .35rem;
  font-size: .65rem;
  color: var(--muted);
  transition: transform .15s ease;
}
.side-section[open] > summary::before { transform: rotate(90deg); }
.side-section-popular > .side-popular-inner {
  margin: .15rem 0 0 .35rem; padding-left: .35rem;
  border-left: 2px solid transparent;
  border-image: linear-gradient(180deg, rgba(255, 107, 129, .5), rgba(108, 158, 255, .25)) 1;
}
.side-section-hub { margin-bottom: .2rem; }
.side-section-popular .side-section-hub > summary {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  font-weight: inherit;
}
.side-list-programs .side-program-link,
.side-list-languages .side-language-link,
.side-list-tags .side-tag-link {
  display: flex; align-items: center; gap: .4rem;
}
.side-program-logo-picture,
.program-logo-picture {
  flex-shrink: 0;
  display: block;
  line-height: 0;
}
.side-program-logo,
.side-program-logo-picture img,
.program-logo,
.program-logo-picture img {
  width: 16px; height: 16px; object-fit: contain;
}
.side-program-logo,
.side-program-logo-picture img {
  border-radius: 3px;
  background: rgba(0, 0, 0, .45);
  padding: 2px;
  box-sizing: content-box;
}
.program-logo,
.program-logo-picture img {
  border-radius: 3px;
  background: rgba(0, 0, 0, .55);
  padding: 2px;
  box-sizing: content-box;
}
.side-tag-icon-picture {
  flex-shrink: 0;
  display: block;
  line-height: 0;
}
.side-tag-icon,
.side-tag-icon-picture img {
  width: 16px; height: 16px; object-fit: contain;
  opacity: .92;
  filter: drop-shadow(0 0 4px rgba(255, 107, 129, .15));
}
.side-language-flag-picture {
  flex-shrink: 0;
  display: block;
  line-height: 0;
}
.side-language-flag,
.side-language-flag-picture img {
  width: 20px; height: 14px; object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
}

.content { min-width: 0; }
.page-title {
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  margin: 0 0 .75rem; font-weight: 700;
  text-align: center;
  background: linear-gradient(90deg, #fff 0%, #e8ecf4 70%, #c5cdd9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .35));
}

/* Фиксированное число колонок (как gridCols в config); ширина превью — только через 1fr */
.model-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 6), minmax(0, 1fr));
  gap: var(--gap);
}
.content-listing .model-grid {
  align-content: start;
}

.model-card {
  background: linear-gradient(180deg, rgba(22, 28, 42, .95) 0%, rgba(14, 18, 28, 1) 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.model-card:hover {
  border-color: rgba(255, 107, 129, .35);
  box-shadow: var(--shadow-card-hover);
}
.model-card-link { display: block; color: inherit; text-decoration: none; }
.model-card-link:hover { text-decoration: none; }
.model-thumb-wrap {
  position: relative; aspect-ratio: 4/3; background: #000;
}
.model-thumb-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
  border-radius: inherit;
  z-index: 3;
}
.model-thumb-picture,
.model-thumb-picture img,
.model-thumb {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.model-thumb-picture { display: block; width: 100%; height: 100%; }
.program-logo {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 3px;
  background: rgba(0, 0, 0, .55);
  padding: 2px;
  box-sizing: content-box;
  pointer-events: none;
  z-index: 2;
}
.model-thumb-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .35rem;
  padding: 1.4rem .45rem .4rem;
  background: linear-gradient(180deg, transparent 0%, rgba(8, 10, 16, .55) 35%, rgba(0, 0, 0, .88) 72%);
  pointer-events: none;
  font-size: .72rem;
  line-height: 1.2;
}
.model-thumb-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.model-thumb-viewers {
  flex-shrink: 0;
  font-weight: 600;
  color: #e8eaed;
  font-variant-numeric: tabular-nums;
}

.pagination {
  display: flex; flex-wrap: wrap; gap: .35rem;
  margin: 1rem 0; align-items: center;
}
.pagination a, .pag-current, .pag-ellipsis {
  min-width: 2rem; text-align: center; padding: .35rem .5rem;
  border-radius: 6px; font-size: .82rem;
}
.pagination a {
  background: rgba(26, 34, 51, .9); color: var(--text);
  border: 1px solid var(--border-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.pagination a:hover {
  background: rgba(37, 46, 64, .95); text-decoration: none;
  border-color: rgba(255, 107, 129, .3);
}
.pag-current {
  background: linear-gradient(135deg, var(--accent), #e8354a);
  color: #fff; font-weight: 700;
  border: 1px solid transparent;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.pag-ellipsis { color: var(--muted); }

/* Player page — 25% wider than previous 960px cap */
.player-box,
.player-wrap {
  position: relative;
  width: 100%;
  max-width: min(100%, 1200px);
  margin: 0 auto .75rem;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card), 0 0 40px rgba(255, 71, 87, .08);
}
.player,
.player-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: calc(100dvh - 180px);
  border: 0;
}
.player {
  object-fit: contain;
  display: block;
  background: #000;
  z-index: 2;
}
.player-iframe {
  z-index: 3;
  background: #000;
}
.player-thumb-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}
.player-box--jasmin .player-thumb-overlay,
.player-box--jasmin-active .player-thumb-overlay {
  opacity: 1;
}
.player-box--jasmin-active .player,
.player-box--embed-active .player {
  visibility: hidden;
}
.player-box--embed-active .player-iframe {
  display: block;
  z-index: 5;
}
.player-fallback[hidden] {
  display: none !important;
}
.player-fallback {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.85);
  padding: 1rem;
  text-align: center;
}
.player-fallback-img {
  max-width: 100%;
  max-height: 70%;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: .75rem;
  opacity: .9;
}
.player-fallback-open {
  margin-top: 0.75rem;
  display: inline-block;
}
.player-fallback-msg {
  margin: 0;
  color: #ffb4b4;
  font-size: .88rem;
  max-width: 28rem;
}
.model-actions { margin: 0 0 .5rem; }
.btn-view-chat {
  display: inline-block;
  padding: .45rem .9rem;
  background: linear-gradient(135deg, var(--accent), #e8354a);
  color: #fff;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: filter .15s ease, box-shadow .15s ease;
}
.btn-view-chat:hover {
  filter: brightness(1.08); text-decoration: none;
  box-shadow: 0 6px 20px var(--accent-glow);
}
.model-profile { max-width: 1200px; margin: 0 auto; }
.similar-models {
  margin-top: calc(var(--gap) * 1.25);
  margin-inline: auto;
  width: fit-content;
  max-width: 100%;
}
.similar-models-title {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
  text-align: center;
  margin: 0 0 var(--gap);
  background: linear-gradient(90deg, #fff 0%, #e8ecf4 70%, #c5cdd9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.model-grid-similar {
  --similar-cols: 5;
  --home-cell-w: calc((100cqi - var(--gap) * (var(--grid-cols, 6) - 1)) / var(--grid-cols, 6));
  grid-template-columns: repeat(var(--similar-cols), var(--home-cell-w));
  justify-content: center;
}
.model-stats { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .85rem; color: var(--muted); }
.model-bio { font-size: .9rem; color: var(--muted); }
.model-tags-wrap { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.tag {
  font-size: .72rem;
  background: rgba(26, 34, 51, .85);
  border: 1px solid var(--border-soft); padding: .2rem .45rem; border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.tags-grid-stats,
.tags-grid-two,
.tags-grid-four {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .tags-grid-two { grid-template-columns: minmax(140px, 1fr) 2fr; }
  .tags-grid-stats { grid-template-columns: minmax(120px, 1fr) 1.4fr 1.2fr; }
}
@media (min-width: 1100px) {
  .tags-grid-stats { grid-template-columns: minmax(110px, .9fr) 1.5fr 1.1fr 1fr 1fr; }
}
@media (min-width: 900px) {
  .tags-grid-four { grid-template-columns: 1fr 1.2fr 1fr 1fr; }
}
.tags-col-title {
  margin: 0 0 .5rem; font-size: .8rem; font-weight: 600;
  color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
}
.tags-col {
  background: linear-gradient(165deg, rgba(20, 26, 40, .95), rgba(14, 18, 28, .98));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: .75rem;
  max-height: 70vh; overflow: auto;
  box-shadow: var(--shadow-card);
}
.tags-col ul { list-style: none; margin: 0; padding: 0; font-size: .82rem; }
.tags-col li { padding: .2rem 0; display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.tags-detail-hint {
  margin: 0 0 .5rem; font-size: .78rem; color: var(--muted);
}
.tag-label { flex: 1; text-align: right; word-break: break-word; }
.tag-count { color: var(--muted); font-size: .75rem; flex-shrink: 0; }
.tag-before-btn {
  background: none; border: none; color: var(--accent2);
  cursor: pointer; padding: .2rem 0; font: inherit; text-align: left;
  width: 100%; display: flex; justify-content: space-between;
}
.tag-before-btn:hover,
.tag-before-btn.active { color: var(--text); font-weight: 600; }

.site-footer {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-soft);
  background: linear-gradient(180deg, transparent, rgba(10, 12, 18, .85));
  position: relative;
  color: var(--muted);
  font-size: .82rem;
  flex-shrink: 0;
  width: 100%;
  clear: both;
  box-sizing: border-box;
}
/* Listing/profile: line + footer sit in the main column, below the sidebar */
body:has(.content-listing) .site-footer,
body:has(.content-profile) .site-footer {
  margin-left: calc(var(--page-pad) + var(--sidebar-w) + var(--gap));
  width: calc(100% - (var(--page-pad) * 2) - var(--sidebar-w) - var(--gap));
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 5%; right: 5%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 129, .35), rgba(108, 158, 255, .25), transparent);
}
.footer-inner {
  max-width: var(--page-max, 1400px);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1.5rem;
}
.footer-brand {
  margin-bottom: 2rem;
  max-width: 52rem;
}
.footer-logo {
  display: inline-block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: .02em;
  margin-bottom: .65rem;
}
.footer-logo:hover { color: var(--accent); }
.footer-about {
  margin: 0;
  line-height: 1.55;
  color: var(--muted);
  font-size: .84rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.75rem 1.25rem;
}
.footer-col { min-width: 0; }
.footer-heading {
  margin: 0 0 .85rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
}
.footer-links,
.footer-feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links li { margin-bottom: .4rem; }
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .8rem;
  transition: color .15s;
}
.footer-links a:hover { color: var(--accent2); }
.footer-feature { margin-bottom: .85rem; }
.footer-feature-title {
  display: block;
  color: var(--text);
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: .2rem;
}
.footer-feature-text {
  display: block;
  font-size: .76rem;
  line-height: 1.45;
  color: var(--muted);
}
.footer-program-link,
.footer-language-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.footer-program-logo,
.footer-language-link .side-language-flag {
  flex-shrink: 0;
}
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-soft);
  text-align: center;
  font-size: .76rem;
  color: var(--muted);
}
.footer-bottom p { margin: .65rem 0 0; }
.footer-emails {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .5rem .65rem;
}
.footer-emails a {
  color: var(--muted);
  text-decoration: none;
  font-size: .78rem;
  transition: color .15s;
}
.footer-emails a:hover { color: var(--accent2); }
.footer-bottom-sep { color: var(--border-soft); user-select: none; }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .45rem .6rem;
  margin-bottom: .65rem;
}
.footer-legal a {
  color: var(--muted);
  text-decoration: none;
  font-size: .78rem;
  transition: color .15s;
}
.footer-legal a:hover { color: var(--accent2); }

.legal-page {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0 .5rem 2rem;
}
.legal-article {
  background: rgba(17, 22, 34, .55);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
}
.legal-title {
  margin: 0 0 1.25rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}
.legal-body { font-size: .88rem; line-height: 1.65; color: var(--muted); }
.legal-h2 {
  margin: 1.5rem 0 .65rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.legal-p { margin: 0 0 .85rem; }
.legal-ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--muted);
}
.legal-ul li { margin-bottom: .35rem; }
.legal-body a { color: var(--accent2); }
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-col-features { grid-column: 1 / -1; }
  .footer-feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: .75rem 1.5rem;
  }
  .footer-feature { margin-bottom: 0; }
}
@media (max-width: 640px) {
  .footer-inner { padding: 2rem 1rem 1.25rem; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem .75rem; }
  .footer-col-features { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.empty { color: var(--muted); padding: 2rem; text-align: center; }

.tags-popup, .tags-alpha { padding: 1rem; max-width: 800px; margin: 0 auto; }
.alpha-tags { columns: 2; font-size: .85rem; }

.listing-row > .tags-alpha-page {
  width: 100%; min-width: 0;
  overflow-x: auto;
}
.tags-alpha-table {
  width: 100%; min-width: 0;
  border-collapse: separate;
  border-spacing: 0 .55rem;
}
.tags-alpha-table tbody tr {
  display: table-row;
}
.tags-alpha-cell {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: .85rem;
  vertical-align: top;
  padding: .55rem .7rem;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  background: rgba(255, 255, 255, .02);
  min-width: 0;
}
.tags-alpha-letter {
  flex: 0 0 2.25rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  padding: .1rem .35rem 0 0;
  color: var(--accent2);
  border-bottom: none;
  border-right: 1px solid rgba(255, 255, 255, .1);
}
.tags-alpha-list {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .65rem;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.tags-alpha-list li { margin: 0; padding: 0; }
.tags-alpha-item {
  display: inline-flex; align-items: baseline; gap: .35rem;
  padding: .2rem .55rem;
  color: inherit; text-decoration: none; font-size: .82rem;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  white-space: nowrap;
}
.tags-alpha-item:hover .tags-alpha-label { text-decoration: underline; }
.tags-alpha-label {
  min-width: 0;
}
.tags-alpha-item .tag-count {
  flex-shrink: 0; color: var(--muted); font-size: .72rem; font-variant-numeric: tabular-nums;
}
.tags-alpha-item:hover {
  border-color: rgba(255, 107, 129, .25);
  background: rgba(255, 107, 129, .08);
}
@media (max-width: 1099px) {
  body:has(.content-listing) .site-footer,
  body:has(.content-profile) .site-footer {
    margin-left: 0;
    width: 100%;
  }
  .content-listing {
    grid-template-columns: 1fr;
  }
  .content-listing > .listing-row,
  .content-profile > .profile-row {
    padding-left: 0;
    container-type: normal;
    min-height: 0;
  }
  .listing-row > .sidebar-left,
  .profile-row > .sidebar-left {
    position: static;
    width: 100%;
    height: auto;
    margin-bottom: var(--gap);
  }
  .content-listing > .pagination {
    grid-column: 1;
    justify-self: center;
  }
  .listing-row > .sidebar-left .sidebar,
  .profile-row > .sidebar-left .sidebar {
    position: static;
    max-height: none;
    height: auto;
    min-height: 0;
  }
  .content-listing .model-grid {
    min-height: 0;
  }
  .model-grid-similar {
    --similar-cols: 3;
  }
  .tags-alpha-cell {
    flex-direction: row;
    gap: .65rem;
  }
}
@media (max-width: 900px) {
  .header-top-center {
    order: 3; flex: 1 1 100%; justify-content: stretch;
  }
  .header-search-form { width: 100%; max-width: none; }
  .header-top-end { order: 2; margin-left: auto; }
}
@media (max-width: 480px) {
  .page-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; max-height: none; }
  .model-grid-similar {
    --similar-cols: 2;
  }
  .tags-alpha-cell {
    flex-direction: column;
    gap: .45rem;
  }
  .tags-alpha-letter {
    flex: 0 0 auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    padding: 0 0 .35rem;
  }
  .tags-alpha-item {
    white-space: normal;
  }
}
