
:root {
  --bg: #08080b;
  --raised: #212121;
  --chip: #272727;
  --chip-hover: #3f3f3f;
  --line: #3f3f3f;
  --text: #f1f1f1;
  --text2: #aaaaaa;
  --red: #ff0033;
  --blue: #3ea6ff;
  /* Space the floating top bar (shell.css) keeps clear above the page. */
  --mh: calc(var(--tb-h) + var(--tb-gap) * 2);
  --guide: 240px;
  --mini: 76px;
  --r: 12px;
  --gold: #e3b955;
  --gold2: #c8962e;
  --ink: #070707;
  --cream: #f4efe4;
  --font: var(--sh-font);
}

* { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.4 var(--font); -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
body.noscroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
img.broken { visibility: hidden; }
input { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #4a4a4a; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
.muted { color: var(--text2); }
.i { flex: none; }

/* ---------- buttons & fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 18px; border-radius: 20px; font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .15s, transform .1s; user-select: none; }
.btn:active { transform: scale(.97); }
.btn.big { height: 48px; padding: 0 24px; border-radius: 24px; font-size: 16px; }
.btn-light { background: #f1f1f1; color: #0f0f0f; }
.btn-light:hover { background: #d9d9d9; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #e6002e; }
.btn-danger { background: #c62828; color: #fff; }
.btn-glass { background: rgba(255, 255, 255, .14); color: #fff; }
.btn-glass:hover { background: rgba(255, 255, 255, .24); }
.btn.pill { background: var(--chip); color: var(--text); padding: 0 16px; }
.btn.pill:hover { background: var(--chip-hover); }
.sub-btn { background: #f1f1f1; color: #0f0f0f; }
.sub-btn:hover { background: #d9d9d9; }
.sub-btn.subscribed { background: var(--chip); color: var(--text); }
.sub-btn.subscribed:hover { background: var(--chip-hover); }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.icon-btn:hover { background: rgba(255, 255, 255, .1); }
.icon-btn:active { background: rgba(255, 255, 255, .2); }
.btn-text { color: var(--blue); font-weight: 500; font-size: 14px; padding: 8px 12px; border-radius: 18px; }
.btn-text:hover { background: rgba(62, 166, 255, .15); }
.btn-row { display: flex; align-items: center; gap: 16px; width: 100%; padding: 12px 16px; border-radius: 10px; font-size: 14px; text-align: left; }
.btn-row:hover { background: var(--chip); }
.field { width: 100%; height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid #303030; background: #121212; color: var(--text); font-size: 16px; outline: none; }
.field:focus { border-color: #1c62b9; }
.status { padding: 48px 24px; color: var(--text2); text-align: center; font-size: 16px; }
.status.bad { color: #ff8a80; }
.boot { position: fixed; inset: 0; display: grid; place-items: center; }

.spinner { width: 40px; height: 40px; margin: 48px auto; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--text); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton-line { height: 16px; border-radius: 4px; background: var(--chip); margin: 10px 0; animation: pulse 1.4s ease-in-out infinite; }
.w80 { width: 80%; } .w60 { width: 60%; } .w50 { width: 50%; } .w30 { width: 30%; }
@keyframes pulse { 50% { opacity: .5; } }
.sentinel { height: 1px; }

.toast { position: fixed; left: 24px; bottom: 24px; z-index: 300; max-width: min(560px, calc(100vw - 48px)); padding: 14px 20px; border-radius: 8px; background: #f1f1f1; color: #0f0f0f; font-size: 15px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); transform: translateY(140%); opacity: 0; transition: transform .25s, opacity .25s; pointer-events: none; }
.toast.show { transform: none; opacity: 1; }

.menu-scrim { position: fixed; inset: 0; z-index: 250; }
.menu { position: fixed; min-width: 260px; max-width: 360px; padding: 8px 0; background: #282828; border-radius: 12px; box-shadow: 0 8px 32px rgba(0, 0, 0, .6); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.menu-item { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 48px; padding: 0 20px 0 16px; text-align: left; font-size: 15px; }
.menu-item:hover, .menu-item:active { background: #3e3e3e; }
.modal-scrim { position: fixed; inset: 0; z-index: 260; background: rgba(0, 0, 0, .6); display: grid; place-items: center; padding: 16px; }
.modal { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #212121; border-radius: 12px; padding: 8px 20px 20px; box-shadow: 0 16px 48px rgba(0, 0, 0, .6); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin: 0 -8px 8px 0; }
.modal-head h2 { font-size: 18px; font-weight: 500; }
.save-list { display: flex; flex-direction: column; }
.save-row { display: flex; align-items: center; gap: 16px; min-height: 48px; font-size: 16px; cursor: pointer; }
.save-row input { width: 22px; height: 22px; accent-color: var(--text); }
.save-newhead { display: flex; align-items: center; gap: 12px; margin: 12px 0 8px; font-size: 15px; color: var(--text2); }
.save-new { display: flex; gap: 8px; }
.ask { display: flex; flex-direction: column; gap: 16px; }
.ask-btns { display: flex; justify-content: flex-end; gap: 8px; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 40px 24px 64px; }
.empty-art { width: min(340px, 70vw); mix-blend-mode: lighten; opacity: .95; }
.empty h2 { font-size: 22px; font-weight: 500; }
.empty p { color: var(--text2); font-size: 15px; max-width: 460px; }

/* ---------- avatar ---------- */
.avatar { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; background: #5a3d8a; color: #fff; font-weight: 500; line-height: 1; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- top bar search (the bar itself is in shell.css) ---------- */
.searchbox { display: flex; align-items: center; width: min(420px, 32vw); }
.sb-field { position: relative; flex: 1; display: flex; align-items: center; height: 46px; padding: 0 4px 0 18px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--sh-line); transition: border-color .15s, background .15s; }
.sb-field:focus-within { border-color: rgba(160, 146, 255, .7); background: rgba(139, 123, 255, .08); }
.sb-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-size: 15px; }
.sb-field input::placeholder { color: var(--sh-faint); }
.sb-field input::-webkit-search-cancel-button { display: none; }
.sb-clear { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; }
.sb-clear:hover { background: rgba(255, 255, 255, .1); }
.sb-btn { width: 46px; height: 46px; flex: none; margin-left: 6px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .07); border: 1px solid var(--sh-line); }
.sb-btn:hover { background: rgba(255, 255, 255, .14); }
.suggest { position: absolute; z-index: 110; left: -1px; right: -1px; top: calc(100% + 8px); margin: 0; padding: 10px 0; list-style: none; background: rgba(18, 18, 24, .97); border: 1px solid var(--sh-line); border-radius: 18px; box-shadow: 0 18px 44px rgba(0, 0, 0, .6); }
.sg { display: flex; align-items: center; gap: 14px; padding: 0 18px; height: 42px; font-size: 15px; font-weight: 500; cursor: pointer; }
.sg span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg:hover, .sg.on { background: rgba(255, 255, 255, .07); }
.tb-cine-search { display: none; }
body[data-mode="cine"] .tb-cine-search { display: grid; }
body[data-mode="cine"] .searchbox, body[data-mode="cine"] .tb-guide { display: none; }
body[data-mode="cine-watch"] .topbar, body[data-mode="cine-watch"] .subnav { display: none; }

