/* Common interaction chrome. Entry keypads and reference-specific toolbars remain scoped. */
button:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
button:disabled{cursor:default}
dialog{overscroll-behavior:contain}
dialog .dialog-head{flex-shrink:0;gap:4px;padding:6px 10px;min-height:56px}
dialog .dialog-head h2{font-size:16px;line-height:1.3;margin:0}
dialog .dialog-head .dialog-save{grid-column:3;grid-row:1;font-size:26px;color:inherit}
dialog .dialog-body{min-height:0;overscroll-behavior:contain;scroll-padding-block:16px}
dialog .dialog-body>:first-child{margin-top:0}
dialog .actions{gap:10px;flex-wrap:wrap}
dialog .actions:empty{display:none}
dialog .actions>button{min-height:44px}
.edit-form-dialog form{padding-bottom:4px}
.edit-form-dialog .actions{margin-top:22px;padding-top:14px;border-top:1px solid var(--line)}
.edit-form-dialog .account-save{position:static;background:transparent}
.edit-form-dialog input:not([type=checkbox]):not([type=radio]):not([type=color]),.edit-form-dialog select{min-height:44px}
.edit-form-dialog .dialog-body small{line-height:1.5}
dialog .error:not(:empty){border-radius:10px;background:#fff0f1;padding:10px 12px;margin-block:10px;line-height:1.5;overflow-wrap:anywhere}
.dialog-save-status{position:absolute;bottom:0;left:0;right:0;z-index:5;text-align:center;background:var(--accent);color:white;padding:10px;font-size:13px;box-shadow:0 -2px 12px #0001}
.confirm-dialog .actions{display:grid;grid-template-columns:1fr 1fr;margin-top:20px}
dialog :is(.metadata-footer,.ledger-footer,.organizer-footer,.recurring-footer,.budget-footer,.entry-sheet-footer,.ux-footer){display:flex;gap:10px;flex-shrink:0;padding:10px 14px max(10px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:white}
dialog :is(.metadata-footer,.ledger-footer,.organizer-footer,.recurring-footer,.budget-footer,.ux-footer)>button{flex:1;min-width:0;min-height:44px;border-radius:22px;font-size:14px;font-weight:600;padding:10px 14px}
dialog :is(.metadata-footer,.ledger-footer,.organizer-footer,.recurring-footer,.budget-footer,.ux-footer)>button:first-child:not(.danger){background:var(--accent);color:white;border:0}
dialog .entry-sheet-footer>button{min-height:44px;border-radius:22px}
.category-manager .metadata-footer>button:first-child{flex:1.5}
.category-manager .metadata-footer>button{width:auto}
.wallet-dialog .dialog-head{padding:6px 10px;min-height:56px;grid-template-columns:44px minmax(0,1fr) 44px}
.wallet-dialog .dialog-head .round-button{background:transparent;border:0;width:44px;height:44px}
.wallet-dialog .dialog-head [data-back]{grid-column:1;grid-row:1;font-size:28px}
.wallet-dialog .dialog-head [data-group-settings]{grid-column:3;grid-row:1}
.tag-sheet{margin:auto;border-radius:22px;max-height:calc(100dvh - 16px)}
:is(.recurring-cycle-dialog,.recurring-cycle-options,.recurring-date-dialog,.recurring-number-dialog) .dialog-head [data-close]{display:flex}
:is(.recurring-cycle-dialog,.recurring-cycle-options,.recurring-date-dialog,.recurring-number-dialog) .dialog-head h2{grid-column:2;grid-row:1;text-align:center;padding:0;font-size:14px}
.recurring-modal-actions{gap:10px;padding:10px 14px;border-top:1px solid var(--line)}
.recurring-modal-actions button{min-height:44px;border-radius:22px;background:var(--soft,var(--soft,#f0f8e8));padding-inline:18px}
.recurring-modal-actions button:last-child{background:var(--accent);color:white}
.wallet-currencies .currency-row{min-height:64px}
.wallet-currencies .currency-section-label{margin-top:16px}
@media(max-width:360px){dialog .dialog-head h2{font-size:14px}dialog :is(.metadata-footer,.ledger-footer,.organizer-footer,.recurring-footer,.budget-footer,.ux-footer){padding-inline:10px;gap:8px}}
@media(prefers-reduced-motion:reduce){dialog[open]{animation:none}}

/* Keep the ledger scope compact above management lists. */
.metadata-manager .metadata-order-hint,.category-manager .metadata-order-hint{margin:10px 0;font-size:11px;line-height:1.5}
.metadata-manager .metadata-section{margin:10px 0 16px}
.metadata-manager input[data-tag-search]{margin-top:0}

.composer .calculator-top .amount-line>small{flex-shrink:0;white-space:nowrap}
