.header p { font-size: 13px; color: var(--muted); max-width: 300px; margin: 0 auto; line-height: 1.4; }

  .hidden { display: none !important; }

  /* ── Top bar: brand + notif bell + username + logout (mirrors /gram/'s own) ── */
  .rp-top-bar {
    /* Stacks directly below the platform strip (src/base.css), which is
       pinned above it at top:0 -- 58px is that strip's fixed height (8px
       padding + 42px card + 8px padding), never variable. */
    position: sticky; top: 58px; z-index: 90;
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px; margin-bottom: 14px;
    background: rgba(255,255,255,.85); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
  }
  .rp-brand { display: flex; align-items: center; text-decoration: none; }
  .rp-brand img { height: 30px; width: auto; display: block; }
  #rp-top-bar-user { display: flex; align-items: center; gap: 10px; }
  #rp-top-username-link { text-decoration: none; }
  #rp-top-username-link:active #rp-top-username { opacity: .6; }
  #rp-top-username { font-size: 12.5px; color: var(--muted); font-weight: 600; }
  .btn-logout {
    padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 700;
    border: 1.5px solid var(--line); background: transparent; color: var(--muted);
    cursor: pointer; transition: border-color .15s, color .15s;
    font-family: 'Sora', sans-serif;
  }
  .btn-logout:hover { border-color: #db2777; color: #db2777; }
  .btn-login-sm {
    background: linear-gradient(120deg,#7c3aed,#a855f7); color: #fff; border: none;
    border-radius: 999px; padding: 8px 16px; font-family: 'Sora', sans-serif;
    font-size: 12.5px; font-weight: 700; cursor: pointer;
    box-shadow: 0 4px 14px rgba(124,58,237,.3);
  }

  .bell-btn {
    position: relative; background: none; border: none; cursor: pointer;
    font-size: 19px; padding: 4px; color: var(--muted); line-height: 1;
  }
  .bell-badge {
    position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 3px;
    border-radius: 999px; background: #db2777; color: #fff; font-size: 10px; font-weight: 800;
    display: flex; align-items: center; justify-content: center; font-family: 'Sora', sans-serif;
  }
  .notif-panel {
    position: fixed; top: 56px; right: 12px; width: min(360px, calc(100vw - 24px));
    max-height: 70vh; overflow-y: auto; background: #fff; border-radius: 18px;
    box-shadow: 0 16px 40px -10px rgba(0,0,0,.3); z-index: 150;
  }
  .notif-head {
    display: flex; align-items: center; justify-content: space-between; padding: 12px 14px;
    border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff;
  }
  .notif-head h3 { font-size: 13.5px; font-weight: 800; }
  .notif-markall { background: none; border: none; color: #9333ea; font-size: 11.5px; font-weight: 700; cursor: pointer; font-family: 'Sora', sans-serif; }
  .notif-row {
    display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer;
    border-bottom: 1px solid var(--line); background: none; width: 100%; text-align: left;
    font-family: 'Sora', sans-serif;
  }
  .notif-row.unread { background: #fdf2fb; }
  .notif-row:hover { background: #fbe9f8; }
  .notif-avatar { flex-shrink: 0; }
  .notif-text { flex: 1; font-size: 12.5px; color: var(--ink); line-height: 1.35; }
  .notif-text b { font-weight: 800; }
  .notif-time { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
  .notif-empty { padding: 30px 16px; text-align: center; color: var(--muted); font-size: 12.5px; }
  .notif-loadmore { display: block; width: 100%; padding: 10px; border: none; background: none; color: #9333ea; font-weight: 700; font-size: 12px; cursor: pointer; font-family: 'Sora', sans-serif; }

  /* ── Central leaderboard ── */
  .lb-section {
    --lb-g1: #7c3aed; --lb-g2: #5b21b6; --lb-g3: #3b0764;
    margin-top: 12px; background: linear-gradient(165deg, var(--lb-g1) 0%, var(--lb-g2) 55%, var(--lb-g3) 100%);
    border-radius: 22px; padding: 18px 14px 14px; box-shadow: 0 14px 32px -10px rgba(76,29,149,.55);
    transition: background .4s ease;
  }
  .lb-title { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 13px; text-align: center; margin-bottom: 12px; color: #ede9fe; letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
  .lb-tabs { display: flex; gap: 6px; background: rgba(255,255,255,.12); border: none; border-radius: 12px; padding: 4px; margin-bottom: 8px; }
  .lb-tab { flex: 1; border: none; background: transparent; padding: 9px 4px; border-radius: 9px; font-family: 'Sora', sans-serif; font-size: 12px; font-weight: 700; color: #ddd6fe; cursor: pointer; }
  .lb-tab.active { background: linear-gradient(100deg, #fbbf24, #f59e0b); color: #4c1d95; }
  .lb-chiprow { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; cursor: grab; touch-action: pan-x; }
  .lb-chiprow::-webkit-scrollbar { display: none; }
  .lb-chiprow.dragging { cursor: grabbing; scroll-snap-type: none; }
  .lb-chiprow.dragging .lb-chip { pointer-events: none; }
  .lb-chiprow.has-overflow { -webkit-mask-image: linear-gradient(to right, #000 90%, transparent 100%); mask-image: linear-gradient(to right, #000 90%, transparent 100%); }
  .lb-chip { flex-shrink: 0; display: flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.1); border-radius: 999px; padding: 7px 14px 7px 8px; font-family: 'Sora', sans-serif; font-size: 12.5px; font-weight: 700; color: #ede9fe; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
  .lb-chip img { width: 22px; height: 22px; border-radius: 7px; object-fit: cover; flex-shrink: 0; }
  .lb-chip.active { background: linear-gradient(100deg, #fbbf24, #f59e0b); border-color: transparent; color: #4c1d95; }
  .lb-list { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; background: transparent; border: none; padding: 4px 0 0; scrollbar-width: none; -ms-overflow-style: none; }
  .lb-list::-webkit-scrollbar { display: none; }
  .lb-loading, .lb-empty { text-align: center; color: #ddd6fe; font-size: 13px; padding: 24px 0; }
  .lb-row2 {
    display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; cursor: pointer;
    background: linear-gradient(100deg, var(--lb-g2), var(--lb-g1)); box-shadow: 0 3px 8px -4px rgba(0,0,0,.35);
    transition: transform .12s, background .4s ease;
  }
  .lb-row2:active { transform: scale(.98); }
  .lb-row2.me { background: linear-gradient(100deg, #f59e0b, #fbbf24); }
  .lb-rank2 {
    font-weight: 800; font-size: 11px; color: #fff; width: 19px; height: 19px; line-height: 19px; text-align: center;
    flex-shrink: 0; border-radius: 50%; background: rgba(255,255,255,.2);
  }
  .lb-rank2 img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
  .lb-row2.me .lb-rank2 { color: #92400e; background: rgba(255,255,255,.5); }
  .lb-name2 { flex: 1; font-weight: 700; font-size: 12.5px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lb-row2.me .lb-name2 { color: #4c1d95; }
  .lb-you { font-size: 9.5px; font-weight: 800; color: #fde68a; margin-left: 4px; }
  .lb-row2.me .lb-you { color: #92400e; }
  .lb-score2 { font-weight: 800; font-size: 12.5px; color: #fde68a; flex-shrink: 0; }
  .lb-row2.me .lb-score2 { color: #7c2d12; }
  .lb-guest-cta { text-align: center; padding: 12px; margin-top: 6px; font-size: 13px; font-weight: 700; color: #fde68a; cursor: pointer; }

  /* ── Ranking podium (top 3) ── */
  .lb-podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; padding: 8px 2px 20px; }
  .lb-podium-slot { display: flex; flex-direction: column; align-items: center; width: 31%; position: relative; cursor: pointer; }
  .lb-podium-rank {
    width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; margin-bottom: 6px;
    font-size: 12px; font-weight: 800; color: #fff; background: rgba(255,255,255,.2);
  }
  .lb-podium-rank img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
  /* display:flex (not the div default block) makes this wrapper's own box hug
     the avatar image exactly -- a plain block div here picks up a few extra
     px of inline-baseline whitespace under the img, so it renders taller than
     wide and the gold ring (a box-shadow keyed to this element) traces an
     oval instead of a circle. */
  .lb-podium-avatar { margin-bottom: 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
  .lb-podium-slot.rank1 .lb-podium-avatar {
    animation: podiumGlow 2.2s ease-in-out infinite, podiumPulse 1.8s ease-in-out infinite;
    border-radius: 50%;
  }
  .lb-podium-slot.rank2 .lb-podium-avatar, .lb-podium-slot.rank3 .lb-podium-avatar {
    animation: podiumBounce 1.6s ease-in-out infinite;
  }
  .lb-podium-slot.rank3 .lb-podium-avatar { animation-delay: .25s; }
  .lb-crown { line-height: 1; margin-bottom: 6px; animation: crownBounce 1.8s ease-in-out infinite; filter: drop-shadow(0 3px 6px rgba(0,0,0,.45)); }
  .lb-crown img { width: 44px; height: 44px; object-fit: contain; }
  .lb-podium-name { font-size: 11.5px; font-weight: 700; color: #ede9fe; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 2px; }
  .lb-podium-slot.rank1 .lb-podium-name { font-size: 13px; margin-top: 2px; }
  .lb-podium-score { font-size: 13px; font-weight: 800; color: #fde68a; }
  .lb-podium-slot.me .lb-podium-name { color: #fde68a; }
  .lb-podium-slot.me .lb-podium-avatar { box-shadow: 0 0 0 3px #fde68a; border-radius: 50%; }
  @keyframes podiumGlow {
    0%, 100% { box-shadow: 0 0 0 3px rgba(251,191,36,.6), 0 0 14px 2px rgba(251,191,36,.4); }
    50%      { box-shadow: 0 0 0 4px rgba(251,191,36,.9), 0 0 22px 6px rgba(251,191,36,.6); }
  }
  @keyframes podiumPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
  }
  @keyframes podiumBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
  }
  @keyframes crownBounce {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50%      { transform: translateY(-3px) rotate(4deg); }
  }
  @media (prefers-reduced-motion: reduce) {
    .lb-podium-slot.rank1 .lb-podium-avatar, .lb-podium-slot.rank2 .lb-podium-avatar, .lb-podium-slot.rank3 .lb-podium-avatar, .lb-crown { animation: none; }
  }

  /* ── Public player profile modal ── */
  .pp-overlay {
    position: fixed; inset: 0; z-index: 200; background: rgba(36,26,18,.55);
    display: flex; align-items: flex-end; justify-content: center;
    backdrop-filter: blur(2px);
  }
  .pp-overlay.hidden { display: none; }
  .pp-sheet {
    width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto;
    background: var(--surface); border-radius: 22px 22px 0 0; padding: 20px 18px 28px;
    position: relative; box-shadow: 0 -10px 30px -8px rgba(36,26,18,.3);
  }
  @media (min-width: 560px) {
    .pp-overlay { align-items: center; }
    .pp-sheet { border-radius: 22px; max-height: 82vh; }
  }
  .pp-close {
    position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%;
    border: none; background: var(--bg); color: var(--muted); font-size: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
  }
  .pp-header { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0 16px; }
  .pp-avatar-wrap { width: 72px; height: 72px; }
  .pp-avatar-skel { width: 72px; height: 72px; border-radius: 50%; background: var(--bg); }
  .pp-username { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 18px; color: var(--ink); }
  .pp-tabs { display: flex; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
  .pp-tab { flex: 1; border: none; background: transparent; padding: 9px 4px; border-radius: 9px; font-family: 'Sora', sans-serif; font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
  .pp-tab-icon { width: 15px; height: 15px; object-fit: contain; flex-shrink: 0; }
  .pp-tab.active { background: linear-gradient(100deg, var(--accent2), var(--accent)); color: #fff; }
  .pp-tab-content.hidden { display: none; }
  .pp-ach-count { font-size: 12px; color: var(--muted); font-weight: 700; margin-bottom: 12px; }
  .pp-ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  @media (min-width: 400px) { .pp-ach-grid { grid-template-columns: repeat(4, 1fr); } }
  .pp-ach-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 14px 6px; border-radius: 18px; border: 2px solid var(--line);
    background: var(--bg); text-align: center; cursor: pointer;
  }
  /* Soft pink/purple to match PopGram's own brand, not the amber/gold that
     clashed with it. */
  .pp-ach-item.unlocked {
    border-color: #e2a9f3;
    background: linear-gradient(155deg, #fdf6ff 0%, #f6e8ff 55%, #ecd3ff 100%);
    box-shadow: 0 8px 20px -8px rgba(147,51,234,.35), inset 0 1px 0 rgba(255,255,255,.8);
  }
  .pp-ach-icon {
    width: 46px; height: 46px; border-radius: 50%; position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center; font-size: 22px;
  }
  .pp-ach-item.unlocked .pp-ach-icon {
    background: radial-gradient(circle at 35% 30%, #f0abfc, #9333ea 75%);
    box-shadow: 0 4px 12px rgba(147,51,234,.4), inset 0 2px 3px rgba(255,255,255,.5), inset 0 -3px 5px rgba(88,28,135,.4);
  }
  .pp-ach-item.unlocked .pp-ach-icon::before {
    content: ''; position: absolute; inset: -50%;
    background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.85) 50%, transparent 60%);
    background-size: 250% 250%; animation: ppAchShine 3.2s ease-in-out .6s infinite;
  }
  @keyframes ppAchShine {
    0%, 30%, 100% { background-position: -60% -60%; }
    55%           { background-position: 60% 60%; }
  }
  .pp-ach-item.locked .pp-ach-icon { background: #f1f5f9; filter: grayscale(1) opacity(.5); }
  .pp-ach-icon img { width: 70%; height: 70%; object-fit: contain; position: relative; z-index: 1; }
  .pp-ach-name { font-size: 10px; font-weight: 800; letter-spacing: .03em; line-height: 1.2; color: var(--ink); }
  .pp-ach-item.locked .pp-ach-name { color: var(--muted); }
  .pp-ach-mini-progress { font-size: 9px; font-weight: 800; color: #a855f7; }
  .pp-ach-item.locked .pp-ach-mini-progress { color: var(--muted); }

  /* ── Achievement detail modal (public profile) ── */
  .pp-ach-detail-sheet { text-align: center; padding-bottom: 28px; }
  .pp-ach-detail-icon {
    width: 84px; height: 84px; margin: 4px auto 14px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 42px;
    position: relative; overflow: hidden;
    background: radial-gradient(circle at 35% 30%, #f0abfc, #9333ea 75%);
    box-shadow: 0 8px 22px rgba(147,51,234,.4), inset 0 3px 5px rgba(255,255,255,.5), inset 0 -4px 7px rgba(88,28,135,.4);
  }
  .pp-ach-detail-icon:not(.locked)::before {
    content: ''; position: absolute; inset: -50%;
    background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.85) 50%, transparent 60%);
    background-size: 250% 250%; animation: ppAchShine 3.2s ease-in-out .6s infinite;
  }
  .pp-ach-detail-icon.locked { background: #f1f5f9; box-shadow: none; filter: grayscale(1) opacity(.6); }
  .pp-ach-detail-icon img { width: 70%; height: 70%; object-fit: contain; position: relative; z-index: 1; }
  .pp-ach-detail-name { font-size: 19px; font-weight: 900; color: var(--ink); margin-bottom: 6px; }
  .pp-ach-detail-status {
    display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .04em;
    text-transform: uppercase; padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
  }
  .pp-ach-detail-status.unlocked { background: #f3e8ff; color: #7e22ce; }
  .pp-ach-detail-status.locked   { background: var(--bg); color: var(--muted); }
  .pp-ach-detail-desc { font-size: 14px; color: var(--muted); line-height: 1.5; max-width: 320px; margin: 0 auto; }
  .pp-ach-detail-progress { max-width: 260px; margin: 0 auto 14px; }
  .pp-ach-detail-progress-bar { height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; }
  .pp-ach-detail-progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #9333ea, #ec4899); transition: width .4s ease; }
  .pp-ach-detail-progress-label { font-size: 11px; font-weight: 700; color: var(--muted); margin-top: 5px; }

  .pp-gram-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .pp-gram-cell { display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 6px; }
  .pp-gram-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }

  /* ── Score rows (public profile) ── */
  .score-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--line); }
  .score-row:last-child { border-bottom: none; }
  .score-icon {
    width: 38px; height: 38px; border-radius: 12px; background: var(--bg); border: 1.5px solid var(--line);
    display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; overflow: hidden;
  }
  .score-icon img { width: 100%; height: 100%; object-fit: cover; }
  .score-game { font-size: 14px; font-weight: 700; color: var(--ink); }
  .score-num { font-size: 18px; font-weight: 900; font-family: monospace; color: var(--accent); }

  /* ── Logo ── */
  .rp-logo { animation: rpLogoFloat 3.4s ease-in-out infinite; }
  @keyframes rpLogoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-5px) rotate(-1.2deg); }
  }
  @media (prefers-reduced-motion: reduce) {
    .rp-logo { animation: none; }
  }

  /* ── Game cards ── */
  .games { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
  .game-card {
    position: relative; display: block; text-decoration: none; color: inherit;
    border-radius: 20px; overflow: hidden;
    aspect-ratio: 4 / 5;
    box-shadow: 0 10px 30px -8px rgba(36,26,18,.28), 0 2px 8px rgba(36,26,18,.08);
    border: 1px solid rgba(255,255,255,.6);
    transition: transform .18s cubic-bezier(.34,1.4,.64,1), box-shadow .18s;
  }
  .game-card:active { transform: scale(.97); }
  .game-card img.shot {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    transform: scale(1.02);
    animation: shotZoom 10s ease-in-out infinite alternate;
  }
  @keyframes shotZoom {
    from { transform: scale(1.02); }
    to   { transform: scale(1.14); }
  }
  @media (prefers-reduced-motion: reduce) {
    .game-card img.shot { animation: none; }
  }
  .game-card .scrim {
    position: absolute; inset: 0;
    background: linear-gradient(0deg, var(--scrim-1) 0%, var(--scrim-2) 48%, transparent 70%);
  }
  .game-card .chip {
    position: absolute; top: 9px; left: 9px;
    display: inline-flex; align-items: center; gap: 5px;
    font-family: 'Sora', sans-serif; font-size: 9.5px; font-weight: 800; letter-spacing: .03em;
    color: #fff; background: rgba(255,255,255,.16); backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 999px; padding: 4px 9px 4px 7px;
    max-width: calc(100% - 18px); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  }
  .game-card .chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--chip-color); box-shadow: 0 0 0 2px rgba(255,255,255,.18); flex-shrink: 0; }
  .game-card .badge {
    position: absolute; top: 9px; right: 9px;
    font-family: 'Sora', sans-serif; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    color: #241a12; background: linear-gradient(135deg, #ffe27a, #ffc94a);
    border-radius: 999px; padding: 4px 9px;
    box-shadow: 0 2px 8px rgba(217,119,6,.35);
  }
  .game-card .body {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 12px 13px;
    color: #fff;
  }
  .game-card .game-name {
    font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 17px; line-height: 1.1;
    margin-bottom: 3px; text-shadow: 0 2px 10px rgba(0,0,0,.35);
  }
  .game-card .game-tag {
    display: none;
  }
  .game-card .game-cta {
    display: inline-flex; align-items: center; gap: 4px;
    font-family: 'Sora', sans-serif; font-size: 11.5px; font-weight: 800; letter-spacing: .02em;
    color: #241a12; background: #fff;
    padding: 6px 11px; border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0,0,0,.22);
  }
  .game-card .game-cta .arw { transition: transform .18s; }
  .game-card:active .game-cta .arw { transform: translateX(3px); }

  /* Pop Match gets a distinct glowing border instead of the shared subtle
     one -- it's the live 1v1 mode, worth standing out from the pack. */
  .card-match {
    border: 2px solid var(--match);
    box-shadow: 0 0 0 3px rgba(225,29,72,.22), 0 10px 26px -8px rgba(225,29,72,.45), 0 2px 8px rgba(36,26,18,.08);
  }

  .card-connect .chip { --chip-color: var(--connect); }
  .card-block   .chip { --chip-color: var(--block); }
  .card-arrow   .chip { --chip-color: var(--arrow); }
  .card-sort    .chip { --chip-color: var(--sort); }
  .card-merge   .chip { --chip-color: var(--merge); }
  .card-match   .chip { --chip-color: var(--match); }
  .card-snake   .chip { --chip-color: #16a34a; }
  .card-bola    .chip { --chip-color: var(--bola); }

  .card-connect { --scrim-1: rgba(4,36,32,.85);  --scrim-2: rgba(4,36,32,.46); }
  .card-block   { --scrim-1: rgba(33,14,64,.85); --scrim-2: rgba(33,14,64,.46); }
  .card-arrow   { --scrim-1: rgba(56,32,4,.85);  --scrim-2: rgba(56,32,4,.46); }
  .card-sort    { --scrim-1: rgba(58,10,34,.85); --scrim-2: rgba(58,10,34,.46); }
  .card-merge   { --scrim-1: rgba(4,32,52,.85);  --scrim-2: rgba(4,32,52,.46); }
  .card-match   { --scrim-1: rgba(56,4,16,.85);  --scrim-2: rgba(56,4,16,.5); background: linear-gradient(135deg, #3d050c, #920b19); }
  .card-snake   { --scrim-1: rgba(4,40,20,.85);  --scrim-2: rgba(4,40,20,.5); background: linear-gradient(135deg, #052e16, #15803d); }
  .card-bola    { --scrim-1: rgba(20,4,40,.85);  --scrim-2: rgba(20,4,40,.5); background: linear-gradient(135deg, #0a0a2e, #4c1d95); }

  .card-connect img.shot { animation-delay: 0s; }
  .card-block   img.shot { animation-delay: -2s; }
  .card-arrow   img.shot { animation-delay: -4s; }
  .card-sort    img.shot { animation-delay: -6s; }
  .card-merge   img.shot { animation-delay: -8s; }
  .card-match   img.shot { animation-delay: -10s; }
  .card-bola    img.shot { animation-delay: -12s; }

  /* Pop Snake, same distinct-border treatment as Pop Match -- both are the
     live/real-time modes, worth standing out from the single-player games. */
  .card-snake {
    border: 2px solid #16a34a;
    box-shadow: 0 0 0 3px rgba(22,163,74,.22), 0 10px 26px -8px rgba(22,163,74,.45), 0 2px 8px rgba(36,26,18,.08);
  }

  /* Animated social banner: movement uses only a transformed gradient layer. */
  .gram-highlight {
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; gap: 12px; align-items: center;
    margin-top: 22px; padding: 20px;
    border-radius: 24px; text-decoration: none; color: #322a28;
    /* Card fill stays plain white/cream (padding-box layer); only the
       border ring itself carries the logo's own orange->magenta->purple
       gradient (border-box layer, showing through the transparent border).
       overflow:hidden clips ::before/::after to the padding box, so they
       can never paint over this border ring regardless of stacking order. */
    background:
      linear-gradient(#fff8ec, #fff8ec) padding-box,
      linear-gradient(135deg, #ffb648, #f02d8b 45%, #7c3aed 85%) border-box;
    box-shadow: 0 12px 28px -16px #75583255, inset 0 1px 0 #fff;
    border: 3px solid transparent;
    transition: transform .2s;
  }
  .gram-highlight::before {
    content: ''; position: absolute; inset: -55%; z-index: -2; pointer-events: none;
    background: radial-gradient(ellipse at 25% 30%, #fffdf7 0%, transparent 48%),
      radial-gradient(ellipse at 75% 65%, #f0dfbe 0%, transparent 48%),
      linear-gradient(120deg, #fffaf1, #f6eddf 55%, #f4e2c5);
    animation: gramColorFlow 12s ease-in-out infinite alternate;
  }
  .gram-highlight::after {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(circle at 88% 15%, #ffffff55 0 1px, transparent 2px),
      radial-gradient(circle at 14% 82%, #ffffff55 0 2px, transparent 3px),
      linear-gradient(115deg, #ffffff12, transparent 55%);
  }
  @keyframes gramColorFlow {
    from { transform: translate(-7%, -4%) rotate(-12deg); }
    to { transform: translate(7%, 4%) rotate(16deg); }
  }
  .gram-highlight:active { transform: scale(.985); }
  .gram-highlight:focus-visible { outline: 3px solid #d97706; outline-offset: 4px; }
  .gram-highlight-icon { position: relative; order: 2; width: 30%; flex: 0 0 30%; transform: rotate(6deg); }
  .gram-highlight-icon img { display: block; width: 100%; height: auto; filter: drop-shadow(0 8px 12px #26074755); }
  .gram-highlight-body { min-width: 0; flex: 1; position: relative; z-index: 1; }
  .gram-highlight-eyebrow {
    display: flex; align-items: center; gap: 6px;
    font-family: 'Sora', sans-serif; font-size: 9px; font-weight: 800;
    letter-spacing: .07em; text-transform: uppercase; color: #776047; margin-bottom: 7px;
  }
  .gram-highlight-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: #ae8550; flex-shrink: 0; }
  .gram-highlight-title { width: 220px; max-width: 100%; margin: 0 0 6px -3px; overflow: hidden; }
  .gram-highlight-title img { display: block; width: 100%; height: auto; margin-top: -5%; margin-bottom: -5%; }
  .gram-highlight-desc { font-family: 'Sora', sans-serif; font-size: 11px; line-height: 1.5; color: #574b41; margin: 0 0 12px; }
  .gram-highlight-cta {
    display: inline-flex; align-items: center; gap: 16px;
    font-family: 'Sora', sans-serif; font-size: 11px; font-weight: 800;
    color: #fff; background: #322839; padding: 10px 16px; border-radius: 999px;
    box-shadow: 0 5px 14px #32283925;
  }
  .gram-highlight-cta .arw { transition: transform .2s; }
  .gram-highlight:hover .gram-highlight-cta .arw { transform: translateX(4px); }
  @media (max-width: 380px) {
    .gram-highlight { gap: 8px; padding: 18px 14px; }
    .gram-highlight-icon { width: 26%; flex-basis: 26%; }
    .gram-highlight-eyebrow { font-size: 8px; letter-spacing: .02em; }
  }
  @media (prefers-reduced-motion: reduce) {
    .gram-highlight::before { animation: none; }
    .gram-highlight, .gram-highlight-cta .arw { transition: none; }
  }

  .fame-row {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px;
    margin-top: 28px; padding-top: 4px;
  }
  .fame-lbl { font-size: 11px; font-weight: 800; color: var(--muted); margin-right: 2px; }
  .fame-row a {
    font-size: 11px; font-weight: 700; color: var(--accent2); text-decoration: none;
    background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
    padding: 4px 10px; transition: border-color .15s, color .15s;
  }
  .fame-row a:hover { border-color: var(--accent2); color: var(--accent); }

  .footer {
    text-align: center; margin-top: 14px; padding-top: 16px;
    font-size: 12px; color: var(--muted);
  }
  .footer a { color: var(--accent2); font-weight: 700; text-decoration: none; }
