/* ================================================
   Turkey Store — Paywall & Purchase UI
   ================================================ */

/* Paywall Barrier */
.ts-paywall-barrier {
    margin: 32px 0;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(180deg, #fafafa 0%, #f0f0f0 100%);
}
.ts-paywall-lock {
    text-align: center;
    padding: 40px 24px;
}
.ts-paywall-icon {
    font-size: 2.5em;
    margin-bottom: 12px;
}
.ts-paywall-heading {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}
.ts-paywall-price {
    font-size: 1.8em;
    font-weight: bold;
    color: #1a1a1a;
    margin: 16px 0;
}
.ts-paywall-desc {
    font-size: 0.92em;
    color: #666;
    margin-bottom: 20px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}
.ts-paywall-login-note {
    font-size: 0.8em;
    color: #888;
    margin-top: 12px;
}

/* Paywall Benefits */
.ts-paywall-benefits {
    text-align: left;
    max-width: 420px;
    margin: 16px auto 20px;
    font-size: 0.88em;
}
.ts-paywall-benefits-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95em;
}
.ts-paywall-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}
.ts-paywall-benefits li {
    padding: 4px 0 4px 22px;
    position: relative;
    color: #555;
    line-height: 1.6;
}
.ts-paywall-benefits li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #2e7d32;
    font-weight: bold;
}
.ts-paywall-filelist {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 10px;
}
.ts-paywall-file {
    display: inline-block;
    background: #e8eaf0;
    color: #555;
    font-size: 0.78em;
    padding: 4px 10px;
    border-radius: 4px;
}

/* Purchase Button */
.ts-buy-btn {
    display: inline-block;
    padding: 14px 40px;
    font-size: 1.05em;
    font-weight: bold;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
}
.ts-buy-btn:hover { opacity: 0.9; }
.ts-buy-btn:active { transform: scale(0.98); }
.ts-buy-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Download Box ([turkey_download]) */
.ts-download-box {
    margin: 28px 0;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #fafafa;
}
.ts-download-box .ts-paywall-unlocked-badge { margin: 16px 16px 0; }
.ts-download-box .ts-dl-section { margin: 0; border: none; border-radius: 0; }
.ts-download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
}
.ts-adobe-affiliate-btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 6px;
    background: #e1251b;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    line-height: 1.4;
}
.ts-adobe-affiliate-btn:hover {
    color: #fff;
    opacity: 0.9;
}
.ts-download-offer {
    text-align: center;
    padding: 32px 24px;
}
.ts-download-offer-title {
    font-size: 1.05em;
    font-weight: bold;
    color: #333;
    margin-bottom: 6px;
}
.ts-download-offer-files {
    font-size: 0.88em;
    color: #666;
    margin-bottom: 10px;
}
.ts-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 12px 16px 16px;
}
.ts-product-meta-item {
    display: inline-block;
    background: #eef3f7;
    color: #344054;
    border: 1px solid #d9e2ec;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 0.84em;
    line-height: 1.4;
}

/* Template Catalog */
.ts-template-catalog {
    margin: 24px 0 48px;
}
.ts-template-tabs {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 0;
    margin-bottom: 20px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}
.ts-template-tabs a {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    color: #344054;
    text-decoration: none;
    font-size: 0.9em;
    background: #f8fafc;
}
.ts-template-tabs a:hover {
    background: #eef3f7;
}
.ts-template-tabs a.is-active {
    background: #101828;
    border-color: #101828;
    color: #fff;
}
.ts-template-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.ts-template-hub-card {
    display: block;
    padding: 18px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #fff;
    text-decoration: none;
    color: #101828;
}
.ts-template-hub-card:hover {
    border-color: #0073aa;
    background: #f8fafc;
}
.ts-template-parent-lead {
    margin: 0 0 28px;
    padding: 22px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}
.ts-template-parent-lead h2 {
    margin: 0 0 8px;
    font-size: 1.35em;
    line-height: 1.35;
}
.ts-template-parent-lead p {
    margin: 0;
    color: #475467;
    line-height: 1.75;
}
.ts-template-parent-section,
.ts-template-parent-categories {
    margin: 0 0 42px;
}
.ts-template-parent-categories {
    display: none;
}
.ts-template-parent-cta {
    margin: 18px 0 0;
    text-align: center;
}
.ts-template-parent-cta a {
    display: inline-block;
    padding: 11px 18px;
    border-radius: 6px;
    background: #0073aa;
    color: #fff;
    font-weight: bold;
    line-height: 1.4;
    text-decoration: none;
}
.ts-template-parent-cta a:hover {
    color: #fff;
    opacity: 0.9;
}
.ts-template-hub-name {
    display: block;
    font-weight: bold;
    font-size: 1.05em;
    margin-bottom: 6px;
}
.ts-template-hub-count {
    display: inline-block;
    color: #0073aa;
    font-weight: bold;
    margin-bottom: 8px;
}
.ts-template-hub-desc {
    display: block;
    color: #667085;
    font-size: 0.9em;
    line-height: 1.6;
}
.ts-template-section {
    scroll-margin-top: 84px;
    margin: 0 0 44px;
}
.ts-template-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 2px solid #101828;
    padding-bottom: 8px;
    margin-bottom: 10px;
}
.ts-template-section-head h2 {
    font-size: 1.35em;
    margin: 0;
}
.ts-template-section-head span {
    color: #667085;
    font-size: 0.9em;
}
.ts-template-section-desc {
    color: #667085;
    margin: 0 0 18px;
}
.ts-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}
.ts-template-grid-home {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.tt-template-home {
    margin: 0 auto;
    max-width: 1180px;
    padding: 42px 20px 64px;
}
.tt-lp {
    color: #101828;
}
.tt-lp-hero-copy {
    max-width: 860px;
}
.tt-lp-hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}
.tt-lp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
    box-sizing: border-box;
}
.tt-lp-btn-free {
    background: #218739;
    color: #fff;
}
.tt-lp-btn-free:hover {
    color: #fff;
    opacity: 0.92;
}
.tt-lp-btn-ghost {
    border: 1px solid rgba(255,255,255,0.8);
    color: #fff;
    background: rgba(16,24,40,0.35);
}
.tt-lp-btn-ghost:hover {
    color: #fff;
    background: rgba(16,24,40,0.55);
}
.tt-lp-proof {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin: -14px 0 44px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #e5e7eb;
}
.tt-lp-proof div {
    padding: 18px 16px;
    background: #fff;
}
.tt-lp-proof strong,
.tt-lp-proof span {
    display: block;
}
.tt-lp-proof strong {
    color: #0073aa;
    font-size: 1.2em;
    line-height: 1.35;
}
.tt-lp-proof span {
    color: #475467;
    font-size: 0.86em;
    margin-top: 3px;
}
.tt-lp-starter {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 24px;
    margin: -14px 0 50px;
    padding: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    overflow: visible;
}
.tt-lp-starter-copy,
.tt-lp-starter-visual {
    min-width: 0;
}
.tt-lp-kicker {
    display: inline-block;
    margin-bottom: 8px;
    color: #0073aa;
    font-size: 0.78em;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}
