.nkmcp-modal,
.nkmcp-modal * {
    box-sizing: border-box;
}

input[type="color"][data-nkmcp],
.nkmcp-trigger {
    touch-action: none;
}

.nkmcp-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.62);
    overscroll-behavior: none;
    touch-action: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.nkmcp-modal.is-open {
    display: flex;
}

.nkmcp-panel {
    width: min(360px, 100%);
    max-height: calc(100dvh - 36px);
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding: 24px 22px 20px;
    border: 1px solid #44434f;
    border-radius: 24px;
    background: #282730;
    color: #ffffff;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.nkmcp-title {
    margin: 0 0 20px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
}

.nkmcp-row {
    margin-top: 17px;
}

.nkmcp-row label {
    display: block;
    margin: 0 0 9px;
    color: #f8fafc;
    font-size: 17px;
    font-weight: 700;
}

.nkmcp-range {
    width: 100%;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 1px solid #aeb3bf;
    border-radius: 7px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.nkmcp-range::-webkit-slider-thumb {
    width: 28px;
    height: 48px;
    border: 1px solid #087cac;
    border-radius: 6px;
    background: #149bd2;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.35);
    -webkit-appearance: none;
}

.nkmcp-range::-moz-range-thumb {
    width: 28px;
    height: 48px;
    border: 1px solid #087cac;
    border-radius: 6px;
    background: #149bd2;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.35);
}

.nkmcp-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 25px;
}

.nkmcp-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nkmcp-preset {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 2px solid #ffffff;
    border-radius: 50%;
    cursor: pointer;
}

.nkmcp-selected-wrap {
    flex: 0 0 auto;
    text-align: center;
    color: #f8fafc;
    font-size: 14px;
    font-weight: 700;
}

.nkmcp-selected {
    display: block;
    width: 58px;
    height: 58px;
    margin: 7px auto 0;
    border: 3px solid #d1d5db;
    border-radius: 8px;
    box-shadow: inset 0 0 0 3px #17171c;
}

.nkmcp-actions {
    display: flex;
    justify-content: flex-end;
    gap: 24px;
    margin-top: 24px;
}

.nkmcp-action {
    min-width: 68px;
    min-height: 48px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #d9c4ff;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
}

.nkmcp-action:focus-visible,
.nkmcp-preset:focus-visible {
    outline: 3px solid #7dd3fc;
    outline-offset: 3px;
}

@media (max-height: 680px) {
    .nkmcp-panel {
        padding-top: 18px;
        padding-bottom: 16px;
    }

    .nkmcp-title {
        margin-bottom: 12px;
        font-size: 21px;
    }

    .nkmcp-row {
        margin-top: 12px;
    }

    .nkmcp-summary,
    .nkmcp-actions {
        margin-top: 17px;
    }
}
