/* Girlswork Stories */
.gwv-stories-mobile{
    display:none;
}

.gwv-story-open{
    overflow:hidden !important;
    background:#0f172a !important;
}

.gwv-story-dashboard{
    scroll-margin-top:24px;
}

.gwv-story-dashboard-kicker{
    display:inline-flex;
    margin-bottom:6px;
    color:var(--accent,#ff4f55);
    font-size:12px;
    font-weight:950;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.gwv-story-dashboard-limit{
    flex:0 0 auto;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:38px;
    padding:0 13px;
    border:1px solid #bbf7d0;
    border-radius:999px;
    background:#ecfdf5;
    color:#047857;
    font-size:13px;
    font-weight:950;
    white-space:nowrap;
}

.gwv-story-dashboard-limit.is-full{
    border-color:#fecaca;
    background:#fff1f2;
    color:#be123c;
}

.gwv-story-upload-guide{
    display:flex;
    align-items:center;
    gap:10px;
    margin-top:18px;
    padding:12px 14px;
    border:1px solid #e2e8f0;
    border-radius:16px;
    background:#fff;
}

.gwv-story-upload-guide span{
    display:inline-flex;
    align-items:center;
    gap:7px;
    color:#475569;
    font-size:12px;
    font-weight:850;
    white-space:nowrap;
}

.gwv-story-upload-guide span b{
    display:grid;
    width:24px;
    height:24px;
    place-items:center;
    border-radius:50%;
    background:var(--accent,#ff4f55);
    color:#fff;
    font-size:11px;
}

.gwv-story-upload-guide > i{
    flex:1;
    height:1px;
    background:#e2e8f0;
}

.gwv-story-upload-form{
    display:grid;
    grid-template-columns:minmax(210px,280px) minmax(0,1fr);
    gap:20px;
    align-items:stretch;
    margin-top:18px;
    padding:18px;
    border:1px solid #dce6f1;
    border-radius:22px;
    background:#f8fafc;
}

.gwv-story-upload-drop{
    position:relative;
    display:grid;
    place-items:center;
    align-content:center;
    min-height:300px;
    overflow:hidden;
    border:2px dashed #cbd5e1;
    border-radius:20px;
    background:#fff;
    color:#0f172a;
    text-align:center;
    cursor:pointer;
}

.gwv-story-upload-drop input{
    position:absolute;
    width:1px;
    height:1px;
    opacity:0;
    pointer-events:none;
}

.gwv-story-upload-drop > span{
    position:absolute;
    inset:0;
    background-position:center;
    background-size:cover;
    opacity:0;
    transition:opacity .18s ease;
}

.gwv-story-upload-drop > span.has-image{
    opacity:1;
}

.gwv-story-upload-drop::after{
    content:"+";
    position:relative;
    z-index:2;
    display:grid;
    width:52px;
    height:52px;
    margin-bottom:12px;
    place-items:center;
    border-radius:18px;
    background:var(--accent,#ff4f55);
    color:#fff;
    font-size:30px;
    font-weight:500;
    box-shadow:0 14px 30px rgba(255,79,85,.2);
}

.gwv-story-upload-drop:has(> span.has-image)::after{
    background:rgba(15,23,42,.72);
    content:"↻";
}

.gwv-story-upload-drop strong,
.gwv-story-upload-drop small,
.gwv-story-upload-drop em{
    position:relative;
    z-index:2;
    max-width:210px;
    padding:4px 10px;
    border-radius:8px;
    background:rgba(255,255,255,.88);
}

.gwv-story-upload-drop strong{
    font-size:16px;
    font-weight:950;
}

.gwv-story-upload-drop small{
    margin-top:5px;
    color:#64748b;
    font-size:12px;
    line-height:1.4;
}

.gwv-story-upload-drop em{
    position:absolute;
    right:10px;
    bottom:10px;
    left:10px;
    z-index:3;
    overflow:hidden;
    padding:7px 9px;
    border-radius:10px;
    background:rgba(15,23,42,.76);
    color:#fff;
    font-size:11px;
    font-style:normal;
    font-weight:800;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.gwv-story-publish-button{
    grid-column:auto;
    display:flex !important;
    visibility:visible !important;
    width:100% !important;
    min-height:56px !important;
    align-items:center;
    justify-content:center;
    padding:0 20px !important;
    border:0 !important;
    border-radius:14px !important;
    background:var(--accent,#ff4f55) !important;
    color:#fff !important;
    font:inherit;
    font-size:16px !important;
    font-weight:950 !important;
    line-height:1.2;
    text-align:center;
    cursor:pointer;
    opacity:1 !important;
}

.gwv-story-publish-panel{
    display:grid;
    align-content:center;
    gap:12px;
    padding:22px;
    border:1px solid #dce6f1;
    border-radius:18px;
    background:#fff;
}

.gwv-story-publish-panel > strong{
    color:#0f172a;
    font-size:19px;
    font-weight:950;
}

.gwv-story-publish-panel > p{
    margin:0;
    color:#64748b;
    font-size:13px;
    font-weight:700;
    line-height:1.5;
}

.gwv-story-publish-button:disabled{
    background:#94a3b8 !important;
    color:#fff !important;
    cursor:not-allowed;
    opacity:1 !important;
}

.gwv-story-dashboard-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:14px;
    margin-top:18px;
}

.gwv-story-dashboard-card{
    display:grid;
    grid-template-columns:112px minmax(0,1fr);
    overflow:hidden;
    border:1px solid #dce6f1;
    border-radius:20px;
    background:#fff;
}

.gwv-story-dashboard-card.is-expired{
    opacity:.68;
}

.gwv-story-dashboard-media{
    position:relative;
    min-height:200px;
    padding:0;
    overflow:hidden;
    border:0;
    background:#0f172a;
    cursor:pointer;
}

.gwv-story-dashboard-media img{
    width:100%;
    height:100%;
    min-height:200px;
    object-fit:cover;
}

.gwv-story-dashboard-media span{
    position:absolute;
    top:9px;
    left:9px;
    padding:5px 8px;
    border-radius:999px;
    background:#16a34a;
    color:#fff;
    font-size:10px;
    font-weight:950;
}

.gwv-story-dashboard-card.is-expired .gwv-story-dashboard-media span{
    background:#64748b;
}

.gwv-story-dashboard-card-body{
    display:grid;
    align-content:start;
    gap:8px;
    padding:14px;
}

.gwv-story-dashboard-card-body > strong{
    color:#0f172a;
    font-size:15px;
    line-height:1.25;
}

.gwv-story-dashboard-card-body > small{
    color:#64748b;
    font-weight:750;
}

.gwv-story-stats{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px;
}

.gwv-story-stats span{
    padding:7px;
    border-radius:10px;
    background:#f8fafc;
    color:#64748b;
    font-size:11px;
}

.gwv-story-stats b{
    color:#0f172a;
}

.gwv-story-dashboard-card-body form button{
    min-height:34px;
    padding:0 10px;
    border:1px solid #fecaca;
    border-radius:10px;
    background:#fff1f2;
    color:#be123c;
    font:inherit;
    font-size:12px;
    font-weight:900;
    cursor:pointer;
}

.gwv-story-dashboard-empty{
    grid-column:1 / -1;
    padding:22px;
    border:1px dashed #cbd5e1;
    border-radius:18px;
    color:#64748b;
    text-align:center;
}

.gwv-story-dashboard-preview[hidden]{
    display:none !important;
}

.gwv-story-dashboard-preview{
    position:fixed;
    inset:0;
    z-index:100010;
    display:grid;
    place-items:center;
    padding:18px;
    background:rgba(2,6,23,.88);
    backdrop-filter:blur(12px);
}

.gwv-story-dashboard-preview img{
    width:min(430px,100%);
    max-height:calc(100dvh - 36px);
    aspect-ratio:9 / 16;
    border-radius:24px;
    object-fit:cover;
}

.gwv-story-dashboard-preview button{
    position:fixed;
    top:20px;
    right:20px;
    z-index:2;
    width:44px;
    height:44px;
    border:0;
    border-radius:50%;
    background:#fff;
    color:#0f172a;
    font-size:28px;
    cursor:pointer;
}

.gwv-story-viewer[hidden]{
    display:none !important;
}

.gwv-story-viewer{
    position:fixed;
    inset:0;
    z-index:100020;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#020617;
    color:#fff;
}

.gwv-story-viewer-shell{
    --gwv-story-safe-top:max(76px,calc(env(safe-area-inset-top) + 66px));
    --gwv-story-safe-bottom:0px;
    position:relative;
    width:min(100vw,480px);
    height:100dvh;
    max-height:100dvh;
    overflow:hidden;
    background:#0f172a;
    touch-action:pan-y;
    user-select:none;
    -webkit-user-select:none;
    -webkit-touch-callout:none;
}

.gwv-story-viewer,
.gwv-story-viewer *{
    user-select:none !important;
    -webkit-user-select:none !important;
    -webkit-touch-callout:none !important;
}

.gwv-story-viewer.is-paused .gwv-story-viewer-shell::after{
    content:"Ⅱ";
    position:absolute;
    top:50%;
    left:50%;
    z-index:9;
    display:grid;
    width:58px;
    height:58px;
    place-items:center;
    transform:translate(-50%,-50%);
    border-radius:50%;
    background:rgba(2,6,23,.56);
    color:#fff;
    font-size:23px;
    font-weight:950;
    pointer-events:none;
}

.gwv-story-viewer-image{
    position:absolute;
    top:var(--gwv-story-safe-top);
    left:0;
    width:100%;
    height:calc(100% - var(--gwv-story-safe-top) - var(--gwv-story-safe-bottom));
    object-fit:fill;
    background:#020617;
    pointer-events:none;
    user-select:none;
    -webkit-user-drag:none;
    -webkit-touch-callout:none;
}

.gwv-story-viewer-shade{
    position:absolute;
    top:var(--gwv-story-safe-top);
    left:0;
    right:0;
    height:calc(100% - var(--gwv-story-safe-top) - var(--gwv-story-safe-bottom));
    background:linear-gradient(180deg,rgba(2,6,23,.7) 0%,transparent 26%,transparent 54%,rgba(2,6,23,.82) 100%);
    pointer-events:none;
}

.gwv-story-progress{
    position:absolute;
    top:max(10px,env(safe-area-inset-top));
    left:10px;
    right:10px;
    z-index:6;
    display:flex;
    gap:4px;
}

.gwv-story-progress i{
    position:relative;
    flex:1;
    height:3px;
    overflow:hidden;
    border-radius:999px;
    background:rgba(255,255,255,.35);
}

.gwv-story-progress b{
    display:block;
    width:0;
    height:100%;
    border-radius:inherit;
    background:#fff;
}

.gwv-story-progress .is-complete b{
    width:100%;
}

.gwv-story-progress .is-current.is-running b{
    width:100%;
    transition:width 5s linear;
}

.gwv-story-viewer-head{
    position:absolute;
    top:max(24px,calc(env(safe-area-inset-top) + 14px));
    left:14px;
    right:14px;
    z-index:7;
    display:grid;
    grid-template-columns:42px minmax(0,1fr) 38px;
    gap:10px;
    align-items:center;
}

.gwv-story-viewer-head > i{
    display:grid;
    width:42px;
    height:42px;
    overflow:hidden;
    place-items:center;
    border:2px solid #fff;
    border-radius:50%;
    background:#ff4f55;
    color:#fff;
    font-style:normal;
    font-weight:950;
}

.gwv-story-viewer-head > i img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.gwv-story-viewer-head div{
    display:grid;
    gap:2px;
    min-width:0;
}

.gwv-story-viewer-head strong{
    overflow:hidden;
    color:#fff;
    font-size:14px;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.gwv-story-viewer-head span{
    color:rgba(255,255,255,.72);
    font-size:12px;
}

.gwv-story-viewer-head button{
    width:38px;
    height:38px;
    padding:0;
    border:0;
    border-radius:50%;
    background:rgba(15,23,42,.45);
    color:#fff;
    font-size:27px;
    cursor:pointer;
}

.gwv-story-tap-zone{
    position:absolute;
    top:var(--gwv-story-safe-top);
    bottom:var(--gwv-story-safe-bottom);
    z-index:3;
    width:38%;
    border:0;
    background:transparent;
}

.gwv-story-tap-zone.is-left{left:0}
.gwv-story-tap-zone.is-right{right:0}

.gwv-story-swipe-hint{
    position:absolute;
    left:50%;
    bottom:max(22px,calc(env(safe-area-inset-bottom) + 12px));
    z-index:9;
    display:grid;
    justify-items:center;
    gap:0;
    padding:8px 14px 10px;
    transform:translateX(-50%);
    border-radius:999px;
    background:rgba(15,23,42,.38);
    opacity:0;
    pointer-events:none;
    visibility:hidden;
}

.gwv-story-swipe-hint.is-visible{
    opacity:1;
    visibility:visible;
}

.gwv-story-swipe-hint i{
    display:block;
    width:15px;
    height:15px;
    margin:-3px 0;
    transform:rotate(45deg);
    border-top:3px solid #fff;
    border-left:3px solid #fff;
    filter:drop-shadow(0 2px 5px rgba(0,0,0,.55));
    opacity:.25;
    animation:gwv-story-swipe-up 1.25s ease-in-out infinite;
}

.gwv-story-swipe-hint i:nth-child(2){animation-delay:.14s}
.gwv-story-swipe-hint i:nth-child(3){animation-delay:.28s}

@keyframes gwv-story-swipe-up{
    0%,100%{transform:translateY(8px) rotate(45deg);opacity:.18}
    45%{transform:translateY(-5px) rotate(45deg);opacity:1}
}

@media (max-width:760px){
    .gwv-home-ads > .gwv-stories-mobile{
        margin-bottom:0;
    }

    .gwv-stories-mobile{
        display:block;
        width:100%;
        margin:0 0 12px;
        padding:2px 0;
        overflow:hidden;
        border-bottom:0;
        background:transparent;
    }

    .gwv-stories-rail{
        display:flex;
        gap:3px;
        overflow-x:auto;
        padding:0 0 2px;
        scroll-snap-type:x proximity;
        scrollbar-width:none;
        -webkit-overflow-scrolling:touch;
    }

    .gwv-stories-rail::-webkit-scrollbar{display:none}

    .gwv-story-bubble{
        flex:0 0 calc(18.1818% - 2.7273px);
        display:grid;
        justify-items:center;
        gap:3px;
        min-width:0;
        padding:0;
        border:0;
        background:transparent;
        color:var(--text,#0f172a);
        font:inherit;
        text-align:center;
        scroll-snap-align:start;
        cursor:pointer;
    }

    .gwv-story-bubble > i{
        position:relative;
        display:grid;
        width:min(64px,100%);
        height:auto;
        aspect-ratio:1;
        padding:3px;
        place-items:center;
        border-radius:50%;
        background:#94a3b8;
        box-shadow:inset 0 0 0 2px var(--card,#fff);
    }

    .gwv-story-bubble.is-new > i{
        background:linear-gradient(135deg,#ff4f55,#f59e0b,#8b5cf6);
    }

    .gwv-story-bubble.is-pinned > i::after{
        content:"★";
        position:absolute;
        right:-2px;
        bottom:1px;
        display:grid;
        width:20px;
        height:20px;
        place-items:center;
        border:2px solid var(--card,#fff);
        border-radius:50%;
        background:#f59e0b;
        color:#fff;
        font-size:10px;
        font-style:normal;
    }

    .gwv-story-bubble > i img,
    .gwv-story-bubble > i b{
        display:grid;
        width:calc(100% - 4px);
        height:auto;
        aspect-ratio:1;
        overflow:hidden;
        place-items:center;
        border:2px solid var(--card,#fff);
        border-radius:50%;
        background:#172438;
        color:#fff;
        object-fit:cover;
        font-size:19px;
        font-style:normal;
    }

    .gwv-story-bubble > span{
        width:100%;
        overflow:hidden;
        color:var(--text,#0f172a);
        font-size:11px;
        font-weight:850;
        line-height:1.15;
        text-overflow:ellipsis;
        white-space:nowrap;
    }

    .gwv-story-bubble > small{
        color:var(--muted,#64748b);
        font-size:9px;
        font-weight:800;
    }

    .gwv-story-dashboard-grid{
        grid-template-columns:1fr;
    }

    .gwv-story-upload-form{
        grid-template-columns:1fr;
        padding:12px;
    }

    .gwv-story-upload-guide{
        gap:6px;
        overflow-x:auto;
        padding:10px;
        scrollbar-width:none;
    }

    .gwv-story-upload-guide::-webkit-scrollbar{display:none}
    .gwv-story-upload-guide span{flex:0 0 auto}
    .gwv-story-upload-guide > i{flex:0 0 18px}

    .gwv-story-upload-drop{order:1}
    .gwv-story-publish-panel{order:2}

    .gwv-story-upload-drop{
        width:min(260px,100%);
        min-height:auto;
        aspect-ratio:9 / 16;
        margin:0 auto;
    }

    .gwv-story-dashboard-card{
        grid-template-columns:96px minmax(0,1fr);
    }
}

@media (min-width:761px){
    .gwv-story-dashboard{
        padding:22px;
    }

    .gwv-story-dashboard .gwv-section-title{
        align-items:center;
        gap:16px;
    }

    .gwv-story-dashboard .gwv-section-title h2{
        margin-bottom:4px;
    }

    .gwv-story-dashboard .gwv-section-title p{
        max-width:620px;
        line-height:1.4;
    }

    .gwv-story-upload-guide{
        margin-top:12px;
        padding:9px 12px;
        border-radius:13px;
    }

    .gwv-story-upload-guide span b{
        width:22px;
        height:22px;
    }

    .gwv-story-upload-form{
        grid-template-columns:190px minmax(0,1fr);
        gap:14px;
        margin-top:12px;
        padding:14px;
        border-radius:18px;
    }

    .gwv-story-upload-drop{
        min-height:245px;
        border-radius:16px;
    }

    .gwv-story-upload-drop::after{
        width:44px;
        height:44px;
        margin-bottom:8px;
        border-radius:14px;
        font-size:26px;
    }

    .gwv-story-upload-drop strong{
        font-size:14px;
    }

    .gwv-story-upload-drop small{
        max-width:170px;
        font-size:11px;
    }

    .gwv-story-publish-panel{
        gap:9px;
        padding:18px;
        border-radius:15px;
    }

    .gwv-story-publish-panel > strong{
        font-size:17px;
    }

    .gwv-story-publish-button{
        min-height:48px !important;
        font-size:14px !important;
    }

    .gwv-story-dashboard-grid{
        gap:10px;
        margin-top:12px;
    }

    .gwv-story-dashboard-card{
        grid-template-columns:88px minmax(0,1fr);
        border-radius:16px;
    }

    .gwv-story-dashboard-media,
    .gwv-story-dashboard-media img{
        min-height:164px;
    }

    .gwv-story-dashboard-card-body{
        gap:6px;
        padding:11px;
    }

    .gwv-story-stats span{
        padding:5px 6px;
        border-radius:8px;
        font-size:10px;
    }

    .gwv-story-viewer-shell{
        height:min(92dvh,850px);
        border-radius:26px;
    }
}

:root[data-theme="dark"] .gwv-story-upload-form,
:root[data-theme="dark"] .gwv-story-stats span,
:root[data-theme="dark"] .gwv-story-upload-guide{
    background:#0c1625;
    border-color:#263242;
}

:root[data-theme="dark"] .gwv-story-upload-drop,
:root[data-theme="dark"] .gwv-story-publish-panel,
:root[data-theme="dark"] .gwv-story-dashboard-card{
    background:#151f2e;
    border-color:#263242;
    color:#f8fafc;
}

:root[data-theme="dark"] .gwv-story-publish-panel > strong,
:root[data-theme="dark"] .gwv-story-dashboard-card-body > strong,
:root[data-theme="dark"] .gwv-story-stats b{
    color:#f8fafc;
}

:root[data-theme="dark"] .gwv-story-publish-panel > p{
    color:#94a3b8;
}

:root[data-theme="dark"] .gwv-story-upload-drop strong,
:root[data-theme="dark"] .gwv-story-upload-drop small{
    background:rgba(12,22,37,.88);
    color:#f8fafc;
}

@media (max-width:760px){
    :root[data-theme="dark"] .gwv-stories-mobile{
        border-color:transparent;
        background:transparent;
    }
}

@media (prefers-reduced-motion:reduce){
    .gwv-story-progress .is-current.is-running b{
        transition-duration:.01ms;
    }
}
