.feedback-toasts {
    position: fixed;
    z-index: 10000;
    right: max(24px, env(safe-area-inset-right));
    bottom: max(24px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(400px, calc(100vw - 32px));
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    pointer-events: none;
    font: 14px/1.5 system-ui, sans-serif;
}
.feedback-toast {
    --feedback-color: #087f5b;
    --feedback-tint: #e8f8f1;
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 14px 18px 18px;
    border: 1px solid #e0e8f0;
    border-left: 4px solid var(--feedback-color);
    border-radius: 14px;
    background: #fff;
    color: #102039;
    box-shadow: 0 12px 40px #10203926, 0 2px 8px #1020390a;
    pointer-events: auto;
    flex-shrink: 0;
    animation: feedback-enter .2s ease-out;
}
.feedback-toast[data-type="error"] { --feedback-color: #b42318; --feedback-tint: #fff0ee; }
.feedback-toast[data-type="warning"] { --feedback-color: #936000; --feedback-tint: #fff6dc; }
.feedback-toast[data-type="info"] { --feedback-color: #1879ff; --feedback-tint: #edf5ff; }
.feedback-toast-icon, .feedback-dialog-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--feedback-tint);
    color: var(--feedback-color);
    font: 700 18px/1 system-ui, sans-serif;
}
.feedback-toast-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.feedback-toast-copy strong { display: block; color: #102039; font-size: 14px; font-weight: 750; }
.feedback-toast-copy p, .feedback-toast-copy ul { margin: 4px 0 0; color: #54657d; font-size: 13px; }
.feedback-toast-copy ul { padding-left: 18px; }
.feedback-toast .feedback-toast-close {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #6b7f9d;
    font: 22px/1 system-ui, sans-serif;
    cursor: pointer;
}
.feedback-toast .feedback-toast-close:hover { background: #f0f4f8; color: #102039; }
.feedback-dialog {
    --feedback-color: #b42318;
    --feedback-tint: #fff0ee;
    box-sizing: border-box;
    width: min(460px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 1px solid #e0e8f0;
    border-radius: 22px;
    background: #fff;
    color: #102039;
    box-shadow: 0 24px 80px #10203940;
    font: 14px/1.6 system-ui, sans-serif;
}
.feedback-dialog[open] { animation: feedback-dialog-enter .18s ease-out; }
.feedback-dialog::backdrop { background: #10203980; backdrop-filter: blur(4px); }
.feedback-dialog[data-tone="info"] { --feedback-color: #1879ff; --feedback-tint: #edf5ff; }
.feedback-dialog-content { padding: 28px; }
.feedback-dialog-icon { width: 48px; height: 48px; margin-bottom: 18px; font-size: 24px; }
.feedback-dialog h2 { margin: 0 0 10px; color: #102039; font-size: 21px; line-height: 1.3; font-weight: 750; }
.feedback-dialog p { margin: 0; color: #54657d; overflow-wrap: anywhere; white-space: pre-line; }
.feedback-dialog .feedback-dialog-details { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: #fff6dc; color: #765109; }
.feedback-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.feedback-dialog .feedback-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #dbe4ee;
    border-radius: 10px;
    background: #fff;
    color: #33465f;
    font: 700 14px/1.4 system-ui, sans-serif;
    cursor: pointer;
}
.feedback-dialog .feedback-button-cancel:hover { background: #f5f8fc; }
.feedback-dialog .feedback-button-confirm { border-color: var(--feedback-color); background: var(--feedback-color); color: #fff; }
.feedback-dialog .feedback-button-confirm:hover { filter: brightness(.92); }
.feedback-dialog [hidden] { display: none; }
.feedback-dialog .feedback-button:focus-visible, .feedback-toast-close:focus-visible { outline: 3px solid #1879ff; outline-offset: 3px; }
@keyframes feedback-enter { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
@keyframes feedback-dialog-enter { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 600px) {
    .feedback-toasts { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }
    .feedback-dialog-content { padding: 24px; }
    .feedback-dialog-actions { flex-direction: column-reverse; }
    .feedback-dialog .feedback-button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .feedback-toast, .feedback-dialog[open] { animation: none; }
}
