/* BuurtFlix ? streaming viewer + separate host admin */
:root {
  --bg: #0a0a0a;
  --bg-elev: #141414;
  --bg-admin: #0c0c0c;
  --text: #f0f0f0;
  --muted: #9a9a9a;
  --accent: #e50914;
  --accent-hover: #f40612;
  --line: rgba(255, 255, 255, 0.09);
  --card: #171717;
  --focus: #ffffff;
  --radius: 4px;
  /* Notch / status bar room when the page runs edge-to-edge (iOS home-screen app, some WebViews) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --nav-h: calc(64px + var(--safe-top));
  --font-display: "Segoe UI", "Helvetica Neue", sans-serif;
  --font-body: "Segoe UI", "Helvetica Neue", sans-serif;
  --surface: #111111;
  --surface-2: #1a1a1a;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100%;
  overflow-x: hidden;
  /* clip, not hidden: hidden turns body into a scroller and unpins the sticky header */
  overflow-x: clip;
  scrollbar-width: thin;
  scrollbar-color: #3a4250 transparent;
}

/* Dark scrollbars ? kill default light Windows chrome */
* {
  scrollbar-width: thin;
  scrollbar-color: #3a4250 transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: #3a4250;
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: #556070;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}


a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: #fff;
}

.btn-primary,
.btn-ghost,
.btn-text {
  font: inherit;
  cursor: pointer;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  line-height: 1.15;
  text-align: left;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.5rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-ghost {
  background: rgba(109, 109, 110, 0.4);
  color: #fff;
  border: 1px solid transparent;
  padding: 0.5rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(109, 109, 110, 0.65);
}

.btn-ghost:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0.25rem 0.45rem;
  font-size: 0.88rem;
}

.btn-text:hover {
  color: #fff;
}

.inline-form {
  display: inline;
}

/* Login */
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(229, 9, 20, 0.25), transparent 60%),
    linear-gradient(180deg, #161616 0%, var(--bg) 55%);
}

.login-panel {
  width: min(420px, 100%);
  background: rgba(20, 24, 31, 0.92);
  border: 1px solid var(--line);
  padding: 2rem 1.75rem;
}

