/* ============================== yoru v41 — ambient glow, loading artwork, Up next ============================== */

/* ambient: the episode's artwork, blurred and dimmed, glowing out from behind the player */
.amb41{position:absolute;z-index:0;pointer-events:none;background:center/cover no-repeat;border-radius:24px;
  filter:blur(70px) saturate(1.7) brightness(1.1);opacity:.7;transform:scale(1.12,1.22);transition:background-image .6s ease,opacity .6s ease}
.watch > div:not(.side) > :not(.amb41){position:relative;z-index:1}
.watch .player{border-radius:20px!important;overflow:hidden;box-shadow:0 30px 70px -30px rgba(0,0,0,.9),0 0 0 1px rgba(255,255,255,.08)!important}
html[data-look="oled"] .amb41{opacity:.6}
body.lights-off .amb41,html.lights .amb41{opacity:0}

/* while the frame loads: the episode still, dimmed, with the spinner on top (the frame paints over all of it) */
.watch .player.art41{background:linear-gradient(rgba(0,0,0,.55),rgba(0,0,0,.55)),var(--ep-art) center/cover no-repeat,#000!important}

/* Up next */
.un41{display:flex;align-items:center;gap:14px;margin:-6px 0 18px;padding:10px 12px 10px 10px;border-radius:18px;color:#fff;text-decoration:none;
  background:rgba(255,255,255,.045);box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);transition:background .2s ease,transform .2s ease}
.un41:hover{background:rgba(255,255,255,.08)}
.un41:active{transform:scale(.99)}
.un41-th{position:relative;flex:none;width:120px;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:#111}
.un41-th img{width:100%;height:100%;object-fit:cover;display:block}
.un41-th i{position:absolute;inset:0;display:grid;place-items:center;background:rgba(0,0,0,.25);color:#fff;opacity:0;transition:opacity .2s}
.un41:hover .un41-th i{opacity:1}
.un41-t{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.un41-t small{font:600 12px var(--sf);letter-spacing:.03em;text-transform:uppercase;color:rgba(255,255,255,.5)}
.un41-t small em{font-style:normal;color:#ff9f0a}
.un41-t b{font:650 16px/1.25 var(--sf);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.un41-go{flex:none;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#000}
@media (max-width:760px){
  .amb41{border-radius:0;filter:blur(40px) saturate(1.4);opacity:.45}
  .watch .player{border-radius:0!important}
  .un41{margin:-4px 0 14px;gap:12px}
  .un41-th{width:96px}
  .un41-t b{font-size:14.5px}
}
@media (prefers-reduced-transparency:reduce){.amb41{display:none}}

/* ---------- phones: header hides on scroll down, tab bar always stays ---------- */
@media (max-width:760px){
  #hdr.hdr{transition:transform .35s cubic-bezier(.2,.8,.2,1),opacity .25s ease!important}
  html.hdr-away #hdr.hdr{transform:translateY(-110%)!important;opacity:0!important;pointer-events:none}
  html body .tabbar,html body .tabbar.hide{transform:none!important;opacity:1!important;pointer-events:auto!important}
  /* Continue watching sits just above the tab bar instead of replacing it */
  html.cw39-on body .tabbar{transform:none!important;opacity:1!important;pointer-events:auto!important}
  .cw39{bottom:calc(86px + env(safe-area-inset-bottom))!important;height:60px!important}
  .cw39-go{width:42px!important;height:42px!important}
}

/* ---------- phone header: logo left, actions pinned right, even sizes ---------- */
@media (max-width:760px){
  #hdr.hdr{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;padding:0 14px!important;height:62px!important}
  #hdr .brand{flex:none}
  #hdr .hr{margin-left:auto!important;display:flex!important;align-items:center!important;gap:8px!important;flex:none}
  #hdr .hr .ib{width:40px!important;height:40px!important;min-width:40px!important;padding:0!important;display:grid!important;place-items:center!important;border-radius:50%!important}
  #hdr .hr .ib svg{width:19px!important;height:19px!important}
  #hdr .hr .btn{height:40px!important;padding:0 14px!important;border-radius:999px!important;font:650 14.5px var(--sf)!important;gap:6px!important;white-space:nowrap}
  #hdr .hr .btn svg{width:15px;height:15px}
  #hdr .nbadge{top:-3px!important;right:-3px!important}
  #hdr .hr #hChat,#hdr .hr #hSet{display:none!important}
}
@media (max-width:360px){#hdr .hr{gap:6px!important}#hdr .hr .btn{padding:0 11px!important;font-size:13.5px!important}#hdr svg.lg38{height:26px}}

/* ---------- phone menu: truly full screen, above everything ---------- */
@media (max-width:760px){
  html body .sheet{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-height:none!important;margin:0!important;z-index:500!important;
    border-radius:0!important;padding:calc(14px + env(safe-area-inset-top)) 0 calc(20px + env(safe-area-inset-bottom))!important;overflow-y:auto!important;overscroll-behavior:contain;
    background:rgba(8,8,10,.9)!important;-webkit-backdrop-filter:blur(30px) saturate(1.5)!important;backdrop-filter:blur(30px) saturate(1.5)!important;display:flex!important;flex-direction:column}
  html body .sheet[hidden]{display:none!important}
  html body .sheet .row{padding:0 16px!important;min-height:52px}
  html body .sheet nav{margin:14px 16px 0!important}
}
