.mini-player-expand-preview { display: none; }
#miniPlayerBrowse[hidden] { display: none !important; }
.watch-player-dragging { transform: translateY(var(--watch-drag-y, 0)); user-select: none; -webkit-user-select: none; }
.watch-player-dragging + .mobile-seek .mobile-seek-track { z-index: -1; }
.mini-player-chrome[hidden] { display: none !important; }
.mini-player-closed #watchPlayerFrame { display: none !important; }
.mini-player-browsing #watchPlayerFrame { overflow: hidden; }
.mini-player-browsing:not(.mini-player-expanded) #watchPlayerFrame .vp-status,
.mini-player-child #watchPlayerFrame .vp-status { display: none !important; }
.mini-player-browsing .watch-ambient, .mini-player-child .watch-ambient { display: none; }
html.mini-player-browsing, .mini-player-browsing body { overflow: hidden !important; scrollbar-gutter: auto !important; }
.mini-player-browsing body > * { visibility: hidden; }
.mini-player-browsing .mini-player-ancestor { position: static !important; transform: none !important; filter: none !important; contain: none !important; isolation: auto !important; z-index: auto !important; overflow: visible !important; }
.mini-player-browsing #miniPlayerBrowse { visibility: visible; position: fixed; inset: 0; width: 100%; height: 100%; border: 0; z-index: 10000; background: var(--page-bg, #16171a); }
.mini-player-browsing #watchPlayerFrame { --mini-footer: 42px; visibility: visible; position: fixed !important; inset: auto max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) auto !important; z-index: 10001; display: block; width: min(400px, calc(100vw - 32px)) !important; height: auto !important; max-height: none !important; max-width: none !important; aspect-ratio: 400 / 267 !important; border-radius: 10px; background: #202024; color: #fff; box-shadow: 0 8px 32px #0008; margin: 0 !important; }
.mini-player-browsing #watchPlayerFrame > .plyr,
.mini-player-browsing #watchPlayerFrame > video { position: absolute !important; inset: 0 0 auto !important; width: 100% !important; height: calc(100% - var(--mini-footer)) !important; min-height: 0 !important; }
.mini-player-browsing #watchPlayerFrame video { object-fit: contain !important; background: #000; }
.mini-player-browsing #watchPlayerFrame .plyr__controls,
.mini-player-browsing #watchPlayerFrame .plyr__control--overlaid,
.mini-player-browsing #watchPlayerFrame .plyr__preview-thumb { display: none !important; }
.mini-player-chrome { position: absolute; inset: 0; z-index: 100; pointer-events: none; color: #fff; font-family: Outfit-Medium, sans-serif; }
.mini-player-chrome button { border: 0; color: #fff; cursor: pointer; font: inherit; pointer-events: auto; }
.mini-player-chrome svg { display: block; width: 24px; height: 24px; }
.mini-player-toolbar { position: absolute; inset: 0 0 auto; height: 56px; background: linear-gradient(#0009, transparent);}
.mini-player-toolbar button { position: absolute; top: 4px; display: grid; place-items: center; width: 40px; height: 40px; padding: 8px; background: transparent; border-radius: 12px; }
.mini-player-toolbar button:first-child { left: 4px; }
.mini-player-toolbar button:last-child { right: 4px; }
.mini-player-toolbar button:hover { background: #0008; }
.mini-player-chrome button:focus-visible, .mini-player-seek:focus-visible { outline: 2px solid #f16f01; outline-offset: -2px; }
.mini-player-toggle { position: absolute; top: calc((100% - var(--mini-footer)) / 2); left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 60px; height: 60px; padding: 8px; background: #0004; border-radius: 50%; opacity: 0; transition: opacity 120ms; }
.mini-player-toggle svg { width: 40px; height: 40px; filter: drop-shadow(0 1px 2px #0008); }
.mini-player-chrome.is-paused .mini-player-toggle { opacity: 1; }
@media (min-width: 641px) and (hover: hover) and (pointer: fine) {
  .mini-player-toolbar, .mini-player-time { opacity: 0; }
  #watchPlayerFrame:hover .mini-player-toolbar,
  #watchPlayerFrame:hover .mini-player-time,
  #watchPlayerFrame:focus-within .mini-player-toolbar,
  #watchPlayerFrame:focus-within .mini-player-time { opacity: 1; }
}
.mini-player-browsing #watchPlayerFrame:has(.watch-ad-active) .mini-player-toggle { display: none; }
.mini-player-browsing #watchPlayerFrame:has(.watch-ad-active) .mini-player-expand-preview { display: none; }
.mini-player-title { position: absolute; inset: auto 0 0; width: 100%; height: var(--mini-footer); text-align: left; padding: 0 16px; background: #202024; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px !important; }
.mini-player-time { position: absolute; bottom: calc(var(--mini-footer) + 14px); left: 12px; padding: 2px 4px; border-radius: 3px; background: #0008; font: 12px Roboto-Medium, sans-serif; }
.mini-player-seek { --mini-progress: 0%; appearance: none; -webkit-appearance: none; position: absolute; z-index: 2; left: 0; bottom: calc(var(--mini-footer) - 6px); width: 100%; height: 12px; margin: 0; padding: 0; background: transparent; cursor: pointer; pointer-events: auto; accent-color: #f16f01; touch-action: pan-y; }
.mini-player-seek::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(to right, #f16f01 var(--mini-progress), #777 var(--mini-progress)); }
.mini-player-seek::-moz-range-track { height: 3px; background: linear-gradient(to right, #f16f01 var(--mini-progress), #777 var(--mini-progress)); }
.mini-player-seek::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border: 0; border-radius: 50%; background: #f16f01; margin-top: -4.5px; }
.mini-player-seek::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #f16f01; }
.mini-player-seek:disabled { cursor: default; }
.has-mini-player body { padding-bottom: 290px !important; }
@media (max-width: 640px) {
  /* Keep both the browse document and its player inside the viewport. */
  html.mini-player-browsing, .mini-player-browsing body,
  html.has-mini-player, .has-mini-player body,
  html.mini-player-child, .mini-player-child body {
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-x: clip !important;
    overscroll-behavior-x: none;
  }
  .has-mini-player .channel-tabs { overscroll-behavior-x: contain; }
  .mini-player-browsing #miniPlayerBrowse,
  .mini-player-browsing:not(.mini-player-expanded) #watchPlayerFrame {
    box-sizing: border-box;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  .mini-player-browsing #miniPlayerBrowse { height: 100%; height: 100dvh; }
  #watchPlayerFrame .mini-player-toolbar button.mini-player-ad-skip { top: 17px; bottom: auto; right: 8px; width: auto; height: 36px; padding: 0 10px; display: inline-flex; gap: 4px; }
  #watchPlayerFrame.mini-player-ad-active .mini-player-title, #watchPlayerFrame.mini-player-ad-active .mini-player-time { right: 114px; }
  .mini-player-browsing:not(.mini-player-expanded) #watchPlayerFrame .watch-ad-overlay > button,
  .mini-player-child .watch-ad-overlay > button,
  .mini-player-browsing:not(.mini-player-expanded) #watchPlayerFrame .watch-ad-toolbar,
  .mini-player-child .watch-ad-toolbar { display: none; }
  .mini-player-browsing #watchPlayerFrame { --mini-preview: 90px; inset: auto 0 0 !important; width: 100% !important; padding: 0 !important; border: 0 !important; height: calc(70px + env(safe-area-inset-bottom)) !important; aspect-ratio: auto !important; border-radius: 0; background: #16171a; box-shadow: 0 -1px 0 #ffffff20, 0 -4px 20px #0006; }
  .mini-player-browsing #watchPlayerFrame > .plyr,
  .mini-player-browsing #watchPlayerFrame > video { inset: 9px auto auto 6px !important; width: var(--mini-preview) !important; min-width: 0 !important; max-width: var(--mini-preview) !important; height: 51px !important; overflow: hidden; border-radius: 6px; }
  .mini-player-browsing #watchPlayerFrame .plyr__video-wrapper { width: 100%; min-width: 0; max-width: 100%; }
  .mini-player-toolbar { inset: 0; height: 70px; background: none; margin: 0; }
  .mini-player-toolbar button { top: 13px; width: 40px; height: 44px; padding: 9px; }
  .mini-player-toolbar button:first-child { display: none; }
  .mini-player-toolbar button:last-child { right: 4px; }
  .mini-player-toggle { top: 13px; left: auto; right: 44px; transform: none; opacity: 1; width: 40px; height: 44px; border-radius: 4px; padding: 10px; background: transparent; }
  .mini-player-toggle svg { width: 20px; height: 20px; filter: none; }
  .mini-player-title { top: 12px; left: 104px; right: 88px; bottom: auto; width: auto; height: 21px; padding: 0; display: block; white-space: nowrap; line-height: 21px; font-size: 12px !important; background: transparent; }
  .mini-player-time { display: block; top: 37px; bottom: auto; left: 104px; right: 88px; padding: 0; background: none; color: #ffffffb3; white-space: nowrap; font-size: 11px; line-height: 16px; max-width: fit-content; }
  .mini-player-seek { top: 0; left: 0; bottom: auto; width: 100%; height: 12px; transform: translateY(-5px); }
  .mini-player-seek::-webkit-slider-runnable-track { height: 2px; }
  .mini-player-seek::-moz-range-track { height: 2px; }
  .mini-player-seek::-webkit-slider-thumb { width: 0; height: 0; margin: 0; }
  .mini-player-seek::-moz-range-thumb { width: 0; height: 0; }
  .mini-player-seek:is(:active, :focus-visible)::-webkit-slider-thumb { width: 10px; height: 10px; margin-top: -4px; }
  .mini-player-seek:is(:active, :focus-visible)::-moz-range-thumb { width: 10px; height: 10px; }
  .mini-player-expand-preview { display: block; position: absolute; top: 9px; left: 6px; width: 90px; height: 51px; padding: 0; background: transparent; border-radius: 6px; }
  .has-mini-player body { padding-bottom: calc(86px + env(safe-area-inset-bottom)) !important; }
}
@media (prefers-reduced-motion: reduce) { .mini-player-toggle { transition: none; } }
/* Automatic next videos use an isolated player document, preserving the browse page. */
.mini-player-continuation { position: absolute; inset: 0 0 auto; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; height: calc(100% - var(--mini-footer)); border: 0; background: #000; }
#watchPlayerFrame.mini-player-replaced > .plyr, #watchPlayerFrame.mini-player-replaced > video { display: none !important; }
.mini-player-browsing #watchPlayerFrame.mini-player-ad-active .mini-player-toggle,
.mini-player-browsing #watchPlayerFrame.mini-player-ad-active .mini-player-expand-preview { display: none; }
html.mini-player-child, .mini-player-child body { overflow: hidden !important; }
.mini-player-child body > * { visibility: hidden; }
.mini-player-child .mini-player-ancestor { position: static !important; transform: none !important; filter: none !important; contain: none !important; isolation: auto !important; z-index: auto !important; overflow: visible !important; }
.mini-player-child #watchPlayerFrame { visibility: visible; position: fixed !important; inset: 0 !important; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; min-width: 0 !important; aspect-ratio: auto !important; margin: 0 !important; border-radius: 0 !important; z-index: 10001; }
.mini-player-child #watchPlayerFrame > .plyr { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; min-width: 0 !important; }
.mini-player-child #watchPlayerFrame video { object-fit: contain !important; }
.mini-player-child .plyr__controls, .mini-player-child .plyr__control--overlaid, .mini-player-child .watch-end-screen { display: none !important; }
.mini-player-browsing.mini-player-expanded #watchPlayerFrame { inset: 0 !important; width: 100% !important; height: 100% !important; aspect-ratio: auto !important; border-radius: 0 !important; }
.mini-player-expanded #watchPlayerFrame > .mini-player-continuation { inset: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; }
@media (max-width: 640px) {
  .mini-player-continuation { inset: 9px auto auto 6px; width: var(--mini-preview); height: 51px; border-radius: 6px; }
}
