* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    height: 100%;
    background: #fff;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

button {
    -webkit-tap-highlight-color: transparent;
}

button:disabled {
    cursor: wait;
    opacity: .72;
}

.auth-modal,
.chat-modal,
.admin-story-modal {
    transition: opacity .2s ease, visibility .2s ease;
}

.auth-modal:not(.hidden),
.chat-modal:not(.hidden),
.admin-story-modal:not(.hidden) {
    animation: modal-soft-in .2s ease both;
}

@keyframes modal-soft-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.story-app {
    width: 100vw;
    height: 100dvh;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.viewer {
    position: relative;
    width: min(calc(100vw - 24px), calc((100dvh - 24px) * 9 / 16), 430px);
    aspect-ratio: 9 / 16;
    background: #000;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
}

.site-boot-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 42%, rgba(168,255,96,.18), transparent 28%),
        rgba(255,255,255,.7);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: opacity .32s ease, visibility .32s ease;
}

.site-boot-loader::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 28vh;
    background: linear-gradient(180deg, rgba(255,255,255,0), #fff 80%);
    pointer-events: none;
}

.site-boot-loader.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.page-transition {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.66);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: opacity .18s ease, visibility .18s ease;
}

.page-transition.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.page-transition::before {
    content: "";
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid rgba(17,17,17,.09);
    border-top-color: #a8ff60;
    border-right-color: #111;
    box-shadow: 0 18px 46px rgba(0,0,0,.18);
    animation: circlo-spin .78s linear infinite;
}

.tap-feedback {
    transform: scale(.96);
    filter: brightness(1.08);
    transition: transform .12s ease, filter .12s ease;
}

.toast-stack {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 10020;
    display: grid;
    justify-items: center;
    gap: 8px;
    pointer-events: none;
}

.toast {
    width: min(420px, 100%);
    padding: 12px 14px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 16px;
    background: rgba(16,16,18,.82);
    color: #fff;
    box-shadow: 0 18px 52px rgba(0,0,0,.34);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    opacity: 0;
    transform: translateY(10px) scale(.98);
    transition: opacity .2s ease, transform .2s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast.success {
    border-color: rgba(168,255,96,.34);
}

.toast.error {
    border-color: rgba(255,107,107,.42);
}

.toast.info {
    border-color: rgba(139,183,255,.34);
}

.site-boot-spinner {
    position: relative;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.76);
    box-shadow:
        0 24px 70px rgba(0,0,0,.18),
        inset 0 0 0 1px rgba(0,0,0,.05);
}

.site-boot-spinner::before,
.site-boot-spinner::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.site-boot-spinner::before {
    border: 3px solid rgba(17,17,17,.08);
    border-top-color: #a8ff60;
    border-right-color: #111;
    animation: circlo-spin .82s linear infinite;
}

.site-boot-spinner::after {
    inset: 8px;
    border: 1px solid rgba(0,0,0,.06);
}

.story-play-btn {
    position: absolute;
    z-index: 32;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 25%, rgba(255,255,255,.98), rgba(255,255,255,.8)),
        rgba(255,255,255,.9);
    color: #111;
    box-shadow:
        0 24px 70px rgba(0,0,0,.34),
        inset 0 1px 0 rgba(255,255,255,.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transform: translate(-50%, -50%);
    cursor: pointer;
    padding: 0;
}

.story-play-btn::before {
    content: "";
    position: absolute;
    inset: -9px;
    border-radius: inherit;
    border: 1px solid rgba(168,255,96,.42);
    animation: circlo-play-pulse 1.6s ease-in-out infinite;
}

.story-play-btn span {
    width: 0;
    height: 0;
    margin-left: 7px;
    border-top: 17px solid transparent;
    border-bottom: 17px solid transparent;
    border-left: 25px solid #111;
    filter: drop-shadow(0 1px 0 rgba(255,255,255,.4));
}

@keyframes circlo-play-pulse {
    0%, 100% {
        opacity: .5;
        transform: scale(.94);
    }

    50% {
        opacity: 1;
        transform: scale(1.04);
    }
}
.media-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.media-wrap img,
.media-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    background: #000;
}

.story-media-status {
    position: absolute;
    z-index: 31;
    left: 50%;
    top: 50%;
    width: min(230px, calc(100% - 54px));
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 16px 15px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 18px;
    background: rgba(10,10,12,.58);
    color: #fff;
    text-align: center;
    transform: translate(-50%, -50%);
    box-shadow: 0 18px 58px rgba(0,0,0,.34);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    pointer-events: none;
}

.story-media-status span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.22);
    border-top-color: #a8ff60;
    animation: circlo-spin .78s linear infinite;
}

.story-media-status strong {
    font-size: 14px;
    line-height: 1.1;
}

.story-media-status small {
    color: rgba(255,255,255,.72);
    font-size: 12px;
    line-height: 1.35;
}

.story-media-status.is-error span {
    border-color: rgba(255,255,255,.22);
    border-top-color: #ff6b6b;
}

.story-media-status.is-error small {
    color: rgba(255,255,255,.82);
}

.progress {
    position: absolute;
    z-index: 20;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    gap: 4px;
}

.bar {
    height: 3px;
    flex: 1;
    background: rgba(255,255,255,.35);
    border-radius: 99px;
    overflow: hidden;
}

.bar span {
    display: block;
    height: 100%;
    width: 0;
    background: #fff;
    border-radius: 99px;
}

.topbar {
    position: absolute;
    z-index: 21;
    top: 22px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 1px 8px rgba(0,0,0,.8);
}

.avatar {
    width: 36px;
    height: 36px;
 
    background: #fff;

    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
     padding: 2px;
    color: #111;
    border-radius: 50%;
    flex: 0 0 auto;
    overflow: hidden;
}
.avatar img {
    border-radius: 50%;
}
.topbar span {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,.75);
    margin-top: 2px;
}
.admin-add-story-btn {
    position: absolute;
    z-index: 22;
    top: 70px;
    left: 12px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 50%;
    background: rgba(255,255,255,.94);
    color: #111;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 12px 34px rgba(0,0,0,.24);
    backdrop-filter: blur(16px);
        background-image: url("/assets/icons/story-add.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 30px 30px;
}

.admin-add-story-btn::before,
.admin-add-story-btn::after {
    display: none;

}
.admin-story-modal {
    position: absolute;
    inset: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0,0,0,.18);
    backdrop-filter: blur(5px);
}

.admin-story-modal-box {
    position: relative;
    width: min(318px, 100%);
    border: 1px solid rgba(255,255,255,.74);
    border-radius: 20px;
    background: rgba(18,18,20,.34);
    box-shadow: 0 24px 70px rgba(0,0,0,.32);
    overflow: hidden;
        padding: 12px;
    backdrop-filter: blur(18px);
}

