/* A dedicated Watch surface within the existing application shell. */
.watch-page {
    height: 100dvh;
    overflow: hidden;
}

.watch-page .full-width-layout {
    min-height: 0;
    flex: 1;
    overflow: hidden;
}

.watch-main {
    position: relative;
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-app);
}

.watch-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 58px;
    padding: 8px 28px;
    border-bottom: 1px solid var(--border-light);
}

.watch-heading>div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.watch-heading h1 {
    font-size: 18px;
    letter-spacing: -.4px;
}

.watch-heading span,
.watch-heading p {
    color: var(--text-secondary);
    font-size: 12px;
}

.watch-back {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    font-size: 20px;
}

.reels-stream {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
}

.reel-page {
    height: 100%;
    min-height: 320px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 90px;
}

.watch-page .reel-card {
    position: relative;
    width: auto;
    height: 100%;
    aspect-ratio: 9 / 16;
    max-width: 100%;
    flex: 0 1 auto;
    padding: 0;
    margin: 0;
    border-radius: 22px;
    border: 1px solid #ffffff24;
    background: #101811;
    color: #fff;
    isolation: isolate;
    overflow: hidden;
}

.reel-poster,
.reel-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reel-video {
    z-index: 1;
}

.reel-shade {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(180deg, #0006, transparent 28%, transparent 46%, #0007 66%, #000e 100%);
}

.reel-top {
    position: absolute;
    z-index: 5;
    inset: 14px 14px auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.reel-top>div {
    display: flex;
    gap: 6px;
}

.reel-media-kind {
    border: 1px solid #ffffff40;
    padding: 4px 9px;
    border-radius: 20px;
    font-size: 10px;
    color: #fff;
    background: #0004;
}

.reel-top button,
.reel-play {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ffffff30;
    border-radius: 12px;
    color: #fff;
    background: #07110bd9;
    backdrop-filter: blur(8px);
}

.reel-top svg,
.reel-play svg {
    width: 20px;
    height: 20px;
}

.reel-play {
    position: absolute;
    z-index: 4;
    left: 16px;
    top: 70px;
    opacity: .7;
}

.reel-play:hover,
.reel-play:focus-visible {
    opacity: 1;
}

.reel-caption {
    position: absolute;
    z-index: 4;
    left: 18px;
    right: 68px;
    bottom: 25px;
}

.reel-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.reel-author>div {
    min-width: 0;
}

.reel-author .author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #fff9;
    object-fit: cover;
}

.reel-author .author-name {
    display: block;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.reel-handle {
    display: block;
    color: #e0e9e2;
    font-size: 10px;
}

.reel-author .btn-follow {
    min-height: 32px;
    margin-left: auto;
    padding: 5px 10px;
    border: 1px solid #fff;
    border-radius: 8px;
    color: #fff;
    font-size: 11px;
    background: #0003;
}

.reel-author .btn-follow.following {
    background: #fff;
    color: #143326;
}

.watch-page .reel-caption .post-title {
    margin: 0 0 8px;
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
}

.reel-caption .post-description {
    margin-bottom: 8px;
    color: #e3eae5;
    font-size: 11px;
    line-height: 1.5;
}

.reel-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.reel-tags a {
    padding: 3px 7px;
    border-radius: 20px;
    color: #e2e9e4;
    background: #ffffff1f;
    font-size: 10px;
}

.reel-audio {
    margin-top: 12px;
    font-size: 11px;
    color: #d9e5dc;
}

.reel-actions {
    position: absolute;
    z-index: 5;
    right: 10px;
    bottom: 50px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.reel-actions .post-action-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #fff;
    padding: 0;
    min-width: 44px;
    min-height: 48px;
}

.reel-actions .action-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid #ffffff40;
    background: #06140cba;
    border-radius: 50%;
}

.reel-actions svg {
    width: 22px;
    height: 22px;
}

.reel-actions .action-count,
.reel-actions .action-label {
    font-size: 10px;
    color: inherit;
    font-weight: 700;
}

.reel-progress-label {
    position: absolute;
    inset: auto 12px 6px;
    z-index: 6;
    height: 16px;
    display: flex;
    align-items: center;
}

.reel-progress {
    width: 100%;
    height: 4px;
    accent-color: #74c69d;
    cursor: pointer;
}

.reel-navigation {
    position: absolute;
    z-index: 10;
    right: 24px;
    top: 50%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.reel-navigation button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 24px;
}

.reel-scroll-hint {
    position: absolute;
    right: 14px;
    bottom: 18px;
    font-size: 10px;
    color: var(--text-secondary);
    pointer-events: none;
}

.reel-options {
    position: absolute;
    right: 12px;
    top: 62px;
    z-index: 20;
    min-width: 185px;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-main);
    box-shadow: var(--shadow-modal);
}

.reel-options button {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 10px;
    border-radius: 6px;
    text-align: left;
    font-size: 12px;
    color: inherit;
}

.reel-options button:hover {
    background: var(--bg-hover);
}

.reel-error {
    position: absolute;
    z-index: 6;
    top: 25%;
    left: 18px;
    right: 18px;
    padding: 16px;
    border-radius: 12px;
    background: #08120be8;
    color: #fff;
    text-align: center;
    font-size: 12px;
}

.reel-error button {
    min-height: 44px;
    color: #b7f4cf;
    text-decoration: underline;
}

