body {
    background:
        radial-gradient(circle at 12% 10%, rgba(220, 38, 38, 0.10), transparent 30%),
        radial-gradient(circle at 88% 80%, rgba(15, 23, 42, 0.08), transparent 32%),
        var(--bg);
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.detail-page {
    width: 100%;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(360px, 620px) 300px;
    justify-content: center;
    align-items: start;
    gap: 24px;
    padding: 24px;
    overflow-x: hidden;
}

.detail-device {
    width: 100%;
    min-height: calc(100dvh - 48px);
    background: var(--bg);
    border-radius: 36px;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
    position: relative;
}

/* ===== PREMIUM DETAIL HEADER - SAME FEEL AS HOME ===== */

.detail-app-topbar,
.premium-detail-topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 99999 !important;
    width: 100%;
    min-height: 82px;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 18px 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background:
        radial-gradient(circle at 12% 0%, rgba(220, 38, 38, 0.16), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94)) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95) !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08) !important;
}

.detail-app-topbar::before {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(220, 38, 38, 0.20),
        rgba(15, 23, 42, 0.08),
        transparent
    );
}

.detail-brand-row,
.premium-detail-brand-row {
    min-width: 0;
    flex: 1;
    display: flex !important;
    align-items: center !important;
    gap: 11px;
    text-decoration: none !important;
}

.premium-detail-logo-wrap {
    width: 54px;
    height: 54px;
    border-radius: 19px;
    padding: 3px;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(135deg, rgba(220, 38, 38, 0.75), rgba(15, 23, 42, 0.18)) border-box;
    border: 1px solid transparent;
    box-shadow:
        0 12px 26px rgba(15, 23, 42, 0.13),
        0 0 0 6px rgba(220, 38, 38, 0.05);
    flex: 0 0 auto;
}

.detail-brand-logo,
.premium-detail-brand-logo {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 16px !important;
    object-fit: cover !important;
    background: #ffffff;
    display: block;
}

.detail-brand-text,
.premium-detail-brand-text {
    min-width: 0;
    display: flex !important;
    flex-direction: column !important;
}

