/* The unenhanced horizontal list keeps its existing Play controls. */
#video-gallery .video-select-indicator,
#video-gallery .video-gallery-hint {
  display: none;
}

/* Side cards select a film; the current central card plays it. */
#video-gallery.has-video-rotor .video-card:not([data-slot="center"]) .play-button {
  display: none;
}
#video-gallery.has-video-rotor .video-gallery-hint {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

/* A single player is mounted only after Play, beside the poster button. */
#video-gallery .video-inline-host {
  position: absolute;
  inset: 0;
  z-index: 4;
  overflow: hidden;
  border-radius: 22px;
  background: #090909;
}
#video-gallery .video-inline-player {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: inherit;
  background: #090909;
  object-fit: contain;
  touch-action: auto;
}
/* Safari's inline chrome must not overlap the custom controls. Native
   fullscreen keeps its controls attribute and is outside these guards. */
#video-gallery .video-inline-player:not([controls])::-webkit-media-controls { display: none !important; }
#video-gallery .video-inline-player:not([controls])::-webkit-media-controls-enclosure { display: none !important; }
#video-gallery .video-inline-player:not([controls])::-webkit-media-controls-panel { display: none !important; }
#video-gallery .video-inline-player:not([controls])::-webkit-media-controls-start-playback-button { display: none !important; }
#video-gallery .video-inline-player:not([controls])::-webkit-media-controls-overlay-play-button { display: none !important; }
#video-gallery .video-inline-player:not([controls])::-webkit-media-controls-fullscreen-button { display: none !important; }
#video-gallery .video-inline-player:not([controls])::-webkit-media-controls-picture-in-picture-button { display: none !important; }
/* Compact controls keep the film visible in the narrow portrait card. */
#video-gallery .video-inline-controls {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  min-width: 0;
  padding: 10px 8px 6px;
  color: #fff;
  background: linear-gradient(0deg, #000c, #0007 54px, transparent 102px);
  pointer-events: none;
}
#video-gallery .video-inline-progress {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  min-height: 24px;
  pointer-events: auto;
}
#video-gallery .video-inline-progress output {
  min-width: 0;
  color: #fff;
  font-size: 10px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}
#video-gallery .video-inline-seek {
  display: block;
  width: 100%;
  min-width: 0;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  touch-action: none;
  appearance: none;
  -webkit-appearance: none;
}
#video-gallery .video-inline-seek::-webkit-slider-runnable-track {
  height: 3px;
  border: 0;
  border-radius: 3px;
  background: #ffffff73;
}
#video-gallery .video-inline-seek::-webkit-slider-thumb {
  width: 9px;
  height: 9px;
  margin-top: -3px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  -webkit-appearance: none;
}
#video-gallery .video-inline-seek::-moz-range-track {
  height: 3px;
  border: 0;
  border-radius: 3px;
  background: #ffffff73;
}
#video-gallery .video-inline-seek::-moz-range-progress {
  height: 3px;
  border-radius: 3px;
  background: #fff;
}
#video-gallery .video-inline-seek::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}
#video-gallery .video-inline-seek:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
#video-gallery .video-inline-seek:disabled { opacity: .45; cursor: default; }
#video-gallery .video-inline-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: center;
  width: min(100%, 160px);
  min-width: 0;
  pointer-events: auto;
}
#video-gallery .video-inline-control {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: transparent;
  touch-action: manipulation;
}
#video-gallery .video-inline-control .icon { width: 16px; height: 16px; stroke-width: 1.7; }
#video-gallery .video-inline-control:hover { background: #ffffff14; }
#video-gallery .video-inline-control:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
#video-gallery .video-inline-control:disabled { opacity: .45; cursor: default; }
#video-gallery .video-inline-skip-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 6px;
  font-weight: 650;
  line-height: 1;
  pointer-events: none;
}
#video-gallery .video-inline-control[data-inline-action="mute"] {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  border: 1px solid #ffffff6b;
  border-radius: 50%;
  background: #111315a6;
  pointer-events: auto;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
#video-gallery .video-card.is-inline-active > .video-open {
  visibility: hidden;
  pointer-events: none;
}
#video-gallery .video-expand {
  position: absolute;
  z-index: 6;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: transparent;
  box-shadow: none;
  touch-action: manipulation;
}
#video-gallery .video-expand::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  box-sizing: border-box;
  transform: translate(-50%,-50%);
  border: 1px solid #ffffff8c;
  border-radius: 50%;
  background: #111315a6;
  box-shadow: inset 0 1px 1px #ffffff26, 0 2px 9px #0002;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  pointer-events: none;
}
#video-gallery .video-expand .icon { position: relative; z-index: 1; width: 14px; height: 14px; stroke-width: 1.65; }
#video-gallery .video-expand:hover::before { background: #1b1d21d9; }
#video-gallery .video-expand:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
#video-gallery.has-video-rotor .video-card:not([data-slot="center"]) > .video-expand { display: none; }
#video-gallery .video-inline-notice {
  position: absolute;
  z-index: 5;
  right: 10px;
  bottom: 88px;
  left: 10px;
  max-height: min(50%, calc(100% - 150px));
  overflow-y: auto;
  margin: 0;
  padding: 10px 11px;
  border: 1px solid #ffffff38;
  border-radius: 10px;
  color: #fff;
  background: #141517ed;
  font-size: 11px;
  line-height: 1.5;
  text-align: left;
  user-select: text;
}
@media (max-width: 600px) {
  #video-gallery .video-title {
    font-size: clamp(15px, 4.3vw, 18px);
    -webkit-line-clamp: 2;
  }
  #video-gallery .video-inline-host { border-radius: 18px; }
  #video-gallery .video-expand { top: 0; right: 0; }
  #video-gallery .video-expand::before { width: 26px; height: 26px; }
  #video-gallery .video-expand .icon { width: 13px; height: 13px; }
}
@media (max-width: 360px) {
  #video-gallery .video-inline-controls { padding-inline: 6px; }
  #video-gallery .video-inline-progress { gap: 3px; }
  #video-gallery .video-inline-progress output { font-size: 9px; }
}
@media (prefers-reduced-transparency: reduce) {
  #video-gallery .video-expand::before {
    background: #17191b;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  #video-gallery .video-inline-control[data-inline-action="mute"] {
    background: #17191b;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
