/* ═══════════════════════════════════════════════════════════════════
   POST MODULE v5 — Cinematic Reader
   v5: dim side panels, title above image, minimal similar,
       rich author card, floating reactions, fixed comments
   ═══════════════════════════════════════════════════════════════════ */

/* ═══ SCOPE ═══ */
.modal-overlay.news-post-active,
.modal-overlay.active:has(.modal-container.news-post) {
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    background: #000 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    cursor: pointer;
}
.modal-container.news-post {
    width: 100% !important; height: 100% !important;
    max-width: 740px !important; max-height: 100% !important;
    border-radius: 0 !important; border: none !important;
    background: transparent !important; overflow: visible !important;
    display: block !important; grid-template-columns: none !important;
    contain: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    transform: none !important; opacity: 1 !important;
    padding: 0 !important; margin: 0 !important;
}
.modal-container.news-post .modal-header,
.modal-container.news-post .modal-close-btn,
.modal-container.news-post .reader-progress { display: none !important; }
.modal-container.news-post .modal-body { display: contents; }


/* ═══ ROOT — single column center. Both sidebars are floating. ═══ */
.post-module {
    display: flex;
    flex-direction: column;
    width: 100%; height: 100%;
    overflow: visible;
    position: relative;
    background: #0a0a0c;
    color: #e4e4e7;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    cursor: default;
    position: relative; /* anchor for both floating sidebars */
}
.pm-panel {
    overflow: hidden;
    display: flex; flex-direction: column;
    min-width: 0; min-height: 0;
}


/* ═══════════════════════════════════════════════════════════════════
   [1] SIDE PANELS — dimmed, brighten on hover
   ═══════════════════════════════════════════════════════════════════ */
.pm-left, .pm-right {
    opacity: 0.45;
    transition: opacity 0.3s ease;
}
.pm-left:hover, .pm-right:hover {
    opacity: 1;
}


/* ═══════════════════════════════════════════════════════════════════
   LEFT — Similar Articles — FLOATING monobar (not in grid)
   ═══════════════════════════════════════════════════════════════════ */
.pm-left {
    /* Floating monobar attached to left edge of center */
    position: absolute;
    right: calc(100% - 1px); /* flush, no gap */
    top: 48px; /* offset from top */
    width: 220px;
    max-height: calc(100% - 96px);
    z-index: 5;
    background: transparent;
    border: none;
    overflow: visible;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
}
/* The floating island container */
.pm-left .pm-sidebar-header,
.pm-left .pm-scroll-y {
    margin-left: 8px;
    margin-right: 4px;
}
.pm-sidebar-header {
    padding: 12px 12px 6px;
    font-size: 9px; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    flex-shrink: 0;
    background: rgba(255,255,255,0.03);
    border-radius: 10px 10px 0 0;
}
.pm-scroll-y {
    flex: 0 1 auto;
    overflow-y: auto; overflow-x: hidden;
    padding: 4px 8px 12px;
    display: flex; flex-direction: column; gap: 2px;
    max-height: calc(100vh - 180px);
    background: rgba(255,255,255,0.03);
    border-radius: 0 0 10px 10px;
}
.pm-scroll-y::-webkit-scrollbar { width: 2px; }
.pm-scroll-y::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

