/* GK Stories v5 */
.gk-stories-v5,
.gk-stories {
    --gk-story-avatar-size: 72px;
    --gk-story-ring-width: 3px;
    --gk-story-ring-1: var(--gk-primary, #3b82f6);
    --gk-story-ring-2: var(--gk-accent, #ef4444);
    --gk-story-ring-3: #f59e0b;
    --gk-story-seen-ring: #d1d5db;
    --gk-story-seen-title: #9ca3af;
    --gk-story-title-gap: 4px;
    --gk-story-title-width: 92px;
    --gk-story-item-width-base: 92px;
    --gk-story-gap: 14px;
    --gk-story-rail-edge: 2px;
    --gk-story-rail-nav-bg: #fff;
    --gk-story-rail-nav-color: #111827;
    --gk-story-overlay-bg: rgba(2, 6, 23, .92);
    --gk-story-viewer-width: 430px;
    --gk-story-viewer-height: 88vh;
    --gk-story-viewer-radius: 28px;
    --gk-story-media-bg: #05070b;
    --gk-story-gradient-strength: .62;
    --gk-story-progress-track: rgba(255,255,255,.28);
    --gk-story-progress-fill: #fff;
    --gk-story-progress-height: 3px;
    --gk-story-progress-gap: 5px;
    --gk-story-viewer-title: #fff;
    --gk-story-viewer-subtitle: rgba(255,255,255,.72);
    --gk-story-action-bg: rgba(255,255,255,.14);
    --gk-story-action-color: #fff;
    --gk-story-action-border: rgba(255,255,255,.18);
    --gk-story-action-size: 36px;
    --gk-story-bottom-bg: #111318;
    --gk-story-description-color: #fff;
    --gk-story-product-bg: rgba(255,255,255,.12);
    --gk-story-product-title: #fff;
    --gk-story-product-price: rgba(255,255,255,.72);
    --gk-story-product-radius: 16px;
    --gk-story-cta-bg: #fff;
    --gk-story-cta-color: #111827;
    --gk-story-cta-radius: 14px;
    --gk-story-desktop-nav-bg: rgba(255,255,255,.14);
    --gk-story-desktop-nav-color: #fff;
    position: relative;
    width: 100%;
    min-width: 0;
    direction: inherit;
}

.gk-story-style-probe {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.gk-stories-editor-empty {
    min-height: 110px;
    display: grid;
    place-items: center;
    padding: 20px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
    font-size: 13px;
    line-height: 1.8;
}

.gk-stories-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.gk-stories-section-title {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
    color: var(--gk-text, #111827);
}

.gk-stories-rail-shell {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.gk-stories-swiper {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    opacity: 1 !important;
    visibility: visible !important;
    padding-block: 8px 10px;
}

.gk-stories-swiper .swiper-wrapper {
    align-items: flex-start;
}

.gk-story-avatar,
.gk-stories-swiper .swiper-slide.gk-story-avatar {
    width: max(
        var(--gk-story-item-width-base),
        calc(var(--gk-story-avatar-size) + (var(--gk-story-ring-width) * 4) + 6px)
    ) !important;
    max-width: none;
    flex: 0 0 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    text-align: center;
    color: inherit;
    outline: none;
    box-sizing: border-box;
    transition: transform 180ms ease;
}

.gk-story-avatar:hover { transform: translateY(-2px); }
.gk-story-avatar:active { transform: translateY(0) scale(.97); }
.gk-story-avatar:focus-visible .gk-ring { box-shadow: 0 0 0 4px rgba(59,130,246,.2); }

.gk-avatar,
.gk-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gk-avatar {
    width: 100%;
    flex: 0 0 auto;
}

.gk-ring {
    position: relative;
    width: calc(var(--gk-story-avatar-size) + (var(--gk-story-ring-width) * 4));
    height: calc(var(--gk-story-avatar-size) + (var(--gk-story-ring-width) * 4));
    border-radius: 999px;
    padding: var(--gk-story-ring-width);
    background: linear-gradient(135deg, var(--gk-story-ring-1), var(--gk-story-ring-2), var(--gk-story-ring-3));
    box-shadow: 0 8px 18px rgba(15,23,42,.08);
}

.gk-story-avatar.is-seen .gk-ring { background: var(--gk-story-seen-ring); }

.gk-ring img {
    width: var(--gk-story-avatar-size);
    height: var(--gk-story-avatar-size);
    display: block;
    object-fit: cover;
    border-radius: 999px;
    border: 3px solid var(--gk-background, #fff);
    background: #f3f4f6;
}

.gk-story-badge,
.gk-story-editor-status {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    pointer-events: none;
    white-space: nowrap;
}

.gk-story-badge {
    inset-inline: 8px;
    bottom: 6px;
    min-height: 16px;
    padding: 2px 5px;
    font-size: 9px;
    line-height: 1;
    color: #fff;
    background: rgba(0,0,0,.58);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.gk-story-editor-status {
    inset-inline-start: 50%;
    transform: translateX(-50%);
    top: -8px;
    padding: 3px 7px;
    font-size: 8px;
    color: #7c2d12;
    background: #ffedd5;
    border: 1px solid #fed7aa;
}

[dir="rtl"] .gk-story-editor-status { transform: translateX(50%); }

.gk-avatar-title {
    width: min(var(--gk-story-title-width), 100%);
    max-width: var(--gk-story-title-width);
    min-height: 32px;
    margin-top: var(--gk-story-title-gap);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    line-height: 16px;
    font-weight: 800;
    color: var(--gk-text, #111827);
    overflow-wrap: anywhere;
}

.gk-story-avatar.is-seen .gk-avatar-title { color: var(--gk-story-seen-title); }

.gk-stories-rail-nav {
    position: relative;
    z-index: 2;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 999px;
    border: 1px solid rgba(15,23,42,.08);
    background: var(--gk-story-rail-nav-bg);
    color: var(--gk-story-rail-nav-color);
    box-shadow: 0 10px 28px rgba(15,23,42,.08);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease;
}

.gk-stories-rail-nav:hover,
.gk-stories-rail-nav:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(15,23,42,.12);
}

.gk-stories-rail-nav.swiper-button-disabled { opacity: .3; cursor: default; }
.gk-stories-rail-nav::after,
.gk-stories-rail-nav::before { display: none !important; }

.gk-stories-rail-pagination {
    position: static;
    margin-top: 8px;
    text-align: center;
}

.gk-stories-rail-pagination .swiper-pagination-bullet {
    width: 7px;
    height: 7px;
    opacity: .24;
    background: var(--gk-primary, #3b82f6);
    transition: width 180ms ease, opacity 180ms ease;
}

.gk-stories-rail-pagination .swiper-pagination-bullet-active {
    width: 22px;
    border-radius: 999px;
    opacity: 1;
}

.gk-swiper-fallback {
    overflow-x: auto !important;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}
.gk-swiper-fallback::-webkit-scrollbar { display: none; }
.gk-swiper-fallback .swiper-wrapper { gap: var(--gk-story-gap); transform: none !important; }
.gk-swiper-fallback .gk-story-avatar { scroll-snap-align: start; }

/* Global viewer */
.gk-story-overlay {
    --gk-story-overlay-bg: rgba(2,6,23,.92);
    --gk-story-viewer-width: 430px;
    --gk-story-viewer-height: 88vh;
    --gk-story-viewer-radius: 28px;
    --gk-story-media-bg: #05070b;
    --gk-story-gradient-strength: .62;
    --gk-story-progress-track: rgba(255,255,255,.28);
    --gk-story-progress-fill: #fff;
    --gk-story-progress-height: 3px;
    --gk-story-progress-gap: 5px;
    --gk-story-viewer-title: #fff;
    --gk-story-viewer-subtitle: rgba(255,255,255,.72);
    --gk-story-action-bg: rgba(255,255,255,.14);
    --gk-story-action-color: #fff;
    --gk-story-action-border: rgba(255,255,255,.18);
    --gk-story-action-size: 36px;
    --gk-story-bottom-bg: #111318;
    --gk-story-description-color: #fff;
    --gk-story-product-bg: rgba(255,255,255,.12);
    --gk-story-product-title: #fff;
    --gk-story-product-price: rgba(255,255,255,.72);
    --gk-story-product-radius: 16px;
    --gk-story-cta-bg: #fff;
    --gk-story-cta-color: #111827;
    --gk-story-cta-radius: 14px;
    --gk-story-desktop-nav-bg: rgba(255,255,255,.14);
    --gk-story-desktop-nav-color: #fff;
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease, visibility 180ms ease;
    direction: inherit;
}

.gk-story-overlay.is-open { opacity: 1; visibility: visible; }
.gk-story-overlay[hidden] { display: none !important; }

.gk-story-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: var(--gk-story-overlay-bg);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    cursor: default;
}

body.gk-no-scroll {
    overflow: hidden !important;
    overscroll-behavior: none;
}

.gk-story-shell {
    position: relative;
    z-index: 2;
    width: min(var(--gk-story-viewer-width), calc(100vw - 32px));
    height: min(var(--gk-story-viewer-height), calc(100dvh - 32px), 900px);
    min-height: 420px;
    border-radius: var(--gk-story-viewer-radius);
    overflow: hidden;
    background: var(--gk-story-media-bg);
    color: #fff;
    box-shadow: 0 30px 90px rgba(0,0,0,.58);
    direction: inherit;
    isolation: isolate;
    outline: none;
}

.gk-story-shell::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    opacity: var(--gk-story-gradient-strength);
    background: linear-gradient(to bottom, rgba(0,0,0,.68), transparent 27%, transparent 61%, rgba(0,0,0,.82));
}

.gk-story-progress {
    position: absolute;
    top: calc(12px + env(safe-area-inset-top, 0px));
    inset-inline: 12px;
    z-index: 40;
    display: flex;
    gap: var(--gk-story-progress-gap);
}

.gk-story-progress[hidden] { display: none; }

.gk-story-progress-item {
    flex: 1;
    height: var(--gk-story-progress-height);
    border-radius: 99px;
    overflow: hidden;
    background: var(--gk-story-progress-track);
}

.gk-story-progress-item span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--gk-story-progress-fill);
    transition: width 70ms linear;
}

.gk-story-topbar {
    position: absolute;
    top: 0;
    inset-inline: 0;
    z-index: 41;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: calc(26px + env(safe-area-inset-top, 0px)) 14px 14px;
    pointer-events: none;
}

.gk-story-topbar[hidden] { display: none; }

.gk-story-author {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.gk-story-author-img {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.28);
}

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

.gk-story-author-text {
    min-width: 0;
    display: grid;
    gap: 2px;
    text-align: start;
}

.gk-story-title,
.gk-story-subtitle {
    display: block;
    max-width: min(230px, 45vw);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gk-story-title { font-size: 13px; font-weight: 900; color: var(--gk-story-viewer-title); }
.gk-story-subtitle { font-size: 11px; line-height: 1.4; color: var(--gk-story-viewer-subtitle); }
.gk-story-title[hidden], .gk-story-subtitle[hidden] { display: none; }

.gk-story-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: auto;
}

.gk-story-btn {
    width: var(--gk-story-action-size);
    height: var(--gk-story-action-size);
    flex: 0 0 var(--gk-story-action-size);
    border: 1px solid var(--gk-story-action-border);
    border-radius: 999px;
    background: var(--gk-story-action-bg);
    color: var(--gk-story-action-color);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: transform 160ms ease, background 160ms ease;
}

.gk-story-btn[hidden] { display: none; }
.gk-story-btn:hover,
.gk-story-btn:focus-visible { transform: scale(1.05); background: rgba(255,255,255,.22); outline: none; }

.gk-svg-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; pointer-events: none; }
.gk-svg-icon svg { display: block; width: 100%; height: 100%; }
.gk-story-btn .gk-svg-icon { width: 18px; height: 18px; }
.gk-story-pause .gk-icon-play,
.gk-story-mute .gk-icon-muted { display: none; }
.gk-story-overlay.is-paused .gk-story-pause .gk-icon-pause { display: none; }
.gk-story-overlay.is-paused .gk-story-pause .gk-icon-play { display: inline-flex; }
.gk-story-overlay.is-muted .gk-story-mute .gk-icon-sound { display: none; }
.gk-story-overlay.is-muted .gk-story-mute .gk-icon-muted { display: inline-flex; }

.gk-story-media-area {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--gk-story-media-bg);
    min-width: 0;
    min-height: 0;
}

.gk-story-viewer-swiper,
.gk-story-viewer-swiper .swiper-wrapper,
.gk-story-slide { width: 100%; height: 100%; }

.gk-story-slide {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--gk-story-media-bg);
}

.gk-story-media {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: var(--gk-story-media-bg);
}

.gk-story-overlay.is-fit-contain .gk-story-media,
.gk-story-overlay.is-slide-fit-contain .swiper-slide-active .gk-story-media,
.gk-story-slide.is-fit-contain .gk-story-media,
.gk-story-slide.is-fit-auto-contain .gk-story-media {
    object-fit: contain;
    object-position: center center;
    image-rendering: auto;
}

.gk-story-slide.is-fit-contain,
.gk-story-slide.is-fit-auto-contain {
    background: var(--gk-story-media-bg);
}

.gk-story-slide.is-fit-auto-cover .gk-story-media {
    object-fit: cover;
    object-position: center center;
}

.gk-story-overlay.is-fit-cover .gk-story-media,
.gk-story-overlay.is-slide-fit-cover .swiper-slide-active .gk-story-media,
.gk-story-slide.is-fit-cover .gk-story-media { object-fit: cover; }

.gk-story-slide.is-template-product {
    background:
        radial-gradient(circle at 50% 38%, rgba(255,255,255,.13), transparent 42%),
        var(--gk-story-media-bg);
}

.gk-story-slide.is-template-product .gk-story-media {
    width: 84%;
    height: 72%;
    object-fit: contain !important;
    filter: drop-shadow(0 24px 34px rgba(0,0,0,.34));
}

.gk-story-slide.is-template-category .gk-story-media { filter: saturate(.95) contrast(1.02); }

.gk-story-template-caption {
    position: absolute;
    z-index: 3;
    inset-inline: 24px;
    bottom: 128px;
    display: grid;
    gap: 4px;
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,.35);
    pointer-events: none;
}

