/**
 * MyBangladesh Reels — feed (New-Desgn/Reels) and create page (New-Desgn/Create-Reel)
 * Loaded by layouts/reels.php after style.css. Every class is namespaced .rl-*.
 *
 * 1. Tokens & page   2. Header & tabs   3. Feed & slide   4. Rail   5. Caption block
 * 6. Bottom navigation   7. Sheets (comments, share, report)   8. Toast & sound tip
 * 9. Desktop   10. Create page   11. Motion
 */

/* ==========================================================================
   1. TOKENS & PAGE
   ========================================================================== */
.rl-body {
    --rl-ink: #0d3b2c;
    --rl-brand: #0b6b47;
    --rl-red: #e3202b;
    --rl-card: #ffffff;
    --rl-bg: #fcf9f8;
    --rl-muted: #6b6f6d;
    --rl-line: rgba(13, 59, 44, 0.10);
    --rl-pill: rgba(255, 255, 255, 0.94);
    --rl-shadow: 0 10px 28px -12px rgba(13, 59, 44, 0.35), 0 2px 6px rgba(13, 59, 44, 0.06);
    --rl-nav-h: 66px;
    --rl-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: #000;
    color: #fff;
    font-family: var(--font-family-body);
    -webkit-font-smoothing: antialiased;
    overscroll-behavior-y: none;
}

[data-theme="dark"] .rl-body {
    --rl-ink: #eef7f2;
    --rl-brand: #83d7b4;
    --rl-red: #ff5a60;
    --rl-card: #1f1e1d;
    --rl-bg: #141313;
    --rl-muted: #a7aca9;
    --rl-line: rgba(255, 255, 255, 0.10);
    --rl-pill: rgba(34, 33, 32, 0.92);
    --rl-shadow: 0 10px 28px -12px rgba(0, 0, 0, 0.8);
}

.rl-body.rl-mode-feed {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.rl-body :focus-visible {
    outline: 2px solid var(--rl-brand);
    outline-offset: 2px;
}

.rl-slide :focus-visible {
    outline-color: #fff;
}

.rl-body .material-symbols-outlined.fill {
    font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

/* ==========================================================================
   2. HEADER & TABS — light wash over the top of the video
   ========================================================================== */
.rl-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 40;
    padding: max(8px, env(safe-area-inset-top, 0px)) 14px 26px;
    color: var(--rl-ink);
    background: linear-gradient(180deg,
        rgba(252, 249, 248, 0.96) 0%,
        rgba(252, 249, 248, 0.86) 48%,
        rgba(252, 249, 248, 0.45) 78%,
        rgba(252, 249, 248, 0) 100%);
    pointer-events: none;
}

[data-theme="dark"] .rl-header {
    background: linear-gradient(180deg, rgba(10, 12, 11, 0.92) 0%, rgba(10, 12, 11, 0.7) 50%, rgba(10, 12, 11, 0) 100%);
}

.rl-header > * {
    pointer-events: auto;
}

.rl-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rl-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex-shrink: 1;
    color: inherit;
    text-decoration: none;
}

.rl-brand img {
    width: 34px;
    height: 34px;
    border-radius: 24%;
    flex-shrink: 0;
}

.rl-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    line-height: 1;
}

.rl-brand-name {
    font-family: var(--font-family-headline);
    font-size: clamp(0.875rem, 4vw, 1.0625rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--rl-brand);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rl-brand-name span {
    color: var(--rl-red);
}

.rl-brand-tag {
    margin-top: 2px;
    font-size: clamp(0.45rem, 1.9vw, 0.55rem);
    font-weight: 500;
    white-space: nowrap;
    color: color-mix(in srgb, var(--rl-ink) 78%, transparent);
}

.rl-header-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    flex-shrink: 0;
}

.rl-pill,
.rl-hbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--rl-line);
    background: var(--rl-pill);
    color: var(--rl-ink);
    box-shadow: var(--rl-shadow);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s var(--rl-ease);
}

.rl-pill:active,
.rl-hbtn:active {
    transform: scale(0.95);
}

.rl-pill {
    gap: 2px;
    padding: 0 6px 0 8px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.rl-pill .material-symbols-outlined {
    font-size: 16px;
}

.rl-pin {
    color: var(--rl-red);
}

.rl-loc-name {
    max-width: 56px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rl-hbtn {
    position: relative;
    width: 32px;
    flex-shrink: 0;
}

.rl-hbtn .material-symbols-outlined {
    font-size: 19px;
}

.rl-bell-dot {
    position: absolute;
    top: 3px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid var(--rl-card);
    background: var(--rl-red);
}

.rl-bell-dot.has-count {
    top: -4px;
    right: -4px;
    width: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 14px;
    text-align: center;
    color: #fff;
}

.rl-avatar {
    overflow: hidden;
}

.rl-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Following | For You */
.rl-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
}

.rl-tab {
    position: relative;
    padding: 4px 2px 9px;
    font-family: var(--font-family-headline);
    font-size: 0.9375rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--rl-ink) 52%, transparent);
    text-decoration: none;
}

