:root {
  --bg: #f6eef7;
  --panel: #fdf7fd;
  --ink: #19101a;
  --muted: #6b4a5c;
  --accent: #ff4da6;
  --accent-2: #a855f7;
  --accent-deep: #c026d3;
  --accent-soft: #f6c3e4;
  --line: #e9d4e6;
  --ok: #2f7d4f;
  --warn: #c95c2d;
  --bad: #9e2f2f;
  --radius: 16px;
  --shadow: 0 20px 50px rgba(80, 10, 70, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(179, 68, 45, 0.15), transparent 32%),
    linear-gradient(180deg, #f5efe5 0%, #efe5d7 100%);
  min-height: 100vh;
}

body.site-public {
  background:
    radial-gradient(circle at 12% -8%, rgba(255, 77, 166, 0.18), transparent 42%),
    radial-gradient(circle at 92% 0%, rgba(168, 85, 247, 0.20), transparent 46%),
    linear-gradient(180deg, #160f22 0%, #120c1a 100%);
  background-attachment: fixed;
  color: #ece6f3;
}

body.site-public a {
  color: #ff79c0;
}

body.site-public .brand,
body.site-public nav a,
body.site-public .site-nav a {
  color: #ececf0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

code {
  background: rgba(0, 0, 0, 0.06);
  padding: 0.2rem 0.4rem;
  border-radius: 8px;
}

.container {
  width: min(1100px, calc(100vw - 2rem));
  margin: 0 auto;
}

body.site-public .container {
  width: min(1220px, calc(100vw - 2rem));
}

.site-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  background: rgba(245, 239, 229, 0.82);
  z-index: 40;
}

body.site-public .site-header {
  border-bottom: 1px solid rgba(255, 122, 192, 0.16);
  background: rgba(18, 12, 26, 0.9);
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  transition: transform 0.22s ease, opacity 0.22s ease, background 0.22s ease;
  will-change: transform;
}

body.site-public .site-header.is-hidden {
  transform: translateY(calc(-100% - 2px));
  opacity: 0.01;
}

.site-header .container.site-header-inner {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 0;
}

.brand {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  line-height: 0;
  flex: 0 0 auto;
  max-width: 200px;
  overflow: hidden;
}

.brand img {
  display: block;
  width: auto !important;
  height: 42px !important;
  max-width: 200px !important;
  object-fit: contain;
  flex: 0 0 auto;
}

.site-nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}

.site-nav a {
  position: relative;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  background: rgba(0, 0, 0, 0.06);
}

body.site-public .site-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.site-nav-admin {
  background: rgba(179, 68, 45, 0.12);
  color: var(--accent) !important;
}

body.site-public .site-nav-admin {
  background: rgba(196, 42, 82, 0.16);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  width: 100%;
  max-width: 380px;
  justify-self: stretch;
}

.header-search-icon {
  position: absolute;
  left: 0.85rem;
  display: inline-flex;
  align-items: center;
  pointer-events: none;
  opacity: 0.7;
}

.header-search input {
  width: 100%;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.6);
  padding: 0 0.95rem 0 2.4rem;
  font-size: 0.92rem;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.header-search input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(179, 68, 45, 0.18);
}

body.site-public .header-search input {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.32);
  color: #ccccce;
}

body.site-public .header-search input::placeholder {
  color: rgba(232, 232, 236, 0.42);
}

body.site-public .header-search input:focus {
  background: rgba(0, 0, 0, 0.65);
  border-color: rgba(196, 42, 82, 0.55);
  box-shadow: 0 0 0 3px rgba(196, 42, 82, 0.22);
}

.site-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.theme-toggle {
  width: auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.theme-toggle-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.site-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

body.site-public .site-nav-toggle {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ebebed;
}

@media (max-width: 820px) {
  .site-header .container.site-header-inner {
    grid-template-columns: auto 1fr auto auto;
  }

  .site-nav {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.5rem 0 0.25rem;
  }

  .site-nav a {
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
  }

  .site-header.is-nav-open .site-nav {
    display: flex;
  }

  .site-nav-toggle {
    display: inline-flex;
  }

  .catalog-data-toolbar {
    position: static;
    grid-template-columns: 1fr;
  }

  .catalog-data-search {
    width: 100%;
  }

  .catalog-data-card {
    grid-template-columns: 72px 1fr;
    align-items: start;
  }

  .catalog-data-actions {
    grid-column: 1 / -1;
  }

  .catalog-data-form {
    grid-template-columns: 1fr;
  }

  .catalog-data-form button,
  .catalog-data-delete button {
    width: 100%;
  }

  .catalog-entity-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .catalog-entity-portrait {
    width: 132px;
    height: 168px;
  }
}

@media (max-width: 480px) {
  .header-search {
    max-width: none;
  }

  .theme-toggle-label {
    display: none;
  }

  .brand {
    max-width: 150px;
  }

  .brand img {
    height: 34px !important;
    max-width: 150px !important;
  }
}

nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

main.container {
  padding: 2rem 0 4rem;
}

body.site-public main.container {
  padding-top: 4.6rem;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.hero h1 {
  margin-bottom: 0.4rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card,
.auth-card,
.video-card,
.embed-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(480px, 100%);
  margin: 4rem auto;
}

.stack {
  display: grid;
  gap: 0.9rem;
}

.mini-stack {
  display: grid;
  gap: 0.15rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.helper-text {
  color: var(--muted);
  margin-top: 0;
}

.selector-group {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.45);
}

.selector-group h2,
.subcard h3 {
  margin-top: 0;
}

.advanced-options {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.35);
  margin-top: 0.85rem;
}

.advanced-options > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.7rem 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.advanced-options > summary::-webkit-details-marker {
  display: none;
}

.advanced-options > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
  transition: transform 0.2s ease;
  margin-left: 0.4rem;
}

.advanced-options[open] > summary::after {
  transform: rotate(-135deg);
}

.advanced-options > .advanced-options-body {
  padding: 0 0.9rem 0.9rem;
  display: grid;
  gap: 0.6rem;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.thumbnail-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.thumbnail-choice-card {
  display: grid;
  gap: 0.6rem;
  border: 1px solid #cab79d;
  border-radius: 16px;
  padding: 0.8rem;
  background: #fffdf8;
  cursor: pointer;
}

.thumbnail-choice-card input {
  width: auto;
  margin: 0;
}

.thumbnail-choice-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #0d0d0e;
}

.thumbnail-choice-card span {
  font-weight: 700;
  color: var(--muted);
}

.choice-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid #cab79d;
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  background: #fffdf8;
  cursor: pointer;
  font-weight: 700;
  text-transform: capitalize;
}

.choice-card input {
  width: auto;
  margin: 0;
}

.choice-inline {
  width: fit-content;
}

.inline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.trailer-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 0.85rem 0;
}

.form-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.form-actions button {
  width: auto;
  min-width: 220px;
}

.inline-danger-form {
  margin-top: 1rem;
}

.subcard {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.6);
}

.panel-grid-tight {
  margin-bottom: 0;
  grid-template-columns: minmax(0, 420px);
}

input,
textarea,
select,
button {
  width: 100%;
  border: 1px solid #cab79d;
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  font: inherit;
  background: #fffdf8;
}

button {
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  filter: brightness(1.05);
}

.secondary-button {
  background: #7a6853;
}

.danger-button {
  background: #9e2f2f;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.7);
}

body.site-public .ghost-link {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #ebebed;
}

.public-hero {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.catalog-promo-banner {
  margin: 5.75rem 0 1.25rem;
  width: 100%;
  max-width: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: #07070d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.catalog-promo-banner a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-height: 240px;
  line-height: 0;
  overflow: hidden;
}

.catalog-promo-banner img {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
  object-position: center;
}

.public-hero h1 {
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0;
  font-weight: 800;
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
}

.hero-count {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 77, 166, 0.16);
  color: #ff8fcb;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.public-hero-sub {
  margin: 0.5rem 0 0;
  max-width: 60ch;
  color: rgba(236, 230, 243, 0.66);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* Banner hero "Les plus vus" — slideshow con fundido */
.featured-hero {
  position: relative;
  margin: 0 0 1.75rem;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 21 / 9;
  background: #0a0810;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.featured-slides {
  position: absolute;
  inset: 0;
}

.featured-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease;
}