.detail-brand-text strong,
.premium-detail-brand-text strong {
    margin: 0;
    color: #dc2626 !important;
    font-size: 19px !important;
    line-height: 1.1;
    font-weight: 600 !important;
    letter-spacing: -0.45px;
    white-space: nowrap;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.detail-brand-text small,
.premium-detail-brand-text small {
    margin-top: 5px;
    color: #0f172a !important;
    font-size: 11.5px !important;
    line-height: 1.1;
    font-weight: 600 !important;
    letter-spacing: 0.05px;
    opacity: 0.92;
    white-space: nowrap;
}

.detail-round-icon-btn,
.premium-detail-share-btn {
    width: 48px !important;
    height: 48px !important;
    border-radius: 18px !important;
    border: 1px solid rgba(226, 232, 240, 0.95) !important;
    background: linear-gradient(180deg, #ffffff, #f8fafc) !important;
    color: #0f172a !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto;
    box-shadow:
        0 12px 26px rgba(15, 23, 42, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.detail-round-icon-btn ion-icon,
.premium-detail-share-btn ion-icon {
    font-size: 22px !important;
}

/* ===== LOADING / ERROR ===== */

.detail-loading,
.detail-error {
    min-height: calc(100dvh - 110px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    text-align: center;
    padding: 24px;
}

.detail-error ion-icon {
    color: var(--primary);
    font-size: 58px;
}

.detail-error h2 {
    margin: 12px 0 6px;
    color: var(--text);
    font-weight: 600;
}

.detail-error p {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}

.detail-primary-link {
    display: inline-flex;
    margin-top: 16px;
    background: var(--primary);
    color: #ffffff;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 600;
}

/* ===== CONTENT ===== */

.detail-content {
    padding: 14px 14px 94px !important;
}

.detail-post-card,
.comments-card,
.related-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 24px;
    margin: 0 0 16px;
    padding: 14px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

.detail-post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.detail-author-area {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0;
}

.detail-author-avatar,
.detail-comment-avatar {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    object-fit: cover;
    background: #e5e7eb;
    flex: 0 0 auto;
    overflow: hidden;
}

.detail-author-avatar img,
.detail-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-author-avatar.fallback,
.detail-comment-avatar.fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
}

.detail-author-avatar.fallback ion-icon,
.detail-comment-avatar.fallback ion-icon {
    font-size: 21px;
}

.detail-author-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    margin-left: 10px;
}

.detail-author-line {
    display: flex;
    align-items: center;
    min-width: 0;
}

.detail-author-line strong {
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    max-width: 230px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-verified-icon {
    color: #1877f2;
    font-size: 17px;
    margin-left: 4px;
    flex: 0 0 auto;
}

.detail-meta-line {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 500;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    display: block;
}

.detail-more-btn {
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: var(--text);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.detail-more-btn ion-icon {
    font-size: 22px;
}

/* ===== NEWS TEXT SAME FEEL AS HOME ===== */

.detail-title {
    margin: 8px 0 12px;
    color: #dc2626;
    font-size: 17px;
    line-height: 1.42;
    
    font-weight: 600;
    letter-spacing: -0.35px;
    text-align: justify;
    word-break: break-word;
}

.detail-location-row {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 14px;
}

.detail-location-row ion-icon {
    color: var(--primary);
    font-size: 17px;
    flex: 0 0 auto;
}

.detail-body {
    color: var(--text);
    font-size: 16px;
    line-height: 1.78;
    font-weight: 400;
    text-align: justify;
    word-break: break-word;
}

.detail-body p {
    margin: 0 0 15px;
}

.empty-body-text {
    color: var(--muted);
    font-style: italic;
}

/* ===== MEDIA VERTICAL LIST ===== */

.detail-media-gallery {
    width: 100%;
    margin: 16px 0 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.detail-media-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.detail-media-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.detail-media-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.detail-media-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-media-tile {
    position: relative;
    display: block;
    width: 100%;
    min-height: 180px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    background: #111827;
    cursor: pointer;
}

.detail-media-tile img,
.detail-media-tile video {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    display: block;
    background: #111827;
}

.detail-media-tile.video-tile {
    aspect-ratio: 16 / 9;
}

.detail-media-tile.video-tile img,
.detail-media-tile.video-tile video,
.video-thumb-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumb-fallback {
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 38px;
    background: linear-gradient(135deg, #111827, #374151);
}

.media-play-badge {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 34px;
    background: rgba(0, 0, 0, 0.18);
}

.media-play-badge ion-icon {
    width: 58px;
    height: 58px;
    padding: 13px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.58);
}

/* ===== STATS + ACTIONS ===== */

.detail-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
    padding: 11px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-top: 10px;
    text-align: center;
}

.facebook-action-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.facebook-action-btn {
    min-height: 48px;
    border: 0;
    background: transparent;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 500;
}

.facebook-action-btn ion-icon {
    font-size: 22px;
}

.facebook-action-btn.active {
    color: #1877f2;
}

/* ===== COMMENTS ===== */

.comments-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.comments-head h2 {
    margin: 0;
    color: var(--text);
    font-size: 19px;
    font-weight: 600;
}

.comments-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
}

.comments-head button {
    border: 0;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
    border-radius: 999px;
    padding: 9px 13px;
}

.detail-comment-form {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    margin-bottom: 16px;
}

.detail-comment-form textarea {
    flex: 1;
    resize: none;
    min-height: 48px;
    max-height: 120px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #f8fafc;
    color: var(--text);
    outline: 0;
    padding: 13px 14px;
    font-weight: 500;
}

.detail-comment-form textarea:focus {
    background: #ffffff;
    border-color: rgba(220, 38, 38, 0.5);
}

.detail-comment-form button {
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.detail-comment-form button ion-icon {
    font-size: 21px;
}

.comment-loading-box,
.empty-comment-box {
    text-align: center;
    color: var(--muted);
    padding: 26px 14px;
}

.empty-comment-box ion-icon {
    color: var(--primary);
    font-size: 38px;
}

.empty-comment-box h3 {
    color: var(--text);
    margin: 9px 0 4px;
    font-weight: 600;
}

.empty-comment-box p {
    margin: 0;
    font-weight: 500;
}

.detail-comment-item {
    display: flex;
    gap: 10px;
    margin-bottom: 13px;
}

.detail-comment-avatar {
    width: 40px;
    height: 40px;
}

.detail-comment-bubble {
    flex: 1;
    background: #f1f5f9;
    border-radius: 18px;
    padding: 10px 12px;
}

.detail-comment-bubble strong {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text);
    font-size: 13.5px;
    font-weight: 600;
}

.detail-comment-bubble strong ion-icon {
    color: #1877f2;
}

.detail-comment-bubble p {
    margin: 4px 0 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 400;
}

.detail-comment-bubble span {
    display: block;
    color: var(--muted);
    margin-top: 5px;
    font-size: 11px;
    font-weight: 500;
}

/* ===== RELATED ===== */

.related-news-list {
    display: grid;
    gap: 12px;
}

.related-news-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--border);
    background: #f8fafc;
    border-radius: 18px;
}

.related-news-item img,
.related-fallback {
    width: 84px;
    height: 74px;
    border-radius: 14px;
    object-fit: cover;
    background: var(--primary-soft);
    color: var(--primary);
    flex: 0 0 auto;
}

.related-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.related-fallback ion-icon {
    font-size: 28px;
}

.related-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.related-info small {
    color: var(--primary);
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
}

.related-info strong {
    color: var(--text);
    font-size: 14px;
    line-height: 1.35;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: justify;
}

.related-info em {
    color: var(--muted);
    font-size: 11.5px;
    font-style: normal;
    font-weight: 500;
    margin-top: 5px;
}

.empty-related {
    color: var(--muted);
    background: #f8fafc;
    border: 1px dashed var(--border);
    border-radius: 18px;
    padding: 18px;
    text-align: center;
    font-weight: 500;
}

/* ===== DESKTOP SIDE PANEL ===== */

.detail-desktop-panel {
    position: sticky;
    top: 24px;
}

.detail-side-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 20px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.10);
}

