.td-paywall-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.td-paywall-dialog:not(.has-sample) .td-paywall-meta {
    padding-right: 44px;
}

.create-template-pro-badge {
    display: inline-flex;
    min-height: 18px;
    align-items: center;
    justify-content: center;
    border: 1px solid #f3cad9;
    border-radius: 999px;
    background: #fdf3f7;
    padding: 1px 7px;
    color: #bd4a78;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.2;
}

.td-paywall-price {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff3e3;
    padding: 0 12px;
    color: #332d2f;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}

.td-paywall-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(40, 34, 38, .42);
}

.td-paywall-dialog {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    width: min(440px, 100%);
    max-height: min(720px, calc(100vh - 40px));
    overflow: auto;
    border: 1px solid #eadbe1;
    border-radius: 10px;
    background: #fff;
    padding: 18px;
}

.td-paywall-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e3d9de;
    border-radius: 50%;
    background: #fff;
    color: #6c5d64;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(36, 31, 32, .12);
}

.td-paywall-close .glyphicon {
    display: block;
    width: 1em;
    height: 1em;
    line-height: 1;
    text-align: center;
}

.td-paywall-sample {
    display: grid;
    min-height: 150px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #e6dce1;
    border-radius: 8px;
    background: #f5f6f8;
    padding: 14px;
}

.td-paywall-sample img {
    display: block;
    max-width: 100%;
    max-height: 190px;
    object-fit: contain;
}

.td-paywall-body {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
    padding-top: 8px;
}

.td-paywall-body h2 {
    margin: 0;
    color: #332d2f;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.35;
}

.td-paywall-body p {
    margin: 0;
    color: #665c61;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
}

.td-paywall-note {
    color: #8b5c24 !important;
}

.td-purchase-benefits {
    display: grid;
    width: min(440px, 100%);
    gap: 8px;
    border: 1px solid #eadde2;
    border-radius: 8px;
    background: #fff9fb;
    padding: 12px 14px;
    color: #433b3f;
    text-align: left;
}

.td-purchase-benefits-heading {
    margin: 0;
    color: #433b3f;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.5;
}

