:root{
  --bg:#fff;--surface:#fff;--surface-2:#f2f2f2;--surface-3:#e5e5e5;--text:#0f0f0f;--muted:#606060;--line:#e5e5e5;--accent:#ff0033;--accent-soft:#ffe9ee;--hover:#f2f2f2;--sidebar-w:240px;--header-h:64px;--radius:12px;--container:1900px;--shadow:0 2px 10px rgba(0,0,0,.06)
}
html[data-theme="dark"]{--bg:#0f0f0f;--surface:#0f0f0f;--surface-2:#272727;--surface-3:#3f3f3f;--text:#f1f1f1;--muted:#aaa;--line:#3f3f3f;--accent:#ff0033;--accent-soft:#3a1219;--hover:#272727;--shadow:0 2px 12px rgba(0,0,0,.35)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--text);font:400 14px/1.5 Roboto,Arial,Helvetica,sans-serif}body,button,input,textarea,select{font-family:Roboto,Arial,Helvetica,sans-serif}a{color:inherit}button{border:0}.material-icon{font-size:22px;line-height:1;display:inline-flex;align-items:center;justify-content:center}.skip{position:absolute;left:-9999px}.skip:focus{left:10px;top:10px;z-index:1000;padding:10px;background:var(--surface);border:1px solid var(--line);border-radius:8px}
/* top bar */
.yt-header{position:fixed;top:0;left:0;right:0;height:var(--header-h);z-index:100;background:var(--surface);border-bottom:1px solid var(--line)}.yt-header-inner{height:100%;display:grid;grid-template-columns:var(--sidebar-w) minmax(260px,1fr) auto;align-items:center;gap:20px;padding:0 18px}.brand-wrap{display:flex;align-items:center;gap:12px}.menu-btn,.header-icon{width:40px;height:40px;border-radius:50%;background:transparent;color:var(--text);cursor:pointer}.menu-btn:hover,.header-icon:hover{background:var(--hover)}.brand{display:inline-flex;align-items:center;gap:8px;text-decoration:none;font-weight:800;font-size:20px;letter-spacing:-.5px}.brand-mark{width:34px;height:24px;border-radius:8px;background:var(--accent);display:grid;place-items:center;color:#fff;font-size:12px;position:relative}.brand-mark:after{content:"";border-left:8px solid #fff;border-top:5px solid transparent;border-bottom:5px solid transparent;margin-left:2px}.brand-country{font-size:10px;color:var(--muted);align-self:flex-start;margin-top:4px}.header-search{display:flex;align-items:center;max-width:760px;width:min(760px,100%);justify-self:center}.header-search input{flex:1;height:40px;border:1px solid var(--line);border-radius:20px 0 0 20px;padding:0 18px;background:var(--bg);color:var(--text);outline:none}.header-search input:focus{border-color:#1c62b9;box-shadow:inset 1px 0 0 #1c62b9,0 0 0 1px #1c62b9}.header-search button{width:64px;height:40px;border:1px solid var(--line);border-left:0;border-radius:0 20px 20px 0;background:var(--surface-2);color:var(--text);cursor:pointer}.header-actions{display:flex;align-items:center;gap:4px}.create-btn{display:inline-flex;align-items:center;gap:7px;height:40px;padding:0 14px;background:var(--surface-2);border-radius:20px;text-decoration:none;font-weight:600}.create-btn:hover{background:var(--surface-3)}.header-avatar{width:34px;height:34px;border-radius:50%;object-fit:cover;background:var(--surface-2)}
/* sidebar */
.yt-sidebar{position:fixed;top:var(--header-h);bottom:0;width:var(--sidebar-w);padding:12px 10px;overflow-y:auto;background:var(--surface);border-inline-end:1px solid var(--line);z-index:90}.side-section{padding:8px 0 12px;border-bottom:1px solid var(--line);margin-bottom:8px}.side-item{display:flex;align-items:center;gap:20px;min-height:44px;padding:0 12px;border-radius:10px;text-decoration:none;color:var(--text);font-size:14px}.side-item:hover{background:var(--hover)}.side-item.active{background:var(--surface-2);font-weight:700}.side-item .material-icon{width:22px}.side-title{font-size:12px;color:var(--muted);padding:10px 12px 6px;font-weight:700}.side-footer{padding:14px 12px 26px;color:var(--muted);font-size:11px;line-height:1.8}.side-footer a{text-decoration:none}.side-lang{display:flex;flex-wrap:wrap;gap:8px}.side-mobile-backdrop{display:none}
/* content */
.site-main{margin-top:var(--header-h);margin-inline-start:var(--sidebar-w);min-height:calc(100vh - var(--header-h));padding:20px 26px 52px}.content-inner{max-width:var(--container);margin:auto}.topic-row{display:flex;gap:10px;overflow:auto;padding:0 0 18px;scrollbar-width:none}.topic-row::-webkit-scrollbar{display:none}.topic-chip{white-space:nowrap;text-decoration:none;background:var(--surface-2);padding:8px 13px;border-radius:9px;font-weight:600;font-size:13px}.topic-chip:hover{background:var(--surface-3)}.topic-chip.active{background:var(--text);color:var(--bg)}
/* home */
.home-welcome{padding:22px 0 8px}.home-welcome h1{margin:0;font-size:24px}.home-welcome p{margin:5px 0 0;color:var(--muted)}.section{margin-top:30px}.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.section-head h2{margin:0;font-size:20px}.section-link{font-size:13px;color:var(--muted);text-decoration:none}.section-link:hover{color:var(--text)}.grid.videos{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:34px 18px}.card{min-width:0}.thumb-wrap{position:relative;display:block;aspect-ratio:16/9;border-radius:11px;overflow:hidden;background:#ddd}.thumb-wrap img{width:100%;height:100%;display:block;object-fit:cover;transition:transform .18s ease}.card:hover .thumb-wrap img{transform:scale(1.015)}.duration{position:absolute;bottom:7px;right:7px;background:rgba(0,0,0,.82);color:#fff;border-radius:4px;padding:2px 5px;font-size:11px;font-weight:700}.card-body{display:grid;grid-template-columns:38px minmax(0,1fr);gap:11px;padding-top:11px}.channel-avatar{width:36px;height:36px;border-radius:50%;object-fit:cover;background:var(--surface-2)}.title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-decoration:none;font-weight:700;line-height:1.35;font-size:15px}.channel{display:block;margin-top:5px;color:var(--muted);text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}.meta{margin-top:2px;color:var(--muted);font-size:12px}
/* watch */
.watch-layout{display:grid;grid-template-columns:minmax(0,1fr) 390px;gap:22px;align-items:start}.player{aspect-ratio:16/9;background:#000;border-radius:12px;overflow:hidden}.player iframe{width:100%;height:100%;border:0}.video-title{margin:14px 0 6px;font-size:20px;line-height:1.35}.video-meta{display:flex;gap:14px;flex-wrap:wrap;color:var(--muted);font-size:13px}.channel-row{display:flex;align-items:center;gap:12px;margin-top:12px;padding:12px 0;border-bottom:1px solid var(--line)}.channel-info{min-width:0}.channel-name{font-weight:700;text-decoration:none}.channel-handle{color:var(--muted);font-size:12px}.subscribe{margin-inline-start:auto;background:var(--text);color:var(--bg);border-radius:20px;padding:9px 16px;font-weight:700;cursor:pointer}.subscribe.subscribed{background:var(--surface-2);color:var(--text)}.actions{display:flex;flex-wrap:wrap;gap:8px;padding:14px 0}.pill{display:inline-flex;align-items:center;gap:7px;background:var(--surface-2);color:var(--text);padding:9px 13px;border-radius:20px;cursor:pointer}.pill:hover{background:var(--surface-3)}.pill.active{font-weight:700}.description{border-radius:12px;background:var(--surface-2);padding:14px;margin-top:6px}.description summary{cursor:pointer;font-weight:700}.comments{margin-top:24px}.comments-head{display:flex;justify-content:space-between;align-items:center}.comments h2{margin:0 0 12px;font-size:18px}.comments textarea{width:100%;min-height:92px;resize:vertical;border:1px solid var(--line);background:var(--bg);color:var(--text);border-radius:10px;padding:12px}.primary{margin-top:9px;background:var(--text);color:var(--bg);padding:9px 15px;border-radius:20px;font-weight:700}.comment{display:flex;gap:10px;padding:14px 0;border-top:1px solid var(--line)}.comment small{color:var(--muted)}.side-title{font-weight:700;font-size:17px;margin:0 0 12px}.side-videos{display:flex;flex-direction:column;gap:13px}.side-card{display:grid;grid-template-columns:155px 1fr;gap:10px}.side-card img{width:155px;aspect-ratio:16/9;object-fit:cover;border-radius:8px;background:var(--surface-2)}.side-card a{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-decoration:none;font-weight:700;font-size:13px;line-height:1.35}.side-card small{display:block;color:var(--muted);margin-top:4px}
/* channel */
.channel-cover{height:250px;border-radius:12px;background-size:cover;background-position:center;background-color:var(--surface-2)}.channel-profile{display:flex;align-items:center;gap:16px;padding:18px 2px 15px}.channel-avatar-lg{width:90px;height:90px;border-radius:50%;object-fit:cover;background:var(--surface-2)}.channel-profile h1{font-size:24px;margin:0}.channel-profile p{margin:4px 0 0;color:var(--muted)}.channel-desc{max-width:900px;color:var(--muted);margin:0 0 22px}
/* auth */
.auth-shell{min-height:calc(100vh - 200px);display:grid;place-items:center}.auth-box{width:min(440px,100%);padding:30px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}.auth-box h1{margin:0 0 7px;font-size:28px}.auth-box .muted{color:var(--muted)}.auth-box label{display:block;font-weight:700;margin-top:16px}.auth-box input{width:100%;height:44px;margin-top:7px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--text);padding:0 12px}.auth-box .primary{width:100%;margin-top:18px;cursor:pointer}.alert{padding:12px 14px;border-radius:10px;margin-bottom:16px;border:1px solid var(--line)}.alert.error{background:var(--accent-soft)}.alert.success{background:#e9f8ef;color:#135b2c}.empty{padding:54px 20px;text-align:center;border:1px dashed var(--line);border-radius:12px;color:var(--muted)}
/* shorts */
.shorts-page{max-width:1020px;margin:auto}.shorts-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.shorts-head h1{margin:0;font-size:28px}.shorts-head p{margin:3px 0 0;color:var(--muted)}.badge{display:inline-flex;padding:4px 8px;border-radius:5px;background:var(--text);color:var(--bg);font-size:10px;font-weight:800}.shorts-feed{height:calc(100vh - 120px);overflow-y:auto;scroll-snap-type:y mandatory;padding:0 0 30px}.short-item{min-height:calc(100vh - 120px);scroll-snap-align:start;display:grid;grid-template-columns:minmax(0,450px) 320px;justify-content:center;align-items:center;gap:24px}.short-player{position:relative;width:min(100%,450px);aspect-ratio:9/16;border-radius:14px;overflow:hidden;background:#000;box-shadow:0 8px 30px rgba(0,0,0,.2)}.short-player iframe{width:100%;height:100%;border:0}.short-actions{position:absolute;right:10px;bottom:12px;display:flex;flex-direction:column;gap:8px}.short-action{display:inline-flex;align-items:center;justify-content:center;min-width:68px;padding:9px 10px;border-radius:20px;background:rgba(0,0,0,.72);color:#fff;text-decoration:none;font-weight:700;font-size:12px}.short-info{align-self:end;padding:0 0 90px}.short-channel{display:flex;align-items:center;gap:10px;margin-bottom:12px}.short-title{display:block;text-decoration:none;font-size:18px;font-weight:700;line-height:1.45}.shorts-page .avatar{width:40px;height:40px}
/* footer */
.yt-footer{margin-top:30px;border-top:1px solid var(--line);background:var(--surface);padding:28px 24px 40px}.footer-inner{max-width:var(--container);margin:auto}.footer-top{display:flex;flex-wrap:wrap;gap:20px;align-items:center;justify-content:space-between}.footer-links{display:flex;gap:18px;flex-wrap:wrap}.footer-links a,.footer-languages a{color:var(--muted);text-decoration:none}.footer-links a:hover,.footer-languages a:hover{color:var(--text)}.footer-brand{font-weight:800}.footer-languages{display:flex;flex-wrap:wrap;gap:10px 16px;margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}

/* single video page: keep the global navigation hidden until the header menu is opened */
body.watch-page .yt-sidebar{transform:translateX(-260px);box-shadow:none;transition:transform .18s ease;}
body.watch-page .site-main{margin-inline-start:0;padding-left:26px;padding-right:26px;}
body.watch-page .side-mobile-backdrop{display:none;position:fixed;inset:var(--header-h) 0 0;background:rgba(0,0,0,.45);z-index:80;}
body.watch-page.sidebar-open .yt-sidebar{transform:translateX(0);box-shadow:var(--shadow);}
body.watch-page.sidebar-open .side-mobile-backdrop{display:block;}
html[dir="rtl"] body.watch-page .yt-sidebar{transform:translateX(260px);}
html[dir="rtl"] body.watch-page.sidebar-open .yt-sidebar{transform:translateX(0);}
@media(max-width:1280px){:root{--sidebar-w:225px}.grid.videos{grid-template-columns:repeat(3,minmax(0,1fr))}.yt-header-inner{grid-template-columns:var(--sidebar-w) minmax(220px,1fr) auto}.watch-layout{grid-template-columns:minmax(0,1fr) 340px}}
@media(max-width:980px){:root{--sidebar-w:0px}.yt-header-inner{grid-template-columns:auto minmax(120px,1fr) auto;padding:0 10px;gap:8px}.brand-country{display:none}.yt-sidebar{transform:translateX(calc(-1 * 250px));width:250px;transition:transform .18s ease;box-shadow:var(--shadow)}html[dir="rtl"] .yt-sidebar{transform:translateX(250px)}body.sidebar-open .yt-sidebar{transform:translateX(0)!important}.side-mobile-backdrop{display:none;position:fixed;inset:var(--header-h) 0 0;background:rgba(0,0,0,.45);z-index:80}body.sidebar-open .side-mobile-backdrop{display:block}.site-main{margin-inline-start:0;padding:18px 16px 45px}.grid.videos{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 14px}.watch-layout{grid-template-columns:1fr}.short-item{grid-template-columns:minmax(0,430px);justify-items:center}.short-info{display:none}.shorts-feed{height:calc(100vh - 105px)}.short-item{min-height:calc(100vh - 105px)}}
@media(max-width:620px){.header-search{max-width:none}.header-actions .create-btn{display:none}.header-actions .header-icon:nth-child(2){display:none}.grid.videos{grid-template-columns:1fr}.topic-row{padding-bottom:12px}.channel-cover{height:190px}.channel-profile{flex-wrap:wrap}.channel-profile .subscribe{margin-inline-start:0}.footer-top{display:block}.footer-links{margin-top:14px}.short-player{width:min(92vw,420px)}}
/* Single video polish v5 */
html,body{max-width:100%;overflow-x:hidden}
body.watch-page .site-main{margin-inline-start:0!important;width:100%;padding:22px clamp(14px,3vw,42px) 56px}
body.watch-page .content-inner{width:100%;max-width:1500px;margin:0 auto}
body.watch-page .watch-page-shell{width:100%;max-width:1280px;margin:0 auto}
body.watch-page .watch-main{width:100%;min-width:0}
body.watch-page .player{width:100%;max-width:1280px;margin:0 auto;border-radius:12px;overflow:hidden;background:#000}
body.watch-page .video-title{font-size:22px;font-weight:700;margin:16px 0 7px;overflow-wrap:anywhere}
body.watch-page .channel-row{min-height:68px;gap:12px;flex-wrap:nowrap}
body.watch-page .channel-avatar-link{display:flex;flex:0 0 48px;width:48px;height:48px}
body.watch-page .watch-channel-avatar{display:block!important;width:48px!important;height:48px!important;min-width:48px;max-width:48px;border-radius:50%;object-fit:cover;background:var(--surface-2)}
body.watch-page .channel-info{min-width:0;flex:1}
body.watch-page .channel-name{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:15px}
body.watch-page .subscribe{flex:0 0 auto;white-space:nowrap;text-decoration:none}
.watch-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:14px 0 10px}
.action-group{display:flex;align-items:center;gap:2px;background:var(--surface-2);border-radius:24px;padding:2px}
.watch-action{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:0 15px;border-radius:22px;background:var(--surface-2);color:var(--text);text-decoration:none;cursor:pointer;font-weight:600;white-space:nowrap}
.action-group .watch-action{min-height:38px;padding:0 12px}
.watch-action:hover{background:var(--surface-3)}
.watch-action.active{font-weight:800}
.description{margin-top:4px}
.comments-count{color:var(--muted);font-size:13px}
.watch-related{margin-top:34px;border-top:1px solid var(--line);padding-top:24px}
.watch-related-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:28px 18px}
@media(max-width:1100px){.watch-related-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){body.watch-page .site-main{padding:12px 10px 42px}body.watch-page .video-title{font-size:18px}body.watch-page .channel-row{align-items:center}.watch-actions{gap:6px}.watch-action{min-height:38px;padding:0 11px}.watch-action span{font-size:12px}.watch-related-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 12px}}
@media(max-width:520px){body.watch-page .channel-row{flex-wrap:wrap}.subscribe{margin-inline-start:auto}.watch-related-grid{grid-template-columns:1fr}.watch-actions{overflow:visible}.action-group{max-width:100%}.watch-action{padding:0 9px}}

.yt-download-notice{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:1200;max-width:min(92vw,560px);padding:12px 16px;border-radius:10px;background:rgba(15,15,15,.94);color:#fff;text-align:center;box-shadow:0 8px 28px rgba(0,0,0,.24);font-size:13px}


/* YouTube-style watch layout v6: recommendations beside the player */
body.watch-page .watch-page-shell{max-width:1600px}
body.watch-page .watch-layout{display:grid;grid-template-columns:minmax(0,1fr) 390px;gap:24px;align-items:start}
body.watch-page .watch-main{grid-area:main;min-width:0}
body.watch-page .watch-recommendations{grid-area:side;min-width:0;padding-top:2px}
body.watch-page .watch-recommendations-head{display:flex;align-items:center;justify-content:space-between;margin:0 0 12px}
body.watch-page .watch-recommendations-head h2{font-size:18px;margin:0;font-weight:700}
html[dir="ltr"] body.watch-page .watch-layout{grid-template-areas:"main side"}
html[dir="rtl"] body.watch-page .watch-layout{grid-template-areas:"side main"}
body.watch-page .watch-related-grid{display:none!important}
body.watch-page .watch-recommendations .side-videos{gap:12px}
body.watch-page .watch-recommendations .side-card{grid-template-columns:155px minmax(0,1fr);gap:10px;align-items:start}
body.watch-page .watch-recommendations .side-card img{width:155px;height:87px;aspect-ratio:16/9;object-fit:cover;border-radius:8px;display:block}
body.watch-page .watch-recommendations .side-card a{font-size:13px;line-height:1.35}
body.watch-page .watch-recommendations .side-card .meta{font-size:11px;color:var(--muted);margin-top:3px}
@media(max-width:1250px){body.watch-page .watch-layout{grid-template-columns:minmax(0,1fr) 350px}.watch-recommendations .side-card{grid-template-columns:140px minmax(0,1fr)!important}.watch-recommendations .side-card img{width:140px!important;height:79px!important}}
@media(max-width:980px){body.watch-page .watch-layout{display:block}.watch-recommendations{margin-top:28px!important;border-top:1px solid var(--line);padding-top:20px!important}.watch-recommendations .side-videos{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px}.watch-recommendations .side-card{display:block!important}.watch-recommendations .side-card img{width:100%!important;height:auto!important;aspect-ratio:16/9}.watch-recommendations .side-card > div{padding-top:7px}}
@media(max-width:600px){.watch-recommendations .side-videos{grid-template-columns:1fr}.watch-recommendations .side-card{display:grid!important;grid-template-columns:145px minmax(0,1fr)!important}.watch-recommendations .side-card img{width:145px!important;height:82px!important}}

/* ShwTube v7 — RTL/LTR YouTube-like navigation and topic bar polish */
html[dir="ltr"] .yt-sidebar{left:0;right:auto;border-right:1px solid var(--line);border-left:0}
html[dir="rtl"] .yt-sidebar{right:0;left:auto;border-left:1px solid var(--line);border-right:0}
html[dir="ltr"] .site-main{margin-left:var(--sidebar-w);margin-right:0}
html[dir="rtl"] .site-main{margin-right:var(--sidebar-w);margin-left:0}

/* Header follows reading direction: brand/navigation at the outer edge, search centered, actions opposite. */
.yt-header-inner{direction:inherit}
html[dir="rtl"] .yt-header-inner{grid-template-columns:auto minmax(260px,1fr) var(--sidebar-w)}
html[dir="rtl"] .brand-wrap{justify-content:flex-start}
html[dir="rtl"] .header-actions{justify-content:flex-end}
html[dir="ltr"] .yt-header-inner{grid-template-columns:var(--sidebar-w) minmax(260px,1fr) auto}

/* YouTube-like horizontal category chips */
.topic-row{display:flex;align-items:center;gap:10px;overflow-x:auto;overflow-y:hidden;padding:8px 2px 18px;min-height:54px;direction:ltr}
html[dir="rtl"] .topic-row{direction:rtl}
.topic-chip{display:inline-flex;align-items:center;justify-content:center;height:40px;padding:0 15px;border:0;border-radius:8px;background:var(--surface-2);color:var(--text);font-size:13px;font-weight:600;flex:0 0 auto;transition:background .15s ease,transform .15s ease}
.topic-chip:hover{background:var(--surface-3);transform:translateY(-1px)}
.topic-chip.active{background:var(--text);color:var(--bg)}

/* Arabic content should feel like YouTube: controls and metadata flow naturally RTL. */
html[dir="rtl"] .card-body{grid-template-columns:minmax(0,1fr) 38px}
html[dir="rtl"] .card-body .channel-avatar{grid-column:2}
html[dir="rtl"] .card-body > div{grid-column:1;text-align:right}
html[dir="rtl"] .video-meta,.watch-actions{direction:rtl}
html[dir="rtl"] .side-card{grid-template-columns:minmax(0,1fr) 155px}
html[dir="rtl"] .side-card img{grid-column:2}
html[dir="rtl"] .side-card > div{grid-column:1;text-align:right}

/* Single page — sidebar hidden until the hamburger is pressed; recommendations sit opposite the player. */
html[dir="rtl"] body.watch-page .watch-layout{grid-template-areas:"side main"}
html[dir="ltr"] body.watch-page .watch-layout{grid-template-areas:"main side"}
html[dir="rtl"] body.watch-page .watch-recommendations .side-card{grid-template-columns:minmax(0,1fr) 155px}
html[dir="rtl"] body.watch-page .watch-recommendations .side-card img{grid-column:2}
html[dir="rtl"] body.watch-page .watch-recommendations .side-card > div{grid-column:1;text-align:right}

/* Mobile menu direction */
@media(max-width:980px){
  html[dir="ltr"] .yt-sidebar{left:0;right:auto;transform:translateX(-260px)}
  html[dir="rtl"] .yt-sidebar{right:0;left:auto;transform:translateX(260px)}
  html[dir="ltr"] body.sidebar-open .yt-sidebar{transform:translateX(0)!important}
  html[dir="rtl"] body.sidebar-open .yt-sidebar{transform:translateX(0)!important}
  html[dir="rtl"] .yt-header-inner{grid-template-columns:auto minmax(120px,1fr) auto}
  html[dir="ltr"] .yt-header-inner{grid-template-columns:auto minmax(120px,1fr) auto}
  html[dir="rtl"] .site-main,html[dir="ltr"] .site-main{margin-left:0;margin-right:0}
}

/* Avoid any horizontal page overflow from the watch layout. */
body.watch-page .watch-layout{width:100%;min-width:0}
body.watch-page .watch-main,body.watch-page .watch-recommendations{min-width:0}

/* ShwTube v8 — precise YouTube-like watch geometry */
body.watch-page .watch-page-shell{max-width:1600px;margin-inline:auto}
body.watch-page .watch-layout{display:grid;gap:24px;align-items:start;grid-template-columns:minmax(0,1fr) 390px;grid-template-areas:"main side"}
html[dir="rtl"] body.watch-page .watch-layout{grid-template-columns:390px minmax(0,1fr);grid-template-areas:"side main"}
body.watch-page .watch-main{grid-area:main;min-width:0}
body.watch-page .watch-recommendations{grid-area:side;min-width:0}
body.watch-page .player{width:100%;max-width:none;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:#000}
body.watch-page .watch-recommendations-head{margin:0 0 12px;display:flex;align-items:center;justify-content:space-between}
body.watch-page .watch-recommendations-head h2{margin:0;font-size:16px;font-weight:700}
body.watch-page .watch-recommendations .side-videos{display:flex;flex-direction:column;gap:14px}
body.watch-page .watch-recommendations .side-card{display:grid;grid-template-columns:155px minmax(0,1fr);gap:10px;align-items:start}
body.watch-page .watch-recommendations .side-card img{width:155px;height:87px;object-fit:cover;aspect-ratio:16/9;border-radius:8px;display:block;background:var(--surface-2)}
body.watch-page .watch-recommendations .side-card a{font-size:13px;line-height:1.4;font-weight:700}
body.watch-page .watch-recommendations .side-card small,body.watch-page .watch-recommendations .side-card .meta{font-size:11px;color:var(--muted);line-height:1.4}
html[dir="rtl"] body.watch-page .watch-recommendations .side-card{grid-template-columns:minmax(0,1fr) 155px}
html[dir="rtl"] body.watch-page .watch-recommendations .side-card img{grid-column:2}
html[dir="rtl"] body.watch-page .watch-recommendations .side-card>div{grid-column:1;text-align:right}
@media(max-width:1250px){
 body.watch-page .watch-layout{grid-template-columns:minmax(0,1fr) 340px}
 html[dir="rtl"] body.watch-page .watch-layout{grid-template-columns:340px minmax(0,1fr)}
 body.watch-page .watch-recommendations .side-card{grid-template-columns:140px minmax(0,1fr)}
 html[dir="rtl"] body.watch-page .watch-recommendations .side-card{grid-template-columns:minmax(0,1fr) 140px}
 body.watch-page .watch-recommendations .side-card img{width:140px;height:79px}
}
@media(max-width:980px){
 body.watch-page .watch-layout,html[dir="rtl"] body.watch-page .watch-layout{display:block}
 body.watch-page .watch-recommendations{margin-top:28px!important;border-top:1px solid var(--line);padding-top:20px!important}
 body.watch-page .watch-recommendations .side-videos{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px}
 body.watch-page .watch-recommendations .side-card,html[dir="rtl"] body.watch-page .watch-recommendations .side-card{display:block;grid-template-columns:none}
 body.watch-page .watch-recommendations .side-card img,html[dir="rtl"] body.watch-page .watch-recommendations .side-card img{width:100%;height:auto;aspect-ratio:16/9}
 body.watch-page .watch-recommendations .side-card>div,html[dir="rtl"] body.watch-page .watch-recommendations .side-card>div{padding-top:7px;text-align:start}
}
@media(max-width:600px){
 body.watch-page .watch-recommendations .side-videos{grid-template-columns:1fr}
 body.watch-page .watch-recommendations .side-card,html[dir="rtl"] body.watch-page .watch-recommendations .side-card{display:grid;grid-template-columns:145px minmax(0,1fr)}
 html[dir="rtl"] body.watch-page .watch-recommendations .side-card{grid-template-columns:minmax(0,1fr) 145px}
 body.watch-page .watch-recommendations .side-card img,html[dir="rtl"] body.watch-page .watch-recommendations .side-card img{width:145px;height:82px}
}


/* ShwTube v9 — robust watch direction by active language */
html[dir="rtl"] body.watch-page .watch-layout,
body.watch-page.lang-ar .watch-layout{
  display:flex!important;
  flex-direction:row!important;
  gap:24px!important;
  align-items:flex-start!important;
  width:100%!important;
}
html[dir="rtl"] body.watch-page .watch-main,
body.watch-page.lang-ar .watch-main{order:2!important; flex:1 1 auto!important; min-width:0!important;}
html[dir="rtl"] body.watch-page .watch-recommendations,
body.watch-page.lang-ar .watch-recommendations{order:1!important; flex:0 0 390px!important; width:390px!important; min-width:0!important;}
html[dir="ltr"] body.watch-page .watch-main,
body.watch-page.lang-ltr .watch-main{order:1!important; flex:1 1 auto!important; min-width:0!important;}
html[dir="ltr"] body.watch-page .watch-recommendations,
body.watch-page.lang-ltr .watch-recommendations{order:2!important; flex:0 0 390px!important; width:390px!important; min-width:0!important;}

html[dir="rtl"] body.watch-page .watch-recommendations .side-card,
body.watch-page.lang-ar .watch-recommendations .side-card{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 155px!important;
}
html[dir="rtl"] body.watch-page .watch-recommendations .side-card img,
body.watch-page.lang-ar .watch-recommendations .side-card img{grid-column:2!important;}
html[dir="rtl"] body.watch-page .watch-recommendations .side-card>div,
body.watch-page.lang-ar .watch-recommendations .side-card>div{grid-column:1!important; text-align:right!important;}

@media(max-width:1250px){
  html[dir="rtl"] body.watch-page .watch-recommendations,
  body.watch-page.lang-ar .watch-recommendations{flex-basis:340px!important;width:340px!important;}
  html[dir="rtl"] body.watch-page .watch-recommendations .side-card,
  body.watch-page.lang-ar .watch-recommendations .side-card{grid-template-columns:minmax(0,1fr) 140px!important;}
  html[dir="rtl"] body.watch-page .watch-recommendations .side-card img,
  body.watch-page.lang-ar .watch-recommendations .side-card img{width:140px!important;height:79px!important;}
}
@media(max-width:980px){
  html[dir="rtl"] body.watch-page .watch-layout,
  body.watch-page.lang-ar .watch-layout{display:block!important;}
  html[dir="rtl"] body.watch-page .watch-recommendations,
  body.watch-page.lang-ar .watch-recommendations{width:auto!important;flex:none!important;margin-top:28px!important;}
}

/* Keep the page from ever creating a bottom horizontal scrollbar. */
html,body{max-width:100%;overflow-x:hidden;}
body.watch-page .site-main,body.watch-page .content-inner,body.watch-page .watch-page-shell{max-width:100%;overflow-x:clip;}

/* ShwTube v10 — lock watch columns to screen sides, independent of document direction.
   The document can stay RTL/LTR for text while the two-column shell uses a stable LTR flex axis. */
@media(min-width:981px){
  body.watch-page .watch-layout{
    display:flex!important;
    flex-direction:row!important;
    direction:ltr!important;
    gap:24px!important;
    align-items:flex-start!important;
    width:100%!important;
  }
  /* Arabic: recommendations on the left, player on the right. */
  html[dir="rtl"] body.watch-page .watch-recommendations,
  body.watch-page.lang-ar .watch-recommendations{
    order:1!important;
    flex:0 0 390px!important;
    width:390px!important;
    direction:rtl!important;
  }
  html[dir="rtl"] body.watch-page .watch-main,
  body.watch-page.lang-ar .watch-main{
    order:2!important;
    flex:1 1 auto!important;
    min-width:0!important;
    direction:rtl!important;
  }
  /* LTR: player on the left, recommendations on the right. */
  html[dir="ltr"] body.watch-page .watch-main,
  body.watch-page.lang-ltr .watch-main{
    order:1!important;
    flex:1 1 auto!important;
    min-width:0!important;
    direction:ltr!important;
  }
  html[dir="ltr"] body.watch-page .watch-recommendations,
  body.watch-page.lang-ltr .watch-recommendations{
    order:2!important;
    flex:0 0 390px!important;
    width:390px!important;
    direction:ltr!important;
  }
}


/* ShwTube v11 — YouTube-style recommendation rail */
.watch-recommendations{min-width:0;}
.recommendation-tabs{display:flex;align-items:center;gap:8px;overflow-x:auto;scrollbar-width:none;padding:0 0 14px;margin-bottom:2px;direction:inherit;}
.recommendation-tabs::-webkit-scrollbar{display:none;}
.recommendation-tab{appearance:none;border:0;white-space:nowrap;background:var(--surface-2);color:var(--text);padding:8px 14px;border-radius:9px;font-size:13px;font-weight:700;cursor:pointer;line-height:1.2;transition:background .15s ease, color .15s ease;}
.recommendation-tab:hover{background:var(--surface-3);}
.recommendation-tab.active{background:var(--text);color:var(--bg);}
.side-videos{gap:14px;}
.side-card.reco-card{display:grid;grid-template-columns:168px minmax(0,1fr);gap:10px;align-items:start;min-width:0;}
.side-thumb{display:block;position:relative;width:168px;aspect-ratio:16/9;border-radius:9px;overflow:hidden;background:var(--surface-2);}
.side-thumb img{width:100%;height:100%;display:block;object-fit:cover;}
.side-card-info{min-width:0;}
.side-title-link{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-decoration:none;font-size:13px;line-height:1.4;font-weight:700;color:var(--text);}
.side-channel{display:block;color:var(--muted);font-size:11px;margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.side-card-info .meta{font-size:11px;line-height:1.35;}
html[dir="rtl"] .side-card.reco-card, body.watch-page.lang-ar .side-card.reco-card{grid-template-columns:minmax(0,1fr) 168px;}
html[dir="rtl"] .side-card.reco-card .side-thumb, body.watch-page.lang-ar .side-card.reco-card .side-thumb{grid-column:2;grid-row:1;}
html[dir="rtl"] .side-card.reco-card .side-card-info, body.watch-page.lang-ar .side-card.reco-card .side-card-info{grid-column:1;grid-row:1;text-align:right;}
html[dir="ltr"] .side-card.reco-card .side-thumb, body.watch-page.lang-ltr .side-card.reco-card .side-thumb{grid-column:1;grid-row:1;}
html[dir="ltr"] .side-card.reco-card .side-card-info, body.watch-page.lang-ltr .side-card.reco-card .side-card-info{grid-column:2;grid-row:1;text-align:left;}
@media(max-width:1250px){
  .side-card.reco-card{grid-template-columns:145px minmax(0,1fr)!important;}
  .side-thumb{width:145px;}
  html[dir="rtl"] .side-card.reco-card,body.watch-page.lang-ar .side-card.reco-card{grid-template-columns:minmax(0,1fr) 145px!important;}
}
@media(max-width:980px){
  .watch-recommendations{margin-top:28px;}
  .side-card.reco-card,html[dir="rtl"] .side-card.reco-card,body.watch-page.lang-ar .side-card.reco-card,html[dir="ltr"] .side-card.reco-card,body.watch-page.lang-ltr .side-card.reco-card{grid-template-columns:180px minmax(0,1fr)!important;}
  .side-thumb{width:180px;}
  html[dir="rtl"] .side-card.reco-card .side-thumb,body.watch-page.lang-ar .side-card.reco-card .side-thumb{grid-column:1;}
  html[dir="rtl"] .side-card.reco-card .side-card-info,body.watch-page.lang-ar .side-card.reco-card .side-card-info{grid-column:2;text-align:right;}
}
@media(max-width:560px){
  .side-card.reco-card,html[dir="rtl"] .side-card.reco-card,body.watch-page.lang-ar .side-card.reco-card,html[dir="ltr"] .side-card.reco-card,body.watch-page.lang-ltr .side-card.reco-card{grid-template-columns:140px minmax(0,1fr)!important;gap:9px;}
  .side-thumb{width:140px;}
  .side-title-link{font-size:12px;}
}

/* YouTube-like comments + recommendation rail refinements v11 */
.comment.youtube-comment{align-items:flex-start}.comment-reply{margin-inline-start:48px;padding-top:10px;padding-bottom:10px}.comment-body{min-width:0;flex:1}.comment-author-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.comment-source{font-size:11px;color:var(--muted);padding:3px 7px;border-radius:999px;background:var(--surface-2)}.comment-text{margin-top:4px;line-height:1.7}.comment-tools{display:flex;gap:14px;flex-wrap:wrap;color:var(--muted);font-size:12px;margin-top:7px}.empty-comments{color:var(--muted);padding:16px 0}.recommendation-tabs{display:flex;gap:8px;overflow-x:auto;padding:3px 0 12px;scrollbar-width:none}.recommendation-tabs::-webkit-scrollbar{display:none}.recommendation-tab{border:0;background:var(--surface-2);color:var(--text);border-radius:999px;padding:9px 14px;white-space:nowrap;cursor:pointer;font-weight:700}.recommendation-tab.active{background:var(--text);color:var(--bg)}.watch-recommendations{position:sticky;top:76px}.watch-recommendations .side-videos{max-height:calc(100vh - 145px);overflow:auto;padding-inline-end:4px}.watch-recommendations .side-card{grid-template-columns:140px minmax(0,1fr);gap:10px}.watch-recommendations .side-card img{width:140px;height:79px;border-radius:8px}.watch-recommendations .side-card-info{min-width:0}.watch-recommendations .side-title-link{font-size:13px}.watch-recommendations .side-channel,.watch-recommendations .meta{font-size:11px;color:var(--muted)}
html[dir="rtl"] body.watch-page .watch-recommendations .side-card{grid-template-columns:minmax(0,1fr) 140px}
html[dir="rtl"] body.watch-page .watch-recommendations .side-card img{grid-column:2}
html[dir="rtl"] body.watch-page .watch-recommendations .side-card > div{grid-column:1}
@media(max-width:980px){.watch-recommendations{position:static}.watch-recommendations .side-videos{max-height:none;overflow:visible}.comment-reply{margin-inline-start:24px}}


/* ShwTube v13 — YouTube-style recommendation rail polish */
body.watch-page .watch-recommendations{position:static!important;top:auto!important;}
body.watch-page .watch-recommendations .side-videos{max-height:none!important;overflow:visible!important;padding-inline-end:0!important;}
body.watch-page .watch-recommendations{overflow:visible!important;}
.reco-preview{position:relative;display:block;overflow:hidden;}
.reco-preview img{transition:opacity .16s ease,transform .2s ease;}
.reco-preview.is-previewing img{opacity:.25;transform:scale(1.015);}
.reco-preview .preview-frame{position:absolute;inset:0;width:100%;height:100%;border:0;display:block;pointer-events:none;background:#000;}
.duration-badge{position:absolute;inset-inline-end:6px;inset-block-end:6px;z-index:2;background:rgba(0,0,0,.86);color:#fff;font-size:11px;font-weight:700;line-height:1;padding:5px 6px;border-radius:4px;letter-spacing:.1px;}
.recommendation-tab{flex:0 0 auto;}
@media(min-width:981px){
  body.watch-page .watch-recommendations .side-videos{gap:16px;}
  body.watch-page .watch-recommendations .side-card.reco-card{grid-template-columns:168px minmax(0,1fr)!important;}
  html[dir="rtl"] body.watch-page .watch-recommendations .side-card.reco-card{grid-template-columns:minmax(0,1fr) 168px!important;}
  body.watch-page .watch-recommendations .side-thumb{width:168px;height:95px;}
  body.watch-page .watch-recommendations .side-card-info{padding-top:1px;}
  body.watch-page .watch-recommendations .side-title-link{font-size:14px;line-height:1.35;}
}
@media(max-width:980px){
  body.watch-page .watch-recommendations .side-videos{display:flex!important;flex-direction:column!important;gap:16px!important;}
  body.watch-page .watch-recommendations .side-card.reco-card,html[dir="rtl"] body.watch-page .watch-recommendations .side-card.reco-card{display:grid!important;grid-template-columns:180px minmax(0,1fr)!important;}
  body.watch-page .watch-recommendations .side-thumb{width:180px;height:101px;}
  html[dir="rtl"] body.watch-page .watch-recommendations .side-thumb{grid-column:1!important;}
  html[dir="rtl"] body.watch-page .watch-recommendations .side-card-info{grid-column:2!important;}
}
@media(max-width:560px){
  body.watch-page .watch-recommendations .side-card.reco-card,html[dir="rtl"] body.watch-page .watch-recommendations .side-card.reco-card{grid-template-columns:140px minmax(0,1fr)!important;}
  body.watch-page .watch-recommendations .side-thumb{width:140px;height:79px;}
}


/* ShwTube v17 — clean YouTube-like cards: transparent by default, hover only */
.video-card-ambient{position:relative;border-radius:12px;padding:0 0 8px;overflow:visible;background:transparent;transition:background-color .16s ease,box-shadow .16s ease;}
.video-card-ambient::before{content:none!important;}
.video-card-ambient:hover{background:var(--hover);}
.home-preview{position:relative;}
.home-preview img{transition:opacity .18s ease,transform .18s ease;}
.home-preview.is-previewing img{opacity:.18;transform:scale(1.01);}
.home-preview .preview-frame{position:absolute;inset:0;width:100%;height:100%;border:0;background:#000;z-index:1;pointer-events:none;}
.home-preview .duration{z-index:3;}
.preview-label{position:absolute;left:8px;bottom:7px;z-index:3;background:rgba(0,0,0,.78);color:#fff;border-radius:5px;padding:3px 6px;font-size:10px;font-weight:700;opacity:0;transform:translateY(3px);transition:opacity .16s ease,transform .16s ease;pointer-events:none;}
.home-preview:hover .preview-label{opacity:1;transform:none;}

/* Shorts page: accurate duration badge and card/hover behavior */
.shorts-page .short-card{position:relative;}
.shorts-page .short-duration{position:absolute;right:8px;bottom:8px;z-index:4;background:rgba(0,0,0,.86);color:#fff;border-radius:4px;padding:4px 6px;font-size:11px;font-weight:800;}
.shorts-page .short-player.is-previewing img{opacity:.15;}
@media(max-width:980px){.preview-label{display:none;}}

.shorts-page .short-player .short-poster{display:none;position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:1;}
.shorts-page .short-player iframe{position:absolute;inset:0;z-index:2;}
.shorts-page .short-duration{z-index:5;}


/* v18 — YouTube-like Shorts / Reels desktop feed, normal flow on mobile */
.shorts-page{max-width:1200px;margin:0 auto;padding-bottom:48px}.shorts-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:18px 0 22px}.shorts-head h1{margin:8px 0 4px}.shorts-head p{margin:0;color:var(--muted)}.shorts-link{color:var(--text);text-decoration:none;font-weight:700}.shorts-shell{position:relative;display:flex;justify-content:center;align-items:center;min-height:calc(100vh - 190px)}.shorts-feed{width:100%;max-width:760px;display:flex;flex-direction:column;gap:28px;scroll-snap-type:y mandatory;scroll-behavior:smooth}.short-item{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 78px;gap:16px;align-items:end;min-height:calc(100vh - 190px);scroll-snap-align:start}.short-stage{position:relative;width:min(520px,72vw);aspect-ratio:9/16;margin-inline:auto}.short-player{position:relative;width:100%;height:100%;overflow:hidden;border-radius:18px;background:#000;box-shadow:0 20px 70px rgba(0,0,0,.24)}.short-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:1}.short-iframe-slot{position:absolute;inset:0;z-index:2}.short-iframe-slot iframe{width:100%;height:100%;border:0;display:block}.short-duration{position:absolute;left:10px;bottom:10px;z-index:5;background:rgba(0,0,0,.84);color:#fff;border-radius:4px;padding:5px 7px;font-size:12px;font-weight:800;direction:ltr}.short-sound-pill{position:absolute;right:12px;top:12px;z-index:6;background:rgba(0,0,0,.58);color:#fff;border-radius:999px;padding:7px 10px;font-size:11px}.short-meta-overlay{position:absolute;left:16px;right:96px;bottom:16px;z-index:7;color:#fff;text-shadow:0 1px 4px rgba(0,0,0,.65);pointer-events:none}.short-meta-overlay a{pointer-events:auto}.short-channel{display:inline-flex;align-items:center;gap:9px;color:#fff;text-decoration:none;font-weight:800}.short-channel img{width:34px;height:34px;border-radius:50%;object-fit:cover;border:2px solid rgba(255,255,255,.75)}.short-title{display:block;color:#fff;text-decoration:none;font-size:15px;line-height:1.5;margin-top:8px;font-weight:700}.short-stats{font-size:11px;opacity:.9;margin-top:6px}.short-actions{display:flex;flex-direction:column;align-items:center;gap:12px;padding-bottom:12px}.short-actions form{margin:0}.short-action-btn{width:64px;min-height:64px;border:0;border-radius:999px;background:var(--surface-2);color:var(--text);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-decoration:none;cursor:pointer;box-shadow:0 8px 24px rgba(0,0,0,.08)}.short-action-btn:hover{background:var(--hover);transform:translateY(-1px)}.short-action-btn span{font-size:23px;line-height:1}.short-action-btn b{font-size:10px;font-weight:800}.short-action-btn img{width:28px;height:28px;border-radius:50%;object-fit:cover}.short-nav{position:fixed;z-index:40;left:28px;width:52px;height:52px;border:0;border-radius:50%;background:var(--surface-2);color:var(--text);box-shadow:0 10px 30px rgba(0,0,0,.12);font-size:22px;cursor:pointer}.short-nav:hover{background:var(--hover)}.short-nav-prev{top:calc(50% - 76px)}.short-nav-next{top:calc(50% + 20px)}.shorts-page .empty{margin:60px auto;max-width:640px;text-align:center;padding:40px;border:1px solid var(--border);border-radius:20px;background:var(--surface)}
html[data-theme="dark"] .short-player{box-shadow:0 24px 80px rgba(0,0,0,.5)}
@media(max-width:980px){.short-item{grid-template-columns:minmax(0,1fr) 68px}.short-stage{width:min(500px,68vw)}.short-nav{left:16px}.short-action-btn{width:58px;min-height:58px}}
@media(max-width:700px){.shorts-head{padding:12px 0 18px}.shorts-head p{font-size:12px}.shorts-shell{min-height:0;display:block}.shorts-feed{max-width:none;gap:20px;scroll-snap-type:none}.short-item{display:flex;flex-direction:column;gap:10px;min-height:0;scroll-snap-align:none;align-items:stretch}.short-stage{width:100%;aspect-ratio:9/16}.short-player{border-radius:14px}.short-meta-overlay{left:12px;right:12px;bottom:12px}.short-actions{flex-direction:row;justify-content:flex-start;overflow-x:auto;padding:0 2px 8px;gap:8px}.short-action-btn{width:58px;min-width:58px;min-height:58px}.short-nav{display:none}.short-sound-pill{font-size:10px}.short-title{font-size:14px}}

/* v19 — standalone Shorts pages, one Short per URL, desktop controls + mobile normal flow */
.short-single-page{max-width:1200px;margin:0 auto;padding:14px 0 46px}.short-single-head{display:flex;align-items:center;justify-content:space-between;margin:0 0 14px;padding:0 6px}.short-back{color:var(--text);text-decoration:none;font-weight:800}.short-single-layout{display:grid;grid-template-columns:minmax(0,760px) 88px;justify-content:center;gap:20px;align-items:end}.short-single-stage{min-width:0}.short-single-player{position:relative;width:min(520px,100%);aspect-ratio:9/16;margin:0 auto;border-radius:18px;overflow:hidden;background:#000;box-shadow:0 18px 60px rgba(0,0,0,.2)}.short-youtube-frame,.short-youtube-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0;display:block}.short-single-duration{position:absolute;left:12px;bottom:12px;z-index:5;background:rgba(0,0,0,.85);color:#fff;border-radius:5px;padding:5px 8px;font-size:12px;font-weight:800;direction:ltr;pointer-events:none}.short-single-info{width:min(520px,100%);margin:12px auto 0}.short-single-channel{display:inline-flex;align-items:center;gap:10px;color:var(--text);text-decoration:none;font-weight:800}.short-single-channel img{width:42px;height:42px;border-radius:50%;object-fit:cover}.short-single-info h1{font-size:18px;line-height:1.5;margin:10px 0 6px}.short-single-stats{font-size:12px;color:var(--muted)}.short-single-actions{display:flex;flex-direction:column;align-items:center;gap:10px;padding-bottom:6px}.short-single-actions form{margin:0}.short-single-action,.short-single-nav{width:64px;min-height:64px;border:0;border-radius:999px;background:var(--surface-2);color:var(--text);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-decoration:none;cursor:pointer;box-shadow:0 6px 20px rgba(0,0,0,.08)}.short-single-action:hover,.short-single-nav:hover{background:var(--hover)}.short-single-action span{font-size:23px;line-height:1}.short-single-action b{font-size:10px}.short-single-action img{width:30px;height:30px;border-radius:50%;object-fit:cover}.short-single-nav{font-size:22px}.short-swipe-hint{text-align:center;color:var(--muted);font-size:11px;margin-top:14px}
@media(min-width:701px){.short-single-page{min-height:calc(100vh - 160px)}.short-single-layout{min-height:calc(100vh - 210px)}.short-single-actions{justify-self:start}}
@media(max-width:700px){.short-single-page{padding:10px 0 30px}.short-single-layout{display:flex;flex-direction:column;align-items:stretch;gap:12px}.short-single-stage{width:100%}.short-single-player{width:100%;max-height:none;border-radius:12px}.short-single-info{padding:0 4px}.short-single-actions{flex-direction:row;flex-wrap:wrap;justify-content:flex-start;overflow:visible;padding:0 4px;gap:7px}.short-single-action,.short-single-nav{width:56px;min-height:56px}.short-swipe-hint{font-size:10px;padding:0 8px}}

/* v22 — dedicated Shorts viewer: one Short per URL, YouTube-like desktop/mobile behavior. */
.short-single-page{max-width:100%;margin:0;padding:0 0 24px;min-height:calc(100vh - 78px)}
.short-single-head{display:none}
.short-single-layout{display:grid;grid-template-columns:minmax(0,520px) 78px;justify-content:center;align-items:center;gap:14px;min-height:calc(100vh - 110px);margin:0 auto}
.short-single-stage{min-width:0;display:flex;flex-direction:column;align-items:center}
.short-single-player{width:min(520px,calc(100vh - 145px)*9/16);max-width:calc(100vw - 160px);height:auto;aspect-ratio:9/16;margin:0;border-radius:14px;background:#000;box-shadow:0 12px 45px rgba(0,0,0,.18)}
.short-single-info{width:min(520px,100%);margin:10px 0 0;text-align:start}
.short-single-channel{display:flex;align-items:center;gap:10px;width:max-content;max-width:100%;margin-inline-start:0}
.short-single-info h1{font-size:18px;line-height:1.45;margin:8px 0 4px;font-weight:800}
.short-single-actions{align-self:center;justify-self:start;display:flex;flex-direction:column;align-items:center;gap:10px;padding:0}
.short-single-action,.short-single-nav{width:56px;min-height:56px}
.short-single-nav{font-size:24px}
.short-swipe-hint{display:none}
.short-comments-note{display:none}
@media(max-width:700px){
 .short-single-page{min-height:0;padding:10px 0 28px}
 .short-single-layout{display:flex;flex-direction:column;gap:10px;min-height:0;width:100%;}
 .short-single-player{width:min(92vw,520px);max-width:92vw;}
 .short-single-info{width:min(92vw,520px);}
 .short-single-actions{flex-direction:row;flex-wrap:wrap;justify-content:center;width:min(92vw,520px);gap:8px}
 .short-single-action,.short-single-nav{width:54px;min-height:54px}
}
/* v23 — YouTube-like Shorts navigation + random sequence */
.short-single-page.v23-random-shorts .short-single-layout{position:relative;display:grid;grid-template-columns:56px minmax(0,520px) 78px;justify-content:center;column-gap:14px;align-items:center;max-width:760px;}
.short-single-page.v23-random-shorts .short-single-stage{grid-column:2;grid-row:1;}
.short-single-page.v23-random-shorts .short-single-navs{grid-column:1;grid-row:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;align-self:center;}
.short-single-page.v23-random-shorts .short-single-actions{grid-column:3;grid-row:1;align-self:center;justify-self:center;}
.short-single-page.v23-random-shorts .short-single-nav{display:flex;position:static;width:52px;min-height:52px;font-size:24px;background:var(--surface-2);box-shadow:0 8px 24px rgba(0,0,0,.12);align-items:center;justify-content:center;border-radius:999px;text-decoration:none;color:var(--text);}
.short-single-page.v23-random-shorts .short-single-nav:hover{background:var(--hover);}
.short-single-page.v23-random-shorts .short-swipe-hint{display:none;}
@media(max-width:700px){
  .short-single-page.v23-random-shorts .short-single-layout{display:flex;flex-direction:column;gap:10px;max-width:none;width:100%;}
  .short-single-page.v23-random-shorts .short-single-stage{order:1;width:100%;}
  .short-single-page.v23-random-shorts .short-single-actions{order:2;width:min(92vw,520px);flex-direction:row;flex-wrap:wrap;justify-content:center;}
  .short-single-page.v23-random-shorts .short-single-navs{display:none;}
}


/* ShwTube v25 — footer stays inside the content area, never underneath the fixed sidebar */
@media(min-width:981px){
  .yt-footer{margin-inline-start:var(--sidebar-w);}
  html[dir="ltr"] .yt-footer{margin-left:var(--sidebar-w);margin-right:0;}
  html[dir="rtl"] .yt-footer{margin-right:var(--sidebar-w);margin-left:0;}
}
@media(max-width:980px){
  .yt-footer{margin-left:0!important;margin-right:0!important;}
}

/* ShwTube v26 — Watch/Single footer uses the full available page width because the sidebar is hidden on watch pages. */
@media(min-width:981px){
  body.watch-page .yt-footer{margin-left:0!important;margin-right:0!important;width:100%!important;max-width:none!important;}
  body.watch-page .yt-footer .footer-inner{width:min(1500px,100%);margin:0 auto;}
}
@media(max-width:980px){
  body.watch-page .yt-footer{margin-left:0!important;margin-right:0!important;width:100%!important;max-width:none!important;}
}


/* v27 homepage sections + infinite feed */
.home-topic-section,.home-shorts-section,.home-feed-section{margin-top:34px}
.home-topic-section .topic-preview-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.shorts-row-home{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px;overflow:hidden}
.home-short-card{display:block;min-width:0;text-decoration:none;color:inherit}
.home-short-thumb{position:relative;aspect-ratio:9/16;border-radius:14px;overflow:hidden;background:var(--surface-2,#f2f2f2)}
.home-short-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.home-short-thumb .duration{position:absolute;bottom:8px;left:8px;background:rgba(0,0,0,.85);color:#fff;border-radius:4px;padding:2px 5px;font-size:11px}
.home-short-title{font-weight:600;font-size:14px;line-height:1.45;margin-top:8px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.home-short-meta{font-size:12px;color:var(--muted,#606060);margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.feed-loader,.feed-end{display:none;justify-content:center;align-items:center;gap:10px;padding:24px;color:var(--muted,#606060);font-size:14px}
.home-feed-section.is-loading .feed-loader{display:flex}
.home-feed-section.is-end .feed-end{display:flex}
.feed-spinner{width:18px;height:18px;border:2px solid #ddd;border-top-color:#222;border-radius:50%;animation:feedspin .8s linear infinite}
@keyframes feedspin{to{transform:rotate(360deg)}}
[data-theme="dark"] .feed-spinner{border-color:#333;border-top-color:#fff}
@media(max-width:900px){.shorts-row-home{grid-template-columns:repeat(5,minmax(130px,1fr));overflow-x:auto;padding-bottom:4px}.home-topic-section .topic-preview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.home-topic-section .topic-preview-grid{grid-template-columns:1fr}.shorts-row-home{grid-template-columns:repeat(5,150px)}}

/* v28 infinite scroll */
.feed-loader{display:none;align-items:center;justify-content:center;gap:10px;padding:24px;color:#60656b;font-size:14px}.feed-spinner{width:18px;height:18px;border:2px solid #d8d8d8;border-top-color:#222;border-radius:50%;animation:shwtube-spin .8s linear infinite}.feed-end{display:none;text-align:center;padding:24px;color:#777;font-size:13px}.infinite-sentinel{width:1px;height:1px;clear:both;overflow:hidden}@keyframes shwtube-spin{to{transform:rotate(360deg)}}
.profile-page{max-width:1200px;margin:0 auto}.profile-banner{height:220px;border-radius:0 0 16px 16px;background:var(--surface-2) center/cover no-repeat}.profile-head{display:flex;align-items:center;gap:18px;padding:18px 8px 8px;border-bottom:1px solid var(--line);flex-wrap:wrap}.profile-avatar{width:96px;height:96px;border-radius:50%;object-fit:cover;background:var(--surface-2);border:4px solid var(--bg);margin-top:-48px}.profile-info{flex:1;min-width:240px}.profile-info h1{margin:0;font-size:24px}.profile-handle{color:var(--muted);font-size:13px;margin-top:4px}.profile-info p{margin:8px 0 0;max-width:760px;color:var(--muted)}.subscription-users{display:flex;gap:14px;flex-wrap:wrap}.subscription-user{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:14px;background:var(--surface-2);text-decoration:none}.subscription-user img{width:34px;height:34px;border-radius:50%;object-fit:cover}.profile-editor{max-width:680px}.profile-editor hr{border:0;border-top:1px solid var(--line);margin:24px 0}


/* v35 additions: static pages + news */
.news-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.home-news-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.news-card{display:block;background:var(--surface,#fff);border:1px solid var(--border,#e5e7eb);border-radius:18px;overflow:hidden;transition:transform .18s ease,background .18s ease;min-width:0}.news-card:hover{background:var(--hover,#f3f4f6);transform:translateY(-2px)}.news-card-thumb{aspect-ratio:16/9;background:#eee;overflow:hidden}.news-card-thumb img{width:100%;height:100%;object-fit:cover;display:block}.news-card-body{padding:14px 15px 17px}.news-card-body h2,.news-card-body h3{margin:7px 0 8px;font-size:18px;line-height:1.45}.news-card-body small{color:#6b7280}.news-category{font-size:12px;color:#6b7280}.news-article{max-width:1000px;margin:0 auto}.news-article-head h1{font-size:34px;line-height:1.35;margin:10px 0}.news-hero{width:100%;max-height:560px;object-fit:cover;border-radius:18px;margin:20px 0}.news-content,.static-content{font-size:18px;line-height:2;color:inherit;white-space:normal}.static-page{max-width:1000px;margin:0 auto}.static-content{background:var(--surface,#fff);border:1px solid var(--border,#e5e7eb);border-radius:18px;padding:24px}.contact-form{margin-top:22px}.contact-form form{display:grid;gap:14px}.contact-form label{display:flex;flex-direction:column;gap:7px;font-weight:700;font-size:14px}.contact-form input,.contact-form textarea{padding:12px 14px;border:1px solid var(--border,#e5e7eb);border-radius:12px;background:var(--surface,#fff);color:inherit}.footer-pages{display:flex;flex-wrap:wrap;gap:14px;margin-top:16px;padding-top:12px;border-top:1px solid var(--border,#e5e7eb)}
@media(max-width:900px){.news-grid,.home-news-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.news-article-head h1{font-size:28px}}
@media(max-width:600px){.news-grid,.home-news-grid{grid-template-columns:1fr}.news-card-body h2,.news-card-body h3{font-size:17px}}


/* ShwTube v36 — Mobile/Tablet responsive stabilization for ALL site pages. */
html, body { max-width:100%; overflow-x:hidden; }
img, iframe, video, svg, canvas { max-width:100%; }

@media (max-width: 980px) {
  .yt-header { height:56px; }
  .yt-header-inner {
    height:56px;
    display:flex!important;
    align-items:center;
    gap:8px;
    padding:0 8px;
    width:100%;
    max-width:100%;
  }
  .brand-wrap { flex:0 0 auto; min-width:0; gap:6px; }
  .brand { font-size:18px; }
  .brand-mark { width:30px; height:21px; border-radius:6px; }
  .menu-btn,.header-icon { width:38px; height:38px; flex:0 0 38px; }
  .header-search {
    flex:1 1 auto;
    min-width:0;
    max-width:none!important;
    width:auto!important;
    justify-self:auto!important;
  }
  .header-search input {
    min-width:0;
    width:100%;
    height:38px;
    padding:0 12px;
    font-size:13px;
  }
  .header-search button { width:48px; height:38px; flex:0 0 48px; }
  .header-actions { flex:0 0 auto; gap:2px; }
  .header-actions .create-btn { display:none!important; }
  .header-actions .header-avatar { width:32px; height:32px; }

  /* Mobile sidebar starts fully off-canvas and only appears after ☰. */
  .yt-sidebar {
    top:56px!important;
    bottom:0!important;
    width:min(300px,88vw)!important;
    max-width:88vw!important;
    inset-inline-start:auto!important;
    inset-inline-end:0!important;
    transform:translateX(105%)!important;
    transition:transform .2s ease!important;
    z-index:120!important;
    box-shadow:0 12px 35px rgba(0,0,0,.22);
    overflow-y:auto!important;
  }
  html[dir="ltr"] .yt-sidebar {
    inset-inline-start:0!important;
    inset-inline-end:auto!important;
    transform:translateX(-105%)!important;
  }
  body.sidebar-open .yt-sidebar { transform:translateX(0)!important; }
  .side-mobile-backdrop {
    inset:56px 0 0 0!important;
    z-index:110!important;
  }

  .site-main {
    margin:0!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:14px 12px 40px!important;
  }
  .content-inner {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
  }
  .topic-row { width:100%; max-width:100%; overflow-x:auto; }
  .section { width:100%; max-width:100%; }
  .grid.videos { grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:22px 12px!important; }
  .card { width:100%; min-width:0; }
  .thumb-wrap { width:100%; }
  .card-body { grid-template-columns:34px minmax(0,1fr); gap:8px; }
  .channel-avatar { width:34px; height:34px; }
  .title { font-size:14px; }
  .channel,.meta { font-size:11px; }

  /* Watch/Single */
  body.watch-page .site-main { padding:10px 10px 36px!important; }
  body.watch-page .watch-page-shell,
  body.watch-page .watch-layout { width:100%!important; max-width:100%!important; min-width:0!important; }
  body.watch-page .watch-layout,
  html[dir="rtl"] body.watch-page .watch-layout,
  body.watch-page.lang-ar .watch-layout,
  body.watch-page.lang-ltr .watch-layout {
    display:block!important;
    flex-direction:initial!important;
    direction:inherit!important;
  }
  body.watch-page .watch-main,
  body.watch-page .watch-recommendations,
  html[dir="rtl"] body.watch-page .watch-main,
  html[dir="rtl"] body.watch-page .watch-recommendations,
  body.watch-page.lang-ar .watch-main,
  body.watch-page.lang-ar .watch-recommendations,
  body.watch-page.lang-ltr .watch-main,
  body.watch-page.lang-ltr .watch-recommendations {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    flex:none!important;
    order:initial!important;
  }
  body.watch-page .player { width:100%!important; aspect-ratio:16/9; border-radius:10px; }
  body.watch-page .video-title { font-size:18px; line-height:1.5; margin:12px 0 6px; }
  body.watch-page .channel-row { width:100%; flex-wrap:wrap; }
  body.watch-page .actions,.watch-actions { width:100%; overflow:visible!important; }
  body.watch-page .watch-recommendations { margin-top:24px!important; padding-top:18px!important; border-top:1px solid var(--line); }
  body.watch-page .watch-recommendations .side-videos { width:100%; max-width:100%; overflow:visible!important; }

  /* Search / channel / news / profile */
  .news-grid,.home-news-grid { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
  .news-article,.static-page,.profile-page { width:100%; max-width:100%; }
  .news-hero { width:100%; max-height:none; }
  .profile-banner { width:100%; height:170px; }
  .profile-info { min-width:0; width:100%; }
  .channel-cover { width:100%; max-width:100%; }

  /* Shorts */
  .shorts-page,.short-single-page { width:100%!important; max-width:100%!important; }
  .short-single-layout { width:100%!important; max-width:100%!important; }
}

@media (max-width: 650px) {
  .yt-header-inner { padding:0 6px; }
  .brand { font-size:17px; }
  .brand-mark { display:none; }
  .header-search input { font-size:12px; }
  .header-search button { width:44px; flex-basis:44px; }
  .grid.videos { grid-template-columns:1fr!important; gap:24px!important; }
  .topic-row { padding-bottom:10px; }
  .home-welcome h1 { font-size:22px; }
  .section-head { gap:8px; }
  .section-head h2 { font-size:18px; }
  .news-grid,.home-news-grid { grid-template-columns:1fr!important; }
  .profile-banner { height:150px; border-radius:0 0 12px 12px; }
  .profile-avatar { width:76px; height:76px; margin-top:-34px; }

  body.watch-page .video-title { font-size:17px; }
  body.watch-page .description { font-size:13px; }
  body.watch-page .watch-recommendations .side-videos { display:flex!important; flex-direction:column!important; gap:14px!important; }
  body.watch-page .watch-recommendations .side-card.reco-card,
  html[dir="rtl"] body.watch-page .watch-recommendations .side-card.reco-card,
  body.watch-page.lang-ar .watch-recommendations .side-card.reco-card,
  body.watch-page.lang-ltr .watch-recommendations .side-card.reco-card {
    display:grid!important;
    grid-template-columns:140px minmax(0,1fr)!important;
    gap:9px!important;
    width:100%!important;
  }
  html[dir="rtl"] body.watch-page .watch-recommendations .side-card.reco-card { direction:rtl; }
  html[dir="rtl"] body.watch-page .watch-recommendations .side-card.reco-card .side-thumb { grid-column:1!important; }
  html[dir="rtl"] body.watch-page .watch-recommendations .side-card.reco-card .side-card-info { grid-column:2!important; }
  .side-thumb { width:140px!important; height:79px!important; }
  .side-title-link { font-size:12px!important; }

  .shorts-row-home { grid-template-columns:repeat(5,145px)!important; overflow-x:auto!important; }
  .short-single-page.v23-random-shorts .short-single-layout,
  .short-single-layout { width:100%!important; max-width:100%!important; }
  .short-single-stage,.short-single-player,.short-single-info,.short-single-actions { width:100%!important; max-width:100%!important; }
  .short-single-player { border-radius:10px; }
  .short-single-actions { justify-content:center; }
}

@media (max-width: 380px) {
  .header-search input { padding:0 8px; }
  .header-search button { width:40px; flex-basis:40px; }
  .menu-btn,.header-icon { width:36px; height:36px; flex-basis:36px; }
  .side-item { min-height:42px; padding:0 10px; }
}

/* ShwTube v37 — hard mobile width reset for all pages, especially Watch/Single. */
@media (max-width: 980px) {
  html, body { width:100%!important; max-width:100%!important; min-width:0!important; overflow-x:hidden!important; }
  .yt-header, .yt-header-inner, .site-main, .content-inner, .yt-footer, .footer-inner,
  .watch-page-shell, .watch-layout, .watch-main, .watch-recommendations,
  .shorts-page, .short-single-page, .short-single-layout, .short-single-stage,
  .search-page, .channel-page, .profile-page, .news-page, .static-page {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }

  body.watch-page .site-main {
    margin:0!important;
    padding:8px 10px 34px!important;
  }
  body.watch-page .content-inner {
    margin:0!important;
    padding:0!important;
  }
  body.watch-page .watch-page-shell {
    margin:0!important;
    padding:0!important;
    display:block!important;
  }
  body.watch-page .watch-layout,
  html[dir="rtl"] body.watch-page .watch-layout,
  body.watch-page.lang-ar .watch-layout,
  body.watch-page.lang-ltr .watch-layout {
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    transform:none!important;
    direction:inherit!important;
  }
  body.watch-page .watch-main,
  body.watch-page .watch-recommendations,
  html[dir="rtl"] body.watch-page .watch-main,
  html[dir="rtl"] body.watch-page .watch-recommendations {
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    flex:none!important;
    order:initial!important;
    transform:none!important;
  }
  body.watch-page .player,
  body.watch-page .player iframe {
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  body.watch-page .player {
    aspect-ratio:16/9!important;
    height:auto!important;
    margin:0!important;
    border-radius:10px!important;
  }
  body.watch-page .watch-recommendations {
    margin-top:22px!important;
    padding:18px 0 0!important;
    border-top:1px solid var(--line)!important;
  }
  body.watch-page .watch-recommendations .side-videos {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow:visible!important;
  }

  /* Mobile home/search/channel grids: never preserve desktop column sizing. */
  .grid.videos,
  .topic-preview-grid,
  .news-grid,
  .home-news-grid {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    grid-template-columns:1fr!important;
  }
  .grid.videos > *, .topic-preview-grid > *, .news-grid > *, .home-news-grid > * { min-width:0!important; }

  /* Shorts: no hidden desktop width or horizontal overflow on phones. */
  .short-single-player, .short-stage, .short-player { max-width:92vw!important; }
  .short-single-actions { max-width:92vw!important; }
}

@media (max-width: 650px) {
  .yt-header-inner { width:100%!important; max-width:100%!important; }
  .header-search { width:100%!important; min-width:0!important; }
  body.watch-page .site-main { padding-left:8px!important; padding-right:8px!important; }
  body.watch-page .player { width:100%!important; max-width:100%!important; }
}


/* ShwTube responsive repair v39: one viewport, header first, no horizontal page movement */
html,body{width:100%;max-width:100%;overflow-x:hidden}
body{min-width:0}
.yt-header{width:100%;overflow:hidden}
.yt-header-inner{width:100%;max-width:none;min-width:0}
.site-main,.content-inner,.watch-page-shell,.watch-layout,.watch-main,.watch-recommendations{min-width:0;max-width:100%}

@media (max-width:980px){
  :root{--header-h:56px;--sidebar-w:0px}
  .yt-header{height:var(--header-h)}
  .yt-header-inner{display:flex;align-items:center;gap:8px;padding:0 8px;direction:inherit}
  .brand-wrap{display:flex;align-items:center;gap:6px;flex:0 0 auto;min-width:auto}
  .menu-btn{display:inline-flex!important;align-items:center;justify-content:center;width:40px;height:40px}
  .brand{font-size:18px;white-space:nowrap}
  .brand-mark{width:30px;height:22px}
  .brand-country{display:none}
  .header-search{display:flex;order:2;flex:1 1 auto;width:auto;min-width:0;max-width:none;margin:0}
  .header-search input{min-width:0;width:100%;height:38px}
  .header-search button{width:48px;height:38px;flex:0 0 48px}
  .header-actions{order:3;flex:0 0 auto;gap:2px}
  .header-actions .create-btn{display:none}
  .header-actions .header-icon{display:none}
  .header-avatar{width:32px;height:32px}
  .yt-sidebar{top:var(--header-h);bottom:0;right:0;left:auto;width:min(86vw,280px);transform:translateX(110%);border-inline-start:1px solid var(--line);border-inline-end:0;z-index:110}
  html[dir="ltr"] .yt-sidebar{left:0;right:auto;transform:translateX(-110%);border-inline-start:0;border-inline-end:1px solid var(--line)}
  body.sidebar-open .yt-sidebar{transform:translateX(0)!important}
  html[dir="ltr"] body.sidebar-open .yt-sidebar{transform:translateX(0)!important}
  .side-mobile-backdrop{inset:var(--header-h) 0 0;z-index:100}
  .site-main{margin:0!important;padding:12px 10px 40px!important;width:100%!important}
  .content-inner{width:100%!important;margin:0!important}

  /* Home/search grids */
  .grid.videos{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 10px}
  .topic-row{width:100%;overflow-x:auto;overscroll-behavior-x:contain}
  .home-short-card{min-width:0}

  /* Watch: player first, recommendations below on phones */
  body.watch-page .watch-page-shell{width:100%!important;max-width:none!important;margin:0!important}
  body.watch-page .watch-layout{display:flex!important;flex-direction:column!important;gap:20px!important;width:100%!important}
  body.watch-page .watch-main{order:1!important;width:100%!important}
  body.watch-page .watch-recommendations{order:2!important;width:100%!important}
  body.watch-page .player{width:100%!important;max-width:none!important;aspect-ratio:16/9;margin:0!important}
  body.watch-page .video-title{font-size:18px}
  body.watch-page .watch-recommendations .side-videos{display:flex!important;flex-direction:column!important;width:100%!important}
  body.watch-page .watch-recommendations .side-card{display:grid!important;grid-template-columns:120px minmax(0,1fr)!important;width:100%!important;gap:10px!important}
  body.watch-page .watch-recommendations .side-card img{width:120px!important;height:68px!important}
  html[dir="rtl"] body.watch-page .watch-recommendations .side-card{direction:rtl}
  html[dir="ltr"] body.watch-page .watch-recommendations .side-card{direction:ltr}

  /* Shorts */
  .shorts-feed{height:auto!important;overflow:visible!important}
  .short-item{min-height:auto!important;grid-template-columns:1fr!important;gap:12px!important}
  .short-player{width:min(100%,420px)!important;margin:auto}
  .short-info{display:none!important}

  /* Footer */
  .yt-footer{width:100%!important;margin:20px 0 0!important}
}

@media (max-width:620px){
  .yt-header-inner{padding:0 6px}
  .brand{font-size:16px}
  .header-search input{font-size:13px;padding:0 10px}
  .header-search button{width:44px;flex-basis:44px}
  .grid.videos{grid-template-columns:1fr!important}
  .card-body{grid-template-columns:34px minmax(0,1fr);gap:8px}
  .title{font-size:14px}
  .channel-avatar{width:32px;height:32px}
  .section{margin-top:22px}
  .section-head h2{font-size:18px}
  body.watch-page .site-main{padding:8px 0 30px!important}
  body.watch-page .player{border-radius:0!important}
  body.watch-page .watch-recommendations{padding:0 10px}
  body.watch-page .watch-recommendations .side-card{grid-template-columns:112px minmax(0,1fr)!important}
  body.watch-page .watch-recommendations .side-card img{width:112px!important;height:63px!important}
  .footer-inner{padding:0 10px}
}

/* v39: light/dark theme asset version marker */

/* ShwTube v41 — FINAL mobile viewport alignment repair. The header and page content
   share the exact same viewport box; no desktop sidebar/grid can shift either axis. */
html, body {
  width: 100% !important;
  max-width: 100vw !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
}

@media (max-width: 980px) {
  .yt-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    height: 56px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }
  .yt-header-inner {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    height: 56px !important;
    margin: 0 !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
    direction: ltr !important;
  }

  /* Keep brand physically on the right in Arabic, and on the left in LTR. */
  html[dir="rtl"] .brand-wrap { grid-column: 3 !important; direction: rtl !important; }
  html[dir="rtl"] .header-search { grid-column: 2 !important; direction: rtl !important; }
  html[dir="rtl"] .header-actions { grid-column: 1 !important; direction: rtl !important; }
  html[dir="ltr"] .brand-wrap { grid-column: 1 !important; direction: ltr !important; }
  html[dir="ltr"] .header-search { grid-column: 2 !important; direction: ltr !important; }
  html[dir="ltr"] .header-actions { grid-column: 3 !important; direction: ltr !important; }

  .brand-wrap { min-width: 0 !important; width: auto !important; margin: 0 !important; }
  .brand { white-space: nowrap !important; }
  .header-search {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
  }
  .header-search input { min-width: 0 !important; width: 100% !important; box-sizing: border-box !important; }
  .header-actions { min-width: 0 !important; width: auto !important; margin: 0 !important; }

  /* The page starts exactly below the fixed header and can never be shifted sideways. */
  .site-main,
  .content-inner,
  body.watch-page .site-main,
  body.watch-page .content-inner,
  body.watch-page .watch-page-shell,
  body.watch-page .watch-layout,
  body.watch-page .watch-main,
  body.watch-page .watch-recommendations {
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    inset-inline: 0 !important;
    transform: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    min-width: 0 !important;
    max-width: 100vw !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .site-main { margin-top: 56px !important; padding: 12px 10px 40px !important; }
  .content-inner { padding: 0 !important; }

  /* Mobile watch page: player and content are stacked, flush with viewport. */
  body.watch-page .site-main { padding: 0 !important; }
  body.watch-page .content-inner { width: 100% !important; }
  body.watch-page .watch-page-shell { padding: 0 !important; }
  body.watch-page .watch-layout { display: flex !important; flex-direction: column !important; gap: 20px !important; }
  body.watch-page .watch-main { order: 1 !important; padding: 0 !important; }
  body.watch-page .watch-recommendations { order: 2 !important; padding: 16px 10px 0 !important; }
  body.watch-page .player { width: 100% !important; max-width: none !important; aspect-ratio: 16 / 9 !important; margin: 0 !important; border-radius: 0 !important; }
  body.watch-page .player iframe { width: 100% !important; height: 100% !important; display: block !important; }

  /* No internal horizontal scrollers on the page itself. */
  .grid, .section, .topic-row, .watch-layout, .watch-page-shell { max-width: 100vw !important; }
}

@media (max-width: 600px) {
  .yt-header-inner { padding: 0 6px !important; gap: 6px !important; }
  .brand { font-size: 16px !important; }
  .brand-mark { width: 28px !important; }
  .header-search input { font-size: 12px !important; }
  .site-main { padding-left: 8px !important; padding-right: 8px !important; }
  body.watch-page .site-main { padding: 0 !important; }
}

/* ShwTube v42 — Arabic mobile layout fix.
   Keep the page/layout axis LTR so RTL cannot mirror the physical viewport.
   Text/content direction remains RTL inside the actual content blocks. */
@media (max-width: 980px) {
  html[dir="rtl"],
  html[dir="rtl"] body {
    width:100% !important;
    max-width:100vw !important;
    min-width:0 !important;
    overflow-x:hidden !important;
  }

  html[dir="rtl"] body .yt-header,
  html[dir="rtl"] body .yt-header-inner {
    left:0 !important;
    right:0 !important;
    width:100vw !important;
    max-width:100vw !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    margin-left:0 !important;
    margin-right:0 !important;
    transform:none !important;
  }

  html[dir="rtl"] body .site-main,
  html[dir="rtl"] body .content-inner,
  html[dir="rtl"] body .watch-page-shell,
  html[dir="rtl"] body .watch-layout,
  html[dir="rtl"] body .watch-main,
  html[dir="rtl"] body .watch-recommendations {
    direction:ltr !important;
    position:relative !important;
    left:0 !important;
    right:0 !important;
    inset-inline-start:0 !important;
    inset-inline-end:0 !important;
    transform:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
    width:100% !important;
    max-width:100vw !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  html[dir="rtl"] body .site-main { margin-top:56px !important; }
  html[dir="rtl"] body .content-inner { margin:0 !important; padding:0 !important; }

  /* Re-apply RTL to the actual text/content surfaces, not the page axis. */
  html[dir="rtl"] body .section,
  html[dir="rtl"] body .section-head,
  html[dir="rtl"] body .card,
  html[dir="rtl"] body .card-body,
  html[dir="rtl"] body .video-title,
  html[dir="rtl"] body .video-meta,
  html[dir="rtl"] body .channel-row,
  html[dir="rtl"] body .channel-info,
  html[dir="rtl"] body .watch-actions,
  html[dir="rtl"] body .description,
  html[dir="rtl"] body .comments,
  html[dir="rtl"] body .news-article,
  html[dir="rtl"] body .news-card,
  html[dir="rtl"] body .profile-page,
  html[dir="rtl"] body .topic-row {
    direction:rtl !important;
  }

  html[dir="rtl"] body.watch-page .watch-layout {
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:20px !important;
  }

  html[dir="rtl"] body.watch-page .watch-main,
  html[dir="rtl"] body.watch-page .watch-recommendations {
    flex:0 0 auto !important;
    order:initial !important;
  }

  html[dir="rtl"] body.watch-page .player,
  html[dir="rtl"] body.watch-page .player iframe {
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    display:block !important;
    margin:0 !important;
    box-sizing:border-box !important;
  }

  html[dir="rtl"] body.watch-page .watch-recommendations .side-card {
    direction:rtl !important;
  }

  /* Header physical positions: menu/brand on the right, search center, actions left. */
  html[dir="rtl"] body .yt-header-inner {
    direction:ltr !important;
    display:grid !important;
    grid-template-columns:auto minmax(0,1fr) auto !important;
    align-items:center !important;
  }
  html[dir="rtl"] body .yt-header-inner .brand-wrap { grid-column:3 !important; direction:rtl !important; }
  html[dir="rtl"] body .yt-header-inner .header-search { grid-column:2 !important; direction:rtl !important; }
  html[dir="rtl"] body .yt-header-inner .header-actions { grid-column:1 !important; direction:rtl !important; }
}

@media (max-width: 600px) {
  html[dir="rtl"] body .site-main { padding-left:0 !important; padding-right:0 !important; }
  html[dir="rtl"] body.watch-page .site-main { padding:0 !important; }
  html[dir="rtl"] body .yt-header-inner { padding-left:6px !important; padding-right:6px !important; }
}

/* ShwTube v43 — FINAL Arabic mobile viewport correction */
@media (max-width: 980px) {
  html[dir="rtl"], html[dir="rtl"] body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  html[dir="rtl"] body .yt-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    inset-inline: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    transform: none !important;
  }

  html[dir="rtl"] body .yt-header-inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-inline: 6px !important;
    box-sizing: border-box !important;
  }

  html[dir="rtl"] body .site-main,
  html[dir="rtl"] body .content-inner,
  html[dir="rtl"] body .watch-page-shell,
  html[dir="rtl"] body .watch-layout,
  html[dir="rtl"] body .watch-main,
  html[dir="rtl"] body .watch-recommendations,
  html[dir="rtl"] body .section,
  html[dir="rtl"] body .grid {
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-inline-start: 0 !important;
    padding-inline-end: 0 !important;
    left: auto !important;
    right: auto !important;
    inset-inline-start: auto !important;
    inset-inline-end: auto !important;
    transform: none !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  html[dir="rtl"] body .site-main {
    margin-top: 56px !important;
  }

  html[dir="rtl"] body .content-inner {
    padding-top: 0 !important;
  }

  html[dir="rtl"] body.watch-page .site-main {
    margin-top: 56px !important;
    padding: 0 !important;
  }

  html[dir="rtl"] body.watch-page .watch-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  html[dir="rtl"] body.watch-page .watch-main,
  html[dir="rtl"] body.watch-page .watch-recommendations {
    flex: 0 0 auto !important;
  }

  html[dir="rtl"] body .grid.videos {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  html[dir="rtl"] body .topic-row {
    max-width: 100% !important;
    width: 100% !important;
    overflow-x: auto !important;
  }
}


/* ShwTube v44 — definitive Arabic mobile viewport/layout reset.
   Structural shells use a physical LTR axis; Arabic text blocks restore RTL.
   This last block intentionally overrides all earlier mobile repair layers. */
@media (max-width: 980px) {
  html[dir="rtl"],
  html[dir="rtl"] body.lang-ar {
    direction: rtl !important;
    unicode-bidi: normal !important;
  }

  html[dir="rtl"] body.lang-ar,
  html[dir="rtl"] body.lang-ar #main-content {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
  }

  html[dir="rtl"] body.lang-ar .yt-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 56px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    overflow: hidden !important;
    z-index: 1000 !important;
  }

  html[dir="rtl"] body.lang-ar .yt-header-inner {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 56px !important;
    margin: 0 !important;
    padding: 0 8px !important;
    display: grid !important;
    grid-template-columns: auto minmax(0,1fr) auto !important;
    gap: 8px !important;
    direction: ltr !important;
    box-sizing: border-box !important;
  }

  html[dir="rtl"] body.lang-ar .yt-header-inner .brand-wrap {
    grid-column: 3 !important;
    min-width: 0 !important;
    max-width: max-content !important;
    direction: rtl !important;
    margin: 0 !important;
  }

  html[dir="rtl"] body.lang-ar .yt-header-inner .header-search {
    grid-column: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    direction: rtl !important;
  }

  html[dir="rtl"] body.lang-ar .yt-header-inner .header-actions {
    grid-column: 1 !important;
    min-width: 0 !important;
    max-width: max-content !important;
    margin: 0 !important;
    direction: rtl !important;
  }

  html[dir="rtl"] body.lang-ar .site-main {
    display: block !important;
    position: static !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    margin: 56px 0 0 !important;
    padding: 12px 8px 40px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  html[dir="rtl"] body.lang-ar .content-inner {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    direction: rtl !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  html[dir="rtl"] body.lang-ar .content-inner > * {
    position: static !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  html[dir="rtl"] body.lang-ar .topic-row {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    direction: rtl !important;
    margin: 0 0 10px !important;
    padding: 0 0 12px !important;
  }

  html[dir="rtl"] body.lang-ar .home-welcome,
  html[dir="rtl"] body.lang-ar .section,
  html[dir="rtl"] body.lang-ar .section-head,
  html[dir="rtl"] body.lang-ar .home-feed-section,
  html[dir="rtl"] body.lang-ar .home-news-section,
  html[dir="rtl"] body.lang-ar .home-topic-section,
  html[dir="rtl"] body.lang-ar .home-shorts-section {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    direction: rtl !important;
  }

  html[dir="rtl"] body.lang-ar .grid.videos,
  html[dir="rtl"] body.lang-ar .news-grid,
  html[dir="rtl"] body.lang-ar .home-news-grid {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: 1fr !important;
    direction: rtl !important;
  }

  html[dir="rtl"] body.lang-ar .card,
  html[dir="rtl"] body.lang-ar .news-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    direction: rtl !important;
  }

  /* Watch / Single: one physical column, player first. */
  html[dir="rtl"] body.lang-ar.watch-page .site-main {
    margin-top: 56px !important;
    padding: 0 !important;
  }
  html[dir="rtl"] body.lang-ar.watch-page .content-inner,
  html[dir="rtl"] body.lang-ar.watch-page .watch-page-shell,
  html[dir="rtl"] body.lang-ar.watch-page .watch-layout,
  html[dir="rtl"] body.lang-ar.watch-page .watch-main,
  html[dir="rtl"] body.lang-ar.watch-page .watch-recommendations {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    position: static !important;
    transform: none !important;
    box-sizing: border-box !important;
  }
  html[dir="rtl"] body.lang-ar.watch-page .watch-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 18px !important;
  }
  html[dir="rtl"] body.lang-ar.watch-page .watch-main {
    order: 1 !important;
  }
  html[dir="rtl"] body.lang-ar.watch-page .watch-recommendations {
    order: 2 !important;
    padding-top: 16px !important;
  }
  html[dir="rtl"] body.lang-ar.watch-page .player,
  html[dir="rtl"] body.lang-ar.watch-page .player iframe {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    aspect-ratio: 16/9 !important;
    display: block !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  /* Hide the desktop side rail transform; the menu still opens it explicitly. */
  html[dir="rtl"] body.lang-ar .yt-sidebar {
    width: min(86vw,280px) !important;
    right: 0 !important;
    left: auto !important;
    transform: translateX(110%) !important;
  }
  html[dir="rtl"] body.lang-ar.sidebar-open .yt-sidebar {
    transform: translateX(0) !important;
  }
}

/* v87 infinite scroll polish */
.infinite-sentinel,.home-infinite-sentinel{width:1px;height:1px;clear:both;overflow:hidden;}
.community-feed .feed-loader,.news-page .feed-loader{margin-top:8px;}

/* ShwTube v88 — final Community / Chat / Home cards visual repair */
:root{--border:var(--line)}

/* Prevent SVG/avatar images from exploding on community and chat pages. */
.community-page img,.chat-page img,.home-chat-card img,.community-home-card img{display:block;max-width:none}

/* Community */
.community-page{max-width:1120px;margin:0 auto;padding:8px 0 40px;direction:rtl}
.community-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:26px 28px;margin:8px 0 22px;background:linear-gradient(135deg,var(--surface),var(--surface-2));border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow)}
.community-hero .eyebrow{display:inline-block;color:var(--muted);font-size:12px;font-weight:700;margin-bottom:4px}
.community-hero h1{margin:0;font-size:30px;line-height:1.2}.community-hero p{margin:8px 0 0;color:var(--muted)}
.community-compose{padding:18px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow);margin-bottom:22px}
.community-compose-head{display:flex;align-items:center;gap:12px;margin-bottom:12px}.community-avatar{width:44px!important;height:44px!important;border-radius:50%;object-fit:cover;background:var(--surface-2);flex:0 0 44px}
.community-compose textarea{width:100%;resize:vertical;min-height:104px;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--bg);color:var(--text);outline:0}
.community-compose textarea:focus{border-color:#7aa7ff;box-shadow:0 0 0 3px rgba(66,133,244,.10)}
.community-compose-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px}.community-compose-footer small{color:var(--muted)}
.community-feed{display:block!important;width:100%!important;min-width:0!important}.community-feed>.feed-loader,.community-feed>.feed-end{margin-top:12px}
.community-post{display:block;margin:0 0 18px;padding:18px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:0 2px 10px rgba(0,0,0,.04);overflow:hidden}
.community-post-head{display:flex;align-items:center;justify-content:space-between;gap:14px}.community-author{display:flex;align-items:center;gap:11px;text-decoration:none;min-width:0}.community-author>img{width:46px!important;height:46px!important;border-radius:50%;object-fit:cover;background:var(--surface-2);flex:0 0 46px}.community-author>span{display:flex;flex-direction:column;min-width:0}.community-author strong{font-size:15px}.community-author small{color:var(--muted);margin-top:1px}.community-post-head time{color:var(--muted);font-size:12px;white-space:nowrap}
.community-post-body{font-size:16px;line-height:1.9;padding:16px 2px 10px;white-space:pre-wrap;overflow-wrap:anywhere}
.community-post-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.community-post-actions form{margin:0}.community-action,.community-stat{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 12px;border-radius:18px;background:var(--surface-2);color:var(--text);font-size:13px}.community-action{cursor:pointer}.community-action.active{font-weight:800;background:var(--accent-soft)}
.community-comments{padding-top:14px}.community-comments-title{font-weight:800;font-size:14px;margin-bottom:10px}.community-comment-list{display:flex;flex-direction:column;gap:10px}.community-comment{display:flex;align-items:flex-start;gap:10px;padding:10px 0}.community-comment.is-reply{margin-inline-start:42px;padding-top:8px}.community-comment>img{width:36px!important;height:36px!important;border-radius:50%;object-fit:cover;background:var(--surface-2);flex:0 0 36px}.community-comment-main{min-width:0;flex:1}.community-comment-head{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.community-comment-head a{text-decoration:none}.community-comment-head time{font-size:11px;color:var(--muted)}.community-comment-body{margin-top:3px;line-height:1.7;overflow-wrap:anywhere}
.community-inline-reply,.community-comment-form{display:flex;align-items:center;gap:8px;margin-top:8px}.community-inline-reply input,.community-comment-form input{flex:1;min-width:0;height:38px;padding:0 12px;border:1px solid var(--line);border-radius:19px;background:var(--bg);color:var(--text)}.community-inline-reply button,.community-comment-form button{height:38px;padding:0 12px;border-radius:19px;cursor:pointer;background:var(--surface-2);color:var(--text)}.community-comment-form button.primary{margin-top:0}.community-empty-comments{color:var(--muted);padding:8px 0}

/* Home: latest chat + latest members/posts */
.home-chat-latest-section,.home-community-section{margin-top:30px}.home-chat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;direction:rtl}
.home-chat-card{display:block;text-decoration:none;color:inherit;border:1px solid var(--line);border-radius:18px;background:var(--surface);overflow:hidden;box-shadow:0 3px 12px rgba(0,0,0,.05);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;min-width:0}.home-chat-card:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(0,0,0,.09)}
.home-chat-card-head{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid var(--line);background:var(--surface-2)}.home-chat-room-icon{width:38px;height:38px;border-radius:11px;background:var(--surface);display:grid;place-items:center;font-size:20px;flex:0 0 38px}.home-chat-room-name{font-weight:800;font-size:13px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.home-chat-arrow{margin-inline-start:auto;color:var(--muted);font-size:14px}
.home-chat-card-body{display:flex;align-items:flex-start;gap:11px;padding:15px;min-width:0}.home-chat-avatar{width:42px!important;height:42px!important;border-radius:50%;object-fit:cover;background:var(--surface-2);flex:0 0 42px}.home-chat-copy{min-width:0;flex:1}.home-chat-copy strong{display:block;font-size:14px}.home-chat-copy p{margin:5px 0 4px;line-height:1.6;font-size:14px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}.home-chat-copy small{color:var(--muted);font-size:11px}.home-chat-card-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 15px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}.home-chat-empty{grid-column:1/-1;padding:28px;text-align:center;border:1px dashed var(--line);border-radius:16px;color:var(--muted)}
.community-home-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.community-home-card{min-width:0;padding:18px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:0 2px 9px rgba(0,0,0,.04)}.community-home-title{font-size:15px;font-weight:800;margin-bottom:13px}.member-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.member-mini{display:flex;flex-direction:column;align-items:center;gap:5px;padding:11px 8px;border-radius:14px;background:var(--surface-2);text-decoration:none;min-width:0;text-align:center}.member-mini img{width:48px!important;height:48px!important;border-radius:50%;object-fit:cover}.member-mini-name,.member-mini small{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.member-mini-name{font-weight:700;font-size:12px}.member-mini small{color:var(--muted);font-size:10px}.post-preview-list{display:flex;flex-direction:column;gap:10px}.post-preview{display:flex;align-items:flex-start;gap:10px;padding:10px;border-radius:13px;background:var(--surface-2);min-width:0}.post-preview>img{width:38px!important;height:38px!important;border-radius:50%;object-fit:cover;flex:0 0 38px}.post-preview>div{min-width:0}.post-author{font-weight:800;text-decoration:none;font-size:12px}.post-preview-body{font-size:12px;line-height:1.55;margin-top:3px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}.post-preview small{display:block;color:var(--muted);font-size:10px;margin-top:4px}

/* Chat index */
.chat-page{max-width:1120px;margin:0 auto;padding:8px 0 42px;direction:rtl}.chat-hero{padding:24px 26px;border:1px solid var(--line);border-radius:22px;background:linear-gradient(135deg,var(--surface),var(--surface-2));box-shadow:var(--shadow);margin-bottom:22px}.chat-hero-badge{display:inline-flex;align-items:center;gap:7px;color:var(--muted);font-size:12px;font-weight:700;margin-bottom:8px}.chat-hero-copy h1{margin:0;font-size:30px}.chat-hero-copy p{margin:7px 0 0;color:var(--muted)}.chat-hero-note{margin-top:12px;color:var(--muted);font-size:13px}
.chat-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin-bottom:14px}.chat-section-head h2{margin:0;font-size:20px}.chat-room-count{color:var(--muted);font-size:13px}.chat-room-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.chat-room-card{display:flex;flex-direction:column;gap:12px;text-decoration:none;color:inherit;padding:18px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:0 2px 10px rgba(0,0,0,.04);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;min-width:0}.chat-room-card:hover{transform:translateY(-2px);box-shadow:0 10px 30px rgba(0,0,0,.08);border-color:var(--surface-3)}.chat-room-card-top{display:flex;align-items:center;justify-content:space-between}.chat-room-icon{width:56px;height:56px;border-radius:16px;display:grid;place-items:center;font-size:28px;background:var(--surface-2)}.chat-enter{font-size:12px;font-weight:800;color:var(--muted)}.chat-room-info strong{display:block;font-size:17px}.chat-room-info p{margin:4px 0 0;color:var(--muted);font-size:12px;line-height:1.6;min-height:38px}.chat-room-stats{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:10px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}.chat-room-stats b{color:var(--text)}.chat-online-dot{color:#18a058!important;font-size:10px}.chat-room-last{padding:11px 12px;border-radius:12px;background:var(--surface-2);min-width:0}.chat-room-last span{display:block;font-size:10px;color:var(--muted);margin-bottom:4px}.chat-room-last p{margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}.chat-room-last.empty-last{font-size:12px;color:var(--muted)}

/* Chat room */
.chat-room-page{max-width:1100px}.chat-room-toolbar{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:center;margin-bottom:16px;padding:18px 20px;border:1px solid var(--line);border-radius:20px;background:var(--surface);box-shadow:var(--shadow)}.chat-back{grid-column:1/-1;color:var(--muted);text-decoration:none;font-size:13px}.chat-room-toolbar-main{display:flex;align-items:center;gap:13px;min-width:0}.chat-room-icon.big{width:62px;height:62px;border-radius:18px;font-size:31px;flex:0 0 62px}.chat-room-toolbar h1{margin:0;font-size:24px}.chat-room-toolbar p{margin:4px 0 0;color:var(--muted);font-size:12px}.chat-room-toolbar-stats{display:flex;gap:8px}.chat-room-toolbar-stats>div{min-width:94px;padding:10px 12px;text-align:center;border-radius:14px;background:var(--surface-2)}.chat-room-toolbar-stats b{display:block;font-size:17px}.chat-room-toolbar-stats span{display:block;color:var(--muted);font-size:11px}
.chat-panel{border:1px solid var(--line);border-radius:20px;overflow:hidden;background:var(--surface);box-shadow:var(--shadow)}.chat-panel-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 18px;border-bottom:1px solid var(--line)}.chat-panel-top strong{display:block;font-size:15px}.chat-panel-top span{color:var(--muted);font-size:11px}.chat-live-badge{display:inline-flex!important;align-items:center;gap:6px;color:#18864b!important;background:#eaf8f0;padding:6px 10px;border-radius:14px;font-weight:800}.chat-live-badge i{width:7px;height:7px;border-radius:50%;background:#1b9a5a;display:block}.chat-messages{height:min(66vh,720px);overflow-y:auto;padding:18px 18px 8px;scroll-behavior:smooth;background:linear-gradient(180deg,var(--surface),var(--bg))}.chat-message{display:flex;align-items:flex-start;gap:10px;margin:0 0 14px;max-width:min(860px,100%)}.chat-message-avatar{width:38px!important;height:38px!important;border-radius:50%;object-fit:cover;background:var(--surface-2);flex:0 0 38px}.chat-message-bubble{min-width:0;max-width:100%;padding:10px 12px;border-radius:15px 15px 15px 5px;background:var(--surface-2)}.chat-message-head{display:flex;align-items:center;gap:9px}.chat-message-head a{font-weight:800;text-decoration:none}.chat-message-head time{color:var(--muted);font-size:10px}.chat-message-body{margin-top:4px;line-height:1.7;overflow-wrap:anywhere}.chat-reply-preview{margin-top:6px;padding:6px 8px;border-inline-start:3px solid var(--accent);border-radius:7px;background:rgba(0,0,0,.04);font-size:11px;color:var(--muted)}.chat-reply-preview strong{color:var(--text);margin-inline-end:5px}.chat-reply-btn{margin-top:7px;padding:4px 8px;border-radius:13px;background:transparent;color:var(--muted);cursor:pointer;font-size:11px}.chat-reply-btn:hover{background:var(--surface-3);color:var(--text)}.chat-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;height:220px;color:var(--muted);text-align:center}.chat-empty span{font-size:34px}.chat-empty strong{color:var(--text)}.chat-compose{border-top:1px solid var(--line);padding:13px 15px;background:var(--surface)}.chat-compose-row{display:flex;align-items:center;gap:9px}.chat-compose-avatar{width:38px!important;height:38px!important;border-radius:50%;object-fit:cover;flex:0 0 38px}.chat-compose-row input{flex:1;min-width:0;height:42px;border:1px solid var(--line);border-radius:21px;background:var(--bg);color:var(--text);padding:0 14px;outline:0}.chat-compose-row input:focus{border-color:#7aa7ff}.chat-compose-row button{height:42px;padding:0 15px;border-radius:21px;background:var(--text);color:var(--bg);font-weight:800;cursor:pointer}.chat-compose-hint{margin-top:6px;padding-inline-start:47px;color:var(--muted);font-size:10px}.chat-replying{margin-bottom:8px;padding:8px 10px;border-radius:10px;background:var(--surface-2);font-size:11px;color:var(--muted)}.chat-replying .chat-reply-cancel{float:left;background:transparent;color:var(--muted);font-size:18px;cursor:pointer}.chat-login-box{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px}.infinite-sentinel{display:block!important;width:1px!important;height:1px!important;clear:both!important;overflow:hidden!important}

/* Dynamic listing cards: a stable grid remains intact while new cards append. */
[data-infinite-grid].grid.videos{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));align-items:start}.feed-loader,.feed-end{grid-column:1/-1}

@media(max-width:1280px){.home-chat-grid,.chat-room-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.community-home-grid{grid-template-columns:1fr 1fr}.grid.videos{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:980px){.community-hero{padding:22px}.chat-room-toolbar{grid-template-columns:1fr}.chat-room-toolbar-stats{justify-content:flex-start}.home-chat-grid,.chat-room-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.community-home-grid{grid-template-columns:1fr}.grid.videos,[data-infinite-grid].grid.videos{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.community-page,.chat-page{padding-top:0}.community-hero{display:block}.community-hero .pill{margin-top:14px}.home-chat-grid,.chat-room-grid{grid-template-columns:1fr}.member-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.community-post{padding:14px}.community-post-head{align-items:flex-start}.community-post-head time{font-size:10px}.community-comment.is-reply{margin-inline-start:22px}.community-inline-reply,.community-comment-form{align-items:stretch}.community-inline-reply input,.community-comment-form input{width:100%}.chat-room-toolbar{padding:15px}.chat-room-toolbar-stats{display:grid;grid-template-columns:1fr 1fr}.chat-room-toolbar-stats>div{min-width:0}.chat-messages{height:60vh;padding:14px 12px}.chat-compose-row button{padding:0 12px}.chat-compose-hint{padding-inline-start:0}.grid.videos,[data-infinite-grid].grid.videos{grid-template-columns:1fr}}

/* v89 — stable listing grid for initial 20 + infinite-scroll batches of 10 */
.grid.videos{min-width:0;align-items:start;}
.grid.videos > .video-card-ambient{min-width:0;width:100%;}
.infinite-sentinel{width:100%;height:1px;pointer-events:none;}
@media(max-width:1100px){.grid.videos{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:760px){.grid.videos{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:520px){.grid.videos{grid-template-columns:1fr;}}

/* ShwTube v90 — unified 5-column video cards + stable infinite-scroll rows */
.grid.videos,
[data-infinite-grid] .grid.videos {
  display:grid !important;
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  grid-auto-flow:row;
  grid-auto-columns:auto;
  align-items:start;
  width:100%;
  min-width:0;
  gap:30px 18px;
}
.grid.videos > .video-card-ambient,
.grid.videos > article.card,
[data-infinite-grid] .grid.videos > .video-card-ambient,
[data-infinite-grid] .grid.videos > article.card {
  grid-column:auto !important;
  grid-row:auto !important;
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
}
.grid.videos .thumb-wrap {
  width:100% !important;
  aspect-ratio:16 / 9 !important;
}
.grid.videos .thumb-wrap img {
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  display:block !important;
}
.grid.videos .card-body {
  width:100%;
  min-width:0;
}
.infinite-sentinel {
  grid-column:1 / -1 !important;
  width:1px !important;
  height:1px !important;
  clear:both !important;
}
.feed-loader,
.feed-end {
  grid-column:1 / -1 !important;
}

/* Keep the exact same five-card layout on desktop/tablet widths where the sidebar is visible. */
@media (min-width:981px) {
  .grid.videos,
  [data-infinite-grid] .grid.videos {
    grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  }
}

@media (max-width:980px) and (min-width:761px) {
  .grid.videos,
  [data-infinite-grid] .grid.videos {
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:26px 14px !important;
  }
}

@media (max-width:760px) and (min-width:521px) {
  .grid.videos,
  [data-infinite-grid] .grid.videos {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:24px 12px !important;
  }
}

@media (max-width:520px) {
  .grid.videos,
  [data-infinite-grid] .grid.videos {
    grid-template-columns:1fr !important;
    gap:24px !important;
  }
}

/* v91 — FINAL: home topic sections = 3 cards, normal/infinite video listings = 4 cards */
.grid.videos,
[data-infinite-grid].grid.videos,
[data-infinite-grid] .grid.videos {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  grid-auto-columns: auto !important;
  align-items: start !important;
  width: 100% !important;
  min-width: 0 !important;
  gap: 30px 18px !important;
}

.grid.videos > .video-card-ambient,
.grid.videos > article.card,
[data-infinite-grid] .grid.videos > .video-card-ambient,
[data-infinite-grid] .grid.videos > article.card {
  grid-column: auto !important;
  grid-row: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  align-self: start !important;
}

.grid.videos .thumb-wrap {
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
}

.grid.videos .thumb-wrap img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.grid.videos .card-body {
  width: 100% !important;
  min-width: 0 !important;
}

.grid.videos .card-copy {
  min-width: 0 !important;
}

/* The film/topic sections on the home page intentionally use 3 cards. */
.home-topic-section .topic-preview-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-auto-flow: row !important;
  gap: 30px 18px !important;
}

.home-topic-section .topic-preview-grid > .video-card-ambient,
.home-topic-section .topic-preview-grid > article.card {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  grid-column: auto !important;
  grid-row: auto !important;
}

/* Infinite-scroll loading/end indicators always span the whole listing. */
.feed-loader,
.feed-end,
.infinite-sentinel {
  grid-column: 1 / -1 !important;
}

.infinite-sentinel {
  width: 1px !important;
  height: 1px !important;
  clear: both !important;
  pointer-events: none !important;
}

@media (max-width: 1100px) {
  .grid.videos,
  [data-infinite-grid].grid.videos,
  [data-infinite-grid] .grid.videos {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .home-topic-section .topic-preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 980px) {
  .grid.videos,
  [data-infinite-grid].grid.videos,
  [data-infinite-grid] .grid.videos {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 26px 14px !important;
  }

  .home-topic-section .topic-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 26px 14px !important;
  }
}

@media (max-width: 520px) {
  .grid.videos,
  [data-infinite-grid].grid.videos,
  [data-infinite-grid] .grid.videos {
    grid-template-columns: 1fr !important;
  }

  .home-topic-section .topic-preview-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ===================== ShwTube Channel - v94 ===================== */
.channel-page{max-width:1320px;margin:0 auto;padding-bottom:44px}
.yt-channel-hero{margin:-2px 0 28px}
.yt-channel-banner{height:260px;border-radius:18px;background-color:var(--surface-2);background-position:center;background-size:cover;background-repeat:no-repeat;overflow:hidden;position:relative;box-shadow:var(--shadow)}
.yt-channel-banner.is-placeholder{background:linear-gradient(135deg,var(--surface-2),var(--surface-3),var(--surface-2))}
.yt-channel-banner.is-placeholder:after{content:'ShwTube';position:absolute;inset:0;display:grid;place-items:center;color:var(--muted);font-size:28px;font-weight:800;opacity:.55}
.yt-channel-identity{display:grid;grid-template-columns:132px minmax(0,1fr) auto;column-gap:22px;align-items:end;padding:0 28px;margin-top:-62px;position:relative;z-index:2}
.yt-channel-avatar{width:128px;height:128px;border-radius:50%;object-fit:cover;border:6px solid var(--bg);background:var(--surface-2);box-shadow:0 2px 10px rgba(0,0,0,.18)}
.yt-channel-main{min-width:0;padding-bottom:5px}
.yt-channel-main h1{font-size:28px;line-height:1.15;margin:0;font-weight:800;word-break:break-word}
.yt-channel-handle{margin-top:7px;color:var(--muted);font-size:13px}
.yt-channel-stats{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:9px;color:var(--muted);font-size:13px}
.yt-channel-description{max-width:880px;margin:10px 0 0;color:var(--muted);font-size:13px;line-height:1.7;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.yt-channel-subscribe{align-self:center;margin-top:54px}
.channel-subscribe-btn{border:0;border-radius:22px;padding:11px 20px;background:var(--text);color:var(--bg);font-weight:800;cursor:pointer;font-size:14px;min-width:110px}
.channel-subscribe-btn:hover{opacity:.9}
.channel-subscribe-btn.is-subscribed{background:var(--surface-2);color:var(--text);border:1px solid var(--line)}
.yt-channel-tabs{margin-top:22px;border-bottom:1px solid var(--line);display:flex;gap:28px;padding:0 28px}
.yt-channel-tabs a{display:block;padding:0 0 13px;text-decoration:none;color:var(--muted);font-weight:700;border-bottom:3px solid transparent}
.yt-channel-tabs a.active{color:var(--text);border-bottom-color:var(--text)}
.channel-videos-section{padding:0 4px}
.channel-videos-section .section-head{margin-bottom:18px}
.channel-videos-section .section-head h2{font-size:21px}
.channel-page .feed-loader,.channel-page .feed-end{width:100%}

@media (max-width:900px){
  .yt-channel-banner{height:220px;border-radius:14px}
  .yt-channel-identity{grid-template-columns:100px minmax(0,1fr);gap:16px;padding:0 18px;margin-top:-48px}
  .yt-channel-avatar{width:96px;height:96px;border-width:5px}
  .yt-channel-main h1{font-size:23px}
  .yt-channel-subscribe{grid-column:2;justify-self:start;margin-top:-4px}
  .yt-channel-tabs{padding:0 18px;gap:22px}
}

@media (max-width:620px){
  .channel-page{padding-top:0}
  .yt-channel-banner{height:180px;border-radius:0}
  .yt-channel-identity{grid-template-columns:78px minmax(0,1fr);gap:12px;padding:0 14px;margin-top:-36px}
  .yt-channel-avatar{width:76px;height:76px;border-width:4px}
  .yt-channel-main h1{font-size:19px}
  .yt-channel-handle{font-size:12px}
  .yt-channel-stats{font-size:11px;gap:5px}
  .yt-channel-description{font-size:12px;-webkit-line-clamp:3}
  .yt-channel-subscribe{grid-column:1 / -1;margin-top:0}
  .channel-subscribe-btn{padding:9px 17px;font-size:13px}
  .yt-channel-tabs{padding:0 14px;gap:18px;margin-top:18px}
  .yt-channel-tabs a{font-size:13px;padding-bottom:10px}
  .channel-videos-section{padding:0}
}

html[dir="rtl"] .yt-channel-identity{direction:rtl}
html[dir="rtl"] .yt-channel-subscribe{justify-self:start}


/* ShwTube v119 — Accessibility and mobile touch-target fixes. */
@media (max-width:980px){
  .grid.videos .card-body > a:first-child{
    display:flex;align-items:center;justify-content:center;
    width:48px;min-width:48px;height:48px;min-height:48px;
    flex:0 0 48px;
  }
  .grid.videos .card-body > a:first-child .channel-avatar{
    width:40px;height:40px;
  }
  .grid.videos .card-copy .title,
  .grid.videos .card-copy .channel{
    min-height:48px;
    padding-block:6px;
  }
  .grid.videos .card-copy .title{
    display:flex;align-items:center;
    line-height:1.35;
  }
  .grid.videos .card-copy .channel{
    display:flex;align-items:center;
    margin-top:2px;
  }
  body.watch-page .watch-recommendations .side-title-link{
    min-height:48px;
    padding-block:6px;
    display:flex;align-items:center;
  }
}
