/* BA-WI · YOUWI — страница просмотра films-view-ID.html (перенос из демо v19.5)
   Все правила внутри .ywv — на другие страницы не влияют. */
.ywv{
  --night:#17131F; --plum:#231C2F; --violet:#8B3DFF; --candle:#F2B45A; --brown:#C98A4B;
  --text:#EFEAF7; --muted:#9A91AC; --sheet:rgba(255,255,255,.035);
  color:var(--text); font-size:15px; line-height:1.4; margin:6px 0 40px;
}
.ywv *,.ywv *::before,.ywv *::after{box-sizing:border-box}
.ywv button{font:inherit;color:inherit;cursor:pointer}
.ywv a{color:inherit;text-decoration:none}
.ywv :focus-visible{outline:2px solid var(--violet);outline-offset:3px}
.ywv svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Сетка: плеер растёт, правая колонка держит ширину */
.ywv-wrap{display:grid;grid-template-columns:minmax(0,1fr) clamp(330px,24vw,410px);column-gap:36px;row-gap:22px}
.ywv-left,.ywv-right{min-width:0}
.ywv-right{display:flex;flex-direction:column}

/* Плеер */
.ywv-stage{position:relative;border-radius:10px;overflow:hidden;background:#000}
.ywv-stage:not(:fullscreen){aspect-ratio:16/9}
.ywv-stage .plyr{--plyr-color-main:var(--violet);--plyr-video-background:#000;border-radius:10px;height:100%}
.ywv-stage:fullscreen{border-radius:0}
.ywv-stage:fullscreen .plyr{border-radius:0}
.ywv-stage iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.ywv-fail{position:absolute;z-index:4;left:0;right:0;bottom:0;padding:12px 16px;background:rgba(15,12,20,.9);font-size:14px;color:var(--muted)}
.ywv-fail[hidden]{display:none}
.ywv-fail a{color:var(--candle);text-decoration:underline}
.ywv-upnext{position:absolute;z-index:5;inset:0;display:flex;align-items:center;justify-content:center;gap:22px;padding:24px;background:rgba(15,12,20,.86);backdrop-filter:blur(4px)}
.ywv-upnext[hidden]{display:none}
.ywv-upnext .uimg{position:relative;width:min(300px,38%);aspect-ratio:16/9;border-radius:8px;overflow:hidden;background:var(--plum)}
.ywv-upnext .uimg img{width:100%;height:100%;object-fit:cover}
.ywv-upnext .ring{position:absolute;inset:auto 0 0 0;height:4px;background:rgba(255,255,255,.2)}
.ywv-upnext .ring i{display:block;height:100%;width:0;background:var(--violet);transition:width 1s linear}
.ywv-upnext small{color:var(--muted);font-size:13px}
.ywv-upnext h4{margin:6px 0 16px;font-size:clamp(16px,1.6vw,22px);font-weight:600;max-width:360px;color:var(--text)}
.ywv-upnext .ubtn{display:flex;gap:10px;flex-wrap:wrap}
.ywv-upnext button{border:0;border-radius:8px;padding:10px 18px;font-weight:600;background:rgba(255,255,255,.14)}
.ywv-upnext button.go{background:var(--violet);color:#fff}
@media (max-width:600px){.ywv-upnext{flex-direction:column;gap:12px}.ywv-upnext .uimg{width:60%}}

/* Пилюли под плеером: «Похожее» и метки ролика */
.ywv-people{display:flex;gap:10px;overflow-x:auto;margin-top:16px;padding-bottom:4px;scrollbar-width:none}
.ywv-people::-webkit-scrollbar{display:none}
.ywv-pill{flex:0 0 auto;height:44px;line-height:44px;padding:0 20px;border-radius:999px;background:#2C2438;font-weight:600}
.ywv-person{flex:0 0 auto;height:44px;display:flex;align-items:center;gap:8px;padding:0 14px 0 6px;border-radius:999px;background:var(--plum);font-size:14px;color:rgba(239,234,247,.85)}
.ywv-person:hover{background:#2F2640;color:var(--text)}
.ywv-person .av{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;font-weight:600;font-size:14px;background:#2F2640;color:#fff}

/* Постеры под плеером: колонок столько, сколько влезает, 2 ряда (считает скрипт) */
.ywv-posters{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:22px 16px;align-content:start;margin-top:22px}
.ywv-card{display:block;min-width:0}
.ywv-poster{position:relative;display:block;aspect-ratio:3/4;border-radius:8px;overflow:hidden;background:var(--plum);outline:1.5px solid transparent;transition:outline-color .2s}
.ywv-poster img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.ywv-card:hover .ywv-poster{outline-color:#fff}
.ywv-badge{position:absolute;right:6px;bottom:6px;font-style:normal;font-size:11px;background:rgba(0,0,0,.6);padding:2px 6px;border-radius:4px}
.ywv-t{display:-webkit-box;margin-top:8px;font-size:14px;line-height:1.35;color:rgba(239,234,247,.85);-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* Правая колонка: верх по высоте плеера, «Дальше» стоит по его нижнему краю */
.ywv-side{position:relative;min-width:0;min-height:var(--stage-h,auto);display:flex;flex-direction:column}
#ywvTabVideo{display:flex;flex-direction:column;flex:1}
#ywvTabVideo[hidden]{display:none}
.ywv-tabs{display:flex;gap:24px;border-bottom:1px solid #2A2236;margin:7px 0 16px}
.ywv-tabs button{background:none;border:0;padding:2px 0 11px;font-size:18px;text-transform:uppercase;letter-spacing:.03em;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px}
.ywv-tabs button.on{color:var(--text);border-color:var(--violet)}
.ywv-tabs small{font-size:inherit;font-weight:400;margin-left:6px;opacity:.7}
.ywv-side h1{font-size:24px;font-weight:600;line-height:1.25;margin:8px 0 10px;color:var(--text)}
.ywv-side h1.dlink{cursor:pointer;transition:color .15s}
.ywv-side h1.dlink:hover{color:#fff}
.ywv-side h1 .chev{color:var(--muted);font-weight:400;margin-left:6px}
.ywv-side h1.dlink:hover .chev{color:var(--brown)}
.ywv-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.ywv-chips .sel{font-size:13px;padding:4px 12px;border-radius:999px;background:#2C2438;color:rgba(239,234,247,.85)}
.ywv-chips .sel:hover{background:#352A47}
.ywv-about{color:var(--muted);line-height:1.6;font-size:14px;margin:0 0 16px}
.ywv-acts{display:flex;gap:12px;margin-bottom:24px}
.ywv-acts button,.ywv-acts a{position:relative;width:44px;height:44px;border-radius:50%;border:0;background:var(--plum);display:grid;place-items:center;padding:0}
.ywv-acts button.on{color:var(--candle)}
.ywv-acts small{position:absolute;right:-4px;top:-4px;min-width:18px;font-size:11px;line-height:18px;padding:0 4px;border-radius:9px;background:#352A47;color:var(--text)}
.ywv-acts small:empty{display:none}
.ywv-toast{position:fixed;z-index:60;left:50%;bottom:28px;transform:translateX(-50%);background:#2C2438;color:var(--text);padding:10px 18px;border-radius:10px;font-size:14px;box-shadow:0 10px 30px rgba(0,0,0,.4)}
.ywv-nextblk{margin-top:auto;background:#1F1A27;border:1px solid #2A2434;border-radius:12px;padding:16px 16px 14px}
.ywv-nextblk h3,.ywv-rel h3{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:18px;font-weight:600;margin:0 0 14px;color:var(--text)}
.ywv-nextblk h3 label{font-size:13px;font-weight:400;color:var(--muted);display:flex;gap:6px;align-items:center;cursor:pointer}
.ywv-nextblk input[type=checkbox]{accent-color:var(--violet)}
/* «Дальше»: квадратные плитки 3 в ряд, название при наведении */
.ywv-tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.ywv-tile{position:relative;display:block;aspect-ratio:1;border:0;padding:0;border-radius:8px;overflow:hidden;background:var(--plum)}
.ywv-tile img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:brightness(.72);transition:filter .3s}
.ywv-tile:hover img,.ywv-tile.cur img,.ywv-tile:focus-visible img{filter:none}
.ywv-tile .n{position:absolute;left:8px;top:5px;font-size:20px;font-weight:600;line-height:1;text-shadow:0 1px 3px rgba(0,0,0,.9),0 0 8px rgba(0,0,0,.6)}
.ywv-tile .mark{position:absolute;right:6px;top:6px;font-size:11px;background:rgba(0,0,0,.55);padding:2px 6px;border-radius:4px}
.ywv-tile.cur .mark{background:var(--violet);color:#fff}
.ywv-tile .tt{position:absolute;left:0;right:0;bottom:0;padding:22px 8px 7px;font-size:12px;line-height:1.3;text-align:left;background:linear-gradient(transparent,rgba(0,0,0,.88));opacity:0;transition:opacity .2s}
.ywv-tile:hover .tt,.ywv-tile:focus-visible .tt{opacity:1}
.ywv-tile.cur{outline:2px solid var(--violet);outline-offset:-2px}
.ywv-tile .eps{position:absolute;left:6px;bottom:6px;font-size:11px;background:rgba(0,0,0,.6);padding:2px 6px;border-radius:4px}
.ywv-tile:hover .eps,.ywv-tile:focus-visible .eps{opacity:0}

/* «Вся подборка» и «Видео по теме»: прилипает к верху, прокрутка внутри */
.ywv-rel{position:sticky;top:12px;height:calc(100vh - 24px);margin-top:16px;display:flex;flex-direction:column;min-width:0}
.ywv-allbtn{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:100%;height:44px;padding:0 12px;border-radius:10px;background:#221C2C;color:var(--muted);font-size:14px;text-align:center}
.ywv-allbtn:hover{background:#2B2437;color:var(--text)}
.ywv-rel h3{margin:34px 0 14px;font-size:18px;font-weight:400;text-transform:uppercase;letter-spacing:.03em;color:rgba(239,234,247,.9)}
.ywv-relbox{position:relative;flex:1;min-height:0}
.ywv-rellist{position:absolute;inset:0;overflow-y:auto;scrollbar-width:none}
.ywv-rellist::-webkit-scrollbar{display:none}
.ywv-q{display:flex;gap:12px;width:100%;padding:6px;border-radius:8px}
.ywv-q:hover{background:rgba(255,255,255,.05)}
.ywv-q img,.ywv-q .ph{flex:0 0 46%;width:46%;aspect-ratio:16/9;object-fit:cover;border-radius:6px;background:var(--plum)}
.ywv-q span{font-size:14px;line-height:1.4}

/* Панель «Подробнее» — поверх правой колонки, видео не останавливается */
.ywv-dpanel{position:absolute;z-index:6;inset:0;display:flex;flex-direction:column;background:var(--night)}
.ywv-dpanel[hidden]{display:none}
.ywv-dpanel .dh{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #2A2236;padding:2px 0 12px;font-size:18px}
.ywv-dpanel .dh button{width:32px;height:32px;border:0;border-radius:50%;background:var(--plum);font-size:18px;line-height:1;display:grid;place-items:center}
.ywv-dpanel .db{flex:1;min-height:0;overflow-y:auto;padding:18px 8px 10px 2px;scrollbar-width:thin;scrollbar-color:#5A4B70 transparent}
.ywv-dpanel .dpost{width:100%;aspect-ratio:16/9;border-radius:8px;overflow:hidden;background:var(--plum);margin-bottom:16px}
.ywv-dpanel .dpost img{width:100%;height:100%;object-fit:cover}
.ywv-dpanel h2{font-size:20px;font-weight:600;line-height:1.3;margin:0 0 6px;color:var(--text)}
.ywv-dpanel .dsub{margin:0 0 6px;color:rgba(239,234,247,.85);font-size:14px}
.ywv-dpanel .dmeta{color:var(--muted);font-size:13px;margin:0 0 14px}
.ywv-dpanel .dtext{font-size:14px;line-height:1.65;color:rgba(239,234,247,.85)}
.ywv-dpanel .dtext p{margin:0 0 12px}
.ywv-dpanel .dtext img{max-width:100%;height:auto;border-radius:6px}
.ywv-dpanel .dtext a{color:var(--candle)}
.ywv-dpanel .dtags{display:flex;flex-wrap:wrap;gap:4px 14px;margin:4px 0 18px}
.ywv-dpanel .dtags a{font-size:14px;color:var(--brown)}
.ywv-dpanel .dtags a:hover{color:#E0A466;text-decoration:underline}
.ywv-dauth{display:flex;gap:10px;align-items:center;font-size:14px;color:var(--muted)}
.ywv-dauth .av{flex:0 0 34px;width:34px;height:34px;border-radius:50%;background:var(--plum);display:grid;place-items:center}
.ywv-dauth .av svg{width:20px;height:20px;stroke:none}
.ywv-dauth a{color:var(--text);text-decoration:underline;text-decoration-color:rgba(239,234,247,.3)}

/* «Обсуждение»: форма сверху, список прокручивается внутри до низа плеера */
.ywv-side.talk{height:var(--stage-h,auto)}
#ywvTabTalk:not([hidden]){display:flex;flex-direction:column;flex:1;min-height:0}
.ywv-tpane{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--sheet);border-radius:10px;padding:14px 12px 4px}
.ywv-tscroll{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#3A3049 transparent;margin-right:-6px;padding-right:6px}
.ywv-cform{margin-bottom:14px}
.ywv-cform .cbox{position:relative}
.ywv-cform textarea{display:block;width:100%;min-height:44px;height:44px;resize:none;overflow:hidden;background:var(--plum);border:0;border-radius:10px;padding:12px 104px 12px 14px;color:var(--text);font:inherit;font-size:14px;line-height:1.45}
.ywv-cform textarea:focus{outline:none;box-shadow:0 0 0 1px var(--violet)}
.ywv-cform .ywv-cname{display:block;width:100%;margin:0 0 8px;background:var(--plum);border:0;border-radius:10px;padding:9px 14px;color:var(--text);font:inherit;font-size:14px}
.ywv-cform .ywv-cname:focus{outline:none;box-shadow:0 0 0 1px var(--violet)}
.ywv-tsend{position:absolute;right:6px;bottom:6px;height:32px;border:0;border-radius:8px;background:var(--violet);color:#fff;padding:0 12px;font-size:13px;font-weight:600;transition:background .15s,color .15s}
.ywv-tsend.idle{background:#2C2438;color:var(--muted);cursor:default}
.ywv-cnote{margin-top:6px;font-size:12px;color:var(--muted)}
.ywv-tempty{color:var(--muted);font-size:14px;line-height:1.55;padding:6px 2px}
.ywv-tempty[hidden]{display:none}
.ywv-tempty b{display:block;color:var(--text);font-weight:600;margin-bottom:2px}
.ywv-tempty a{color:var(--candle)}
/* Штатный вывод комментариев SLAED (шаблон comment.html) в нашем оформлении */
#repcsave .title{display:none}
#repcsave .info{font-size:13px;color:var(--muted);background:none;padding:6px 2px;border:0}
#repcsave .comment{display:flex;gap:10px;padding:12px 2px;border-bottom:1px solid #241D2E}
#repcsave .com-left{flex:0 0 34px}
#repcsave .com-ava .sl_avatar{display:block;width:34px;height:34px;border-radius:50%;background-size:cover;background-position:center;background-color:#2F2640}
#repcsave .fp-user-info{display:none}
#repcsave .com-right{min-width:0;flex:1}
#repcsave .carg{font-size:13px;color:var(--muted);position:relative}
#repcsave .carg b{font-weight:600;color:rgba(239,234,247,.9);cursor:pointer}
#repcsave .dropdown-form{display:none;position:absolute;z-index:3;top:20px;left:0;min-width:180px;background:#211A2C;border-radius:10px;padding:6px;box-shadow:0 14px 40px rgba(0,0,0,.5)}
#repcsave .dropdown-form ul{list-style:none;margin:0;padding:0}
#repcsave .dropdown-form li{padding:4px 8px;font-size:13px}
#repcsave ._com-cont{margin:4px 0 2px;font-size:14px;line-height:1.45;overflow-wrap:anywhere;color:var(--text)}
#repcsave .sl_sig:empty{display:none}
#repcsave .sl_sig{font-size:12px;color:var(--muted);margin-top:4px}
#repcsave .pagenum,#repcsave .sl_pagenum{margin:12px 0;font-size:14px}

@media (max-width:1000px){
  .ywv-wrap{grid-template-columns:1fr}
  .ywv-right{display:block}
  .ywv-side{min-height:0}
  .ywv-side.talk{height:auto}
  .ywv-tscroll{max-height:60vh}
  .ywv-nextblk{margin-top:8px}
  .ywv-rel{position:static;height:auto}
  .ywv-relbox{min-height:0}
  .ywv-rellist{position:static}
}
@media (prefers-reduced-motion:reduce){.ywv-upnext .ring i{transition:none}}

/* ===== v2 ===== */
/* Гость: вместо формы — одна строка */
.ywv-guest{margin:0 0 12px;font-size:13px;color:var(--muted)}
.ywv-guest a{color:var(--brown)}
.ywv-guest a:hover{color:#E0A466}
/* Постер Plyr: до запуска и на паузе закрывает надписи YouTube (название, «ИИ», «Другие видео») */
.ywv-stage .plyr__poster{background-size:cover;background-color:#000}
.ywv-stage .plyr--paused:not(.plyr--loading) .plyr__poster,
.ywv-stage .plyr--stopped .plyr__poster{opacity:1}
.ywv-stage .plyr--paused .plyr__poster::after{content:"";position:absolute;inset:0;background:rgba(15,12,20,.35)}
/* Панель «Вся подборка» — поверх правой колонки, как «选集» у Youku */
.ywv-apanel{position:absolute;z-index:6;inset:0;display:flex;flex-direction:column;background:var(--night)}
.ywv-apanel[hidden]{display:none}
.ywv-apanel .dh{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #2A2236;padding:2px 0 12px;font-size:18px}
.ywv-apanel .dh button{flex:0 0 32px;width:32px;height:32px;border:0;border-radius:50%;background:var(--plum);font-size:18px;line-height:1;display:grid;place-items:center}
.ywv-apanel .db{flex:1;min-height:0;overflow-y:auto;padding:16px 6px 10px 2px;scrollbar-width:thin;scrollbar-color:#5A4B70 transparent}
.ywv-apanel .ah{margin:0 0 10px;font-size:13px;color:var(--muted)}
.ywv-pgrid{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-bottom:18px}
.ywv-pnum{aspect-ratio:1;border:0;border-radius:6px;background:var(--plum);font-size:15px}
.ywv-pnum:hover{background:#2F2640}
.ywv-pnum.on{background:var(--violet);color:#fff}
.ywv-agrid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px 12px}
.ywv-acard{display:block;min-width:0}
.ywv-acard .pic{position:relative;display:block;aspect-ratio:16/9;border-radius:6px;overflow:hidden;background:var(--plum)}
.ywv-acard .pic img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:brightness(.8);transition:filter .2s}
.ywv-acard:hover .pic img,.ywv-acard.cur .pic img{filter:none}
.ywv-acard.cur .pic{outline:2px solid var(--violet);outline-offset:-2px}
.ywv-acard .pic i{position:absolute;right:5px;top:5px;font-style:normal;font-size:11px;background:var(--violet);color:#fff;padding:1px 6px;border-radius:4px}
.ywv-acard .tt{display:-webkit-box;margin-top:6px;font-size:12px;line-height:1.3;color:rgba(239,234,247,.85);-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ywv-apage{display:inline-block;margin:18px 0 4px;font-size:14px;color:var(--brown)}
.ywv-apage:hover{color:#E0A466}
