/* TikTok owns its feed. Desktop gets a compact vertical-video shell. */
body.tiktok-view-active #channels > :not(.channel-section-heading),
body.tiktok-view-active #home-title,
body.tiktok-view-active #feed-notice,
body.tiktok-view-active #channel-heading,
body.tiktok-view-active #result-count,
body.tiktok-view-active .filter-divider,
body.tiktok-view-active #clear-filters { display:none!important; }
body.tiktok-view-active #channels { margin-bottom:16px; }
body.tiktok-view-active .channel-section-heading { margin:0; }
@media (max-width:760px) and (pointer:coarse) {
  /* Platform selection remains available above the same stacked mobile feed. */
  body[data-watch-view='home'] #channels .channel-section-heading { display:flex; margin:0 0 10px; }
  body[data-watch-view='home'] #channels .channel-section-heading > h2 { display:none; }
  body[data-watch-view='home'] #channels .filters { display:flex; flex-wrap:nowrap; gap:8px; width:100%; margin:0; padding:0 10px; overflow-x:auto; scrollbar-width:none; }
  body[data-watch-view='home'] #channels .filters > button { flex:none; min-height:34px; padding:6px 10px; border-radius:18px; font-size:12px; white-space:nowrap; }
  body[data-watch-view='home'] #channels .filters > :is(.filter-divider,.result-count,#clear-filters) { display:none; }
  body.tiktok-view-active[data-watch-view='home'][data-home-tab='clips'] { overflow:auto; }
  body.tiktok-view-active #mobile-game-filters,
  body.tiktok-view-active #mobile-followed-section { display:none!important; }
  body.tiktok-view-active #channels { margin:0; padding:0; }
  body.tiktok-view-active main { padding-top:calc(var(--header) + 8px); }
}

