/* Bingo — Modals, Stories, Reels, Chat enhancements (O'zbek premium) */

/* FAB */
.fab-create {
  position: fixed;
  bottom: calc(var(--bottom-nav-float, 76px) + 14px + env(safe-area-inset-bottom, 0px));
  right: 16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gradient-atlas);
  color: #fff;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 769px) {
  .fab-create { bottom: 24px; right: calc(50% - 220px); }
}

/* Modal overlay — above reels player (2000) so comments/share work */
.bingo-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.bingo-modal {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bingo-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--color-border);
}

.bingo-modal-header h2 { font-size: 16px; font-weight: 700; margin: 0; }

.bingo-modal-close {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.bingo-modal-body { padding: 18px; overflow-y: auto; flex: 1; }

.bingo-field { margin-bottom: 14px; }
.bingo-field label { display: block; font-size: 13px; color: var(--color-text-secondary); margin-bottom: 6px; }
.bingo-field input, .bingo-field textarea, .bingo-field select {
  width: 100%; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--color-border); background: var(--color-bg-elevated);
  color: var(--color-text); font: inherit;
}
.bingo-field textarea { min-height: 80px; resize: vertical; }

.upload-preview {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-bg-elevated);
  border: 2px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 14px;
  position: relative;
}
.upload-preview img, .upload-preview video { width: 100%; height: 100%; object-fit: cover; }
.upload-preview-placeholder { text-align: center; color: var(--color-text-tertiary); font-size: 13px; padding: 20px; }

.tag-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag-chip {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  background: var(--color-accent-light); color: var(--color-accent);
  cursor: pointer; border: none;
}

