/**
 * MyGuwahati Reels — feed (New-Design/Reels.png) and empty state (New-Design/Reels-Not-Found.png).
 * Phones: full-screen vertical player with the brand bar and Following / For You tabs over the video.
 * Tablet / desktop: the same player as a 9:16 stage under a regular brand header.
 * Also styles the comment sheet, share sheet, options menu and report form used by assets/js/reels.js.
 */

:root {
    --rl-orange: #ff5a1f;
    --rl-orange-deep: #ec3f0b;
    --rl-orange-grad: linear-gradient(135deg, #ff7a2e 0%, #ff5a1f 45%, #ec3f0b 100%);
    --rl-navy: #0d1b3e;
    --rl-ink: #27314d;
    --rl-cream: #fdf6ee;
    --rl-nav-h: 74px;                /* bottom navigation incl. its raised centre button */
    --rl-safe-top: env(safe-area-inset-top, 0px);
    --rl-safe-bottom: env(safe-area-inset-bottom, 0px);
    --reel-stage-width: 100vw;
    --rl-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 2px 12px rgba(0, 0, 0, 0.35);
}

/* ============================================================
   1. Page shell
   ============================================================ */
html:has(body.reels-has-feed), body.reels-has-feed {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}
body.reels-body { margin: 0; font-family: var(--font-family-body, 'Be Vietnam Pro', 'Hind Siliguri', system-ui, sans-serif); }
body.reels-has-feed { background: #05070c; color: #ffffff; }
body.reels-is-empty { background: var(--rl-cream); color: var(--rl-navy); }
.reels-app-wrapper, .reels-main-content { position: relative; min-height: 100%; }
.reels-body .material-symbols-outlined.fill { font-variation-settings: 'FILL' 1; }

/* ============================================================
   2. Header over the video: brand bar, tagline, feed tabs
   ============================================================ */
.reels-head {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 40;
    padding-top: var(--rl-safe-top);
    pointer-events: none;
}
.reels-head > * { pointer-events: auto; }

.reels-brand.mgh-home { background: transparent; padding: 6px 14px 0; max-width: none; }
.reels-brand .mgh-topbar { min-height: 52px; gap: 8px; }
.reels-brand .mgh-logo img { height: 56px; mix-blend-mode: normal; filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.9)) drop-shadow(0 2px 6px rgba(255, 255, 255, 0.55)); }
.reels-brand .mgh-pill, .reels-brand .mgh-round { box-shadow: 0 4px 14px rgba(13, 27, 62, 0.16); }
/* The reel design keeps the bell on phones; light / dark has no meaning over video */
.reels-brand .mgh-theme { display: none !important; }
.reels-brand .mgh-bell { display: inline-flex !important; }
.reels-tagline {
    margin: -2px 0 0;
    font: 500 0.59375rem/1.2 var(--font-family-body);
    color: var(--rl-navy);
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
}
.reels-tagline i { font-style: normal; opacity: 0.7; margin: 0 2px; }

.reels-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 8px auto 0;
    width: max-content;
}
.reels-tab {
    position: relative;
    padding: 4px 2px 10px;
    font: 600 1.1875rem/1.2 var(--font-family-body);
    color: #4b5568;
    text-decoration: none;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.85), 0 0 2px rgba(255, 255, 255, 0.9);
}
.reels-tab.active { color: var(--rl-navy); font-weight: 800; }
.reels-tab.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 40px;
    height: 3px;
    margin-left: -20px;
    border-radius: 3px;
    background: var(--rl-orange);
}
.reels-tab:focus-visible { outline: 2px solid var(--rl-orange); outline-offset: 2px; border-radius: 6px; }
.reels-tab-sep { width: 1.5px; height: 22px; background: rgba(13, 27, 62, 0.55); border-radius: 2px; margin-bottom: 6px; }
.reels-context-chip {
    margin: 6px auto 0;
    width: max-content;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--rl-navy);
    font: 700 0.75rem/1.3 var(--font-family-body);
}

/* ============================================================
   3. Stage and vertical scroller
   ============================================================ */
