.portable-story {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid #edf1f4;
    border-top: 1px solid #f2f4f6;
    box-shadow: inset 0 -10px 24px rgba(29, 54, 75, .018);
    padding: 17px 14px 12px;
}

.portable-story__list {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    direction: rtl;
    gap: 18px;
    overflow-x: auto;
    padding: 2px 3px 8px;
    scrollbar-width: none;
    width: 100%;
}

.portable-story__list::-webkit-scrollbar { display: none; }

.portable-story__item {
    background: transparent;
    border: 0;
    color: #333;
    cursor: pointer;
    flex: 0 0 94px;
    font: inherit;
    padding: 0;
}

.portable-story__ring {
    background: linear-gradient(135deg, #ffbb01, #ff5c39, #a52bdb);
    border-radius: 50%;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .12);
    display: block;
    height: 82px;
    margin: auto;
    padding: 3px;
    position: relative;
    width: 82px;
}

.portable-story__ring::after {
    border: 3px solid #fff;
    border-radius: 50%;
    content: "";
    inset: 3px;
    pointer-events: none;
    position: absolute;
}

.portable-story__ring img {
    background: #eee;
    border-radius: 50%;
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.portable-story__lazy-image {
    filter: blur(9px);
    opacity: .72;
    transform: scale(1.08);
    transition: filter .38s ease, opacity .38s ease, transform .38s ease;
}

.portable-story__lazy-image.is-loaded {
    filter: blur(0);
    opacity: 1;
    transform: scale(1);
}

.portable-story__label {
    display: block;
    font-size: 10px;
    margin-top: 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portable-story__viewer {
    align-items: center;
    background: rgba(0, 0, 0, .84);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 20px 76px;
    position: fixed;
    z-index: 2147483000;
}

.portable-story__viewer.is-open { display: flex; }

.portable-story__shell {
    align-items: center;
    direction: ltr;
    display: flex;
    gap: 24px;
    height: min(910px, calc(100vh - 40px));
    justify-content: center;
    max-width: 670px;
    width: 100%;
}

.portable-story__dialog {
    background: #111;
    border-radius: 7px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
    height: 100%;
    max-width: 514px;
    overflow: hidden;
    position: relative;
    width: min(514px, calc(100vw - 170px));
}

.portable-story__stage,
.portable-story__slide {
    height: 100%;
    width: 100%;
}

.portable-story__slide {
    align-items: center;
    display: none;
    justify-content: center;
    position: relative;
}

.portable-story__slide.is-active { display: flex; }

.portable-story__loader {
    align-items: center;
    background: radial-gradient(circle, rgba(38, 38, 38, .94) 0%, #111 68%);
    display: flex;
    inset: 0;
    justify-content: center;
    position: absolute;
    transition: opacity .22s ease, visibility .22s ease;
    z-index: 2;
}

.portable-story__loader span {
    animation: portable-story-spin .75s linear infinite;
    border: 3px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    border-top-color: #fff;
    box-shadow: 0 0 18px rgba(255, 255, 255, .12);
    height: 38px;
    width: 38px;
}

.portable-story__slide.is-ready .portable-story__loader {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.portable-story__slide.is-buffering .portable-story__loader {
    opacity: 1;
    visibility: visible;
}

.portable-story__slide.is-load-error .portable-story__loader span {
    animation: none;
    border-color: rgba(255, 255, 255, .4);
    border-top-color: rgba(255, 255, 255, .4);
}

@keyframes portable-story-spin { to { transform: rotate(360deg); } }

.portable-story__slide img,
.portable-story__slide video {
    background: #111;
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.portable-story__media-image {
    filter: blur(12px);
    opacity: .7;
    transform: scale(1.035);
    transition: filter .4s ease, opacity .4s ease, transform .4s ease;
}

.portable-story__slide.is-ready .portable-story__media-image {
    filter: blur(0);
    opacity: 1;
    transform: scale(1);
}

.portable-story__slide video::-webkit-media-controls { display: none !important; }

.portable-story__header {
    align-items: center;
    display: flex;
    direction: rtl;
    justify-content: space-between;
    left: 18px;
    position: absolute;
    right: 18px;
    top: 18px;
    z-index: 4;
}

.portable-story__identity {
    align-items: center;
    color: #fff;
    display: flex;
    font-size: 15px;
    gap: 10px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, .55);
}

.portable-story__avatar {
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 50%;
    height: 42px;
    object-fit: cover;
    width: 42px;
}

.portable-story__tools {
    display: flex;
    direction: ltr;
    gap: 5px;
    padding: 0 3px;
}

.portable-story__close,
.portable-story__mute {
    align-items: center;
    background: rgba(35, 35, 35, .48);
    border: 0;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    font-size: 0;
    height: 30px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 30px;
}

.portable-story__close svg,
.portable-story__mute svg {
    display: block;
    fill: none;
    height: 15px;
    margin: auto;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 15px;
}

.portable-story__mute span {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.portable-story__mute .portable-story__sound-on { display: none; }
.portable-story__mute.is-audible .portable-story__sound-on { display: flex; }
.portable-story__mute.is-audible .portable-story__sound-off { display: none; }

.portable-story__nav {
    align-items: center;
    background: rgba(75, 75, 75, .72);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex: 0 0 46px;
    font-size: 0;
    height: 46px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 46px;
}

.portable-story__nav svg {
    display: block;
    fill: none;
    height: 20px;
    margin: auto;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
    width: 20px;
}

.portable-story__cta {
    background: rgba(255, 255, 255, .11);
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 30px;
    bottom: 72px;
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    min-width: 154px;
    padding: 10px 18px;
    position: absolute;
    right: 50%;
    text-align: center;
    text-decoration: none !important;
    transform: translateX(50%);
    z-index: 4;
}

.portable-story__cta span { margin-right: 8px; }

.portable-story__timeline {
    background: rgba(255, 255, 255, .5);
    border-radius: 3px;
    bottom: 31px;
    height: 4px;
    left: 23px;
    overflow: hidden;
    position: absolute;
    right: 23px;
    z-index: 4;
}

.portable-story__timeline span {
    background: #fff;
    border-radius: 3px;
    display: block;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    width: 100%;
}

@media (max-width: 767px) {
    .portable-story { padding: 12px 7px 10px; }
    .portable-story__list { gap: 10px; padding: 2px 0 7px; }
    .portable-story__item { flex-basis: 76px; }
    .portable-story__ring { height: 68px; width: 68px; }
    .portable-story__label { font-size: 9px; }
    .portable-story__viewer { padding: 0; }
    .portable-story__shell { height: 100dvh; max-width: none; }
    .portable-story__dialog { border-radius: 0; max-width: none; width: 100%; }
    .portable-story__nav { background: rgba(35, 35, 35, .28); border: 0; flex-basis: 32px; height: 32px; position: absolute; width: 32px; z-index: 5; }
    .portable-story__nav svg { height: 17px; width: 17px; }
    .portable-story__nav--next { left: 10px; }
    .portable-story__nav--prev { right: 10px; }
    .portable-story__header { left: 14px; right: 14px; top: 18px; }
    .portable-story__identity { font-size: 13px; }
    .portable-story__avatar { height: 38px; width: 38px; }
    .portable-story__cta { bottom: 66px; }
}
