/* Playback — the product. Dark, video-forward chrome; content carries the
   color. Manrope for UI (the neutral workhorse), Bricolage Grotesque for the
   wordmark. Brand red #FF0033 reserved for progress, brand, badges. */
:root {
  --bg: #0f0f0f; --bg-1: #181818; --bg-2: #212121; --bg-3: #2b2b2b;
  --ink: #f1f1f1; --ink-2: #aaaaaa; --ink-3: #717171;
  --line: #2a2a2a; --line-2: #383838;
  --red: #ff0033; --red-ink: #ff5573;
  --chip: #272727; --chip-hover: #3d3d3d;
  --shadow: 0 8px 28px rgba(0,0,0,.55);
  --topbar-h: 56px; --side-w: 240px; --side-mini: 76px;
  --r: 12px; --r-lg: 16px;
  --f-ui: "Manrope", system-ui, sans-serif;
  --f-brand: "Bricolage Grotesque", "Manrope", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--f-ui); background: var(--bg); color: var(--ink);
  font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; overflow-y: scroll; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: none; background: none; cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--red-ink); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--red); color: #fff; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: #383838; border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #4a4a4a; }

/* ---------------- top bar ---------------- */
.topbar { position: fixed; inset: 0 0 auto 0; height: var(--topbar-h); z-index: 60;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 0 16px; background: rgba(15,15,15,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent; }
.tb-left { display: flex; align-items: center; gap: 12px; }
.tb-center { display: flex; align-items: center; gap: 12px; justify-self: center; width: min(640px, 46vw); }
.tb-right { display: flex; align-items: center; gap: 8px; justify-self: end; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  color: var(--ink); transition: background .15s; flex: none; }
.icon-btn:hover { background: var(--bg-2); }
.icon-btn:active { background: var(--bg-3); }
.icon-btn svg { width: 24px; height: 24px; }
.brand { display: flex; align-items: center; gap: 7px; font-family: var(--f-brand);
  font-weight: 800; font-size: 21px; letter-spacing: -.03em; }
.brand .mark { width: 34px; height: 24px; background: var(--red); border-radius: 8px;
  display: grid; place-items: center; box-shadow: 0 2px 8px rgba(255,0,51,.4); }
.brand .mark svg { width: 15px; height: 15px; color: #fff; }
.brand sup { font-size: 9px; color: var(--ink-3); font-weight: 600; font-family: var(--f-ui); align-self: flex-start; margin-top: 2px; }
.search { flex: 1; display: flex; height: 40px; }
.search input { flex: 1; background: #121212; border: 1px solid var(--line-2); border-right: none;
  border-radius: 40px 0 0 40px; padding: 0 16px; color: var(--ink); font-size: 15px; box-shadow: inset 0 1px 3px rgba(0,0,0,.5); }
.search input::placeholder { color: var(--ink-3); }
.search input:focus { outline: none; border-color: #3a6ea5; }
.search button { width: 64px; background: var(--bg-2); border: 1px solid var(--line-2); border-left: none;
  border-radius: 0 40px 40px 0; display: grid; place-items: center; color: var(--ink-2); transition: background .15s; }
.search button:hover { background: var(--bg-3); }
.search button svg { width: 22px; }
.avatar { border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700;
  flex: none; overflow: hidden; font-size: 13px; user-select: none; }
.tb-right .avatar { width: 32px; height: 32px; cursor: pointer; }
.btn-pill { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 15px;
  border-radius: 40px; background: var(--chip); color: var(--ink); font-weight: 600; font-size: 14px;
  transition: background .15s, transform .1s; white-space: nowrap; }
.btn-pill:hover { background: var(--chip-hover); }
.btn-pill:active { transform: scale(.97); }
.btn-pill svg { width: 20px; }
.btn-pill.ghost { background: transparent; border: 1px solid var(--line-2); }
.btn-pill.ghost:hover { background: var(--bg-2); }

/* ---------------- sidebar ---------------- */
.sidebar { position: fixed; top: var(--topbar-h); left: 0; bottom: 0; width: var(--side-w);
  overflow-y: auto; padding: 12px; z-index: 40; overscroll-behavior: contain; }
.sidebar::-webkit-scrollbar { width: 8px; }
.side-sec { padding: 8px 0; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.side-sec:last-child { border-bottom: none; }
.side-sec h4 { font-size: 15px; font-weight: 700; color: var(--ink); padding: 6px 12px 8px; }
.side-link { display: flex; align-items: center; gap: 22px; padding: 9px 12px; border-radius: 10px;
  font-size: 14px; transition: background .12s; }
.side-link:hover { background: var(--bg-2); }
.side-link.active { background: var(--bg-3); font-weight: 700; }
.side-link svg { width: 22px; height: 22px; flex: none; color: var(--ink); }
.side-link .ch-av { width: 24px; height: 24px; font-size: 11px; }
.side-link .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-left: auto; box-shadow: 0 0 8px var(--red); }
.side-note { font-size: 11px; color: var(--ink-3); padding: 12px; line-height: 1.5; }

/* mini rail (icons only) on watch page + medium widths */
body.mini .sidebar { width: var(--side-mini); }
body.mini .side-link { flex-direction: column; gap: 6px; padding: 14px 4px; font-size: 10px; text-align: center; font-weight: 500; }
body.mini .side-link .lbl-long { display: none; }
body.mini .side-sec h4, body.mini .side-sub, body.mini .side-note { display: none; }
body.mini .side-sec { border-bottom: none; }

/* ---------------- main / scaffold ---------------- */
.main { margin-left: var(--side-w); margin-top: var(--topbar-h); padding: 24px; min-height: calc(100vh - var(--topbar-h)); }
body.mini .main { margin-left: var(--side-mini); }
body.watch .main { margin-left: 0; max-width: 1760px; margin-inline: auto; padding: 24px 24px 80px; }
body.watch .sidebar { display: none; }

/* chips bar (home categories) */
.chips { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 20px;
  position: sticky; top: var(--topbar-h); background: var(--bg); z-index: 30; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { height: 32px; padding: 0 12px; border-radius: 8px; background: var(--chip); color: var(--ink);
  font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .12s; flex: none; }
.chip:hover { background: var(--chip-hover); }
.chip.active { background: var(--ink); color: var(--bg); }

/* ---------------- video card ---------------- */
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px 16px; }
.card { display: flex; flex-direction: column; cursor: pointer; }
.card .thumb-wrap { position: relative; border-radius: var(--r); overflow: hidden; aspect-ratio: 16/9; background: var(--bg-2); }
.card .thumb-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease, border-radius .2s; }
.card:hover .thumb-wrap img { transform: scale(1.02); }
.card .dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.82); color: #fff;
  font-size: 12px; font-weight: 600; padding: 1px 5px; border-radius: 5px; letter-spacing: .02em; }