.featured-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.featured-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.featured-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 6, 14, 0.96) 0%, rgba(8, 6, 14, 0.78) 38%, rgba(8, 6, 14, 0.12) 72%, rgba(8, 6, 14, 0.45) 100%),
    linear-gradient(0deg, rgba(8, 6, 14, 0.55), rgba(8, 6, 14, 0) 55%);
}

.featured-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.7rem;
  max-width: min(60%, 540px);
  padding: clamp(1.25rem, 3.5vw, 2.75rem);
}

.featured-eyebrow {
  margin: 0;
  color: #ff8fcb;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.featured-hero .featured-title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.6rem, 4.2vw, 3rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-synopsis {
  margin: 0;
  color: rgba(236, 230, 243, 0.82);
  font-size: clamp(0.88rem, 1.4vw, 1.02rem);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

.featured-cta {
  margin-top: 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  width: fit-content;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #c9a8ff, #ff8fcb);
  color: #1a0d1a;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(214, 51, 108, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.featured-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(214, 51, 108, 0.42);
}

.featured-cta-icon {
  font-size: 0.78rem;
}

.featured-dots {
  position: absolute;
  z-index: 3;
  right: clamp(1.1rem, 2.5vw, 2rem);
  bottom: clamp(1rem, 2.5vw, 1.75rem);
  display: flex;
  gap: 0.55rem;
}

.featured-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}

.featured-dot:hover {
  background: rgba(255, 255, 255, 0.55);
}

.featured-dot.is-active {
  width: 26px;
  background: linear-gradient(135deg, #c9a8ff, #ff8fcb);
}

@media (max-width: 720px) {
  .featured-hero {
    aspect-ratio: 4 / 3;
  }

  .featured-content {
    max-width: 100%;
  }

  .featured-overlay {
    background:
      linear-gradient(0deg, rgba(8, 6, 14, 0.95) 0%, rgba(8, 6, 14, 0.55) 45%, rgba(8, 6, 14, 0.25) 100%);
    background-position: center;
  }
}

.catalog-filters-wrap {
  margin-bottom: 1.25rem;
}

.catalog-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.9fr) minmax(150px, 0.9fr) auto auto;
  gap: 0.7rem;
  align-items: end;
  padding: 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255,255,255,0.04);
}

.catalog-filter-field {
  display: grid;
  gap: 0.35rem;
}

.catalog-filter-field span {
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(232, 232, 236, 0.65);
  font-weight: 700;
}

body.site-public .catalog-filters input,
body.site-public .catalog-filters select {
  width: 100%;
  min-height: 42px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.45);
  color: #ccccce;
  padding: 0.68rem 0.75rem;
}

body.site-public .catalog-filters input::placeholder {
  color: rgba(232, 232, 236, 0.42);
}

.catalog-filter-submit {
  width: auto;
  min-width: 110px;
  min-height: 42px;
  border-radius: 11px;
}

.catalog-filter-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 0.85rem;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffe0bc;
  background: rgba(0, 0, 0, 0.32);
  font-weight: 700;
}

.catalog-filters-advanced {
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.catalog-filter-group {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 0.75rem 0.8rem 0.8rem;
}

.catalog-filter-group legend {
  padding: 0 0.45rem;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(232, 232, 236, 0.7);
  font-weight: 700;
}

.catalog-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.catalog-check-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.32);
  padding: 0.32rem 0.62rem;
  font-size: 0.82rem;
  color: #c0c0c6;
}

.catalog-check-chip input {
  width: auto;
  margin: 0;
}

.catalog-check-chip small {
  color: rgba(200, 200, 206, 0.65);
  font-weight: 700;
}

.catalog-filter-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.catalog-directory-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.catalog-directory-item {
  position: relative;
  display: grid;
  gap: 0.25rem;
  padding: 0.95rem 1rem 0.95rem 1.15rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  overflow: hidden;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

/* Accent rail that lights up on hover */
.catalog-directory-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #ff4da6, #a855f7);
  opacity: 0;
  transition: opacity 0.16s ease;
}

.catalog-directory-item[hidden] {
  display: none !important;
}

.catalog-directory-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 77, 166, 0.4);
  background: linear-gradient(180deg, rgba(255, 77, 166, 0.1), rgba(168, 85, 247, 0.05));
  box-shadow: 0 12px 28px rgba(10, 4, 20, 0.4);
}

.catalog-directory-item:hover::before {
  opacity: 1;
}

.catalog-directory-item strong {
  color: #f1edf5;
  font-size: 0.98rem;
}

.catalog-directory-item:hover strong {
  color: #fff;
}

.catalog-directory-item span {
  color: rgba(200, 200, 206, 0.62);
  font-size: 0.82rem;
  font-weight: 600;
}

.catalog-directory-media-item {
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 0.9rem;
}

.catalog-directory-image {
  display: grid;
  place-items: center;
  width: 64px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(214, 51, 108, 0.12);
  color: var(--accent);
  font-weight: 900;
}

.catalog-directory-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-directory-copy {
  display: grid;
  gap: 0.25rem;
}

.catalog-entity-hero {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  align-items: start;
  gap: 2rem;
}

.catalog-entity-copy {
  display: grid;
  gap: 0.65rem;
  align-content: start;
  padding-top: 0.1rem;
}

.catalog-entity-copy .eyebrow {
  font-size: 0.88rem;
  margin-bottom: 0;
}

.catalog-entity-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 2.7rem);
  line-height: 1.02;
}

.catalog-entity-facts {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.catalog-entity-fact {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(214, 51, 108, 0.12);
  border: 1px solid rgba(214, 51, 108, 0.24);
  color: #f0bfd0;
  font-size: 0.82rem;
  font-weight: 800;
}

.catalog-entity-copy p:last-child {
  margin: 0;
  color: rgba(232, 232, 236, 0.72);
  font-size: 1.02rem;
}

.catalog-entity-portrait {
  width: 168px;
  height: 212px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.catalog-entity-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-shell {
  display: grid;
  gap: 1rem;
  overflow: hidden;
}

body.site-public .player-shell,
body.site-public .public-video-card,
body.site-public .chips-wrap,
body.site-public .card,
body.site-public .auth-card {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.10), rgba(255, 77, 166, 0.04));
  border-color: rgba(168, 85, 247, 0.18);
  box-shadow: 0 28px 80px rgba(10, 4, 20, 0.45);
}

body.site-public .public-video-card:hover {
  border-color: rgba(255, 77, 166, 0.55);
  box-shadow: 0 18px 50px rgba(255, 77, 166, 0.22), 0 0 0 1px rgba(255, 77, 166, 0.25);
}

body.site-public .card,
body.site-public .auth-card,
body.site-public .auth-card h1,
body.site-public .auth-card label,
body.site-public .premium-gate-copy h2 {
  color: #f3f3f6;
}

body.site-public .auth-card p,
body.site-public .premium-gate-copy p {
  color: rgba(232, 232, 236, 0.7);
}

body.site-public .auth-card input {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.32);
  color: #f0f0f3;
}

body.site-public .auth-card input::placeholder {
  color: rgba(232, 232, 236, 0.42);
}

body.site-public .auth-card input:focus {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(224, 80, 112, 0.55);
  outline: none;
}

.player-shell-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
}

.player-shell-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.player-shell-header > div .eyebrow {
  margin-bottom: 0.2rem;
}

.source-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  width: 100%;
}

.source-pill {
  width: auto;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  text-transform: capitalize;
}

.source-pill.is-active {
  background: var(--accent);
  color: #fff;
}

.source-card {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
  min-height: 0;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(232, 232, 236, 0.68);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.source-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 77, 166, 0.45);
  color: #fff;
}

