.scm,
.scm *,
.scm *::before,
.scm *::after {
    box-sizing: border-box;
}

.scm {
    position: fixed;
    inset: 0;
    z-index: var(--scm-z);
    pointer-events: none;
    color: var(--scm-text);
    font: 400 var(--scm-text-size)/1.48 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.scm-scroll-locked {
    overflow: hidden;
}

.scm__overlay {
    position: absolute;
    inset: 0;
    background: var(--scm-overlay);
    backdrop-filter: blur(var(--scm-overlay-blur));
    pointer-events: auto;
}

.scm__panel {
    position: absolute;
    width: min(calc(100vw - (var(--scm-margin) * 2)), var(--scm-width));
    max-height: var(--scm-max-height);
    overflow: auto;
    padding: var(--scm-padding);
    border: var(--scm-border-width) solid var(--scm-border);
    border-radius: var(--scm-radius);
    background: var(--scm-bg);
    box-shadow: var(--scm-shadow);
    pointer-events: auto;
    opacity: 0;
    scrollbar-width: thin;
    transition:
        opacity var(--scm-animation-ms) ease,
        transform var(--scm-animation-ms) ease;
}

.scm-is-visible .scm__panel {
    opacity: 1;
}

.scm--animation-none .scm__panel {
    transition: none;
}

.scm--animation-fade-slide:not(.scm-is-visible) .scm__panel {
    translate: 0 12px;
}

.scm--animation-fade-slide.scm-is-visible .scm__panel {
    translate: 0 0;
}

.scm--desktop-bottom-center .scm__panel {
    right: 50%;
    bottom: max(var(--scm-margin), calc(env(safe-area-inset-bottom, 0px) + var(--scm-offset)));
    transform: translateX(50%);
}

.scm--desktop-bottom-left .scm__panel {
    bottom: max(var(--scm-margin), calc(env(safe-area-inset-bottom, 0px) + var(--scm-offset)));
    left: var(--scm-margin);
}

.scm--desktop-bottom-right .scm__panel {
    right: var(--scm-margin);
    bottom: max(var(--scm-margin), calc(env(safe-area-inset-bottom, 0px) + var(--scm-offset)));
}

.scm--desktop-center .scm__panel,
.scm--desktop-modal .scm__panel,
.scm-is-settings .scm__panel {
    top: 50%;
    right: 50%;
    bottom: auto;
    left: auto;
    transform: translate(50%, -50%);
}

.scm--desktop-bar .scm__panel {
    right: 0;
    bottom: var(--scm-offset);
    left: 0;
    width: 100%;
    max-height: var(--scm-max-height);
    border-width: var(--scm-border-width) 0 0;
    border-radius: 0;
    transform: none;
}

.scm__header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.scm__logo {
    flex: 0 0 var(--scm-image-size);
    width: var(--scm-image-size);
    height: var(--scm-image-size);
    border-radius: min(12px, calc(var(--scm-image-size) / 4));
    object-fit: contain;
}

.scm__logo--default {
    display: grid;
    place-items: center;
    color: var(--scm-primary-text);
    background: var(--scm-accent);
}

.scm__heading {
    min-width: 0;
    flex: 1;
}

.scm__title,
.scm__settings-title {
    margin: 0 0 7px;
    color: var(--scm-text);
    font-size: var(--scm-title-size);
    line-height: 1.25;
}

.scm__description {
    margin: 0;
    color: var(--scm-muted);
}

.scm__description > :first-child {
    margin-top: 0;
}

.scm__description > :last-child {
    margin-bottom: 0;
}

.scm__close {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    margin: -6px -6px 0 0;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--scm-muted);
    background: transparent;
    font: 400 25px/1 sans-serif;
    cursor: pointer;
}

.scm__close:hover {
    color: var(--scm-text);
    background: var(--scm-secondary-bg);
}

.scm__settings {
    margin-top: 20px;
}