.gk-story-template-caption strong { font-size: 18px; line-height: 1.5; font-weight: 900; }
.gk-story-template-caption span { font-size: 13px; opacity: .82; }

.gk-story-text-slide {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 72px 34px;
    box-sizing: border-box;
}

.gk-story-text-inner {
    max-width: 100%;
    max-height: 100%;
    overflow: auto;
    text-align: center;
    font-size: 22px;
    line-height: 1.85;
    font-weight: 800;
    overscroll-behavior: contain;
}

.gk-story-tap-zone {
    position: absolute;
    top: 96px;
    bottom: 126px;
    z-index: 12;
    width: 28%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    opacity: 0;
}

.gk-story-tap-zone[hidden] { display: none; }
.gk-story-tap-prev { inset-inline-start: 0; }
.gk-story-tap-next { inset-inline-end: 0; }

.gk-story-bottom {
    position: absolute;
    z-index: 31;
    inset-inline: 14px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    display: grid;
    gap: 9px;
    pointer-events: none;
}

.gk-story-bottom > * { pointer-events: auto; }

.gk-story-description-wrap {
    min-width: 0;
    color: var(--gk-story-description-color);
}
.gk-story-description-wrap[hidden] { display: none; }

.gk-story-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--gk-story-description-lines, 3);
    overflow: hidden;
    font-size: 13px;
    line-height: 1.8;
    text-align: start;
    text-shadow: 0 2px 12px rgba(0,0,0,.36);
    overflow-wrap: anywhere;
}

