.mdh-story-section {
    background: #f7f7f7;
    border: 1px solid #d8d8d8;
    border-radius: 10px;
    padding: 12px;
    margin: 16px 0;
    overflow: hidden;
}

.mdh-story-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mdh-story-head.single .mdh-story-headline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.mdh-story-head h3,
.mdh-story-tab {
    margin: 0;
    color: #1d1d1d;
    font-size: 30px;
    line-height: 1.15;
    font-weight: 700;
}

.mdh-story-head-icon,
.mdh-story-tab-icon {
    font-size: 24px;
}

.mdh-story-head.tabs {
    gap: 18px;
}

.mdh-story-tab {
    appearance: none;
    border: 1px solid #d53e7a;
    background: #fff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    cursor: pointer;
    opacity: .8;
    border-radius: 4px;
}

.mdh-story-tab.is-active {
    opacity: 1;
    background: linear-gradient(180deg, #d64e85, #ba3b72);
    color: #fff;
}

.mdh-story-underline {
    margin-top: 8px;
    height: 3px;
    background: #d91d1d;
    width: 100%;
}

.mdh-story-tab-panel { display:none; margin-top: 12px; }
.mdh-story-tab-panel.is-active { display:block; }

.mdh-story-grid {
    display: grid;
    grid-template-columns: repeat(var(--mdh-cols-desktop, 5), minmax(0, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.mdh-story-slider {
    position: relative;
}

.mdh-story-rail {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 2px 2px 10px;
}

.mdh-story-rail::-webkit-scrollbar {
    display: none;
}

.mdh-video-rail .mdh-story-card,
.mdh-photo-rail .mdh-story-card {
    flex: 0 0 clamp(170px, 18vw, 220px);
}

.mdh-story-card {
    position: relative;
    cursor: pointer;
}

.mdh-story-card.is-hidden {
    display: none;
}

.mdh-story-thumb {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    background: #d9d9d9;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
}

.mdh-story-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mdh-story-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.2) 40%, rgba(0,0,0,.08));
}

.mdh-story-caption {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 12px;
    z-index: 2;
    text-align: center;
    color: #fff;
}

.mdh-story-caption h4 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,.45);
}

.mdh-story-caption p {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.4;
}

.mdh-story-top-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    background: rgba(135, 0, 0, .88);
    color: #fff;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mdh-story-badge-video-icon {
    width: 14px;
    height: 10px;
    display: inline-block;
    position: relative;
    border: 2px solid #fff;
    border-radius: 10px;
}

.mdh-story-badge-video-icon::before,
.mdh-story-badge-video-icon::after {
    content: '';
    position: absolute;
    top: 1px;
    width: 2px;
    height: 4px;
    background: #fff;
}

.mdh-story-badge-video-icon::before { left: 3px; }
.mdh-story-badge-video-icon::after { right: 3px; }

.mdh-story-top-badge small {
    font-size: 12px;
    color: #fff;
}

.mdh-video-play {
    position: absolute;
    z-index: 2;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255,255,255,.22);
    backdrop-filter: blur(3px);
    font-size: 32px;
    border: 3px solid rgba(255,255,255,.85);
}

.mdh-video-corner-icon,
.mdh-photo-corner-icon {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    z-index: 2;
    background: linear-gradient(180deg, #ff4a00, #d10000);
    box-shadow: 0 4px 10px rgba(0,0,0,.2);
}

.mdh-video-corner-icon::before,
.mdh-video-corner-icon::after,
.mdh-photo-corner-icon::before,
.mdh-photo-corner-icon::after {
    content: '';
    position: absolute;
}

.mdh-video-corner-icon::before {
    width: 12px;
    height: 12px;
    border: 3px solid #fff;
    border-radius: 50%;
    left: 7px;
    top: 8px;
}

.mdh-video-corner-icon::after {
    width: 3px;
    height: 10px;
    background: #fff;
    right: 8px;
    top: 12px;
    box-shadow: -5px 0 0 #fff;
}

.mdh-photo-corner-icon::before,
.mdh-photo-corner-icon::after {
    background: #fff;
    border-radius: 2px;
}

.mdh-photo-corner-icon::before {
    width: 14px;
    height: 10px;
    left: 7px;
    top: 8px;
    box-shadow: 4px 4px 0 0 rgba(255,255,255,.2);
}

.mdh-photo-corner-icon::after {
    width: 14px;
    height: 10px;
    left: 11px;
    top: 14px;
}

.mdh-story-empty {
    padding: 28px;
    background: #fff;
    border-radius: 12px;
}

.mdh-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.96);
    color: #222;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