.quick-story-picker {
    display: grid;
    gap: 10px;
    overflow: hidden;
    border-radius: 16px;
}

.quick-story-picker p {
    margin: 0;
    padding: 12px 12px 2px;
    color: rgba(255,255,255,.72);
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
}

.quick-story-picker button {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 14px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
}

.quick-story-picker button:last-child {
    border-bottom: 0;
}

.quick-story-picker button:active {
    background: rgba(255,255,255,.12);
}

.admin-story-close-btn {
    position: absolute;
    z-index: 2;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    background: rgba(0,0,0,.16);
    color: #fff;
    cursor: pointer;
}

.admin-story-close-btn::before,
.admin-story-close-btn::after {
    content: "";
    position: absolute;
    left: 9px;
    top: 16px;
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.admin-story-close-btn::before {
    transform: rotate(45deg);
}

.admin-story-close-btn::after {
    transform: rotate(-45deg);
}

.quick-story-form {
    display: grid;
    gap: 9px;
}

.quick-story-preview {
   width: auto;
    max-width: 100%;
    height: min(56dvh, 420px);
    aspect-ratio: 9 / 16;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(0,0,0,.44);
}
.quick-story-preview img,
.quick-story-preview video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.quick-story-form input[type="text"] {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    color: #fff;
    padding: 0 13px;
    font-size: 14px;
    outline: none;
}

.quick-story-form input::placeholder {
    color: rgba(255,255,255,.48);
}

.quick-story-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.quick-story-actions button {
    min-height: 44px;
    border: 0;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.quick-story-actions button:disabled {
    cursor: wait;
    opacity: .58;
}

#quickStoryDeleteBtn {
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
    color: #fff;
}

#quickStoryPublishBtn {
    background: #f7f7f4;
    color: #111;
}

.quick-story-progress {
    height: 6px;
    border-radius: 99px;
    overflow: hidden;
    background: rgba(255,255,255,.12);
}
.quick-story-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: #f7f7f4;
}

.quick-story-message {
    min-height: 15px;
    color: rgba(255,255,255,.68);
    font-size: 12px;
    text-align: center;
}

.story-upload-card {
    position: absolute;
    z-index: 76;
    left: 14px;
    right: 14px;
    bottom: calc(96px + env(safe-area-inset-bottom));
    padding: 14px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 18px;
    background: rgba(18,18,20,.78);
    color: #fff;
    box-shadow: 0 18px 48px rgba(0,0,0,.34);
    backdrop-filter: blur(18px);
}

.story-upload-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.story-upload-card strong,
.story-upload-card span {
    display: block;
}

.story-upload-card strong {
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.1;
}

.story-upload-card span {
    color: rgba(255,255,255,.72);
    font-size: 12px;
    line-height: 1.35;
}

.story-upload-card-bar {
    height: 7px;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
}

.story-upload-card-bar span {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #fff, #a8ff60);
    transition: width .2s ease;
}

.story-upload-card.is-error .story-upload-card-bar span {
    background: #ff6b6b;
}

.story-upload-card.is-success .story-upload-card-bar span {
    background: #a8ff60;
}

.story-upload-dismiss {
    position: relative;
    width: 30px;
    min-width: 30px;
    height: 30px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: #fff;
    cursor: pointer;
}

.story-upload-dismiss::before,
.story-upload-dismiss::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 14px;
    width: 12px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.story-upload-dismiss::before {
    transform: rotate(45deg);
}

.story-upload-dismiss::after {
    transform: rotate(-45deg);
}

.close-webapp-btn {
    position: absolute;
    z-index: 24;
    top: calc(21px + env(safe-area-inset-top));
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    padding: 0;
}

.close-webapp-btn::before,
.close-webapp-btn::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 17px;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    box-shadow: 0 1px 8px rgba(0,0,0,.55);
}

.close-webapp-btn::before {
    transform: rotate(45deg);
}

.close-webapp-btn::after {
    transform: rotate(-45deg);
}
.pull-refresh-spinner {
    position: absolute;
    z-index: 80;
    left: 50%;
    top: 50%;
    width: 44px;
    height: 44px;
    margin-left: -22px;
    margin-top: -22px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.32);
    border-top-color: #fff;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,.45));
    animation: circlo-spin .72s linear infinite;
    pointer-events: none;
}

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

.tap {
    position: absolute;
    z-index: 10;
    top: 80px;
    bottom: 90px;
    width: 50%;
}

.tap-left {
    left: 0;
}

.tap-right {
    right: 0;
}

.actions {
    position: absolute;
    z-index: 22;
  left: 14px;
    right: 14px;
    top: 0;
    bottom: calc(12px + env(safe-area-inset-bottom));
    pointer-events: none;
}