.gk-story-description-wrap.is-overflowing .gk-story-description-toggle { display: inline-flex; }

.gk-story-description-wrap.is-expanded .gk-story-description {
    display: block;
    max-height: min(34vh, 230px);
    overflow: auto;
    padding-inline-end: 4px;
}

.gk-story-description-toggle {
    display: none;
    margin: 3px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.78);
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}

.gk-story-product[hidden], .gk-story-cta[hidden] { display: none !important; }

.gk-story-product-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 9px 10px;
    border-radius: var(--gk-story-product-radius);
    background: var(--gk-story-product-bg);
    border: 1px solid rgba(255,255,255,.14);
    color: var(--gk-story-product-title);
    text-decoration: none;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.gk-story-product-card img {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 11px;
    object-fit: cover;
    background: #fff;
}

.gk-story-product-meta { display: grid; gap: 3px; min-width: 0; text-align: start; }
.gk-story-product-meta strong { color: var(--gk-story-product-title); font-size: 12px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gk-story-product-meta small { color: var(--gk-story-product-price); font-size: 11px; line-height: 1.5; }

.gk-story-cta {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: var(--gk-story-cta-radius);
    background: var(--gk-story-cta-bg);
    color: var(--gk-story-cta-color);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 900;
    text-align: center;
}

.gk-story-cta:hover,
.gk-story-cta:focus-visible { color: var(--gk-story-cta-color); filter: brightness(.96); outline: none; }

.gk-story-overlay.has-template-product .gk-story-description-wrap,
.gk-story-overlay.has-template-product .gk-story-product,
.gk-story-overlay.has-template-category .gk-story-description-wrap,
.gk-story-overlay.has-template-category .gk-story-product {
    display: none !important;
}

.gk-story-overlay.has-template-product .gk-story-bottom,
.gk-story-overlay.has-template-category .gk-story-bottom {
    gap: 6px;
}

.gk-story-overlay.has-template-product .gk-story-cta,
.gk-story-overlay.has-template-category .gk-story-cta {
    justify-self: stretch;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 12.5px;
}

.gk-story-template-caption {
    max-width: min(86%, 320px);
    margin-inline: auto;
}

.gk-story-template-caption strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gk-story-template-caption span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gk-story-desktop-nav {
    position: absolute;
    z-index: 45;
    top: 50%;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gk-story-desktop-nav-bg);
    color: var(--gk-story-desktop-nav-color);
    cursor: pointer;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: transform 160ms ease, background 160ms ease;
}