.mdh-slider-prev { left: 10px; }
.mdh-slider-next { right: 10px; }

.mdh-load-more-wrap {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.mdh-load-more-btn {
    border: 0;
    background: #d91d1d;
    color: #fff;
    padding: 12px 24px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
}

.mdh-story-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
}

.mdh-story-modal.is-open { display:block; }

.mdh-story-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .75);
}

.mdh-story-modal-box {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    width: calc(100% - 32px);
    margin: 3vh auto;
    background: #111;
    color: #fff;
    border-radius: 20px;
    display: grid;
    grid-template-columns: 1fr;
    overflow: hidden;
    max-height: 94vh;
}

.mdh-story-modal-media {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 68vh;
}

.mdh-modal-video,
.mdh-modal-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 78vh;
    background: #000;
}

.mdh-modal-photo-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mdh-story-modal-meta {
    padding: 20px 24px 24px;
    overflow-y: auto;
    background: #151515;
    border-top: 1px solid rgba(255,255,255,.08);
}

.mdh-story-modal-title {
    margin: 0 0 10px;
    font-size: 28px;
    line-height: 1.3;
}

.mdh-story-modal-content,
.mdh-story-modal-content p {
    color: #ececec;
    font-size: 16px;
    line-height: 1.7;
}

.mdh-story-close {
    position: absolute;
    right: 14px;
    top: 14px;
    z-index: 4;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(17,17,17,.75);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 26px;
    cursor: pointer;
}

.mdh-photo-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.mdh-photo-nav-btn {
    border: 0;
    background: #d91d1d;
    color: #fff;
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
}

.mdh-photo-count {
    font-size: 14px;
    color: #cfcfcf;
}

body.mdh-story-lock {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .mdh-story-head h3,
    .mdh-story-tab { font-size: 24px; }

    .mdh-story-grid {
        grid-template-columns: repeat(var(--mdh-cols-tablet, 3), minmax(0, 1fr));
    }

    .mdh-story-modal-box {
        width: calc(100% - 18px);
        margin: 2vh auto;
        max-height: 96vh;
    }

    .mdh-story-modal-media { min-height: 54vh; }
}

@media (max-width: 767px) {
    .mdh-story-section { padding: 10px; }
    .mdh-story-head.tabs { gap: 12px; }
    .mdh-story-head h3,
    .mdh-story-tab { font-size: 18px; }
    .mdh-story-head-icon,
    .mdh-story-tab-icon { font-size: 18px; }

    .mdh-story-tab {
        padding: 8px 12px;
    }

    .mdh-story-grid {
        grid-template-columns: repeat(var(--mdh-cols-mobile, 2), minmax(0, 1fr));
        gap: 10px;
    }

    .mdh-video-rail .mdh-story-card,
    .mdh-photo-rail .mdh-story-card {
        flex-basis: min(62vw, 220px);
    }

    .mdh-story-caption h4 { font-size: 15px; }
    .mdh-story-caption p { font-size: 13px; }
    .mdh-video-play { width: 64px; height: 64px; font-size: 28px; }
    .mdh-story-modal-meta { padding: 22px 16px; }
    .mdh-story-modal-title { font-size: 22px; }
    .mdh-photo-nav { justify-content: space-between; }
    .mdh-slider-arrow { width: 38px; height: 38px; font-size: 28px; }
    .mdh-slider-prev { left: 6px; }
    .mdh-slider-next { right: 6px; }
}




/* Tabs slider: strict single-story mode */
.mdh-story-tabs-wrap .mdh-story-slider {
    max-width: min(280px, 100%);
    margin: 12px auto 0;
}

.mdh-story-tabs-wrap .mdh-story-rail {
    display: block;
    overflow: hidden;
    padding: 0;
}

.mdh-story-tabs-wrap .mdh-story-rail .mdh-story-card {
    display: none;
    width: 100%;
    max-width: 100%;
}

.mdh-story-tabs-wrap .mdh-story-rail .mdh-story-card.is-active-slide {
    display: block;
}

.mdh-story-tabs-wrap .mdh-story-rail .mdh-story-card.is-hidden {
    display: none !important;
}

.mdh-story-tabs-wrap .mdh-slider-arrow {
    top: 50%;
}

@media (max-width: 767px) {
    .mdh-story-tabs-wrap .mdh-story-slider {
        max-width: min(240px, 100%);
    }
}