.link-btn {
    position: absolute;
    left: 50%;
    bottom: 78px;
    min-height: 38px;
    max-width: calc(100% - 96px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(255,255,255,.72);
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(8px);
    color: #247fa8;
    border-radius: 10px;
    padding: 0 13px 0 10px;
    font-weight: 900;
    font-size: 18px;
    line-height: 1;
    text-transform: uppercase;
    transform: translateX(-50%);
    box-shadow:
        0 2px 4px rgba(0,0,0,.22),
        0 10px 24px rgba(0,0,0,.36),
        inset 0 1px 0 rgba(255,255,255,.92);
    pointer-events: auto;
}

.link-btn::before {
    content: "";
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    background-color: currentColor;
    -webkit-mask:
        radial-gradient(circle at 34% 50%, transparent 0 3.8px, #000 4.3px 6.2px, transparent 6.7px) 0 0 / 50% 100% no-repeat,
        radial-gradient(circle at 66% 50%, transparent 0 3.8px, #000 4.3px 6.2px, transparent 6.7px) 100% 0 / 50% 100% no-repeat,
        linear-gradient(#000 0 0) center / 13px 4px no-repeat;
    mask:
        radial-gradient(circle at 34% 50%, transparent 0 3.8px, #000 4.3px 6.2px, transparent 6.7px) 0 0 / 50% 100% no-repeat,
        radial-gradient(circle at 66% 50%, transparent 0 3.8px, #000 4.3px 6.2px, transparent 6.7px) 100% 0 / 50% 100% no-repeat,
        linear-gradient(#000 0 0) center / 13px 4px no-repeat;
    transform: rotate(-35deg);
}

.story-action-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 52px;
    padding: 8px;
    display: grid;
    grid-template-columns: 36px 1fr 36px;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 24px;
    background: rgba(25,25,28,.92);
    box-shadow: 0 18px 50px rgba(0,0,0,.32);
    backdrop-filter: blur(18px);
    pointer-events: auto;
}

.story-side-tools {
    position: absolute;
    left: 0;
    bottom: 76px;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    pointer-events: auto;
}

.story-icon-btn,
.story-float-btn {
     width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
    color: #fff;
     display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    padding: 0;
    margin: 0;
    pointer-events: auto;
}
.story-icon-btn {
    width: 36px;
    height: 36px;
}

.story-icon-btn::before,
.story-icon-btn::after,
.story-float-btn::before,
.story-float-btn::after {
    content: "";
    position: absolute;
    display: block;
    box-sizing: border-box;
}

.story-float-btn {
    position: absolute;
    right: 0;
  width: 42px;
    height: 42px;
    bottom: 76px;
    background: rgba(25,25,28,.92);
    box-shadow: 0 12px 34px rgba(0,0,0,.24);
    font-size: 0;
}
.share-creator-btn {
    bottom: 126px;
        z-index: 3;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.feed-btn {
    bottom: 176px;
    z-index: 3;
}

.feed-btn::before {
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-radius: 5px;
    box-shadow: 0 7px 0 -4px currentColor, 0 14px 0 -4px currentColor;
}

.like-btn.liked {
    color: #ff2d55;
}

.profile-btn::before {
 width: 6px;
    height: 6px;
    left: 15px;
    top: 8px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.profile-btn::after {
  width: 14px;
    height: 8px;
    left: 11px;
    top: 18px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
}

.chat-btn::before {
  width: 18px;
    height: 14px;
    left: 9px;
    top: 9px;
    border: 2px solid currentColor;
    border-radius: 9px;
}

.chat-btn::after {
     width: 7px;
    height: 7px;
    left: 13px;
    top: 21px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-18deg);
}

.notify-btn::before {
     width: 14px;
    height: 15px;
    left: 11px;
    top: 7px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 12px 12px 4px 4px;
}

.notify-btn::after {
     width: 18px;
    height: 6px;
    left: 9px;
    top: 21px;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    box-shadow: 10px 5px 0 -8px currentColor;
}

.install-btn::before {
    width: 2px;
   height: 15px;
    left: 17px;
    top: 7px;
    background: currentColor;
    border-radius: 2px;
}

.install-btn::after {
     width: 11px;
    height: 11px;
    left: 12px;
    top: 14px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    box-shadow: 6px 6px 0 -4px currentColor;
}

.like-btn::before {
   width: 16px;
    height: 16px;
    left: 13px;
    top: 13px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
}

.like-btn::after {
     width: 8px;
    height: 8px;
    left: 12px;
    top: 11px;
    border: 2px solid currentColor;
    border-right: 0;
    border-bottom: 0;
    border-radius: 10px 0 0 0;
    box-shadow: 9px 0 0 -2px rgba(0,0,0,0), 9px 0 0 0 currentColor;
    transform: rotate(45deg);
}

.like-btn.liked::before {
    background: currentColor;
}
.share-creator-btn::before {
   width: 18px;
    height: 18px;
    left: 12px;
    top: 12px;
    border: 2px solid currentColor;
    border-radius: 50%;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 58% 45%, 58% 100%, 0 100%);
}

.share-creator-btn::after {
   width: 12px;
    height: 12px;
    left: 19px;
    top: 10px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    box-shadow: 4px -4px 0 -3px currentColor;
}
.empty {
   
    width: min(calc(100vw - 24px), calc((100dvh - 24px) * 9 / 16), 430px);
    aspect-ratio: 9 / 16;
    background: #000;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 24px;
}
.logo {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(45deg,#fff,#aaa);
    -webkit-background-clip: text;
    color: transparent;
}

.empty p {
    color: #aaa;
}
.empty {
    position: relative;
    align-items: stretch;
    justify-content: space-between;
    padding: 22px 18px 18px;
    background:
        radial-gradient(circle at 50% 8%, rgba(255,255,255,.14), transparent 34%),
        linear-gradient(180deg, #202024 0%, #09090b 66%, #000 100%);
    overflow: hidden;
}

.empty::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,.08), transparent 24%),
        linear-gradient(135deg, rgba(255,45,85,.16), transparent 38%);
    pointer-events: none;
}

.empty-orbit {
    position: absolute;
    inset: 42px 32px auto;
    height: 178px;
    pointer-events: none;
}

.empty-orbit span {
    position: absolute;
    left: 50%;
    top: 50%;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(-14deg);
}

.empty-orbit span:nth-child(1) {
    width: 138px;
    height: 138px;
}

.empty-orbit span:nth-child(2) {
    width: 190px;
    height: 84px;
}

.empty-orbit span:nth-child(3) {
    width: 88px;
    height: 190px;
}
.empty-avatar,
.empty-kicker,
.empty h1,
.empty p,
.empty-status,
.empty-actions {
    position: relative;
    z-index: 1;
}

.empty-avatar {
    width: 86px;
    height: 86px;
    margin: 30px auto 12px;
    padding: 3px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 18px 44px rgba(0,0,0,.3);
    border-radius: 50%;
    overflow: hidden;
}

.empty-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 50%;
}

.empty-kicker {
    display: block;
    color: rgba(255,255,255,.58);
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
}

.empty h1 {
    margin: 7px 0 0;
    color: #fff;
    font-size: 32px;
    line-height: 1.04;
    letter-spacing: 0;
    text-align: center;
}
.empty p {
    max-width: 300px;
    margin: 10px auto 0;
    color: rgba(255,255,255,.64);
    font-size: 14px;
    line-height: 1.42;
}

.empty-status {
    margin-top: auto;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px;
    background: rgba(255,255,255,.07);
    text-align: left;
    box-shadow: 0 18px 48px rgba(0,0,0,.18);
    backdrop-filter: blur(16px);
}

.empty-status strong {
    display: block;
    color: #fff;
    font-size: 15px;
}

.empty-status span {
    display: block;
    margin-top: 3px;
    color: rgba(255,255,255,.55);
    font-size: 12px;
}

.empty-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-top: 10px;
}

.empty-actions .profile-btn-empty,
.empty-actions .empty-notify-btn,
.empty-actions .empty-admin-publish-btn,
.empty-actions .install-btn {
    width: 100%;
    min-height: 48px;
    margin: 0;
    border-radius: 16px;
}

.empty-actions .empty-admin-publish-btn {
    grid-column: 1 / -1;
    border: 0;
    background: #fff;
    color: #111;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.empty-actions .profile-btn-empty,
.empty-actions .install-btn {
    font-size: 0;
}

.empty-actions .profile-btn-empty::before {
    content: "Meu perfil";
    font-size: 14px;
}
.empty-actions .empty-notify-btn {
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}
.empty-actions .install-btn {
        grid-column: 1 / -1;

    min-width: 48px;
    padding: 0 15px;
    background: rgba(255,255,255,.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,.12);
}

.empty-actions .install-btn::before {
    content: "Instalar app";
    font-size: 14px;
}
@media (max-width: 600px) {
        .story-app {
        padding: 0;
    }
    .viewer,
    .empty {
        width: 100vw;
        height: 100dvh;
        border-radius: 0;
        box-shadow: none;
    }
}

.story-app.auth-locked .media-wrap,
.story-app.auth-locked .progress,
.story-app.auth-locked .topbar,
.story-app.auth-locked .actions {
    filter: blur(14px);
    pointer-events: none;
}

.auth-modal {
    position: absolute;
    inset: 0;
    z-index: 999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
     padding: 14px;
    overflow: hidden;
}

.auth-modal::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0,0,0,.34);
    pointer-events: none;
}

.auth-modal.hidden {
    display: none;
}

.auth-box:not(.hidden) {
    animation: auth-box-in .18s ease both;
}

@keyframes auth-box-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-bg-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    background: #000;
    filter: blur(14px) brightness(.72);
    transform: scale(1.08);
    
}
.auth-box {
        position: relative;
    z-index: 1;
    width: 100%;
    max-width: 360px;
        max-height: calc(100% - 20px);

    background: rgba(248,248,248,.94);
    color: #111;
    border: 1px solid rgba(255,255,255,.65);
    border-radius: 28px;
    padding: 20px 24px 18px;
    box-shadow: 0 24px 80px rgba(0,0,0,.32);
    text-align: center;
        overflow-y: auto;

}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(17,17,17,.08);
    color: #333;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}


.auth-avatar {
    width: 62px;
    height: 62px;
    margin: 0 auto 8px;
    padding: 3px;
    background: rgba(255,255,255,.86);
    box-shadow: 0 10px 26px rgba(0,0,0,.16);
    border-radius: 50%;
    overflow: hidden;
}

.auth-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}
.auth-box h2 {
    margin: 0 0 6px;
    font-size: 27px;
    line-height: 1.12;
}

