.ts-standalone-body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(255, 205, 148, 0.28), transparent 32%),
        linear-gradient(180deg, #f7efe6 0%, #ffffff 28%, #f7f2ed 100%);
    color: #1d2538;
    font-family: Georgia, serif;
}

.ts-public-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 18px 64px;
}

.ts-public-header {
    text-align: center;
    margin-bottom: 32px;
}

.ts-public-header h1 {
    margin: 8px 0 0;
    font-size: 2.7rem;
    line-height: 1.1;
}

.ts-kicker {
    color: #8f4f1f;
    text-transform: uppercase;
    letter-spacing: 0;
    font-size: 0.82rem;
}

.ts-public-grid {
    display: grid;
    gap: 28px;
}

.ts-card {
    overflow: hidden;
    border-radius: 26px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.08);
}

.ts-card-media {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1b1530 0%, #8f4f1f 100%);
}

.ts-rendered-image-link,
.ts-card-media img,
.ts-card-overlay,
.ts-card-text,
.ts-card-watermark {
    position: absolute;
}

.ts-rendered-image-link {
    inset: 0;
    display: block;
}

.ts-card-media img {
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ts-card-media.ts-rendered .ts-card-overlay,
.ts-card-media.ts-rendered .ts-card-text,
.ts-card-media.ts-rendered .ts-card-watermark {
    display: none;
}

.ts-card-overlay {
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

.ts-card-text {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    color: #fff;
    text-align: center;
    font-size: 2.4rem;
    line-height: 1.5;
    white-space: pre-line;
    z-index: 1;
    transform: translate(var(--ts-text-anchor, -50%), -50%);
}

.ts-card-watermark {
    z-index: 2;
    white-space: pre-line;
    transform: translate(var(--ts-watermark-anchor, -100%), -50%);
    pointer-events: none;
}

.ts-card-body {
    padding: 20px 18px 24px;
    background: #f7f4ef;
    color: var(--ts-body-text-color, #1d2538);
}

.ts-card-download-row {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.ts-download {
    appearance: none;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
    padding: 12px 20px;
    border-radius: 999px;
    background: linear-gradient(90deg, #6866e8 0%, var(--ts-download-bg, #04b8c7) 100%);
    color: #fff;
    text-decoration: none;
    font: inherit;
    font-size: clamp(14px, var(--ts-action-font-size, 16px), 18px);
    line-height: 1;
    box-shadow: 0 10px 24px rgba(17, 110, 206, 0.26);
}

.ts-download .ts-share-icon {
    width: 18px;
    height: 18px;
    background: transparent;
}

.ts-download .ts-share-icon svg {
    width: 18px;
    height: 18px;
}

.ts-text-panel {
    box-sizing: border-box;
    border: 2px solid #f09a24;
    border-radius: 18px;
    background: var(--ts-body-bg, #ffffff);
    padding: var(--ts-body-padding, 22px);
}

.ts-plain-text {
    font-size: var(--ts-body-font-size, 18px);
    line-height: var(--ts-body-line-height, 1.85);
    white-space: pre-line;
    margin-bottom: 20px;
    color: var(--ts-body-text-color, #1d2538);
    overflow-wrap: anywhere;
}

.ts-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.ts-share-label {
    color: #8d8d8d;
    font-style: italic;
    text-transform: uppercase;
    font-size: 14px;
}

.ts-card-actions a,
.ts-card-actions button {
    appearance: none;
    border: 0;
    cursor: pointer;
    padding: 0;
    background: transparent;
    color: inherit;
    text-decoration: none;
    font: inherit;
    max-width: 100%;
    min-width: 0;
}

.ts-share,
.ts-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
}

.ts-share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--ts-action-bg, #0084e8);
    color: var(--ts-action-color, #fff);
    flex: 0 0 auto;
}

.ts-share-icon svg {
    width: 18px;
    height: 18px;
}

.ts-share-whatsapp .ts-share-icon {
    background: #00d66b;
}

.ts-share-facebook .ts-share-icon {
    background: #0084e8;
}

.ts-share-x .ts-share-icon {
    background: #000000;
}

.ts-share-text {
    font-size: var(--ts-action-font-size, 16px);
    line-height: 1.2;
    min-width: 0;
    overflow-wrap: anywhere;
}

.ts-copy {
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--ts-copy-bg, #ff8900);
    color: var(--ts-copy-color, #fff);
}

.ts-copy .ts-share-icon {
    width: 30px;
    height: 30px;
    background: transparent;
    color: inherit;
}

.ts-copy .ts-share-icon svg {
    width: 16px;
    height: 16px;
}

.ts-display-icon .ts-share-text,
.ts-display-icon .ts-share-label {
    display: none;
}

.ts-display-text .ts-share-icon {
    display: none;
}

.ts-display-text .ts-share,
.ts-display-text .ts-copy {
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--ts-action-bg, #0084e8);
    color: var(--ts-action-color, #fff);
}

.ts-display-text .ts-share-whatsapp {
    background: #00d66b;
}

.ts-display-text .ts-share-facebook {
    background: #0084e8;
}

.ts-display-text .ts-share-x {
    background: #000000;
}

.ts-display-text .ts-copy {
    background: var(--ts-copy-bg, #ff8900);
    color: var(--ts-copy-color, #fff);
}

.ts-ad-slot {
    display: grid;
    place-items: center;
    min-height: 90px;
    padding: 18px;
    overflow: hidden;
    border: 1px dashed rgba(29, 37, 56, 0.24);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.ts-ratio-1-1 {
    aspect-ratio: 1 / 1;
}

.ts-ratio-4-5 {
    aspect-ratio: 4 / 5;
}

.ts-ratio-9-16 {
    aspect-ratio: 9 / 16;
}

@media (max-width: 640px) {
    .ts-public-shell {
        padding-inline: 12px;
    }

    .ts-public-header h1 {
        font-size: 2rem;
    }

    .ts-card {
        border-radius: 20px;
    }

    .ts-card-body {
        padding: 18px;
    }

    .ts-card-actions {
        gap: 8px;
    }

    .ts-download,
    .ts-copy,
    .ts-display-text .ts-share,
    .ts-display-text .ts-copy {
        max-width: 100%;
    }

    .ts-share-icon {
        width: 38px;
        height: 38px;
    }
}
