/* reels.css — Jain Reels viewer, sheets and composer (/community/reels). */
.jrl { position: fixed; inset: 0; z-index: 1060; background: #0d0a0b; color: #fff; display: flex; flex-direction: column; }
body:has(.jrl) { overflow: hidden; }
.jrl-top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); background: linear-gradient(rgba(0,0,0,.55), transparent); }
.jrl-title { flex: 1; margin: 0; font-family: Georgia, serif; font-size: 20px; font-weight: 700; color: #fff; }
.jrl-title span { font-family: inherit; font-size: 13px; color: #e2c275; font-weight: 600; margin-left: 6px; }
.jrl-ico { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14);
  color: #fff; font-size: 18px; text-decoration: none; cursor: pointer; }
.jrl-create { border: 0; border-radius: 30px; padding: 9px 16px; font-weight: 800; color: #55101a; cursor: pointer;
  background: linear-gradient(180deg, #fff3cf, #e2c275); box-shadow: 0 4px 14px rgba(226,194,117,.35); }

.jrl-feed { flex: 1; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; outline: none; }
.jrl-feed::-webkit-scrollbar { display: none; }
.jrl-reel { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: grid; place-items: center; overflow: hidden; }
.jrl-frame { position: relative; height: 100%; width: min(100vw, calc(100svh * 9 / 16)); max-width: 520px; overflow: hidden; background: #000; }
@media (min-width: 700px) { .jrl-frame { height: calc(100% - 24px); border-radius: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.6); } }

/* photos: swipe sideways, blurred backdrop behind non-9:16 shots */
.jrl-slides { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.jrl-slides::-webkit-scrollbar { display: none; }
.jrl-slide { position: relative; flex: 0 0 100%; height: 100%; scroll-snap-align: center; overflow: hidden; background: #000; }
.jrl-slide__bg { position: absolute; inset: -20px; background-size: cover; background-position: center; filter: blur(22px) brightness(.55); transform: scale(1.1); }
.jrl-slide img { position: relative; width: 100%; height: 100%; max-width: none; object-fit: contain; display: block; background: transparent; }
.jrl-dots { position: absolute; top: 64px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; z-index: 3; }
.jrl-dots i { width: 22px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.4); }
.jrl-dots i.is-on { background: #fff; }

/* text-only reel */
.jrl-textcard { position: absolute; inset: 0; display: grid; place-items: center; padding: 34px; text-align: center; }
.jrl-textcard p { margin: 0; font-family: Georgia, "Noto Serif Devanagari", serif; font-size: clamp(26px, 7vw, 38px); line-height: 1.35; font-weight: 700; text-wrap: balance; }
.jrl-textcard::after { content: "❋"; position: absolute; bottom: 22%; left: 0; right: 0; text-align: center; opacity: .35; font-size: 26px; }

/* info overlay */
.jrl-info { position: absolute; left: 0; right: 70px; bottom: 0; z-index: 3; padding: 70px 16px 22px; padding-bottom: max(22px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0,0,0,.72)); pointer-events: none; }
.jrl-author { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; }
.jrl-av { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #7a1620; border: 2px solid #e2c275; font-size: 14px; }
.jrl-author small { font-weight: 500; color: rgba(255,255,255,.75); font-size: 12.5px; }
.jrl-caption { margin: 8px 0 0; font-size: 16px; line-height: 1.4; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.jrl-views { position: absolute; top: 64px; left: 14px; z-index: 3; font-size: 12.5px; font-weight: 700; background: rgba(0,0,0,.4);
  padding: 4px 10px; border-radius: 20px; }

/* right action rail */
.jrl-rail { position: absolute; right: 8px; bottom: 26px; bottom: max(26px, env(safe-area-inset-bottom)); z-index: 4; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.jrl-act { display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; color: #fff; cursor: pointer; font-size: 12px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.jrl-act span:first-child { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(0,0,0,.35); backdrop-filter: blur(6px); font-size: 22px; transition: transform .15s; }
.jrl-act:active span:first-child { transform: scale(.88); }
.jrl-act.is-on span:first-child { background: rgba(226,194,117,.35); box-shadow: 0 0 0 2px #e2c275; }
.jrl-picker { position: absolute; right: 64px; bottom: 0; display: flex; gap: 6px; padding: 6px 8px; border-radius: 30px; background: rgba(20,14,16,.92); box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.jrl-picker[hidden] { display: none; }
.jrl-picker button { border: 0; background: none; font-size: 26px; cursor: pointer; transition: transform .12s; padding: 2px 4px; }
.jrl-picker button:hover, .jrl-picker button.is-on { transform: scale(1.25); }
.jrl-burst { position: absolute; inset: 0; display: grid; place-items: center; font-size: 90px; pointer-events: none; z-index: 6; animation: jrl-pop .7s ease-out forwards; }
@keyframes jrl-pop { 0% { transform: scale(.4); opacity: 0; } 30% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }

.jrl-loading, .jrl-empty { height: 100%; display: grid; place-items: center; text-align: center; color: rgba(255,255,255,.8); padding: 24px; scroll-snap-align: start; }
.jrl-spin { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #e2c275; animation: jrl-rot 1s linear infinite; vertical-align: middle; margin-right: 8px; }
@keyframes jrl-rot { to { transform: rotate(360deg); } }
.jrl-hint { position: absolute; bottom: 90px; left: 0; right: 0; text-align: center; z-index: 5; font-weight: 700; animation: jrl-bob 1.6s ease-in-out infinite; pointer-events: none; }
.jrl-hint[hidden] { display: none; }
@keyframes jrl-bob { 50% { transform: translateY(-8px); } }

/* sheets */
.jrl-scrim { position: fixed; inset: 0; z-index: 1070; background: rgba(0,0,0,.5); }
.jrl-scrim[hidden], .jrl-sheet[hidden] { display: none; }
.jrl-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1080; max-height: 78svh; display: flex; flex-direction: column;
  background: #fff; color: #3b1d0b; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.35); animation: jrl-up .22s ease-out; }
.jrl-sheet--tall { max-height: 94svh; }
@media (min-width: 700px) { .jrl-sheet { left: 50%; right: auto; width: 520px; transform: translateX(-50%); } }
@keyframes jrl-up { from { transform: translateY(40px); opacity: .4; } }
@media (min-width: 700px) { @keyframes jrl-up { from { transform: translate(-50%, 40px); opacity: .4; } } }
.jrl-sheet__bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid #f0e6d0; }
.jrl-sheet__bar b { font-family: Georgia, serif; font-size: 18px; color: #7a1620; }
.jrl-sheet .jrl-ico { background: #f6eacb; color: #7a1620; width: 36px; height: 36px; font-size: 15px; }
.jrl-sheet__note { font-size: 12.5px; color: #7a6553; margin: 8px 0 0; }
.jrl-input { width: 100%; border: 1px solid #ecdcb4; border-radius: 14px; padding: 11px 14px; font-size: 15px; color: #3b1d0b; background: #fffdf8; outline: none; }
.jrl-input:focus { border-color: #b8860b; box-shadow: 0 0 0 3px rgba(184,134,11,.15); }
.jrl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.jrl-btn { width: 100%; border: 0; border-radius: 30px; padding: 13px; font-weight: 800; font-size: 16px; color: #fff; background: #7a1620; cursor: pointer; }
.jrl-btn:disabled { opacity: .6; }
.jrl-btn--danger { background: #b3261e; }

.jrl-clist { list-style: none; margin: 0; padding: 8px 16px; overflow-y: auto; flex: 1; min-height: 120px; }
.jrl-clist li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #f0e6d0; }
.jrl-clist .jrl-av { width: 32px; height: 32px; flex: none; color: #fff; }
.jrl-clist b { font-size: 13.5px; }
.jrl-clist small { color: #7a6553; margin-left: 6px; }
.jrl-clist p { margin: 2px 0 0; font-size: 14.5px; line-height: 1.4; }
.jrl-clist .jrl-cempty { display: block; text-align: center; color: #7a6553; border: 0; padding: 26px 0; }
.jrl-cform { padding: 10px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); border-top: 1px solid #f0e6d0; display: grid; gap: 8px; }
.jrl-crow { display: flex; gap: 8px; }
.jrl-send { flex: none; width: 46px; border: 0; border-radius: 50%; background: #7a1620; color: #fff; font-size: 17px; cursor: pointer; }

.jrl-share { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 18px 16px 8px; }
.jrl-share button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #3b1d0b; cursor: pointer; }
.jrl-share button span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; color: #fff; font-size: 24px; }
#jrlShare .jrl-sheet__note { padding: 0 16px 18px; }

.jrl-rform { padding: 10px 16px 18px; display: grid; gap: 8px; }
.jrl-radio { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid #f0e6d0; border-radius: 12px; font-size: 14.5px; cursor: pointer; }

.jrl-new { padding: 12px 16px 18px; overflow-y: auto; display: grid; gap: 12px; }
.jrl-tip { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; background: #fdf2df; border: 1px solid #ecdcb4; padding: 10px 12px; border-radius: 14px; }
.jrl-tip i { color: #b8860b; font-size: 18px; }
.jrl-pics { display: flex; gap: 10px; }
.jrl-pick, .jrl-thumb { position: relative; width: 92px; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; flex: none; }
.jrl-pick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed #e2c275; background: #fffaf0; color: #7a1620; font-weight: 800; font-size: 12.5px; cursor: pointer; }
.jrl-pick i { font-size: 24px; }
.jrl-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.jrl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.jrl-thumb button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; cursor: pointer; }
.jrl-thumb small { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: 10.5px; padding: 1px 6px; border-radius: 10px; }
.jrl-preview { display: grid; place-items: center; aspect-ratio: 9 / 16; max-height: 220px; margin: 0 auto; width: auto; border-radius: 16px; padding: 18px; text-align: center;
  font-family: Georgia, serif; font-weight: 700; font-size: 17px; line-height: 1.35; color: #fff4da; background: linear-gradient(135deg, #55101a, #9b2a1f); }
.jrl-preview[hidden], .jrl-bgs[hidden] { display: none; }
.jrl-bgs { display: flex; gap: 10px; justify-content: center; }
.jrl-bg { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #ecdcb4; cursor: pointer; }
.jrl-bg.is-on { box-shadow: 0 0 0 3px #b8860b; }
.jrl-capwrap { position: relative; }
.jrl-capwrap textarea { resize: none; padding-right: 60px; }
.jrl-count { position: absolute; right: 12px; bottom: 10px; font-size: 12px; color: #7a6553; font-weight: 700; }
.jrl-count.is-full { color: #b3261e; }

.jrl-toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 1100; background: #3b1d0b; color: #fff8ec;
  padding: 10px 18px; border-radius: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.3); max-width: 90vw; text-align: center; }
.jrl-toast[hidden] { display: none; }
.jrl-noscript { padding: 80px 20px; text-align: center; }

/* ── "Jain Reels" card on the Community hub (lines up with .jc-layout) ── */
.jrs { max-width: 1240px; margin: 22px auto 0; padding: 0 20px; }
.jrs__card { display: flex; gap: 22px; align-items: center; padding: 18px; border-radius: 20px; background: #fff;
  border: 1px solid #f0e2c4; box-shadow: 0 10px 30px rgba(85,16,26,.07); overflow: hidden; position: relative; }
.jrs__card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(#7a1620, #e2c275); }
.jrs__intro { flex: 0 0 270px; padding-left: 8px; }
.jrs__eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #b8860b; }
.jrs__intro h2 { margin: 0; font-family: Georgia, serif; font-size: 26px; line-height: 1.15; color: #7a1620; }
.jrs__lede { margin: 6px 0 14px; font-size: 14px; line-height: 1.5; color: #6b5444; }
.jrs__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.jrs a.jrs__btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 30px; font-weight: 800; font-size: 14px;
  text-decoration: none; color: #7a1620; background: #fdf3df; border: 1px solid #ecd9a8; }
.jrs a.jrs__btn:hover { color: #55101a; background: #f9e8c4; }
.jrs a.jrs__btn--main, .jrs a.jrs__btn--main:hover { color: #fff; background: linear-gradient(135deg, #7a1620, #a8322a); border-color: transparent; box-shadow: 0 6px 16px rgba(122,22,32,.25); }
.jrs__row { flex: 1; min-width: 0; display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.jrs a.jrs__item, .jrs a.jrs__item:hover { color: #fff; }
.jrs__item { flex: none; width: 104px; aspect-ratio: 9 / 16; position: relative; border-radius: 14px; overflow: hidden; scroll-snap-align: start;
  text-decoration: none; color: #fff; background: #2a1215; box-shadow: 0 6px 14px rgba(59,29,11,.16); transition: transform .15s; }
.jrs__item:hover { transform: translateY(-3px); }
.jrs__item img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.jrs__item .jrs__txt { position: absolute; left: 8px; right: 8px; top: 50%; transform: translateY(-50%); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; text-align: center; font-family: Georgia, serif; font-weight: 700; font-size: 13px; line-height: 1.3; }
.jrs__item .jrs__by { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 7px; font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.jrs__item .jrs__views { position: absolute; top: 6px; left: 6px; font-size: 10.5px; font-weight: 700; background: rgba(0,0,0,.45); padding: 1px 6px; border-radius: 10px; }
/* empty state: what a reel looks like */
.jrs a.jrs__ghost, .jrs a.jrs__ghost:hover { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px; text-align: center;
  color: #9a6b2f; background: repeating-linear-gradient(135deg, #fffaf0 0 10px, #fdf3df 10px 20px); border: 2px dashed #e2c275; box-shadow: none; font-size: 12px; font-weight: 700; }
.jrs__ghost i { font-size: 26px; color: #c99a3e; }
.jrs a.jrs__ghost--text, .jrs a.jrs__ghost--text:hover { color: #fff4da; background: linear-gradient(150deg, #55101a, #9b2a1f); border-style: solid; font-family: Georgia, serif; font-size: 13px; }
@media (max-width: 760px) {
  .jrs { padding: 0 14px; margin-top: 16px; }
  .jrs__card { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px 14px; }
  .jrs__intro { flex: none; padding-left: 4px; }
  .jrs__intro h2 { font-size: 22px; }
  .jrs__lede { margin-bottom: 12px; }
  .jrs__item { width: 96px; }
}