.login-brand {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.login-panel h1 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.login-sub {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.login-form label {
  display: block;
  margin-bottom: 0.9rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.login-form input {
  display: block;
  width: 100%;
  margin-top: 0;
  padding: 0.7rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.login-form .btn-primary {
  display: inline-flex;
  justify-content: center;
  text-align: center;
  min-width: 8rem;
  margin: 0.5rem 0 0;
  padding-left: 1.6rem;
  padding-right: 1.6rem;
}

.form-error {
  background: rgba(229, 9, 20, 0.15);
  border: 1px solid rgba(229, 9, 20, 0.4);
  padding: 0.6rem 0.75rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

/* Viewer chrome ? brand left | search ? home ? admin ? profile */
.topnav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: var(--safe-top) calc(1rem + var(--safe-right)) 0 calc(0.75rem + var(--safe-left));
  background: #0a0a0a;
  border-bottom: 1px solid var(--line);
}

.topnav-left,
.topnav-right {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}

.topnav-right {
  margin-left: auto;
  gap: 0.15rem;
}

.topnav-icon,
.account-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #d4d4d4;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}

.topnav-icon:hover,
.topnav-icon:focus-visible,
.topnav-icon.is-active,
.account-btn-icon:hover,
.account-btn-icon:focus-visible,
.account-btn-icon[aria-expanded="true"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.topnav-icon .icon,
.account-btn-icon .icon {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  color: inherit;
}

.brand {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--accent);
  flex: 0 0 auto;
  padding-left: 0.15rem;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  max-width: none;
}

.topnav-links {
  display: none;
}

.topnav-account {
  position: relative;
  flex: 0 0 auto;
}

.layout-viewer .account-btn-name {
  display: none;
}

.topnav-right .global-search {
  margin-left: 0;
}

.topnav-right .account-btn-icon {
  border: 0;
}

.topnav-right .account-btn-icon:hover,
.topnav-right .account-btn-icon[aria-expanded="true"] {
  border-color: transparent;
}

/* Global Netflix-style search (viewer + admin) */
.global-search {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
  z-index: 35;
  display: flex;
  align-items: center;
}

.global-search-toggle,
.global-search-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.global-search-toggle:hover,
.global-search-toggle:focus-visible,
.global-search-close:hover,
.global-search-close:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.global-search-toggle .icon,
.global-search-close .icon {
  width: 1.15em;
  height: 1.15em;
  margin: 0;
}

.global-search-panel {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
}

.global-search-panel[hidden] {
  display: none !important;
}

.global-search.is-open .global-search-toggle {
  display: none;
}

.global-search-field {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: min(280px, 52vw);
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(20, 24, 31, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  color: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.global-search.is-open .global-search-field {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.global-search-field .icon {
  color: rgba(255, 255, 255, 0.7);
  opacity: 1;
  margin: 0;
  width: 1em;
  height: 1em;
}

.global-search-field input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  outline: none;
  padding: 0;
}

.global-search-field input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.global-search-drop {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  width: min(380px, calc(100vw - 1.25rem));
  max-height: min(70vh, 440px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.4rem 0;
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  z-index: 50;
}

.global-search-drop[hidden] {
  display: none !important;
}

.global-search-status {
  margin: 0;
  padding: 0.85rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.global-search-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.85rem;
  color: var(--text);
  text-decoration: none;
}

.global-search-item:hover,
.global-search-item:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.global-search-item img,
.global-search-ph,
.global-search-thumb {
  width: 36px;
  height: 54px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 2px;
  background: var(--card);
}

.global-search-ph {
  display: block;
}

.global-search-text {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.global-search-text strong {
  font-size: 0.95rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-search-text span {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: capitalize;
}

.global-search-more {
  display: block;
  margin-top: 0.25rem;
  padding: 0.7rem 0.85rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.global-search-more:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.search-page-hint {
  margin: 0 0 1rem;
}

.search-page-title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.search-page kbd {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg-elev);
  font-size: 0.85em;
}

.admin-top-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  flex: 0 1 auto;
  min-width: 0;
}

.admin-top-tools .global-search {
  margin-left: 0;
}

.layout-admin .global-search-field {
  background: rgba(17, 17, 17, 0.95);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.layout-admin .global-search.is-open .global-search-field {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.layout-admin .global-search-field input {
  color: var(--text);
}

.layout-admin .global-search-field input::placeholder {
  color: var(--muted);
}

.layout-admin .global-search-field .icon {
  color: var(--muted);
}

.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.account-btn:hover,
.account-btn[aria-expanded="true"] {
  color: #fff;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 200px;
  padding: 0.65rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  z-index: 40;
}

.account-menu[hidden] {
  display: none !important;
}

.account-menu-name {
  margin: 0;
  font-weight: 650;
  font-size: 0.95rem;
}

.account-menu-role {
  margin: 0.15rem 0 0.65rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: capitalize;
}

.account-signout {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.55rem 0.5rem;
  border: none;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.account-signout:hover {
  background: rgba(229, 9, 20, 0.2);
}

.account-app {
  margin-bottom: 0.5rem;
  text-decoration: none;
  box-sizing: border-box;
}

.account-app[hidden] {
  display: none;
}

.layout-viewer .topnav {
  border-bottom: 0;
}

.viewer-main {
  --viewer-gutter: 1.35rem;
  --viewer-inner: 1.5rem;
  padding: 0 var(--viewer-gutter) 4rem;
  min-width: 0;
}

/* Expanded sidebar: ~50% less side padding so content uses the width */
body.has-viewer-side:not(.viewer-side-collapsed) .viewer-main {
  --viewer-gutter: 0.65rem;
  --viewer-inner: 0.75rem;
}

/* Collapsed icon rail: keep the roomier padding */
body.viewer-side-collapsed .viewer-main {
  --viewer-gutter: 1.35rem;
  --viewer-inner: 1.5rem;
}

.viewer-main .billboard {
  padding-left: var(--viewer-inner);
  padding-right: var(--viewer-inner);
}

.viewer-main .hub-title {
  padding-left: var(--viewer-inner);
  padding-right: var(--viewer-inner);
}

.viewer-main .row-scroll {
  padding-left: var(--viewer-inner);
  padding-right: var(--viewer-inner);
}

.viewer-main .series-grid {
  padding-left: var(--viewer-inner);
  padding-right: var(--viewer-inner);
}

.viewer-main .title-hero {
  margin-left: calc(-1 * var(--viewer-gutter));
  margin-right: calc(-1 * var(--viewer-gutter));
  padding-left: calc(var(--viewer-gutter) + 0.15rem);
  padding-right: calc(var(--viewer-gutter) + 0.15rem);
}

.viewer-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: stretch;
  min-height: calc(100vh - var(--nav-h));
}

.viewer-side {
  position: sticky;
  top: var(--nav-h);
  align-self: start;
  height: calc(100vh - var(--nav-h));
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 0;
  border-top: 0;
  background: #0a0a0a;
  padding: 0.5rem 0.55rem 1.25rem;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.viewer-side::-webkit-scrollbar {
  width: 6px;
}

.viewer-side::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.viewer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 0;
}

.viewer-nav-pin {
  display: grid;
  gap: 0.15rem;
  position: sticky;
  top: 0;
  z-index: 3;
  background: #0a0a0a;
  padding-bottom: 0.15rem;
}

.viewer-nav-pin-bottom {
  position: sticky;
  top: auto;
  bottom: 0;
  z-index: 3;
  padding-top: 0.35rem;
  padding-bottom: 0.15rem;
  margin-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #0a0a0a;
}

/* Movies / Series sit in the flow ? no flex spacer, no fake empty height */
.viewer-nav-scroll {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  padding: 0.1rem 0;
}

.viewer-nav-group {
  flex: 0 0 auto;
  min-height: 0;
  height: auto;
  align-self: stretch;
}

.viewer-nav-group[open] > .viewer-nav-sub {
  max-height: min(42vh, 22rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.viewer-nav-group[open] > .viewer-nav-sub::-webkit-scrollbar {
  width: 6px;
}

.viewer-nav-group[open] > .viewer-nav-sub::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

body.viewer-side-collapsed .viewer-shell {
  grid-template-columns: 64px minmax(0, 1fr);
}

body.viewer-side-collapsed .viewer-side {
  width: 64px;
  min-width: 64px;
  max-width: 64px;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 0;
  padding: 0.45rem 0.3rem 1.25rem;
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

body.viewer-side-collapsed .viewer-nav-scroll {
  overflow: visible;
}

body.viewer-side-collapsed .viewer-nav-pin-bottom {
  border-top-color: transparent;
  padding-top: 0.15rem;
}

body.viewer-side-collapsed .viewer-nav-link,
body.viewer-side-collapsed .viewer-nav-group > summary {
  justify-content: center;
  padding: 0.7rem 0.35rem;
  gap: 0;
}

body.viewer-side-collapsed .viewer-nav-link > span,
body.viewer-side-collapsed .viewer-nav-group > summary > span,
body.viewer-side-collapsed .viewer-nav-count,
body.viewer-side-collapsed .viewer-nav-sub,
body.viewer-side-collapsed .viewer-nav-label {
  display: none !important;
}

body.viewer-side-collapsed .viewer-nav-group > summary::-webkit-details-marker,
body.viewer-side-collapsed .viewer-nav-group > summary::marker {
  display: none;
  content: "";
}

body.viewer-side-collapsed .viewer-nav-group > summary::after {
  display: none;
}

.viewer-side-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #d4d4d4;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.viewer-side-toggle:hover,
.viewer-side-toggle:focus,
.viewer-side-toggle:focus-visible,
.viewer-side-toggle[aria-expanded="true"] {
  color: #fff;
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: none;
}

.viewer-side-toggle .icon {
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
}

.viewer-nav-link,
.viewer-nav-group > summary,
.viewer-nav-sublink {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  color: #c8c8c8;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.viewer-nav-link .icon,
.viewer-nav-group > summary .icon {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  flex: 0 0 auto;
}

.viewer-nav-link:hover,
.viewer-nav-group > summary:hover,
.viewer-nav-sublink:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.viewer-nav-link.is-active,
.viewer-nav-sublink.is-active {
  color: #fff;
  background: rgba(229, 9, 20, 0.18);
}

.viewer-nav-group > summary {
  list-style: none;
}

.viewer-nav-group > summary::-webkit-details-marker {
  display: none;
}

.viewer-nav-group > summary::after {
  content: "";
  margin-left: auto;
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.viewer-nav-group[open] > summary::after {
  transform: rotate(225deg);
  translate: 0 2px;
}

.viewer-nav-sub {
  display: grid;
  gap: 0.1rem;
  padding: 0.15rem 0 0.45rem 0.35rem;
}

.viewer-nav-label {
  margin: 0.45rem 0 0.15rem;
  padding: 0 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6f6f6f;
}

.viewer-nav-sublink {
  font-weight: 500;
  font-size: 0.88rem;
  justify-content: space-between;
}

.viewer-nav-count {
  margin-left: auto;
  color: #6f6f6f;
  font-size: 0.75rem;
  font-weight: 600;
}

.series-crumb {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.series-crumb a {
  color: var(--muted);
  text-decoration: none;
}

.series-crumb a:hover {
  color: #fff;
}

.series-children {
  padding: 0 0 2rem;
}

.series-grid {
  padding: 0 1.5rem;
}

.series-grid .card-type {
  display: none;
}

.browse-head {
  margin-bottom: 1.25rem;
}

.browse-kicker {
  margin: 0 0 0.2rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.browse-title {
  margin: 0;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
}

.browse-meta {
  margin: 0.35rem 0 0;
}

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

.browse-grid .card {
  width: 100%;
  max-width: 160px;
  min-height: 0;
  height: auto;
}

@media (max-width: 900px) {
  .viewer-shell {
    grid-template-columns: 1fr;
  }

  body.viewer-side-collapsed .viewer-shell {
    grid-template-columns: 1fr;
  }

  body.viewer-side-collapsed .viewer-side {
    width: min(280px, 88vw);
    min-width: 0;
    max-width: none;
    opacity: 1;
    pointer-events: auto;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.65rem 0.55rem 1.5rem;
    border-right: 0;
  }

  body.viewer-side-collapsed .viewer-nav-link > span,
  body.viewer-side-collapsed .viewer-nav-group > summary > span,
  body.viewer-side-collapsed .viewer-nav-count,
  body.viewer-side-collapsed .viewer-nav-sub,
  body.viewer-side-collapsed .viewer-nav-label {
    display: initial !important;
  }

  body.viewer-side-collapsed .viewer-nav-link,
  body.viewer-side-collapsed .viewer-nav-group > summary {
    justify-content: flex-start;
    padding: 0.55rem 0.65rem;
    gap: 0.55rem;
  }

  .viewer-side {
    position: fixed;
    z-index: 50;
    left: 0;
    top: var(--nav-h);
    width: min(280px, 88vw);
    height: calc(100vh - var(--nav-h));
    margin: 0;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 12px 0 28px rgba(0, 0, 0, 0.45);
  }

  body.viewer-side-open .viewer-side {
    transform: translateX(0);
  }
}

/* Billboard */
.billboard {
  position: relative;
  min-height: clamp(320px, 56vh, 560px);
  display: flex;
  align-items: flex-end;
  padding: 0 1.5rem 3rem;
  background:
    linear-gradient(90deg, rgba(10, 10, 10, 0.92) 8%, rgba(10, 10, 10, 0.35) 48%, transparent 70%),
    linear-gradient(0deg, rgba(10, 10, 10, 0.95) 6%, rgba(10, 10, 10, 0.25) 42%, transparent 68%),
    var(--billboard-bg, none) center / cover no-repeat,
    radial-gradient(800px 400px at 70% 40%, #252525, var(--bg-admin) 70%);
}

.billboard-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.28) 45%, transparent 72%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 35%, rgba(10, 10, 10, 0.92) 100%);
  pointer-events: none;
}

.billboard-copy {
  position: relative;
  max-width: 36rem;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 0.5rem;
}

.billboard-copy h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
}

.lede {
  margin: 0 0 1.25rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  max-width: 32rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Hubs / rows */
.hub {
  padding: 0.5rem 0 1.25rem;
}

.hub-title {
  margin: 0 0 0.75rem;
  padding: 0 1.5rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.row-rail {
  position: relative;
}

.row-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0 1.5rem 0.5rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.row-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.row-rail-btn {
  position: absolute;
  top: var(--rail-mid, 7rem);
  bottom: auto;
  z-index: 12;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.78);
  color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
  backdrop-filter: blur(4px);
  pointer-events: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Fat invisible hit pad so the whole control is easy to click */
.row-rail-btn::before {
  content: '';
  position: absolute;
  inset: -0.65rem;
  border-radius: 999px;
}

.row-rail-btn.is-visible:not([hidden]) {
  display: inline-flex;
  pointer-events: auto;
}

.row-rail-btn[hidden],
.row-rail-btn:not(.is-visible) {
  display: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

@media (hover: hover) and (pointer: fine) {
  .row-rail:hover .row-rail-btn.is-visible:not([hidden]),
  .row-rail:focus-within .row-rail-btn.is-visible:not([hidden]),
  .row-rail-btn.is-visible:not([hidden]):focus-visible {
    opacity: 1;
  }
}

@media (hover: none), (pointer: coarse) {
  /* Touch: swipe the row; arrows would sit on the posters and swallow swipes */
  .row-rail-btn {
    display: none !important;
  }
}

.card-submeta {
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  color: var(--muted, #a3a3a3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-rail-btn:hover,
.row-rail-btn:focus-visible {
  background: rgba(20, 20, 20, 0.9);
  color: #fff;
  outline: none;
}

.row-rail-btn.prev {
  left: 0.15rem;
}

.row-rail-btn.next {
  right: 0.15rem;
}

.row-rail-btn .icon {
  width: 1.45rem;
  height: 1.45rem;
  margin: 0;
  pointer-events: none;
}

.card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  width: 150px;
  min-height: 0;
  height: auto;
  scroll-snap-align: start;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: none;
}

.card:focus-within,
.card:hover {
  transform: none;
  z-index: 2;
  box-shadow: none;
}

.card:focus-visible {
  outline: none;
}

.card-poster {
  position: relative;
  flex: 0 0 auto;
  aspect-ratio: 2 / 3;
  height: auto;
  width: 100%;
  overflow: hidden;
  background: #1a1a1a;
  border-radius: 6px;
  box-shadow: none;
  outline: 2px solid transparent;
  outline-offset: -2px;
  transition: outline-color 0.12s ease;
}

.card:hover .card-poster,
.card:focus-visible .card-poster,
.card:focus-within .card-poster {
  outline-color: #e5a00d;
}

.card .poster-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 0.22s ease;
}

.card-poster.is-loading .poster-img,
.title-poster-wrap.is-loading .title-poster,
.person-avatar-wrap.is-loading .person-avatar,
.global-search-thumb.is-loading img {
  opacity: 0;
}

@keyframes bf-shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

.card-poster.is-loading::before,
.title-poster-wrap.is-loading::before,
.person-avatar-wrap.is-loading::before,
.person-card.is-loading::before,
.global-search-thumb.is-loading::before,
.poster-ph,
.title-poster.ph,
.global-search-ph {
  background-image: linear-gradient(
    110deg,
    #161616 0%,
    #161616 35%,
    #2a2a2a 50%,
    #161616 65%,
    #161616 100%
  );
  background-size: 220% 100%;
  animation: bf-shimmer 1.2s ease-in-out infinite;
}

.card-poster.is-loading::before,
.title-poster-wrap.is-loading::before,
.person-avatar-wrap.is-loading::before,
.person-card.is-loading::before,
.global-search-thumb.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
}

.person-card.is-loading::before {
  left: 0;
  right: 0;
  top: 0;
  bottom: auto;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 4px;
}

.title-poster-wrap,
.person-avatar-wrap,
.global-search-thumb {
  position: relative;
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 6px;
  background: #1a1a1a;
}

.title-poster-wrap {
  width: 100%;
  max-width: 100%;
}

.title-poster-wrap .title-poster {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  transition: opacity 0.22s ease;
}

.person-avatar-wrap {
  width: 160px;
}

.person-avatar-wrap .person-avatar {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  transition: opacity 0.22s ease;
}

.person-card {
  position: relative;
}

.person-card .person-face {
  display: block;
  width: 100%;
  border-radius: 6px;
  transition: opacity 0.22s ease;
}

.global-search-thumb {
  width: 36px;
  height: 54px;
  border-radius: 2px;
}

.global-search-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  transition: opacity 0.2s ease;
}

.card .poster-img.is-broken {
  display: none;
}

.card-poster:has(.poster-img.is-broken)::after,
.card-poster:has(.poster-img[src=""])::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #2a2a2a, #121212 60%);
}

.poster-ph {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.card-type {
  display: none;
}

.card-empty .poster-ph {
  opacity: 0.65;
}

.card-meta {
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-height: 0;
  padding: 0.45rem 0.1rem 0;
  font-size: 0.875rem;
  line-height: 1.25;
  color: #fff;
  overflow: hidden;
  background: transparent;
}

.card-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: #fff;
  word-break: normal;
  overflow-wrap: normal;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
}

.card-year {
  display: block;
  flex: 0 0 auto;
  color: #8b8b8b;
  font-size: 0.8rem;
  font-weight: 400;
  white-space: nowrap;
}

.card.is-static {
  cursor: default;
  pointer-events: none;
}

.hub-empty {
  margin: 0;
  padding: 0.5rem 1rem;
}

.row-scroll {
  align-items: stretch;
}

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

.search-grid .card {
  width: 100%;
  max-width: 160px;
  min-height: 0;
  height: auto;
  justify-self: start;
}

.progress-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--accent);
  max-width: 100%;
}

/* Admin ? separate chrome, scrollable panes, real forms */
.layout-admin {
  display: grid;
  grid-template-columns: 240px 1fr;
  height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  background: var(--bg-admin);
}

.admin-side {
  border-right: 1px solid var(--line);
  padding: 1rem 0.85rem;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.admin-side-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.35rem;
}

.admin-nav-toggle {
  display: none;
  font: inherit;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  min-height: 0;
}

.admin-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius);
  color: var(--muted);
}

.admin-nav a.active,
.admin-nav a:hover {
  background: var(--bg-elev);
  color: #fff;
}

.admin-nav .to-viewer {
  margin-top: auto;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}

.admin-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.admin-top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: relative;
  gap: 0.75rem;
}

.admin-top-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0;
  flex: 0 1 auto;
  min-width: 0;
}

.admin-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1.25rem 1.5rem 3rem;
  display: grid;
  gap: 1rem;
  align-content: start;
  scrollbar-gutter: stable;
}

.admin-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.1rem 1.2rem;
}

.admin-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.admin-form {
  display: grid;
  gap: 0.85rem;
  max-width: 36rem;
  margin-top: 0.75rem;
}

.admin-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form input[type="url"],
.admin-form select,
.admin-form textarea,
.login-form input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  outline: none;
}

.admin-form input:focus,
.login-form input:focus,
.bf-select-btn:focus-visible {
  border-color: rgba(229, 9, 20, 0.65);
  box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.2);
}

.password-field {
  position: relative;
  display: block;
  margin-top: 0.35rem;
}

.login-form input::placeholder {
  color: var(--muted);
}

.login-form .password-field input {
  margin-top: 0;
  padding-right: 3rem;
}

.password-reveal {
  position: absolute;
  top: 50%;
  right: 0.3rem;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}

.password-reveal:hover,
.password-reveal:focus-visible,
.password-reveal[aria-pressed="true"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.password-reveal svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-reveal svg[hidden] {
  display: none;
}

.admin-form input.is-invalid,
.login-form input.is-invalid,
.file-drop.is-invalid,
.bf-select.is-invalid .bf-select-btn {
  border-color: rgba(229, 9, 20, 0.85);
}

.field-error,
.form-banner-error {
  margin: 0.35rem 0 0;
  color: #ff8a8a;
  font-size: 0.85rem;
}

.form-banner-error {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem;
  background: rgba(229, 9, 20, 0.15);
  border: 1px solid rgba(229, 9, 20, 0.4);
  border-radius: var(--radius);
  color: #ffb4b4;
}

/* Custom select ? native <select> hidden; listbox is ours */
.bf-select {
  position: relative;
  display: block;
  width: 100%;
  min-width: 8.5rem;
}

.bf-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  appearance: none !important;
}

.bf-select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.bf-select-btn:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.bf-select.is-open .bf-select-btn {
  border-color: rgba(229, 9, 20, 0.55);
}

.bf-select-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bf-select-chev {
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-15%) rotate(45deg);
  transition: transform 0.15s ease;
}

.bf-select.is-open .bf-select-chev {
  transform: translateY(15%) rotate(225deg);
}

.bf-select-list {
  position: absolute;
  z-index: 80;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  max-height: 16rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #121212;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

.bf-select-option {
  padding: 0.55rem 0.65rem;
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
  font-size: 0.95rem;
}

.bf-select-option:hover,
.bf-select-option:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.bf-select-option.is-selected {
  background: rgba(229, 9, 20, 0.18);
  color: #fff;
}

.bf-select-option.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bf-select::after {
  display: none;
}

/* Custom file drop ? compact picker */
.file-drop {
  position: relative;
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.file-drop:hover,
.file-drop.is-dragover {
  border-color: rgba(229, 9, 20, 0.55);
  background: rgba(229, 9, 20, 0.06);
}

.file-drop-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.file-drop-inner > .icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--muted);
  flex: 0 0 auto;
}

.file-drop-inner > div {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.file-drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.file-drop-title {
  margin: 0;
  font-weight: 650;
  color: var(--text);
  font-size: 0.95rem;
}

.file-drop-sub {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.file-drop-btn {
  flex: 0 0 auto;
  padding: 0.45rem 0.85rem !important;
}

.file-drop-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  text-align: left;
  font-size: 0.85rem;
  color: var(--muted);
}

.file-drop-list li {
  padding: 0.4rem 0.5rem;
  border-top: 1px solid var(--line);
  word-break: break-all;
}

.upload-progress,
.upload-progress.is-ready {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.upload-progress[hidden] {
  display: none !important;
}

.upload-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #0a0c10;
  border: 1px solid var(--line);
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.12s linear;
}

.upload-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.upload-progress.is-active .upload-progress-bar {
  background: var(--accent);
}

.upload-progress.is-done .upload-progress-bar {
  background: #2da85a;
}

.upload-progress.is-error .upload-progress-bar {
  background: var(--accent);
}

.admin-form .btn-primary:disabled {
  opacity: 0.55;
  cursor: wait;
}

.admin-form .btn-primary {
  justify-self: start;
}

.genre-row {
  gap: 0.55rem;
  align-items: center;
}

.genre-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.9rem;
  white-space: nowrap;
}

.genre-chip:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.billboard-copy .year {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
  font-size: 0.7em;
}

.flash {
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.flash-ok {
  background: rgba(40, 160, 80, 0.18);
  border: 1px solid rgba(40, 160, 80, 0.45);
}

.flash-warn {
  background: rgba(200, 150, 40, 0.16);
  border: 1px solid rgba(200, 150, 40, 0.4);
  color: rgba(255, 230, 180, 0.95);
}

.flash-error {
  background: rgba(229, 9, 20, 0.15);
  border: 1px solid rgba(229, 9, 20, 0.4);
}

.stat-row {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.stat-row a {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.stat-row strong {
  font-size: 1.5rem;
}

.stat-row span {
  color: var(--muted);
  font-size: 0.85rem;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.admin-table th {
  color: var(--muted);
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

.kv {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.kv li {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.kv li span {
  color: var(--muted);
}

code {
  font-size: 0.88em;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

@media (max-width: 860px) {
  .layout-admin {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .admin-side {
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .admin-nav-toggle {
    display: inline-block;
  }

  .admin-nav {
    display: none;
  }

  .admin-side.is-open .admin-nav {
    display: flex;
  }

  .admin-nav .to-viewer {
    margin-top: 0.5rem;
  }

  .admin-body {
    overflow: visible;
  }

  .admin-main {
    overflow: visible;
  }

  .stat-row {
    grid-template-columns: 1fr;
  }

  .topnav {
    flex-wrap: nowrap;
    height: var(--nav-h);
    padding: var(--safe-top) calc(0.75rem + var(--safe-right)) 0 calc(0.75rem + var(--safe-left));
    gap: 0.35rem;
  }

  .brand {
    font-size: 1.15rem;
  }

  .topnav-links {
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 0.15rem;
  }

  .topnav-links a,
  .account-btn,
  .global-search-toggle,
  .global-search-close {
    padding: 0.5rem;
    min-width: 40px;
    min-height: 40px;
    justify-content: center;
  }

  .topnav-links .icon,
  .account-btn .icon {
    margin-right: 0;
    width: 1.35em;
    height: 1.35em;
  }

  .global-search {
    margin-left: 0;
  }

  .global-search.is-open {
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    z-index: 60;
  }

  .global-search.is-open .global-search-panel {
    width: 100%;
  }

  .global-search.is-open .global-search-field {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
  }

  .global-search-drop {
    width: 100%;
    right: 0;
    left: 0;
  }

  .admin-top-tools {
    width: 100%;
    justify-content: flex-end;
  }

  .admin-top-tools .global-search.is-open {
    left: 0.75rem;
    right: 0.75rem;
  }

  /* Icons only on phones ? all users */
  .topnav .nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }

  .kv li {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .billboard {
    min-height: 240px;
    padding: 0 1rem 2rem;
  }

  .billboard-copy h1 {
    font-size: 1.55rem;
  }

  .hub-title {
    padding: 0 1rem;
  }

  .row-scroll {
    padding: 0 1rem 0.5rem;
  }

  .viewer-main {
    padding-bottom: 5rem;
  }

  .login-panel {
    padding: 1.5rem 1.15rem;
  }

  .search-page,
  .person-page {
    padding: 1rem;
  }

  .search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .title-hero {
    padding: 1.25rem 1rem 1.75rem;
  }

  .admin-top {
    padding: 0.85rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .admin-main {
    padding: 1rem;
  }

  .admin-form,
  .search-inline {
    max-width: none;
  }

  .match-meta strong {
    font-size: 0.92rem;
  }
}

/* Extra-narrow phones */
@media (max-width: 420px) {
  .brand {
    font-size: 1.05rem;
  }

  .topnav-links a,
  .account-btn,
  .global-search-toggle,
  .global-search-close {
    min-width: 36px;
    min-height: 36px;
    padding: 0.4rem;
  }

  .card {
    width: 110px;
  }
}

/* TV-ish larger hit targets when wide + coarse */
@media (min-width: 1200px) {
  .hub-title {
    font-size: 1.35rem;
  }

  .card {
    width: clamp(140px, 14vw, 200px);
  }

  .btn-primary,
  .btn-ghost {
    padding: 0.5rem 0.95rem;
    font-size: 0.9rem;
  }
}

/* Icons ? one local SVG sprite (inlined in layout for currentColor) */
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.icon {
  width: 1.1em;
  height: 1.1em;
  display: inline-block;
  vertical-align: -0.15em;
  flex: 0 0 auto;
  color: inherit;
}

.btn-primary .icon,
.btn-ghost .icon,
.btn-text .icon,
.admin-nav .icon,
.topnav-links .icon {
  margin-right: 0;
  width: 1em;
  height: 1em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.poster-img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #121212;
}

/* Title detail */
.title-hero {
  position: relative;
  padding: 2rem 1.5rem 2.5rem;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(10, 10, 10, 0.94) 6%, rgba(10, 10, 10, 0.4) 48%, transparent 72%),
    linear-gradient(0deg, rgba(10, 10, 10, 0.96) 4%, rgba(10, 10, 10, 0.28) 45%, transparent 70%),
    var(--title-bg, none) center / cover no-repeat,
    var(--bg-admin);
}

.title-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.35) 42%, rgba(0, 0, 0, 0.15) 68%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, transparent 30%, rgba(10, 10, 10, 0.94) 100%);
  pointer-events: none;
}

.title-hero-inner {
  position: relative;
  max-width: 1100px;
  display: grid;
  gap: 0.85rem;
  color: #fff;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55);
}

.title-hero-row {
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.title-copy {
  color: #fff;
  min-width: 0;
}

.page-back {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  width: fit-content;
  padding: 0.2rem 0;
  margin: 0 0 0.35rem;
  border: 0;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  box-shadow: none;
}

.page-back:hover,
.page-back:focus-visible {
  color: #fff;
  background: transparent;
  border: 0;
  outline: none;
}

.page-back .icon {
  width: 1.15em;
  height: 1.15em;
  margin: 0;
}

.person-page .page-back {
  margin-bottom: 1rem;
}

.credit-thumb {
  display: block;
  width: 36px;
  height: 54px;
  object-fit: cover;
  border-radius: 3px;
  background: var(--card);
}

.credit-thumb.ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: linear-gradient(145deg, #222222, #121212);
}

.credit-thumb.ph .icon {
  margin: 0;
  width: 1em;
  height: 1em;
}

.credits-table td {
  vertical-align: middle;
}

.person-avatar.ph {
  display: grid;
  place-content: center;
  color: var(--muted);
}

.person-avatar.ph .icon {
  width: 2rem;
  height: 2rem;
  margin: 0;
}

.title-poster {
  width: 100%;
  border-radius: 4px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--card);
}

.title-poster.ph {
  background: linear-gradient(145deg, #222222, #121212);
}

.title-copy h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  letter-spacing: -0.03em;
  color: #fff;
}

.title-copy .year {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.tagline {
  color: rgba(255, 255, 255, 0.88);
  font-style: italic;
  margin: 0 0 0.5rem;
}

.meta-line,
.credit-line {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

.overview {
  max-width: 42rem;
  line-height: 1.5;
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.94);
}

.person-card {
  flex: 0 0 auto;
  width: 120px;
  text-align: center;
}

.person-card img,
.face-ph {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 4px;
  background: var(--card);
}

.person-name {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  font-weight: 650;
}

.person-role {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.person-page {
  padding: 1.5rem;
}

.person-header {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.person-avatar {
  width: 100%;
  border-radius: 4px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--card);
}

.person-avatar.ph {
  background: linear-gradient(145deg, #222222, #121212);
}

.search-page {
  padding: 1.5rem;
}

.search-form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
  max-width: 40rem;
}

.search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.35rem 0.75rem;
}

.search-field input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  padding: 0.55rem 0;
  outline: none;
}

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

.search-grid .card {
  width: 100%;
  max-width: 160px;
  min-height: 0;
  height: auto;
  justify-self: start;
}

.admin-media-grid {
  display: grid;
  grid-template-columns: minmax(120px, 140px) 1fr;
  gap: 1.25rem 1.5rem;
  align-items: start;
}

.edit-poster {
  width: 100%;
  max-width: 140px;
  border-radius: 6px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--card);
  display: block;
}

.edit-poster.ph {
  background: linear-gradient(145deg, #222222, #121212);
}

.admin-form textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.search-inline {
  grid-template-columns: 1fr auto;
  align-items: end;
  max-width: none;
}

.match-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.match-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.match-meta {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.match-meta .muted {
  font-size: 0.85rem;
}

.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.card-meta.dim {
  opacity: 0.7;
  padding-top: 0;
}

@media (max-width: 860px) {
  .title-hero-inner,
  .title-hero-row,
  .person-header,
  .admin-media-grid,
  .admin-form-row,
  .search-inline {
    grid-template-columns: 1fr;
  }

  .match-row {
    grid-template-columns: 46px 1fr;
  }

  .match-row .btn-primary {
    grid-column: 1 / -1;
  }
}

/* Custom modal (no window.confirm) */
.bf-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.65);
}

.bf-modal-card {
  width: min(440px, 100%);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem;
}

.bf-modal-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.bf-modal-body {
  margin: 0 0 1rem;
  color: var(--muted);
  white-space: pre-wrap;
  font-size: 0.95rem;
  line-height: 1.45;
}

.bf-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.btn-danger {
  background: #b30710 !important;
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  color: var(--text) !important;
}

.check-row input {
  width: auto !important;
}

.danger-zone {
  border-color: rgba(229, 9, 20, 0.35);
}

/* List-first admin toolbars + action panels */
.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

.admin-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.admin-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-left: auto;
}

.admin-card .titles-filters {
  margin: 0.85rem 1rem 0.5rem;
}

.admin-card-flush-inner {
  border-top: 1px solid var(--line);
}

.admin-card .empty-state {
  padding: 1.5rem 1rem;
}

[data-list-surface][hidden] {
  display: none !important;
}

.admin-toolbar > .btn-primary,
.admin-toolbar > .btn-ghost {
  margin-left: auto;
}

.admin-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-left: auto;
}

.admin-panel {
  background: var(--bg-elev);
  border: 1px solid rgba(229, 9, 20, 0.35);
  border-radius: 6px;
  padding: 1.1rem 1.2rem;
  display: grid;
  gap: 0.85rem;
}

.admin-panel[hidden] {
  display: none !important;
}

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.admin-panel-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

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

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.btn-icon:hover,
.btn-icon:focus-visible {
  color: #fff;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.btn-icon .icon {
  margin: 0;
  width: 1.15em;
  height: 1.15em;
}

.btn-edit {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.88rem;
  text-decoration: none;
  white-space: nowrap;
}

.btn-edit:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.btn-edit .icon {
  margin: 0;
  width: 1em;
  height: 1em;
}

.title-thumb {
  display: block;
  width: 40px;
  height: 60px;
  object-fit: cover;
  border-radius: 3px;
  background: var(--card);
}

.title-thumb.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: linear-gradient(145deg, #222222, #121212);
}

.title-thumb.ph .icon {
  margin: 0;
  width: 1.1em;
  height: 1.1em;
}

.titles-table td {
  vertical-align: middle;
}

.titles-table .col-poster {
  width: 52px;
  line-height: 0;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.titles-table .col-actions {
  text-align: right;
  white-space: nowrap;
}

.titles-table .btn-edit {
  vertical-align: middle;
}

.title-name {
  font-weight: 600;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: capitalize;
  white-space: nowrap;
}

.pill-icon .icon {
  width: 0.85em;
  height: 0.85em;
  margin: 0;
}

.pill-ok {
  border-color: rgba(45, 168, 90, 0.45);
  color: #7dcea0;
  background: rgba(45, 168, 90, 0.1);
}

.pill-warn {
  border-color: rgba(220, 120, 60, 0.45);
  color: #e0a070;
  background: rgba(220, 120, 60, 0.1);
}

.titles-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.titles-filter-search {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 12rem;
  min-width: 10rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
}

.titles-filter-search .icon {
  width: 1rem;
  height: 1rem;
  color: var(--muted);
  margin: 0;
}

.titles-filter-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
}

.titles-filter-search input:focus {
  outline: none;
}

.titles-filters .bf-select {
  min-width: 8.5rem;
}

.titles-filters .btn-text {
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-table .th-sort {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0;
  border-radius: 4px;
}

.admin-table .th-sort:hover,
.admin-table .th-sort:focus-visible {
  color: #fff;
}

.admin-table .th-sort.is-sorted {
  color: #fff;
}

.admin-table .th-sort-arrows {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  line-height: 0.65;
  font-size: 0.65rem;
  opacity: 0.45;
  color: inherit;
}

.admin-table .th-sort-arrows .up,
.admin-table .th-sort-arrows .down {
  display: block;
}

.admin-table .th-sort.is-sorted .th-sort-arrows {
  opacity: 1;
}

.admin-table .th-sort.is-asc .th-sort-arrows .down {
  opacity: 0.25;
}

.admin-table .th-sort.is-desc .th-sort-arrows .up {
  opacity: 0.25;
}

.admin-table .th-sort:not(.is-sorted) .th-sort-arrows .up,
.admin-table .th-sort:not(.is-sorted) .th-sort-arrows .down {
  opacity: 0.7;
}

.edit-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  align-items: center;
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
}

.edit-art {
  display: grid;
  gap: 0.65rem;
  align-content: start;
  justify-items: start;
}

.edit-poster.ph {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.35rem;
  width: 140px;
  max-width: 100%;
  color: var(--muted);
  background: linear-gradient(145deg, #222222, #121212);
  border: 1px solid var(--line);
}

.edit-poster.ph .icon {
  width: 2rem;
  height: 2rem;
  margin: 0;
}

.edit-poster.ph span {
  font-size: 0.8rem;
}

.edit-backdrop-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  background: var(--card);
  border: 1px solid var(--line);
}

.cleanup-zone .cleanup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.75rem;
}

.cleanup-option {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  display: grid;
  gap: 0.65rem;
  align-content: start;
}

.cleanup-option h3 {
  margin: 0;
  font-size: 0.98rem;
}

.cleanup-option-danger {
  border-color: rgba(229, 9, 20, 0.4);
}

.art-upload-row .admin-form {
  min-width: 0;
}

.user-email {
  font-size: 0.82rem;
  margin-top: 0.15rem;
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
  align-items: center;
}

.btn-compact {
  padding: 0.4rem 0.7rem !important;
  font-size: 0.85rem;
}

.users-table .col-actions {
  text-align: right;
}

.inline-form {
  display: inline;
  margin: 0;
}

.td-actions .inline-form {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
  cursor: pointer;
}

.btn-danger-text {
  color: #f87171 !important;
}

.btn-danger-text:hover {
  color: #fecaca !important;
}

/* Dashboard overview */
.dash {
  display: grid;
  gap: 1.25rem;
}

.dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.dash-eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dash-watch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.dash-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.dash-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.45rem;
  padding: 1.15rem 1.2rem;
  background: linear-gradient(165deg, #1c1c1c 0%, #121212 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 6.5rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.dash-stat:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  color: inherit;
}

.dash-stat-value {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.dash-stat-icon {
  display: inline-flex;
  color: var(--muted);
}

.dash-stat-icon .icon {
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
}

.dash-stat strong {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1;
}

.dash-stat-label {
  color: var(--muted);
  font-size: 0.88rem;
}

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dash-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.9rem;
}

.dash-action:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.dash-action .icon {
  margin: 0;
  width: 1em;
  height: 1em;
  color: var(--muted);
}

.dash-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 0;
}

.dash-meta > div {
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.dash-meta dt {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dash-meta dd {
  margin: 0;
  word-break: break-all;
}

.admin-card-flush {
  padding: 0;
  overflow: hidden;
}

.admin-card-flush .table-wrap {
  margin: 0;
}

.admin-card-flush .admin-table th,
.admin-card-flush .admin-table td {
  padding-left: 1rem;
  padding-right: 1rem;
}

.admin-card-flush .admin-table th:first-child,
.admin-card-flush .admin-table td:first-child {
  padding-left: 1.1rem;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 0.85rem;
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: var(--muted);
}

.empty-state p {
  margin: 0;
  font-size: 0.95rem;
}

@media (max-width: 860px) {
  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-toolbar-actions {
    width: 100%;
  }

  .admin-toolbar-actions .btn-primary,
  .admin-toolbar-actions .btn-ghost {
    flex: 0 1 auto;
    justify-content: flex-start;
  }

  .file-drop-inner {
    flex-wrap: wrap;
  }

  .file-drop-btn {
    width: 100%;
    justify-content: center;
  }

  .cleanup-zone .cleanup-grid {
    grid-template-columns: 1fr;
  }

  .dash-stats {
    grid-template-columns: 1fr;
  }

  .dash-meta {
    grid-template-columns: 1fr;
  }

  .dash-stat {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem;
  }

  .dash-stat strong {
    font-size: 1.5rem;
  }

  .dash-stat-label {
    order: -1;
  }

  .titles-table .col-actions .btn-edit span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .btn-edit {
    padding: 0.45rem;
    min-width: 40px;
    min-height: 40px;
    justify-content: center;
  }
}

/* Playback ? custom chrome only; never native video controls */
html:has(body.bf-player-open),
body.bf-player-open {
  overflow: hidden;
}

.bf-player {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: #000;
  padding: 0;
  color: #f4f4f4;
}

.bf-player[hidden] {
  display: none !important;
}

.bf-player-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #000;
}

.bf-player-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  cursor: pointer;
}

.bf-player-video {
  width: 100%;
  height: 100%;
  max-height: 100%;
  background: #000;
  object-fit: contain;
  pointer-events: none;
}

.bf-player-video::-webkit-media-controls,
.bf-player-video::-webkit-media-controls-enclosure,
.bf-player-video::-webkit-media-controls-panel {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0;
  pointer-events: none;
}

.bf-player-status {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  max-width: min(28rem, 90vw);
  padding: 0.85rem 1.1rem;
  background: rgba(12, 12, 12, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.4;
  pointer-events: none;
}

.bf-upnext {
  position: absolute;
  right: 1.25rem;
  bottom: 8rem;
  z-index: 6;
  width: min(22rem, calc(100% - 2rem));
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: rgba(12, 12, 12, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  color: #fff;
  pointer-events: auto;
}

.bf-upnext[hidden] {
  display: none !important;
}

.bf-upnext-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.bf-upnext-title {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

/* Subtitles / speed panels: dark sheet above the dock, like Netflix's audio & subtitles picker */
.bf-panel {
  position: absolute;
  right: calc(1.25rem + env(safe-area-inset-right, 0px));
  bottom: calc(7rem + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  width: min(20rem, calc(100% - 2rem));
  max-height: min(60vh, 26rem);
  overflow-y: auto;
  padding: 1rem 0.5rem 0.6rem;
  background: rgba(24, 24, 24, 0.97);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  animation: bf-panel-in 0.16s ease-out;
}

.bf-panel[hidden] {
  display: none;
}

@keyframes bf-panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.bf-panel-title {
  margin: 0 0 0.5rem;
  padding: 0 0.85rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.bf-panel-option {
  position: relative;
  display: block;
  width: 100%;
  appearance: none;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 1rem;
  text-align: left;
  padding: 0.7rem 0.85rem 0.7rem 2.4rem;
  cursor: pointer;
}

.bf-panel-option:hover,
html.kbd-nav .bf-panel-option:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.bf-panel-option[aria-checked='true'] {
  color: #fff;
  font-weight: 700;
}

.bf-panel-option[aria-checked='true']::before {
  content: '';
  position: absolute;
  left: 0.95rem;
  top: 50%;
  width: 0.45rem;
  height: 0.8rem;
  margin-top: -0.5rem;
  border: solid currentColor;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.bf-panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.5rem 0.35rem 0;
  padding: 0.85rem 0.5rem 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.95rem;
}

.bf-panel-row[hidden] {
  display: none;
}

.bf-player-video::cue {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 1.1em;
  line-height: 1.35;
}

.bf-upnext-watched {
  margin: -0.35rem 0 0.75rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
}

.bf-upnext-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bf-upnext-actions .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.bf-player-chrome {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.25) 16%, transparent 30%, transparent 58%, rgba(0, 0, 0, 0.45) 76%, rgba(0, 0, 0, 0.88) 100%);
}

.bf-player.chrome-visible .bf-player-chrome,
.bf-player:not(.is-playing) .bf-player-chrome,
.bf-player.is-mini .bf-player-chrome {
  opacity: 1;
}

/* Hidden chrome must not swallow taps meant for the picture */
.bf-player:not(.chrome-visible).is-playing:not(.is-mini) .bf-player-chrome * {
  pointer-events: none !important;
}

.bf-player.is-playing:not(.chrome-visible) .bf-player-stage {
  cursor: none;
}

.bf-player-top,
.bf-player-dock,
.bf-player-center,
.bf-pc-btn,
.bf-player-time,
.bf-player-range,
.bf-player-vol-range {
  pointer-events: auto;
}

.bf-player-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
}

.bf-player-title {
  flex: 1;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}

.bf-pc-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 0.35rem;
  line-height: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 3rem;
  min-height: 3rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.bf-pc-btn[hidden] {
  display: none;
}

.bf-pc-btn .icon {
  width: 2rem;
  height: 2rem;
  margin: 0;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

@media (hover: hover) and (pointer: fine) {
  .bf-pc-btn:hover {
    transform: scale(1.2);
  }
}

.bf-pc-btn:active {
  transform: scale(0.92);
}

.bf-pc-btn.is-on .icon,
#bf-player-cc.is-on .icon {
  color: #fff;
}

#bf-player-cc.is-on::after {
  content: '';
  position: absolute;
  bottom: 0.2rem;
  left: 50%;
  width: 1.1rem;
  height: 3px;
  margin-left: -0.55rem;
  border-radius: 2px;
  background: #e50914;
}

#bf-player-cc {
  position: relative;
}

.bf-pc-label {
  display: none;
  line-height: 1.2;
  white-space: nowrap;
}

/* Centre: big play / pause; on touch screens flanked by the skip buttons */
.bf-player-middle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2.5rem, 12vw, 7rem);
  pointer-events: none;
}

.bf-mid-seek {
  display: none;
}

.bf-player-center {
  appearance: none;
  border: 0;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease;
}

/* Desktop: the big button only shows while paused; clicks on the picture play / pause */
.bf-player:not(.is-playing) .bf-player-center {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.bf-player-center:hover {
  background: rgba(229, 9, 20, 0.9);
}

.bf-player-center .icon {
  width: 2.6rem;
  height: 2.6rem;
  margin: 0;
}

.bf-player-center [data-state='play'] .icon {
  margin-left: 0.3rem;
}

.bf-player.is-loading .bf-player-center {
  opacity: 1;
  transform: scale(1);
  pointer-events: none;
  background: transparent;
}

.bf-player.is-loading .bf-player-center-icon {
  display: none;
}

.bf-player.is-loading .bf-player-center::after {
  content: '';
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #e50914;
  animation: bf-spin 0.8s linear infinite;
}

@keyframes bf-spin {
  to { transform: rotate(360deg); }
}

/* Play / pause pop and "10 seconds" skip bubbles */
.bf-flash {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  margin: -2.5rem 0 0 -2.5rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
}

.bf-flash.is-on {
  animation: bf-flash 0.6s ease-out forwards;
}

.bf-flash .icon {
  width: 2.4rem;
  height: 2.4rem;
  margin: 0;
}

@keyframes bf-flash {
  0% { opacity: 1; transform: scale(0.8); }
  100% { opacity: 0; transform: scale(1.5); }
}

.bf-seek-hint {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 7rem;
  margin-top: -3.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.bf-seek-hint.is-back {
  left: 12%;
}

.bf-seek-hint.is-fwd {
  right: 12%;
}

.bf-seek-hint .icon {
  width: 3rem;
  height: 3rem;
  margin: 0;
  padding: 0.9rem;
  box-sizing: content-box;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
}

.bf-seek-hint.is-on {
  opacity: 1;
}

.bf-seek-hint.is-pulse .icon {
  animation: bf-hint-back 0.35s ease-out;
}

.bf-seek-hint.is-fwd.is-pulse .icon {
  animation-name: bf-hint-fwd;
}

@keyframes bf-hint-back {
  0% { transform: rotate(0) scale(1); }
  50% { transform: rotate(-35deg) scale(1.08); }
  100% { transform: rotate(0) scale(1); }
}

@keyframes bf-hint-fwd {
  0% { transform: rotate(0) scale(1); }
  50% { transform: rotate(35deg) scale(1.08); }
  100% { transform: rotate(0) scale(1); }
}

.bf-player-dock {
  padding: 0 1.25rem 1.1rem;
}

.bf-player-seekrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.bf-player-seek {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 1.75rem;
  display: flex;
  align-items: center;
  --bf-bar: 4px;
}

.bf-player-seek:hover,
.bf-player-seek:focus-within {
  --bf-bar: 7px;
}

.bf-player-seek-track {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--bf-bar);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
  pointer-events: none;
  transition: height 0.12s ease;
}

.bf-player-seek-buf {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: rgba(255, 255, 255, 0.35);
}

.bf-player-seek-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: #e50914;
}

.bf-player-range {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  appearance: none;
  background: transparent;
  height: 1.75rem;
  cursor: pointer;
}

.bf-player-range:focus {
  outline: none;
}

.bf-player-range::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
}

.bf-player-range::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: #e50914;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.12s ease;
}

.bf-player-seek:hover .bf-player-range::-webkit-slider-thumb,
.bf-player-range:focus-visible::-webkit-slider-thumb {
  transform: scale(1.3);
}

html.kbd-nav .bf-player-range:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px #fff;
}

