.cp-tiktok-section { background: #f0ebff !important; padding-block: 32px !important; }
.cp-tiktok-section .cp-tiktok-header,
.cp-tiktok-section .cp-tiktok-row { width: calc(100% - 2 * var(--cp-home-gutter, 20px)) !important; max-width: none !important; margin-inline: auto; }
.cp-tiktok-section .cp-tiktok-header { margin-bottom: 22px; }
.cp-tiktok-section .col { padding-bottom: 0; }
.cp-tiktok-section .cp-tiktok-heading h2 { color: #100b28; font-size: 34px; font-weight: 800; line-height: 1.12; margin-bottom: 8px; text-transform: none; }
.cp-tiktok-section .cp-tiktok-heading p { color: #302c43; margin-bottom: 0; font-size: 18px; line-height: 1.4; }
.cp-tiktok-section .cp-tiktok-heading .cp-tiktok-eyebrow { color: #5d1587; font-size: 16px; font-weight: 700; margin-bottom: 6px; }
body.home .cp-tiktok-section .cp-tiktok-action .button { background: #5d1587 !important; color: #fff; border-radius: 8px; margin: 0; padding: 6px 16px; min-height: 36px; line-height: 1.3; font-size: 16px; letter-spacing: 0; text-transform: none; box-shadow: none !important; }
.cp-tiktok-section .cp-tiktok-action .button::after { content: '\2192'; margin-left: 8px; font-size: 18px; vertical-align: middle; }
.cp-tiktok-section .cp-tiktok-action .button:hover { background: #4b0f70; box-shadow: none; }
.cp-tiktok-gallery { position: relative; }
.cp-tiktok-progress { display: none; }
.cp-tiktok-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 70px) / 6); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px; scrollbar-width: none; }
.cp-tiktok-track::-webkit-scrollbar { display: none; }
.cp-tiktok-card { min-width: 0; scroll-snap-align: start; }
.cp-tiktok-video { display: block; position: relative; aspect-ratio: 9 / 16; border-radius: 8px; overflow: hidden; background: #5d1587; color: #fff; }
.cp-tiktok-video::after { content: ''; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.65)); pointer-events: none; }
.cp-tiktok-video img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.cp-tiktok-video:hover img { transform: scale(1.035); }
.cp-tiktok-preview { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; visibility: hidden; }
.cp-tiktok-video.is-playing .cp-tiktok-preview { visibility: visible; }
.cp-tiktok-video.is-playing .cp-tiktok-play { opacity: 0; }
.cp-tiktok-gallery .cp-tiktok-autoplay { position: absolute; top: 14px; left: 14px; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; min-height: 0; border: 0; border-radius: 50%; margin: 0; padding: 0; color: #100b28; background: #fff; box-shadow: 0 2px 8px #0002; }
.cp-tiktok-gallery .cp-tiktok-autoplay[hidden] { display: none; }
.cp-tiktok-autoplay .dashicons { font-family: dashicons !important; }
.cp-tiktok-play { display: grid; place-items: center; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #100b28; font-size: 20px; box-shadow: 0 2px 14px #0002; z-index: 1; }
.cp-tiktok-views { position: absolute; bottom: 12px; left: 12px; z-index: 1; font-size: 16px; font-weight: 700; color: #fff; }
.cp-tiktok-views .dashicons { font-family: dashicons !important; vertical-align: middle; width: 20px; height: 20px; font-size: 20px; margin-right: 4px; }
.cp-tiktok-gallery .cp-tiktok-next { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); display: grid; place-items: center; width: 38px; height: 38px; min-height: 0; border-radius: 50%; margin: 0; padding: 0; background: #fff; color: #5d1587; font-size: 30px; line-height: 1; border: 1px solid #ece6f3; box-shadow: 0 3px 12px rgba(27, 42, 75, .16); }
.cp-tiktok-video:focus-visible, .cp-tiktok-track:focus-visible, .cp-tiktok-close:focus-visible { outline: 3px solid #5d1587; outline-offset: 3px; }
.cp-tiktok-dialog { border: 0; border-radius: 8px; padding: 44px 12px 12px; background: #fff; width: min(390px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; }
.cp-tiktok-dialog::backdrop { background: rgba(0,0,0,.7); }
.cp-tiktok-dialog .cp-tiktok-close { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; padding: 0; margin: 0; border: 0; font-size: 28px; line-height: 1; background: transparent; color: #1b2a4b; }
.cp-tiktok-player { aspect-ratio: 9 / 16; max-height: calc(100dvh - 132px); }
.cp-tiktok-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.cp-tiktok-external { display: block; text-align: center; color: #5d1587; font-weight: 700; font-size: 14px; padding-top: 12px; }
@media (max-width: 1099px) {
    .cp-tiktok-track { grid-auto-columns: calc((100% - 56px) / 5); }
    .cp-tiktok-section .cp-tiktok-heading h2 { font-size: 30px; }
    body.home .cp-tiktok-section .cp-tiktok-action .button { padding: 6px 16px; font-size: 14px; }
}
@media (max-width: 849px) {
    .cp-tiktok-track { grid-auto-columns: calc((100% - 28px) / 3); }
    .cp-tiktok-section .cp-tiktok-header > .col { flex-basis: 100%; max-width: 100%; }
    .cp-tiktok-section .cp-tiktok-action { text-align: left !important; margin-top: 12px; }
    .cp-tiktok-section .cp-tiktok-action > .col-inner { text-align: left !important; }
}
@media (max-width: 549px) {
    .cp-tiktok-section { padding-block: 20px !important; }
    .cp-tiktok-section .cp-tiktok-header { width: calc(100% - 2 * var(--cp-home-gutter, 16px)) !important; margin-bottom: 12px; }
    .cp-tiktok-section .cp-tiktok-row { width: calc(100% - 2 * var(--cp-home-gutter, 16px)) !important; }
    /* Symmetric end padding lets the first and last videos also snap centrally. */
    .cp-tiktok-gallery { --cp-tiktok-card-width: min(210px, calc((100vw - 32px) * .68)); }
    .cp-tiktok-track {
        width: 100%;
        box-sizing: border-box;
        grid-auto-columns: var(--cp-tiktok-card-width);
        gap: 12px;
        padding-inline: max(2px, calc((100% - var(--cp-tiktok-card-width)) / 2));
    }
    .cp-tiktok-card { scroll-snap-align: center; }
    .cp-tiktok-gallery .cp-tiktok-autoplay { left: calc((100% - var(--cp-tiktok-card-width)) / 2 + 14px); }
    .cp-tiktok-section .cp-tiktok-heading h2 { font-size: 24px; margin-bottom: 6px; }
    .cp-tiktok-section .cp-tiktok-heading p { font-size: 15px; }
    .cp-tiktok-section .cp-tiktok-heading .cp-tiktok-eyebrow { font-size: 14px; margin-bottom: 4px; }
    .cp-tiktok-section .cp-tiktok-action { margin-top: 8px; }
    .cp-tiktok-gallery .cp-tiktok-next { right: 4px; top: calc(50% - 14px); width: 38px; height: 38px; }
    .cp-tiktok-progress { display: flex; gap: 5px; margin-top: 6px; }
    .cp-tiktok-progress > .cp-tiktok-progress-segment {
        flex: 1 1 0;
        display: grid;
        align-items: center;
        height: 22px;
        min-height: 0;
        min-width: 0;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        cursor: pointer;
    }
    .cp-tiktok-progress-segment::after { content: ''; height: 5px; border-radius: 999px; background: rgba(0, 0, 0, .14); }
    .cp-tiktok-progress-segment.is-active::after { background: #5d1587; }
    .cp-tiktok-progress-segment:focus-visible { outline: 2px solid #5d1587; outline-offset: 2px; }
}
@media (prefers-reduced-motion: reduce) { .cp-tiktok-video img { transition: none; } }