.source-card.is-active {
  background: linear-gradient(135deg, #ff4da6, #c42a82);
  color: #fff;
  border-color: rgba(255, 77, 166, 0.6);
  box-shadow: 0 8px 22px rgba(196, 42, 82, 0.35);
}

.source-card-top {
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  font-weight: 700;
}

.source-card-name {
  font-size: 0.95rem;
  font-weight: 800;
}

.player-stage {
  display: grid;
  gap: 0.85rem;
}

.player-stage-meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

body.site-public .player-stage-meta strong {
  font-size: 1.05rem;
}

.provider-panel {
  display: none;
}

.provider-panel.is-active {
  display: block;
}

.player-frame {
  border-radius: 20px;
  overflow: hidden;
  background: #0d0d0e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 40px rgba(26, 23, 19, 0.22);
}

.player-frame iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

body.site-public .player-frame {
  background: #0d0d0e;
  border-color: rgba(255, 255, 255, 0.08);
}

.stats-grid,
.panel-grid,
.video-grid {
  display: grid;
  gap: 1rem;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 1.5rem;
}

.stats-grid article {
  background: rgba(255, 250, 240, 0.8);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}

.stats-grid strong {
  display: block;
  font-size: 2rem;
}

.panel-grid {
  grid-template-columns: 1.05fr 1.5fr;
  margin-bottom: 1.5rem;
}

.admin-list-card,
.admin-catalog-card {
  overflow: hidden;
}

.admin-list-card {
  margin-bottom: 1.5rem;
}

.admin-section-heading,
.admin-pagination,
.admin-pagination-actions,
.admin-video-meta,
.admin-card-actions,
.admin-action-cluster {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  align-items: center;
}

.admin-section-heading,
.admin-pagination {
  justify-content: space-between;
}

.pagination-link {
  min-width: 2.5rem;
  justify-content: center;
  text-align: center;
}

.pagination-link.is-active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  pointer-events: none;
}

.pagination-status {
  font-weight: 700;
}

body.site-public .admin-pagination {
  justify-content: center;
  margin-top: 2.25rem;
}

body.site-public .pagination-status {
  width: 100%;
  text-align: center;
}

body.site-public .admin-pagination-actions {
  justify-content: center;
}

.admin-section-heading {
  margin-bottom: 1rem;
}

.admin-task-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.admin-task-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.04);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.admin-task-tab.is-active {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}

.admin-count-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(214, 51, 108, 0.12), rgba(179, 68, 45, 0.12));
  color: var(--accent-deep);
  border: 1px solid rgba(140, 23, 69, 0.15);
  font-weight: 800;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.8fr) minmax(180px, 0.8fr) auto auto;
  align-items: end;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}

.admin-search-field,
.admin-filter-field {
  display: grid;
  gap: 0.35rem;
}

.admin-search-field span,
.admin-filter-field span {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}

.admin-reset-link {
  justify-content: center;
}

.table-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 520px;
  margin: 0 -0.25rem;
  padding: 0 0.25rem;
}

.table-scroll thead th {
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 2;
}

:root[data-theme="dark"] body:not(.site-public) .table-scroll thead th {
  background: #181218;
}

.distrib-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.distrib-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.distrib-tag-ok {
  background: rgba(47, 125, 79, 0.1);
  border-color: rgba(47, 125, 79, 0.18);
  color: var(--ok);
}

:root[data-theme="dark"] body:not(.site-public) .distrib-tag {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(232, 232, 236, 0.62);
}

.admin-table {
  min-width: 860px;
}

.table-title-cell {
  display: grid;
  gap: 0.2rem;
}

.helper-inline {
  color: var(--muted);
  font-size: 0.84rem;
}

.admin-action-cluster {
  gap: 0.5rem;
}

.action-pill {
  width: auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.04);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
}

.action-pill-primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.action-pill-danger {
  background: rgba(158, 47, 47, 0.12);
  color: var(--bad);
  border-color: rgba(158, 47, 47, 0.18);
}

.admin-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.admin-video-card {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 248, 251, 0.96));
  box-shadow: 0 18px 38px rgba(60, 10, 32, 0.08);
}

.admin-video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #171215;
  overflow: hidden;
}

.admin-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-video-thumb .status {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  backdrop-filter: blur(8px);
}

.admin-video-thumb-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-video-body {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.admin-video-meta {
  justify-content: space-between;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.admin-video-body h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.admin-video-body h3 a {
  color: var(--ink);
}

.admin-video-slug {
  margin: -0.35rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.admin-card-actions {
  gap: 0.6rem;
  margin-top: 0.2rem;
}

.admin-card-actions form,
.admin-action-cluster form {
  margin: 0;
}

.admin-empty-state {
  padding: 2rem 1rem;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.45);
}

.admin-empty-inline {
  padding: 1rem 0.5rem;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.card-kicker,
.meta-line,
.source-chip-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.card-kicker {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

body.site-public .card-kicker,
body.site-public .meta-line,
body.site-public .public-video-card p {
  color: rgba(232, 232, 236, 0.62);
}

body.site-public .public-video-card h2 a {
  color: #ebebed;
}

.public-video-card {
  padding: 0;
  overflow: hidden;
  display: grid;
  min-height: 100%;
  border-radius: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

body.site-public .public-video-card {
  background: linear-gradient(180deg, rgba(30, 20, 44, 0.92), rgba(20, 14, 30, 0.96));
  border: 1px solid rgba(168, 85, 247, 0.14);
  box-shadow: 0 12px 30px rgba(6, 3, 14, 0.4);
}

.public-video-card:hover {
  transform: translateY(-4px);
}

.catalog-cover {
  display: block;
  aspect-ratio: 16 / 9;
  background: #0d0d0e;
  position: relative;
  overflow: hidden;
}

/* Subtle veil that only deepens on hover so the play button reads clearly */
.catalog-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(11, 8, 18, 0) 62%, rgba(11, 8, 18, 0.45) 100%);
  opacity: 0.85;
  transition: opacity 0.25s ease, background 0.25s ease;
  pointer-events: none;
}

.public-video-card:hover .catalog-cover::after {
  opacity: 1;
  background: linear-gradient(180deg, rgba(11, 8, 18, 0.32) 0%, rgba(11, 8, 18, 0.1) 45%, rgba(11, 8, 18, 0.5) 100%);
}

/* Play affordance — appears on hover, the universal "this is a video" cue */
.catalog-cover::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%) scale(0.8);
  border-radius: 999px;
  background-color: rgba(255, 77, 166, 0.95);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 54% 50%;
  background-size: 44%;
  box-shadow: 0 12px 30px rgba(120, 12, 90, 0.5), 0 0 0 6px rgba(255, 77, 166, 0.18);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

.public-video-card:hover .catalog-cover::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.catalog-cover img,
.catalog-cover-fallback {
  display: block;
  width: 100%;
  height: 100%;
}

.catalog-cover img {
  object-fit: cover;
  transition: transform 0.4s ease;
}

.public-video-card:hover .catalog-cover img {
  transform: scale(1.05);
}

/* Episode / duration badge laid over the thumbnail (modern tube convention) */
.cover-badge {
  position: absolute;
  z-index: 2;
  top: 0.6rem;
  right: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  background: rgba(8, 6, 14, 0.78);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.catalog-cover-fallback {
  display: grid;
  place-items: center;
  background: #111113;
}

.catalog-cover-fallback span {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.28);
}

.catalog-cover-tags {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.85rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  z-index: 2;
  pointer-events: none;
}

.catalog-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 77, 166, 0.95), rgba(168, 85, 247, 0.95));
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(120, 20, 110, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.catalog-body {
  display: grid;
  gap: 0.5rem;
  padding: 0.85rem 1rem 1.05rem;
}

.catalog-meta-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: rgba(232, 232, 236, 0.52);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.catalog-model-pill,
.catalog-producer-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  max-width: 100%;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #c0c0c6;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  width: fit-content;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(46%, 190px);
}

.catalog-model-pill:hover,
.catalog-producer-pill:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
}

.catalog-producer-pill {
  background: rgba(214, 51, 108, 0.14);
  color: #ffd4df;
  border-color: rgba(214, 51, 108, 0.32);
}

