/**
 * Phase 3 polish — VIP accent, stories viewer, article, share, chat rows.
 */

:root {
  --jf-accent: #c9a227;
}

/* VIP gold accent bar + badge */
.jf-vip__accent {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  width: 5px;
  height: 100%;
  background: var(--jf-accent);
  z-index: 2;
}
.jf-vip__badge {
  background: var(--jf-accent) !important;
  color: #fff !important;
}
.jf-vip__cta {
  background: var(--jf-accent) !important;
  color: #fff !important;
}

/* Stories add + avatar image */
.jf-story--add .jf-story__ring--dashed {
  background: var(--jf-card);
  border: 2px dashed var(--jf-border);
  box-shadow: none;
  padding: 0;
}
.jf-story--add {
  width: 72px;
}
.jf-story--add .jf-story__label {
  white-space: normal;
  line-height: 1.2;
  font-size: 10px;
  font-weight: 800;
  color: var(--jf-primary, #e3000f);
}
.jf-story--add .jf-story__avatar {
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--jf-primary);
  background: transparent;
}
.jf-story__avatar--img {
  background-size: cover !important;
  background-position: center !important;
  font-size: 0 !important;
}

body.jf-story-lock {
  overflow: hidden;
}

.jf-story-viewer {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  display: none;
  flex-direction: column;
  color: #fff;
  height: 100vh;
  height: 100dvh;
}
.jf-story-viewer.is-open {
  display: flex;
}
.jf-story-viewer__progress {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 4px;
  padding: 12px 14px 8px;
  padding-top: calc(12px + env(safe-area-inset-top));
}
.jf-story-progress__track {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
}
.jf-story-progress__fill {
  height: 100%;
  width: 0;
  background: #fff;
  border-radius: 2px;
}
/* Stage: full card shown contained; blurred duplicate fills side gaps. */
.jf-story-viewer__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.jf-story-viewer__blur {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: blur(28px) brightness(0.55);
  transform: scale(1.2);
}
.jf-story-viewer__wash {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 1;
}
.jf-story-viewer__bg {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 1;
  border-radius: 8px;
}
.jf-story-viewer__top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 12px;
}
.jf-story-viewer__av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  border: 2px solid rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
  font-size: 14px;
}
.jf-story-viewer__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.jf-story-viewer__meta strong {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jf-story-viewer__meta span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
}
.jf-story-viewer__live-pill {
  background: var(--jf-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}
.jf-story-viewer__close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
}
.jf-story-viewer__body {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  padding: 14px 20px calc(18px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.85);
}
.jf-story-viewer__body[hidden] {
  display: none;
}
.jf-story-viewer__body p {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.6;
}
.jf-story-viewer__body p:empty {
  margin: 0;
}
.jf-story-viewer__link {
  display: inline-flex;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-decoration: underline;
}
.jf-story-viewer__link--float {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  text-decoration: none;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 8px 16px;
  backdrop-filter: blur(6px);
}
.jf-story-viewer__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
}
.jf-story-viewer__nav--prev { inset-inline-end: 10px; }
.jf-story-viewer__nav--next { inset-inline-start: 10px; }