.tt-lp-starter h2 {
    margin: 0 0 10px;
    font-size: 1.45em;
    line-height: 1.42;
}
.tt-lp-starter p {
    margin: 0 0 16px;
    color: #475467;
    line-height: 1.75;
}
.tt-lp-feature-table {
    width: 100%;
    margin: 0 0 16px;
    border-collapse: collapse;
    font-size: 0.92em;
}
.tt-lp-feature-table th,
.tt-lp-feature-table td {
    padding: 10px 0;
    border-bottom: 1px solid #edf1f5;
    vertical-align: top;
    line-height: 1.55;
}
.tt-lp-feature-table th {
    width: 36%;
    color: #101828;
    font-weight: 800;
    text-align: left;
}
.tt-lp-feature-table td {
    color: #475467;
}
.tt-lp-inline-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 6px;
    background: #218739;
    color: #fff;
    font-weight: 800;
    line-height: 1.35;
    text-decoration: none;
}
.tt-lp-inline-cta:hover {
    color: #fff;
    opacity: 0.92;
}
.tt-lp-starter-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
    align-self: center;
}
.tt-lp-preview-card {
    position: relative;
    display: block;
    min-height: 120px;
    overflow: hidden;
    border-radius: 8px;
    background: #101828;
    color: #fff;
    text-decoration: none;
}
.tt-lp-preview-card.is-main {
    grid-row: span 2;
    min-height: 250px;
}
.tt-lp-preview-card img {
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: block;
    object-fit: cover;
}
.tt-lp-preview-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(16,24,40,0) 38%, rgba(16,24,40,0.78) 100%);
}
.tt-lp-preview-card span {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 1;
    color: #fff;
    font-size: 0.84em;
    font-weight: 800;
    line-height: 1.35;
}
.tt-lp-section {
    margin: 0 0 58px;
}
.tt-lp-section-head {
    max-width: 780px;
    margin: 0 0 20px;
    border-bottom: 2px solid #101828;
    padding-bottom: 12px;
}
.tt-lp-section-head span {
    display: block;
    margin-bottom: 5px;
    color: #0073aa;
    font-size: 0.78em;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}
.tt-lp-section-head h2 {
    margin: 0;
    font-size: 1.55em;
    line-height: 1.4;
}
.tt-lp-section-head p {
    margin: 8px 0 0;
    color: #475467;
    line-height: 1.75;
}
.tt-lp-tutorial-grid,
.tt-lp-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.tt-lp-tutorial-card,
.tt-lp-category-grid a {
    display: block;
    min-height: 128px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #101828;
    text-decoration: none;
}
.tt-lp-tutorial-card:hover,
.tt-lp-category-grid a:hover {
    border-color: #0073aa;
    background: #f8fafc;
}
.tt-lp-tutorial-card span {
    display: inline-block;
    margin-bottom: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    background: #eef3f7;
    color: #0073aa;
    font-size: 0.78em;
    font-weight: 700;
}
.tt-lp-tutorial-card strong,
.tt-lp-category-grid strong {
    display: block;
    line-height: 1.55;
}
.tt-lp-category-grid span {
    display: block;
    margin-top: 8px;
    color: #667085;
    font-size: 0.86em;
    line-height: 1.55;
}
.tt-lp-final-cta {
    padding: 30px 24px;
    border-radius: 8px;
    background: #101828;
    color: #fff;
    text-align: center;
}
.tt-lp-final-cta h2 {
    margin: 0 0 8px;
    font-size: 1.45em;
}
.tt-lp-final-cta p {
    max-width: 720px;
    margin: 0 auto 18px;
    color: #e5e7eb;
    line-height: 1.75;
}
.tt-template-home .toc {
    display: none;
}
.tt-template-home-section {
    margin: 0 0 52px;
}
.tt-template-home-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    border-bottom: 2px solid #101828;
    padding-bottom: 10px;
}
.tt-template-home-head h2 {
    margin: 0;
    font-size: 1.55em;
}
.tt-template-home-head p {
    margin: 6px 0 0;
    color: #667085;
}
.tt-template-home-cta {
    text-align: center;
    margin: 24px 0 0;
}
.tt-template-home-btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 6px;
    background: #0073aa;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}