/* Minimal card: no image, just text rows */
.pm-similar-card {
    display: flex; flex-direction: column; gap: 2px;
    padding: 10px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.pm-similar-card:hover { background: rgba(255,255,255,0.06); }
.pm-similar-tag {
    font-size: 9px; font-weight: 700; letter-spacing: 0.8px;
    text-transform: uppercase;
    color: rgba(168,85,247,0.6);
}
.pm-similar-title {
    font-size: 12px; font-weight: 600; line-height: 1.35;
    color: rgba(255,255,255,0.75);
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.pm-similar-views {
    font-size: 10px; color: rgba(255,255,255,0.2);
}
.pm-similar-views i { font-size: 9px; margin-right: 3px; }
.pm-empty-similar {
    padding: 24px 8px; text-align: center;
    font-size: 11px; color: rgba(255,255,255,0.1);
}


/* ═══════════════════════════════════════════════════════════════════
   CENTER PANEL
   ═══════════════════════════════════════════════════════════════════ */
.pm-center {
    flex: 1;
    display: flex; flex-direction: column;
    overflow: hidden; min-width: 0; position: relative;
    background: #0a0a0c;
}

/* Toolbar overlay (top-right) */
.pm-toolbar-row {
    position: absolute; top: 0; right: 0; z-index: 10;
    padding: 10px 14px; pointer-events: none;
}
.pm-toolbar-row > * { pointer-events: auto; }
.pm-tools { display: flex; gap: 5px; }
.pm-tool-btn-header {
    width: 30px; height: 30px; border-radius: 8px; border: none;
    background: rgba(0,0,0,0.55); backdrop-filter: blur(6px);
    color: rgba(255,255,255,0.65); font-size: 12px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.pm-tool-btn-header:hover { background: rgba(0,0,0,0.85); color: #fff; }
.pm-tool-btn-header.active,
.pm-tool-btn-header.active:hover { background: rgba(245,158,11,0.25) !important; color: #fbbf24 !important; }
.pm-tool-btn-header.active i,
.pm-tool-btn-header.active:hover i { color: #fbbf24 !important; }
.pm-close-x:hover { background: rgba(239,68,68,0.75) !important; color: #fff !important; }

/* Scrollable body */
.pm-body-scroll {
    flex: 1; overflow-y: auto; overflow-x: hidden;
    scroll-behavior: smooth; min-height: 0;
}
.pm-body-scroll::-webkit-scrollbar { width: 3px; }
.pm-body-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.05); border-radius: 2px; }

/* Centered content block */
.pm-content-inner {
    width: 100%;
    padding: 0 28px;
}
.pm-header-block { padding-top: 18px; padding-bottom: 14px; }

/* Tag */
.pm-tag {
    display: inline-block; font-size: 10px; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--tag-color, #a855f7); opacity: 0.8;
}
/* Title */
.pm-title {
    font-size: clamp(20px, 2.4vw, 28px); font-weight: 700;
    line-height: 1.25; color: #f4f4f5;
    margin: 6px 0 8px; word-break: break-word;
}
/* Meta */
.pm-meta {
    display: flex; gap: 12px; flex-wrap: wrap;
}
.pm-meta-item { font-size: 12px; color: rgba(255,255,255,0.3); }
.pm-meta-item i { margin-right: 4px; font-size: 10px; opacity: 0.5; }


/* ═══════════════════════════════════════════════════════════════════
   HERO IMAGE
   ═══════════════════════════════════════════════════════════════════ */
.pm-hero-wrap {
    position: relative; width: 100%; overflow: hidden;
    cursor: zoom-in; background: #000; flex-shrink: 0;
    max-height: 460px;
    display: flex; justify-content: center; align-items: center;
}
.pm-hero-blur {
    position: absolute; inset: -30px;
    background-size: cover; background-position: center;
    filter: blur(40px) brightness(0.3) saturate(1.2);
    z-index: 0; opacity: 0; transition: opacity 0.4s;
}
.pm-hero-img {
    position: relative; z-index: 1; display: block;
    max-width: 100%; max-height: 460px; object-fit: contain;
    transition: transform 0.3s ease;
}
.pm-hero-wrap:hover .pm-hero-img { transform: scale(1.01); }

/* Horizontal */
.pm-hero-wrap.pm-hero-horizontal { max-height: 460px; background: #0a0a0c; }
.pm-hero-wrap.pm-hero-horizontal .pm-hero-img {
    width: 100%; height: auto; max-height: 460px; object-fit: contain;
}
/* Vertical — blur bg */
.pm-hero-wrap.pm-hero-vertical { height: 480px; max-height: 55vh; }
.pm-hero-wrap.pm-hero-vertical .pm-hero-blur { opacity: 1; }
.pm-hero-wrap.pm-hero-vertical .pm-hero-img {
    width: auto; height: 100%; max-width: 50%; object-fit: contain;
}


/* ═══════════════════════════════════════════════════════════════════
   ARTICLE TEXT
   ═══════════════════════════════════════════════════════════════════ */
.pm-article-text {
    font-size: 15px; line-height: 1.75;
    color: rgba(255,255,255,0.78);
    word-break: break-word; padding: 16px 0 32px;
    cursor: var(--cursor-text, text);
}
.pm-article-text p { margin-bottom: 0.9em; }
.pm-article-text p:last-child { margin-bottom: 0; }
.pm-article-text h2, .pm-article-text h3 {
    color: #f4f4f5; margin: 1.3em 0 0.4em; font-weight: 700;
}
.pm-article-text h2 { font-size: 1.2em; }
.pm-article-text h3 { font-size: 1.08em; }
.pm-article-text img {
    max-width: 100%; border-radius: 0;
    margin: 0.8em 0; display: block; height: auto;
}
.pm-article-text video.preview-video {
    width: 100%; border-radius: 8px;
    margin: 0.8em 0; display: block; height: auto;
    max-height: 70vh;
}
.pm-article-text .preview-img-container:has(video) {
    border-radius: 12px; overflow: hidden;
    margin: 0.8em 0;
    background: #000;
}
/* Hide ALL post videos until JS marks them ready — prevents gray native triangle */
.pm-article-text video {
    opacity: 0;
}
.pm-article-text video.pm-video-ready {
    opacity: 1;
    transition: opacity .3s ease;
}
.preview-img-container.video-loading::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 36px; height: 36px;
    margin: -18px 0 0 -18px;
    border: 3px solid rgba(255,255,255,0.12);
    border-top-color: rgba(255,255,255,0.75);
    border-radius: 50%;
    animation: videoSpin 0.7s linear infinite;
    z-index: 5; pointer-events: none;
}
@keyframes videoSpin { to { transform: rotate(360deg); } }
.pm-article-text .preview-img-container:has(video) video {
    margin: 0;
}

/* ── Content image wrapper ── */
.pm-content-img-wrap {
    position: relative;
    border-radius: 0; margin: 0.8em 0 0;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; cursor: pointer;
}
.pm-content-img-wrap img {
    position: relative; z-index: 1;
    max-width: 100%; max-height: 500px; object-fit: contain;
    border-radius: 0; margin: 0; display: block;
    transition: opacity 0.2s;
}
.pm-content-img-wrap:hover img { opacity: 0.85; }
/* Caption placed BELOW the image container */
.pm-img-caption {
    text-align: center; font-size: 12px; opacity: 0.45;
    padding: 4px 12px 0; margin: 0 0 0.8em;
    line-height: 1.4;
}
/* Hero image caption */
.pm-hero-caption { margin-top: -4px; margin-bottom: 4px; }
/* Fallback styling for figcaption before JS converts it to .pm-img-caption */
.pm-article-text figure { margin: 20px 0; }
.pm-article-text figcaption {
    text-align: center; font-size: 12px; opacity: 0.45;
    padding: 4px 12px 0; margin: 0 0 0.8em;
    line-height: 1.4;
}

/* Portrait: show blurred background */
.pm-content-img-wrap.pm-content-img-portrait {
    min-height: 300px; max-height: 55vh;
    border-radius: 12px; background: #0a0a0c;
}
.pm-content-img-blur {
    position: absolute; inset: -30px;
    background-size: cover; background-position: center;
    filter: blur(40px) brightness(0.3) saturate(1.2);
    z-index: 0;
}
.pm-content-img-wrap.pm-content-img-portrait img {
    width: auto; height: 100%; max-width: 50%;
    object-fit: contain; box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}
/* ══ Content Lightbox ══ */
.content-lightbox {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(0,0,0,0.92); backdrop-filter: blur(8px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    animation: clbFadeIn 0.2s ease;
}
@keyframes clbFadeIn { from { opacity: 0; } to { opacity: 1; } }
.content-lb-img-wrap {
    max-width: 90vw; max-height: 80vh;
    display: flex; align-items: center; justify-content: center;
}
.content-lb-img-wrap img {
    max-width: 90vw; max-height: 80vh;
    object-fit: contain; transition: opacity 0.12s;
    user-select: none; -webkit-user-drag: none;
}
.content-lb-caption {
    text-align: center; font-size: 13px; color: rgba(255,255,255,0.6);
    padding: 10px 20px 0; max-width: 600px;
}
.content-lb-close {
    position: absolute; top: 16px; right: 16px;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: none; color: #fff; font-size: 18px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.content-lb-close:hover { background: rgba(255,255,255,0.2); }
.content-lb-prev, .content-lb-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,0.08); border: none; color: #fff; font-size: 18px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.content-lb-prev { left: 12px; }
.content-lb-next { right: 12px; }
.content-lb-prev:hover, .content-lb-next:hover { background: rgba(255,255,255,0.18); }
.content-lb-counter {
    position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
    font-size: 13px; color: rgba(255,255,255,0.4); font-weight: 500;
}
@media (max-width: 600px) {
    .content-lb-prev, .content-lb-next { width: 36px; height: 36px; font-size: 15px; }
    .content-lb-prev { left: 6px; }
    .content-lb-next { right: 6px; }
    .content-lb-close { top: 10px; right: 10px; }
}

.pm-article-text blockquote {
    border-left: 3px solid rgba(168,85,247,0.3);
    padding: 8px 14px; margin: 0.8em 0;
    background: rgba(168,85,247,0.03); border-radius: 0 8px 8px 0;
    font-style: italic; color: rgba(255,255,255,0.55);
}
.pm-article-text a { color: rgba(168,85,247,0.8); text-decoration: none; }
.pm-article-text a:hover { text-decoration: underline; }
.pm-article-text a.article-link-card { color: inherit; }
.pm-article-text a.article-link-card:hover { text-decoration: none; }
.pm-article-text ul, .pm-article-text ol { padding-left: 1.1em; margin: 0.8em 0; }
.pm-article-text li { margin-bottom: 0.3em; }
.pm-article-text strong { color: rgba(255,255,255,0.92); }

/* Image grid */
.pm-img-grid { display: grid; gap: 3px; border-radius: 8px; overflow: hidden; margin: 10px 0; }
.pm-img-grid-2 { grid-template-columns: 1fr 1fr; }
.pm-img-grid-3 { grid-template-columns: 1fr 1fr; }
.pm-img-grid-3 .pm-img-grid-item:first-child { grid-column: 1 / -1; }
.pm-img-grid-item { overflow: hidden; cursor: zoom-in; background: #111; }
.pm-img-grid-item img {
    width: 100% !important; height: 100% !important;
    object-fit: cover !important; display: block !important;
    border-radius: 0 !important; margin: 0 !important;
    min-height: 80px; max-height: 280px;
}

/* Gallery collage in post detail */
.pm-gallery-collage {
    display: grid;
    gap: 3px;
    border-radius: 8px;
    overflow: hidden;
    margin: 10px 0;
    max-height: 500px;
}
.pm-gallery-collage[data-count="1"] { grid-template-columns: 1fr; }
.pm-gallery-collage[data-count="2"] { grid-template-columns: 1fr 1fr; }
.pm-gallery-collage[data-count="3"] { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.pm-gallery-collage[data-count="3"] .preview-gallery-cell:first-child { grid-row: 1 / -1; }
.pm-gallery-collage[data-count="4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pm-gallery-collage[data-count="5"] { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pm-gallery-collage[data-count="5"] .preview-gallery-cell:nth-child(1),
.pm-gallery-collage[data-count="5"] .preview-gallery-cell:nth-child(2) { grid-row: 1; }
.pm-gallery-collage[data-count="5"] .preview-gallery-cell:nth-child(1) { grid-column: 1 / 2; }
.pm-gallery-collage[data-count="5"] .preview-gallery-cell:nth-child(2) { grid-column: 2 / 4; }
.pm-gallery-collage[data-count="6"],
.pm-gallery-collage:not([data-count="1"]):not([data-count="2"]):not([data-count="3"]):not([data-count="4"]):not([data-count="5"]) {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}
.preview-gallery-cell {
    position: relative;
    overflow: hidden;
    background: #111;
    cursor: pointer;
}
.preview-gallery-cell img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    min-height: 80px; max-height: 250px;
    transition: transform 0.3s ease;
}
.preview-gallery-cell:hover img { transform: scale(1.03); }
.pm-gallery-more {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    pointer-events: none;
}


/* ═══════════════════════════════════════════════════════════════════
   [6] REACTIONS — floating circles, NO background, NO border
   ═══════════════════════════════════════════════════════════════════ */
.pm-reactions-float {
    flex-shrink: 0;
    padding: 10px 28px 12px;
    display: flex; align-items: center; justify-content: center;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: transparent;
}
/* Full reset — override ALL base .reactions-row stacking/spacing rules */
.pm-reactions-float .reactions-row {
    display: flex !important; align-items: center !important; gap: 6px !important;
    background: none !important; border: none !important;
    padding: 0 !important; margin: 0 !important;
    position: static !important; z-index: auto !important;
    flex-wrap: wrap !important;
}
.pm-reactions-float .reaction-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 20px;
    background: rgba(255,255,255,0.06) !important;
    border: none !important;
    font-size: 13px; cursor: pointer;
    transition: background 0.2s;
}
.pm-reactions-float .reaction-chip:hover {
    background: rgba(255,255,255,0.12) !important;
}
.pm-reactions-float .reaction-chip.active {
    background: rgba(168,85,247,0.15) !important;
}
.pm-reactions-float .reaction-emoji { font-size: 16px; }
.pm-reactions-float .reaction-count {
    font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.6);
}
.pm-reactions-float .reaction-add-btn {
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,0.05); border: none;
    color: rgba(255,255,255,0.3); font-size: 11px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.pm-reactions-float .reaction-add-btn:hover {
    background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7);
}


/* ═══════════════════════════════════════════════════════════════════
   RIGHT PANEL — Author + Comments (Apple HIG: glassmorphic, clean)
   ═══════════════════════════════════════════════════════════════════ */
.pm-right {
    position: absolute;
    left: 100%;
    top: 0;
    bottom: 0;
    width: 300px;
    z-index: 5;
    background: rgba(12, 12, 14, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex; flex-direction: column;
    overflow: hidden; min-width: 0;
}

/* ── Author Card — Apple HIG: clean, airy, no borders ── */
.pm-author-card {
    padding: 20px 16px 16px;
    flex-shrink: 0;
}
.pm-author-top {
    display: flex; align-items: center; gap: 12px;
    border-radius: 8px; padding: 4px; margin: -4px;
    transition: background 0.2s ease;
}
.pm-author-top[onclick]:hover {
    background: rgba(255,255,255,0.06);
}
.pm-author-top[onclick]:hover .pm-author-name {
    color: #a78bfa;
}
.pm-author-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
    border: none;
}
.pm-author-info { min-width: 0; }
.pm-author-name {
    font-size: 14px; font-weight: 600; color: #f4f4f5;
    display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    letter-spacing: -0.01em;
}
.pm-author-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10px; font-weight: 600;
    color: #a855f7;
    letter-spacing: 0.02em;
    margin-top: 2px;
}
.pm-author-badge i {
    font-size: 9px;
}

/* Bio — plain text (above stats) */
.pm-author-bio {
    margin-top: 12px; padding: 0;
    font-size: 12px; line-height: 1.5;
    color: rgba(255,255,255,0.4);
    background: transparent;
    border-radius: 0;
    display: -webkit-box; -webkit-line-clamp: 3;
    -webkit-box-orient: vertical; overflow: hidden;
}

/* Stats — minimal numbers, no boxes */
.pm-author-stats {
    display: flex; gap: 0; margin-top: 14px;
    background: transparent;
    border-radius: 0; overflow: visible;
}
.pm-author-stat {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; padding: 0;
    border-right: none;
}
.pm-author-stat:last-child { border-right: none; }
.pm-stat-val {
    font-size: 15px; font-weight: 600; color: rgba(255,255,255,0.85);
}
.pm-stat-label {
    font-size: 10px; font-weight: 500;
    color: rgba(255,255,255,0.3); text-transform: uppercase;
    margin-top: 2px; letter-spacing: 0;
}

/* ── Comments wrapper ── */
.pm-comments-wrapper {
    flex: 1; position: relative;
    display: flex; flex-direction: column;
    overflow: hidden; min-height: 0;
    border-top: 1px solid rgba(255,255,255,0.04);
}
/* When inside book/comic detail modal, comments should flow naturally */
.bd-info-col .pm-comments-wrapper {
    overflow: visible;
    flex: none;
    min-height: auto;
    margin-top: 24px;
}
.bd-info-col .pm-comments-wrapper .cs-list {
    overflow: visible !important;
    max-height: none !important;
}
.bd-info-col .pm-comments-wrapper .cs-container {
    overflow: visible !important;
}
.bd-info-col .pm-comments-wrapper .comments-section-v2 {
    overflow: visible !important;
}


/* Comment overrides now injected via JS in modal.js (_applyNewsPostStyles) */


/* ═══════════════════════════════════════════════════════════════════
   CINEMA / READER MODE
   ═══════════════════════════════════════════════════════════════════ */
.modal-container.news-post.cinema-mode .pm-left,
.modal-container.news-post.cinema-mode .pm-right { display: none !important; }
.modal-container.news-post.cinema-mode { max-width: 100% !important; }
.modal-container.news-post.cinema-mode .pm-reactions-float { display: none !important; }

.modal-container.news-post.cinema-mode .pm-hero-wrap { max-height: 580px; }
.modal-container.news-post.cinema-mode .pm-hero-img { max-height: 580px; }
.modal-container.news-post.cinema-mode .pm-hero-wrap.pm-hero-vertical { height: 65vh; max-height: 65vh; }

.modal-container.news-post.cinema-mode .pm-content-inner { max-width: 700px; margin: 0 auto; }
.modal-container.news-post.cinema-mode .pm-title { font-size: clamp(24px, 3vw, 36px); }
.modal-container.news-post.cinema-mode .pm-article-text {
    font-size: 18px; line-height: 1.95;
    text-align: justify; hyphens: auto; -webkit-hyphens: auto;
    padding-bottom: 48px;
}


/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .pm-left { display: none; }
}
@media (max-width: 768px) {
    .pm-left { display: none; }
    .pm-right {
        position: static; width: 100%;
        max-height: 40vh; border-left: none; opacity: 1;
        border-top: 1px solid rgba(255,255,255,0.04);
    }
    .pm-content-inner { padding: 0 14px; }
    .pm-header-block { padding-top: 12px; }
    .pm-title { font-size: clamp(18px, 5vw, 22px); }
    .pm-article-text { font-size: 14px; }
    .pm-hero-wrap, .pm-hero-img { max-height: 300px; }
    .pm-hero-wrap.pm-hero-vertical { height: 40vh; }
    .pm-hero-wrap.pm-hero-vertical .pm-hero-img { max-width: 70%; }
    .pm-content-img-wrap.pm-content-img-portrait { height: 300px; max-height: 40vh; }
    .pm-content-img-wrap.pm-content-img-portrait img { max-width: 70%; }
}


/* ═══════════════════════════════════════════════════════════════════
   OVERFLOW PROTECTION
   ═══════════════════════════════════════════════════════════════════ */
.post-module * { box-sizing: border-box; }
.pm-article-text img, .pm-article-text video,
.pm-article-text iframe, .pm-article-text table { max-width: 100% !important; }
.pm-article-text pre {
    max-width: 100%; overflow-x: auto;
    background: rgba(255,255,255,0.03); padding: 10px 14px;
    border-radius: 6px; font-size: 12px;
}


/* ═══════════════════════════════════════════════════════════════════
   ARTICLE POLL (interactive voting widget)
   ═══════════════════════════════════════════════════════════════════ */
.article-poll {
    border-radius: 14px; padding: 20px; margin: 20px 0;
    background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.06);
    transition: border-color 0.2s;
}
.article-poll:hover { border-color: rgba(255,255,255,0.1); }
.article-poll-question {
    font-size: 16px; font-weight: 700; margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px; color: #f4f4f5;
}
.article-poll-question i { opacity: 0.3; font-size: 14px; }
.article-poll-options { display: flex; flex-direction: column; gap: 6px; }
.article-poll-option {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 10px;
    background: rgba(255,255,255,0.03); cursor: pointer;
    transition: all 0.2s ease; position: relative;
    border: 1px solid transparent;
}
.article-poll-option:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.08);
}
.article-poll-option.voted {
    background: rgba(99,102,241,0.08);
    border-color: rgba(99,102,241,0.2);
}
.article-poll-num {
    width: 26px; height: 26px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; flex-shrink: 0;
    background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.3);
    transition: all 0.2s;
}
.article-poll-option.voted .article-poll-num {
    background: rgba(99,102,241,0.2); color: #818cf8;
}
.article-poll-text { flex: 1; font-size: 14px; color: rgba(255,255,255,0.75); }
.article-poll-bar {
    width: 60px; height: 4px; border-radius: 2px;
    background: rgba(255,255,255,0.06); overflow: hidden;
    flex-shrink: 0;
}
.article-poll-fill {
    height: 100%; width: 0; border-radius: 2px;
    background: #6366f1; transition: width 0.5s cubic-bezier(.4,0,.2,1);
}
.article-poll-pct {
    font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.3);
    min-width: 32px; text-align: right; flex-shrink: 0;
    transition: color 0.2s;
}
.article-poll-option.voted .article-poll-pct { color: #818cf8; }
.article-poll-footer {
    margin-top: 14px; font-size: 11px; color: rgba(255,255,255,0.2);
}
.article-poll-total {
    margin-top: 6px; font-size: 12px; color: rgba(255,255,255,0.25);
}
.article-poll-voters {
    margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px;
}
.article-poll-voter-ava {
    width: 22px; height: 22px; border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.1);
}

