    @import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800;900&display=swap');

    :root {
      --bg: #0b0d12;
      --surface: #14171f;
      --surface-2: #1c2030;
      --text: #ffffff;
      --text-dim: #9aa1b2;
      --link: #ff4d6d;
      --accent: #ff4d6d;
      --accent-2: #ff8a5b;
      --like: #2ee6a6;
      --nope: #ff5470;
      --super: #4ea4ff;
      --boost: #a855f7;
      --love: #1e40af;
      --border: rgba(255,255,255,0.08);
      --shadow: 0 8px 32px rgba(0,0,0,0.4);
    }

    /* Force dark theme — ignore system preference */

    * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }
    html, body {
      height: 100%; width: 100%;
      background: var(--bg); color: var(--text);
      font-family: 'Vazirmatn', sans-serif;
      font-size: 14px; line-height: 1.6;
      overflow: hidden; user-select: none;
      direction: rtl;
      transition: background 0.3s, color 0.3s;
    }

    #app { position: relative; width: 100%; height: 100vh; height: 100dvh; overflow: hidden; padding-bottom: 80px; }

    /* ─── Router views ─── */
    .view {
      position: absolute; inset: 0; bottom: 80px;
      display: flex; flex-direction: column;
      opacity: 0; pointer-events: none;
      transform: translateX(30px);
      transition: opacity 0.3s ease, transform 0.3s ease;
    }
    .view.active { opacity: 1; pointer-events: auto; transform: translateX(0); }
    .view.exit-left { transform: translateX(-30px); }

    /* ─── Top bar ─── */
    .topbar {
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top));
      background: var(--surface);
      backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
      border-bottom: 1px solid var(--border);
      position: relative; z-index: 10;
    }
    .brand-logo {
      width: 32px; height: 32px;
    }
    .brand-logo img { width: 100%; height: 100%; object-fit: contain; }
    .brand-logo svg { width: 100%; height: 100%; }
    .brand {
      font-weight: 900; font-size: 22px;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    }
    .topbar .credits-chip {
      background: var(--surface-2); padding: 5px 12px; border-radius: 12px;
      font-size: 12px; font-weight: 700; color: var(--accent-2);
      cursor: pointer;
    }
    .icon-btn {
      width: 38px; height: 38px; border-radius: 50%;
      background: var(--surface-2); border: none; color: var(--text-dim);
      font-size: 18px; cursor: pointer; transition: transform 0.15s;
      display: grid; place-items: center;
    }
    .icon-btn:active { transform: scale(0.9); }

    /* ─── Bottom navigation ─── */
    .bottom-nav {
      position: absolute; bottom: 0; left: 0; right: 0;
      height: 64px; display: flex;
      background: rgba(11,13,18,0.95);
      backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
      border-top: 1px solid rgba(255,255,255,0.08);
      padding-bottom: env(safe-area-inset-bottom, 0px);
      z-index: 100;
    }
    .nav-item {
      flex: 1; display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      gap: 2px; cursor: pointer; border: none;
      background: transparent; color: var(--text-dim);
      font-family: inherit; font-size: 9px; font-weight: 600;
      transition: color 0.2s; position: relative;
    }
    .nav-item.active { color: var(--accent); }
    .nav-item.active::before {
      content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
      width: 24px; height: 2px;
      background: var(--accent);
    }
    .nav-item .icon { font-size: 18px; transition: transform 0.2s; }
    .nav-item.active .icon { transform: scale(1.1); }
    .nav-item:active .icon { transform: scale(0.9); }

    /* ─── v21: Radar widget (nearby radar in grid view) ─── */
    .radar-wrap { margin: 12px auto; max-width: 320px; }
    .radar-wrap svg { width: 100%; display: block; }
    .radar-wrap .legend { display:flex; justify-content:center; gap:12px; margin-top:6px; font-size:10px; color:var(--text-dim); font-weight:600 }
    .radar-wrap .legend i { display:inline-block; width:10px; height:10px; border-radius:50%; margin-left:4px; vertical-align:middle }
    @keyframes radarSweep { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
    .radar-sweep { transform-origin: center; animation: radarSweep 4s linear infinite; }
    .radar-controls { display:flex; flex-direction:column; gap:6px; padding:10px 14px; }
    .radar-controls label { font-size:11px; font-weight:700; color:var(--text-dim); }
    .radar-controls input[type=range] { width:100%; }
    .radar-empty { padding:40px 20px; text-align:center; color:var(--text-dim); font-size:13px; }
    .radar-empty .ico { font-size:48px; margin-bottom:8px; }
    .radar-list-item { display:flex; align-items:center; gap:10px; padding:10px 14px; border-bottom:1px solid var(--surface-2); cursor:pointer; }
    .radar-list-item:active { background:var(--surface-2); }
    .radar-list-item .ava { width:44px; height:44px; border-radius:50%; background:var(--surface-2) center/cover; flex-shrink:0 }
    .radar-list-item .ava.empty { display:grid; place-items:center; font-size:18px; opacity:0.3 }
    .radar-list-item .info { flex:1; min-width:0; }
    .radar-list-item .name { font-weight:700; font-size:14px; color:var(--text); }
    .radar-list-item .meta { font-size:11px; color:var(--text-dim); margin-top:2px; }
    .radar-list-item .dist { font-size:12px; font-weight:700; color:#60a5fa; white-space:nowrap; }

    /* ─── v21: Anonymous chat (premium) ─── */
    .anon-list-item {
      display:flex; align-items:center; gap:12px; padding:14px 16px;
      border-bottom:1px solid var(--surface-2);
      cursor:pointer; transition:background 0.2s;
      position:relative;
    }
    .anon-list-item:active { background:var(--surface-2); }
    .anon-list-item .avatar {
      width:52px; height:52px; border-radius:50%;
      background:linear-gradient(135deg,#a78bfa,#60a5fa);
      display:grid; place-items:center; font-size:24px;
      flex-shrink:0;
      box-shadow:0 4px 12px rgba(167,139,250,0.25);
    }
    .anon-list-item .avatar.var-2 { background:linear-gradient(135deg,#f472b6,#a78bfa); }
    .anon-list-item .avatar.var-3 { background:linear-gradient(135deg,#34d399,#60a5fa); }
    .anon-list-item .avatar.var-4 { background:linear-gradient(135deg,#fbbf24,#f472b6); }
    .anon-list-item .avatar.var-5 { background:linear-gradient(135deg,#60a5fa,#34d399); }
    .anon-list-item .info { flex:1; min-width:0; }
    .anon-list-item .top-row { display:flex; align-items:center; gap:8px; justify-content:space-between; }
    .anon-list-item .alias { font-weight:800; font-size:14px; color:var(--text); }
    .anon-list-item .time-stamp { font-size:10px; color:var(--text-dim); white-space:nowrap; }
    .anon-list-item .last {
      font-size:12px; color:var(--text-dim); margin-top:4px;
      overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
      line-height:1.4;
    }
    .anon-list-item .last.has-unread { color:var(--text); font-weight:600; }
    .anon-list-item .badge {
      min-width:20px; height:20px; border-radius:10px;
      background:linear-gradient(135deg,var(--accent),var(--accent-2));
      color:white; padding:0 6px; display:grid; place-items:center;
      font-size:11px; font-weight:800;
      box-shadow:0 2px 8px rgba(255,77,109,0.4);
      flex-shrink:0;
    }
    .anon-list-item .badge.read { background:var(--surface-2); color:var(--text-dim); box-shadow:none; }
    .anon-list-item.blocked { opacity:0.45; }
    .anon-list-item.blocked::after {
      content:'🚫 مسدود'; position:absolute; left:16px; top:14px;
      font-size:10px; color:var(--like); font-weight:700;
    }
    .anon-list-item .sender-icon {
      display:inline-block; margin-left:4px;
      font-size:10px; opacity:0.7;
    }

    .anon-msg { display:flex; margin:6px 0; }
    .anon-msg.visitor { justify-content:flex-start; }
    .anon-msg.owner { justify-content:flex-end; }
    .anon-msg .bubble {
      max-width:75%; padding:10px 14px; border-radius:18px;
      font-size:13px; line-height:1.45; word-wrap:break-word;
      box-shadow:0 1px 2px rgba(0,0,0,0.15);
    }
    .anon-msg.visitor .bubble {
      background:var(--surface-2);
      border-bottom-left-radius:4px; color:var(--text);
    }
    .anon-msg.owner .bubble {
      background:linear-gradient(135deg,var(--accent),var(--accent-2));
      border-bottom-right-radius:4px; color:white;
    }
    .anon-msg .bubble.photo { padding:0; overflow:hidden; background:transparent; box-shadow:none; }
    .anon-msg .bubble.photo img { display:block; max-width:200px; max-height:240px; border-radius:14px; }
    .anon-msg .bubble.media-pill {
      display:flex; align-items:center; gap:8px;
    }
    .anon-msg .time { font-size:9px; color:var(--text-dim); margin-top:2px; padding:0 8px; }
    .anon-blocked-banner {
      background:rgba(255,77,109,0.1); border:1px solid rgba(255,77,109,0.3);
      color:var(--like); padding:10px 16px; font-size:12px; font-weight:600;
      text-align:center;
    }
    .anon-typing {
      font-size:11px; color:var(--text-dim); padding:4px 16px;
      font-style:italic; opacity:0.7;
    }
    .anon-empty {
      padding:60px 20px; text-align:center;
    }
    .anon-empty .ico { font-size:64px; margin-bottom:12px; }
    .anon-empty h2 { margin:12px 0 6px; font-size:18px; }
    .anon-empty p { color:var(--text-dim); font-size:13px; margin-bottom:18px; }

    /* ─── Flash banner ─── */
    .flash-banner {
      background: linear-gradient(90deg, var(--accent), var(--accent-2));
      color: white; padding: 8px 14px; font-size: 12px; font-weight: 700;
      text-align: center; animation: flashPulse 1.5s infinite;
    }
    @keyframes flashPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.75; } }

    /* ─── Swipe view ─── */
    .swipe-stage { position: relative; flex: 1; overflow: hidden; padding: 12px; }
    .card-stack { position: relative; width: 100%; height: 100%; max-width: 420px; margin: 0 auto; }

    .skeleton-card {
      position: absolute; inset: 0; background: var(--surface);
      border-radius: 24px; overflow: hidden; box-shadow: var(--shadow);
    }
    .skeleton-card::before {
      content: ''; position: absolute; inset: 0;
      background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
      background-size: 200% 100%; animation: shimmer 1.5s infinite;
    }
    @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

    .card {
      position: absolute; inset: 0; background: var(--surface);
      border-radius: 24px; overflow: hidden; box-shadow: var(--shadow);
      will-change: transform; touch-action: none;
      transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), opacity 0.35s;
    }
    /* v20: Verified animated green border for swipe cards */
    .card.verified-card { box-shadow: 0 0 0 2px var(--like), 0 4px 20px rgba(46,230,166,0.15); }
    @keyframes verified-glow-card {
      0%, 100% { box-shadow: 0 0 0 2px var(--like), 0 4px 20px rgba(46,230,166,0.15); }
      50% { box-shadow: 0 0 0 3px var(--like), 0 4px 24px rgba(46,230,166,0.35); }
    }
    .card.verified-card { animation: verified-glow-card 2s ease-in-out infinite; }
    .card-photo {
      position: absolute; inset: 0; background-size: cover; background-position: center;
      background-color: var(--surface-2);
      background-repeat: no-repeat;
    }
    .card-photo.fit-contain {
      background-size: contain;
    }
    .photo-fit-toggle {
      position: absolute; top: 12px; left: 12px; z-index: 6;
      background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
      border: none; border-radius: 8px; padding: 4px 8px;
      color: white; font-size: 11px; font-weight: 600; cursor: pointer;
      font-family: inherit;
    }
    .card-photo::after {
      content: ''; position: absolute; inset: 0;
      background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, transparent 20%, transparent 60%, rgba(0,0,0,0.5) 80%, rgba(0,0,0,0.92) 100%);
    }
    .carousel-dots {
      position: absolute; top: 12px; left: 0; right: 0;
      display: flex; justify-content: center; gap: 6px; z-index: 5;
    }
    .carousel-dots .dot {
      width: 6px; height: 6px; border-radius: 50%;
      background: rgba(255,255,255,0.4); transition: all 0.2s;
    }
    .carousel-dots .dot.active { background: white; width: 18px; border-radius: 3px; }
    .verified-badge {
      position: absolute; top: 12px; right: 12px;
      background: var(--like); color: #0b0d12;
      padding: 3px 8px; border-radius: 8px; font-size: 11px; font-weight: 800; z-index: 5;
    }
    .superlike-badge {
      position: absolute; top: 12px; left: 50px;
      background: var(--super); color: white;
      padding: 3px 8px; border-radius: 8px; font-size: 11px; font-weight: 800; z-index: 5;
    }

    .vibe-ring {
      position: relative; display: inline-block; vertical-align: middle;
      width: 56px; height: 56px; flex-shrink: 0;
    }
    .vibe-ring svg { transform: rotate(-90deg); display: block; }
    .vibe-ring .pct {
      position: absolute; inset: 0; display: flex;
      align-items: center; justify-content: center;
      font-size: 12px; font-weight: 800; color: white;
      text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    }
    /* v17: Small vibe chip for swipe cards (replaces big ring) */
    .vibe-chip {
      display: inline-flex; align-items: center; gap: 3px;
      padding: 3px 8px; border-radius: 10px;
      font-size: 12px; font-weight: 800;
      backdrop-filter: blur(6px);
    }
    /* v17: Photo counter badge on swipe cards */
    .photo-counter {
      position: absolute; top: 12px; right: 12px;
      background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
      color: white; padding: 3px 10px; border-radius: 10px;
      font-size: 11px; font-weight: 700; z-index: 5;
    }

    .card-info {
      position: absolute; bottom: 0; left: 0; right: 0;
      padding: 20px 16px 24px;
      background: linear-gradient(180deg, transparent, rgba(0,0,0,0.95));
      z-index: 2;
    }
    .card-name { font-size: 22px; font-weight: 800; margin: 0; color: white; }
    .card-name .age { font-weight: 500; opacity: 0.85; margin-right: 6px; }
    .card-meta {
      display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px;
      font-size: 12px; color: rgba(255,255,255,0.7);
    }
    .chip {
      background: rgba(255,255,255,0.15); padding: 3px 9px;
      border-radius: 10px; backdrop-filter: blur(6px);
    }
    .card-bio {
      margin: 8px 0 0; font-size: 13px; line-height: 1.5;
      color: rgba(255,255,255,0.92);
      display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .card-prompt {
      margin: 8px 0 0; padding: 10px; background: rgba(255,255,255,0.1);
      border-radius: 10px; border-left: 3px solid var(--accent);
      font-size: 12px; color: rgba(255,255,255,0.9);
    }
    .card-prompt .q { font-size: 11px; color: var(--accent-2); font-weight: 600; }
    .card-actions-row { display: flex; gap: 8px; margin-top: 10px; }
    .card-action-btn {
      background: rgba(255,255,255,0.15); border: none; color: white;
      padding: 6px 12px; border-radius: 10px; font-size: 12px;
      cursor: pointer; font-family: inherit; backdrop-filter: blur(6px);
    }
    .card-action-btn:active { transform: scale(0.95); }
    .card-action-btn.voice { color: var(--accent-2); }
    .card-action-btn.video { color: var(--super); }
    .card-action-btn.detail { color: var(--like); }

    .swipe-stamp {
      position: absolute; top: 30%; font-size: 28px; font-weight: 900;
      padding: 8px 18px; border-radius: 12px; z-index: 10;
      opacity: 0; transition: opacity 0.15s; pointer-events: none; letter-spacing: 2px;
    }
    .swipe-stamp.like { right: 24px; color: var(--like); border: 3px solid var(--like); transform: rotate(15deg); }
    .swipe-stamp.nope { left: 24px; color: var(--nope); border: 3px solid var(--nope); transform: rotate(-15deg); }
    .swipe-stamp.super {
      top: 50%; left: 50%; transform: translate(-50%, -50%);
      color: var(--super); border: 3px solid var(--super); font-size: 22px;
    }

    .actions {
      display: flex; justify-content: center; align-items: center; gap: 14px;
      padding: 12px 16px;
      direction: ltr; /* Force LTR so swipe-right=like button visually sits on the right */
    }
    .act-btn {
      width: 54px; height: 54px; border-radius: 50%; border: none;
      cursor: pointer; display: grid; place-items: center;
      font-size: 22px; background: var(--surface-2);
      box-shadow: 0 4px 20px rgba(0,0,0,0.3);
      transition: all 0.2s ease; color: var(--text-dim);
    }
    .act-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,0.4); }
    .act-btn:active { transform: scale(0.85); }
    .act-btn.rewind { width: 46px; height: 46px; font-size: 18px; color: var(--accent-2); }
    .act-btn.nope { color: var(--nope); }
    .act-btn.like { color: var(--like); width: 64px; height: 64px; font-size: 26px; box-shadow: 0 4px 24px rgba(46,230,166,0.3); }
    .act-btn.super { color: var(--super); }
    .act-btn.boost { width: 46px; height: 46px; font-size: 18px; color: var(--boost); }
    .act-btn:disabled { opacity: 0.3; cursor: not-allowed; }

    /* ─── Presence dot ─── */
    .presence-dot {
      position: absolute; top: 12px; left: 12px;
      width: 12px; height: 12px; border-radius: 50%;
      background: var(--like); z-index: 6;
      box-shadow: 0 0 0 2px var(--surface);
      animation: presencePulse 2s infinite;
    }
    @keyframes presencePulse {
      0% { box-shadow: 0 0 0 2px var(--surface), 0 0 0 0 rgba(46,230,166,0.7); }
      70% { box-shadow: 0 0 0 2px var(--surface), 0 0 0 8px rgba(46,230,166,0); }
      100% { box-shadow: 0 0 0 2px var(--surface), 0 0 0 0 rgba(46,230,166,0); }
    }

    /* ─── Discover grid (premium v20) ─── */
    .discover-scroll { flex: 1; overflow-y: auto; padding: 12px; }
    .discover-grid {
      display: grid; grid-template-columns: repeat(2, 1fr);
      gap: 12px; max-width: 500px; margin: 0 auto;
    }
    .discover-card {
      position: relative;
      border-radius: 20px;
      background: var(--surface-2);
      box-shadow: 0 4px 20px rgba(0,0,0,0.15);
      transition: transform 0.2s cubic-bezier(0.4,0,0.2,1), box-shadow 0.2s;
      cursor: pointer; overflow: hidden;
      aspect-ratio: 0.75;
    }
    .discover-card:active { transform: scale(0.96); }
    .discover-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.25); }
    .discover-card.verified-card { box-shadow: 0 0 0 2px var(--like), 0 4px 20px rgba(46,230,166,0.15); }
    @keyframes verified-glow {
      0%, 100% { box-shadow: 0 0 0 2px var(--like), 0 4px 20px rgba(46,230,166,0.15); }
      50% { box-shadow: 0 0 0 3px var(--like), 0 4px 24px rgba(46,230,166,0.35); }
    }
    .discover-card.verified-card { animation: verified-glow 2s ease-in-out infinite; }
    .discover-card .photo {
      position: absolute; inset: 0;
      background: var(--surface-2) center/cover;
    }
    .discover-card .photo::after {
      content: ''; position: absolute; inset: 0;
      background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, transparent 25%, rgba(0,0,0,0.5) 65%, rgba(0,0,0,0.95) 100%);
      pointer-events: none;
    }
    .discover-card .info {
      position: absolute; bottom: 12px; right: 12px; left: 12px;
      z-index: 2; color: white;
    }
    .discover-card .name { font-weight: 800; font-size: 16px; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
    .discover-card .meta { font-size: 11px; opacity: 0.9; margin-top: 2px; }
    .discover-card .vibe-mini {
      position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%);
      z-index: 5;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      padding: 4px 14px; border-radius: 12px;
      font-size: 11px; font-weight: 800; color: white;
      box-shadow: 0 2px 12px rgba(255,77,109,0.4);
      white-space: nowrap;
    }
    .discover-card .online-dot {
      display: none;
    }
    .discover-card .verified-mini {
      display: inline-block; width: 14px; height: 14px;
      background: var(--like); color: #0b0d12;
      border-radius: 50%; font-size: 9px; font-weight: 900;
      text-align: center; line-height: 14px; margin-right: 4px;
    }

    /* ─── Empty state ─── */
    .empty {
      flex: 1; display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      text-align: center; color: var(--text-dim); padding: 32px; gap: 10px;
    }
    .empty .big { font-size: 56px; }
    .empty h2 { color: var(--text); margin: 0; }
    .empty button {
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      color: white; border: none; padding: 12px 28px;
      border-radius: 14px; font-size: 16px; font-weight: 700;
      cursor: pointer; margin-top: 8px; font-family: inherit;
    }

    /* ─── Detail view ─── */
    .detail-scroll { flex: 1; overflow-y: auto; padding: 0 0 max(20px, env(safe-area-inset-bottom)); }
    .detail-hero-wrap { position: relative; }
    .detail-hero {
      position: relative; height: 55vh; min-height: 340px;
      background-size: cover; background-position: center;
      cursor: pointer;
    }
    .detail-hero::after {
      content: ''; position: absolute; inset: 0;
      background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, transparent 25%, transparent 55%, rgba(0,0,0,0.7) 85%, var(--bg) 100%);
    }
    /* v17: Carousel dots + counter for detail view */
    .detail-carousel-dots {
      position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
      display: flex; gap: 6px; z-index: 5;
    }
    .detail-carousel-dots .dot {
      width: 7px; height: 7px; border-radius: 50%;
      background: rgba(255,255,255,0.4); transition: all 0.2s;
    }
    .detail-carousel-dots .dot.active {
      background: white; transform: scale(1.3);
    }
    .detail-photo-counter {
      position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
      background: rgba(0,0,0,0.6); backdrop-filter: blur(6px);
      color: white; padding: 3px 12px; border-radius: 10px;
      font-size: 11px; font-weight: 700; z-index: 5;
    }
    /* v17: Swipe hint shown briefly on multi-photo profiles */
    .swipe-hint {
      position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
      background: rgba(0,0,0,0.6); backdrop-filter: blur(6px);
      color: white; padding: 4px 14px; border-radius: 10px;
      font-size: 11px; font-weight: 600; z-index: 5;
      animation: swipeHintFade 4s ease-out forwards;
      pointer-events: none;
    }
    @keyframes swipeHintFade {
      0% { opacity: 0; transform: translateX(-50%) translateY(8px); }
      15%, 75% { opacity: 1; transform: translateX(-50%) translateY(0); }
      100% { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    }
    /* Vibe ring is now inline with the name — same row, same height */
    .detail-vibe-ring {
      position: relative; display: inline-block; vertical-align: middle;
      width: 56px; height: 56px; flex-shrink: 0;
      top: auto !important; right: auto !important; z-index: auto !important;
    }
    .detail-vibe-ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
    .detail-vibe-ring .pct {
      position: absolute; inset: 0; display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      font-size: 14px; font-weight: 800; color: var(--text);
    }
    .detail-vibe-ring .lbl { display: none; }

    /* v20: Premium detail view */
    .detail-name-block {
      margin: -50px 0 14px;
      padding: 0 4px;
      position: relative; z-index: 3;
    }
    .detail-name-row {
      display: flex; align-items: flex-end; justify-content: space-between;
      gap: 12px; margin-bottom: 10px;
    }
    .detail-name {
      font-size: 30px; font-weight: 900; color: white; margin: 0;
      line-height: 1.2; flex: 1; word-break: break-word;
      text-shadow: 0 2px 16px rgba(0,0,0,0.7);
    }
    .detail-name .detail-age {
      font-size: 22px; font-weight: 600; opacity: 0.85; margin-right: 8px;
    }
    .detail-verified-tick {
      display: inline-grid; place-items: center;
      width: 22px; height: 22px; background: var(--like); color: #0b0d12;
      border-radius: 50%; font-size: 13px; font-weight: 900;
      vertical-align: middle; margin-right: 6px;
    }
    .detail-vibe-wrapper {
      flex-shrink: 0;
    }
    .detail-meta-row {
      display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
    }
    .meta-pill {
      display: inline-flex; align-items: center; gap: 3px;
      background: var(--surface-2); color: var(--text);
      padding: 5px 10px; border-radius: 12px;
      font-size: 12px; font-weight: 600;
    }
    .meta-pill.online {
      background: rgba(46,230,166,0.18); color: var(--like);
    }
    .detail-intent-pill {
      display: inline-block;
      background: rgba(255,77,109,0.15); color: var(--accent);
      padding: 6px 14px; border-radius: 14px;
      font-size: 13px; font-weight: 700;
    }

    /* v17: Info groups (categorized structured profile) */
    .info-group {
      margin-bottom: 14px;
    }
    .info-group:last-child { margin-bottom: 0; }
    .info-group-title {
      font-size: 12px; color: var(--accent); font-weight: 700;
      margin-bottom: 6px; padding: 0 4px;
    }
    .info-group-rows {
      background: var(--surface); border-radius: 14px; padding: 6px 14px;
    }
    .info-row {
      display: flex; justify-content: space-between; align-items: center;
      padding: 10px 0; border-bottom: 1px solid var(--surface-2);
      font-size: 14px;
    }
    .info-row:last-child { border-bottom: none; }
    .info-row.info-shared {
      background: rgba(46,230,166,0.06); border-radius: 8px;
      padding-left: 10px; padding-right: 10px; margin: 2px -10px;
    }
    .info-label { color: var(--text-dim); font-size: 13px; }
    .info-val { font-weight: 700; color: var(--text); font-size: 13px; text-align: left; }

    /* v17: Interest categories in detail view */
    .interest-category { margin-bottom: 14px; }
    .interest-cat-title {
      font-size: 13px; color: var(--accent); font-weight: 700;
      margin-bottom: 6px;
    }
    .interest-cat-items {
      display: flex; flex-wrap: wrap; gap: 6px;
    }
    .interest-tag.interest-shared {
      box-shadow: 0 0 0 2px rgba(46,230,166,0.4);
    }

    .detail-body { padding: 20px 20px 20px; }
    .detail-meta { color: var(--text-dim); font-size: 13px; margin-bottom: 12px; }
    .detail-bio {
      background: var(--surface); border-radius: 14px; padding: 14px;
      font-size: 14px; line-height: 1.6; color: var(--text); margin-bottom: 16px;
    }
    .detail-section { margin-bottom: 16px; }

    /* Shared interest highlight — gradient + animation */
    .interest-shared {
      background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
      color: white !important;
      font-weight: 700;
      animation: sharedPulse 2s ease-in-out infinite;
      box-shadow: 0 2px 12px rgba(255,77,109,0.5);
      border: 1px solid rgba(255,255,255,0.3);
    }
    @keyframes sharedPulse {
      0%, 100% { transform: scale(1); box-shadow: 0 2px 12px rgba(255,77,109,0.5); }
      50% { transform: scale(1.08); box-shadow: 0 4px 20px rgba(255,77,109,0.7); }
    }
    /* Shared tags highlight */
    .tag-shared {
      background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important;
      color: white !important;
      font-weight: 700;
      animation: sharedPulse 2s ease-in-out infinite;
    }
    /* Shared info row highlight */
    .info-shared {
      background: rgba(255,77,109,0.15) !important;
      border-right: 3px solid var(--accent);
      padding: 8px 12px !important;
      border-radius: 8px;
      margin: 2px -4px;
      animation: fadeIn 0.4s;
    }
    .detail-section h3 {
      font-size: 13px; color: var(--text-dim); margin-bottom: 8px;
      text-transform: uppercase; letter-spacing: 1px;
    }
    .prompt-card {
      background: var(--surface); border-radius: 14px; padding: 14px;
      margin-bottom: 8px; border-right: 3px solid var(--accent);
    }
    .prompt-card .q { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 4px; }
    .prompt-card .a { font-size: 14px; color: var(--text); line-height: 1.5; }

    .interest-grid { display: flex; flex-wrap: wrap; gap: 6px; }
    .interest-tag {
      padding: 5px 10px; border-radius: 10px; font-size: 12px; font-weight: 600;
    }
    .interest-tag.love { background: rgba(30,64,175,0.2); color: #60a5fa; border: 1px solid rgba(30,64,175,0.3); }
    .interest-tag.like { background: rgba(78,164,255,0.15); color: var(--super); border: 1px solid rgba(78,164,255,0.2); }
    .interest-tag.shared { background: rgba(46,230,166,0.15); color: var(--like); border: 1px solid rgba(46,230,166,0.3); }
    .lifestyle-tag {
      background: var(--surface-2); color: var(--text);
      padding: 4px 10px; border-radius: 8px; font-size: 12px;
    }

    .breakdown-list { background: var(--surface); border-radius: 14px; padding: 14px; }
    .breakdown-row {
      display: flex; justify-content: space-between; align-items: center;
      padding: 6px 0; font-size: 13px;
    }
    .breakdown-row .label { color: var(--text-dim); }
    .breakdown-row .val { font-weight: 700; color: var(--text); }
    .breakdown-bar {
      height: 4px; background: var(--surface-2); border-radius: 2px;
      margin-top: 4px; overflow: hidden;
    }
    .breakdown-bar > div {
      height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2));
      border-radius: 2px;
    }

    /* v18: Preferences page styles */
    .pref-section { padding: 0 12px; margin-bottom: 16px; }
    .pref-section-title {
      font-size: 13px; font-weight: 700; color: var(--accent);
      margin-bottom: 6px; padding: 0 4px;
    }
    .pref-card {
      background: var(--surface); border-radius: 14px; padding: 4px 14px;
    }
    .pref-row {
      display: flex; justify-content: space-between; align-items: center;
      padding: 12px 0; border-bottom: 1px solid var(--surface-2);
      font-size: 14px;
    }
    .pref-row:last-child { border-bottom: none; }
    .pref-label { color: var(--text-dim); font-size: 13px; }
    .pref-value {
      font-weight: 600; color: var(--text-dim); font-size: 13px;
      text-align: left; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .pref-value.has-val { color: var(--text); }

    .dealbreaker-alert {
      background: rgba(255,84,112,0.1); border: 1px solid rgba(255,84,112,0.3);
      border-radius: 12px; padding: 12px; font-size: 13px; color: var(--nope);
      display: flex; align-items: center; gap: 8px;
    }
    .no-dealbreaker {
      background: rgba(46,230,166,0.1); border: 1px solid rgba(46,230,166,0.3);
      border-radius: 12px; padding: 12px; font-size: 13px; color: var(--like);
      display: flex; align-items: center; gap: 8px;
    }

    .voice-player {
      display: flex; align-items: center; gap: 10px;
      background: var(--surface); padding: 12px; border-radius: 14px; margin-bottom: 12px;
    }
    .voice-player button {
      background: var(--accent); color: white; border: none;
      width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 16px;
    }
    .voice-waveform { flex: 1; height: 32px; display: flex; align-items: center; gap: 2px; }
    .voice-waveform .bar {
      flex: 1; background: var(--accent); border-radius: 2px; min-height: 4px; opacity: 0.4;
    }

    .report-btn-detail {
      width: 100%; padding: 12px; border-radius: 12px;
      background: rgba(255,84,112,0.1); border: 1px solid rgba(255,84,112,0.3);
      color: var(--nope); font-size: 13px; font-weight: 600;
      cursor: pointer; font-family: inherit; margin-top: 12px;
    }

    /* ─── Stories ─── */
    .story-bar {
      display: flex; gap: 12px; overflow-x: auto; padding: 12px;
      -ms-overflow-style: none; scrollbar-width: none;
    }
    .story-bar::-webkit-scrollbar { display: none; }
    .story-item {
      display: flex; flex-direction: column; align-items: center; gap: 4px;
      cursor: pointer; flex-shrink: 0; width: 64px;
    }
    .story-avatar {
      width: 56px; height: 56px; border-radius: 50%;
      background: var(--surface-2) center/cover;
      border: 3px solid var(--accent);
      position: relative;
    }
    .story-avatar.viewed { border-color: var(--border); }
    .story-avatar.own { border-color: var(--text-dim); }
    .story-avatar .plus-btn {
      position: absolute; bottom: -2px; right: -2px;
      width: 20px; height: 20px; border-radius: 50%;
      background: var(--accent); color: white;
      border: 2px solid var(--surface);
      font-size: 12px; font-weight: 900;
      display: grid; place-items: center;
    }
    .story-name {
      font-size: 10px; color: var(--text-dim);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      max-width: 60px;
    }

    /* Story viewer */
    .story-viewer {
      position: fixed; inset: 0; z-index: 300;
      background: #000; display: none;
      flex-direction: column;
    }
    .story-viewer.show { display: flex; }
    .story-progress-bars {
      display: flex; gap: 4px; padding: 8px 12px 0;
    }
    .story-progress-bar {
      flex: 1; height: 3px; background: rgba(255,255,255,0.3);
      border-radius: 2px; overflow: hidden;
    }
    .story-progress-bar.active > div {
      height: 100%; background: white; width: 0;
      animation: storyProgress 5s linear forwards;
    }
    .story-progress-bar.done > div { height: 100%; background: white; width: 100%; }
    @keyframes storyProgress { from { width: 0; } to { width: 100%; } }
    .story-viewer-content {
      flex: 1; background-size: contain; background-position: center;
      background-repeat: no-repeat; position: relative;
    }
    .story-viewer-caption {
      position: absolute; bottom: 80px; left: 20px; right: 20px;
      color: white; font-size: 16px; text-align: center;
      text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    }
    .story-viewer-header {
      position: absolute; top: 12px; left: 12px; right: 12px;
      display: flex; align-items: center; gap: 10px; z-index: 5;
      padding-top: 16px;
    }
    .story-viewer-header .avatar {
      width: 32px; height: 32px; border-radius: 50%;
      background: var(--surface-2) center/cover;
    }
    .story-viewer-header .name { color: white; font-size: 14px; font-weight: 600; }
    .story-nav-left, .story-nav-right {
      position: absolute; top: 0; bottom: 0; width: 30%;
      z-index: 4;
    }
    .story-nav-left { left: 0; }
    .story-nav-right { right: 0; }
    .story-close-btn {
      position: absolute; top: 16px; left: 12px; z-index: 6;
      color: white; font-size: 24px; background: none; border: none;
      cursor: pointer;
    }

    /* ─── Profile visitors ─── */
    .visitor-row {
      display: flex; align-items: center; gap: 12px; padding: 10px;
      background: var(--surface); border-radius: 12px; margin-bottom: 8px;
    }
    .visitor-avatar {
      width: 44px; height: 44px; border-radius: 50%;
      background: var(--surface-2) center/cover; flex-shrink: 0;
      position: relative;
    }
    .visitor-avatar.blurred { filter: blur(8px); }
    .visitor-info { flex: 1; }
    .visitor-info .name { font-weight: 600; font-size: 14px; }
    .visitor-info .time { font-size: 11px; color: var(--text-dim); }

    /* ─── Daily picks ─── */
    .daily-picks-section {
      padding: 12px; border-bottom: 1px solid var(--border);
    }
    .daily-picks-header {
      display: flex; justify-content: space-between; align-items: center;
      margin-bottom: 10px;
    }
    .daily-picks-header h3 { font-size: 14px; color: var(--text); }
    .daily-picks-header .timer { font-size: 11px; color: var(--accent); }
    .picks-row {
      display: flex; gap: 10px; overflow-x: auto;
      -ms-overflow-style: none; scrollbar-width: none;
    }
    .picks-row::-webkit-scrollbar { display: none; }
    .pick-item {
      display: flex; flex-direction: column; align-items: center; gap: 4px;
      cursor: pointer; flex-shrink: 0; width: 72px;
    }
    .pick-avatar {
      width: 60px; height: 60px; border-radius: 50%;
      background: var(--surface-2) center/cover; position: relative;
      border: 2px solid var(--accent);
    }
    .pick-score {
      position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
      background: var(--accent); color: white;
      padding: 1px 6px; border-radius: 8px;
      font-size: 10px; font-weight: 700; white-space: nowrap;
    }
    .pick-name {
      font-size: 11px; color: var(--text-dim);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      max-width: 68px; text-align: center;
    }

    /* ─── Message reactions ─── */
    .msg-reactions {
      display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap;
    }
    .reaction-pill {
      background: var(--surface-2); padding: 2px 8px; border-radius: 12px;
      font-size: 12px; cursor: pointer; border: 1px solid var(--border);
      display: flex; align-items: center; gap: 2px;
    }
    .reaction-pill.mine { border-color: var(--accent); background: rgba(255,77,109,0.1); }
    .reaction-popup {
      position: absolute; background: var(--surface);
      border: 1px solid var(--border); border-radius: 20px;
      padding: 6px 10px; display: none; gap: 8px; z-index: 50;
      box-shadow: var(--shadow);
    }
    .reaction-popup.show { display: flex; }
    .reaction-popup .emoji-btn {
      background: none; border: none; font-size: 22px; cursor: pointer;
      padding: 2px; transition: transform 0.15s;
    }
    .reaction-popup .emoji-btn:active { transform: scale(1.3); }

    /* ─── Chat UI (polished) ─── */
    .chat-messages {
      flex: 1; overflow-y: auto; padding: 14px;
      display: flex; flex-direction: column; gap: 4px;
      direction: ltr; /* Force LTR so flex-end=right (sent) and flex-start=left (received) */
    }
    .msg-bubble {
      max-width: 75%; padding: 10px 14px; border-radius: 18px;
      font-size: 14px; line-height: 1.4; word-break: break-word;
      animation: msgIn 0.25s;
      direction: rtl; /* Persian text inside the bubble renders RTL */
      text-align: right;
    }
    @keyframes msgIn { from { opacity: 0; transform: translateY(6px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
    .msg-bubble.sent {
      align-self: flex-end;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      color: white; border-bottom-right-radius: 4px;
    }
    .msg-bubble.received {
      align-self: flex-start;
      background: var(--surface); color: var(--text);
      border-bottom-left-radius: 4px;
    }
    .msg-bubble.voice { display: flex; align-items: center; gap: 8px; }
    .msg-bubble.voice audio { max-width: 200px; height: 32px; }
    .msg-time { font-size: 10px; opacity: 0.6; margin-top: 2px; }
    .date-divider {
      align-self: center; background: var(--surface-2);
      color: var(--text-dim); padding: 4px 12px; border-radius: 10px;
      font-size: 11px; margin: 8px 0;
    }
    /* v20: Premium typing indicator */
    .typing-indicator {
      align-self: flex-start; background: var(--surface);
      padding: 12px 16px; border-radius: 18px; border-bottom-left-radius: 4px;
      display: none; align-items: center; gap: 4px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    .typing-indicator.show { display: flex; }
    .typing-indicator .dot {
      width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
      animation: typingBounce 1.4s infinite;
    }
    .typing-indicator .dot:nth-child(2) { animation-delay: 0.2s; }
    .typing-indicator .dot:nth-child(3) { animation-delay: 0.4s; }
    @keyframes typingBounce {
      0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
      30% { transform: translateY(-8px); opacity: 1; }
    }

    /* v20: Premium chat input bar */
    .chat-input-bar {
      display: flex; gap: 8px; padding: 10px 12px max(10px, env(safe-area-inset-bottom));
      background: var(--surface); border-top: 1px solid var(--border);
      align-items: center; direction: ltr;
      box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
    }
    .chat-input {
      flex: 1; background: var(--surface-2); border: 1px solid var(--surface-2);
      color: var(--text); padding: 12px 18px; border-radius: 22px;
      font-size: 14px; font-family: inherit; direction: rtl;
      transition: all 0.2s;
    }
    .chat-input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
    .chat-send-btn {
      width: 46px; height: 46px; border-radius: 50%; border: none;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      color: white; font-size: 18px; cursor: pointer; flex-shrink: 0;
      box-shadow: 0 2px 12px rgba(255,77,109,0.3);
      transition: all 0.2s;
    }
    .chat-send-btn:active { transform: scale(0.92); }
    .chat-send-btn:disabled { opacity: 0.5; box-shadow: none; }

    /* ─── Match celebration ─── */
    .match-celebration {
      position: fixed; inset: 0; z-index: 200;
      background: linear-gradient(135deg, #ff4d6d 0%, #ff8a5b 50%, #a855f7 100%);
      display: none; flex-direction: column;
      align-items: center; justify-content: center;
      animation: matchFadeIn 0.5s;
    }
    .match-celebration.show { display: flex; }
    @keyframes matchFadeIn { from { opacity: 0; } to { opacity: 1; } }
    .match-celebration .title {
      font-size: 48px; font-weight: 900; color: white;
      text-shadow: 0 4px 20px rgba(0,0,0,0.3);
      animation: matchTitleBounce 0.8s;
    }
    @keyframes matchTitleBounce {
      0% { transform: scale(0); }
      60% { transform: scale(1.2); }
      100% { transform: scale(1); }
    }
    .match-celebration .avatars {
      display: flex; gap: -20px; margin: 30px 0;
      position: relative;
    }
    .match-celebration .avatar {
      width: 100px; height: 100px; border-radius: 50%;
      background: white center/cover; border: 4px solid white;
      box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    }
    .match-celebration .avatar:nth-child(1) { transform: rotate(-8deg) translateX(10px); z-index: 1; }
    .match-celebration .avatar:nth-child(2) { transform: rotate(8deg) translateX(-10px); z-index: 2; }
    .match-celebration .heart-icon {
      position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
      font-size: 48px; z-index: 3; animation: heartBeat 1s infinite;
    }
    @keyframes heartBeat {
      0%, 100% { transform: translate(-50%, -50%) scale(1); }
      50% { transform: translate(-50%, -50%) scale(1.2); }
    }
    .match-celebration .name-pair {
      font-size: 20px; font-weight: 700; color: white; margin-bottom: 30px;
    }
    .match-celebration .btn-row {
      display: flex; flex-direction: column; gap: 10px; width: 80%; max-width: 300px;
    }
    .match-celebration button {
      padding: 14px; border-radius: 14px; border: none;
      font-weight: 700; cursor: pointer; font-family: inherit; font-size: 16px;
    }
    .match-celebration .btn-primary {
      background: white; color: var(--accent);
    }
    .match-celebration .btn-secondary {
      background: rgba(255,255,255,0.2); color: white;
    }

    /* Confetti */
    .confetti {
      position: absolute; width: 8px; height: 8px;
      pointer-events: none; animation: confettiFall 3s linear;
    }
    @keyframes confettiFall {
      0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
      100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
    }

    /* ─── Filters modal (bottom sheet) ─── */
    .filter-modal {
      position: fixed; inset: 0; z-index: 150;
      background: rgba(0,0,0,0.5);
      backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
      display: none; align-items: flex-end;
    }
    .filter-modal.show { display: flex; animation: fadeIn 0.2s; }
    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
    @keyframes achievementPop { from { transform: translate(-50%,-50%) scale(0.5); opacity: 0; } to { transform: translate(-50%,-50%) scale(1); opacity: 1; } }
    .filter-sheet {
      background: var(--surface); width: 100%;
      border-radius: 20px 20px 0 0; padding: 20px;
      padding-bottom: max(20px, env(safe-area-inset-bottom));
      animation: sheetUp 0.3s ease;
      max-height: 80vh; overflow-y: auto;
    }
    @keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
    .filter-sheet h3 {
      font-size: 18px; font-weight: 700; color: var(--text);
      margin-bottom: 16px; text-align: center;
    }
    .filter-group { margin-bottom: 20px; }
    .filter-group .label {
      font-size: 12px; color: var(--text-dim);
      text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px;
    }
    .filter-age-row { display: flex; gap: 10px; align-items: center; }
    .filter-age-input {
      flex: 1; background: var(--surface-2); border: 1px solid var(--border);
      border-radius: 10px; padding: 10px; color: var(--text);
      font-size: 16px; font-family: inherit; text-align: center;
    }
    .filter-age-input:focus { outline: none; border-color: var(--accent); }
    .filter-gender-row { display: flex; gap: 8px; }
    .filter-gender-btn {
      flex: 1; padding: 10px; border-radius: 10px;
      background: var(--surface-2); border: 1px solid var(--border);
      color: var(--text-dim); font-size: 13px; font-weight: 600;
      cursor: pointer; font-family: inherit;
    }
    .filter-gender-btn.active {
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      color: white; border-color: var(--accent);
    }
    .filter-toggle-row {
      display: flex; justify-content: space-between; align-items: center;
      padding: 16px 0; border-bottom: 1px solid var(--border);
      transition: background 0.2s; cursor: pointer;
    }
    .filter-toggle-row:hover { background: rgba(255,255,255,0.03); }
    .filter-toggle-row:last-child { border-bottom: none; }
    .filter-toggle-row .label { font-size: 15px; color: var(--text); }
    .toggle-switch {
      width: 48px; height: 28px; border-radius: 14px;
      background: var(--surface-2); position: relative; cursor: pointer;
      transition: background 0.2s;
    }
    .toggle-switch.on { background: var(--accent); }
    .toggle-switch::after {
      content: ''; position: absolute; top: 2px; right: 2px;
      width: 20px; height: 20px; border-radius: 50%;
      background: white; transition: transform 0.2s;
    }
    .toggle-switch.on::after { transform: translateX(-20px); }
    .filter-actions {
      display: flex; gap: 10px; margin-top: 20px;
    }
    .filter-actions button {
      flex: 1; padding: 12px; border-radius: 12px; border: none;
      font-weight: 700; cursor: pointer; font-family: inherit;
    }
    .filter-actions .btn-reset {
      background: var(--surface-2); color: var(--text);
    }
    .filter-actions .btn-apply {
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      color: white;
    }

    /* ─── Profile editor ─── */
    .editor-scroll { flex: 1; overflow-y: auto; padding: 16px; }
    .editor-section {
      background: var(--surface); border-radius: 20px; padding: 20px; margin-bottom: 16px;
      box-shadow: 0 2px 12px rgba(0,0,0,0.15); transition: box-shadow 0.2s;
    }
    .editor-section:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
    .editor-section h3 {
      font-size: 16px; color: var(--text); margin-bottom: 16px; font-weight: 700;
    }
    .photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .photo-slot {
      aspect-ratio: 1; border-radius: 16px;
      background: var(--surface-2); border: 2px dashed var(--border);
      display: grid; place-items: center; cursor: pointer; position: relative;
      overflow: hidden; background-size: cover; background-position: center;
      transition: transform 0.2s;
    }
    .photo-slot:hover { transform: scale(1.03); }
    .photo-slot.has-photo { border-style: solid; border-color: var(--border); }
    .photo-slot.primary { border-color: var(--accent); border-width: 3px; }
    .photo-slot .add-icon { font-size: 24px; color: var(--text-dim); }
    .photo-slot .primary-badge {
      position: absolute; top: 4px; right: 4px;
      background: var(--accent); color: white;
      padding: 2px 6px; border-radius: 6px; font-size: 9px; font-weight: 700;
    }
    .photo-slot .reorder-btns {
      position: absolute; bottom: 4px; left: 4px; right: 4px;
      display: flex; gap: 4px; justify-content: center;
    }
    .photo-slot .reorder-btn {
      width: 24px; height: 24px; border-radius: 6px;
      background: rgba(0,0,0,0.7); color: white; border: none;
      font-size: 12px; cursor: pointer;
    }
    .photo-slot .remove-btn {
      position: absolute; top: 4px; left: 4px;
      width: 24px; height: 24px; border-radius: 50%;
      background: rgba(0,0,0,0.7); color: white; border: none;
      font-size: 12px; cursor: pointer;
    }

    .bio-textarea {
      width: 100%; background: var(--surface-2); border: 1px solid var(--border);
      border-radius: 14px; padding: 14px; color: var(--text);
      font-family: inherit; font-size: 15px; resize: none; min-height: 90px;
      transition: border-color 0.2s;
    }
    .bio-textarea:focus { outline: none; border-color: var(--accent); }

    .category-tabs {
      display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px;
      margin-bottom: 12px; -ms-overflow-style: none; scrollbar-width: none;
    }
    .category-tabs::-webkit-scrollbar { display: none; }
    .category-tab {
      padding: 10px 18px; border-radius: 14px; background: var(--surface-2);
      border: none; color: var(--text-dim); font-size: 14px; font-weight: 600;
      cursor: pointer; white-space: nowrap; font-family: inherit;
      transition: all 0.2s;
    }
    .category-tab.active {
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      color: white; transform: scale(1.05);
    }

    .chip-grid { display: flex; flex-wrap: wrap; gap: 10px; }
    .interest-chip {
      padding: 10px 18px; border-radius: 16px; background: var(--surface-2);
      border: 1px solid var(--border); color: var(--text-dim);
      font-size: 14px; font-weight: 600; cursor: pointer;
      transition: all 0.2s; font-family: inherit;
    }
    .interest-chip:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
    .interest-chip.like { background: rgba(78,164,255,0.15); color: var(--super); border-color: rgba(78,164,255,0.3); }
    .interest-chip.love { background: rgba(30,64,175,0.2); color: #60a5fa; border-color: rgba(30,64,175,0.4); }
    .interest-chip.hate { background: rgba(255,84,112,0.15); color: var(--nope); border-color: rgba(255,84,112,0.3); }
    .chip-level-legend {
      display: flex; gap: 12px; margin-top: 10px; font-size: 11px; color: var(--text-dim);
    }
    .chip-level-legend span { display: flex; align-items: center; gap: 4px; }
    .chip-level-legend .dot { width: 8px; height: 8px; border-radius: 50%; }

    .dealbreaker-grid { display: flex; flex-wrap: wrap; gap: 10px; }
    .dealbreaker-chip {
      padding: 8px 16px; border-radius: 14px; background: var(--surface-2);
      border: 1px solid var(--border); color: var(--text-dim);
      font-size: 14px; cursor: pointer; font-family: inherit; transition: all 0.2s;
    }
    .dealbreaker-chip:hover { transform: translateY(-2px); }
    .dealbreaker-chip.active { background: rgba(255,84,112,0.15); color: var(--nope); border-color: rgba(255,84,112,0.3); }

    .lifestyle-chip {
      padding: 8px 16px; border-radius: 14px; background: var(--surface-2);
      border: 1px solid var(--border); color: var(--text-dim);
      font-size: 14px; cursor: pointer; font-family: inherit; transition: all 0.2s;
    }
    .lifestyle-chip:hover { transform: translateY(-2px); }
    .lifestyle-chip.active { background: rgba(168,85,247,0.15); color: var(--boost); border-color: rgba(168,85,247,0.3); }

    .prompt-selector {
      background: var(--surface-2); border-radius: 12px; padding: 12px; margin-bottom: 8px;
    }
    .prompt-selector select {
      width: 100%; background: var(--surface-2); border: 1px solid var(--border);
      border-radius: 8px; padding: 8px; color: var(--text); font-family: inherit; font-size: 13px;
      margin-bottom: 8px;
    }
    .prompt-selector textarea {
      width: 100%; background: var(--surface-2); border: 1px solid var(--border);
      border-radius: 8px; padding: 8px; color: var(--text); font-family: inherit;
      font-size: 13px; resize: none; min-height: 50px;
    }
    .prompt-selector textarea:focus { outline: none; border-color: var(--accent); }
    .prompt-remove {
      background: var(--nope); color: white; border: none;
      padding: 4px 10px; border-radius: 6px; font-size: 11px;
      cursor: pointer; font-family: inherit; margin-top: 4px;
    }

    .save-bar {
      position: sticky; bottom: 0; left: 0; right: 0;
      background: var(--surface); backdrop-filter: blur(10px);
      border-top: 1px solid var(--border);
      padding: 12px 16px;
    }
    .save-btn {
      width: 100%; padding: 16px; border-radius: 16px; border: none;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      color: white; font-size: 17px; font-weight: 700; cursor: pointer;
      font-family: inherit; transition: all 0.2s;
      box-shadow: 0 4px 16px rgba(255,77,109,0.3);
    }
    .save-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(255,77,109,0.4); }
    .save-btn:active { transform: scale(0.97); }
    .save-btn:disabled { opacity: 0.6; }

    /* ─── Matches list ─── */
    .matches-list { flex: 1; overflow-y: auto; padding: 12px; }
    .match-row {
      display: flex; align-items: center; gap: 12px; padding: 12px;
      background: var(--surface); border-radius: 14px; margin-bottom: 8px;
      cursor: pointer; transition: transform 0.15s;
    }
    .match-row:active { transform: scale(0.98); }
    .match-row .avatar {
      width: 50px; height: 50px; border-radius: 50%;
      background: var(--surface-2) center/cover; flex-shrink: 0;
    }
    .match-row .info { flex: 1; }
    .match-row .info .n { font-weight: 700; color: var(--text); }
    .match-row .info .c { color: var(--text-dim); font-size: 11px; }

    /* ─── Shop ─── */
    .shop-scroll { flex: 1; overflow-y: auto; padding: 16px; }
    .package-card {
      background: var(--surface); border-radius: 16px; padding: 20px;
      margin-bottom: 12px; display: flex; align-items: center; gap: 16px;
      border: 1px solid var(--border); transition: transform 0.15s; position: relative; cursor: pointer;
    }
    .package-card:active { transform: scale(0.98); }
    .package-card.best-value { border-color: var(--accent); background: linear-gradient(135deg, var(--surface), rgba(255,77,109,0.05)); }
    .package-card.best-value::before {
      content: '🔥 بهترین ارزش'; position: absolute; top: -10px; right: 16px;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      color: white; padding: 3px 10px; border-radius: 8px; font-size: 10px; font-weight: 700;
    }
    .package-icon {
      width: 56px; height: 56px; border-radius: 14px;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      display: grid; place-items: center; font-size: 28px; flex-shrink: 0;
    }
    .package-info { flex: 1; }
    .package-info .name { font-weight: 700; font-size: 16px; color: var(--text); }
    .package-info .desc { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
    .package-price {
      background: var(--surface-2); padding: 8px 14px; border-radius: 12px;
      font-weight: 800; color: var(--accent-2); font-size: 15px;
    }

    /* ─── Admin ─── */
    .admin-scroll { flex: 1; overflow-y: auto; padding: 16px; }
    .admin-card {
      background: var(--surface); border-radius: 14px; padding: 12px;
      margin-bottom: 10px; display: flex; gap: 12px; align-items: flex-start;
    }
    .admin-card img { width: 80px; height: 80px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
    .admin-card .info { flex: 1; }
    .admin-card .info .name { font-weight: 700; color: var(--text); font-size: 14px; }
    .admin-card .info .meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
    .admin-card .actions { display: flex; gap: 6px; margin-top: 8px; }
    .admin-btn { padding: 6px 14px; border-radius: 10px; border: none; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
    .admin-btn.approve { background: var(--like); color: #0b0d12; }
    .admin-btn.reject, .admin-btn.ban { background: var(--nope); color: white; }
    .admin-btn.dismiss { background: var(--surface-2); color: var(--text-dim); }
    .admin-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
    .admin-tab {
      flex: 1; padding: 10px; border-radius: 10px;
      background: var(--surface-2); border: none; color: var(--text-dim);
      font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
    }
    .admin-tab.active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; }

    .spinner {
      width: 40px; height: 40px;
      border: 3px solid var(--surface-2); border-top-color: var(--accent);
      border-radius: 50%; animation: spin 0.8s linear infinite; margin: 60px auto;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    .reveal-banner {
      background: linear-gradient(90deg, rgba(78,164,255,0.2), rgba(255,138,91,0.2));
      color: var(--text); padding: 8px 14px; font-size: 11px; text-align: center;
    }

    /* Overlay (generic) */
    .overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.85);
      backdrop-filter: blur(8px); display: none;
      align-items: center; justify-content: center; z-index: 100; padding: 24px;
    }
    .overlay.show { display: flex; animation: fadeIn 0.3s; }
    .overlay-card {
      background: var(--surface); border-radius: 24px;
      padding: 32px 24px; max-width: 360px; text-align: center; width: 100%;
    }
    .overlay-card .hearts { font-size: 60px; }
    .overlay-card h2 {
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
      font-size: 28px; margin: 12px 0;
    }
    .overlay-card p { color: var(--text-dim); margin: 0 0 22px; }
    .overlay-card .btn-row { display: flex; gap: 10px; }
    .overlay-card button {
      flex: 1; padding: 12px; border: none; border-radius: 12px;
      font-weight: 700; cursor: pointer; font-family: inherit;
    }
    .overlay-card .primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; }
    .overlay-card .secondary { background: var(--surface-2); color: var(--text); }

    /* Help tips */
    .help-tip {
      background: rgba(255,138,91,0.08); border: 1px solid rgba(255,138,91,0.2);
      border-radius: 10px; padding: 8px 12px; margin: 8px 0;
      font-size: 11px; color: var(--text-dim); line-height: 1.5;
      display: flex; gap: 6px; align-items: flex-start;
    }
    .help-tip .icon { flex-shrink: 0; font-size: 14px; }
    .help-tip strong { color: var(--accent-2); font-weight: 600; }