.rl-tab.is-active {
    font-weight: 800;
    color: var(--rl-ink);
}

.rl-tab.is-active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 30px;
    height: 3px;
    margin-left: -15px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--rl-red) 0 55%, var(--rl-brand) 55% 100%);
}

.rl-tab-sep {
    width: 1.5px;
    height: 16px;
    background: color-mix(in srgb, var(--rl-ink) 25%, transparent);
}

@media (max-width: 379px) {
    .rl-brand-tag { display: none; }
    .rl-loc-name { max-width: 44px; }
    .rl-header-actions { gap: 4px; }
}

@media (max-width: 339px) {
    .rl-brand-text { display: none; }
}

/* ==========================================================================
   3. FEED & SLIDE
   ========================================================================== */
.rl-main,
.rl-stage {
    position: relative;
    height: 100vh;
    height: 100dvh;
}

.rl-feed {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    overscroll-behavior: contain;
    scrollbar-width: none;
    outline: none;
}

.rl-feed::-webkit-scrollbar {
    display: none;
}

.rl-slide {
    position: relative;
    height: 100%;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: #0b0f0d;
    color: #fff;
}

.rl-media {
    position: absolute;
    inset: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

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

.rl-media video {
    opacity: 0;
    transition: opacity 0.2s linear;
}

.rl-media video.is-ready {
    opacity: 1;
}

/* Bottom wash keeps the caption, chips and rail legible on any picture */
.rl-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.42) 26%, rgba(0, 0, 0, 0) 52%),
        linear-gradient(270deg, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0) 22%);
    pointer-events: none;
}

.rl-state,
.rl-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
    transition: opacity 0.2s var(--rl-ease), transform 0.2s var(--rl-ease);
}

.rl-state {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.rl-state .material-symbols-outlined {
    font-size: 46px;
}

.rl-slide.is-paused .rl-state {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.rl-heart .material-symbols-outlined {
    font-size: 110px;
    color: #ff3b52;
    filter: drop-shadow(0 8px 18px rgba(255, 59, 82, 0.5));
}

.rl-heart.is-on {
    animation: rl-heart 0.8s var(--rl-ease);
}

.rl-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    opacity: 0;
    pointer-events: none;
}

.rl-slide.is-waiting .rl-spinner,
.rl-spinner.is-on {
    opacity: 1;
    animation: rl-spin 0.8s linear infinite;
}

.rl-error {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 22px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.55);
    transform: translate(-50%, -50%);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
}

.rl-error[hidden] {
    display: none;
}

.rl-error .material-symbols-outlined {
    font-size: 34px;
}

.rl-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: var(--rl-nav-h);
    z-index: 4;
    height: 2px;
    background: rgba(255, 255, 255, 0.18);
    pointer-events: none;
}

.rl-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: #fff;
}

.rl-sentinel {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 72px;
    scroll-snap-align: end;
}

.rl-sentinel .rl-spinner {
    position: static;
    margin: 0;
}

.rl-sentinel.is-done {
    display: none;
}

/* Empty feed */
.rl-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 100%;
    padding: 160px 28px calc(var(--rl-nav-h) + 30px);
    text-align: center;
    background: var(--rl-bg);
    color: var(--rl-ink);
    scroll-snap-align: start;
}

.rl-empty-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--rl-brand) 14%, var(--rl-card));
    color: var(--rl-brand);
}

.rl-empty-ico .material-symbols-outlined {
    font-size: 40px;
}

.rl-empty h2 {
    font-family: var(--font-family-headline);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--rl-ink);
}

.rl-empty p {
    max-width: 22em;
    color: var(--rl-muted);
}

.rl-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 12px 22px;
    border-radius: 999px;
    background: var(--rl-red);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

/* ==========================================================================
   4. RAIL
   ========================================================================== */