/* Add story sheet */
.jf-story-add {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.jf-story-add[hidden] { display: none !important; }
.jf-story-add__sheet {
  background: var(--jf-card);
  border-radius: 18px 18px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 20px 20px 32px;
}
.jf-story-add__handle {
  width: 40px;
  height: 4px;
  background: var(--jf-border);
  border-radius: 2px;
  margin: 0 auto 18px;
}
.jf-story-add__sheet h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 900;
}
.jf-story-add__hint {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--jf-muted);
}
.jf-story-add__gate {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  padding: 0.15rem 0 0.35rem;
}
.jf-story-add__gate[hidden] {
  display: none !important;
}
.jf-story-add__gate-msg {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--jf-primary, #e3000f) 28%, var(--jf-border, #d0d5dd));
  background: color-mix(in srgb, var(--jf-primary, #e3000f) 7%, var(--jf-bg, #f6f3f3));
  color: var(--jf-ink, #1a1a1a);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.55;
}
.jf-story-add__login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.01em;
}
.jf-story-add__login--pulse {
  animation: jf-story-login-pulse 1.35s ease-in-out 2;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--jf-primary, #e3000f) 45%, transparent);
}
@keyframes jf-story-login-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--jf-primary, #e3000f) 40%, transparent);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 8px color-mix(in srgb, var(--jf-primary, #e3000f) 0%, transparent);
    transform: scale(1.02);
  }
}
@media (prefers-reduced-motion: reduce) {
  .jf-story-add__login--pulse {
    animation: none;
    outline: 2px solid var(--jf-primary, #e3000f);
    outline-offset: 2px;
  }
}
.jf-story-add__gate-cancel {
  min-height: 40px;
}
.jf-story-add__form[hidden] {
  display: none !important;
}
.jf-story-add__sheet input,
.jf-story-add__sheet textarea {
  width: 100%;
  margin-bottom: 10px;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--jf-border);
  background: var(--jf-bg);
  font-family: var(--jf-font);
  font-size: 13px;
  color: var(--jf-text);
  resize: none;
  box-sizing: border-box;
}
.jf-story-add__upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.jf-story-add__pick {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0.35rem 0.85rem;
  border-radius: 10px;
  border: 1px dashed var(--jf-border, #d0d5dd);
  background: var(--jf-bg, #f6f3f3);
  color: var(--jf-ink, #1a1a1a);
  font-family: var(--jf-font);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}
.jf-story-add__pick-icon {
  font-size: 1.05rem;
}
.jf-story-add__clear {
  border: none;
  background: transparent;
  color: var(--jf-primary, #e3000f);
  font-family: var(--jf-font);
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
}
.jf-story-add__preview {
  margin: 0 0 0.75rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--jf-border);
  max-height: 180px;
  background: #111;
}
.jf-story-add__preview img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
}
.jf-story-add__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--jf-muted);
}
.jf-story-add__actions {
  display: flex;
  gap: 8px;
}

/* Native ad verified */
.jf-ad__biz {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.jf-ad__verified {
  color: var(--jf-primary);
  flex-shrink: 0;
}

/* Prayer next label */
.jf-prayer__cell {
  position: relative;
}
.jf-prayer__next-label {
  position: absolute;
  top: 4px;
  font-size: 8px;
  font-weight: 900;
  color: var(--jf-primary);
}

/* Chat message row polish */
.jf-chat-msg__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}
.jf-chat-msg__time {
  font-size: 11px;
  color: var(--jf-muted);
  flex-shrink: 0;
  margin: 0;
}

/* Article */
.jf-article__header {
  margin-bottom: 1rem;
}
.jf-article__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
}
.jf-article__title {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.4;
}
.jf-article__meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--jf-muted);
  font-weight: 600;
}
.jf-article__media {
  margin: 0 0 1rem;
  border-radius: var(--jf-radius-card);
  overflow: hidden;
}
.jf-article__media img {
  display: block;
  width: 100%;
  height: auto;
}
.jf-article__content {
  font-size: 1rem;
  line-height: 1.75;
}
.jf-article__content p {
  margin: 0 0 1rem;
}

/* Share */
.jf-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1rem;
}
.jf-share__label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--jf-muted);
  margin-inline-end: 0.25rem;
}
.jf-share__btn {
  font-family: var(--jf-font);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--jf-radius-pill);
  border: 1.5px solid var(--jf-border);
  background: var(--jf-card);
  color: var(--jf-text);
  padding: 0.3rem 0.75rem;
  text-decoration: none;
  cursor: pointer;
}
.jf-share__btn--wa {
  background: var(--jf-whatsapp);
  border-color: var(--jf-whatsapp);
  color: #fff;
}
.jf-share__btn--fb {
  background: #1877f2;
  border-color: #1877f2;
  color: #fff;
}

.jf-related {
  margin-top: 1.5rem;
}

.jf-pagination,
.navigation.pagination {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}

/* —— Step 1: Auth chrome (UI only; login URL unchanged) —— */
.jf-icon-btn--theme {
  color: var(--jf-muted);
}
.jf-icon-btn--theme:hover {
  color: var(--jf-primary);
  background: color-mix(in srgb, var(--jf-primary) 8%, transparent);
}
.jf-login-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.7rem 0.22rem 0.28rem;
  border-radius: var(--jf-radius-pill, 999px);
  border: 1.5px solid color-mix(in srgb, var(--jf-primary) 35%, var(--jf-border));
  background: var(--jf-card);
  color: var(--jf-primary);
  text-decoration: none;
  font-family: var(--jf-font);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.jf-login-chip:hover {
  border-color: var(--jf-primary);
  background: color-mix(in srgb, var(--jf-primary) 8%, var(--jf-card));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--jf-primary) 12%, transparent);
}
.jf-login-chip__av {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--jf-primary) 12%, var(--jf-bg));
  color: var(--jf-primary);
  flex-shrink: 0;
}
.jf-login-chip__label {
  padding-inline-end: 0.15rem;
}
.jf-account-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 9.5rem;
  padding: 0.2rem 0.55rem 0.2rem 0.25rem;
  border-radius: var(--jf-radius-pill, 999px);
  border: 1px solid var(--jf-border);
  background: var(--jf-card);
  color: var(--jf-text);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.jf-account-chip:hover {
  border-color: color-mix(in srgb, var(--jf-primary) 45%, var(--jf-border));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--jf-primary) 12%, transparent);
}
.jf-account-chip__av {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--jf-primary);
  color: var(--jf-primary-fg, #fff);
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}
.jf-account-chip__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}
.jf-account-chip__name {
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jf-account-chip__tier {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--jf-muted);
}

