/* Reels — the full-screen clip feed (2026-11-06). Dark, one clip per screen, nothing else on it.
   The stage is a 9:16 column: the full width on a phone, a centred phone-shaped column on wider screens. */
@font-face { font-family: 'Abhaya Libre'; font-weight: 600; font-display: swap; src: url('/fonts/abhaya-libre-600-sinhala.woff2') format('woff2'); unicode-range: U+0D80-0DFF, U+200C-200D; }
@font-face { font-family: 'Abhaya Libre'; font-weight: 600; font-display: swap; src: url('/fonts/abhaya-libre-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
.rl-html, .rl-body { margin: 0; padding: 0; height: 100%; background: #000; color: #fff; }
.rl-body { font: 16px/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, 'Abhaya Libre', sans-serif; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
.rl-body.rl-sheet-open { overflow: hidden; }
button { font: inherit; color: inherit; }

/* top bar: back, wordmark, sound — the only chrome */
.rl-top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 10px; background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,0)); pointer-events: none; }
.rl-top > * { pointer-events: auto; }
.rl-top__back, .rl-top__mute { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(0,0,0,.35); color: #fff; text-decoration: none; backdrop-filter: blur(6px); }
.rl-top__mute svg { width: 24px; height: 24px; fill: currentColor; }
.rl-top__brand { color: #fff; text-decoration: none; text-align: center; line-height: 1; font-weight: 800; letter-spacing: .04em; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.rl-top__brand small { display: block; font-weight: 500; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; opacity: .85; margin-top: 3px; }

/* the feed: one slide per screen, snapping */
.rl-feed { height: 100vh; height: 100dvh; overflow-y: auto; overflow-x: hidden; scroll-snap-type: y mandatory; scrollbar-width: none; -ms-overflow-style: none; }
.rl-feed::-webkit-scrollbar { display: none; }
.rl-slide { height: 100vh; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; position: relative; display: flex; justify-content: center; background: #000; }
.rl-stage { position: relative; height: 100%; width: 100%; max-width: calc(100dvh * 9 / 16); overflow: hidden; background: #0a0a0f; }
@media (min-width: 700px) { .rl-stage { border-radius: 18px; margin: 0 auto; height: calc(100dvh - 24px); top: 12px; box-shadow: 0 0 0 1px rgba(255,255,255,.08); } .rl-slide { background: #050508; } }
.rl-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.rl-shade { position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,0) 55%, rgba(0,0,0,.72) 100%); pointer-events: none; }
.rl-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.18); }
.rl-progress span { display: block; height: 100%; width: 0; background: #fff; transition: width .25s linear; }

/* big pause glyph in the middle while paused; the heart burst on double tap */
.rl-big { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border: 0; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; display: flex; align-items: center; justify-content: center; }
.rl-big svg { width: 44px; height: 44px; fill: currentColor; margin-left: 4px; }
.rl-big[hidden], .rl-toast[hidden] { display: none; }
.rl-burst { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; opacity: 0; pointer-events: none; }
.rl-burst svg { width: 100%; height: 100%; fill: #ff3b6b; filter: drop-shadow(0 4px 16px rgba(0,0,0,.4)); }
.rl-burst.is-on { animation: rl-burst .9s ease-out forwards; }
@keyframes rl-burst { 0% { opacity: 0; transform: scale(.4); } 25% { opacity: 1; transform: scale(1.1); } 60% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.3) translateY(-30px); } }

/* "Tap for sound" pill, shown until sound is on */
.rl-pill { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 64px); left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .9rem; border: 0; border-radius: 999px; background: rgba(255,255,255,.92); color: #0a0b3c; font-weight: 700; font-size: .9rem; box-shadow: 0 4px 18px rgba(0,0,0,.35); }
.rl-pill svg { width: 20px; height: 20px; fill: currentColor; }

/* right rail: like, comments, share */
.rl-rail { position: absolute; right: 8px; bottom: calc(env(safe-area-inset-bottom, 0px) + 92px); display: flex; flex-direction: column; gap: 18px; align-items: center; z-index: 3; }
.rl-act { display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; padding: 4px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.rl-act svg { width: 34px; height: 34px; fill: #fff; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); transition: transform .15s; }
.rl-act:active svg { transform: scale(.88); }
.rl-act__n { font-size: .78rem; font-weight: 700; }
.rl-act--like.is-on svg { fill: #ff3b6b; animation: rl-pop .35s ease-out; }
@keyframes rl-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* title, caption, category — bottom left */
.rl-meta { position: absolute; left: 14px; right: 72px; bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); z-index: 2; text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.rl-meta__top { display: flex; align-items: center; gap: .6rem; margin-bottom: .45rem; font-size: .78rem; opacity: .95; }
.rl-chip { display: inline-block; padding: .2rem .6rem; border-radius: 999px; background: rgba(255,255,255,.18); backdrop-filter: blur(4px); font-weight: 700; }
.rl-title { margin: 0 0 .3rem; font-size: 1.15rem; line-height: 1.3; font-weight: 700; }
.rl-caption { margin: 0 0 .35rem; font-size: .95rem; line-height: 1.45; opacity: .95; }
.rl-caption__text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.is-expanded .rl-caption__text { display: block; -webkit-line-clamp: none; max-height: 40vh; overflow: auto; }
.rl-caption__more { border: 0; background: none; padding: 0; color: #cfd6ff; font-weight: 700; font-size: .9rem; }
.rl-by { margin: 0; font-size: .8rem; opacity: .8; }

/* end slide */
.rl-end { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; background: radial-gradient(circle at 50% 30%, #1d1f5e, #050508 70%); }
.rl-end h2 { margin: 0 0 .6rem; font-size: 1.5rem; }
.rl-end p { margin: 0 0 1.4rem; opacity: .85; max-width: 32ch; }
.rl-end__acts { display: flex; flex-direction: column; gap: .7rem; width: min(100%, 300px); }
.rl-btn { display: inline-block; padding: .8rem 1.2rem; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; background: rgba(255,255,255,.08); color: #fff; text-decoration: none; text-align: center; font-weight: 700; cursor: pointer; }
.rl-btn--primary { background: #fff; color: #0a0b3c; border-color: #fff; }

/* share pop-over (browsers without the share sheet) */
.rl-pop { position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 30px); transform: translateX(-50%); z-index: 6; display: flex; flex-direction: column; gap: .5rem; width: min(90%, 300px); padding: .8rem; border-radius: 16px; background: rgba(10,11,60,.96); box-shadow: 0 10px 40px rgba(0,0,0,.5); }

/* comments sheet */
.rl-sheet { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.rl-sheet[hidden] { display: none; }
.rl-sheet__panel { width: min(100%, 520px); max-height: 78vh; max-height: 78dvh; display: flex; flex-direction: column; background: #fff; color: #17233a; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); transform: translateY(24px); transition: transform .2s ease-out; }
.rl-sheet.is-open .rl-sheet__panel { transform: none; }
@media (min-width: 700px) { .rl-sheet { align-items: center; } .rl-sheet__panel { border-radius: 18px; max-height: 80vh; } }
.rl-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1rem .6rem; border-bottom: 1px solid #e9edf3; }
.rl-sheet__head h2 { margin: 0; font-size: 1.05rem; }
.rl-sheet__count { color: #6b7280; font-weight: 500; font-size: .9rem; }
.rl-sheet__close { border: 0; background: #eef2f8; width: 34px; height: 34px; border-radius: 50%; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.rl-sheet__list { flex: 1 1 auto; overflow-y: auto; padding: .6rem 1rem; min-height: 120px; }
.rl-c { padding: .55rem 0; border-bottom: 1px solid #f0f2f6; }
.rl-c:last-child { border-bottom: 0; }
.rl-c__head { display: flex; gap: .6rem; align-items: baseline; font-size: .88rem; }
.rl-c__pending { color: #8a5b00; background: #fff1d6; padding: .05rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.rl-c p { margin: .2rem 0 0; font-size: .95rem; line-height: 1.45; word-break: break-word; }
.rl-c--pending p { color: #4a5568; }
.rl-sheet__empty, .rl-sheet__loading { color: #6b7280; text-align: center; padding: 1.6rem 0; }
.rl-sheet__form { padding: .6rem 1rem .9rem; border-top: 1px solid #e9edf3; background: #fafbfd; }
.rl-sheet__name { width: 100%; box-sizing: border-box; border: 1px solid #d7dde8; border-radius: 10px; padding: .5rem .7rem; font: inherit; font-size: .9rem; margin-bottom: .5rem; }
.rl-sheet__row { display: flex; gap: .5rem; align-items: flex-end; }
.rl-sheet__text { flex: 1; min-height: 42px; max-height: 120px; resize: none; border: 1px solid #d7dde8; border-radius: 12px; padding: .6rem .8rem; font: inherit; font-size: 16px; }
.rl-sheet__send { border: 0; border-radius: 999px; padding: .7rem 1.1rem; background: #0214cf; color: #fff; font-weight: 700; cursor: pointer; }
.rl-sheet__send:disabled { opacity: .6; }
.rl-sheet__note { margin: .5rem 0 0; font-size: .74rem; color: #6b7280; line-height: 1.4; }
.rl-sheet__status { margin: .35rem 0 0; font-size: .86rem; color: #0b5c32; min-height: 1.2em; }
.rl-sheet__status:empty { display: none; }

.rl-toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); transform: translateX(-50%); z-index: 50; padding: .6rem 1rem; border-radius: 999px; background: rgba(255,255,255,.95); color: #0a0b3c; font-weight: 700; font-size: .9rem; box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.rl-nojs { padding: 90px 20px 40px; max-width: 600px; margin: 0 auto; }
.rl-nojs a { color: #cfd6ff; }
@media (prefers-reduced-motion: reduce) { .rl-feed { scroll-behavior: auto; } .rl-burst.is-on, .rl-act--like.is-on svg { animation: none; } .rl-sheet__panel { transition: none; } }
