/* Dialogs remain usable with enlarged text and on narrow screens. */
dialog {max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px)}
dialog #modal-form {display:flex;flex-direction:column;max-height:calc(100vh - 26px);max-height:calc(100dvh - 26px)}
.dialog-heading,.dialog-actions {flex-shrink:0}
.dialog-heading h2 {overflow-wrap:anywhere}
.dialog-body {min-height:0;overflow:auto}
.dialog-actions {flex-wrap:wrap}
.dialog-actions .button {height:auto;min-height:39px;white-space:normal}
#modal-error:focus {outline:2px solid currentColor;outline-offset:5px}
[aria-invalid="true"] {border-color:#a33c36!important}
dialog:has(.first-use-guide),dialog:has(.help-content) {width:660px}
.first-use-guide,.help-content {font-size:14px;line-height:1.65;color:#455e6e}
.first-use-guide h3,.help-content h3 {font-size:19px;line-height:1.4;color:#263f50;margin:8px 0 14px}
.first-use-guide p,.help-content p {margin:12px 0 18px}
.first-use-guide ul {padding-left:22px}
.first-use-guide li {margin-bottom:10px}
.first-use-guide .guide-progress {font-size:12px;font-weight:600;color:#286f65;margin:8px 0}
.guide-example {display:flex;gap:10px;align-items:center;margin:20px 0;flex-wrap:wrap}
.guide-example>span:not(.guide-example-arrow) {min-width:110px;flex:1;border:1.5px solid #557182;padding:10px 13px;border-radius:4px;font-size:10px;letter-spacing:.6px;color:#455e6e;background:#f5f8fa}
.guide-example strong {display:block;font-size:14px;letter-spacing:0;color:#263f50;overflow-wrap:anywhere}
.guide-example>span.guide-example-account {border-radius:26px;border-color:#24796f;background:#edf8f4;padding-left:20px}
.guide-example-arrow {font-size:12px;flex:none}
.guide-save-options {display:grid;gap:12px}
.guide-save-options section {border:1px solid #d5e2e6;background:#f5f9fa;border-radius:7px;padding:14px 16px}
.guide-save-options h3 {font-size:15px;margin:0 0 6px}
.guide-save-options p {margin:0}
.first-use-guide .guide-replay-note {font-size:12px;border-top:1px solid #d5e2e6;padding-top:14px;margin-bottom:0}
.help-content .shortcuts {margin:20px 0;grid-template-columns:minmax(0,1fr) minmax(0,1fr);overflow-wrap:anywhere}
.help-content .help-guide-button {margin:4px 0 10px}
:root[data-theme="dark"] :is(.first-use-guide,.help-content,.guide-example-arrow) {color:var(--ui-secondary)}
:root[data-theme="dark"] :is(.first-use-guide h3,.help-content h3,.guide-example strong) {color:var(--ui-text)}
:root[data-theme="dark"] .first-use-guide .guide-progress {color:var(--ui-accent)}
:root[data-theme="dark"] :is(.guide-example>span:not(.guide-example-arrow),.guide-save-options section) {background:var(--ui-raised);border-color:var(--ui-border);color:var(--ui-secondary)}
:root[data-theme="dark"] .guide-example>span.guide-example-account {background:var(--ui-selected);border-color:var(--ui-accent)}
:root[data-theme="dark"] .guide-replay-note {border-color:var(--ui-border)}
:root[data-theme="dark"] [aria-invalid="true"] {border-color:var(--ui-danger)!important}
@media(max-width:480px){.dialog-heading{padding:16px 17px 10px}.dialog-body{padding:6px 17px 18px}.dialog-actions{padding:12px 17px}.dialog-actions .button{padding:6px 12px}.guide-account-example{flex-direction:column;align-items:stretch}.guide-example-arrow{text-align:center}.guide-account-example>span:not(.guide-example-arrow){width:100%}}
