/* Keep tool dialogs inside the viewport, independent of page scroll and the theme bar. */
html[data-yz-theme] dialog#yz-mobility-dialog,html[data-yz-theme] dialog#yz-workouts-dialog{position:fixed!important;inset:16px!important;margin:auto!important;width:min(1200px,calc(100% - 32px))!important;max-width:calc(100% - 32px)!important;height:calc(100dvh - 32px)!important;max-height:calc(100dvh - 32px)!important;padding:0!important;overflow:hidden!important}
html[data-yz-theme] dialog#yz-mobility-dialog[open],html[data-yz-theme] dialog#yz-workouts-dialog[open]{display:flex!important;flex-direction:column!important}
html[data-yz-theme] #yz-mobility-dialog>.yz-appearance-bar,html[data-yz-theme] #yz-workouts-dialog>.yz-appearance-bar{position:relative!important;inset:auto!important;flex:0 0 52px!important;height:52px!important;min-height:52px!important;margin:0!important;padding:6px 16px!important;border-radius:0!important}
#yz-mobility-dialog>header,#yz-workouts-dialog>header{flex:0 0 72px}
#yz-mobility-dialog>iframe,#yz-workouts-dialog>iframe{flex:1 1 auto;height:auto;min-height:0}
html[data-yz-theme] #yz-portal dialog.yz-hrv-dialog{position:fixed!important;inset:16px!important;margin:auto!important;max-height:calc(100dvh - 32px)!important;max-width:calc(100% - 32px)!important;box-sizing:border-box!important;overscroll-behavior:contain}
#yz-portal .yz-hrv-dialog>.yz-hrv-top{position:sticky;top:0;z-index:5;background:var(--glass-dialog,#172025);padding:12px 0}
@media(max-width:600px){html[data-yz-theme] dialog#yz-mobility-dialog,html[data-yz-theme] dialog#yz-workouts-dialog{inset:0!important;width:100%!important;max-width:100%!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important;padding-top:env(safe-area-inset-top)!important;padding-bottom:env(safe-area-inset-bottom)!important}}

html[data-yz-theme] #yz-portal dialog.yz-hrv-dialog.yz-hrv-shell{height:calc(100dvh - 32px)!important;padding:0!important;overflow:hidden!important}
html[data-yz-theme] #yz-portal dialog.yz-hrv-dialog.yz-hrv-shell[open]{display:flex;flex-direction:column}
html[data-yz-theme] .yz-hrv-dialog.yz-hrv-shell>.yz-appearance-bar{position:relative!important;inset:auto!important;flex:0 0 52px!important;min-height:52px!important;height:52px!important;margin:0!important;padding:6px 16px!important;border-radius:0!important}
#yz-portal .yz-hrv-dialog.yz-hrv-shell>.yz-hrv-top{position:relative;flex:0 0 auto;margin:0!important;padding:12px 16px;gap:8px}
#yz-portal .yz-hrv-scroll{min-height:0;overflow:auto;overscroll-behavior:contain;padding:16px;flex:1 1 auto}

/* V37: the entire test workflow uses the same fixed header geometry as Mobility. */
html[data-yz-theme] #yz-portal dialog.yz-hrv-dialog.yz-hrv-shell{width:min(1200px,calc(100% - 32px))!important}
#yz-portal .yz-hrv-dialog.yz-hrv-shell>.yz-hrv-top{height:72px;flex:0 0 72px;flex-wrap:nowrap;align-items:center!important;justify-content:space-between;box-sizing:border-box;padding:12px 20px;border-bottom:1px solid #ffffff26}
#yz-portal .yz-hrv-dialog.yz-hrv-shell>.yz-hrv-top>strong{font:600 16px/1.4 Manrope,sans-serif;color:inherit}
#yz-portal .yz-hrv-dialog.yz-hrv-shell>.yz-hrv-top>button{min-height:48px;flex-shrink:0;padding:12px 16px;font:600 12px/1.45 Manrope,sans-serif!important}
@media(max-width:600px){html[data-yz-theme] #yz-portal dialog.yz-hrv-dialog.yz-hrv-shell{inset:0!important;width:100%!important;max-width:100%!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important;padding-top:env(safe-area-inset-top)!important;padding-bottom:env(safe-area-inset-bottom)!important}#yz-portal .yz-hrv-dialog.yz-hrv-shell>.yz-hrv-top{padding:12px 16px}}
