/* Web-story viewer (public/assets/js/webshorts.js): full-screen vertical 9:16 stories. */
html.rgws-open { overflow: hidden; }
.rgws { position: fixed; inset: 0; z-index: 10040; display: none; align-items: center; justify-content: center; gap: 18px; background: #0b0f1a; color: #fff; font-family: Mukta, "Noto Sans Devanagari", sans-serif; }
.rgws.is-open { display: flex; animation: rgws-in .22s ease both; }
@keyframes rgws-in { from { opacity: 0; } to { opacity: 1; } }
.rgws__bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(38px) brightness(.45) saturate(1.2); transform: scale(1.05); }

.rgws__stage { position: relative; flex: none; height: min(100dvh, 940px); max-height: 100dvh; aspect-ratio: 9 / 16; max-width: 100vw; overflow: hidden; background: #000; border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); isolation: isolate; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.rgws__stage.is-swap { animation: rgws-swap .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes rgws-swap { from { opacity: .0; transform: scale(.97); } to { opacity: 1; transform: none; } }

.rgws__media { position: absolute; inset: 0; background: #000; }
.rgws__media img, .rgws__media video { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.rgws__media.is-ready img, .rgws__media.is-ready video { opacity: 1; }
.rgws__media img.is-tall, .rgws__media video { object-fit: cover; }
.rgws__media img.is-wide { object-fit: contain; z-index: 1; }
.rgws__media::before { content: ""; position: absolute; inset: 0; background: var(--bg) center / cover; filter: blur(26px) brightness(.55); transform: scale(1.15); }
.rgws__yt, .rgws__yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.rgws__shade { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(to bottom, rgba(0, 0, 0, .55) 0, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .86) 100%); }

.rgws__bars { position: absolute; z-index: 5; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; }
.rgws__bars i { position: relative; flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.rgws__bars b { position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left center; }

.rgws__top { position: absolute; z-index: 6; top: 20px; left: 10px; right: 10px; display: flex; align-items: center; gap: 6px; pointer-events: none; }
.rgws__top > * { pointer-events: auto; }
.rgws__brand img { display: block; height: 21px; width: auto; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6)); }
.rgws__spacer { flex: 1; pointer-events: none; }
.rgws__btn { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .35); color: #fff; cursor: pointer; backdrop-filter: blur(4px); transition: background .2s, transform .15s; }
.rgws__btn:hover { background: rgba(0, 0, 0, .6); }
.rgws__btn:active { transform: scale(.92); }
.rgws__btn[hidden] { display: none; }

.rgws__tap { position: absolute; z-index: 4; top: 70px; bottom: 120px; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rgws__tap--prev { left: 0; width: 32%; }
.rgws__tap--next { right: 0; width: 68%; }
.rgws__tap:focus-visible { outline: 3px solid #ffbf00; outline-offset: -3px; }

.rgws__text { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; max-height: 50%; overflow: hidden; padding: 16px 18px calc(22px + env(safe-area-inset-bottom)); pointer-events: none; }
.rgws__text[hidden] { display: none; }
.rgws__text h2 { margin: 0 0 8px; font: 800 26px/1.3 Mukta, sans-serif; text-shadow: 0 2px 10px rgba(0, 0, 0, .55); overflow-wrap: anywhere; }
.rgws__desc { margin: 0; font: 500 18px/1.55 Mukta, sans-serif; color: #f1f4fa; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); overflow-wrap: anywhere; }
.rgws__kicker { display: inline-block; margin-bottom: 10px; padding: 3px 10px; border-radius: 4px; background: #D44312; font: 700 12px/1.5 Mukta, sans-serif; letter-spacing: .06em; }
.rgws__by { margin: 0; font: 600 14px/1.4 Mukta, sans-serif; color: #d6dceb; }

.rgws__nav { position: relative; z-index: 2; flex: none; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer; backdrop-filter: blur(6px); transition: background .2s, transform .15s; }
.rgws__nav:hover { background: rgba(255, 255, 255, .3); }
.rgws__nav:active { transform: scale(.92); }
.rgws__btn:focus-visible, .rgws__nav:focus-visible { outline: 3px solid #ffbf00; outline-offset: 2px; }

.rgws.is-held .rgws__text { opacity: .96; }
.rgws__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rgws__toast { position: absolute; z-index: 8; left: 50%; bottom: 90px; transform: translate(-50%, 10px); padding: 8px 16px; border-radius: 999px; background: rgba(17, 24, 39, .92); color: #fff; font: 600 14px/1.3 Mukta, sans-serif; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.rgws__toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 767.98px) {
  .rgws { gap: 0; }
  .rgws__stage { width: 100vw; height: 100dvh; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
  .rgws__nav, .rgws__bg { display: none; }
  .rgws__text h2 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .rgws.is-open, .rgws__stage.is-swap { animation: none; } .rgws__media img, .rgws__media video { transition: none; } }

/* Bottom action bar (like / share / copy link), Instagram-story style */
.rgws__actions { position: absolute; z-index: 7; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; align-items: center; gap: 6px; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent); }
.rgws__act { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 64px; padding: 4px 8px; border: 0; background: none; color: #fff; cursor: pointer; font: 600 12px/1 Mukta, sans-serif; -webkit-tap-highlight-color: transparent; }
.rgws__act svg { width: 28px; height: 28px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6)); transition: transform .15s; }
.rgws__act:active svg { transform: scale(.85); }
.rgws__act:focus-visible { outline: 3px solid #ffbf00; outline-offset: 2px; border-radius: 8px; }
.rgws__act.pop svg { animation: rgws-pop .35s ease; }
@keyframes rgws-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
.rgws__text { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
.rgws__tap { bottom: 130px; }
.rgws__toast { bottom: 110px; }
/* The share button lives in the bottom bar only. */
.rgws__top [data-share] { display: none !important; }
@media (min-width: 768px) { .rgws__act b { display: none; } .rgws__actions { justify-content: flex-end; padding-right: 18px; } }
@media (prefers-reduced-motion: reduce) { .rgws__act.pop svg { animation: none; } }

/* Last slide: "swipe up to read the full story" (also a normal link for mouse users) */
.rgws__more { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 16px; border-radius: 999px; background: rgba(255, 255, 255, .95); color: #111; font: 800 15px/1.2 Mukta, sans-serif; text-decoration: none; pointer-events: auto; animation: rgws-nudge 1.6s ease-in-out infinite; }
.rgws__more span { font-size: 18px; line-height: 1; }
@keyframes rgws-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.rgws__text { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .rgws__more { animation: none; } }