.tt-template-home-btn:hover {
    color: #fff;
    opacity: 0.9;
}
.tt-template-home-btn.is-free {
    background: #218739;
}
.tt-template-intro {
    margin: -10px auto 40px;
    max-width: 780px;
    text-align: center;
    color: #344054;
    line-height: 1.8;
}
.tt-template-article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.tt-template-article-card {
    display: block;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #101828;
    text-decoration: none;
}
.tt-template-article-card:hover {
    border-color: #0073aa;
    background: #f8fafc;
}
.tt-template-article-card span {
    display: block;
    color: #0073aa;
    font-size: 0.82em;
    font-weight: bold;
    margin-bottom: 8px;
}
.tt-template-article-card strong {
    display: block;
    line-height: 1.55;
}
@media (max-width: 640px) {
    .ts-template-grid-home,
    .tt-template-article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .tt-template-home {
        padding: 30px 12px 46px;
    }
    .tt-lp-hero-actions {
        gap: 8px;
        margin-top: 16px;
    }
    .tt-lp-btn {
        width: min(100%, 260px);
        min-height: 42px;
        padding: 10px 14px;
        font-size: 0.9em;
    }
    .tt-lp-proof {
        grid-template-columns: 1fr;
        margin: -6px 0 30px;
    }
    .tt-lp-starter {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: -6px 0 34px;
        padding: 14px;
    }
    .tt-lp-starter h2 {
        font-size: 1.14em;
    }
    .tt-lp-starter p,
    .tt-lp-feature-table {
        font-size: 0.86em;
    }
    .tt-lp-feature-table th,
    .tt-lp-feature-table td {
        display: block;
        width: 100%;
        padding: 7px 0 0;
        border-bottom: 0;
    }
    .tt-lp-feature-table tr {
        display: block;
        padding: 0 0 10px;
        border-bottom: 1px solid #edf1f5;
    }
    .tt-lp-inline-cta {
        width: 100%;
        box-sizing: border-box;
    }
    .tt-lp-starter-visual {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .tt-lp-preview-card,
    .tt-lp-preview-card.is-main {
        grid-row: auto;
        min-height: 92px;
    }
    .tt-lp-preview-card span {
        font-size: 0.72em;
    }
    .tt-lp-proof div {
        padding: 13px 14px;
    }
    .tt-lp-section {
        margin-bottom: 40px;
    }
    .tt-lp-section-head {
        margin-bottom: 14px;
        padding-bottom: 10px;
    }
    .tt-lp-section-head h2 {
        font-size: 1.18em;
    }
    .tt-lp-section-head p {
        font-size: 0.88em;
        line-height: 1.65;
    }
    .tt-lp-tutorial-grid,
    .tt-lp-category-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .tt-lp-tutorial-card,
    .tt-lp-category-grid a {
        min-height: auto;
        padding: 13px;
    }
    .tt-lp-final-cta {
        padding: 22px 16px;
    }
    .tt-lp-final-cta h2 {
        font-size: 1.15em;
    }
    .tt-template-home-head {
        display: block;
    }
    .tt-template-home-head h2 {
        font-size: 1.25em;
    }
    .ts-template-grid-home .ts-template-card-title,
    .tt-template-article-card strong {
        font-size: 0.9em;
    }
    .ts-template-grid-home .ts-template-card-meta {
        display: none;
    }
    .ts-template-grid-home .ts-template-card-body,
    .tt-template-article-card {
        padding: 10px;
    }
    .ts-template-card-foot {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 8px;
    }
    .ts-template-price {
        font-size: 0.94em;
        line-height: 1.2;
    }
    .ts-template-detail {
        display: block;
        width: 100%;
        min-height: 36px;
        padding: 8px 6px;
        font-size: 0.82em;
        line-height: 1.35;
        text-align: center;
        white-space: normal;
    }
    .ts-template-parent-lead {
        margin-bottom: 18px;
        padding: 16px 14px;
    }
    .ts-template-parent-lead h2 {
        font-size: 1.15em;
    }
    .ts-template-parent-lead p {
        font-size: 0.88em;
        line-height: 1.65;
    }
    .ts-template-parent-section,
    .ts-template-parent-categories {
        margin-bottom: 30px;
    }
    .ts-template-parent .ts-template-section-head {
        display: flex;
        align-items: baseline;
        margin-bottom: 10px;
    }
    .ts-template-parent .ts-template-section-head h2 {
        font-size: 1.08em;
    }
    .ts-template-parent-cta a {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
}
.ts-template-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.ts-template-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    background: #101828;
    overflow: hidden;
}
.ts-template-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ts-template-thumb-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #fff;
    font-weight: bold;
}
.ts-template-card-body {
    padding: 14px;
}
.ts-template-card-title {
    font-size: 1em;
    font-weight: bold;
    line-height: 1.5;
    margin: 0 0 10px;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.ts-template-card-title a {
    color: #101828;
    text-decoration: none;
}
.ts-template-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.ts-template-card-meta span {
    background: #f2f4f7;
    border-radius: 4px;
    padding: 3px 7px;
    color: #475467;
    font-size: 0.78em;
}
.ts-template-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.ts-template-price {
    color: #101828;
    white-space: nowrap;
}
.ts-template-detail {
    display: inline-block;
    padding: 8px 10px;
    border-radius: 4px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    font-size: 0.86em;
    font-weight: bold;
    white-space: nowrap;
    box-sizing: border-box;
}
.ts-template-detail:hover {
    color: #fff;
    opacity: 0.9;
}
.ts-template-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin: 28px 0 0;
}
.ts-template-page-link a,
.ts-template-page-link span {
    display: inline-block;
    min-width: 36px;
    padding: 8px 11px;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    color: #344054;
    background: #fff;
}
.ts-template-page-link .current {
    background: #101828;
    border-color: #101828;
    color: #fff;
}