.watch-empty {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@media(max-width:900px) {
    .watch-page {
        padding-bottom: 0;
    }

    .watch-page .full-width-layout {
        height: auto;
        overflow: hidden;
    }

    .watch-page .watch-main {
        padding-bottom: calc(60px + env(safe-area-inset-bottom));
    }

    .watch-page .left-sidebar {
        z-index: 110;
    }

    .watch-heading {
        flex-basis: 48px;
        padding: 4px 12px;
    }

    .watch-heading span {
        display: none;
    }

    .reel-page {
        padding: 8px 64px;
    }

    .reel-navigation {
        right: 9px;
    }

    .reel-navigation button {
        width: 40px;
        height: 44px;
    }

    .reel-scroll-hint {
        display: none;
    }
}

@media(max-width:500px) {
    .reel-page {
        padding: 0;
        min-height: 260px;
    }

    .watch-page .reel-card {
        width: 100%;
        max-width: none;
        aspect-ratio: auto;
        border: 0;
        border-radius: 0;
    }

    .reel-navigation {
        right: 8px;
        top: 38%;
        gap: 7px;
    }

    .reel-navigation button {
        background: #07110b99;
        color: #fff;
        border-color: #ffffff45;
        width: 44px;
        height: 44px;
        font-size: 19px;
    }

    .reel-caption {
        left: 12px;
        right: 65px;
        bottom: 28px;
    }

    .reel-caption .post-description {
        display: none;
    }

    .reel-author {
        flex-wrap: wrap;
        gap: 6px;
    }

    .reel-actions {
        gap: 10px;
        right: 9px;
        bottom: 45px;
    }

    .watch-page .reel-caption .post-title {
        font-size: 13px;
    }

    .reel-audio {
        font-size: 10px;
        margin-top: 8px;
    }
}

@media(max-height:550px) and (orientation:landscape) {

    .watch-heading {
        display: none;
    }

    .watch-page .watch-main {
        padding-bottom: 0;
    }

    .watch-page .mobile-bottom-bar {
        display: none;
    }

    .reel-page {
        padding-block: 4px;
        min-height: 0;
    }

    .watch-page .reel-card {
        aspect-ratio: auto;
        width: min(650px, 90%);
    }

    .reel-caption {
        bottom: 20px;
    }

    .reel-caption .post-description,
    .reel-tags,
    .reel-audio {
        display: none;
    }

    .reel-actions {
        flex-direction: row;
        bottom: 25px;
    }

    .reel-caption {
        right: 220px;
    }
}

/* Keep post actions beside the media and preserve the shared mushroom animation. */
.watch-page .reel-card {
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.reel-media-frame {
    position: absolute;
    inset: 0;
    border-radius: 22px;
    overflow: hidden;
    background: #101811;
    border: 1px solid #ffffff24;
    isolation: isolate;
}

.reel-actions {
    right: -68px;
    bottom: 30px;
    gap: 14px;
}

.reel-actions .post-action-btn {
    color: var(--text-secondary);
    min-width: 48px;
    transition: color .15s ease;
}

.reel-actions .action-icon {
    width: 44px;
    height: 44px;
    background: var(--bg-subtle);
    border-color: var(--border-light);
    transition: background-color .15s ease, transform .15s ease;
}

.reel-actions .post-action-btn:hover {
    background: transparent;
    color: var(--text-main);
    transform: none;
}

.reel-actions .post-action-btn:hover .action-icon {
    background: var(--bg-hover);
}

.reel-actions .post-action-btn:not(.upvote-btn):hover .action-icon {
    transform: scale(1.06);
}

.reel-actions .post-action-btn:active .action-icon {
    transform: scale(.96);
}

.reel-actions .post-action-btn.upvote-btn:active .action-icon {
    transform: none;
}

/* Explicit Watch page reel action styling and isolation */
.watch-page .reel-card .reel-caption .post-description {
    padding: 0 !important;
    color: #e3eae5 !important;
    font-size: 11px !important;
    line-height: 1.5 !important;
    margin: 0 0 8px 0 !important;
    max-height: none !important;
    -webkit-line-clamp: unset !important;
}

.watch-page .reel-card .reel-caption .author-name {
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

.watch-page .reel-card .reel-caption .reel-handle {
    color: #c9d8ce !important;
    font-size: 12px !important;
}

.watch-page .reel-card .reel-actions .post-action-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
    min-height: 48px !important;
    width: auto !important;
    min-width: 48px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    gap: 4px !important;
    color: var(--text-secondary) !important;
}

.watch-page .reel-card .reel-actions .action-icon {
    display: grid !important;
    place-items: center !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: var(--bg-card, #ffffff) !important;
    border: 1px solid var(--border-light, #dce5df) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    transition: transform 0.15s ease, background-color 0.15s ease !important;
}

.watch-page .reel-card .reel-actions .action-icon svg {
    width: 22px !important;
    height: 22px !important;
    color: var(--text-main, #143326) !important;
}

.watch-page .reel-card .reel-actions .action-count,
.watch-page .reel-card .reel-actions .action-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--text-main, #20382c) !important;
}

.watch-page .reel-card .reel-actions .post-action-btn.upvote-btn.active .action-icon svg {
    color: #e63946 !important;
    fill: #e63946 !important;
}

.watch-page .reel-card .reel-actions .post-action-btn.save-btn.active .action-icon svg {
    color: var(--primary) !important;
    fill: var(--primary) !important;
}

.reel-caption {
    right: 18px;
}

.reel-play {
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, background-color .15s ease;
}

.reel-play:hover {
    opacity: 0;
    transform: translate(-50%, -50%);
}

.playback-visible .reel-play,
.reel-play:focus-visible {
    opacity: 1;
    pointer-events: auto;
}

.reel-play svg {
    width: 26px;
    height: 26px;
}

.reel-top button {
    transition: background-color .15s ease, opacity .15s ease;
}

.reel-top button:not(:disabled):hover {
    background: #1b3027;
    transform: none;
}

.reel-options {
    max-width: calc(100% - 24px);
    min-width: min(220px, calc(100% - 24px));
    max-height: calc(100% - 85px);
    overflow-y: auto;
}

.reel-options>button {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reel-options>button svg {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
}

.reel-options button {
    transition: background-color .15s ease;
}

.reel-menu-detail h3 {
    margin: 8px;
    font-size: 14px;
}

.reel-menu-detail p {
    margin: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.reel-menu-detail label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 8px;
    font-size: 12px;
}

.reel-menu-detail input {
    accent-color: var(--primary-light);
}

@media(max-width:500px) {
    .reel-page {
        padding: 8px 72px 8px 8px;
    }

    .reel-media-frame {
        border-radius: 16px;
    }

    .reel-actions {
        right: -61px;
        bottom: 22px;
        gap: 12px;
    }

    .reel-caption {
        right: 12px;
    }

    .reel-navigation {
        top: 60px;
        right: 12px;
        gap: 6px;
    }

    .reel-navigation button {
        background: var(--bg-card);
        color: var(--text-main);
        border-color: var(--border-light);
    }
}

@media(max-height:550px) and (orientation:landscape) {
    .reel-page {
        padding-inline: 70px;
    }

    .watch-page .reel-card {
        width: min(650px, 90%);
    }

    .reel-actions {
        flex-direction: column;
        bottom: 2px;
        gap: 4px;
    }

    .reel-actions .post-action-btn {
        min-height: 44px;
    }

    .reel-actions .action-icon {
        width: 32px;
        height: 32px;
    }

    .reel-caption {
        right: 18px;
    }
}

@media(hover:none) {
    .reel-actions .post-action-btn:not(.upvote-btn):hover .action-icon {
        transform: none;
    }
}

.reel-top {
    justify-content: flex-end;
}

.reel-top button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.reel-top button svg {
    width: 16px;
    height: 16px;
}

.reel-tags a {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    font-size: 12px;
}

.reel-tags {
    gap: 6px 10px;
}

.reel-caption .post-description {
    display: block;
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 9px;
}

.watch-page #commentThreadModal .comment-modal-dialog {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(340px, 1fr);
    width: min(880px, calc(100vw - 48px));
    max-width: 880px;
    height: min(720px, calc(100dvh - 64px));
    max-height: calc(100dvh - 64px);
    background: var(--bg-card);
}

.watch-page #commentThreadModal .comment-media-column {
    min-width: 0;
    max-height: none;
    background: var(--bg-card) !important;
    position: relative;
    overflow: hidden;
}

.watch-page #commentThreadModal .comment-media-column img,
.watch-page #commentThreadModal .comment-media-column video,
.watch-page #commentThreadModal .comment-modal-slide img,
.watch-page #commentThreadModal .comment-modal-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    display: block;
}

.watch-page #commentThreadModal .comment-thread-column {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-top: 0;
    background: var(--bg-card);
}

.watch-page #commentThreadModal .comment-list-scroll {
    flex: 1;
    min-height: 0;
}

@media(max-width:650px) {
    .watch-page #commentThreadModal {
        padding: 12px;
    }

    .watch-page #commentThreadModal .comment-modal-dialog {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 480px;
        height: min(680px, calc(100dvh - 24px));
        max-height: calc(100dvh - 24px);
    }

    .watch-page #commentThreadModal .comment-media-column {
        display: none;
    }

    .watch-page #commentThreadModal .comment-thread-column {
        flex: 1;
        border-left: 0;
    }
}

@media(max-height:500px) and (orientation:landscape) {
    .watch-page #commentThreadModal .comment-modal-dialog {
        height: calc(100dvh - 24px);
        max-height: calc(100dvh - 24px);
    }
}

@media(max-height:550px) and (orientation:landscape) {
    .reel-tags {
        display: flex;
    }
}

.reel-autoplay-hint {
    position: absolute;
    z-index: 5;
    top: 16px;
    left: 12px;
    max-width: calc(100% - 100px);
    padding: 5px 8px;
    border-radius: 6px;
    background: #07110bcc;
    color: #fff;
    font-size: 11px;
    pointer-events: none;
}

.reel-caption .post-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.reel-caption .post-description.is-expanded {
    display: block;
    -webkit-line-clamp: unset;
    max-height: 28dvh;
    overflow-y: auto;
}

.reel-description-toggle {
    display: block;
    min-height: 28px;
    margin: -7px 0 6px;
    padding: 2px 0;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.reel-description-toggle:hover {
    text-decoration: underline;
}

/* Shared header placement and an always-open comment column for each reel. */
@media(min-width:1100px) {
    .reel-page {
        display: grid;
        grid-template-columns: minmax(0, var(--watch-media-column, 65%)) minmax(240px, 1fr);
        gap: 0;
        padding: 16px 0;
    }

    .watch-page .reel-card {
        grid-column: 1;
        justify-self: end;
        margin-right: 84px;
        height: 100%;
        width: auto;
        max-width: calc(100% - 100px);
        aspect-ratio: 9/16;
    }

    .reel-comments {
        margin: 0 65px 0 0;
    }

    .reel-navigation {
        right: 8px;
    }
}

.reel-comments {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    min-width: 0;
    background: #ffffff !important;
    border: 1px solid var(--border-card);
    border-radius: 16px;
    overflow: hidden;
    color: var(--text-main);
}

.reel-comments h2 {
    font-size: 15px;
    padding: 18px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.reel-comment-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 16px;
}

.reel-comment {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.reel-comment-author {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
}

.reel-comment p {
    font-size: 13px;
    line-height: 1.5;
    margin: 6px 0;
    overflow-wrap: anywhere;
}

.reel-comment-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.reel-comment-controls button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-muted);
    font-size: 11px;
    min-height: 36px;
}

.reel-comment-controls svg {
    width: 15px;
    height: 15px;
}