.catalog-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -0.005em;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tags en texto normal, una sola línea bajo el título (sin badges). */
.catalog-tags {
  margin: 0;
  color: rgba(232, 232, 236, 0.5);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-title a,
body.site-public .public-video-card .catalog-title a {
  color: #f1edf5;
  transition: color 0.15s ease;
}

.catalog-title a:hover,
body.site-public .public-video-card .catalog-title a:hover {
  color: #ff8fcb;
}

body.site-public .public-video-card .card-kicker,
body.site-public .public-video-card p {
  color: rgba(232, 232, 236, 0.62);
}

body.site-public .chip {
  background: rgba(196, 42, 82, 0.14);
  color: #aaaaaf;
}

body.site-public .chip-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #c0c0c6;
}

body.site-public .chip-model {
  background: #1e1e21;
  color: #fff4e7;
}

body.site-public .chip-producer {
  background: rgba(214, 51, 108, 0.18);
  color: #ffd4df;
}

.catalog-admin-section + .catalog-admin-section {
  margin-top: 1.25rem;
}

.catalog-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
}

.catalog-admin-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
}

.catalog-admin-image {
  display: grid;
  place-items: center;
  width: 92px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(87, 73, 163, 0.12);
  color: #4f3f9d;
  font-size: 2rem;
  font-weight: 900;
}

.catalog-admin-image-producer {
  background: rgba(214, 51, 108, 0.12);
  color: var(--accent);
}

.catalog-admin-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-admin-body {
  display: grid;
  gap: 0.55rem;
}

.catalog-admin-body h3 {
  margin: 0;
}

.catalog-admin-upload {
  display: grid;
  gap: 0.5rem;
}

.catalog-data-hero {
  align-items: center;
}

.catalog-data-shell {
  display: grid;
  gap: 0.9rem;
}

.catalog-data-toolbar {
  position: sticky;
  top: 78px;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 248, 252, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.catalog-data-tabs {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.catalog-data-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: auto;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  color: #6b4354;
  border: 1px solid rgba(149, 104, 123, 0.18);
  box-shadow: none;
}

.catalog-data-tab.is-active {
  background: #111113;
  color: #fff4f8;
  border-color: rgba(255, 255, 255, 0.08);
}

.catalog-data-tab span {
  font-size: 0.8rem;
  color: inherit;
  opacity: 0.78;
}

.catalog-data-search {
  width: min(340px, 100%);
  display: grid;
  gap: 0.25rem;
  margin: 0;
}

.catalog-data-search span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.catalog-data-search input {
  height: 42px;
}

.catalog-data-panel {
  display: none;
}

.catalog-data-panel.is-active {
  display: block;
}

.catalog-data-list {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.catalog-data-row {
  padding: 0;
  border: none;
  background: transparent;
}

.catalog-data-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0.85rem 0.9rem;
  align-items: start;
  min-height: 100%;
  padding: 0.9rem;
  border: 1px solid rgba(109, 76, 88, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 28px rgba(74, 37, 46, 0.06);
}

.catalog-data-row[hidden] {
  display: none !important;
}

.catalog-data-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(87, 73, 163, 0.12);
  color: #4f3f9d;
  font-weight: 900;
}

.catalog-data-avatar-large {
  width: 72px;
  height: 92px;
  border-radius: 8px;
}

.catalog-data-avatar-producer {
  background: rgba(214, 51, 108, 0.12);
  color: var(--accent);
}

.catalog-data-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-data-main {
  min-width: 0;
  display: grid;
  gap: 0.3rem;
  align-self: center;
}

.catalog-data-label {
  margin: 0;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalog-data-main h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.catalog-data-meta {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.catalog-data-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(107, 74, 92, 0.08);
  color: #6b4a5c;
  font-size: 0.8rem;
  font-weight: 800;
}

.catalog-data-actions {
  display: grid;
  gap: 0.55rem;
  grid-column: 1 / -1;
}

.catalog-data-form {
  display: grid;
  grid-template-columns: minmax(76px, 96px) minmax(0, 1fr);
  gap: 0.55rem;
  align-items: end;
  margin: 0;
}

.catalog-data-form button {
  grid-column: 1 / -1;
}

.catalog-data-field {
  margin: 0;
  display: grid;
  gap: 0.22rem;
}

.catalog-data-field span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.catalog-data-field input[type="number"],
.catalog-data-field input[type="file"] {
  min-height: 40px;
  padding: 0.42rem 0.5rem;
  font-size: 0.88rem;
  background: #fffdfa;
}

.catalog-data-form button,
.catalog-data-delete button {
  width: auto;
  min-width: 96px;
  min-height: 40px;
  padding: 0.55rem 0.75rem;
  white-space: nowrap;
}

.catalog-data-delete {
  margin: 0;
}

.catalog-data-delete button {
  width: 100%;
}

.catalog-data-empty {
  padding: 1rem;
}

.source-chip-row {
  margin: 1rem 0 0.9rem;
}

.meta-line {
  justify-content: space-between;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.8rem 0.4rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  vertical-align: top;
}

.actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.actions form {
  margin: 0;
}

.status {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-pending {
  background: rgba(201, 92, 45, 0.12);
  color: var(--warn);
}

.status-configuring {
  background: rgba(87, 73, 163, 0.14);
  color: #4f3f9d;
}

.status-processing {
  background: rgba(80, 116, 190, 0.14);
  color: #35528e;
}

.status-completed,
.status-published,
.status-success {
  background: rgba(47, 125, 79, 0.12);
  color: var(--ok);
}

.status-failed,
.status-draft {
  background: rgba(158, 47, 47, 0.12);
  color: var(--bad);
}

.chips-wrap {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(179, 68, 45, 0.12);
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
}

.chip-secondary {
  background: rgba(26, 23, 19, 0.08);
  color: var(--muted);
}

@media (max-width: 860px) {
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .admin-toolbar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .admin-toolbar {
    grid-template-columns: 1fr;
  }

  .admin-section-heading,
  .admin-pagination {
    align-items: start;
    flex-direction: column;
  }

  .admin-video-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
  }

  .player-shell-header {
    flex-direction: column;
  }

  .meta-line {
    justify-content: flex-start;
  }

  .public-hero {
    grid-template-columns: 1fr;
  }

  .catalog-promo-banner {
    margin-top: 5.35rem;
  }

  .catalog-promo-banner a {
    max-height: 150px;
  }

  .catalog-promo-banner img {
    max-height: 150px;
    object-position: center;
  }

  .public-hero-copy h1 {
    font-size: 2.2rem;
  }

  .public-hero-copy p:last-child {
    font-size: 0.98rem;
  }

  .catalog-filters {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .catalog-filter-submit,
  .catalog-filter-reset {
    width: 100%;
  }

  .catalog-check-chip {
    width: 100%;
    justify-content: flex-start;
  }

  .video-grid {
    gap: 1.5rem;
  }

  .public-video-card {
    border-radius: 18px;
  }

  .catalog-cover-tags {
    left: 0.65rem;
    right: 0.65rem;
    bottom: 0.65rem;
  }

  .catalog-tag {
    min-height: 24px;
    padding: 0.22rem 0.45rem;
    font-size: 0.7rem;
  }

  .catalog-body {
    padding: 0.9rem 0.95rem 1rem;
  }

  .catalog-meta-line {
    font-size: 0.84rem;
  }

  .catalog-title {
    font-size: 1.05rem;
    line-height: 1.18;
  }

  .catalog-model-pill,
  .catalog-producer-pill {
    max-width: min(52%, 160px);
    font-size: 0.68rem;
  }
}

.alert {
  padding: 0.8rem 1rem;
  background: rgba(158, 47, 47, 0.12);
  color: var(--bad);
  border-radius: 12px;
}

.video-grid {
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 1.15rem 1.1rem;
}

.video-card h2 {
  margin-top: 0;
}

@media (max-width: 860px) {
  .panel-grid,
  .hero {
    grid-template-columns: 1fr;
    display: grid;
  }
}

/* ====== Search page (new) ====== */

.search-hero {
  margin-bottom: 1rem;
}

.search-form {
  display: grid;
  gap: 0.85rem;
}

.search-bar {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.45rem 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-bar:focus-within {
  border-color: rgba(196, 42, 82, 0.5);
  box-shadow: 0 0 0 4px rgba(196, 42, 82, 0.16), 0 18px 50px rgba(0, 0, 0, 0.32);
}

.search-bar-icon {
  display: inline-flex;
  align-items: center;
  color: rgba(200, 200, 206, 0.7);
}

body.site-public .search-bar-input {
  width: 100%;
  min-height: 44px;
  border: none;
  background: transparent;
  color: #ebebed;
  font-size: 1.05rem;
  padding: 0.4rem 0.2rem;
}

.search-bar-input:focus {
  outline: none;
}

body.site-public .search-bar-input::placeholder {
  color: rgba(232, 232, 236, 0.42);
}

.search-bar-submit {
  width: auto;
  min-height: 40px;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: #c42a52;
  color: #ebebed;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
}

.search-bar-submit:hover {
  filter: brightness(1.06);
}

.search-advanced {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 250, 240, 0.03);
}

.search-advanced-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.05rem;
  background: transparent;
  border: none;
  color: #ffe6c7;
  font-weight: 700;
  cursor: pointer;
  border-radius: 18px;
}

.search-advanced-toggle:hover {
  background: rgba(255, 255, 255, 0.04);
}

.search-advanced-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.search-advanced-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: #c42a52;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
}

.search-advanced-toggle-icon {
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease;
  opacity: 0.7;
}

.search-advanced[data-open="true"] .search-advanced-toggle-icon {
  transform: rotate(180deg);
}

.search-advanced-panel {
  display: none;
  padding: 0 1.05rem 1.05rem;
  flex-direction: column;
  gap: 0.85rem;
}

.search-advanced[data-open="true"] .search-advanced-panel {
  display: flex;
}

.filter-section {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.filter-section > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.75rem 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  user-select: none;
}

.filter-section > summary::-webkit-details-marker {
  display: none;
}

.filter-section > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
  transition: transform 0.2s ease;
  margin-left: 0.4rem;
}