/* Unlocked Content */
.ts-paywall-unlocked {
    margin: 24px 0;
    border-left: 4px solid #2e7d32;
    padding-left: 0;
}
.ts-paywall-unlocked-badge {
    background: #e8f5e9;
    color: #2e7d32;
    display: inline-block;
    padding: 4px 14px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
    margin-bottom: 16px;
}
.ts-paywall-content {
    margin-bottom: 20px;
}

/* Download Section */
.ts-dl-section {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}
.ts-dl-heading {
    margin: 0 0 12px;
    font-size: 1em;
    color: #333;
}
.ts-download-btn {
    display: inline-block;
    padding: 10px 22px;
    margin: 4px 8px 4px 0;
    background: #2e7d32;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: bold;
    transition: opacity 0.15s;
}
.ts-download-btn:hover { opacity: 0.9; color: #fff; }

/* Processing (post-checkout, waiting for webhook) */
.ts-paywall-processing {
    text-align: center;
    padding: 40px 24px;
    margin: 32px 0;
    border: 2px dashed #4caf50;
    border-radius: 12px;
    background: #f1f8e9;
}
.ts-paywall-processing .ts-paywall-icon { font-size: 2em; }
.ts-paywall-processing .ts-paywall-message {
    font-size: 1.1em;
    color: #2e7d32;
    margin: 12px 0 8px;
}
.ts-paywall-processing .ts-paywall-sub {
    font-size: 0.85em;
    color: #666;
}

/* ================================================
   Modal
   ================================================ */
.ts-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 16px;
}
.ts-modal {
    background: #fff;
    max-width: 420px;
    width: 100%;
    border-radius: 12px;
    padding: 32px 28px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}