.reel-comment-controls [aria-pressed="true"] {
    color: var(--primary-light);
}

.reel-comment-controls [aria-pressed="true"] svg {
    fill: currentColor;
}

.reel-comment-form {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

.reel-comment-form input {
    width: 0;
    min-width: 0;
    flex: 1;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 10px;
    font: inherit;
    font-size: 12px;
    min-height: 44px;
}

.reel-comment-form button {
    display: grid;
    place-items: center;
    width: 40px;
    min-height: 44px;
    color: var(--primary-light);
}

.reel-comment-form svg {
    width: 21px;
    height: 21px;
}

.reel-caption .post-description {
    margin-bottom: 0;
}

.reel-description-toggle {
    margin: 0 0 2px;
    min-height: 22px;
    padding: 0;
    font-size: 12px;
    line-height: 20px;
}

.reel-caption .reel-tags {
    display: none;
    gap: 2px 8px;
    margin: 2px 0;
}

.caption-expanded .reel-tags {
    display: flex;
}

.caption-expanded .reel-caption {
    max-height: 65%;
    overflow-y: auto;
}

.caption-expanded .post-description.is-expanded {
    max-height: none;
    overflow: visible;
}

.reel-caption .reel-audio {
    margin-top: 6px;
}

@media(max-width:1099px) {
    .reel-page {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(220px, .65fr);
        gap: 65px;
        padding: 12px 60px 12px 12px;
    }

    .watch-page .reel-card {
        justify-self: center;
        width: auto;
        height: 100%;
        max-width: 100%;
        aspect-ratio: 9/16;
    }

    .reel-comments {
        margin: 0;
    }
}

@media(max-width:700px) {
    .reel-page {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) 190px;
        gap: 10px;
        padding: 8px 12px;
        min-height: 420px;
    }

    .watch-page .reel-card {
        width: auto;
        height: 100%;
        aspect-ratio: 9/16;
        max-width: calc(100% - 100px);
        border-radius: 16px;
    }

    .reel-comments {
        width: 100%;
        height: 190px;
    }

    .reel-comments h2 {
        padding: 8px 12px;
        font-size: 13px;
    }

    .reel-comment-list {
        padding-inline: 12px;
    }

    .reel-comment {
        padding: 10px 0;
    }

    .reel-comment-form {
        padding: 6px 10px;
    }

    .reel-comments .reel-comment-form input {
        min-height: 38px;
        padding: 8px;
    }

    .reel-navigation {
        top: 80px;
        right: 12px;
    }

    .reel-caption {
        left: 10px;
        right: 10px;
        bottom: 22px;
    }

    .reel-author {
        margin-bottom: 6px;
    }

    .reel-author .author-avatar {
        width: 28px;
        height: 28px;
    }

    .reel-author .btn-follow {
        min-height: 28px;
        padding: 4px 6px;
    }

    .reel-caption .post-description {
        font-size: 11px;
    }

    .reel-caption .reel-tags a {
        font-size: 10px;
    }

    .reel-caption .reel-audio {
        display: none;
    }
}

@media(max-height:550px) and (orientation:landscape) {
    .reel-page {
        grid-template-columns: minmax(0, 1fr) minmax(220px, .7fr);
        grid-template-rows: minmax(0, 1fr);
        min-height: 0;
        padding-block: 4px;
        gap: 65px;
    }

    .reel-comments {
        height: 100%;
    }
}

/* Reuse regular post comment hierarchy without changing the reel panel placement. */
.reel-comments .comment-list-scroll {
    padding: 16px 18px;
    gap: 24px;
}

.reel-comments .comment-content-wrap {
    min-width: 0;
}

.reel-comments .comment-text-box {
    overflow-wrap: anywhere;
}

.reel-comments .reel-comment-author {
    font-size: inherit;
    font-weight: inherit;
}

.reel-comments .comment-meta-actions {
    gap: 12px;
    flex-wrap: wrap;
}

.reel-comments .comment-thread-header {
    flex-shrink: 0;
}

.reel-comments .comment-input-form {
    border-radius: 0;
}

.reel-comments .comment-input-form input {
    background: transparent;
    border: 0;
    padding-inline: 0;
}

.reel-comments .comment-input-form button {
    font-size: 12px;
    font-weight: 700;
}

@media(max-width:700px) {
    .reel-comments .comment-thread-header {
        padding: 8px 12px;
    }

    .reel-comments .comment-author-avatar {
        width: 28px;
        height: 28px;
    }

    .reel-comments .comment-author-meta h4 {
        font-size: 12px;
    }

    .reel-comments .comment-author-meta span {
        font-size: 10px;
    }

    .reel-comments .comment-list-scroll {
        padding: 12px;
        gap: 18px;
    }

    .reel-comments .comment-input-form .comment-user-avatar {
        width: 26px;
        height: 26px;
    }
}

/* Desktop comments occupy the same fixed shell column as Home's right sidebar. */
@media(min-width:1101px) {
    .watch-page .reel-page {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 16px 80px;
        gap: 0;
    }

    .watch-page .reel-card {
        margin: 0;
        width: auto;
        height: 100%;
        max-width: calc(100% - 40px);
        aspect-ratio: 9/16;
    }

    .reel-comment-sidebar {
        overflow: hidden;
        background: var(--bg-card) !important;
    }

    .reel-comment-sidebar .reel-comments {
        margin: 0;
        width: 100%;
        height: 100%;
        border: 0;
        border-radius: 0;
        background: var(--bg-card) !important;
    }

    .reel-comment-sidebar .reel-comments:not(.is-current) {
        display: none;
    }

    .reel-comment-sidebar .comment-thread-header {
        padding: 0 0 16px;
        background: var(--bg-card) !important;
    }

    .reel-comment-sidebar .comment-list-scroll {
        padding: 18px 0;
        background: var(--bg-card) !important;
    }

    .reel-comment-sidebar .comment-input-form {
        padding: 12px 0;
        background: var(--bg-card) !important;
    }
}

@media(max-width:1100px) {
    .reel-comment-sidebar {
        display: none;
    }
}

/* Fill the sidebar through the viewport bottom and anchor the comment composer. */
@media(min-width:1101px) {
    .watch-page .reel-comment-sidebar {
        padding-bottom: 0;
        background: var(--bg-card) !important;
    }

    .reel-comment-sidebar .reel-comments {
        flex: 1;
        min-height: 0;
        background: var(--bg-card) !important;
    }

    .reel-comment-sidebar .comment-input-form {
        margin-top: auto;
        margin-bottom: 0;
        flex-shrink: 0;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        background: var(--bg-card) !important;
    }
}

/* Keep reel scrolling available without its divider-side scrollbar. */
.reels-stream {
    scrollbar-width: none;
}

.reels-stream::-webkit-scrollbar {
    display: none;
    width: 0;
}

.reel-comments .comment-input-form {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    width: 100%;
    box-sizing: border-box;
    gap: 10px;
}

.reel-comments .comment-input-form input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.reel-comments .comment-input-form button {
    width: auto;
    min-width: 36px;
}

.comment-replies-toggle {
    align-self: flex-start;
    min-height: 36px;
    padding: 2px 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
}

.comment-replies-toggle:hover {
    color: var(--primary-light);
}

.reel-comments .comment-item-row+.comment-replies-toggle {
    margin-top: -20px;
    min-height: 28px;
}

@media(max-width:700px) {
    .reel-comments .comment-item-row+.comment-replies-toggle {
        margin-top: -14px;
    }
}

@media(min-width:1101px) {
    .reel-comment-sidebar .reel-comments {
        background: var(--bg-card) !important;
    }

    .reel-comment-sidebar .comment-thread-header {
        padding: 16px;
        background: var(--bg-card) !important;
    }

    .reel-comment-sidebar .comment-list-scroll {
        padding: 18px 16px;
        background: var(--bg-card) !important;
    }

    .reel-comment-sidebar .comment-input-form {
        padding: 12px 16px;
        background: var(--bg-card) !important;
    }
}

/* Use actual thread spacing instead of negative margins around reply controls. */
.reel-comments .comment-list-scroll {
    gap: 4px;
}

.reel-comments .comment-list-scroll>.comment-item-row {
    margin-top: 20px;
}

.reel-comments .comment-list-scroll>.comment-item-row:first-child {
    margin-top: 0;
}

.reel-comments .comment-list-scroll>.comment-item-row.is-reply {
    margin-top: 8px;
}

.reel-comments .comment-item-row+.comment-replies-toggle {
    margin-top: 0;
    transition: none;
}