.card .prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.35); }
.card .prog i { display: block; height: 100%; background: var(--red); }
.card .meta { display: flex; gap: 12px; padding: 12px 2px 0; }
.card .meta .ch-av { width: 36px; height: 36px; flex: none; }
.card .info h3 { font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .info .by { font-size: 13px; color: var(--ink-2); margin-top: 5px; }
.card .info .by:hover { color: var(--ink); }
.card .info .sub { font-size: 13px; color: var(--ink-2); }
.card.compact { flex-direction: row; gap: 8px; }
.card.compact .thumb-wrap { width: 168px; flex: none; }
.card.compact .meta { padding: 0; flex-direction: column; gap: 0; }
.card.compact .info h3 { font-size: 14px; -webkit-line-clamp: 2; }

.ch-av { border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; overflow: hidden; user-select: none; }

/* section headings */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 6px 0 18px; }
.sec-head h2 { font-family: var(--f-brand); font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.empty { text-align: center; color: var(--ink-2); padding: 80px 20px; }
.empty svg { width: 56px; opacity: .4; margin: 0 auto 16px; }

/* ================= WATCH PAGE ================= */
.watch-grid { display: grid; grid-template-columns: minmax(0,1fr) 402px; gap: 24px; }
@media (max-width: 1100px){ .watch-grid { grid-template-columns: 1fr; } }

/* ---- player ---- */
.player { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; border-radius: var(--r-lg);
  overflow: hidden; user-select: none; }
body.watch.theater .player-stage { margin: 0 -24px; }
.player.theater-on { border-radius: 0; aspect-ratio: auto; height: min(84vh, calc(100vw*9/16)); }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.player.cursor-hidden { cursor: none; }
.player .big-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.15); transition: opacity .2s; }
.player .big-play button { width: 72px; height: 72px; border-radius: 50%; background: rgba(0,0,0,.55); display: grid; place-items: center; transition: transform .2s, background .2s; }
.player .big-play button:hover { background: var(--red); transform: scale(1.06); }
.player .big-play svg { width: 34px; color: #fff; margin-left: 3px; }

/* controls overlay */
.pc { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 12px 8px; z-index: 5;
  background: linear-gradient(transparent, rgba(0,0,0,.72)); opacity: 1; transition: opacity .25s; }
.player.hide-ui .pc { opacity: 0; pointer-events: none; }
.player.hide-ui .center-toast { opacity: 0; }

/* scrub bar */
.scrub { position: relative; height: 20px; display: flex; align-items: center; cursor: pointer; }
.scrub .track { position: relative; width: 100%; height: 3px; background: rgba(255,255,255,.28); border-radius: 3px; transition: height .12s; }
.scrub:hover .track { height: 5px; }
.scrub .buf { position: absolute; left: 0; top: 0; height: 100%; background: rgba(255,255,255,.4); border-radius: 3px; }
.scrub .hoverfill { position: absolute; left: 0; top: 0; height: 100%; background: rgba(255,255,255,.32); border-radius: 3px; }
.scrub .played { position: absolute; left: 0; top: 0; height: 100%; background: var(--red); border-radius: 3px; }
.scrub .knob { position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%; background: var(--red);
  transform: translate(-50%,-50%) scale(0); transition: transform .12s; box-shadow: 0 0 0 4px rgba(255,0,51,.001); }
.scrub:hover .knob { transform: translate(-50%,-50%) scale(1); }
/* chapter ticks */
.scrub .chap { position: absolute; top: 50%; width: 2px; height: 9px; background: rgba(0,0,0,.55); transform: translateY(-50%); }
/* storyboard preview */
.sb-prev { position: absolute; bottom: 26px; transform: translateX(-50%); pointer-events: none; opacity: 0;
  transition: opacity .1s; z-index: 8; text-align: center; }
.scrub:hover .sb-prev { opacity: 1; }
.sb-prev .frame { width: 160px; height: 90px; border-radius: 8px; border: 2px solid #fff; background-repeat: no-repeat; box-shadow: 0 4px 14px rgba(0,0,0,.6); }
.sb-prev .t { margin-top: 5px; font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px #000; }
.sb-prev .ch { font-size: 11px; color: #fff; opacity: .85; text-shadow: 0 1px 3px #000; }

/* control row */
.pc-row { display: flex; align-items: center; gap: 6px; height: 46px; }
.pc-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: #fff; transition: background .12s, transform .12s; }
.pc-btn:hover { background: rgba(255,255,255,.14); }
.pc-btn:active { transform: scale(.9); }
.pc-btn svg { width: 26px; }
.pc-btn.small svg { width: 22px; }
.vol { display: flex; align-items: center; }
.vol .slider { width: 0; overflow: hidden; transition: width .2s; display: flex; align-items: center; }
.vol:hover .slider, .vol.open .slider { width: 76px; }
.vol input[type=range]{ width: 70px; margin: 0 6px; accent-color: #fff; height: 3px; cursor: pointer; }
.pc-time { font-size: 13px; color: #fff; font-variant-numeric: tabular-nums; padding: 0 8px; white-space: nowrap; }
.pc-time b { color: #fff; font-weight: 600; } .pc-time span { color: rgba(255,255,255,.75); }
.pc-spacer { flex: 1; }
.rate-menu, .settings-menu { position: absolute; bottom: 60px; right: 12px; background: rgba(28,28,28,.96);
  border-radius: 12px; padding: 8px; min-width: 200px; box-shadow: var(--shadow); z-index: 9; backdrop-filter: blur(6px); }
.rate-menu button, .settings-menu button { display: flex; width: 100%; justify-content: space-between; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: #fff; }
.rate-menu button:hover, .settings-menu button:hover { background: rgba(255,255,255,.12); }
.rate-menu button.on { color: var(--red-ink); font-weight: 700; }
.center-toast { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 6; }
.center-toast .bubble { background: rgba(0,0,0,.6); color: #fff; border-radius: 50%; width: 64px; height: 64px;
  display: grid; place-items: center; opacity: 0; transform: scale(.7); }
.center-toast .bubble svg { width: 30px; }
.center-toast .bubble.show { animation: toastpop .5s ease; }
@keyframes toastpop { 0%{opacity:.9;transform:scale(.7)} 100%{opacity:0;transform:scale(1.25)} }
.skip-ind { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.6); color: #fff;
  padding: 12px 18px; border-radius: 50px; font-weight: 700; font-size: 13px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 6; }
.skip-ind.left { left: 8%; } .skip-ind.right { right: 8%; }
.skip-ind.show { opacity: 1; }

/* autoplay end card */
.endcard { position: absolute; inset: 0; background: rgba(0,0,0,.85); display: grid; place-items: center; z-index: 7; opacity: 0; pointer-events: none; transition: opacity .3s; }
.endcard.show { opacity: 1; pointer-events: auto; }
.endcard .ec-inner { text-align: center; max-width: 460px; }
.endcard .ec-lbl { font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.endcard .ec-thumb { position: relative; width: 320px; max-width: 80vw; border-radius: 12px; overflow: hidden; margin: 0 auto 14px; aspect-ratio: 16/9; }
.endcard .ec-thumb img { width: 100%; height: 100%; object-fit: cover; }
.endcard .ec-ring { position: absolute; top: 12px; right: 12px; width: 48px; height: 48px; }
.endcard h3 { font-size: 17px; margin-bottom: 6px; }
.endcard .ec-cancel { margin-top: 14px; }

/* ---- below player ---- */
.wp-title { font-size: 20px; font-weight: 800; line-height: 1.3; margin: 16px 0 12px; letter-spacing: -.01em; }
.wp-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.channel-row { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 260px; }
.channel-row .ch-av { width: 42px; height: 42px; }
.channel-row .cr-name { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.channel-row .cr-subs { font-size: 12px; color: var(--ink-2); }

/* subscribe button — de-emphasis on convert */
.sub-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 40px;
  background: var(--ink); color: #0f0f0f; font-weight: 700; font-size: 14px; transition: background .18s, color .18s, transform .1s; }
.sub-btn:hover { background: #d3d3d3; }
.sub-btn:active { transform: scale(.96); }
.sub-btn.subd { background: var(--chip); color: var(--ink); }
.sub-btn.subd:hover { background: var(--chip-hover); }
.sub-btn .bell { width: 18px; }
.sub-btn.flash { animation: subFlash 1s ease; }
@keyframes subFlash { 0%,100%{box-shadow:0 0 0 0 rgba(255,255,255,0)} 30%{box-shadow:0 0 0 4px rgba(255,255,255,.55)} 60%{box-shadow:0 0 22px 3px rgba(255,0,51,.5)} }

/* like/dislike pill */
.pill-group { display: inline-flex; align-items: center; background: var(--chip); border-radius: 40px; height: 40px; overflow: hidden; }
.pill-group button { display: inline-flex; align-items: center; gap: 8px; height: 100%; padding: 0 15px; font-weight: 700; font-size: 14px; color: var(--ink); transition: background .12s; }
.pill-group button:hover { background: var(--chip-hover); }
.pill-group .divider { width: 1px; height: 24px; background: var(--line-2); }
.pill-group svg { width: 22px; overflow: visible; }
.like-btn.liked svg { color: var(--red-ink); }
.like-btn.liked .thumb-ico { animation: none; }
.like-btn .thumb-ico { transform-origin: 55% 70%; }
.like-btn.pop .thumb-ico { animation: likePop 220ms cubic-bezier(.34,1.56,.64,1); }
@keyframes likePop { 0%{transform:scale(1)} 45%{transform:scale(1.35) rotate(-8deg)} 100%{transform:scale(1)} }
.act-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 15px; border-radius: 40px;
  background: var(--chip); font-weight: 700; font-size: 14px; transition: background .12s; }
.act-btn:hover { background: var(--chip-hover); }
.act-btn svg { width: 22px; }

/* particle burst layer */
.burst { position: absolute; width: 0; height: 0; pointer-events: none; z-index: 50; }
.burst i { position: absolute; left: 0; top: 0; font-size: 15px; will-change: transform, opacity; }

/* description fold */
.desc { margin-top: 14px; background: var(--bg-1); border-radius: var(--r); padding: 13px 15px; font-size: 14px; cursor: pointer; transition: background .15s; }
.desc:hover { background: var(--bg-2); }
.desc.open { cursor: default; }
.desc .desc-meta { font-weight: 700; font-size: 14px; }
.desc .desc-body { white-space: pre-wrap; overflow: hidden; margin-top: 8px; color: var(--ink); }
.desc:not(.open) .desc-body { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.desc .chapters { margin-top: 16px; display: grid; gap: 4px; }
.desc .chapters h5 { font-size: 15px; margin-bottom: 6px; }
.desc .chap-link { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 8px; }
.desc .chap-link:hover { background: var(--bg-3); }
.desc .chap-link time { color: var(--red-ink); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; }
.desc .more { color: var(--ink); font-weight: 700; display: inline-block; margin-top: 6px; }

/* ---- comments ---- */
.comments { margin-top: 28px; }
.cm-head { display: flex; align-items: center; gap: 24px; margin-bottom: 24px; }
.cm-head h3 { font-size: 20px; font-weight: 800; }
.sort-btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; padding: 8px; border-radius: 8px; white-space: nowrap; }
.sort-btn svg { width: 22px; }
.sort-btn:hover { background: var(--bg-2); }
.sort-menu { position: relative; }
.sort-pop { position: absolute; top: 44px; left: 0; background: var(--bg-2); border-radius: 10px; padding: 8px 0; min-width: 160px; box-shadow: var(--shadow); z-index: 20; }
.sort-pop button { display: block; width: 100%; text-align: left; padding: 10px 16px; font-size: 14px; }
.sort-pop button:hover { background: var(--bg-3); }
.sort-pop button.on { font-weight: 800; }
.composer { display: flex; gap: 14px; margin-bottom: 30px; }
.composer .ch-av { width: 40px; height: 40px; flex: none; }
.composer .cbox { flex: 1; }
.composer textarea { width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--line-2);
  color: var(--ink); font: inherit; resize: none; padding: 6px 0; min-height: 26px; }
.composer textarea:focus { outline: none; border-bottom-color: var(--ink); }
.composer .cbtns { display: none; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.composer.focused .cbtns { display: flex; }
.comment { display: flex; gap: 14px; margin-bottom: 18px; }
.comment .ch-av { width: 40px; height: 40px; flex: none; }
.comment.reply .ch-av { width: 30px; height: 30px; }
.comment .c-body { flex: 1; min-width: 0; }
.c-head { display: flex; align-items: center; gap: 7px; font-size: 13px; margin-bottom: 3px; }
.c-head .who { font-weight: 700; }
.c-head .who.creator { background: var(--bg-3); padding: 1px 8px; border-radius: 20px; }
.c-head .age { color: var(--ink-2); }
.c-pin { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.c-pin svg { width: 15px; }
.c-text { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.c-text.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.c-readmore { color: var(--ink-2); font-weight: 700; font-size: 13px; margin-top: 2px; }
.c-actions { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.c-actions button { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); font-size: 12px; font-weight: 600; padding: 6px; border-radius: 20px; }
.c-actions button:hover { background: var(--bg-2); color: var(--ink); }
.c-actions .thumb-btn.on { color: var(--ink); }
.c-actions .thumb-btn.on svg { color: var(--red-ink); }
.c-actions svg { width: 16px; }
.c-actions .reply-btn { padding: 6px 12px; }
.hearted { position: relative; }
.hearted::after { content: ""; position: absolute; left: 20px; top: 20px; width: 16px; height: 16px;
  background: var(--red); border-radius: 50%; border: 2px solid var(--bg); }
.heart-badge { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12px; color: var(--ink-2); }
.heart-badge .mini-av { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 9px; color: #fff; position: relative; }
.heart-badge .mini-av .h { position: absolute; right: -4px; bottom: -4px; color: var(--red); font-size: 11px; }
.replies-toggle { color: #3ea6ff; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 8px; margin: 4px 0; border-radius: 20px; }
.replies-toggle:hover { background: rgba(62,166,255,.12); }
.replies-toggle svg { width: 24px; }
.replies { margin-top: 6px; }
.reply-composer { margin: 6px 0 14px 44px; }

/* ---- up next rail ---- */
.upnext .un-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.upnext .un-head b { font-size: 16px; font-weight: 700; }
.autoplay-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.switch { width: 36px; height: 14px; border-radius: 20px; background: var(--bg-3); position: relative; transition: background .2s; }
.switch::after { content: ""; position: absolute; left: 0; top: 50%; width: 20px; height: 20px; border-radius: 50%; background: var(--ink-2); transform: translateY(-50%); transition: transform .2s, background .2s; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.switch.on { background: rgba(255,0,51,.4); } .switch.on::after { transform: translate(18px,-50%); background: var(--red); }
.upnext .card.compact { margin-bottom: 8px; }

/* ================= CHANNEL PAGE ================= */
.ch-banner { height: 20vw; max-height: 240px; min-height: 120px; border-radius: var(--r-lg); margin-bottom: 20px; position: relative; overflow: hidden; }
.ch-head { display: flex; align-items: center; gap: 24px; margin-bottom: 8px; flex-wrap: wrap; }
.ch-head .ch-av { width: 120px; height: 120px; font-size: 44px; flex: none; }
.ch-head h1 { font-family: var(--f-brand); font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.ch-head .ch-stat { color: var(--ink-2); font-size: 14px; margin-top: 6px; }
.ch-head .ch-about { color: var(--ink-2); font-size: 14px; margin-top: 6px; max-width: 60ch; }
.ch-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin: 20px 0 24px; }
.ch-tab { padding: 12px 2px; font-weight: 700; color: var(--ink-2); border-bottom: 2px solid transparent; }
.ch-tab.active { color: var(--ink); border-bottom-color: var(--ink); }

/* ================= STUDIO ================= */
.studio { max-width: 1200px; }
.studio h1 { font-family: var(--f-brand); font-size: 28px; font-weight: 800; margin-bottom: 4px; letter-spacing: -.02em; }
.studio .sub { color: var(--ink-2); margin-bottom: 24px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 14px; margin-bottom: 28px; }
.stat-card { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.stat-card .k { font-size: 13px; color: var(--ink-2); }
.stat-card .v { font-family: var(--f-brand); font-size: 30px; font-weight: 800; margin: 6px 0 4px; letter-spacing: -.02em; }
.stat-card .d { font-size: 12px; font-weight: 700; }
.stat-card .d.up { color: #4ade80; } .stat-card .d.down { color: var(--red-ink); }
.panel { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; margin-bottom: 20px; }
.panel h3 { font-size: 16px; margin-bottom: 4px; }
.panel .panel-sub { font-size: 13px; color: var(--ink-2); margin-bottom: 18px; }
.retention-note { font-size: 12px; color: var(--ink-3); margin-top: 10px; }
.studio-table { width: 100%; border-collapse: collapse; }
.studio-table th { text-align: left; font-size: 12px; color: var(--ink-2); font-weight: 700; padding: 10px; border-bottom: 1px solid var(--line); }
.studio-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.studio-table .vrow { display: flex; align-items: center; gap: 12px; }
.studio-table .vrow img { width: 90px; border-radius: 6px; aspect-ratio: 16/9; object-fit: cover; }
.studio-table .vrow .t { font-weight: 600; font-size: 13px; }
.bar-cell { display: flex; align-items: center; gap: 8px; }
.bar-cell .bar { height: 6px; border-radius: 4px; background: var(--red); }
.studio-select { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.studio-select button { padding: 8px 14px; border-radius: 8px; background: var(--chip); font-weight: 600; font-size: 13px; }
.studio-select button.on { background: var(--ink); color: var(--bg); }

/* ================= UPLOAD ================= */
.upload { max-width: 720px; margin: 0 auto; }
.upload h1 { font-family: var(--f-brand); font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.dropzone { border: 2px dashed var(--line-2); border-radius: var(--r-lg); padding: 54px 24px; text-align: center; transition: border-color .2s, background .2s; cursor: pointer; }
.dropzone.drag { border-color: var(--red); background: rgba(255,0,51,.05); }
.dropzone svg { width: 70px; color: var(--ink-3); margin: 0 auto 16px; }
.dropzone h3 { font-size: 18px; margin-bottom: 6px; }
.dropzone p { color: var(--ink-2); font-size: 13px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; }
.field input, .field textarea, .field select { width: 100%; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 13px; color: var(--ink); font: inherit; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: #3a6ea5; }
.field textarea { min-height: 96px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.upload-preview { display: flex; gap: 14px; background: var(--bg-1); border-radius: 12px; padding: 12px; margin-bottom: 20px; align-items: center; }
.upload-preview video, .upload-preview .ph { width: 200px; aspect-ratio: 16/9; border-radius: 8px; background: #000; object-fit: cover; flex: none; }
.progress-bar { height: 6px; border-radius: 6px; background: var(--bg-3); overflow: hidden; margin-top: 8px; }
.progress-bar i { display: block; height: 100%; background: var(--red); transition: width .2s; }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 22px; border-radius: 40px; background: var(--red); color: #fff; font-weight: 800; font-size: 14px; transition: filter .15s, transform .1s; }
.btn-primary:hover { filter: brightness(1.12); } .btn-primary:active { transform: scale(.97); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

/* ================= REWIND (gimmick) ================= */
.rewind-hub h1 { font-family: var(--f-brand); font-size: clamp(30px,5vw,52px); font-weight: 800; letter-spacing: -.03em; }
.rewind-card { position: relative; border-radius: var(--r-lg); overflow: hidden; padding: 30px; background: linear-gradient(135deg,#1a1030,#3a0d2a); cursor: pointer; transition: transform .2s; }
.rewind-card:hover { transform: translateY(-3px); }
.recap-viewer { position: fixed; inset: 0; z-index: 200; background: #000; display: grid; place-items: center; }
.recap-stage { position: relative; width: min(440px, 94vw); height: min(90vh, 860px); border-radius: 20px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.recap-ticks { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; gap: 5px; z-index: 10; }
.recap-ticks .tick { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
.recap-ticks .tick i { display: block; height: 100%; width: 0; background: #fff; }
.recap-slide { position: absolute; inset: 0; padding: 60px 34px 40px; display: flex; flex-direction: column; justify-content: center; opacity: 0; transform: translateX(20px); transition: opacity .3s, transform .3s; }
.recap-slide.active { opacity: 1; transform: none; }
.recap-slide .kicker { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; opacity: .8; margin-bottom: 18px; }
.recap-slide .big { font-family: var(--f-brand); font-size: clamp(52px,15vw,92px); font-weight: 800; line-height: .95; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.recap-slide .cap { font-size: 20px; font-weight: 600; margin-top: 16px; max-width: 22ch; }
.recap-slide .sub { font-size: 14px; opacity: .8; margin-top: 10px; }
.recap-slide .persona-emoji { font-size: 84px; margin-bottom: 10px; }
.recap-nav { position: absolute; inset: 0; display: flex; z-index: 8; }
.recap-nav div { flex: 1; }
.recap-close { position: absolute; top: 14px; right: 14px; z-index: 12; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.4); display: grid; place-items: center; color: #fff; }
.recap-share { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 12; display: flex; gap: 10px; }
.count-up { font-variant-numeric: tabular-nums; }

/* ================= misc: toasts, dialogs, menus ================= */
.toast-host { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #f1f1f1; color: #0f0f0f; padding: 12px 18px; border-radius: 8px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); animation: toastIn .3s ease; display: flex; gap: 12px; align-items: center; }
.toast a { color: #065fd4; font-weight: 700; }
@keyframes toastIn { from{opacity:0; transform: translateY(12px)} }
.dialog-back { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 250; display: grid; place-items: center; padding: 20px; animation: fadeIn .2s; }
@keyframes fadeIn { from{opacity:0} }
.dialog { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; max-width: 460px; width: 100%; box-shadow: var(--shadow); }
.dialog h2 { font-size: 20px; margin-bottom: 10px; font-weight: 800; }
.dialog p { color: var(--ink-2); margin-bottom: 18px; }
.dialog .row { display: flex; gap: 10px; justify-content: flex-end; }
.menu-pop { position: absolute; background: var(--bg-2); border-radius: 12px; padding: 8px; box-shadow: var(--shadow); z-index: 80; min-width: 220px; }
.menu-pop button { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 11px 12px; border-radius: 8px; font-size: 14px; }
.menu-pop button:hover { background: var(--bg-3); }
.menu-pop button svg { width: 20px; }
.menu-pop .sep { height: 1px; background: var(--line); margin: 6px 0; }
.demo-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--ink-3);
  border: 1px solid var(--line-2); padding: 2px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: .05em; }

/* skeleton */
.skel { background: linear-gradient(90deg,var(--bg-1) 25%,var(--bg-2) 50%,var(--bg-1) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------- responsive ---------------- */
@media (max-width: 1300px){ body:not(.watch) .sidebar { width: var(--side-mini); }
  body:not(.watch) .side-link { flex-direction: column; gap: 6px; padding: 14px 4px; font-size: 10px; text-align: center; font-weight: 500; }
  body:not(.watch) .side-link .lbl-long, body:not(.watch) .side-sec h4, body:not(.watch) .side-sub, body:not(.watch) .side-note { display: none; }
  body:not(.watch) .main { margin-left: var(--side-mini); } }
@media (max-width: 900px){
  .tb-center { display: none; }
  .sidebar { display: none !important; }
  .main, body.mini .main, body:not(.watch) .main { margin-left: 0 !important; }
  .search-mobile-btn { display: grid !important; }
  .tb-right .btn-pill { display: none; }        /* upload lives in the bottom nav on mobile */
  .topbar { grid-template-columns: 1fr auto; gap: 8px; padding: 0 8px; }
  .tb-right { gap: 2px; }
}
.search-mobile-btn { display: none; }
@media (max-width: 640px){
  .main { padding: 12px; } body.watch .main { padding: 0 0 70px; }
  body.watch .wp-title, body.watch .wp-body-pad { padding-inline: 12px; }
  .player { border-radius: 0; }
  .feed { grid-template-columns: 1fr; gap: 20px; }
  .wp-actions { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 4px; }
  .wp-actions::-webkit-scrollbar { display: none; }
  .ch-head .ch-av { width: 80px; height: 80px; font-size: 30px; }
  .ch-head h1 { font-size: 24px; }
  .card.compact .thumb-wrap { width: 148px; }
}
/* bottom nav (mobile) */
.botnav { display: none; position: fixed; bottom: 0; left: 0; right: 0; height: 56px; background: rgba(15,15,15,.97);
  border-top: 1px solid var(--line); z-index: 70; }
.botnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; color: var(--ink-2); }
.botnav a.active { color: var(--ink); }
.botnav a svg { width: 22px; }
@media (max-width: 900px){ .botnav { display: flex; } .main { padding-bottom: 70px; } }

@media (prefers-reduced-motion: reduce){ *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .05ms !important; } }