.scm__category {
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--scm-border);
}

.scm__category--static .scm__category-header {
    cursor: default;
}

.scm__category--static .scm__category-header::before {
    display: none;
}

.scm__category-header {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 2px;
    color: inherit;
    cursor: pointer;
    list-style: none;
}

.scm__category-header::-webkit-details-marker {
    display: none;
}

.scm__category-header::before {
    content: "";
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    transition: transform .18s ease;
}

.scm__category[open] .scm__category-header::before {
    transform: rotate(45deg) translate(-1px, -1px);
}

.scm__category-copy {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: 3px;
}

.scm__category-copy small,
.scm__service-list small {
    color: var(--scm-muted);
    font-size: var(--scm-label-size);
    font-weight: 400;
}

.scm__locked {
    flex: none;
    color: var(--scm-muted);
    font-size: calc(var(--scm-label-size) - 1px);
    font-weight: 500;
    white-space: nowrap;
}

.scm__switch {
    position: relative;
    flex: 0 0 44px;
    width: 44px;
    height: 24px;
    margin: 0;
}

.scm__switch input {
    position: absolute;
    opacity: 0;
}

.scm__switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #c8c8ce;
    cursor: pointer;
    transition: background .18s ease;
}

.scm__switch span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .22);
    transition: transform .18s ease;
}

.scm__switch input:checked + span {
    background: var(--scm-accent);
}

.scm__switch input:checked + span::after {
    transform: translateX(20px);
}

.scm__service-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0 2px 14px 24px;
    list-style: none;
}