.reel-comments .comment-list-scroll>.comment-item-row {
    margin-bottom: 0;
}

@media(min-width:901px) {
    .watch-page .watch-heading {
        display: none;
    }
}

.reel-progress {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    border-radius: 0;
    background: linear-gradient(to right, #74c69d 0%, #74c69d var(--reel-played, 0%), #ffffff60 var(--reel-played, 0%), #ffffff60 100%);
}

.reel-progress::-webkit-slider-runnable-track {
    height: 3px;
    background: transparent;
    border: 0;
}

.reel-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.reel-progress::-moz-range-track {
    height: 3px;
    background: transparent;
    border: 0;
}

.reel-progress::-moz-range-thumb {
    width: 1px;
    height: 1px;
    border: 0;
    opacity: 0;
}

.reel-comments .comment-item-row.is-reply+.comment-item-row.is-reply::before {
    top: -12px;
}

.reel-actions .reel-comments-trigger {
    display: flex;
}

.reel-comments-sheet {
    position: fixed;
    inset: auto 0 0;
    margin: 0;
    width: 100%;
    max-width: none;
    height: var(--sheet-height, 65dvh);
    max-height: 94dvh;
    padding: 0;
    border: 0;
    border-radius: 20px 20px 0 0;
    background: var(--bg-card);
    color: var(--text-main);
    overflow: hidden;
    transform: translateY(100%);
    transition: transform .22s ease, height .18s ease;
}

dialog.reel-comments-sheet:not([open]) {
    display: none !important;
}

@media(min-width: 1101px) {
    dialog.reel-comments-sheet {
        display: none !important;
    }
}

.reel-comments-sheet[open] {
    display: flex;
    flex-direction: column;
}

.reel-actions .reel-music-disc {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    overflow: hidden;
    margin-top: 6px;
    background: #111;
    animation: reelDiscSpin 4s linear infinite;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}

.reel-actions .reel-music-disc img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

@keyframes reelDiscSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.reel-comments-sheet.sheet-visible {
    transform: translateY(0);
}

.reel-comments-sheet::backdrop {
    background: rgba(0, 0, 0, .45);
}

.reel-comments-sheet.sheet-resizing {
    transition: none;
}

.reel-sheet-header {
    position: relative;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-light);
    text-align: center;
    padding: 0 48px 12px;
}

.reel-sheet-header h2 {
    font-size: 15px;
}

.reel-sheet-resize {
    display: grid;
    place-items: center;
    height: 28px;
    touch-action: none;
    cursor: ns-resize;
}

.reel-sheet-resize span {
    width: 38px;
    height: 4px;
    border-radius: 4px;
    background: var(--text-muted);
    opacity: .5;
}

.reel-sheet-close {
    position: absolute;
    right: 8px;
    top: 16px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--text-main);
}

.reel-sheet-close svg {
    width: 20px;
    height: 20px;
}

.reel-sheet-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.reel-sheet-content .reel-comments {
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0;
    margin: 0;
}

.reel-sheet-content .reel-comments:not(.is-current) {
    display: none;
}

.reel-sheet-content .comment-list-scroll {
    padding: 16px;
}

.reel-sheet-content .comment-input-form {
    padding: 10px 16px max(12px, env(safe-area-inset-bottom));
}

@media(max-width:768px) {

    .watch-page .watch-heading,
    .watch-page .reel-navigation {
        display: none;
    }

    .watch-page .reel-page {
        display: block;
        min-height: 0;
        height: 100%;
        padding: 0;
    }

    .watch-page .reel-card {
        width: 100%;
        max-width: none;
        height: 100%;
        margin: 0;
        aspect-ratio: auto;
        border: 0;
        border-radius: 0;
    }

    .watch-page .reel-media-frame {
        border: 0;
        border-radius: 0;
    }

    .watch-page .reel-actions {
        right: 12px;
        bottom: 80px;
        gap: 12px;
        flex-direction: column;
    }

    .watch-page .reel-actions .post-action-btn {
        color: #fff;
        background: transparent !important;
        min-height: 48px;
    }

    .watch-page .reel-actions .action-icon {
        width: 44px;
        height: 44px;
        background: #07110b66;
        border-color: #ffffff35;
    }

    .watch-page .reel-actions .reel-comments-trigger {
        display: flex;
    }

    .watch-page .reel-caption {
        left: 16px;
        right: 76px;
        bottom: 28px;
    }

    .watch-page .reel-caption .post-description {
        font-size: 13px;
    }

    .watch-page .reel-author .author-avatar {
        width: 34px;
        height: 34px;
    }

    .watch-page .reel-author .btn-follow {
        min-height: 32px;
    }

    .watch-page .reel-top {
        top: 12px;
        right: 12px;
    }

    .watch-page .reel-top button {
        width: 40px;
        height: 40px;
    }

    .watch-page .reel-handle {
        display: none;
    }

    .watch-page .reel-progress-label {
        left: 12px;
        right: 12px;
        bottom: 0;
    }
}

@media(prefers-reduced-motion:reduce) {
    .reel-comments-sheet {
        transition: none;
    }
}

@media(min-width:769px) {
    .reel-actions .reel-more {
        display: flex;
    }

    .reel-card:has(.reel-more[aria-expanded="true"]) .reel-options {
        top: auto;
        bottom: 30px;
        right: 8px;
    }
}

/* Reel More uses the regular post menu dimensions and item typography. */
.reel-options.post-dropdown-menu {
    left: auto;
    min-width: 210px;
    width: 210px;
    max-width: calc(100% - 24px);
    padding: 6px;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15), 0 2px 8px rgba(0, 0, 0, .08);
}

.reel-options>.dropdown-item-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 0;
    padding: 9px 12px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-main);
}

.reel-options>.dropdown-item-btn svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    color: var(--text-secondary);
}

.reel-options.post-dropdown-menu:not([hidden]) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
}

@media(min-width:769px) {
    .reel-card:has(.reel-more[aria-expanded="true"]) {
        z-index: 30;
    }

    .reel-card:has(.reel-more[aria-expanded="true"]) .reel-options {
        top: auto;
        bottom: 30px;
        left: calc(100% + 80px);
        right: auto;
        max-width: none;
    }
}

@media(min-width:769px) {
    .reel-card:has(.reel-more[aria-expanded="true"]) .reel-options {
        position: fixed;
        left: var(--reel-menu-left);
        top: var(--reel-menu-top);
        right: auto;
        bottom: auto;
        max-height: calc(100dvh - 24px);
    }
}

.reel-autoplay-hint {
    pointer-events: auto;
    cursor: pointer;
    border: 0;
    text-align: left;
}

/* Keep follow adjacent to the account identity instead of the frame edge. */
.reel-author .btn-follow {
    margin-left: 4px;
    flex-shrink: 0;
}

.reel-author>div {
    flex: 0 1 auto;
}

.reel-card[data-media-fit="contain"] .reel-video,
.reel-card[data-media-fit="contain"] .reel-poster {
    object-fit: contain;
}

@media(max-width:768px) {
    .watch-page .reel-actions .reel-more {
        display: flex;
    }

    .watch-page .reel-options {
        top: auto;
        bottom: 80px;
        right: 68px;
        max-height: calc(100% - 100px);
    }
}

/* Touch hover must not put white reel icons on a pale selected circle. */
@media(max-width:768px) {

    .watch-page .reel-actions .post-action-btn:hover .action-icon,
    .watch-page .reel-actions .post-action-btn:focus .action-icon,
    .watch-page .reel-actions .reel-more[aria-expanded="true"] .action-icon {
        background: rgba(7, 17, 11, .85);
        border-color: rgba(255, 255, 255, .65);
        color: #fff;
        transform: none;
    }

    .watch-page .reel-actions .reel-more svg {
        color: #fff;
        opacity: 1;
    }

    .watch-page .reel-actions .reel-more svg circle {
        fill: currentColor;
    }
}

/* A quiet create action with a thin, continuously travelling border accent. */
@property --reel-create-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.reel-create-button {
    position: absolute;
    right: 16px;
    bottom: 20px;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 15px;
    border: 1px solid var(--primary-light);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-main);
    box-shadow: 0 2px 6px rgba(20, 50, 35, .12);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    isolation: isolate;
}

.reel-create-button svg {
    width: 16px;
    height: 16px;
}

.reel-create-button::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    pointer-events: none;
    background: conic-gradient(from var(--reel-create-angle), transparent 0deg 285deg, #52b78899 325deg, #52b788cc 345deg, transparent 360deg);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: reel-create-border 5s linear infinite;
}

