/* Notices use semantic tones without relying on colour alone. */
.ke-notice{--notice-accent:#2563eb;--notice-ink:#1e3a8a;--notice-fill:#eff6ff;display:flex;align-items:flex-start;gap:14px;background:var(--notice-fill);color:var(--notice-ink);border:1px solid color-mix(in srgb,var(--notice-accent) 20%,transparent);border-radius:16px;padding:16px;margin:0 0 14px;box-shadow:0 4px 14px #0f172a05;line-height:1.5;animation:ke-notice-in .18s ease-out}
.ke-notice--error{--notice-accent:#dc2626;--notice-ink:#991b1b;--notice-fill:#fff1f2}
.ke-notice--warning{--notice-accent:#b45309;--notice-ink:#854d0e;--notice-fill:#fffbeb}
.ke-notice--success{--notice-accent:#15803d;--notice-ink:#166534;--notice-fill:#f0fdf4}
.ke-notice__icon{display:grid;place-items:center;flex:0 0 32px;height:32px;border-radius:10px;color:var(--notice-accent);background:color-mix(in srgb,var(--notice-accent) 10%,transparent);font:700 18px/1 system-ui}
.ke-notice__content{flex:1;min-width:0}.ke-notice__content strong{display:block;font-size:14px;letter-spacing:-.01em}.ke-notice__content p{margin:3px 0 0;font-size:14px;line-height:1.55;font-weight:400;overflow-wrap:anywhere;white-space:pre-line}
.ke-notice .ke-notice__dismiss{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;padding:0;margin:-2px -4px 0 0;background:transparent;color:inherit;border:0;border-radius:10px;box-shadow:none;font:400 24px/1 system-ui;cursor:pointer}
.ke-notice__dismiss:hover{background:#00000008}.ke-notice__dismiss:focus-visible,.ke-error-actions a:focus-visible,.ke-error-actions button:focus-visible{outline:3px solid #ff5b1f;outline-offset:3px}
/* Keep errors readable until the person chooses to dismiss them. */
.toast{box-sizing:border-box!important;max-width:min(390px,calc(100vw - 32px))!important;border:1px solid #ffffff24;border-radius:16px!important;padding:16px 20px!important;font-size:14px;line-height:1.55;overflow-wrap:anywhere;box-shadow:0 12px 35px #0f172a26!important}
.ke-error-page{margin:0;min-height:100svh;display:grid;place-items:center;padding:32px 20px;box-sizing:border-box;background:radial-gradient(ellipse at 50% 0,#ffeadf 0,transparent 60%),#f8fafc;color:#172033;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}
.ke-error-card{box-sizing:border-box;width:100%;max-width:540px;padding:36px;background:#fff;border:1px solid #e9edf3;border-radius:28px;box-shadow:0 20px 70px #26334d0b}
.ke-error-brand{display:inline-flex;align-items:center;gap:10px;color:inherit;font-weight:750;font-size:15px;text-decoration:none}.ke-error-brand>span{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:#ff5b1f;color:#fff;font-size:22px}
.ke-error-art{display:grid;place-items:center;width:100px;height:100px;border:1px solid #ffdfce;background:#fff7f1;border-radius:32px;margin:38px 0 26px;transform:rotate(-6deg)}.ke-error-art span{display:grid;place-items:center;width:48px;height:48px;border:2px solid #ec6d36;border-radius:50%;color:#df561e;font-size:30px;font-weight:600;transform:rotate(6deg)}
.ke-error-code{display:inline-block;font-size:11px;font-weight:750;text-transform:uppercase;letter-spacing:.12em;color:#a54c29;background:#fff4ed;border-radius:7px;padding:6px 9px}
.ke-error-card h1{font-size:clamp(26px,5vw,34px);font-weight:750;letter-spacing:-.045em;line-height:1.15;margin:16px 0 14px}.ke-error-card>p{font-size:15px;line-height:1.75;color:#647084;margin:0;max-width:420px}
.ke-error-actions{display:flex;gap:12px;flex-wrap:wrap;margin:28px 0}.ke-error-actions a,.ke-error-actions button{display:inline-flex;align-items:center;justify-content:center;gap:18px;padding:13px 18px;border-radius:12px;line-height:1.4;font-family:inherit;font-size:14px;font-weight:600;text-decoration:none;cursor:pointer;transition:background .15s}
.ke-error-actions .ke-error-home{background:#ff5b1f;border:1px solid #ff5b1f;color:white;box-shadow:0 4px 10px #ff5b1f22}.ke-error-actions .ke-error-home:hover{background:#e64c14}.ke-error-actions button{background:#fff;color:#334155;border:1px solid #dfe5ed}.ke-error-actions button:hover{background:#f8fafc}
.ke-error-footer{border-top:1px solid #edf0f5;padding-top:20px;font-size:13px;color:#7b8496}.ke-error-footer a{color:#5f6a7d;font-weight:600;text-underline-offset:3px}
html.dark-mode .ke-notice{--notice-fill:#162337;--notice-ink:#c7dbff;--notice-accent:#8db5ff}html.dark-mode .ke-notice--error{--notice-fill:#321d25;--notice-ink:#fecdd3;--notice-accent:#fda4af}html.dark-mode .ke-notice--warning{--notice-fill:#302819;--notice-ink:#fde68a;--notice-accent:#fbbf24}html.dark-mode .ke-notice--success{--notice-fill:#162d24;--notice-ink:#bbf7d0;--notice-accent:#86efac}
@media(prefers-color-scheme:dark){.ke-error-page{background:radial-gradient(ellipse at 50% 0,#38271f 0,transparent 60%),#111827;color:#f1f5f9}.ke-error-card{background:#192232;border-color:#2c3749}.ke-error-card>p,.ke-error-footer{color:#b2bdce}.ke-error-art{background:#33271f;border-color:#69402a}.ke-error-code{background:#382a23;color:#ffc3a6}.ke-error-actions button{background:#243044;color:#e2e8f0;border-color:#39465a}.ke-error-actions button:hover{background:#2c3a50}.ke-error-footer{border-color:#2c3749}.ke-error-footer a{color:#cbd5e1}}
@media(max-width:480px){.ke-notice{gap:10px;padding:14px 12px;border-radius:14px}.ke-notice__icon{flex-basis:28px;height:28px}.ke-error-card{padding:26px 22px;border-radius:22px}.ke-error-art{margin-top:28px}.ke-error-actions>a,.ke-error-actions>button{flex:1;white-space:nowrap}.toast{right:16px!important;bottom:calc(88px + env(safe-area-inset-bottom,0px))!important}}
@keyframes ke-notice-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.ke-notice,.toast.show{animation:none!important}.ke-error-actions a,.ke-error-actions button{transition:none}}

