/* The overlay is the only scroll surface; the card and details always reflow. */
dialog.app-error-overlay[open]{box-sizing:border-box;position:fixed;inset:0;margin:0;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;border:0;padding:clamp(16px,5vh,48px) 16px;background:transparent;color:var(--ds-text);overflow:auto;overscroll-behavior:contain;display:flex;align-items:flex-start;}
.app-error-overlay::backdrop{background:rgb(12 20 35 / .58);}
.app-error-card{box-sizing:border-box;flex:none;width:min(100%,620px);min-width:0;margin:auto;padding:28px;border:1px solid var(--ds-border);border-radius:16px;background:var(--ds-surface,#fff);box-shadow:0 20px 70px rgb(0 0 0 / .22);overflow-wrap:anywhere;}
.app-error-header,.app-error-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;}
.app-error-category{font-size:13px;font-weight:700;color:var(--ds-text-2);letter-spacing:.02em;}
.app-error-card h2{font-size:24px;line-height:1.45;margin:24px 0;}
.app-error-card h2:focus{outline:none;}
.app-error-step{font-size:13px;font-weight:700;margin:0 0 8px;}
.app-error-hint{font-size:16px;line-height:1.8;margin:0;}
.app-error-context,.app-error-safety{font-size:13px;line-height:1.7;color:var(--ds-text-2);margin:16px 0;}
.app-error-details{border-top:1px solid var(--ds-border);padding-top:16px;margin-top:24px;}
.app-error-details summary{min-height:44px;cursor:pointer;}
.app-error-details pre{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;overflow:visible;max-height:none;font-size:12px;line-height:1.8;margin:12px 0;}
.app-error-actions{margin-top:20px;justify-content:flex-end;}
.app-error-actions .btn{min-width:152px;}
.app-error-copy-status:empty{display:none;}
.error-reopen{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding-block:12px;}
.error-reopen p{margin:0;flex:1 1 220px;}
@media(max-width:480px){.app-error-card{padding:20px;}.app-error-card h2{font-size:21px;}.app-error-actions button{flex:1 1 100%;}}
