.ttb-mstd-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(15,15,16,0.55);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    opacity: 0; visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.ttb-mstd-overlay.is-open { opacity: 1; visibility: visible; }
.ttb-mstd-modal {
    background: #fff; border-radius: 12px;
    width: 100%; max-width: 460px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35), 0 8px 20px rgba(0,0,0,0.15);
    display: flex; overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #0f0f10;
    transform: translateY(20px); opacity: 0;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s;
}
.ttb-mstd-overlay.is-open .ttb-mstd-modal { transform: translateY(0); opacity: 1; }

.ttb-mstd-side {
    flex: 0 0 110px;
    display: flex; align-items: center; justify-content: center;
    font-size: 42px; color: #fff;
    background: #c1121f;
    padding: 20px 10px;
}
.ttb-mstd-side.icon-warning { background: #f59e0b; }
.ttb-mstd-side.icon-danger  { background: #c1121f; }
.ttb-mstd-side.icon-delete  { background: #c1121f; }
.ttb-mstd-side.icon-block   { background: #c1121f; }
.ttb-mstd-side.icon-info    { background: #2563eb; }
.ttb-mstd-side.icon-edit    { background: #2563eb; }
.ttb-mstd-side.icon-send    { background: #2563eb; }
.ttb-mstd-side.icon-success { background: #16a34a; }
.ttb-mstd-side.icon-save    { background: #16a34a; }
.ttb-mstd-side.icon-question{ background: #6b7280; }
.ttb-mstd-side i { line-height: 1; }

.ttb-mstd-body { padding: 22px 24px; flex: 1; min-width: 0; }
.ttb-mstd-eyebrow {
    font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
    text-transform: uppercase; color: #c1121f;
    margin: 0 0 6px; display: block;
}
.ttb-mstd-title {
    font-size: 18px; font-weight: 700;
    margin: 0 0 8px; letter-spacing: -0.01em;
    color: #0f0f10; line-height: 1.3;
}
.ttb-mstd-text {
    font-size: 13.5px; color: #555;
    margin: 0 0 18px; line-height: 1.5;
}
.ttb-mstd-actions {
    display: flex; gap: 10px; justify-content: flex-end;
    flex-wrap: wrap;
}
.ttb-mstd-btn {
    min-height: 40px; padding: 0 18px;
    font-size: 13px; font-weight: 600;
    border-radius: 6px; border: 0; cursor: pointer;
    font-family: inherit; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    transition: filter 0.15s, background 0.15s, color 0.15s, border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.ttb-mstd-btn:hover { filter: brightness(1.08); }
.ttb-mstd-btn:disabled { opacity: 0.6; cursor: wait; }
.ttb-mstd-primary { background: #c1121f; }
.ttb-mstd-primary.icon-warning { background: #f59e0b; }
.ttb-mstd-primary.icon-info    { background: #2563eb; }
.ttb-mstd-primary.icon-edit    { background: #2563eb; }
.ttb-mstd-primary.icon-send    { background: #2563eb; }
.ttb-mstd-primary.icon-success { background: #16a34a; }
.ttb-mstd-primary.icon-save    { background: #16a34a; }
.ttb-mstd-primary.icon-danger  { background: #c1121f; }
.ttb-mstd-primary.icon-delete  { background: #c1121f; }
.ttb-mstd-primary.icon-block   { background: #c1121f; }
.ttb-mstd-primary.icon-question{ background: #6b7280; }
.ttb-mstd-ghost {
    background: transparent; color: #6b7280;
    border: 1.5px solid #d4d1c9;
}
.ttb-mstd-ghost:hover { border-color: #6b7280; color: #374151; }

/* Mobile: split -> stack (side full width top) */
@media (max-width: 520px) {
    .ttb-mstd-modal { flex-direction: column; max-width: 100%; }
    .ttb-mstd-side { flex: 0 0 auto; padding: 22px; font-size: 38px; width: 100%; }
    .ttb-mstd-body { padding: 20px 22px 22px; }
    .ttb-mstd-actions { flex-direction: column-reverse; }
    .ttb-mstd-btn { width: 100%; min-height: 48px; font-size: 15px; }
}

/* Toast */
.ttb-mstd-toast {
    position: fixed; top: 20px; right: 20px; z-index: 100000;
    background: #0f0f10; color: #fff;
    padding: 12px 18px; border-radius: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px; font-weight: 500;
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
    display: flex; align-items: center; gap: 10px;
    transform: translateX(120%); opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
    max-width: 340px;
}
.ttb-mstd-toast.is-open { transform: translateX(0); opacity: 1; }
.ttb-mstd-toast.icon-success { background: #16a34a; }
.ttb-mstd-toast.icon-save    { background: #16a34a; }
.ttb-mstd-toast.icon-danger  { background: #c1121f; }
.ttb-mstd-toast.icon-delete  { background: #c1121f; }
.ttb-mstd-toast.icon-block   { background: #c1121f; }
.ttb-mstd-toast.icon-warning { background: #f59e0b; color: #422006; }
.ttb-mstd-toast.icon-info    { background: #2563eb; }
.ttb-mstd-toast.icon-edit    { background: #2563eb; }
.ttb-mstd-toast.icon-send    { background: #2563eb; }
.ttb-mstd-toast.icon-question{ background: #6b7280; }
.ttb-mstd-toast i { font-size: 16px; }

@media (max-width: 520px) {
    .ttb-mstd-toast { top: auto; bottom: 20px; right: 12px; left: 12px; max-width: none; transform: translateY(120%); }
    .ttb-mstd-toast.is-open { transform: translateY(0); }
}