/* Media controls form one bottom dock. The stage keeps its own scroll area;
   the dock never covers image content or annotation targets. */
.mv-fullscreen-layer .mv-media-pane{position:relative;display:flex;flex-direction:column;padding-top:64px;min-width:0;min-height:0;container-type:inline-size;container-name:viewer-media}
.mv-media-position{position:absolute;top:24px;left:72px;color:var(--ink3);font-size:13px;font-variant-numeric:tabular-nums}
.mv-fullscreen-layer .mv-media-pane .mv-stage{flex:1;min-height:0;container-type:size;padding:12px 36px 16px}
.mv-fullscreen-layer .mv-viewer .mv-image-frame.mv-fit img,
.mv-fullscreen-layer .mv-viewer:has(.mv-thumbs) .mv-image-frame.mv-fit img,
.mv-fullscreen-layer .mv-viewer .mv-video-frame video,
.mv-fullscreen-layer .mv-viewer:has(.mv-thumbs) .mv-video-frame video{max-height:100cqh;max-width:100cqw}
.mv-fullscreen-layer .mv-thumbs{flex:none}
.mv-media-dock{position:relative;z-index:8;display:flex;flex-direction:column;align-items:center;gap:8px;flex:none;min-width:0;padding:12px 24px 24px}
.mv-media-toolbar{
  --ink:#1f1f1f;--ink2:#525252;--ink3:#646864;--surface:#fff;
  --fill:rgba(20,20,20,.06);--fill2:rgba(20,20,20,.10);
  display:flex;align-items:center;gap:4px;max-width:100%;padding:6px;
  border-radius:999px;background:var(--surface);color:var(--ink);color-scheme:light;
  box-shadow:0 2px 12px #00000012;
}
.mv-media-toolbar button,.mv-media-toolbar .mv-view-controls>summary{display:inline-flex;align-items:center;justify-content:center;flex:none;gap:6px;min-width:40px;height:40px;min-height:40px;margin:0;padding:0 12px;border:0;border-radius:999px;background:transparent;color:var(--ink);font-size:14px;line-height:1.2;white-space:nowrap}
.mv-media-toolbar button:hover:not(:disabled),.mv-media-toolbar .mv-view-controls>summary:hover{background:var(--fill)}
.mv-media-toolbar button:focus-visible,.mv-media-toolbar .mv-view-controls>summary:focus-visible{outline:2px solid var(--blue,#1000ff);outline-offset:2px}
.mv-media-toolbar button:disabled{opacity:.4}
.mv-media-toolbar svg{width:18px;height:18px;flex:none}
.mv-media-toolbar .mv-expand-media{width:40px;padding:0}
.mv-media-toolbar .mv-expand-media[aria-pressed=true] svg{transform:none}
.mv-media-toolbar .mv-annotations-toggle[aria-pressed=false]{color:var(--ink3)}
.mv-media-toolbar .mv-annotations-toggle[aria-pressed=false] svg{opacity:.6}
.mv-toolbar-divider{flex:none;width:1px;height:24px;margin-inline:4px;background:var(--fill2)}
.mv-media-toolbar .mv-annotate{background:var(--ink);color:var(--surface);padding-inline:14px}
.mv-media-toolbar .mv-annotate:hover{background:#383838;color:#fff}
.mv-media-toolbar .mv-annotate.is-active{background:var(--fill2);color:var(--ink)}
.mv-fullscreen-layer .mv-media-toolbar .mv-view-controls>.mv-media-tools{top:auto;bottom:calc(100% + 14px);left:0;right:auto;max-width:calc(100vw - 32px);border-radius:12px;background:#fff;color:#1f1f1f}
.mv-media-toolbar .mv-view-controls>summary>svg:last-child{width:14px;height:14px}
.mv-media-toolbar .mv-view-controls[open]>summary>svg:last-child{transform:rotate(180deg)}
.mv-media-dock .mv-annotate-help{margin:0;padding:0;background:transparent;color:var(--ink2);font-size:13px;line-height:1.5;text-align:center}
.mv-media-toolbar:has(.mv-page-input){flex-wrap:wrap;justify-content:center;border-radius:20px}
.mv-media-toolbar>.mv-media-tools{flex-wrap:wrap;justify-content:center;gap:4px;background:transparent}
.mv-media-toolbar .mv-media-tools .mv-page-input{border-radius:6px}
@media(max-width:760px){
  .mv-fullscreen-layer .mv-media-pane{padding-top:60px}
  .mv-fullscreen-layer .mv-media-pane .mv-stage{padding:8px 16px 12px}
  .mv-media-position{top:24px;left:auto;right:20px}
  .mv-media-dock{padding:8px max(16px,env(safe-area-inset-right)) 16px max(16px,env(safe-area-inset-left))}
  .mv-media-toolbar button,.mv-media-toolbar .mv-view-controls>summary{min-width:44px;min-height:44px;height:44px}
  .mv-media-toolbar .mv-expand-media{width:44px}
  .mv-fullscreen-layer .mv-media-toolbar .mv-view-controls>.mv-media-tools{max-width:calc(100vw - 48px)}
}
@container viewer-media (max-width:400px){
  .mv-media-toolbar{gap:2px}
  .mv-media-toolbar .mv-view-controls>summary{width:44px;padding:0;gap:2px}
  .mv-media-toolbar .mv-view-controls>summary>span{display:none}
  .mv-media-toolbar .mv-annotations-toggle{padding-inline:8px}
  .mv-media-toolbar .mv-annotate{padding-inline:10px;font-size:13px}
  .mv-toolbar-divider{margin-inline:2px}
}
