/* Mobile dialogs: source-style dimensions shared across all five sections.
   Compact dialogs center in the visible viewport; large editors keep their
   accepted full-screen/sheet geometry and use the same header/control tokens. */
html[data-mobile-dialogs]{--md-title:16px;--md-copy:13px;--md-small:12px;--md-radius:17px;--md-gap:12px;--md-panel:#151d23;--md-text:#d4dde2;--md-muted:#a9b4b9;--md-border:#3c4040;--md-width:410px;--md-vv-top:0px;--md-vv-height:100dvh}
html[data-mobile-dialogs] body:is([data-my-theme="theme2"],[data-ui-theme="theme2"]){--md-panel:#111e20;--md-border:#354b48}
html[data-mobile-dialogs] body:is([data-my-theme="theme3"],[data-ui-theme="theme3"]){--md-panel:#151e29;--md-border:#3a4658}
html[data-mobile-dialogs][data-account-theme="theme2"]{--md-panel:#111e20;--md-border:#354b48}
html[data-mobile-dialogs][data-account-theme="theme3"]{--md-panel:#151e29;--md-border:#3a4658}
html[data-mobile-dialogs] body .md-panel,html[data-mobile-dialogs] dialog.fc-shared-dialog[data-platform="mobile"]{box-sizing:border-box!important;border:1px solid var(--md-border)!important;border-radius:var(--md-radius)!important;background:var(--md-panel)!important;color:var(--md-text)!important;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif!important;font-size:var(--md-copy)!important;line-height:1.65!important;box-shadow:0 20px 60px #0007!important}
html[data-mobile-dialogs] body .md-compact{position:fixed!important;left:50%!important;right:auto!important;top:calc(var(--md-vv-top) + var(--md-vv-height)/2)!important;bottom:auto!important;width:min(var(--md-width),calc(100vw - 32px))!important;height:auto!important;max-height:calc(var(--md-vv-height) - 32px)!important;transform:translate(-50%,-50%)!important;transition:opacity .15s ease!important;overflow:auto!important;z-index:100300!important}
html[data-mobile-dialogs] body .md-compact[aria-hidden="true"]{visibility:hidden!important;pointer-events:none!important}
html[data-mobile-dialogs] body .md-panel:is(.mobile-utility-sheet,#enhPresetModal,#aptoolImportModal,#aptoolResultModal){padding:0!important}
html[data-mobile-dialogs] body :is(.mobile-utility-head,.enh-preset-head,.mastery-aggregate-head,.aptool-import-modal-head,.aptool-result-head,.my-sheet-head,.psm-library-sheet-head,.facility-picker-head,.mamp-head){display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:12px!important;min-height:0!important;margin:0!important;padding:20px 17px 0!important;border:0!important;background:transparent!important}
html[data-mobile-dialogs] body :is(.mobile-utility-head-copy>strong,.enh-preset-head-copy>strong,.mastery-aggregate-head-copy>strong,.aptool-import-modal-head strong,.aptool-result-head strong,.my-sheet-head strong,.psm-library-sheet-head strong,.facility-picker-head>strong,.mamp-head strong),html[data-mobile-dialogs] body #dialogContent>h3{font-size:var(--md-title)!important;line-height:1.4!important;font-weight:700!important;letter-spacing:normal!important;margin:0!important;color:var(--md-text)!important}
html[data-mobile-dialogs] body :is(.mobile-utility-head-copy>span,.aptool-import-modal-head span,.my-sheet-head small){display:none!important}
html[data-mobile-dialogs] body :is(.mobile-utility-head-copy>small,.enh-preset-head-copy>span,.mastery-aggregate-head-copy>span){font-size:var(--md-small)!important;line-height:1.55!important;font-weight:400!important;color:var(--md-muted)!important;margin-top:4px!important}
html[data-mobile-dialogs] body :is(.mobile-utility-close,.enh-preset-close,.mastery-aggregate-close,.aptool-import-close,.aptool-result-close,.my-close,.psm-library-close,.facility-picker-close,.fc27-amp-modal-close,.mamp-head button){box-sizing:border-box!important;flex:0 0 32px!important;width:32px!important;height:32px!important;min-height:32px!important;padding:0!important;margin:-4px -5px 0 0!important;display:grid!important;place-items:center!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#92a2ab!important;font:24px/1 system-ui!important;box-shadow:none!important}
html[data-mobile-dialogs] body :is(.mobile-utility-body,.aptool-import-list){padding:16px 17px 20px!important;font-size:var(--md-copy)!important;line-height:1.65!important}
html[data-mobile-dialogs] body .mobile-price-name{font-size:14px!important;line-height:1.5!important;font-weight:650!important}
html[data-mobile-dialogs] body :is(.mobile-price-desc,.mobile-price-note,.mamp-note-copy,.enh-preset-warning,.enh-preset-summary,.mastery-aggregate-empty,.my-sheet-note){font-size:var(--md-copy)!important;line-height:1.65!important;color:var(--md-muted)!important}
html[data-mobile-dialogs] body :is(.aptool-import-note,.aptool-result-meta){font-size:13px!important;line-height:1.65!important;color:var(--md-muted)!important;padding:16px 17px 0!important}
html[data-mobile-dialogs] body :is(.aptool-result-head-copy>span,.psm-library-sheet-head small){display:none!important}
html[data-mobile-dialogs] body .psm-signature-picker-title>strong{font-size:16px!important;line-height:1.4!important;font-weight:700!important}
html[data-mobile-dialogs] body .psm-signature-picker-title>span{font-size:12px!important;line-height:1.55!important}
html[data-mobile-dialogs] body .mobile-price-card{padding:12px!important;border-radius:10px!important}
html[data-mobile-dialogs] body .mobile-price-legend{gap:9px!important}
html[data-mobile-dialogs] body .mobile-price-note{padding:12px 0 0!important;background:transparent!important;border:0!important}
html[data-mobile-dialogs] body .md-note{padding:0!important;max-width:none!important}
html[data-mobile-dialogs] body .md-note-backdrop{position:fixed;inset:0;z-index:100299;background:#03070aa6;backdrop-filter:blur(3px)}
html[data-mobile-dialogs] body .md-note .mamp-note-copy{padding:16px 17px 20px!important}
html[data-mobile-dialogs] body #enhPresetModalInner{padding:0!important;max-height:none!important;background:transparent!important}
html[data-mobile-dialogs] body :is(.enh-preset-scope-grid,.enh-preset-slot-list,.enh-preset-warning,.enh-preset-summary){margin:16px 17px 0!important}
html[data-mobile-dialogs] body :is(.enh-preset-scope strong,.enh-preset-slot-card strong,.mastery-agg-chip,.mobile-choice-option){font-size:13px!important;line-height:1.5!important}
html[data-mobile-dialogs] body :is(.enh-preset-scope span,.enh-preset-slot-card span){font-size:12px!important;line-height:1.55!important}
html[data-mobile-dialogs] body :is(.enh-preset-actions,.my-form-actions,.my-detail-actions){padding:16px 17px 20px!important;margin:0!important;gap:9px!important}
html[data-mobile-dialogs] body #masteryAggregatePop{padding:0!important}
html[data-mobile-dialogs] body :is(.mastery-aggregate-grid,.mastery-aggregate-empty){padding:16px 17px 20px!important;margin:0!important}
html[data-mobile-dialogs] body .my-sheet{padding:0!important}
html[data-mobile-dialogs] body .my-sheet :is(.my-field,.my-save-scope,.my-apply-summary,.my-sheet-note){margin:14px 17px!important}
html[data-mobile-dialogs] body #dialogContent{width:min(var(--md-width),calc(100vw - 32px))!important;max-height:calc(var(--md-vv-height) - 32px)!important;overflow:auto!important;padding:20px 17px!important}
html[data-mobile-dialogs] body #dialogContent :is(p,.tiny,.field-label){font-size:var(--md-copy)!important;line-height:1.65!important;color:var(--md-muted)!important}
html[data-mobile-dialogs] body #dialogContent p{margin:13px 0!important}
html[data-mobile-dialogs] body :is(.dialog-actions,.amp-center-footer){gap:9px!important}
html[data-mobile-dialogs] body :is(.dialog-actions,.enh-preset-actions,.my-form-actions){display:grid!important;grid-template-columns:none!important;grid-auto-flow:column!important;grid-auto-columns:1fr!important}
html[data-mobile-dialogs] body :is(.dialog-actions button,.enh-preset-action,.my-form-actions button,.my-detail-actions button,.amp-center-footer button){box-sizing:border-box!important;min-height:40px!important;border-radius:10px!important;padding:7px 10px!important;font-size:13px!important;font-weight:650!important;line-height:1.4!important}
html[data-mobile-dialogs] body :is(.dialog-actions,.enh-preset-actions,.my-form-actions) button:not(.primary):not(.danger){border:1px solid #485255!important;background:#202930!important;color:var(--md-text)!important}
html[data-mobile-dialogs] body :is(.dialog-actions,.enh-preset-actions,.my-form-actions,.amp-center-footer) :is(button.primary,.amp-center-confirm){border:1px solid #9b834d!important;background:#51432d!important;color:#ffe2a0!important}
html[data-mobile-dialogs] body :is(.dialog-actions,.enh-preset-actions) button.danger{border:1px solid #82554e!important;background:#342326!important;color:#dfaaa1!important}
html[data-mobile-dialogs] body .md-panel :is(input,select,textarea){font-size:16px!important;border-radius:10px!important;box-sizing:border-box!important}
html[data-mobile-dialogs] body .md-panel input:not([type="checkbox"]):not([type="radio"]){min-height:40px!important}
html[data-mobile-dialogs] body .md-popover{border-radius:12px!important;font-size:13px!important;line-height:1.65!important}
html[data-mobile-dialogs] body .md-popover :is(p,.psm-perk-sheet-text){font-size:13px!important;line-height:1.65!important}
html[data-mobile-dialogs] body :is(.mobile-utility-backdrop,.enh-preset-backdrop,.mastery-aggregate-backdrop,.aptool-import-backdrop,.aptool-result-backdrop,.my-overlay,.psm-library-backdrop){position:fixed!important;inset:0!important;background:#03070aa6!important;backdrop-filter:blur(3px)!important}
html[data-mobile-dialogs] body .fc-account-modal iframe{width:min(var(--md-width),100%)!important;border-radius:var(--md-radius)!important}
html[data-mobile-dialogs] body :is(#mobileUtilityBackdrop,#enhPresetBackdrop,#masteryAggregateBackdrop,#aptoolImportBackdrop,#aptoolResultBackdrop,#myOverlay){z-index:100299!important}
html[data-mobile-dialogs] body dialog.fc-shared-dialog[data-platform="mobile"] h3{margin:0!important;line-height:1.4!important}
html[data-mobile-dialogs] body dialog.fc-shared-dialog[data-platform="mobile"] .gl-modal-body{margin:16px 0 0!important}
html[data-mobile-dialogs] body dialog.fc-shared-dialog[data-platform="mobile"] .gl-modal-foot{margin:0!important;padding:16px 0 0!important}
html[data-mobile-dialogs] body dialog.fc-shared-dialog[data-platform="mobile"] .gl-x{box-sizing:border-box;width:32px;height:32px;flex:0 0 32px;padding:0!important;margin:-4px -5px 0 0!important;font-size:24px!important;place-items:center}
html[data-mobile-dialogs] body :is(.amp-center-tabs button,.fc27-amp-modal-attr-name,.fc27-amp-modal-choice>span){font-size:13px!important}
html[data-mobile-dialogs] body .amp-center-nav{padding-left:17px!important;padding-right:17px!important}
html[data-mobile-dialogs] body .amp-center-footer{padding-left:17px!important;padding-right:17px!important}
html[data-mobile-dialogs] body .psm-library-sheet-head{padding-bottom:14px!important}
html[data-mobile-dialogs] body .facility-picker-head{padding-bottom:14px!important}
/* Embedded account pages inherit the same compact type/control scale. */
html[data-mobile-dialogs] .account-dialog-head #account-window-title{font-size:16px!important;font-weight:700!important}
html[data-mobile-dialogs] .panel{border-radius:17px!important;padding:20px 17px!important}
html[data-mobile-dialogs] .panel :is(p,label,.helper){font-size:13px!important;line-height:1.65!important}
html[data-mobile-dialogs] .panel input{font-size:16px!important;min-height:40px!important}
html[data-mobile-dialogs] .panel button.primary{min-height:40px!important;border-radius:10px!important;font-size:13px!important;background:#51432d!important;color:#ffe2a0!important;border-color:#9b834d!important}
@media(prefers-reduced-motion:reduce){html[data-mobile-dialogs] .md-panel{transition:none!important}}
