/* ---- YooToob theme (dark, YouTube-flavored) ------------------------------- */
:root {
  --bg: #0f0f0f;
  --bg-2: #181818;
  --bg-3: #212121;
  --hover: #272727;
  --chip: #272727;
  --chip-hover: #3d3d3d;
  --text: #f1f1f1;
  --text-2: #aaa;
  --text-3: #717171;
  --border: #303030;
  --brand: #f03;
  --blue: #3ea6ff;
  --topbar-h: 56px;
  --sidebar-w: 240px;
  --sidebar-mini-w: 72px;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Roboto, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img { display: block; }
html { scrollbar-color: #3d3d3d transparent; }
body.light { scrollbar-color: #c1c1c1 transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: #3d3d3d; border-radius: 6px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #4d4d4d; }
::-webkit-scrollbar-track { background: transparent; }
body.light::-webkit-scrollbar-thumb { background: #c1c1c1; }
body.light::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

/* ---- Topbar ---------------------------------------------------------------- */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; background: var(--bg); z-index: 100; gap: 16px;
}
.tb-left { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tb-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
#logo { display: flex; align-items: center; padding: 8px; border-radius: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; color: var(--text); flex-shrink: 0;
}
.icon-btn:hover { background: var(--hover); }
.icon-btn svg { width: 24px; height: 24px; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px;
  border-radius: 18px; background: var(--chip); font-size: 14px; font-weight: 500;
}
.pill-btn:hover { background: var(--chip-hover); }
.pill-btn svg { width: 20px; height: 20px; }
.avatar-btn {
  width: 32px; height: 32px; border-radius: 50%; background: #5c6bc0; color: #fff;
  font-weight: 600; font-size: 15px; margin-left: 8px;
}

#search-form { display: flex; align-items: center; gap: 12px; flex: 0 1 640px; }
#search-box {
  flex: 1; display: flex; align-items: center; height: 40px; padding: 0 4px 0 16px;
  background: #121212; border: 1px solid var(--border); border-radius: 20px 0 0 20px;
}
#search-box:focus-within { border-color: #1c62b9; }
#search-input {
  flex: 1; background: none; border: 0; outline: 0; color: var(--text);
  font-size: 16px; min-width: 0;
}
#search-input::placeholder { color: var(--text-3); }
/* desktop: keep the clear-X for the mobile search overlay only */
@media (min-width: 769px) { #search-clear { display: none !important; } }
#search-btn {
  width: 64px; height: 40px; border-radius: 0 20px 20px 0;
  background: var(--bg-3); border: 1px solid var(--border); border-left: 0;
}
#search-btn:hover { background: var(--chip-hover); }

/* ---- Shell / sidebar -------------------------------------------------------- */
#shell { display: flex; padding-top: var(--topbar-h); min-height: 100vh; }
#sidebar {
  position: fixed; top: var(--topbar-h); bottom: 0; left: 0;
  width: var(--sidebar-w); overflow-y: auto; overflow-x: hidden;
  padding: 12px; background: var(--bg); z-index: 90;
  scrollbar-width: thin; scrollbar-color: transparent transparent;
}
#sidebar:hover { scrollbar-color: #4d4d4d transparent; }
body.light #sidebar:hover { scrollbar-color: #c1c1c1 transparent; }
#sidebar::-webkit-scrollbar { width: 8px; }
#sidebar::-webkit-scrollbar-thumb { background: transparent; border: none; border-radius: 4px; }
#sidebar:hover::-webkit-scrollbar-thumb { background: #4d4d4d; }
body.light #sidebar:hover::-webkit-scrollbar-thumb { background: #c1c1c1; }
.side-item {
  display: flex; align-items: center; gap: 24px; padding: 0 12px;
  height: 40px; border-radius: 10px; font-size: 14px; white-space: nowrap;
}
.side-item:hover { background: var(--hover); }
.side-item.active { background: var(--hover); font-weight: 500; }
.side-item svg { width: 24px; height: 24px; flex-shrink: 0; }
.side-item img { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; }
.side-sep { border-top: 1px solid var(--border); margin: 12px 0; }
.side-head { padding: 6px 12px; font-size: 16px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.side-head svg { width: 20px; height: 20px; }

body.mini #sidebar { width: var(--sidebar-mini-w); padding: 4px; }
body.mini .side-item {
  flex-direction: column; gap: 6px; height: 64px; justify-content: center;
  font-size: 10px; padding: 0; border-radius: 10px;
}
body.mini .side-item .lbl { display: block; }
body.mini .side-sep, body.mini .side-head,
body.mini .side-item .lbl-full, body.mini .side-subs,
body.mini .side-item.full-only { display: none; }
.side-item .lbl-mini { display: none; }
body:not(.mini) .side-item.mini-only { display: none; }
.side-foot { padding: 16px 12px 8px; font-size: 12px; }
.side-foot a { color: var(--text-2); }
.side-foot a:hover { color: var(--text); text-decoration: underline; }
.side-legal { margin-top: 10px; font-size: 10.5px; line-height: 1.5; color: var(--text-3); }
body.mini .side-foot { display: none; }
body.mini .side-item .lbl-mini { display: block; }
body.mini .side-item .lbl-full { display: none; }

#page { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }
body.mini #page { margin-left: var(--sidebar-mini-w); }

#mobile-nav { display: none; }
#m-search-btn, #search-back, #m-acct-btn { display: none; }

/* ---- Chips ------------------------------------------------------------------- */
.chips {
  position: sticky; top: var(--topbar-h); z-index: 50; display: flex; gap: 12px;
  padding: 12px 24px; background: var(--bg); overflow-x: auto; scrollbar-width: none;
  touch-action: pan-x pan-y; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch; cursor: grab;
}
.chips.dragging { cursor: grabbing; }
.chips.dragging .chip { pointer-events: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 7px 12px; border-radius: 8px; background: var(--chip);
  font-size: 14px; font-weight: 500; white-space: nowrap;
}
.chip:hover { background: var(--chip-hover); }
.chip.active { background: var(--text); color: #0f0f0f; }

/* ---- Video grid & cards ------------------------------------------------------- */
.video-grid {
  display: grid; gap: 16px; row-gap: 40px; padding: 24px;
  grid-template-columns: repeat(3, 1fr);
}
.v-card { display: flex; flex-direction: column; cursor: pointer; min-width: 0; }
.v-thumb { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; background: var(--bg-3); }
.v-thumb img { width: 100%; height: 100%; object-fit: cover; transition: border-radius .2s; }
.v-card:hover .v-thumb img { border-radius: 0; }

/* Channels browse page */
.chan-grid {
  display: grid; gap: 24px; row-gap: 32px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.chan-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 24px 16px; border-radius: var(--radius); transition: background .15s;
}
.chan-card:hover { background: var(--bg-2); }
.chan-card img { width: 96px; height: 96px; border-radius: 50%; margin-bottom: 12px; }
.chan-name { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.chan-meta { font-size: 12px; color: var(--text-2); margin-top: 4px; }

/* boot splash (position/bg/z-index are inline in index.html for instant paint) */
#splash img { width: min(180px, 42vw); filter: drop-shadow(0 10px 40px rgba(255, 0, 50, .35)); animation: splashPulse 1.6s ease-in-out infinite; }
@keyframes splashPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* ---- Loading skeleton (first paint before bootstrap) --------------------------- */
@keyframes skel { 0% { opacity: .5; } 50% { opacity: 1; } 100% { opacity: .5; } }
.skel-card { display: flex; flex-direction: column; gap: 10px; }
.skel-thumb { border-radius: var(--radius); aspect-ratio: 16/9; background: var(--bg-3); animation: skel 1.6s ease-in-out infinite; }
.skel-line { height: 14px; border-radius: 7px; background: var(--bg-3); animation: skel 1.6s ease-in-out infinite; }
.skel-line.w60 { width: 60%; }
.skel-side { height: 40px; border-radius: 10px; margin: 4px 12px; background: var(--bg-3); animation: skel 1.6s ease-in-out infinite; }
body.light .skel-thumb, body.light .skel-line, body.light .skel-side { background: #e5e5e5; }
.duration {
  position: absolute; right: 4px; bottom: 4px; padding: 2px 4px; border-radius: 4px;
  background: rgba(0,0,0,.8); font-size: 12px; font-weight: 500;
}
.live-badge { position: absolute; left: 4px; bottom: 4px; padding: 1px 5px; border-radius: 4px; background: #c00; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.v-info { display: flex; gap: 12px; margin-top: 12px; }
.v-info > img, .v-info > .avatar-fallback { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.v-meta { min-width: 0; flex: 1; }
.v-title {
  font-size: 16px; font-weight: 500; line-height: 1.4; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.v-sub { color: var(--text-2); font-size: 14px; line-height: 1.5; }
.v-sub a:hover { color: var(--text); }
.verified { display: inline-flex; vertical-align: middle; margin-left: 3px; }
.verified svg { width: 14px; height: 14px; fill: var(--text-2); }
/* "don't show" thumbs-down, bottom-right of feed cards */
.v-ni {
  align-self: flex-end; flex-shrink: 0; border: 0; background: none; cursor: pointer;
  padding: 6px; margin: -6px -6px 0 0; border-radius: 50%; line-height: 0;
}
.v-ni svg { width: 18px; height: 18px; fill: var(--text-3); }
.v-ni:hover { background: var(--bg-3); }
.v-ni:hover svg { fill: var(--text); }
.menu-or { text-align: center; color: var(--text-3); font-size: 12px; margin: 2px 0; }

/* Shorts row on home */
.shorts-rail { padding: 0 24px 8px; }
.shorts-rail h2 { display: flex; align-items: center; gap: 8px; font-size: 20px; margin-bottom: 12px; }
.shorts-rail h2 svg { width: 24px; height: 24px; fill: var(--brand); }
.shorts-scroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.s-card { flex-shrink: 0; width: 180px; cursor: pointer; }
.s-thumb { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 9/16; background: var(--bg-3); }
.s-thumb img, .s-thumb video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.s-card .v-title { font-size: 14px; margin-top: 8px; }

/* ---- Watch page ---------------------------------------------------------------- */
.watch { display: flex; gap: 24px; padding: 24px; align-items: flex-start; }
.watch-main { flex: 1; min-width: 0; max-width: 1280px; }
.player { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 16/9; }
.player video { width: 100%; height: 100%; }
.player .embed-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
/* imported (shadow) channels */
.unclaimed-badge {
  display: inline-block; vertical-align: middle; margin-left: 8px; padding: 3px 9px; border-radius: 999px;
  background: rgba(255,170,0,.14); color: #ffb020; border: 1px solid rgba(255,170,0,.45);
  font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
}
.ch-source { color: var(--text-3); font-size: 12px; margin-top: 6px; }
.ch-source a { color: var(--blue); }
.claim-btn { background: #ffb020; color: #111; }
.claim-btn:hover { background: #ffc24d; }
.claim-btn svg { fill: #111; }
.graphic-gate {
  position: absolute; inset: 0; z-index: 5; background: rgba(5,5,5,.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 24px; gap: 10px;
}
.graphic-gate .gg-mark {
  width: 56px; height: 56px; border: 2px solid #f33; border-radius: 8px; color: #f33;
  display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700;
}
.graphic-gate h3 { font-size: 18px; }
.graphic-gate p { color: #aaa; font-size: 13px; max-width: 420px; }
.graphic-gate input {
  width: 150px; text-align: center; background: #121212; border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); padding: 10px; font-size: 16px; letter-spacing: 4px; outline: 0;
}
.badge-graphic {
  position: absolute; top: 8px; right: 8px; background: rgba(190,0,0,.92); color: #fff;
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; letter-spacing: .5px;
}

/* report video / moderation */
.report-bar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.report-btn, .sub-btn.report-go {
  display: inline-flex; align-items: center; gap: 6px; background: #d80000; color: #fff;
  border: 0; border-radius: 18px; padding: 7px 14px; font-size: 13px; font-weight: 700;
  letter-spacing: .4px; cursor: pointer;
}
.report-btn:hover, .sub-btn.report-go:hover { background: #f01b1b; }
.report-btn svg { width: 16px; height: 16px; }
.blocked-banner {
  display: flex; align-items: center; gap: 8px; background: rgba(216,0,0,.15); color: #ff6e6e;
  border: 1px solid rgba(216,0,0,.5); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; font-size: 14px;
}
.blocked-banner svg { width: 18px; height: 18px; flex-shrink: 0; }
.blocked-banner a { color: var(--blue); margin-left: auto; }
.rep-row { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); }
.rep-row img { width: 140px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; background: #000; }
.rep-row .grow { flex: 1; min-width: 0; }
.rep-reason { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.rep-reason div { color: var(--text-3); margin-top: 2px; }
.rep-count { background: #d80000; color: #fff; border-radius: 10px; padding: 0 7px; font-size: 12px; margin-left: 4px; }
@media (max-width: 600px) { .rep-row { flex-wrap: wrap; } .rep-row img { width: 100%; } }

/* admin: comments & likes */
.eng-totals { font-size: 14px; color: var(--text-2); }
.eng-totals b { color: var(--text); }
.eng-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); font-size: 13px; }
.eng-row .grow { flex: 1; min-width: 0; line-height: 1.6; }
.eng-row a { color: var(--blue); }
.eng-user { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.eng-av { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; }
.eng-text { color: var(--text); margin-top: 2px; white-space: pre-wrap; word-break: break-word; }
.eng-time { color: var(--text-3); font-size: 12px; margin-left: 4px; }
.eng-ico { width: 14px; height: 14px; vertical-align: -2px; }
[data-engtab] { cursor: pointer; }

/* admin: short clips */
.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.clip-card { cursor: pointer; }
.clip-media { position: relative; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #000; }
.clip-media img, .clip-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip-media video { object-fit: contain; }
.clip-media .duration { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.8); color: #fff; font-size: 12px; padding: 1px 5px; border-radius: 4px; }
.clip-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s; background: rgba(0,0,0,.25); }
.clip-play svg { width: 48px; height: 48px; color: #fff; }
.clip-card:hover .clip-play { opacity: 1; }
.clip-title { font-size: 14px; font-weight: 500; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clip-sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* uploaded Shorts may come from horizontal clips — show the whole frame, don't crop */
.short-frame video.fit-contain { object-fit: contain; background: #000; }

/* admin bulk delete */
.bulk-filters { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.bulk-filters label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text-2); }
.bulk-filters select { min-width: 180px; }
.bd-count { font-size: 15px; font-weight: 600; color: #ff6e6e; }

/* upload page: file vs link */
.up-src-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.up-src-tabs .chip { display: inline-flex; align-items: center; gap: 6px; }
.up-src-tabs .chip svg { width: 16px; height: 16px; }

/* Kids Mode badge next to the logo */
body.kids #logo::after {
  content: "KIDS"; margin-left: 6px; background: #2bb24c; color: #fff; font-size: 10px;
  font-weight: 800; padding: 2px 6px; border-radius: 4px; letter-spacing: .6px;
}
.kids-field { border-top: 1px solid var(--border); padding-top: 12px; }
.kids-field input[type="password"] { width: 100%; }

/* Kids Mode = a stripped-down player: only the logo, kids switch and video
   cards stay — no search, account, upload, bell, sidebar or chips */
body.kids #menu-btn, body.kids #search-form, body.kids #m-search-btn,
body.kids #upload-btn, body.kids #bell-btn, body.kids #avatar-btn,
body.kids #m-acct-btn, body.kids #mic-btn,
body.kids #sidebar, body.kids #mobile-nav, body.kids .chips { display: none !important; }
body.kids #page, body.kids.mini #page { margin-left: 0; }
/* watch page: keep the player, title and recommendations; hide the rest */
body.kids .report-bar, body.kids .blocked-banner, body.kids .watch-meta,
body.kids .watch-row, body.kids .desc-box, body.kids .comments { display: none; }
body.kids .watch { padding-top: 12px; }
/* shorts feed: video only — no like/comment/share rail, no sub button/menus */
body.kids .short-actions, body.kids .short-top, body.kids .short-ch-row .sub-btn { display: none; }
body.kids.shorts-page .shorts-view { left: 0; }

/* header Kids Mode quick switch */
.kids-sw {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 999px; background: transparent;
  color: var(--text-2); font-size: 11px; font-weight: 800; letter-spacing: .5px; cursor: pointer;
}
.kids-sw:hover { color: var(--text); }
.ks-trk { position: relative; width: 30px; height: 16px; border-radius: 8px; background: var(--chip); flex-shrink: 0; transition: background .15s; }
.ks-dot { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .15s; }
.kids-sw.on { color: #2bb24c; border-color: #2bb24c; }
.kids-sw.on .ks-trk { background: #2bb24c; }
.kids-sw.on .ks-dot { transform: translateX(14px); }
.kids-sw[hidden] { display: none; }

/* Preferences modal — grouped sections + switch-style toggles */
.pref-sec { border-top: 1px solid var(--border); padding: 14px 0; }
.pref-sec h4 { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--text-3); margin: 0 0 10px; }
.pref-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 7px 0; cursor: pointer; user-select: none; }
.pt-title { display: block; font-size: 14px; }
.pt-hint { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.pref-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.pt-track { position: relative; width: 38px; height: 22px; border-radius: 11px; background: var(--chip); flex-shrink: 0; transition: background .15s; }
.pt-dot { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.pref-toggle input:checked + .pt-track { background: var(--brand); }
.pref-toggle input:checked + .pt-track .pt-dot { transform: translateX(16px); }
/* member-row admin slider — same track/dot as the prefs toggles */
.admin-sw { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 800; letter-spacing: .5px; color: var(--text-2); cursor: pointer; user-select: none; }
.admin-sw:hover { color: var(--text); }
.admin-sw input { position: absolute; opacity: 0; pointer-events: none; }
.admin-sw .pt-track { width: 34px; height: 19px; }
.admin-sw .pt-dot { width: 13px; height: 13px; }
.admin-sw input:checked + .pt-track { background: var(--brand); }
.admin-sw input:checked + .pt-track .pt-dot { transform: translateX(15px); }
.admin-sw input:disabled { cursor: not-allowed; }
.admin-sw input:disabled + .pt-track, .admin-sw input:disabled ~ .sw-lbl { opacity: .35; }

.pref-sec > input[type="password"], .pref-sec > input[type="text"] {
  width: 100%; background: #121212; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 10px 12px; font-size: 14px; font-family: inherit; outline: 0;
}
body.light .pref-sec > input[type="password"], body.light .pref-sec > input[type="text"] { background: #fff; }

/* "Mark Safe 4 Kids" flag on watch pages */
.report-bar { gap: 8px; }
.kidflag-btn {
  display: inline-flex; align-items: center; gap: 6px; background: var(--chip); color: var(--text);
  border: 0; border-radius: 18px; padding: 7px 14px; font-size: 13px; font-weight: 700;
  letter-spacing: .4px; cursor: pointer;
}
.kidflag-btn:hover { background: var(--chip-hover); }
.kidflag-btn.on { background: #2bb24c; color: #fff; }
.kidflag-btn.ns.on { background: #c0392b; }
.kidflag-btn svg { width: 16px; height: 16px; }

/* category "For kids" toggle */
.cat-tag.kids { outline: 1px solid #2bb24c; }
.cat-kids-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.cat-kids-toggle input { accent-color: #2bb24c; }

/* Buy Me a Coffee link */
.coffee-link { font-weight: 700; }
a.coffee-link { display: block; margin-bottom: 6px; }

/* custom video controls — identical on every platform/source */
.p-ctrls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  padding: 0 12px 8px; background: linear-gradient(transparent, rgba(0,0,0,.8));
  opacity: 0; transition: opacity .2s;
}
.p-ctrls.show { opacity: 1; }
.player.hide-ui { cursor: none; }
.p-seek {
  width: 100%; height: 4px; margin: 4px 0 2px; cursor: pointer; outline: 0;
  -webkit-appearance: none; appearance: none; background: rgba(255,255,255,.3); border-radius: 2px;
}
.p-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #fff; }
.p-seek::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: #fff; }
.p-row { display: flex; align-items: center; gap: 2px; }
.p-row .icon-btn { width: 36px; height: 36px; color: #fff; }
.p-row .icon-btn:hover { background: rgba(255,255,255,.12); }
.p-time { color: #fff; font-size: 13px; margin-left: 6px; font-variant-numeric: tabular-nums; }
.p-spacer { flex: 1; }
.badge-unc {
  position: absolute; top: 8px; left: 8px; background: rgba(230,120,0,.95); color: #fff;
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 4px; letter-spacing: .5px;
}
.watch-title { font-size: 20px; font-weight: 700; margin: 14px 0 10px; }
.watch-meta {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin-bottom: 4px; color: var(--text-2); font-size: 13px;
}
.watch-meta .wm-handle { color: var(--text); font-weight: 500; text-decoration: none; }
.watch-meta .wm-more { color: var(--text); font-weight: 600; font-size: 13px; background: none; padding: 0; cursor: pointer; }
.desc-box .stats { display: none; }
.watch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.watch-channel { display: flex; align-items: center; gap: 12px; min-width: 0; }
.watch-channel img { width: 40px; height: 40px; border-radius: 50%; }
.wc-name { font-size: 16px; font-weight: 500; display: flex; align-items: center; }
.wc-subs { color: var(--text-2); font-size: 12px; }
.sub-btn {
  height: 36px; padding: 0 16px; border-radius: 18px; background: var(--text);
  color: #0f0f0f; font-weight: 500; font-size: 14px; margin-left: 8px; flex-shrink: 0;
}
.sub-btn.subbed { background: var(--chip); color: var(--text); }
.sub-btn:hover { opacity: .9; }
.watch-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.like-pill { display: flex; align-items: center; background: var(--chip); border-radius: 18px; overflow: hidden; height: 36px; }
.like-pill button { display: flex; align-items: center; gap: 6px; padding: 0 14px; height: 100%; font-size: 14px; font-weight: 500; }
.like-pill button:hover { background: var(--chip-hover); }
.like-pill .divider { width: 1px; height: 20px; background: var(--border); }
.action-btn { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--chip); font-size: 14px; font-weight: 500; }
.action-btn:hover { background: var(--chip-hover); }
.action-btn svg, .like-pill svg { width: 20px; height: 20px; }
.like-pill button.on svg { fill: var(--text); }

.desc-box {
  margin-top: 14px; padding: 12px; border-radius: var(--radius);
  background: var(--chip); font-size: 14px; line-height: 1.5;
  white-space: pre-wrap; cursor: pointer;
}
.desc-box .stats { font-weight: 600; margin-bottom: 6px; }
.desc-box.collapsed { display: none; }

/* Comments */
.comments { margin-top: 24px; }
.comments-head { display: flex; align-items: center; gap: 24px; font-size: 16px; font-weight: 700; margin-bottom: 20px; }
.comment-add { display: flex; gap: 12px; margin-bottom: 28px; }
.comment-add img, .comment-add .avatar-fallback { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.comment-add input {
  flex: 1; background: none; border: 0; border-bottom: 1px solid var(--border);
  color: var(--text); font-size: 14px; padding: 6px 0; outline: 0;
}
.comment-add input:focus { border-bottom-color: var(--text); }
.comment { display: flex; gap: 12px; margin-bottom: 20px; }
.comment img { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.c-line1 { font-size: 13px; margin-bottom: 2px; }
.c-line1 .author { font-weight: 500; }
.c-line1 .time { color: var(--text-2); margin-left: 6px; }
.c-text { font-size: 14px; line-height: 1.5; }
.c-actions { display: flex; align-items: center; gap: 12px; margin-top: 6px; color: var(--text-2); font-size: 12px; }
.c-actions button { display: flex; align-items: center; gap: 4px; color: var(--text-2); }
.c-actions svg { width: 16px; height: 16px; }

/* Up next rail */
.watch-rail { width: 400px; flex-shrink: 0; }
.rail-card { display: flex; gap: 8px; margin-bottom: 10px; cursor: pointer; }
.rail-card .v-thumb { width: 168px; flex-shrink: 0; border-radius: 8px; }
.rail-card .v-thumb img { border-radius: 8px; }
.rail-card .v-title { font-size: 14px; -webkit-line-clamp: 2; }
.rail-card .v-sub { font-size: 12px; margin-top: 4px; }

/* ---- Shorts page ----------------------------------------------------------------- */
.shorts-view { height: calc(100vh - var(--topbar-h)); height: calc(100dvh - var(--topbar-h)); display: flex; }
/* Shorts: the window never scrolls (the feed does) — a phone's collapsing URL bar
   made 100vh taller than the screen and let the frame slide under the header */
html:has(body.shorts-page), body.shorts-page { overflow: hidden; overscroll-behavior: none; }
/* pinned under the header — window scroll (programmatic, URL-bar collapse) can't move it */
body.shorts-page .shorts-view {
  position: fixed; top: var(--topbar-h); bottom: 0; left: var(--sidebar-mini-w); right: 0; height: auto;
}
.shorts-feed {
  flex: 1; overflow-y: auto; scroll-snap-type: y mandatory;
  scrollbar-width: none; height: 100%;
}
.shorts-feed::-webkit-scrollbar { display: none; }
.short-wrap {
  position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.short-frame {
  position: relative; height: calc(100% - 24px); aspect-ratio: 9/16; max-width: 92vw;
  border-radius: 16px; overflow: hidden; background: #000; flex-shrink: 0;
}
.short-frame video { width: 100%; height: 100%; object-fit: cover; }
.heart-burst { position: absolute; left: 50%; top: 45%; z-index: 8; pointer-events: none; animation: hb .85s ease-out forwards; }
.heart-burst svg { width: 96px; height: 96px; fill: #fff; filter: drop-shadow(0 2px 12px rgba(0,0,0,.6)); }
/* guest cap reached — an intentional gate, not a dead black frame */
.sg-gate {
  position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; text-align: center;
  background: rgba(8,8,8,.88); color: #fff; padding: 24px; cursor: pointer;
}
.sg-gate svg { width: 44px; height: 44px; fill: var(--text-3); }
.sg-gate b { font-size: 16px; }
.sg-gate span { font-size: 13px; color: var(--text-3); }
@keyframes hb {
  0% { transform: translate(-50%,-50%) scale(0); opacity: 0; }
  25% { transform: translate(-50%,-50%) scale(1.2); opacity: 1; }
  50% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%,-60%) scale(1); opacity: 0; }
}
.short-overlay {
  position: absolute; inset: auto 0 0 0; padding: 16px;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
  display: flex; flex-direction: column; gap: 10px;
}
.short-ch-row { display: flex; align-items: center; gap: 10px; }
.short-ch-row img { width: 32px; height: 32px; border-radius: 50%; }
.short-ch-row .name { font-size: 14px; font-weight: 500; }
.short-ch-row .sub-btn { height: 32px; padding: 0 12px; font-size: 13px; margin-left: 0; }
.short-title { font-size: 14px; line-height: 1.4; }
.short-actions { display: flex; flex-direction: column; gap: 14px; align-self: flex-end; margin-bottom: 8px; }
.short-top { position: absolute; top: 10px; right: 10px; display: flex; gap: 10px; z-index: 7; }
.short-top .sa-btn .circ { background: rgba(10,10,10,.38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.short-top .sa-btn .circ:hover { background: rgba(10,10,10,.55); }
.short-top .sa-btn .circ svg { fill: #fff; }
.short-top .sa-btn.on .circ { background: rgba(43,178,76,.55); }
.sa-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; }
.sa-btn .circ {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(10,10,10,.38);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.sa-btn .circ:hover { background: rgba(10,10,10,.55); }
.sa-btn .circ svg { width: 20px; height: 20px; fill: #fff; }
.sa-btn .cnt { font-size: 11px; font-weight: 600; }
.sa-btn.on .circ svg { fill: #fff; }
.sa-btn[data-like].on .circ svg { fill: #ff2d55; }   /* liked = red heart */
.sound-toggle {
  position: absolute; bottom: 12px; right: 12px; width: 80px; height: 80px;
  border-radius: 50%; background: rgba(0,0,0,.5); display: flex;
  align-items: center; justify-content: center; z-index: 7;
}
.sound-toggle svg { width: 40px; height: 40px; }

/* Shorts comments sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200; }
.comments-sheet {
  position: fixed; top: var(--topbar-h); right: 0; bottom: 0; width: 400px; max-width: 95vw;
  background: var(--bg-2); border-radius: 12px 0 0 12px; z-index: 201;
  display: flex; flex-direction: column;
}
.cs-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; font-size: 16px; font-weight: 700; border-bottom: 1px solid var(--border); }
.cs-body { flex: 1; overflow-y: auto; padding: 16px; }
.cs-foot { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 10px; }
.cs-foot input { flex: 1; height: 36px; border-radius: 18px; border: 1px solid var(--border); background: var(--bg-3); color: var(--text); padding: 0 14px; outline: 0; }

/* ---- Channel page ----------------------------------------------------------------- */
.ch-banner { height: 180px; border-radius: 16px; margin: 0 24px; overflow: hidden; }
.ch-banner img { width: 100%; height: 100%; object-fit: cover; }
.ch-header { display: flex; gap: 24px; padding: 24px; align-items: center; }
.ch-header > img { width: 160px; height: 160px; border-radius: 50%; flex-shrink: 0; }
.ch-name { font-size: 36px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.ch-handle { color: var(--text-2); margin: 6px 0; }
.ch-tagline { color: var(--text-2); max-width: 640px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-tabs { display: flex; gap: 24px; padding: 0 24px; border-bottom: 1px solid var(--border); }
.ch-tab { padding: 12px 4px; font-size: 15px; font-weight: 500; color: var(--text-2); border-bottom: 3px solid transparent; }
.ch-tab.active { color: var(--text); border-bottom-color: var(--text); }

/* ---- Results / feed rows ------------------------------------------------------------- */
.results { max-width: 1100px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.result-card { display: flex; gap: 16px; cursor: pointer; }
.result-card .v-thumb { width: 420px; flex-shrink: 0; }
.result-card .v-title { font-size: 18px; }
.result-meta { color: var(--text-2); font-size: 12px; margin: 6px 0; }
.result-ch { display: flex; align-items: center; gap: 8px; margin: 10px 0; color: var(--text-2); font-size: 12px; }
.result-ch img { width: 24px; height: 24px; border-radius: 50%; }
.result-desc { color: var(--text-2); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shorts-grid { display: grid; gap: 12px; padding: 24px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.shorts-grid .s-card { width: auto; }

/* ---- Upload ----------------------------------------------------------------------- */
.upload-page { max-width: 720px; margin: 40px auto; padding: 24px; }
.upload-card { background: var(--bg-2); border-radius: 16px; padding: 24px; }
.upload-card h1 { font-size: 20px; margin-bottom: 20px; }
.drop-zone {
  border: 2px dashed var(--border); border-radius: 12px; padding: 48px 24px;
  text-align: center; color: var(--text-2); cursor: pointer;
}
.drop-zone:hover { border-color: var(--blue); color: var(--text); }
.drop-zone svg { width: 64px; height: 64px; margin: 0 auto 12px; fill: var(--text-3); }
.field { margin-top: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; background: #121212; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 10px 12px; font-size: 14px; font-family: inherit; outline: 0;
}
.field input:focus, .field textarea:focus { border-color: #1c62b9; }
.field textarea { resize: vertical; min-height: 90px; }
.upload-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ---- Misc ------------------------------------------------------------------------- */
.empty-state { text-align: center; padding: 80px 24px; color: var(--text-2); }
.empty-state h2 { color: var(--text); font-size: 20px; margin-bottom: 8px; }
.page-head { padding: 24px 24px 0; font-size: 28px; font-weight: 700; display: flex; align-items: center; gap: 12px; }
.page-head svg { width: 32px; height: 32px; }
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: #f1f1f1; color: #0f0f0f; padding: 12px 20px; border-radius: 8px;
  font-size: 14px; z-index: 300; opacity: 0; transition: all .25s; pointer-events: none;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.notif-menu {
  position: fixed; top: var(--topbar-h); right: 16px; width: 360px; max-height: 480px;
  overflow-y: auto; background: var(--bg-2); border-radius: 12px; z-index: 250;
  box-shadow: 0 8px 24px rgba(0,0,0,.5); padding: 8px 0;
}
.notif { display: flex; gap: 12px; padding: 12px 16px; }
.notif:hover { background: var(--hover); }
.notif img { width: 40px; height: 40px; border-radius: 50%; }
.notif .n-text { font-size: 13px; line-height: 1.4; }
.notif .n-time { color: var(--text-2); font-size: 12px; margin-top: 4px; }
.notif.unread { background: rgba(62,166,255,.08); }
.notif .n-av { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; }
#bell-btn { position: relative; }
.bell-badge {
  position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: #cc0000; color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; pointer-events: none;
}

/* ---- Modals, menus, admin, light theme ----------------------------------------- */
body.light {
  --bg: #ffffff; --bg-2: #f9f9f9; --bg-3: #f0f0f0; --hover: #f2f2f2;
  --chip: #f2f2f2; --chip-hover: #e5e5e5; --text: #0f0f0f; --text-2: #606060;
  --text-3: #909090; --border: #e5e5e5;
}
body.light #search-box { background: #fff; }
body.light #topbar, body.light #sidebar { background: var(--bg); }
body.light .chip.active, body.light .sub-btn { background: #0f0f0f; color: #fff; }
body.light .sub-btn.subbed { background: var(--chip); color: var(--text); }
body.light #logo { color: #0f0f0f; }
#logo { color: #fff; }
.logo-name { font-weight: 600; font-size: 15px; margin-left: 8px; letter-spacing: -.5px; }
#logo { display: flex; align-items: center; }
#logo svg text { fill: currentColor; }

.menu-pop {
  position: fixed; top: var(--topbar-h); right: 16px; min-width: 260px;
  background: var(--bg-2); border-radius: 12px; z-index: 250; padding: 8px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.admin-ctx { min-width: 230px; max-width: 300px; }
.admin-ctx .ctx-title { padding: 6px 16px 8px; font-size: 12px; color: var(--text-2); border-bottom: 1px solid var(--border); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.menu-item {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 10px 16px; font-size: 14px; color: var(--text);
}
.menu-item:hover { background: var(--hover); }
.menu-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.menu-head { display: flex; gap: 12px; padding: 12px 16px 14px; border-bottom: 1px solid var(--border); margin-bottom: 6px; align-items: center; }
.menu-head .avatar-lg { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; flex-shrink: 0; }

.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 400; }
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: var(--bg-2); border-radius: 16px; padding: 28px; width: 420px;
  max-width: 92vw; max-height: 85vh; overflow-y: auto; z-index: 401;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.modal h2 { font-size: 20px; margin-bottom: 16px; }
.form-err { color: #ff6e6e; font-size: 13px; min-height: 18px; margin-top: 8px; }
.muted-line { color: var(--text-2); font-size: 13px; margin-top: 14px; }
.muted-line a { color: var(--blue); cursor: pointer; }
.field select {
  width: 100%; background: #121212; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 10px 12px; font-size: 14px; font-family: inherit; outline: 0;
}
body.light .field select, body.light .field input, body.light .field textarea { background: #fff; }
select { background: #121212; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 10px; font-family: inherit; outline: 0; }
.check-row { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill {
  display: inline-flex; align-items: center; gap: 7px; background: var(--chip);
  border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; user-select: none;
}
.check-pill input { accent-color: var(--brand); }

.admin-wrap { max-width: 900px; padding: 24px; }
.u-row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 10px; }
.u-row:hover { background: var(--hover); }
.avatar-sm { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; flex-shrink: 0; }
.u-row .grow { flex: 1; min-width: 0; }
.u-actions { display: flex; gap: 8px; align-items: center; }
.admin-badge { background: var(--brand); color: #fff; font-size: 10px; padding: 2px 7px; border-radius: 9px; font-weight: 700; letter-spacing: .5px; vertical-align: middle; }
.mini-btn { height: 30px; padding: 0 12px; border-radius: 15px; background: var(--chip); font-size: 13px; font-weight: 500; }
.mini-btn:hover { background: var(--chip-hover); }
.mini-btn.danger { color: #ff6e6e; }
.seed-box { background: var(--bg-2); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.seed-box input[type=number], .seed-box input[type=text] {
  background: #121212; border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 8px 10px; outline: 0; font-family: inherit;
}
body.light .seed-box input { background: #fff; }
.batch-row { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; flex-wrap: wrap; }
.batch-row input[type=text] { flex: 1; min-width: 180px; }
.cat-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cat-tag { display: inline-flex; align-items: center; gap: 8px; background: var(--chip); padding: 7px 12px; border-radius: 8px; font-size: 14px; }
.cat-tag button { color: var(--text-2); display: flex; align-items: center; }
.cat-tag button:hover { color: var(--text); }
.cat-tag button svg { width: 16px; height: 16px; }

/* ---- Go live ------------------------------------------------------------------- */
.live-wrap { display: flex; gap: 24px; padding: 24px; height: calc(100vh - var(--topbar-h)); }
.live-main { flex: 1; min-width: 0; }
.live-player { position: relative; }
.live-overlay { position: absolute; top: 12px; left: 12px; display: flex; gap: 8px; align-items: center; }
.live-overlay > span { background: rgba(0,0,0,.7); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 4px; }
.live-overlay .live-badge { position: static; background: #c00; }
.live-chat { width: 340px; flex-shrink: 0; background: var(--bg-2); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; }
.live-chat-body { flex: 1; overflow-y: auto; padding: 12px; }
.chat-msg { font-size: 13px; padding: 3px 0; line-height: 1.4; word-wrap: break-word; }
.chat-author { font-weight: 500; margin-right: 7px; }
@media (max-width: 1100px) {
  .live-wrap { flex-direction: column; height: auto; }
  .live-chat { width: 100%; height: 420px; }
}

@media (max-width: 1100px) {
  .watch { flex-direction: column; align-items: stretch; }
  .watch-main { width: 100%; }
  .watch-rail { width: 100%; }
  .result-card .v-thumb { width: 300px; }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  /* ---- topbar: just logo, search icon, avatar ---- */
  #upload-btn, #bell-btn, #mic-btn, #avatar-btn { display: none; }
  #m-search-btn { display: flex; }
  body.mob-you #m-acct-btn { display: flex; }
  #search-form { position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h); background: var(--bg); padding: 8px 4px 8px 0; z-index: 101; display: none; align-items: center; }
  #search-form.mobile-open { display: flex; }
  #search-form.mobile-open #search-back { display: flex; flex-shrink: 0; }
  #search-form.mobile-open #search-box { flex: 1; }

  /* ---- videos fill 100% width ---- */
  .video-grid { grid-template-columns: 1fr; padding: 0; row-gap: 24px; }
  .v-thumb { border-radius: 0; }
  .v-info { padding: 0 12px; }
  .chips { padding: 8px 12px; gap: 8px; }
  .results { padding: 0; }
  .result-card { flex-direction: column; gap: 0; }
  .result-card .v-thumb { width: 100%; }
  .shorts-grid { padding: 0 12px; grid-template-columns: repeat(2, 1fr); }
  .watch { padding: 0; }
  .player { border-radius: 0; }
  .watch-title, .watch-row, .comments { padding: 0 12px; }
  .desc-box { margin: 12px; padding: 0; font-size: 13px; background: none; border-radius: 0; }

  .watch-rail { padding: 0; }
  .rail-card { flex-direction: column; gap: 0; margin-bottom: 20px; }
  .rail-card .v-thumb { width: 100%; border-radius: 0; }
  .rail-card .v-thumb img { border-radius: 0; }
  .rail-card .v-title { padding: 8px 12px 0; }
  .rail-card .v-sub { padding: 0 12px; }
  .live-wrap { padding: 0; }
  .live-chat { border-radius: 0; }
  .live-main > *:not(.player) { padding-left: 12px; padding-right: 12px; }
  .upload-page { margin: 0 auto; max-width: 100%; padding: 12px; }
  .admin-wrap { padding: 12px; }
  .notif-menu { right: 0; left: 0; width: auto; }

  /* ---- centered content ---- */
  .page-head { justify-content: center; font-size: 22px; padding: 16px 12px 0; }
  .shorts-rail { padding: 0 0 8px; }
  .shorts-rail h2 { justify-content: center; }
  .watch-title { font-size: 17px; }
  .watch-meta { padding: 0 12px; }
  .watch-row { flex-direction: row; justify-content: space-between; align-items: center; text-align: left; gap: 12px; }
  .watch-channel img { width: 34px; height: 34px; }
  .watch-channel .wc-name, .watch-channel .wc-subs { display: none; }
  .watch-actions { justify-content: flex-end; }
  .watch-actions .action-btn, .watch-actions .like-btn { font-size: 0; gap: 0; }
  .watch-actions .like-btn span { display: none; }

  /* ---- Shorts: full-bleed video + floating transparent action rail ---- */
  .shorts-view { height: calc(100dvh - var(--topbar-h) - 64px); }
  .short-wrap { gap: 0; }
  .short-frame { width: 100%; max-width: none; height: 100%; border-radius: 0; }
  .short-actions {
    position: absolute; right: 26px; bottom: 92px; margin: 0; z-index: 6; gap: 14px;
  }
  .sa-btn .circ { background: rgba(10,10,10,.38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  .sa-btn .circ:hover { background: rgba(10,10,10,.55); }
  .sa-btn { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
  .short-overlay { padding-right: 84px; }
  .kids-sw { padding: 0 8px; }
  .comments-head { justify-content: center; }
  .ch-header { flex-direction: column; align-items: center; text-align: center; gap: 12px; }
  .ch-header > img { width: 80px; height: 80px; }
  .ch-tagline { max-width: 100%; white-space: normal; }
  .ch-name { font-size: 24px; }
  .ch-tabs { justify-content: center; padding: 0 12px; }
  .upload-card h1 { text-align: center; }
  .upload-actions { justify-content: center; }

  /* ---- bottom nav bar replaces sidebar ---- */
  #sidebar { display: none; }
  #menu-btn { display: none; }
  #page, body.mini #page { margin-left: 0; padding-bottom: 64px; }
  body.shorts-page .shorts-view { left: 0; bottom: calc(64px + env(safe-area-inset-bottom)); }
  #mobile-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
    background: var(--bg); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mob-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 8px 0 6px; color: var(--text-2); font-size: 10px;
    text-decoration: none; -webkit-tap-highlight-color: transparent;
  }
  .mob-item svg { width: 24px; height: 24px; fill: currentColor; }
  .mob-item.active { color: var(--text); }
}
