.everest-dialog {
    --dialog-surface: #fff;
    --dialog-text: #172033;
    --dialog-muted: #475569;
    --dialog-border: #e2e8f0;
    position: fixed;
    inset: 0;
    z-index: 10000;
    width: 100%;
    height: 100%;
    height: var(--ui-viewport-height, 100dvh);
    top: var(--ui-viewport-top, 0px);
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    box-sizing: border-box;
    background: rgb(15 23 42 / .55);
    color: var(--dialog-text);
    font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    overscroll-behavior: contain;
}
.everest-dialog:not([open]) { display: none; }
.everest-dialog[open] { display: grid; place-items: center; }
.everest-dialog::backdrop { background: transparent; }
.everest-dialog *, .everest-dialog *::before, .everest-dialog *::after { box-sizing: border-box; }
.everest-dialog [hidden] { display: none !important; }
.everest-dialog-card { width: min(100%, 480px); max-height: 100%; overflow-y: auto; padding: 24px; border: 1px solid var(--dialog-border); border-radius: 20px; background: var(--dialog-surface); box-shadow: 0 24px 80px rgb(0 0 0 / .24); overflow-wrap: anywhere; }
.everest-dialog-header { display: flex; align-items: center; gap: 14px; }
.everest-dialog-icon { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 14px; background: #fff7ed; color: #9a3412; font-size: 24px; font-weight: 800; }
.everest-dialog-heading { flex: 1; min-width: 0; }
.everest-dialog-brand { margin: 0 0 3px; color: var(--dialog-muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.everest-dialog h2 { margin: 0; color: var(--dialog-text); font-size: 19px; font-weight: 750; line-height: 1.35; }
.everest-dialog button { min-width: 44px; min-height: 44px; font: inherit; cursor: pointer; touch-action: manipulation; }
.everest-dialog-dismiss { flex: 0 0 44px; padding: 0; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--dialog-muted); font-size: 27px !important; }
.everest-dialog-dismiss:hover { background: var(--dialog-border); }
.everest-dialog-message { margin: 20px 0; color: var(--dialog-muted); font-size: 15px; white-space: pre-wrap; }
.everest-dialog-field { margin-bottom: 20px; }
.everest-dialog-field label { display: block; margin-bottom: 7px; color: var(--dialog-text); font-size: 14px; font-weight: 600; }
.everest-dialog-input { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid var(--dialog-border); border-radius: 11px; background: var(--dialog-surface); color: var(--dialog-text); font: inherit; }
.everest-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.everest-dialog-actions button { padding: 11px 18px; border: 1px solid var(--dialog-border); border-radius: 11px; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.everest-dialog-cancel { background: var(--dialog-surface); color: var(--dialog-text); }
.everest-dialog-cancel:hover { background: var(--dialog-border); }
.everest-dialog-actions .everest-dialog-accept { border-color: #c2410c; background: #c2410c; color: #fff; }
.everest-dialog-accept:hover { filter: brightness(.92); }
.everest-dialog[data-tone="danger"] .everest-dialog-icon { background: #fef2f2; color: #b91c1c; }
.everest-dialog[data-tone="danger"] .everest-dialog-accept { border-color: #b91c1c; background: #b91c1c; }
.everest-dialog :is(button, input):focus-visible { outline: 3px solid #ea580c; outline-offset: 3px; }
.dark .everest-dialog { --dialog-surface: #171717; --dialog-text: #f8fafc; --dialog-muted: #cbd5e1; --dialog-border: #404040; }
@media (max-width: 479px) {
    .everest-dialog-card { padding: 20px; border-radius: 17px; }
    .everest-dialog-header { gap: 10px; }
    .everest-dialog h2 { font-size: 18px; }
    .everest-dialog-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .everest-dialog-actions button { padding-inline: 10px; }
    .everest-dialog-actions:has(.everest-dialog-cancel[hidden]) { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
    .everest-dialog[open] .everest-dialog-card { animation: everest-dialog-in 180ms cubic-bezier(.16, 1, .3, 1); }
    @keyframes everest-dialog-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
}