.auth-box p {
       margin: 0 0 16px;

    color: #5f5f5f;
    font-size: 15px;
    line-height: 1.34;
}

.auth-field {
    width: 100%;
    min-height: 52px;
    border: 1px solid rgba(0,0,0,.14);
    border-radius: 16px;
    background: rgba(255,255,255,.84);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 9px;
    padding: 0 14px;
}

.auth-field:focus-within {
    border-color: rgba(0,0,0,.34);
    box-shadow: 0 0 0 4px rgba(0,0,0,.06);
}

.auth-field-icon {
    width: 24px;
      height: 24px;
    flex: 0 0 24px;
    position: relative;
    color: #5b4a86;
    display: inline-block;
}

.auth-field-icon::before,
.auth-field-icon::after,
.auth-eye::before,
.auth-eye::after {
    content: "";
    position: absolute;
    display: block;
    box-sizing: border-box;
}

.auth-icon-user::before {
    width: 8px;
    height: 8px;
    left: 8px;
    top: 3px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.auth-icon-user::after {
    width: 16px;
    height: 9px;
    left: 4px;
    top: 13px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
}

.auth-icon-lock::before {
    width: 14px;
    height: 11px;
    left: 5px;
    top: 10px;
    border: 2px solid currentColor;
    border-radius: 4px;
}

.auth-icon-lock::after {
    width: 10px;
    height: 10px;
    left: 7px;
    top: 3px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
}

.auth-icon-phone::before {
    width: 16px;
    height: 16px;
    left: 4px;
    top: 4px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-right-color: transparent;
    border-radius: 50%;
    transform: rotate(-45deg);
}

.auth-icon-phone::after {
    width: 6px;
    height: 2px;
    left: 13px;
    top: 6px;
    background: currentColor;
    border-radius: 2px;
    box-shadow: -9px 9px 0 currentColor;
}

.auth-icon-email::before {
    width: 18px;
    height: 14px;
    left: 3px;
    top: 5px;
    border: 2px solid currentColor;
    border-radius: 5px;
}

.auth-icon-email::after {
    width: 12px;
    height: 12px;
    left: 6px;
    top: 2px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

.auth-icon-code::before,
.auth-icon-code::after {
    width: 2px;
    height: 17px;
    top: 4px;
    background: currentColor;
    border-radius: 2px;
    transform: rotate(12deg);
}

.auth-icon-code::before {
    left: 8px;
}

.auth-icon-code::after {
    left: 15px;
}

.auth-icon-code {
    background:
        linear-gradient(currentColor, currentColor) 4px 9px / 16px 2px no-repeat,
        linear-gradient(currentColor, currentColor) 4px 15px / 16px 2px no-repeat;

}

.auth-box input {
    width: 100%;
    border: 0;
    padding: 0;
    margin: 0;
    font-size: 15px;
        background: transparent;
    color: #111;
    outline: none;
}


.auth-box input:focus {
    box-shadow: none;

}

.auth-box button {
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 13px;
    background: #111;
    color: #fff;
    font-weight: 700;
    margin-top: 8px;
        cursor: pointer;

}
#registerBox .auth-consent {

    margin: 2px 0 10px;
    color: #666;
    font-size:10px;
    line-height: 1.32;
    text-align: left;
}

#registerBox .auth-consent a {

    color: #111;
    font-weight: 700;
    text-decoration: none;
}

#registerBox {
    padding-top: 18px;
    padding-bottom: 18px;
}

#registerBox .auth-kicker {
    margin-bottom: 6px;
    padding: 5px 9px;
    font-size: 10px;
}

#registerBox h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

#registerBox p {
    margin-bottom: 14px;
    font-size: 14px;
}

#registerBox .auth-field {
    min-height: 46px;
    margin-bottom: 9px;
}

#registerBox .auth-box button,
#registerBox button {
    padding: 12px;
}


.auth-box button.secondary {
        background: rgba(255,255,255,.64);

    color: #111;
}
.auth-box .auth-eye {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    margin: 0;
    background: transparent;
    color: #666;
    box-shadow: none;
     position: relative;
}

.auth-eye::before {
    width: 20px;
    height: 12px;
    left: 6px;
    top: 10px;
    border: 2px solid currentColor;
    border-radius: 50% / 65%;
}