/* Feed card compact poll */
.feed-poll {
    padding: 10px 14px; border-radius: 10px;
    background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.05);
    margin-top: 8px;
}
.feed-poll-question {
    font-size: 13px; font-weight: 600; margin-bottom: 8px;
    display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,0.8);
}
.feed-poll-question i { opacity: 0.3; font-size: 11px; }
.feed-poll-options { display: flex; flex-direction: column; gap: 4px; }
.feed-poll-option {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px; border-radius: 8px;
    background: rgba(255,255,255,0.03); cursor: pointer;
    transition: all 0.15s; font-size: 12px; color: rgba(255,255,255,0.6);
    border: 1px solid transparent;
}
.feed-poll-option:hover { background: rgba(255,255,255,0.06); }
.feed-poll-option.voted { background: rgba(99,102,241,0.08); border-color: rgba(99,102,241,0.15); color: #818cf8; }
.feed-poll-bar {
    flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.05); overflow: hidden;
}
.feed-poll-fill { height: 100%; width: 0; border-radius: 2px; background: #6366f1; transition: width 0.4s ease; }
.feed-poll-pct { font-size: 11px; font-weight: 600; min-width: 28px; text-align: right; opacity: 0.4; }
.feed-poll-total { margin-top: 6px; font-size: 10px; opacity: 0.25; }

/* Feed card poll badge (desktop — minimal, click to open article) */
.feed-poll-badge {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 8px; padding: 5px 12px;
    border-radius: 20px; cursor: pointer;
    font-size: 12px; font-weight: 600;
    background: rgba(99,102,241,0.08); color: rgba(129,140,248,0.85);
    border: 1px solid rgba(99,102,241,0.12);
    transition: all 0.2s ease;
}
.feed-poll-badge:hover { background: rgba(99,102,241,0.15); color: #818cf8; border-color: rgba(99,102,241,0.25); }
.feed-poll-badge i { font-size: 11px; opacity: 0.7; }

/* ══════════ ARTICLE LINK CARD (published view) ══════════ */
.pm-article-text a.article-link-card,
.article-link-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none !important;
    margin: 16px 0;
    transition: box-shadow 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
    cursor: pointer;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: inherit;
}
.pm-article-text a.article-link-card:hover,
.article-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.18);
    text-decoration: none !important;
}
.article-link-image {
    width: 100%;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(0,0,0,0.3);
}
.article-link-image img {
    width: 100%;
    display: block;
    max-height: 260px;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.article-link-card:hover .article-link-image img {
    transform: scale(1.03);
}
.article-link-body {
    flex: 1;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    overflow: hidden;
}
.pm-article-text .article-link-title,
.article-link-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: rgba(255,255,255,0.92) !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pm-article-text .article-link-desc,
.article-link-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pm-article-text .article-link-domain,
.article-link-domain {
    font-size: 12px;
    color: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}
.article-link-domain i { font-size: 10px; }

.article-link-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
    margin-bottom: 3px;
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}
.article-link-internal {
    border-left: 3px solid rgba(139, 92, 246, 0.3);
}

