/* Shared rhythm and form typography; colors continue to come from the active theme. */
html body dialog :is(button,input,select,textarea){font-family:inherit;letter-spacing:normal}
html body dialog :is(select,textarea){font-size:13px;line-height:1.4}
html body dialog select option{font-family:inherit;font-size:inherit;background:var(--lab-input,#08130e);color:var(--lab-text,#f0faf4)}
html body dialog :is(.account-dialog-inner,.share-dialog-inner,.song-dialog-inner,.business-dialog-inner,.photo-gallery-inner,.heard-search-shell,.heard-diagnostics-shell){padding:20px;gap:12px}
/* Activity has its own reserved slot BEFORE the rightmost close control. */
html body dialog :is(.dialog-head,.home-auth-head,.heard-search-head,.heard-diagnostics-head,.guest-dialog-head){display:grid!important;grid-template-columns:minmax(0,1fr) 16px auto;align-items:start!important;gap:12px;position:relative;padding-inline-end:0!important;margin:0}
html body dialog :is(.dialog-head,.home-auth-head,.heard-search-head,.heard-diagnostics-head,.guest-dialog-head)>:first-child:not(button):not(.heard-cloud-spinner){grid-column:1;grid-row:1;min-width:0;margin-inline-end:0!important;overflow-wrap:anywhere}
html body dialog :is(.dialog-head,.home-auth-head,.heard-search-head,.heard-diagnostics-head,.guest-dialog-head)>button{grid-column:3;grid-row:1;align-self:start!important;justify-self:end;margin:0!important}
html body dialog .dialog-head>.heard-cloud-spinner{grid-column:2;grid-row:1;position:static;align-self:start;margin:9px 0 0;box-sizing:border-box}
html body dialog .dialog-head>.heard-cloud-spinner[hidden]{display:inline-block!important;visibility:hidden}
html body dialog :is(.dialog-head,.home-auth-head,.heard-search-head,.heard-diagnostics-head,.guest-dialog-head) h2{margin-top:0}
/* Modal dialogs have both vertical insets set by the browser; auto stretches. */
#accountDialog{height:fit-content;min-height:0;max-height:calc(100vh - 28px);max-height:calc(100dvh - 28px);overflow-y:auto}
#accountDialog .account-dialog-inner>[hidden]{display:none!important}
#accountDialog .account-dialog-inner{gap:12px;align-content:start}
#accountDialog :is(form,section,#signedInPanel){margin:0;min-height:0}
#accountDialog form{gap:12px;padding:0}
#accountDialog p{margin:0;line-height:1.5}
html body :is(#accountStatus,#visitorAuthStatus,#shareStatus):empty{display:none}
#accountDialog .wizard-actions{margin-top:2px}
#visitorAuthForm{padding:0;gap:10px}
#visitorAuthForm label{margin-bottom:0}
#visitorAuthForm p{margin:0;line-height:1.5}
#visitorAuthForm .home-auth-link{padding:5px 0;min-height:30px;text-align:left}
#visitorAuthTabs{margin:10px 0 4px}
#visitorAuthForm>p:last-child{margin-top:2px;font-size:11px}
#settingsDialog #settingsForm{padding:20px;gap:16px}
#settingsDialog .configuration-section-option{font-family:inherit;font-size:12px;font-weight:600;line-height:1.4;white-space:normal}
#settingsDialog #settingsForm .configuration-section-content label:not(.check):not(.detection-preset){display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 14px}
#settingsDialog #settingsForm .settings-value-field{display:flex;align-items:center;justify-content:flex-end;justify-self:end;gap:8px;white-space:nowrap}
#settingsDialog #settingsForm .settings-unit{font-size:12px;font-weight:400;color:var(--lab-muted,#a3bbad);text-align:right}
#settingsDialog #settingsForm input[type=number]{width:112px;min-width:0;min-height:40px;margin:0;text-align:right;font-family:inherit;font-size:14px;line-height:1.4}
#settingsDialog #settingsForm label>em{grid-column:1/-1;line-height:1.5}
#settingsDialog #settingsForm .detection-adjustments{grid-template-columns:1fr;gap:12px}
#settingsDialog #settingsForm .detection-preset select{font-family:inherit;font-size:13px;font-weight:400;line-height:1.4}
#settingsDialog #settingsForm .detection-preset option{background:var(--lab-input,#08130e);color:var(--lab-text,#f0faf4)}
#settingsDialog #settingsForm .settings-pane>label{margin-bottom:12px}
#settingsDialog #settingsForm .settings-pane>label:last-of-type{margin-bottom:0}
#visitorHome .home-brand small{pointer-events:none}
html[data-home-state]:not([data-home-state=member]):not([data-home-state=guest]) #themeLabButton,
html[data-home-state]:not([data-home-state=member]):not([data-home-state=guest]) #themeLabControl{display:none!important}
@media(max-width:600px){
  html body dialog :is(.account-dialog-inner,.share-dialog-inner,.song-dialog-inner,.business-dialog-inner,.photo-gallery-inner,.heard-search-shell,.heard-diagnostics-shell){padding:16px}
  #settingsDialog #settingsForm{padding:16px;gap:12px}
  #settingsDialog .configuration-layout{grid-template-columns:minmax(0,1fr);gap:12px;min-height:0}
  #settingsDialog .configuration-section-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
  #settingsDialog .configuration-section-option{font-size:12px;text-overflow:clip;overflow:visible}
  #settingsDialog #settingsForm>.dialog-actions,#settingsDialog #settingsForm>.settings-note{margin-left:0}
  #settingsDialog #settingsForm .configuration-section-content label:not(.check):not(.detection-preset){grid-template-columns:minmax(0,1fr) auto;gap:7px}
  #settingsDialog #settingsForm input[type=number]{width:88px}
}
@media(pointer:coarse){html body dialog :is(input,select,textarea){font-size:16px!important}}

html body #photoDialog .photo-dialog-inner{padding:64px 16px 16px}html body #photoDialog #closePhotoDialog{position:absolute!important;top:16px;right:16px;z-index:3}

#settingsDialog #settingsForm label{font-size:12px;font-weight:600;line-height:1.4}#settingsDialog #settingsForm label em,#settingsDialog #settingsForm .settings-note{font-size:11px;line-height:1.5}

/* Use the same geometry and fonts for macOS Safari, Firefox and Chromium. */
html body :is(button,input,select,textarea){box-sizing:border-box;font-family:inherit}
html body dialog[open]{height:fit-content;max-height:calc(100vh - 28px);max-height:calc(100dvh - 28px);overflow-y:auto;overscroll-behavior:contain}
html body dialog :is(input,select,textarea){min-width:0;max-width:100%}
html body dialog select{appearance:auto;-webkit-appearance:menulist;font:inherit;min-height:40px}
html body dialog input:is([type=email],[type=password],[type=text],[type=number]){appearance:none;-webkit-appearance:none;box-shadow:none}
html body dialog input[type=checkbox],html body dialog input[type=radio]{appearance:auto;-webkit-appearance:auto;accent-color:var(--lab-accent,#28714c)}
html body dialog::backdrop{ -webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px) }
html body :is(.dialog-head,.song-heading,.row-meta,.wizard-actions,.home-actions)>*{min-width:0}
html body #controller #status.error{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere}

#accountDialog #signOutBtn{margin-block-start:16px}
/* Also overrides older hosted styles in the native WebView. */
#customShareSongs .custom-share-song:focus-within{outline:none}