.rl-rail {
    position: absolute;
    right: 8px;
    bottom: calc(var(--rl-nav-h) + 18px + env(safe-area-inset-bottom, 0px));
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.rl-creator {
    position: relative;
    margin-bottom: 8px;
}

.rl-creator-avatar {
    display: block;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #fff;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.rl-creator-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rl-follow {
    position: absolute;
    left: 50%;
    bottom: -9px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: -10px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: var(--rl-red);
    color: #fff;
    cursor: pointer;
    transition: transform 0.18s var(--rl-ease), background-color 0.18s var(--rl-ease);
}

.rl-follow .material-symbols-outlined {
    font-size: 14px;
    font-weight: 700;
}

.rl-follow.is-following {
    background: #0b6b47;
}

.rl-act {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 44px;
    padding: 0;
    color: #fff;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.rl-act > .material-symbols-outlined {
    font-size: 30px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
    transition: transform 0.16s var(--rl-ease), color 0.16s var(--rl-ease);
}

.rl-act:active > .material-symbols-outlined {
    transform: scale(0.86);
}

.rl-like.is-on > .material-symbols-outlined {
    color: #ff3b52;
}

.rl-save.is-on > .material-symbols-outlined {
    color: #ffc64a;
}

.rl-like.is-bump > .material-symbols-outlined {
    animation: rl-bump 0.35s var(--rl-ease);
}

.rl-act > .rl-share-ico {
    transform: scaleX(-1);
}

.rl-count {
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Sound disc */
.rl-sound {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-top: 2px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: radial-gradient(circle at 50% 35%, #156b4c 0%, #0d3b2c 70%);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(13, 59, 44, 0.35), 0 6px 16px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.rl-sound-bars {
    display: flex;
    align-items: center;
    gap: 2.5px;
    height: 18px;
}

.rl-sound-bars i {
    display: block;
    width: 3px;
    height: 40%;
    border-radius: 3px;
    background: #fff;
}

.rl-sound-bars i:nth-child(2),
.rl-sound-bars i:nth-child(4) { height: 70%; }
.rl-sound-bars i:nth-child(3) { height: 100%; }

.rl-body.is-sound-on .rl-slide.is-active:not(.is-paused) .rl-sound-bars i {
    animation: rl-eq 0.9s ease-in-out infinite;
}

.rl-body.is-sound-on .rl-slide.is-active:not(.is-paused) .rl-sound-bars i:nth-child(2) { animation-delay: -0.2s; }
.rl-body.is-sound-on .rl-slide.is-active:not(.is-paused) .rl-sound-bars i:nth-child(3) { animation-delay: -0.45s; }
.rl-body.is-sound-on .rl-slide.is-active:not(.is-paused) .rl-sound-bars i:nth-child(4) { animation-delay: -0.1s; }
.rl-body.is-sound-on .rl-slide.is-active:not(.is-paused) .rl-sound-bars i:nth-child(5) { animation-delay: -0.6s; }

.rl-sound-off {
    display: none;
    font-size: 24px;
}

.rl-body:not(.is-sound-on) .rl-sound-bars { display: none; }
.rl-body:not(.is-sound-on) .rl-sound-off { display: block; }

/* ==========================================================================
   5. CAPTION BLOCK
   ========================================================================== */
.rl-info {
    position: absolute;
    left: 14px;
    right: 72px;
    bottom: calc(var(--rl-nav-h) + 16px + env(safe-area-inset-bottom, 0px));
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.rl-user {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.rl-verified {
    font-size: 16px;
    color: #3b9bff;
    text-shadow: none;
    background: radial-gradient(circle, #fff 45%, transparent 47%);
}

.rl-title {
    font-family: var(--font-family-headline);
    font-size: 1.0625rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rl-sub {
    max-width: 100%;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.94);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
}

.rl-sub.is-open {
    -webkit-line-clamp: 8;
    line-clamp: 8;
}

.rl-pills {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
    max-width: 100%;
}

.rl-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    min-height: 32px;
    padding: 0 14px 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: #0f1f19;
    font-size: 0.8125rem;
    font-weight: 600;
    text-shadow: none;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.rl-chip > span:not(.material-symbols-outlined):not(.rl-chip-ico) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rl-chip--loc .material-symbols-outlined {
    font-size: 17px;
    color: #e3202b;
}

.rl-chip--cta {
    min-height: 38px;
    padding: 0 14px 0 5px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0d3b2c;
}

.rl-chip-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #0b6b47;
    color: #fff;
}

.rl-chip-ico .material-symbols-outlined {
    font-size: 17px;
}

.rl-chip-arrow {
    font-size: 18px;
    margin-left: 4px;
}

/* ==========================================================================
   6. BOTTOM NAVIGATION
   ========================================================================== */
.rl-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    min-height: var(--rl-nav-h);
    padding: 6px 4px max(8px, env(safe-area-inset-bottom, 0px));
    border-radius: 22px 22px 0 0;
    background: var(--rl-card);
    box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, 0.45);
}

.rl-nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
    padding: 2px 2px 6px;
    color: color-mix(in srgb, var(--rl-ink) 72%, transparent);
    font-size: 0.6875rem;
    font-weight: 600;
    text-decoration: none;
}

.rl-nav-item .material-symbols-outlined {
    font-size: 25px;
}

.rl-nav-item:first-child .material-symbols-outlined {
    color: var(--rl-ink);
}

.rl-nav-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-top: -30px;
    border-radius: 50%;
    border: 4px solid var(--rl-card);
    background: var(--rl-red);
    color: #fff;
    box-shadow: 0 12px 24px -8px color-mix(in srgb, var(--rl-red) 75%, transparent);
}

.rl-nav-fab .material-symbols-outlined {
    font-size: 26px;
    color: #fff !important;
}

.rl-nav-reels {
    color: var(--rl-red);
    font-weight: 700;
}

.rl-nav-reels.is-active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 6px;
    height: 6px;
    margin-left: -3px;
    border-radius: 50%;
    background: var(--rl-red);
}