.bf-player-range::-moz-range-track {
  height: 4px;
  background: transparent;
  border: 0;
}

.bf-player-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: #e50914;
}

.bf-seek-tip {
  position: absolute;
  bottom: calc(100% + 0.35rem);
  left: 0;
  transform: translateX(-50%);
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  background: rgba(20, 20, 20, 0.95);
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}

.bf-seek-tip[hidden] {
  display: none;
}

.bf-player-time {
  appearance: none;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  padding: 0.25rem 0;
  min-width: 3.5rem;
  text-align: right;
  white-space: nowrap;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.bf-player-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.bf-ctl-group {
  display: flex;
  align-items: center;
  gap: clamp(0.25rem, 1.4vw, 1.1rem);
  flex: 0 0 auto;
}

.bf-ctl-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Desktop: the title sits in the dock, the top bar only has Back + mini player */
@media (hover: hover) and (pointer: fine) {
  .bf-player:not(.is-mini) .bf-player-title {
    visibility: hidden;
  }
}

.bf-player-vol {
  display: flex;
  align-items: center;
}

.bf-player-vol-range {
  width: 0;
  opacity: 0;
  appearance: none;
  background: transparent;
  height: 1.25rem;
  cursor: pointer;
  transition: width 0.2s ease, opacity 0.2s ease, margin 0.2s ease;
}

.bf-player-vol:hover .bf-player-vol-range,
.bf-player-vol:focus-within .bf-player-vol-range {
  width: 6rem;
  opacity: 1;
  margin: 0 0.5rem 0 0.25rem;
}

.bf-player-vol-range::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.bf-player-vol-range::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: #fff;
}