.reel-create-button:hover {
    color: var(--primary-light);
    background: var(--bg-subtle);
}

@keyframes reel-create-border {
    to {
        --reel-create-angle: 360deg;
    }
}

@media(max-width:768px) {
    .reel-create-button {
        top: 16px;
        bottom: auto;
        right: 16px;
        min-height: 36px;
        background: var(--bg-card);
    }
}

@media(prefers-reduced-motion:reduce) {
    .reel-create-button::before {
        animation: none;
    }
}

/* Reel creation shares the app tokens, with a dialog on desktop and a mobile screen. */
.reel-back-mobile {
    display: none;
}

.reel-composer {
    width: min(860px, calc(100vw - 48px));
    max-width: 860px;
    max-height: 90dvh;
    padding: 0;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    background: var(--bg-card);
    color: var(--text-main);
    box-shadow: var(--shadow-modal);
    overflow: hidden;
}

.reel-composer::backdrop {
    background: rgba(7, 17, 11, .6);
    backdrop-filter: blur(4px);
}

.reel-composer-form {
    display: flex;
    flex-direction: column;
    max-height: 90dvh;
}

.reel-composer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.reel-composer-back {
    display: grid;
    place-items: center;
    width: 36px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-main);
}

.reel-composer-back svg {
    width: 20px;
    height: 20px;
}

.reel-composer-header h1 {
    font-size: 18px;
    margin: 0;
}

.reel-composer-header p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 4px 0 0;
}

.reel-composer .reel-publish {
    margin-left: auto;
    min-height: 40px;
    border-radius: 999px;
    white-space: nowrap;
}

.reel-publish:disabled {
    opacity: .45;
    cursor: default;
}

.reel-composer-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    padding: 24px;
    overflow: auto;
}

.reel-upload-column {
    min-width: 0;
}

.reel-upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 350px;
    padding: 24px 16px;
    border: 1px dashed var(--border-focus, var(--primary-light));
    border-radius: 14px;
    background: var(--bg-subtle);
    text-align: center;
    cursor: pointer;
    position: relative;
}

.reel-upload-zone>svg {
    width: 48px;
    height: 48px;
    color: var(--primary-light);
}

.reel-upload-zone strong {
    font-size: 15px;
}

.reel-upload-zone span {
    font-size: 12px;
    color: var(--text-secondary);
}

.reel-upload-zone small {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
}

.reel-upload-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.reel-upload-zone:focus-within {
    outline: 2px solid var(--primary-light);
    outline-offset: 3px;
}

.reel-upload-preview video {
    display: block;
    width: 100%;
    height: 350px;
    background: #101811;
    object-fit: contain;
    border-radius: 12px;
}

.reel-upload-preview>div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
}

.reel-file-name {
    font-size: 11px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reel-replace-video {
    color: var(--primary-light);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    min-height: 36px;
}

.reel-upload-preview>p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
}

.reel-details-column label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 10px;
}

.reel-details-column label span {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
}

.reel-details-column textarea,
.reel-details-column input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: var(--bg-input);
    color: var(--text-main);
    font: inherit;
    font-size: 14px;
}

.reel-details-column textarea {
    resize: vertical;
    min-height: 130px;
}

.reel-caption-counter {
    text-align: right;
    color: var(--text-muted);
    font-size: 10px;
    margin: 6px 0 24px;
}

.reel-field-hint {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 8px 0;
}

.reel-publish-note {
    margin-top: 24px;
    padding: 14px;
    border-radius: 10px;
    background: var(--bg-subtle);
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.reel-composer-status {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 16px;
}

.reel-upload-column.drag-over {
    outline: 2px solid var(--primary-light);
    outline-offset: 4px;
    border-radius: 14px;
}

@media(max-width:768px) {
    .watch-page .watch-main>.reel-create-button {
        display: none;
    }

    .reel-back-mobile {
        display: grid;
        place-items: center;
        position: absolute;
        left: 16px;
        top: 16px;
        z-index: 9;
        width: 38px;
        height: 38px;
        padding: 0;
        border: 1px solid #ffffff60;
        border-radius: 50%;
        background: rgba(7, 17, 11, .65);
        color: #fff;
        backdrop-filter: blur(8px);
    }

    .reel-back-mobile svg {
        width: 22px;
        height: 22px;
    }

    .reel-composer {
        position: fixed;
        inset: 0;
        width: 100%;
        max-width: none;
        height: 100dvh;
        max-height: 100dvh;
        margin: 0;
        border: 0;
        border-radius: 0;
    }

    .reel-composer-form {
        height: 100%;
        max-height: 100dvh;
    }

    .reel-composer-header {
        gap: 8px;
        padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 12px;
    }

    .reel-composer-header h1 {
        font-size: 16px;
    }

    .reel-composer-header p {
        display: none;
    }

    .reel-composer .reel-publish {
        font-size: 12px;
        padding: 8px 14px;
    }

    .reel-composer-body {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px));
    }

    .reel-upload-zone {
        min-height: 260px;
    }

    .reel-upload-preview video {
        height: 36dvh;
    }

    .reel-details-column textarea,
    .reel-details-column input {
        font-size: 16px;
    }
}

/* Complete creation workspace. */
.reel-composer {
    width: min(960px, calc(100vw - 48px));
    max-width: 960px;
    max-height: 92dvh;
}

.reel-composer .reel-composer-form {
    height: min(780px, 92dvh);
    max-height: 92dvh;
}

.reel-composer .reel-composer-header {
    padding: 16px 24px;
}

.rc-save-status {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 10px;
}

.rc-text-button,
.rc-preview-caption button,
.rc-tools button,
.rc-selected>button {
    color: var(--primary-light);
    font-size: 12px;
    font-weight: 600;
    min-height: 36px;
}

.rc-steps {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-light);
}

.rc-steps button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    flex: 1;
    max-width: 170px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.rc-steps button[aria-current="step"] {
    color: var(--primary-light);
    background: var(--bg-active-pill);
    font-weight: 700;
}

.rc-steps button:disabled {
    opacity: .45;
}

.rc-main {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    overscroll-behavior: contain;
}

.rc-main h2 {
    margin: 0 0 12px;
    font-size: 16px;
}

.rc-section-title {
    margin-bottom: 20px;
}

.rc-section-title h2 {
    margin-bottom: 6px;
}

.rc-section-title p {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.6;
}

.rc-source-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.rc-source-options button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 10px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-main);
}

.rc-source-options button:hover,
.rc-source-options button:focus-visible {
    background: var(--bg-subtle);
    border-color: var(--primary-light);
}

.rc-source-options svg {
    width: 25px;
    height: 25px;
    color: var(--primary-light);
}

.rc-source-options strong {
    font-size: 13px;
}

.rc-source-options span {
    color: var(--text-muted);
    font-size: 11px;
}

.rc-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-height: 150px;
    justify-content: center;
    border: 1px dashed var(--border-card);
    border-radius: 12px;
    padding: 22px;
    margin-top: 18px;
    background: var(--bg-subtle);
    cursor: pointer;
    text-align: center;
}

.rc-drop svg {
    width: 24px;
    height: 24px;
    color: var(--primary-light);
}

.rc-drop strong {
    font-size: 13px;
}

.rc-drop span,
.rc-drop small {
    color: var(--text-muted);
    font-size: 11px;
}

.rc-drop.drag-over {
    border-color: var(--primary-light);
    background: var(--bg-active-pill);
}

.rc-selected {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-subtle);
    padding: 14px;
    border-radius: 10px;
    margin-top: 16px;
}

.rc-selected>div {
    flex: 1;
    min-width: 0;
}

