:root {
  --bg: #0e0e11;
  --bg-elev: #17171c;
  --bg-elev-2: #1f1f26;
  --bg-hover: #26262e;
  --text: #f3f3f5;
  --text-2: #a3a3ad;
  --text-3: #74747e;
  --border: #2a2a33;
  --accent: #b4f36d;
  --accent-ink: #11200a;
  --accent-text: #b4f36d;
  --danger: #ff6464;
  --overlay: rgba(0, 0, 0, .6);
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --radius: 12px;
  --top-h: 56px;
  --side-w: 232px;
  --bottom-h: 0px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-elev: #f3f3f6;
  --bg-elev-2: #eaeaef;
  --bg-hover: #e4e4ea;
  --text: #0f0f13;
  --text-2: #55555f;
  --text-3: #85858f;
  --border: #e0e0e6;
  --accent: #b4f36d;
  --accent-ink: #11200a;
  --accent-text: #3b7208;
  --danger: #d42e2e;
  --overlay: rgba(0, 0, 0, .45);
  --shadow: 0 10px 40px rgba(0, 0, 0, .15);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, video { display: block; max-width: 100%; }
svg { flex: none; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--top-h); z-index: 50;
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: var(--bg);
}
.topbar .left, .topbar .right { display: flex; align-items: center; gap: 4px; }
.topbar .right { margin-left: auto; gap: 8px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; letter-spacing: -.04em; padding: 0 6px; }
.logo .mark { width: 30px; height: 22px; border-radius: 7px; background: var(--accent); display: grid; place-items: center; }
.logo .mark svg { width: 12px; height: 12px; fill: var(--accent-ink); }
.logo b { color: var(--accent-text); font-weight: 800; }

.search { flex: 0 1 620px; margin: 0 auto; display: flex; align-items: center; }
.search form { display: flex; flex: 1; }
.search input {
  flex: 1; min-width: 0; height: 40px; padding: 0 16px; border: 1px solid var(--border); border-right: 0;
  border-radius: 20px 0 0 20px; background: var(--bg); outline: none;
}
.search input:focus { border-color: var(--accent-text); }
.search button[type=submit] {
  width: 64px; height: 40px; border: 1px solid var(--border); border-radius: 0 20px 20px 0;
  background: var(--bg-elev); display: grid; place-items: center;
}
.search .close { display: none; }
.search button svg { width: 22px; height: 22px; fill: currentColor; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent;
  display: inline-grid; place-items: center; position: relative;
}
.icon-btn:hover { background: var(--bg-hover); }
.icon-btn svg, .btn svg, .nav-item svg { width: 22px; height: 22px; fill: currentColor; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px;
  border-radius: 18px; border: 0; background: var(--bg-elev-2); font-weight: 600; white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); }
