/* v3.4: Scoped KissKH reference carousel/search. Single-drama, movie and episode
   templates intentionally retain their existing geometry and typography. */
html[data-theme="purple-green"]{--kh-primary:#7b1fa2;--kh-secondary:#4caf50;--kh-on-primary:#fff;--accent:#7b1fa2;--accent-alt:#4caf50}
html[data-theme="deeppurple-amber"]{--kh-primary:#673ab7;--kh-secondary:#ffc107;--kh-on-primary:#fff;--accent:#673ab7;--accent-alt:#ffc107}
html[data-theme="indigo-pink"]{--kh-primary:#3f51b5;--kh-secondary:#e91e63;--kh-on-primary:#fff;--accent:#3f51b5;--accent-alt:#e91e63}
html[data-theme="pink-bluegrey"]{--kh-primary:#c2185b;--kh-secondary:#607d8b;--kh-on-primary:#fff;--accent:#c2185b;--accent-alt:#607d8b}
/* Scope colored controls to existing toolbar, header and new components. */
html[data-theme] .kh-toolbar{background:var(--kh-primary,#303030)!important}
html[data-theme] .kh-toolbar .nav-link.selected,html[data-theme] .kh-toolbar .nav-link:hover{background:color-mix(in srgb,var(--kh-secondary,#4caf50) 30%,transparent)}
/* Exact original content concept: full-bleed 100:30 background and black
   translucent, upper-left title. No artificial overlay or zoom cropping. */
.kh34-hero{position:relative;isolation:isolate;margin:0 0 20px;overflow:hidden;border-radius:0;max-width:none}
.kh34-hero .hero-slides{display:flex;align-items:stretch;transition:transform 420ms cubic-bezier(.23,.8,.3,1);will-change:transform}
.kh34-hero .kh34-slide{box-sizing:border-box;position:relative;display:block;flex:0 0 100%;max-height:none;min-height:0;aspect-ratio:100/30;background-color:#202020;background-size:cover;background-repeat:no-repeat;background-position:center;overflow:hidden}
.kh34-hero .kh34-slide::after{display:none}
.kh34-hero .kh34-slide-content{position:absolute;inset:0;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;padding:8px 10px;pointer-events:none}
.kh34-hero .hero-title{position:static;display:inline-block;width:auto;max-width:min(80%,850px);overflow-wrap:anywhere;margin:0;padding:9px 12px;background:rgba(0,0,0,.42);color:#fff;font-family:Roboto,'Helvetica Neue',Arial,sans-serif;font-size:clamp(15px,1.7vw,23px);font-weight:400;line-height:1.35;text-shadow:0 1px 2px #0007;border:0;border-radius:0}
.kh34-hero .hero-controls{position:absolute;inset:0;z-index:5;pointer-events:none;display:block}
.kh34-hero .hero-controls>button{pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);display:inline-flex;justify-content:center;align-items:center;width:40px;height:40px;padding:0;border:0;border-radius:50%;background:color-mix(in srgb,var(--kh-primary,#7b1fa2) 89%,#111);color:var(--kh-on-primary,#fff);box-shadow:0 2px 9px #0006;cursor:pointer}
.kh34-hero #slide-prev{left:12px;right:auto;bottom:auto}
.kh34-hero #slide-next{right:12px;left:auto;bottom:auto}
.kh34-hero .hero-controls>button .material-icons{font-size:23px}
.kh34-hero .hero-dots{position:absolute;bottom:10px;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:6px;pointer-events:auto}
.kh34-hero .hero-dots button{position:relative;display:block;flex:0 0 auto;height:11px;width:11px;min-width:11px;padding:0;border:0;border-radius:50%;background:#ddd9;box-shadow:0 1px 4px #0009;cursor:pointer}
.kh34-hero .hero-dots button.active{background:var(--kh-secondary,#4caf50);box-shadow:0 0 0 2px #fff9,0 1px 5px #0008}
.kh34-hero .hero-controls button:focus-visible{outline:3px solid var(--kh-secondary,#4caf50);outline-offset:3px}
.kh34-hero .hero-controls>button:hover{filter:brightness(1.16)}
/* Search category switch stays inside the existing modal only. */
.kh34-search-form{display:block;max-width:100%;padding:0;margin:0}
.kh34-search-types{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin:0 0 11px}
.kh34-search-types label{position:relative;display:inline-flex;align-items:center;min-height:36px;margin:0;cursor:pointer}
.kh34-search-types input{position:absolute;inset:0;opacity:0;cursor:pointer}
.kh34-search-types span{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:7px 13px;border-radius:4px;border:1px solid var(--line,#8885);background:var(--surface2,#333);color:var(--fg,#fff);font:500 13px/1.2 Roboto,Arial,sans-serif;white-space:nowrap}
.kh34-search-types input:checked+span{background:var(--kh-primary,#7b1fa2);border-color:var(--kh-primary,#7b1fa2);color:#fff}
.kh34-search-types input:focus-visible+span{outline:3px solid var(--kh-secondary,#4caf50);outline-offset:2px}
.kh34-search-input{display:flex;align-items:center;gap:8px;min-width:0;max-width:100%;padding:3px 0}
.kh34-search-input>.material-icons{flex-shrink:0}
.kh34-search-input>input{flex:1;min-width:0;max-width:100%;height:41px;padding:6px 10px}
.kh34-search-input>.btn{flex-shrink:0;min-height:41px}
.kh34-search-info{display:flex;min-width:0;flex-direction:column;justify-content:center;gap:3px}
.kh34-search-info>span{white-space:normal;overflow-wrap:anywhere}
.kh34-search-kind{font-size:11px;opacity:.8;line-height:1.2}
/* Keep the original content hierarchy on narrow screens, adapt hit targets. */
@media(max-width:767px){
 .kh34-hero{margin-bottom:13px}
 .kh34-hero .kh34-slide{aspect-ratio:16/9!important;min-height:0;max-height:none;background-position:center}
 .kh34-hero .kh34-slide-content{padding:5px 6px}
 .kh34-hero .hero-title{max-width:90%;font-size:clamp(12px,3.6vw,17px);padding:6px 9px;line-height:1.3}
 .kh34-hero .hero-controls>button{width:34px;height:34px;top:51%}
 .kh34-hero #slide-prev{left:5px}.kh34-hero #slide-next{right:5px}
 .kh34-hero .hero-controls>button .material-icons{font-size:20px}
 .kh34-hero .hero-dots{bottom:7px;gap:7px}
 .kh34-hero .hero-dots button{width:9px;min-width:9px;height:9px}
 .kh34-search-types{gap:5px}
 .kh34-search-types span{padding:8px 10px;font-size:12px}
 .kh34-search-input>.btn{padding:8px 10px}
}
@media(max-width:360px){.kh34-hero .hero-title{font-size:12px;max-width:94%}.kh34-search-types span{padding:7px 9px}}
@media(prefers-reduced-motion:reduce){.kh34-hero .hero-slides{transition:none}.kh34-hero .hero-controls>button{transition:none}}
