/* Neutral interface accents; artwork and category flags deliberately excluded. */
html[data-theme=dark]{--cvb-control-bg:#202020;--cvb-control-ink:#eee;--cvb-control-line:#999;--cvb-control-hover:#3d3d3d;--cvb-control-active:#ccc;--cvb-control-active-ink:#171717;--cvb-control-focus:#eee}
html[data-theme=light]{--cvb-control-bg:#f5f5f5;--cvb-control-ink:#292929;--cvb-control-line:#999;--cvb-control-hover:#dedede;--cvb-control-active:#666;--cvb-control-active-ink:#fff;--cvb-control-focus:#555}
html[data-theme=dark] body button:not(#filter-panel button),
html[data-theme] body :is(#pan-mode,#orbit-mode,#tilt-mode,#rotate-mode,#zoom-mode,#rotate-left,#rotate-right,#zoom-in,#zoom-out){background:var(--cvb-control-bg)!important;color:var(--cvb-control-ink)!important;border-color:var(--cvb-control-line)!important;box-shadow:none!important}
html[data-theme=dark] body button:not(#filter-panel button):not(:disabled):hover,
html[data-theme] body :is(#pan-mode,#orbit-mode,#tilt-mode,#rotate-mode,#zoom-mode,#rotate-left,#rotate-right,#zoom-in,#zoom-out):not(:disabled):hover{background:var(--cvb-control-hover)!important;color:var(--cvb-control-ink)!important;border-color:var(--cvb-control-focus)!important}
html[data-theme=dark] body button:not(#filter-panel button):not(:disabled):is([aria-pressed=true],[aria-current=page],[data-holding=true],:active),
html[data-theme] body :is(#pan-mode,#orbit-mode,#tilt-mode,#rotate-mode,#zoom-mode,#rotate-left,#rotate-right,#zoom-in,#zoom-out):not(:disabled):is([aria-pressed=true],[data-holding=true],:active){background:var(--cvb-control-active)!important;color:var(--cvb-control-active-ink)!important;border-color:var(--cvb-control-focus)!important;box-shadow:inset 0 -2px 0 currentColor!important}
html[data-theme=dark] body button:not(#filter-panel button):focus-visible,
html[data-theme] body :is(#pan-mode,#orbit-mode,#tilt-mode,#rotate-mode,#zoom-mode,#rotate-left,#rotate-right,#zoom-in,#zoom-out):focus-visible{outline:2px solid var(--cvb-control-focus)!important;outline-offset:3px}
html[data-theme=dark] body input{accent-color:#bbb!important}
html[data-theme=dark] body input:focus-visible{outline-color:#ddd!important}
html[data-theme=dark] :is(#media-error,#binding-message){color:#ccc}
/* Preserve the established fullscreen white-outline / grey-active convention. */
html[data-theme=dark].immersive body .immersive-controls button{background:#454545!important;color:#fff!important;border-color:#fff!important}
html[data-theme=dark].immersive body .immersive-controls button:not(:disabled):hover{background:#585858!important}
html[data-theme=dark].immersive body .immersive-controls button:not(:disabled):is([aria-pressed=true],[aria-current=page],:active){background:#707070!important;color:#fff!important;box-shadow:inset 0 -3px 0 #fff!important}

/* Phone panels inherit a light paper fallback otherwise; keep dark controls legible. */
html[data-theme=dark].phone-layout body :is(#image-viewer-footer,#phone-viewer-bar,#phone-browse-sheet,#phone-search-dialog){background:#161616!important;color:#eee}

/* Global selected/active greys; preserve category hues and ordinary backgrounds. */
html[data-theme=light] body button:not(#filter-panel button):not(:disabled):is([aria-pressed=true],[aria-current=page],[data-holding=true],:active){background:#666!important;color:#fff!important;border-color:#666!important;box-shadow:inset 0 -2px 0 #ddd!important}
html[data-theme] body #full-view #full-related-toggle[aria-pressed=true]{background:var(--cvb-control-active)!important;color:var(--cvb-control-active-ink)!important;border-color:var(--cvb-control-focus)!important}
html[data-theme] body #full-view #full-related .related-thumb[aria-pressed=true]{outline-color:#666!important;background:#666!important;box-shadow:inset 0 0 0 5px #fff!important}
html[data-theme=dark] body #full-view #full-related .related-thumb[aria-pressed=true]{outline-color:#ccc!important;background:#ccc!important;box-shadow:inset 0 0 0 5px #333!important}
html[data-theme].immersive body :is(#full-view .immersive-controls,.immersive-controls) button:not(:disabled):is([aria-pressed=true],[aria-current=page],:active){background:#707070!important;color:#fff!important;border-color:#fff!important;box-shadow:inset 0 -3px 0 #fff!important}
