  * { margin: 0; padding: 0; box-sizing: border-box; }

  :root {
    --bg: #171717;
    --surface: rgba(255,255,255,0.06);
    --surface2: rgba(255,255,255,0.10);
    --border: rgba(255,255,255,0.10);
    --gold: #D4A853;
    --gold-dim: rgba(212,168,83,0.15);
    --text: #F5F0E8;
    --text-dim: rgba(245,240,232,0.50);
    --pass: #FF4B6E;
    --go: #4CD97B;
  }
  .light {
    --bg: #ECEAE5;
    --surface: rgba(255,255,255,0.72);
    --surface2: rgba(255,255,255,0.90);
    --border: rgba(0,0,0,0.08);
    --text: #1A1410;
    --text-dim: rgba(26,20,16,0.48);
    --gold-dim: rgba(212,168,83,0.18);
  }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, 'SF Pro Display', 'Inter', sans-serif;
    height: 100dvh;
    overflow: hidden;
    transition: background 0.35s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  /* ── Background blur ── */
  .bg-blur {
    position: fixed;
    inset: -30px;
    background-size: cover;
    background-position: center;
    filter: blur(22px) saturate(1.5) brightness(0.50);
    opacity: 0.60;
    transition: background-image 0.7s ease;
    z-index: 0;
  }
  .light .bg-blur { filter: blur(22px) saturate(1.3) brightness(0.88); opacity: 0.28; }

  /* ── Header ── */
  .header {
    position: fixed;
    top: 0; left: 0; right: 0;
    padding: 54px 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 20;
  }
  .logo { font-size: 17px; font-weight: 600; letter-spacing: -0.3px; color: var(--gold); }
  .logo span { color: var(--text); font-weight: 300; }
  .counter-pill {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: var(--text-dim);
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    padding: 5px 12px;
    border-radius: 20px;
  }
  .mode-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: transform 0.15s;
  }
  .mode-btn:active { transform: scale(0.92); }

  /* ── Card stack ── */
  .card-area {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 96px 18px 150px;
    z-index: 5;
  }
  .card-stack {
    position: relative;
    width: 100%;
    max-width: 375px;
  }
  .card-shadow {
    position: absolute;
    left: 14px; right: 14px;
    top: 10px; bottom: -6px;
    border-radius: 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(16px);
    z-index: 0;
  }

  .card {
    position: relative;
    z-index: 1;
    border-radius: 26px;
    overflow: hidden;
    background: var(--surface2);
    border: 1px solid var(--border);
    backdrop-filter: blur(24px);
    box-shadow: 0 24px 64px rgba(0,0,0,0.4);
    touch-action: none;
    cursor: grab;
    transition: box-shadow 0.2s;
    -webkit-user-select: none;
  }
  .card:active { cursor: grabbing; }
  .card * { pointer-events: none; }
  .card .thumb, .card .info-btn { pointer-events: auto; }

  .card.right { box-shadow: 0 24px 64px rgba(76,217,123,0.3); }
  .card.left  { box-shadow: 0 24px 64px rgba(255,75,110,0.3); }

  /* Hero image */
  .card-img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    display: block;
  }
  .card-img-fade {
    position: absolute;
    left: 0; right: 0;
    bottom: 0;
    height: 52%;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%);
    pointer-events: none;
  }

  /* Swipe stamps */
  .stamp {
    position: absolute;
    top: 22px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 2.5px;
    border: 3px solid;
    padding: 5px 12px;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.12s;
    pointer-events: none;
    z-index: 5;
  }
  .stamp-yes { left: 18px; color: var(--go); border-color: var(--go); transform: rotate(-14deg); }
  .stamp-no  { right: 18px; color: var(--pass); border-color: var(--pass); transform: rotate(14deg); }
  .card.right .stamp-yes { opacity: 1; }
  .card.left  .stamp-no  { opacity: 1; }

  /* Card info section */
  .card-info { padding: 13px 15px 8px; }
  .row1 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3px;
  }
  .card-name {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.15;
    flex: 1;
    padding-right: 8px;
  }
  .info-btn {
    flex-shrink: 0;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: transform 0.15s;
    pointer-events: auto;
    color: var(--text-dim);
  }
  .info-btn:active { transform: scale(0.88); }

  .card-location {
    font-size: 12px;
    color: var(--text-dim);
    letter-spacing: 0.1px;
    margin-bottom: 9px;
  }

  /* Tags — single horizontal scroll row */
  .tags {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 9px;
  }
  .tags::-webkit-scrollbar { display: none; }
  .tag {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--text-dim);
    letter-spacing: 0.15px;
    white-space: nowrap;
  }
  .tag.gold { color: var(--gold); border-color: rgba(212,168,83,0.28); background: var(--gold-dim); }

  /* Rate + score row */
  .meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
  }
  .card-rate {
    font-size: 13px;
    font-weight: 700;
    color: var(--gold);
    white-space: nowrap;
    letter-spacing: -0.1px;
  }
  .score-bar-wrap {
    flex: 1;
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
  }
  .score-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), #E8C47A);
    border-radius: 2px;
    transition: width 0.65s cubic-bezier(0.34,1.56,0.64,1);
  }
  .score-num {
    font-size: 11px;
    font-weight: 600;
    color: var(--gold);
    white-space: nowrap;
    letter-spacing: -0.1px;
  }

  /* Thumbnail strip */
  .thumbs {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 9px 15px 13px;
  }
  .thumbs::-webkit-scrollbar { display: none; }
  .thumb {
    flex-shrink: 0;
    width: 50px;
    height: 38px;
    border-radius: 7px;
    object-fit: cover;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: opacity 0.2s, border-color 0.2s;
    cursor: pointer;
  }
  .thumb.active { border-color: var(--gold); opacity: 1; }

  /* ── Bottom action bar ── */
  .actions {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    padding: 14px 28px max(32px, env(safe-area-inset-bottom));
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    z-index: 20;
    background: linear-gradient(to top, var(--bg) 55%, transparent);
  }

  .btn {
    display: flex; flex-direction: column;
    align-items: center; gap: 5px;
    cursor: pointer;
  }
  .btn:active .btn-c { transform: scale(0.90); }

  .btn-c {
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--border);
    backdrop-filter: blur(20px);
    transition: transform 0.12s;
  }
  .btn.skip  .btn-c { width: 58px; height: 58px; font-size: 24px; background: rgba(255,75,110,0.10); border-color: rgba(255,75,110,0.28); }
  .btn.pitch .btn-c { width: 70px; height: 70px; font-size: 28px; background: rgba(76,217,123,0.10); border-color: rgba(76,217,123,0.28); }
  .btn.auto  .btn-c { width: 58px; height: 58px; font-size: 22px; background: var(--gold-dim); border-color: rgba(212,168,83,0.28); }

  .btn-lbl {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
  }
  .btn.skip  .btn-lbl { color: rgba(255,75,110,0.65); }
  .btn.pitch .btn-lbl { color: rgba(76,217,123,0.75); }
  .btn.auto  .btn-lbl { color: rgba(212,168,83,0.75); }

  /* Agent banner */
  .agent-banner {
    position: fixed;
    top: 100px; left: 50%; transform: translateX(-50%);
    background: var(--gold-dim);
    border: 1px solid rgba(212,168,83,0.35);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 11px; font-weight: 500;
    color: var(--gold);
    display: flex; align-items: center; gap: 7px;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
    white-space: nowrap;
  }
  .agent-banner.show { opacity: 1; }
  .pulse { width: 6px; height: 6px; background: var(--gold); border-radius: 50%; animation: pulse 1.4s infinite; }
  @keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.35;transform:scale(0.65)} }

  /* Toast */
  .toast {
    position: fixed;
    bottom: 136px; left: 50%; transform: translateX(-50%);
    padding: 9px 18px;
    border-radius: 20px;
    font-size: 13px; font-weight: 600;
    z-index: 30;
    opacity: 0;
    transition: opacity 0.18s;
    pointer-events: none;
    white-space: nowrap;
  }
  .toast.show { opacity: 1; }
  .toast.yes  { background: rgba(76,217,123,0.92); color: #fff; }
  .toast.no   { background: rgba(255,75,110,0.92); color: #fff; }
  .toast.auto { background: rgba(212,168,83,0.92); color: #111; }