/* Comments modal */
.comments-list { max-height: 320px; overflow-y: auto; margin-bottom: 12px; }
.comment-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.comment-item:last-child { border-bottom: none; }
.comment-body { flex: 1; }
.comment-author { font-weight: 600; font-size: 13px; }
.comment-text { font-size: 14px; margin-top: 2px; line-height: 1.4; }
.comment-time { font-size: 11px; color: var(--color-text-tertiary); margin-top: 4px; }
.comment-input-row { display: flex; gap: 8px; align-items: center; }
.comment-input-row input {
  flex: 1; padding: 10px 14px; border-radius: 999px;
  border: 1px solid var(--color-border); background: var(--color-bg-elevated); color: var(--color-text);
}
.emoji-bar { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.emoji-btn { background: var(--color-bg-elevated); border: none; border-radius: 8px; padding: 6px 8px; cursor: pointer; font-size: 18px; }

/* Story viewer */
.story-viewer {
  position: fixed; inset: 0; z-index: 2000; background: #000;
  display: flex; flex-direction: column;
}

body.story-viewer-open {
  overflow: hidden;
}

body.story-viewer-open .bottom-nav,
body.story-viewer-open #bottomNav.bottom-nav,
body.story-viewer-open .app-sidebar,
body.story-viewer-open #appSidebar,
body.story-viewer-open .mobile-top-bar,
body.story-viewer-open #mobileTopBar {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.story-viewer-download {
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.story-viewer-download:disabled {
  opacity: 0.45;
  cursor: wait;
}

.story-viewer-close {
  margin-left: 0;
}

.story-viewer-header:has(.story-viewer-download) .story-viewer-close {
  margin-left: 8px;
}

.story-viewer-header:not(:has(.story-viewer-download)) .story-viewer-close {
  margin-left: auto;
}
.story-viewer-progress { display: flex; gap: 4px; padding: 10px 12px 0; }
.story-viewer-bar {
  flex: 1; height: 3px; background: rgba(255,255,255,0.3); border-radius: 2px; overflow: hidden;
}
.story-viewer-bar-fill {
  height: 100%; background: #fff; width: 0%;
  transition: width linear;
}
.story-viewer-header {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: #fff;
}
.story-viewer-content {
  flex: 1; display: flex; align-items: center; justify-content: center; position: relative;
}
.story-viewer-media {
  width: 100%; max-width: 480px; height: 100%; max-height: 80vh;
  display: flex; align-items: center; justify-content: center;
}
.story-viewer-media img, .story-viewer-media video { max-width: 100%; max-height: 100%; object-fit: contain; }
.story-viewer-gradient { width: 100%; height: 100%; max-height: 80vh; border-radius: 12px; }
.story-viewer-caption {
  position: absolute; bottom: 40px; left: 16px; right: 16px;
  color: #fff; font-size: 16px; text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.story-tap-left, .story-tap-right {
  position: absolute; top: 80px; bottom: 0; width: 35%; z-index: 2;
}
.story-tap-left { left: 0; }
.story-tap-right { right: 0; }
.story-viewer-close {
  background: none; border: none; color: #fff; font-size: 24px; cursor: pointer;
  flex-shrink: 0;
}

/* StoryEngine — aqil skip / yo'l-yo'riq */
.story-engine .story-viewer-header { gap: 12px; }
.story-engine-skip {
  margin-left: auto;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.story-engine .story-viewer-close { margin-left: auto; }
.story-engine-skip ~ .story-viewer-close { margin-left: 0; }
.story-engine-slide {
  width: 100%;
  max-width: 420px;
  min-height: 55vh;
  max-height: 72vh;
  margin: 0 20px;
  border-radius: 20px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  text-align: left;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
}
.story-engine-eyebrow {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.85;
  margin-bottom: auto;
  letter-spacing: 0.02em;
}
.story-engine-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 12px;
}
.story-engine-stat {
  align-self: flex-start;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.story-engine-title {
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
}
.story-engine-body {
  font-size: 16px;
  line-height: 1.55;
  opacity: 0.92;
  margin: 0 0 20px;
}
.story-engine-cta {
  align-self: flex-start;
  background: #fff !important;
  color: var(--atlas-teal) !important;
  border: none;
  font-weight: 700;
}
.story-engine-bar-fill {
  height: 100%;
  background: #fff;
  width: 0%;
}
.story-guide-ring {
  background: var(--gradient-atlas) !important;
  animation: guidePulse 2s ease-in-out infinite;
}
.story-bubble-guide .story-bubble-name { color: var(--atlas-gold-light); font-weight: 600; }
@keyframes guidePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(20, 163, 168, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(20, 163, 168, 0); }
}

/* Reels player */
.reels-player {
  position: fixed; inset: 0; z-index: 2000; background: #000;
  overflow: hidden;
}
body.reels-open .bottom-nav { visibility: hidden; pointer-events: none; }
.reels-player-scroll {
  height: 100%; height: 100dvh; overflow-y: scroll; scroll-snap-type: y mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.reels-player-scroll::-webkit-scrollbar { display: none; }
.reel-slide {
  height: 100%; height: 100dvh; scroll-snap-align: start; position: relative;
  display: flex; align-items: center; justify-content: center;
  background: #000;
}
.reel-media-wrap {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #000;
}
.reel-slide video, .reel-slide .reel-fallback, .reel-slide .reel-media {
  width: 100%; height: 100%; object-fit: contain;
  background: #000;
}
.reel-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(transparent 55%, rgba(0,0,0,0.55));
  pointer-events: none;
}
.reel-slide-info {
  position: absolute;
  left: 12px; right: 72px;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  color: #fff; z-index: 2;
  text-shadow: 0 1px 4px rgba(0,0,0,.45);
  pointer-events: none;
}
.reel-slide-info a, .reel-slide-info button { pointer-events: auto; }
.reel-author-row {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}
.reel-avatar {
  width: 32px; height: 32px; border-radius: 50%; overflow: hidden;
  border: 1.5px solid #fff; flex-shrink: 0;
  background: rgba(255,255,255,.2);
  display: grid; place-items: center;
  color: #fff; font-size: 11px; font-weight: 700; text-decoration: none;
}
.reel-avatar img { width: 100%; height: 100%; object-fit: cover; }
.reel-user {
  color: #fff; text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 14px; font-weight: 600;
  min-width: 0; flex: 1;
  overflow: hidden;
}
.reel-username {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.reel-display-name {
  font-size: 13px;
  opacity: 0.88;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reel-music-marquee {
  position: absolute;
  left: 12px; right: 72px;
  bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 2;
  overflow: hidden;
  white-space: nowrap;
  color: #fff;
  font-size: 12px;
  opacity: 0.92;
  pointer-events: none;
}
.reel-music-marquee span {
  display: inline-block;
  animation: reelMusicScroll 12s linear infinite;
}
@keyframes reelMusicScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.reel-user .verified .icon-svg { width: 14px; height: 14px; }
.reel-follow {
  padding: 4px 10px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.9); background: transparent;
  color: #fff; font-size: 12px; font-weight: 650; cursor: pointer;
}
.reel-follow.is-following {
  border-color: rgba(255,255,255,.35); color: rgba(255,255,255,.75);
}
.reel-caption {
  margin: 8px 0 0; font-size: 14px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.reel-slide-actions {
  position: absolute; right: 8px;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: center; gap: 20px; z-index: 3;
}
.reel-action-btn {
  background: none; border: none; color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
  min-width: 44px; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.reel-action-btn .icon-svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.reel-action-btn span { line-height: 1.1; min-height: 14px; font-size: 12px; }
.reel-action-btn span:empty { display: none; }
.reel-send .icon-svg { width: 24px; height: 24px; }
.reel-more .icon-svg { width: 22px; height: 22px; }
.reel-audio-disc {
  width: 28px; height: 28px; border-radius: 6px; overflow: hidden;
  border: 2px solid #fff; background: #222;
  display: grid; place-items: center; font-size: 12px;
  animation: reelDiscSpin 4s linear infinite;
}
.reel-audio-disc img { width: 100%; height: 100%; object-fit: cover; }
@keyframes reelDiscSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.reels-player-close {
  position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); left: 10px; z-index: 2001;
  background: transparent; border: none; color: #fff; width: 40px; height: 40px;
  border-radius: 50%; cursor: pointer; font-size: 32px; line-height: 1;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.reel-like.is-liked { color: #ff3b5c; }
.reel-like.is-liked .icon-svg { fill: #ff3b5c; stroke: #ff3b5c; }

.reel-heart-burst {
  position: fixed; inset: 0; z-index: 2002; display: grid; place-items: center;
  pointer-events: none; color: #ff3b5c;
}
.reel-heart-burst .icon-svg { width: 96px; height: 96px; opacity: 0; transform: scale(.4); }
.reel-heart-burst.is-pop .icon-svg {
  animation: reelHeartPop .65s ease forwards;
}
@keyframes reelHeartPop {
  0% { opacity: 0; transform: scale(.35); }
  25% { opacity: 1; transform: scale(1.15); }
  55% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.2); }
}

.reel-action-sheet {
  position: fixed; inset: 0; z-index: 12000;
  display: flex; align-items: flex-end; justify-content: center;
}
.reel-action-sheet__backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.45);
}
.reel-action-sheet__panel {
  position: relative; width: min(440px, 100%);
  margin: 0 10px calc(10px + env(safe-area-inset-bottom));
  padding: 8px 10px 10px; border-radius: 18px;
  background: #f2f2f7; display: flex; flex-direction: column; gap: 2px;
}
.reel-action-sheet__handle {
  width: 36px; height: 4px; border-radius: 99px; background: rgba(0,0,0,.18);
  margin: 4px auto 10px;
}
.reel-action-sheet__panel button {
  appearance: none; border: 0; background: #fff; color: #007aff;
  font: inherit; font-size: 16px; padding: 14px 12px; border-radius: 12px;
  cursor: pointer; text-align: center;
}
.reel-action-sheet__panel button.is-danger { color: #ff3b30; font-weight: 600; }
.reel-action-sheet__panel button.is-cancel { color: #1d1d1f; font-weight: 650; margin-top: 6px; }

/* Story hold / viewers */
.story-viewer-content { position: relative; }
.story-tap-left, .story-tap-right {
  position: absolute; top: 0; bottom: 0; width: 35%; z-index: 3;
}
.story-tap-left { left: 0; }
.story-tap-right { right: 0; }
.story-viewer-hint {
  position: absolute;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255,255,255,.55);
  font-size: 12px;
  pointer-events: none;
}

.story-viewer-actions {
  position: absolute;
  right: 14px;
  bottom: calc(56px + env(safe-area-inset-bottom));
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.story-viewer-action {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,.35);
  color: #fff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.story-viewer-action .icon-svg { width: 24px; height: 24px; }
.story-viewer-action.is-liked { color: #ff2d55; }

.post-product-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 14px 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--color-bg-secondary, #f4f6f8);
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.75); font-size: 12px; font-weight: 600;
  letter-spacing: 0.02em; pointer-events: none; z-index: 4;
  text-shadow: 0 1px 4px rgba(0,0,0,0.45);
}
.story-viewer-views {
  display: inline-block; margin-left: 8px; padding: 2px 8px;
  border: 0; border-radius: 999px; background: rgba(255,255,255,0.18);
  color: #fff; font-size: 11px; font-weight: 600; cursor: pointer;
}
.story-viewers-sheet {
  position: fixed; inset: 0; z-index: 2100; display: flex; align-items: flex-end;
}
.story-viewers-sheet__backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.45);
}
.story-viewers-sheet__panel {
  position: relative; width: 100%; max-height: 70vh; overflow: auto;
  background: var(--color-bg-elevated, #fff); border-radius: 18px 18px 0 0;
  padding: 12px 16px 24px; color: var(--color-text, #111);
}
.story-viewers-sheet__handle {
  width: 36px; height: 4px; border-radius: 999px; background: rgba(0,0,0,0.18);
  margin: 4px auto 12px;
}
.story-viewers-sheet__panel h3 { margin: 0 0 12px; font-size: 16px; }
.story-viewers-sheet__close {
  width: 100%; margin-top: 12px; min-height: 44px; border-radius: 12px;
  border: 1px solid var(--color-border); background: transparent; font: inherit; font-weight: 600; cursor: pointer;
}
.story-viewers-sheet__body .follow-list-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.story-viewers-sheet__body .follow-list-row a {
  color: inherit; text-decoration: none; font-weight: 600;
}
.story-insights-tabs {
  display: flex; gap: 8px; margin-bottom: 12px;
}
.story-insights-tab {
  flex: 1; min-height: 36px; border: 0; border-radius: 999px;
  background: rgba(0,0,0,0.06); color: inherit; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.story-insights-tab.is-active {
  background: var(--color-primary, #0d7377); color: #fff;
}
.follow-list-row__sub {
  font-size: 12px; color: var(--color-text-muted, #666); margin-top: 2px;
}
.story-reply-row {
  padding: 10px 0; border-bottom: 1px solid var(--color-border);
}
.story-reply-row__text {
  margin: 6px 0 0 52px; font-size: 14px; line-height: 1.4; word-break: break-word;
}
.story-viewer-action {
  position: relative;
}
.story-viewer-action__count {
  display: block; font-size: 11px; font-weight: 700; margin-top: 2px; min-height: 14px;
}
.story-reply-bar {
  position: absolute; left: 12px; right: 12px; bottom: 72px; z-index: 6;
  display: flex; gap: 8px; align-items: center;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(8px);
  border-radius: 999px; padding: 6px 8px 6px 16px;
}
.story-reply-bar input {
  flex: 1; border: 0; background: transparent; color: #fff; font: inherit; font-size: 14px; outline: none;
}
.story-reply-bar input::placeholder { color: rgba(255,255,255,0.65); }
.story-reply-bar__send {
  border: 0; border-radius: 999px; padding: 8px 14px; min-height: 36px;
  background: var(--color-primary, #0d7377); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.story-reply-bar__send:disabled { opacity: 0.6; cursor: default; }

/* Feed For You / Following */
.feed-tabs {
  display: flex; gap: 0; padding: 0 12px; margin: 4px 0 8px;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  position: sticky; top: 0; z-index: 5;
  background: var(--color-bg, #fff);
}
.feed-tab {
  flex: 1; min-height: 44px; border: 0; background: transparent;
  font: inherit; font-size: 14px; font-weight: 650; color: var(--color-text-secondary, #6b7280);
  cursor: pointer; position: relative;
}
.feed-tab.is-active {
  color: var(--color-text, #111);
}
.feed-tab.is-active::after {
  content: ''; position: absolute; left: 18%; right: 18%; bottom: 0; height: 2px;
  background: var(--shell-accent, #0d9488); border-radius: 2px 2px 0 0;
}

/* Chat templates */
.chat-templates { display: flex; gap: 6px; padding: 8px 16px; overflow-x: auto; border-top: 1px solid var(--color-border); }
.chat-template-btn {
  white-space: nowrap; font-size: 12px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--color-border); background: var(--color-bg-elevated); color: var(--color-text-secondary);
  cursor: pointer;
}
.chat-bubble img { max-width: 200px; border-radius: 12px; margin-top: 4px; }

/* Profile extras — ig-profile owns cover layout */
.profile-cover:not(.ig-profile__cover) {
  height: 120px;
  background: var(--gradient-atlas);
  border-radius: 12px 12px 0 0;
  margin: -16px -16px 0;
  position: relative;
  overflow: hidden;
}
.ig-profile .profile-cover,
.ig-profile__cover.profile-cover {
  margin: 0 !important;
  height: 148px !important;
  min-height: 148px !important;
  max-height: 148px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
}
@media (min-width: 769px) {
  .ig-profile .profile-cover,
  .ig-profile__cover.profile-cover {
    height: 200px !important;
    min-height: 200px !important;
    max-height: 200px !important;
    border-radius: 18px !important;
  }
}
.ig-profile .profile-cover::after,
.ig-profile__cover::after {
  display: none !important;
}
.profile-cover:not(.ig-profile__cover)::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--pattern-atlas);
  opacity: 0.5;
}
.profile-role-block {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.profile-role-block h4 { margin: 0 0 10px; font-size: 14px; color: var(--color-gold); }

.post-media-click { cursor: pointer; position: relative; }
.post-double-tap-heart {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 88px;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.2);
}
.post-double-tap-heart.show {
  animation: postDoubleTapHeart 0.85s ease forwards;
}
@keyframes postDoubleTapHeart {
  0% { opacity: 0; transform: scale(0.2); }
  15% { opacity: 1; transform: scale(1.15); }
  30% { transform: scale(1); }
  80% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.05); }
}
.profile-grid-item { aspect-ratio: 1; cursor: pointer; overflow: hidden; }

.explore-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.explore-tab {
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--color-border); background: transparent; color: var(--color-text-secondary); cursor: pointer;
}
.explore-tab.active { background: var(--color-text); color: var(--color-bg); border-color: var(--color-text); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes likePop { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
.post-action.like-pop { animation: likePop 0.3s ease; }

/* Voice / video calls */
.chat-call-btn { font-size: 18px; line-height: 1; padding: 6px 8px !important; }
.bingo-call-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: stretch;
  justify-content: center;
}
.bingo-call-overlay[hidden] { display: none !important; }
.bingo-call-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(10,132,255,0.25), rgba(0,0,0,0.92));
}
.bingo-call-overlay__panel {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: max(16px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
  color: #fff;
}
.bingo-call-overlay__remote-video,
.bingo-call-overlay__local-video {
  position: absolute;
  object-fit: cover;
  background: #000;
}
.bingo-call-overlay__remote-video {
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.bingo-call-overlay__local-video {
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  width: 108px;
  height: 152px;
  border-radius: 16px;
  border: 2px solid rgba(255,255,255,0.25);
  z-index: 2;
}
.bingo-call-overlay__info {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-top: 48px;
}
.bingo-call-overlay__avatar {
  width: 112px;
  height: 112px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  background: rgba(255,255,255,0.12);
  border: 3px solid rgba(255,255,255,0.2);
}
.bingo-call-overlay__avatar img { width: 100%; height: 100%; object-fit: cover; }
.bingo-call-overlay__name { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.bingo-call-overlay__status { margin-top: 8px; font-size: 16px; opacity: 0.72; }
.bingo-call-overlay__controls {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 360px;
}
.bingo-call-btn {
  min-width: 58px;
  height: 58px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 0 18px;
}
.bingo-call-btn--accept { background: #30d158; color: #fff; min-width: 120px; }
.bingo-call-btn--reject { background: #ff453a; color: #fff; min-width: 120px; }

@media (max-width: 768px) {
  .messages-layout.chat-mobile-list .chat-window { display: none; }
  .messages-layout.chat-mobile-active .chat-list { display: none; }
  .messages-layout.chat-mobile-active .chat-window { display: flex; width: 100%; }
  .chat-back-btn { background: none; border: none; color: var(--color-text); font-size: 20px; margin-right: 8px; cursor: pointer; }
}

/* Media frames — original aspect in feed/posts, square cover in profile grid */
.media-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.media-frame--cover img,
.media-frame--cover video,
.media-frame--cover .post-gradient {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-frame--contain {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  min-height: 240px;
}
.media-frame__blur {
  position: absolute;
  inset: -18%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.media-frame__content {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.media-watermark {
  position: absolute;
  top: 4%;
  left: 50%;
  transform: translateX(-50%);
  width: 13%;
  height: auto;
  z-index: 2;
  pointer-events: none;
  filter: brightness(0) invert(1);
  opacity: 1;
}
.story-viewer-media--framed,
.story-viewer-media--framed .story-media-frame {
  width: 100%;
  max-width: 480px;
  height: 100%;
  max-height: 80vh;
}
.story-viewer-media--framed .media-frame--contain {
  width: 100%;
  height: 100%;
  max-height: 80vh;
}
.story-viewer-media--framed img,
.story-viewer-media--framed video {
  max-width: 100%;
  max-height: 80vh;
}

.bingo-perm-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 12000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--color-bg-elevated, #fff) 94%, transparent);
  border: 1px solid var(--color-border, rgba(0,0,0,.08));
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
}

.bingo-perm-banner__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--color-text-secondary, #666);
}

.bingo-perm-banner__text strong {
  font-size: 14px;
  color: var(--color-text, #111);
}

.bingo-perm-banner__actions {
  display: flex;
  flex-shrink: 0;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 520px) {
  .bingo-perm-banner {
    flex-direction: column;
    align-items: stretch;
  }
  .bingo-perm-banner__actions {
    justify-content: stretch;
  }
  .bingo-perm-banner__actions .btn {
    flex: 1;
  }
}