/* ==========================================================================
   7. SHEETS — comments, share, report (also the create page's option sheets)
   ========================================================================== */
.rl-sheet {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    color: var(--rl-ink);
}

.rl-sheet[hidden] {
    display: none;
}

.rl-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    animation: rl-fade 0.2s linear;
}

.rl-sheet-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    max-height: 85dvh;
    padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    border-radius: 26px 26px 0 0;
    background: var(--rl-card);
    box-shadow: 0 -18px 40px -16px rgba(0, 0, 0, 0.5);
    animation: rl-sheet-up 0.26s var(--rl-ease);
}

.rl-sheet-card--tall {
    height: 72vh;
    height: 72dvh;
}

.rl-grip {
    width: 40px;
    height: 4px;
    margin: 2px auto 8px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--rl-ink) 22%, transparent);
    flex-shrink: 0;
}

.rl-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--rl-line);
}

.rl-sheet-head h3 {
    font-family: var(--font-family-headline);
    font-size: 1.0625rem;
    font-weight: 800;
    color: var(--rl-ink);
}

.rl-sheet-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    background: color-mix(in srgb, var(--rl-ink) 7%, transparent);
    color: var(--rl-ink);
    cursor: pointer;
}

.rl-sheet-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    border-radius: 999px;
    background: var(--rl-brand);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

[data-theme="dark"] .rl-sheet-primary { color: #0d2a20; }

.rl-sheet-primary.is-danger {
    background: var(--rl-red);
    color: #fff;
}

/* Comments */
.rl-comments {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px 2px;
}

.rl-comment {
    display: flex;
    gap: 10px;
    padding: 8px 0;
}

.rl-comment.is-reply {
    margin-left: 44px;
}

.rl-comment img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: color-mix(in srgb, var(--rl-ink) 8%, transparent);
}

.rl-comment-author {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--rl-ink);
}

.rl-comment-text {
    margin-top: 2px;
    font-size: 0.9375rem;
    line-height: 1.4;
    color: var(--rl-ink);
    overflow-wrap: anywhere;
}

.rl-comment-meta {
    display: flex;
    gap: 14px;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--rl-muted);
}

.rl-comment-meta button {
    font-weight: 700;
    color: var(--rl-muted);
    cursor: pointer;
}

.rl-comments-note {
    padding: 40px 16px;
    text-align: center;
    color: var(--rl-muted);
}

.rl-reply-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--rl-brand) 10%, transparent);
    font-size: 0.8125rem;
}

.rl-reply-bar[hidden] {
    display: none;
}

.rl-reply-bar button {
    display: flex;
    color: var(--rl-ink);
    cursor: pointer;
}

.rl-comment-foot {
    padding-top: 10px;
    border-top: 1px solid var(--rl-line);
}

.rl-comment-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rl-comment-form input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--rl-line);
    background: color-mix(in srgb, var(--rl-ink) 5%, transparent);
    color: var(--rl-ink);
    font-size: 1rem;
}

.rl-comment-form input:focus {
    outline: none;
    border-color: var(--rl-brand);
}

.rl-comment-form button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--rl-red);
    color: #fff;
    cursor: pointer;
}

/* Share */
.rl-share-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 16px 0 12px;
}

.rl-share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--rl-ink);
    cursor: pointer;
}

.rl-share-btn[hidden] {
    display: none;
}

.rl-share-btn .rl-share-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--c);
    color: #fff;
}

.rl-share-link {
    display: flex;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--rl-ink) 6%, transparent);
}

.rl-share-link input {
    flex: 1;
    min-width: 0;
    padding: 0 10px;
    font-size: 0.8125rem;
    color: var(--rl-muted);
}

.rl-share-link button {
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--rl-brand);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

[data-theme="dark"] .rl-share-link button { color: #0d2a20; }

.rl-sheet-list {
    display: flex;
    flex-direction: column;
    margin-top: 12px;
    border-top: 1px solid var(--rl-line);
}

.rl-sheet-list button {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--rl-ink);
    text-align: left;
    cursor: pointer;
}

.rl-sheet-list button.is-danger {
    color: var(--rl-red);
}

/* Report */
.rl-report-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
    overflow-y: auto;
}

.rl-report-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rl-report-opt {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 12px;
    border-radius: 14px;
    border: 1px solid var(--rl-line);
    font-size: 0.9375rem;
    cursor: pointer;
}

.rl-report-opt input {
    accent-color: var(--rl-red);
    width: 18px;
    height: 18px;
}

