:root {
  --bg: #f5edf0;
  --panel: #fff8fb;
  --ink: #19101a;
  --muted: #6b4a5c;
  --accent: #d6336c;
  --accent-2: #ff4d8d;
  --accent-deep: #8c1745;
  --accent-soft: #f6c3d8;
  --line: #e6d0db;
  --ok: #2f7d4f;
  --warn: #c95c2d;
  --bad: #9e2f2f;
  --radius: 16px;
  --shadow: 0 20px 50px rgba(60, 10, 32, 0.12);
}

* {
  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: #0d0d0e;
  color: #e8e8ec;
}

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

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;
}

.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, 255, 255, 0.06);
  background: rgba(10, 10, 12, 0.88);
  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;
  }
}

@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;
}

.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;
}

.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(196, 42, 82, 0.14);
  color: #e05070;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(196, 42, 82, 0.28);
}

.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 {
  display: grid;
  gap: 0.3rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255,255,255,0.04);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.catalog-directory-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
}

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

.catalog-directory-item span {
  color: rgba(200, 200, 206, 0.7);
  font-size: 0.88rem;
}

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

body.site-public .player-shell,
body.site-public .public-video-card,
body.site-public .chips-wrap {
  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);
}

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

.player-shell-header h2 {
  margin: 0;
}

.source-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  width: min(560px, 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: grid;
  gap: 0.2rem;
  text-align: left;
  min-height: 76px;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(232, 232, 236, 0.62);
}

.source-card:hover {
  transform: translateY(-1px);
}

.source-card.is-active {
  background: #c42a52;
  color: #fff;
  border-color: rgba(196, 42, 82, 0.5);
}

.source-card-top {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.82;
}

.source-card-name {
  font-size: 1.05rem;
  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%;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

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

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

.catalog-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(11, 8, 7, 0.22) 60%, rgba(11, 8, 7, 0.76) 100%);
  pointer-events: none;
}

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

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

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

.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(214, 51, 108, 0.92), rgba(140, 23, 69, 0.92));
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.catalog-body {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.2rem 1.2rem;
}

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

.catalog-model-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-title {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.catalog-title a {
  color: #ebebed;
}

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;
}

.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;
  }

  .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 {
    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-fit, minmax(260px, 1fr));
}

.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 {
  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 .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 .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 .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 .chip-secondary {
  background: rgba(26, 23, 19, 0.08);
  color: #6b4a5c;
}