.filter-section[open] > summary::after {
  transform: rotate(-135deg);
}

.filter-section-title {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 232, 236, 0.7);
  font-weight: 800;
}

.filter-section-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.filter-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: #c42a52;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.filter-section-total {
  font-size: 0.78rem;
  color: rgba(200, 200, 206, 0.5);
  font-weight: 700;
}

.filter-section-body {
  padding: 0 0.95rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

body.site-public .filter-quickfilter {
  width: 100%;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.32);
  color: #ccccce;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
}

body.site-public .filter-quickfilter::placeholder {
  color: rgba(232, 232, 236, 0.42);
}

.filter-empty {
  margin: 0;
  color: rgba(244, 234, 220, 0.6);
  font-size: 0.9rem;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.chip-grid::-webkit-scrollbar {
  width: 8px;
}

.chip-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.chip-option {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.32);
  color: #c0c0c6;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
  user-select: none;
}

.chip-option:hover {
  border-color: rgba(196, 42, 82, 0.5);
}

.chip-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.chip-option:has(input:checked) {
  background: #c42a52;
  border-color: rgba(196, 42, 82, 0.7);
  color: #ebebed;
  box-shadow: 0 8px 18px rgba(150, 20, 65, 0.3);
}

.chip-option:has(input:checked) .chip-option-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.chip-option-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(200, 200, 206, 0.65);
  font-size: 0.72rem;
  font-weight: 800;
}

.search-advanced-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-top: 0.25rem;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 0.25rem;
}

.active-filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(196, 42, 82, 0.16);
  color: #aaaaaf;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(196, 42, 82, 0.3);
}

.active-filter-pill-model {
  background: rgba(255, 255, 255, 0.08);
  color: #c0c0c6;
  border-color: rgba(255, 255, 255, 0.14);
}

.empty-results {
  text-align: center;
  display: grid;
  gap: 0.85rem;
  justify-items: center;
  padding: 2rem;
}

@media (max-width: 640px) {
  .search-bar {
    grid-template-columns: auto 1fr;
    border-radius: 18px;
    padding: 0.5rem 0.6rem 0.5rem 0.9rem;
  }

  .search-bar-submit {
    grid-column: 1 / -1;
    width: 100%;
    border-radius: 12px;
  }

  .chip-grid {
    max-height: 200px;
  }
}

/* ====== Autocomplete ====== */

.autocomplete {
  position: relative;
  display: grid;
  gap: 0.4rem;
}

.autocomplete-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 232, 236, 0.58);
  font-weight: 800;
}

.autocomplete-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-height: 42px;
  padding: 0.32rem 0.4rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(20, 12, 22, 0.55);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.autocomplete-box:focus-within {
  border-color: rgba(196, 42, 82, 0.5);
  box-shadow: 0 0 0 3px rgba(196, 42, 82, 0.14);
}

.autocomplete-tokens {
  display: contents;
}

.autocomplete-token {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.3rem 0.25rem 0.65rem;
  border-radius: 999px;
  background: #c42a52;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(150, 20, 65, 0.3);
}

.autocomplete-token button {
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.autocomplete-token button:hover {
  background: rgba(255, 255, 255, 0.38);
}

body.site-public .autocomplete-input {
  flex: 1;
  min-width: 120px;
  width: auto;
  border: none;
  background: transparent;
  color: #ccccce;
  font-size: 0.92rem;
  padding: 0.35rem 0.4rem;
  min-height: 32px;
}

.autocomplete-input:focus {
  outline: none;
}

body.site-public .autocomplete-input::placeholder {
  color: rgba(232, 232, 236, 0.35);
}

.autocomplete-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 260px;
  overflow-y: auto;
  background: #0d0d10;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.3rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.autocomplete-suggestion {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #ccccce;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.autocomplete-suggestion:hover,
.autocomplete-suggestion.is-active {
  background: rgba(196, 42, 82, 0.16);
  color: #fff;
}

.autocomplete-count {
  font-size: 0.74rem;
  font-weight: 800;
  color: rgba(232, 232, 236, 0.42);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.autocomplete-suggestion.is-active .autocomplete-count,
.autocomplete-suggestion:hover .autocomplete-count {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

/* ====== Theme toggle ====== */

:root[data-theme="dark"] body {
  color: #e8e8ec;
  background: #0d0d0e;
}

:root[data-theme="dark"] body:not(.site-public) a,
:root[data-theme="dark"] body.site-public a {
  color: #e05070;
}

:root[data-theme="dark"] body:not(.site-public) code {
  background: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] body:not(.site-public) .site-header,
:root[data-theme="dark"] body.site-public .site-header {
  border-bottom-color: rgba(255, 255, 255, 0.06);
  background: rgba(10, 10, 12, 0.88);
}

:root[data-theme="dark"] body:not(.site-public) .brand,
:root[data-theme="dark"] body:not(.site-public) nav a,
:root[data-theme="dark"] body:not(.site-public) .site-nav a,
:root[data-theme="dark"] body.site-public .brand,
:root[data-theme="dark"] body.site-public nav a,
:root[data-theme="dark"] body.site-public .site-nav a {
  color: #ececf0;
}

:root[data-theme="dark"] body:not(.site-public) .site-nav a:hover,
:root[data-theme="dark"] body.site-public .site-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] body:not(.site-public) .site-nav-admin,
:root[data-theme="dark"] body.site-public .site-nav-admin {
  background: rgba(196, 42, 82, 0.16);
}

:root[data-theme="dark"] body:not(.site-public) .header-search input,
:root[data-theme="dark"] body:not(.site-public) input,
:root[data-theme="dark"] body:not(.site-public) textarea,
:root[data-theme="dark"] body:not(.site-public) select,
:root[data-theme="dark"] body.site-public .header-search input {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.32);
  color: #ccccce;
}

:root[data-theme="dark"] body:not(.site-public) .header-search input::placeholder,
:root[data-theme="dark"] body:not(.site-public) input::placeholder,
:root[data-theme="dark"] body:not(.site-public) textarea::placeholder,
:root[data-theme="dark"] body.site-public .header-search input::placeholder {
  color: rgba(232, 232, 236, 0.42);
}

:root[data-theme="dark"] body:not(.site-public) .header-search input:focus,
:root[data-theme="dark"] body.site-public .header-search input:focus {
  background: rgba(0, 0, 0, 0.65);
  border-color: rgba(196, 42, 82, 0.55);
  box-shadow: 0 0 0 3px rgba(196, 42, 82, 0.22);
}

:root[data-theme="dark"] body:not(.site-public) .site-nav-toggle,
:root[data-theme="dark"] body:not(.site-public) .theme-toggle,
:root[data-theme="dark"] body.site-public .site-nav-toggle,
:root[data-theme="dark"] body.site-public .theme-toggle {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ebebed;
}

:root[data-theme="dark"] body:not(.site-public) .card,
:root[data-theme="dark"] body:not(.site-public) .auth-card,
:root[data-theme="dark"] body:not(.site-public) .video-card,
:root[data-theme="dark"] body:not(.site-public) .embed-card,
:root[data-theme="dark"] body:not(.site-public) .stats-grid article,
:root[data-theme="dark"] body:not(.site-public) .selector-group,
:root[data-theme="dark"] body:not(.site-public) .subcard,
:root[data-theme="dark"] body:not(.site-public) .thumbnail-choice-card,
:root[data-theme="dark"] body:not(.site-public) .choice-card,
:root[data-theme="dark"] body:not(.site-public) .ghost-link {
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.08), rgba(255, 250, 240, 0.04));
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
  color: #ebebed;
}