.jf-auth-card {
  width: 100%;
  max-width: 22rem;
  margin: 1.25rem auto 2rem;
  padding: 1.35rem 1.25rem 1.5rem;
  border-radius: var(--jf-radius, 14px);
  border: 1px solid var(--jf-border);
  background: var(--jf-card);
  box-shadow: 0 10px 28px color-mix(in srgb, #000 6%, transparent);
}
.jf-auth-card__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--jf-primary);
  text-transform: uppercase;
}
.jf-auth-card__title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.25;
  color: var(--jf-text);
}
.jf-auth-card__sub {
  margin: 0 0 1.1rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--jf-muted);
}
.jf-auth-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.jf-auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 1.5px solid var(--jf-border);
  background: var(--jf-bg);
  color: var(--jf-text);
  font-family: var(--jf-font);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.jf-auth-google:hover {
  border-color: #4285f4;
  background: color-mix(in srgb, #4285f4 6%, var(--jf-bg));
}
.jf-auth-google__g {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--jf-border);
  color: #4285f4;
  font-size: 0.85rem;
  font-weight: 900;
}
.jf-auth-social {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.jf-auth-social__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-family: var(--jf-font);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  transition: filter 0.15s ease, background 0.15s ease;
}
.jf-auth-social__btn--google {
  border: 1.5px solid #dadce0;
  background: #fff;
  color: #3c4043;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12);
}
.jf-auth-social__btn--google:hover {
  border-color: #4285f4;
  background: #fff;
  box-shadow: 0 1px 3px rgba(66, 133, 244, 0.28);
}
.jf-auth-social__btn--facebook {
  border: 1.5px solid #1877f2;
  background: #1877f2;
  color: #fff;
}
.jf-auth-social__btn--facebook:hover {
  filter: brightness(1.05);
  background: #166fe5;
}
.jf-auth-social__mark {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  line-height: 1;
  flex-shrink: 0;
}
.jf-auth-social__icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}
.jf-auth-social__btn--google .jf-auth-social__mark {
  background: #fff;
  border: 1px solid #e8eaed;
  box-shadow: 0 0 0 1px rgba(66, 133, 244, 0.08);
}
.jf-auth-social__btn--facebook .jf-auth-social__mark {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.jf-auth-divider {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 1rem 0 0.85rem;
  color: var(--jf-muted);
  font-size: 0.72rem;
  font-weight: 700;
}
.jf-auth-divider::before,
.jf-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--jf-border);
}
.jf-auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.jf-auth-label {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--jf-muted);
}
.jf-auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1.5px solid var(--jf-border);
  background: var(--jf-bg);
  font-family: var(--jf-font);
  font-size: 0.9rem;
  color: var(--jf-text);
  outline: none;
}
.jf-auth-input:focus {
  border-color: var(--jf-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--jf-primary) 18%, transparent);
}
.jf-auth-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.45rem 0 0.65rem;
  font-size: 0.78rem;
  color: var(--jf-muted);
  cursor: pointer;
}
.jf-auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  margin-top: 0.15rem;
}
.jf-auth-submit .jf-auth-social__mark {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  border: none;
  box-shadow: none;
}
.jf-auth-error {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--jf-primary);
  text-align: center;
  line-height: 1.4;
}
.jf-auth-links {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.9rem;
  font-size: 0.75rem;
  font-weight: 700;
}
.jf-auth-links a {
  color: var(--jf-primary);
  text-decoration: none;
}
.jf-auth-roles {
  list-style: none;
  margin: 1.15rem 0 0;
  padding: 0.85rem 0.9rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--jf-primary) 5%, var(--jf-bg));
  border: 1px dashed color-mix(in srgb, var(--jf-primary) 25%, var(--jf-border));
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--jf-muted);
}
.jf-auth-roles li + li {
  margin-top: 0.35rem;
}
.jf-auth-roles strong {
  color: var(--jf-text);
}
