/* Storyverse v36.46 — always-white YouTube */
.v3646-youtube-app{
  --yt-red:#ff0000;
  --yt-text:#0f0f0f;
  --yt-muted:#606060;
  --yt-line:#e5e5e5;
  --yt-soft:#f2f2f2;
  --yt-white:#fff;
  color-scheme:light!important;
  width:100%;height:100%;min-height:0;
  display:grid;grid-template-columns:210px minmax(0,1fr);
  overflow:hidden;background:#fff!important;color:var(--yt-text)!important;
  font-family:"Storyverse SF",-apple-system,BlinkMacSystemFont,"SF Pro Text","Helvetica Neue",Arial,sans-serif;
}
.v3646-youtube-app *{box-sizing:border-box}
.v3646-youtube-app button,.v3646-youtube-app input{font:inherit}
.v3646-yt-sidebar{
  min-height:0;overflow:auto;background:#fff;border-right:1px solid var(--yt-line);
  padding:22px 16px 20px;
}
.v3646-yt-brand{height:48px;display:flex;align-items:center;gap:7px;padding:0 8px 10px}
.v3646-yt-brand strong,.v3646-yt-mobile-logo strong{font-size:17px;letter-spacing:-.05em}
.v3646-yt-logo-mark{
  width:25px;height:17px;border-radius:5px;background:var(--yt-red);color:#fff;
  display:inline-grid;place-items:center;font-size:8px;line-height:1;
}
.v3646-yt-sidebar nav{display:grid;gap:3px;margin:18px 0}
.v3646-yt-sidebar nav>span,.v3646-yt-side-channels>span{
  padding:0 10px 7px;text-transform:uppercase;letter-spacing:.08em;font-size:8px;font-weight:800;color:#8b8b8b;
}
.v3646-yt-sidebar nav button,.v3646-yt-side-channels button{
  width:100%;min-height:38px;border:0;border-radius:10px;background:transparent;color:#5f5f5f;
  display:grid;grid-template-columns:27px minmax(0,1fr);gap:8px;align-items:center;
  text-align:left;padding:6px 10px;cursor:pointer;
}
.v3646-yt-sidebar nav button i{font-style:normal;text-align:center;font-size:15px}
.v3646-yt-sidebar nav button span{font-size:10px}
.v3646-yt-sidebar nav button:hover,.v3646-yt-sidebar nav button.active{
  background:#f2f2f2;color:#0f0f0f;font-weight:800;
}
.v3646-yt-sidebar nav button.active i{color:var(--yt-red)}
.v3646-yt-side-channels{display:grid;gap:2px;margin-top:22px}
.v3646-yt-side-channels button{grid-template-columns:26px minmax(0,1fr)}
.v3646-yt-side-channels img{width:25px;height:25px;border-radius:50%;object-fit:cover}
.v3646-yt-side-channels b{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.v3646-yt-shell{
  min-width:0;min-height:0;display:grid;grid-template-rows:64px minmax(0,1fr);
  background:#fff!important;
}
.v3646-yt-topbar{
  display:grid;grid-template-columns:minmax(220px,540px) auto;justify-content:space-between;gap:18px;align-items:center;
  padding:10px 24px;border-bottom:1px solid #f0f0f0;background:#fff!important;position:relative;z-index:4;
}
.v3646-yt-mobile-menu,.v3646-yt-mobile-logo{display:none}
.v3646-yt-search{
  min-width:0;height:40px;border:1px solid #d7d7d7;border-radius:20px;
  display:flex;align-items:center;gap:8px;padding:0 14px;color:#777;background:#fff;
}
.v3646-yt-search:focus-within{border-color:#8ab4f8;box-shadow:0 0 0 1px #8ab4f8}
.v3646-yt-search input{
  flex:1;min-width:0;border:0;outline:0;background:transparent;color:#111;font-size:11px;
}
.v3646-yt-top-actions{display:flex;align-items:center;gap:8px}
.v3646-yt-create,.v3646-yt-bell{
  border:0;border-radius:18px;height:36px;background:#f2f2f2;color:#111;cursor:pointer;
}
.v3646-yt-create{padding:0 13px;font-size:9px;font-weight:800}
.v3646-yt-bell{width:36px;font-size:14px}
.v3646-yt-me{width:34px;height:34px;border-radius:50%;object-fit:cover;background:#eee}
.v3646-yt-content{min-height:0;overflow:auto;background:#fff!important}
.v3646-yt-home{padding:22px 24px 34px;background:#fff}
.v3646-yt-section{margin-bottom:30px}
.v3646-yt-section-head{
  display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:13px
}
.v3646-yt-section-head h2{margin:0;font-size:18px;letter-spacing:-.035em;color:#111}
.v3646-yt-section-head span{font-size:8px;color:#777}
.v3646-yt-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px 16px;
}
.v3646-yt-card{min-width:0}
.v3646-yt-thumb{
  width:100%;aspect-ratio:16/9;border:0;border-radius:11px;overflow:hidden;background:#ececec;
  padding:0;position:relative;display:block;cursor:pointer;
}
.v3646-yt-thumb img{width:100%;height:100%;display:block;object-fit:cover;transition:transform .22s ease}
.v3646-yt-thumb:hover img{transform:scale(1.015)}
.v3646-yt-empty-thumb{position:absolute;inset:0;display:grid;place-items:center;color:#aaa;font-size:26px}
.v3646-yt-thumb>i{
  position:absolute;right:6px;bottom:6px;padding:3px 5px;border-radius:4px;
  background:rgba(0,0,0,.78);color:#fff;font-style:normal;font-size:7px;font-weight:800;
}
.v3646-yt-play{
  position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-size:18px;
  opacity:0;transition:opacity .2s;background:rgba(0,0,0,.05)
}
.v3646-yt-thumb:hover .v3646-yt-play{opacity:1}
.v3646-yt-card-meta{
  display:grid;grid-template-columns:34px minmax(0,1fr) 22px;gap:8px;align-items:start;padding-top:9px;
}
.v3646-yt-avatar{width:34px;height:34px;padding:0;border:0;background:transparent;cursor:pointer}
.v3646-yt-avatar img{width:34px;height:34px;border-radius:50%;object-fit:cover}
.v3646-yt-card-meta>div{min-width:0}
.v3646-yt-title{
  display:block;width:100%;border:0;padding:0;background:transparent;text-align:left;cursor:pointer;
  color:#111;font-size:10px;line-height:1.35;font-weight:800;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.v3646-yt-channel-name{
  display:block;border:0;background:transparent;padding:0;margin-top:4px;color:#676767;font-size:8px;cursor:pointer
}
.v3646-yt-channel-name:hover{text-decoration:underline}
.v3646-yt-card-meta small{display:block;margin-top:2px;color:#777;font-size:7px}
.v3646-yt-more{border:0;background:transparent;color:#555;font-weight:900;cursor:pointer;padding:2px}
.v3646-yt-empty{
  min-height:220px;border:1px dashed #ddd;border-radius:16px;display:grid;place-content:center;justify-items:center;
  gap:5px;color:#777;text-align:center;
}
.v3646-yt-empty strong{font-size:13px;color:#222}.v3646-yt-empty span{font-size:8px}
.v3646-yt-channel-grid{
  display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;
}
.v3646-yt-channel-tile{
  border:1px solid #ececec;border-radius:16px;background:#fff;padding:18px 12px;
  display:grid;justify-items:center;text-align:center;cursor:pointer;color:#111;
}
.v3646-yt-channel-tile:hover{background:#fafafa}
.v3646-yt-channel-tile img{width:68px;height:68px;border-radius:50%;object-fit:cover}
.v3646-yt-channel-tile strong{font-size:10px;margin-top:9px}
.v3646-yt-channel-tile span,.v3646-yt-channel-tile small{font-size:7px;color:#777;margin-top:2px}
.v3646-yt-watch{
  display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:22px;padding:18px 24px 34px;background:#fff
}
.v3646-yt-watch-main{min-width:0}
.v3646-yt-back{
  border:0;background:transparent;color:#555;font-size:9px;padding:0 0 10px;cursor:pointer
}
.v3646-yt-player{
  width:100%;aspect-ratio:16/9;background:#111;border-radius:14px;overflow:hidden;position:relative
}
.v3646-yt-player>img{width:100%;height:100%;object-fit:cover;display:block;opacity:.95}
.v3646-yt-player-empty{position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-size:42px}
.v3646-yt-player>button{
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  width:58px;height:42px;border:0;border-radius:11px;background:#ff0000;color:#fff;font-size:16px;cursor:pointer;
}
.v3646-yt-player>span{
  position:absolute;right:9px;bottom:8px;background:rgba(0,0,0,.75);color:#fff;border-radius:4px;padding:3px 6px;font-size:7px
}
.v3646-yt-watch-main>h1{font-size:18px;line-height:1.3;letter-spacing:-.025em;margin:12px 0 10px;color:#111}
.v3646-yt-watch-meta{display:flex;justify-content:space-between;gap:14px;align-items:center}
.v3646-yt-watch-channel{
  min-width:0;border:0;background:transparent;padding:0;display:flex;align-items:center;gap:9px;text-align:left;cursor:pointer;color:#111
}
.v3646-yt-watch-channel img{width:38px;height:38px;border-radius:50%;object-fit:cover}
.v3646-yt-watch-channel span{display:grid;min-width:0}
.v3646-yt-watch-channel strong{font-size:10px}.v3646-yt-watch-channel small{font-size:7px;color:#777;margin-top:2px}
.v3646-yt-watch-actions{display:flex;gap:6px;align-items:center}
.v3646-yt-watch-actions button{
  min-height:34px;border:0;border-radius:17px;background:#f2f2f2;padding:0 12px;color:#111;font-size:8px;font-weight:750;cursor:pointer
}
.v3646-yt-watch-actions button.liked{background:#ffe6e6;color:#d60000}
.v3646-yt-description{
  margin-top:13px;border-radius:12px;background:#f2f2f2;padding:12px 13px;color:#111
}
.v3646-yt-description strong{font-size:8px}.v3646-yt-description p{font-size:9px;line-height:1.5;margin:7px 0 0}
.v3646-yt-comments-preview{margin-top:14px;border-top:1px solid #eee;padding-top:11px}
.v3646-yt-comments-preview button{
  width:100%;border:0;background:transparent;display:flex;justify-content:space-between;padding:0;color:#111;cursor:pointer
}
.v3646-yt-comments-preview strong{font-size:10px}.v3646-yt-comments-preview span{font-size:8px;color:#777}
.v3646-yt-related{min-width:0}
.v3646-yt-related h3{font-size:11px;margin:24px 0 10px;color:#111}
.v3646-yt-compact-card{
  display:grid;grid-template-columns:132px minmax(0,1fr);gap:9px;margin-bottom:10px
}
.v3646-yt-thumb.compact{border-radius:8px}
.v3646-yt-compact-card>div{min-width:0}
.v3646-yt-compact-card>div button{
  border:0;background:transparent;padding:0;text-align:left;color:#111;cursor:pointer;display:block;width:100%
}
.v3646-yt-compact-card strong{
  font-size:8px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden
}
.v3646-yt-compact-card>div button+button{font-size:7px;color:#666;margin-top:4px}
.v3646-yt-compact-card small{display:block;font-size:6.5px;color:#777;margin-top:2px}
.v3646-yt-channel-page{padding:18px 24px 34px;background:#fff}
.v3646-yt-channel-cover{
  height:150px;border-radius:16px;background:linear-gradient(135deg,#f1f1f1,#fff2f2 45%,#f4f4f4);
}
.v3646-yt-channel-page>header{
  display:grid;grid-template-columns:86px minmax(0,1fr);gap:15px;align-items:center;margin-top:-36px;padding:0 18px 12px
}
.v3646-yt-channel-page>header img{
  width:86px;height:86px;border-radius:50%;object-fit:cover;border:5px solid #fff;background:#eee
}
.v3646-yt-channel-page>header h1{font-size:23px;letter-spacing:-.04em;margin:20px 0 2px;color:#111}
.v3646-yt-channel-page>header span{font-size:8px;color:#666}.v3646-yt-channel-page>header p{font-size:8px;color:#777;margin:4px 0 0}
.v3646-yt-channel-page>nav{display:flex;gap:18px;border-bottom:1px solid #eee;padding:0 18px}
.v3646-yt-channel-page>nav button{
  height:38px;border:0;border-bottom:2px solid transparent;background:transparent;color:#666;font-size:8px;font-weight:800
}
.v3646-yt-channel-page>nav button.active{color:#111;border-color:#111}
.v3646-yt-channel-videos{padding-top:18px}
.v3646-yt-mobile-nav{display:none}

/* force light appearance even when Storyverse is dark */
.theme-dark .v3646-youtube-app,
.theme-dark .v3646-youtube-app .v3646-yt-shell,
.theme-dark .v3646-youtube-app .v3646-yt-content,
.theme-dark .v3646-youtube-app .v3646-yt-home,
.theme-dark .v3646-youtube-app .v3646-yt-sidebar,
.theme-dark .v3646-youtube-app .v3646-yt-topbar,
.theme-dark .v3646-youtube-app .v3646-yt-channel-page{
  background:#fff!important;color:#0f0f0f!important;
}
.theme-dark .v3646-youtube-app button,
.theme-dark .v3646-youtube-app input{color:inherit}

/* keep old YouTube modals light as well */
#youtube-modal-back .modal,
#youtube-comments-back .modal,
#youtube-detail-back .modal,
#youtube-menu-back .modal{
  color-scheme:light!important;background:#fff!important;color:#111!important
}

@media(max-width:1120px){
  .v3646-yt-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .v3646-yt-channel-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .v3646-yt-watch{grid-template-columns:minmax(0,1fr) 280px}
}
@media(max-width:860px){
  .v3646-youtube-app{grid-template-columns:168px minmax(0,1fr)}
  .v3646-yt-sidebar{padding-inline:10px}
  .v3646-yt-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .v3646-yt-channel-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .v3646-yt-watch{grid-template-columns:1fr}.v3646-yt-related{display:none}
}
@media(max-width:760px){
  .julia-ios-appscreen.app-youtube{
    background:#fff!important;color:#111!important;--window-bg:#fff;--window-text:#111;--window-muted:#666;
  }
  .julia-ios-appscreen.app-youtube .julia-ios-status{background:#fff!important;color:#111!important;z-index:50}
  .julia-ios-appscreen.app-youtube .julia-ios-status .signal,
  .julia-ios-appscreen.app-youtube .julia-ios-status .battery{filter:none!important}
  .julia-ios-appscreen.app-youtube .julia-ios-floating-home{
    top:calc(env(safe-area-inset-top) + 37px)!important;left:8px!important;z-index:80!important;
    color:#111!important;background:rgba(255,255,255,.92)!important;border:1px solid #eee!important;
  }
  .julia-ios-appscreen.app-youtube .julia-ios-appcontent{
    overflow:hidden!important;background:#fff!important;padding:0!important;
  }
  .v3646-youtube-app{
    display:block;height:100%;background:#fff!important;position:relative;padding-bottom:64px;
  }
  .v3646-yt-sidebar{
    display:none;position:absolute;inset:0 26% 0 0;z-index:90;border:0;border-right:1px solid #eee;
    box-shadow:14px 0 40px rgba(0,0,0,.12);padding-top:18px;
  }
  .v3646-youtube-app.show-sidebar .v3646-yt-sidebar{display:block}
  .v3646-yt-shell{display:grid;grid-template-rows:54px minmax(0,1fr) 61px;height:100%}
  .v3646-yt-topbar{
    grid-template-columns:32px auto minmax(0,1fr) auto;gap:7px;padding:7px 10px;border-bottom:1px solid #eee
  }
  .v3646-yt-mobile-menu{
    display:grid;width:31px;height:31px;border:0;background:transparent;place-items:center;font-size:15px;color:#111
  }
  .v3646-yt-mobile-logo{display:flex;align-items:center;gap:5px}
  .v3646-yt-mobile-logo strong{font-size:13px}
  .v3646-yt-mobile-logo .v3646-yt-logo-mark{width:20px;height:14px;font-size:6px}
  .v3646-yt-search{height:34px;padding:0 9px;min-width:0}
  .v3646-yt-search input{font-size:16px}
  .v3646-yt-top-actions{gap:5px}
  .v3646-yt-create{width:32px;height:32px;padding:0;border-radius:50%;font-size:15px}
  .v3646-yt-create span,.v3646-yt-bell{display:none}
  .v3646-yt-me{width:31px;height:31px}
  .v3646-yt-content{min-height:0;overflow:auto;-webkit-overflow-scrolling:touch}
  .v3646-yt-home{padding:12px 10px 22px}
  .v3646-yt-section-head{margin-bottom:10px}
  .v3646-yt-section-head h2{font-size:17px}
  .v3646-yt-grid{grid-template-columns:1fr;gap:18px}
  .v3646-yt-thumb{border-radius:12px}
  .v3646-yt-card-meta{grid-template-columns:36px minmax(0,1fr) 20px;padding:9px 2px 0}
  .v3646-yt-avatar,.v3646-yt-avatar img{width:36px;height:36px}
  .v3646-yt-title{font-size:12px}
  .v3646-yt-channel-name{font-size:9px}.v3646-yt-card-meta small{font-size:8px}
  .v3646-yt-section.secondary{display:none}
  .v3646-yt-channel-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .v3646-yt-channel-tile{padding:14px 8px}.v3646-yt-channel-tile img{width:62px;height:62px}
  .v3646-yt-watch{display:block;padding:0 0 22px}
  .v3646-yt-watch-main{min-width:0}
  .v3646-yt-watch .v3646-yt-back{margin:8px 10px 0}
  .v3646-yt-player{border-radius:0;aspect-ratio:16/9}
  .v3646-yt-watch-main>h1{font-size:15px;padding:0 11px;margin:11px 0 9px}
  .v3646-yt-watch-meta{padding:0 11px;align-items:flex-start}
  .v3646-yt-watch-channel img{width:36px;height:36px}
  .v3646-yt-watch-actions{gap:4px}.v3646-yt-watch-actions button{padding:0 9px;min-height:31px}
  .v3646-yt-description{margin:11px;border-radius:11px}
  .v3646-yt-comments-preview{margin:12px 11px 0}
  .v3646-yt-channel-page{padding:8px 0 24px}
  .v3646-yt-channel-page>.v3646-yt-back{margin-left:10px}
  .v3646-yt-channel-cover{height:100px;border-radius:0}
  .v3646-yt-channel-page>header{grid-template-columns:72px minmax(0,1fr);margin-top:-31px;padding:0 12px 10px}
  .v3646-yt-channel-page>header img{width:72px;height:72px;border-width:4px}
  .v3646-yt-channel-page>header h1{font-size:20px;margin-top:16px}
  .v3646-yt-channel-page>nav{padding:0 11px;gap:13px}
  .v3646-yt-channel-videos{padding:14px 10px 0}
  .v3646-yt-mobile-nav{
    display:grid;grid-template-columns:repeat(5,1fr);height:61px;border-top:1px solid #e9e9e9;
    background:#fff;position:relative;z-index:5;padding:4px 3px max(4px,env(safe-area-inset-bottom))
  }
  .v3646-yt-mobile-nav button{
    border:0;background:transparent;color:#777;display:grid;justify-items:center;align-content:center;gap:1px;cursor:pointer
  }
  .v3646-yt-mobile-nav button i{font-style:normal;font-size:16px;line-height:1}
  .v3646-yt-mobile-nav button span{font-size:6.5px}
  .v3646-yt-mobile-nav button.active{color:#111;font-weight:800}
  .v3646-yt-mobile-nav button.create i{
    width:31px;height:31px;border-radius:50%;background:#ff0000;color:#fff;display:grid;place-items:center;font-size:19px
  }
}