/* ══════════ YOUTUBE EMBED BLOCK ══════════ */
.article-yt-embed {
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
    background: #0d0d0d;
    border: 1px solid rgba(255,255,255,0.07);
}
.article-yt-thumb {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    cursor: pointer;
    background: #0d0d0d;
}
.article-yt-thumb img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.article-yt-embed:not(.yt-playing) .article-yt-thumb:hover img { transform: scale(1.03); }
/* Dark vignette over thumbnail */
.article-yt-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
    z-index: 1;
    pointer-events: none;
    transition: background 0.2s;
}
.article-yt-embed:not(.yt-playing) .article-yt-thumb:hover::before { background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 100%); }
.article-yt-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(220, 30, 30, 0.92);
    border: 3px solid rgba(255,255,255,0.25);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 20px;
    padding-left: 4px; /* visual center for play icon */
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}
.article-yt-play:hover {
    transform: translate(-50%, -50%) scale(1.12);
    background: rgba(255, 0, 0, 1);
    box-shadow: 0 6px 32px rgba(220,0,0,0.45);
}
.article-yt-play:active { transform: translate(-50%, -50%) scale(0.95); }
.article-yt-title {
    padding: 9px 14px 10px;
    font-size: 13px; font-weight: 600;
    color: rgba(255,255,255,0.75);
    line-height: 1.4;
    background: #0d0d0d;
}
/* Fallback link when iframe is blocked */
.yt-embed-fallback {
    position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
    z-index: 10; padding: 10px 20px; border-radius: 8px;
    background: #ff0000; color: #fff; font-size: 14px; font-weight: 600;
    text-decoration: none; display: flex; align-items: center; gap: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5); transition: background 0.2s;
}
.yt-embed-fallback:hover { background: #cc0000; }
/* Mobile */
@media (max-width: 600px) {
    .article-yt-play { width: 52px; height: 52px; font-size: 17px; }
}

/* ══════════ POST NOT FOUND ══════════ */
.pm-not-found {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    text-align: center;
}
.pm-nf-inner {
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 420px;
}
.pm-nf-icon {
    font-size: 52px;
    color: rgba(168, 85, 247, 0.35);
    margin-bottom: 8px;
    display: block;
}
.pm-nf-title {
    font-size: 22px; font-weight: 700;
    color: rgba(255,255,255,0.8);
    margin: 0;
}
.pm-nf-desc {
    font-size: 15px;
    color: rgba(255,255,255,0.35);
    margin: 0;
    line-height: 1.5;
}
.pm-nf-btn {
    margin-top: 12px;
    padding: 12px 28px;
    border-radius: 12px;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    color: #fff;
    font-size: 15px; font-weight: 600;
    border: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px;
    transition: opacity 0.2s, transform 0.2s;
}
.pm-nf-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.pm-nf-redirect {
    font-size: 12px;
    color: rgba(255,255,255,0.2);
    margin: 0;
}

/* ══════════ SPOILER / HIDDEN TEXT ══════════ */
.article-spoiler {
    border-radius: 10px;
    margin: 12px 0;
    overflow: hidden;
    transition: background 0.2s;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
}
.article-spoiler summary {
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    list-style: none;
    transition: background 0.15s;
}
.article-spoiler summary::-webkit-details-marker { display: none; }
.article-spoiler summary::before {
    content: '\f06e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    transition: transform 0.2s;
}
.article-spoiler[open] summary::before {
    content: '\f070';
}
.article-spoiler summary:hover {
    background: rgba(255,255,255,0.04);
}
.article-spoiler-content {
    padding: 4px 16px 14px;
    font-size: 14px;
    line-height: 1.65;
    color: rgba(255,255,255,0.7);
    animation: spoilerReveal 0.25s ease;
}
@keyframes spoilerReveal {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ══════════ NSFW blur + click-to-reveal ══════════ */
.pm-nsfw-blurred img {
    filter: blur(24px) !important;
    transform: scale(1.1);
    transition: filter 0.4s ease, transform 0.4s ease;
}
.pm-nsfw-blurred .pm-hero-blur {
    filter: blur(40px) !important;
}
.pm-nsfw-reveal {
    position: absolute;
    inset: 0; z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    background: rgba(0,0,0,0.25);
    border-radius: inherit;
    transition: background 0.2s;
}
.pm-nsfw-reveal:hover {
    background: rgba(0,0,0,0.15);
}
.pm-nsfw-badge {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: rgba(239,68,68,0.85);
    color: #fff;
    font-size: 16px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(239,68,68,0.3);
    letter-spacing: 0.5px;
}
.pm-nsfw-hint {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}

/* ── Official verified checkmark in article title ── */
.pm-title .official-check {
    width: 22px;
    height: 22px;
}

/* ── Offline saved article banner ── */
.read-offline-banner {
    margin: 0 0 12px;
    padding: 10px 14px;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 10px;
    flex-shrink: 0;
}