:root[data-theme="dark"] body:not(.site-public) .mini-stack,
:root[data-theme="dark"] body:not(.site-public) .helper-text,
:root[data-theme="dark"] body:not(.site-public) .card-kicker {
  color: rgba(232, 232, 236, 0.62);
}

:root[data-theme="dark"] body:not(.site-public) th,
:root[data-theme="dark"] body:not(.site-public) td {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] body:not(.site-public) .chip {
  background: rgba(196, 42, 82, 0.14);
  color: #aaaaaf;
}

:root[data-theme="dark"] body:not(.site-public) .chip-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #c0c0c6;
}

:root[data-theme="dark"] body:not(.site-public) .admin-video-card,
:root[data-theme="dark"] body:not(.site-public) .admin-empty-state,
:root[data-theme="dark"] body:not(.site-public) .action-pill {
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.08), rgba(255, 250, 240, 0.04));
  border-color: rgba(255, 255, 255, 0.1);
  color: #ebebed;
}

:root[data-theme="dark"] body:not(.site-public) .action-pill-primary {
  background: var(--accent);
  color: #fff;
}

:root[data-theme="dark"] body:not(.site-public) .admin-task-tab {
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.08), rgba(255, 250, 240, 0.04));
  border-color: rgba(255, 255, 255, 0.1);
  color: #ebebed;
}

:root[data-theme="dark"] body:not(.site-public) .admin-task-tab.is-active {
  background: var(--accent);
  color: #fff;
}

:root[data-theme="dark"] body:not(.site-public) .action-pill-danger {
  background: rgba(158, 47, 47, 0.16);
  color: #ffb4b4;
  border-color: rgba(255, 180, 180, 0.18);
}

:root[data-theme="dark"] body:not(.site-public) .admin-video-body h3 a,
:root[data-theme="dark"] body:not(.site-public) .admin-count-badge {
  color: #ebebed;
}

:root[data-theme="light"] body.site-public {
  color: #19101a;
  background:
    radial-gradient(circle at top left, rgba(179, 68, 45, 0.12), transparent 30%),
    linear-gradient(180deg, #f8f0e8 0%, #efe4d6 100%);
}

:root[data-theme="light"] body.site-public a,
:root[data-theme="light"] body.site-public .brand,
:root[data-theme="light"] body.site-public nav a,
:root[data-theme="light"] body.site-public .site-nav a,
:root[data-theme="light"] body.site-public .catalog-title a,
:root[data-theme="light"] body.site-public .public-video-card h2 a {
  color: #19101a;
}

:root[data-theme="light"] body.site-public .site-header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
  background: rgba(245, 239, 229, 0.82);
}

:root[data-theme="light"] body.site-public .site-nav a:hover {
  background: rgba(0, 0, 0, 0.06);
}

:root[data-theme="light"] body.site-public .site-nav-admin {
  background: rgba(179, 68, 45, 0.12);
}

:root[data-theme="light"] body.site-public .theme-toggle,
:root[data-theme="light"] body.site-public .site-nav-toggle {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.08);
  color: #19101a;
}

:root[data-theme="light"] body.site-public .header-search input,
:root[data-theme="light"] body.site-public .catalog-filters input,
:root[data-theme="light"] body.site-public .catalog-filters select,
:root[data-theme="light"] body.site-public .filter-quickfilter,
:root[data-theme="light"] body.site-public .autocomplete-input {
  border-color: #cab79d;
  background: rgba(255, 255, 255, 0.78);
  color: #19101a;
}

:root[data-theme="light"] body.site-public .header-search input::placeholder,
:root[data-theme="light"] body.site-public .catalog-filters input::placeholder,
:root[data-theme="light"] body.site-public .filter-quickfilter::placeholder,
:root[data-theme="light"] body.site-public .autocomplete-input::placeholder {
  color: rgba(25, 16, 26, 0.42);
}

:root[data-theme="light"] body.site-public .catalog-filters,
:root[data-theme="light"] body.site-public .catalog-directory-item,
:root[data-theme="light"] body.site-public .search-bar,
:root[data-theme="light"] body.site-public .search-advanced,
:root[data-theme="light"] body.site-public .filter-section,
:root[data-theme="light"] body.site-public .autocomplete-box,
:root[data-theme="light"] body.site-public .autocomplete-suggestions,
:root[data-theme="light"] body.site-public .chip-option,
:root[data-theme="light"] body.site-public .source-card,
:root[data-theme="light"] body.site-public .player-shell,
:root[data-theme="light"] body.site-public .public-video-card,
:root[data-theme="light"] body.site-public .chips-wrap,
:root[data-theme="light"] body.site-public .card,
:root[data-theme="light"] body.site-public .auth-card {
  background: rgba(255, 252, 248, 0.9);
  border-color: rgba(107, 74, 92, 0.14);
  color: #6b4a5c;
  box-shadow: 0 20px 50px rgba(60, 10, 32, 0.12);
}

:root[data-theme="light"] body.site-public .auth-card h1,
:root[data-theme="light"] body.site-public .auth-card label,
:root[data-theme="light"] body.site-public .premium-gate-copy h2 {
  color: #19101a;
}

:root[data-theme="light"] body.site-public .auth-card p,
:root[data-theme="light"] body.site-public .premium-gate-copy p,
:root[data-theme="light"] body.site-public .premium-gate-secondary {
  color: #6b4a5c;
}

:root[data-theme="light"] body.site-public .auth-card input {
  border-color: #cab79d;
  background: rgba(255, 255, 255, 0.85);
  color: #19101a;
}

:root[data-theme="light"] body.site-public .catalog-filter-field span,
:root[data-theme="light"] body.site-public .filter-section-title,
:root[data-theme="light"] body.site-public .autocomplete-label,
:root[data-theme="light"] body.site-public .catalog-meta-line,
:root[data-theme="light"] body.site-public .catalog-tags,
:root[data-theme="light"] body.site-public .card-kicker,
:root[data-theme="light"] body.site-public .meta-line,
:root[data-theme="light"] body.site-public .public-video-card p,
:root[data-theme="light"] body.site-public .catalog-directory-item span,
:root[data-theme="light"] body.site-public .filter-section-total,
:root[data-theme="light"] body.site-public .search-bar-icon,
:root[data-theme="light"] body.site-public .autocomplete-count {
  color: #6b4a5c;
}

:root[data-theme="light"] body.site-public .catalog-filter-reset,
:root[data-theme="light"] body.site-public .active-filter-pill-model,
:root[data-theme="light"] body.site-public .catalog-model-pill,
:root[data-theme="light"] body.site-public .catalog-producer-pill,
:root[data-theme="light"] body.site-public .chip-option-count {
  background: rgba(107, 74, 92, 0.08);
  border-color: rgba(107, 74, 92, 0.14);
  color: #6b4a5c;
}