.btn svg { width: 20px; height: 20px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.dark { background: var(--text); color: var(--bg); }
.btn.dark:hover { opacity: .88; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--bg-hover); }
.btn.outline { background: transparent; border: 1px solid var(--border); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.active { background: var(--text); color: var(--bg); }

.avatar {
  border-radius: 50%; object-fit: cover; flex: none; display: grid; place-items: center;
  font-weight: 700; color: #fff; text-transform: uppercase; overflow: hidden; user-select: none;
}

/* ---------- sidebar ---------- */
.sidebar {
  position: fixed; top: var(--top-h); bottom: 0; left: 0; width: var(--side-w); z-index: 40;
  overflow-y: auto; padding: 8px 12px 24px; background: var(--bg); scrollbar-width: thin;
}
.nav-item {
  display: flex; align-items: center; gap: 20px; height: 40px; padding: 0 12px; border-radius: 10px;
  font-size: 14px; white-space: nowrap; overflow: hidden;
}
.nav-item:hover { background: var(--bg-hover); }
.nav-item.active { background: var(--bg-elev-2); font-weight: 600; }
.nav-item .avatar { width: 24px; height: 24px; font-size: 11px; }
.nav-sep { height: 1px; background: var(--border); margin: 10px 4px; }
.nav-title { padding: 6px 12px; font-weight: 600; font-size: 15px; }
.nav-foot { padding: 12px; color: var(--text-3); font-size: 12px; }
.scrim { position: fixed; inset: 0; background: var(--overlay); z-index: 45; }

body.mini .sidebar { width: 72px; padding: 4px; }
body.mini .sidebar .nav-item { flex-direction: column; gap: 6px; height: 74px; justify-content: center; font-size: 10px; padding: 0; }
body.mini .sidebar .full-only { display: none; }

/* ---------- main ---------- */
main { padding: calc(var(--top-h) + 8px) 24px calc(var(--bottom-h) + 32px) calc(var(--side-w) + 24px); min-height: 100vh; }
body.mini main { padding-left: 96px; }
body.no-side main { padding-left: 24px; }
body.no-side .sidebar:not(.open) { display: none; }

.bottom-nav { display: none; }

.page-title { font-size: 22px; font-weight: 700; margin: 8px 0 16px; letter-spacing: -.01em; }
.muted { color: var(--text-2); }
.small { font-size: 12px; }
.empty { text-align: center; padding: 72px 16px; color: var(--text-2); }
.empty svg { width: 64px; height: 64px; fill: var(--text-3); margin-bottom: 12px; }
.empty h2 { color: var(--text); font-size: 18px; margin: 0 0 6px; }
.empty .btn { margin-top: 16px; }
.spinner {
  width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin .8s linear infinite; margin: 48px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sentinel { height: 1px; }

/* ---------- chips ---------- */
.chips {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 14px; scrollbar-width: none;
  position: sticky; top: var(--top-h); background: var(--bg); z-index: 5;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 32px; padding: 0 12px; border-radius: 8px; border: 0; background: var(--bg-elev-2);
  font-weight: 600; font-size: 13.5px; text-transform: capitalize;
}
.chip:hover { background: var(--bg-hover); }
.chip.active { background: var(--text); color: var(--bg); }

/* ---------- video grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 36px 16px; }
.card { min-width: 0; position: relative; }
.thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-elev-2); display: block;
}
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb .ph {
  width: 100%; height: 100%; display: grid; place-items: center; padding: 16px; text-align: center;
  font-weight: 700; font-size: 16px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.3);
}
.thumb .dur {
  position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.8); color: #fff;
  font-size: 12px; font-weight: 600; padding: 1px 5px; border-radius: 5px;
}
.thumb .prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.35); }
.thumb .prog i { display: block; height: 100%; background: var(--accent); }
.thumb .preview { position: absolute; inset: 0; opacity: 0; transition: opacity .2s; }
.thumb .preview.on { opacity: 1; }
.card .meta { display: flex; gap: 12px; margin-top: 12px; }
.card .meta .avatar { width: 36px; height: 36px; font-size: 14px; }
.card .info { min-width: 0; flex: 1; padding-right: 24px; }
.card h3 {
  margin: 0 0 4px; font-size: 15.5px; line-height: 1.35; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .sub { color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.card .sub a:hover { color: var(--text); }
.card .more { position: absolute; right: -10px; top: -4px; width: 36px; height: 36px; opacity: 0; }
.card:hover .more, .card .more:focus, .card .more.open { opacity: 1; }
.vis-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); }
.vis-badge svg { width: 14px; height: 14px; fill: currentColor; }

/* list layout (search, trending, library lists) */
.list { display: flex; flex-direction: column; gap: 16px; }
.list .card { display: flex; gap: 16px; }
.list .card .thumb { width: 360px; flex: none; }
.list .card .meta { margin-top: 0; flex: 1; min-width: 0; }
.list .card h3 { font-size: 18px; font-weight: 500; -webkit-line-clamp: 2; }
.list .card .desc { color: var(--text-2); font-size: 12.5px; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list .card .chan { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; color: var(--text-2); font-size: 13px; }
.list .card .chan .avatar { width: 24px; height: 24px; font-size: 10px; }
.list .card .more { right: 0; top: 0; }
.rank { width: 28px; flex: none; font-size: 18px; font-weight: 700; color: var(--text-3); padding-top: 4px; text-align: center; }

/* compact (up next) */
.compact .card { display: flex; gap: 8px; }
.compact .card .thumb { width: 168px; flex: none; border-radius: 8px; }
.compact .card .meta { margin-top: 0; }
.compact .card .meta .avatar { display: none; }
.compact .card h3 { font-size: 14px; }
.compact .card .sub { font-size: 12px; }
.compact .card .more { right: -8px; top: -6px; }
.compact { display: flex; flex-direction: column; gap: 10px; }

/* ---------- row shelves (library) ---------- */
.shelf { margin-bottom: 36px; }
.shelf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.shelf-head h2 { font-size: 20px; margin: 0; display: flex; align-items: center; gap: 12px; }
.shelf-head h2 svg { width: 24px; height: 24px; fill: currentColor; }
.shelf .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px 12px; }
.shelf .card h3 { font-size: 14px; }

/* ---------- watch page ---------- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 402px; grid-template-areas: "player side" "info side" "comments side"; gap: 0 24px; max-width: 1760px; margin: 0 auto; }
.watch.theater { grid-template-columns: minmax(0, 1fr) 402px; grid-template-areas: "player player" "info side" "comments side"; }
.watch .player-area { grid-area: player; }
.watch .info-area { grid-area: info; min-width: 0; }
.watch .side-area { grid-area: side; min-width: 0; }
.watch .comments-area { grid-area: comments; min-width: 0; }
.player-wrap { position: relative; background: #000; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; max-height: calc(100vh - 160px); width: 100%; }
.watch.theater .player-wrap { border-radius: 0; max-height: calc(100vh - 120px); aspect-ratio: auto; height: calc(100vh - 160px); }
.player-wrap video { width: 100%; height: 100%; background: #000; object-fit: contain; }
.player-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.player-tools .chapter-now { margin-right: auto; color: var(--text-2); font-size: 13px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.player-tools .chapter-now svg { width: 18px; height: 18px; fill: currentColor; }
.player-tools .chapter-now span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-tools select { height: 32px; border-radius: 16px; border: 0; padding: 0 10px; background: var(--bg-elev-2); font-weight: 600; font-size: 13px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; padding: 0 6px; height: 32px; }
.toggle input { display: none; }
.toggle .sw { width: 32px; height: 18px; border-radius: 9px; background: var(--bg-hover); position: relative; transition: background .15s; }
.toggle .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-2); transition: transform .15s, background .15s; }
.toggle input:checked + .sw { background: var(--accent); }
.toggle input:checked + .sw::after { transform: translateX(14px); background: var(--accent-ink); }

.upnext-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.82); color: #fff; display: grid; place-items: center; text-align: center; padding: 16px;
}
.upnext-overlay .box { max-width: 360px; }
.upnext-overlay .t { font-size: 13px; opacity: .75; }
.upnext-overlay h4 { margin: 6px 0 14px; font-size: 18px; }
.upnext-overlay .ring { font-size: 36px; font-weight: 800; margin-bottom: 8px; }
.upnext-overlay .btns { display: flex; gap: 8px; justify-content: center; }
.upnext-overlay .btn { background: rgba(255,255,255,.15); color: #fff; }
.upnext-overlay .btn.primary { background: var(--accent); color: var(--accent-ink); }

.watch h1 { font-size: 20px; line-height: 1.35; margin: 12px 0 10px; font-weight: 700; word-break: break-word; }
.owner-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.channel-mini { display: flex; align-items: center; gap: 12px; min-width: 0; }
.channel-mini .avatar { width: 40px; height: 40px; font-size: 16px; }
.channel-mini .n { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel-mini .s { color: var(--text-2); font-size: 12px; }
.channel-mini .btn { margin-left: 12px; }
.actions { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.actions::-webkit-scrollbar { display: none; }
.rate { display: flex; background: var(--bg-elev-2); border-radius: 18px; position: relative; flex: none; }
.rate .btn { background: transparent; border-radius: 0; }
.rate .btn:first-child { border-radius: 18px 0 0 18px; }
.rate .btn:last-child { border-radius: 0 18px 18px 0; }
.rate .btn:hover { background: var(--bg-hover); }
.rate .div { width: 1px; background: var(--border); margin: 6px 0; }
.rate .btn.on svg { fill: var(--accent-text); }
.ratio { position: absolute; left: 14px; right: 14px; bottom: -6px; height: 3px; border-radius: 2px; background: var(--bg-hover); overflow: hidden; }
.ratio i { display: block; height: 100%; background: var(--accent-text); }

.desc-box { background: var(--bg-elev); border-radius: var(--radius); padding: 12px; margin-top: 16px; font-size: 14px; }
.desc-box .dstats { font-weight: 600; margin-bottom: 4px; }
.desc-box .dstats .tag { color: var(--accent-text); font-weight: 500; margin-left: 6px; }
.desc-box .body { white-space: pre-wrap; word-break: break-word; }
.desc-box.collapsed .body { max-height: 4.4em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 50%, transparent); mask-image: linear-gradient(#000 50%, transparent); }
.desc-box .toggle-more { background: none; border: 0; padding: 4px 0 0; font-weight: 700; }
a.ts, .linkish { color: var(--accent-text); cursor: pointer; }
a.ts:hover, .linkish:hover { text-decoration: underline; }
.desc-box a.ext { color: var(--accent-text); word-break: break-all; }
.chapters { display: flex; gap: 10px; overflow-x: auto; margin-top: 12px; padding-bottom: 4px; scrollbar-width: thin; }
.chapter { flex: none; width: 180px; text-align: left; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); padding: 8px 10px; }
.chapter:hover { background: var(--bg-hover); }
.chapter.on { border-color: var(--accent-text); }
.chapter b { display: block; font-size: 12px; color: var(--accent-text); }
.chapter span { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.side-area .chips { position: static; padding-top: 0; }
.playlist-panel { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.playlist-panel .head { padding: 12px 16px; background: var(--bg-elev); }
.playlist-panel .head h3 { margin: 0; font-size: 18px; }
.playlist-panel .items { max-height: 400px; overflow-y: auto; }
.pl-item { display: flex; gap: 8px; align-items: center; padding: 6px 12px 6px 4px; }
.pl-item:hover { background: var(--bg-hover); }
.pl-item.on { background: var(--bg-elev-2); }
.pl-item .idx { width: 24px; text-align: center; font-size: 12px; color: var(--text-2); flex: none; }
.pl-item .thumb { width: 100px; flex: none; border-radius: 6px; }
.pl-item .thumb .ph { font-size: 9px; padding: 4px; }
.pl-item .t { font-size: 13px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-item .c { font-size: 12px; color: var(--text-2); }

/* ---------- comments ---------- */
.comments { margin-top: 24px; }
.comments-head { display: flex; align-items: center; gap: 24px; margin-bottom: 20px; }
.comments-head h2 { font-size: 20px; margin: 0; }
.comment-form { display: flex; gap: 12px; margin-bottom: 28px; }
.comment-form .avatar { width: 40px; height: 40px; font-size: 16px; }
.comment-form.reply .avatar { width: 24px; height: 24px; font-size: 11px; }
.comment-form .fields { flex: 1; min-width: 0; }
.comment-form textarea {
  width: 100%; border: 0; border-bottom: 1px solid var(--border); background: transparent; resize: none;
  padding: 4px 0 6px; outline: none; min-height: 30px; overflow: hidden;
}
.comment-form textarea:focus { border-bottom: 2px solid var(--text); }
.comment-form .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.comment { display: flex; gap: 12px; margin-bottom: 20px; }
.comment > .avatar { width: 40px; height: 40px; font-size: 16px; }
.comment.reply > .avatar { width: 24px; height: 24px; font-size: 11px; }
.comment .c-body { flex: 1; min-width: 0; }
.comment .c-top { font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.comment .c-top b { font-weight: 600; }
.comment .c-top .creator { background: var(--bg-hover); padding: 0 8px; border-radius: 10px; font-weight: 600; }
.comment .c-text { margin: 2px 0 4px; white-space: pre-wrap; word-break: break-word; }
.comment .c-actions { display: flex; align-items: center; gap: 4px; margin-left: -8px; }
.comment .c-actions .icon-btn { width: 32px; height: 32px; }
.comment .c-actions .icon-btn svg { width: 18px; height: 18px; }
.comment .c-actions .icon-btn.on svg { fill: var(--accent-text); }
.comment .c-actions .n { font-size: 12px; color: var(--text-2); min-width: 12px; margin-right: 8px; }
.comment .replies-toggle { color: var(--accent-text); font-weight: 600; background: none; border: 0; border-radius: 18px; padding: 6px 10px; margin-left: -10px; display: inline-flex; align-items: center; gap: 6px; }
.comment .replies-toggle:hover { background: var(--bg-hover); }
.comment .replies-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.comment .replies { margin-top: 8px; }

/* ---------- channel ---------- */
.channel-head { display: flex; align-items: center; gap: 24px; padding: 16px 0 8px; max-width: 1280px; margin: 0 auto; }
.channel-head .avatar { width: 140px; height: 140px; font-size: 56px; }
.channel-head h1 { margin: 0 0 6px; font-size: 32px; letter-spacing: -.02em; word-break: break-word; }
.channel-head .line { color: var(--text-2); }
.channel-head .line b { color: var(--text); font-weight: 600; }
.channel-head .bio { color: var(--text-2); margin: 8px 0 12px; max-width: 640px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.channel-head .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--border); margin: 8px auto 20px; max-width: 1280px; overflow-x: auto; }
.tab { background: none; border: 0; padding: 12px 12px; font-weight: 600; color: var(--text-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--text); }
.channel-body { max-width: 1280px; margin: 0 auto; }
.about { max-width: 720px; }
.about .bio { white-space: pre-wrap; margin-bottom: 20px; }
.about .row { display: flex; align-items: center; gap: 12px; padding: 8px 0; color: var(--text-2); }
.about .row svg { width: 22px; height: 22px; fill: currentColor; }

.pl-card .thumb::after {
  content: ''; position: absolute; inset: 0 0 0 auto; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.7));
}
.pl-card .count { position: absolute; right: 8px; bottom: 8px; z-index: 1; color: #fff; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 4px; background: rgba(0,0,0,.7); padding: 2px 6px; border-radius: 5px; }
.pl-card .count svg { width: 16px; height: 16px; fill: #fff; }
.pl-card h3 { margin-top: 10px; }

.channel-row { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.channel-row a { flex: none; width: 76px; text-align: center; font-size: 12px; }
.channel-row .avatar { width: 64px; height: 64px; font-size: 24px; margin: 0 auto 6px; }
.channel-row span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.channel-result { display: flex; align-items: center; gap: 24px; padding: 12px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.channel-result .avatar { width: 120px; height: 120px; font-size: 44px; margin: 0 60px 0 120px; }
.channel-result .grow { flex: 1; min-width: 0; }
.channel-result h3 { margin: 0 0 4px; font-size: 18px; font-weight: 500; }

/* ---------- playlist page ---------- */
.pl-page { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 24px; align-items: start; }
.pl-hero {
  position: sticky; top: calc(var(--top-h) + 8px); border-radius: 16px; padding: 20px; overflow: hidden;
  background: linear-gradient(160deg, var(--bg-elev-2), var(--bg-elev));
}
.pl-hero .thumb { margin-bottom: 16px; }
.pl-hero h1 { font-size: 26px; margin: 0 0 8px; word-break: break-word; }
.pl-hero .btns { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.pl-list .row { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 10px; }
.pl-list .row:hover { background: var(--bg-hover); }
.pl-list .row .idx { width: 24px; text-align: center; color: var(--text-2); flex: none; }
.pl-list .row .thumb { width: 160px; flex: none; border-radius: 8px; }
.pl-list .row .t { flex: 1; min-width: 0; }
.pl-list .row .t b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }
.pl-list .row .t span { font-size: 12px; color: var(--text-2); }

/* ---------- forms ---------- */
.form-page { max-width: 760px; margin: 0 auto; }
.auth { max-width: 420px; margin: 40px auto; background: var(--bg-elev); border-radius: 20px; padding: 32px; }
.auth h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.02em; }
.auth .logo { padding: 0; margin-bottom: 20px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field small { display: block; color: var(--text-3); font-size: 12px; margin-top: 4px; }
.input, .field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--border); background: var(--bg); border-radius: 10px; padding: 10px 12px; outline: none;
}
.field textarea { resize: vertical; min-height: 120px; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent-text); }
.form-error { color: var(--danger); margin: 0 0 12px; font-size: 13px; }
.auth .btn { width: 100%; height: 42px; border-radius: 10px; margin-top: 4px; }
.auth .alt { margin-top: 18px; text-align: center; color: var(--text-2); }
.auth .alt a { color: var(--accent-text); font-weight: 600; }

.drop {
  border: 2px dashed var(--border); border-radius: 20px; padding: 56px 20px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--accent-text); background: var(--bg-elev); }