#tiktok-desktop-shell { display:none; }
@media (min-width:761px) {
  body.tiktok-view-active { --tiktok-rail:72px; --tiktok-desktop-top:0px; --tt-bg:#000; --tt-fg:#f5f5f5; --tt-muted:#a7a7a7; --tt-hover:#1d1d1d; --tt-line:#262626; background:var(--tt-bg); color:var(--tt-fg); overflow:hidden; }
  body.tiktok-view-active[data-watch-theme='light'] { --tt-bg:#fff; --tt-fg:#161616; --tt-muted:#676767; --tt-hover:#efefef; --tt-line:#e5e5e5; }
  body.tiktok-view-active.tiktok-desktop-expanded { --tiktok-rail:240px; }
  body.tiktok-view-active > .topbar, body.tiktok-view-active > #creator-sidebar, body.tiktok-view-active > .watch-join-strip { display:none!important; }
  body.tiktok-view-active #main { width:auto; max-width:none; height:100dvh; min-height:0; margin:0 0 0 var(--tiktok-rail); padding:0; }
  body.tiktok-view-active #main > :not(#tiktok-view) { display:none!important; }
  body.tiktok-view-active #tiktok-view { position:fixed; inset:0 0 0 var(--tiktok-rail); width:auto; height:100dvh; overflow:hidden; background:var(--tt-bg); transition:left 180ms ease; }
  body.tiktok-view-active #tiktok-desktop-shell:not([hidden]) { display:block; color:var(--tt-fg); font-family:Arial,'Segoe UI',sans-serif; }
  #tiktok-desktop-shell [hidden] { display:none!important; }
  #tiktok-desktop-shell svg { display:block; width:25px; height:25px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
  #tiktok-desktop-shell a { color:inherit; text-decoration:none; }
  #tiktok-desktop-shell button { color:inherit; font:inherit; cursor:pointer; border:0; background:none; }
  #tiktok-desktop-shell :is(a,button,input,select):focus-visible { outline:2px solid var(--yellow,#ffd000); outline-offset:3px; }
  #tiktok-desktop-shell .tiktok-desktop-sidebar { position:fixed; z-index:120; left:0; top:0; bottom:0; width:72px; padding:14px 12px; display:flex; flex-direction:column; overflow-y:auto; overflow-x:hidden; scrollbar-width:none; background:var(--tt-bg); transition:width 180ms ease; }
  #tiktok-desktop-shell[data-expanded='true'] .tiktok-desktop-sidebar { width:240px; padding-inline:16px; }
  #tiktok-desktop-shell .tiktok-desktop-brand-row { display:flex; align-items:center; min-height:43px; margin-bottom:12px; }
  #tiktok-desktop-shell .tiktok-desktop-brand { display:none; align-items:center; gap:7px; white-space:nowrap; }
  #tiktok-desktop-shell .tiktok-desktop-brand b { color:var(--yellow,#ffd000); font:900 28px/1 Barlow,Arial,sans-serif; letter-spacing:-1.3px; }
  #tiktok-desktop-shell .tiktok-desktop-brand span { font-size:15px; font-weight:800; letter-spacing:.5px; }
  #tiktok-desktop-shell .tiktok-desktop-toggle { display:grid; place-items:center; width:44px; height:40px; border-radius:8px; flex:none; }
  #tiktok-desktop-shell .tiktok-desktop-toggle:hover { background:var(--tt-hover); }
  #tiktok-desktop-shell .tiktok-desktop-toggle b { color:var(--yellow,#ffd000); font:900 23px/1 Barlow,Arial,sans-serif; letter-spacing:-1.3px; }
  #tiktok-desktop-shell .tiktok-desktop-toggle svg { display:none; }
  #tiktok-desktop-shell[data-expanded='false'] .tiktok-desktop-toggle:is(:hover,:focus-visible) b { display:none; }
  #tiktok-desktop-shell[data-expanded='false'] .tiktok-desktop-toggle:is(:hover,:focus-visible) svg { display:block; }
  #tiktok-desktop-shell[data-expanded='true'] .tiktok-desktop-toggle b { display:none; }
  #tiktok-desktop-shell[data-expanded='true'] .tiktok-desktop-toggle svg { display:block; }
  #tiktok-desktop-shell[data-expanded='true'] .tiktok-desktop-brand { display:flex; }
  #tiktok-desktop-shell[data-expanded='true'] .tiktok-desktop-toggle { margin-left:auto; width:32px; }
  #tiktok-desktop-shell[data-expanded='true'] .tiktok-desktop-toggle svg { width:19px; height:19px; }
  #tiktok-desktop-shell .tiktok-desktop-nav { display:grid; gap:3px; }
  #tiktok-desktop-shell .tiktok-desktop-nav > :is(a,button),#tiktok-desktop-shell .tiktok-desktop-return { display:flex; align-items:center; justify-content:center; gap:13px; min-height:45px; border-radius:8px; font-size:16px; font-weight:650; white-space:nowrap; }
  #tiktok-desktop-shell .tiktok-desktop-nav > :is(a,button):hover,#tiktok-desktop-shell .tiktok-desktop-return:hover { background:var(--tt-hover); }
  #tiktok-desktop-shell .tiktok-desktop-nav > [aria-current='page'],#tiktok-desktop-shell .tiktok-desktop-nav > [aria-expanded='true'] { color:var(--yellow,#ffd000); }
  #tiktok-desktop-shell .tiktok-desktop-nav > :is(a,button) > span,#tiktok-desktop-shell .tiktok-desktop-return > span { display:none; }
  #tiktok-desktop-shell[data-expanded='true'] .tiktok-desktop-nav > :is(a,button),#tiktok-desktop-shell[data-expanded='true'] .tiktok-desktop-return { justify-content:flex-start; padding:0 10px; }
  #tiktok-desktop-shell[data-expanded='true'] .tiktok-desktop-nav > :is(a,button) > span,#tiktok-desktop-shell[data-expanded='true'] .tiktok-desktop-return > span { display:inline; }
  #tiktok-desktop-shell .tiktok-desktop-nav > [data-tiktok-drawer='search'] { background:var(--tt-hover); border-radius:24px; margin-bottom:8px; color:var(--tt-muted); font-weight:400; font-size:14px; }
  #tiktok-desktop-shell .tiktok-desktop-nav > [data-tiktok-drawer='search'][aria-expanded='true'] { color:var(--yellow,#ffd000); }
  #tiktok-desktop-shell .tiktok-desktop-avatar { display:grid; place-items:center; width:26px; height:26px; flex:none; border-radius:50%; overflow:hidden; }
  #tiktok-desktop-shell .tiktok-desktop-avatar img { display:block; width:100%; height:100%; max-width:none; object-fit:cover; }
  #tiktok-desktop-shell .tiktok-desktop-avatar svg { width:24px; height:24px; }
  #tiktok-desktop-shell .tiktok-desktop-following { display:none; border-top:1px solid var(--tt-line); margin-top:16px; padding-top:15px; }
  #tiktok-desktop-shell[data-expanded='true'] .tiktok-desktop-following { display:block; }
  #tiktok-desktop-shell .tiktok-desktop-following p { margin:0 8px 9px; color:var(--tt-muted); font-size:12px; }
  #tiktok-desktop-shell .tiktok-desktop-following small { display:block; margin:0 8px; font-size:12px; line-height:1.6; color:var(--tt-muted); }
  #tiktok-desktop-shell .tiktok-desktop-following a { display:flex; gap:9px; align-items:center; min-height:44px; padding:5px 8px; border-radius:5px; }
  #tiktok-desktop-shell .tiktok-desktop-following a:hover { background:var(--tt-hover); }
  #tiktok-desktop-shell .tiktok-desktop-following a img { width:30px; height:30px; flex:none; object-fit:cover; border-radius:50%; }
  #tiktok-desktop-shell .tiktok-desktop-following a > :last-child { min-width:0; overflow:hidden; }
  #tiktok-desktop-shell .tiktok-desktop-return { margin-top:auto; padding-top:10px; color:var(--tt-muted); font-size:13px; }
  #tiktok-desktop-shell .tiktok-desktop-drawer { box-sizing:border-box; position:fixed; top:0; bottom:0; left:72px; width:320px; z-index:121; padding:22px 18px; overflow-y:auto; background:var(--tt-bg); border-right:1px solid var(--tt-line); box-shadow:4px 0 18px #0001; }
  #tiktok-desktop-shell .tiktok-desktop-drawer header { display:flex; align-items:center; justify-content:space-between; margin-bottom:22px; }
  #tiktok-desktop-shell .tiktok-desktop-drawer h2 { font-size:19px; margin:0; }
  #tiktok-desktop-shell .tiktok-desktop-drawer header button { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:var(--tt-hover); }
  #tiktok-desktop-shell .tiktok-desktop-drawer header svg { width:16px; height:16px; }
  #tiktok-desktop-shell .tiktok-desktop-drawer > :is(a,button) { display:flex; gap:12px; align-items:center; min-height:44px; width:100%; padding:7px 8px; border-radius:6px; font-size:14px; }
  #tiktok-desktop-shell .tiktok-desktop-drawer > :is(a,button):hover { background:var(--tt-hover); }
  #tiktok-desktop-shell .tiktok-desktop-drawer > :is(a,button) svg { width:19px; height:19px; }
  #tiktok-desktop-shell .tiktok-desktop-group { font-size:11px; color:var(--tt-muted); margin:24px 8px 8px; padding-top:14px; border-top:1px solid var(--tt-line); }
  #tiktok-desktop-shell .tiktok-desktop-drawer header + .tiktok-desktop-group { border:0; padding-top:0; }
  #tiktok-desktop-shell .tiktok-desktop-theme { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:48px; padding:7px 8px; }
  #tiktok-desktop-shell .tiktok-desktop-theme > div:first-child { display:flex; align-items:center; gap:12px; font-size:14px; }
  #tiktok-desktop-shell .tiktok-desktop-theme > div:first-child svg { width:19px; height:19px; }
  #tiktok-desktop-shell .tiktok-desktop-theme-options { display:flex; align-items:center; padding:3px; border-radius:20px; background:var(--tt-hover); }
  #tiktok-desktop-shell .tiktok-desktop-theme-options button { display:grid; place-items:center; width:29px; height:27px; padding:6px; border-radius:50%; color:var(--tt-muted); }
  #tiktok-desktop-shell .tiktok-desktop-theme-options button[aria-checked='true'] { background:#555; color:#fff; }
  #tiktok-desktop-shell .tiktok-desktop-theme-options svg { width:15px; height:15px; }
  #tiktok-desktop-shell .tiktok-desktop-search-form { display:block; box-sizing:border-box; width:100%; min-width:0; max-width:none; margin:0; padding:0; }
  #tiktok-desktop-shell .tiktok-desktop-search-field { box-sizing:border-box; display:flex; align-items:center; width:100%; min-width:0; height:40px; padding:0 8px; background:var(--tt-hover); border:0; border-radius:24px; }
  #tiktok-desktop-shell .tiktok-desktop-search-field input { box-sizing:border-box; flex:1 1 0; min-width:0; width:0; max-width:none; height:40px; margin:0; padding:0 8px; color:var(--tt-fg); background:none; border:0; border-radius:0; font:14px/1.4 Arial,'Segoe UI',sans-serif; appearance:none; }
  #tiktok-desktop-shell .tiktok-desktop-search-field input::placeholder { color:var(--tt-muted); opacity:1; }
  #tiktok-desktop-shell .tiktok-desktop-search-field input::-webkit-search-cancel-button,
  #tiktok-desktop-shell .tiktok-desktop-search-field input::-webkit-search-decoration { display:none; appearance:none; }
  #tiktok-desktop-shell .tiktok-desktop-search-field button { display:grid; place-items:center; flex:0 0 28px; width:28px; height:32px; padding:4px; border-radius:50%; color:var(--tt-muted); }
  #tiktok-desktop-shell .tiktok-desktop-search-field svg { width:19px; height:19px; }
  #tiktok-desktop-shell .tiktok-desktop-search-field .tiktok-desktop-clear svg { width:16px; height:16px; }
  #tiktok-desktop-shell .tiktok-desktop-search-field button:hover { color:var(--tt-fg); }
  #tiktok-desktop-shell #tiktok-desktop-search-results { width:100%; min-width:0; margin-top:20px; }
  #tiktok-desktop-shell .tiktok-desktop-search-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:18px 0 10px; }
  #tiktok-desktop-shell .tiktok-desktop-search-heading h3 { margin:0; font-size:14px; font-weight:600; }
  #tiktok-desktop-shell .tiktok-desktop-search-heading button { padding:5px 0; color:var(--tt-muted); font-size:12px; }
  #tiktok-desktop-shell .tiktok-desktop-search-heading button:hover { text-decoration:underline; }
  #tiktok-desktop-shell .tiktok-desktop-search-row { display:flex; align-items:center; min-width:0; min-height:48px; border-radius:6px; }
  #tiktok-desktop-shell .tiktok-desktop-search-row:hover { background:var(--tt-hover); }
  #tiktok-desktop-shell .tiktok-desktop-search-item { display:flex; flex:1; align-items:center; gap:12px; min-width:0; min-height:48px; padding:8px 7px; text-align:left; }
  #tiktok-desktop-shell .tiktok-desktop-search-item > svg { width:18px; height:18px; color:var(--tt-muted); }
  #tiktok-desktop-shell .tiktok-desktop-search-item > span { min-width:0; flex:1; }
  #tiktok-desktop-shell .tiktok-desktop-search-avatar,
  #tiktok-desktop-shell .tiktok-desktop-search-item > .tiktok-desktop-search-avatar-fallback { display:grid; place-items:center; flex:0 0 32px; width:32px; height:32px; border-radius:50%; object-fit:cover; overflow:hidden; }
  #tiktok-desktop-shell .tiktok-desktop-search-avatar-fallback svg { width:22px; height:22px; color:var(--tt-muted); }
  #tiktok-desktop-shell .tiktok-desktop-search-item strong,#tiktok-desktop-shell .tiktok-desktop-search-item small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  #tiktok-desktop-shell .tiktok-desktop-search-item strong { font-size:14px; font-weight:500; line-height:1.5; }
  #tiktok-desktop-shell .tiktok-desktop-search-item small { margin-top:2px; color:var(--tt-muted); font-size:11px; line-height:1.4; }
  #tiktok-desktop-shell .tiktok-desktop-remove-recent { display:grid; place-items:center; flex:none; width:30px; height:34px; padding:7px; color:var(--tt-muted); }
  #tiktok-desktop-shell .tiktok-desktop-remove-recent svg { width:16px; height:16px; }
  #tiktok-desktop-shell .tiktok-desktop-search-empty { margin:12px 0; color:var(--tt-muted); font-size:12px; line-height:1.6; }
  #tiktok-desktop-shell .tiktok-desktop-search-all { display:block; width:100%; margin:12px 0 0; padding:15px 7px; border-top:1px solid var(--tt-line); color:var(--tt-fg); font-size:14px; font-weight:600; text-align:left; overflow-wrap:anywhere; }
  #tiktok-desktop-shell .tiktok-desktop-search-all:hover { background:var(--tt-hover); }
  #tiktok-desktop-shell .tiktok-desktop-tooltip { position:fixed; z-index:200; max-width:220px; padding:10px 12px; border-radius:8px; background:#fff; color:#161616; box-shadow:0 2px 10px #0003; font-size:13px; font-weight:600; line-height:1.2; white-space:nowrap; pointer-events:none; }
  #tiktok-desktop-shell .tiktok-desktop-toolbar { position:fixed; z-index:110; top:20px; right:24px; display:flex; gap:8px; align-items:center; padding:5px 7px 5px 12px; border-radius:30px; background:var(--tt-hover); }
  #tiktok-desktop-shell .tiktok-desktop-toolbar select { max-width:120px; color:var(--tt-fg); background:var(--tt-hover); border:0; font:600 12px/1.5 Arial,sans-serif; padding:4px; cursor:pointer; }
  #tiktok-desktop-shell .tiktok-desktop-account { display:grid; place-items:center; width:30px; height:30px; border-radius:50%; }
  body.tiktok-view-active[data-watch-theme='light'] #tiktok-view .tiktok-feed-heading { color:var(--tt-fg); }
  body.tiktok-view-active[data-watch-theme='light'] #tiktok-view .tiktok-feed-rail-action,
  body.tiktok-view-active[data-watch-theme='light'] #tiktok-view .tiktok-feed-share-status { color:var(--tt-fg); }
  body.tiktok-view-active[data-watch-theme='light'] #tiktok-view .tiktok-feed-rail-action svg,
  body.tiktok-view-active[data-watch-theme='light'] #tiktok-view .tiktok-feed-navigation button { background:#efefef; color:#161616; }
  body.tiktok-view-active[data-watch-theme='light'] #tiktok-view .tiktok-feed-rail-action:hover svg,
  body.tiktok-view-active[data-watch-theme='light'] #tiktok-view .tiktok-feed-navigation button:hover:not(:disabled) { background:#ddd; }
  body.tiktok-view-active[data-watch-theme='light'] #tiktok-view .tiktok-feed-follow[aria-pressed='true'] svg { color:#946900; }
  body.tiktok-view-active #tiktok-view .tiktok-feed-card { background:var(--tt-bg); }
  body.tiktok-view-active #tiktok-view .tiktok-feed-empty { background:var(--tt-bg); color:var(--tt-fg); }
  body.tiktok-view-active #tiktok-view .tiktok-explore,body.tiktok-view-active #tiktok-view .tiktok-explore-categories { background:var(--tt-bg); color:var(--tt-fg); }
  body.tiktok-view-active[data-watch-theme='light'] #tiktok-view .tiktok-explore-chip { background:var(--tt-hover); color:var(--tt-fg); }
  body.tiktok-view-active[data-watch-theme='light'] #tiktok-view .tiktok-explore-chip[aria-pressed='true'] { background:#161616; color:#fff; }
  #tiktok-desktop-shell .tiktok-desktop-account-status { font-size:12px; line-height:1.5; color:var(--tt-muted); }
}
@media (min-width:761px) and (max-width:1020px) {
  #tiktok-desktop-shell .tiktok-desktop-toolbar { top:10px; right:12px; }
}
@media (prefers-reduced-motion:reduce) {
  body.tiktok-view-active #tiktok-view,#tiktok-desktop-shell .tiktok-desktop-sidebar { transition:none; }
}