.bf-player-vol-range::-moz-range-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  border: 0;
}

.bf-player-vol-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

.bf-player.is-mini {
  inset: auto 1rem 1rem auto;
  width: min(22rem, calc(100vw - 1.5rem));
  height: 12.5rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  z-index: 90;
}

.bf-player.is-mini .bf-player-middle,
.bf-player.is-mini .bf-player-vol,
.bf-player.is-mini #bf-player-back10,
.bf-player.is-mini #bf-player-fwd10,
.bf-player.is-mini .bf-ctl-title,
.bf-player.is-mini .bf-ctl-right,
.bf-player.is-mini .bf-upnext,
.bf-player.is-mini .bf-panel,
.bf-player.is-mini .bf-seek-hint,
.bf-player.is-mini .bf-flash {
  display: none;
}

.bf-player.is-mini .bf-player-title {
  font-size: 0.85rem;
}

.bf-player.is-mini .bf-player-top {
  padding: 0.35rem 0.5rem;
}

.bf-player.is-mini .bf-player-dock {
  padding: 0 0.65rem 0.4rem;
}

.bf-player.is-mini .bf-pc-btn {
  min-width: 2.25rem;
  min-height: 2.25rem;
}

.bf-player.is-mini .bf-pc-btn .icon {
  width: 1.35rem;
  height: 1.35rem;
}