.rl-report-opt:has(input:checked) {
    border-color: var(--rl-red);
    background: color-mix(in srgb, var(--rl-red) 8%, transparent);
}

.rl-report-form textarea {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--rl-line);
    background: transparent;
    color: var(--rl-ink);
    font-family: inherit;
    font-size: 0.9375rem;
    resize: none;
}

/* ==========================================================================
   8. TOAST & SOUND TIP
   ========================================================================== */
.rl-toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--rl-nav-h) + 24px);
    z-index: 90;
    max-width: calc(100% - 32px);
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(15, 20, 18, 0.92);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity 0.22s var(--rl-ease), transform 0.22s var(--rl-ease);
    pointer-events: none;
}

.rl-toast.is-on {
    opacity: 1;
    transform: translate(-50%, 0);
}

.rl-sound-tip {
    position: fixed;
    left: 50%;
    top: calc(max(8px, env(safe-area-inset-top, 0px)) + 104px);
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(15, 20, 18, 0.7);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    transform: translateX(-50%);
    pointer-events: none;
    animation: rl-tip 2.4s ease-in-out infinite;
}

.rl-sound-tip[hidden] {
    display: none;
}

.rl-create-fab,
.rl-keys {
    display: none;
}

/* ==========================================================================
   9. DESKTOP (900px+) — the reel stays phone-shaped in the centre
   ========================================================================== */
@media (min-width: 900px) {
    .rl-body.rl-mode-feed {
        background:
            radial-gradient(circle at 50% 30%, rgba(11, 107, 71, 0.16), transparent 60%),
            var(--rl-bg);
    }

    .rl-mode-feed .rl-header {
        padding: 12px 28px 14px;
        background: color-mix(in srgb, var(--rl-bg) 94%, transparent);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        box-shadow: 0 1px 0 var(--rl-line);
    }

    .rl-header-row {
        max-width: 1280px;
        margin: 0 auto;
    }

    .rl-brand img { width: 44px; height: 44px; }
    .rl-brand-name { font-size: 1.375rem; }
    .rl-brand-tag { font-size: 0.6875rem; }
    .rl-pill, .rl-hbtn { height: 42px; }
    .rl-hbtn { width: 42px; }
    .rl-loc-name { max-width: 140px; }
    .rl-header-actions { gap: 10px; }

    .rl-tabs {
        position: absolute;
        top: 50%;
        left: 50%;
        margin: 0;
        transform: translate(-50%, -50%);
    }

    .rl-stage {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 92px 0 20px;
    }

    .rl-feed {
        width: min(460px, calc((100dvh - 112px) * 9 / 16));
        height: 100%;
        border-radius: 26px;
        box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.55);
    }

    .rl-slide { border-radius: 26px; }

    .rl-rail,
    .rl-info { bottom: 22px; }

    .rl-progress { bottom: 0; }

    .rl-empty { padding: 40px 28px; }

    /* Navigation becomes a floating column on the left */
    .rl-nav {
        top: 50%;
        right: auto;
        left: 24px;
        bottom: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        min-height: 0;
        width: 92px;
        padding: 12px 6px;
        border-radius: 24px;
        transform: translateY(-50%);
        box-shadow: var(--rl-shadow);
    }

    .rl-nav-item { padding: 8px 2px; }
    .rl-nav-fab { margin-top: 0; width: 54px; height: 54px; border-width: 0; }
    .rl-nav-reels.is-active::after { display: none; }

    .rl-create-fab {
        position: fixed;
        right: 32px;
        top: 108px;
        z-index: 30;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 12px 20px 12px 16px;
        border-radius: 999px;
        background: var(--rl-red);
        color: #fff;
        font-weight: 700;
        text-decoration: none;
        box-shadow: 0 12px 24px -10px var(--rl-red);
    }

    .rl-keys {
        position: fixed;
        right: 32px;
        bottom: 32px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 14px 16px;
        border-radius: 18px;
        background: var(--rl-card);
        color: var(--rl-muted);
        font-size: 0.8125rem;
        box-shadow: var(--rl-shadow);
    }

    .rl-keys kbd {
        display: inline-block;
        min-width: 24px;
        margin-right: 3px;
        padding: 2px 6px;
        border-radius: 6px;
        border: 1px solid var(--rl-line);
        background: var(--rl-bg);
        font-family: inherit;
        font-size: 0.75rem;
        font-weight: 700;
        text-align: center;
        color: var(--rl-ink);
    }

    .rl-toast { bottom: 32px; }
    .rl-sound-tip { top: 50%; }

    .rl-sheet { align-items: center; }
    .rl-sheet-card { border-radius: 24px; max-height: 80vh; }
    .rl-sheet-card--tall { height: 78vh; }
    .rl-grip { display: none; }
}

/* ==========================================================================
   10. CREATE PAGE (New-Desgn/Create-Reel)
   ========================================================================== */
