/* Dedicated cinema surface. Video always keeps its original aspect ratio. */
body.cinema-open { overflow: hidden; background: #000; }
#content.cinema-content { margin: 0; max-width: none; min-height: 100dvh; }
.cinema-content > .page-loading { min-height: 100dvh; background: #050705; }
.cinema-player {
  position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh;
  overflow: hidden; background: #000; color: #f5f6f2; isolation: isolate;
  font-family: var(--body); outline: none; --cinema-padding: clamp(20px, 3.4vw, 64px);
}
.cinema-player:fullscreen { height: 100%; }
.cinema-player.is-preparing .cinema-center { display: none; }
.cinema-player > video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.cinema-hit-area { position: absolute; inset: 0; z-index: 1; }
.cinema-chrome { transition: opacity .3s, transform .3s; }
.cinema-top {
  position: absolute; z-index: 4; inset: 0 0 auto; display: flex; align-items: flex-start; gap: 22px;
  padding: max(27px, env(safe-area-inset-top)) var(--cinema-padding) 100px;
  background: linear-gradient(#000c, #0006 45%, transparent); pointer-events: none;
}
.cinema-top > * { pointer-events: auto; }
.cinema-button {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 48px; height: 48px; padding: 10px; border: 0; border-radius: 50%;
  color: #f5f6f2; background: transparent; transition: color .15s, background .15s, transform .15s;
}
.cinema-button .icon { width: 26px; height: 26px; }
.cinema-button:hover { background: #ffffff16; color: var(--accent); transform: scale(1.06); }
.cinema-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cinema-button[data-player="toggle"] .icon { fill: currentColor; stroke-width: 1; }
.cinema-back { background: #0004; border: 1px solid #ffffff21; margin-top: 1px; }
.cinema-now { padding-top: 2px; min-width: 0; text-shadow: 0 2px 12px #000; }
.cinema-now > span { color: #c0c5b7; font-size: 9px; font-weight: 500; letter-spacing: 2.8px; }
.cinema-now h1 { font-size: clamp(20px, 2vw, 31px); font-weight: 700; line-height: 1.2; margin: 7px 0 6px; text-wrap: balance; }
.cinema-now p { font-size: 12px; color: #c6cabf; line-height: 1.6; }
.cinema-wordmark { font: 27px var(--display); letter-spacing: 1.7px; margin: 9px 0 0 auto; opacity: .8; }
.cinema-wordmark span { color: var(--accent); }
.cinema-controls {
  position: absolute; z-index: 5; inset: auto 0 0; padding: 95px var(--cinema-padding) max(20px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, #0009 30%, #000e); pointer-events: none;
}
.cinema-controls > * { pointer-events: auto; }
.cinema-timeline { position: relative; height: 28px; display: flex; align-items: center; margin-bottom: 6px; }
.cinema-track { position: absolute; width: 100%; height: 4px; border-radius: 5px; background: #ffffff40; overflow: hidden; transition: height .15s; }
.cinema-buffer, .cinema-played { position: absolute; inset: 0 auto 0 0; width: 0; background: #ffffff4d; border-radius: inherit; }
.cinema-played { background: var(--accent); }
.cinema-timeline:hover .cinema-track, .cinema-timeline:focus-within .cinema-track { height: 6px; }
.cinema-timeline input { position: relative; z-index: 1; appearance: none; -webkit-appearance: none; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; accent-color: var(--accent); }
.cinema-timeline input::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.cinema-timeline input::-moz-range-track { height: 4px; background: transparent; }
.cinema-timeline input::-webkit-slider-thumb { appearance: none; width: 13px; height: 13px; border: 0; border-radius: 50%; background: var(--accent); margin-top: -4.5px; box-shadow: 0 0 0 4px #d1f77912; }
.cinema-timeline input::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: var(--accent); }
.cinema-timeline output { position: absolute; bottom: 36px; transform: translateX(-50%); border: 1px solid #ffffff30; background: #11170ff0; padding: 6px 12px; border-radius: 6px; font-size: 12px; font-variant-numeric: tabular-nums; }
.cinema-control-row, .cinema-primary-controls, .cinema-secondary-controls, .cinema-volume { display: flex; align-items: center; }
.cinema-control-row { justify-content: space-between; gap: 20px; }
.cinema-primary-controls, .cinema-secondary-controls { gap: clamp(5px, .7vw, 15px); }
.cinema-primary-controls > .cinema-button:first-child { margin-left: -10px; }
.cinema-skip { position: relative; }
.cinema-skip .icon { width: 30px; height: 30px; }
.cinema-skip span { position: absolute; top: 20px; left: 0; right: 0; text-align: center; font-size: 8px; font-weight: 700; line-height: 1; }
.cinema-volume { gap: 3px; }
.cinema-volume input { width: 70px; height: 4px; accent-color: var(--accent); cursor: pointer; }
.cinema-time { display: flex; gap: 8px; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; margin-left: 13px; }
.cinema-time-divider { color: #ffffff6b; }
.cinema-remaining { color: #d3d8ca; font-size: 12px; font-variant-numeric: tabular-nums; margin-right: 15px; }
.cinema-footnote { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; color: #9bA391; font-size: 9px; margin-top: 14px; letter-spacing: .2px; }
#playbackStatus { color: #ced5c3; display: flex; align-items: center; gap: 7px; }
#playbackStatus::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.cinema-keyboard-hint { margin-left: auto; letter-spacing: 1px; font-size: 8px; }
.controls-hidden { cursor: none; }
.controls-hidden .cinema-chrome { opacity: 0; pointer-events: none; }
.controls-hidden .cinema-top { transform: translateY(-8px); }
.controls-hidden .cinema-controls { transform: translateY(8px); }
.controls-hidden .cinema-chrome * { pointer-events: none; }
.cinema-center { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 92px; height: 92px; border: 1px solid #ffffff50; border-radius: 50%; background: #11170fc9; backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; color: var(--accent); }
.cinema-center > .icon { width: 31px; height: 31px; fill: currentColor; margin-left: 4px; }
.cinema-center > span { position: absolute; top: calc(100% + 16px); left: -80px; right: -80px; color: #eee; font-size: 12px; text-shadow: 0 2px 10px #000; }
.is-paused .cinema-center { display: flex; }
.cinema-player:has(.cinema-loading:not([hidden])) .cinema-center, .has-error .cinema-center { display: none; }
.cinema-loading { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 18px; font-size: 11px; color: #dce4d3; text-shadow: 0 1px 8px #000; pointer-events: none; }
.cinema-loading .loader { width: 47px; height: 47px; border-width: 3px; }
.cinema-feedback { position: absolute; z-index: 8; left: 50%; top: 38%; transform: translate(-50%, -50%); border: 1px solid #ffffff20; background: #141b10e8; color: var(--accent); border-radius: 40px; padding: 11px 21px; font-size: 13px; pointer-events: none; }
.cinema-up-next { position: absolute; z-index: 4; right: var(--cinema-padding); bottom: 185px; width: 370px; max-width: calc(100% - 40px); border: 1px solid #5867458c; border-radius: 14px; background: #131a10f5; box-shadow: 0 15px 55px #0006; padding: 17px; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 15px; }
.cinema-up-dismiss { position: absolute; right: 6px; top: 5px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: #a4ad9b; }
.cinema-up-dismiss .icon { width: 15px; height: 15px; }
.cinema-up-art { align-self: center; aspect-ratio: 16 / 10; }
.cinema-up-art .artwork { width: 100%; height: 100%; border-radius: 6px; }
.cinema-up-art .artwork-fallback b { font-size: 27px; }
.cinema-up-art .artwork-fallback span { display: none; }
.cinema-up-copy { padding: 6px 6px 0 0; }
.cinema-up-copy > span { display: block; color: var(--accent); font-size: 8px; letter-spacing: 1px; margin-bottom: 7px; }
.cinema-up-copy h2 { font-size: 14px; font-weight: 500; line-height: 1.5; }
.cinema-up-copy p { font-size: 10px; color: #9fab92; margin-top: 5px; }
.cinema-next-play { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 9px; background: var(--accent); color: #18250d; font-size: 12px; font-weight: 700; padding: 10px; border-radius: 7px; }
.cinema-next-play .icon { width: 16px; height: 16px; }
.cinema-cancel-next { grid-column: 1 / -1; color: #adb6a3; font-size: 10px; background: none; border: 0; padding: 3px 5px; }
.cinema-panel { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(470px, 100%); height: 100%; height: 100dvh; max-width: 100%; max-height: 100%; border: 0; border-left: 1px solid #38432d; border-radius: 0; padding: 0; color: #eff3e8; background: #11170ff7; box-shadow: -20px 0 90px #0009; overflow: hidden; }
.cinema-panel[open] { display: flex; flex-direction: column; animation: cinema-panel-in .2s ease-out; }
.cinema-panel::backdrop { background: #0007; }
.cinema-panel-heading { display: flex; align-items: flex-start; gap: 15px; justify-content: space-between; padding: max(28px, env(safe-area-inset-top)) 26px 25px; border-bottom: 1px solid #2c3823; }
.cinema-panel-heading > div { min-width: 0; }
.cinema-panel-heading span { font-size: 9px; color: #97a687; letter-spacing: 2px; }
.cinema-panel-heading h2 { font-size: 25px; font-weight: 500; line-height: 1.3; margin-top: 8px; }
.cinema-panel-heading .cinema-button { width: 36px; height: 36px; padding: 8px; }
.cinema-panel-heading .icon { width: 20px; height: 20px; }
.cinema-season-bar { padding: 23px 26px; }
.cinema-season-bar label { display: block; color: #96a389; font-size: 10px; margin-bottom: 8px; }
.cinema-season-bar select { width: 100%; font-size: 12px; }
.cinema-episode-list { padding: 0 15px max(25px, env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #425433 transparent; }
.cinema-episode { display: grid; grid-template-columns: 115px minmax(0, 1fr); gap: 15px; padding: 13px 11px; border: 1px solid transparent; border-radius: 10px; margin-bottom: 6px; align-items: center; }
.cinema-episode:hover { background: #1b2614; }
.cinema-episode.is-current { border-color: #4c6534; background: #24321a; }
.cinema-episode-art { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; background: #23321a; border-radius: 6px; overflow: hidden; }
.cinema-episode-art > .artwork { position: absolute; inset: 0; border-radius: 0; }
.cinema-episode-art > span:not(.cinema-equalizer) { font: 32px var(--display); color: #9db984; }
.cinema-episode-art > .icon { width: 22px; height: 22px; color: #fff; fill: currentColor; filter: drop-shadow(0 1px 5px #000); position: absolute; right: 7px; bottom: 7px; }
.cinema-episode small { font-size: 8px; color: #9aa98c; letter-spacing: .8px; }
.cinema-episode.is-current small { color: var(--accent); }
.cinema-episode h3 { font-size: 12px; font-weight: 500; line-height: 1.7; margin-top: 5px; }
.cinema-equalizer { display: flex; align-items: flex-end; gap: 3px; height: 21px; padding: 4px; border-radius: 3px; background: #111d0bcc; position: absolute; right: 6px; bottom: 6px; }
.cinema-equalizer i { display: block; width: 3px; height: 11px; background: var(--accent); }
.cinema-equalizer i:nth-child(2) { height: 7px; }
.cinema-equalizer i:nth-child(3) { height: 13px; }
.cinema-settings { width: min(380px, 100%); }
.cinema-settings-body { overflow-y: auto; padding: 27px 26px max(27px, env(safe-area-inset-bottom)); }
.cinema-setting-label { display: block; font-size: 13px; color: #d6dfcd; }
.cinema-setting-label select { display: block; width: 100%; margin-top: 10px; font-size: 12px; }
.cinema-autoplay { display: flex; align-items: flex-start; gap: 12px; margin: 30px 0; cursor: pointer; }
.cinema-autoplay input { width: 18px; height: 18px; accent-color: var(--accent); margin: 3px 0 0; flex-shrink: 0; }
.cinema-autoplay b { font-size: 13px; font-weight: 500; display: block; }
.cinema-autoplay small { color: #96a389; font-size: 11px; display: block; line-height: 1.8; margin-top: 5px; }
.cinema-shortcuts { border-top: 1px solid #2c3823; padding-top: 25px; margin-top: 28px; }
.cinema-shortcuts h3 { font-size: 12px; font-weight: 500; margin-bottom: 20px; }
.cinema-shortcuts p { display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: 11px; color: #a0ad95; margin: 13px 0; }
.cinema-shortcuts kbd { font: 10px var(--body); border: 1px solid #3f4d34; border-radius: 5px; background: #1d2916; color: #d7e4cb; padding: 3px 8px; }
.cinema-message { position: absolute; inset: 0; z-index: 3; background: #080d07f2; display: grid; place-items: center; text-align: center; padding: 125px 30px 180px; overflow-y: auto; }
.cinema-message > div { max-width: 480px; }
.cinema-error-mark { display: inline-grid; place-items: center; width: 64px; height: 64px; border: 1px solid #455b33; border-radius: 18px; background: #1e2c15; margin-bottom: 25px; color: var(--accent); }
.cinema-error-mark .icon { width: 30px; height: 30px; }
.cinema-message .eyebrow { justify-content: center; font-size: 9px; }
.cinema-message h2 { font: 48px/1.2 var(--display); margin: 15px 0; }
.cinema-message p:not(.eyebrow) { color: #a5b298; font-size: 13px; line-height: 1.9; }
.cinema-message > div > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 25px; }
.has-error .cinema-controls { pointer-events: none; opacity: .3; }
.has-error .cinema-controls * { pointer-events: none; }
.has-error .cinema-controls .cinema-button { visibility: hidden; }
@keyframes cinema-panel-in { from { transform: translateX(25px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 1000px) {
  .cinema-remaining, .cinema-keyboard-hint { display: none; }
  .cinema-volume input { width: 52px; }
  .cinema-time { font-size: 12px; margin-left: 7px; }
  .cinema-button { width: 44px; height: 44px; }
  .cinema-skip span { top: 18px; }
  .cinema-secondary-controls, .cinema-primary-controls { gap: 4px; }
}
@media (max-width: 650px) {
  .cinema-player { --cinema-padding: 16px; }
  .cinema-top { padding-top: max(18px, env(safe-area-inset-top)); padding-bottom: 65px; gap: 13px; }
  .cinema-top .cinema-button { width: 36px; height: 36px; padding: 8px; }
  .cinema-now h1 { font-size: 19px; margin-top: 4px; }
  .cinema-now > span { font-size: 7px; letter-spacing: 1.8px; }
  .cinema-now p { font-size: 10px; max-width: 270px; }
  .cinema-wordmark { display: none; }
  .cinema-controls { padding-top: 65px; padding-bottom: max(15px, env(safe-area-inset-bottom)); }
  .cinema-control-row { gap: 8px; align-items: flex-start; flex-wrap: wrap; }
  .cinema-primary-controls { flex: 1; gap: 3px; }
  .cinema-secondary-controls { gap: 3px; }
  .cinema-button { width: 36px; height: 40px; padding: 7px; }
  .cinema-button .icon { width: 22px; height: 22px; }
  .cinema-volume input, #pipToggle { display: none; }
  .cinema-time { font-size: 10px; gap: 5px; margin-left: 4px; }
  .cinema-skip span { top: 18px; font-size: 7px; }
  .cinema-footnote { font-size: 8px; gap: 6px 12px; margin-top: 9px; }
  .cinema-center { width: 68px; height: 68px; }
  .cinema-center .icon { width: 25px; height: 25px; }
  .cinema-center > span { font-size: 10px; }
  .cinema-up-next { bottom: 180px; right: 16px; width: 310px; grid-template-columns: 76px minmax(0, 1fr); padding: 13px; gap: 10px; }
  .cinema-up-copy h2 { font-size: 12px; }
  .cinema-up-copy > span { font-size: 7px; }
  .cinema-up-copy p { font-size: 9px; }
  .cinema-next-play { padding: 8px; font-size: 11px; }
  .cinema-panel { width: min(420px, 95%); }
  .cinema-settings { width: min(360px, 95%); }
  .cinema-panel-heading { padding: 20px; }
  .cinema-panel-heading h2 { font-size: 22px; }
  .cinema-season-bar { padding: 18px 20px; }
  .cinema-episode-list { padding-left: 10px; padding-right: 10px; }
  .cinema-episode { grid-template-columns: 95px minmax(0, 1fr); gap: 12px; padding: 12px 9px; }
  .cinema-episode h3 { font-size: 11px; }
  .cinema-settings-body { padding: 23px 20px; }
  .cinema-message { padding: 100px 20px 160px; }
  .cinema-message h2 { font-size: 36px; }
  .cinema-message p:not(.eyebrow) { font-size: 11px; }
}
@media (max-height: 500px) and (min-width: 550px) {
  .cinema-player { --cinema-padding: max(22px, env(safe-area-inset-left)); }
  .cinema-top { padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: 45px; }
  .cinema-now > span, .cinema-footnote, .cinema-center > span { display: none; }
  .cinema-now h1 { font-size: 18px; margin: 2px 0; }
  .cinema-now p { font-size: 10px; }
  .cinema-controls { padding-top: 35px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .cinema-top .cinema-button { width: 36px; height: 36px; padding: 7px; }
  .cinema-button { width: 38px; height: 36px; padding: 7px; }
  .cinema-button .icon { width: 23px; height: 23px; }
  .cinema-skip span { top: 15px; }
  .cinema-up-next { width: 320px; bottom: 100px; padding: 12px; gap: 9px 12px; }
  .cinema-up-art { width: 78px; }
  .cinema-up-copy h2 { font-size: 12px; }
  .cinema-up-copy p { font-size: 9px; }
  .cinema-next-play { padding: 7px; font-size: 10px; }
  .cinema-panel-heading { padding: 16px 22px; }
  .cinema-panel-heading h2 { font-size: 20px; }
  .cinema-panel-heading span { font-size: 8px; }
  .cinema-season-bar { padding: 15px 22px; }
  .cinema-message { padding: 65px 25px 85px; }
  .cinema-error-mark { display: none; }
  .cinema-message h2 { font-size: 32px; margin: 8px 0; }
  .cinema-message p:not(.eyebrow) { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .cinema-panel[open] { animation: none; } .cinema-chrome, .cinema-button { transition: none; } }