.bf-player.is-mini .bf-player-seekrow {
  margin-bottom: 0;
}

.bf-player.is-mini .bf-player-time {
  font-size: 0.8rem;
}

.card-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
  border-radius: 0 0 10px 10px;
}

.card-progress > span {
  display: block;
  height: 100%;
  background: #e50914;
}

.card-watched {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(229, 9, 20, 0.92);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.card-watched .icon {
  width: 0.85rem;
  height: 0.85rem;
  margin: 0;
}

/* Keep controls clear of notches, rounded corners and the gesture bar */
.bf-player:not(.is-mini) .bf-player-top {
  padding-top: calc(1rem + env(safe-area-inset-top, 0px));
  padding-left: calc(1.25rem + env(safe-area-inset-left, 0px));
  padding-right: calc(1.25rem + env(safe-area-inset-right, 0px));
}

.bf-player:not(.is-mini) .bf-player-dock {
  padding-bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
  padding-left: calc(1.25rem + env(safe-area-inset-left, 0px));
  padding-right: calc(1.25rem + env(safe-area-inset-right, 0px));
}

/* Phones, tablets and TVs: skip / play / skip in the middle, labelled buttons along the bottom */
@media (hover: none), (pointer: coarse) {
  .bf-player-title {
    text-align: center;
    font-size: 1rem;
  }

  .bf-mid-seek {
    display: inline-flex;
  }

  .bf-mid-seek .icon {
    width: 2.8rem;
    height: 2.8rem;
  }

  .bf-player-center {
    width: 6rem;
    height: 6rem;
    background: transparent;
  }

  .bf-player.chrome-visible .bf-player-center {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
  }

  .bf-player-center:hover {
    background: transparent;
  }

  .bf-player-center .icon {
    width: 4.25rem;
    height: 4.25rem;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
  }

  .bf-player:not(.is-mini) .bf-ctl-left,
  .bf-player:not(.is-mini) .bf-ctl-title,
  .bf-flash {
    display: none;
  }

  .bf-player-controls {
    justify-content: center;
  }

  .bf-ctl-right {
    gap: clamp(0.5rem, 4vw, 2.75rem);
  }

  .bf-pc-btn.has-label {
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
  }

  .bf-pc-btn.has-label .icon {
    width: 1.6rem;
    height: 1.6rem;
  }

  .bf-pc-label {
    display: inline;
    font-size: 0.92rem;
  }

  #bf-player-cc.is-on::after {
    left: 1.5rem;
    bottom: 0;
  }

  .bf-player-seek,
  .bf-player-range {
    height: 2.25rem;
  }

  .bf-player-range::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    margin-top: -8px;
  }

  .bf-panel {
    left: 0;
    right: 0;
    margin: 0 auto;
    width: min(22rem, calc(100% - 2rem));
    bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
  }

  .bf-upnext {
    bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Portrait phones: icon over label, spread across the width; Netflix has no "previous" here either */
@media (max-width: 560px) and (hover: none), (max-width: 560px) and (pointer: coarse) {
  .bf-ctl-right {
    width: 100%;
    justify-content: space-around;
    gap: 0;
  }

  .bf-pc-btn.has-label {
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
    padding: 0.3rem 0.25rem;
  }

  .bf-pc-label {
    font-size: 0.72rem;
  }

  #bf-player-prev,
  #bf-player-mini {
    display: none;
  }

  .bf-player-top::after {
    content: '';
    width: 3rem;
    flex: 0 0 auto;
  }

  #bf-player-cc.is-on::after {
    left: 50%;
    bottom: 1.35rem;
  }

  .bf-player-middle {
    gap: 2.5rem;
  }

  .bf-mid-seek .icon {
    width: 2.4rem;
    height: 2.4rem;
  }

  .bf-player-center .icon {
    width: 3.6rem;
    height: 3.6rem;
  }
}

