/* Final shared layout layer. Existing provider/player behavior remains in its controllers. */
:root {
  --video-bg: #0f0f0f;
  --video-surface: #212121;
  --video-hover: #303030;
  --video-text: #f1f1f1;
  --video-muted: #aaa;
  --video-line: #333;
  --video-accent: #ff4343;
  --video-header: 56px;
  --video-guide: 240px;
  --video-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
}
html { scroll-padding-top: 128px; }
body.aurora-body, body.reader-body {
  background: var(--video-bg) !important;
  color: var(--video-text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif !important;
}
*, *::before, *::after { box-sizing: border-box; }
button, input, select { font: inherit; }
a, button, input, select, [tabindex] { -webkit-tap-highlight-color: transparent; }
:is(a, button, input, select, [tabindex]):focus-visible { outline: 2px solid #70b8ff !important; outline-offset: 3px; }
.skip-content { position: fixed; top: -100px; left: 12px; padding: 12px 20px; background: #fff; color: #111; z-index: 10000; }
.skip-content:focus { top: 8px; }
.cyber-ambient-glow, .reader-ambient-glow { display: none !important; }
header.yt-header.site-header {
  position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important;
  height: var(--video-header) !important; min-height: var(--video-header) !important; max-height: var(--video-header) !important;
  padding: 0 16px !important; background: var(--video-bg) !important; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important; transform: none !important;
  display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: space-between !important;
  z-index: 1000 !important;
}
.yt-header-left { display: flex !important; flex-direction: row !important; align-items: center !important; gap: 16px !important; flex: 0 0 auto !important; }
.yt-header-center { display: flex !important; justify-content: center !important; flex: 1 !important; max-width: 660px !important; margin: 0 24px !important; position: relative !important; }
.yt-header-right { display: flex !important; flex-direction: row !important; align-items: center !important; gap: 8px !important; flex: 0 0 auto !important; }
.yt-brand { display: flex !important; flex-direction: row !important; align-items: center !important; gap: 8px !important; cursor: pointer; text-decoration: none; user-select: none; }
.yt-brand-text { display: flex !important; align-items: baseline !important; gap: 1px !important; }
.yt-brand-title { letter-spacing: -0.5px !important; font-size: 19px !important; font-weight: 800 !important; color: #FFFFFF !important; }
.yt-brand-ext { font-size: 13px !important; font-weight: 700 !important; color: #AAAAAA !important; }
.yt-logo-badge { width: 30px !important; height: 22px !important; background: var(--video-accent) !important; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important; border-radius: 6px !important; display: flex !important; align-items: center !important; justify-content: center !important; flex-shrink: 0 !important; color: #FFFFFF !important; font-size: 11px !important; }
.yt-brand-pill { display: inline-block !important; font-size: 11px !important; font-weight: 800 !important; background: rgba(34, 197, 94, 0.18) !important; border: 1px solid rgba(34, 197, 94, 0.45) !important; color: #4ADE80 !important; padding: 1px 5px !important; border-radius: 4px !important; margin-left: 6px !important; }
.yt-user-free-badge, .yt-user-arrow { display: none !important; }
.yt-icon-btn { width: 40px !important; height: 40px !important; border-radius: 50% !important; background: transparent !important; border: none !important; color: #F1F1F1 !important; font-size: 18px !important; display: flex !important; align-items: center !important; justify-content: center !important; cursor: pointer !important; padding: 0 !important; flex-shrink: 0 !important; }
.yt-icon-btn:hover { background: rgba(255, 255, 255, 0.12) !important; }
.yt-search-box { display: flex !important; flex-direction: row !important; align-items: center !important; width: 100% !important; max-width: 600px !important; height: 40px !important; margin: 0 !important; }
.yt-search-input-wrap { display: flex !important; align-items: center !important; position: relative !important; flex: 1 !important; height: 40px !important; background: #121212 !important; border: 1px solid #303030 !important; border-right: none !important; border-radius: 40px 0 0 40px !important; padding: 4px 16px !important; }
input.yt-search-input { width: 100% !important; height: 100% !important; background: transparent !important; border: none !important; outline: none !important; color: var(--video-text) !important; font-size: 15px !important; font-family: inherit !important; }
.yt-search-btn { width: 64px !important; min-width: 64px !important; height: 40px !important; background: #222222 !important; border: 1px solid #303030 !important; border-radius: 0 40px 40px 0 !important; color: #F1F1F1 !important; display: flex !important; align-items: center !important; justify-content: center !important; cursor: pointer !important; }
.search-autocomplete-dropdown { max-height: min(60dvh, 420px); overflow-y: auto; }
.mobile-search-back { display: none !important; }
.yt-app-layout { padding-top: var(--video-header) !important; width: 100%; }
.yt-sidebar { position: fixed !important; top: var(--video-header) !important; bottom: 0 !important; left: 0 !important; width: var(--video-guide) !important; background: var(--video-bg) !important; border-right: 1px solid rgba(255, 255, 255, 0.08) !important; z-index: 950 !important; display: flex !important; flex-direction: column !important; }
.yt-sidebar-scroll { flex: 1 !important; overflow-y: auto !important; padding: 12px 8px !important; }
.yt-sidebar-section { padding: 0 !important; }
.yt-sidebar-item { display: flex !important; align-items: center !important; height: 40px !important; min-height: 40px !important; padding: 0 12px !important; gap: 16px !important; border-radius: 10px !important; cursor: pointer !important; text-decoration: none !important; color: #F1F1F1 !important; font-size: 14px !important; font-weight: 500 !important; }
.yt-sidebar-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-sidebar-item.active { background: var(--video-hover) !important; }
.yt-sidebar-item i { width: 24px !important; flex: 0 0 24px; text-align: center; }
.yt-sidebar-heading { color: var(--video-text) !important; font-size: 14px !important; text-transform: none !important; letter-spacing: 0 !important; }
.yt-sidebar-footer { line-height: 1.7; }
.yt-main-viewport { margin-left: var(--video-guide) !important; width: calc(100% - var(--video-guide)) !important; min-width: 0; padding-top: 0 !important; }
@media (min-width: 901px) {
body.yt-sidebar-collapsed { --video-guide: 72px; }
body.yt-sidebar-collapsed .yt-sidebar-scroll { padding: 8px 2px !important; }
body.yt-sidebar-collapsed .yt-sidebar-item { min-height: 70px !important; padding: 10px 2px !important; gap: 7px !important; }
body.yt-sidebar-collapsed .yt-sidebar-label { flex: 0 0 auto; max-width: 68px; font-size: 11px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.yt-sidebar-collapsed .yt-sidebar-section:not(:first-child) { display: none !important; }
}
.yt-chips-bar { position: sticky !important; top: var(--video-header) !important; height: 56px !important; padding: 0 16px !important; background: var(--video-bg) !important; border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important; z-index: 80 !important; display: flex !important; align-items: center !important; gap: 8px !important; box-sizing: border-box !important; }
.yt-chips-bar[hidden] { display: none !important; }
.yt-chips-container { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; align-items: center !important; gap: 10px !important; overflow-x: auto !important; scrollbar-width: none !important; flex: 1 !important; padding: 4px 0 !important; min-width: 0 !important; }
.yt-chips-container::-webkit-scrollbar { display: none !important; }
.yt-chip { display: inline-flex !important; align-items: center !important; justify-content: center !important; height: 32px !important; min-height: 32px !important; padding: 0 14px !important; border-radius: 8px !important; background: rgba(255, 255, 255, 0.1) !important; color: #F1F1F1 !important; font-size: 13.5px !important; font-weight: 500 !important; white-space: nowrap !important; flex-shrink: 0 !important; border: none !important; cursor: pointer !important; box-shadow: none !important; }
.yt-chip.active { color: #0F0F0F !important; background: #FFFFFF !important; font-weight: 600 !important; }
.yt-chips-arrow { width: 32px !important; height: 32px !important; border-radius: 50% !important; background: rgba(255, 255, 255, 0.1) !important; border: none !important; color: #FFFFFF !important; display: flex !important; align-items: center !important; justify-content: center !important; cursor: pointer !important; flex-shrink: 0 !important; }
.yt-main-viewport .hero-spotlight, .yt-main-viewport .stories-bar-section { display: none !important; }
.yt-main-viewport .main-container { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 12px 24px 32px !important; }
#viewHome > .main-container { display: flex; flex-direction: column; }
#sortFilterBar { order: 1; }
#viewHome .section-header { order: 2; }
#moviesGrid { order: 3; }
#homeReelsShelf { order: 4; }
#moviesGrid > #homeReelsShelf { grid-column: 1 / -1; order: 0; min-width: 0; width: 100%; margin: 24px 0 !important; }
#infiniteScrollSentinel, #catalogEndBadge, #emptyState, #paginationContainer { order: 5; }
.series-group { grid-column: 1 / -1; }
.watch-episodes[hidden] { display: none !important; }
.watch-episodes { margin: 20px 0; padding: 16px; border: 1px solid #333; border-radius: 12px; background: #181818; min-width: 0; }
.watch-episodes-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; }
.watch-episodes h2 { margin: 0 0 6px; font-size: 18px; overflow-wrap: anywhere; }
#watchEpisodesSummary { margin: 0; color: #aaa; font-size: 12px; }
.watch-next-episode { color: #90c8ff; text-decoration: none; font-size: 13px; white-space: nowrap; padding: 12px 0; }
.watch-next-episode[hidden] { display: none; }
#watchEpisodesList { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.watch-episode-link { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px; border-radius: 8px; color: #eee; text-decoration: none; font-size: 14px; }
.watch-episode-link:hover { background: #ffffff0d; }
.watch-episode-link.is-current { background: #303030; }
.watch-episode-number { color: #aaa; font-size: 12px; flex: 0 0 42px; }
.watch-episode-title { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.4; }
.watch-episode-status, .rec-next-label { color: #9bcfff; font-size: 11px; }
.watch-episode-status { flex: 0 0 auto; }
.rec-next-label { display: block; margin-bottom: 4px; }
@media (max-width: 650px) { .watch-episodes { margin: 16px 12px; padding: 12px; } .watch-episodes-header { flex-wrap: wrap; } .watch-episode-link { padding: 10px 6px; gap: 8px; } .watch-episode-number { flex-basis: 32px; } }
.yt-main-viewport .section-header { padding: 12px 0 16px !important; margin: 0 !important; gap: 12px; align-items: center; }
.yt-main-viewport .section-title { font-size: 20px !important; letter-spacing: -.35px !important; }
.results-meta { font-size: 12px !important; color: var(--video-muted) !important; line-height: 1.6; }
.sort-filter-bar { position: static !important; display: flex !important; flex-wrap: nowrap !important; gap: 8px !important; padding: 0 0 12px !important; margin: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; overflow-x: auto; scrollbar-width: none; }
.sort-filter-bar .sort-label { display: inline-flex; align-items: center; flex-shrink: 0; font-size: 12px; color: var(--video-muted); }
.sort-btn { flex-shrink: 0; min-height: 36px; padding: 8px 12px !important; border: 1px solid var(--video-line) !important; border-radius: 18px !important; background: transparent !important; color: var(--video-muted) !important; font-size: 12px !important; }
.sort-btn.active { background: var(--video-surface) !important; color: var(--video-text) !important; }
body.aurora-body .movies-grid, body.aurora-body .movies-grid.mode-adult, body.aurora-body .movies-grid.mode-manga { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 32px 16px !important; padding: 0 !important; margin: 0 !important; }
.movie-card, .movie-card.cyber-card { min-width: 0; background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; transform: none !important; animation: none !important; overflow: visible !important; cursor: pointer; }
.movie-card::before, .movie-card::after { display: none !important; }
.card-poster-wrap, .card-poster-wrap.adult-poster-wrap { position: relative !important; aspect-ratio: 16 / 9 !important; height: auto !important; border-radius: 12px !important; overflow: hidden !important; background: var(--video-surface); }
.manga-card .card-poster-wrap { aspect-ratio: 3 / 4 !important; }
.card-poster { width: 100% !important; height: 100% !important; object-fit: cover !important; transform: none !important; }
.card-info, .yt-card-info { position: relative; display: flex !important; align-items: flex-start !important; gap: 12px !important; padding: 12px 0 0 !important; background: none !important; min-height: 84px; }
.yt-channel-avatar { width: 36px !important; height: 36px !important; flex: 0 0 36px !important; border-radius: 50% !important; background: #282828 !important; color: #ddd !important; border: 0 !important; box-shadow: none !important; font-size: 11px !important; }
.yt-card-text { flex: 1; min-width: 0; }
.card-title { color: var(--video-text) !important; font-size: 15px !important; font-weight: 600 !important; line-height: 1.4 !important; margin: 0 0 5px !important; display: -webkit-box !important; -webkit-line-clamp: 2 !important; -webkit-box-orient: vertical; overflow: hidden; }
.yt-card-subline { display: flex !important; flex-wrap: wrap; gap: 3px 6px !important; color: var(--video-muted) !important; font-size: 12px !important; line-height: 1.5; }
.yt-channel-name { display: block; flex-basis: 100%; }
.yt-dot, .yt-views:empty, .yt-free-badge:empty { display: none !important; }
.yt-free-badge { color: var(--video-muted) !important; background: none !important; border: 0 !important; padding: 0 !important; }
.card-views, .card-badge-rating { display: none !important; }
.card-badge-uhd { font-size: 10px !important; box-shadow: none !important; background: #151515d9 !important; border: 0 !important; }
.card-duration { bottom: 8px !important; right: 8px !important; background: #000c !important; padding: 3px 5px !important; border-radius: 4px !important; font-size: 12px !important; border: 0 !important; box-shadow: none !important; }
.video-save-button { border: 0; background: transparent; color: var(--video-muted); min-width: 36px; min-height: 44px; border-radius: 50%; padding: 8px; flex-shrink: 0; cursor: pointer; }
.video-save-button:hover { background: var(--video-hover); }
.video-save-button[aria-pressed="true"] { color: #fff; }
.skeleton-card { aspect-ratio: 16 / 11; background: linear-gradient(100deg,#202020 25%,#292929 50%,#202020 75%) !important; background-size: 200% 100% !important; border: 0 !important; border-radius: 12px !important; min-height: 0 !important; animation: video-skeleton 1.6s linear infinite !important; }
@keyframes video-skeleton { to { background-position: -200% 0; } }
.home-reels-shelf { margin: 32px 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; padding: 16px 20px !important; }
.reels-shelf-title { font-size: 20px !important; }
.reels-shelf-badge { display: none !important; }
.empty-state { padding: 64px 20px !important; color: var(--video-muted); }
.empty-state h3 { color: var(--video-text); margin: 16px 0 8px; }
.empty-state button { margin: 16px 6px 0; min-height: 44px; }
.catalog-end-badge, .infinite-scroll-sentinel { margin: 28px 0 !important; }
body.yt-drawer-open { overflow: hidden !important; }
body.reels-mode .yt-chips-bar { display: none !important; }
body.reels-mode .yt-main-viewport { padding-top: 0 !important; }
body.reels-mode .reels-viewport-container, body.reels-mode .reel-card { height: 100dvh !important; min-height: 0 !important; }
body.reels-mode .reels-stage-wrap { z-index: 1500 !important; }
.site-footer { border-top: 1px solid var(--video-line) !important; background: var(--video-bg) !important; }
.site-footer .footer-inner { padding: 24px !important; }
/* Watch uses its existing native/HLS/embed player and Express resolver. */
.watch-header { position: fixed !important; inset: 0 0 auto !important; height: 56px !important; background: var(--video-bg) !important; box-shadow: none !important; border-bottom: 1px solid #222 !important; }
.watch-header-inner { max-width: 1800px !important; height: 56px !important; padding: 0 24px !important; gap: 20px !important; }
.watch-main-stage { display: grid !important; grid-template-columns: minmax(0, 1fr) 360px !important; max-width: 1800px !important; width: 100% !important; gap: 24px !important; margin: 0 auto !important; padding: 80px 32px 40px !important; }
.watch-primary-column, .watch-recommendations-column { min-width: 0 !important; width: auto !important; }
.watch-recommendations-column { position: static !important; padding: 0 !important; max-width: none !important; }
.theater-screen-wrapper { width: 100% !important; aspect-ratio: 16 / 9; height: auto !important; min-height: 0 !important; border: 0 !important; border-radius: 12px !important; background: #000 !important; box-shadow: none !important; overflow: hidden; }
.theater-video-element, .theater-iframe-element { width: 100%; height: 100%; }
.theater-brand-pill { display: none !important; }
.player-control-hud { background: transparent !important; border: 0 !important; padding: 10px 0 !important; box-shadow: none !important; flex-wrap: wrap; gap: 8px; }
.watch-body .player-control-hud { position: relative; }
.watch-body #qualityPillsRow { display: none !important; }
.watch-body #playerQualityStatus { color: var(--video-text); font-size: 13px; }
.player-settings-menu { position: absolute; right: 0; bottom: calc(100% + 4px); z-index: 30; width: min(310px, calc(100vw - 24px)); max-height: min(420px, 65dvh); overflow-y: auto; padding: 8px 0; border-radius: 12px; background: #222f; color: #f1f1f1; box-shadow: 0 8px 28px #0008; border: 1px solid #ffffff1a; }
.player-settings-menu[hidden] { display: none !important; }
.player-settings-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 10px 16px; border: 0; background: transparent; color: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.player-settings-row:hover, .player-settings-row:focus-visible { background: #ffffff1a; }
.player-settings-row:disabled { color: #888; cursor: default; }
.player-settings-check { width: 20px; flex-shrink: 0; text-align: center; font-size: 17px; }
.player-settings-value { margin-left: auto; color: #ddd; font-size: 12px; white-space: nowrap; }
.player-settings-back { margin-bottom: 6px; border-bottom: 1px solid #ffffff26; }
.player-settings-note { margin: 6px 16px; color: #aaa; font-size: 11px; line-height: 1.5; }
#playerSettingsBtn[aria-expanded="true"] { color: #fff; background: #444; }
/* In-video control rail and translucent settings, following the supplied reference. */
.video-player-controls { display: none; }
.player-buffering { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 6; }
.player-buffering[hidden] { display: none !important; }
.video-skip-rail { position:absolute; left:8%; right:8%; top:50%; transform:translateY(-50%); display:flex; justify-content:space-between; z-index:7; pointer-events:none; opacity:0; transition:opacity .15s; }
.controls-visible .video-skip-rail,.video-skip-rail:focus-within { opacity:1; }
.video-skip-button { position:relative; display:grid; place-items:center; width:56px; height:56px; border:0; border-radius:50%; background:#0007; color:#fff; pointer-events:auto; cursor:pointer; }
.video-skip-button i { font-size:33px; }
.video-skip-button span { position:absolute; font-size:11px; font-weight:700; top:24px; }
.video-skip-button:disabled { opacity:.35; cursor:default; }
.video-skip-rail .video-skip-button { pointer-events:none; }
.controls-visible .video-skip-button,.video-skip-rail:focus-within .video-skip-button { pointer-events:auto; }
.watch-body .theater-video-element { touch-action:manipulation; }
.video-seek-feedback { position:absolute; top:50%; right:8%; transform:translateY(-50%); z-index:9; pointer-events:none; background:#000b; color:#fff; border-radius:30px; padding:18px; font-size:14px; }
.video-seek-feedback.seek-back { right:auto; left:8%; }
.video-seek-feedback[hidden],.embedded-player .video-skip-rail { display:none; }
.player-buffering span { width: 48px; height: 48px; border: 4px solid #ffffff45; border-top-color: #fff; border-radius: 50%; animation: player-buffer-spin .8s linear infinite; filter: drop-shadow(0 1px 4px #0008); }
@keyframes player-buffer-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .player-buffering span { animation: none; } }
.custom-player-enabled #playerControlHud { display: none !important; }
.custom-player-enabled .theater-screen-wrapper { isolation: isolate; }
.custom-player-enabled .video-player-controls { display: block; position: absolute; bottom: 0; left: 0; right: 0; z-index: 8; padding: 32px 14px 6px; color: #fff; background: linear-gradient(transparent, #000a); opacity: 0; transition: opacity .18s; }
.custom-player-enabled .controls-visible .video-player-controls, .custom-player-enabled .video-player-controls:focus-within, .custom-player-enabled .theater-screen-wrapper:has(.player-settings-menu:not([hidden])) .video-player-controls { opacity: 1; }
.custom-player-enabled .embedded-player .video-player-controls { display: none; }
.video-control-toolbar, .video-controls-left, .video-controls-right, .video-volume-group { display: flex; align-items: center; }
.video-control-toolbar { justify-content: space-between; gap: 12px; min-height: 44px; }
.video-controls-left, .video-controls-right { gap: 2px; min-width: 0; }
.video-control-toolbar .video-control-button { display: inline-flex; justify-content: center; align-items: center; width: 42px; height: 42px; min-width: 42px; min-height: 42px; padding: 8px; border: 0 !important; border-radius: 6px; color: #fff !important; background: transparent !important; cursor: pointer; font-size: 20px; text-shadow: 0 1px 3px #0008; box-shadow: none !important; }
.video-control-toolbar .video-control-button:hover { background: #ffffff20 !important; }
.video-control-toolbar .video-control-button:disabled { opacity: .4; cursor: default; }
.video-control-toolbar .video-control-button.is-selected::after { content: ''; position: absolute; bottom: 5px; width: 22px; height: 3px; border-radius: 2px; background: #ff234b; }
.video-control-toolbar .video-control-button { position: relative; }
.video-volume-group input { width: 0; opacity: 0; transition: width .15s; accent-color: white; min-height: 24px; cursor: pointer; }
.video-volume-group:hover input, .video-volume-group:focus-within input { width: 65px; opacity: 1; margin-right: 8px; }
.video-time { min-width: 0; padding: 6px 8px; border: 0; background: none; color: #fff; font-size: 12px; white-space: nowrap; cursor: pointer; }
.video-progress-wrap { display: flex; align-items: center; height: 16px; }
.video-seek { appearance: none; -webkit-appearance: none; margin: 0; width: 100%; height: 4px; min-height: 4px; border: 0; border-radius: 2px; cursor: pointer; background: linear-gradient(to right,#ff1749 0 var(--video-progress,0%),#fff8 var(--video-progress,0%) var(--video-buffered,0%),#ffffff40 var(--video-buffered,0%) 100%); }
.video-seek::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #ff1749; border: 0; }
.video-seek::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: #ff1749; border: 0; }
.video-autoplay-toggle { border: 0; background: #ffffff40; padding: 2px; width: 38px; min-width: 38px; height: 20px; min-height: 20px; margin: 0 8px; border-radius: 20px; cursor: pointer; }
.video-autoplay-toggle span { display: grid; place-items: center; width: 16px; height: 16px; background: #fff; color: #222; border-radius: 50%; font-size: 8px; transition: transform .15s; }
.video-autoplay-toggle[aria-checked="true"] { background: #fff9; }
.video-autoplay-toggle[aria-checked="true"] span { transform: translateX(18px); }
.custom-player-enabled .player-settings-menu { right: 12px; bottom: 68px; width: 316px; max-height: calc(100% - 84px); padding: 8px 0; z-index: 12; background: #11151bdc; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 0; border-radius: 12px; box-shadow: 0 6px 24px #0006; }
.custom-player-enabled .player-settings-row { min-height: 48px; padding: 10px 18px; gap: 14px; font-size: 14px; }
.custom-player-enabled .player-settings-row .player-settings-check { width: 24px; font-size: 20px; }
.custom-player-enabled .player-settings-value { font-size: 13px; color: #ccc; }
.player-settings-switch { margin-left: auto; flex-shrink: 0; width: 40px; height: 23px; padding: 2px; border-radius: 20px; background: #ffffff42; }
.player-settings-switch::after { content: ''; display: block; width: 19px; height: 19px; border-radius: 50%; background: #bdbdbd; transition: transform .15s; }
[aria-checked="true"] > .player-settings-switch::after { transform: translateX(17px); background: #fff; }
.custom-player-enabled .theater-screen-wrapper:fullscreen { width: 100vw !important; height: 100dvh !important; max-height: none !important; border-radius: 0 !important; aspect-ratio: auto; }
.custom-player-enabled .theater-screen-wrapper:fullscreen .theater-video-element { object-fit: contain; }
@media (max-width: 650px) {
  .custom-player-enabled .video-player-controls { padding: 24px 8px 4px; }
  .video-control-toolbar { gap: 4px; }
  .video-control-toolbar .video-control-button { width: 36px; min-width: 36px; height: 44px; min-height: 44px; padding: 7px; font-size: 18px; }
  .video-controls-left, .video-controls-right { gap: 0; }
  .video-time { font-size: 11px; padding: 4px; }
  .video-autoplay-toggle { display: none; }
  .video-volume-group input, .video-volume-group:hover input, .video-volume-group:focus-within input { display: none; }
  .video-controls-right #pipBtn, .video-controls-right #theaterModeBtn { display: none !important; }
  .custom-player-enabled .player-settings-menu { position: fixed; left: 12px; right: 12px; bottom: max(16px, env(safe-area-inset-bottom,0px)); width: auto; max-height: 70dvh; z-index: 6000; background: #181818f5; }
  .custom-player-enabled .player-settings-row { min-height: 48px; }
}
.hud-left { min-width: 0; flex: 1; }
.quality-pills-row { flex-wrap: wrap; }
.watch-meta-deck, .community-comments-card, .downloads-station-card { background: none !important; border: 0 !important; padding: 16px 0 !important; box-shadow: none !important; }
.watch-title { font-size: 21px !important; line-height: 1.4 !important; letter-spacing: -.3px; }
.meta-actions-row { flex-wrap: wrap; gap: 8px !important; }
.meta-action-btn, .watch-action-chip { border: 0 !important; background: #272727 !important; border-radius: 24px !important; min-height: 44px; box-shadow: none !important; }
.watch-description { margin: 16px 0; padding: 14px; background: #272727; border-radius: 12px; font-size: 14px; line-height: 1.6; }
.watch-description summary { cursor: pointer; font-weight: 600; }
.watch-credits { margin-top: 16px; color: #aaa; font-size: 13px; line-height: 1.6; }
.watch-credits p { margin: 4px 0; }
.watch-credits a { color: #9bcfff; text-decoration: none; }
.watch-description p { white-space: pre-line; margin-top: 8px; overflow-wrap: anywhere; }
.local-storage-note { color: var(--video-muted); font-size: 12px; margin: 8px 0 14px; }
.rec-card { background: none !important; border: 0 !important; padding: 0 !important; box-shadow: none !important; transform: none !important; gap: 10px !important; }
.rec-card-thumb { flex: 0 0 160px !important; width: 160px !important; height: 90px !important; border-radius: 8px !important; }
.rec-card-title { font-size: 14px !important; line-height: 1.4 !important; }
.rec-header { border: 0 !important; margin-bottom: 16px; }
.watch-main-stage.theater-mode { grid-template-columns: minmax(0,1fr) !important; }
.watch-main-stage.theater-mode .watch-recommendations-column { display: none !important; }
.reader-header { background: var(--video-bg) !important; box-shadow: none !important; border-bottom: 1px solid var(--video-line) !important; }
.reader-header-inner { max-width: 1600px; gap: 16px !important; }
.reader-header .header-left, .reader-title-info { min-width: 0; }
.manga-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-body .reader-main { width: 100%; }
.reader-body .webtoon-container { max-width: min(820px, 100%); }
.reader-body .webtoon-container.fit-full { max-width: min(1100px, 100%); }
.reader-body .webtoon-container img { max-width: 100%; }
@media (min-width: 1680px) { body.aurora-body .movies-grid, body.aurora-body .movies-grid.mode-adult, body.aurora-body .movies-grid.mode-manga { grid-template-columns: repeat(4,minmax(0,1fr)) !important; } }
@media (min-width: 2100px) { body.aurora-body .movies-grid, body.aurora-body .movies-grid.mode-adult, body.aurora-body .movies-grid.mode-manga { grid-template-columns: repeat(5,minmax(0,1fr)) !important; } }
@media (min-width: 901px) and (max-width: 1199px) { body.aurora-body .movies-grid, body.aurora-body .movies-grid.mode-adult, body.aurora-body .movies-grid.mode-manga { grid-template-columns: repeat(2,minmax(0,1fr)) !important; } .yt-header-right .yt-header-action { display: none !important; } }
@media (max-width: 1024px) {
  .watch-main-stage { grid-template-columns: minmax(0,1fr) !important; padding: 76px 24px 32px !important; }
  .recommendations-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  .reader-header-inner { flex-wrap: wrap; padding: 10px 16px !important; }
  .reader-header .header-left { flex: 1 1 60%; }
  .reader-header .header-center { order: 3; flex: 1 0 100%; justify-content: center; }
}
@media (max-width: 900px) {
  .yt-main-viewport, body.yt-sidebar-collapsed .yt-main-viewport { margin-left: 0 !important; width: 100% !important; }
  .yt-sidebar, body.yt-sidebar-collapsed .yt-sidebar { top: 56px !important; width: 260px !important; max-width: 85vw; z-index: 2200 !important; }
  body.yt-sidebar-collapsed .yt-sidebar-section { display: block !important; padding: 0 !important; }
  body.yt-sidebar-collapsed .yt-sidebar-heading, body.yt-sidebar-collapsed .yt-sidebar-divider, body.yt-sidebar-collapsed .yt-sidebar-footer { display: block !important; }
  body.yt-sidebar-collapsed .yt-sidebar-item { flex-direction: row !important; justify-content: flex-start !important; height: 44px !important; padding: 0 12px !important; gap: 16px !important; }
  body.yt-sidebar-collapsed .yt-sidebar-label { flex: 1; max-width: none !important; text-align: left !important; font-size: 14px !important; }
  .yt-drawer-backdrop { z-index: 2100 !important; }
  body.aurora-body .movies-grid, body.aurora-body .movies-grid.mode-adult, body.aurora-body .movies-grid.mode-manga { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .yt-main-viewport .main-container { padding: 8px 20px 32px !important; }
  .yt-header-right .yt-header-action { display: none !important; }
  .yt-chips-bar { padding: 0 20px !important; }
}
@media (max-width: 650px) {
  header.yt-header.site-header { padding: 0 8px !important; gap: 8px !important; }
  .yt-header-left { gap: 4px !important; }
  .yt-brand-title { font-size: 23px !important; }
  .yt-brand-ext { font-size: 13px !important; }
  .yt-logo-badge { width: 30px !important; height: 24px !important; }
  .yt-header-center { display: none !important; }
  .yt-header-right { margin-left: auto !important; gap: 2px !important; }
  #mobileSearchToggleBtn { display: inline-flex !important; }
  .yt-user-profile-anchor { min-width: 40px !important; padding: 0 !important; }
  .yt-user-avatar { width: 32px !important; height: 32px !important; }
  header.yt-header.mobile-search-active .yt-header-center { display: flex !important; gap: 4px !important; }
  header.yt-header.mobile-search-active .mobile-search-back { display: inline-flex !important; }
  .search-kbd-hint { display: none !important; }
  .yt-search-box { flex: 1; }
  .yt-search-btn { min-width: 44px !important; }
  .yt-chips-bar { top: 56px !important; height: 52px !important; padding: 0 12px !important; }
  .yt-chip { min-height: 40px !important; }
  .yt-main-viewport .main-container { padding: 0 0 calc(var(--video-bottom) + 24px) !important; }
  body.aurora-body .movies-grid, body.aurora-body .movies-grid.mode-adult { grid-template-columns: minmax(0,1fr) !important; gap: 24px !important; padding: 0 !important; }
  body.aurora-body .movies-grid.mode-manga { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 20px 12px !important; padding: 0 12px !important; }
  .card-poster-wrap, .card-poster-wrap.adult-poster-wrap { border-radius: 0 !important; }
  .manga-card .card-poster-wrap { border-radius: 10px !important; }
  .card-info, .yt-card-info { padding: 12px 12px 0 !important; gap: 10px !important; }
  .card-title { font-size: 15px !important; }
  .video-save-button { min-width: 44px; }
  .yt-main-viewport .section-header { padding: 16px 12px !important; }
  .yt-main-viewport .section-title { font-size: 18px !important; }
  .sort-filter-bar { display: flex !important; padding: 8px 12px !important; }
  .sort-btn { min-height: 44px; }
  .home-reels-shelf { margin: 24px 12px !important; }
  .reels-shelf-header { flex-wrap: wrap; gap: 12px; }
  .yt-mobile-bottom-nav { display: flex !important; height: var(--video-bottom) !important; padding: 0 4px env(safe-area-inset-bottom,0px) !important; background: #0f0f0ff6 !important; backdrop-filter: blur(14px); }
  .yt-bottom-tab { min-height: 56px !important; gap: 5px !important; padding: 7px 0 !important; font-size: 11px !important; }
  .yt-bottom-tab i { font-size: 20px !important; }
  .yt-bottom-tab.active { color: #fff !important; }
  body.reels-mode #viewReels { height: calc(100dvh - var(--video-bottom)) !important; }
  body.reels-mode .reels-viewport-container, body.reels-mode .reel-card { height: calc(100dvh - var(--video-bottom)) !important; }
  body.reels-mode .reels-stage-wrap { height: calc(100dvh - var(--video-bottom)) !important; bottom: var(--video-bottom) !important; }
  body.reels-mode .reels-viewport-container { flex: 0 0 auto !important; }
  body.reels-mode .yt-app-layout { padding-top: 0 !important; }
  .toast { bottom: calc(var(--video-bottom) + 12px) !important; max-width: calc(100vw - 24px); }
  .site-footer { padding-bottom: var(--video-bottom) !important; }
  .watch-header-inner { padding: 0 12px !important; gap: 12px !important; }
  .watch-brand, .watch-header-actions { display: none !important; }
  .watch-search-form { display: flex !important; flex: 1; min-width: 0; }
  .watch-search-wrap, .watch-search-input { min-width: 0; width: 100%; }
  .watch-search-input { font-size: 16px !important; }
  .watch-main-stage { padding: 56px 0 24px !important; gap: 24px !important; }
  .theater-screen-wrapper { border-radius: 0 !important; }
  .watch-title { font-size: 18px !important; }
  .watch-meta-deck, .player-control-hud, .watch-tags-box, .downloads-station-card, .community-comments-card, .watch-description { padding-left: 12px !important; padding-right: 12px !important; }
  .player-settings-menu { right: 12px; max-height: min(380px, 65dvh); }
  .watch-description { margin: 12px; }
  .watch-recommendations-column { padding: 0 12px !important; }
  .recommendations-list { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .rec-card-thumb { flex-basis: 42% !important; width: 42% !important; height: auto !important; aspect-ratio: 16/9; }
  .comment-form { gap: 8px; }
  .comment-input { min-width: 0; font-size: 16px; }
  .reader-header-inner { gap: 8px !important; }
  .reader-brand, .brand-divider, .reader-header #fullscreenBtn { display: none !important; }
  .reader-header .header-left { flex-basis: 100%; }
  .reader-header .header-center { order: 2; flex: 1; min-width: 0; }
  .reader-header .header-right { order: 3; gap: 0; }
  .chapter-selector-wrap, .chapter-select { min-width: 0 !important; max-width: 150px; }
  .reader-header .tool-btn, .reader-header .ch-nav-btn { min-width: 44px !important; min-height: 44px !important; padding: 8px !important; }
  .reader-header #fitWidthBtn span { display: none; }
  .reader-body .reader-main { padding: 0 !important; }
  .reader-footer-nav .footer-btn-row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Watch recommendations: normal page scrolling, compact desktop rows, mobile feed. */
.watch-body .watch-main-stage { grid-template-columns: minmax(0, 1fr) 400px !important; }
.watch-body .rec-header { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; padding: 0 !important; font-size: 16px; font-weight: 600; }
.watch-body .rec-catalog-link { font-size: 12px; color: #aaa; }
.rec-filter-row { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 16px; scrollbar-width: none; }
.rec-filter-chip { flex-shrink: 0; border: 0; background: #272727; color: #f1f1f1; padding: 8px 12px; min-height: 36px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.rec-filter-chip.active { background: #f1f1f1; color: #0f0f0f; }
.watch-body .recommendations-list { display: flex !important; flex-direction: column; gap: 10px; max-height: none !important; position: static !important; overflow: visible !important; padding: 0 !important; }
.watch-body .rec-card { display: grid !important; grid-template-columns: minmax(0, 1fr) 28px; gap: 4px !important; align-items: start; position: relative; min-width: 0; }
.rec-card-link { display: grid; grid-template-columns: 168px minmax(0,1fr); gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.watch-body .rec-card-thumb { width: 168px !important; height: 94.5px !important; aspect-ratio: 16/9; background: #242424; border-radius: 8px !important; position: relative; overflow: hidden; }
.watch-body .rec-card-thumb img { width: 100%; height: 100%; object-fit: cover; transform: none !important; }
.watch-body .rec-card-thumb .rec-source-sprite { width: 1000% !important; height: 1000% !important; max-width: none; object-fit: fill; position: absolute; left: -300%; top: -200%; }
.watch-body .rec-card-thumb.no-thumb::after { content: '▶'; position: absolute; inset: 0; display: grid; place-items: center; color: #aaa; }
.watch-body .rec-card-info { min-width: 0; padding: 0 !important; }
.watch-body .rec-card-title { font-family: inherit; font-size: 14px !important; font-weight: 600 !important; line-height: 1.4 !important; margin: 0 0 5px !important; color: #f1f1f1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rec-card-source, .watch-body .rec-card-meta { display: block !important; font-size: 12px !important; line-height: 1.5; color: #aaa; margin: 0; overflow-wrap: anywhere; }
.watch-body .rec-card-duration { bottom: 5px; right: 5px; font-size: 11px; padding: 2px 4px; background: #000c; border-radius: 4px; border: 0; }
.rec-more-button { width: 28px; min-width: 28px; height: 36px; min-height: 36px; border: 0; border-radius: 50%; background: transparent; color: #ddd; font-size: 25px; line-height: 1; cursor: pointer; }
.rec-more-button:hover, .rec-more-button[aria-expanded="true"] { background: #ffffff18; }
.rec-actions-menu { position: fixed; z-index: 7000; width: 220px; padding: 6px 0; background: #282828; color: #fff; border: 1px solid #444; box-shadow: 0 6px 24px #0008; border-radius: 10px; }
.rec-actions-menu button { display: block; width: 100%; min-height: 44px; padding: 10px 16px; border: 0; background: transparent; color: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.rec-actions-menu button:hover { background: #ffffff18; }
.rec-status { color: #aaa; font-size: 13px; padding: 16px 0; }
.rec-status:empty { display: none; }
.rec-status button, .rec-load-more { min-height: 44px; border: 1px solid #3e3e3e; border-radius: 22px; padding: 8px 18px; background: transparent; color: #70b8ff; cursor: pointer; }
.rec-load-more { width: 100%; margin-top: 16px; }
.rec-load-more[hidden] { display: none !important; }
.rec-loading-card { height: 95px; border-radius: 8px; background: linear-gradient(90deg,#222 25%,#303030 50%,#222 75%); background-size: 200% 100%; animation: video-skeleton 1.5s linear infinite; }
@media (max-width: 1300px) and (min-width: 1101px) { .watch-body .watch-main-stage { grid-template-columns: minmax(0,1fr) 360px !important; } .rec-card-link { grid-template-columns: 150px minmax(0,1fr); } .watch-body .rec-card-thumb { width: 150px !important; height: 84.375px !important; } }
/* Below the player, recommendations use the entire available width. */
@media (max-width: 1100px) {
  .watch-body .watch-main-stage { grid-template-columns: minmax(0,1fr) !important; }
  .watch-body .watch-recommendations-column { width: 100% !important; max-width: none !important; }
  .watch-body .recommendations-list { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px 16px !important; align-items: start; }
  .watch-body .rec-card { display: block !important; container-type: inline-size; }
  .watch-body .rec-card-link { display: block; width: 100%; }
  .watch-body .rec-card-thumb { width: 100% !important; height: auto !important; aspect-ratio: 16/9; }
  .watch-body .rec-card-info { padding: 10px 32px 0 0 !important; }
  .watch-body .rec-more-button { position: absolute; top: calc(56.25cqw + 6px); bottom: auto; right: 0; }
}
@media (min-width: 651px) and (max-width: 899px) {
  .watch-body .recommendations-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 650px) {
  .watch-body .watch-recommendations-column { padding: 0 !important; }
  .watch-body .rec-header { padding: 0 12px !important; }
  .rec-filter-row { padding: 0 12px 14px; }
  .rec-filter-chip { min-height: 44px; }
  .watch-body .recommendations-list { grid-template-columns: minmax(0,1fr); gap: 24px !important; }
  .watch-body .rec-card { display: block !important; }
  .rec-card-link { display: block; }
  .watch-body .rec-card-thumb { width: 100% !important; height: auto !important; border-radius: 0 !important; }
  .watch-body .rec-card-info { padding: 12px 52px 0 12px !important; }
  .watch-body .rec-card-title { font-size: 15px !important; }
  .watch-body .rec-more-button { position: absolute; top: calc(56.25cqw + 8px); bottom: auto; right: 4px; width: 44px; min-width: 44px; min-height: 44px; height: 44px; }
  .rec-status, .rec-load-more { margin-left: 12px; margin-right: 12px; width: calc(100% - 24px); }
}
