/* Keep the header outside the scrolling form, including while the keyboard is open. */
html body.mm-app[data-mm-theme] #mm-profile {
  box-sizing:border-box;width:min(560px,calc(100vw - 24px));max-width:calc(100vw - 24px);
  height:min(880px,calc(var(--mm-height,100dvh) - 24px));max-height:calc(var(--mm-height,100dvh) - 24px);
  margin:auto;padding:0;overflow:hidden;scrollbar-gutter:auto;border:1px solid var(--glass-edge);border-radius:28px;
  background:var(--glass-sheen),var(--mm-bg);color:var(--mm-text);box-shadow:inset 0 1px 0 var(--glass-highlight),0 24px 80px #07112640;
}
html body.mm-app[data-mm-theme] #mm-profile[open] {display:flex;flex-direction:column}
html body.mm-app[data-mm-theme] #mm-profile>.mm-dialog-head {
  position:relative;inset:auto;flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;
  min-height:76px;box-sizing:border-box;gap:12px;padding:14px 18px;border-bottom:1px solid var(--glass-edge);
  background:var(--glass-sheen),var(--glass-fill);box-shadow:inset 0 1px 0 var(--glass-highlight);
  backdrop-filter:var(--glass-blur);-webkit-backdrop-filter:var(--glass-blur);
}
html body.mm-app[data-mm-theme] #mm-profile-title {margin:0;font-size:23px;line-height:1.25;letter-spacing:-.65px}
html body.mm-app[data-mm-theme] #mm-profile .mm-profile-kicker {display:block;color:var(--mm-green);font-size:9px;line-height:1.4;letter-spacing:2px;font-weight:700;margin-bottom:3px}
html body.mm-app[data-mm-theme] #mm-profile>.mm-dialog-head .mm-icon {width:44px;height:44px;padding:11px;background:var(--mm-soft);border:1px solid var(--glass-edge);border-radius:50%;color:var(--mm-text)}
html body.mm-app[data-mm-theme] #mm-profile-form {flex:1;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;scroll-padding-block:16px;padding:18px 18px max(22px,env(safe-area-inset-bottom));box-sizing:border-box}
html body.mm-app[data-mm-theme] #mm-profile-preview {margin:0;width:100%;box-sizing:border-box;border-radius:22px}
html body.mm-app[data-mm-theme] #mm-profile .mm-profile-preview-caption {text-align:center;margin:8px 0 18px}
html body.mm-app[data-mm-theme] #mm-profile .mm-profile-section {padding:16px;margin:16px 0;border:1px solid var(--glass-edge);border-radius:22px;background:var(--glass-sheen),var(--mm-surface);box-shadow:inset 0 1px 0 var(--glass-highlight)}
html body.mm-app[data-mm-theme] #mm-profile .mm-profile-section>h3 {margin:0 0 16px;font-size:15px;line-height:1.4;font-weight:700}
html body.mm-app[data-mm-theme] #mm-profile .mm-profile-field {margin:0 0 16px;gap:7px;font-size:13px;line-height:1.5}
html body.mm-app[data-mm-theme] #mm-profile .mm-profile-field:last-child {margin-bottom:0}
html body.mm-app[data-mm-theme] #mm-profile .mm-profile-field :is(input,textarea) {box-sizing:border-box;min-width:0;max-width:100%;min-height:48px;padding:12px;font-size:16px;line-height:1.5;border:1px solid var(--mm-line);border-radius:13px;background:var(--mm-bg);color:var(--mm-text)}
html body.mm-app[data-mm-theme] #mm-profile .mm-profile-field textarea {min-height:84px}
html body.mm-app[data-mm-theme] #mm-profile .mm-profile-handle-field {margin-bottom:0}
html body.mm-app[data-mm-theme] #mm-profile .mm-field-help {font-size:12px;line-height:1.6;color:var(--mm-muted);opacity:1;overflow-wrap:anywhere}
html body.mm-app[data-mm-theme] #mm-profile-handle-help {margin:7px 0 16px}
html body.mm-app[data-mm-theme] #mm-profile .mm-profile-error {font-size:12px;line-height:1.5;color:#ac2941;margin:8px 0 16px}
html body.mm-app[data-mm-theme=dark] #mm-profile .mm-profile-error {color:#ff9ca6}
html body.mm-app[data-mm-theme] #mm-profile-handle[aria-invalid=true] {border-color:#c34d61}
html body.mm-app[data-mm-theme] #mm-profile .mm-profile-photo {display:flex;justify-content:flex-start;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 18px}
html body.mm-app[data-mm-theme] #mm-profile .mm-profile-photo .mm-avatar {width:48px;height:48px;flex:0 0 48px;font-size:18px;overflow:hidden}
html body.mm-app[data-mm-theme] #mm-profile :is(.mm-photo-picker,.wcpa-cover-actions>button,#mm-profile-remove) {box-sizing:border-box;position:relative;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:10px 12px;border:1px solid var(--glass-edge);border-radius:14px;background:var(--glass-sheen),var(--mm-soft);color:var(--mm-text);font-size:12px;font-weight:600;line-height:1.4;text-align:center;text-decoration:none;cursor:pointer;overflow:hidden}
html body.mm-app[data-mm-theme] #mm-profile .mm-photo-picker:focus-within {outline:2px solid var(--mm-green);outline-offset:2px}
html body.mm-app[data-mm-theme] #mm-profile .mm-photo-picker input {position:absolute;inset:0;width:100%;height:100%;max-width:none;opacity:0;cursor:pointer}
html body.mm-app[data-mm-theme] #mm-profile .wcpa-cover-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:16px}
html body.mm-app[data-mm-theme] #mm-profile .mm-profile-color-field {display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;margin:0}
html body.mm-app[data-mm-theme] #mm-profile .mm-profile-color-field>span {min-width:0}
html body.mm-app[data-mm-theme] #mm-profile .mm-profile-color-field small {display:block;margin-top:3px;font-size:11px;font-weight:400;color:var(--mm-muted)}
html body.mm-app[data-mm-theme] #mm-profile #mm-profile-color {box-sizing:border-box;flex:0 0 56px;width:56px;height:48px;min-height:48px;padding:5px;border:1px solid var(--mm-line);border-radius:14px;background:var(--mm-bg);cursor:pointer}
html body.mm-app[data-mm-theme] #mm-profile-color::-webkit-color-swatch-wrapper {padding:0}
html body.mm-app[data-mm-theme] #mm-profile-color::-webkit-color-swatch {border:0;border-radius:9px}
html body.mm-app[data-mm-theme] #mm-profile-color::-moz-color-swatch {border:0;border-radius:9px}
html body.mm-app[data-mm-theme] #mm-profile .wcpa-profile-share {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:18px 0}
html body.mm-app[data-mm-theme] #mm-profile .wcpa-profile-share button {box-sizing:border-box;min-width:0;min-height:48px;padding:10px 6px;border:1px solid var(--glass-edge);border-radius:14px;background:var(--glass-sheen),var(--mm-surface);color:var(--mm-text);font-size:11px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
html body.mm-app[data-mm-theme] #mm-profile-save {width:100%;min-height:50px;border-radius:16px;font-size:15px}
html body.mm-app[data-mm-theme] #mm-profile [hidden] {display:none!important}
html body.mm-app[data-mm-theme] #mm-profile :is(button,input,textarea):focus-visible {outline:2px solid var(--mm-green);outline-offset:2px}
@media(max-width:700px) {
  html body.mm-app[data-mm-theme] #mm-profile {width:calc(100% - 16px)!important;max-width:calc(100vw - 16px);height:calc(var(--mm-height,100dvh) - 16px);max-height:calc(var(--mm-height,100dvh) - 16px);margin:auto;border-radius:25px}
  html body.mm-app[data-mm-theme][data-mm-keyboard=true] #mm-profile {position:fixed;top:calc(var(--mm-viewport-top,0px) + 8px);bottom:auto;margin-block:0}
  html body.mm-app[data-mm-theme] #mm-profile-form {padding:16px 14px max(22px,env(safe-area-inset-bottom))}
  html body.mm-app[data-mm-theme] #mm-profile .mm-profile-section {padding:14px}
}
@media(prefers-reduced-transparency:reduce),(prefers-contrast:more),(prefers-reduced-motion:reduce) {
  html body.mm-app[data-mm-theme] #mm-profile>.mm-dialog-head {background:var(--mm-surface);backdrop-filter:none;-webkit-backdrop-filter:none}
}