.auth-eye::after {
    width: 6px;
    height: 6px;
    left: 13px;
    top: 13px;
    background: currentColor;
    border-radius: 50%; 
}
#authMessage {
    display: block;
    margin-top: 12px;
    color: #ff2d55;
}
.auth-box .link-button {
    width: auto;
    padding: 8px 10px;
    margin-top: 7px;
    background: transparent;
    color: #555;
    font-size: 12px;
    box-shadow: none;
}

#resetBox {
    padding-top: 18px;
    padding-bottom: 18px;
}

#resetBox .auth-kicker {
    margin-bottom: 6px;
    padding: 5px 9px;
    font-size: 10px;
}

#resetBox h2 {
    font-size: 25px;
}

#resetBox p {
    margin-bottom: 14px;
    font-size: 14px;
}

#resetBox .auth-field {
    min-height: 48px;
    margin-bottom: 9px;
}
#sendResetCodeBtn.sent,
#sendResetCodeBtn.sent:disabled {
    background: #16a34a;
    color: #fff;
    opacity: 1;
}

#sendResetCodeBtn:disabled {
    cursor: default;
    opacity: .78;
}
#resetMessage,
#loginMessage,
#registerMessage {
    display: block;
    min-height: 16px;
    margin-top: 10px;
    color: #ff2d55;
    font-size: 12px;
}

#resetMessage.is-checking,
#loginMessage.is-checking,
#registerMessage.is-checking {
    color: #16a34a;
}


.like-btn {
    margin-left: auto;
}
.profile-btn-empty{
    margin-top:20px;

    border:none;
    border-radius:999px;

    padding:14px 22px;

    background:#ffffff;
    color:#000;

    font-size:16px;
    font-weight:600;

    cursor:pointer;

    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;

    transition:.2s;
}

.profile-btn-empty:hover{
    transform:scale(1.03);
}

.install-btn{
    border:none;
    border-radius:999px;

    padding:14px 18px;

    background:#ffffff;
    color:#000;

    font-size:15px;
    font-weight:700;

    cursor:pointer;
}



.install-btn.hidden {
    display: none !important;
}

.notify-btn.active {
    background: rgba(255,255,255,.9);
    color: #111;
}

.story-side-tools .install-btn,
.story-side-tools .notify-btn,
.story-action-bar .profile-btn,
.story-action-bar .chat-btn {
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
    color: #fff;
    padding: 0;
    font-size: 0;
}
.story-side-tools .notify-btn.active {
    background: rgba(255,255,255,.92);
    color: #151517;
}

.story-action-bar .profile-btn,
.story-action-bar .chat-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.story-side-tools .install-btn,
.story-side-tools .notify-btn {
     width: 36px;
    height: 36px;
    border-radius: 50%;
}
.chat-modal{
    position:absolute;
    inset:0;
    z-index:9999;
    background:rgba(0,0,0,.45);
    backdrop-filter:blur(14px);

    display:flex;
    align-items:flex-end;
    justify-content:center;
}

.chat-modal.hidden{
    display:none;
}

.chat-box{
    width:100%;
    max-width:430px;
    height: 100%;
    background:#111;

    border-top-left-radius:24px;
    border-top-right-radius:24px;

    display:flex;
    flex-direction:column;

    overflow:hidden;
}

.chat-header{
    height:64px;
    padding:0 18px;

    border-bottom:1px solid rgba(255,255,255,.08);

    display:flex;
    align-items:center;
    justify-content:space-between;

    font-size:17px;
    font-weight:700;
}

.chat-header button{
    width:38px;
    height:38px;

    border:none;
    border-radius:50%;

    background:rgba(255,255,255,.08);
    color:#fff;

    font-size:22px;

    cursor:pointer;
}

.chat-messages{
    flex:1;
    overflow-y:auto;

    padding:16px;

    display:flex;
    flex-direction:column;
    gap:10px;
}

.chat-message{
    max-width:78%;

    padding:12px 14px;

    border-radius:18px;

    font-size:14px;
    line-height:1.4;

    word-break:break-word;
}

.chat-message.mine{
    align-self:flex-end;

    background:#fff;
    color:#111;

    border-bottom-right-radius:6px;
}



.chat-form{
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px 42px;
    align-items: center;
    gap: 7px;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255,255,255,.1);
    background: rgba(12,12,14,.78);
}