.rc-selected strong,
.rc-selected span {
    display: block;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.rc-selected span {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 4px;
}

.rc-drafts {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.rc-draft-row {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 8px 12px;
}

.rc-draft-row>button:first-child {
    flex: 1;
    text-align: left;
    min-width: 0;
    min-height: 48px;
    color: var(--text-main);
}

.rc-draft-row strong {
    display: block;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rc-draft-row span {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 5px;
}

.rc-draft-row>button:last-child {
    font-size: 11px;
    color: var(--text-muted);
    min-height: 40px;
}

.rc-editor-layout,
.rc-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
}

.rc-preview-stage {
    aspect-ratio: 9/16;
    max-height: 470px;
    margin: 0 auto;
    position: relative;
    background: #101811;
    overflow: hidden;
    border-radius: 14px;
}

.rc-preview {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.rc-overlay-preview {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 16%;
    text-align: center;
    color: #fff;
    text-shadow: 0 1px 4px #000;
    font-size: 20px;
    font-weight: 700;
    pointer-events: none;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.rc-preview-caption {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
}

.rc-preview-caption>span {
    flex: 1;
}

.rc-tools label,
.rc-details label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 18px;
}

.rc-details label>span,
.rc-tools label>span {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 400;
}

.rc-tools input:not([type="range"]),
.rc-tools select,
.rc-details input:not([type="checkbox"]),
.rc-details textarea,
.rc-details select {
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: 9px;
    background: var(--bg-input);
    color: var(--text-main);
    font: inherit;
    font-size: 13px;
}

.rc-tools input[type="range"] {
    width: 100%;
    accent-color: var(--primary-light);
    min-height: 28px;
}

.rc-tools fieldset {
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 12px;
    margin: 0 0 18px;
    min-width: 0;
}

.rc-tools legend {
    font-size: 12px;
    font-weight: 600;
    padding: 0 5px;
}

.rc-trim-labels,
.rc-tool-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.rc-trim-labels label {
    margin-bottom: 8px;
}

.rc-cover-image {
    width: 64px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    vertical-align: middle;
    margin-left: 14px;
}

.rc-details textarea {
    resize: vertical;
    min-height: 120px;
}

.rc-details .reel-caption-counter {
    margin-top: -10px;
}

.rc-details .rc-switch {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-height: 44px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 0;
    font-weight: 500;
}

.rc-details .rc-switch>span {
    font-size: 12px;
    color: var(--text-main);
}

.rc-switch input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-light);
}

.rc-hashtag-suggestions,
.rc-tagged-people {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: -8px 0 20px;
}

.rc-hashtag-suggestions button,
.rc-tagged-people button {
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    background: var(--bg-subtle);
    color: var(--text-secondary);
    font-size: 11px;
}

.rc-hashtag-suggestions button[aria-pressed="true"] {
    color: var(--primary-light);
    border-color: var(--primary-light);
}

.rc-review {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 32px;
}

.rc-review-cover {
    width: 100%;
    max-height: 380px;
    object-fit: contain;
    border-radius: 12px;
    background: #101811;
}

.rc-review-caption {
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin-bottom: 20px;
}

.rc-review-details {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 20px;
    font-size: 12px;
}

.rc-review-details dt {
    color: var(--text-muted);
}

.rc-review-details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.rc-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    padding: 14px 24px;
    border-top: 1px solid var(--border-light);
}

.rc-footer>button {
    min-height: 40px;
    padding: 8px 18px;
    border-radius: 999px;
}

.rc-footer>button:first-child {
    color: var(--text-secondary);
}

.rc-footer>button:last-child {
    margin-left: auto;
}

.rc-footer-hint {
    font-size: 10px;
    color: var(--text-muted);
}

.reel-composer .reel-composer-status {
    flex-shrink: 0;
    margin: 0;
    padding: 0 24px 12px;
    font-size: 12px;
    line-height: 1.5;
}

.reel-composer .reel-composer-status:empty {
    display: none;
}

.reel-composer-status.is-error {
    color: var(--danger, #b54532);
}

.rc-publishing,
.rc-success {
    max-width: 460px;
    margin: 70px auto;
    text-align: center;
}

.rc-publishing progress {
    width: 100%;
    height: 8px;
    accent-color: var(--primary-light);
    margin: 20px 0;
}

.rc-publishing p,
.rc-success p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 12px 0 24px;
}

.rc-publishing button,
.rc-success button {
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 999px;
}

.rc-success-mark {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--bg-active-pill);
    color: var(--primary-light);
    font-size: 28px;
}

.rc-success [data-new] {
    display: block;
    margin: 12px auto;
    color: var(--primary-light);
}

.rc-decision {
    width: min(400px, calc(100vw - 32px));
    padding: 24px;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    background: var(--bg-card);
    color: var(--text-main);
    box-shadow: var(--shadow-modal);
}

.rc-decision::backdrop {
    background: #07110b80;
}

.rc-decision h2 {
    font-size: 17px;
    margin-bottom: 12px;
}

.rc-decision p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.rc-decision>div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 24px;
}

.rc-decision button {
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    color: var(--primary-light);
    font-size: 12px;
}

.rc-camera {
    margin-top: 20px;
}

.rc-camera video {
    display: block;
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    background: #101811;
    border-radius: 12px;
}

.rc-camera-toolbar,
.rc-record-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    flex-wrap: wrap;
    font-size: 12px;
}

.rc-camera button {
    min-height: 38px;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--text-main);
}

.rc-camera select {
    color: var(--text-main);
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    padding: 6px;
    border-radius: 6px;
}

.rc-record-time {
    font-variant-numeric: tabular-nums;
    color: var(--primary-light);
    min-width: 40px;
}

.reel-user-overlay {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 16%;
    z-index: 3;
    color: #fff;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 1px 4px #000;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    pointer-events: none;
}

@media(max-width:768px) {
    .reel-composer {
        width: 100%;
        max-width: none;
        height: 100dvh;
        max-height: 100dvh;
    }

    .reel-composer .reel-composer-form {
        height: 100dvh;
        max-height: 100dvh;
    }

    .reel-composer .reel-composer-header {
        padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
        gap: 7px;
    }

    .rc-save-status {
        font-size: 9px;
    }

    .rc-text-button {
        white-space: nowrap;
        font-size: 11px;
    }

    .rc-steps {
        padding: 8px 12px;
        gap: 4px;
    }

    .rc-steps button {
        font-size: 11px;
        gap: 6px;
    }

    .rc-main {
        padding: 20px 16px;
    }

    .rc-source-options {
        gap: 8px;
    }

    .rc-source-options button {
        padding: 16px 6px;
    }

    .rc-source-options span {
        font-size: 10px;
    }

    .rc-editor-layout,
    .rc-details {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .rc-preview-stage {
        max-height: 38dvh;
    }

    .rc-tools input:not([type="range"]),
    .rc-tools select,
    .rc-details input:not([type="checkbox"]),
    .rc-details textarea,
    .rc-details select {
        font-size: 16px;
    }

    .rc-review {
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 18px;
    }

    .rc-review-details {
        gap: 8px 12px;
        font-size: 11px;
    }

    .rc-footer {
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .rc-footer-hint {
        display: none;
    }

    .reel-composer .reel-composer-status {
        padding: 0 16px 10px;
        font-size: 11px;
    }

    .rc-selected {
        flex-wrap: wrap;
    }
}

.rc-manager .rc-manager-content {
    display: block;
    margin: 0;
    max-height: 55dvh;
    overflow-y: auto;
}

.rc-manager-content label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    margin: 14px 0;
    color: var(--text-main);
}

.rc-manager-content input:not([type="checkbox"]),
.rc-manager-content textarea,
.rc-manager-content select {
    width: 100%;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-main);
    font: inherit;
    padding: 10px;
}

.rc-manager-content .rc-switch {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.rc-manager-content input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-light);
}

.rc-managed-comment {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.rc-managed-comment p {
    overflow-wrap: anywhere;
}

.rc-managed-comment button {
    margin-top: 8px;
}

/* Source tiles are cards, rather than the app-wide pill-button shape. */
.reel-composer .rc-source-options button {
    border-radius: 12px !important;
}

.reel-composer .rc-drop {
    border-radius: 14px !important;
}

/* Creation is a Watch page, spanning the reel and comments columns. */
.watch-page.reel-creating .reel-comment-sidebar {
    display: none !important;
}

.watch-page.reel-creating .watch-main>:not(.reel-composer) {
    display: none !important;
}

.watch-page.reel-creating .watch-main {
    padding: 0;
}

.watch-page.reel-creating .watch-main>.reel-composer[open] {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    flex: 1;
    align-self: stretch;
    width: auto;
    max-width: none;
    height: auto;
    max-height: none;
    min-height: 0;
    margin: 24px;
    padding: 0;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: none;
}

.watch-page.reel-creating .reel-composer .reel-composer-form {
    flex: 1;
    height: auto;
    max-height: none;
    min-height: 0;
    width: 100%;
}

.reel-composer .rc-details {
    align-items: start;
}

.reel-composer .rc-details>div {
    min-width: 0;
}

.reel-composer .rc-details label {
    margin: 0 0 10px;
}

.reel-composer .rc-hashtag-suggestions,
.reel-composer .rc-tagged-people {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 24px;
    clear: both;
}

.reel-composer .rc-tagged-people:empty {
    margin: 0 0 24px;
}

.reel-composer .rc-hashtag-suggestions button,
.reel-composer .rc-tagged-people button {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.reel-composer #reelCaption,
.reel-composer #reelLocation,
.reel-composer #reelPeople,
.reel-composer #reelTags {
    display: block;
    margin: 0;
}

.reel-composer #reelLocation {
    margin-bottom: 24px;
}