.rl-body.rl-mode-create {
    background: var(--rl-bg);
    color: var(--rl-ink);
}

.rl-header--create {
    position: sticky;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: max(8px, env(safe-area-inset-top, 0px)) 12px 8px;
    background: var(--rl-bg);
    box-shadow: 0 1px 0 var(--rl-line);
    pointer-events: auto;
}

.rl-header--create .rl-brand {
    margin-right: auto;
}

.rl-back {
    width: 36px;
    height: 36px;
}

.rl-loc--split {
    height: 34px;
    padding: 0 8px 0 10px;
    gap: 3px;
    font-size: 0.8125rem;
}

.rl-loc-split {
    width: 1px;
    height: 16px;
    margin: 0 2px 0 6px;
    background: var(--rl-line);
}

.rl-studio {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Camera stage */
.rl-cam {
    position: relative;
    height: calc(100vh - 52px - 168px);
    height: calc(100dvh - 52px - 168px);
    min-height: 420px;
    overflow: hidden;
    background: #0b0f0d;
    color: #fff;
}

.rl-cam-view {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rl-cam-frame {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.rl-cam[data-ratio="1:1"] .rl-cam-frame { height: auto; aspect-ratio: 1 / 1; }
.rl-cam[data-ratio="4:5"] .rl-cam-frame { height: auto; aspect-ratio: 4 / 5; max-height: 100%; width: auto; }

.rl-cam-frame video,
.rl-cam-frame img,
.rl-cam-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rl-cam-frame video.is-mirrored {
    transform: scaleX(-1);
}

.rl-cam-frame [hidden] {
    display: none;
}

.rl-cam-placeholder {
    background: url("../images/home/banner-1-800.webp") 72% 50% / cover no-repeat;
}

.rl-cam-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 22%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 32%),
        linear-gradient(270deg, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0) 24%);
    pointer-events: none;
}

.rl-cam-message {
    position: absolute;
    left: calc(50% - 22px);
    top: 44%;
    z-index: 2;
    width: min(260px, calc(100% - 110px));
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.62);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 0.8125rem;
    line-height: 1.45;
    text-align: center;
    transform: translate(-50%, -50%);
}

.rl-cam-message[hidden] {
    display: none;
}

.rl-cam-message button {
    margin-top: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #fff;
    color: #0d3b2c;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.8125rem;
}

/* Add Music */
.rl-music {
    position: absolute;
    top: 18px;
    left: 50%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: calc(100% - 120px);
    height: 32px;
    padding: 0 8px 0 12px;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, 0.75);
    background: rgba(20, 22, 21, 0.45);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    transform: translateX(-50%);
    cursor: pointer;
    border-width: 1px;
}

.rl-music .material-symbols-outlined {
    font-size: 18px;
}

.rl-music-name {
    overflow: hidden;
    text-overflow: ellipsis;
}

.rl-music-sep {
    width: 1px;
    height: 15px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.5);
}

/* Tool rail */
.rl-tools {
    position: absolute;
    top: 18px;
    right: 4px;
    bottom: auto;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 52px;
    gap: 6px;
}

.rl-tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.rl-tool-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(25, 27, 26, 0.5);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background-color 0.18s var(--rl-ease);
}

.rl-tool-ico .material-symbols-outlined {
    font-size: 20px;
}

.rl-tool.is-on .rl-tool-ico {
    background: #e3202b;
}

.rl-tool:disabled {
    opacity: 0.45;
    cursor: default;
}

.rl-ratio-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 22px;
    border: 2px solid #fff;
    border-radius: 4px;
    font-size: 0.4375rem;
    font-weight: 800;
    border-width: 1.5px;
}