.drop .big { width: 120px; height: 120px; border-radius: 50%; background: var(--bg-elev-2); display: grid; place-items: center; margin: 0 auto 20px; }
.drop .big svg { width: 56px; height: 56px; fill: var(--text-2); }
.drop h2 { margin: 0 0 6px; font-size: 18px; }
.drop p { color: var(--text-2); margin: 0 0 20px; }

.upload-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.preview-card { background: var(--bg-elev); border-radius: var(--radius); overflow: hidden; position: sticky; top: calc(var(--top-h) + 8px); }
.preview-card video { width: 100%; aspect-ratio: 16 / 9; background: #000; object-fit: contain; }
.preview-card .p { padding: 12px; font-size: 13px; }
.preview-card .p div { margin-bottom: 6px; word-break: break-all; }
.thumb-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.thumb-pick { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: var(--bg-elev-2); padding: 0; }
.thumb-pick img { width: 100%; height: 100%; object-fit: cover; }
.thumb-pick.on { border-color: var(--accent-text); }
.thumb-pick.add { display: grid; place-items: center; border: 1px dashed var(--border); color: var(--text-2); font-size: 12px; text-align: center; padding: 4px; }
.thumb-pick.add svg { width: 22px; height: 22px; fill: currentColor; margin: 0 auto 2px; }
.vis-options { display: grid; gap: 8px; }
.vis-opt { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.field .vis-opt input, .vis-opt input { width: auto; flex: none; margin-top: 3px; accent-color: var(--accent-text); }
.vis-opt b { display: block; }
.vis-opt span { color: var(--text-2); font-size: 12.5px; }
.vis-opt:has(input:checked) { border-color: var(--accent-text); }
.progress { height: 8px; border-radius: 4px; background: var(--bg-elev-2); overflow: hidden; margin: 10px 0 6px; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }
.notice { background: var(--bg-elev); border-left: 3px solid var(--accent-text); border-radius: 8px; padding: 10px 12px; color: var(--text-2); font-size: 13px; margin-bottom: 16px; }
.notice.err { border-left-color: var(--danger); color: var(--text); }

/* ---------- studio ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { background: var(--bg-elev); border-radius: var(--radius); padding: 16px; }
.stat b { display: block; font-size: 26px; letter-spacing: -.02em; }
.stat span { color: var(--text-2); font-size: 13px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.studio { width: 100%; border-collapse: collapse; min-width: 760px; }
table.studio th, table.studio td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.studio th { font-size: 12px; color: var(--text-2); font-weight: 600; background: var(--bg-elev); }
table.studio tr:last-child td { border-bottom: 0; }
table.studio tr:hover td { background: var(--bg-elev); }
table.studio .vid { display: flex; gap: 12px; align-items: center; min-width: 300px; }
table.studio .vid .thumb { width: 120px; flex: none; border-radius: 6px; }
table.studio .vid .thumb .ph { font-size: 10px; padding: 4px; }
table.studio .vid b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }
table.studio .num { text-align: right; white-space: nowrap; }
table.studio .row-actions { display: flex; gap: 4px; justify-content: flex-end; }

/* ---------- shorts ---------- */
body.shorts-mode main { padding-top: var(--top-h); padding-bottom: 0; padding-right: 0; }
.shorts { height: calc(100vh - var(--top-h) - var(--bottom-h)); overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; }
.shorts::-webkit-scrollbar { display: none; }
.short { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; justify-content: center; align-items: center; gap: 16px; padding: 12px 0; }
.short .stage { position: relative; height: 100%; aspect-ratio: 9 / 16; max-width: 100%; border-radius: 16px; overflow: hidden; background: #000; }
.short video { width: 100%; height: 100%; object-fit: cover; }
.short .overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 16px 16px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.short .overlay .ch { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 8px; }
.short .overlay .ch .avatar { width: 32px; height: 32px; font-size: 13px; }
.short .overlay .ch .btn { height: 30px; padding: 0 12px; background: #fff; color: #000; font-size: 13px; }
.short .overlay .ch .btn.subbed { background: rgba(255,255,255,.2); color: #fff; }
.short .overlay p { margin: 0; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.short .mute { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,.45); color: #fff; }
.short .mute:hover { background: rgba(0,0,0,.65); }
.short .paused { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.short .paused svg { width: 72px; height: 72px; fill: rgba(255,255,255,.85); filter: drop-shadow(0 2px 8px rgba(0,0,0,.4)); }
.short .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.25); }
.short .bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.short .rail { display: flex; flex-direction: column; gap: 14px; align-self: flex-end; padding-bottom: 8px; }
.short .rail button, .short .rail a { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; font-size: 12px; font-weight: 600; }
.short .rail .circle { width: 48px; height: 48px; border-radius: 50%; background: var(--bg-elev-2); display: grid; place-items: center; }
.short .rail .circle:hover { background: var(--bg-hover); }
.short .rail svg { width: 24px; height: 24px; fill: currentColor; }
.short .rail .on svg { fill: var(--accent-text); }

/* ---------- menus, modals, toasts ---------- */
.menu {
  position: fixed; z-index: 200; min-width: 220px; background: var(--bg-elev); border-radius: 12px; padding: 8px 0;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.menu button, .menu a { display: flex; align-items: center; gap: 14px; width: 100%; padding: 9px 16px; border: 0; background: none; text-align: left; font-size: 14px; }
.menu button:hover, .menu a:hover { background: var(--bg-hover); }
.menu svg { width: 20px; height: 20px; fill: currentColor; }
.menu .who { display: flex; gap: 12px; padding: 8px 16px 12px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.menu .who .avatar { width: 40px; height: 40px; font-size: 16px; }
.menu .who a { padding: 0; color: var(--accent-text); font-size: 13px; margin-top: 2px; }
.menu .sep { height: 1px; background: var(--border); margin: 8px 0; }

.modal-back { position: fixed; inset: 0; background: var(--overlay); z-index: 300; display: grid; place-items: center; padding: 16px; animation: fade .12s; }
.modal { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--bg-elev); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); }
.modal h2 { margin: 0 0 16px; font-size: 18px; display: flex; align-items: center; justify-content: space-between; }
.modal .check { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; }
.modal .check input { width: 18px; height: 18px; accent-color: var(--accent-text); }
.modal .check .grow { flex: 1; }
.modal .check svg { width: 18px; height: 18px; fill: var(--text-2); }
.modal .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.share-row { display: flex; gap: 8px; }
.share-row input { flex: 1; min-width: 0; }
@keyframes fade { from { opacity: 0; } }

.toasts { position: fixed; left: 16px; bottom: calc(var(--bottom-h) + 16px); z-index: 400; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); max-width: min(420px, calc(100vw - 32px)); animation: rise .2s; font-weight: 500; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1312px) {
  body:not(.no-side) { --side-w: 72px; }
  body:not(.no-side) .sidebar { width: 72px; padding: 4px; }
  body:not(.no-side) .sidebar .nav-item { flex-direction: column; gap: 6px; height: 74px; justify-content: center; font-size: 10px; padding: 0; }
  body:not(.no-side) .sidebar .full-only { display: none; }
  body:not(.no-side) main { padding-left: 96px; }
  .sidebar.open { width: 240px !important; padding: 8px 12px 24px !important; box-shadow: var(--shadow); }
  .sidebar.open .nav-item { flex-direction: row !important; gap: 20px !important; height: 40px !important; justify-content: flex-start !important; font-size: 14px !important; padding: 0 12px !important; }
  .sidebar.open .full-only { display: block !important; }
  .sidebar.open .nav-item.full-only { display: flex !important; }
}
@media (max-width: 1100px) {
  .watch, .watch.theater { grid-template-columns: minmax(0, 1fr); grid-template-areas: "player" "info" "side" "comments"; }
  .watch .side-area { margin-top: 24px; }
  .player-wrap, .watch.theater .player-wrap { max-height: 70vh; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius); }
  .theater-btn { display: none !important; }
  .compact .card .thumb { width: 168px; }
  .upload-layout { grid-template-columns: minmax(0, 1fr); }
  .preview-card { position: static; }
  .pl-page { grid-template-columns: minmax(0, 1fr); }
  .pl-hero { position: static; }
  .channel-result .avatar { margin: 0 12px 0 0; width: 88px; height: 88px; font-size: 32px; }
}
@media (max-width: 860px) {
  .list .card .thumb { width: 240px; }
  .list .card h3 { font-size: 15px; }
}
@media (max-width: 720px) {
  :root { --top-h: 52px; --bottom-h: 56px; }
  .topbar { padding: 0 8px; gap: 4px; }
  .topbar .menu-btn { display: none; }
  .logo { font-size: 18px; }
  .search { display: none; flex: 1; }
  body.searching .search { display: flex; position: absolute; inset: 0; background: var(--bg); padding: 0 8px; gap: 4px; z-index: 2; }
  body.searching .search .close { display: inline-grid; }
  .search-toggle { display: inline-grid !important; }
  .topbar .upload-btn { display: none; }
  .sidebar { display: none; }
  .sidebar.open { display: block; width: 260px !important; }
  main, body.mini main, body:not(.no-side) main, body.no-side main { padding: calc(var(--top-h) + 4px) 12px calc(var(--bottom-h) + 24px); }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--bottom-h) + env(safe-area-inset-bottom)); z-index: 50;
    background: var(--bg); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; color: var(--text-2); }
  .bottom-nav a.active { color: var(--text); }
  .bottom-nav svg { width: 24px; height: 24px; fill: currentColor; }
  .bottom-nav .plus { width: 40px; height: 32px; border-radius: 16px; background: var(--bg-elev-2); display: grid; place-items: center; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 24px; margin: 0 -12px; }
  .grid .thumb { border-radius: 0; }
  .grid .card .meta { padding: 0 12px; }
  .grid .card .more { right: 2px; top: auto; opacity: 1; }
  .grid .card .meta { position: relative; }
  .shelf .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; gap: 16px 10px; }
  .shelf .grid .thumb { border-radius: 8px; }
  .shelf .grid .card .meta { padding: 0; }
  .shelf .grid .card .meta .avatar { display: none; }
  .list .card { flex-direction: column; gap: 10px; }
  .list .card .thumb { width: 100%; }
  .list .card .more { opacity: 1; top: auto; bottom: 0; }
  .list.trending .card { flex-direction: row; }
  .list.trending .card .thumb { width: 44%; }
  .list.trending .card h3 { font-size: 14px; }
  .list.trending .card .desc, .list.trending .card .chan .avatar { display: none; }
  .rank { display: none; }
  .watch { margin: 0 -12px; }
  .watch .info-area, .watch .side-area, .watch .comments-area { padding: 0 12px; }
  .watch .player-area .player-tools { padding: 0 12px; }
  .player-wrap, .watch.theater .player-wrap { border-radius: 0; }
  .watch h1 { font-size: 17px; }
  .owner-row { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .channel-mini { justify-content: space-between; }
  .compact .card .thumb { width: 150px; }
  .channel-head { flex-direction: column; text-align: center; gap: 12px; }
  .channel-head .avatar { width: 96px; height: 96px; font-size: 40px; }
  .channel-head h1 { font-size: 24px; }
  .channel-head .bio { margin-left: auto; margin-right: auto; }
  .channel-head .btns { justify-content: center; }
  .auth { margin: 12px auto; padding: 24px 18px; }
  .thumb-picks { grid-template-columns: repeat(2, 1fr); }
  .short { padding: 0; }
  .short .stage { border-radius: 0; width: 100%; aspect-ratio: auto; }
  .short .rail { position: absolute; right: 8px; bottom: 90px; color: #fff; }
  .short .rail .circle { background: rgba(0,0,0,.35); }
  .short .overlay { padding-right: 76px; }
  body.shorts-mode main { padding-left: 0 !important; padding-right: 0 !important; }
  .channel-result .avatar { width: 64px; height: 64px; font-size: 24px; }
  .pl-list .row .thumb { width: 120px; }
  .toasts { left: 12px; right: 12px; }
}
@media (min-width: 721px) { .search-toggle { display: none !important; } }
@media (hover: none) { .card .more { opacity: 1; } }

/* ---------- plans, badges, perks ---------- */
:root { --gold: #f2c14e; --gold-ink: #2a1d00; --pro: #b4f36d; }
:root[data-theme="light"] { --gold: #c8950f; --pro: #3b7208; }
.badge {
  display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px 0 5px; border-radius: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em; vertical-align: middle; white-space: nowrap; flex: none;
}
.badge svg { width: 12px; height: 12px; fill: currentColor; }
.badge.pro { color: var(--pro); background: color-mix(in srgb, var(--pro) 16%, transparent); }
.badge.prestige { color: var(--gold); background: color-mix(in srgb, var(--gold) 18%, transparent); }
h1 .badge { margin-left: 10px; height: 24px; font-size: 12px; }
.badge-dot { display: inline-grid; place-items: center; margin-left: 4px; vertical-align: -2px; }
.badge-dot svg { width: 14px; height: 14px; }
.badge-dot.pro svg { fill: var(--pro); }
.badge-dot.prestige svg { fill: var(--gold); }
.channel-mini .n .badge-dot svg { width: 16px; height: 16px; }

.comment.hl { padding: 10px 12px; margin-left: -12px; border-radius: 12px; border-left: 3px solid var(--pro); background: color-mix(in srgb, var(--pro) 7%, transparent); }
.comment.hl-prestige { border-left-color: var(--gold); background: color-mix(in srgb, var(--gold) 8%, transparent); }
.comment .pinned { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.comment .pinned svg { width: 14px; height: 14px; fill: currentColor; }

.channel-banner { max-width: 1280px; margin: 0 auto 8px; aspect-ratio: 6.2 / 1; border-radius: 16px; overflow: hidden; background: var(--bg-elev-2); }
.channel-banner img { width: 100%; height: 100%; object-fit: cover; }
.channel-banner.small { max-width: 640px; margin: 0; }
.tabs .tab.active { border-bottom-color: var(--accent-text); }
.color-in { width: 48px; height: 36px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); cursor: pointer; }
.plan-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--bg-elev); border-radius: var(--radius); padding: 16px; }

.plans-page { max-width: 1080px; margin: 0 auto; }
.plans-hero { text-align: center; padding: 24px 16px 32px; }
.plans-hero h1 { font-size: clamp(32px, 6vw, 52px); letter-spacing: -.04em; margin: 0 0 12px; }
.plans-hero p { color: var(--text-2); font-size: 16px; max-width: 560px; margin: 0 auto; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { display: flex; flex-direction: column; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 20px; padding: 24px; }
.plan.pro { border-color: color-mix(in srgb, var(--pro) 45%, var(--border)); }
.plan.prestige { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 12px 40px color-mix(in srgb, var(--gold) 15%, transparent); }
.plan.current { outline: 2px solid var(--text); outline-offset: 3px; }
.plan-name { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
.plan .price { margin: 12px 0 4px; }
.plan .price b { font-size: 40px; letter-spacing: -.03em; }
.plan .price span { color: var(--text-2); margin-left: 4px; }
.plan p { margin: 0 0 16px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.plan li { display: flex; gap: 10px; padding: 6px 0; align-items: flex-start; }
.plan li svg { width: 18px; height: 18px; fill: var(--pro); flex: none; margin-top: 1px; }
.plan.prestige li svg { fill: var(--gold); }
.plan .btn { width: 100%; height: 42px; border-radius: 12px; }
.btn.gold { background: var(--gold); color: var(--gold-ink); }
@media (max-width: 900px) {
  .plans { grid-template-columns: minmax(0, 1fr); }
  .channel-banner:not(.small) { border-radius: 0; margin: -4px -12px 8px; aspect-ratio: 4 / 1; }
}

/* ---------- clips-first ---------- */
.thumb.tall .bgblur { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(18px) brightness(.65); transform: scale(1.2); }
.thumb.tall .fg { position: absolute; inset: 0; object-fit: contain; }
.thumb .clip-tag {
  position: absolute; left: 8px; top: 8px; z-index: 1; display: inline-flex; align-items: center; gap: 3px;
  background: rgba(0,0,0,.72); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 7px 2px 5px; border-radius: 6px;
}
.thumb .clip-tag svg { width: 12px; height: 12px; fill: var(--pro); }
.thumb .dur { z-index: 1; }
.shelf-head h2.section-title { font-size: 20px; }
.long-shelf { margin: 32px 0 36px; padding: 16px; border-radius: 16px; background: var(--bg-elev); }
.long-shelf .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px 12px; margin: 0; }

.short.wide .stage { height: auto; aspect-ratio: 16 / 9; width: min(calc(100% - 90px), 1100px, calc((100vh - var(--top-h) - 24px) * 16 / 9)); }
.short.wide video { object-fit: contain; }

details.more-opts { border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; margin-bottom: 16px; }
details.more-opts > summary { cursor: pointer; padding: 12px 0; font-weight: 600; list-style-position: inside; }
details.more-opts[open] > summary { margin-bottom: 4px; }

@media (max-width: 720px) {
  .long-shelf { margin: 24px 0; padding: 12px; }
  .long-shelf .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
  .long-shelf .grid .thumb { border-radius: 8px; }
  .long-shelf .grid .card .meta { padding: 0; }
  .shelf-head h2.section-title { margin-left: 0; }
  .short.wide .stage { width: 100%; height: 100%; aspect-ratio: auto; }
}

/* ---------- player size: Standard / Theater / Fullscreen ---------- */
.seg { display: inline-flex; background: var(--bg-elev-2); border-radius: 16px; padding: 2px; gap: 2px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 14px; background: transparent; font-size: 13px; font-weight: 600; color: var(--text-2); }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--text); color: var(--bg); }
.seg svg { width: 18px; height: 18px; fill: currentColor; }
.player-wrap:fullscreen { border-radius: 0; max-height: none; aspect-ratio: auto; width: 100vw; height: 100vh; }

body.theater-mode main { padding-left: 0; padding-right: 0; }
.watch.theater {
  max-width: none; gap: 0 24px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1310px) 402px minmax(0, 1fr);
  grid-template-areas: "player player player player" ". info side ." ". comments side .";
}
.watch.theater .player-area { background: #000; margin-top: -8px; }
.watch.theater .player-wrap { border-radius: 0; aspect-ratio: auto; max-height: none; height: min(calc(100vh - var(--top-h) - 56px), 56.25vw); }
.watch.theater .player-tools { background: var(--bg); margin-top: 0; padding: 8px 24px 0; }

@media (max-width: 1100px) {
  body.theater-mode main { padding-left: 24px; padding-right: 24px; }
  .watch.theater { grid-template-columns: minmax(0, 1fr); grid-template-areas: "player" "info" "side" "comments"; }
  .watch.theater .player-area { background: none; margin-top: 0; }
  .watch.theater .player-wrap { height: auto; aspect-ratio: 16 / 9; max-height: 70vh; border-radius: var(--radius); }
  .watch.theater .player-tools { padding: 0; margin-top: 8px; }
  .seg .theater-btn { display: none; }
}
@media (max-width: 720px) {
  body.theater-mode main { padding: calc(var(--top-h) + 4px) 12px calc(var(--bottom-h) + 24px); }
  .watch.theater .player-wrap { border-radius: 0; }
  .watch.theater .player-tools { padding: 0 12px; }
  .seg button span { display: none; }
}

/* ---------- clips: comments panel, double-tap heart ---------- */
.clip-comments {
  position: fixed; z-index: 60; top: var(--top-h); right: 0; bottom: 0; width: min(440px, 100vw);
  background: var(--bg-elev); border-left: 1px solid var(--border); box-shadow: var(--shadow);
  display: flex; flex-direction: column; animation: slidein .18s ease-out;
}
.clip-comments .cp-head { display: flex; align-items: center; gap: 8px; padding: 10px 8px 10px 16px; border-bottom: 1px solid var(--border); }
.clip-comments .cp-head b { font-size: 16px; margin-right: auto; }
.clip-comments .cp-body { flex: 1; overflow-y: auto; padding: 0 16px 24px; }
.clip-comments .comments { margin-top: 12px; }
.clip-comments .comments-head h2 { font-size: 16px; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
@media (max-width: 720px) {
  .clip-comments { top: auto; left: 0; width: 100%; height: 72vh; border-left: 0; border-radius: 16px 16px 0 0; bottom: 0; z-index: 70; animation-name: slideup; }
  @keyframes slideup { from { transform: translateY(40px); opacity: 0; } }
}
.heart-burst { position: absolute; z-index: 3; pointer-events: none; transform: translate(-50%, -50%); animation: heart .8s ease-out forwards; }
.heart-burst svg { width: 96px; height: 96px; fill: #ff4d6d; filter: drop-shadow(0 4px 14px rgba(0,0,0,.4)); }
@keyframes heart { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 20% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 60% { transform: translate(-50%, -60%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -90%) scale(.9); opacity: 0; } }

/* ---------- comments: edit ---------- */
.edit-form textarea { min-height: 70px; resize: vertical; margin: 4px 0; }
.edit-form .row { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- profile: @ input, links ---------- */
.at-input { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); overflow: hidden; }
.at-input:focus-within { border-color: var(--accent-text); }
.at-input > span { padding: 0 2px 0 12px; color: var(--text-2); font-weight: 600; }
.field .at-input input { border: 0; padding-left: 2px; background: transparent; }
.handle-status.good { color: var(--accent-text) !important; }
.handle-status.bad { color: var(--danger) !important; }
.links-rows { display: grid; gap: 8px; margin-bottom: 8px; }
.link-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) 40px; gap: 8px; align-items: center; }
.link-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 12px; }
.link-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--bg-elev-2); font-size: 13px; font-weight: 600; color: var(--accent-text); }
.link-chip svg { width: 16px; height: 16px; fill: currentColor; }
@media (max-width: 720px) {
  .link-row { grid-template-columns: minmax(0, 1fr) 40px; }
  .link-row input:first-child { grid-column: 1 / -1; }
  .link-chips { justify-content: center; }
}