.detail-side-card img {
    width: 86px;
    height: 86px;
    border-radius: 24px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.detail-side-card h2 {
    margin: 16px 0 8px;
    font-size: 22px;
    line-height: 1.22;
    color: var(--text);
    font-weight: 600;
}

.detail-side-card p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.55;
    font-size: 14px;
    font-weight: 500;
}

.detail-side-link {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 16px;
    background: #f8fafc;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    margin-top: 9px;
    font-size: 14px;
    font-weight: 600;
}

.detail-side-link:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.detail-side-link ion-icon {
    font-size: 20px;
}

/* ===== MEDIA VIEWER ===== */

body.media-viewer-open {
    overflow: hidden;
}

.media-viewer {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 14px 28px;
}

.media-viewer[hidden] {
    display: none !important;
}

.media-viewer-inner {
    width: min(980px, 100%);
    max-height: calc(100vh - 90px);
    overflow-y: auto;
}

.media-viewer-counter {
    width: fit-content;
    margin: 0 auto 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
}

.media-viewer-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
}

.media-viewer-stage img,
.media-viewer-stage video {
    max-width: 100%;
    max-height: calc(100vh - 130px);
    border-radius: 16px;
    object-fit: contain;
    background: #000000;
}

.media-viewer-close,
.media-viewer-nav {
    position: fixed;
    z-index: 100000;
    border: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

.media-viewer-close {
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 24px;
}

.media-viewer-nav {
    top: 50%;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    transform: translateY(-50%);
    font-size: 26px;
}

.media-viewer-prev {
    left: 12px;
}

.media-viewer-next {
    right: 12px;
}

/* ===== GLOBAL FONT OVERRIDE ===== */

html,
body,
button,
input,
textarea,
select,
a,
p,
span,
strong,
small,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

/* ===== RESPONSIVE ===== */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 920px) {
    body {
        background: var(--bg);
    }

    .detail-page {
        display: block !important;
        width: 100vw !important;
        max-width: 100vw !important;
        padding: 0 !important;
        margin: 0 !important;
        background: var(--bg);
    }

    .detail-device {
        width: 100vw !important;
        max-width: 100vw !important;
        min-height: 100dvh;
        margin: 0 !important;
        padding: 0 !important;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: var(--bg);
    }

    .detail-app-topbar,
    .premium-detail-topbar {
        width: 100vw !important;
        max-width: 100vw !important;
        min-height: 78px;
        border-radius: 0 !important;
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    .detail-desktop-panel {
        display: none !important;
    }

    .detail-content {
        padding: 12px 10px 94px !important;
    }

    .detail-post-card,
    .comments-card,
    .related-card {
        border-radius: 22px;
        padding: 13px;
        margin-bottom: 12px;
    }

    .detail-title {
        font-size: 17px;
        line-height: 1.42;
    }

    .detail-body {
        font-size: 15.5px;
        line-height: 1.75;
    }

    .detail-media-tile {
        border-radius: 14px;
    }

    .detail-stats-row {
        gap: 6px;
        font-size: 12px;
    }

    .facebook-action-btn {
        min-height: 46px;
        font-size: 13.5px;
    }
}

@media (max-width: 520px) {
    .detail-app-topbar,
    .premium-detail-topbar {
        min-height: 76px;
    }

    .premium-detail-logo-wrap {
        width: 50px;
        height: 50px;
        border-radius: 18px;
    }

    .premium-detail-brand-logo {
        border-radius: 15px !important;
    }

    .detail-brand-text strong,
    .premium-detail-brand-text strong {
        font-size: 19px !important;
    }

    .detail-brand-text small,
    .premium-detail-brand-text small {
        font-size: 10.8px !important;
    }

    .detail-round-icon-btn,
    .premium-detail-share-btn {
        width: 46px !important;
        height: 46px !important;
        border-radius: 17px !important;
    }

    .detail-author-line strong {
        max-width: 190px;
    }

    .detail-meta-line {
        max-width: 100%;
    }

    .detail-stats-row {
        font-size: 11.5px;
    }
}

@media (max-width: 380px) {
    .detail-brand-text strong,
    .premium-detail-brand-text strong {
        font-size: 18px !important;
    }

    .detail-brand-text small,
    .premium-detail-brand-text small {
        max-width: 205px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .premium-detail-logo-wrap {
        width: 47px;
        height: 47px;
    }

    .detail-round-icon-btn,
    .premium-detail-share-btn {
        width: 43px !important;
        height: 43px !important;
    }

    .detail-title {
        font-size: 19px;
    }
}

@media (max-width: 640px) {
    .media-viewer {
        padding: 54px 8px 22px;
    }

    .media-viewer-nav {
        top: auto;
        bottom: 18px;
        transform: none;
    }

    .media-viewer-prev {
        left: 22px;
    }

    .media-viewer-next {
        right: 22px;
    }

    .media-viewer-stage img,
    .media-viewer-stage video {
        max-height: calc(100vh - 150px);
        border-radius: 12px;
    }
}
/* ===== FINAL HARD FIX: DETAIL PAGE HEADER LOGO SIZE ===== */

.detail-app-topbar.premium-detail-topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 99999 !important;
    width: 100% !important;
    min-height: 82px !important;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 18px 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background:
        radial-gradient(circle at 12% 0%, rgba(220, 38, 38, 0.16), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94)) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95) !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08) !important;
    overflow: hidden !important;
}

