/* style.css — SnoopyTube: YouTube's dark layout with a Peanuts palette.
   Doghouse red for the brand, Woodstock yellow for anything Snoopy "picked for you". */

:root{
  --bg:#0f0f0f; --bg2:#212121; --bg3:#272727; --bg4:#3f3f3f;
  --text:#f1f1f1; --text2:#aaaaaa; --line:#3f3f3f;
  --red:#d9251c; --yellow:#f5c518; --blue:#3ea6ff; --hand:"Gloria Hallelujah","Comic Sans MS",cursive;
  --sidebar:240px; --header:56px;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
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:inherit;color:inherit;background:none;border:none;cursor:pointer}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:#555;border-radius:5px;border:2px solid var(--bg)}
::-webkit-scrollbar-track{background:transparent}

/* ---------- header ---------- */
header{position:fixed;top:0;left:0;right:0;height:var(--header);background:var(--bg);border-bottom:2px solid var(--red);display:flex;align-items:center;justify-content:space-between;padding:0 16px;z-index:50}
.hleft{display:flex;align-items:center;gap:16px}
.iconbtn{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex:none}
.iconbtn:hover{background:var(--bg3)}
.iconbtn svg{width:24px;height:24px;fill:currentColor}
.searchtoggle{display:none}
.logo{display:flex;align-items:center;gap:6px;font-family:var(--hand);font-size:22px;line-height:1;padding-top:4px}
.logo svg{width:32px;height:32px;margin-top:-4px}
.logo em{font-style:normal;color:var(--red)}
.hcenter{display:flex;align-items:center;flex:1;max-width:640px;margin:0 40px}
.search{display:flex;flex:1;height:40px}
.search input{flex:1;background:#121212;border:1px solid #303030;border-right:none;border-radius:40px 0 0 40px;padding:0 16px;color:var(--text);font-size:16px;outline:none}
.search input:focus{border-color:#1c62b9}
.search button{width:64px;background:var(--bg3);border:1px solid #303030;border-radius:0 40px 40px 0;display:flex;align-items:center;justify-content:center}
.search button:hover{background:var(--bg4)}
.search button svg{width:22px;height:22px;fill:currentColor}
.hright{display:flex;align-items:center;gap:8px}
.addbtn{height:36px;background:var(--bg3)}
.addbtn svg{width:22px;height:22px;fill:currentColor}
.avatar{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:600;color:#fff;flex:none;font-size:14px;text-transform:uppercase;position:relative;overflow:hidden}
.avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}

/* ---------- sidebar ---------- */
nav{position:fixed;top:var(--header);left:0;bottom:0;width:var(--sidebar);background:var(--bg);overflow-y:auto;padding:12px;z-index:40}
nav::-webkit-scrollbar{width:8px}
nav::-webkit-scrollbar-thumb{background:transparent}
nav:hover::-webkit-scrollbar-thumb{background:#555}
.navsec{padding-bottom:12px;margin-bottom:12px;border-bottom:1px solid var(--line)}
.navsec:last-child{border:none}
.navtitle{padding:6px 12px 8px;font-size:16px;font-weight:500}
.navitem{display:flex;align-items:center;gap:24px;height:40px;padding:0 12px;border-radius:10px;font-size:14px;cursor:pointer;white-space:nowrap;overflow:hidden}
.navitem:hover{background:var(--bg3)}
.navitem.active{background:var(--bg3);font-weight:500}
.navitem svg{width:24px;height:24px;fill:currentColor;flex:none}
.navitem .avatar{width:24px;height:24px;font-size:11px}
.navsub{font-size:12px;color:var(--text2);padding:4px 12px 8px;line-height:1.5}
.taste{padding:4px 12px}
.taste .tag{display:flex;align-items:center;gap:8px;font-size:12px;margin:5px 0;color:var(--text2)}
.taste .bar{flex:1;height:4px;background:var(--bg3);border-radius:2px;overflow:hidden}
.taste .bar i{display:block;height:100%;background:var(--yellow)}
.taste .tname{width:74px;flex:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.taste .tpct{width:38px;flex:none;text-align:right;font-variant-numeric:tabular-nums;color:var(--text)}
body.mini nav{width:72px;padding:4px}
body.mini .navitem{flex-direction:column;gap:6px;height:74px;justify-content:center;font-size:10px;padding:0}
body.mini .navtitle,body.mini .navsub,body.mini .taste,body.mini .navsec.hidemini{display:none}
body.mini .navsec{border:none;margin:0;padding:0}
body.mini main{margin-left:72px}

/* ---------- main ---------- */
main{margin-left:var(--sidebar);margin-top:var(--header);min-height:calc(100vh - var(--header))}
.page{padding:0 24px 40px}
.chips{position:sticky;top:var(--header);background:var(--bg);display:flex;gap:12px;padding:12px 0;overflow-x:auto;z-index:30;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{background:var(--bg3);padding:0 12px;height:32px;border-radius:8px;font-size:14px;white-space:nowrap;flex:none;font-weight:500}
.chip:hover{background:var(--bg4)}
.chip.active{background:var(--yellow);color:#111}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:40px 16px;padding-top:12px}
.shelf{margin:32px 0 8px;grid-column:1/-1;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:20px 0 28px}
.shelf h2{font-family:var(--hand);font-size:18px;font-weight:400;margin-bottom:16px;display:flex;align-items:center;gap:10px}
.shelf h2 .ic{width:34px;height:34px;border-radius:50%;background:var(--bg3);display:flex;align-items:center;justify-content:center}
.shelf h2 .ic svg{width:20px;height:20px;fill:currentColor}
.shelf h2 small{font-weight:400;color:var(--text2);font-size:13px;margin-left:auto}
.shelf .row{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}
.empty{padding:80px 20px;text-align:center;color:var(--text2)}
.empty h2{color:var(--text);font-family:var(--hand);font-weight:400;margin-bottom:8px}
h1.pagetitle{font-family:var(--hand);font-size:26px;font-weight:400;padding:24px 0 8px}
.notice{margin-top:16px;background:linear-gradient(90deg,#3a1a17,#1a1a1a);border:1px solid #5a2620;border-radius:12px;padding:14px 18px;display:flex;align-items:center;gap:14px;font-size:14px}
.notice svg{width:26px;height:26px;fill:var(--yellow);flex:none}
.notice b{color:var(--yellow)}

/* ---------- video card ---------- */
.card{cursor:pointer;position:relative}
.thumb{position:relative;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:var(--bg3)}
.thumb img{position:relative;width:100%;height:100%;object-fit:cover;display:block;transition:transform .2s}
.card:hover .thumb img{transform:scale(1.03)}
.thumb .ph{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:40px;font-weight:700;color:rgba(255,255,255,.7)}
.dur{position:absolute;right:6px;bottom:6px;background:rgba(0,0,0,.85);color:#fff;font-size:12px;font-weight:500;padding:2px 4px;border-radius:4px}
.dur.live{background:var(--red);text-transform:uppercase;font-weight:600}
.cbody{display:flex;gap:12px;margin-top:12px}
.cbody .avatar{width:36px;height:36px;margin-top:2px}
.cinfo{flex:1;min-width:0}
.ctitle{font-size:16px;font-weight:500;line-height:22px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-bottom:6px;padding-right:24px}
.cmeta{color:var(--text2);font-size:14px;line-height:20px}
.cmeta .ch:hover{color:var(--text)}
.why{display:inline-flex;align-items:center;gap:4px;margin-top:6px;font-size:12px;color:var(--yellow);background:rgba(245,197,24,.12);padding:2px 8px;border-radius:12px;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.why svg{width:12px;height:12px;fill:currentColor;flex:none}
.more{position:absolute;right:-8px;top:0;opacity:0;transition:opacity .15s}
.card:hover .more,.more.open{opacity:1}
.menu{position:absolute;right:0;top:40px;background:var(--bg3);border-radius:12px;padding:8px 0;width:220px;z-index:20;box-shadow:0 4px 20px rgba(0,0,0,.5);display:none}
.menu.open{display:block}
.menu div{display:flex;align-items:center;gap:16px;padding:10px 16px;font-size:14px}
.menu div:hover{background:var(--bg4)}
.menu svg{width:22px;height:22px;fill:currentColor}
.cardwrap{position:relative}

/* list-style card (history/search) */
.list{display:flex;flex-direction:column;gap:16px;padding-top:12px;max-width:1100px}
.lcard{display:flex;gap:16px;cursor:pointer;position:relative}
.lcard .thumb{width:360px;flex:none}
.lcard .ctitle{font-size:18px;font-weight:400;padding-right:40px}
.lcard .cmeta{font-size:12px}
.lcard .desc{color:var(--text2);font-size:12px;margin-top:8px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.lcard .chrow{display:flex;align-items:center;gap:8px;margin:12px 0}
.lcard .chrow .avatar{width:24px;height:24px;font-size:11px}
.lcard .more{right:0}

/* ---------- watch page ---------- */
.watch{display:flex;gap:24px;padding:24px 24px 40px;max-width:1750px}
.wmain{flex:1;min-width:0}
.player{aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:#000;width:100%}
.player iframe{width:100%;height:100%;border:0;display:block}
.wtitle{font-size:20px;font-weight:600;line-height:28px;margin:12px 0 8px}
.wrow{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.wch{display:flex;align-items:center;gap:12px}
.wch .avatar{width:40px;height:40px;font-size:16px}
.wch .name{font-size:16px;font-weight:500}
.wch .subs{font-size:12px;color:var(--text2)}
.pill{height:36px;border-radius:18px;background:var(--bg3);display:inline-flex;align-items:center;gap:6px;padding:0 16px;font-weight:500;font-size:14px}
.pill:hover{background:var(--bg4)}
.pill svg{width:22px;height:22px;fill:currentColor}
.pill.primary{background:var(--text);color:var(--bg)}
.pill.primary:hover{background:#d9d9d9}
.pill.subbed{background:var(--bg3);color:var(--text)}
.pill.yt{background:#c00;color:#fff;text-decoration:none}
.pill.yt:hover{background:#e00}
.wacts{display:flex;gap:8px;flex-wrap:wrap}
.likegroup{display:inline-flex;background:var(--bg3);border-radius:18px;height:36px;overflow:hidden}
.likegroup button{display:flex;align-items:center;gap:6px;padding:0 16px;font-weight:500}
.likegroup button:hover{background:var(--bg4)}
.likegroup button:first-child{border-right:1px solid var(--bg4)}
.likegroup svg{width:22px;height:22px;fill:currentColor}
.likegroup button.on{color:var(--blue)}
.desc{background:var(--bg3);border-radius:12px;padding:12px;margin-top:12px;font-size:14px;line-height:20px;cursor:pointer}
.desc:hover{background:#333}
.desc .stats{font-weight:500;margin-bottom:6px}
.desc .tags a{color:var(--blue);margin-right:6px}
.desc .txt{white-space:pre-wrap;color:var(--text)}
.wside{width:402px;flex:none}
.wside h3{font-size:16px;font-weight:500;margin-bottom:12px}
.scard{display:flex;gap:8px;cursor:pointer;margin-bottom:8px;border-radius:8px;position:relative}
.scard:hover{background:var(--bg2)}
.scard .thumb{width:168px;flex:none;border-radius:8px}
.scard .ctitle{font-size:14px;font-weight:500;line-height:20px;padding-right:20px}
.scard .cmeta{font-size:12px;line-height:18px}
.scard .why{font-size:11px;margin-top:3px}
.scard .dur{font-size:11px}

/* ---------- misc ---------- */
.toast{position:fixed;left:50%;bottom:32px;transform:translateX(-50%) translateY(20px);background:var(--text);color:var(--bg);padding:12px 20px;border-radius:8px;font-weight:500;opacity:0;pointer-events:none;transition:all .25s;z-index:100;font-size:14px}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.btn{background:var(--bg3);border-radius:18px;height:36px;padding:0 16px;font-weight:500;display:inline-flex;align-items:center;gap:8px}
.btn:hover{background:var(--bg4)}
.btn svg{width:20px;height:20px;fill:currentColor}
.pagehead{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}
@media (max-width:1300px){.wside{width:340px}}
@media (max-width:1000px){.watch{flex-direction:column}.wside{width:100%}}
/* ---------- phones & tablets ----------
   The sidebar becomes a slide-in drawer (it used to be display:none, which left
   History, Trending and Subscriptions unreachable), plus a bottom tab bar for the
   places people go most. Safe-area insets keep it clear of the iPhone home bar. */
.scrim{display:none;position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:39}
.tabbar{display:none}
@media (max-width:800px){
  :root{--header:52px}
  body.drawer{overflow:hidden}
  nav{display:block;width:270px;transform:translateX(-100%);transition:transform .22s ease;
      box-shadow:2px 0 16px rgba(0,0,0,.5);padding-bottom:24px}
  body.drawer nav{transform:none}
  body.drawer .scrim{display:block}
  body.mini nav{width:270px;padding:12px}
  body.mini .navitem{flex-direction:row;gap:24px;height:40px;justify-content:flex-start;font-size:14px;padding:0 12px}
  body.mini .navtitle,body.mini .navsub,body.mini .taste,body.mini .navsec.hidemini{display:revert}
  body.mini .navsec{border-bottom:1px solid var(--line);margin-bottom:12px;padding-bottom:12px}
  main{margin-left:0!important;padding-bottom:calc(60px + env(safe-area-inset-bottom))}

  header{padding:0 8px;gap:4px}
  .hleft{gap:4px}
  .logo span{font-size:19px}
  /* search collapses to an icon; tapping it takes over the header */
  .hcenter{display:none}
  .searchtoggle{display:flex}
  body.searching .hcenter{display:flex;position:absolute;left:8px;right:8px;margin:0;max-width:none;z-index:2}
  body.searching .hleft,body.searching .hright{visibility:hidden}
  .search input{font-size:16px;padding:0 12px}      /* 16px stops iOS zooming on focus */
  .search button{width:48px}
  .addbtn span,.installbtn span,#authBox .pill span{display:none}
  .addbtn,.installbtn,#authBox .pill{padding:0 10px}
  .iconbtn[title="Notifications"]{display:none}

  .page{padding:0 12px 40px}
  .grid{grid-template-columns:1fr;gap:24px 0;padding-top:8px}
  .thumb{border-radius:0;margin:0 -12px;width:calc(100% + 24px)}
  .cbody{padding:0}
  .lcard{flex-direction:column;gap:8px}
  .lcard .thumb{width:calc(100% + 24px)}
  .lcard .ctitle{font-size:15px;padding-right:32px}
  .lcard .desc{display:none}
  .watch{padding:0 0 24px}
  .player{border-radius:0}
  .wtitle,.wrow,.desc,.wside{padding-left:12px;padding-right:12px}
  .wside{width:100%}
  .wacts{width:100%}
  .scard .thumb{width:150px}
  .dialog{max-height:85vh;overflow-y:auto}

  /* bottom tab bar */
  .tabbar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:38;background:var(--bg);
          border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}
  .tabbar a{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;padding:7px 0 6px;font-size:10px;color:var(--text2)}
  .tabbar a.active{color:var(--text)}
  .tabbar svg{width:23px;height:23px;fill:currentColor}
}
@media (max-width:800px) and (display-mode:standalone){
  header{padding-top:env(safe-area-inset-top);height:calc(var(--header) + env(safe-area-inset-top))}
  main{margin-top:calc(var(--header) + env(safe-area-inset-top))}
}
/* bigger touch targets on anything without a mouse */
@media (hover:none){
  .more{opacity:1}
  .menu div{padding:13px 16px}
  .navitem{height:46px}
  .chip{height:36px;padding:0 14px}
}

/* ---------- add-video dialog & search fallback ---------- */
.dialogbg{position:fixed;inset:0;background:rgba(0,0,0,.6);display:none;align-items:center;justify-content:center;z-index:200;padding:16px}
.dialogbg.open{display:flex}
.dialog{background:var(--bg2);border-radius:16px;padding:24px;width:100%;max-width:480px;box-shadow:0 10px 40px rgba(0,0,0,.6);border-top:4px solid var(--red)}
.dialog h2{font-family:var(--hand);font-size:22px;font-weight:400;display:flex;align-items:center;gap:8px;margin-bottom:8px}
.dialog h2 svg{width:24px;height:24px;fill:var(--yellow)}
.dialog p{color:var(--text2);font-size:14px;line-height:20px;margin-bottom:16px}
.dialog input,.dialog select{width:100%;background:#121212;border:1px solid #303030;border-radius:8px;padding:10px 12px;color:var(--text);font-size:15px;outline:none;margin-bottom:12px}
.dialog input:focus{border-color:var(--yellow)}
.dialog label{display:block;font-size:13px;color:var(--text2)}
.dialog label select{margin-top:6px}
.dialog .err{color:#ff6b6b;font-size:13px;min-height:18px;margin-bottom:8px}
.dlgbtns{display:flex;justify-content:flex-end;gap:8px}
.ytfallback{margin-top:32px;background:var(--bg3);border-radius:12px;padding:16px 20px;display:flex;align-items:center;gap:12px;flex-wrap:wrap;max-width:1100px}
.ytfallback>div{flex:1;min-width:200px}
.ytfallback .pill svg{width:20px;height:20px}
.ytheading{font-family:var(--hand);font-size:20px;font-weight:400;margin:32px 0 4px;display:flex;align-items:center;gap:10px}
.ytlogo{background:#c00;color:#fff;font-size:12px;width:26px;height:18px;border-radius:5px;display:inline-flex;align-items:center;justify-content:center}
/* the "Snoopy is sniffing around…" spinner. Named apart from body.searching (the
   mobile header state) — sharing a class meant the body took these rules too. */
.sniffing{display:flex;align-items:center;gap:10px;color:var(--text2);padding:24px 0}
.sniffing svg{width:22px;height:22px;fill:var(--yellow);animation:spin 1.6s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.loadmore{display:flex;justify-content:center;padding:32px 0 8px}
.loadmore .pill{height:40px;padding:0 24px}
.wmore{position:relative}
.wmore .menu{top:42px;right:0;width:240px}
.pill svg{width:22px;height:22px;fill:currentColor}
.sniffing.small{padding:12px 0;font-size:13px}
.sniffing.small svg{width:18px;height:18px}
/* ---------- sign-in ---------- */
#authBox .pill{height:36px;background:var(--bg3)}
.authavatar{width:36px;height:36px;cursor:pointer;border:2px solid transparent;background:var(--yellow);color:#111}
.authavatar.stale{border-color:#ff9f43}
.menuinfo{display:block!important;padding:8px 16px!important;color:var(--text2);font-size:13px;line-height:18px;cursor:default}
.menuinfo:hover{background:none!important}
.menuinfo.ok{color:#7ed957}.menuinfo.warn{color:#ff9f43}
.steps{margin:0 0 16px 20px;color:var(--text2);font-size:14px;line-height:22px}
.steps b,.steps code{color:var(--text)}
.dialog code{background:#121212;padding:1px 5px;border-radius:4px;font-size:13px}
@media (max-width:800px){#authBox .pill span{display:none}#authBox .pill{padding:0 8px}}
.dialog .note{background:var(--bg3);border-left:3px solid var(--yellow);border-radius:6px;padding:10px 12px;font-size:13px;line-height:19px;margin-bottom:16px}
.dialog .note b{color:var(--text)}
#authBox{display:flex;align-items:center;gap:8px}
.pill.reconnect{background:#3a2a10;color:var(--yellow);border:1px solid #6b5220;height:36px}
.pill.reconnect:hover{background:#4a3614}
@media (max-width:800px){.pill.reconnect span{display:none}.pill.reconnect{padding:0 8px}}
.kidsitem .kidsicon{width:24px;text-align:center;font-size:17px;flex:none}
.navitem.kidson{color:var(--yellow);background:rgba(245,197,24,.1)}
.kidsbadge{margin-left:auto;background:var(--yellow);color:#111;font-size:10px;font-weight:700;padding:1px 6px;border-radius:8px;letter-spacing:.5px}
body.mini .kidsbadge{display:none}
.dialog label{display:block;margin-bottom:4px}
.dialog label.check{display:flex;align-items:flex-start;gap:8px;color:var(--text);font-size:14px;margin:4px 0 6px}
.dialog label.check input{width:auto;margin:2px 0 0}
.dialog .strictnote{font-size:12px;line-height:17px}
.dialog .note.warn{border-left-color:#ff6b6b}

/* ---------- light mode ----------
   Every colour in the dark theme comes from the variables at the top of this file, so
   light mode is mostly a matter of redefining them. The handful of rules below cover
   the few places where a colour was hard-coded (the search box, the scrollbar).
   js/settings.js writes data-theme on <html>; it resolves "match my device" itself, so
   this stylesheet only ever sees "dark" or "light". */
:root[data-theme="light"]{
  --bg:#ffffff; --bg2:#f9f9f9; --bg3:#f2f2f2; --bg4:#e5e5e5;
  --text:#0f0f0f; --text2:#606060; --line:#e0e0e0;
}
:root[data-theme="light"] ::-webkit-scrollbar-thumb{background:#c4c4c4}
:root[data-theme="light"] .search input{background:#fff;border-color:#ccc;color:var(--text)}
:root[data-theme="light"] .search button{background:#f8f8f8;border-color:#ccc}
:root[data-theme="light"] .search button:hover{background:#efefef}
:root[data-theme="light"] .thumb .ph{color:#fff}
:root[data-theme="light"] .chip.active{background:#0f0f0f;color:#fff}
:root[data-theme="light"] .kidsbadge{background:#0f0f0f;color:#fff}

/* ---------- install button (js/install.js) ---------- */
.installbtn{height:36px;background:var(--bg3)}
.installbtn svg{width:20px;height:20px;fill:currentColor}

/* ---------- settings page (js/settings.js) ---------- */
.settings{max-width:820px}
.setsec{padding:20px 0;border-bottom:1px solid var(--line)}
.setsec:last-child{border:none}
.setsec h2{font-size:18px;font-weight:600;margin-bottom:6px}
.setintro{color:var(--text2);line-height:1.6;margin-bottom:12px}
.setgroup{display:flex;flex-direction:column;gap:8px}
.setrow{display:flex;align-items:flex-start;gap:12px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;cursor:pointer}
.setrow:hover{background:var(--bg2)}
.setrow.on{border-color:var(--yellow);background:var(--bg2)}
.setrow input{margin-top:2px;accent-color:var(--red);width:18px;height:18px;flex:none}
.setmain{display:flex;flex-direction:column;gap:4px;min-width:0}
.setnote{color:var(--text2);font-size:13px;line-height:1.5}
.setrow code{font-family:ui-monospace,Consolas,monospace;font-size:12px;color:var(--text2);word-break:break-all}
.muteform{display:flex;gap:8px;margin-bottom:12px;flex-wrap:wrap}
.muteform input{flex:1;min-width:180px;height:40px;background:var(--bg2);border:1px solid var(--line);border-radius:20px;padding:0 16px;color:var(--text);font-size:16px;outline:none}
.muteform input:focus{border-color:var(--yellow)}
.mutelist{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.mutechip{background:var(--bg3);border-radius:16px;padding:6px 14px;font-size:13px;display:flex;align-items:center;gap:8px}
.mutechip:hover{background:var(--bg4)}
.mutechip span{color:var(--text2);font-size:16px;line-height:1}
.setbtns{display:flex;gap:8px;flex-wrap:wrap}
.setsec .pill svg{width:20px;height:20px;fill:currentColor}

/* A tag on the watch page doubles as a mute button: the × tells Woodstock to drop
   that topic for good (js/recommend.js, notMuted). */
.tagpair{display:inline-flex;align-items:center;gap:2px}
.tagmute{color:var(--text2);font-size:15px;line-height:1;padding:0 4px;border-radius:50%;opacity:0;transition:opacity .12s}
.tagpair:hover .tagmute,.tagmute:focus{opacity:1}
.tagmute:hover{background:var(--bg3);color:var(--red)}

/* The copyable command in the download dialog (js/download.js). */
.cmdbox{display:flex;align-items:center;gap:8px;background:var(--bg3);border-radius:10px;padding:10px 12px;margin:10px 0}
.cmdbox code{flex:1;font-family:ui-monospace,Consolas,monospace;font-size:13px;word-break:break-all}
.cmdbox .pill{flex:none;background:var(--bg4);height:32px}
.dialog .note code{font-family:ui-monospace,Consolas,monospace;font-size:12px;background:var(--bg3);padding:1px 5px;border-radius:4px}

/* ---------- channel page header ----------
   Two rows of numbers, deliberately distinct: the channel's own figures come from
   YouTube (js/channel.js), the second line is SnoopyTube's own tally and says so. */
.chead{display:flex;align-items:center;gap:24px;padding:32px 0 16px;border-bottom:1px solid var(--line);margin-bottom:8px}
.chinfo{min-width:0}
.chinfo h1{font-size:32px;font-weight:700;line-height:1.2}
.avatar.big{width:128px;height:128px;font-size:48px}
.ytstats{font-size:14px;color:var(--text);margin-top:4px}
.chinfo .mine{font-size:13px;margin-top:2px}
.chinfo .pill{margin-top:12px}
.chstat.unknown{color:var(--text2);font-size:13px}

@media (max-width:800px){
  .chead{gap:16px;padding:20px 0 12px}
  .avatar.big{width:80px;height:80px;font-size:32px}
  .chinfo h1{font-size:22px}
}

/* ---------- search suggestions (js/suggest.js) ---------- */
.hcenter{position:relative}
.suggest{display:none;position:absolute;top:44px;left:0;right:64px;background:var(--bg);border:1px solid var(--line);border-radius:12px;box-shadow:0 4px 20px rgba(0,0,0,.4);padding:8px 0;z-index:60;max-height:70vh;overflow-y:auto}
.suggest.open{display:block}
.sgrow{display:flex;align-items:center;gap:14px;padding:7px 16px;cursor:pointer}
.sgrow:hover,.sgrow.on{background:var(--bg3)}
.sgicon{width:20px;flex:none;display:flex;color:var(--text2)}
.sgicon svg{width:20px;height:20px;fill:currentColor}
.sgtext{flex:1;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sgx{flex:none;color:var(--text2);font-size:18px;line-height:1;padding:0 6px;border-radius:50%}
.sgx:hover{background:var(--bg4);color:var(--text)}
:root[data-theme="light"] .suggest{box-shadow:0 4px 20px rgba(0,0,0,.15)}

@media (max-width:800px){
  /* the search box takes over the header on a phone, so the list spans it */
  body.searching .hcenter{position:static}
  body.searching .suggest{top:var(--header);left:0;right:0;border-radius:0;border-left:none;border-right:none}
}

/* ---------- channel tabs (Home / Videos / Shorts) ---------- */
.chtabs{display:flex;gap:24px;border-bottom:1px solid var(--line);margin-bottom:4px;overflow-x:auto;scrollbar-width:none}
.chtabs::-webkit-scrollbar{display:none}
.chtab{padding:12px 4px;font-size:16px;font-weight:500;color:var(--text2);white-space:nowrap;border-bottom:2px solid transparent;margin-bottom:-1px}
.chtab:hover{color:var(--text)}
.chtab.on{color:var(--text);border-bottom-color:var(--text)}
.settings .setrow input[type=checkbox]{accent-color:var(--red)}
