/* Shared fullscreen surface; inline player styling is unchanged. */
.orientation-fullscreen .fullscreen-hud[hidden] { display: none; }
.orientation-fullscreen .fullscreen-hud {
  --hud-ink: var(--text, #fff);
  position: absolute; z-index: 20; right: max(12px, env(safe-area-inset-right));
  bottom: max(8px, env(safe-area-inset-bottom)); left: max(12px, env(safe-area-inset-left));
  display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 4px 2px 2px;
  color: #fff; background: linear-gradient(to bottom, transparent, rgb(0 0 0 / .45));
  opacity: 1; transition: opacity .22s ease;
}
.fullscreen-top { display: flex; align-items: center; justify-content: space-between; min-height: 38px; }
.fullscreen-top .fullscreen-title { min-width: 0; max-width: calc(100% - 52px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; font-weight: 500; color: #fff; text-shadow: 0 1px 5px #000; }
.fullscreen-controls { display: flex; align-items: center; gap: 6px; }
.fullscreen-top button { width: 38px; min-width: 38px; height: 38px; min-height: 38px; }
.orientation-fullscreen .fullscreen-hud.hud-hidden { opacity: 0; pointer-events: none; }
.fullscreen-hud button {
  display: grid; place-items: center; flex: none;
  width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: transparent;
  color: var(--hud-ink, #fff); font: inherit; cursor: pointer;
  filter: drop-shadow(0 1px 3px rgb(0 0 0 / .8));
  -webkit-tap-highlight-color: transparent;
}
.fullscreen-hud button:hover { background: rgb(255 255 255 / .12); }
.fullscreen-hud button:active { transform: scale(.94); }
.fullscreen-hud button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fullscreen-hud button .fill { fill: currentColor; stroke: none; }
.fullscreen-hud button:focus-visible { outline: 2px solid var(--accent, #fff); outline-offset: 2px; }
.fullscreen-hud input { min-width: 40px; min-height: 18px; height: 18px; flex: 1; margin: 0 4px; accent-color: var(--accent, #fff); touch-action: none; appearance: none; background: transparent; }
.fullscreen-hud input::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(to right, var(--accent, #fff) 0 var(--seek-progress, 0%), rgb(255 255 255 / .55) var(--seek-progress, 0%) 100%); }
.fullscreen-hud input::-webkit-slider-thumb { appearance: none; width: 9px; height: 9px; margin-top: -3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #000; }
.fullscreen-hud input:active::-webkit-slider-runnable-track { height: 5px; }
.fullscreen-hud input::-moz-range-track { height: 3px; border-radius: 2px; background: rgb(255 255 255 / .55); }
.fullscreen-hud input::-moz-range-progress { height: 3px; background: var(--accent, #fff); }
.fullscreen-hud input::-moz-range-thumb { width: 9px; height: 9px; border: 0; border-radius: 50%; background: #fff; }
.player-stage.orientation-fullscreen { background: #000; }
.player-stage.orientation-overlay {
  position: fixed !important; z-index: 10000 !important; inset: 0 !important;
  width: 100dvw !important; height: 100dvh !important;
  min-width: 0 !important; min-height: 0 !important;
  max-width: none !important; max-height: none !important;
  aspect-ratio: auto !important; margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
}
.player-stage.orientation-overlay[data-fullscreen-rotation="90"],
.player-stage.orientation-overlay[data-fullscreen-rotation="-90"] {
  inset: auto !important; left: 50% !important; top: 50% !important;
  width: 100dvh !important; height: 100dvw !important;
  transform: translate(-50%, -50%) rotate(90deg) !important;
}
.player-stage.orientation-overlay[data-fullscreen-rotation="-90"] { transform: translate(-50%, -50%) rotate(-90deg) !important; }
.orientation-fullscreen video {
  flex: none !important; width: 100% !important; height: 100% !important;
  max-width: none !important; max-height: none !important; object-fit: cover;
}
.orientation-fullscreen[data-fullscreen-fit="fit"] video { object-fit: contain; }
.orientation-fullscreen[data-fullscreen-fit="fill"] video { object-fit: cover; }
.orientation-fullscreen #stgOverlay { display: none !important; }
.orientation-overlay[data-fullscreen-rotation="90"] .fullscreen-hud {
  bottom: max(12px, env(safe-area-inset-left)); left: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-bottom));
}
.orientation-overlay[data-fullscreen-rotation="-90"] .fullscreen-hud {
  bottom: max(12px, env(safe-area-inset-right)); left: max(12px, env(safe-area-inset-bottom)); right: max(12px, env(safe-area-inset-top));
}
@media (max-width: 460px) {
  .orientation-fullscreen .fullscreen-hud { gap: 2px; padding: 4px 2px 2px; }
  .fullscreen-hud button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
}
/* Raise existing ancestry instead of moving a playing video in WebKit. */
body.landscape-fs .orientation-ancestor { z-index: 10001 !important; transform: none !important; filter: none !important; overflow: visible !important; }
body.landscape-fs { overflow: hidden; }
/* While the app's own fullscreen is up, nothing of the app may show around or over it. */
body.landscape-fs .orientation-ancestor { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; contain: none !important; will-change: auto !important; perspective: none !important; clip-path: none !important; isolation: auto !important; }
body.landscape-fs :is(.topbar, #bottomNav, #miniBar, #sectionRail, #toastContainer, .sheet-backdrop, .f7s-sheet) { visibility: hidden !important; }
body.landscape-fs > .player-stage.orientation-overlay { z-index: 2147483000 !important; }
