dialog.video-viewer {
  position: fixed; inset: 0; margin: auto; padding: 0;
  width: min(1440px, 94vw); height: min(850px, 90vh); height: min(850px, 90dvh);
  max-width: none; max-height: none; overflow: hidden;
  background: #090f0d; border: 1px solid #6a7d6c5c; border-radius: 15px;
}
.video-viewer #media { position: absolute; inset: 0; outline: none; touch-action: manipulation; -webkit-touch-callout: none; user-select: none; }
.video-viewer #media video { width: 100%; height: 100%; max-height: none; object-fit: contain; background: #090f0d; pointer-events: none; }
.video-viewer video::-webkit-media-controls { display: none !important; }
.video-viewer .viewerbar {
  position: absolute; inset: 0 0 auto; z-index: 4; padding: 14px 16px 36px;
  background: linear-gradient(#07100de0, #07100d40 75%, transparent); gap: 10px; flex-wrap: nowrap;
  transition: opacity .22s, visibility .22s;
}
.video-viewer .viewer-heading strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-viewer .viewer-heading { flex-basis: auto; }
.video-viewer .viewerbar button { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; border: 1px solid #d9e5da30; color: #f7faf4; background: #1d3028cc; }
.video-viewer #close { width: 44px; height: 44px; }
.video-viewer #media-error { position: absolute; z-index: 5; top: 42%; left: 10%; right: 10%; margin: 0; padding: 15px; border-radius: 10px; text-align: center; background: #192c24ed; }
.video-controls { position: absolute; z-index: 4; inset: auto 0 0; padding: 30px 22px 14px; background: linear-gradient(transparent, #07100dc9 25%, #07100ded); transition: opacity .22s, visibility .22s; }
.video-timeline { display: flex; align-items: center; gap: 12px; font-size: 12px; color: #e1e9de; font-variant-numeric: tabular-nums; }
.video-timeline > span { min-width: 44px; text-align: center; }
#video-seek { flex: 1; min-width: 0; width: 100%; height: 32px; margin: 0; accent-color: #c0d9ba; cursor: pointer; }
.video-buttons { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 1px; }
.video-buttons button, .video-start { display: grid; place-items: center; color: #f3f8ec; background: #ffffff0c; border: 1px solid #d0e0d024; border-radius: 12px; width: 46px; height: 44px; padding: 0; }
.video-buttons button:hover { background: #ffffff20; }
.video-buttons svg { width: 23px; height: 23px; }
.video-buttons svg text { stroke: none; fill: currentColor; font-size: 8px; font-family: inherit; font-weight: 600; }
#video-play { background: #c2dabb; color: #1a3528; border-color: #d9e9d4; width: 54px; }
#video-mute { margin-left: 8px; }
.video-start { position: absolute; z-index: 2; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 72px; height: 72px; border-radius: 50%; background: #1b3028d9; border-color: #edf3e65e; }
.video-start svg { width: 32px; height: 32px; }
.video-busy { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3; background: #1b3028e8; padding: 12px 17px; border: 1px solid #b6c9bb36; border-radius: 12px; color: #e6ede0; font-size: 13px; pointer-events: none; }
.video-viewer.video-controls-hidden { cursor: none; }
.video-viewer.video-controls-hidden .viewerbar, .video-viewer.video-controls-hidden .video-controls { opacity: 0; visibility: hidden; pointer-events: none; }
dialog.video-viewer.video-immersive, dialog.video-viewer.video-fullscreen { inset: 0; margin: 0; width: 100%; height: 100vh; height: 100dvh; border: 0; border-radius: 0; }
.video-immersive .viewerbar, .video-fullscreen .viewerbar { padding-top: max(14px, env(safe-area-inset-top)); padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
.video-immersive .video-controls, .video-fullscreen .video-controls { padding-bottom: max(14px, env(safe-area-inset-bottom)); padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
@media (max-width: 700px), (max-height: 500px) and (pointer: coarse) {
  .video-viewer .viewer-heading strong { font-size: 12px; }
  .video-viewer .viewer-heading > span { font-size: 9px; }
  .video-timeline { gap: 5px; font-size: 11px; }
  .video-timeline > span { min-width: 39px; }
  .video-buttons { gap: 10px; }
}
