.emass-scroll-shell{
    --emass-total:350vh;
    --emass-top:0px;
    position:relative;
    min-height:var(--emass-total);
    width:100%;
}

.emass-scroll-shell *{ box-sizing:border-box; }

.emass-card{
    position:sticky;
    top:var(--emass-top);
    min-height:calc(100vh - var(--emass-top));
    width:100%;
    overflow:hidden;
    padding:14px 14px 18px;
}

.emass-item{ width:100%; }

/*
 * Wszystkie wiersze mają IDENTYCZNĄ szerokość.
 * Dzięki temu lewa krawędź ikon i lewa krawędź tekstów tworzą
 * dwie idealnie równe pionowe linie, niezależnie od długości tytułu.
 */
.emass-head{
    width:100%;
    max-width:330px;
    min-height:78px;
    margin-left:auto;
    margin-right:auto;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:16px;
    opacity:.35;
    transform:translate3d(0,0,0);
    transition:opacity .42s ease, color .42s ease, transform .42s ease;
    will-change:opacity,transform;
}

.emass-item.is-active .emass-head{ opacity:1; }

.emass-icon-wrap{
    position:relative;
    width:64px;
    height:64px;
    min-width:64px;
    min-height:64px;
    flex:0 0 64px;
}

.emass-icon{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    display:block;
    object-fit:contain;
    transition:opacity .38s ease, transform .48s cubic-bezier(.22,.61,.36,1);
    will-change:opacity,transform;
}

.emass-icon-active{ opacity:0; transform:scale(.96); }
.emass-item.is-active .emass-icon-inactive{ opacity:0; transform:scale(.96); }
.emass-item.is-active .emass-icon-active{ opacity:1; transform:scale(1); }

.emass-copy{
    min-width:0;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    text-align:left;
    color:#657187;
}

.emass-item.is-active .emass-copy{ color:var(--emass-color); }

.emass-title{
    display:block;
    font-size:22px;
    line-height:1.02;
    font-weight:700;
    white-space:nowrap;
    letter-spacing:-.02em;
}

.emass-subtitle{
    display:block;
    margin-top:4px;
    font-size:11px;
    line-height:1.05;
    font-weight:400;
    white-space:nowrap;
}

/* Płynne przejście obrazu podczas zmiany aktywnej sekcji. */
.emass-panel{
    width:100%;
    height:190px;
    max-height:0;
    opacity:0;
    overflow:hidden;
    transform:translate3d(0,-10px,0);
    transition:
        max-height .62s cubic-bezier(.22,.61,.36,1),
        opacity .42s ease,
        margin .62s cubic-bezier(.22,.61,.36,1),
        transform .62s cubic-bezier(.22,.61,.36,1);
    margin:0;
    will-change:max-height,opacity,margin,transform;
}

.emass-item.is-active .emass-panel{
    max-height:190px;
    opacity:1;
    margin:7px 0 12px;
    transform:translate3d(0,0,0);
}

.emass-panel img{
    display:block;
    width:100%;
    height:100%;
    max-width:none;
    object-fit:contain;
    object-position:center center;
}

/* Mobile */
@media (max-width:767px){
    .emass-card{
        min-height:100svh;
        padding:10px 12px 16px;
    }

    .emass-head{
        width:100%;
        max-width:330px;
        min-height:78px;
        gap:16px;
    }

    .emass-icon-wrap{
        width:64px;
        height:64px;
        min-width:64px;
        min-height:64px;
        flex:0 0 64px;
    }

    .emass-title{
        font-size:22px;
        line-height:1.02;
    }

    .emass-subtitle{
        margin-top:4px;
        font-size:11px;
    }

    .emass-panel{ height:175px; }
    .emass-item.is-active .emass-panel{ max-height:175px; }

    .emass-panel img{
        width:100%;
        height:100%;
        object-fit:contain;
        object-position:center center;
    }
}

/* Bardzo wąskie telefony: zachowaj jeden wiersz bez rozjechania kolumn. */
@media (max-width:359px){
    .emass-head{
        max-width:296px;
        gap:13px;
    }

    .emass-icon-wrap{
        width:58px;
        height:58px;
        min-width:58px;
        min-height:58px;
        flex-basis:58px;
    }

    .emass-title{ font-size:19px; }
    .emass-subtitle{ font-size:10px; }
}

/* Tablet / desktop */
@media (min-width:768px){
    .emass-card{
        max-width:560px;
        margin:0 auto;
        padding:24px;
    }

    .emass-head{ max-width:390px; }

    .emass-panel{ height:300px; }
    .emass-item.is-active .emass-panel{ max-height:300px; }
}

@media (prefers-reduced-motion:reduce){
    .emass-head,
    .emass-icon,
    .emass-panel{
        transition-duration:.01ms !important;
    }
}