/* ---------- guide ---------- */
.guide { position: fixed; z-index: 90; top: var(--mh); bottom: 0; left: 0; width: var(--guide); overflow-y: auto; padding: 4px 12px 12px; background: var(--bg); scrollbar-width: thin; }
.g-section { padding: 12px 0; border-bottom: 1px solid var(--line); }
.g-section:first-of-type { padding-top: 0; }
.g-head { display: flex; align-items: center; gap: 8px; padding: 6px 12px 4px; font-size: 16px; font-weight: 500; }
.g-item { display: flex; align-items: center; gap: 24px; height: 44px; padding: 0 12px; border-radius: 10px; font-size: 14px; }
.g-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-item:hover { background: var(--chip); }
.g-item.on { background: var(--chip); font-weight: 500; }
.g-sub { gap: 20px; }
.g-foot { padding: 16px 12px; color: #717171; font-size: 12px; }
.g-mini { display: none; }
.gm-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 0 14px; border-radius: 10px; font-size: 10px; }
.gm-item:hover, .gm-item.on { background: var(--chip); }
.guide-scrim { display: none; }
body[data-guide="mini"] .guide { width: var(--mini); padding: 4px; }
body[data-guide="mini"] .guide > :not(.g-mini) { display: none; }
body[data-guide="mini"] .g-mini { display: block; }
body[data-guide="hidden"] .guide { display: none; }
body[data-guide="drawer-open"] .guide { top: 0; z-index: 210; width: 260px; padding-top: calc(var(--mh) + 12px); box-shadow: 8px 0 24px rgba(0, 0, 0, .5); }
body[data-guide="drawer-open"] .guide-scrim { display: block; position: fixed; inset: 0; z-index: 205; background: rgba(0, 0, 0, .5); }
body[data-guide="drawer-open"] .topbar { z-index: 220; }

.view { padding-top: var(--mh); min-height: 100vh; }
body[data-guide="full"] .view { margin-left: var(--guide); }
body[data-guide="mini"] .view { margin-left: var(--mini); }

