.thts-slider,
.thts-slider * {
    box-sizing: border-box;
}

.thts-slider {
    width: 100%;
    max-width: var(--thts-max-width, 1120px);
    margin-left: auto;
    margin-right: auto;
    position: relative;
    color: var(--thts-text-color, #111111);
    font-family: inherit;
}

.thts-viewport {
    width: 100%;
    overflow: hidden;
}

.thts-track {
    display: flex;
    width: 100%;
    transition: transform 620ms cubic-bezier(.65, 0, .35, 1);
    will-change: transform;
}

/* =============================
   Layout 1: card + large image
============================= */
.thts-layout-1 .thts-slide {
    width: 100%;
    min-width: 100%;
    display: grid;
    grid-template-columns: minmax(260px, var(--thts-card-width, 33%)) minmax(0, var(--thts-image-width, 67%));
    gap: var(--thts-gap, 14px);
    align-items: stretch;
}

.thts-layout-1 .thts-card {
    min-height: var(--thts-desktop-height, 474px);
    height: var(--thts-desktop-height, 474px);
    background: var(--thts-card-bg, #eeeeee);
    border-radius: var(--thts-radius, 6px);
    padding: var(--thts-card-padding-top, 38px) var(--thts-card-padding-x, 14px) 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.thts-author {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    margin-bottom: 70px;
}

.thts-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex: 0 0 64px;
}

.thts-author-text {
    min-width: 0;
}

.thts-name,
.thts-stack-name {
    margin: 0;
    padding: 0;
    color: var(--thts-text-color, #111111);
    font-weight: 400;
    letter-spacing: -0.03em;
}

.thts-name {
    font-size: 20px;
    line-height: 1.05;
}

.thts-role,
.thts-stack-role {
    color: var(--thts-muted-color, #111111);
    font-weight: 400;
}

.thts-role {
    font-size: 14px;
    line-height: 1.15;
    margin-top: 2px;
}

.thts-quote {
    color: var(--thts-text-color, #111111);
    font-size: var(--thts-quote-font-size, 31px);
    line-height: var(--thts-quote-line-height, 1.35);
    font-weight: 400;
    letter-spacing: -0.055em;
}

.thts-quote p,
.thts-stack-quote p {
    margin: 0 0 0.8em;
}

.thts-quote p:last-child,
.thts-stack-quote p:last-child {
    margin-bottom: 0;
}

.thts-stars,
.thts-stack-stars {
    margin-top: auto;
    color: var(--thts-star-color, #ffcc42);
    line-height: 1;
    white-space: nowrap;
}

.thts-stars {
    font-size: 36px;
    letter-spacing: 2px;
}

.thts-stars .is-empty,
.thts-stack-stars .is-empty {
    opacity: 0.28;
}

.thts-image-wrap {
    height: var(--thts-desktop-height, 474px);
    min-height: var(--thts-desktop-height, 474px);
    border-radius: var(--thts-radius, 6px);
    overflow: hidden;
    background: #dedede;
}

.thts-main-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

/* =============================
   Layout 2: stacked card carousel
============================= */
.thts-layout-2 {
    overflow: visible;
}

.thts-layout-2 .thts-viewport {
    padding: calc(var(--thts-l2-avatar-size, 70px) * 0.7) 8px 34px;
}

.thts-layout-2 .thts-track {
    gap: var(--thts-l2-gap, 90px);
    align-items: stretch;
}

.thts-card-slide {
    flex: 0 0 calc((100% - (var(--thts-l2-gap, 90px) * (var(--thts-l2-visible, 3) - 1))) / var(--thts-l2-visible, 3));
    min-width: 0;
    padding: 0 0 26px;
    display: block;
}

.thts-stack-card {
    width: 100%;
    height: var(--thts-l2-card-height, 330px);
    position: relative;
}

.thts-stack-back {
    position: absolute;
    inset: -10px -18px 10px 18px;
    border-radius: var(--thts-radius, 6px);
    z-index: 1;
    transform-origin: 50% 50%;
}

.thts-stack-front {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    background: var(--thts-l2-card-bg, #eeeeee);
    border-radius: var(--thts-radius, 6px);
    padding: calc(var(--thts-l2-avatar-size, 70px) * 0.65) 26px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--thts-text-color, #111111);
    overflow: visible;
}

.thts-stack-avatar {
    width: var(--thts-l2-avatar-size, 70px);
    height: var(--thts-l2-avatar-size, 70px);
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: calc(var(--thts-l2-avatar-size, 70px) * -0.5);
    left: 50%;
    transform: translateX(-50%);
    display: block;
}

.thts-stack-head {
    margin-bottom: 24px;
}

.thts-stack-name {
    font-size: var(--thts-l2-name-size, 18px);
    line-height: 1;
}

.thts-stack-role {
    font-size: var(--thts-l2-role-size, 13px);
    line-height: 1.1;
    margin-top: 2px;
}

.thts-stack-quote {
    font-size: var(--thts-l2-quote-size, 20px);
    line-height: var(--thts-l2-quote-line-height, 1.15);
    letter-spacing: -0.055em;
    color: var(--thts-text-color, #111111);
    max-width: 92%;
    margin-left: auto;
    margin-right: auto;
}

.thts-stack-stars {
    font-size: var(--thts-l2-star-size, 26px);
    letter-spacing: 4px;
    margin-bottom: 0;
}

/* Navigation */
.thts-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid currentColor;
    background: rgba(255, 255, 255, 0.86);
    color: var(--thts-nav-color, #111111);
    font-size: 34px;
    line-height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: opacity 200ms ease, transform 200ms ease;
}

.thts-arrow:hover {
    transform: translateY(-50%) scale(1.04);
}

.thts-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.thts-prev {
    left: -58px;
}

.thts-next {
    right: -58px;
}

.thts-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 20px;
}

.thts-layout-2 .thts-dots {
    margin-top: 0;
}

.thts-dot {
    width: 8px;
    height: 8px;
    border-radius: 99px;
    border: 0;
    background: var(--thts-nav-color, #111111);
    opacity: 0.25;
    padding: 0;
    cursor: pointer;
    transition: opacity 200ms ease, width 200ms ease;
}

.thts-dot.is-active {
    opacity: 1;
    width: 22px;
}

.thts-empty {
    max-width: 900px;
    margin: 20px auto;
    padding: 16px;
    background: #fff8e5;
    border: 1px solid #f0d27a;
}

@media (max-width: 1280px) {
    .thts-prev { left: 12px; }
    .thts-next { right: 12px; }
}

@media (max-width: 1024px) {
    .thts-layout-1 .thts-slide {
        grid-template-columns: minmax(260px, 36%) minmax(0, 64%);
    }

    .thts-layout-1 .thts-card,
    .thts-image-wrap {
        height: var(--thts-tablet-height, 390px);
        min-height: var(--thts-tablet-height, 390px);
    }

    .thts-author { margin-bottom: 42px; }

    .thts-quote {
        font-size: clamp(23px, 3vw, var(--thts-quote-font-size, 31px));
    }

    .thts-card-slide {
        flex-basis: calc((100% - (var(--thts-l2-gap, 90px) * (var(--thts-l2-visible, 2) - 1))) / var(--thts-l2-visible, 2));
    }
}

@media (max-width: 767px) {
    .thts-layout-1 .thts-slide {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .thts-layout-1 .thts-card {
        height: auto;
        min-height: 360px;
        padding: 30px 20px 18px;
        order: 1;
    }

    .thts-image-wrap {
        height: var(--thts-mobile-image-height, 260px);
        min-height: var(--thts-mobile-image-height, 260px);
        order: 2;
    }

    .thts-author { margin-bottom: 44px; }
    .thts-name { font-size: 19px; }
    .thts-role { font-size: 13px; }

    .thts-quote {
        font-size: clamp(25px, 8vw, 34px);
        line-height: 1.28;
    }

    .thts-stars { font-size: 30px; }

    .thts-arrow {
        width: 36px;
        height: 36px;
        font-size: 28px;
    }

    .thts-card-slide {
        flex-basis: calc((100% - (var(--thts-l2-gap, 36px) * (var(--thts-l2-visible, 1) - 1))) / var(--thts-l2-visible, 1));
    }

    .thts-layout-2 .thts-track {
        gap: min(var(--thts-l2-gap, 36px), 36px);
    }

    .thts-stack-front {
        padding-left: 18px;
        padding-right: 18px;
    }

    .thts-stack-back {
        inset: -8px -10px 8px 10px;
    }
}