/* Tool popover (speed, filters, timer, beauty) */
.rl-pop {
    position: absolute;
    right: 60px;
    z-index: 4;
    display: flex;
    gap: 2px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(20, 22, 21, 0.78);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.rl-pop[hidden] {
    display: none;
}

.rl-pop button {
    min-width: 38px;
    height: 30px;
    padding: 0 8px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.rl-pop button.is-on {
    background: #fff;
    color: #0d3b2c;
}

.rl-pop--grid {
    flex-wrap: wrap;
    width: 186px;
    border-radius: 16px;
}

/* Capture row */
.rl-capture {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 30px;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    padding: 0 14px;
}

.rl-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    justify-self: start;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    margin-bottom: 18px;
}

.rl-gallery-thumb {
    width: 45px;
    height: 45px;
    border-radius: 9px;
    border: 2px solid #fff;
    background: url("../images/home/banner-1-800.webp") 70% 50% / cover;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    border-width: 1.5px;
}

.rl-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rl-capture-mid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.rl-record {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 5px solid #fff;
    background: transparent;
    cursor: pointer;
    border-width: 3px;
}

.rl-record::before {
    content: "";
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e3202b;
    transition: width 0.2s var(--rl-ease), height 0.2s var(--rl-ease), border-radius 0.2s var(--rl-ease);
}

.rl-record.is-recording::before {
    width: 20px;
    height: 20px;
    border-radius: 6px;
}

.rl-record.is-photo::before {
    background: #fff;
}

.rl-record svg {
    position: absolute;
    inset: -3px;
    width: calc(100% + 6px);
    height: calc(100% + 6px);
    transform: rotate(-90deg);
    pointer-events: none;
}

.rl-record circle {
    fill: none;
    stroke: #e3202b;
    stroke-width: 4;
    stroke-linecap: round;
}

.rl-rec-time {
    position: absolute;
    top: 58px;
    left: 50%;
    z-index: 3;
    padding: 3px 10px;
    border-radius: 999px;
    background: #e3202b;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    transform: translateX(-50%);
}

.rl-rec-time[hidden] {
    display: none;
}

.rl-countdown {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family-headline);
    font-size: 4.5rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

.rl-countdown[hidden] {
    display: none;
}

.rl-modes {
    display: flex;
    gap: 24px;
}

.rl-mode {
    position: relative;
    padding: 2px 2px 7px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.75rem;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.rl-mode.is-on {
    color: #fff;
    font-weight: 700;
}

.rl-mode.is-on::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 14px;
    height: 3px;
    margin-left: -7px;
    border-radius: 3px;
    background: #e3202b;
}

/* Templates strip */
.rl-templates {
    position: absolute;
    left: 12px;
    right: 60px;
    bottom: 128px;
    z-index: 3;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.rl-templates[hidden] {
    display: none;
}

.rl-template {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.rl-template-swatch {
    width: 44px;
    height: 58px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: url("../images/home/banner-1-800.webp") 72% 50% / cover;
}

.rl-fx-warm { filter: sepia(0.25) saturate(1.3) hue-rotate(-8deg); }
.rl-fx-cool { filter: saturate(1.1) hue-rotate(14deg) brightness(1.04); }
.rl-fx-vivid { filter: saturate(1.6) contrast(1.1); }
.rl-fx-golden { filter: sepia(0.4) saturate(1.45) brightness(1.05); }
.rl-fx-mono { filter: grayscale(1) contrast(1.12); }

.rl-music.is-set {
    border-color: #fff;
    background: rgba(227, 32, 43, 0.85);
}

.rl-template.is-on .rl-template-swatch {
    border-color: #fff;
    box-shadow: 0 0 0 2px #e3202b;
}

/* Details sheet */
.rl-details {
    position: relative;
    z-index: 2;
    margin-top: -14px;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    border-radius: 18px 18px 0 0;
    background: var(--rl-bg);
}

.rl-caption {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rl-caption-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: color-mix(in srgb, var(--rl-ink) 12%, transparent);
    color: color-mix(in srgb, var(--rl-ink) 55%, transparent);
}

.rl-caption-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rl-caption-avatar .material-symbols-outlined {
    font-size: 22px;
}

.rl-caption textarea {
    flex: 1;
    min-width: 0;
    max-height: 96px;
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: var(--rl-ink);
    font-family: inherit;
    font-size: 0.8125rem;
    line-height: 1.35;
    resize: none;
}

.rl-caption textarea:focus {
    outline: none;
}

.rl-caption textarea::placeholder {
    color: color-mix(in srgb, var(--rl-ink) 50%, transparent);
}

.rl-caption-count {
    flex-shrink: 0;
    font-size: 0.6875rem;
    color: var(--rl-muted);
}

.rl-emoji-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    background: color-mix(in srgb, var(--rl-ink) 6%, transparent);
    color: var(--rl-ink);
    cursor: pointer;
}

.rl-emoji-btn .material-symbols-outlined {
    font-size: 20px;
}

.rl-emoji-panel {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    margin-top: 10px;
    padding: 8px;
    border-radius: 18px;
    background: var(--rl-card);
    box-shadow: var(--rl-shadow);
}

.rl-emoji-panel[hidden] {
    display: none;
}

.rl-emoji-panel button {
    height: 34px;
    border-radius: 10px;
    font-size: 1.25rem;
    cursor: pointer;
}

.rl-emoji-panel button:hover {
    background: color-mix(in srgb, var(--rl-ink) 6%, transparent);
}

.rl-chips {
    display: flex;
    gap: 4px;
    margin-top: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.rl-chips::-webkit-scrollbar {
    display: none;
}

.rl-opt {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    min-height: 32px;
    padding: 0 8px 0 6px;
    border-radius: 999px;
    border: 1px solid var(--rl-line);
    background: var(--rl-card);
    color: var(--rl-ink);
    font-size: 0.5625rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 3px 10px -7px rgba(13, 59, 44, 0.3);
    cursor: pointer;
}

.rl-opt > .material-symbols-outlined {
    flex-shrink: 0;
    font-size: 15px;
    color: #e3202b;
}

.rl-opt.is-set {
    border-color: color-mix(in srgb, var(--rl-brand) 55%, transparent);
    background: color-mix(in srgb, var(--rl-brand) 8%, var(--rl-card));
}

.rl-opt-label {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rl-opt--aud {
    gap: 3px;
    padding-right: 5px;
}

.rl-opt--aud > .material-symbols-outlined:first-child {
    color: var(--rl-ink);
}

.rl-opt--aud > .material-symbols-outlined:last-child {
    font-size: 14px;
    color: var(--rl-muted);
}

.rl-opt-aud {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;
}

.rl-opt-aud small {
    font-size: 0.5rem;
    font-weight: 500;
    color: var(--rl-muted);
}

.rl-post {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 40px;
    margin-top: 12px;
    border-radius: 999px;
    background: #e3202b;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: 0 10px 20px -12px #e3202b;
    cursor: pointer;
}

.rl-post .material-symbols-outlined {
    font-size: 18px;
}

.rl-post:disabled {
    opacity: 0.6;
    cursor: default;
}

.rl-post-status {
    margin-top: 8px;
    font-size: 0.8125rem;
    text-align: center;
    color: var(--rl-muted);
}

.rl-post-status:empty {
    display: none;
}

.rl-post-status.is-error {
    color: var(--rl-red);
    font-weight: 600;
}

.rl-post-bar {
    height: 4px;
    margin-top: 8px;
    border-radius: 4px;
    background: var(--rl-line);
    overflow: hidden;
}

.rl-post-bar[hidden] {
    display: none;
}

.rl-post-bar span {
    display: block;
    width: 0;
    height: 100%;
    background: #e3202b;
    transition: width 0.2s linear;
}

/* Option sheets on the create page */
.rl-sheet-body {
    overflow-y: auto;
    padding: 4px 0 12px;
}

.rl-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
}

.rl-field label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--rl-muted);
}

.rl-field input,
.rl-field select {
    height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid var(--rl-line);
    background: var(--rl-bg);
    color: var(--rl-ink);
    font-family: inherit;
    font-size: 1rem;
}

.rl-suggest {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.rl-suggest button {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--rl-line);
    background: var(--rl-bg);
    color: var(--rl-ink);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.rl-suggest button.is-on {
    border-color: var(--rl-brand);
    background: color-mix(in srgb, var(--rl-brand) 12%, transparent);
    color: var(--rl-brand);
}

.rl-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 6px 12px;
    margin-top: 8px;
    border-radius: 16px;
    border: 1px solid var(--rl-line);
    cursor: pointer;
}

.rl-choice input {
    accent-color: #e3202b;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.rl-choice strong {
    display: block;
    font-size: 0.9375rem;
}

.rl-choice small {
    display: block;
    font-size: 0.75rem;
    color: var(--rl-muted);
}

.rl-choice:has(input:checked) {
    border-color: #e3202b;
    background: color-mix(in srgb, #e3202b 6%, transparent);
}

.rl-sheet-actions {
    padding-top: 12px;
}

@media (min-width: 1024px) {
    /* Desktop: preview on the left, details on the right */
    .rl-studio {
        display: grid;
        grid-template-columns: minmax(0, 420px) minmax(0, 460px);
        justify-content: center;
        align-items: start;
        gap: 32px;
        padding: 28px 24px;
    }

    .rl-cam {
        height: min(78vh, 780px);
        min-height: 560px;
        border-radius: 28px;
        box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.5);
    }

    .rl-details {
        margin-top: 0;
        padding: 20px;
        border-radius: 24px;
        background: var(--rl-card);
        box-shadow: var(--rl-shadow);
    }

    .rl-chips {
        flex-wrap: wrap;
        overflow: visible;
    }

    .rl-header--create {
        padding: 12px 28px;
    }

    .rl-details .rl-caption textarea { font-size: 0.9375rem; }
    .rl-opt { min-height: 38px; font-size: 0.75rem; padding: 0 14px 0 10px; }
    .rl-opt > .material-symbols-outlined { font-size: 18px; }
    .rl-post { min-height: 48px; font-size: 1rem; }
}

/* ==========================================================================
   11. MOTION
   ========================================================================== */
@keyframes rl-spin { to { transform: rotate(360deg); } }
@keyframes rl-fade { from { opacity: 0; } }
@keyframes rl-sheet-up { from { transform: translateY(40px); opacity: 0; } }
@keyframes rl-heart {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
    25%  { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
    60%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -80%) scale(1.1); }
}
@keyframes rl-bump {
    40% { transform: scale(1.3); }
}
@keyframes rl-eq {
    0%, 100% { transform: scaleY(0.45); }
    50% { transform: scaleY(1); }
}
@keyframes rl-tip {
    50% { transform: translateX(-50%) scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
    .rl-body *,
    .rl-body *::before,
    .rl-body *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
