:root {
  --bg: #0d0e11;
  --surface: #15171c;
  --surface-2: #1c1f26;
  --line: #262a33;
  --text: #eceef2;
  --muted: #959bab;
  --accent: #f2b544;
  --radius: 14px;
  --header: 60px;
  --side: 232px;
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display: 'Fraunces', Georgia, serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header) + 12px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #111; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; height: var(--header); display: flex; align-items: center; gap: 16px; padding: 0 20px;
  background: rgba(13, 14, 17, .88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.icon-btn { display: none; background: none; border: 0; padding: 8px; margin-left: -8px; border-radius: 10px; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 21px; letter-spacing: -.01em; white-space: nowrap; }
.brand-mark { width: 22px; height: 22px; border-radius: 7px; background: var(--accent); position: relative; }
.brand-mark::after { content: ''; position: absolute; left: 8px; top: 6px; border-left: 8px solid #111; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.search { margin-left: auto; width: min(420px, 45vw); display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 40px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); transition: border-color .15s; }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: inherit; }
.search kbd { font: 12px var(--font); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.search:focus-within kbd { display: none; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); }
.side { position: sticky; top: var(--header); height: calc(100vh - var(--header)); overflow-y: auto; padding: 20px 12px; border-right: 1px solid var(--line); }
.side-group + .side-group { margin-top: 26px; }
.side-title { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); padding: 0 12px 8px; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 10px; color: #c9cdd6; }
.side li a:hover { background: var(--surface); color: var(--text); }
.side li a.on { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.side .n { font-size: 12px; color: var(--muted); }
.side a.recent { justify-content: flex-start; font-size: 13px; line-height: 1.3; }
.side a.recent .thumb { width: 54px; flex: none; border-radius: 6px; }
.side a.recent .thumb .dur { display: none; }
.scrim { display: none; }
main { min-width: 0; padding: 24px clamp(16px, 3vw, 36px) 0; }

/* ---------- watch area ---------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.player-wrap { width: 100%; max-width: calc((100vh - var(--header) - 120px) * 16 / 9); min-width: min(100%, 480px); margin: 0 auto; }
.vinfo { margin-top: 18px; }
.vinfo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.vinfo-text { min-width: 0; flex: 1 1 320px; }
.vmeta { display: flex; gap: 14px; align-items: center; font-size: 13px; color: var(--muted); }
.vmeta a:first-child { color: var(--accent); }
.vmeta a:hover { color: var(--text); }
h1 { font-family: var(--display); font-weight: 600; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; margin: 4px 0 0; letter-spacing: -.01em; }
.vdesc { color: #b8bdc8; max-width: 72ch; margin: 12px 0 0; }
.vactions { display: flex; gap: 6px; flex-wrap: wrap; }
.act { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 13px; transition: background .15s, border-color .15s; }
.act:hover:not(:disabled) { background: var(--surface-2); border-color: #353a45; }
.act:disabled { opacity: .35; cursor: default; }
.act[aria-pressed=true] { border-color: var(--accent); color: var(--accent); }

.upnext { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 10px 8px; }
.upnext-head { display: flex; justify-content: space-between; align-items: center; padding: 0 6px 10px; font-weight: 600; font-size: 14px; }
.upnext ol { list-style: none; margin: 0; padding: 0; max-height: calc(100vh - 330px); min-height: 200px; overflow-y: auto; }
.un { display: flex; gap: 10px; padding: 6px; border-radius: 10px; }
.un:hover { background: var(--surface-2); }
.un .thumb { width: 132px; flex: none; border-radius: 8px; }
.un-text { display: flex; flex-direction: column; min-width: 0; }
.un-title { font-size: 13.5px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.un-cat { font-size: 12px; color: var(--muted); margin-top: 3px; }
.un-end { color: var(--muted); font-size: 13px; padding: 10px 6px 14px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { width: 30px; height: 18px; border-radius: 9px; background: #3a3f4b; position: relative; transition: background .15s; }
.switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(12px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

body.theater .watch { grid-template-columns: minmax(0, 1fr); }
body.theater .player-wrap { max-width: min(100%, calc((100vh - var(--header) - 60px) * 16 / 9)); }
body.theater .watch-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
body.theater .upnext ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); max-height: none; min-height: 0; }

/* ---------- thumbnails ---------- */
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: linear-gradient(135deg, #252935, #181b22); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.no-img::before { content: attr(data-initial); position: absolute; inset: 0; display: grid; place-items: center; font: 600 28px var(--display); color: rgba(255, 255, 255, .28); }
.un .thumb.no-img::before, .side .thumb.no-img::before { font-size: 18px; }
.dur { position: absolute; right: 6px; bottom: 6px; font-size: 11px; font-weight: 600; padding: 1px 5px; border-radius: 5px; background: rgba(0, 0, 0, .78); }

/* ---------- carousels (featured + trending) ---------- */
.rows { margin-top: 44px; display: grid; gap: 34px; }
.rows:empty { display: none; }
.rows-label { display: flex; align-items: baseline; gap: 12px; margin-bottom: -18px; padding-top: 26px; border-top: 1px solid var(--line); }
.rows-label h2 { font-family: var(--display); font-weight: 600; font-size: 22px; margin: 0; }
.rows-label span { font-size: 12.5px; color: var(--muted); }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.row-head h2 { font-family: var(--display); font-weight: 600; font-size: 22px; margin: 0; }
.row-head h3 { font-size: 15px; font-weight: 600; margin: 0; }
.row-nav { display: flex; align-items: center; gap: 6px; }
.row-all { font-size: 13px; color: var(--muted); margin-right: 6px; }
.row-all:hover { color: var(--text); }
.rbtn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 20px; line-height: 1; display: grid; place-items: center; padding-bottom: 3px; }
.rbtn:hover:not(:disabled) { background: var(--surface-2); }
.rbtn:disabled { opacity: .3; cursor: default; }
.row-track { display: grid; grid-auto-flow: column; grid-auto-columns: max(220px, calc((100% - 60px) / 4)); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 6px; }
.row-track::-webkit-scrollbar { display: none; }
.row-track .card { scroll-snap-align: start; }
.row-featured .row-track { grid-auto-columns: max(260px, calc((100% - 40px) / 3)); }
.row-featured .card-title { font-size: 16px; }
.vmeta-ch { color: var(--accent); }

/* ---------- scheduled lessons ---------- */
.soon { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: rgba(0,0,0,.8); color: var(--accent); }
.card.is-soon { cursor: default; }
.card.is-soon .thumb img { filter: grayscale(.6) brightness(.6); }
.card.is-soon:hover .thumb { transform: none; }
.card.is-soon .card-title { color: #b8bdc8; }
.soon-stage { display: grid; place-items: center; text-align: center; background: radial-gradient(ellipse at center, #1d2027, #0d0e11); }
.soon-box { padding: 24px; max-width: 520px; }
.soon-box p { color: var(--muted); margin: 0; }
body.no-playable .upnext { display: none; }

/* ---------- cinema news ---------- */
.news-home { margin: 6px 0 4px; }
.news-upd { font-size: 12.5px; color: var(--muted); margin-right: 8px; }
.news-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; }
.news-img { position: relative; display: block; overflow: hidden; background: linear-gradient(135deg, var(--surface-2), var(--surface)); }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.news-img.no-img::before { content: attr(data-initial); position: absolute; inset: 0; display: grid; place-items: center; font: 800 34px var(--display); color: rgba(255,255,255,.18); }
.news-meta { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.news-meta b { color: var(--accent); font-weight: 700; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-meta span::before { content: '•'; margin-right: 8px; opacity: .6; }
.news-meta span { white-space: nowrap; flex: none; }
.news-meta b { min-width: 0; }
.news-title { font-weight: 650; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.news-ex { color: #b9b2c8; font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.news-lead { position: relative; display: block; border-radius: var(--radius); overflow: hidden; min-height: 320px; background: var(--surface); isolation: isolate; }
.news-lead .news-img { position: absolute; inset: 0; }
.news-lead .news-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,6,14,.95) 0%, rgba(8,6,14,.55) 45%, rgba(8,6,14,0) 75%); }
.news-lead .news-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 22px 20px; z-index: 1; }
.news-lead .news-title { font-family: var(--display); font-size: clamp(19px, 1.9vw, 26px); font-weight: 750; -webkit-line-clamp: 3; letter-spacing: -.01em; }
.news-lead:hover .news-img img, .news-card:hover .news-img img, .news-mini:hover .news-img img { transform: scale(1.04); }
.news-list { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.news-mini { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border-radius: 10px; }
.news-mini:hover { background: var(--surface-2); }
.news-mini .news-img { aspect-ratio: 16 / 9; border-radius: 8px; }
.news-mini .news-img.no-img::before { font-size: 20px; }
.news-mini .news-title { font-size: 14px; -webkit-line-clamp: 2; }

body.view-news .watch, body.view-news #rows, body.view-news #library { display: none; }
.news-view { padding-bottom: 10px; }
.news-back { display: inline-block; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.news-back:hover { color: var(--text); }
.news-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.news-head h1 { margin: 0; font-size: clamp(26px, 3vw, 36px); }
.news-head p { margin: 4px 0 0; }
.news-search { margin-left: 0; width: min(340px, 100%); }
.chips.news-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; overflow: visible; }
.news-chips .chip { cursor: pointer; font: inherit; font-size: 13px; color: var(--text); }
.news-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.news-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s; }
.news-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.news-card .news-img { aspect-ratio: 16 / 9; }
.news-card .news-body { padding: 14px 16px 16px; }
.news-card .news-title { font-size: 16px; -webkit-line-clamp: 3; }
.news-cards .ad-grid { border-radius: var(--radius); }
.news-skel { height: 300px; border-radius: var(--radius); background: linear-gradient(100deg, var(--surface) 40%, var(--surface-2) 50%, var(--surface) 60%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
.news-more { display: flex; justify-content: center; margin: 26px 0 8px; }
.news-note { font-size: 12px; color: var(--muted); text-align: center; margin: 10px 0 0; }
#nav-news.on { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }

/* ---------- library ---------- */
.library { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.lib-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.lib-head h2 { font-family: var(--display); font-weight: 600; font-size: 22px; margin: 0; }
.chips { display: none; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chip { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.chip.on { background: var(--text); color: #111; border-color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 26px 20px; }
.card { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card .thumb { margin-bottom: 6px; transition: transform .2s; }
.card:hover .thumb { transform: translateY(-2px); }
.card.playing .thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.card-title { font-weight: 500; line-height: 1.3; }
.card-sub { font-size: 13px; color: var(--muted); }
.empty { color: var(--muted); }
.lib-titles { min-width: 0; flex: 1 1 300px; }
.lib-desc { margin: 6px 0 0; color: #b8bdc8; max-width: 72ch; }
.lib-tools { display: flex; align-items: center; gap: 12px; }
.lib-count { font-size: 13px; color: var(--muted); }
.act-primary { background: var(--accent); border-color: var(--accent); color: #111; font-weight: 600; }
.act-primary:hover:not(:disabled) { background: var(--accent); filter: brightness(1.07); }
.card { position: relative; }
.card-num { position: absolute; left: 8px; top: 8px; z-index: 1; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: rgba(0,0,0,.75); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.chip-list { border-color: #4a3d1d; }

/* ---------- ads: quiet, labelled, never over the player ---------- */
.ad-slot:empty { display: none; }
.ad { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, background .15s; }
.ad:hover { border-color: #3a3f4b; background: var(--surface-2); }
.ad-img { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: #fff; display: grid; place-items: center; }
.ad-img img { width: 100%; height: 100%; object-fit: contain; }
.ad-img.no-img { background: var(--surface-2); }
.ad-img.no-img::before { content: ''; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--muted); opacity: .6; }
.ad-house .ad-img.no-img::before { border-radius: 50%; border-color: var(--accent); }
.ad-body { display: flex; flex-direction: column; min-width: 0; }
.ad-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ad-title { font-weight: 600; font-size: 14px; line-height: 1.3; }
.ad-text { font-size: 13px; color: #aab0bc; line-height: 1.35; }
.ad-cta { font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.ad-cta::after { content: ' →'; }
.ad-slot[data-slot=belowPlayer] { margin-top: 22px; max-width: 720px; }
.ad-slot[data-slot=sidebar] { margin-top: 16px; }
.ad-sidebar { grid-template-columns: auto 1fr; }
.ad-sidebar .ad-cta { grid-column: 1 / -1; justify-self: start; }
.ad-grid { grid-template-columns: 1fr; align-content: start; align-self: start; gap: 10px; padding: 14px; }
.ad-grid .ad-img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.ad-grid .ad-img.no-img::before { width: 34px; height: 34px; }

/* ---------- footer, toast ---------- */
.foot { margin-top: 64px; padding: 24px 0 36px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.foot p { margin: 4px 0; max-width: 80ch; }
.foot a { text-decoration: underline; text-underline-offset: 2px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: #111; padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 60; max-width: 90vw; overflow-wrap: anywhere; }

/* ---------- player ---------- */
.sp { position: relative; width: 100%; }
.sp-stage { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .7); isolation: isolate; }
.sp-host, .sp-host > div, .sp-host iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sp-poster { position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer; background: #111 center / cover no-repeat; z-index: 2; }
.sp-poster::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,.05), rgba(0,0,0,.45)); }
.sp-bigplay { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255, 255, 255, .5); transition: transform .15s, background .15s; }
.sp-bigplay::after { content: ''; position: absolute; left: 30px; top: 23px; border-left: 24px solid #fff; border-top: 15px solid transparent; border-bottom: 15px solid transparent; }
.sp-poster:hover .sp-bigplay, .sp-resume:hover .sp-bigplay { transform: scale(1.06); background: var(--accent); border-color: var(--accent); }
.sp-poster:hover .sp-bigplay::after, .sp-resume:hover .sp-bigplay::after { border-left-color: #111; }
/* Pause cover hides YouTube's "More videos" shelf but leaves the bottom control bar usable */
.sp-pause { position: absolute; left: 0; right: 0; top: 0; bottom: 54px; z-index: 3; background: linear-gradient(to bottom, rgba(0,0,0,.72), rgba(0,0,0,.5) 60%, rgba(0,0,0,.65)); }
.sp-resume { position: absolute; inset: 0; width: 100%; border: 0; background: none; cursor: pointer; }
.sp-pause-title { position: absolute; left: 20px; top: 16px; right: 20px; font-weight: 600; font-size: 15px; text-shadow: 0 1px 2px #000; pointer-events: none; }
.sp-panel { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; background: rgba(8, 9, 12, .92); backdrop-filter: blur(8px); padding: 20px; text-align: center; }
.sp-panel.sp-loading { background: #000; }
.sp-next { max-width: 460px; }
.sp-next-label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.sp-next-title { font-family: var(--display); font-size: clamp(18px, 2.4vw, 26px); line-height: 1.25; margin: 6px 0 18px; }
.sp-err .sp-next-title { font-family: var(--font); font-size: 16px; }
.sp-next-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.sp-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid #3a3f4b; background: transparent; cursor: pointer; font-size: 14px; }
.sp-btn:hover { background: rgba(255, 255, 255, .06); }
.sp-primary { background: var(--accent); color: #111; border-color: var(--accent); font-weight: 600; }
.sp-primary:hover { background: var(--accent); filter: brightness(1.08); }
.sp-ghost { border-color: transparent; color: var(--muted); }
.sp-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 11px; background: rgba(0, 0, 0, .2); font-size: 12px; }
.sp-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sp-toast { position: absolute; left: 14px; top: 14px; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, .75); font-size: 13px; backdrop-filter: blur(6px); }
.sp-toast button { border: 0; background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 4px 10px; cursor: pointer; font-size: 12.5px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .watch { grid-template-columns: minmax(0, 1fr); }
  .watch-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
  .upnext ol { max-height: 420px; }
  .player-wrap { min-width: 0; }
}
@media (max-width: 960px) {
  .news-grid { grid-template-columns: minmax(0, 1fr); }
  .news-lead { min-height: 260px; }
}
@media (max-width: 860px) {
  :root { --side: 270px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .icon-btn { display: inline-flex; }
  .side { position: fixed; left: 0; top: var(--header); bottom: 0; height: auto; width: var(--side); z-index: 40; background: var(--bg); transform: translateX(-100%); transition: transform .22s ease; }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: var(--header) 0 0 0; background: rgba(0, 0, 0, .55); z-index: 35; }
  .chips { display: flex; width: 100%; }
  .row-track, .row-featured .row-track { grid-auto-columns: 72%; gap: 14px; }
  .rbtn { display: none; }
  .watch-side, body.theater .watch-side { grid-template-columns: minmax(0, 1fr); }
  .search kbd { display: none; }
}
@media (max-width: 560px) {
  main { padding: 0 0 0; }
  .player-wrap { max-width: none; }
  .sp-stage { border-radius: 0; }
  .vinfo, .watch-side, .library, .foot, .ad-slot[data-slot=belowPlayer], .rows, .news-view { padding-left: 16px; padding-right: 16px; }
  .news-view { padding-top: 16px; }
  .news-mini { grid-template-columns: 96px minmax(0, 1fr); }
  .news-cards { grid-template-columns: minmax(0, 1fr); }
  .watch { gap: 20px; }
  .act span { display: none; }
  .brand-name { display: none; }
  .search { width: auto; flex: 1; min-width: 0; }
  .top { gap: 10px; padding: 0 12px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px 12px; }
  .ad { grid-template-columns: auto 1fr; }
  .ad .ad-cta { grid-column: 1 / -1; }
  .ad.ad-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: .01ms !important; } }

/* Share bar under the player */
.sharebar { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:12px 0 4px; }
.sharebar .share-label { font-size:13px; color:var(--muted, #9aa); margin-right:2px; }
.sharebar .sh { display:inline-flex; align-items:center; gap:7px; padding:7px 13px; border-radius:999px; border:1px solid rgba(255,255,255,.14); background:rgba(255,255,255,.06); color:inherit; font:inherit; font-size:13px; font-weight:600; cursor:pointer; transition:background .15s, border-color .15s; }
.sharebar .sh:hover, .sharebar .sh:focus-visible { background:rgba(255,255,255,.12); border-color:rgba(255,255,255,.28); }
.sharebar .sh i { width:9px; height:9px; border-radius:50%; background:#888; }
.sharebar .sh-wa i { background:#25D366; } .sharebar .sh-fb i { background:#1877F2; }
.sharebar .sh-ig i { background:linear-gradient(45deg,#F58529,#DD2A7B,#8134AF); } .sharebar .sh-tt i { background:linear-gradient(45deg,#25F4EE,#FE2C55); }
.sharebar .sh-more i { background:currentColor; opacity:.5; }
@media (max-width:600px) { .sharebar .share-label { width:100%; } .sharebar .sh { padding:8px 12px; } }

/* ---------- games ---------- */
body.view-games .watch, body.view-games #rows, body.view-games #library, body.view-games .news-view { display: none; }
.games-view { padding-bottom: 10px; }
.games-home { margin: 6px 0 34px; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.game-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s; }
.game-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.game-cover { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.game-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.game-card:hover .game-cover img { transform: scale(1.04); }
.game-ph { display: grid; place-items: center; height: 100%; font-size: 48px; }
.game-play { position: absolute; right: 10px; bottom: 10px; padding: 6px 12px; border-radius: 999px; background: var(--accent); color: #111; font-weight: 700; font-size: 13px; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.game-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.game-name { font-weight: 700; font-size: 17px; }
.game-ta { color: var(--accent); font-size: 14px; }
.game-sum { color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.game-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.game-tags span { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.game-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.game-bar-l { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; min-width: 0; }
.game-bar-l .news-back { margin: 0; }
.game-bar h1 { margin: 0; font-size: clamp(20px, 2.4vw, 28px); }
.game-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.game-acts .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.game-acts .seg button { background: none; border: 0; padding: 7px 14px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; }
.game-acts .seg button.on { background: var(--accent); color: #111; }
.game-frame-wrap { position: relative; height: calc(100vh - var(--header) - 120px); min-height: 480px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.game-frame-wrap iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.game-frame-wrap:fullscreen { border-radius: 0; border: 0; height: 100vh; }
.game-desc { color: var(--muted); font-size: 14px; max-width: 70ch; }
@media (max-width: 760px) {
  .games-view { padding: 16px 16px 0; }
  .game-frame-wrap { height: calc(100svh - var(--header) - 110px); min-height: 420px; margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .game-acts .act span { display: none; }
}

/* ---------- All videos: rows ---------- */
.lib-rows { display: grid; gap: 26px; margin-top: 6px; }
.lib-row .row-head { min-height: 32px; margin-bottom: 10px; }
.lib-row .row-head h3 { font-family: var(--display); font-size: 18px; font-weight: 700; }
.lib-row .row-track { grid-auto-columns: max(200px, calc((100% - 60px) / 4)); }

.lib-row-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lib-row-title .row-char { width: 52px; height: 52px; object-fit: contain; flex: none; filter: drop-shadow(0 3px 6px rgba(0,0,0,.35)); transition: transform .25s; }
.lib-row:hover .row-char { transform: rotate(-6deg) scale(1.06); }
.row-teach { display: block; font-size: 13px; color: var(--accent); margin-top: 1px; }
@media (max-width: 560px) { .lib-row-title .row-char { width: 42px; height: 42px; } .row-teach { font-size: 12px; } }

/* All-videos rows always show their arrows, on every screen size */
.lib-row .rbtn { display: grid; }
.lib-row .row-nav { flex: none; }

/* games inside the top carousel */
.thumb-game { background: linear-gradient(135deg, #3B2A9A, #151B47); }
.thumb-game img { width: 100%; height: 100%; object-fit: cover; }
.game-badge { position: absolute; left: 8px; top: 8px; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #2A1A00; font-size: 12px; font-weight: 700; }

/* home page games: two carousel rows */
.games-home .game-row { position: relative; margin-bottom: 18px; }
.games-home .game-row-nav { display: flex; justify-content: flex-end; gap: 6px; margin: -4px 0 8px; }
.games-home .game-row-nav .rbtn { display: grid; }
.games-home .row-track { grid-auto-columns: max(230px, calc((100% - 60px) / 4)); }
.games-home .row-track .game-card { scroll-snap-align: start; }

/* Subscribe / Like under the player */
.ytbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 2px; }
.ytbtn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; line-height: 1; transition: transform .12s, filter .15s; }
.ytbtn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.ytbtn.sub { background: #FF0033; color: #fff; }
.ytbtn.like { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: inherit; }
.ytbtn svg { flex: none; }
.ytbar .ytnote { font-size: 12px; color: var(--muted); }

/* Subscribe / Like sit in the button row next to Prev and Next */
.vactions .act.yt-sub { background: #FF0033; border-color: #FF0033; color: #fff; }
.vactions .act.yt-sub:hover { filter: brightness(1.1); }
.vactions a.act { text-decoration: none; }

/* the sidebar ad now sits above Up next */
.watch-side > .ad-slot[data-slot=sidebar]:not(:empty) { margin: 0 0 16px; }
.ad-house .ad-img img[src*="characters/"] { object-fit: contain; background: radial-gradient(circle, #2E3A8C, #151B47); padding: 4px; }

/* ---------- Trending videos player in Cinema news ---------- */
.nv { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 4px 0 22px; }
.nv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.nv-head h3 { margin: 0; font-size: 18px; }
.chips.nv-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.chips.nv-tabs[hidden] { display: none; }
.nv-tabs .chip .n { opacity: .6; font-size: 12px; margin-left: 4px; }
.nv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.nv-info h4 { margin: 12px 0 6px; font-size: 17px; line-height: 1.35; }
.nv-info .vmeta { flex-wrap: wrap; }
.nv-info .vactions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.nv-info .sharebar { margin-top: 4px; }
.nv-list { list-style: none; margin: 0; padding: 0; max-height: 470px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.nv-item { display: grid; grid-template-columns: 136px 1fr; gap: 10px; width: 100%; text-align: left; background: none; border: 0; color: inherit; padding: 6px; border-radius: 10px; cursor: pointer; font: inherit; }
.nv-item:hover, .nv-item:focus-visible { background: var(--surface-2); }
.nv-item.on { background: var(--surface-2); outline: 1px solid var(--accent); }
.nv-th { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; }
.nv-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nv-now { position: absolute; inset: auto 0 0 0; background: rgba(0,0,0,.72); color: #fff; font-size: 11px; padding: 2px 6px; }
.nv-it { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.nv-ttl { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nv-sub { font-size: 12px; color: var(--muted); }
.nv-empty { color: var(--muted); padding: 10px; }
.nv .news-note { margin: 12px 0 0; }
#nv-page .nv { margin-top: 0; }
body.news-off #news-chips, body.news-off #news-cards, body.news-off #news-empty, body.news-off .news-more, body.news-off .news-search, body.news-off .news-view > .news-note { display: none !important; }
@media (max-width: 960px) {
  .nv-grid { grid-template-columns: 1fr; }
  .nv-list { max-height: none; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding-bottom: 6px; scroll-snap-type: x mandatory; }
  .nv-list li { flex: 0 0 200px; scroll-snap-align: start; }
  .nv-item { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .nv { padding: 12px; } }
.nav-tv { margin-top: 6px; }
.nav-tv .nav-sub { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 4px; }
body.no-main .watch { display: none; }
#nv-top .nv { margin: 0 0 24px; }
body.view-news #nv-top, body.view-games #nv-top { display: none; }

/* News as a text list in two columns (no picture boxes) */
.news-cols, body.news-list-mode .news-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.news-row { display: flex; flex-direction: column; gap: 5px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.news-row:hover .news-title { color: var(--accent); }
.news-row .news-title { font-size: 15.5px; -webkit-line-clamp: 2; }
.news-row .news-ex { -webkit-line-clamp: 2; }
.news-row .news-meta { margin-top: 2px; }
body.news-list-mode .news-cards .ad-grid { grid-column: 1 / -1; margin: 12px 0; }
@media (max-width: 760px) { .news-cols, body.news-list-mode .news-cards { grid-template-columns: 1fr; } }
