/* KyiPlayer Frontend Theme Engine v4.3.0
   Frontend-only base layer. Does not style admin UI or override player/JW internals. */
.kyi-theme {
  background: var(--ft-bg, #05060a);
  color: var(--ft-text, #f8fafc);
  min-height: 100vh;
}
.kyi-theme a { color: inherit; }
.kyi-theme .site-wrap,
.kyi-theme .watch-wrap.kyi-watch-wrap { position: relative; z-index: 1; }
.kyi-theme .topbar,
.kyi-theme .watch-head.kyi-page-head {
  border-color: color-mix(in srgb, var(--ft-accent, #22c8ff) 20%, transparent);
}
.kyi-brand-lockup { display: flex; align-items: center; gap: 12px; min-width: 0; }
.kyi-brand-logo { width: 54px; height: 54px; border-radius: 18px; object-fit: contain; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); padding: 6px; flex: 0 0 auto; }
.kyi-brand-logo.small { width: 42px; height: 42px; border-radius: 14px; }
.kyi-theme .topbar h1,
.kyi-theme .watch-head h1 { color: var(--ft-text, #f8fafc); }
.kyi-theme .topbar p,
.kyi-theme .watch-head p,
.kyi-theme .kyi-watch-meta { color: var(--ft-muted, #94a3b8); }
.kyi-theme .card,
.kyi-theme .public-season-card,
.kyi-theme .public-episode-card,
.kyi-theme .video-card,
.kyi-theme .kp-next-card,
.kyi-theme .description,
.kyi-theme .notice,
.kyi-theme .episode-nav,
.kyi-theme .kp-shortcuts {
  background: color-mix(in srgb, var(--ft-surface, #111827) 86%, transparent);
  border-color: color-mix(in srgb, var(--ft-accent, #22c8ff) 16%, rgba(255,255,255,.12));
  color: var(--ft-text, #f8fafc);
}
.kyi-theme .video-card,
.kyi-theme .public-episode-card,
.kyi-theme .public-season-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.kyi-theme .video-card:hover,
.kyi-theme .public-episode-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--ft-accent, #22c8ff) 55%, transparent); box-shadow: 0 18px 44px color-mix(in srgb, var(--ft-accent, #22c8ff) 18%, transparent); }
.kyi-theme .btn,
.kyi-theme .kyi-page-back,
.kyi-theme .kp-back-chip {
  border-color: color-mix(in srgb, var(--ft-accent, #22c8ff) 35%, transparent);
  background: color-mix(in srgb, var(--ft-surface, #111827) 76%, transparent);
  color: var(--ft-text, #f8fafc);
}
.kyi-theme .btn:hover,
.kyi-theme .kyi-page-back:hover,
.kyi-theme .kp-back-chip:hover { border-color: var(--ft-accent, #22c8ff); box-shadow: 0 12px 30px color-mix(in srgb, var(--ft-accent, #22c8ff) 18%, transparent); }
.kyi-theme .badge,
.kyi-theme .kp-secure-badge,
.kyi-theme .kp-status {
  background: color-mix(in srgb, var(--ft-accent, #22c8ff) 16%, transparent);
  border-color: color-mix(in srgb, var(--ft-accent, #22c8ff) 28%, transparent);
  color: var(--ft-text, #f8fafc);
}
.kyi-theme .series-placeholder { background: linear-gradient(135deg, color-mix(in srgb, var(--ft-accent, #22c8ff) 36%, #111827), color-mix(in srgb, var(--ft-secondary, #7c3aed) 36%, #111827)); color: var(--ft-text, #f8fafc); }
.kyi-card-style-glass .video-card,
.kyi-card-style-glass .card,
.kyi-card-style-glass .public-season-card,
.kyi-card-style-glass .public-episode-card { backdrop-filter: blur(18px); background: color-mix(in srgb, var(--ft-surface, #111827) 62%, transparent); }
.kyi-card-style-compact .video-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.kyi-card-style-compact .video-card { border-radius: 16px; }
.kyi-header-style-centered .topbar,
.kyi-header-style-centered .watch-head.kyi-page-head { text-align: center; justify-content: center; }
.kyi-header-style-compact .topbar,
.kyi-header-style-compact .watch-head.kyi-page-head { padding-top: 16px; padding-bottom: 16px; }
.kyi-theme-footer { margin: 28px auto 0; padding: 18px 0; color: var(--ft-muted, #94a3b8); text-align: center; font-size: 13px; }
@media (max-width: 720px) {
  .kyi-brand-logo { width: 44px; height: 44px; border-radius: 14px; }
  .kyi-brand-lockup { gap: 10px; }
}

/* v4.3.1 Cinema Dark layout foundation: one public page size system + production header menu. */
.kyi-theme {
  --ft-page-max: 1920px;
  --ft-content-max: 1680px;
  --ft-gutter: clamp(14px, 2.4vw, 46px);
  --ft-section-gap: clamp(18px, 2.1vw, 34px);
  --ft-header-height: 74px;
  overflow-x: hidden;
}
.kyi-theme .site-wrap,
.kyi-theme .watch-wrap,
.kyi-theme .watch-wrap.kyi-watch-wrap {
  width: 100%;
  max-width: var(--ft-page-max);
  margin-inline: auto;
  padding: clamp(12px, 1.6vw, 24px) var(--ft-gutter) clamp(26px, 3vw, 54px);
  box-sizing: border-box;
}
.kyi-theme .kyi-front-shell > .card,
.kyi-theme .kyi-front-shell > .public-seo-article,
.kyi-theme .kyi-front-shell > .public-series-detail,
.kyi-theme .kyi-front-shell > .public-actor-profile,
.kyi-theme .kyi-front-shell > .kyi-page-intro,
.kyi-theme .kyi-front-shell > .kyi-theme-footer,
.kyi-theme .watch-wrap.kyi-watch-wrap > * {
  max-width: var(--ft-content-max);
  margin-left: auto;
  margin-right: auto;
}
.kyi-theme .kyi-site-header {
  width: 100%;
  max-width: var(--ft-content-max);
  min-height: var(--ft-header-height);
  margin: 0 auto var(--ft-section-gap);
  padding: 12px clamp(12px, 1.8vw, 22px);
  border-radius: clamp(18px, 1.6vw, 28px);
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(96px, auto);
  align-items: center;
  gap: clamp(10px, 1.4vw, 22px);
  position: sticky;
  top: 10px;
  z-index: 50;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.kyi-theme .kyi-brand-link { text-decoration: none; color: inherit; }
.kyi-theme .kyi-brand-copy { min-width: 0; display: grid; gap: 2px; }
.kyi-theme .kyi-brand-copy strong {
  display: block;
  max-width: min(34vw, 380px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(17px, 1.25vw, 22px);
  letter-spacing: -.03em;
}
.kyi-theme .kyi-brand-copy em {
  color: var(--ft-muted, #94a3b8);
  font-style: normal;
  font-size: 12px;
  line-height: 1.25;
}
.kyi-theme .kyi-brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  font-weight: 950;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--ft-accent, #22c8ff), var(--ft-secondary, #7c3aed));
  box-shadow: 0 18px 42px color-mix(in srgb, var(--ft-accent, #22c8ff) 18%, transparent);
}
.kyi-theme .kyi-primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}
.kyi-theme .kyi-primary-nav a,
.kyi-theme .kyi-nav-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -.01em;
  color: var(--ft-text, #f8fafc);
  border: 1px solid color-mix(in srgb, var(--ft-accent, #22c8ff) 14%, rgba(255,255,255,.12));
  background: color-mix(in srgb, var(--ft-surface, #111827) 54%, transparent);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.kyi-theme .kyi-primary-nav a:hover,
.kyi-theme .kyi-nav-btn:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--ft-accent, #22c8ff) 58%, transparent);
  background: color-mix(in srgb, var(--ft-accent, #22c8ff) 13%, var(--ft-surface, #111827));
}
.kyi-theme .kyi-header-actions { justify-content: flex-end; flex-wrap: nowrap; }
.kyi-theme .kyi-admin-link { opacity: .88; }
.kyi-theme .kyi-page-intro {
  margin-bottom: var(--ft-section-gap);
  padding: clamp(20px, 3.2vw, 48px);
  border-radius: clamp(22px, 2vw, 34px);
  border: 1px solid color-mix(in srgb, var(--ft-accent, #22c8ff) 18%, rgba(255,255,255,.10));
  background: color-mix(in srgb, var(--ft-surface, #111827) 74%, transparent);
}
.kyi-theme .kyi-page-intro h1 {
  margin: 6px 0 8px;
  max-width: 980px;
  font-size: clamp(30px, 5vw, 74px);
  line-height: .94;
  letter-spacing: -.06em;
  color: var(--ft-text, #f8fafc);
}
.kyi-theme .kyi-page-intro p { max-width: 850px; margin: 0; color: var(--ft-muted, #94a3b8); font-size: clamp(15px, 1.25vw, 19px); line-height: 1.65; }
.kyi-theme .kyi-eyebrow { color: var(--ft-accent, #22c8ff); text-transform: uppercase; font-size: 12px; font-weight: 950; letter-spacing: .18em; }
.kyi-theme .card { margin-bottom: var(--ft-section-gap); }
.kyi-theme .video-grid { grid-template-columns: repeat(auto-fill, minmax(clamp(158px, 14vw, 238px), 1fr)); gap: clamp(12px, 1.25vw, 22px); }
.kyi-theme .actor-grid { grid-template-columns: repeat(auto-fill, minmax(clamp(130px, 11vw, 190px), 1fr)); }
.kyi-theme .series-grid .video-card img,
.kyi-theme .video-card img { aspect-ratio: 2 / 3; }
.kyi-theme .public-episode-card img { aspect-ratio: 16 / 9; }
@media (min-width: 1921px) {
  .kyi-theme { --ft-page-max: 100%; --ft-content-max: 1840px; }
}
@media (max-width: 1180px) {
  .kyi-theme .kyi-site-header { grid-template-columns: 1fr auto; }
  .kyi-theme .kyi-primary-nav { grid-column: 1 / -1; order: 3; justify-content: flex-start; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
  .kyi-theme .kyi-primary-nav::-webkit-scrollbar { display: none; }
  .kyi-theme .kyi-primary-nav a { flex: 0 0 auto; }
}
@media (max-width: 720px) {
  .kyi-theme { --ft-gutter: 12px; --ft-section-gap: 14px; --ft-header-height: auto; }
  .kyi-theme .site-wrap,
  .kyi-theme .watch-wrap,
  .kyi-theme .watch-wrap.kyi-watch-wrap { padding-top: 10px; }
  .kyi-theme .kyi-site-header { top: 6px; border-radius: 20px; grid-template-columns: 1fr; gap: 10px; }
  .kyi-theme .kyi-brand-copy strong { max-width: 72vw; font-size: 17px; }
  .kyi-theme .kyi-header-actions { width: 100%; justify-content: stretch; }
  .kyi-theme .kyi-header-actions .kyi-nav-btn { flex: 1 1 auto; }
  .kyi-theme .kyi-primary-nav { margin-inline: -2px; }
  .kyi-theme .kyi-primary-nav a { min-height: 38px; padding: 0 12px; font-size: 12px; }
  .kyi-theme .kyi-page-intro { padding: 20px; }
  .kyi-theme .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .kyi-theme .actor-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .kyi-theme .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kyi-theme .actor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* v5.6.0 Production Cinema Hero Foundation: episode-poster-authoritative, poster-ready preview, accessible dash indicators. */
.kyi-theme .kyi-header-icon,
.kyi-theme .kyi-account-chip {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 999px;
  color: var(--ft-text, #f8fafc);
  text-decoration: none;
  background: transparent;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.kyi-theme .kyi-header-icon svg { width: 24px; height: 24px; fill: currentColor; display: block; }
.kyi-theme .kyi-header-icon:hover,
.kyi-theme .kyi-account-chip:hover { transform: translateY(-1px); background: rgba(255,255,255,.08); }
.kyi-theme .kyi-account-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 950;
  color: #061018;
  background: linear-gradient(135deg, #fff8c7, var(--ft-accent, #e3c66a));
  box-shadow: 0 8px 22px rgba(0,0,0,.25), inset 0 0 0 2px rgba(255,255,255,.45);
}
.kyi-theme .kyi-account-name { font-size: 14px; font-weight: 850; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kyi-theme .kyi-account-caret { font-size: 18px; line-height: 1; opacity: .86; transform: translateY(-1px); }
.kyi-theme .kyi-dot-sep { opacity: .58; }

/* Public Header/Menu v6.0.0 Production System: database-driven nav, accessible mobile drawer, controlled top spacing. */
.kyi-theme .kyi-site-header {
  margin-top: var(--kyi-header-top-spacing, 14px);
  top: var(--kyi-header-top-spacing, 14px);
  isolation: isolate;
}
.kyi-theme .kyi-site-header[data-sticky="0"] { position: relative; top: auto; }
.kyi-theme .kyi-site-header[data-header-width="wide"] { max-width: min(1920px, calc(100vw - (var(--ft-gutter, 24px) * 2))); }
.kyi-theme .kyi-site-header[data-header-width="full"] { max-width: none; }
.kyi-theme .kyi-site-header[data-nav-align="left"] .kyi-primary-nav { justify-content: flex-start; }
.kyi-theme .kyi-site-header[data-nav-align="center"] .kyi-primary-nav { justify-content: center; }
.kyi-theme .kyi-site-header[data-nav-align="right"] .kyi-primary-nav { justify-content: flex-end; }
.kyi-theme .kyi-brand-logo {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  object-fit: contain;
}
.kyi-theme .kyi-primary-nav a.is-active {
  color: #fff;
  border-color: color-mix(in srgb, var(--ft-accent, #22c8ff) 64%, rgba(255,255,255,.18));
  background: color-mix(in srgb, var(--ft-accent, #22c8ff) 17%, var(--ft-surface, #111827));
  box-shadow: 0 16px 38px color-mix(in srgb, var(--ft-accent, #22c8ff) 14%, transparent);
}
.kyi-theme .kyi-mobile-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid color-mix(in srgb, var(--ft-accent, #22c8ff) 20%, rgba(255,255,255,.14));
  border-radius: 14px;
  background: color-mix(in srgb, var(--ft-surface, #111827) 44%, transparent);
  color: var(--ft-text, #f8fafc);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.kyi-theme .kyi-mobile-menu-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform .18s ease, opacity .18s ease;
}
.kyi-theme .kyi-site-header.is-menu-open .kyi-mobile-menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.kyi-theme .kyi-site-header.is-menu-open .kyi-mobile-menu-toggle span:nth-child(2) { opacity: 0; }
.kyi-theme .kyi-site-header.is-menu-open .kyi-mobile-menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.kyi-theme .kyi-header-icon:focus-visible,
.kyi-theme .kyi-account-chip:focus-visible,
.kyi-theme .kyi-primary-nav a:focus-visible,
.kyi-theme .kyi-mobile-menu-toggle:focus-visible {
  outline: 2px solid var(--ft-accent, #22c8ff);
  outline-offset: 3px;
}
@media (max-width: 1180px) {
  .kyi-theme .kyi-site-header[data-mobile-drawer="1"] { grid-template-columns: minmax(0, 1fr) auto auto; }
  .kyi-theme .kyi-site-header[data-mobile-drawer="1"] .kyi-mobile-menu-toggle { display: inline-flex; order: 2; }
  .kyi-theme .kyi-site-header[data-mobile-drawer="1"] .kyi-header-actions { order: 3; }
  .kyi-theme .kyi-site-header[data-mobile-drawer="1"] .kyi-primary-nav {
    grid-column: 1 / -1;
    order: 4;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    padding: 0;
    margin: 0;
    transition: max-height .24s ease, opacity .18s ease, padding .18s ease;
  }
  .kyi-theme .kyi-site-header[data-mobile-drawer="1"].is-menu-open .kyi-primary-nav {
    max-height: 420px;
    opacity: 1;
    pointer-events: auto;
    padding-top: 10px;
  }
  .kyi-theme .kyi-site-header[data-mobile-drawer="1"] .kyi-primary-nav a {
    min-height: 44px;
    width: 100%;
    flex: none;
  }
}
@media (max-width: 720px) {
  .kyi-theme .kyi-site-header {
    margin-top: min(var(--kyi-header-top-spacing, 10px), 16px);
    top: min(var(--kyi-header-top-spacing, 10px), 16px);
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }
  .kyi-theme .kyi-site-header[data-mobile-drawer="1"] { grid-template-columns: minmax(0, 1fr) auto; }
  .kyi-theme .kyi-site-header[data-mobile-drawer="1"] .kyi-header-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-start;
  }
  .kyi-theme .kyi-site-header[data-mobile-drawer="1"] .kyi-primary-nav { grid-template-columns: 1fr; }
  .kyi-theme .kyi-brand-logo { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .kyi-theme .kyi-primary-nav,
  .kyi-theme .kyi-mobile-menu-toggle span:not(.sr-only) { transition: none; }
}

/* v6.1.0 Production Header Search Strip: icon-triggered, accessible, hero-below card removed. */
.kyi-theme .kyi-search-toggle {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.kyi-theme .kyi-search-toggle[aria-expanded="true"] {
  color: var(--ft-accent, #22c8ff);
}
.kyi-theme .kyi-search-strip {
  position: relative;
  z-index: 35;
  width: min(var(--ft-content-max, 1480px), calc(100vw - (var(--ft-gutter, 24px) * 2)));
  margin: 10px auto 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-8px);
  pointer-events: none;
  transition: max-height .24s ease, opacity .18s ease, transform .24s ease, margin .18s ease;
}
.kyi-theme .kyi-search-strip.is-open {
  max-height: 96px;
  opacity: 1;
  overflow: visible;
  transform: translateY(0);
  pointer-events: auto;
  margin-bottom: clamp(10px, 1vw, 16px);
}
.kyi-theme .kyi-search-strip-form {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 16px;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--ft-accent, #22c8ff) 22%, rgba(255,255,255,.14));
  background: linear-gradient(135deg, color-mix(in srgb, var(--ft-surface, #111827) 92%, transparent), color-mix(in srgb, var(--ft-surface, #111827) 76%, transparent));
  box-shadow: 0 18px 55px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
}
.kyi-theme .kyi-search-strip-icon {
  width: 22px;
  height: 22px;
  fill: var(--ft-accent, #22c8ff);
  opacity: .92;
}
.kyi-theme .kyi-search-strip input[type="search"] {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ft-text, #f8fafc);
  font-size: clamp(15px, 1vw, 18px);
  font-weight: 750;
  letter-spacing: -.02em;
  box-shadow: none;
}
.kyi-theme .kyi-search-strip input[type="search"]::placeholder {
  color: color-mix(in srgb, var(--ft-muted, #94a3b8) 86%, transparent);
  font-weight: 650;
}
.kyi-theme .kyi-search-submit,
.kyi-theme .kyi-search-clear,
.kyi-theme .kyi-search-close {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.kyi-theme .kyi-search-submit {
  border: 0;
  padding: 0 18px;
  color: #090b10;
  background: var(--ft-accent, #22c8ff);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--ft-accent, #22c8ff) 24%, transparent);
}
.kyi-theme .kyi-search-clear {
  padding: 0 12px;
  color: var(--ft-muted, #94a3b8);
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
}
.kyi-theme .kyi-search-close {
  width: 40px;
  border: 0;
  color: var(--ft-text, #f8fafc);
  background: transparent;
  font-size: 26px;
  line-height: 1;
}
.kyi-theme .kyi-search-submit:hover,
.kyi-theme .kyi-search-clear:hover,
.kyi-theme .kyi-search-close:hover { transform: translateY(-1px); }
.kyi-theme .kyi-search-strip input[type="search"]:focus-visible,
.kyi-theme .kyi-search-submit:focus-visible,
.kyi-theme .kyi-search-clear:focus-visible,
.kyi-theme .kyi-search-close:focus-visible {
  outline: 2px solid var(--ft-accent, #22c8ff);
  outline-offset: 3px;
}
@media (max-width: 720px) {
  .kyi-theme .kyi-search-strip {
    width: min(var(--ft-content-max, 1480px), calc(100vw - 24px));
    margin-top: 8px;
  }
  .kyi-theme .kyi-search-strip.is-open { max-height: 150px; }
  .kyi-theme .kyi-search-strip-form {
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 54px;
    gap: 8px;
    padding: 8px 8px 8px 12px;
    border-radius: 18px;
  }
  .kyi-theme .kyi-search-submit {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 42px;
  }
  .kyi-theme .kyi-search-clear { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .kyi-theme .kyi-search-strip { transition: none; }
}

/* Front Page Builder structural base v62.0.0
   Theme-specific visuals must live in assets/css/frontpage/{theme}.css.
   This base intentionally provides only safe structure/accessibility fallbacks so
   Cinema Dark cards do not leak into future themes. */
.kyi-theme .kyi-frontpage-shell .kyi-home-section,
.kyi-theme .kyi-frontpage-shell .kyi-home-card,
.kyi-theme .kyi-frontpage-shell .kyi-home-card-media,
.kyi-theme .kyi-frontpage-shell .kyi-home-card-body,
.kyi-theme .kyi-frontpage-shell .kyi-home-section-head,
.kyi-theme .kyi-frontpage-shell .kyi-home-view-all { box-sizing:border-box; }

.kyi-theme .kyi-frontpage-shell .kyi-home-section {
  position:relative;
  width:100vw;
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
  padding:clamp(22px,3vw,44px) var(--ft-gutter,clamp(18px,4vw,70px));
  color:var(--ft-text,#f8fafc);
  overflow:hidden;
  z-index:3;
}
.kyi-theme .kyi-frontpage-shell .kyi-home-section-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:clamp(14px,1.5vw,22px);
}
.kyi-theme .kyi-frontpage-shell .kyi-home-section-head h2,
.kyi-theme .kyi-frontpage-shell .kyi-home-section-head p { margin:0; }
.kyi-theme .kyi-frontpage-shell .kyi-home-view-all {
  display:inline-flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  white-space:nowrap;
}
.kyi-theme .kyi-frontpage-shell .kyi-home-rail-shell { position:relative; }
.kyi-theme .kyi-frontpage-shell .kyi-home-rail-viewport {
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scroll-snap-type:x proximity;
  scrollbar-width:none;
  outline:0;
}
.kyi-theme .kyi-frontpage-shell .kyi-home-rail-viewport::-webkit-scrollbar { display:none; }
.kyi-theme .kyi-frontpage-shell .kyi-home-rail-track { display:flex; align-items:stretch; }
.kyi-theme .kyi-frontpage-shell .kyi-home-grid { display:grid; align-items:start; }
.kyi-theme .kyi-frontpage-shell .kyi-home-card {
  position:relative;
  display:block;
  flex:0 0 auto;
  color:inherit;
  text-decoration:none;
  overflow:hidden;
  scroll-snap-align:start;
  isolation:isolate;
}
.kyi-theme .kyi-frontpage-shell .kyi-home-card-media,
.kyi-theme .kyi-frontpage-shell .kyi-home-card-media img {
  display:block;
  width:100%;
  height:100%;
}
.kyi-theme .kyi-frontpage-shell .kyi-home-card-media { position:relative; overflow:hidden; }
.kyi-theme .kyi-frontpage-shell .kyi-home-card-media img { object-fit:cover; }
.kyi-theme .kyi-frontpage-shell .kyi-home-card-placeholder {
  display:grid;
  place-items:center;
  width:100%;
  height:100%;
}
.kyi-theme .kyi-frontpage-shell .kyi-home-card-body {
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  display:flex;
  flex-direction:column;
}
.kyi-theme .kyi-frontpage-shell .kyi-home-layout-grid_3 .kyi-home-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.kyi-theme .kyi-frontpage-shell .kyi-home-layout-grid_4 .kyi-home-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.kyi-theme .kyi-frontpage-shell .kyi-home-layout-grid_5 .kyi-home-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
.kyi-theme .kyi-frontpage-shell .kyi-home-layout-grid_6 .kyi-home-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
.kyi-theme .kyi-frontpage-shell .kyi-home-grid .kyi-home-card{width:100%;height:auto}
.kyi-theme .kyi-frontpage-shell .kyi-home-grid .kyi-home-card--wide_detail,
.kyi-theme .kyi-frontpage-shell .kyi-home-grid .kyi-home-card--wide_simple,
.kyi-theme .kyi-frontpage-shell .kyi-home-grid .kyi-home-card--episode_landscape,
.kyi-theme .kyi-frontpage-shell .kyi-home-grid .kyi-home-card--episode_wide,
.kyi-theme .kyi-frontpage-shell .kyi-home-grid .kyi-home-card--episode_compact{aspect-ratio:16/9}
.kyi-theme .kyi-frontpage-shell .kyi-home-grid .kyi-home-card--poster_detail,
.kyi-theme .kyi-frontpage-shell .kyi-home-grid .kyi-home-card--poster_simple,
.kyi-theme .kyi-frontpage-shell .kyi-home-grid .kyi-home-card--poster_compact{aspect-ratio:2/3}
.kyi-theme .kyi-frontpage-shell .kyi-home-grid .kyi-home-card--actor{aspect-ratio:3/4}

/* Keep the established hero/header stacking without owning card visuals. */
.kyi-theme .kyi-has-cinema-hero .kyi-site-header { z-index:80; }
@media(max-width:980px){
  .kyi-theme .kyi-frontpage-shell .kyi-home-layout-grid_3 .kyi-home-grid,
  .kyi-theme .kyi-frontpage-shell .kyi-home-layout-grid_4 .kyi-home-grid,
  .kyi-theme .kyi-frontpage-shell .kyi-home-layout-grid_5 .kyi-home-grid,
  .kyi-theme .kyi-frontpage-shell .kyi-home-layout-grid_6 .kyi-home-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:700px){
  .kyi-theme .kyi-frontpage-shell .kyi-home-section{padding-left:18px;padding-right:18px}
  .kyi-theme .kyi-frontpage-shell .kyi-home-section-head{align-items:flex-start;gap:12px}
  .kyi-theme .kyi-frontpage-shell .kyi-home-layout-grid_3 .kyi-home-grid,
  .kyi-theme .kyi-frontpage-shell .kyi-home-layout-grid_4 .kyi-home-grid,
  .kyi-theme .kyi-frontpage-shell .kyi-home-layout-grid_5 .kyi-home-grid,
  .kyi-theme .kyi-frontpage-shell .kyi-home-layout-grid_6 .kyi-home-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