:root[data-theme="light"] body.site-public .chip {
  background: rgba(214, 51, 108, 0.12);
  color: #d6336c;
}

:root[data-theme="light"] body.site-public .catalog-producer-pill,
:root[data-theme="light"] body.site-public .chip-producer {
  background: rgba(214, 51, 108, 0.14);
  border-color: rgba(214, 51, 108, 0.24);
  color: #9e1748;
}

:root[data-theme="light"] body.site-public .chip-secondary {
  background: rgba(26, 23, 19, 0.08);
  color: #6b4a5c;
}

/* ===== Planes VIP ===== */
.site-nav-vip {
  color: var(--accent) !important;
  font-weight: 700;
}

body.site-public .site-nav-vip {
  color: var(--accent-2) !important;
}

.vip-intro {
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 60ch;
  font-size: 1rem;
}

.vip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

@media (max-width: 880px) {
  .vip-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }
}

.vip-plan {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.vip-plan:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(60, 10, 32, 0.18);
}

.vip-plan-logo {
  background: #000;
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.vip-plan-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.vip-plan-head {
  text-align: center;
  margin-top: 1rem;
}

.vip-plan-head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.vip-price {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.vip-price-amount {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
}

.vip-join {
  display: block;
  margin: 1rem auto 1.25rem;
  padding: 0.7rem 2.5rem;
  border-radius: 999px;
  background: #111;
  color: #fff !important;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  width: fit-content;
  transition: background 0.18s ease, transform 0.18s ease;
}

.vip-join:hover {
  background: var(--accent);
  transform: scale(1.03);
}

.vip-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.vip-features li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.4;
}

.vip-features li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.vip-perks {
  list-style: none;
  padding: 0.85rem 0 0;
  margin: auto 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.vip-perks li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--ink);
  font-size: 0.92rem;
}

.vip-perks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--ok);
  font-weight: 800;
}

.vip-kofi {
  margin: 2.5rem 0 1rem;
  padding: 1.5rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  background: var(--panel);
}

.vip-kofi p {
  margin: 0 0 1rem;
  color: var(--muted);
}

:root[data-theme="dark"] body.site-public .vip-plan,
:root[data-theme="dark"] body.site-public .vip-kofi {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] body.site-public .vip-features li,
:root[data-theme="dark"] body.site-public .vip-perks li,
:root[data-theme="dark"] body.site-public .vip-price-amount {
  color: #e8e8ec;
}

:root[data-theme="dark"] body.site-public .vip-perks {
  border-top-color: rgba(255, 255, 255, 0.08);
}

/* ---- Premium / socios ---- */
.catalog-premium-badge,
.premium-badge {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 2;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1a1206;
  background: linear-gradient(135deg, #ffd76a, #f5a623);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.premium-badge {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  left: auto;
}

.premium-gate {
  display: grid;
  gap: 1.25rem;
  text-align: center;
  align-items: center;
}

.premium-gate-banner {
  display: block;
  border-radius: 14px;
  overflow: hidden;
}

.premium-gate-banner img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0d0d0e;
}

.premium-gate-copy {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
}

