/* Статусы пользователей: лента-трей, просмотрщик, редактор. */
.status-tray {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 2px 2px 14px;
    margin: 0 0 18px;
    scrollbar-width: none;
}
.status-tray::-webkit-scrollbar { display: none; }

.status-tray__item {
    flex: 0 0 86px;
    width: 86px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    color: var(--text-primary);
    text-decoration: none;
}

.status-tray__ring {
    position: relative;
    width: 74px;
    height: 74px;
    padding: 3px;
    border-radius: 50%;
    background: var(--border-light);
    box-sizing: border-box;
}

.status-tray__ring--unseen {
    background: conic-gradient(from 210deg, #f9ce34, #ee2a7b 48%, #6228d7 82%, #f9ce34);
}

.status-tray__ring--own { background: conic-gradient(from 210deg, #f9ce34, #ee2a7b 55%, #6228d7); }

.status-tray__ring--add {
    display: grid;
    place-items: center;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    color: var(--color-primary);
    font-size: 20px;
}

.status-tray__photo {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--bg-card);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
}

.status-tray__photo img,
.status-tray__photo video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.status-tray__initial {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: var(--avatar-gradient);
    font-size: 24px;
}

.status-tray__video {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: #202834;
    font-size: 22px;
}

.status-tray__name {
    max-width: 84px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    line-height: 1.25;
    text-align: center;
    color: var(--text-secondary);
}

.status-tray__item.is-unseen .status-tray__name { color: var(--text-primary); font-weight: 600; }

.profile-avatar--has-status {
    position: relative;
    isolation: isolate;
    text-decoration: none;
}
.profile-avatar--has-status::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    z-index: -1;
    background: conic-gradient(from 210deg, #f9ce34, #ee2a7b 48%, #6228d7 82%, #f9ce34);
}

/* Создание статуса */
.page-container main > .container.status-create-wrap { max-width: 680px; margin: 0 auto; padding-top: 22px; }
.status-create-head { margin-bottom: 18px; }
.status-kicker { margin: 0 0 6px; color: var(--color-primary); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.status-create-head h1 { margin: 0 0 6px; }
.status-create-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow);
}
.status-create-card .upload-field { margin-bottom: 18px; }
.status-create-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.status-create-field label { font-weight: 600; font-size: 14px; }
.status-create-field textarea,
.status-create-field select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 10px 12px;
    font: inherit;
}
.status-create-field textarea { min-height: 76px; resize: vertical; }
.status-create-hint { color: var(--text-muted); font-size: 12.5px; margin: -8px 0 16px; }
.status-create-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.status-expiry-note {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.45;
}

/* Просмотрщик */
body.status-viewer-page { background: #000; overflow: hidden; }
body.status-viewer-page .header,
body.status-viewer-page .footer,
body.status-viewer-page .mobile-tabbar,
body.status-viewer-page .spw-root,
body.status-viewer-page .skip-link,
body.status-viewer-page #yfg-loading-bar { display: none !important; }
body.status-viewer-page .page-container { padding: 0; margin: 0; max-width: none; }
body.status-viewer-page .container { max-width: none; padding: 0; }

.status-viewer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    color: #fff;
    touch-action: pan-y;
    user-select: none;
}
.status-progress {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 5;
    display: flex;
    gap: 3px;
}
.status-progress__bar {
    flex: 1;
    height: 2.5px;
    border-radius: 2px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.32);
}
.status-progress__fill {
    display: block;
    width: 0;
    height: 100%;
    background: #fff;
    transition: width 0.08s linear;
}
.status-progress__fill.is-done { width: 100%; }

.status-viewer__head {
    position: absolute;
    top: 26px;
    left: 12px;
    right: 12px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.status-viewer__author {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: #fff;
    text-decoration: none;
}
.status-viewer__author img,
.status-viewer__author .status-viewer__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: #222;
    display: grid;
    place-items: center;
    font-weight: 700;
}
.status-viewer__author-meta { display: flex; flex-direction: column; min-width: 0; }
.status-viewer__author-name { font-weight: 600; font-size: 14px; line-height: 1.2; }
.status-viewer__author-time { font-size: 11.5px; opacity: 0.75; line-height: 1.2; }
.status-viewer__head-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.status-viewer__icon-btn {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
}
.status-viewer__icon-btn:hover { background: rgba(255, 255, 255, 0.22); }
.status-viewer__views { color: #fff; font-size: 12px; display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }

.status-viewer__slide {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: #000;
}
.status-viewer__slide.is-active { display: flex; }
.status-viewer__media {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.status-viewer__sound { position: absolute; right: 16px; bottom: 76px; z-index: 4; width: auto; padding: 0 11px; font-size: 12px; }
.status-viewer__nav {
    position: absolute;
    top: 70px;
    bottom: 0;
    width: 34%;
    z-index: 3;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.status-viewer__nav--prev { left: 0; }
.status-viewer__nav--next { right: 0; }
.status-viewer__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    padding: 48px 20px 24px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
    color: #fff;
    font-size: 14px;
    line-height: 1.45;
    word-break: break-word;
}
.status-viewer__caption p { margin: 0; white-space: pre-wrap; }
.status-viewer--owner .status-viewer__caption { padding-bottom: 64px; }
.status-viewer__owner-actions {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}
.status-viewer__owner-actions .status-viewer__views { background: rgba(255,255,255,.14); padding: 7px 10px; border-radius: 999px; }
.status-viewer__delete-form { margin-left: auto; }
.status-viewer__delete-form button {
    border: 0;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-radius: 999px;
    padding: 7px 12px;
    font: inherit;
    font-size: 12.5px;
    cursor: pointer;
}

.status-viewer__empty {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    color: var(--text-primary);
    padding: 24px;
}

/* Список просмотревших */
.page-container main > .container.status-viewers-wrap { max-width: 620px; margin: 0 auto; }
.status-viewers-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 16px; overflow: hidden; }
.status-viewer-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border-light); }
.status-viewer-row:last-child { border-bottom: 0; }
.status-viewer-row img, .status-viewer-row .status-viewer-row__initial {
    width: 42px; height: 42px; border-radius: 50%; object-fit: cover;
    display: grid; place-items: center; background: var(--avatar-gradient); color: #fff; font-weight: 700;
}
.status-viewer-row__meta { min-width: 0; }
.status-viewer-row__name { font-weight: 600; color: var(--text-primary); text-decoration: none; }
.status-viewer-row__time { display: block; color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.status-viewer-row__link { margin-left: auto; color: var(--text-muted); }

@media (max-width: 640px) {
    .status-tray { margin-left: -2px; margin-right: -2px; }
    .status-viewer__caption { font-size: 13.5px; padding-bottom: 20px; }
    .status-create-card { padding: 16px; border-radius: 14px; }
    .status-viewer__head { top: 22px; left: 8px; right: 8px; }
    .status-viewer__head .status-viewer__views span { display: none; }
}