.rc-select {
    width: 100%;
    min-width: 0;
    position: relative;
}

.rc-select .rc-select-trigger {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: 9px !important;
    background: var(--bg-input);
    color: var(--text-main);
    font: inherit;
    font-size: 13px;
    font-weight: 400;
    text-align: left;
}

.rc-select-trigger>span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rc-select-trigger>svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform .15s;
}

.rc-select-trigger[aria-expanded="true"] {
    border-color: var(--primary-light);
}

.rc-select-trigger[aria-expanded="true"]>svg {
    transform: rotate(180deg);
}

.rc-select-menu {
    position: fixed;
    inset: auto;
    box-sizing: border-box;
    margin: 0;
    padding: 6px;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-main);
    box-shadow: var(--shadow-modal);
    z-index: 100010;
}

.rc-select-menu button {
    display: block;
    width: 100%;
    min-height: 40px;
    padding: 10px;
    border: 0;
    border-radius: 7px !important;
    background: transparent;
    color: var(--text-main);
    font: inherit;
    font-size: 12px;
    text-align: left;
}

.rc-select-menu button:hover,
.rc-select-menu button:focus-visible {
    background: var(--bg-hover);
}

.rc-select-menu button[aria-selected="true"] {
    background: var(--bg-active-pill);
    color: var(--primary-light);
    font-weight: 600;
}

.rc-select-menu button:disabled {
    opacity: .45;
}

@media(max-width:768px) {
    .watch-page.reel-creating .watch-main>.reel-composer[open] {
        margin: 12px 12px calc(76px + env(safe-area-inset-bottom, 0px));
        border-radius: 14px;
    }

    .watch-page.reel-creating .reel-composer .reel-composer-header {
        padding: 12px;
    }

    .watch-page.reel-creating .reel-composer .rc-main {
        padding: 20px 16px;
    }

    .watch-page.reel-creating .reel-composer .rc-footer {
        padding: 12px 16px;
    }

    .rc-select .rc-select-trigger {
        font-size: 16px;
    }
}

.rc-person-menu {
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 6px;
    margin: 8px 0 12px;
    background: var(--bg-card);
    max-height: 180px;
    overflow-y: auto;
}

.rc-person-menu button {
    display: block;
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 7px !important;
    text-align: left;
    font-size: 12px;
    color: var(--text-main);
}

.rc-person-menu button:hover,
.rc-person-menu button:focus-visible {
    background: var(--bg-hover);
}

.reel-composer .rc-details .reel-caption-counter {
    margin: 8px 0 24px;
}

.reel-published-date {
    display: none;
    margin-top: 4px;
    color: rgba(255, 255, 255, .65);
    font-size: 11px;
    line-height: 1.5;
}

.caption-expanded .reel-published-date {
    display: block;
}

.reel-without-caption .reel-published-date {
    display: block;
}

/* A mint, ink-outline mushroom grows once when publication succeeds. */
.rc-success .rc-mushroom-success {
    width: 240px;
    height: 210px;
    margin: 0 auto 18px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.rc-mushroom-success svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.rc-mushroom-shadow {
    transform-origin: 160px 219px;
}

.rc-mushroom-sprout {
    transform-origin: 160px 217px;
}

.rc-mushroom-cap {
    transform-origin: 160px 135px;
}

.rc-mushroom-check {
    transform-origin: 237px 83px;
}

.rc-mushroom-spore {
    opacity: 0;
}

.rc-success:not([hidden]) .rc-mushroom-shadow {
    animation: rc-ground-arrive .65s ease-out both;
}

.rc-success:not([hidden]) .rc-mushroom-sprout {
    animation: rc-mushroom-grow 1.4s cubic-bezier(.22, .7, .24, 1) both;
}

.rc-success:not([hidden]) .rc-mushroom-cap {
    animation: rc-cap-settle 1.1s .55s ease-in-out both;
}

.rc-success:not([hidden]) .rc-mushroom-check {
    animation: rc-check-arrive .55s 1.15s cubic-bezier(.2, .8, .3, 1.25) both;
}

.rc-success:not([hidden]) .rc-mushroom-tick {
    stroke-dasharray: 30;
    stroke-dashoffset: 0;
    animation: rc-tick-draw .4s 1.5s ease-out both;
}

.rc-success:not([hidden]) .rc-mushroom-spore {
    animation: rc-spore-rise 1.5s 1s ease-out both;
}

.rc-success:not([hidden]) .rc-spore-two {
    animation-delay: 1.2s;
}

.rc-success:not([hidden]) .rc-spore-three {
    animation-delay: 1.35s;
}

@keyframes rc-ground-arrive {
    from {
        transform: scaleX(.25);
        opacity: 0;
    }

    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

@keyframes rc-mushroom-grow {
    0% {
        transform: translateY(155px) scale(.65, .45);
    }

    48% {
        transform: translateY(-9px) scale(.96, 1.06);
    }

    70% {
        transform: translateY(3px) scale(1.03, .97);
    }

    86% {
        transform: translateY(-2px) scale(.99, 1.01);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

@keyframes rc-cap-settle {
    0% {
        transform: rotate(-7deg);
    }

    42% {
        transform: rotate(5deg);
    }

    72% {
        transform: rotate(-2deg);
    }

    100% {
        transform: rotate(0);
    }
}

@keyframes rc-check-arrive {
    from {
        opacity: 0;
        transform: translateY(9px) scale(.65);
    }

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

@keyframes rc-tick-draw {
    from {
        stroke-dashoffset: 30;
    }

    to {
        stroke-dashoffset: 0;
    }
}

@keyframes rc-spore-rise {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }

    25% {
        opacity: 1;
    }

    75% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(-22px);
    }
}

@media(max-width:768px) {
    .rc-success {
        margin: 28px auto;
    }

    .rc-success .rc-mushroom-success {
        width: 210px;
        height: 185px;
    }
}

@media(prefers-reduced-motion:reduce) {
    .rc-success:not([hidden]) .rc-mushroom-success * {
        animation: none !important;
    }

    .rc-mushroom-spore {
        opacity: 0;
    }
}

.rc-source-options strong,
.rc-source-options span {
    white-space: nowrap;
}

.rc-source-options button {
    min-width: 0;
}

/* ================= WATCH GUEST LOCK SCREEN ================= */
.watch-guest-lock {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 80;
    align-items: center;
    justify-content: center;
    background: rgba(10, 20, 15, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 24px;
    box-sizing: border-box;
}

body.guest-mode .watch-guest-lock {
    display: flex !important;
}

body.logged-in .watch-guest-lock {
    display: none !important;
}

body.guest-mode .watch-main .reels-stream {
    filter: blur(16px);
    -webkit-filter: blur(16px);
    pointer-events: none;
    user-select: none;
}

body.guest-mode .watch-page .reel-navigation,
body.guest-mode .watch-page .reel-create-button,
body.guest-mode .watch-page .reel-back-mobile {
    display: none !important;
}

.watch-guest-lock-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 38px 32px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    box-sizing: border-box;
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.watch-lock-badge {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--primary-tint);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 4px;
}

.watch-lock-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin: 0;
}

.watch-lock-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

.watch-lock-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
    width: 100%;
}

.watch-lock-actions .btn {
    flex: 1;
    height: 40px;
    font-size: 13.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
    cursor: pointer;
    white-space: nowrap;
}

.watch-lock-actions .btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    border: 1px solid transparent;
}

.watch-lock-actions .btn-outline {
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-light);
}

.watch-lock-back-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    margin-top: 6px;
    transition: color 0.15s ease;
}

.watch-lock-back-link:hover {
    color: var(--primary);
}