.reels-desktop-ambient { display: none; }
.reels-stage-wrapper { position: fixed; inset: 0; }
.reels-scroller {
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    overscroll-behavior-y: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.reels-scroller::-webkit-scrollbar { display: none; }
.reels-load-sentinel { height: 64px; display: flex; align-items: center; justify-content: center; scroll-snap-align: none; }

/* ============================================================
   4. One reel
   ============================================================ */
.reel-slide {
    position: relative;
    height: 100%;
    height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
    background: #000;
}
.reel-video-container { position: absolute; inset: 0; touch-action: manipulation; cursor: pointer; }
.reel-video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }

/* Light wash behind the header (the design's bright sky) and a dark one behind the caption */
.reel-scrim { position: absolute; left: 0; right: 0; pointer-events: none; }
.reel-scrim-top { top: 0; height: 200px; background: linear-gradient(180deg, rgba(255, 249, 243, 0.78) 0%, rgba(255, 249, 243, 0.45) 45%, rgba(255, 249, 243, 0) 100%); }
.reel-scrim-bottom { bottom: 0; height: 58%; background: linear-gradient(0deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.42) 38%, rgba(0, 0, 0, 0) 100%); }

.reel-play-state-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 76px;
    height: 76px;
    margin: -38px 0 0 -38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 27, 62, 0.45);
    color: #fff;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}
.reel-play-state-icon .material-symbols-outlined { font-size: 44px; }
.reel-play-state-icon.show { opacity: 1; transform: scale(1); }

.reel-sound-badge {
    position: absolute;
    top: calc(var(--rl-safe-top) + 132px);
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 14px 0 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(13, 27, 62, 0.62);
    color: #fff;
    font: 600 0.78125rem/1 var(--font-family-body);
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 3;
}
.reel-sound-badge .material-symbols-outlined { font-size: 18px; }
/* category feeds show a #category chip under the tabs; keep the sound pill clear of it */
.reels-stage-wrapper:has(.reels-context-chip) .reel-sound-badge { top: calc(var(--rl-safe-top) + 168px); }
.reel-sound-badge.hidden { display: none; }

.reel-heart-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: var(--rl-orange);
    opacity: 0;
    pointer-events: none;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}
.reel-heart-burst .material-symbols-outlined { font-size: 120px; }
.reel-heart-burst.active { animation: rl-heart 0.85s ease forwards; }
@keyframes rl-heart {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
    25% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
    45% { transform: translate(-50%, -50%) scale(0.95); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -60%) scale(1); }
}

/* ============================================================
   5. Right-hand action rail
   ============================================================ */
.reel-action-rail {
    position: absolute;
    right: 6px;
    bottom: calc(var(--rl-nav-h) + var(--rl-safe-bottom) + 16px);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 64px;
}
.reel-action-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.reel-action-count {
    font: 700 0.8125rem/1.1 var(--font-family-body);
    color: #fff;
    text-shadow: var(--rl-text-shadow);
}

