/* Add only integration behavior to the supplied visual system. */
.pf-full{width:100%;margin-top:24px}
.pf-center{justify-content:center}
.pf-push{margin-left:auto}
.pf-summary{max-width:850px}
.pf-player-tools,.pf-episode-nav{display:flex;flex-wrap:wrap;gap:12px;margin:20px 0}
.video-frame iframe{display:block;position:absolute;inset:0;width:100%;height:100%;border:0;background:#000}
.pf-person-initial{display:grid;place-items:center;background:var(--surface-raised);color:var(--muted);font-size:54px;border-radius:50%;aspect-ratio:1;width:100%;margin:0 auto 14px}
.person-hero>.pf-person-initial{max-width:220px}
.pf-rating{font-size:26px;margin:30px 0}
.pf-rating small{font-size:13px}
.current-episode{outline:1px solid var(--accent);background:var(--surface-raised)}
.pf-library-item{min-width:0}
.pf-library-item>.text-button{margin-top:10px}
.pf-search-results{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
.pf-search-form{display:flex;gap:12px;margin:24px 0}
.pf-search-form input{flex:1;min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:14px;color:var(--white)}
.mega-menu{max-height:75vh;overflow:auto}
.filter-field.grow input{width:100%;max-width:none}
.pf-missing-image{object-fit:contain!important;background:var(--surface-raised);padding:25px}
.pf-discovery-preview img{max-height:400px;width:100%;object-fit:cover;border-radius:16px}
.pf-discovery-preview h2{margin-bottom:8px}
.pf-discovery-preview .button{margin-top:20px}
.modal-panel iframe{width:100%;aspect-ratio:16/9;border:0}
.pf-cinema .watch-shell{max-width:none}
.pf-cinema .site-header,.pf-cinema .site-footer{display:none}
.pf-cinema .watch-page{padding-top:20px}
.video-frame:fullscreen{width:100vw;height:100vh;aspect-ratio:auto;max-height:none}
.pf-empty-note{grid-column:1/-1}
.source-bar .server-menu{max-height:min(320px,50vh);overflow-y:auto;overscroll-behavior:contain;min-width:min(260px,calc(100vw - 32px));max-width:calc(100vw - 32px)}
.watch-toolbar{flex-wrap:wrap}
/* Match filter and season fields while preserving native form submission. */
.filter-field .pf-select{display:block;min-width:0;width:100%}
.filter-field>.pf-select-label{margin-bottom:5px}
.season-toolbar .pf-select{min-width:170px}
.pf-select-label:empty{display:none}
@media(max-width:1100px){.pf-search-results{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){
  .pf-search-results{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pf-search-form{flex-wrap:wrap}.pf-search-form input{min-width:180px}
  .pf-player-tools .button{padding:9px 12px;font-size:12px}
  .pf-person-initial{font-size:30px}.pf-episode-nav .button{font-size:12px}
  .person-hero>.pf-person-initial{max-width:140px}
}
@media(prefers-reduced-motion:reduce){.pf-select-trigger[type=button][role=combobox],.pf-select-chevron,.pf-select-option[role=option]{transition:none}.pf-select-menu{animation:none}}
@media(forced-colors:active){
  .pf-select-trigger[type=button][role=combobox],.pf-select-menu{border-color:ButtonText;background:Canvas;color:CanvasText;box-shadow:none}
  .pf-select-trigger[type=button][role=combobox]:focus-visible{outline-color:Highlight}
  .pf-select-option[role=option]{color:CanvasText}
  .pf-select-option[role=option][data-active=true]{border-color:Highlight;background:Canvas}
  .pf-select-option[role=option][aria-selected=true]{border-color:Highlight;background:Highlight;color:HighlightText}
  .pf-select-option[role=option][aria-disabled=true],.pf-select-trigger[type=button][role=combobox]:disabled{color:GrayText;opacity:1}
  .pf-select-check,.pf-select-icon,.pf-select-chevron,.pf-select-menu-header,.pf-select-count{color:inherit}
}

/* Pelisplus selection controls. Native fields remain the progressive fallback. */
:root{--pf-select-ready:1;--pf-control-bg:#141815;--pf-control-border:#303930;--pf-control-text:#d9dfd8;--pf-control-muted:#8f998f;--pf-control-accent:var(--accent,#c5f46b)}
.pf-select,.pf-select-trigger,.pf-select-menu,.pf-select-option{box-sizing:border-box}
.pf-select{position:relative;display:inline-block;min-width:170px;max-width:100%;vertical-align:middle}
.pf-select-native{display:none!important}
.pf-select-trigger[type=button][role=combobox]{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-width:0;min-height:48px;margin:0;padding:12px 14px;border:1px solid var(--pf-control-border);border-radius:11px;background:linear-gradient(180deg,#1c231e,var(--pf-control-bg));color:var(--pf-control-text);font:600 14px/1.35 var(--font);letter-spacing:normal;text-align:left;cursor:pointer;box-shadow:inset 0 1px 0 #ffffff05;touch-action:manipulation;transition:border-color .16s ease,background .16s ease,box-shadow .16s ease}
.pf-select-trigger[type=button][role=combobox]:not(:disabled):hover{border-color:#697e4d;background:linear-gradient(180deg,#263126,#182218)}
.pf-select-trigger[type=button][role=combobox]:focus-visible{outline:2px solid var(--pf-control-accent);outline-offset:3px;box-shadow:0 0 0 5px #c5f46b0b}
.pf-select-trigger[type=button][role=combobox][aria-expanded=true]{border-color:#a4cb5b;box-shadow:0 0 0 3px #c5f46b12;background:linear-gradient(180deg,#263126,#182218)}
.pf-select-trigger[type=button][role=combobox]:disabled,.pf-select-trigger[type=button][role=combobox][aria-disabled=true]{opacity:.5;cursor:not-allowed;border-color:#293329;box-shadow:none}
.pf-select-icon{display:grid;place-items:center;flex:0 0 18px;width:18px;height:18px;color:#a6b59b;line-height:0}
.pf-select-icon svg{display:block;width:18px;height:18px}
.pf-select-value{display:block;flex:1 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.pf-select-chevron{display:block;flex:0 0 15px;width:15px;height:15px;color:#a6b59b;transition:transform .16s ease,color .16s ease}
.pf-select-chevron svg,.pf-select-check svg{display:block;width:100%;height:100%}
.pf-select-trigger[aria-expanded=true] .pf-select-chevron{transform:rotate(180deg);color:var(--pf-control-accent)}
.pf-select-trigger[aria-expanded=true] .pf-select-icon{color:var(--pf-control-accent)}
.pf-select-label{display:block;color:var(--pf-control-muted);font-size:12px;font-weight:600;line-height:1.4}

/* The popup is portalled to the body so rails, forms and heroes cannot clip it. */
.pf-select-menu{position:fixed;z-index:1200;display:flex;flex-direction:column;min-width:0;max-width:calc(100vw - 24px);max-height:360px;max-height:min(360px,calc(100dvh - 24px));overflow:hidden;padding:6px;border:1px solid #35422f;border-radius:14px;background:linear-gradient(150deg,#202a1c,#11190f 65%);color:var(--pf-control-text);box-shadow:0 20px 60px #0009,0 4px 14px #0005,inset 0 1px 0 #ffffff05;transform-origin:50% 0;animation:pf-select-in .14s ease-out}
.pf-select-menu[hidden]{display:none!important}
.pf-select-menu[data-side=top],.pf-select-menu[data-placement^=top]{transform-origin:50% 100%}
.pf-select-menu-header{display:flex;flex:0 0 auto;align-items:center;justify-content:space-between;gap:12px;min-height:40px;padding:6px 10px 10px;margin:0 3px 3px;border-bottom:1px solid #ffffff0a;color:#a9b59f;font:700 10px/1.4 var(--font);letter-spacing:1px;text-transform:uppercase}
.pf-select-menu-header>span:first-child{flex:1;min-width:0;overflow-wrap:anywhere}
.pf-select-count{flex:0 0 auto;padding:3px 7px;border:1px solid #ffffff0a;border-radius:20px;background:#ffffff06;color:#a9b59f;font-size:10px;font-weight:500;letter-spacing:0;text-transform:none;white-space:nowrap}
.pf-select-options{flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;margin:0;padding:2px;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#566747 transparent}
.pf-select-options::-webkit-scrollbar{width:5px}
.pf-select-options::-webkit-scrollbar-track{background:transparent}
.pf-select-options::-webkit-scrollbar-thumb{border-radius:6px;background:#566747}
.pf-select-option[role=option]{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;margin:2px 0;padding:10px 11px;border:1px solid transparent;border-radius:9px;background:transparent;color:#d9dfd8;font:500 14px/1.4 var(--font);text-align:left;white-space:normal;overflow-wrap:anywhere;cursor:pointer;user-select:none;transition:background .12s ease,border-color .12s ease,color .12s ease}
.pf-select-option[role=option][data-active=true],.pf-select-option[role=option]:not([aria-disabled=true]):hover{border-color:#ffffff0c;background:#ffffff09;color:#fff}
.pf-select-option[role=option][aria-selected=true]{border-color:#c5f46b26;background:#c5f46b11;color:var(--pf-control-accent);font-weight:600}
.pf-select-option[role=option][aria-selected=true][data-active=true],.pf-select-option[role=option][aria-selected=true]:hover{border-color:#c5f46b47;background:#c5f46b1b;color:var(--pf-control-accent)}
.pf-select-option[role=option]:focus-visible{outline:2px solid var(--pf-control-accent);outline-offset:-2px}
.pf-select-option[role=option][aria-disabled=true]{opacity:.4;color:#9eab95;cursor:not-allowed;border-color:transparent;background:transparent}
.pf-select-check{display:block;flex:0 0 17px;width:17px;height:17px;margin-left:auto;color:var(--pf-control-accent);opacity:0;visibility:hidden}
.pf-select-option[aria-selected=true] .pf-select-check{opacity:1;visibility:visible}
.pf-select-group{margin:10px 11px 5px;color:#8f9d7e;font:700 10px/1.4 var(--font);letter-spacing:.8px;text-transform:uppercase}
.pf-select-empty{padding:20px 12px;color:var(--pf-control-muted);font-size:13px;line-height:1.5;text-align:center}
@keyframes pf-select-in{from{opacity:0;transform:translateY(-3px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}

/* Let full title text determine the hero height instead of overflowing fixed panels. */
.hero.home-hero,.hero.single-hero{height:auto;max-height:none}
.hero.home-hero{min-height:clamp(660px,48vw,800px)}
.hero.single-hero{min-height:650px}
.hero .hero-content{height:auto;min-height:inherit;gap:18px}
.hero.single-hero .hero-content{width:1000px;padding:calc(var(--header-height) + 40px) var(--gutter) 72px}
.hero .hero-title{max-width:100%;font-size:clamp(38px,5.2vw,82px);line-height:.98;overflow-wrap:anywhere}
.hero.single-hero .hero-title{max-width:780px}
.hero .breadcrumb{max-width:100%;flex-wrap:wrap;row-gap:6px;overflow-wrap:anywhere}
.hero .breadcrumb [aria-current]{min-width:0}
.hero .hero-buttons,.hero .hero-facts{max-width:100%;min-width:0}
.hero .hero-buttons>.button{max-width:100%}
@media(min-width:1750px){.hero.single-hero{min-height:720px}}
@media(max-width:640px){
  .hero.home-hero,.hero.single-hero{min-height:520px}
  .hero .hero-content{gap:15px}
  .hero.home-hero .hero-content{padding:calc(var(--header-height) + 50px) var(--gutter) 74px}
  .hero.single-hero .hero-content{padding:calc(var(--header-height) + 40px) var(--gutter) 42px}
  .hero .hero-title{font-size:clamp(36px,8.2vw,52px);line-height:1.02}
}

/* A preview is a bounded summary; keep actions visible without an inner scrollbar. */
.card-preview{grid-template-rows:minmax(0,1fr);max-width:calc(100vw - 32px)}
.card-preview .card-preview-body{display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto;gap:8px;overflow:hidden;padding:18px}
.card-preview .card-preview-type{line-height:1.4}
.card-preview .card-preview-body h3{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;overflow-wrap:anywhere;min-height:0;margin:0;line-height:1.25}
.card-preview .card-preview-body .meta{min-width:0;margin:0;gap:5px;line-height:1.4}
.card-preview .card-preview-body p{min-height:0;max-height:100%;margin:0;align-self:start;overflow:hidden}
.card-preview .card-preview-actions{min-width:0;gap:10px;margin:0;padding-top:8px;align-self:end}
.card-preview .card-preview-actions .button{flex:1;min-width:0;text-align:center}
.card-preview[data-compact="true"] .card-preview-body{padding:16px;gap:6px}
.card-preview[data-compact="true"] .card-preview-body h3{font-size:17px;-webkit-line-clamp:2}
.card-preview[data-compact="true"] .card-preview-body .meta{font-size:12px}
.card-preview[data-compact="true"] .card-preview-body p{-webkit-line-clamp:2}
.card-preview[data-compact="true"] .card-preview-actions{padding-top:6px}
.card-preview[data-compact="true"] .card-preview-body .button{font-size:13px;padding-inline:12px}

/* Section navigation uses buttons so scrolling does not add a URL fragment. */
button.skip{border:0;border-radius:0;text-align:left}
.tabs-bar button{position:relative;display:block;flex-shrink:0;padding:22px 0;border:0;border-radius:0;background:transparent;font:600 11px/1.6 var(--font);letter-spacing:.08em;color:#7f8a78;white-space:nowrap}
.tabs-bar button.active,.tabs-bar button:hover{color:white}
.tabs-bar button.active::after{position:absolute;content:"";bottom:0;left:0;right:0;height:3px;background:var(--accent)}
@media(max-width:900px){.tabs-bar button{font-size:12px}}
@media(max-width:640px){.tabs-bar button{padding-block:18px;font-size:11px}}

/* Use the full page content width while preserving the video's 16:9 frame. */
.watch-page .watch-shell{width:100%;max-width:none}
.watch-page .video-frame{width:100%;height:auto;min-height:0;max-width:none;max-height:none;aspect-ratio:16/9}
.watch-page .video-frame:fullscreen{width:100vw;height:100vh;aspect-ratio:auto}

/* External players are inserted only after this explicit play action. */
.pf-player-start{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;width:100%;height:100%;margin:0;padding:24px;border:0;border-radius:inherit;background:#000;color:var(--white);text-align:center;overflow:hidden;isolation:isolate}
.pf-player-start::after{position:absolute;inset:0;z-index:1;content:"";background:linear-gradient(180deg,#0003,#0008);pointer-events:none}
.pf-player-poster{position:absolute;inset:0;z-index:0;width:100%;height:100%;object-fit:cover;opacity:.6;transition:transform .3s ease}
.pf-player-play{position:relative;z-index:2;display:grid;place-items:center;flex:0 0 auto;width:84px;height:84px;border:1px solid var(--accent);border-radius:50%;background:var(--accent);color:var(--accent-ink);box-shadow:0 8px 35px #0007;transition:transform .2s ease,background .2s ease}
.pf-player-play svg{width:30px;height:30px;margin-left:3px}
.pf-player-start strong{position:relative;z-index:2;max-width:100%;font-size:clamp(14px,1.6vw,20px);line-height:1.4;overflow-wrap:anywhere;text-shadow:0 2px 12px #000}
.pf-player-start:hover .pf-player-poster{transform:scale(1.025)}
.pf-player-start:hover .pf-player-play{transform:scale(1.04);background:#d6ff87}
.pf-player-start:focus-visible{outline:3px solid var(--accent);outline-offset:-6px}
@media(max-width:640px){
  .pf-player-start{gap:12px;padding:16px}
  .pf-player-play{width:62px;height:62px}
  .pf-player-play svg{width:25px;height:25px}
}
@media(prefers-reduced-motion:reduce){.pf-player-poster,.pf-player-play{transition:none}}

