/* Modal colors must not inherit the dark portal palette. */
html #dialog{--bg:#f1f3fa;--panel:#fff;--text:#19253e;--muted:#475573;--gold:#633acb;--accent:#633acb;--danger:#a91c3c;--line:#b8c2d8;background:#fff;color:#19253e;color-scheme:light;border:1px solid #bcc7df;border-radius:22px;max-height:calc(100dvh - 32px);padding:28px;box-shadow:0 24px 80px #10172b77}
html #dialog h1,html #dialog h2,html #dialog h3,html #dialog strong,html #dialog label{color:#19253e}
html #dialog p,html #dialog .help,html #dialog .muted,html #dialog .label,html #dialog .settings-list span{color:#475573}
html #dialog .form input,html #dialog .form textarea,html #dialog .form select{background:#f5f7fc;color:#19253e;border-color:#aab8d0}
html #dialog input::placeholder,html #dialog textarea::placeholder{color:#66748d;opacity:1}
html #dialog .btn{background:#633acb;color:#fff;border-color:#633acb}
html #dialog .btn.secondary,html #dialog .close{background:#f2edff;color:#482795;border-color:#c3b6e9}
html #dialog .btn:hover{background:#4b279f;color:#fff}
html #dialog .form-error,html #dialog .greeting-preview-status[data-error=true]{color:#a91c3c;background:#fff0f3;border-radius:8px;padding:10px}
html #dialog .form-error:empty{padding:0}
html #dialog .code{background:#edf1fa;color:#19253e;border-color:#b8c2d8}
html #dialog .greeting-balance>div{background:linear-gradient(130deg,#eee7ff,#e4f4ff);color:#19253e;border-color:#b9c8df}
html #dialog .greeting-balance span{color:#475573}
html #dialog .theme-option,html #dialog .theme-option strong,html #dialog .theme-option span{color:#fff}
html #dialog .greeting-preview-status{margin:12px 0;line-height:1.6}
@media(max-width:620px){html #dialog{padding:18px;width:calc(100% - 24px);max-height:calc(100dvh - 24px)}}
html #dialog .radio-theme-choice,html #dialog .radio-theme-choice strong{color:var(--radio-text)}
html #dialog .radio-theme-choice small{color:var(--radio-muted)}

html #dialog .form input[type=radio],html #dialog .form input[type=checkbox]{width:18px;height:18px;min-height:18px;padding:0;flex-shrink:0;accent-color:#633acb}html #dialog .check{display:flex;gap:10px;align-items:center}html #dialog .radio-theme-choice{cursor:pointer}html #dialog .radio-background-preview[hidden]{display:none}
