/* post-wide-17 — magazine hero · TOC | article | recommended · gallery · share (Ghost) */

:root {
    --text-main: #1d1d1f;
    --text-muted: #6e6e73;
    --accent-blue: #0066cc;
    --soft-bg: #f5f5f7;
    --line: #e5e5ea;
    --line-light: #eee;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body.is-article-hero { overflow-x: clip; }

.ps-container {
    --ps-top: 96px;
    max-width: 1360px;
    margin: 24px auto 72px;
    padding: 0 24px;
    font-family: var(--font);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}
.ps-container *, .ps-container *::before, .ps-container *::after { box-sizing: border-box; }
.ps-container img, .ps-container video, .ps-container iframe { max-width: 100%; }
.ps-container [hidden] { display: none !important; }

/* ---------- hero ---------- */
/* hero card = exactly the same width as the layout below (starts at the TOC's left edge) */
.ps-container .mh-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    position: relative;
    left: auto;
    right: auto;
    width: 100%;
    max-width: 100%;
    margin: 0 0 48px;
    padding: 0;
    transform: none;
}
.ps-container .mh-hero-media {
    grid-area: 1 / 1;
    position: relative;
    justify-self: stretch;
    width: 100%;
    max-width: 100%;
    margin: 0;
    aspect-ratio: 16 / 9;
    max-height: min(70vh, 720px);
    overflow: hidden;
    border-radius: 20px;
    background: #111;
}
.mh-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.mh-hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.4) 30%, rgba(0,0,0,.1) 58%, transparent 78%);
    pointer-events: none;
}
.mh-hero-text {
    grid-area: 1 / 1;
    align-self: end;
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: clamp(20px, 4vw, 52px);
    color: #fff;
}
.mh-eyebrow {
    display: inline-block;
    margin: 0 0 12px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.18);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
}
.mh-title {
    margin: 0 0 14px;
    font-size: clamp(1.75rem, 1rem + 2.7vw, 3.25rem);
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: -.025em;
    color: #fff;
    text-wrap: balance;
    overflow-wrap: break-word;
    text-shadow: 0 1px 20px rgba(0,0,0,.3);
}
.mh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .875rem; line-height: 1.5; color: rgba(255,255,255,.9); }
.mh-meta a { color: #fff; font-weight: 600; text-decoration: none; }
.dot-sep { opacity: .55; }
.mh-caption { grid-row: 2; margin: 10px 4px 0; font-size: .8125rem; line-height: 1.5; color: var(--text-muted); }
.mh-caption a { color: inherit; text-decoration: underline; }

.ps-container .mh-hero.is-plain { margin-bottom: 32px; }
.mh-hero.is-plain .mh-hero-text { padding: 0; color: var(--text-main); }
.mh-hero.is-plain .mh-eyebrow { background: var(--soft-bg); color: var(--accent-blue); -webkit-backdrop-filter: none; backdrop-filter: none; }
.mh-hero.is-plain .mh-title { color: var(--text-main); text-shadow: none; }
.mh-hero.is-plain .mh-meta, .mh-hero.is-plain .mh-meta a { color: var(--text-muted); }
.mh-hero.is-plain .mh-meta a { color: var(--text-main); }

/* ---------- 3-column layout: TOC | article | recommended ---------- */
.ps-layout { display: flex; flex-direction: column; }
.ps-side-left { order: 1; }
.ps-main { order: 2; min-width: 0; }
.ps-side-right { order: 3; margin-top: 48px; }

.mh-lede {
    max-width: 700px;
    margin: 0 0 20px;
    font-size: clamp(1.0625rem, 1rem + .45vw, 1.3125rem);
    line-height: 1.5;
    letter-spacing: -.01em;
    color: var(--text-muted);
    text-wrap: pretty;
}

.ps-tagrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}
.ps-tag, .share-pill, .tag-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: #e5e7eb;
    font: inherit;
    font-size: .8125rem;
    font-weight: 600;
    line-height: 1.2;
    color: #1f2937;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s;
}
.ps-tag:hover, .share-pill:hover, .tag-pill:hover { background: #d1d5db; }

@media (min-width: 1100px) {
    .ps-layout {
        --toc-w: 190px;
        --side-w: 240px;
        display: grid;
        grid-template-columns: var(--toc-w) minmax(0, 1fr) var(--side-w);
        column-gap: 28px;
        align-items: start;
    }
    .ps-side-left { grid-column: 1; }
    .ps-main { grid-column: 2; }
    .ps-side-right { grid-column: 3; margin-top: 0; }
    .ps-side-left, .ps-side-right {
        position: sticky;
        top: var(--ps-top);
        max-height: calc(100vh - var(--ps-top) - 24px);
        overflow-y: auto;
        scrollbar-width: none;
    }
    .ps-side-left::-webkit-scrollbar, .ps-side-right::-webkit-scrollbar { display: none; }

    .is-toc-empty .ps-layout { grid-template-columns: minmax(0, 1fr) var(--side-w); }
    .is-toc-empty .ps-main { grid-column: 1; }
    .is-toc-empty .ps-side-right { grid-column: 2; }
    .is-no-recommend .ps-side-right { visibility: hidden; }
}
@media (min-width: 1280px) {
    .ps-layout { --toc-w: 220px; --side-w: 280px; column-gap: 40px; }
}
@media (max-width: 1099px) {
    .is-no-recommend .ps-side-right { display: none; }
    .ps-side-left, .ps-main, .ps-side-right { width: 100%; max-width: 740px; margin-left: auto; margin-right: auto; }
    .ps-container .mh-hero { max-width: 740px; margin-left: auto; margin-right: auto; }
}

/* ---------- table of contents ---------- */
.ps-toc { background: #fff; border: 1px solid var(--line-light); border-radius: 14px; padding: 22px; }
.ps-toc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0 0 18px;
    padding: 0 0 12px;
    border: 0;
    border-bottom: 2px solid #e5e7eb;
    background: none;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
    text-align: left;
    pointer-events: none;
}
.ps-toc-chevron { display: none; transition: transform .25s; }
.ps-toc.is-open .ps-toc-chevron { transform: rotate(180deg); }
.ps-toc-nav { display: flex; flex-direction: column; gap: 2px; }
.ps-toc-nav a {
    display: block;
    padding: 7px 0 7px 10px;
    border-left: 2px solid transparent;
    font-size: .875rem;
    line-height: 1.5;
    color: var(--text-muted);
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color .2s, border-color .2s, padding-left .2s;
}
.ps-toc-nav a:hover { color: var(--accent-blue); }
.ps-toc-nav a.is-active { color: var(--accent-blue); font-weight: 600; border-left-color: var(--accent-blue); padding-left: 12px; }
.ps-toc-nav a.ps-h3 { padding-left: 20px; font-size: .8125rem; }
.ps-toc-nav a.ps-h3.is-active { padding-left: 24px; }

@media (max-width: 1099px) {
    .ps-side-left { margin-bottom: 28px; }
    .ps-toc { padding: 4px 18px; border-radius: 12px; }
    .ps-toc-toggle { margin: 0; padding: 12px 0; border-bottom: 0; pointer-events: auto; cursor: pointer; }
    .ps-toc-chevron { display: block; }
    .ps-toc.is-open .ps-toc-toggle { margin-bottom: 6px; padding-bottom: 8px; border-bottom: 2px solid #e5e7eb; }
    .ps-toc-nav { display: none; max-height: 50vh; overflow-y: auto; padding-bottom: 8px; }
    .ps-toc.is-open .ps-toc-nav { display: flex; }
}

/* ---------- recommended articles ---------- */
.ps-rec-title {
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}
.recommend-posts-list { display: flex; flex-direction: column; gap: 16px; }
.recommend-post-card {
    --thumb: 95px;
    background: #fff;
    border: 1px solid var(--line-light);
    border-radius: 14px;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
}
.recommend-post-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.recommend-post-link { display: flex; align-items: flex-start; gap: 14px; padding: 12px; color: inherit; text-decoration: none; }
.recommend-image-wrap { flex: 0 0 var(--thumb); width: var(--thumb); }
.recommend-thumb { display: block; width: var(--thumb); height: var(--thumb); object-fit: cover; border-radius: 10px; background: #e5e7eb; }
.recommend-info { flex: 1; min-width: 0; }
.recommend-tag, .related-tag {
    display: inline-block;
    margin-bottom: 5px;
    font-size: .6875rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--accent-blue);
}
.recommend-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 6px;
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.4;
}
@media (min-width: 1100px) and (max-width: 1279px) {
    .recommend-post-card { --thumb: 75px; }
    .recommend-post-link { gap: 10px; padding: 10px; }
    .recommend-title { font-size: .875rem; }
}
@media (min-width: 600px) and (max-width: 1099px) {
    .recommend-posts-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 599px) { .recommend-post-card { --thumb: 82px; border-radius: 12px; } }

/* ---------- article typography ---------- */
.ps-article { min-width: 0; }
.post-content { max-width: none; font-size: 1.0625rem; line-height: 1.7; overflow-wrap: break-word; }
.post-content > :first-child { margin-top: 0; }
.post-content p { margin: 0 0 1.25em; font-size: 1.0625rem; line-height: 1.7; }
.post-content h2, .post-content h3, .post-content h4 { color: var(--text-main); font-weight: 600; scroll-margin-top: var(--ps-top); }
.post-content h2 { margin: 2em 0 .65em; font-size: clamp(1.375rem, 1.2rem + .8vw, 1.75rem); line-height: 1.25; letter-spacing: -.02em; }
.post-content h3 { margin: 1.7em 0 .55em; font-size: clamp(1.2rem, 1.1rem + .45vw, 1.4rem); line-height: 1.3; letter-spacing: -.015em; }
.post-content h4 { margin: 1.5em 0 .5em; font-size: 1.125rem; line-height: 1.35; }
.post-content ul, .post-content ol { margin: 0 0 1.4em; padding-left: 1.5em; }
.post-content li { margin: 0 0 .45em; font-size: 1.0625rem; line-height: 1.65; }
.post-content a { color: var(--accent-blue); text-decoration: none; }
.post-content a:hover { text-decoration: underline; }
.post-content blockquote {
    margin: 1.8em 0;
    padding: 20px 26px;
    border-left: 4px solid var(--accent-blue);
    border-radius: 0 8px 8px 0;
    background: #f8fafc;
    font-size: 1.1875rem;
    line-height: 1.45;
    font-weight: 500;
}
.post-content hr { margin: 2.6em 0; border: 0; border-top: 1px solid var(--line); }
.post-content figure { margin: 2.2em 0; }
.post-content img { display: block; width: 100%; height: auto; border-radius: 12px; }
.post-content figcaption { margin: 10px 0 0; text-align: left; font-size: .8125rem; line-height: 1.5; color: var(--text-muted); }
.post-content figcaption a { color: inherit; text-decoration: underline; }
.post-content pre { max-width: 100%; overflow-x: auto; font-size: .875rem; line-height: 1.6; }
.post-content code { font-size: .88em; }
.post-content table { display: block; max-width: 100%; overflow-x: auto; }
.post-content .kg-width-wide, .post-content .kg-width-full { width: 100%; max-width: 100%; margin-left: 0; margin-right: 0; }
.post-content .kg-embed-card { display: flex; flex-direction: column; align-items: center; }
.post-content .kg-embed-card iframe { width: 100%; }

.post-content > :is(p, h2, h3, h4, h5, h6, ul, ol, blockquote, pre, hr, .kg-callout-card, .kg-toggle-card, .kg-button-card) { max-width: 700px; }
.post-content figcaption { max-width: 700px; }

/* Ghost editor cards */
.kg-bookmark-card { margin: 2em 0; }
.kg-bookmark-container { display: flex; min-height: 110px; color: inherit; text-decoration: none; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.post-content .kg-bookmark-container { text-decoration: none; }
.kg-bookmark-content { flex: 1; min-width: 0; padding: 16px 18px; }
.kg-bookmark-title { font-size: 1rem; font-weight: 600; line-height: 1.35; }
.kg-bookmark-description { margin-top: 6px; max-height: 3em; overflow: hidden; font-size: .875rem; line-height: 1.5; color: var(--text-muted); }
.kg-bookmark-metadata { display: flex; align-items: center; margin-top: 10px; font-size: .8125rem; color: var(--text-muted); }
.kg-bookmark-icon { width: 20px; height: 20px; margin-right: 8px; border-radius: 4px; }
.kg-bookmark-thumbnail { position: relative; flex: 0 0 32%; }
.post-content .kg-bookmark-thumbnail img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.kg-button-card { display: flex; justify-content: center; margin: 2em 0; }
.kg-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border-radius: 999px; background: var(--text-main); color: #fff !important; font-weight: 600; text-decoration: none !important; }
.kg-toggle-card { padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; }
.kg-video-card video, .kg-audio-card audio { width: 100%; height: auto; }

/* ---------- images, gallery (1–2 normal · 3 slideshow · 4+ grid) — from custom-post-wide-13-1 ---------- */
.kg-image-card, .kg-gallery-card, .ghost-injected-slideshow, .ghost-injected-grid { width: 100%; margin: 40px 0 }
.kg-image-card img, .kg-gallery-image img { display: block; width: 100%; height: auto; border-radius: 12px !important }
.kg-gallery-row { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 20px !important }
.kg-gallery-image img { object-fit: cover }
.ghost-injected-slideshow { position: relative; z-index: 0; isolation: isolate }
.slideshow-viewport { position: relative; z-index: 0; isolation: isolate; width: 100%; overflow: hidden; border-radius: 12px; background: #f3f4f6 }
.slideshow-track { display: flex; width: 100%; transition: transform .45s ease }
.slideshow-slide { flex: 0 0 100%; width: 100%; cursor: pointer }
.slideshow-slide img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover }
.slideshow-counter { position: absolute; bottom: 14px; right: 15px; top: auto; z-index: 2; pointer-events: none; line-height: 1; padding: 6px 12px; border-radius: 20px; background: rgba(0, 0, 0, .65); color: #ffffff; font-size: 13px; font-weight: 600 }
.slideshow-arrow, .lightbox-arrow, .lightbox-close { position: absolute; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer; z-index: 2 }
.slideshow-arrow, .lightbox-arrow { top: 50%; transform: translateY(-50%) }
.slideshow-arrow { width: 46px; height: 46px; z-index: 3; background: rgba(255, 255, 255, .92); color: #111827; box-shadow: 0 5px 20px rgba(0, 0, 0, .15) }
.slideshow-arrow:hover { transform: translateY(-50%) scale(1.08); background: #ffffff }
.slideshow-arrow svg { width: 22px; height: 22px }
.slideshow-arrow-prev { left: 18px }
.slideshow-arrow-next { right: 18px }
.slideshow-dots { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 8px; z-index: 2 }
.slideshow-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .55); cursor: pointer }
.slideshow-dot.active { background: #ffffff; transform: scale(1.35) }
.ghost-injected-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px }
.grid-gallery-item { min-width: 0; overflow: hidden; border-radius: 12px; cursor: pointer }
.grid-gallery-item img { display: block; width: 100%; height: 100%; min-height: 260px; object-fit: cover; transition: transform .35s ease }
.grid-gallery-item:hover img { transform: scale(1.03) }

/* ---------- lightbox — from custom-post-wide-13-1 ---------- */
.premium-lightbox { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .92); opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease }
.premium-lightbox.active { opacity: 1; visibility: visible }
.lightbox-content-wrapper { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 70px 90px }
.lightbox-image-viewport { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center }
.lightbox-image-viewport img { display: block; max-width: 90vw; max-height: 85vh; width: auto; height: auto; object-fit: contain; border-radius: 8px; user-select: none }
.lightbox-close, .lightbox-arrow { color: #ffffff }
.lightbox-close { top: 25px; right: 30px; width: 46px; height: 46px; background: rgba(255, 255, 255, .12) }
.lightbox-arrow { width: 52px; height: 52px; background: rgba(255, 255, 255, .14) }
.lightbox-close:hover { background: rgba(255, 255, 255, .25) }
.lightbox-arrow:hover { background: rgba(255, 255, 255, .25); transform: translateY(-50%) scale(1.08) }
.lightbox-arrow svg { width: 25px; height: 25px }
.lightbox-arrow-prev { left: 25px }
.lightbox-arrow-next { right: 25px }
.lightbox-counter { position: absolute; bottom: 25px; left: 50%; transform: translateX(-50%); z-index: 10; padding: 7px 14px; border-radius: 20px; background: rgba(0, 0, 0, .55); color: #ffffff; font-size: 13px; font-weight: 600 }

/* ---------- article footer, author boxes (footer partial) ---------- */
.article-footer-area { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); }
.article-footer-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.tag-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.author-boxes { margin-top: 28px; }
.author-box { display: flex; align-items: center; gap: 22px; padding: 30px; border-radius: 12px; background: #f9fafb; }
.author-box-avatar { display: block; width: 60px; height: 60px; flex: none; border-radius: 50%; object-fit: cover; background: #e5e7eb; }
.author-box-info { flex: 1; min-width: 0; }
.author-box-name { margin: 0 0 6px; font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.author-box-bio { margin: 0 0 14px; font-size: .9375rem; line-height: 1.55; color: var(--text-muted); }
.author-name-link, .author-link { color: inherit; text-decoration: none; }
.author-name-link:hover, .author-link:hover { color: var(--accent-blue); }
.social-icons { display: flex; gap: 12px; }
.social-icon-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #e5e7eb; color: #4b5563; text-decoration: none; transition: background .2s; }
.social-icon-btn:hover { background: #d1d5db; color: var(--text-main); }
.author-boxes.is-multiple { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.author-boxes.is-multiple .author-box { align-items: flex-start; gap: 16px; padding: 20px; }
.author-boxes.is-multiple .author-box-avatar { width: 48px; height: 48px; }
.author-boxes.is-multiple .author-box-name { margin-bottom: 4px; font-size: 1.0625rem; }
.author-boxes.is-multiple .author-box-bio { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; font-size: .875rem; line-height: 1.5; }

.is-nonauthor .author-boxes, .is-nonauthor [class*="author-box"], .is-nonauthor .related-author, .is-nonauthor .related-meta .meta-dot { display: none !important; }

/* ---------- bottom related articles (partial) ---------- */
.related-posts-visibility { display: contents; }
.related-posts-visibility.is-hidden { visibility: hidden; }
.ps-bottom { max-width: 1360px; margin: 0 auto; padding: 0 24px 64px; font-family: var(--font); color: var(--text-main); }
.related-posts-bottom-section { max-width: 1078px; margin: 30px auto 0; padding: 0 20px; }
.related-posts-bottom-title { margin: 0 0 28px; text-align: center; font-size: clamp(1.4rem, 1.25rem + .6vw, 1.75rem); font-weight: 600; line-height: 1.2; letter-spacing: -.018em; }
.related-posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-bottom: 20px; }
.related-post-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--line-light); border-radius: 10px; transition: transform .3s, box-shadow .3s; }
.related-post-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.06); }
.related-post-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.related-image-wrap { overflow: hidden; }
.related-thumb { display: block; width: 100%; height: 150px; object-fit: cover; }
.related-info { display: flex; flex-direction: column; flex: 1; padding: 16px; }
.related-title { margin: 0 0 8px; font-size: 1rem; font-weight: 600; line-height: 1.4; }
.related-meta { display: flex; align-items: center; gap: 5px; margin-top: auto; font-size: .8125rem; color: var(--text-muted); }
.meta-dot { opacity: .5; }

@media (max-width: 1000px) {
    .related-posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- share modal (partial) ---------- */
.share-modal-overlay { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .3s, visibility .3s; }
.share-modal-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }
.share-modal-card { position: relative; width: 100%; max-width: 420px; max-height: calc(100dvh - 40px); overflow-y: auto; padding: 24px; border-radius: 16px; background: #fff; box-shadow: 0 20px 40px rgba(0,0,0,.1); transform: translateY(20px); transition: transform .3s; }
.share-modal-overlay.active .share-modal-card { transform: none; }
.share-modal-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 24px; }
.share-modal-title { margin: 0; font-size: 1.125rem; font-weight: 600; color: #111827; }
.share-modal-close { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: #f3f4f6; color: #6b7280; cursor: pointer; }
.share-modal-close:hover { background: #e5e7eb; color: #111827; }
.share-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.share-item { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; min-width: 0; padding: 0; border: 0; background: none; color: inherit; text-align: center; text-decoration: none; cursor: pointer; transition: transform .2s; }
.share-item:hover { transform: translateY(-3px); }
.share-icon-wrap { flex: none; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; color: #fff; }
.share-label { width: 100%; font-size: .6875rem; font-weight: 500; line-height: 1.2; color: #4b5563; word-break: break-word; }
.bg-facebook { background: #1877f2; }
.bg-x, .bg-threads { background: #000; }
.bg-linkedin { background: #0a66c2; }
.bg-email { background: #ea4335; }
.bg-whatsapp { background: #25d366; }
.bg-telegram { background: #08c; }
.bg-more { background: #9ca3af; }
.share-divider { height: 1px; margin: 24px 0; background: #f3f4f6; }
.share-link-section { display: flex; flex-direction: column; gap: 8px; }
.share-link-label { font-size: .8125rem; font-weight: 600; color: #6b7280; }
.share-link-input-group { display: flex; gap: 8px; }
.share-link-input { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid #e5e7eb; border-radius: 10px; background: #f9fafb; font-size: .8125rem; color: #4b5563; outline: none; }
.share-copy-btn { flex: none; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 16px; border: 0; border-radius: 10px; background: #111827; color: #fff; font-size: .8125rem; font-weight: 600; cursor: pointer; }
.share-copy-btn:hover { background: #374151; }

/* ---------- tablet / phone ---------- */
@media (max-width: 1099px) {
    .ps-container { margin-top: 16px; }
    .ps-bottom { padding-bottom: 48px; }
}

@media (max-width: 767px) {
    .ps-container { padding: 0 16px; margin-bottom: 48px; }
    .ps-bottom { padding: 0 16px 40px; }
    .related-posts-bottom-section { max-width: none; margin-top: 24px; padding: 0; }
    .related-posts-grid { grid-template-columns: 1fr; gap: 14px; }
    .related-thumb { height: auto; aspect-ratio: 16 / 9; }

    /* hero: title moves below the image */
    .mh-hero.has-image .mh-hero-media { grid-row: 1; aspect-ratio: 4 / 3; max-height: 58vh; border-radius: 14px; }
    .mh-hero.has-image .mh-hero-media::after { display: none; }
    .mh-hero.has-image .mh-caption { grid-row: 2; }
    .mh-hero.has-image .mh-hero-text { grid-area: 3 / 1; align-self: start; padding: 18px 2px 0; color: var(--text-main); }
    .mh-hero.has-image .mh-eyebrow { background: var(--soft-bg); color: var(--accent-blue); -webkit-backdrop-filter: none; backdrop-filter: none; }
    .mh-hero.has-image .mh-title { color: var(--text-main); text-shadow: none; font-size: clamp(1.625rem, 1.2rem + 2.2vw, 2rem); }
    .mh-hero.has-image .mh-meta, .mh-hero.has-image .mh-meta a { color: var(--text-muted); font-size: .8125rem; }
    .mh-hero.has-image .mh-meta a { color: var(--text-main); }

    .post-content, .post-content p, .post-content li { font-size: 1rem; }
    .post-content p { line-height: 1.65; }
    .post-content blockquote { padding: 16px 18px; font-size: 1.0625rem; }
    .post-content .kg-bookmark-container { flex-direction: column-reverse; }
    .post-content .kg-bookmark-thumbnail { flex: none; aspect-ratio: 16 / 9; }

    .author-box { flex-direction: column; text-align: center; padding: 22px 16px; gap: 12px; }
    .social-icons { justify-content: center; }
    .author-boxes.is-multiple { grid-template-columns: 1fr; }
    .author-boxes.is-multiple .author-box { flex-direction: row; text-align: left; padding: 16px; }
    .author-boxes.is-multiple .social-icons { justify-content: flex-start; }

    .kg-image-card, .kg-gallery-card, .ghost-injected-slideshow, .ghost-injected-grid { margin: 30px 0; }
    .kg-image-card img, .kg-gallery-image img { border-radius: 10px !important; }
    .kg-gallery-row { grid-template-columns: 1fr !important; gap: 14px !important; }
    .slideshow-slide img { aspect-ratio: 4 / 3; }
    .slideshow-arrow { width: 38px; height: 38px; }
    .slideshow-arrow-prev { left: 9px; }
    .slideshow-arrow-next { right: 9px; }
    .slideshow-arrow svg { width: 18px; height: 18px; }
    .slideshow-counter { top: auto; bottom: 10px; right: 10px; padding: 5px 10px; font-size: 12px; }
    .slideshow-dots { bottom: 12px; gap: 7px; }
    .slideshow-dot { width: 8px; height: 8px; }
    .ghost-injected-grid { grid-template-columns: 1fr; gap: 14px; }
    .grid-gallery-item img { min-height: 0; aspect-ratio: 4 / 3; }
    .lightbox-content-wrapper { padding: 60px 12px; }
    .lightbox-image-viewport img { max-width: 94vw; max-height: 78vh; max-height: 78dvh; border-radius: 5px; }
    .lightbox-close { top: 12px; right: 12px; width: 40px; height: 40px; }
    .lightbox-arrow { width: 40px; height: 40px; }
    .lightbox-arrow-prev { left: 8px; }
    .lightbox-arrow-next { right: 8px; }
    .lightbox-arrow svg { width: 20px; height: 20px; }
    .lightbox-counter { bottom: 15px; padding: 6px 12px; font-size: 12px; }

    .share-modal-card { padding: 20px 16px; }
    .share-grid { gap: 10px; }
}

@media (max-width: 599px) {
    .ps-tagrow { gap: 8px; }
    .ps-tag, .share-pill, .tag-pill { min-height: 38px; }
}

@media (hover: none) {
    .share-item:hover, .related-post-card:hover, .recommend-post-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .slideshow-track, .recommend-post-card, .related-post-card { transition: none; }
}