.chat-story-link-btn {
    margin: 10px auto 0;
    min-height: 38px;
    width: max-content;
    max-width: calc(100% - 28px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 10px;
    background: rgba(255,255,255,.94);
    color: #247fa8;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0;
    cursor: pointer;
    line-height: 1;
    padding: 0 13px 0 10px;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    box-shadow:
        0 2px 4px rgba(0,0,0,.22),
        0 10px 24px rgba(0,0,0,.36),
        inset 0 1px 0 rgba(255,255,255,.92);
}

.chat-story-link-btn::before {
    content: "";
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    background-color: currentColor;
    -webkit-mask:
        radial-gradient(circle at 34% 50%, transparent 0 3.8px, #000 4.3px 6.2px, transparent 6.7px) 0 0 / 50% 100% no-repeat,
        radial-gradient(circle at 66% 50%, transparent 0 3.8px, #000 4.3px 6.2px, transparent 6.7px) 100% 0 / 50% 100% no-repeat,
        linear-gradient(#000 0 0) center / 13px 4px no-repeat;
    mask:
        radial-gradient(circle at 34% 50%, transparent 0 3.8px, #000 4.3px 6.2px, transparent 6.7px) 0 0 / 50% 100% no-repeat,
        radial-gradient(circle at 66% 50%, transparent 0 3.8px, #000 4.3px 6.2px, transparent 6.7px) 100% 0 / 50% 100% no-repeat,
        linear-gradient(#000 0 0) center / 13px 4px no-repeat;
    transform: rotate(-35deg);
}

.chat-story-link-btn.hidden {
    display: none;
}

.chat-form input{
    flex:1;
    width: 100%;

    border:none;
    outline:none;

    border-radius:999px;

    padding:14px 16px;

    background:#1f1f1f;
    color:#fff;

    font-size:14px;
}

.chat-form button{
    border:none;

    border-radius:999px;

    padding:0 18px;

    background:#fff;
    color:#111;

    font-weight:700;

    cursor:pointer;
}
.reply-story-btn{
  width:100%;
    min-width:0;
    height:36px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,.14);
    background:#f4f4f2;
    color:#171719;
    font-size:13px;
    font-weight:800;
    letter-spacing:0;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
     padding:0 16px;
    white-space:nowrap;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.story-mention-preview{
    margin:12px 14px 0;
    padding:10px;

    border:1px solid rgba(255,255,255,.1);
    border-radius:16px;

    background:#1b1b25;

    display:flex;
    align-items:center;
    gap:10px;
}

.story-mention-thumb{
    width:42px;
    height:56px;
    border-radius:10px;
    background:#333;
    overflow:hidden;
    flex:0 0 auto;
}

.story-mention-thumb img,
.story-mention-thumb video{
    width:100%;
    height:100%;
    object-fit:cover;
}

.story-mention-info{
    flex:1;
    min-width:0;
}

.story-mention-info strong{
    display:block;
    font-size:13px;
}

.story-mention-info span{
    display:block;
    margin-top:2px;
    color:#aaa;
    font-size:12px;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
}

#clearStoryMentionBtn{
    width:28px;
    height:28px;

    border:0;
    border-radius:50%;

    background:rgba(255,255,255,.08);
    color:#fff;

    cursor:pointer;
}

.chat-story-ref{
    margin-bottom:8px;
    padding:8px;
    border-radius:14px;
    background:rgba(0,0,0,.08);
    display:flex;
    align-items:center;
    gap:8px;
}

.chat-message.theirs .chat-story-ref{
    background:rgba(255,255,255,.08);
}

.chat-story-ref-thumb{
    width:36px;
    height:48px;
    border-radius:9px;
    overflow:hidden;
    background:#333;
    flex:0 0 auto;
}

.chat-story-ref-thumb img,
.chat-story-ref-thumb video{
    width:100%;
    height:100%;
    object-fit:cover;
}

.chat-story-ref-text{
    min-width:0;
}

.chat-story-ref-text strong{
    display:block;
    font-size:11px;
}

.chat-story-ref-text span{
    display:block;
    margin-top:2px;
    font-size:11px;
    opacity:.75;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.user-typing-indicator{
    padding:0 18px 8px;
    color:#aaa;
    font-size:12px;
}

.user-typing-indicator.hidden{
    display:none;
}

.chat-story-ref:hover{
    transform:scale(.98);
    opacity:.9;
}

.chat-story-ref{
    cursor:pointer;
    transition:.15s;
}

.chat-story-ref:hover{
    transform:scale(.98);
    opacity:.9;
}
.chat-media-btn{
    width:48px;
    height:48px;

    border:none;
    border-radius:50%;

    background:#1f1f1f;
    color:#fff;

    font-size:20px;

    cursor:pointer;

    flex:0 0 auto;
}

.chat-image{
    width:220px;
    max-width:100%;

    border-radius:16px;

    display:block;
}
.chat-audio-btn.recording{
    background:#ff2d55;
    color:#fff;
    transform:scale(1.08);
}

.chat-btn{
    position:relative;
}

.chat-unread-badge{
    position:absolute;
    top:-4px;
    right:-4px;

    min-width:20px;
    height:20px;

    padding:0 6px;

    border-radius:999px;

    background:#ff2d55;
    color:#fff;

    font-size:11px;
    font-weight:800;

    display:flex;
    align-items:center;
    justify-content:center;

    border:2px solid #000;
}

.chat-unread-badge.hidden{
    display:none;
}


.chat-link-domain{
    font-size:12px;
    font-weight:700;

    color:#7cffb2;

    margin-bottom:6px;
}

.chat-link-url{
    font-size:13px;
    line-height:1.4;

    opacity:.9;

    word-break:break-word;
}
.chat-link-preview{
    display:block;
    margin-top:10px;
    border-radius:18px;
    overflow:hidden;
    text-decoration:none;
    color:inherit;
    background:rgba(0,0,0,.06);
    border:1px solid rgba(0,0,0,.08);
    cursor:pointer;
    pointer-events:auto;
}

.chat-message.theirs .chat-link-preview{
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.08);
}

.chat-link-image-wrap{
    width:100%;
    height:150px;
    background:#222;
    overflow:hidden;
}

.chat-link-image{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.chat-link-content{
    padding:12px;
}

.chat-link-title{
    font-size:14px;
    font-weight:800;
    line-height:1.3;
    color:inherit;
    margin-bottom:5px;
}

.chat-link-domain{
    font-size:12px;
    font-weight:700;
    opacity:.65;
}

.chat-link-image.skeleton{
    width:100%;
    height:150px;
    background:rgba(0,0,0,.12);
}
.chat-message.theirs{
    align-self:flex-start;
    background:#262626;
    color:#fff;
    border-bottom-left-radius:6px;
}
.chat-video{
    width:240px;
    max-width:100%;

    border-radius:18px;

    display:block;

    background:#000;
}

#sendResetCodeBtn.sent,
#sendResetCodeBtn.sent:disabled {
    background: #16a34a;
    color: #fff;
    opacity: 1;
}

#sendResetCodeBtn:disabled {
    cursor: default;
    opacity: .78;
}
.profile-btn,
.chat-btn,
.notify-btn,
.install-btn,
.like-btn,
.share-creator-btn {
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 23px 23px !important;
}

.profile-btn {
    background-image: url("/assets/icons/story-profile.svg") !important;
    background-size: 30px 30px !important;
}

.profile-btn.has-member-avatar {
    background-image: none !important;
    overflow: visible;
}

.profile-btn.has-creator-avatar {
    background-image: none !important;
    overflow: hidden;
}

.story-profile-avatar-crop,
.story-profile-avatar-frame {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.story-profile-avatar-crop {
    inset: 4%;
    z-index: 1;
    overflow: hidden;
    background: transparent;
}

.profile-btn.has-creator-avatar .story-profile-avatar-crop {
    inset: 0;
}

.story-profile-avatar-crop img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.08);
}

.profile-btn.has-creator-avatar .story-profile-avatar-crop img {
    transform: none;
}

.story-profile-avatar-frame {
    inset: -3px;
    z-index: 2;
    width: calc(100% + 6px);
    height: calc(100% + 6px);
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,.35));
}

.chat-btn {
    background-image: url("/assets/icons/story-chat.svg") !important;
    background-size: 30px 30px !important;
}

.notify-btn {
    background-image: url("/assets/icons/story-bell.svg") !important;
    background-size: 30px 30px !important;
}

.notify-btn.active {
    background-image: url("/assets/icons/story-bell-dark.svg") !important;
    background-size: 30px 30px !important;
}

.install-btn {
    background-image: url("/assets/icons/story-download.svg") !important;
    background-size: 30px 30px !important;
}

.story-side-tools .notify-btn::after,
.story-side-tools .install-btn::after {
    content: "";
    display: block;
    position: absolute;
    top: 3px;
    right: 3px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ff2d55;
    border: 2px solid rgba(25,25,28,.92);
    box-shadow: 0 2px 8px rgba(0,0,0,.28);
}

.like-btn {
    background-image: url("/assets/icons/story-like.svg") !important;
    background-size: 30px 30px !important;
}

.like-btn.liked {
    background-image: url("/assets/icons/story-like-filled.svg") !important;
    background-size: 35px 35px !important;
}
.like-btn.like-pop {
    animation: story-like-pop .52s cubic-bezier(.2, .9, .2, 1);
}

.like-btn.like-pop::after {
    content: "";
    display: block !important;
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255,45,85,.55);
    animation: story-like-ring .52s ease-out forwards;
    pointer-events: none;
}

@keyframes story-like-pop {
    0% {
        transform: scale(1);
    }
    38% {
        transform: scale(1.22);
    }
    68% {
        transform: scale(.94);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes story-like-ring {
    0% {
        opacity: .9;
        transform: scale(.72);
    }
    100% {
        opacity: 0;
        transform: scale(1.22);
    }
}
.share-creator-btn {
    background-image: url("/assets/icons/story-share.svg") !important;
    background-size: 30px 30px !important;
}

.profile-btn::before,
.profile-btn::after,
.chat-btn::before,
.chat-btn::after,
.notify-btn::before,
.install-btn::before,
.like-btn::before,
.share-creator-btn::before,
.share-creator-btn::after {
    display: none !important;
}

.like-btn:not(.like-pop)::after {
    display: none !important;
}











/* Follower chat refresh */
.feed-page {
    min-height: 100vh;
    margin: 0;
    background: #080908;
    color: #f7f7f4;
    font-family: Inter, Arial, sans-serif;
}

.feed-shell {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: calc(18px + env(safe-area-inset-top)) 14px 40px;
}

.feed-header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: 38px 44px 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px 0 16px;
    background: linear-gradient(180deg, #080908 76%, rgba(8,9,8,0));
}

.feed-header img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.feed-header strong,
.feed-header span {
    display: block;
}

.feed-header span {
    color: rgba(247,247,244,.62);
    font-size: 13px;
}

.feed-back {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.07);
    position: relative;
}

.feed-back::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 12px;
    width: 10px;
    height: 10px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}

.feed-grid {
    display: grid;
    gap: 18px;
}

.feed-take {
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    background: rgba(255,255,255,.045);
}

.feed-media {
    background: #000;
}

.feed-media video,
.feed-media img {
    display: block;
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    background: #000;
}

.feed-take-copy {
    display: grid;
    gap: 6px;
    padding: 13px;
}

.feed-take-copy span {
    color: rgba(247,247,244,.58);
    font-size: 12px;
    font-weight: 800;
}

.feed-take-copy a {
    width: max-content;
    max-width: 100%;
    margin-top: 4px;
    padding: 9px 12px;
    border-radius: 999px;
    background: #f7f7f4;
    color: #111;
    font-weight: 900;
    text-decoration: none;
}

.feed-empty {
    padding: 80px 12px;
    text-align: center;
}

.feed-empty h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.feed-empty p {
    margin: 0;
    color: rgba(247,247,244,.64);
    line-height: 1.45;
}

.chat-modal{
    background:
        linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.5)),
        rgba(0,0,0,.34);
    backdrop-filter: blur(18px);
    padding: 12px;
}