.gk-story-desktop-nav[hidden] { display: none; }
.gk-story-desktop-prev { inset-inline-start: calc(50% - (min(var(--gk-story-viewer-width), calc(100vw - 32px)) / 2) - 64px); }
.gk-story-desktop-next { inset-inline-end: calc(50% - (min(var(--gk-story-viewer-width), calc(100vw - 32px)) / 2) - 64px); }
.gk-story-desktop-nav:hover,
.gk-story-desktop-nav:focus-visible { transform: scale(1.07); background: rgba(255,255,255,.23); outline: none; }
.gk-story-overlay.is-ltr .gk-story-desktop-nav .gk-svg-icon { transform: rotate(180deg); }

@media (max-width: 767px) {
    .gk-stories-rail-nav { display: none; }
    .gk-stories-rail-shell { gap: 0; }

    .gk-story-overlay {
        padding: 0;
        align-items: stretch;
        justify-content: stretch;
    }

    .gk-story-shell {
        width: 100vw;
        height: 100dvh;
        min-height: 0;
        max-height: none;
        border-radius: 0;
        box-shadow: none;
    }

    .gk-story-desktop-nav { display: none !important; }
    .gk-story-topbar { padding-inline: 12px; }
    .gk-story-title, .gk-story-subtitle { max-width: 44vw; }
    .gk-story-bottom { inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); gap: 8px; }
    .gk-story-template-caption { bottom: 150px; }

    .gk-story-overlay.is-mobile-compact .gk-story-description { -webkit-line-clamp: 1; font-size: 12px; }
    .gk-story-overlay.is-mobile-compact .gk-story-product-card { padding: 6px 8px; }
    .gk-story-overlay.is-mobile-compact .gk-story-product-card img { width: 38px; height: 38px; flex-basis: 38px; }
    .gk-story-overlay.is-mobile-compact .gk-story-cta { min-height: 38px; }

    .gk-story-overlay.is-mobile-hidden .gk-story-bottom { display: none; }
    .gk-story-overlay.is-mobile-hide-description .gk-story-description-wrap { display: none !important; }
    .gk-story-overlay.is-mobile-hide-product .gk-story-product { display: none !important; }
    .gk-story-overlay.is-mobile-hide-cta .gk-story-cta { display: none !important; }

    /* Real media + content split. No absolute media layer in card_under mode. */
    .gk-story-overlay.is-mobile-card-under .gk-story-shell {
        display: grid;
        grid-template-rows: minmax(0, 1fr) auto;
        background: var(--gk-story-bottom-bg);
    }
    .gk-story-overlay.is-mobile-card-under .gk-story-shell::after {
        bottom: auto;
        height: min(70dvh, 72%);
        background: linear-gradient(to bottom, rgba(0,0,0,.62), transparent 35%, transparent 78%, rgba(0,0,0,.25));
    }
    .gk-story-overlay.is-mobile-card-under .gk-story-media-area {
        position: relative;
        inset: auto;
        grid-row: 1;
        min-height: 0;
    }
    .gk-story-overlay.is-mobile-card-under .gk-story-bottom {
        position: relative;
        inset: auto;
        grid-row: 2;
        max-height: 38dvh;
        overflow-y: auto;
        padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
        background: var(--gk-story-bottom-bg);
        border-top: 1px solid rgba(255,255,255,.08);
        overscroll-behavior: contain;
    }
    .gk-story-overlay.is-mobile-card-under .gk-story-description { text-shadow: none; }
    .gk-story-overlay.is-mobile-card-under .gk-story-tap-zone { bottom: 0; }
    .gk-story-overlay.is-mobile-card-under .gk-story-template-caption { bottom: 24px; }
}

@media (max-width: 420px) {
    .gk-story-author-img { width: 34px; height: 34px; flex-basis: 34px; }
    .gk-story-actions { gap: 4px; }
    .gk-story-btn { width: 34px; height: 34px; flex-basis: 34px; }
    .gk-story-title, .gk-story-subtitle { max-width: 38vw; }
}

@media (prefers-reduced-motion: reduce) {
    .gk-story-avatar,
    .gk-stories-rail-nav,
    .gk-story-overlay,
    .gk-story-btn,
    .gk-story-desktop-nav,
    .gk-story-progress-item span {
        transition-duration: .001ms !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}
