.pricing-section {
    margin-top: 1.7rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.credits-work-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.subscriptions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.unlock-grid {
    grid-template-columns: minmax(0, 1fr);
}

.pricing-card {
    padding: 1.5rem;
    min-width: 0;
}

.pricing-explainer {
    min-height: 100%;
}

.pricing-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.1rem;
    margin-bottom: 1.15rem;
}

.pricing-card-top > div {
    display: grid;
    gap: 0.4rem;
    min-width: 0;
}

.pricing-card-free {
    max-width: 640px;
}

.price {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    flex: 0 0 auto;
    min-width: max-content;
    max-width: 100%;
    font-size: clamp(2rem, 3.2vw, 2.65rem);
    font-weight: 900;
    line-height: 0.95;
    color: var(--text);
    letter-spacing: -0.035em;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.price span {
    display: inline-flex;
    align-items: baseline;
    font-size: 0.42em;
    line-height: 1;
    color: var(--text-muted);
    margin-left: 0.28rem;
    letter-spacing: 0;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.small {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.credit-count {
    margin: -0.25rem 0 0.45rem;
    color: var(--text-soft);
    font-weight: 700;
}

.unlock-status,
.plan-footnote {
    margin-bottom: 1.15rem;
}

.pricing-retention {
    margin: -0.35rem 0 1.15rem;
    color: var(--text-soft);
}

.purchase-consent-modal-card h2 {
    margin-bottom: 0.55rem;
}

.purchase-consent-copy {
    margin-bottom: 1rem;
    color: var(--text-soft);
}

.purchase-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    color: var(--text-soft);
    font-size: 0.94rem;
}

.purchase-consent-label input {
    margin-top: 0.2rem;
}

.purchase-consent-statement {
    margin: 0;
}

.purchase-consent-copy a,
.purchase-consent-statement a {
    color: var(--accent);
    font-weight: 700;
}

.purchase-consent-copy a:hover,
.purchase-consent-statement a:hover {
    color: var(--text);
}

.pricing-card ul {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 1.35rem;
}

.pricing-card li,
.pricing-card p,
.pricing-card h2,
.pricing-card h3 {
    overflow-wrap: anywhere;
}

.pricing-card .price {
    overflow-wrap: normal;
}

.pricing-card h2,
.pricing-card h3 {
    color: var(--text);
}

.badge {
    display: inline-flex;
    margin-left: 0.5rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #081321;
    background: linear-gradient(135deg, #b8f7ff, #8aa8ff);
}

.popular {
    border-color: rgba(143, 231, 255, 0.3);
    box-shadow: 0 28px 70px rgba(79, 154, 255, 0.18);
}

.current-plan-btn {
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.plan-notice {
    margin-top: 1rem;
    padding: 0.95rem 1.05rem;
    border-radius: 20px;
    color: var(--text-soft);
    background: rgba(143, 231, 255, 0.08);
    border: 1px solid rgba(143, 231, 255, 0.18);
}

.plan-warning {
    background: rgba(255, 187, 118, 0.09);
    border-color: rgba(255, 187, 118, 0.24);
}

.pricing-card.is-current {
    border-color: rgba(143, 231, 255, 0.34);
    box-shadow: 0 30px 72px rgba(79, 154, 255, 0.2);
}

.pricing-card.is-pending-cancel {
    border-color: rgba(255, 187, 118, 0.34);
}

.pricing-support-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.4rem 1.5rem;
    border-color: rgba(143, 231, 255, 0.2);
}

.pricing-support-card h2 {
    margin-bottom: 0.45rem;
}

.pricing-support-card .button {
    flex: 0 0 auto;
}

.cancel-plan-modal-card h2 {
    margin-bottom: 0.55rem;
}

.cancel-plan-details {
    display: grid;
    gap: 0.8rem;
    margin: 1rem 0 0.9rem;
}

.cancel-plan-detail {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.cancel-plan-label {
    display: block;
    margin-bottom: 0.28rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.cancel-plan-detail strong {
    color: var(--text);
    font-size: 1rem;
}

.cancel-plan-footnote {
    color: var(--text-soft);
}

@media (max-width: 1280px) {
    .pricing-grid,
    .credits-work-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pricing-card-top {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .pricing-card-free {
        max-width: none;
    }

    .price {
        justify-content: flex-start;
        font-size: clamp(2rem, 5vw, 2.45rem);
    }
}

@media (max-width: 1120px) {
    .pricing-grid,
    .subscriptions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .pricing-grid,
    .subscriptions-grid {
        grid-template-columns: 1fr;
    }

    .pricing-support-card {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .pricing-card {
        padding: 1.15rem;
        border-radius: 22px;
    }

    .pricing-grid,
    .credits-work-grid,
    .subscriptions-grid {
        gap: 0.85rem;
    }

    .pricing-card .button,
    .pricing-card button,
    .pricing-support-card .button {
        width: 100%;
    }

    .pricing-card-top {
        margin-bottom: 0.95rem;
    }

    .price {
        font-size: clamp(2rem, 12vw, 2.55rem);
    }

    .badge {
        margin: 0.4rem 0 0;
    }
}