.premium-detail-brand-row {
    min-width: 0 !important;
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 11px !important;
    text-decoration: none !important;
    overflow: hidden !important;
}

.premium-detail-logo-wrap {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    max-width: 54px !important;
    flex: 0 0 54px !important;
    border-radius: 19px !important;
    padding: 3px !important;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(135deg, rgba(220, 38, 38, 0.75), rgba(15, 23, 42, 0.18)) border-box !important;
    border: 1px solid transparent !important;
    box-shadow:
        0 12px 26px rgba(15, 23, 42, 0.13),
        0 0 0 6px rgba(220, 38, 38, 0.05) !important;
    overflow: hidden !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.premium-detail-logo-img {
    width: 100% !important;
    height: 100% !important;
    max-width: 48px !important;
    max-height: 48px !important;
    border-radius: 16px !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Old class conflict ko neutralize karne ke liye */
.detail-app-topbar img.detail-brand-logo,
.detail-app-topbar img.premium-detail-brand-logo {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    border-radius: 16px !important;
    object-fit: cover !important;
    flex: 0 0 48px !important;
}

.premium-detail-brand-text {
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.premium-detail-brand-text strong {
    margin: 0 !important;
    color: #dc2626 !important;
    font-size: 19px !important;
    line-height: 1.1 !important;
    font-weight: 600 !important;
    letter-spacing: -0.45px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.premium-detail-brand-text small {
    margin-top: 5px !important;
    color: #0f172a !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.premium-detail-share-btn {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    flex: 0 0 48px !important;
    border-radius: 18px !important;
    border: 1px solid rgba(226, 232, 240, 0.95) !important;
    background: linear-gradient(180deg, #ffffff, #f8fafc) !important;
    color: #0f172a !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow:
        0 12px 26px rgba(15, 23, 42, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

.premium-detail-share-btn ion-icon {
    font-size: 22px !important;
}

@media (max-width: 520px) {
    .detail-app-topbar.premium-detail-topbar {
        min-height: 76px !important;
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    .premium-detail-logo-wrap {
        width: 50px !important;
        height: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
        flex-basis: 50px !important;
        border-radius: 18px !important;
    }

    .premium-detail-logo-img {
        max-width: 44px !important;
        max-height: 44px !important;
        border-radius: 15px !important;
    }

    .premium-detail-brand-text strong {
        font-size: 19px !important;
    }

    .premium-detail-brand-text small {
        font-size: 10.8px !important;
        max-width: 220px !important;
    }

    .premium-detail-share-btn {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        flex-basis: 46px !important;
        border-radius: 17px !important;
    }
}

@media (max-width: 380px) {
    .premium-detail-brand-text strong {
        font-size: 18px !important;
    }

    .premium-detail-brand-text small {
        max-width: 190px !important;
    }

    .premium-detail-logo-wrap {
        width: 47px !important;
        height: 47px !important;
        min-width: 47px !important;
        flex-basis: 47px !important;
    }

    .premium-detail-share-btn {
        width: 43px !important;
        height: 43px !important;
        min-width: 43px !important;
        flex-basis: 43px !important;
    }
}
/* ===== FINAL HARD FIX: DETAIL HEADER ALWAYS FIXED TOP ===== */

@media (max-width: 920px) {
    .detail-page {
        padding-top: 0 !important;
    }

    .detail-device {
        padding-top: 82px !important;
        overflow: visible !important;
    }

    .detail-app-topbar.premium-detail-topbar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 999999 !important;

        width: 100vw !important;
        max-width: 100vw !important;
        min-height: 82px !important;

        padding: calc(env(safe-area-inset-top, 0px) + 14px) 18px 12px !important;

        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;

        background:
            radial-gradient(circle at 12% 0%, rgba(220, 38, 38, 0.16), transparent 36%),
            linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.96)) !important;

        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;

        border-bottom: 1px solid rgba(226, 232, 240, 0.95) !important;
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10) !important;

        border-radius: 0 !important;
        transform: none !important;
        overflow: hidden !important;
    }

    .detail-content {
        padding-top: 12px !important;
    }

    .detail-loading,
    .detail-error {
        padding-top: 82px !important;
    }

    .premium-detail-brand-row {
        min-width: 0 !important;
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        gap: 11px !important;
        overflow: hidden !important;
    }

    .premium-detail-logo-wrap {
        width: 50px !important;
        height: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
        flex: 0 0 50px !important;
        border-radius: 18px !important;
        padding: 3px !important;
        overflow: hidden !important;
    }

    .premium-detail-logo-img {
        width: 44px !important;
        height: 44px !important;
        max-width: 44px !important;
        max-height: 44px !important;
        border-radius: 15px !important;
        object-fit: cover !important;
        display: block !important;
    }

    .premium-detail-brand-text {
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .premium-detail-brand-text strong {
        font-size: 19px !important;
        line-height: 1.1 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .premium-detail-brand-text small {
        font-size: 10.8px !important;
        max-width: 220px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .premium-detail-share-btn {
        width: 46px !important;
        height: 46px !important;
        min-width: 46px !important;
        flex: 0 0 46px !important;
        border-radius: 17px !important;
    }
}

@media (min-width: 921px) {
    .detail-app-topbar.premium-detail-topbar {
        position: sticky !important;
        top: 0 !important;
        z-index: 99999 !important;
    }
}

/* =========================================================
   COMMENTS POPUP
========================================================= */

body.comments-modal-open {
    overflow: hidden !important;
}

.comments-modal[hidden] {
    display: none !important;
}

.comments-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.comments-modal-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(3px);
    cursor: pointer;
}

.comments-modal-panel {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: min(560px, 100%);
    max-height: min(82vh, 760px);
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e4eaf2;
    border-radius: 24px;
    box-shadow:
        0 25px 70px rgba(15, 23, 42, 0.26),
        0 8px 24px rgba(15, 23, 42, 0.14);
    animation: commentsModalOpen 0.22s ease-out;
}

@keyframes commentsModalOpen {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.comments-modal-handle {
    display: none;
    width: 44px;
    height: 5px;
    margin: 9px auto 0;
    background: #cbd5e1;
    border-radius: 999px;
}

.comments-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    min-height: 74px;
    padding: 16px 20px;
    border-bottom: 1px solid #edf1f6;
    background: #ffffff;
}

.comments-modal-heading h2 {
    margin: 0;
    color: #0f172a;
    font-size: 21px;
    font-weight: 750;
    line-height: 1.2;
}

.comments-modal-heading p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}

.comments-modal-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-modal-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #334155;
    background: #f1f5f9;
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.comments-modal-icon-btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.comments-modal-icon-btn ion-icon {
    font-size: 22px;
}

.comments-modal-body {
    flex: 1;
    min-height: 230px;
    overflow-y: auto;
    padding: 16px 20px 24px;
    overscroll-behavior: contain;
}

.comments-modal-body .detail-comments-list {
    min-height: 200px;
}

.comments-modal-footer {
    flex-shrink: 0;
    padding: 12px 16px;
    border-top: 1px solid #e8edf4;
    background: #ffffff;
}

.comments-popup-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    width: 100%;
    margin: 0 !important;
}

.comments-popup-form textarea {
    flex: 1;
    min-width: 0;
    min-height: 50px;
    max-height: 130px;
    padding: 14px 16px;
    resize: none;
    overflow-y: auto;
    border: 1px solid #dbe3ed;
    border-radius: 18px;
    outline: none;
    color: #0f172a;
    background: #f8fafc;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.comments-popup-form textarea:focus {
    border-color: #e3222a;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(227, 34, 42, 0.1);
}

.comments-popup-form button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: #e3222a;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(227, 34, 42, 0.22);
    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.comments-popup-form button[type="submit"]:hover {
    background: #c91820;
    transform: translateY(-1px);
}

.comments-popup-form button[type="submit"] ion-icon {
    font-size: 25px;
}

.detail-comments-count-btn {
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.detail-comments-count-btn:hover {
    color: #e3222a;
    text-decoration: underline;
}

.comments-modal-body .comment-loading-box,
.comments-modal-body .empty-comment-box {
    min-height: 230px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media (max-width: 640px) {
    .comments-modal {
        align-items: flex-end;
        padding: 0;
    }

    .comments-modal-panel {
        width: 100%;
        height: min(82vh, 720px);
        max-height: 82vh;
        border-radius: 24px 24px 0 0;
        animation: commentsModalMobileOpen 0.25s ease-out;
    }

    @keyframes commentsModalMobileOpen {
        from {
            opacity: 0.7;
            transform: translateY(100%);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .comments-modal-handle {
        display: block;
    }

    .comments-modal-header {
        min-height: 66px;
        padding: 11px 16px 13px;
    }

    .comments-modal-heading h2 {
        font-size: 20px;
    }

    .comments-modal-body {
        padding: 14px 15px 20px;
    }

    .comments-modal-footer {
        padding:
            10px
            12px
            calc(10px + env(safe-area-inset-bottom));
    }

    .comments-popup-form textarea {
        min-height: 48px;
    }

    .comments-popup-form button[type="submit"] {
        width: 48px;
        height: 48px;
    }
}

/* GNPM_FORCE_HIDE_OLD_COMMENTS_CARD */
#newsDetailContent > .comments-card,
#newsDetailContent .comments-card,
.detail-content > .comments-card,
.detail-device .detail-content .comments-card {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* Popup must remain visible when opened */
.comments-modal:not([hidden]) {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}


/* =========================================================
   GNPM_DETAIL_REPORT_MORE_MENU
========================================================= */

.detail-post-card,
.detail-post-header {
    overflow: visible !important;
}

.detail-more-wrap {
    position: relative;
    flex: 0 0 auto;
}

.detail-more-wrap .detail-more-btn {
    width: 38px;
    height: 38px;
    border: 0;
    padding: 0;
    border-radius: 999px;
    background: transparent;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.detail-more-wrap .detail-more-btn:hover,
.detail-more-wrap .detail-more-btn[aria-expanded="true"] {
    background: #f1f5f9;
    color: #dc2626;
}

.detail-more-wrap .detail-more-btn ion-icon {
    font-size: 22px;
}

.detail-more-menu[hidden] {
    display: none !important;
}

.detail-more-menu {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 1000;
    width: 172px;
    padding: 7px;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    background: #ffffff;
    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.17),
        0 5px 16px rgba(15, 23, 42, 0.08);
}

.detail-report-menu-btn {
    width: 100%;
    min-height: 43px;
    padding: 0 11px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 9px;
    text-align: left;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
}

.detail-report-menu-btn:hover {
    background: #fee2e2;
}

.detail-report-menu-btn ion-icon {
    flex: 0 0 auto;
    font-size: 19px;
}


/* =========================================================
   GNPM_DETAIL_VIDEO_PREVIEW_FINAL
========================================================= */

.detail-media-tile.video-tile {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    min-height: 190px !important;
    overflow: hidden !important;
    background: #111827 !important;
}

.detail-video-preview {
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;

    width: 100% !important;
    height: 100% !important;
    max-height: none !important;

    display: block !important;
    object-fit: contain !important;
    object-position: center !important;

    background: #111827 !important;
    pointer-events: none !important;
}

.detail-video-preview[hidden] {
    display: none !important;
}

.detail-video-fallback {
    position: absolute !important;
    inset: 0 !important;
    z-index: 2 !important;

    width: 100% !important;
    height: 100% !important;

    align-items: center !important;
    justify-content: center !important;

    color: #ffffff !important;
    background:
        linear-gradient(
            135deg,
            #111827,
            #263244
        ) !important;
}

.detail-video-fallback:not([hidden]) {
    display: flex !important;
}

.detail-video-fallback ion-icon {
    font-size: 42px !important;
}

.detail-media-tile.video-tile .media-play-badge {
    position: absolute !important;
    inset: 0 !important;
    z-index: 4 !important;

    display: grid !important;
    place-items: center !important;

    background: rgba(0, 0, 0, 0.08) !important;
    pointer-events: none !important;
}

.detail-media-tile.video-tile .media-play-badge ion-icon {
    width: 58px !important;
    height: 58px !important;
    padding: 13px !important;

    color: #ffffff !important;
    border-radius: 999px !important;
    background: rgba(0, 0, 0, 0.68) !important;

    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.32) !important;
}
