.lb-row:nth-child(1) .lb-rank { color: #eab308; }
  .lb-row:nth-child(2) .lb-rank { color: #94a3b8; }
  .lb-row:nth-child(3) .lb-rank { color: #b45309; }
  .lb-name { flex: 1; font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lb-score { font-weight: 800; font-size: 14px; color: var(--accent); }

  /* ── Board ── */
  .board-wrap {
    flex: 1; min-height: 0;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
  }
  .grid-card {
    width: 100%; flex-shrink: 0; position: relative;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 16px; --bpad: 10px; padding: var(--bpad);
    box-shadow: 0 2px 16px rgba(0,0,0,.07);
    display: flex; flex-direction: column; align-items: center;
    overflow: hidden;
  }

  .meta-wrap { display: flex; justify-content: center; margin-bottom: 8px; }
  .target-badge {
    display: flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 800; color: var(--ink);
    background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px;
    padding: 6px 14px;
    animation: targetWiggle 2.6s ease-in-out infinite;
  }
  .target-badge span { color: var(--accent2); font-size: 13px; }
  .target-digit { display: inline-block; animation: targetDigitPop .35s cubic-bezier(.34,1.56,.64,1) both; }
  @keyframes targetDigitPop {
    0% { transform: scale(0) translateY(4px); opacity: 0; }
    60% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1) translateY(0); }
  }
  @keyframes targetWiggle {
    0%, 74% { transform: rotate(0deg) scale(1); }
    78% { transform: rotate(-8deg) scale(1.06); }
    82% { transform: rotate(7deg) scale(1.06); }
    86% { transform: rotate(-5deg) scale(1.04); }
    90% { transform: rotate(3deg) scale(1.02); }
    94%, 100% { transform: rotate(0deg) scale(1); }
  }
  @media (prefers-reduced-motion: reduce) {
    .target-badge { animation: none; }
    .target-digit { animation: none; }
  }

  .bonus-row {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; max-width: 220px; padding: 6px 4px;
  }
  .bonus-lbl { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
  .bonus-val { font-size: 16px; font-weight: 800; color: var(--success); }
  .bonus-row-total { border-top: 1px dashed var(--line); padding-top: 8px; }
  .bonus-row-total .bonus-val { color: var(--accent2); font-size: 20px; }

  .grid-board { position: relative; touch-action: manipulation; cursor: pointer; }

  .grid-tile {
    position: absolute; border-radius: 27%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Baloo 2', 'Sora', sans-serif; font-weight: 800; color: #fff;
    -webkit-text-stroke: 1.5px rgba(0,0,0,.18);
    text-shadow: 0 2px 1px rgba(0,0,0,.24), 0 0 8px rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.5);
    box-shadow:
      inset 0 5px 5px rgba(255,255,255,.42),
      inset 0 -7px 8px rgba(0,0,0,.16),
      inset 5px 0 8px rgba(255,255,255,.12),
      0 5px 8px rgba(15,23,42,.2),
      0 1px 2px rgba(255,255,255,.75);
    transition: left .16s cubic-bezier(.34,1.2,.64,1), top .16s cubic-bezier(.34,1.2,.64,1), background-color .15s, transform .12s;
    z-index: 1; will-change: transform; overflow: visible;
  }
  .grid-tile::before {
    content: ''; position: absolute; top: 9%; left: 11%; width: 58%; height: 30%;
    background: linear-gradient(145deg, rgba(255,255,255,.78), rgba(255,255,255,.18) 58%, transparent 72%);
    border-radius: 50%; transform: rotate(-8deg); pointer-events: none;
    filter: blur(.2px);
  }
  .grid-tile::after {
    content: ''; position: absolute; right: 12%; bottom: 13%; width: 15%; height: 15%;
    border-radius: 50%; pointer-events: none;
    background: rgba(255,255,255,.3);
    box-shadow:
      -4px -3px 0 -2px rgba(255,255,255,.55),
      2px 2px 4px rgba(0,0,0,.08);
  }
  .grid-tile.spawning { animation: tileDropIn .22s cubic-bezier(.34,1.4,.64,1); }
  @keyframes tileDropIn { from { transform: translateY(-16px) scale(.7); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
  .grid-tile.removing { opacity: 0; transform: scale(.5); transition: opacity .15s, transform .15s; }
  .grid-tile.merging { animation: tilePop .26s ease; }
  @keyframes tilePop { 0% { transform: scale(1); } 45% { transform: scale(1.25); } 100% { transform: scale(1); } }
  .grid-tile.nope { animation: tileNope .3s ease; }
  @keyframes tileNope { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } 100% { transform: translateX(0); } }
  .grid-tile.selected {
    z-index: 8;
    box-shadow:
      0 0 0 3px #fff,
      0 0 0 5px var(--accent2),
      0 7px 12px rgba(15,23,42,.24),
      inset 0 5px 5px rgba(255,255,255,.48),
      inset 0 -7px 8px rgba(0,0,0,.16);
  }

  .grid-tile .crown {
    position: absolute; top: -22%; left: 50%; transform: translateX(-50%);
    font-size: 55%; line-height: 1; pointer-events: none; z-index: 6;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,.3));
    animation: crownBob 1.6s ease-in-out infinite;
  }
  @keyframes crownBob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-3px); } }

  /* ── Result overlay ── */
  .result {
    display: none; position: absolute; inset: 0;
    background: rgba(255,255,255,.94); border-radius: 16px;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; z-index: 20; backdrop-filter: blur(4px); padding: 16px;
    text-align: center;
  }
  .result.show { display: flex; }
  .result-emoji { font-size: 3.5rem; }
  .result-title { font-size: 20px; font-weight: 800; color: var(--success); letter-spacing: -.02em; }
  .result-moves { font-size: 3.2rem; font-weight: 800; color: #0f172a; letter-spacing: -.04em; line-height: 1; }
  .result-lbl { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1.5px; }
  .result-sub { font-size: 13px; color: var(--muted); }
  .result-best { font-size: 12px; font-weight: 700; color: var(--muted); }
  .result-best span { color: var(--accent); }
  .result-btn {
    margin-top: 6px; padding: 10px 28px;
    background: linear-gradient(120deg, var(--accent), var(--accent2));
    color: #fff; border: none; border-radius: 10px;
    font-family: 'Sora', sans-serif; font-size: 13px; font-weight: 700;
    cursor: pointer; letter-spacing: .5px; text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(245,158,11,.3); transition: filter .15s;
  }
  .result-btn:hover { filter: saturate(1.1); }
  .result-btn:active { transform: scale(.9); }
  .lose-taunt { font-size: 13px; color: var(--muted); line-height: 1.4; max-width: 300px; margin-top: 2px; }
  .wof-share-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 4px; }
  .wof-thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; border: 1.5px solid var(--line); }
  .btn-share { background: linear-gradient(120deg, #38bdf8, #6366f1); color: #fff; border: none; }

  /* ── Combo popup ── */
  .combo-popup {
    position: absolute; left: 50%; top: 38%; transform: translate(-50%,-50%);
    width: 88%; max-width: 300px;
    font-size: 19px; font-weight: 800; color: var(--accent2); text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,.15);
    pointer-events: none; z-index: 30; opacity: 0;
  }
  .combo-popup.show { animation: comboPop .7s ease forwards; }
  @keyframes comboPop {
    0% { opacity: 0; transform: translate(-50%,-40%) scale(.6); }
    25% { opacity: 1; transform: translate(-50%,-50%) scale(1.15); }
    70% { opacity: 1; transform: translate(-50%,-55%) scale(1); }
    100% { opacity: 0; transform: translate(-50%,-70%) scale(1); }
  }

  /* ── Confetti ── */
  .confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 200; overflow: hidden; }
