:root {
  color-scheme: light;
  --canvas: #f3f5f9;
  --surface: #fbfcff;
  --surface-hover: #e9edf6;
  --panel: #fcfdffeb;
  --ink: #182338;
  --muted: #485870;
  --line: #d7dfeb;
  --accent: #3d4c94;
  --accent-hover: #303d7f;
  --accent-ink: #fff;
  --selected: #e0e7f9;
  --selected-ink: #2e4079;
  --placeholder: #e0e7f4;
  --focus: #485bb8;
  --radius: 16px;
  --elevation: 0 1px 2px #18233808, 0 12px 24px -22px #22365d45;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--canvas);
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
}
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .48; cursor: default; }
a { color: inherit; text-underline-offset: .23em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(1280px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 3; inset: .75rem auto auto 1rem; padding: .75rem; border-radius: 8px; background: var(--surface); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
#start { scroll-margin-top: 80px; }
.glass-panel {
  background: var(--panel);
  border: 1px solid var(--line);
}
.top {
  position: sticky;
  top: 8px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .55rem;
  min-height: 60px;
  margin-block: 10px 0;
  padding: 7px 10px 7px 15px;
  border-radius: 16px;
  box-shadow: var(--elevation);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 780; font-size: 1.03rem; text-decoration: none; letter-spacing: -.03em; white-space: nowrap; }
.brand-mark { width: 31px; height: 28px; flex: 0 0 auto; border-radius: 9px; display: grid; place-items: center; color: #fff; background: #3c4b87; }
.brand-mark::after { content: ''; border-left: 7px solid currentColor; border-block: 5px solid transparent; margin-left: 2px; }
.top-actions, .actions, .screen-top { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.top-actions > a { color: var(--muted); text-decoration: none; margin-inline: .6rem; font-size: .88rem; font-weight: 570; }
.top-actions > a:hover { color: var(--accent); text-decoration: underline; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .58rem;
  min-height: 46px;
  padding: .66rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: .88rem;
  font-weight: 700;
  white-space: nowrap;
}
.button.small { min-height: 38px; padding: .42rem .78rem; font-size: .8rem; }
.primary { color: var(--accent-ink); background: var(--accent); }
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.outline { background: var(--surface); color: var(--ink); border-color: var(--line); }
.outline:hover:not(:disabled) { background: var(--surface-hover); border-color: var(--muted); }
.triangle { border-left: 8px solid currentColor; border-block: 5.5px solid transparent; }
.hero { display: grid; grid-template-columns: minmax(0, .96fr) minmax(0, 1.14fr); align-items: center; gap: clamp(1rem, 3vw, 2.75rem); padding: clamp(1.15rem, 2.5vw, 2rem) 0 .65rem; }
.eyebrow { color: var(--accent); letter-spacing: .14em; font-size: .7rem; font-weight: 760; }
.hero h1 { font-size: clamp(2.7rem, 5vw, 4.6rem); font-weight: 790; line-height: .97; letter-spacing: -.06em; margin: .5rem 0 .65rem; text-wrap: balance; }
.hero-copy > p:not(.eyebrow) { color: var(--muted); max-width: 38ch; font-size: clamp(.94rem, 1.35vw, 1.1rem); line-height: 1.5; }
.hero .actions { margin-top: 1rem; }
.feature {
  display: grid;
  isolation: isolate;
  position: relative;
  width: 100%;
  min-height: 180px;
  aspect-ratio: 2.85;
  padding: 0;
  overflow: hidden;
  border: 1px solid #394768;
  border-radius: 18px;
  background: radial-gradient(ellipse at 77% 12%, #425b94, #293958 46%, #131e33 90%);
  color: #fff;
  box-shadow: 0 18px 36px -23px #172547a6;
  text-align: left;
}
.feature::before { content: ''; position: absolute; inset: -70% -12% -74% 16%; z-index: -3; rotate: -20deg; background: repeating-radial-gradient(ellipse at center, #c3d1ff17 0 1px, transparent 2px 21px); }
.feature-image { position: absolute; inset: 0; z-index: -2; }
.feature-image img, .card-art img { display: block; width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.feature::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #101828f0 0%, #1018287d 41%, transparent 85%); }
.feature-info { align-self: end; display: flex; justify-content: space-between; align-items: end; gap: .7rem; padding: clamp(.85rem, 2vw, 1.4rem); }
.feature-info > span:first-child { min-width: 0; }
.feature-kicker { display: block; font-size: .65rem; font-weight: 760; letter-spacing: .13em; color: #d2dcff; margin-bottom: .35rem; }
.feature-info strong { display: block; font-size: clamp(1.2rem, 2.6vw, 2rem); line-height: 1.12; letter-spacing: -.035em; overflow-wrap: anywhere; text-wrap: pretty; }
.media-settings { padding: .35rem 0 .65rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .82rem; line-height: 1.45; }
.media-settings summary { width: fit-content; padding: .2rem 0; cursor: pointer; font-weight: 650; }
.media-settings summary:hover, .media-settings a:hover { color: var(--accent); }
.media-settings-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .7rem; margin-top: .55rem; }
.media-settings-controls > p { flex-basis: 100%; }
.program { padding: 1.4rem 0 2.8rem; scroll-margin-top: 72px; }
.program-heading { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem 1rem; margin: 0 0 .8rem; }
.program h2 { font-size: clamp(1.9rem, 3.8vw, 2.65rem); letter-spacing: -.05em; line-height: 1.05; }
.search { display: flex; align-items: center; gap: .78rem; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; min-height: 44px; padding: .5rem .85rem; width: min(100%, 330px); margin-inline-start: auto; }
.search:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.search input { min-width: 0; width: 100%; background: transparent; color: var(--ink); border: 0; outline: none; font-size: .87rem; }
.search input::placeholder { color: var(--muted); }
.glass { flex: 0 0 auto; width: 13px; height: 13px; border: 1.5px solid var(--muted); border-radius: 50%; position: relative; }
.glass::after { content: ''; position: absolute; width: 6px; height: 1.5px; background: var(--muted); right: -5px; bottom: -2px; rotate: 45deg; }
.filters { display: flex; flex-wrap: wrap; gap: .28rem; padding: .35rem; border-radius: 14px; }
.program-options { display: flex; align-items: center; gap: .55rem 1rem; flex-wrap: wrap; margin-top: .85rem; }
.browse-options { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; min-width: 0; }
.select-control { display: inline-flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .82rem; font-weight: 650; }
.select-control select { min-height: 38px; padding: .3rem .55rem; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.theme-control select { min-height: 38px; }
.filter { flex: 0 0 auto; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 9px; min-height: 36px; padding: .4rem .72rem; font-size: .84rem; font-weight: 650; }
.filter:hover { color: var(--ink); background: var(--surface-hover); }
.filter[aria-pressed="true"] { color: var(--selected-ink); background: var(--selected); border-color: var(--line); font-weight: 760; }
.count { font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.shelf { content-visibility: auto; contain-intrinsic-block-size: auto 500px; padding-inline: 4px; margin-inline: -4px; }
.shelf + .shelf { margin-top: 1.7rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.shelf-heading { display: flex; align-items: center; justify-content: space-between; gap: .55rem; margin: .85rem 0 .75rem; }
.shelf-heading h3 { font-size: clamp(1.2rem, 2.6vw, 1.52rem); font-weight: 760; letter-spacing: -.035em; overflow-wrap: anywhere; }
.genre-heading { margin: 1.2rem 0 .55rem; color: var(--muted); font-size: .88rem; font-weight: 700; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.65rem, 1.7vw, 1.1rem); }
.card-entry { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--elevation); }
.card-entry:hover, .card-entry:focus-within { border-color: var(--accent); }
.card-entry .card { width: 100%; flex: 1; }
.card-notes { display: flex; align-items: center; gap: .45rem; align-self: start; color: var(--muted); background: transparent; border: 0; border-radius: 8px; margin: 0 .5rem .4rem; padding: .35rem .38rem; min-height: 32px; font-size: .76rem; font-weight: 650; }
.card-notes::before { content: ''; width: .73rem; height: .65rem; background: linear-gradient(currentColor, currentColor) top left / 100% 1px no-repeat, linear-gradient(currentColor, currentColor) center left / 100% 1px no-repeat, linear-gradient(currentColor, currentColor) bottom left / 65% 1px no-repeat; }
.card-notes:hover { background: var(--surface-hover); color: var(--accent); }
.shownotes-content a, .shownotes-video, #shownotes-description { overflow-wrap: anywhere; }
.shownotes-video { margin-top: .55rem; font-size: clamp(1.18rem, 2.5vw, 1.7rem); line-height: 1.2; }
.shownotes-section { margin: 1.1rem 0; }
.shownotes-section h4 { margin: 0 0 .45rem; font-size: .9rem; }
#shownotes-description { white-space: pre-wrap; line-height: 1.55; }
#shownotes-description a { color: #c0ceff; }
.card { display: flex; flex-direction: column; min-width: 0; border: 0; border-radius: inherit; background: transparent; color: var(--ink); text-align: left; padding: 0; overflow: hidden; }
.card:focus-visible { outline-offset: -3px; }
.card-art { display: grid; place-items: center; width: 100%; aspect-ratio: 16/9; position: relative; overflow: hidden; background: var(--placeholder); }
.play-mark { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; background: #152034e8; color: #fff; border: 1px solid #ffffff85; border-radius: 50%; z-index: 1; }
.card-art:has(img) .play-mark { opacity: 0; }
.play-mark .triangle { margin-left: 2px; }
.feature:hover .play-mark, .card:hover .play-mark, .card:focus-visible .play-mark { background: #f0f3ff; color: #2e4079; opacity: 1; }
.card-info { display: grid; gap: .3rem; width: 100%; padding: .65rem .72rem .4rem; }
.card-title { font-weight: 730; line-height: 1.24; letter-spacing: -.018em; overflow-wrap: anywhere; text-wrap: pretty; }
.card-meta, .movie-meta { color: var(--muted); font-size: .76rem; line-height: 1.4; overflow-wrap: anywhere; }
.footer { display: flex; justify-content: space-between; gap: .7rem; flex-wrap: wrap; color: var(--muted); font-size: .77rem; border-top: 1px solid var(--line); padding: 1rem 0 2rem; }
.help-content { max-width: 740px; padding-block: 2.5rem; line-height: 1.55; }
.help-content h1, .help-content h2 { margin-top: 1.4rem; }
.help-content p { margin-top: .55rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
dialog { --focus: #c0ceff; color-scheme: dark; width: min(960px, calc(100% - 24px)); max-height: calc(100% - 24px); overscroll-behavior: contain; border: 1px solid #ffffff38; border-radius: 19px; padding: 0; background: #1c2539; color: #f5f7ff; box-shadow: 0 30px 90px #111b309e; }
dialog::backdrop { background: #141d32ba; backdrop-filter: blur(9px); }
#playlist { width: min(550px, calc(100% - 24px)); }
#playlist .library-form label { color: #d0d6ee; }
dialog[data-tv="true"] { width: min(1230px, calc(100% - 24px)); }
dialog .outline { background: #ffffff18; color: #fff; border-color: #ffffff39; }
dialog .outline:hover:not(:disabled) { background: #ffffff2b; border-color: #ffffff65; }
dialog .primary { background: #c6d1ff; color: #202e5c; }
dialog .primary:hover:not(:disabled) { background: #e3e9ff; }
dialog .eyebrow { color: #c6d1ff; }
.screen-content { padding: clamp(.75rem, 2vw, 1.3rem); }
.screen-top, .screen-info, .screen-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .65rem; }
.stage { margin: .8rem 0 0; border: 1px solid #ffffff24; border-radius: 13px; overflow: hidden; background: #0a0b11; }
.stage iframe { display: block; border: 0; width: 100%; height: clamp(200px, 51dvh, 62vw); }
.stage:empty { display: none; }
.player-status { color: #d0d6ee; padding: .5rem 0; font-size: .84rem; }
.player-status:empty { padding: 0; }
.player-consent { display: grid; justify-items: start; gap: .65rem; padding: 1rem 0; }
.screen-info { padding-top: .8rem; }
.screen-info h2 { font-size: clamp(1.45rem, 3vw, 2.5rem); letter-spacing: -.05em; line-height: 1.05; }
.movie-meta { margin-top: .4rem; color: #cad0e3; }
.screen-bottom { color: #cbd0e1; padding-top: .95rem; font-size: .77rem; }
.player-window, .player-window body { background: #1c2539; color: #f5f7ff; color-scheme: dark; }
.player-window body > :is(header, main, footer, .skip-link) { display: none; }
.player-window #screen { width: 100%; max-width: none; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; box-shadow: none; background: #1c2539; }
.player-window #screen::backdrop { background: #1c2539; backdrop-filter: none; }
.player-window .stage iframe { height: max(200px, min(66dvh, 56.25vw)); }
.player-window #player-detach, .player-window #player-shownotes, .player-window .player-actions,
.player-window #keys, .player-window #movie-meta { display: none; }
.window-playback { display: grid; gap: .4rem; margin-top: .65rem; }
.window-seek { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .6rem; color: #d0d6ee; font-size: .82rem; font-variant-numeric: tabular-nums; }
.window-seek input { width: 100%; min-width: 0; min-height: 2rem; margin: 0; accent-color: #c6d1ff; }
.window-playback-actions { justify-content: center; }
.window-playback button { min-height: 2.6rem; min-width: 4.25rem; }
.window-info { display: grid; gap: .75rem; }
#library { color-scheme: inherit; width: min(670px, calc(100% - 24px)); background: var(--surface); color: var(--ink); }
:root:not([data-theme="dark"]) #library { --focus: #485bb8; }
#library .outline { color: var(--ink); background: transparent; border-color: var(--line); }
#library .outline:hover { background: #7d8bb21a; }
.library-intro { margin: .75rem 0 .5rem; color: var(--muted); line-height: 1.45; }
.library-link { color: var(--accent); font-size: .87rem; }
.library-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 16px; }
.library-form h3 { grid-column: 1 / -1; font-size: 1rem; }
.library-form label { display: grid; gap: .28rem; color: var(--muted); font-size: .82rem; font-weight: 650; }
.library-form input, .library-form select { width: 100%; min-width: 0; min-height: 38px; padding: .38rem .55rem; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.library-form button { justify-self: start; align-self: end; }
.library-list { display: grid; gap: .35rem; }
.library-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .4rem .2rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.library-item { display: grid; gap: .18rem; }
.library-item span, .library-status { color: var(--muted); font-size: .82rem; }
.library-status { margin: .65rem 0 0; min-height: 1rem; }
@media (max-width: 1000px) {
  .wrap { width: calc(100% - 40px); }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .wrap { width: calc(100% - 28px); }
  .top { top: 6px; margin-top: 8px; min-height: 54px; padding-inline: 9px; }
  .top-actions { justify-content: flex-end; gap: .32rem; }
  .top .button.small { padding-inline: .52rem; font-size: .75rem; }
  .brand { font-size: .94rem; gap: .4rem; }
  .brand-mark { width: 25px; height: 24px; }
  .top-actions > a, #keys { display: none; }
  .hero { grid-template-columns: 1fr; gap: .9rem; padding: 1.3rem 0 .6rem; }
  .hero h1 { font-size: clamp(2.45rem, 10vw, 3.6rem); }
  .hero .actions { margin-top: .75rem; }
  .feature { min-height: 0; aspect-ratio: 2.6; border-radius: 14px; }
  .program { padding-top: 1rem; }
  .search { width: 100%; margin-inline-start: 0; }
  .browse-options { width: 100%; }
  .browse-options .count { margin-inline-start: auto; }
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; scroll-padding-inline: .6rem; }
  .filter { min-height: 44px; padding-inline: .68rem; white-space: nowrap; }
  .filter:focus-visible { outline-offset: -2px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-entry { border-radius: 12px; }
  .card-info { padding: .55rem .55rem .32rem; }
  .card-title { font-size: .9rem; }
  .card-notes { min-height: 40px; margin-inline: .4rem; }
  .library-form { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { #header-tv { display: none; } }
@media (max-width: 360px) {
  .top { gap: .3rem; padding-inline: 8px; }
  .top-actions { gap: .22rem; }
  .top .brand { font-size: .85rem; gap: .32rem; }
  .top .brand-mark { width: 22px; height: 22px; }
  .top .button.small { padding-inline: .4rem; font-size: .7rem; }
  .theme-control select { width: 64px; padding-inline: .25rem; }
}
@media (hover: none) { .card-art:has(img) .play-mark { opacity: 1; } }
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #111724;
  --surface: #1a2435;
  --surface-hover: #28364d;
  --panel: #1b2639f0;
  --ink: #eef3fd;
  --muted: #b8c6dc;
  --line: #3d4d68;
  --accent: #b7c6ff;
  --accent-hover: #d0daff;
  --accent-ink: #202d59;
  --selected: #303f69;
  --selected-ink: #e7eeff;
  --placeholder: #283750;
  --focus: #bdccff;
  --elevation: 0 1px 2px #0002, 0 12px 24px -22px #000c;
}
@media (prefers-reduced-transparency: reduce) {
  .top, dialog::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .glass-panel { background: var(--surface); }
}