/* TV and big tablets: readable from the couch */
@media (hover: none) and (min-width: 1100px) {
  .bf-player-title {
    font-size: 1.35rem;
  }

  .bf-pc-btn.has-label .icon {
    width: 1.9rem;
    height: 1.9rem;
  }

  .bf-pc-label {
    font-size: 1.05rem;
  }

  .bf-mid-seek .icon {
    width: 3.2rem;
    height: 3.2rem;
  }

  .bf-player-time {
    font-size: 1.1rem;
  }
}

/* Landscape phone: short screen, keep the picture big */
@media (max-height: 500px) and (orientation: landscape) {
  .bf-player:not(.is-mini) .bf-player-top {
    padding-top: calc(0.4rem + env(safe-area-inset-top, 0px));
    padding-bottom: 0.2rem;
  }

  .bf-player:not(.is-mini) .bf-player-dock {
    padding-bottom: calc(0.4rem + env(safe-area-inset-bottom, 0px));
  }

  .bf-player-seekrow {
    margin-bottom: 0;
  }

  .bf-player-title {
    font-size: 0.95rem;
  }

  .bf-pc-btn {
    min-height: 2.6rem;
  }

  .bf-mid-seek .icon {
    width: 2.4rem;
    height: 2.4rem;
  }

  .bf-player-center {
    width: 4.5rem;
    height: 4.5rem;
  }

  .bf-player-center .icon {
    width: 3.4rem;
    height: 3.4rem;
  }

  .bf-panel {
    bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
    max-height: calc(100vh - 7rem);
  }

  .bf-upnext {
    bottom: 5.5rem;
  }
}

