/* ════════════════════════════════════════
   explore-reels.css — اکسپلور + ریلز + پست‌ویوئر + ساخت پست
   ════════════════════════════════════════ */

/* ───── badge روی گرید پروفایل ───── */
.ig-profile__grid-item { position: relative; }
.ig-profile__grid-badge {
  position: absolute; top: 6px; left: 6px; color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); display: flex;
}
.ig-profile__grid--reels .ig-profile__grid-item { aspect-ratio: 9/16; }

/* ───── EXPLORE ───── */
.xr-explore { flex: 1 1 auto; width: 100%; min-width: 0; height: 100%; overflow-y: auto; direction: rtl; font-family: Vazir, sans-serif; -webkit-overflow-scrolling: touch; }
.xr-explore__head { position: sticky; top: 0; z-index: 5; padding: 14px 16px 10px;
  background: var(--bg-main, #0f1117); backdrop-filter: blur(12px); }
.xr-explore__title { font-size: 22px; font-weight: 800; color: var(--text-primary, #f1f5f9); margin-bottom: 10px; }
.xr-create-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--primary, #6366f1); color: #fff;
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.xr-chips { display: flex; gap: 8px; }
.xr-chip { padding: 7px 16px; border-radius: 20px; border: none; cursor: pointer;
  background: rgba(255,255,255,.07); color: var(--text-muted, #94a3b8); font-size: 13px; font-weight: 700;
  font-family: inherit; transition: .15s; }
.xr-chip--on { background: var(--primary, #6366f1); color: #fff; }

.xr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; }
.xr-cell { position: relative; aspect-ratio: 1; overflow: hidden; cursor: pointer; background: #1a1f2e; }
.xr-cell--big { grid-column: span 2; grid-row: span 2; }
.xr-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xr-cell__badge { position: absolute; top: 8px; left: 8px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
.xr-loader { text-align: center; padding: 20px; color: var(--text-muted, #94a3b8); font-size: 13px; }
.xr-loader--dark { color: rgba(255,255,255,.6); }
.xr-empty { text-align: center; padding: 50px 20px; color: var(--text-muted, #94a3b8); }
.xr-empty--dark { color: rgba(255,255,255,.7); }

/* ───── REELS feed (تب و overlay) ───── */
.xr-reels { flex: 1 1 auto; width: 100%; min-width: 0; height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory; background: #000;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.xr-reels::-webkit-scrollbar { display: none; }
.xr-reel { position: relative; height: 100%; width: 100%; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; align-items: center; justify-content: center; background: #000; overflow: hidden; }
.xr-reel__video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.xr-reel__overlay { position: absolute; inset: 0; direction: rtl; font-family: Vazir, sans-serif;
  pointer-events: none; }
.xr-reel__overlay > * { pointer-events: auto; }
.xr-reel__side { position: absolute; left: 12px; bottom: 90px; display: flex; flex-direction: column; gap: 20px; }
.xr-reel__act { background: none; border: none; color: #fff; cursor: pointer; display: flex;
  flex-direction: column; align-items: center; gap: 4px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
.xr-reel__cnt { font-size: 12px; font-weight: 700; }
.xr-reel__meta { position: absolute; right: 14px; bottom: 90px; left: 80px; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.xr-reel__author { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.xr-reel__author img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; }
.xr-reel__author b { font-size: 15px; }
.xr-reel__caption { font-size: 14px; line-height: 1.5; max-height: 4.5em; overflow: hidden; }
.xr-reel__mute { position: absolute; top: 16px; left: 16px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,.4); border: none; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* ───── overlays ───── */
.xr-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center; direction: rtl; font-family: Vazir, sans-serif; }
.xr-overlay--reels { background: #000; }
.xr-overlay--reels .xr-reels { max-width: 480px; margin: 0 auto; }
.xr-overlay__close { position: absolute; top: 16px; right: 16px; z-index: 5; width: 42px; height: 42px;
  border-radius: 50%; background: rgba(0,0,0,.5); border: none; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* post viewer */
.xr-post { width: min(500px, 96vw); max-height: 92vh; background: var(--bg-secondary, #1a1f2e);
  border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.xr-post__top { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; }
.xr-post__author { display: flex; align-items: center; gap: 10px; color: var(--text-primary, #f1f5f9); }
.xr-post__author img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.xr-post__close { background: none; border: none; color: var(--text-primary, #f1f5f9); cursor: pointer; }
.xr-post__mediawrap { background: #000; display: flex; align-items: center; justify-content: center; max-height: 60vh; }
.xr-post__media { width: 100%; max-height: 60vh; object-fit: contain; }
.xr-post__actions { display: flex; gap: 18px; padding: 12px 14px; color: var(--text-primary, #f1f5f9); }
.xr-post__actions button { background: none; border: none; color: inherit; cursor: pointer; display: flex; align-items: center; gap: 5px; }
.xr-post__caption { padding: 0 14px 16px; color: var(--text-primary, #f1f5f9); font-size: 14px; line-height: 1.6; }
.xr-post__caption b { margin-left: 6px; }

/* comments sheet */
.xr-overlay--sheet { align-items: flex-end; }
.xr-sheet { width: 100%; max-width: 520px; margin: 0 auto; background: var(--bg-secondary, #1a1f2e);
  border-radius: 18px 18px 0 0; max-height: 75vh; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
.xr-sheet__handle { width: 40px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.2); margin: 10px auto; }
.xr-sheet__title { text-align: center; font-weight: 700; color: var(--text-primary, #f1f5f9); padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.07); }
.xr-sheet__list { flex: 1; overflow-y: auto; padding: 12px 16px; min-height: 120px; }
.xr-cmt { display: flex; gap: 10px; margin-bottom: 14px; }
.xr-cmt img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.xr-cmt b { color: var(--text-primary, #f1f5f9); font-size: 13px; }
.xr-cmt p { color: var(--text-muted, #cbd5e1); font-size: 14px; margin: 2px 0 0; }
.xr-sheet__compose { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid rgba(255,255,255,.07); }
.xr-sheet__compose input { flex: 1; background: rgba(255,255,255,.06); border: none; border-radius: 20px;
  padding: 10px 16px; color: var(--text-primary, #f1f5f9); font-family: inherit; outline: none; }
.xr-sheet__compose button { background: var(--primary, #6366f1); border: none; color: #fff; border-radius: 20px; padding: 0 18px; cursor: pointer; font-family: inherit; font-weight: 700; }

/* composer */
.xr-overlay--compose { background: var(--bg-main, #0f1117); align-items: stretch; }
.xr-compose { width: min(560px, 100vw); margin: 0 auto; display: flex; flex-direction: column; height: 100%; }
.xr-compose__top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.xr-compose__top b { color: var(--text-primary, #f1f5f9); font-size: 16px; }
.xr-compose__back { background: none; border: none; color: var(--text-primary, #f1f5f9); cursor: pointer; }
.xr-compose__submit { background: var(--primary, #6366f1); border: none; color: #fff; border-radius: 18px; padding: 8px 18px; cursor: pointer; font-weight: 700; font-family: inherit; }
.xr-compose__drop { flex: 1; min-height: 220px; max-height: 55vh; margin: 14px 16px; border-radius: 14px;
  border: 2px dashed rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; background: #000; }
.xr-compose__placeholder { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-muted, #94a3b8); }
.xr-compose__preview { display: none; width: 100%; height: 100%; align-items: center; justify-content: center; }
.xr-compose__preview img, .xr-compose__preview video { max-width: 100%; max-height: 100%; object-fit: contain; }
.xr-compose__caption { margin: 0 16px; background: rgba(255,255,255,.05); border: none; border-radius: 12px;
  padding: 12px 14px; color: var(--text-primary, #f1f5f9); font-family: inherit; resize: none; min-height: 70px; outline: none; }
.xr-compose__priv { padding: 14px 16px; color: var(--text-muted, #cbd5e1); font-size: 13px; }
.xr-compose__priv input { margin-left: 6px; }

/* toast */
.xr-toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,.85); color: #fff; padding: 10px 20px; border-radius: 22px; z-index: 10001;
  font-family: Vazir, sans-serif; font-size: 14px; opacity: 0; transition: .3s; pointer-events: none; }
.xr-toast--on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* FAB ساخت پست */
.xr-fab { position: fixed; left: 18px; bottom: 84px; width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary, #6366f1); color: #fff; border: none; cursor: pointer; z-index: 60;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(99,102,241,.45);
  transition: transform .15s; }
.xr-fab:hover { transform: scale(1.06); }

/* منوی مرکزی ساخت (+) */
.xr-sheet--create { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.xr-create-list { display: flex; flex-direction: column; padding: 8px 8px 4px; }
.xr-create-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: none;
  border: none; cursor: pointer; border-radius: 12px; color: var(--text-primary, #f1f5f9);
  font-family: inherit; text-align: right; transition: background .15s; }
.xr-create-row:hover { background: rgba(255,255,255,.06); }
.xr-create-ic { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; display: flex;
  align-items: center; justify-content: center; background: rgba(99,102,241,.15); color: var(--primary, #818cf8); }
.xr-create-txt { display: flex; flex-direction: column; gap: 2px; }
.xr-create-txt b { font-size: 15px; font-weight: 700; }
.xr-create-txt i { font-size: 12px; color: var(--text-muted, #94a3b8); font-style: normal; }

/* انتخاب کاور ریلز */
.xr-cover { margin: 0 16px 6px; }
.xr-cover__label { font-size: 12px; color: var(--text-muted, #94a3b8); margin-bottom: 6px; }
.xr-cover input[type=range] { width: 100%; accent-color: var(--primary, #6366f1); }
.xr-compose__meta { padding: 4px 16px 0; text-align: left; color: var(--text-muted, #94a3b8); font-size: 11px; }
.xr-compose__submit:disabled { opacity: .45; cursor: default; }

/* ───── HOME FEED (خانه) ───── */
.xr-home { flex: 1 1 auto; width: 100%; min-width: 0; height: 100%; overflow-y: auto; direction: rtl; font-family: inherit; background: transparent; -webkit-overflow-scrolling: touch; }
.xr-home__head { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; justify-content: flex-start;
  padding: 14px 18px; background: transparent; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--glass-border, rgba(255,255,255,.08)); }
.xr-home__logo { font-size: 18px; font-weight: 800; color: var(--text-primary, #f1f5f9); letter-spacing: .3px; }
.xr-storybar { display: flex; gap: 14px; overflow-x: auto; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.06);
  scrollbar-width: none; }
.xr-storybar::-webkit-scrollbar { display: none; }
.xr-story { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; flex-shrink: 0; width: 66px; }
.xr-story__ring { width: 62px; height: 62px; border-radius: 50%; padding: 2px;
  background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); display: flex; align-items: center; justify-content: center; }
.xr-story--seen .xr-story__ring { background: rgba(255,255,255,.2); }
.xr-story__ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg-main, #0f1117); }
.xr-story__ring--add { background: rgba(255,255,255,.08); color: var(--text-primary, #f1f5f9); }
.xr-story span { font-size: 11px; color: var(--text-muted, #cbd5e1); max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.xr-feed { max-width: 520px; margin: 0 auto; }
.xr-card { border-bottom: 1px solid rgba(255,255,255,.06); padding-bottom: 8px; margin-bottom: 6px; }
.xr-card__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; }
.xr-card__author { display: flex; align-items: center; gap: 10px; color: var(--text-primary, #f1f5f9); }
.xr-card__author img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.xr-card__author b { font-size: 14px; }
.xr-card__mediawrap { position: relative; background: #000; display: flex; align-items: center; justify-content: center; max-height: 70vh; overflow: hidden; }
.xr-card__media { width: 100%; max-height: 70vh; object-fit: contain; display: block; }
.xr-card__actions { display: flex; gap: 16px; padding: 10px 14px 4px; color: var(--text-primary, #f1f5f9); }
.xr-card__actions button { background: none; border: none; color: inherit; cursor: pointer; display: flex; padding: 0; }
.xr-card__actions .xr-save { margin-right: auto; }
.xr-save--on svg, .xr-like--on svg { fill: currentColor; }
.xr-card__likes { padding: 0 14px; font-size: 14px; font-weight: 700; color: var(--text-primary, #f1f5f9); }
.xr-card__caption { padding: 4px 14px 0; font-size: 14px; line-height: 1.6; color: var(--text-primary, #f1f5f9); }
.xr-card__caption b { margin-left: 6px; }
.xr-card__cmts { padding: 4px 14px 0; font-size: 13px; color: var(--text-muted, #94a3b8); cursor: pointer; }
.xr-card__time { padding: 4px 14px 0; font-size: 11px; color: var(--text-muted, #64748b); }
.xr-bigheart { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none;
  animation: xrPop .8s ease; }
.xr-bigheart svg { width: 90px; height: 90px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.4)); }
@keyframes xrPop { 0%{transform:scale(0);opacity:0} 15%{transform:scale(1.2);opacity:1} 30%{transform:scale(1)} 70%{opacity:1} 100%{transform:scale(1.1);opacity:0} }

/* ───── کاروسل ───── */
.xr-carousel { position: relative; width: 100%; }
.xr-carousel__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.xr-carousel__track::-webkit-scrollbar { display: none; }
.xr-carousel__slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; background: #000; }
.xr-carousel__count { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.6); color: #fff;
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 14px; }
.xr-carousel__dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.xr-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.45); transition: .2s; }
.xr-dot--on { background: var(--primary, #6366f1); transform: scale(1.25); }
/* پیش‌نمایش کاروسل در کامپوزر */
.xr-cprev { display: flex; gap: 6px; overflow-x: auto; width: 100%; padding: 4px; }
.xr-cprev img, .xr-cprev video { height: 100%; max-height: 48vh; border-radius: 8px; object-fit: cover; }

/* ───── کامنت تودرتو + لایک ───── */
.xr-cmt { position: relative; align-items: flex-start; }
.xr-cmt__body { flex: 1; }
.xr-cmt__meta { display: flex; gap: 14px; margin-top: 3px; }
.xr-cmt__reply, .xr-cmt__likes { font-size: 11px; color: var(--text-muted, #94a3b8); cursor: pointer; font-weight: 600; }
.xr-cmt__replies { margin-top: 10px; padding-right: 12px; border-right: 1px solid rgba(255,255,255,.06); display: flex; flex-direction: column; gap: 12px; }
.xr-cmt--reply img { width: 26px; height: 26px; }
.xr-cmt__like { background: none; border: none; color: var(--text-muted, #94a3b8); cursor: pointer; padding: 2px; flex-shrink: 0; }
.xr-cmt__like svg { width: 16px; height: 16px; }
.xr-cmt__like--on { color: #ff3040; }

/* ───── جستجو ───── */
.xr-search { flex: 1; }
.xr-search input { width: 100%; background: rgba(255,255,255,.07); border: none; border-radius: 12px;
  padding: 10px 14px; color: var(--text-primary, #f1f5f9); font-family: inherit; outline: none; font-size: 14px; }
.xr-search-results { margin-top: 10px; }
.xr-srow { display: flex; align-items: center; gap: 12px; padding: 8px 4px; cursor: pointer; border-radius: 10px; }
.xr-srow:hover { background: rgba(255,255,255,.05); }
.xr-srow img, .xr-srow__hash { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.xr-srow__hash { background: rgba(99,102,241,.15); color: var(--primary,#818cf8); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; }
.xr-srow__t { display: flex; flex-direction: column; }
.xr-srow__t b { font-size: 14px; color: var(--text-primary, #f1f5f9); }
.xr-srow__t i { font-size: 12px; color: var(--text-muted, #94a3b8); font-style: normal; }

/* ───── لیست کاربر (followers/following/requests) ───── */
.xr-urow { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; }
.xr-urow img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.xr-urow__t { flex: 1; display: flex; flex-direction: column; }
.xr-urow__t b { font-size: 14px; color: var(--text-primary, #f1f5f9); }
.xr-urow__t i { font-size: 12px; color: var(--text-muted, #94a3b8); font-style: normal; }
.xr-urow__f { background: var(--primary, #6366f1); border: none; color: #fff; border-radius: 8px; padding: 7px 16px;
  font-family: inherit; font-weight: 700; font-size: 13px; cursor: pointer; flex-shrink: 0; }
.xr-urow__f--on { background: rgba(255,255,255,.1); color: var(--text-primary, #f1f5f9); }
.xr-fr__btns { display: flex; gap: 6px; flex-shrink: 0; }
.xr-fr__ok { background: var(--primary, #6366f1); border: none; color: #fff; border-radius: 8px; padding: 7px 14px; font-family: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.xr-fr__no { background: rgba(255,255,255,.1); border: none; color: var(--text-primary, #f1f5f9); border-radius: 8px; padding: 7px 14px; font-family: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }

/* ════════ STORY STICKERS (فاز ۵) ════════ */
/* author sheet */
.sticker-author { position: fixed; inset: 0; z-index: 10002; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; direction: rtl; font-family: Vazir, sans-serif; }
.sa-sheet { width: 100%; max-width: 520px; margin: 0 auto; background: var(--bg-secondary, #1a1f2e); border-radius: 18px 18px 0 0; padding: 0 16px calc(20px + env(safe-area-inset-bottom)); }
.sa-handle { width: 40px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.2); margin: 10px auto 14px; }
.sa-title { text-align: center; font-weight: 800; color: var(--text-primary, #f1f5f9); margin-bottom: 14px; }
.sa-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sa-type { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border: none; border-radius: 14px;
  background: rgba(255,255,255,.06); color: var(--text-primary, #f1f5f9); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.sa-type:hover { background: rgba(99,102,241,.18); }
.sa-ic { font-size: 24px; }
.sa-form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.sa-form:empty { margin: 0; }
.sa-inp { background: rgba(255,255,255,.06); border: none; border-radius: 10px; padding: 12px 14px; color: var(--text-primary, #f1f5f9); font-family: inherit; outline: none; }
.sa-correct { color: var(--text-muted, #cbd5e1); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.sa-correct select { background: rgba(255,255,255,.08); color: #fff; border: none; border-radius: 8px; padding: 6px; }
.sa-add { background: var(--primary, #6366f1); border: none; color: #fff; border-radius: 12px; padding: 13px; font-family: inherit; font-weight: 800; cursor: pointer; }

/* viewer layer */
.sticker-layer { position: absolute; left: 0; right: 0; bottom: 110px; z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 24px; pointer-events: none; direction: rtl; font-family: Vazir, sans-serif; }
.st-sticker { pointer-events: auto; width: 100%; max-width: 340px; background: rgba(255,255,255,.96); color: #1a1a1a; border-radius: 16px; padding: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.st-q { font-weight: 800; font-size: 15px; margin-bottom: 10px; text-align: center; }
.st-opts { display: flex; flex-direction: column; gap: 8px; }
.st-opt { position: relative; overflow: hidden; border: none; border-radius: 10px; padding: 11px 14px; background: #eef0f6; color: #1a1a1a;
  font-family: inherit; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.st-opt--res::before { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--pct, 0%); background: rgba(99,102,241,.25); z-index: 0; transition: width .4s; }
.st-opt__l, .st-opt__p { position: relative; z-index: 1; }
.st-opt--mine { box-shadow: inset 0 0 0 2px #6366f1; }
.st-opt--correct { box-shadow: inset 0 0 0 2px #16a34a; }
.st-ansrow { display: flex; gap: 6px; }
.st-ans { flex: 1; border: 1px solid #ddd; border-radius: 10px; padding: 10px; font-family: inherit; outline: none; }
.st-ansbtn { background: #6366f1; color: #fff; border: none; border-radius: 10px; padding: 0 16px; font-family: inherit; font-weight: 700; cursor: pointer; }
.st-done { text-align: center; color: #16a34a; font-weight: 700; }
.st-resp { max-height: 120px; overflow-y: auto; font-size: 13px; }
.st-resp__i { padding: 5px 0; border-bottom: 1px solid #eee; }
.st-link, .st-mention, .st-music { display: inline-block; width: 100%; text-align: center; background: #6366f1; color: #fff;
  border: none; border-radius: 12px; padding: 12px; font-family: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.st-mention { background: #0ea5e9; } .st-music { background: #111; }

/* میان‌برهای فید/کاوش/ریلز در نوار بالای پروفایل */
.ig-profile__topbar-actions { display: flex; align-items: center; gap: 2px; }
.ig-profile__topbar-actions .ig-profile__topbar-btn { padding: 6px; }

/* ───── پروفایل کاربر دیگر (مثل اینستاگرام) ───── */
.xr-prof { width: min(560px, 100vw); margin: 0 auto; display: flex; flex-direction: column; height: 100%; overflow-y: auto; direction: rtl; font-family: inherit; -webkit-overflow-scrolling: touch; }
.xr-prof__top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--bg-main, #0f1117); border-bottom: 1px solid var(--glass-border, rgba(255,255,255,.08)); }
.xr-prof__top b { color: var(--text-primary, #f1f5f9); font-size: 16px; }
.xr-prof__back { background: none; border: none; color: var(--text-primary, #f1f5f9); cursor: pointer; }
.xr-prof__head { display: flex; align-items: center; gap: 22px; padding: 18px 18px 8px; }
.xr-prof__avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--glass-border, rgba(255,255,255,.12)); }
.xr-prof__stats { flex: 1; display: flex; justify-content: space-around; }
.xr-prof__stat { text-align: center; color: var(--text-primary, #f1f5f9); }
.xr-prof__stat b { display: block; font-size: 17px; font-weight: 800; }
.xr-prof__stat span { font-size: 12px; color: var(--text-muted, #94a3b8); }
.xr-prof__name { padding: 0 18px; font-weight: 700; color: var(--text-primary, #f1f5f9); }
.xr-prof__bio { padding: 4px 18px 0; font-size: 14px; line-height: 1.6; color: var(--text-secondary, #cbd5e1); }
.xr-prof__actions { display: flex; gap: 8px; padding: 14px 18px; }
.xr-prof__btn { flex: 1; border: none; border-radius: 10px; padding: 9px; font-family: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.xr-prof__follow { background: var(--primary, #6366f1); color: #fff; }
.xr-prof__follow--on { background: rgba(255,255,255,.1); color: var(--text-primary, #f1f5f9); }
.xr-prof__msg { background: rgba(255,255,255,.1); color: var(--text-primary, #f1f5f9); }
.xr-prof__tabs { display: flex; border-top: 1px solid var(--glass-border, rgba(255,255,255,.08)); margin-top: 6px; }
.xr-prof__tab { flex: 1; background: none; border: none; padding: 12px; color: var(--text-muted, #94a3b8); cursor: pointer; font-family: inherit; border-bottom: 2px solid transparent; }
.xr-prof__tab--on { color: var(--text-primary, #f1f5f9); border-bottom-color: var(--primary, #6366f1); }
.xr-prof__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; }

/* ════════ CHANNEL EXTRAS (فاز B) ════════ */
.cx-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; direction: rtl; }
.cx-react { border: none; border-radius: 14px; padding: 3px 9px; font-size: 13px; cursor: pointer;
  background: rgba(255,255,255,.08); color: var(--text-primary, #f1f5f9); font-family: inherit; }
.cx-react--on { background: rgba(99,102,241,.3); box-shadow: inset 0 0 0 1px var(--primary, #6366f1); }
.cx-addreact { border: none; border-radius: 50%; width: 26px; height: 26px; cursor: pointer;
  background: rgba(255,255,255,.08); color: var(--text-muted, #cbd5e1); font-size: 14px; }
.cx-views { font-size: 12px; color: var(--text-muted, #94a3b8); margin-right: auto; display: inline-flex; align-items: center; gap: 3px; }
.cx-admin { border: none; background: none; color: var(--text-muted, #94a3b8); cursor: pointer; font-size: 18px; line-height: 1; padding: 0 4px; }
.cx-popper { position: fixed; z-index: 10050; background: var(--bg-secondary, #1a1f2e); border: 1px solid var(--glass-border, rgba(255,255,255,.1));
  border-radius: 12px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.4); display: flex; gap: 4px; direction: rtl; font-family: Vazir, sans-serif; }
.cx-emoji button { border: none; background: none; font-size: 20px; cursor: pointer; padding: 4px; border-radius: 8px; }
.cx-emoji button:hover { background: rgba(255,255,255,.1); }
.cx-menu { flex-direction: column; min-width: 130px; }
.cx-menu button { border: none; background: none; color: var(--text-primary, #f1f5f9); text-align: right; padding: 9px 12px;
  border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 14px; }
.cx-menu button:hover { background: rgba(255,255,255,.07); }
.cx-menu .cx-danger { color: #ef4444; }
#cx-pin-banner { display: flex; align-items: center; gap: 10px; padding: 8px 14px; cursor: pointer; direction: rtl;
  background: var(--glass-bg, rgba(15,23,42,.7)); border-bottom: 1px solid var(--glass-border, rgba(255,255,255,.08));
  color: var(--text-primary, #f1f5f9); font-family: Vazir, sans-serif; }
#cx-pin-banner .cx-pin-text { display: flex; flex-direction: column; min-width: 0; }
#cx-pin-banner .cx-pin-text b { font-size: 12px; color: var(--primary, #818cf8); }
#cx-pin-banner .cx-pin-text span { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ری‌اکشن پیام DM/گروه */
.cx-bar-min { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cx-bar-min .cx-react { padding: 2px 8px; font-size: 12px; }

/* ════════ منشن @ (فاز C) ════════ */
.cm-box { z-index: 10060; background: var(--bg-secondary, #1a1f2e); border: 1px solid var(--glass-border, rgba(255,255,255,.1));
  border-radius: 12px; box-shadow: 0 -8px 30px rgba(0,0,0,.4); padding: 6px; direction: rtl; font-family: Vazir, sans-serif; max-height: 260px; overflow-y: auto; }
.cm-item { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none; cursor: pointer;
  padding: 8px 10px; border-radius: 8px; color: var(--text-primary, #f1f5f9); font-family: inherit; text-align: right; }
.cm-item:hover { background: rgba(99,102,241,.15); }
.cm-item img, .cm-ph { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; background: rgba(99,102,241,.2); color: #fff; font-weight: 700; }
.cm-t { display: flex; flex-direction: column; min-width: 0; }
.cm-t b { font-size: 13px; } .cm-t i { font-size: 11px; color: var(--text-muted, #94a3b8); font-style: normal; }

/* ════════ آلبوم رسانه (نسخه‌ی قدیمی حذف شد — سیستمِ cx-album-row جایگزین است) ════════ */

/* ════════ تنظیمات اتاق/گروه/کانال — منو‌ای (مثل تلگرام) ════════ */
.rs-wrap { direction: rtl; font-family: Vazir, sans-serif; }
.rs-head { display:flex; align-items:center; gap:14px; padding:14px 8px 18px; border-bottom:1px solid var(--glass-border,rgba(255,255,255,.08)); }
.rs-head-av { width:64px; height:64px; border-radius:50%; overflow:hidden; flex-shrink:0; display:flex; align-items:center; justify-content:center; background:var(--primary,#6366f1); color:#fff; font-weight:800; font-size:22px; }
.rs-head-av img { width:100%; height:100%; object-fit:cover; }
.rs-head-tx { display:flex; flex-direction:column; }
.rs-head-tx b { font-size:18px; color:var(--text-primary,#f1f5f9); }
.rs-head-tx span { font-size:13px; color:var(--text-muted,#94a3b8); }
/* تب‌بار افقی (مثل تلگرام) */
.rs-tabs { display:flex; gap:4px; margin-top:14px; border-bottom:1px solid var(--glass-border,rgba(255,255,255,.08)); }
.rs-tab { flex:1; background:none; border:none; padding:12px 8px; color:var(--text-muted,#94a3b8); cursor:pointer; font-family:inherit; font-size:14px; font-weight:700; border-bottom:2px solid transparent; margin-bottom:-1px; }
.rs-tab--on { color:var(--text-primary,#f1f5f9); border-bottom-color:var(--primary,#6366f1); }
.rs-tabpane { padding-top:16px; }

/* ════════ تنظیمات اتاق — بازطراحی (آواتار وسط، آیکن‌ها، @شناسه) ════════ */
.rs-head--center { flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 18px 8px; }
.rs-avatar-wrap { position: relative; }
.rs-avatar-lg { width: 92px; height: 92px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: var(--primary, #6366f1); color: #fff; font-weight: 800; font-size: 30px; cursor: pointer; }
.rs-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.rs-avatar-cam { position: absolute; bottom: 0; left: 0; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--bg-secondary, #1a1f2e);
  background: var(--primary, #6366f1); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.rs-head--center .rs-head-tx { align-items: center; }

/* اسلاگ @ */
.create-room-slug__prefix { font-weight: 700; }

/* آیکن راهنما */
.rs-label-row { display: inline-flex; align-items: center; gap: 6px; }
.rs-info-btn { background: none; border: none; color: var(--primary, #818cf8); cursor: pointer; padding: 0; display: inline-flex; }

/* اعضا: دکمه‌های آیکنی به‌جای متن */
.rs-mact { background: none !important; border: none !important; padding: 6px !important; border-radius: 8px; cursor: pointer;
  color: var(--text-muted, #94a3b8); display: inline-flex; align-items: center; justify-content: center; min-width: 0 !important; }
.rs-mact:hover { background: rgba(255,255,255,.08) !important; color: var(--text-primary, #f1f5f9); }
.rs-mact--danger { color: #ef4444; }
.rs-mact--danger:hover { background: rgba(239,68,68,.12) !important; color: #ef4444; }
.rs-role-tag { font-size: 10px; font-weight: 700; color: var(--primary, #818cf8); background: rgba(99,102,241,.15); padding: 1px 6px; border-radius: 8px; margin-right: 4px; vertical-align: middle; }
.room-member-row__identity small { color: var(--text-muted, #94a3b8); font-size: 12px; }

/* دکمه‌ی برگشت به پروفایل در هوم */
.xr-home__head { display: flex; align-items: center; gap: 8px; }
.xr-home__back { background: none; border: none; color: var(--text-primary, #f1f5f9); cursor: pointer; display: inline-flex; align-items: center; padding: 4px; }

/* شیت اشتراک‌گذاری داخل‌برنامه‌ای */
.xr-overlay--sheet { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 2147483600; display: flex; align-items: flex-end; justify-content: center; }
.xr-sheet { width: 100%; max-width: 520px; background: var(--glass-bg, #161b29); border-radius: 20px 20px 0 0; padding: 8px 14px 22px; max-height: 75vh; display: flex; flex-direction: column; }
.xr-sheet__handle { width: 40px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.25); margin: 6px auto 12px; }
.xr-sheet__title { font-weight: 700; font-size: 15px; margin-bottom: 10px; color: var(--text-primary,#fff); }
.xr-sheet__list { overflow-y: auto; flex: 1; }
.xr-urow { display: flex; align-items: center; gap: 10px; padding: 8px 4px; }
.xr-urow img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.xr-urow__t { flex: 1; min-width: 0; color: var(--text-primary,#fff); font-size: 14px; }
.xr-urow__f { background: var(--primary,#6366f1); color: #fff; border: none; border-radius: 10px; padding: 7px 14px; cursor: pointer; font-size: 13px; font-weight: 600; }
.xr-sheet__compose { display: flex; gap: 8px; margin-top: 10px; }
.xr-sheet__compose input { flex: 1; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 9px 12px; color: var(--text-primary,#fff); direction: ltr; font-size: 12px; }
.xr-sheet__compose button { background: rgba(255,255,255,.12); color: #fff; border: none; border-radius: 10px; padding: 0 14px; cursor: pointer; font-size: 13px; }

/* رفع: هدر/فوترِ ویوئرِ پست همیشه دیده شود (هدر چسبان + بدنه اسکرول) */
.xr-post { overflow-y: auto !important; }
.xr-post__top { position: sticky; top: 0; z-index: 3; background: var(--bg-secondary, #1a1f2e); }
.xr-post__actions, .xr-post__caption { flex-shrink: 0; }
.xr-post, .xr-post * { -webkit-tap-highlight-color: transparent; }

/* آلبومِ چندعکسی — ردیفِ flexِ واقعی (مثل تلگرام) */
.cx-album-row { display: flex; flex-wrap: wrap; gap: 3px; max-width: 90%; width: 440px; margin: 6px 0; }
.cx-album-row--out { align-self: flex-start; margin-left: auto; }
.cx-album-row--in  { align-self: flex-end;   margin-right: auto; }
.cx-album-row .cx-album-item {
  display: block !important; flex: 1 1 calc(50% - 3px); max-width: calc(50% - 3px);
  width: auto !important; padding: 0 !important; margin: 0 !important;
  background: transparent !important; box-shadow: none !important; border: none !important; border-radius: 0 !important;
}
/* ۳+ عکس هم دو‌ستونه (بزرگ)، نه گریدِ ریزِ سه‌ستونه */
.cx-album-row.cx-album-3p .cx-album-item { flex-basis: calc(50% - 3px); max-width: calc(50% - 3px); }
/* عکسِ تکِ آخر (تعداد فرد) تمام‌عرض شود */
.cx-album-row .cx-album-item:last-child:nth-child(odd) { flex-basis: 100% !important; max-width: 100% !important; }
.cx-album-row .cx-album-item .media-wrapper { margin: 0 !important; }
.cx-album-row .cx-album-item .media-wrapper img { width: 100% !important; height: 200px !important; max-height: 200px !important; object-fit: cover; border-radius: 8px !important; display: block; cursor: pointer; }
.cx-album-row .cx-album-item:last-child:nth-child(odd) .media-wrapper img { height: 230px !important; max-height: 230px !important; }
.cx-album-row .cx-album-item .msg-meta { display: none !important; }
@media (max-width: 768px) { .cx-album-row { width: 86vw; max-width: 86vw; } }