.chat-box{
    max-width: 430px;
    height: 100%;
    background:
        radial-gradient(circle at 18% 0, rgba(255,255,255,.16), transparent 32%),
        linear-gradient(180deg, rgba(25,25,28,.96), rgba(10,10,12,.98));
    border: 1px solid rgba(255,255,255,.14);
        border-radius: 0;
    box-shadow: 0 24px 80px rgba(0,0,0,.44);
}

.chat-header{
    height: 74px;
    padding: 12px 14px 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.04);
}

.chat-header-identity{
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-avatar{
    width: 42px;
    height: 42px;
    padding: 2px;
    background: rgba(255,255,255,.88);
    flex: 0 0 auto;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0,0,0,.22);
}

.chat-header-avatar img{
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 50%;
}

.chat-header-identity span{
    display: block;
    margin-bottom: 2px;
    color: rgba(255,255,255,.58);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.chat-header-identity strong{
    display: block;
    max-width: 230px;
    overflow: hidden;
    color: #fff;
    font-size: 17px;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-header .chat-close-btn{
    position: relative;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    font-size: 0;
}

.chat-close-btn::before,
.chat-close-btn::after{
    content: "";
    position: absolute;
    left: 11px;
    top: 19px;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}
.chat-close-btn::before{
    transform: rotate(45deg);
}

.chat-close-btn::after{
    transform: rotate(-45deg);
}

.chat-messages{
    padding: 16px 14px 14px;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.22) transparent;
}

.chat-message{
    max-width: 82%;
    padding: 11px 13px;
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(0,0,0,.12);
}

.chat-message.mine{
    background: #f7f7f4;
    color: #111;
    border-bottom-right-radius: 7px;
}

.chat-message.theirs{
    background: rgba(255,255,255,.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,.08);
    border-bottom-left-radius: 7px;
}

.chat-form{
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 38px 40px;
    align-items: center;
    gap: 6px;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255,255,255,.1);
    background: rgba(12,12,14,.78);
    backdrop-filter: blur(18px);
}

.chat-form input{
    min-width: 0;
    width: 100%;
    height: 46px;
    padding: 0 15px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.08);
    color: #fff;
}
.chat-input-wrap{
    position: relative;
    min-width: 0;
}

.chat-audio-wave{
    position: absolute;
    inset: 0;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    pointer-events: none;
}

.chat-audio-wave span{
    width: 3px;
    height: 12px;
    border-radius: 999px;
    background: #ff2d55;
    box-shadow: 0 0 12px rgba(255,45,85,.34);
    animation: chat-wave 820ms ease-in-out infinite;
}

.chat-audio-wave span:nth-child(2){ animation-delay: -720ms; }
.chat-audio-wave span:nth-child(3){ animation-delay: -620ms; }
.chat-audio-wave span:nth-child(4){ animation-delay: -520ms; }
.chat-audio-wave span:nth-child(5){ animation-delay: -420ms; }
.chat-audio-wave span:nth-child(6){ animation-delay: -320ms; }
.chat-audio-wave span:nth-child(7){ animation-delay: -220ms; }
.chat-audio-wave span:nth-child(8){ animation-delay: -120ms; }
.chat-audio-wave span:nth-child(9){ animation-delay: -260ms; }
.chat-audio-wave span:nth-child(10){ animation-delay: -460ms; }
.chat-audio-wave span:nth-child(11){ animation-delay: -660ms; }
.chat-audio-wave span:nth-child(12){ animation-delay: -780ms; }

.chat-form.is-recording .chat-input-wrap input{
    color: transparent;
    caret-color: transparent;
}