/* ---------- Episodes (season picker + list) ---------- */
.episodes {
  margin: 0.75rem 0 2rem;
  scroll-margin-top: calc(var(--nav-h) + 0.5rem);
}

.episodes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 900px;
  padding: 0 var(--viewer-inner, 1.5rem);
  margin-bottom: 0.9rem;
}

.viewer-main .episodes-head .hub-title {
  padding: 0;
  margin: 0;
}

.season-picker.bf-select {
  display: inline-block;
  width: auto;
  min-width: 9.5rem;
}

.season-picker .bf-select-btn {
  background: #1f1f23;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 0.6rem 0.95rem;
  font-size: 0.95rem;
  font-weight: 650;
}

.season-picker .bf-select-list {
  left: auto;
  min-width: 100%;
  width: max-content;
  max-width: 80vw;
}

.season-single {
  color: var(--muted);
  font-weight: 650;
}

.episode-list {
  list-style: none;
  margin: 0;
  padding: 0 var(--viewer-inner, 1.5rem);
  display: grid;
  gap: 1.1rem;
  max-width: 900px;
}

.episode {
  padding-bottom: 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.episode-play {
  appearance: none;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.episode-thumb {
  position: relative;
  flex: 0 0 auto;
  width: clamp(132px, 34vw, 220px);
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(110deg, #1a1a1a 30%, #262626 50%, #1a1a1a 70%) 0 0 / 250% 100%;
}

.episode-thumb.is-loading {
  animation: bf-shimmer 1.2s linear infinite;
}

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

.episode-thumb.is-loading img {
  opacity: 0;
}

.episode-thumb-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.episode-thumb-play .icon {
  width: 1rem;
  height: 1rem;
  margin: 0 0 0 2px;
}

.episode-play:hover .episode-thumb-play,
.episode-play:active .episode-thumb-play {
  background: var(--accent);
  border-color: var(--accent);
}

.episode-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.episode-title {
  font-weight: 650;
  font-size: 0.98rem;
  line-height: 1.25;
}

.episode.is-watched .episode-title {
  color: rgba(255, 255, 255, 0.7);
}

.episode-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.episode-overview {
  margin: 0.6rem 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.episodes-empty {
  padding: 0 var(--viewer-inner, 1.5rem);
}

/* ---------- Cards: clearer progress, tap feedback ---------- */
.card-progress {
  left: 0.45rem;
  right: 0.45rem;
  bottom: 0.45rem;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
}

.card-poster,
.episode-thumb {
  transition: transform 0.12s ease, outline-color 0.12s ease;
}

.card:active .card-poster,
.episode-play:active .episode-thumb {
  transform: scale(0.97);
}

.viewer-main {
  animation: bf-page-in 0.22s ease-out;
}

@keyframes bf-page-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.title-backdrop,
.tabbar {
  display: none;
}

/* ---------- Phones / small tablets: bottom tab bar ---------- */
@media (max-width: 900px) {
  body.has-tabbar {
    --tabbar-h: calc(58px + env(safe-area-inset-bottom, 0px));
    padding-bottom: var(--tabbar-h);
  }

  .tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    height: var(--tabbar-h);
    padding: 0 var(--safe-right, 0px) env(safe-area-inset-bottom, 0px) var(--safe-left, 0px);
    background: rgba(12, 12, 14, 0.96);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    appearance: none;
    border: 0;
    background: none;
    color: rgba(255, 255, 255, 0.55);
    font: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease, transform 0.1s ease;
  }

  .tab .icon {
    width: 1.5rem;
    height: 1.5rem;
    margin: 0;
  }

  .tab.is-active {
    color: #fff;
  }

  .tab:active {
    transform: scale(0.92);
  }

  /* The tabs replace the hamburger, search icon and account icon up top */
  body.has-tabbar .viewer-side-toggle,
  body.has-tabbar .topnav .global-search-toggle,
  body.has-tabbar #account-btn {
    display: none;
  }

  body.has-tabbar .brand {
    font-size: 1.35rem;
  }

  body.has-tabbar .viewer-side {
    height: calc(100vh - var(--nav-h) - var(--tabbar-h));
  }

  body.has-tabbar .account-menu {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    top: auto;
    bottom: calc(var(--tabbar-h) + 0.6rem);
    min-width: 0;
    padding: 1rem;
    border-radius: 14px;
    z-index: 61;
  }

  body.has-tabbar .account-signout {
    width: 100%;
    justify-content: center;
    padding: 0.8rem;
    font-size: 1rem;
  }

  body.has-tabbar .bf-player.is-mini {
    bottom: calc(var(--tabbar-h) + 0.75rem);
  }

  /* Rows: a third poster peeks in, so it reads as swipeable */
  .viewer-main .row-scroll .card {
    width: calc((100vw - 2.5rem) / 3.25);
  }

  .viewer-main .row-scroll {
    gap: 0.6rem;
  }

  .viewer-main .card-title {
    font-size: 0.82rem;
  }
}

/* ---------- Phones: title page like the apps (wide image, big Play) ---------- */
@media (max-width: 700px) {
  .title-hero,
  .viewer-main .title-hero {
    padding: 0 0 1.25rem;
    background: var(--bg-admin, #0a0a0a);
  }

  .title-hero-shade {
    display: none;
  }

  .title-backdrop {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--wide) center / cover no-repeat;
  }

  .title-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 30%, transparent 55%, var(--bg-admin, #0a0a0a) 100%);
  }

  .title-backdrop.is-poster {
    background: none;
    overflow: hidden;
    display: grid;
    place-items: center;
  }

  .title-backdrop.is-poster::before {
    content: '';
    position: absolute;
    inset: -24px;
    background: var(--wide) center / cover no-repeat;
    filter: blur(22px) brightness(0.55);
  }

  .title-backdrop.is-poster img {
    position: relative;
    z-index: 1;
    height: 86%;
    width: auto;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  }

  .title-hero:has(.title-backdrop) .title-poster-wrap,
  .title-hero:has(.title-backdrop) .title-poster.ph {
    display: none;
  }

  .title-hero-inner {
    position: static;
    padding: 0 1rem;
    text-shadow: none;
  }

  .title-hero-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .title-hero .page-back {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    z-index: 3;
    width: 2.6rem;
    height: 2.6rem;
    margin: 0;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
  }

  .title-hero .page-back span {
    display: none;
  }

  .title-hero .page-back .icon {
    width: 1.45rem;
    height: 1.45rem;
  }

  .title-copy {
    display: flex;
    flex-direction: column;
  }

  .title-copy h1 {
    order: 1;
    font-size: 1.65rem;
    margin: 0.2rem 0 0.3rem;
  }

  .title-copy .tagline {
    order: 2;
    font-size: 0.92rem;
  }

  .title-copy .meta-line {
    order: 3;
    font-size: 0.88rem;
  }

  .title-copy .cta-row {
    order: 4;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    margin: 0.5rem 0 1rem;
  }

  .title-copy .overview {
    order: 5;
    font-size: 0.95rem;
  }

  .title-copy .credit-line {
    order: 6;
    font-size: 0.88rem;
  }

  .title-copy .cta-row .btn-primary,
  .title-copy .cta-row .btn-ghost {
    justify-content: center;
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border-radius: 6px;
  }

  .title-copy .cta-row .icon {
    width: 1.2em;
    height: 1.2em;
  }

  .episode-thumb {
    width: 42vw;
  }
}

/* No native browser chrome: tap flash, long-press callouts, image drag, selecting UI text, autofill colours */
html {
  -webkit-tap-highlight-color: transparent;
}

button,
summary,
.card,
.tab,
.btn-primary,
.btn-ghost,
.btn-text,
.bf-pc-btn,
.bf-select-btn,
.bf-select-option,
.viewer-nav-link,
.viewer-nav-sublink,
.episode-play,
.account-signout {
  -webkit-user-select: none;
  user-select: none;
}

img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.card,
.episode-play {
  -webkit-touch-callout: none;
}

:focus:not(:focus-visible) {
  outline: none;
}

::selection {
  background: rgba(229, 9, 20, 0.45);
  color: #fff;
}

input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
  caret-color: var(--text);
  transition: background-color 9999s ease-out 0s;
}

/* Profile page */
.profile {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 0 3rem;
  animation: bf-page-in 0.25s ease both;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.profile-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 4rem;
  height: 4rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #e50914, #8a0610);
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
}

.profile-name {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
}

.profile-sub {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.profile-card {
  margin-bottom: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elev);
}

.profile-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.profile-card-title .icon {
  width: 1.2rem;
  height: 1.2rem;
  color: var(--accent);
}

.profile-sub-title {
  margin: 1.4rem 0 0.6rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-muted {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
}

.profile-actions .btn-primary,
.profile-actions .btn-ghost {
  padding: 0.65rem 1.1rem;
}

.profile-actions [hidden] {
  display: none;
}

.profile-signout {
  margin-top: 1.5rem;
}

.push-this {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.push-this-text {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.push-this.is-loading .push-this-text span::before {
  content: '';
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.45em;
  vertical-align: -0.1em;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: bf-spin 0.7s linear infinite;
}

.push-note {
  margin: 0.75rem 0 0;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  background: rgba(229, 9, 20, 0.08);
  font-size: 0.9rem;
  line-height: 1.45;
}

.push-note-action {
  display: inline-flex;
  margin: 0.5rem 0 0;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
}

.push-devices {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.push-device {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.push-device.is-this {
  border-color: rgba(229, 9, 20, 0.45);
}

.push-device-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.push-device-meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
}

.push-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: 0.1em;
}

.push-badge[hidden] {
  display: none;
}

.push-device-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.push-device-actions .btn-ghost {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

.push-device-actions .btn-text {
  padding: 0.4rem;
  color: var(--muted);
}

.push-toggles {
  display: grid;
  gap: 0.1rem;
  margin-top: 0.7rem;
}

.push-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  font-size: 0.92rem;
}

/* On/off switch (never a native checkbox) */
.bf-switch {
  position: relative;
  flex: 0 0 auto;
  width: 2.9rem;
  height: 1.65rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #3a3a3a;
  cursor: pointer;
  transition: background 0.2s ease;
}

.bf-switch > span {
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease;
}

.bf-switch[aria-checked="true"] {
  background: var(--accent);
}

.bf-switch[aria-checked="true"] > span {
  transform: translateX(1.25rem);
}

.bf-switch:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.bf-switch.is-busy {
  background: #3a3a3a;
}

.bf-toast {
  position: fixed;
  z-index: 2100;
  left: 50%;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  max-width: min(28rem, calc(100vw - 2rem));
  padding: 0.8rem 1.1rem;
  border-radius: 8px;
  background: #f4f4f4;
  color: #111;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translate(-50%, 1rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.bf-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

body.has-tabbar .bf-toast {
  bottom: calc(var(--tabbar-h, 0px) + 1rem + env(safe-area-inset-bottom, 0px));
}

/* Page-load bar: thin red line across the top while the next page loads */
.bf-topbar {
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease 0.15s;
}

.bf-topbar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.8);
}

.bf-topbar.is-active {
  opacity: 1;
  transition: none;
}

.bf-topbar.is-active span {
  width: 85%;
  transition: width 8s cubic-bezier(0.1, 0.7, 0.2, 1);
}

.bf-topbar.is-done span {
  width: 100%;
  transition: width 0.2s ease;
}

/* Buttons working on something: label stays for width, spinner on top */
.is-busy {
  position: relative;
  pointer-events: none;
  cursor: progress;
}

.is-busy > * {
  visibility: hidden;
}

.is-busy::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.1em;
  height: 1.1em;
  margin: -0.55em 0 0 -0.55em;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: bf-spin 0.7s linear infinite;
}

.btn-primary.is-busy,
.account-signout.is-busy {
  color: transparent;
}

.bf-spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  margin-right: 0.5em;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: bf-spin 0.7s linear infinite;
}

/* Remote / keyboard focus: bright ring, posters lift like on a TV */
html.kbd-nav :focus {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

html.kbd-nav .card:focus {
  outline: none;
}

/* Room for the lifted poster inside the horizontal scroller */
html.kbd-nav .row-scroll {
  padding-top: 0.9rem;
  margin-top: -0.9rem;
}

html.kbd-nav .card .card-poster {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

html.kbd-nav .card:focus .card-poster {
  outline-color: transparent;
  transform: scale(1.07);
  box-shadow: 0 0 0 3px var(--focus), 0 10px 28px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

html.kbd-nav .card:focus .card-title {
  color: #fff;
}

html.kbd-nav .bf-select-option:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.16);
}

html.kbd-nav .bf-pc-btn:focus,
html.kbd-nav .bf-player-center:focus {
  outline-offset: 2px;
  border-radius: 50%;
}

html.kbd-nav .bf-pc-btn.has-label:focus,
html.kbd-nav .bf-player-time:focus {
  border-radius: 8px;
}