.scm__service-list li {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.scm__service-list li > span {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.scm__service-list a {
    color: var(--scm-accent);
    font-size: calc(var(--scm-label-size) - 1px);
}

.scm__service-list em {
    flex: none;
    color: var(--scm-muted);
    font-size: calc(var(--scm-label-size) - 2px);
    font-style: normal;
}

.scm__service-empty {
    color: var(--scm-muted);
    font-size: var(--scm-label-size);
}

.scm__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 16px;
    margin-top: 16px;
    font-size: var(--scm-label-size);
}

.scm__legal:empty {
    display: none;
}

.scm__legal a,
.scm__button--link,
.scm-settings-link {
    color: var(--scm-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.scm-settings-link {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.scm__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.scm--buttons-stack .scm__actions {
    display: grid;
    grid-template-columns: 1fr;
}

.scm__button {
    min-height: var(--scm-button-height);
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: var(--scm-button-radius);
    font: inherit;
    font-size: var(--scm-button-size);
    font-weight: 600;
    cursor: pointer;
}

.scm__button--primary {
    color: var(--scm-primary-text);
    background: var(--scm-accent);
}

.scm__button--secondary {
    border-color: var(--scm-border);
    color: var(--scm-secondary-text);
    background: var(--scm-secondary-bg);
}

.scm__button--link {
    padding-inline: 8px;
    background: transparent;
    font-weight: 500;
}

.scm--order-reject-accept-customize [data-scm-reject] {
    order: 1;
}

.scm--order-reject-accept-customize [data-scm-accept] {
    order: 2;
}

.scm--order-reject-accept-customize [data-scm-customize] {
    order: 3;
}

.scm--order-customize-reject-accept [data-scm-customize] {
    order: 1;
}

.scm--order-customize-reject-accept [data-scm-reject] {
    order: 2;
}

.scm--order-customize-reject-accept [data-scm-accept] {
    order: 3;
}

.scm__live-notice {
    margin: 13px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    color: #704f00;
    background: #fff6d8;
    font-size: calc(var(--scm-label-size) - 1px);
}

.scm button:focus-visible,
.scm a:focus-visible,
.scm input:focus-visible,
.scm summary:focus-visible,
.scm-settings-link:focus-visible,
.scm-launcher:focus-visible {
    outline: 3px solid var(--scm-accent);
    outline: 3px solid color-mix(in srgb, var(--scm-accent) 35%, transparent);
    outline-offset: 2px;
}

.scm-launcher {
    position: fixed;
    bottom: calc(var(--scm-launcher-bottom) + env(safe-area-inset-bottom, 0px));
    z-index: calc(var(--scm-z) - 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 14px;
    border: 0;
    border-radius: 999px;
    color: var(--scm-launcher-color);
    background: var(--scm-launcher-bg);
    box-shadow: 0 8px 28px rgba(20, 20, 30, .2);
    font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    cursor: pointer;
}

.scm-launcher--bottom-left {
    left: var(--scm-launcher-side);
}

.scm-launcher--bottom-right {
    right: var(--scm-launcher-side);
}

.scm-launcher--small {
    min-height: 36px;
    padding: 7px 11px;
    font-size: 12px;
}

.scm-launcher--large {
    min-height: 50px;
    padding: 12px 18px;
    font-size: 15px;
}

.scm-launcher--icon {
    width: 44px;
    min-height: 44px;
    padding: 0;
}

.scm-launcher--icon.scm-launcher--small {
    width: 36px;
    min-height: 36px;
}

.scm-launcher--icon.scm-launcher--large {
    width: 52px;
    min-height: 52px;
}

.scm-launcher--icon .scm-launcher__label {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.scm-launcher__icon {
    display: inline-grid;
    place-items: center;
}

.scm-launcher:hover {
    filter: brightness(.94);
}

.scm-is-mobile.scm--mobile-bottom-center .scm__panel {
    top: auto;
    right: 50%;
    bottom: max(var(--scm-margin), calc(env(safe-area-inset-bottom, 0px) + var(--scm-offset)));
    left: auto;
    transform: translateX(50%);
}

.scm-is-mobile.scm--mobile-bottom-left .scm__panel {
    top: auto;
    right: auto;
    bottom: max(var(--scm-margin), calc(env(safe-area-inset-bottom, 0px) + var(--scm-offset)));
    left: var(--scm-margin);
    transform: none;
}

.scm-is-mobile.scm--mobile-bottom-right .scm__panel {
    top: auto;
    right: var(--scm-margin);
    bottom: max(var(--scm-margin), calc(env(safe-area-inset-bottom, 0px) + var(--scm-offset)));
    left: auto;
    transform: none;
}

.scm-is-mobile.scm--mobile-center .scm__panel,
.scm-is-mobile.scm--mobile-modal .scm__panel,
.scm-is-mobile.scm-is-settings .scm__panel {
    top: 50%;
    right: 50%;
    bottom: auto;
    left: auto;
    transform: translate(50%, -50%);
}

.scm-is-mobile.scm--mobile-bar .scm__panel {
    top: auto;
    right: 0;
    bottom: var(--scm-offset);
    left: 0;
    width: 100%;
    max-height: var(--scm-max-height);
    border-width: var(--scm-border-width) 0 0;
    border-radius: 0;
    transform: none;
}

.scm-is-mobile.scm--mobile-buttons-stack .scm__actions {
    display: grid;
    grid-template-columns: 1fr;
}

.scm-is-mobile.scm--mobile-buttons-stack .scm__button {
    width: 100%;
}

.scm-is-mobile .scm__category-header {
    align-items: flex-start;
}

.scm-is-mobile .scm__locked {
    white-space: normal;
    text-align: right;
}

@media (prefers-reduced-motion: reduce) {
    .scm--respect-reduced-motion *,
    .scm--respect-reduced-motion *::before,
    .scm--respect-reduced-motion *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

.scm-flatpm-placeholder {
    display: none !important;
}

.scm-flatpm-fallback {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid var(--scm-border, #e6e6e6);
    border-radius: 10px;
    background: var(--scm-secondary-bg, #f3f4f6);
    color: var(--scm-muted, #666);
    font-size: 13px;
    line-height: 1.45;
    padding: 12px 14px;
}