.chat-form.is-recording .chat-input-wrap input::placeholder{
    color: transparent;
}

@keyframes chat-wave{
    0%, 100% {
        transform: scaleY(.42);
        opacity: .55;
    }
    50% {
        transform: scaleY(1.75);
        opacity: 1;
    }
}


.chat-form .chat-media-btn,
.chat-form button[type="submit"]{
    position: relative;
    width: 38px;
    height: 38px;
    min-width: 0;
    padding: 0;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 0;
    overflow: hidden;
}

.chat-form button[type="submit"]{
    width: 40px;
    height: 40px;
    background: #f7f7f4;
    color: #111;
}

.chat-link-preview{
    max-width: 100%;
}

.chat-form .chat-media-btn::before,
.chat-form button[type="submit"]::before{
    content: "";
    position: absolute;
    inset: 8px;
    display: block;
    background: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

#chatImageBtn::before{
    -webkit-mask-image: url("/assets/icons/chat-image.svg");
    mask-image: url("/assets/icons/chat-image.svg");
}

#chatAudioBtn::before{
    -webkit-mask-image: url("/assets/icons/chat-mic.svg");
    mask-image: url("/assets/icons/chat-mic.svg");
}

.chat-form button[type="submit"]::before{
    -webkit-mask-image: url("/assets/icons/chat-send.svg");
    mask-image: url("/assets/icons/chat-send.svg");
}

.chat-form button[type="submit"]::after{
    display: none;
}

@media (max-width: 600px){
    .chat-modal{
        padding: 0;
    }

    .chat-box{
        height: 100%;
        border-radius: 0;
    }
}
#emptyInstallBtn {
    background-image: none !important;
    background-size: auto !important;
}

#emptyInstallBtn::before {
    content: "Instalar app";
    position: static;
    display: inline !important;
    width: auto;
    height: auto;
    background: none;
    box-shadow: none;
    font-size: 14px;
}

@media (max-width: 600px) {
    input,
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* Phase 3: secondary actions live in a compact menu. */
.story-more-btn {
    bottom: 126px;
    z-index: 5;
}

.story-more-btn::before,
.story-more-btn::after {
    content: "";
    position: absolute;
    display: block;
}

.story-more-btn::before {
    left: 12px;
    top: 19px;
    width: 18px;
    height: 4px;
    border-radius: 999px;
    background:
        radial-gradient(circle, currentColor 0 2px, transparent 2.5px) 0 0 / 7px 4px repeat-x;
}

.story-more-menu {
    position: absolute;
    right: 0;
    bottom: 176px;
    z-index: 6;
    display: grid;
    gap: 7px;
    width: 176px;
    padding: 8px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 18px;
    background: rgba(25,25,28,.9);
    box-shadow: 0 18px 52px rgba(0,0,0,.34);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    pointer-events: auto;
    transform-origin: bottom right;
    animation: story-menu-in .16s ease both;
}

@keyframes story-menu-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.story-menu-item,
.story-menu-item.feed-btn,
.story-menu-item.continue-story-btn,
.story-menu-item.latest-takes-btn,
.story-menu-item.share-creator-btn,
.story-menu-item.notify-btn,
.story-menu-item.install-btn {
    position: relative !important;
    right: auto !important;
    bottom: auto !important;
    z-index: auto;
    width: 100%;
    height: 40px;
    min-height: 40px;
    display: grid;
    grid-template-columns: 30px 1fr;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font: 900 12px/1 Inter, Arial, sans-serif;
    text-align: left;
    text-decoration: none;
    box-shadow: none;
    cursor: pointer;
}

.story-menu-item.hidden {
    display: none !important;
}

.story-menu-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.story-menu-item::before,
.story-menu-item::after {
    content: "";
    display: block;
    position: static;
    justify-self: center;
    grid-column: 1;
    grid-row: 1;
    color: currentColor;
}

.story-menu-item.feed-btn::before {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 5px;
    box-shadow: 0 6px 0 -4px currentColor, 0 12px 0 -4px currentColor;
}

.story-menu-item.continue-story-btn::before {
    width: 0;
    height: 0;
    margin-left: 4px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid currentColor;
}

.story-menu-item.latest-takes-btn::before {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 50%;
    box-shadow: inset 0 0 0 4px rgba(255,255,255,.22);
}

.empty-profile-headline {
    max-width: 290px;
    margin: 8px auto 0;
    padding: 8px 11px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    color: rgba(255,255,255,.78);
    font-size: 12px;
    font-weight: 900;
}

.empty-profile-links {
    width: min(320px, 100%);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin: 12px auto 0;
}

.empty-profile-links a,
.empty-feed-btn {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 12px;
    font-weight: 950;
    text-decoration: none;
}

.story-menu-item.share-creator-btn::before {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 50%;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 58% 45%, 58% 100%, 0 100%);
}

.story-menu-item.share-creator-btn::after {
    width: 10px;
    height: 10px;
    margin-left: 7px;
    margin-top: -8px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    box-shadow: none;
}

.story-menu-item.notify-btn::before {
    width: 14px;
    height: 15px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 12px 12px 4px 4px;
}

.story-menu-item.notify-btn::after {
    width: 18px;
    height: 6px;
    margin-top: 14px;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    box-shadow: 10px 5px 0 -8px currentColor;
}

.story-menu-item.install-btn::before {
    width: 2px;
    height: 15px;
    background: currentColor;
    border-radius: 2px;
}

.story-menu-item.install-btn::after {
    width: 11px;
    height: 11px;
    margin-top: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    box-shadow: 6px 6px 0 -4px currentColor;
}

.story-menu-item.notify-btn.active {
    color: #a8ff60;
}

.offline-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    padding: 28px;
    text-align: center;
    background:
        radial-gradient(circle at 50% 15%, rgba(168,255,96,.16), transparent 34%),
        linear-gradient(180deg, #171917, #050605 62%, #020302);
    color: #fff;
    font-family: Inter, Arial, sans-serif;
}

.offline-shell img {
    width: 82px;
    height: 82px;
    object-fit: cover;
    border-radius: 22px;
    box-shadow: 0 20px 60px rgba(0,0,0,.28);
}

.offline-shell span {
    color: #a8ff60;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.offline-shell h1 {
    max-width: 420px;
    margin: 0;
    font-size: clamp(30px, 8vw, 48px);
    line-height: .98;
}

.offline-shell p {
    max-width: 340px;
    margin: 0;
    color: rgba(255,255,255,.72);
    line-height: 1.45;
}

.offline-shell button {
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: #a8ff60;
    color: #0b1508;
    font-weight: 950;
}