/* =====================================================================
   Hottake identity: header tabs instead of a sidebar, bolt mark,
   clip wall with real aspect ratios, elevated cards.
   ===================================================================== */
:root { --page-max: 1680px; }
.logo .mark { width: 30px; height: 30px; border-radius: 50%; }
.logo .mark svg { width: 18px; height: 18px; }

/* No sidebar anywhere; the header tabs and account menu replace it. */
.sidebar, .menu-btn, .scrim { display: none !important; }
main#app { padding-left: 24px; padding-right: 24px; }
@media (min-width: 721px) { :where(main#app) > :where(*) { max-width: var(--page-max); margin-left: auto; margin-right: auto; } }
body.theater-mode main#app { padding-left: 0; padding-right: 0; }
body.theater-mode main#app > .watch { max-width: none; }
body.shorts-mode main#app { padding-left: 0; padding-right: 0; }

.topbar { gap: 16px; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.topnav { display: flex; gap: 2px; margin-left: 12px; }
.topnav a { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.topnav a:hover { color: var(--text); background: var(--bg-elev-2); }
.topnav a.active { color: var(--accent-ink); background: var(--accent); }
.topnav svg { width: 18px; height: 18px; fill: currentColor; }

/* Search: one pill with the icon inside */
.search { flex: 0 1 460px; margin: 0 0 0 auto; }
.search form { background: var(--bg-elev-2); border-radius: 12px; border: 1px solid transparent; }
.search form:focus-within { border-color: var(--accent-text); background: var(--bg); }
.search input { border: 0 !important; background: transparent; border-radius: 12px 0 0 12px; height: 38px; }
.search button[type=submit] { width: 44px; height: 38px; border: 0; background: transparent; border-radius: 0 12px 12px 0; }
.topbar .right { margin-left: 8px; }

/* Hashtag chips */
.chips { top: var(--top-h); padding-top: 12px; }
.chip { border-radius: 999px; text-transform: none; background: transparent; border: 1px solid var(--border); }
.chip:hover { background: var(--bg-elev-2); }
.chip.active { background: var(--text); border-color: var(--text); }

/* Clip wall */
.wall { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.wall-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.tile { position: relative; display: block; border-radius: 18px; overflow: hidden; background: var(--bg-elev-2); isolation: isolate; }
.tile img, .tile .ph, .tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile video { opacity: 0; transition: opacity .2s; }
.tile video.on { opacity: 1; }
.tile .ph { font-size: 14px; }
.tile .dur { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 999px; backdrop-filter: blur(6px); }
.tile .tile-meta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 40px 12px 12px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.82)); }
.tile .tile-meta b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14.5px; line-height: 1.3; }
.tile .by { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; opacity: .9; min-width: 0; }
.tile .by .avatar { width: 20px; height: 20px; font-size: 10px; }
.tile .by .h { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.tile .by .v { margin-left: auto; white-space: nowrap; opacity: .85; }
.tile .badge-dot svg { width: 12px; height: 12px; }
.tile:hover { transform: translateY(-2px); transition: transform .15s; }
.tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Cards (Videos, profiles, library): elevated tiles instead of floating thumbnails */
.grid .card { background: var(--bg-elev); border-radius: 18px; padding: 8px 8px 12px; transition: background .15s; }
.grid .card:hover { background: var(--bg-elev-2); }
.grid .card .thumb { border-radius: 12px; }
.grid .card .meta { padding: 0 4px; }
.grid .card .more { right: 0; top: auto; bottom: 6px; }

@media (max-width: 1100px) {
  .topnav span { display: none; }
  .topnav a { padding: 0 10px; }
}
@media (max-width: 720px) {
  .topnav { display: none; }
  main#app, body.theater-mode main#app { padding-left: 12px; padding-right: 12px; }
  body.shorts-mode main#app { padding-left: 0; padding-right: 0; }
  .wall { gap: 8px; }
  .wall-col { gap: 8px; }
  .tile { border-radius: 14px; }
  .tile .tile-meta { padding: 28px 8px 8px; }
  .tile .tile-meta b { font-size: 13px; }
  .tile .by .v { display: none; }
  .grid .card { background: none; padding: 0; border-radius: 0; }
  .grid .card .more { bottom: auto; }
}
.upnext { background: var(--bg-elev); border-radius: 18px; padding: 14px; }
.upnext h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 15px; }
.upnext h3 svg { width: 18px; height: 18px; fill: var(--accent-text); }
.upnext .compact .card:hover { background: var(--bg-elev-2); border-radius: 10px; }
@media (max-width: 720px) { .upnext { background: none; padding: 0; } }

/* =====================================================================
   VOLT — Hottake design system
   Electric yellow → orange → red-orange brand gradient, warm glass surfaces, glow.
   ===================================================================== */
:root {
  --bg: #0b0907;
  --bg-elev: #17120c;
  --bg-elev-2: #221a11;
  --bg-hover: #30251a;
  --surface-glass: rgba(28, 21, 13, .64);
  --text: #fff8ee;
  --text-2: #cdbfab;
  --text-3: #918371;
  --border: rgba(255, 170, 60, .16);
  --border-strong: rgba(255, 170, 60, .34);
  --accent: #ff9f0a;
  --accent-text: #ffc53d;
  --accent-ink: #1a0e00;
  --cyan: #ffd60a; --violet: #ff8a00; --pink: #ff3d2e; --amber: #fbbf24;
  --grad-ink: #1a0e00;
  --grad: linear-gradient(120deg, #ffe14d 0%, #ff9f0a 48%, #ff4d2e 100%);
  --grad-text: var(--grad);
  --grad-hot: linear-gradient(120deg, #ffb000 0%, #ff4d2e 100%);
  --glow: 0 12px 40px -12px rgba(255, 138, 0, .75), 0 8px 28px -14px rgba(255, 61, 46, .7);
  --glow-soft: 0 10px 30px -18px rgba(255, 138, 0, .8);
  --ring: 0 0 0 3px rgba(255, 138, 0, .35);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .7);
  --overlay: rgba(10, 7, 3, .68);
  --danger: #fb7185;
  --pro: #a3e635;
  --gold: #fbbf24; --gold-ink: #2b1d00;
  --radius: 18px;
  --font: "Plus Jakarta Sans", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
:root[data-theme="light"] {
  --bg: #fffaf3;
  --bg-elev: #ffffff;
  --bg-elev-2: #fff1de;
  --bg-hover: #ffe5c4;
  --surface-glass: rgba(255, 255, 255, .7);
  --text: #1c140a;
  --text-2: #5d4a34;
  --text-3: #9b8b75;
  --border: rgba(180, 90, 10, .16);
  --border-strong: rgba(180, 90, 10, .30);
  --accent: #ea580c;
  --accent-text: #c2410c;
  --grad: linear-gradient(120deg, #fbbf24 0%, #f97316 50%, #ef4444 100%);
  --grad-text: linear-gradient(120deg, #d97706 0%, #ea580c 50%, #dc2626 100%);
  --cyan: #f59e0b; --violet: #f97316; --pink: #ef4444;
  --accent-ink: #1a0e00;
  --glow: 0 14px 36px -14px rgba(234, 88, 12, .45), 0 8px 24px -14px rgba(255, 61, 46, .5);
  --glow-soft: 0 10px 28px -18px rgba(234, 88, 12, .45);
  --shadow: 0 24px 60px -24px rgba(90, 45, 0, .22);
  --overlay: rgba(45, 25, 5, .4);
  --danger: #e11d48;
  --pro: #4d7c0f;
  --gold: #d97706;
}

html { scrollbar-color: var(--bg-hover) transparent; }
body { font-family: var(--font); font-size: 14.5px; letter-spacing: -.005em; background: var(--bg); }
::selection { background: rgba(255, 159, 10, .45); color: inherit; }

/* Aurora backdrop */
body::before {
  content: ''; position: fixed; inset: -20vh -10vw auto; height: 90vh; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 50% at 15% 20%, rgba(255, 214, 10, .16), transparent 70%),
    radial-gradient(45% 55% at 55% 0%, rgba(255, 138, 0, .22), transparent 70%),
    radial-gradient(40% 50% at 90% 25%, rgba(255, 61, 46, .16), transparent 70%);
  filter: blur(20px);
}
:root[data-theme="light"] body::before {
  background:
    radial-gradient(40% 50% at 15% 20%, rgba(255, 214, 10, .18), transparent 70%),
    radial-gradient(45% 55% at 55% 0%, rgba(255, 138, 0, .16), transparent 70%),
    radial-gradient(40% 50% at 90% 25%, rgba(255, 61, 46, .14), transparent 70%);
}
body.shorts-mode::before { opacity: .5; }

/* Gradient text helper */
.grad-text, .logo b { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Header: frosted glass */
.topbar {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--grad); opacity: .45; }
.logo { font-weight: 800; font-size: 20px; letter-spacing: -.045em; }
.logo .mark { background: var(--grad); box-shadow: var(--glow-soft); }
.logo .mark svg { fill: var(--grad-ink); }
.topnav a { border-radius: 12px; font-weight: 700; }
.topnav a:hover { background: var(--bg-elev-2); }
.topnav a.active { background: var(--grad); color: var(--grad-ink); box-shadow: var(--glow-soft); }
.search form { background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 14px; }
.search form:focus-within { border-color: var(--border-strong); box-shadow: var(--ring); background: var(--bg-elev); }

/* Buttons */
.btn { border-radius: 12px; font-weight: 700; background: var(--bg-elev-2); border: 1px solid var(--border); transition: transform .12s, box-shadow .15s, background .15s; }
.btn:hover { background: var(--bg-hover); }
.btn:active { transform: translateY(1px); }
.btn.primary, .btn.dark { background: var(--grad); color: var(--grad-ink); border-color: transparent; box-shadow: var(--glow-soft); }
.btn.primary:hover, .btn.dark:hover { filter: brightness(1.08); box-shadow: var(--glow); opacity: 1; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--bg-elev-2); }
.btn.outline { background: transparent; border-color: var(--border-strong); }
.btn.danger { background: linear-gradient(120deg, #f43f5e, #e11d48); border-color: transparent; }
.btn.gold { background: linear-gradient(120deg, #fde68a, #fbbf24 45%, #f59e0b); color: #2b1d00; border-color: transparent; box-shadow: 0 10px 30px -14px rgba(251, 191, 36, .8); }
.btn:disabled { box-shadow: none; }
.upload-btn { background: var(--grad) !important; color: var(--grad-ink) !important; border-color: transparent !important; box-shadow: var(--glow-soft); }
.icon-btn:hover { background: var(--bg-elev-2); }

/* Chips */
.chips { background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(14px); }
.chip { border: 1px solid var(--border); font-weight: 700; }
.chip.active { background: var(--grad); color: var(--grad-ink); border-color: transparent; box-shadow: var(--glow-soft); }

/* Section heads */
.page-title { font-size: 30px; font-weight: 800; letter-spacing: -.035em; }
.shelf-head h2, .shelf-head h2.section-title { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.shelf-head h2 svg { fill: url(#none); fill: var(--accent-text); }

/* Clip wall tiles */
.tile { border-radius: 22px; box-shadow: 0 0 0 1px var(--border); transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s; }
.tile:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 0 0 2px var(--violet), var(--glow); }
.tile .tile-meta { background: linear-gradient(transparent, rgba(12, 9, 5, .88)); }
.tile .tile-meta b { font-weight: 800; letter-spacing: -.01em; }
.tile .dur, .thumb .dur, .thumb .clip-tag { background: rgba(12, 9, 5, .62); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; }

/* Cards */
.grid .card { background: var(--surface-glass); border: 1px solid var(--border); border-radius: 22px; backdrop-filter: blur(10px); transition: transform .2s, box-shadow .2s, border-color .2s; }
.grid .card:hover { background: var(--surface-glass); transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--glow-soft); }
.grid .card .thumb, .thumb { border-radius: 16px; }
.card h3 { font-weight: 700; }
.long-shelf, .upnext { background: var(--surface-glass); border: 1px solid var(--border); backdrop-filter: blur(12px); border-radius: 24px; }
.compact .card { border-radius: 14px; padding: 4px; }
.compact .card .thumb { border-radius: 12px; }

/* Watch page */
.player-wrap { border-radius: 22px; box-shadow: 0 30px 80px -30px rgba(255, 138, 0, .55), 0 0 0 1px var(--border); }
.watch h1 { font-size: 22px; font-weight: 800; letter-spacing: -.025em; }
.rate { background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 12px; }
.rate .btn { border: 0; }
.rate .btn:first-child { border-radius: 12px 0 0 12px; }
.rate .btn:last-child { border-radius: 0 12px 12px 0; }
.rate .btn.on { color: var(--accent-text); }
.ratio i { background: var(--grad); }
.desc-box { background: var(--surface-glass); border: 1px solid var(--border); border-radius: 18px; }
.chapter { border-radius: 14px; background: var(--bg-elev); }
.chapter.on { border-color: transparent; box-shadow: 0 0 0 2px var(--violet); }
.seg { background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 12px; }
.seg button { border-radius: 10px; }
.seg button.on { background: var(--grad); color: var(--grad-ink); }
.player-tools select { background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 10px; }
.toggle input:checked + .sw { background: var(--grad); }
.toggle input:checked + .sw::after { background: var(--grad-ink); }
.upnext-overlay .btn.primary { background: var(--grad); color: var(--grad-ink); }

/* Comments */
.comment-form textarea:focus { border-bottom: 2px solid var(--violet); }
.comment .c-top .creator { background: var(--grad); color: var(--grad-ink); }
.comment .c-actions .icon-btn.on svg { fill: var(--pink); }
.comment.hl { border-left-color: var(--pro); background: color-mix(in srgb, var(--pro) 8%, transparent); }
.comment.hl-prestige { border-left-color: var(--gold); background: color-mix(in srgb, var(--gold) 9%, transparent); }

/* Inputs */
.input, .field input, .field textarea, .field select, .at-input {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .field input:focus, .field textarea:focus, .field select:focus, .at-input:focus-within { border-color: var(--border-strong); box-shadow: var(--ring); }
.field .at-input input:focus { box-shadow: none; }

/* Menus, modals, toasts */
.menu, .modal { background: color-mix(in srgb, var(--bg-elev) 92%, transparent); backdrop-filter: blur(20px); border: 1px solid var(--border); border-radius: 18px; }
.menu { overflow: hidden; }
.menu::before, .modal::before { content: ''; display: block; height: 3px; background: var(--grad); margin: -8px 0 8px; }
.modal::before { margin: -20px -20px 16px; }
.menu button:hover, .menu a:hover { background: var(--bg-elev-2); }
.toast { background: var(--grad); color: var(--grad-ink); box-shadow: var(--glow); border-radius: 14px; font-weight: 700; }
.progress i, .short .bar i { background: var(--grad); }

/* Bottom nav */
.bottom-nav { background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(180%) blur(18px); }
.bottom-nav a.active { color: var(--accent-text); }
.bottom-nav .plus { background: var(--grad); box-shadow: var(--glow-soft); }
.bottom-nav .plus svg { fill: var(--grad-ink); }

/* Clips player */
.short .stage { border-radius: 24px; box-shadow: 0 30px 80px -30px rgba(255, 138, 0, .6), 0 0 0 1px var(--border); }
.short .rail .circle { background: var(--surface-glass); border: 1px solid var(--border); backdrop-filter: blur(10px); }
.short .rail .on svg { fill: var(--pink); }
.short .overlay .ch .btn { background: var(--grad); color: var(--grad-ink); border: 0; }
.short .overlay .ch .btn.subbed { background: rgba(255, 255, 255, .2); }
.clip-comments { background: color-mix(in srgb, var(--bg-elev) 94%, transparent); backdrop-filter: blur(20px); }

/* Profiles */
.channel-head h1 { font-size: 36px; font-weight: 800; letter-spacing: -.04em; }
.channel-head .avatar { box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--violet), var(--glow); }
.channel-banner { border-radius: 24px; box-shadow: 0 0 0 1px var(--border); }
.tabs .tab.active { border-bottom: 3px solid transparent; border-image: var(--grad) 1; }
.link-chip { background: var(--surface-glass); border: 1px solid var(--border); }

/* Studio, stats, settings, plans */
.stat { background: var(--surface-glass); border: 1px solid var(--border); border-radius: 20px; position: relative; overflow: hidden; }
.stat b { font-size: 30px; font-weight: 800; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.table-wrap { border-radius: 20px; background: var(--surface-glass); }
.plan-box, .notice { border-radius: 16px; background: var(--surface-glass); border: 1px solid var(--border); }
.notice { border-left: 3px solid var(--violet); }
.notice.err { border-left-color: var(--danger); }
.auth { background: var(--surface-glass); border: 1px solid var(--border); backdrop-filter: blur(16px); border-radius: 28px; box-shadow: var(--shadow); }
.auth h1 { font-weight: 800; }
.drop { border-radius: 28px; border-color: var(--border-strong); background: var(--surface-glass); }
.drop:hover, .drop.over { border-color: var(--violet); box-shadow: var(--glow-soft); }
.drop .big { background: var(--grad); box-shadow: var(--glow); }
.drop .big svg { fill: var(--grad-ink); }
.thumb-pick.on { border-color: var(--violet); box-shadow: var(--glow-soft); }
.plans-hero h1 { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: clamp(40px, 7vw, 72px); }
.plan { background: var(--surface-glass); border-radius: 26px; backdrop-filter: blur(12px); transition: transform .2s; }
.plan:hover { transform: translateY(-4px); }
.plan.pro { border-color: color-mix(in srgb, var(--pro) 50%, var(--border)); box-shadow: 0 20px 50px -25px rgba(255, 214, 10, .55); }
.plan.prestige { position: relative; border: 1px solid transparent; background: linear-gradient(var(--bg-elev), var(--bg-elev)) padding-box, linear-gradient(120deg, #fde68a, #f59e0b, #ff3d2e, #fde68a) border-box; background-size: 100% 100%, 300% 300%; animation: prestige 6s linear infinite; box-shadow: 0 24px 60px -25px rgba(251, 191, 36, .6); }
@keyframes prestige { to { background-position: 0 0, 300% 0; } }
.plan li svg { fill: var(--pro); }
.badge.pro { color: var(--pro); background: color-mix(in srgb, var(--pro) 15%, transparent); }
.badge.prestige { color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, transparent); }

/* Home hero (signed-out visitors) */
.hero {
  position: relative; overflow: hidden; border-radius: 28px; padding: 44px 40px; margin: 8px 0 24px;
  background: var(--surface-glass); border: 1px solid var(--border);
}
.hero::before {
  content: ''; position: absolute; inset: -40%; z-index: -1;
  background: conic-gradient(from 0deg, rgba(255, 214, 10, .35), rgba(255, 138, 0, .35), rgba(255, 61, 46, .35), rgba(255, 214, 10, .35));
  filter: blur(60px); animation: spin 18s linear infinite;
}
.hero h1 { margin: 0 0 10px; font-size: clamp(34px, 5.5vw, 64px); line-height: 1.02; font-weight: 800; letter-spacing: -.05em; max-width: 14ch; }
.hero p { margin: 0 0 22px; font-size: 17px; color: var(--text-2); max-width: 46ch; }
.hero .btns { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn { height: 44px; padding: 0 20px; font-size: 15px; }
.hero .pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.hero .pills span { font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--bg-elev-2); border: 1px solid var(--border); }

@media (max-width: 720px) {
  .page-title { font-size: 24px; }
  .hero { padding: 28px 20px; border-radius: 22px; }
  .hero p { font-size: 15px; }
  .channel-head h1 { font-size: 26px; }
  .tile { border-radius: 16px; }
  .grid .card { background: none; border: 0; backdrop-filter: none; }
  .grid .card:hover { transform: none; box-shadow: none; }
  .short .stage { border-radius: 0; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { .hero::before, .plan.prestige { animation: none; } .tile:hover, .grid .card:hover, .plan:hover { transform: none; } }
@media (max-width: 720px) {
  .player-wrap, .watch.theater .player-wrap { border-radius: 0; box-shadow: none; }
}
@media (max-width: 720px) {
  .hero { padding: 22px 18px; margin: 4px 0 14px; }
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 14.5px; margin-bottom: 16px; }
  .hero .btns { flex-wrap: nowrap; }
  .hero .btns .btn { flex: 1; height: 42px; padding: 0 12px; font-size: 14px; }
  .hero .pills { display: none; }
}
.empty > svg { fill: var(--accent-text); opacity: .8; }
.empty .btn svg { width: 20px; height: 20px; margin: 0; fill: currentColor; opacity: 1; }