/* ---------- chips ---------- */
.chips { position: sticky; top: var(--mh); z-index: 50; display: flex; gap: 10px; padding: 12px 24px; background: var(--bg); overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 40px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--sh-line); font-size: 14px; font-weight: 600; white-space: nowrap; }
.chip:hover { background: rgba(255, 255, 255, .12); }
.chip.on { background: #fff; color: #08080b; border-color: #fff; }

/* ---------- video grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 40px 16px; padding: 12px 24px 48px; }
.vcard { display: flex; flex-direction: column; min-width: 0; }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: #222; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.vcard:hover .thumb img { transform: scale(1.02); }
.badge { position: absolute; right: 8px; bottom: 8px; padding: 2px 5px; border-radius: 4px; background: rgba(0, 0, 0, .82); color: #fff; font-size: 12px; font-weight: 500; line-height: 16px; }
.badge.live { background: var(--red); }
.badge.cine { left: 8px; right: auto; background: rgba(139, 123, 255, .92); color: #fff; }
.badge.pl { display: inline-flex; align-items: center; gap: 4px; }
.thumb .progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .35); }
.thumb .progress i { display: block; height: 100%; background: var(--red); }
.thumb.stack { box-shadow: 0 -6px 0 -2px #3a3a3a, 0 -12px 0 -5px #2a2a2a; margin-top: 12px; }
.thumb-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #717171; }
.vmeta { display: flex; gap: 12px; margin-top: 12px; align-items: flex-start; }
.vavatar { flex: none; }
.vtext { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.vtitle { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 16px; line-height: 22px; font-weight: 500; margin-bottom: 4px; }
.vline { color: var(--text2); font-size: 14px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.vline:hover { color: var(--text); }
.vline.link { color: var(--text2); font-weight: 500; }
.vcard .more { opacity: 0; margin: -6px -10px 0 0; }
.vcard:hover .more, .vcard .more:focus { opacity: 1; }
.vcard.skel .thumb { animation: pulse 1.4s infinite; }
.pcard .vtext { margin-top: 12px; }

.shelf { padding: 16px 24px 8px; }
.shelf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.shelf-head h2 { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; }
.shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: 300px; gap: 16px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; scrollbar-width: none; }
.shelf-row::-webkit-scrollbar, .subs-row::-webkit-scrollbar, .cast-row::-webkit-scrollbar { display: none; }
.subs-row { scrollbar-width: none; }
.shelf-row > * { scroll-snap-align: start; }
.shelf-row .vcard .vtext { margin-top: 10px; }
.page-title { font-size: 32px; font-weight: 700; padding: 24px 24px 8px; }
.section-title { font-size: 20px; font-weight: 700; padding: 16px 24px 0; }
.subs-row { display: flex; gap: 24px; overflow-x: auto; padding: 4px 0 12px; }
.subs-row.top { padding: 20px 24px 8px; }
.sub-tile { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 108px; flex: none; text-align: center; font-size: 13px; }
.sub-tile span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.sub-tile.small { width: 80px; }

/* ---------- search results ---------- */
.results-page { max-width: 1280px; margin: 0 auto; }
.results-page .chips { padding-left: 24px; }
.results { display: flex; flex-direction: column; gap: 16px; padding: 8px 24px 48px; }
.rrow { display: grid; grid-template-columns: minmax(240px, 400px) minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.rrow > .thumb { width: 100%; }
.rtext { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-top: 2px; }
.rtitle { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 18px; line-height: 26px; font-weight: 400; }
.rline { color: var(--text2); font-size: 13px; }
.rline a:hover { color: var(--text); }
.rchan { display: inline-flex; align-items: center; gap: 8px; color: var(--text2); font-size: 13px; padding: 6px 0; }
.rchan:hover { color: var(--text); }
.rdesc { color: var(--text2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rchannel { align-items: center; }
.rchan-av { display: grid; place-items: center; }
.rchannel .rtitle { font-size: 18px; }
.rchannel .sub-btn { align-self: center; }

/* ---------- watch page ---------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 402px; grid-template-rows: auto 1fr; grid-template-areas: "stage side" "info side"; gap: 0 24px; max-width: 1760px; margin: 0 auto; padding: 24px; }
.w-stagewrap { grid-area: stage; }
.w-cols { display: contents; }
.w-primary { grid-area: info; min-width: 0; }
.w-side { grid-area: side; min-width: 0; }
.watch .ps { border-radius: var(--r); max-height: calc(100vh - var(--mh) - 140px); }
.watch.theater { padding-top: 0; }
.watch.theater { grid-template-areas: "stage stage" "info side"; }
.watch.theater .w-stagewrap { margin: 0 -24px 0; background: #000; }
.watch.theater .ps { border-radius: 0; max-height: calc(100vh - var(--mh) - 110px); margin: 0 auto; }
.watch.theater .w-side { padding-top: 24px; }
.w-info { padding: 12px 0 24px; }
.w-title { font-size: 20px; line-height: 28px; font-weight: 700; margin: 4px 0 12px; }
.w-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.w-owner { display: flex; align-items: center; gap: 12px; min-width: 0; }
.w-ownmeta { display: flex; flex-direction: column; min-width: 0; margin-right: 12px; }
.w-chan { font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.w-subs { color: var(--text2); font-size: 12px; }
.w-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.desc { margin-top: 12px; padding: 12px; border-radius: var(--r); background: var(--chip); font-size: 14px; cursor: pointer; }
.desc:hover { background: var(--chip-hover); }
.desc.open { cursor: default; }
.desc.open:hover { background: var(--chip); }
.desc-head { font-weight: 500; margin-bottom: 4px; }
.desc-text { white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.desc.open .desc-text { display: block; }
.desc-more { font-weight: 500; margin-top: 4px; }
.upnext-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.upnext-head h3 { font-size: 16px; font-weight: 500; }
.related { display: flex; flex-direction: column; gap: 8px; }
.compact { position: relative; display: grid; grid-template-columns: 168px minmax(0, 1fr) auto; gap: 8px; padding: 2px; border-radius: 10px; }
.compact .thumb { border-radius: 8px; }
.compact .badge { right: 4px; bottom: 4px; }
.compact-meta h3 { font-size: 14px; line-height: 20px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }
.compact-meta p { color: var(--text2); font-size: 12px; line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact .more { opacity: 0; width: 36px; height: 36px; }
.compact:hover .more { opacity: 1; }
.compact.active { background: rgba(255, 255, 255, .1); }
.compact-idx { position: absolute; left: -22px; top: 30px; width: 20px; text-align: center; color: var(--text2); font-size: 12px; }
.queue { border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 20px; overflow: hidden; }
.queue-head { padding: 12px 16px; background: var(--raised); }
.queue-head h3 { font-size: 18px; font-weight: 700; }
.queue-head p { color: var(--text2); font-size: 12px; margin-top: 4px; }
.queue-list { max-height: 420px; overflow-y: auto; padding: 8px 8px 8px 30px; display: flex; flex-direction: column; gap: 6px; }
.queue-list .compact { grid-template-columns: 120px minmax(0, 1fr) auto; }

/* ---------- player ---------- */
.ps { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; user-select: none; -webkit-user-select: none; outline: none; touch-action: manipulation; }
.ps-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ps-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ps-tap { position: absolute; inset: 0; z-index: 2; }
.ps-shade { position: absolute; left: 0; right: 0; bottom: 0; height: 160px; z-index: 3; pointer-events: none; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); opacity: 0; transition: opacity .25s; }
.ps-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; padding: 0 12px 4px; opacity: 0; transition: opacity .25s; }
.ps-top { position: absolute; left: 0; right: 0; top: 0; z-index: 5; display: none; align-items: center; gap: 8px; padding: 12px 16px 40px; background: linear-gradient(rgba(0, 0, 0, .7), transparent); opacity: 0; transition: opacity .25s; }
.ps.show-ui .ps-shade, .ps.show-ui .ps-bottom, .ps.show-ui .ps-top { opacity: 1; }
.ps:not(.show-ui) .ps-bottom, .ps:not(.show-ui) .ps-top { pointer-events: none; }
.ps.is-fs .ps-top, .ps-cine .ps-top { display: flex; }
.ps-titles { min-width: 0; }
.ps-title { font-size: 20px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.ps-sub { color: rgba(255, 255, 255, .8); font-size: 14px; margin-top: 2px; }
.ps-progress { position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.ps-track { position: relative; width: 100%; height: 3px; background: rgba(255, 255, 255, .25); transition: height .1s; }
.ps-progress:hover .ps-track, .ps.scrubbing .ps-track, .ps.show-ui .ps-track { height: 5px; }
.ps-buf { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255, 255, 255, .45); }
.ps-played { position: absolute; left: 0; top: 0; bottom: 0; background: var(--red); }
.ps-scrub { position: absolute; top: 50%; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; border-radius: 50%; background: var(--red); transform: scale(0); transition: transform .1s; }
.ps-progress:hover .ps-scrub, .ps.scrubbing .ps-scrub, .ps.show-ui .ps-scrub { transform: scale(1); }
.ps.scrubbing .ps-scrub { transform: scale(1.3); }
.ps-tip { position: absolute; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 8px; border-radius: 4px; background: rgba(28, 28, 28, .9); font-size: 13px; font-weight: 500; opacity: 0; pointer-events: none; white-space: nowrap; }
.ps-tip b { font-weight: 500; font-size: 12px; color: #ddd; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.ps-progress:hover .ps-tip, .ps.scrubbing .ps-tip { opacity: 1; }
.ps-row { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.ps-left, .ps-right { display: flex; align-items: center; min-width: 0; }
.ps-btn { width: 52px; height: 52px; display: grid; place-items: center; color: #fff; opacity: .92; border-radius: 50%; }
.ps-btn:hover { opacity: 1; }
.ps-btn:active { background: rgba(255, 255, 255, .15); }
.ps-volwrap { display: flex; align-items: center; }
.ps-vol { width: 0; opacity: 0; transition: width .2s, opacity .2s; accent-color: #fff; height: 4px; }
.ps-volwrap:hover .ps-vol, .ps-vol:focus { width: 72px; opacity: 1; margin-right: 8px; }
.ps-time { font-size: 14px; color: #ddd; margin-left: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ps-nextlabel { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 20px; background: rgba(255, 255, 255, .16); font-weight: 500; margin-right: 6px; }
.ps-auto { width: 64px; }
.ps-auto-track { position: relative; width: 36px; height: 14px; border-radius: 7px; background: rgba(255, 255, 255, .3); }
.ps-auto-knob { position: absolute; top: -3px; left: -2px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #717171; color: #000; transition: left .15s, background .15s; }
.ps-auto[aria-checked="true"] .ps-auto-knob { left: 18px; background: #fff; }
.ps-big { position: absolute; z-index: 6; left: 50%; top: 50%; width: 76px; height: 54px; margin: -27px 0 0 -38px; border-radius: 16px; background: var(--red); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 16px rgba(0, 0, 0, .4); }
.ps.started .ps-big { display: none; }
.ps-center { position: absolute; z-index: 4; inset: 0; display: none; align-items: center; justify-content: center; gap: 56px; pointer-events: none; }
.ps-cbtn { pointer-events: auto; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; }
.ps-cbtn.ps-cplay { width: 92px; height: 92px; }
.ps-spin { position: absolute; z-index: 4; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .2); border-top-color: #fff; animation: spin .9s linear infinite; display: none; pointer-events: none; }
.ps.started[data-state="loading"] .ps-spin, .ps[data-state="buffering"] .ps-spin { display: block; }
.ps-ripple { position: absolute; z-index: 3; top: 0; bottom: 0; width: 38%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); opacity: 0; pointer-events: none; transition: opacity .3s; }
.ps-ripple.left { left: 0; border-radius: 0 50% 50% 0 / 0 50% 50% 0; }
.ps-ripple.right { right: 0; border-radius: 50% 0 0 50% / 50% 0 0 50%; }
.ps-ripple.on { opacity: 1; }
.ps-ripple-in { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.ps-pill { position: absolute; z-index: 6; top: 18px; left: 50%; transform: translateX(-50%); display: none; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 18px; background: rgba(0, 0, 0, .6); font-size: 15px; }
.ps.holding .ps-pill { display: flex; }
.ps-panel { position: absolute; z-index: 8; right: 12px; bottom: 76px; width: 300px; max-height: calc(100% - 90px); overflow-y: auto; padding: 8px 0; border-radius: 12px; background: rgba(28, 28, 28, .94); }
.ps-mi { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 44px; padding: 0 14px; font-size: 15px; text-align: left; }
.ps-mi:hover { background: rgba(255, 255, 255, .1); }
.ps-mi span { flex: 1; }
.ps-mi b { font-weight: 400; color: #ddd; }
.ps-mhead { border-bottom: 1px solid rgba(255, 255, 255, .2); margin-bottom: 6px; font-weight: 500; }
.ps-noicon { width: 24px; display: inline-block; }
.ps-error { position: absolute; z-index: 9; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: rgba(0, 0, 0, .8); text-align: center; padding: 24px; }
.ps-error-msg { font-size: 18px; max-width: 520px; }
.ps-endslot { position: absolute; z-index: 9; right: 24px; bottom: 90px; }
.endcard { width: 380px; padding: 16px; border-radius: 12px; background: rgba(20, 20, 20, .92); box-shadow: 0 8px 32px rgba(0, 0, 0, .6); }
.ec-label { color: var(--text2); font-size: 14px; margin-bottom: 10px; }
.ec-body { display: flex; gap: 12px; align-items: center; }
.ec-art { width: 140px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex: none; }
.ec-title { font-weight: 500; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ec-sub { color: var(--text2); font-size: 13px; margin-top: 4px; }
.ec-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.ec-ring { display: none; }
.ps.is-fs { max-height: none !important; border-radius: 0 !important; }
.ps.fake-fs { position: fixed !important; inset: 0; z-index: 400; aspect-ratio: auto; max-height: none !important; border-radius: 0 !important; }
body.touch .ps.show-ui .ps-center { display: flex; }
body.touch .ps:not(.started) .ps-center { display: none; }
body.touch .ps-volwrap .ps-vol { display: none; }
body.touch .vcard .more, body.touch .compact .more { opacity: 1; }

/* ---------- channel ---------- */
.channel { max-width: 1284px; margin: 0 auto; padding: 0 24px 48px; }
.ch-banner { margin-top: 12px; aspect-ratio: 6.2 / 1; border-radius: 16px; overflow: hidden; background: #222; }
.ch-banner img { width: 100%; height: 100%; object-fit: cover; }
.ch-head { display: flex; align-items: center; gap: 24px; padding: 24px 0 8px; }
.ch-meta { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ch-meta h1 { font-size: 36px; font-weight: 700; line-height: 1.2; }
.ch-line { color: var(--text2); font-size: 14px; }
.ch-line b { color: var(--text); font-weight: 500; }
.ch-desc { color: var(--text2); font-size: 14px; max-width: 760px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-actions { margin-top: 6px; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin: 8px 0 12px; }
.tab { height: 48px; font-size: 16px; font-weight: 500; color: var(--text2); border-bottom: 2px solid transparent; }
.tab.on { color: var(--text); border-bottom-color: var(--text); }
.channel .grid { padding: 12px 0 0; }

/* ---------- playlists ---------- */
.pl-page { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 24px; padding: 24px; max-width: 1400px; margin: 0 auto; align-items: start; }
.pl-hero { position: sticky; top: calc(var(--mh) + 24px); border-radius: 16px; overflow: hidden; background: #3a2a2a; min-height: calc(100vh - var(--mh) - 48px); }
.pl-hero::before { content: ''; position: absolute; inset: -40px; background: var(--art, none) center / cover; filter: blur(48px) saturate(1.4) brightness(.6); }
.pl-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, .1), rgba(15, 15, 15, .85)); }
.pl-hero-in { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; padding: 24px; }
.pl-art { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #222; }
.pl-art img { width: 100%; height: 100%; object-fit: cover; }
.pl-art.empty { display: grid; place-items: center; color: #aaa; }
.pl-hero h1 { font-size: 28px; font-weight: 700; line-height: 1.25; margin-top: 8px; }
.pl-owner { font-weight: 500; }
.pl-count { color: rgba(255, 255, 255, .7); }
.pl-btns { display: flex; gap: 8px; margin-top: 8px; }
.pl-btns .btn { flex: 1; }
.pl-actions { display: flex; gap: 8px; }
.pl-list { display: flex; flex-direction: column; gap: 4px; }
.pl-row { display: grid; grid-template-columns: 28px 200px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; }
.pl-row:hover { background: rgba(255, 255, 255, .06); }
.pl-idx { color: var(--text2); text-align: center; }
.pl-row .thumb { border-radius: 8px; }
.pl-text { display: flex; flex-direction: column; min-width: 0; }

/* ---------- history / you ---------- */
.history { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; max-width: 1280px; margin: 0 auto; }
.h-main .chips { padding-left: 24px; }
.hgroup { padding: 8px 24px 16px; }
.hgroup h3 { font-size: 20px; font-weight: 700; margin: 12px 0 16px; }
.hrow { grid-template-columns: 246px minmax(0, 1fr) auto; margin-bottom: 16px; }
.h-side { padding: 96px 24px 0 0; }
.you { max-width: 1400px; margin: 0 auto; padding-bottom: 48px; }

/* ---------- login ---------- */
.login { position: fixed; inset: 0; display: flex; align-items: center; padding: 6vw; background: #000 url('/assets/gen/login-bg.jpg') center / cover no-repeat; }
.login::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, .3)); }
.login-card { position: relative; width: min(420px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 36px; border-radius: 20px; background: rgba(18, 18, 18, .82); border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 24px 64px rgba(0, 0, 0, .6); }
.login-brand { display: flex; align-items: center; gap: 12px; font-size: 32px; font-weight: 700; letter-spacing: -1px; }
.login-brand img { border-radius: 14px; }
.login-sub { color: var(--text2); margin-bottom: 16px; font-size: 15px; }
.login label { font-size: 13px; color: var(--text2); }
.login .btn { margin-top: 8px; }
.err { color: #ff8a80; min-height: 20px; }

/* ================= Movies & TV ================= */
body[data-mode="cine"] { background: var(--sh-bg); color: var(--sh-text); --cg: 48px; }
body[data-mode="cine"] .view, body[data-mode="cine-watch"] .view { padding-top: 0; }
body[data-mode="cine-watch"] { background: #000; }
.subnav { display: none; }
body[data-mode="cine"] .subnav { position: absolute; z-index: 60; top: calc(var(--mh) + 4px); left: var(--cg); display: flex; gap: 6px; font-family: var(--sh-font); }
.subnav a { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 999px; color: var(--sh-dim); font-size: 14px; font-weight: 600; background: rgba(5, 5, 7, .28); border: 1px solid transparent; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.subnav a:hover { color: #fff; }
.subnav a.on { color: #fff; background: rgba(255, 255, 255, .1); border-color: var(--sh-line2); }

.cbtn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 56px; padding: 0 28px; border-radius: 14px; font-size: 17px; font-weight: 700; letter-spacing: -.1px; white-space: nowrap; transition: transform .12s, filter .15s, background .15s, box-shadow .2s; }
.cbtn:active { transform: scale(.97); }
.cbtn.big { height: 62px; padding: 0 34px; font-size: 19px; }
.cbtn small { display: block; font-size: 12px; font-weight: 500; opacity: .8; margin-top: 1px; }
.cbtn span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.cbtn-primary { background: var(--sh-grad); color: #fff; box-shadow: 0 12px 32px -10px rgba(176, 108, 240, .7); }
.cbtn-primary:hover { filter: brightness(1.08); }
.cbtn-glass { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.cbtn-glass:hover { background: rgba(255, 255, 255, .16); }
.cbtn.round { width: 56px; padding: 0; border-radius: 50%; }

.cine-home { min-height: 100vh; }
.hero { position: relative; height: min(86vh, 920px); min-height: 560px; overflow: hidden; background: #000; touch-action: pan-y; }
.hero.skeleton { animation: pulse 1.6s infinite; background: #0d0d12; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s; }
.hero-slide.in { opacity: 1; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transform: scale(1.04); animation: kenburns 20s ease-out forwards; }
@keyframes kenburns { to { transform: scale(1.1); } }
.hero-video, .tp-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.1s ease; background: transparent; pointer-events: none; }
.hero-video.on, .tp-video.on { opacity: 1; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 5, 7, .9) 0%, rgba(5, 5, 7, .55) 32%, rgba(5, 5, 7, 0) 62%), linear-gradient(0deg, var(--sh-bg) 0%, rgba(5, 5, 7, 0) 36%), linear-gradient(180deg, rgba(5, 5, 7, .55) 0%, rgba(5, 5, 7, 0) 24%); }
.hero-copy { position: absolute; z-index: 2; left: var(--cg); bottom: 19%; width: min(720px, 56%); display: flex; flex-direction: column; gap: 16px; }
.hero-kicker { font-size: 12px; font-weight: 700; letter-spacing: 2.6px; text-transform: uppercase; color: var(--sh-dim); }
.hero-title { font-size: clamp(46px, 6.2vw, 104px); line-height: .9; font-weight: 900; letter-spacing: -.04em; text-transform: uppercase; text-wrap: balance; text-shadow: 0 8px 36px rgba(0, 0, 0, .45); }
.hero-meta, .tp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--sh-dim); font-size: 15px; font-weight: 500; }
.hero-meta .sep, .tp-meta .sep { width: 1px; height: 14px; background: rgba(255, 255, 255, .28); }
.hero-rate, .tp-rate { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 700; }
.hero-rate .i, .tp-rate .i { color: var(--sh-amber); }
.hero-ov { font-size: 18px; line-height: 1.5; color: rgba(245, 243, 239, .86); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 600px; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero-tools { position: absolute; z-index: 3; right: var(--cg); bottom: 19%; display: flex; align-items: center; gap: 10px; }
.htool { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; min-width: 52px; padding: 0 18px; border-radius: 999px; color: #fff; font-size: 14px; font-weight: 600; background: rgba(8, 8, 12, .42); border: 1px solid rgba(255, 255, 255, .24); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.htool:not(.tag):hover { background: rgba(255, 255, 255, .14); }
.htool.icon { padding: 0; }
.htool.tag { pointer-events: none; }
.hero-dots { position: absolute; z-index: 3; left: 50%; bottom: calc(19% - 56px); transform: translateX(-50%); display: flex; gap: 8px; }
.hero-dots button { width: 28px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .28); transition: width .25s, background .25s; }
.hero-dots button.on { width: 44px; background: #fff; }

.rails { position: relative; z-index: 2; margin-top: -96px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 40px; }
.rail { padding: 0 var(--cg, 48px); }
.rail-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rail-head h2 { display: flex; align-items: baseline; gap: 16px; font-size: 24px; font-weight: 750; letter-spacing: -.5px; }
.rail-more { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; color: var(--sh-dim); font-weight: 600; letter-spacing: 0; }
.rail-more:hover { color: #fff; }
.rail-arrows { display: flex; gap: 8px; }
.rail-arrow { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .06); border: 1px solid var(--sh-line); }
.rail-arrow:hover { background: rgba(255, 255, 255, .14); }
.rail-track { display: grid; grid-auto-flow: column; grid-auto-columns: 200px; gap: 18px; overflow-x: auto; overflow-y: visible; padding: 10px 4px 16px; margin: -10px -4px 0; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail-track::-webkit-scrollbar { display: none; }
.rail-track.wide { grid-auto-columns: 384px; }
.rail-track.ranked { grid-auto-columns: 286px; gap: 10px; }
.rail-track > * { scroll-snap-align: start; }

.poster { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.poster-img { position: relative; aspect-ratio: 2 / 3; border-radius: 16px; overflow: hidden; background: #111117; box-shadow: 0 16px 34px -16px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(255, 255, 255, .06); transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s; }
.poster-img img { width: 100%; height: 100%; object-fit: cover; }
.poster:hover .poster-img, .poster:focus-visible .poster-img { transform: translateY(-6px); box-shadow: 0 24px 44px -16px rgba(0, 0, 0, .95), 0 0 0 2px rgba(160, 146, 255, .85); }
.poster:active .poster-img { transform: scale(.98); }
.rate { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 3px; padding: 4px 8px; border-radius: 8px; background: rgba(8, 8, 12, .66); color: #fff; font-size: 12px; font-weight: 700; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.rate .i { color: var(--sh-amber); }
.rate.mine { left: auto; right: 8px; background: rgba(139, 123, 255, .88); }
.rate.mine .i { color: #fff; }
.poster-cap { display: flex; flex-direction: column; gap: 2px; padding: 0 2px; }
.poster-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poster-sub { font-size: 12px; color: var(--sh-faint); }
.rank { position: relative; display: flex; align-items: flex-end; }
.rank-n { flex: none; width: 104px; margin-right: -12px; font-size: 156px; line-height: .78; font-weight: 900; letter-spacing: -.08em; color: var(--sh-bg); -webkit-text-stroke: 2px rgba(255, 255, 255, .5); text-align: right; user-select: none; }
.rank .poster { position: relative; z-index: 1; flex: 1; min-width: 0; }
.rank .poster-cap { display: none; }
.bcard { display: flex; flex-direction: column; gap: 10px; }
.bcard-img { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #111117; box-shadow: 0 16px 34px -16px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(255, 255, 255, .06); transition: transform .22s, box-shadow .22s; }
.bcard:hover .bcard-img { transform: translateY(-4px); box-shadow: 0 22px 40px -16px rgba(0, 0, 0, .95), 0 0 0 2px rgba(160, 146, 255, .8); }
.bcard-img img { width: 100%; height: 100%; object-fit: cover; }
.bcard-play { position: absolute; left: 14px; bottom: 20px; }
.bcard-play .i { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: rgba(8, 8, 12, .55); border: 1px solid rgba(255, 255, 255, .5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--sh-grad); }
.bcard-cap { display: flex; flex-direction: column; gap: 2px; padding: 0 2px; }
.bcard-title { font-weight: 650; font-size: 15px; }
.bcard-sub { font-size: 13px; color: var(--sh-faint); }

.cine-page { min-height: 100vh; padding: calc(var(--mh) + 72px) var(--cg) 72px; background: radial-gradient(110% 55% at 15% -10%, rgba(139, 123, 255, .18), transparent 60%), radial-gradient(80% 40% at 100% 0%, rgba(255, 107, 139, .08), transparent 60%), var(--sh-bg); }
.cine-h1 { font-size: 44px; font-weight: 850; letter-spacing: -1.2px; margin-bottom: 28px; }
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 32px 18px; }
.cine-search { display: flex; align-items: center; gap: 14px; height: 68px; padding: 0 22px; margin-bottom: 36px; border-radius: 18px; background: rgba(255, 255, 255, .05); border: 1px solid var(--sh-line2); }
.cine-search:focus-within { border-color: rgba(160, 146, 255, .7); }
.cine-search-in { flex: 1; height: 100%; background: transparent; border: 0; outline: none; font-size: 22px; color: var(--sh-text); }
.cine-kinds { position: static; padding: 0; margin: -16px 0 24px; background: none; }
.settings { max-width: 820px; margin: 0 auto; padding: 24px 24px 96px; }
.set-section { margin-top: 28px; padding: 22px 24px; border-radius: 18px; background: rgba(255, 255, 255, .04); border: 1px solid var(--sh-line); }
.set-section h2 { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; border-top: 1px solid var(--sh-line); }
.set-section h2 + .set-row { border-top: 0; }
.set-text { min-width: 0; flex: 1; }
.set-label { font-size: 16px; font-weight: 600; }
.set-desc { margin: 4px 0 0; color: var(--text2); font-size: 14px; line-height: 1.45; }
.seg { display: inline-flex; flex: none; padding: 4px; gap: 4px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--sh-line); }
.seg-b { height: 40px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--text2); }
.seg-b.on { background: #fff; color: #08080b; }
.set-switch { position: relative; flex: none; width: 52px; height: 32px; border-radius: 999px; background: rgba(255, 255, 255, .16); transition: background .15s; }
.set-switch::after { content: ''; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; }
.set-switch.on { background: #8b7bff; }
.set-switch.on::after { transform: translateX(20px); }
.hub { max-width: 1400px; margin: 0 auto; padding: 28px 24px 96px; }
.hub-head h1 { margin: 6px 0 4px; font-size: 34px; font-weight: 800; letter-spacing: -.5px; }
.hub-head p { margin: 0 0 26px; color: var(--text2); font-size: 17px; }
.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.hub-tile { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden; background: #15151c; border: 1px solid var(--sh-line); isolation: isolate; transition: transform .18s, border-color .18s; }
.hub-tile:hover, .hub-tile:focus-visible { transform: translateY(-4px); border-color: rgba(180, 168, 255, .6); }
.hub-art { position: absolute; inset: 0; z-index: -2; }
.hub-art img { width: 100%; height: 100%; object-fit: cover; }
.hub-art.fan { display: flex; align-items: center; justify-content: center; padding-bottom: 28%; background: radial-gradient(90% 70% at 50% 30%, #3a2f78, #121018 70%); }
.hub-art.fan img { width: 36%; height: auto; aspect-ratio: 3 / 4; margin: 0 -5%; border-radius: 10px; box-shadow: 0 14px 30px rgba(0, 0, 0, .6); }
.hub-art.fan img:nth-child(1) { transform: rotate(-9deg) translateY(12px); }
.hub-art.fan img:nth-child(2) { position: relative; z-index: 1; transform: translateY(-8px); }
.hub-art.fan img:nth-child(3) { transform: rotate(9deg) translateY(12px); }
.hub-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .88)); }
.hub-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px; }
.hub-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 12px; border-radius: 16px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(8px); }
.hub-text h2 { margin: 0; font-size: 30px; font-weight: 800; }
.hub-text p { margin: 6px 0 0; color: rgba(255, 255, 255, .78); font-size: 16px; }
body[data-mode="hub"] .searchbox { display: none; }
.sb-back { display: none; width: 46px; height: 46px; flex: none; place-items: center; border-radius: 50%; color: #fff; }
/* When the end of the bar is too narrow for the field (the car's screen is ~820 CSS px, phones less) it collided with
   the section switch and the icons: the search button opens it over the whole bar instead. */
.tb-end { container: tbend / inline-size; }
@container tbend (max-width: 379px) {
  .tb-end .searchbox { width: auto; flex: none; }
  .searchbox .sb-field { display: none; }
  .searchbox .sb-btn { display: grid; margin-left: 0; }
  body.search-open .searchbox { position: absolute; z-index: 5; inset: 0; gap: 8px; padding: 0 10px; border-radius: 19px; background: #0a0a0e; }
  body.search-open .searchbox .sb-field { display: flex; }
  body.search-open .sb-back { display: grid; }
}
@media (max-width: 760px) {
  body.search-open .searchbox { border-radius: 17px; }
}
@media (max-height: 640px) {
  .hub { padding-top: 10px; }
  .hub-head h1 { font-size: 26px; }
  .hub-head p { margin-bottom: 14px; font-size: 15px; }
  .hub-tile { aspect-ratio: 4 / 3; }
  .hub-text { padding: 16px 18px; }
  .hub-icon { width: 42px; height: 42px; margin-bottom: 8px; }
  .hub-text h2 { font-size: 24px; }
  .hub-text p { font-size: 14px; }
  .hub-art.fan { align-items: flex-start; padding: 14px 0 0; }
  .hub-art.fan img { width: 25%; }
}
@media (max-width: 640px) {
  .hub-grid { grid-template-columns: 1fr; }
  .hub-tile { aspect-ratio: 16 / 8; }
  .hub-art.fan { padding-bottom: 0; }
  .hub-art.fan img { width: 20%; }
}
.login-or { display: flex; align-items: center; gap: 12px; color: var(--text2); font-size: 13px; }
.login-or::before, .login-or::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, .14); }
.login .btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 0; background: #fff; color: #1f1f1f; font-weight: 600; }
.g-device { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.g-device p { margin: 0; font-size: 15px; line-height: 1.5; }
.g-code { font-size: 30px; font-weight: 800; letter-spacing: .08em; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.login { overflow-y: auto; align-items: safe center; }
.login-card.g-active > :not(.login-brand, .login-sub, .g-device, .err) { display: none; }
@media (max-height: 600px) {
  .login { padding: 16px 6vw; }
  .login-card { gap: 8px; padding: 20px 24px; }
  .login-brand { font-size: 26px; }
  .login-brand img { width: 40px; height: 40px; }
  .login-sub { margin-bottom: 4px; }
}
.hub-arcade .hub-art { background: radial-gradient(90% 70% at 50% 30%, #3a2f78, #121018 70%); }
.g-wait { display: flex; align-items: center; gap: 10px; color: var(--text2); }
.yt-acct { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 8px; }
.yt-who { display: flex; align-items: center; gap: 14px; }
.yt-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.yt-photo.blank { display: grid; place-items: center; background: rgba(255, 255, 255, .08); }
.yt-steps { margin: 0; padding-left: 22px; font-size: 16px; line-height: 1.7; }
.yt-code { font-size: 40px; font-weight: 800; letter-spacing: .12em; padding: 12px 22px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid var(--sh-line2); font-variant-numeric: tabular-nums; }
.yt-wait { display: flex; align-items: center; gap: 10px; }
.dot-pulse { width: 10px; height: 10px; border-radius: 50%; background: #8b7bff; animation: dotpulse 1.2s ease-in-out infinite; }
@keyframes dotpulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }
@media (max-width: 640px) {
  .set-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .seg { width: 100%; justify-content: space-between; }
  .seg-b { flex: 1; padding: 0 6px; }
  .yt-code { font-size: 30px; }
}
.cine-note { margin: -8px 0 22px; color: var(--sh-text2, var(--text2)); font-size: 15px; }
.cine-note b { color: var(--sh-text); font-weight: 700; }
.cine-page .empty-art { mix-blend-mode: lighten; }

.title-page { position: relative; min-height: 100vh; }
.tp-backdrop { position: absolute; left: 0; right: 0; top: 0; height: 92vh; overflow: hidden; }
.tp-backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.tp-backdrop::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(5, 5, 7, .95) 0%, rgba(5, 5, 7, .78) 34%, rgba(5, 5, 7, .1) 72%), linear-gradient(0deg, var(--sh-bg) 2%, rgba(5, 5, 7, 0) 44%), linear-gradient(180deg, rgba(5, 5, 7, .5), rgba(5, 5, 7, 0) 22%); }
.tp-backdrop .hero-tools { z-index: 2; bottom: auto; top: calc(var(--mh) + 22px); }
.tp-body { position: relative; z-index: 1; padding: calc(var(--mh) + 72px) var(--cg) 72px; display: flex; flex-direction: column; gap: 44px; }
.tp-top { display: flex; gap: 40px; align-items: flex-end; min-height: 54vh; }
.tp-poster { flex: none; width: 300px; aspect-ratio: 2 / 3; border-radius: 18px; overflow: hidden; box-shadow: 0 34px 70px -24px rgba(0, 0, 0, .95), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.tp-poster img { width: 100%; height: 100%; object-fit: cover; }
.tp-info { display: flex; flex-direction: column; gap: 14px; max-width: 820px; }
.tp-kicker { color: var(--sh-dim); font-size: 12px; letter-spacing: 2.6px; font-weight: 700; text-transform: uppercase; }
.tp-title { font-size: clamp(42px, 5.4vw, 92px); line-height: .92; font-weight: 900; letter-spacing: -.04em; text-transform: uppercase; text-wrap: balance; }
.tp-tagline { font-size: 18px; color: var(--sh-dim); font-weight: 500; }
.tp-genres { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-genre { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--sh-line2); background: rgba(255, 255, 255, .05); color: #fff; font-size: 13px; font-weight: 600; }
.tp-ov { font-size: 17px; line-height: 1.6; color: rgba(245, 243, 239, .86); max-width: 720px; }
.tp-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.tp-avail { font-size: 13px; color: var(--sh-faint); min-height: 18px; }
.tp-avail.warn { color: #ffb36b; }
.rate-panel { display: flex; align-items: center; gap: 26px; width: fit-content; max-width: 100%; padding: 16px 24px 18px; margin-top: 4px; border-radius: 20px; background: rgba(12, 12, 16, .62); border: 1px solid var(--sh-line); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); }
.rp-label { font-size: 14px; font-weight: 650; color: var(--sh-dim); margin-bottom: 6px; }
.stars { display: flex; gap: 2px; margin-left: -8px; }
.star { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 14px; color: rgba(255, 255, 255, .22); transition: color .12s, transform .12s, background .12s; }
.star:hover { background: rgba(255, 255, 255, .06); }
.star:active { transform: scale(.9); }
.star.on { color: var(--sh-amber); filter: drop-shadow(0 4px 14px rgba(255, 194, 75, .35)); }
.rp-div { width: 1px; align-self: stretch; background: var(--sh-line2); }
.rp-comm { display: flex; flex-direction: column; gap: 2px; }
.rp-comm b { display: flex; align-items: center; gap: 8px; font-size: 34px; font-weight: 800; letter-spacing: -.8px; }
.rp-comm b .i { color: var(--sh-amber); }
.rp-comm span { color: var(--sh-dim); font-size: 13px; }
.tp-section h2, .tp-seasons h2 { font-size: 24px; font-weight: 750; letter-spacing: -.5px; margin-bottom: 16px; }
.cast-row { display: flex; gap: 22px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.cast { flex: none; width: 120px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.cast-img { width: 108px; height: 108px; border-radius: 50%; overflow: hidden; background: #15151c; display: grid; place-items: center; font-size: 34px; color: var(--sh-dim); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 12px 26px -12px rgba(0, 0, 0, .9); }
.cast-img img { width: 100%; height: 100%; object-fit: cover; }
.cast-name { font-size: 14px; font-weight: 650; }
.cast-role { font-size: 12px; color: var(--sh-faint); }
.title-page .rail { padding: 0; }
.season-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 16px; scrollbar-width: none; }
.season-tab { flex: none; height: 42px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--sh-line2); font-size: 15px; font-weight: 600; color: var(--sh-dim); }
.season-tab.on { background: #fff; color: #08080b; border-color: #fff; }
.eps { display: flex; flex-direction: column; gap: 10px; }
.ep { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; padding: 12px; border-radius: 16px; align-items: center; transition: background .15s; }
.ep:hover, .ep:active { background: rgba(255, 255, 255, .05); }
.ep-img { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #15151c; }
.ep-img img { width: 100%; height: 100%; object-fit: cover; }
.ep-play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; background: rgba(0, 0, 0, .35); transition: opacity .15s; }
.ep:hover .ep-play { opacity: 1; }
.ep-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.ep-num { color: #b4a8ff; font-weight: 800; font-size: 18px; }
.ep-name { font-size: 18px; font-weight: 650; }
.ep-rt { margin-left: auto; color: var(--sh-faint); font-size: 14px; }
.ep-ov { color: rgba(245, 243, 239, .7); font-size: 15px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.cine-watch { position: fixed; inset: 0; background: #000; }
.cine-watch .ps { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; }
.ps-cine .ps-played, .ps-cine .ps-scrub { background: var(--sh-grad); }
.ps-cine .ps-scrub { background: #fff; }
.ps-cine .ps-big { background: var(--sh-grad); color: #fff; width: 96px; height: 96px; border-radius: 50%; margin: -48px 0 0 -48px; box-shadow: 0 14px 40px -10px rgba(176, 108, 240, .8); }
.ps-cine .ps-title { font-size: 24px; font-weight: 750; letter-spacing: -.4px; }
.ps-cine .ps-top { padding: 24px 28px 60px; }
.ps-cine .ps-bottom { padding: 0 24px 12px; }
.ps-cine .ps-nextlabel { background: rgba(139, 123, 255, .22); color: #e2dcff; }

/* ---------- responsive (Tesla browser window sizes) ---------- */
@media (max-width: 1320px) {
  .watch { grid-template-columns: minmax(0, 1fr) 360px; }
}
@media (max-width: 1100px) {
  .watch, .watch.theater { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; grid-template-areas: "stage" "info" "side"; }
  .w-side, .watch.theater .w-side { padding-top: 0; }
  .history { grid-template-columns: minmax(0, 1fr); }
  .h-side { padding: 0 24px; order: -1; }
  .pl-page { grid-template-columns: minmax(0, 1fr); }
  .pl-hero { position: relative; top: 0; min-height: 0; }
  .tp-top { flex-direction: column; align-items: flex-start; }
  .tp-poster { width: 200px; }
  .hero-copy { width: 80%; }
}
@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; padding: 12px 12px 48px; }
  .rrow { grid-template-columns: 1fr; }
  .ep { grid-template-columns: 140px minmax(0, 1fr); }
}
body.touch .icon-btn { width: 48px; height: 48px; }
body.touch .chip { height: 44px; padding: 0 18px; font-size: 15px; }
body.touch .g-item { height: 52px; }
body.touch .menu-item { min-height: 54px; font-size: 16px; }
body.touch .btn { height: 44px; }
body.touch .rail-arrows { display: none; }

/* ---------- chapters, captions, comments, episodes sheet ---------- */
.ps-ticks { position: absolute; inset: 0; pointer-events: none; }
.ps-ticks i { position: absolute; top: -1px; bottom: -1px; width: 3px; margin-left: -1.5px; background: rgba(0, 0, 0, .7); }
.ps-chapter, .ps-left-time { margin-left: 12px; font-size: 14px; color: #ddd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.ps-chapter:not(:empty)::before { content: '\2022\00a0\00a0'; color: #aaa; }
.ps-left-time { color: rgba(244, 239, 228, .75); }
.ps-cc-box { display: inline-grid; place-items: center; height: 20px; padding: 0 4px; border: 2px solid currentColor; border-radius: 4px; font-size: 11px; font-weight: 700; line-height: 1; }
.ps-cc-box.sm { height: 18px; font-size: 10px; }
.ps-cc.on .ps-cc-box { background: #fff; color: #000; border-color: #fff; }
.ps-cc.on { box-shadow: inset 0 -3px 0 -1px var(--red); }
.ps-cine .ps-cc.on { box-shadow: inset 0 -3px 0 -1px var(--sh-accent); }
.ps-cues { position: absolute; z-index: 3; left: 8%; right: 8%; bottom: 7%; display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; transition: bottom .25s; }
.ps.show-ui .ps-cues { bottom: 96px; }
.ps-cues span { padding: 2px 10px; background: rgba(8, 8, 8, .75); color: #fff; font-size: clamp(18px, 2.4vw, 34px); line-height: 1.3; text-align: center; border-radius: 4px; }
.dlink { color: var(--blue); }
.dlink.ts { font: inherit; padding: 0; }
.dlink:hover { text-decoration: underline; }
.comments { margin-top: 24px; }
.c-head { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.c-list { display: flex; flex-direction: column; gap: 20px; }
.c-item { display: flex; gap: 16px; }
.c-body { min-width: 0; flex: 1; }
.c-meta { display: flex; gap: 6px; align-items: baseline; margin-bottom: 4px; }
.c-author { font-size: 13px; font-weight: 500; }
.c-author.creator { background: #555; padding: 1px 8px; border-radius: 12px; }
.c-time { font-size: 12px; color: var(--text2); }
.c-text { font-size: 14px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.c-text.open { display: block; }
.c-more { color: var(--text2); font-weight: 500; font-size: 14px; margin-top: 4px; }
.c-bar { display: flex; align-items: center; gap: 16px; margin-top: 6px; color: var(--text2); font-size: 12px; }
.c-likes { display: inline-flex; align-items: center; gap: 6px; }
.c-replies { color: var(--text2); }
.sg-x { margin-left: auto; color: var(--blue); font-size: 13px; font-weight: 500; padding: 6px; }
.sg.recent span { color: #c58af9; }
.eps-sheet { position: absolute; z-index: 12; top: 0; right: 0; bottom: 0; width: min(520px, 92%); display: flex; flex-direction: column; background: #0a0a0a; box-shadow: -24px 0 48px rgba(0, 0, 0, .6); border-left: 1px solid var(--sh-line); animation: slidein .25s ease-out; }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }
.es-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 4px 24px; }
.es-head h3 { font-size: 24px; font-weight: 750; letter-spacing: -.4px; }
.es-seasons { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 24px 12px; }
.ps.sheet-open .ps-center, .ps.sheet-open .ps-right, .ps.sheet-open .ps-cues { display: none !important; }
.ps-cc.none { opacity: .5; }
.ps-mi.muted { color: var(--text2); cursor: default; }
.eps-sheet-list { flex: 1; overflow-y: auto; padding: 0 12px 24px; display: flex; flex-direction: column; gap: 6px; }
.es-ep { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; padding: 10px 12px; border-radius: 10px; align-items: center; }
.es-ep:hover, .es-ep.now { background: rgba(255, 255, 255, .08); }
.es-ep.now { box-shadow: inset 3px 0 0 var(--sh-accent); }
.es-img { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #1a1a1a; }
.es-img img { width: 100%; height: 100%; object-fit: cover; }
.es-now { position: absolute; left: 6px; bottom: 6px; padding: 2px 8px; border-radius: 4px; background: var(--sh-accent); color: #fff; font-size: 11px; font-weight: 700; }
.es-text b { display: block; font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.es-text p { color: rgba(244, 239, 228, .65); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ps-status { position: absolute; z-index: 4; left: 0; right: 0; top: calc(50% + 48px); text-align: center; font-size: 16px; color: rgba(255, 255, 255, .85); text-shadow: 0 1px 4px rgba(0, 0, 0, .8); pointer-events: none; padding: 0 24px; }
.ps:not([data-state="loading"]):not([data-state="buffering"]) .ps-status { display: none; }
.ps[data-state="loading"] .ps-center, .ps[data-state="buffering"] .ps-center, .ps[data-state="error"] .ps-center { display: none !important; }
.ps-tryserver { position: absolute; z-index: 6; left: 0; right: 0; top: calc(50% + 84px); width: max-content; margin: 0 auto; }
.ps-mi.dim { opacity: .55; }

.login .btn-ghost { margin-top: 0; }

/* Phones: sections live in the bottom tab bar (shell.css); the top bar keeps the logo, search and account, and the
   guide opens from the menu button instead of taking a rail. */
@media (max-width: 760px) {
  #app { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  body[data-mode="cine-watch"] #app { padding-bottom: 0; }
  body[data-mode="cine-watch"] .tabbar, body.noscroll .tabbar, body[data-guide="drawer-open"] .tabbar { display: none; }
  body[data-guide="mini"] .guide { display: none; }
  body[data-guide="mini"] .view { margin-left: 0; }
  .searchbox { width: auto; flex: 1; min-width: 0; }
  .tb-end { min-width: 0; }
  .sb-field { height: 42px; padding-left: 14px; }
  .sb-btn { display: none; }
  body:not([data-mode="cine"]) .tb-brand span { display: none; }
  body[data-mode="cine"] { --cg: 20px; }
  body[data-mode="cine"] .subnav { top: calc(var(--mh) + 2px); gap: 4px; }
  .subnav a { height: 34px; padding: 0 12px; font-size: 13px; }
  .hero { height: min(80vh, 700px); min-height: 520px; }
  .hero-copy { bottom: 12%; width: calc(100% - 40px); gap: 12px; }
  .hero-title { font-size: clamp(40px, 12vw, 56px); }
  .hero-ov { font-size: 15px; }
  .hero-btns .cbtn { height: 50px; padding: 0 20px; font-size: 16px; flex: 1; }
  .hero-btns .cbtn.info { display: none; }
  .hero-tools { top: calc(var(--mh) + 48px); bottom: auto; }
  .htool { height: 44px; min-width: 44px; padding: 0 14px; }
  .hero-dots { display: none; }
  .rails { margin-top: -40px; gap: 30px; }
  .rail-head h2 { font-size: 20px; }
  .rail-track { grid-auto-columns: 136px; gap: 12px; }
  .rail-track.wide { grid-auto-columns: 78vw; }
  .rail-track.ranked { grid-auto-columns: 196px; }
  .rank-n { width: 72px; font-size: 112px; margin-right: -10px; }
  .tp-body { padding-top: calc(var(--mh) + 56px); }
  .tp-top { flex-direction: column; align-items: flex-start; gap: 22px; min-height: 0; }
  .tp-poster { width: 150px; }
  .tp-title { font-size: clamp(36px, 10vw, 52px); }
  .rate-panel { gap: 16px; padding: 14px 16px; }
  .star { width: 46px; height: 46px; }
  .rp-comm b { font-size: 26px; }
  .cine-page { padding-top: calc(var(--mh) + 56px); }
  .cine-h1 { font-size: 32px; }
  .poster-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 22px 12px; }
  .ep { grid-template-columns: 140px minmax(0, 1fr); gap: 14px; }
}
