.sn-root.is-dialog {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.sn-root.is-dialog .sn-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
    background: rgba(226, 232, 240, 0.78);
}

.sn-root.is-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483000;
}

.sn-root.is-bar .sn-overlay {
    display: none;
}

.sn-dialog {
    position: relative;
    z-index: 2;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 720px;
    max-height: calc(100vh - 48px);
    overflow: hidden;
    background: #fff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

.sn-root.is-bar .sn-dialog {
    max-width: none;
    max-height: 70vh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12);
}

.sn-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 22px;
    padding: 14px 18px 8px;
}

.sn-mark {
    display: block;
}

.sn-brand {
    color: #4b5563;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.sn-tabs {
    display: flex;
    flex: none;
    border-bottom: 1px solid #e5e7eb;
    margin: 0;
}

.sn-body {
    flex: 1 1 auto;
    overflow: auto;
    padding: 14px 18px 8px;
}

.sn-tab {
    flex: 1;
    position: relative;
    z-index: 3;
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    color: #6b7280;
    font-size: 14px;
    padding: 8px 6px 10px;
    cursor: pointer;
    pointer-events: auto;
}

.sn-tab.is-active {
    color: #111827;
    border-bottom-color: var(--sn-blue);
    font-weight: 700;
}

.sn-pane {
    display: none;
}

.sn-pane.is-active {
    display: block;
}

.sn-lead {
    margin: 0 0 8px;
    color: #111827;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.sn-copy,
.sn-about,
.sn-detail {
    font-size: 13px;
    line-height: 1.45;
    color: #374151;
}

.sn-copy p,
.sn-about p {
    margin: 0 0 8px;
}

.sn-foot {
    flex: none;
    padding: 12px 16px 16px;
    border-top: 1px solid #eceff3;
    background: #fff;
}

.sn-cats {
    display: flex;
    margin: 0 0 10px;
    border: 1px solid #e6e8ee;
    border-radius: 6px;
    overflow: hidden;
}

.sn-cat {
    flex: 1;
    text-align: center;
    padding: 10px 6px 12px;
    border-right: 1px solid #e6e8ee;
}

.sn-cat:last-child {
    border-right: 0;
}

.sn-cat-name {
    display: block;
    min-height: 32px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #111827;
}

.sn-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex: none;
}

.sn-switch input {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.sn-switch span {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: #d1d5db;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.sn-switch span:before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.15s ease;
}

.sn-switch input:checked + span {
    background: var(--sn-blue);
}

.sn-switch input:checked + span:before {
    transform: translateX(18px);
}

.sn-switch input:disabled {
    cursor: default;
}

.sn-switch input:disabled + span {
    cursor: default;
    opacity: 0.72;
}

.sn-btns {
    display: flex;
    gap: 8px;
}

.sn-choice {
    flex: 1;
    border: 0;
    border-radius: 4px;
    background: var(--sn-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    padding: 10px 8px;
    cursor: pointer;
}

.sn-choice:hover {
    filter: brightness(1.08);
}

.sn-acc {
    border-bottom: 1px solid #eceff3;
    padding: 12px 0;
}

.sn-acc-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sn-acc-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1f2937;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.sn-acc.is-open .sn-acc-btn {
    color: var(--sn-blue);
}

.sn-chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    margin-top: -2px;
}

.sn-acc.is-open .sn-chevron {
    transform: rotate(45deg);
    margin-top: -4px;
}

.sn-acc-body {
    display: none;
    margin: 8px 0 0 18px;
    font-size: 13px;
    line-height: 1.5;
    color: #374151;
}

.sn-acc.is-open .sn-acc-body {
    display: block;
}

.sn-acc-body p {
    margin: 0;
}

.sn-detail {
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.sn-detail strong {
    display: block;
    margin-bottom: 2px;
    color: #111827;
}

.sn-popup {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.sn-popup[hidden] {
    display: none !important;
}

.sn-popup-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: #000;
    opacity: 0.7;
}

.sn-popup-modal {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    color: #111;
    padding: 28px 24px 24px;
    box-sizing: border-box;
}

.sn-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.sn-popup-close:before,
.sn-popup-close:after {
    content: "";
    position: absolute;
    top: 15px;
    left: 8px;
    width: 16px;
    height: 2px;
    background: #111;
}

.sn-popup-close:before { transform: rotate(45deg); }
.sn-popup-close:after { transform: rotate(-45deg); }

.sn-popup-body img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 700px) {
    .sn-cats,
    .sn-btns {
        flex-wrap: wrap;
    }

    .sn-cat,
    .sn-choice {
        flex: 1 1 40%;
    }
}
