  /* ============================================================
     THEME TOKENS — edit these to match your exact theme.
     Right-click any element on your live site → Inspect →
     copy the computed values into the variables below.
     ============================================================ */
  .nh-memory-match {
    /* Colors */
    --nh-bg:            #ffffff;   /* card / panel background */
    --nh-bg-soft:      #f6f7f9;   /* page-ish soft background */
    --nh-ink:          #1d2530;   /* primary text */
    --nh-ink-soft:     #828b97;   /* tertiary text */
    --nh-ink-muted:    #6b7480;   /* secondary text */
    --nh-accent:       #4f7cff;   /* primary action / Memory domain */
    --nh-accent-deep:  #3a63d8;   /* accent hover */
    --nh-accent-soft:  #eaf0ff;   /* accent tint */
    --nh-good:         #1faa7a;   /* match / success */
    --nh-line:         #e6e9ee;   /* borders / dividers */
    --nh-card-back:    #4f7cff;   /* face-down card */

    /* Type — `inherit` lets it pick up your theme's font automatically.
       Replace with an explicit stack if you'd rather pin it. */
    --nh-font:         inherit;
    --nh-font-display: inherit;

    /* Shape */
    --nh-radius:       14px;
    --nh-radius-sm:    10px;
    --nh-shadow:       0 1px 3px rgba(20,30,50,.06), 0 8px 24px rgba(20,30,50,.06);
  }

  /* Scoped reset so it can't fight your theme's global CSS */
  .nh-memory-match, .nh-memory-match * { box-sizing: border-box; }
  .nh-memory-match {
    --nh-ink-soft: #828b97;
    font-family: var(--nh-font);
    color: var(--nh-ink);
    max-width: 560px;
    margin: 0 auto;
    background: var(--nh-bg);
    border: 1px solid var(--nh-line);
    border-radius: var(--nh-radius);
    box-shadow: var(--nh-shadow);
    overflow: hidden;
  }

  /* ---- Header ---- */
  .nh-mm-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--nh-line);
  }
  .nh-mm-badge {
    flex: 0 0 auto;
    width: 44px; height: 44px;
    display: grid; place-items: center;
    font-size: 24px;
    background: var(--nh-accent-soft);
    border-radius: 12px;
  }
  .nh-mm-titles { flex: 1 1 auto; min-width: 0; }
  .nh-mm-eyebrow {
    font-size: 11px;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--nh-accent-deep);
    font-weight: 700;
    margin: 0 0 2px;
  }
  .nh-mm-title {
    font-family: var(--nh-font-display);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
    color: var(--nh-ink);
  }
  .nh-mm-stats {
    display: flex; gap: 18px;
    flex: 0 0 auto;
  }
  .nh-mm-stat { text-align: right; }
  .nh-mm-stat-num {
    font-family: var(--nh-font-display);
    font-size: 22px; font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .nh-mm-stat-lbl {
    font-size: 10px; letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--nh-ink-muted);
    margin-top: 3px;
  }

  /* ---- Board ---- */
  .nh-mm-board-wrap { padding: 20px; }
  .nh-mm-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  .nh-mm-card {
    position: relative;
    aspect-ratio: 3 / 4;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    perspective: 700px;
    font-family: inherit;
  }
  .nh-mm-card:disabled { cursor: default; }
  .nh-mm-card-inner {
    position: absolute; inset: 0;
    transition: transform .35s cubic-bezier(.2,.7,.3,1);
    transform-style: preserve-3d;
  }
  .nh-mm-card.is-up .nh-mm-card-inner,
  .nh-mm-card.is-matched .nh-mm-card-inner { transform: rotateY(180deg); }

  .nh-mm-face {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    border-radius: var(--nh-radius-sm);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    font-size: clamp(26px, 9vw, 40px);
    user-select: none;
  }
  .nh-mm-back {
    background: var(--nh-card-back);
    background-image: radial-gradient(circle at 30% 25%, rgba(255,255,255,.22), transparent 55%);
    color: #fff;
    font-size: 22px;
  }
  .nh-mm-front {
    background: var(--nh-bg-soft);
    border: 1px solid var(--nh-line);
    transform: rotateY(180deg);
  }
  .nh-mm-card.is-matched .nh-mm-front {
    background: #e9f8f1;
    border-color: #bfe9d6;
    animation: nh-pop .3s ease;
  }
  @keyframes nh-pop {
    0% { transform: rotateY(180deg) scale(1); }
    50% { transform: rotateY(180deg) scale(1.08); }
    100% { transform: rotateY(180deg) scale(1); }
  }

  /* ---- Footer / controls ---- */
  .nh-mm-foot {
    display: flex; align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--nh-line);
    background: var(--nh-bg-soft);
  }
  .nh-mm-progress { font-size: 13px; color: var(--nh-ink-muted); }
  .nh-mm-progress b { color: var(--nh-ink); }
  .nh-mm-btn {
    font-family: inherit;
    font-size: 14px; font-weight: 700;
    color: #fff;
    background: var(--nh-accent);
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background .15s ease, transform .05s ease;
  }
  .nh-mm-btn:hover { background: var(--nh-accent-deep); }
  .nh-mm-btn:active { transform: translateY(1px); }
  .nh-mm-btn.is-ghost {
    color: var(--nh-accent-deep);
    background: transparent;
    box-shadow: inset 0 0 0 1.5px var(--nh-line);
  }
  .nh-mm-btn.is-ghost:hover { background: var(--nh-accent-soft); }

  /* ---- Win overlay ---- */
  .nh-mm-overlay {
    position: absolute; inset: 0;
    display: none;
    place-items: center;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(2px);
    padding: 24px;
    text-align: center;
    z-index: 5;
  }
  .nh-memory-match { position: relative; }
  .nh-mm-overlay.is-on { display: grid; animation: nh-fade .25s ease; }
  @keyframes nh-fade { from { opacity: 0 } to { opacity: 1 } }
  .nh-mm-win-emoji { font-size: 44px; }
  .nh-mm-win-title {
    font-family: var(--nh-font-display);
    font-size: 24px; font-weight: 800;
    margin: 8px 0 4px;
  }
  .nh-mm-win-score {
    font-family: var(--nh-font-display);
    font-size: 52px; font-weight: 800;
    line-height: 1;
    color: var(--nh-accent-deep);
    font-variant-numeric: tabular-nums;
  }
  .nh-mm-win-sub { color: var(--nh-ink-muted); font-size: 13px; margin: 6px 0 18px; }
  .nh-mm-win-meta {
    display: inline-flex; gap: 22px;
    margin-bottom: 20px;
    font-size: 13px; color: var(--nh-ink-muted);
  }
  .nh-mm-win-meta b { display: block; font-size: 18px; color: var(--nh-ink); font-weight: 800; }

  /* ---- a11y / motion ---- */
  .nh-mm-card:focus-visible { outline: 3px solid var(--nh-accent); outline-offset: 2px; border-radius: var(--nh-radius-sm); }
  .nh-mm-btn:focus-visible { outline: 3px solid var(--nh-accent-deep); outline-offset: 2px; }
  @media (prefers-reduced-motion: reduce) {
    .nh-mm-card-inner { transition: none; }
    .nh-mm-card.is-matched .nh-mm-front { animation: none; }
  }
  @media (max-width: 420px) {
    .nh-mm-stats { display: none; }
    .nh-mm-head { padding: 14px 16px; }
    .nh-mm-board-wrap { padding: 14px; }
  }
