.mms-wrap {
    --mms-accent: #1B4275;
    --mms-max-width: 1600px;
    --mms-desktop-height: 980px;
    --mms-tablet-height: 820px;
    --mms-mobile-height: 700px;
    width: 100%;
    margin: 24px auto;
    color: #15202b;
}

.mms-shell {
    max-width: var(--mms-max-width);
    margin: 0 auto;
}

.mms-header-card,
.mms-frame-card,
.mms-toolbar {
    border: 1px solid rgba(16, 24, 40, 0.08);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 40px rgba(16, 24, 40, 0.08);
}

.mms-header-card {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 24px;
    margin-bottom: 14px;
}

.mms-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(27, 66, 117, 0.1);
    color: var(--mms-accent);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
}

.mms-title {
    margin: 0 0 10px;
    font-size: 34px;
    line-height: 1.1;
}

.mms-subtitle {
    margin: 0;
    font-size: 16px;
    color: #475467;
}

.mms-actions,
.mms-sticky-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.mms-action,
.mms-tool-button,
.mms-start-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 700;
}

.mms-action,
.mms-start-button {
    background: var(--mms-accent);
    color: #ffffff;
}

.mms-action:hover,
.mms-start-button:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.mms-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.mms-toolbar-left,
.mms-toolbar-right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mms-chip,
.mms-tool-button {
    background: #f5f7fa;
    color: #101828;
}

.mms-chip {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    border-radius: 999px;
    padding: 0 16px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid rgba(16, 24, 40, 0.08);
}

.mms-chip.active,
.mms-chip:hover,
.mms-tool-button:hover,
.mms-tool-button.is-link:hover {
    background: rgba(27, 66, 117, 0.08);
    color: var(--mms-accent);
    border-color: rgba(27, 66, 117, 0.16);
}

.mms-tool-button.is-link {
    text-decoration: none;
}

.mms-frame-card {
    position: relative;
    overflow: hidden;
    min-height: 420px;
}

.mms-loader,
.mms-start-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.98));
    z-index: 3;
}

.mms-loader {
    color: #344054;
    font-weight: 700;
}

.mms-start-box {
    width: min(92%, 520px);
    border: 1px solid rgba(16, 24, 40, 0.08);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 40px rgba(16, 24, 40, 0.08);
    padding: 28px;
    text-align: center;
}

.mms-start-box strong {
    display: block;
    font-size: 24px;
    line-height: 1.2;
    margin-bottom: 10px;
}

.mms-start-box span {
    display: block;
    color: #475467;
    margin-bottom: 18px;
}

.mms-frame {
    display: block;
    width: 100%;
    height: var(--mms-desktop-height);
    background: #ffffff;
}

.mms-frame.is-hidden {
    visibility: hidden;
}

.mms-sticky-actions {
    display: none;
}

.mms-error {
    padding: 18px;
    border-radius: 16px;
    background: #fff4f4;
    color: #b42318;
    font-weight: 700;
}

.mms-is-expanded .mms-frame-card {
    position: fixed;
    inset: 16px;
    z-index: 99999;
    border-radius: 24px;
}

.mms-is-expanded .mms-frame {
    height: calc(100vh - 32px);
}

@media (max-width: 1024px) {
    .mms-frame {
        height: var(--mms-tablet-height);
    }

    .mms-title {
        font-size: 28px;
    }

    .mms-header-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 767px) {
    .mms-wrap {
        margin: 18px auto;
    }

    .mms-header-card,
    .mms-toolbar {
        padding: 16px;
        border-radius: 18px;
    }

    .mms-frame-card {
        border-radius: 18px;
    }

    .mms-title {
        font-size: 24px;
    }

    .mms-subtitle {
        font-size: 15px;
    }

    .mms-frame {
        height: var(--mms-mobile-height);
    }

    .mms-sticky-actions {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        position: sticky;
        bottom: 12px;
        margin-top: 14px;
        z-index: 10;
    }

    .mms-sticky-actions .mms-action {
        min-height: 50px;
        padding: 0 12px;
        font-size: 14px;
    }

    .mms-toolbar-right,
    .mms-toolbar-left {
        width: 100%;
    }
}


.mms-toolbar.is-sticky {
    position: sticky;
    top: 18px;
    z-index: 25;
}

@media (min-width: 1600px) {
    .mms-shell {
        max-width: min(var(--mms-max-width), calc(100vw - 40px));
    }
}

@media (max-width: 767px) {
    .mms-toolbar.is-sticky {
        top: 8px;
    }
}