.td-purchase-benefits-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.td-purchase-benefits-list li {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    gap: 6px;
    align-items: start;
    min-width: 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.td-purchase-benefit-icon {
    margin-top: 2px;
    color: #28835b;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
}

.td-paywall-body .td-purchase-benefits-list,
.td-paywall-lock-body .td-purchase-benefits-list {
    grid-template-columns: minmax(0, 1fr);
}

.td-paywall-actions {
    display: grid;
    gap: 8px;
    margin-top: 4px;
}

.td-paywall-primary,
.td-paywall-secondary {
    display: inline-flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
}

.td-paywall-primary {
    border: 1px solid #bd4a78;
    background: #bd4a78;
    color: #fff;
}

.td-paywall-primary:hover,
.td-paywall-primary:focus {
    background: #9f315b;
    color: #fff;
    text-decoration: none;
}

.td-paywall-primary.is-submitting,
.td-template-pack-buy:disabled {
  cursor: wait;
  opacity: 0.65;
  pointer-events: none;
}

.td-paywall-secondary {
    border: 1px solid #eadbe1;
    background: #fff;
    color: #5e5157;
    cursor: pointer;
}

.td-paywall-secondary:hover,
.td-paywall-secondary:focus {
    background: #fff6fa;
}

.td-app.is-paywall-locked .td-workspace {
    grid-template-columns: minmax(0, 1fr);
}

.td-app.is-paywall-locked .td-controls-column {
    display: none;
}

.td-app.is-paywall-locked .td-preview-panel {
    min-height: min(720px, calc(100vh - 180px));
}

/* ロック中は編集用の操作ヒント・サイズ表示を出さない */
.td-app.is-paywall-locked .td-preview-help-desktop,
.td-app.is-paywall-locked .td-preview-size-badge {
    display: none;
}

.td-paywall-lock-preview {
    display: grid;
    width: min(520px, calc(100% - 28px));
    margin: auto;
    place-items: center;
    gap: 16px;
    border: 1px solid #eadbe1;
    border-radius: 10px;
    background: #fff;
    padding: 20px;
    box-shadow: 0 18px 46px rgba(52, 43, 48, .12);
}

.td-paywall-lock-sample {
    display: grid;
    width: min(300px, 100%);
    aspect-ratio: 1 / 1;
    place-items: center;
    overflow: hidden;
    border: 1px solid #e6dce1;
    border-radius: 8px;
    background: #f5f6f8;
    padding: 16px;
}

.td-paywall-lock-sample img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.td-paywall-lock-body {
    display: grid;
    width: min(340px, 100%);
    gap: 12px;
    justify-items: stretch;
    text-align: center;
}

.td-paywall-lock-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.td-paywall-lock-title {
    display: block;
    color: #332d2f;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
}

.td-paywall-lock-description,
.td-paywall-lock-body .td-paywall-note {
    margin: 0;
    color: #6f6469;
    font-size: 13px;
    line-height: 1.65;
}

.td-paywall-lock-action {
    border: 0;
    cursor: pointer;
}

.td-pack-product-page {
    display: grid;
    box-sizing: border-box;
    width: min(760px, calc(100% - 28px));
    max-height: 100%;
    margin: auto;
    gap: 18px;
    overflow: auto;
    border: 1px solid #eadbe1;
    border-radius: 10px;
    background: #fff;
    padding: 20px;
    box-shadow: 0 18px 46px rgba(52, 43, 48, .12);
}

.td-pack-product-header {
    display: grid;
    gap: 10px;
    justify-items: center;
    text-align: center;
}

.td-pack-product-purchase {
    display: grid;
    gap: 10px;
    justify-items: center;
    text-align: center;
}

.td-pack-product-purchase .td-paywall-actions {
    width: 100%;
    max-width: 360px;
}

.td-pack-product-title {
    margin: 0;
    color: #332d2f;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.35;
}

.td-pack-product-description {
    max-width: 560px;
    margin: 0;
    color: #5f565a;
    font-size: 13px;
    line-height: 1.7;
}

.td-pack-product-action {
    min-width: min(280px, 100%);
}

.td-pack-product-note {
    margin: -2px 0 0;
    color: #7a7175;
    font-size: 12px;
    line-height: 1.6;
}

.td-pack-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.td-pack-product-item {
    display: grid;
    gap: 8px;
    align-content: start;
    min-width: 0;
    border: 1px solid #e8dde2;
    border-radius: 8px;
    background: #fffafd;
    padding: 10px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.td-pack-product-item.is-highlighted {
    border-color: #e94783;
    background: #fff4f8;
    box-shadow: 0 0 0 3px rgba(233, 71, 131, .18);
}

.td-pack-product-thumb {
    display: grid;
    aspect-ratio: 1 / 1;
    place-items: center;
    overflow: hidden;
    border: 1px solid #eee4e8;
    border-radius: 6px;
    background: #f6f7f9;
    padding: 8px;
    color: #9a9296;
    font-size: 11px;
}

.td-pack-product-thumb img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.td-pack-product-item-title {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
    color: #433b3f;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
    text-align: center;
}

@media (max-width: 640px) {
    .td-paywall-backdrop {
        align-items: start;
        padding: 12px;
    }

    .td-paywall-dialog {
        width: 100%;
        max-height: calc(100dvh - 24px);
        padding: 16px;
    }

    .td-paywall-lock-preview {
        width: calc(100% - 20px);
        padding: 16px;
    }

    .td-paywall-lock-sample {
        width: min(240px, 100%);
    }

    .td-pack-product-page {
        width: calc(100% - 20px);
        padding: 16px;
    }

    .td-pack-product-title {
        font-size: 19px;
    }

    .td-pack-product-purchase .td-purchase-benefits-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .td-pack-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
        gap: 10px;
    }

}