.ts-modal h3 {
    margin: 0 0 8px;
    font-size: 1.2em;
}
.ts-modal-desc {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 20px;
}
.ts-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.6em;
    cursor: pointer;
    color: #888;
    line-height: 1;
}
.ts-modal-close:hover { color: #222; }
.ts-modal-form label {
    display: block;
    margin-bottom: 14px;
    font-size: 0.9em;
    color: #333;
}
.ts-modal-form input {
    width: 100%;
    padding: 10px 12px;
    margin-top: 4px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
    box-sizing: border-box;
}
.ts-modal-form input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}
.ts-google-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    margin: 18px 0 16px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    background: #fff;
    color: #202124;
    font-weight: 700;
    font-size: 0.98em;
    line-height: 1.3;
    text-decoration: none;
    box-sizing: border-box;
}
.ts-google-login-btn:hover {
    background: #f8fafd;
    color: #202124;
    border-color: #c7d2fe;
}
.ts-google-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    color: #4285f4;
    font-family: Arial, sans-serif;
    font-size: 1.25em;
    font-weight: 700;
    flex: 0 0 auto;
}
.ts-login-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 16px;
    color: #777;
    font-size: 0.8em;
}
.ts-login-divider::before,
.ts-login-divider::after {
    content: "";
    height: 1px;
    background: #e3e6ea;
    flex: 1;
}
.ts-modal-submit {
    width: 100%;
    padding: 13px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    margin-top: 8px;
}
.ts-modal-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.ts-modal-submit:hover:not(:disabled) { opacity: 0.9; }
.ts-modal-message {
    margin-top: 14px;
    font-size: 0.9em;
    color: #555;
    min-height: 1.2em;
}
.ts-modal-message.ts-error { color: #c62828; }
.ts-modal-note {
    font-size: 0.78em;
    color: #888;
    margin-top: 16px;
    text-align: center;
}

/* ================================================
   My Page (v0.3.0)
   ================================================ */
.ts-my-page { padding: 24px 0; }
.ts-mypage-header { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #eee; }
.ts-mypage-greeting { font-size: 1.15em; font-weight: bold; color: #333; margin-bottom: 4px; }
.ts-mypage-email { font-size: 0.85em; color: #888; }
.ts-mypage-login { padding: 24px; background: #f9f9f9; border-radius: 8px; }
.ts-mypage-section { margin-bottom: 32px; }
.ts-mypage-section h3 { font-size: 1.1em; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid #0073aa; }
.ts-mypage-empty { color: #888; }
.ts-mypage-items { display: flex; flex-direction: column; gap: 14px; }
.ts-mypage-item {
    border: 1px solid #e0e0e0; border-radius: 10px; padding: 18px 20px; background: #fafafa;
}
.ts-mypage-item.ts-expired { opacity: 0.6; }
.ts-mypage-item-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.ts-mypage-item-title { font-weight: bold; color: #333; text-decoration: none; font-size: 1.05em; }
.ts-mypage-item-title:hover { color: #0073aa; }
.ts-mypage-item-meta { font-size: 0.82em; color: #888; margin-bottom: 12px; display: flex; gap: 16px; flex-wrap: wrap; }
.ts-mypage-item-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ts-btn {
    display: inline-block; padding: 8px 16px; border-radius: 5px; font-size: 0.85em;
    text-decoration: none; font-weight: bold; transition: opacity 0.15s;
}
.ts-btn:hover { opacity: 0.9; }
.ts-btn-primary { background: #0073aa; color: #fff; }
.ts-btn-primary:hover { color: #fff; }
.ts-btn-dl { background: #2e7d32; color: #fff; }
.ts-btn-dl:hover { color: #fff; }
.ts-btn-receipt { background: #555; color: #fff; }
.ts-btn-receipt:hover { color: #fff; }
.ts-badge { font-size: 0.75em; padding: 3px 8px; border-radius: 3px; font-weight: bold; }
.ts-badge-expired { background: #fce4ec; color: #c62828; }
.ts-history-table { width: 100%; border-collapse: collapse; font-size: 0.9em; }
.ts-history-table th, .ts-history-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; }
.ts-history-table th { background: #f5f5f5; font-weight: normal; color: #666; }
.ts-history-table a { color: #0073aa; }
.ts-mypage-actions { margin-top: 24px; display: flex; gap: 16px; }
.ts-mypage-link { color: #666; text-decoration: none; font-size: 0.85em; }
.ts-mypage-link:hover { color: #0073aa; }

/* My Page Login Form */
.ts-mypage-login-box {
    max-width: 420px;
    margin: 32px auto;
    padding: 32px 28px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
}
.ts-mypage-login-box h3 { margin: 0 0 8px; font-size: 1.2em; }
.ts-login-desc { font-size: 0.9em; color: #555; margin-bottom: 20px; }
.ts-login-form label {
    display: block; margin-bottom: 14px; font-size: 0.9em; color: #333;
}
.ts-login-form input {
    width: 100%; padding: 10px 12px; margin-top: 4px;
    border: 1px solid #ccc; border-radius: 6px; font-size: 1em; box-sizing: border-box;
}
.ts-login-form input:focus {
    border-color: #0073aa; outline: none; box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}
.ts-login-submit {
    width: 100%; padding: 13px; background: #0073aa; color: #fff;
    border: none; border-radius: 8px; font-size: 1em; font-weight: bold;
    cursor: pointer; margin-top: 8px;
}
.ts-login-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.ts-login-submit:hover:not(:disabled) { opacity: 0.9; }
.ts-login-message { margin-top: 12px; font-size: 0.9em; color: #555; min-height: 1.2em; }
.ts-login-message.ts-error { color: #c62828; }
.ts-login-links { margin-top: 16px; text-align: center; font-size: 0.85em; }
.ts-login-links a { color: #0073aa; text-decoration: none; }
.ts-login-note { margin-top: 12px; text-align: center; font-size: 0.78em; color: #888; }

/* Expired paywall */
.ts-paywall-expired { border-color: #ffcdd2; background: linear-gradient(180deg, #fff5f5 0%, #fce4ec 100%); }

/* ================================================
   Responsive
   ================================================ */
@media (max-width: 600px) {
    .ts-paywall-lock { padding: 28px 16px; }
    .ts-paywall-price { font-size: 1.4em; }
    .ts-buy-btn { padding: 12px 28px; font-size: 1em; }
    .ts-modal { padding: 24px 20px; }
    .ts-purchased-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Mobile product catalog cleanup for Cocoon page chrome */
@media (max-width: 640px) {
    .mobile-header-menu-buttons .logo-menu-button .menu-button-in {
        font-size: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-left: 4px;
        padding-right: 4px;
    }
    .mobile-header-menu-buttons .logo-menu-button .menu-button-in::after {
        content: "TurkeyTips";
        font-size: 14px;
        font-weight: 700;
        line-height: 1;
    }

    .page-id-13500 .article-header,
    .page-id-13817 .article-header,
    .page-id-13818 .article-header,
    .page-id-13819 .article-header,
    .page-id-13820 .article-header,
    .page-id-13821 .article-header {
        margin-bottom: 8px;
    }
    .page-id-13500 .entry-title,
    .page-id-13817 .entry-title,
    .page-id-13818 .entry-title,
    .page-id-13819 .entry-title,
    .page-id-13820 .entry-title,
    .page-id-13821 .entry-title {
        font-size: 1.35em;
        line-height: 1.35;
        margin-bottom: 10px;
    }
    .page-id-13500 .date-tags,
    .page-id-13817 .date-tags,
    .page-id-13818 .date-tags,
    .page-id-13819 .date-tags,
    .page-id-13820 .date-tags,
    .page-id-13821 .date-tags,
    .page-id-13500 .sns-share,
    .page-id-13817 .sns-share,
    .page-id-13818 .sns-share,
    .page-id-13819 .sns-share,
    .page-id-13820 .sns-share,
    .page-id-13821 .sns-share,
    .page-id-13500 .sns-follow,
    .page-id-13817 .sns-follow,
    .page-id-13818 .sns-follow,
    .page-id-13819 .sns-follow,
    .page-id-13820 .sns-follow,
    .page-id-13821 .sns-follow,
    .page-id-13500 .toc,
    .page-id-13817 .toc,
    .page-id-13818 .toc,
    .page-id-13819 .toc,
    .page-id-13820 .toc,
    .page-id-13821 .toc,
    .page-id-13500 #toc,
    .page-id-13817 #toc,
    .page-id-13818 #toc,
    .page-id-13819 #toc,
    .page-id-13820 #toc,
    .page-id-13821 #toc {
        display: none !important;
    }
    .page-id-13500 .ts-template-catalog,
    .page-id-13817 .ts-template-catalog,
    .page-id-13818 .ts-template-catalog,
    .page-id-13819 .ts-template-catalog,
    .page-id-13820 .ts-template-catalog,
    .page-id-13821 .ts-template-catalog {
        margin-top: 8px;
    }
    .page-id-13500 .ts-template-tabs,
    .page-id-13817 .ts-template-tabs,
    .page-id-13818 .ts-template-tabs,
    .page-id-13819 .ts-template-tabs,
    .page-id-13820 .ts-template-tabs,
    .page-id-13821 .ts-template-tabs {
        position: static;
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        overflow-x: auto;
        padding: 4px 0 8px;
        margin: 0 0 10px;
        border-bottom: 0;
        -webkit-overflow-scrolling: touch;
    }
    .page-id-13500 .ts-template-tabs a,
    .page-id-13817 .ts-template-tabs a,
    .page-id-13818 .ts-template-tabs a,
    .page-id-13819 .ts-template-tabs a,
    .page-id-13820 .ts-template-tabs a,
    .page-id-13821 .ts-template-tabs a {
        flex: 0 0 auto;
        padding: 6px 9px;
        font-size: 12px;
        line-height: 1.3;
        white-space: nowrap;
    }
    .page-id-13500 .ts-template-section-head,
    .page-id-13817 .ts-template-section-head,
    .page-id-13818 .ts-template-section-head,
    .page-id-13819 .ts-template-section-head,
    .page-id-13820 .ts-template-section-head,
    .page-id-13821 .ts-template-section-head {
        display: none;
    }
    .page-id-13500 .ts-template-parent .ts-template-section-head {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
    }
    .page-id-13500 .ts-template-section,
    .page-id-13817 .ts-template-section,
    .page-id-13818 .ts-template-section,
    .page-id-13819 .ts-template-section,
    .page-id-13820 .ts-template-section,
    .page-id-13821 .ts-template-section {
        margin-bottom: 28px;
    }
    .page-id-13500 .ts-template-section-desc,
    .page-id-13817 .ts-template-section-desc,
    .page-id-13818 .ts-template-section-desc,
    .page-id-13819 .ts-template-section-desc,
    .page-id-13820 .ts-template-section-desc,
    .page-id-13821 .ts-template-section-desc {
        font-size: 0.86em;
        line-height: 1.65;
        margin: 4px 0 10px;
    }
    .page-id-13500 .ts-template-grid,
    .page-id-13817 .ts-template-grid,
    .page-id-13818 .ts-template-grid,
    .page-id-13819 .ts-template-grid,
    .page-id-13820 .ts-template-grid,
    .page-id-13821 .ts-template-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .page-id-13500 .ts-template-card-body,
    .page-id-13817 .ts-template-card-body,
    .page-id-13818 .ts-template-card-body,
    .page-id-13819 .ts-template-card-body,
    .page-id-13820 .ts-template-card-body,
    .page-id-13821 .ts-template-card-body {
        padding: 8px;
    }
    .page-id-13500 .ts-template-card-title,
    .page-id-13817 .ts-template-card-title,
    .page-id-13818 .ts-template-card-title,
    .page-id-13819 .ts-template-card-title,
    .page-id-13820 .ts-template-card-title,
    .page-id-13821 .ts-template-card-title {
        font-size: 0.82em;
        line-height: 1.45;
        margin-bottom: 8px;
    }
    .page-id-13500 .ts-template-card-meta,
    .page-id-13817 .ts-template-card-meta,
    .page-id-13818 .ts-template-card-meta,
    .page-id-13819 .ts-template-card-meta,
    .page-id-13820 .ts-template-card-meta,
    .page-id-13821 .ts-template-card-meta {
        display: none;
    }
    .page-id-13500 .ts-template-card-foot,
    .page-id-13817 .ts-template-card-foot,
    .page-id-13818 .ts-template-card-foot,
    .page-id-13819 .ts-template-card-foot,
    .page-id-13820 .ts-template-card-foot,
    .page-id-13821 .ts-template-card-foot {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 8px;
    }
    .page-id-13500 .ts-template-price,
    .page-id-13817 .ts-template-price,
    .page-id-13818 .ts-template-price,
    .page-id-13819 .ts-template-price,
    .page-id-13820 .ts-template-price,
    .page-id-13821 .ts-template-price {
        font-size: 0.94em;
        line-height: 1.2;
    }
    .page-id-13500 .ts-template-detail,
    .page-id-13817 .ts-template-detail,
    .page-id-13818 .ts-template-detail,
    .page-id-13819 .ts-template-detail,
    .page-id-13820 .ts-template-detail,
    .page-id-13821 .ts-template-detail {
        display: block;
        width: 100%;
        min-height: 36px;
        padding: 8px 6px;
        font-size: 0.82em;
        line-height: 1.35;
        text-align: center;
        white-space: normal;
    }
}

/* Template product pages: remove heavy Cocoon social button blocks. */
.turkey-template-product .sns-share,
.turkey-template-product .sns-follow,
.single-post.category-video-templates .sns-share,
.single-post.category-video-template-free .sns-share,
.single-post.category-video-template-profile .sns-share,
.single-post.category-video-template-opening .sns-share,
.single-post.category-video-template-endroll .sns-share,
.single-post.category-video-template-slideshow .sns-share,
.single-post.category-video-templates .sns-follow,
.single-post.category-video-template-free .sns-follow,
.single-post.category-video-template-profile .sns-follow,
.single-post.category-video-template-opening .sns-follow,
.single-post.category-video-template-endroll .sns-follow,
.single-post.category-video-template-slideshow .sns-follow {
    display: none !important;
}

@media (max-width: 640px) {
    .tt-template-home .ts-template-grid-home .ts-template-card-foot,
    .home .ts-template-grid-home .ts-template-card-foot,
    .page-id-12284 .ts-template-grid-home .ts-template-card-foot {
        display: grid !important;
        grid-template-columns: 1fr !important;
        align-items: stretch !important;
        gap: 7px !important;
    }
    .tt-template-home .ts-template-grid-home .ts-template-detail,
    .home .ts-template-grid-home .ts-template-detail,
    .page-id-12284 .ts-template-grid-home .ts-template-detail {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 34px !important;
        padding: 8px 4px !important;
        font-size: 0.76em !important;
        line-height: 1.25 !important;
        text-align: center !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }
    .tt-template-home .ts-template-grid-home .ts-template-price,
    .home .ts-template-grid-home .ts-template-price,
    .page-id-12284 .ts-template-grid-home .ts-template-price {
        display: block !important;
        font-size: 0.9em !important;
        line-height: 1.2 !important;
    }
}

/* ===== E-learning course videos (added 2026-06-09) ===== */
.ts-course-videos .ts-lesson { margin: 0 0 32px; }
.ts-course-videos .ts-lesson h3 { margin: 0 0 10px; font-size: 1.15em; font-weight: 700; }
.ts-course-videos .ts-lesson-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}
.ts-course-videos .ts-lesson-video > iframe,
.ts-course-videos .ts-lesson-video > .fluid-width-video-wrapper {
    position: absolute !important;
    inset: 0 !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}
.ts-course-videos .ts-lesson-video .fluid-width-video-wrapper iframe {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* fix 2026-06-09b: Cocoon wraps iframes in .video-container (max-width:640px, margin:30px 0).
   Unblock to full width inside course; let .video-container drive the 16:9 ratio. */
.ts-course-videos .ts-lesson-video { aspect-ratio: auto; background: transparent; }
.ts-course-videos .video-container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
}
.ts-course-videos .video-container .video { margin: 0 !important; }

/* ===== E-learning progress UI (added 2026-06-09) ===== */
.ts-course-nav { margin: 0 0 14px; font-size: .95em; }
.ts-module-progress { font-weight: 700; margin: 0 0 22px; padding: 10px 14px; background: #f0f9ff; border-left: 4px solid #0ea5e9; border-radius: 4px; }
.ts-lesson h3 .ts-check { color: #16a34a; display: inline-block; min-width: 1.1em; }
.ts-lesson.is-done h3 { color: #15803d; }
/* overview */
.ts-course-overall { margin: 0 0 26px; }
.ts-overall-label { font-weight: 700; margin: 0 0 8px; }
.ts-progress-bar { height: 12px; background: #e5e7eb; border-radius: 6px; overflow: hidden; }
.ts-progress-fill { display: block; height: 100%; background: #16a34a; transition: width .3s; }
.ts-module-list { list-style: none; padding: 0; margin: 0; counter-reset: mod; }
.ts-module-item { margin: 0 0 8px; }
.ts-module-item a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid #e5e7eb; border-radius: 8px; text-decoration: none; color: inherit; background: #fff; }
.ts-module-item a:hover { border-color: #0ea5e9; }
.ts-mod-state-icon { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #cbd5e1; flex: 0 0 auto; }
.ts-module-item.is-partial .ts-mod-state-icon { border-color: #f59e0b; background: #fef3c7; }
.ts-module-item.is-done .ts-mod-state-icon { border-color: #16a34a; background: #16a34a; }
.ts-module-item.is-done a { border-color: #16a34a; background: #f0fdf4; }
.ts-mod-title { flex: 1 1 auto; }
.ts-mod-count { font-weight: 700; color: #6b7280; }
.ts-module-item.is-done .ts-mod-count { color: #16a34a; }


/* fix 2026-06-09c: shortcode-generated iframes (via [ae_module]) are NOT wrapped by
   Cocoon's .video-container, so .ts-lesson-video must supply the 16:9 box itself. */
.ts-course-videos .ts-lesson-video {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}
.ts-course-videos .ts-lesson-video > iframe {
    position: absolute !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
}

/* ===== E-learning playlist player (added 2026-06-09) ===== */
.ts-elearn .ts-module-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.ts-elearn .ts-module-title { margin: 0; font-size: 1.3em; }
.ts-elearn .ts-module-progress { margin: 0; font-weight: 700; white-space: nowrap; }

.ts-player-layout { display: flex; gap: 16px; align-items: flex-start; }
.ts-player-main { flex: 1 1 auto; min-width: 0; }
.ts-player-main .ts-lesson-video { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; }
.ts-player-main .ts-lesson-video > iframe { position: absolute !important; inset: 0 !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; border: 0 !important; }
.ts-now-playing { margin: 10px 0 0; font-weight: 700; }
.ts-now-playing .ts-np-num { color: #0ea5e9; }

.ts-playlist { flex: 0 0 300px; max-width: 300px; list-style: none; margin: 0; padding: 0; max-height: 70vh; overflow-y: auto; border: 1px solid #e5e7eb; border-radius: 8px; }
.ts-playlist-item { display: flex; gap: 10px; align-items: center; padding: 8px; cursor: pointer; border-bottom: 1px solid #f1f5f9; }
.ts-playlist-item:last-child { border-bottom: 0; }
.ts-playlist-item:hover { background: #f8fafc; }
.ts-playlist-item.is-active { background: #eff6ff; }
.ts-pl-thumb { position: relative; flex: 0 0 96px; width: 96px; aspect-ratio: 16 / 9; background: #101828; border-radius: 4px; overflow: hidden; }
.ts-pl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ts-pl-playing { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; color: #fff; background: rgba(14,165,233,.45); font-size: 1.1em; }
.ts-playlist-item.is-active .ts-pl-playing { display: flex; }
.ts-pl-meta { flex: 1 1 auto; min-width: 0; font-size: .86em; line-height: 1.35; }
.ts-pl-num { color: #94a3b8; margin-right: 4px; }
.ts-pl-title { }
.ts-pl-check { flex: 0 0 auto; color: #16a34a; opacity: 0; font-weight: 700; }
.ts-playlist-item.is-done .ts-pl-check { opacity: 1; }
.ts-playlist-item.is-done .ts-pl-title { color: #15803d; }

.ts-module-pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 24px 0 0; }
.ts-module-pager a, .ts-module-pager .ts-pager-spacer { padding: 10px 14px; border-radius: 8px; font-size: .9em; }
.ts-module-pager a { border: 1px solid #e5e7eb; text-decoration: none; color: inherit; background: #fff; }
.ts-module-pager a:hover { border-color: #0ea5e9; }
.ts-pager-prev { margin-right: auto; }
.ts-pager-next { margin-left: auto; }
.ts-pager-index { color: #6b7280; }

@media (max-width: 782px) {
    .ts-player-layout { flex-direction: column; }
    .ts-playlist { flex-basis: auto; max-width: none; width: 100%; max-height: 320px; }
    .ts-module-pager { flex-wrap: wrap; }
}

/* 2026-06-09: playlist sidebar height = viewport, sticky, internal scroll when overflowing */
.ts-elearn .ts-player-layout { align-items: flex-start; }
.ts-elearn .ts-playlist {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
}
@media (max-width: 782px) {
    .ts-elearn .ts-playlist { position: static; top: auto; max-height: 340px; }
}

/* 2026-06-09: robust mobile width fit for learning pages (override Cocoon) */
.ts-elearn *, .ts-elearn *::before, .ts-elearn *::after { box-sizing: border-box; }
@media (max-width: 782px) {
    .ts-elearn { max-width: 100% !important; overflow-x: clip; }
    .ts-elearn .ts-player-layout { flex-direction: column !important; align-items: stretch !important; gap: 12px !important; }
    .ts-elearn .ts-player-main,
    .ts-elearn .ts-playlist { flex: 1 1 auto !important; width: 100% !important; max-width: 100% !important; min-width: 0 !important; }
    .ts-elearn .ts-playlist { position: static !important; top: auto !important; max-height: 60vh !important; }
    .ts-elearn .ts-lesson-video { width: 100% !important; max-width: 100% !important; }
    .ts-elearn .ts-module-head { flex-wrap: wrap; }
    .ts-elearn .ts-module-pager { flex-direction: column !important; align-items: stretch !important; }
    .ts-elearn .ts-module-pager a,
    .ts-elearn .ts-module-pager .ts-pager-spacer { margin: 0 !important; text-align: center; }
}

/* 2026-06-09: hide in-article SNS follow box on all posts/pages/learning (share already off via filter) */
.sns-follow { display: none !important; }

/* 2026-06-09: course download links */
.ts-lesson-downloads, .ts-section-downloads { margin: 12px 0 0; }
.ts-section-downloads { padding: 12px 14px; background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 8px; margin-top: 20px; }
.ts-dl-title { font-weight: 700; margin: 0 0 6px; font-size: .95em; }
.ts-dl-link { display: inline-block; margin: 0 8px 6px 0; padding: 8px 14px; background: #0ea5e9; color: #fff !important; border-radius: 6px; text-decoration: none; font-size: .9em; }
.ts-dl-link:hover { opacity: .9; }

/* ===== Course catalog (store) + durations (2026-06-09) ===== */
.ts-course-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin: 20px 0; }
.ts-course-card { display: block; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; text-decoration: none; color: inherit; background: #fff; transition: box-shadow .2s, transform .2s; }
.ts-course-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); transform: translateY(-2px); }
.ts-cc-thumb { position: relative; aspect-ratio: 16 / 9; background: #101828; display: flex; align-items: center; justify-content: center; }
.ts-cc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ts-cc-noimg { color: #cbd5e1; padding: 12px; text-align: center; font-size: .9em; }
.ts-cc-owned { position: absolute; top: 8px; left: 8px; background: #16a34a; color: #fff; font-size: .75em; padding: 3px 8px; border-radius: 4px; }
.ts-cc-body { padding: 12px 14px; }
.ts-cc-title { font-weight: 700; margin: 0 0 6px; line-height: 1.4; }
.ts-cc-meta { color: #6b7280; font-size: .85em; margin: 0 0 8px; }
.ts-cc-price { font-weight: 700; color: #0ea5e9; }

/* durations */
.ts-overall-summary { font-weight: 700; margin: 0 0 8px; }
.ts-mod-dur { color: #6b7280; font-size: .85em; white-space: nowrap; }
.ts-elearn .ts-module-head { align-items: baseline; }
.ts-step-dur { color: #6b7280; font-weight: 600; white-space: nowrap; }
.ts-module-item.is-preview a { background: #fff; }
.ts-module-item.is-preview .ts-mod-state-icon { border-color: #cbd5e1; }