.reel-creator-wrap { position: relative; margin-bottom: 10px; }
.reel-creator-avatar {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2.5px solid #fff;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.reel-creator-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel-follow-btn {
    position: absolute;
    left: 50%;
    bottom: -10px;
    width: 24px;
    height: 24px;
    margin-left: -12px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: var(--rl-orange);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(236, 63, 11, 0.5);
    transition: transform 0.15s ease, background-color 0.2s ease;
}
.reel-follow-btn .material-symbols-outlined { font-size: 17px; font-weight: 700; }
.reel-follow-btn.following { background: #16a34a; }
.reel-follow-btn:active { transform: scale(0.9); }

.reel-action-btn {
    width: 44px;
    height: 40px;
    padding: 0;
    border: 0;
    background: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease;
}
.reel-action-btn:active { transform: scale(0.88); }
.reel-action-btn:focus-visible, .reel-sound-btn:focus-visible, .reel-more-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 12px; }
.reel-action-btn svg {
    width: 33px;
    height: 33px;
    fill: #fff;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
    transition: fill 0.2s ease, transform 0.2s ease;
}
.reel-action-btn .reel-dot { fill: var(--rl-navy); }
.reel-like-btn.liked svg { fill: var(--rl-orange); animation: rl-pop 0.35s ease; }
.reel-save-btn.saved svg { fill: #ffb21f; animation: rl-pop 0.35s ease; }
@keyframes rl-pop { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* Sound disc: waveform that moves while the reel plays; tap = mute / unmute */
.reel-sound-btn.reel-audio-disc {
    position: relative;
    width: 52px;
    height: 52px;
    margin-top: 6px;
    padding: 0;
    border-radius: 50%;
    border: 3px solid #fff;
    background: radial-gradient(circle at 35% 30%, #3a3036 0%, #1b1418 70%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vinyl-disc { display: flex; }
.vinyl-disc svg { width: 27px; height: 27px; fill: var(--rl-orange); }
.vinyl-disc rect { transform-box: fill-box; transform-origin: center; }
.vinyl-disc.spinning rect { animation: rl-wave 0.9s ease-in-out infinite; }
.vinyl-disc.spinning rect:nth-child(2) { animation-delay: -0.15s; }
.vinyl-disc.spinning rect:nth-child(3) { animation-delay: -0.45s; }
.vinyl-disc.spinning rect:nth-child(4) { animation-delay: -0.3s; }
.vinyl-disc.spinning rect:nth-child(5) { animation-delay: -0.6s; }
.vinyl-disc.spinning rect:nth-child(6) { animation-delay: -0.75s; }
@keyframes rl-wave { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.45); } }
.reel-mute-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    color: var(--rl-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.reel-mute-badge .material-symbols-outlined { font-size: 14px; }
.reel-sound-btn.unmuted .reel-mute-badge { display: none; }

/* ============================================================
   6. Caption block and pills (bottom left)
   ============================================================ */
.reel-bottom-overlay {
    position: absolute;
    left: 16px;
    right: 84px;
    bottom: calc(var(--rl-nav-h) + var(--rl-safe-bottom) + 22px);
    z-index: 5;
    color: #fff;
}
.reel-meta-creator { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.reel-username {
    font: 600 0.9375rem/1.25 var(--font-family-body);
    color: #fff;
    text-decoration: none;
    text-shadow: var(--rl-text-shadow);
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.reel-verified { width: 17px; height: 17px; flex: 0 0 17px; fill: #1d9bf0; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3)); }
.reel-more-btn {
    margin-left: 2px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.18);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}
.reel-more-btn .material-symbols-outlined { font-size: 20px; }
.reel-title {
    margin: 0 0 4px;
    font: 800 1.0625rem/1.3 var(--font-family-body);
    color: #fff;
    letter-spacing: 0;
    text-shadow: var(--rl-text-shadow);
}
.reel-caption-wrap { margin-bottom: 12px; }
.reel-caption-text {
    margin: 0;
    font: 400 0.875rem/1.4 var(--font-family-body);
    color: rgba(255, 255, 255, 0.96);
    text-shadow: var(--rl-text-shadow);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.reel-caption-wrap.expanded .reel-caption-text { display: block; max-height: 32vh; overflow-y: auto; }
.reel-caption-more { border: 0; background: none; padding: 2px 0 0; color: #fff; font: 700 0.8125rem/1.2 var(--font-family-body); cursor: pointer; text-shadow: var(--rl-text-shadow); }

.reel-pills { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.reel-loc-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    height: 32px;
    padding: 0 14px 0 9px;
    border-radius: 999px;
    background: #fff;
    color: var(--rl-navy);
    font: 600 0.8125rem/1 var(--font-family-body);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.reel-loc-pill span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reel-loc-pill .material-symbols-outlined { font-size: 19px; color: #ef3b2d; }
.reel-explore-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 16px 0 6px;
    border-radius: 999px;
    background: #fff;
    color: var(--rl-navy);
    font: 700 0.96875rem/1 var(--font-family-body);
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.reel-explore-pill:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28); }
.reel-explore-pill:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.reel-explore-pill > .material-symbols-outlined { font-size: 21px; }
.reel-explore-ico {
    width: 33px;
    height: 33px;
    border-radius: 50%;
    background: var(--rl-orange-grad);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.reel-explore-ico .material-symbols-outlined { font-size: 21px; }

/* ============================================================
   7. Progress line (just above the bottom navigation)
   ============================================================ */
.reel-progress-track {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(var(--rl-nav-h) + var(--rl-safe-bottom) - 12px);
    height: 3px;
    background: rgba(255, 255, 255, 0.22);
    z-index: 4;
    cursor: pointer;
}
.reel-progress-fill { height: 100%; width: 0; background: var(--rl-orange); border-radius: 0 3px 3px 0; }

/* ============================================================
   8. Bottom navigation on the reels pages
   ============================================================ */
body.page-is-reels .bottom-nav { z-index: 60; }
body.page-is-reels .bottom-nav-fab { width: 60px; height: 60px; background: var(--rl-orange-grad); box-shadow: 0 0 0 5px var(--color-surface-container-lowest, #fff), 0 10px 22px rgba(236, 63, 11, 0.45); }
body.page-is-reels .bottom-nav-fab .material-symbols-outlined { font-size: 30px; }
body.page-is-reels .nav-item.active { color: var(--rl-orange-deep); }
body.page-is-reels .nav-item.active:not(.nav-item-post)::after { background: var(--rl-orange-deep); }
/* Reel feed: the raised Reels button is the active tab — orange label with the dot under it */
body.page-is-reels .bottom-nav .nav-item-post.active { color: var(--rl-orange-deep); }
body.page-is-reels .bottom-nav .nav-item-post.active .nav-label { font-weight: 700; }
body.page-is-reels .bottom-nav .nav-item-post.active::after {
    content: ''; position: absolute; bottom: 0; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--rl-orange-deep);
}
/* Empty page: the centre button only shows "+" (rule shared with the profile page: style.css) */

/* ============================================================
   9. Sound flash, toast, spinner, desktop hints
   ============================================================ */
.reels-sound-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 72px;
    height: 72px;
    margin: -36px 0 0 -36px;
    border-radius: 50%;
    background: rgba(13, 27, 62, 0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 80;
}
.reels-sound-indicator .material-symbols-outlined { font-size: 36px; }
.reels-sound-indicator.show { opacity: 1; transform: scale(1); }

#reelsGlobalToast {
    background: var(--rl-navy) !important;
    color: #fff !important;
    border-radius: 999px !important;
    font-family: var(--font-family-body) !important;
}

.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--rl-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.reels-desktop-shortcuts { display: none; }

/* ============================================================
   10. Empty state — "No Reels Yet"
   ============================================================ */
.reels-empty-page {
    position: relative;
    max-width: 540px;
    margin: 0 auto;
    padding: calc(var(--rl-safe-top) + 6px) 0 calc(var(--rl-nav-h) + var(--rl-safe-bottom) + 18px);
    overflow: hidden;
    text-align: center;
}
.reels-empty-head {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: start;
    gap: 8px;
    padding: 0 16px;
}
.reels-round-btn {
    width: 46px;
    height: 46px;
    margin-top: 8px;
    border-radius: 50%;
    background: #fff;
    color: var(--rl-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(13, 27, 62, 0.1);
    transition: transform 0.15s ease;
}
.reels-round-btn:hover { transform: translateY(-1px); }
.reels-round-btn .material-symbols-outlined { font-size: 25px; }
.reels-round-create { color: var(--rl-orange); }
.reels-round-create .material-symbols-outlined { font-size: 28px; }
.reels-empty-logo { display: flex; flex-direction: column; align-items: center; text-decoration: none; }
.reels-empty-logo img { width: 132px; height: auto; display: block; }
.reels-empty-logo span { margin-top: 2px; font: 500 0.6875rem/1.2 var(--font-family-body); color: var(--rl-navy); white-space: nowrap; }
.reels-empty-logo i, .reels-tagline i { font-style: normal; opacity: 0.6; margin: 0 3px; }

.reels-empty-art { position: relative; margin-top: -14px; z-index: 0; }
.reels-empty-head { position: relative; z-index: 1; }
.reels-empty-art > img:first-child { display: block; width: 100%; height: auto; }
.reels-leaf { position: absolute; pointer-events: none; height: auto; }
.reels-leaf-left { left: 0; top: 100%; width: 16%; }
.reels-leaf-right { right: 0; top: calc(100% * 0); width: 12.2%; }
.reels-empty-page > .reels-leaf-right { top: auto; bottom: 37%; }

.reels-empty-copy { position: relative; padding: 4px 24px 0; }
.reels-empty-title {
    margin: 4px 0 0;
    font: 500 2.125rem/1.15 'Plus Jakarta Sans', var(--font-family-body);
    color: var(--rl-navy);
    letter-spacing: -0.01em;
}
.reels-empty-title strong { font-weight: 800; }
.reels-empty-title::after { content: ''; display: block; width: 44px; height: 4px; margin: 12px auto 0; border-radius: 4px; background: var(--rl-orange); }
.reels-empty-sub { margin: 14px auto 0; max-width: 330px; font: 400 1.0625rem/1.45 var(--font-family-body); color: #3b4558; }
.reels-empty-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: min(100%, 300px);
    height: 56px;
    margin: 22px auto 0;
    border-radius: 999px;
    background: var(--rl-orange-grad);
    color: #fff;
    font: 700 1.125rem/1 var(--font-family-body);
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(236, 63, 11, 0.32);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.reels-empty-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(236, 63, 11, 0.4); color: #fff; }
.reels-empty-cta .material-symbols-outlined { font-size: 26px; }
.reels-empty-cta .material-symbols-outlined:last-child { font-size: 22px; }
.reels-empty-explore {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 46px;
    margin: 14px auto 0;
    padding: 0 22px 0 16px;
    border-radius: 999px;
    background: #fff;
    color: var(--rl-navy);
    font: 400 1rem/1 var(--font-family-body);
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(13, 27, 62, 0.08);
}
.reels-empty-explore b { font-weight: 700; }
.reels-empty-explore .material-symbols-outlined { font-size: 22px; }
.reels-empty-cta:focus-visible, .reels-empty-explore:focus-visible, .reels-round-btn:focus-visible { outline: 3px solid var(--rl-orange); outline-offset: 3px; }

.reels-empty-foot { margin-top: 18px; }
.reels-empty-foot img { display: block; width: 100%; height: auto; }
.reels-empty-foot p { margin: 2px 16px 0; font: 400 0.9375rem/1.4 var(--font-family-body); color: var(--rl-navy); }
.reels-empty-bars { display: inline-flex; gap: 6px; margin-top: 10px; }
.reels-empty-bars i { width: 20px; height: 4px; border-radius: 4px; background: var(--rl-orange); }
.reels-empty-bars i + i { background: #1a8a4a; }

/* ============================================================
   11. Comment sheet, share sheet, options menu, report form
   ============================================================ */
.reel-drawer-backdrop,
.reel-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 24, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.reel-drawer-backdrop.open, .reel-modal-backdrop.open { opacity: 1; pointer-events: auto; }

.reel-comment-drawer, .reel-share-modal, .reel-more-menu, .reel-report-modal {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 151;
    background: #fff;
    color: var(--rl-navy);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -12px 40px rgba(8, 12, 24, 0.25);
    transform: translateY(105%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding-bottom: var(--rl-safe-bottom);
}
.reel-comment-drawer.open, .reel-share-modal.open, .reel-more-menu.open, .reel-report-modal.open { transform: translateY(0); }
.reel-comment-drawer { height: 68vh; max-height: 640px; display: flex; flex-direction: column; }
.reel-report-modal { max-height: 86vh; overflow-y: auto; }

.drawer-drag-handle { width: 42px; height: 4px; margin: 10px auto 4px; border-radius: 4px; background: rgba(13, 27, 62, 0.18); }
.reel-drawer-header { padding: 6px 20px 12px; border-bottom: 1px solid rgba(13, 27, 62, 0.08); }
.drawer-title-row, .share-modal-header, .report-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.share-modal-header, .report-modal-header { padding: 4px 20px 12px; }
.drawer-title, .share-modal-header h4, .report-modal-header h4 { margin: 0; font: 700 1.0625rem/1.3 var(--font-family-body); color: var(--rl-navy); }
.drawer-close-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f4efe9;
    color: var(--rl-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 36px;
}
.drawer-close-btn .material-symbols-outlined { font-size: 20px; }

.reel-drawer-body { flex: 1; overflow-y: auto; padding: 12px 20px; color: #5b6577; }
.drawer-loader { display: flex; justify-content: center; padding: 32px 0; }
.drawer-loader .spinner, .reel-drawer-body .spinner { border-color: rgba(13, 27, 62, 0.12); border-top-color: var(--rl-orange); }
.comment-card { display: flex; gap: 12px; padding: 10px 0; }
.comment-avatar { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; object-fit: cover; background: #f4efe9; }
.comment-content { min-width: 0; }
.comment-author { font: 700 0.8125rem/1.3 var(--font-family-body); color: var(--rl-navy); }
.comment-body-text { margin: 2px 0 4px; font: 400 0.9375rem/1.45 var(--font-family-body); color: var(--rl-ink); word-wrap: break-word; }
.comment-meta-actions { display: flex; gap: 14px; align-items: center; font-size: 0.75rem; color: #8a93a6; }
.comment-reply-btn { border: 0; background: none; padding: 0; color: #8a93a6; font: 700 0.75rem/1 var(--font-family-body); cursor: pointer; }
.comment-reply-btn:hover { color: var(--rl-orange-deep); }

.reply-context-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px; background: #fff3ea; color: var(--rl-ink); font-size: 0.8125rem; }
.reply-cancel-btn { border: 0; background: none; color: var(--rl-ink); cursor: pointer; display: flex; }
.reel-drawer-footer { padding: 10px 16px 14px; border-top: 1px solid rgba(13, 27, 62, 0.08); }
.comment-input-form { display: flex; gap: 10px; align-items: center; }
.comment-input-field {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 18px;
    border: 1px solid rgba(13, 27, 62, 0.12);
    border-radius: 999px;
    background: #fbf7f2;
    color: var(--rl-navy);
    font: 400 0.9375rem/1 var(--font-family-body);
}
.comment-input-field:focus { outline: none; border-color: var(--rl-orange); box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.15); background: #fff; }
.comment-submit-btn { width: 46px; height: 46px; flex: 0 0 46px; border: 0; border-radius: 50%; background: var(--rl-orange-grad); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.comment-login-prompt a { display: block; }

.share-channels-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 6px 20px 14px; }
.share-channel-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 0; background: none; padding: 8px 0; cursor: pointer; color: var(--rl-navy); }
.channel-icon-wrap { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(13, 27, 62, 0.12); }
.channel-name { font: 600 0.8125rem/1.2 var(--font-family-body); }
.share-link-box { display: flex; gap: 8px; margin: 0 20px 20px; padding: 6px; border-radius: 999px; background: #fbf7f2; border: 1px solid rgba(13, 27, 62, 0.1); }
.share-url-field { flex: 1; min-width: 0; border: 0; background: none; padding: 0 12px; color: var(--rl-ink); font: 400 0.8125rem/1 var(--font-family-body); }
.share-url-field:focus { outline: none; }
.share-copy-btn { border: 0; border-radius: 999px; padding: 0 18px; height: 38px; background: var(--rl-navy); color: #fff; font: 700 0.8125rem/1 var(--font-family-body); cursor: pointer; }

.more-menu-items { display: flex; flex-direction: column; padding: 6px 12px 14px; }
.more-menu-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 12px; border: 0; border-radius: 14px; background: none; color: var(--rl-navy); font: 600 0.9375rem/1.3 var(--font-family-body); text-align: left; cursor: pointer; }
.more-menu-item:hover { background: #fbf4ec; }
.more-menu-item .material-symbols-outlined { font-size: 22px; }
.more-menu-item.cancel-btn { justify-content: center; margin-top: 6px; background: #f4efe9; color: var(--rl-ink); }

.report-form { padding: 0 20px 20px; }
.report-reasons-list { display: flex; flex-direction: column; gap: 6px; }
.report-reason-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #fbf7f2; color: var(--rl-ink); font: 500 0.9375rem/1.3 var(--font-family-body); cursor: pointer; }
.report-reason-item input { accent-color: var(--rl-orange-deep); width: 18px; height: 18px; }
.report-details-wrap { margin-top: 12px; }
.report-details-field { width: 100%; padding: 12px 14px; border: 1px solid rgba(13, 27, 62, 0.12); border-radius: 14px; background: #fff; color: var(--rl-navy); font: 400 0.9375rem/1.4 var(--font-family-body); resize: vertical; }
.report-submit-row { margin-top: 14px; }
.report-submit-row .btn-danger { width: 100%; height: 48px; border: 0; border-radius: 999px; background: #dc2626; color: #fff; font: 700 0.9375rem/1 var(--font-family-body); cursor: pointer; }

/* ============================================================
   12. Small phones
   ============================================================ */
@media (max-width: 359px) {
    .reels-brand .mgh-logo img { height: 42px; }
    .reels-tab { font-size: 0.96875rem; }
    .reel-bottom-overlay { right: 76px; }
    .reel-action-rail { gap: 10px; }
    .reel-action-btn svg { width: 34px; height: 34px; }
    .reels-empty-title { font-size: 1.875rem; }
}
@media (max-height: 640px) {
    .reel-caption-text { -webkit-line-clamp: 1; }
    .reel-action-rail { gap: 8px; }
    .reel-creator-avatar { width: 46px; height: 46px; }
}

/* ============================================================
   13. Tablet and desktop: brand header on top, 9:16 stage in the middle
   ============================================================ */
@media (min-width: 768px) {
    :root { --rl-nav-h: 0px; --rl-head-h: 104px; --reel-stage-width: min(460px, calc((100dvh - var(--rl-head-h) - 24px) * 9 / 16)); }

    body.reels-has-feed { background: var(--rl-cream); color: var(--rl-navy); }
    .reels-desktop-ambient {
        display: block;
        position: fixed;
        inset: 0;
        background:
            radial-gradient(60% 50% at 15% 20%, rgba(255, 138, 71, 0.18), transparent 70%),
            radial-gradient(50% 45% at 85% 80%, rgba(13, 27, 62, 0.10), transparent 70%),
            var(--rl-cream);
    }

    .reels-head {
        position: fixed;
        height: var(--rl-head-h);
        background: rgba(255, 249, 243, 0.94);
        border-bottom: 1px solid rgba(13, 27, 62, 0.06);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    .reels-brand.mgh-home { max-width: 1240px; margin: 0 auto; padding: 4px clamp(16px, 4vw, 40px) 0; }
    .reels-brand .mgh-logo img { height: 66px; filter: none; }
    .reels-tagline { position: absolute; margin: 0; top: 80px; text-shadow: none; }
    .reels-tabs {
        position: fixed;
        top: calc(var(--rl-head-h) + 26px);
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
        z-index: 41;
    }
    .reels-context-chip { position: fixed; top: calc(var(--rl-head-h) + 70px); left: 50%; transform: translateX(-50%); z-index: 41; }

    .reels-stage-wrapper {
        top: calc(var(--rl-head-h) + 12px);
        bottom: 12px;
        /* no transform here: it would make the fixed header and tabs inside position against the stage */
        left: calc(50% - var(--reel-stage-width) / 2);
        right: auto;
        width: var(--reel-stage-width);
        border-radius: 28px;
        overflow: hidden;
        box-shadow: 0 30px 70px rgba(13, 27, 62, 0.28);
        background: #000;
    }
    .reel-slide { height: 100%; }
    .reel-sound-badge { top: 82px; }
    .reel-progress-track { bottom: 0; }
    .reel-action-rail { bottom: 24px; }
    .reel-bottom-overlay { bottom: 26px; }

    .reels-desktop-shortcuts {
        display: flex;
        flex-direction: column;
        gap: 10px;
        position: fixed;
        left: calc(50% + var(--reel-stage-width) / 2 + 28px);
        bottom: 40px;
        color: #5b6577;
        font: 500 0.8125rem/1.3 var(--font-family-body);
    }
    .shortcut-item { display: flex; align-items: center; gap: 6px; }
    .kbd { min-width: 26px; padding: 3px 7px; border-radius: 7px; background: #fff; border: 1px solid rgba(13, 27, 62, 0.12); box-shadow: 0 2px 0 rgba(13, 27, 62, 0.08); text-align: center; font-weight: 700; color: var(--rl-navy); }

    .reel-comment-drawer, .reel-share-modal, .reel-more-menu, .reel-report-modal {
        left: 50%;
        right: auto;
        width: min(480px, 100vw);
        transform: translate(-50%, 105%);
    }
    .reel-comment-drawer.open, .reel-share-modal.open, .reel-more-menu.open, .reel-report-modal.open { transform: translate(-50%, 0); }

    .reels-empty-page { padding-top: 24px; padding-bottom: 48px; }
    .reels-empty-logo img { width: 170px; }
}
@media (min-width: 768px) and (max-height: 720px) {
    .reels-desktop-shortcuts { display: none; }
}

/* ============================================================
   14. Dark theme
   ============================================================ */
[data-theme="dark"] body.reels-is-empty { background: #0e1320; color: #f1f3f8; }
[data-theme="dark"] .reels-empty-title, [data-theme="dark"] .reels-empty-foot p, [data-theme="dark"] .reels-empty-logo span { color: #f1f3f8; }
[data-theme="dark"] .reels-empty-sub { color: #c3cad8; }
[data-theme="dark"] .reels-round-btn, [data-theme="dark"] .reels-empty-explore { background: #1a2131; color: #f1f3f8; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
[data-theme="dark"] .reels-round-create { color: #ff8a47; }
[data-theme="dark"] .reels-empty-logo img { background: #fff; border-radius: 14px; padding: 4px 8px; }
[data-theme="dark"] .reels-empty-foot img { opacity: 0.35; }
@media (min-width: 768px) {
    [data-theme="dark"] body.reels-has-feed, [data-theme="dark"] .reels-desktop-ambient { background: #0e1320; }
    [data-theme="dark"] .reels-head { background: rgba(14, 19, 32, 0.94); border-bottom-color: rgba(255, 255, 255, 0.08); }
    [data-theme="dark"] .reels-tagline { color: #c3cad8; }
    [data-theme="dark"] .reels-tab { color: #9aa3ba; text-shadow: none; }
    [data-theme="dark"] .reels-tab.active { color: #fff; }
    [data-theme="dark"] .reels-tab-sep { background: rgba(255, 255, 255, 0.3); }
    [data-theme="dark"] .reels-desktop-shortcuts { color: #9aa3ba; }
}
[data-theme="dark"] .reel-comment-drawer, [data-theme="dark"] .reel-share-modal, [data-theme="dark"] .reel-more-menu, [data-theme="dark"] .reel-report-modal { background: #151b2a; color: #f1f3f8; }
[data-theme="dark"] .drawer-title, [data-theme="dark"] .share-modal-header h4, [data-theme="dark"] .report-modal-header h4,
[data-theme="dark"] .comment-author, [data-theme="dark"] .more-menu-item, [data-theme="dark"] .share-channel-btn { color: #f1f3f8; }
[data-theme="dark"] .comment-body-text, [data-theme="dark"] .report-reason-item { color: #d5dae6; }
[data-theme="dark"] .drawer-close-btn, [data-theme="dark"] .more-menu-item.cancel-btn, [data-theme="dark"] .report-reason-item,
[data-theme="dark"] .share-link-box, [data-theme="dark"] .comment-input-field, [data-theme="dark"] .report-details-field { background: #1f2738; color: #f1f3f8; border-color: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .more-menu-item:hover { background: #1f2738; }
[data-theme="dark"] .drawer-drag-handle { background: rgba(255, 255, 255, 0.2); }

@media (prefers-reduced-motion: reduce) {
    .vinyl-disc.spinning rect, .reel-like-btn.liked svg, .reel-save-btn.saved svg { animation: none; }
    .reel-comment-drawer, .reel-share-modal, .reel-more-menu, .reel-report-modal { transition: none; }
}