/* Final Watch layout: isolate reel geometry and counters from shared feed styles. */
.watch-page .reel-page { box-sizing: border-box; }
.watch-page .reel-card {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: visible;
}
.watch-page .reel-media-frame { box-sizing: border-box; width: 100%; height: 100%; }
.watch-page .reel-card .reel-actions { width: 52px; align-items: center; flex-shrink: 0; }
.watch-page .reel-card .reel-actions .post-action-btn { overflow: visible !important; flex-shrink: 0; }
.watch-page .reel-card .reel-actions .action-count,
.watch-page .reel-card .reel-actions .action-label {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: static;
  width: auto;
  height: auto;
  min-height: 16px;
  line-height: 16px !important;
  font-size: 12px !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: visible;
}
.watch-page .reel-card .reel-actions .mobile-action-count { display: none !important; }
@media (min-width: 769px) {
  .watch-page .reel-page { display: flex; justify-content: center; align-items: center; padding: 16px 84px; min-height: 0; }
  .watch-page .reel-card { width: auto; height: 100%; max-width: calc(100% - 24px); aspect-ratio: 9 / 16; margin: 0; }
  .watch-page .reel-card .reel-media-frame { border-radius: 22px; }
  .watch-page .reel-card .reel-actions { right: -68px; bottom: 24px; flex-direction: column; gap: clamp(6px, 1.8vh, 14px); }
  .watch-page .reel-card .reel-actions .action-count,
  .watch-page .reel-card .reel-actions .action-label { color: var(--text-main, #20382c) !important; text-shadow: none; }
}
@media (max-width: 768px) {
  .watch-page .reel-page { padding: 0; min-height: 0; }
  .watch-page .reel-card { width: 100%; max-width: 100%; height: 100%; aspect-ratio: auto; margin: 0; }
  .watch-page .reel-card .reel-media-frame { border-radius: 0; }
  .watch-page .reel-card .reel-actions { right: 10px; bottom: max(64px, env(safe-area-inset-bottom)); gap: clamp(4px, 1.5dvh, 12px); }
  .watch-page .reel-card .reel-actions .action-count,
  .watch-page .reel-card .reel-actions .action-label { color: #fff !important; text-shadow: 0 1px 4px #000, 0 0 8px #0008; }
  .watch-page .reel-card .reel-actions .action-icon { background: #07110b99 !important; border-color: #ffffff55 !important; }
  .watch-page .reel-card .reel-actions .action-icon svg { color: #fff !important; }
  .watch-page .reel-card .reel-actions .upvote-btn.active .action-icon svg { color: #ff6b81 !important; }
  .watch-page .reel-card .reel-actions .save-btn.active .action-icon svg { color: #74e3b2 !important; }
}
@media (max-height: 560px) {
  .watch-page .reel-card .reel-actions { gap: 4px; bottom: 16px; }
  .watch-page .reel-card .reel-actions .post-action-btn { min-height: 42px !important; gap: 2px !important; }
  .watch-page .reel-card .reel-actions .action-icon { width: 30px !important; height: 30px !important; }
  .watch-page .reel-card .reel-actions .reel-music-disc { display: none; }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .watch-page .reel-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .65fr); gap: 76px; padding: 12px 20px 12px 12px; }
  .watch-page .reel-card { grid-column: 1; justify-self: center; max-width: 100%; }
  .watch-page .reel-page > .reel-comments { grid-column: 2; min-width: 0; margin: 0; }
}

/* Desktop Watch reference: portrait player, outside actions, fixed comment column. */
@media (min-width: 1101px) {
  .watch-page .watch-heading { display: none; }
  .watch-page .watch-main { padding-bottom: 0; }
  .watch-page .reel-page { display: flex; padding: 16px 84px 12px; min-height: 0; }
  .watch-page .reel-card { height: 100%; width: auto; aspect-ratio: 9 / 16; max-width: calc(100% - 32px); margin: 0; }
  .watch-page .reel-card .reel-media-frame { border-radius: 22px; }
  .watch-page .reel-comment-sidebar { display: flex; flex-direction: column; flex: 0 0 344px; width: 344px; min-width: 0; box-sizing: border-box; border-left: 1px solid var(--border-light); padding: 16px 18px 0; }
  .watch-page .reel-card .reel-actions { right: -70px; bottom: 28px; width: 52px; gap: 12px; }
  .watch-page .reel-card .reel-actions .reel-comments-trigger,
  .watch-page .reel-card .reel-actions .reel-music-disc { display: none !important; }
  .watch-page .reel-card .reel-actions .action-icon { width: 44px !important; height: 44px !important; background: var(--bg-subtle, #f0f5f2) !important; box-shadow: none !important; }
  .watch-page .reel-card .reel-actions .action-icon svg { color: var(--text-secondary, #607268) !important; }
  .watch-page .reel-card .reel-actions .action-label,
  .watch-page .reel-card .reel-actions .action-count { font-size: 10px !important; line-height: 14px !important; }
  .watch-page .reel-card .reel-actions .upvote-btn.active .action-icon svg { color: var(--primary-light, #2d6a4f) !important; }
  .watch-page .reel-caption { left: 18px; right: 18px; bottom: 25px; }
  .watch-page .reel-caption .reel-author { gap: 8px; flex-wrap: nowrap; margin-bottom: 12px; }
  .watch-page .reel-caption .author-avatar { width: 36px; height: 36px; }
  .watch-page .reel-caption .author-name { font-size: 12px !important; }
  .watch-page .reel-caption .reel-handle { font-size: 11px !important; }
  .watch-page .reel-caption .btn-follow { min-width: 82px; min-height: 32px; border-radius: 999px; margin-left: 4px; padding: 5px 12px; }
  .watch-page .reel-caption .post-description { font-size: 13px !important; line-height: 1.45 !important; }
  .watch-page .reel-caption .reel-audio { display: flex; margin-top: 8px; font-size: 12px; }
  .watch-page .reel-navigation { right: 10px; top: 50%; gap: 14px; }
  .watch-page .reel-navigation button { width: 48px; height: 48px; }
  .watch-page .reel-create-button { right: 16px; bottom: 18px; }
}

/* Shared feed card rules must not expand or clip the portrait reel. */
.watch-page .feed-post.reel-card {
  width: auto !important;
  display: block !important;
  overflow: visible !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 22px !important;
  background: transparent !important;
  box-shadow: none !important;
}
@media (max-width: 768px) {
  .watch-page .feed-post.reel-card { width: 100% !important; border-radius: 0 !important; }
}

@media (min-width: 1101px) {
  .watch-page .reel-card .reel-caption .post-description { font-size: 13px !important; line-height: 1.45 !important; }
}

/* Selectable device drafts with playable video previews. */
.rc-draft-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 210px)); gap: 16px; }
.rc-draft-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--border-light); border-radius: 14px; background: var(--bg-card); transition: border-color .15s, box-shadow .15s; }
.rc-draft-card.is-selected { border-color: var(--primary-light); box-shadow: 0 0 0 2px var(--primary-light); }
.rc-draft-preview { aspect-ratio: 9 / 16; display: grid; place-items: center; background: #101b15; color: #dce7df; overflow: hidden; }
.rc-draft-preview video, .rc-draft-preview img { width: 100%; height: 100%; min-height: 0; max-height: 100%; object-fit: contain; }
.rc-draft-card > button { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; width: 100%; padding: 12px; text-align: left; background: transparent; color: var(--text-main); }
.rc-draft-metadata strong { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }
.rc-draft-metadata span { font-size: 11px; color: var(--text-muted); }
.rc-draft-card > button .rc-draft-select-hint { font-weight: 600; color: var(--primary-light); }
.rc-draft-card.is-selected .rc-draft-select-hint::after { content: ' \2713'; }
.rc-draft-card > button:focus-visible { outline: 2px solid var(--primary-light); outline-offset: -3px; }
.rc-draft-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-light); }
.rc-draft-actions[hidden] { display: none !important; }
.rc-draft-selection { flex: 1 1 180px; min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.rc-draft-actions > button { min-height: 40px; padding: 10px 18px; border-radius: 999px; }
.rc-draft-actions [data-delete-selected-draft] { color: #ad3737; border: 1px solid var(--border-light); background: transparent; }
@media (max-width: 500px) { .rc-draft-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rc-draft-actions > button { flex: 1; } }

.rc-draft-metadata { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; }
.rc-draft-card > .rc-draft-toggle { position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 28px; height: 28px; min-height: 28px; padding: 3px; border: 2px solid #fff; border-radius: 50%; background: #15251a80; color: #fff; cursor: pointer; box-shadow: 0 1px 5px #0004; }
.rc-draft-toggle svg { width: 18px; height: 18px; visibility: hidden; }
.rc-draft-card > .rc-draft-toggle[aria-pressed="true"] { background: var(--primary, #1b4332); border-color: #fff; }
.rc-draft-toggle[aria-pressed="true"] svg { visibility: visible; }
.rc-draft-card > .rc-draft-toggle:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 3px; }