.premium-gate-cta {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  color: #1a1206;
  background: linear-gradient(135deg, #ffd76a, #f5a623);
}

.premium-gate-secondary {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(232, 232, 236, 0.78);
  text-decoration: underline;
}

.premium-gate-secondary:hover {
  color: #f3f3f6;
}

.alert-success {
  background: rgba(47, 158, 88, 0.14);
  color: var(--good, #2f9e58);
}

.auth-alt {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: rgba(232, 232, 236, 0.7);
}

.auth-alt a {
  font-weight: 700;
}

.account-status {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.inline-form {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.member-edit-form {
  max-width: 360px;
}

.member-edit-form input[type="text"],
.member-edit-form input[type="datetime-local"] {
  min-width: 0;
}

button.danger {
  background: rgba(158, 47, 47, 0.14);
  color: var(--bad);
}

/* ---- Filtro en vivo de directorios (modelos / tags) ---- */
.directory-filter {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 420px;
  margin: 0 0 1.25rem;
}

.directory-filter-icon {
  position: absolute;
  left: 0.85rem;
  display: inline-flex;
  align-items: center;
  pointer-events: none;
  opacity: 0.7;
}

.directory-filter input {
  width: 100%;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.6);
  padding: 0 1rem 0 2.5rem;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.directory-filter input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(179, 68, 45, 0.18);
}

body.site-public .directory-filter input {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.32);
  color: #ebebed;
}

body.site-public .directory-filter input::placeholder {
  color: rgba(232, 232, 236, 0.42);
}

body.site-public .directory-filter input:focus {
  background: rgba(0, 0, 0, 0.6);
  border-color: rgba(196, 42, 82, 0.55);
}

.directory-filter-empty {
  margin-top: 1rem;
  color: rgba(200, 200, 206, 0.7);
}

/* ---- Página activa de la paginación visible en público (incl. modo oscuro) ---- */
body.site-public .pagination-link.is-active {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(214, 51, 108, 0.4);
}

/* ---- Landing premio Discord ---- */
.page-discord-promo .container {
  width: min(1180px, calc(100vw - 2rem));
}

.discord-promo-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 2rem;
  align-items: center;
  margin: 6.5rem 0 2rem;
  padding: 2rem;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(255, 110, 170, 0.24), transparent 32%),
    radial-gradient(circle at bottom right, rgba(122, 103, 255, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.discord-promo-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 95, 146, 0.16);
  color: #ffc4d8;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.discord-promo-copy h1 {
  margin: 0.9rem 0 1rem;
  font-size: clamp(2.4rem, 4vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.discord-promo-copy h1 span {
  color: #ff8db4;
}

.discord-promo-copy p {
  margin: 0;
  max-width: 62ch;
  color: rgba(235, 235, 240, 0.82);
  font-size: 1.05rem;
  line-height: 1.65;
}

.discord-promo-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}

.discord-promo-primary,
.discord-promo-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.discord-promo-primary {
  color: #17101d !important;
  background: linear-gradient(135deg, #ffb56a, #ff4b8f);
  box-shadow: 0 18px 30px rgba(255, 75, 143, 0.2);
}

.discord-promo-secondary {
  color: #f5f5f7 !important;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.discord-promo-primary:hover,
.discord-promo-secondary:hover {
  transform: translateY(-1px);
}

.discord-promo-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.discord-promo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0;
}

.discord-promo-card {
  padding: 1.5rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.discord-promo-card-wide {
  margin: 1.25rem 0;
}

.discord-promo-goal {
  margin: 0 0 1.25rem;
  background:
    radial-gradient(circle at top right, rgba(255, 210, 113, 0.18), transparent 28%),
    rgba(255, 255, 255, 0.04);
}

.discord-promo-card h2,
.discord-promo-card h3 {
  margin-top: 0;
}

.discord-steps {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.85rem;
  line-height: 1.6;
}

.discord-big-rule {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.7;
}

.discord-muted {
  margin: 1rem 0 0;
  color: rgba(230, 230, 236, 0.72);
}

.discord-rule-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.discord-rule-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.75rem;
  line-height: 1.6;
}

.discord-rule-list.is-good li::marker {
  color: #63d58c;
}

.discord-rule-list.is-bad li::marker {
  color: #ff7b96;
}

.discord-verification-note {
  margin: 1.25rem 0 0;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(255, 83, 124, 0.12);
  border: 1px solid rgba(255, 131, 162, 0.16);
  color: #ffd5e2;
}

.discord-promo-example pre {
  margin: 0;
  padding: 1.1rem 1.2rem;
  overflow-x: auto;
  border-radius: 18px;
  background: rgba(7, 7, 10, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f7f7fa;
  font: 0.98rem/1.7 "Consolas", "Courier New", monospace;
}

.discord-promo-footer {
  margin: 1.5rem 0 2.5rem;
  padding: 2rem 1.5rem;
  text-align: center;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 86, 141, 0.16), rgba(119, 98, 255, 0.16)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.discord-promo-footer p {
  margin: 0 0 0.7rem;
  font-size: 1.05rem;
  color: rgba(235, 235, 240, 0.82);
}

.discord-promo-footer a {
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 900;
  color: #ffd4e4 !important;
  word-break: break-word;
}

@media (max-width: 980px) {
  .discord-promo-hero,
  .discord-promo-grid,
  .discord-rule-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .discord-promo-hero {
    margin-top: 5.8rem;
    padding: 1.15rem;
    border-radius: 22px;
  }

  .discord-promo-copy p,
  .discord-big-rule {
    font-size: 1rem;
  }

  .discord-promo-card,
  .discord-promo-footer {
    padding: 1.15rem;
    border-radius: 20px;
  }

  .discord-promo-actions {
    flex-direction: column;
  }

  .discord-promo-primary,
  .discord-promo-secondary {
    width: 100%;
  }
}

:root[data-theme="light"] body.site-public.page-discord-promo {
  background:
    radial-gradient(circle at top left, rgba(255, 122, 168, 0.18), transparent 28%),
    linear-gradient(180deg, #fff5f8 0%, #f8e9ef 45%, #f4eef8 100%);
  color: #241826;
}

:root[data-theme="light"] body.site-public.page-discord-promo .site-header {
  background: rgba(255, 247, 250, 0.9);
  border-bottom-color: rgba(95, 41, 62, 0.08);
}

:root[data-theme="light"] body.site-public.page-discord-promo .brand,
:root[data-theme="light"] body.site-public.page-discord-promo nav a,
:root[data-theme="light"] body.site-public.page-discord-promo .site-nav a {
  color: #22151e;
}

:root[data-theme="light"] body.site-public.page-discord-promo .discord-promo-hero,
:root[data-theme="light"] body.site-public.page-discord-promo .discord-promo-card,
:root[data-theme="light"] body.site-public.page-discord-promo .discord-promo-footer {
  background-color: rgba(255, 255, 255, 0.7);
  border-color: rgba(111, 53, 82, 0.1);
  box-shadow: 0 18px 45px rgba(112, 61, 86, 0.12);
}

:root[data-theme="light"] body.site-public.page-discord-promo .discord-promo-copy p,
:root[data-theme="light"] body.site-public.page-discord-promo .discord-muted,
:root[data-theme="light"] body.site-public.page-discord-promo .discord-promo-footer p {
  color: rgba(35, 24, 37, 0.76);
}

:root[data-theme="light"] body.site-public.page-discord-promo .discord-verification-note {
  color: #7c2447;
  background: rgba(255, 116, 160, 0.12);
  border-color: rgba(188, 68, 111, 0.14);
}

:root[data-theme="light"] body.site-public.page-discord-promo .discord-promo-example pre {
  background: #1d1420;
}

:root[data-theme="light"] body.site-public.page-catalog .catalog-promo-banner {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(111, 53, 82, 0.1);
  box-shadow: 0 18px 45px rgba(112, 61, 86, 0.12);
}

/* ===================================================================
   Vista de serie: portada con proporción fija (sin recortes raros)
   =================================================================== */
.series-hero {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem;
}

.series-cover {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #0d0d0e;
  border: 1px solid rgba(168, 85, 247, 0.18);
  box-shadow: 0 18px 45px rgba(10, 4, 20, 0.4);
}

.series-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.series-hero .public-hero-copy {
  min-width: 0;
}

/* ===================================================================
   Vista de capítulo: reproductor, metadata, serie y recomendaciones
   =================================================================== */
body.site-public.page-detail main.container {
  width: min(920px, calc(100vw - 1.5rem));
}

.detail-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 3rem;
}

.detail-player-shell {
  gap: 0.75rem;
}

body.site-public .detail-player-shell {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.detail-watch-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  max-width: 100%;
  min-height: 38px;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(236, 230, 243, 0.72);
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.detail-watch-badge:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 77, 166, 0.32);
}

body.site-public .detail-watch-badge {
  color: rgba(236, 230, 243, 0.72);
}

.detail-watch-badge strong {
  min-width: 0;
  color: #f5f0f8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-source-row .source-pills {
  gap: 0.45rem;
}

.detail-player-shell .source-card {
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
}

.detail-player-shell .source-card-top {
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
}

.detail-player-shell .source-card-name {
  font-size: 0.82rem;
}

.detail-player-shell .player-frame {
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(5, 2, 12, 0.52);
}

.detail-title-block {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.detail-title-block h1 {
  margin: 0;
  color: #f5f0f8;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.detail-title-block p {
  margin: 0;
  color: rgba(236, 230, 243, 0.62);
  font-size: 0.92rem;
  font-weight: 700;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}

.detail-tags .chip {
  padding: 0.4rem 0.85rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  transition: transform 0.14s ease, background 0.14s ease, color 0.14s ease;
}

body.site-public .detail-tags .chip {
  background: rgba(255, 77, 166, 0.14);
  color: #ffb3d9;
  border: 1px solid rgba(255, 77, 166, 0.22);
}

body.site-public .detail-tags .chip:hover {
  transform: translateY(-1px);
  background: rgba(255, 77, 166, 0.24);
  color: #fff;
}

body.site-public .detail-tags .chip-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #c8c8d0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.site-public .detail-tags .chip-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.detail-synopsis h2,
.detail-chapters-head h2 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
}

.detail-synopsis {
  border-radius: 8px;
  box-shadow: none;
}

body.site-public .detail-synopsis {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.1);
}

.detail-synopsis h2::before {
  content: "i";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 0.45rem;
  border-radius: 999px;
  color: #f2c5ff;
  border: 1px solid rgba(242, 197, 255, 0.7);
  font-size: 0.78rem;
  font-family: Georgia, serif;
  font-style: italic;
}

.detail-synopsis p {
  margin: 0;
  color: rgba(236, 230, 243, 0.78);
  line-height: 1.6;
}

.detail-series-link {
  display: flex;
  align-items: center;
}

.detail-chapters-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.detail-chapters-head h2 {
  margin: 0;
}

.chapter-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
}

.detail-chapters:not(.series-chapters) .chapter-list {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, calc((100% - 2.55rem) / 4));
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scroll-snap-type: inline proximity;
  padding: 0.05rem 0 0.65rem;
}

.detail-chapters:not(.series-chapters) .chapter-item {
  scroll-snap-align: start;
}

.series-chapters {
  margin-top: 1.15rem;
}

.series-chapter-list {
  grid-template-columns: 1fr;
  max-width: 720px;
}

.chapter-item {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(168, 85, 247, 0.16);
  background: rgba(168, 85, 247, 0.06);
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.chapter-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 77, 166, 0.5);
  background: rgba(255, 77, 166, 0.1);
}

.chapter-item.is-current {
  border-color: rgba(255, 77, 166, 0.7);
  background: rgba(255, 77, 166, 0.16);
}

.chapter-item-cover {
  flex: 0 0 auto;
  width: 112px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #0d0d0e;
  display: block;
}

.chapter-item-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chapter-item-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(255, 255, 255, 0.3);
}

.chapter-item-body {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.chapter-item-ep {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ff8fcb;
}

.chapter-item-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #f3f3f6;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-similar {
  display: grid;
  gap: 0.85rem;
}

.detail-similar .detail-chapters-head {
  margin-bottom: 0;
}

.detail-similar-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 280px);
  gap: 1rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  padding: 0.1rem 0 0.65rem;
}

.detail-similar-grid .public-video-card {
  min-width: 0;
}

@media (max-width: 640px) {
  .series-hero {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: left;
  }

  .series-cover {
    max-width: 100%;
  }

  .series-chapter-list {
    grid-template-columns: 1fr;
  }

  .detail-watch-badge {
    width: 100%;
  }

  .detail-chapters:not(.series-chapters) .chapter-list {
    grid-auto-columns: minmax(240px, 84vw);
  }

  .detail-similar-grid {
    grid-auto-columns: minmax(210px, 78vw);
  }
}
