/* ══ Demo main menu — layout fixes ═══════════════════════════════════
   Loaded by templates/cr/game.html after its own <style> blocks. Layout
   only: no element is added or removed for the game code, every onclick,
   id and form stays where it was.

   1. Every screen size: the free cards lose the "FREE" corner ribbon and
      the big "Free To Play" label over the artwork. The green "▶ Play Free"
      button on the card already says it — four copies of the same words,
      and the label covered half of the illustration.

   2. Phones (≤ 600px wide): the menu was a desktop page squeezed into two
      thin columns — 4250px of scrolling, a 600px price panel before the
      first playable card, ~50px of empty sky above the icon bar.
      Now, top to bottom:
        icon bar → logo → FREE MODES (two wide cards, artwork left, Play
        button right) → compact premium offer (two plans side by side) →
        PREMIUM MODES (one slim row each, tap opens the upgrade popup) →
        unlock bar → multiplayer promo.
      The grid wrapper becomes `display: contents`, so its cards are laid
      out straight in the menu column and can be ordered around the offer.
      The two section headings (.demo-phone-head) are `hidden` in the
      markup and only shown here.
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. All sizes: no duplicate "free" labels on the artwork ──────── */
#demo-midi-overlay .demo-free-ribbon,
#demo-midi-overlay .demo-center-free {
  display: none;
}

/* ── All sizes: "▶ Play Free" + ⚙ on one row, on the card floor ──────
   The ⚙ opens a read-only preview of the mode's Premium settings panel
   (js/demoSettingsPreview.js). White round button in the menu's cartoon
   language, so it reads as secondary next to the green Play pill. */
#demo-midi-overlay .demo-card-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
#demo-midi-overlay .demo-card-actions .demo-card-cta--free {
  flex: 1 1 auto;
  margin: 0;
}
#demo-midi-overlay .demo-card-gear {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--crm-ink);
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--crm-ink);
  box-shadow: 0 3px 0 var(--crm-ink);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
#demo-midi-overlay .demo-card-gear svg {
  width: 24px;
  height: 24px;
  display: block;
  transition: transform 0.35s ease;
}
#demo-midi-overlay .demo-card-gear:hover {
  background: #FFF6DC;
  transform: translateY(-1px);
  box-shadow: 0 4px 0 var(--crm-ink);
}
#demo-midi-overlay .demo-card-gear:hover svg { transform: rotate(60deg); }
#demo-midi-overlay .demo-card-gear:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--crm-ink);
}
#demo-midi-overlay .demo-card-gear:focus-visible {
  outline: 3px solid var(--crm-gold);
  outline-offset: 2px;
}

/* ── All sizes: "▶ Play Free" that catches the eye ────────────────────
   The pill read as one more mint shape among the cards. Now: a vivid
   "go" green with ink type (white on green was tried: user rejected it),
   a deeper solid shadow, a light band that sweeps across it every few seconds and a
   soft ring that breathes out of it. Both effects animate only
   transform / opacity / outline on a small element — cheap, nothing like
   the full-screen layers the touch safety block in game.html guards
   against — and both stop for "reduce motion". */
html body #demo-midi-overlay .demo-card-cta--free {
  position: relative;
  overflow: hidden;
  background: #1FC75A;
  color: var(--crm-ink);
  border: 3px solid var(--crm-ink);
  box-shadow: 0 4px 0 var(--crm-ink);
  font-size: 1.08rem;
  letter-spacing: 0.03em;
  text-shadow: none;
  animation: demoPlayRing 2.4s ease-out infinite;
}
html body #demo-midi-overlay .mode-col.demo-free:hover .demo-card-cta--free {
  background: #2AD868;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--crm-ink);
}
html body #demo-midi-overlay .mode-col.demo-free:active .demo-card-cta--free {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--crm-ink);
}
/* the sweeping light band (flat white, no gradient) */
html body #demo-midi-overlay .demo-card-cta--free::after {
  content: '';
  position: absolute;
  top: -10%;
  bottom: -10%;
  left: 0;
  width: 26%;
  background: rgba(255, 255, 255, 0.38);
  transform: translateX(-150%) skewX(-20deg);
  animation: demoPlayShine 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes demoPlayShine {
  0%, 55%  { transform: translateX(-150%) skewX(-20deg); }
  85%, 100% { transform: translateX(480%) skewX(-20deg); }
}
@keyframes demoPlayRing {
  0%   { outline: 0 solid rgba(31, 199, 90, 0.7); outline-offset: 0; }
  70%  { outline: 7px solid rgba(31, 199, 90, 0); outline-offset: 2px; }
  100% { outline: 7px solid rgba(31, 199, 90, 0); outline-offset: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  html body #demo-midi-overlay .demo-card-cta--free,
  html body #demo-midi-overlay .demo-card-cta--free::after { animation: none; }
}

/* ── All sizes: Multiplayer is the special card ───────────────────────
   The one mode no other chord game has, so it is the one locked card that
   is not greyed out: flat gold (no gradient, like the rest of the menu),
   a gold glow around the ink edge, the artwork in full colour and a red
   "🔥 HOT" sticker on its top edge. Still locked: the tap opens the
   upgrade popup like every other premium card. */
html body #demo-midi-overlay .mode-col.demo-locked.demo-locked-mp,
html body #demo-midi-overlay .mode-col.demo-locked.demo-locked-mp:hover {
  filter: none;
  opacity: 1;
  background: #FFE7A6;
  border-color: var(--crm-ink);
  box-shadow: 0 6px 0 var(--crm-ink), 0 0 0 4px rgba(255, 209, 102, 0.75), 0 0 30px 6px rgba(255, 186, 40, 0.5);
}
html body #demo-midi-overlay .mode-col.demo-locked-mp .mode-card-banner img {
  filter: none;
}
html body #demo-midi-overlay .mode-col.demo-locked-mp .demo-center-locked {
  display: none;   /* the art shows; the card's own CTA says it is Premium */
}
html body #demo-midi-overlay .mode-col.demo-locked-mp .demo-card-cta {
  color: var(--crm-ink);
  opacity: 1;
}
@media (min-width: 601px) {
  /* The sticker takes the corner the "🔒 Premium" badge had */
  html body #demo-midi-overlay .mode-col.demo-locked-mp .demo-lock-badge { display: none; }
}

#demo-midi-overlay .demo-hot-badge {
  position: absolute;
  top: -13px;
  left: 14px;
  z-index: 13;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 13px 4px 9px;
  border: 2.5px solid var(--crm-ink);
  border-radius: 99px;
  background: #E5463A;
  color: #FFFFFF;
  font-family: 'Lilita One', 'Outfit', sans-serif;
  font-size: 0.98rem;
  letter-spacing: 0.08em;
  line-height: 1;
  box-shadow: 0 3px 0 var(--crm-ink);
  transform: rotate(-5deg);
  pointer-events: none;
}
#demo-midi-overlay .demo-hot-flame {
  display: inline-block;
  font-size: 1.1em;
  letter-spacing: 0;
  transform-origin: 50% 85%;
  animation: demoHotFlame 1.8s ease-in-out infinite;   /* transform only: cheap */
}
@keyframes demoHotFlame {
  0%, 100% { transform: scale(1) rotate(-5deg); }
  50%      { transform: scale(1.18) rotate(5deg); }
}
@media (prefers-reduced-motion: reduce) {
  #demo-midi-overlay .demo-hot-flame { animation: none; }
}

/* ── 2. Phones ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {

  /* The scrolling column fills the screen from the top edge. It used to be
     an 85vh box centred vertically: ~50px of empty sky above the icons and
     a dead band under it. The box stays the scroller (as before). */
  html body #demo-midi-overlay.overlay {
    padding: 0;
    align-items: stretch;
  }
  html body #demo-midi-overlay .overlay-box {
    width: 100%;
    max-width: 100% !important;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 6px 12px 28px;
    gap: 12px;
    border-radius: 0;
    box-shadow: none;
  }
  /* The box has a fixed height now, so its flex items would shrink to fit
     it instead of scrolling (a card squashed under its own artwork). */
  html body #demo-midi-overlay .overlay-box > *,
  html body #demo-midi-overlay .demo-modes-grid > * {
    flex-shrink: 0;
  }

  /* Icon bar + logo: tighter */
  html body #demo-midi-overlay #menu-top-buttons {
    margin: 0;
    gap: 4px 6px;
  }
  html body #demo-midi-overlay .cr-logo-wrap {
    margin-top: 0 !important;
    gap: 2px;
  }
  html body #demo-midi-overlay .cr-logo-wrap h2.cr-logo {
    font-size: 2.3rem !important;
  }
  html body #demo-midi-overlay .cr-logo-wrap > div[style] {
    margin-top: 0 !important;
  }
  /* "Standard Levels and Boss League are free to play…" — the two section
     headings below say the same thing where it matters. */
  html body #demo-midi-overlay .overlay-box p.cr-choose {
    display: none;
  }

  /* ── Order of the column ── */
  html body #demo-midi-overlay .demo-modes-grid { display: contents; }
  html body #demo-midi-overlay .demo-phone-head--free    { order: 1; }
  html body #demo-midi-overlay .mode-col.demo-free       { order: 2; }
  html body #demo-midi-overlay .upgrade-banner           { order: 3; }
  html body #demo-midi-overlay .demo-phone-head--premium { order: 4; }
  html body #demo-midi-overlay .mode-col.demo-locked-mp  { order: 5; }  /* Multiplayer heads the list */
  html body #demo-midi-overlay .mode-col.demo-locked:not(.demo-locked-mp) { order: 6; }
  html body #demo-midi-overlay .demo-unlock-bar          { order: 7; }
  html body #demo-midi-overlay .demo-mp-promo            { order: 8; }
  html body #demo-midi-overlay #demo-midi-status         { order: 9; }

  /* ── Section headings ── */
  html body #demo-midi-overlay .demo-phone-head {
    display: flex;
    align-items: center;
    gap: 10px;
    align-self: stretch;
    margin: 6px 2px -2px;
    font-family: 'Lilita One', 'Outfit', sans-serif;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    color: #FFFFFF;
    text-shadow: 0 2px 0 var(--crm-ink);
    text-align: left;
  }
  html body #demo-midi-overlay .demo-phone-head::after {
    content: '';
    flex: 1;
    height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.35);
  }

  /* ── Shared card resets (both kinds) ── */
  html body #demo-midi-overlay .mode-col {
    align-self: stretch;
    display: grid;
    margin: 0;
    text-align: left;
    filter: none;
    opacity: 1;
  }
  html body #demo-midi-overlay .mode-col .mode-card-banner {
    margin: 0;
    aspect-ratio: auto;
    height: 100%;
  }
  /* The "i" tooltip is hover-only; on a phone the tap reached the card
     and started the mode instead. The description is on the card. */
  html body #demo-midi-overlay .mode-col .mode-info-btn,
  html body #demo-midi-overlay .mode-col .mode-info-tooltip {
    display: none;
  }
  html body #demo-midi-overlay .mode-col .menu-title {
    margin: 0;
    line-height: 1.15;
  }

  /* ── Free cards: artwork left, text + Play button right ── */
  html body #demo-midi-overlay .mode-col.demo-free {
    grid-template-columns: 40% minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    column-gap: 12px;
    min-height: 168px;
    padding: 0 12px 0 0;
    border-radius: 20px;
    background: #F4F7FC;
    box-shadow: 0 5px 0 var(--crm-ink), 0 10px 20px rgba(3, 10, 28, 0.3);
  }
  html body #demo-midi-overlay .mode-col.demo-free .mode-card-banner {
    grid-column: 1;
    grid-row: 1 / -1;
    border-radius: 17px 0 0 17px;
    border-bottom: 0;
    border-right: 3px solid var(--crm-ink);
  }
  /* Out of the flow, so the artwork fills whatever height the text needs
     instead of stretching the card to the picture's own proportions. */
  html body #demo-midi-overlay .mode-col.demo-free .mode-card-banner img {
    position: absolute;
    inset: 0;
  }
  /* The gold strip under the artwork becomes a strip along its right edge */
  html body #demo-midi-overlay .mode-col.demo-free .mode-card-banner::after {
    top: 0;
    bottom: 0;
    left: auto;
    right: 0;
    width: 6px;
    height: auto;
  }
  html body #demo-midi-overlay .mode-col.demo-free .menu-title {
    grid-column: 2;
    grid-row: 1;
    padding-top: 12px;
    font-size: 1.12rem;
  }
  html body #demo-midi-overlay .mode-col.demo-free .mode-card-desc {
    grid-column: 2;
    grid-row: 2;
    margin: 4px 0 10px;
    font-size: 0.74rem;
    line-height: 1.38;
  }
  html body #demo-midi-overlay .mode-col.demo-free .demo-card-actions {
    grid-column: 2;
    grid-row: 3;
    margin: 0 0 14px;
    gap: 6px;
  }
  html body #demo-midi-overlay .mode-col.demo-free .demo-card-cta--free {
    margin: 0;
    padding: 9px 8px;
    font-size: 1rem;
  }
  html body #demo-midi-overlay .mode-col.demo-free .demo-card-gear {
    width: 40px;
    height: 40px;
  }
  html body #demo-midi-overlay .mode-col.demo-free .demo-card-gear svg {
    width: 22px;
    height: 22px;
  }

  /* ── Premium offer: compact ── */
  html body #demo-midi-overlay .upgrade-banner {
    margin: 8px 0 0;
    padding: 12px 10px 12px;
    gap: 10px;
    border-radius: 20px;
  }
  html body #demo-midi-overlay .upgrade-banner-head { gap: 2px; }
  html body #demo-midi-overlay .upgrade-banner-eyebrow { font-size: 0.6rem; }
  html body #demo-midi-overlay .upgrade-banner h2 { font-size: 1.2rem; }
  /* The long feature sentence: the premium list right below shows it. */
  html body #demo-midi-overlay .overlay-box .upgrade-banner-head p {
    display: none;
  }
  html body #demo-midi-overlay .upgrade-plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  html body #demo-midi-overlay .upgrade-plan {
    padding: 10px 8px 9px;
    gap: 3px;
    border-radius: 14px;
  }
  html body #demo-midi-overlay .upgrade-plan-badge {
    font-size: 0.5rem;
    padding: 2px 7px;
    letter-spacing: 0.1em;
  }
  html body #demo-midi-overlay .upgrade-plan-name { font-size: 0.82rem; }
  html body #demo-midi-overlay .upgrade-banner-price {
    flex-wrap: wrap;
    gap: 2px 6px;
    min-height: 0;
    margin: 0;
  }
  html body #demo-midi-overlay .upgrade-banner-price .price-now { font-size: 1.35rem; }
  html body #demo-midi-overlay .upgrade-banner-price .price-per { font-size: 0.8rem; }
  html body #demo-midi-overlay .upgrade-banner-price .price-old { font-size: 0.78rem; }
  html body #demo-midi-overlay .upgrade-banner-price .off-chip { font-size: 0.58rem; padding: 2px 6px; }
  html body #demo-midi-overlay .upgrade-plan-note { font-size: 0.66rem; }
  html body #demo-midi-overlay .upgrade-plan form { margin-top: 4px; }
  html body #demo-midi-overlay .upgrade-banner-btn {
    gap: 4px;
    padding: 8px 6px;
    font-size: 0.78rem;
    white-space: normal;
    line-height: 1.15;
    box-shadow: 0 3px 0 var(--crm-ink) !important;
  }
  html body #demo-midi-overlay .upgrade-banner-timer {
    margin-top: 4px;
    font-size: 0.6rem;
    gap: 3px;
  }
  html body #demo-midi-overlay .upgrade-banner-timer strong { font-size: 0.66rem; }
  /* Push the two buttons to the same line whatever the price block does */
  html body #demo-midi-overlay .upgrade-plan form { margin-top: auto; padding-top: 4px; }

  /* ── Premium cards: one slim row each ── */
  html body #demo-midi-overlay .mode-col.demo-locked {
    grid-template-columns: 62px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 2px;
    align-items: center;
    padding: 8px 12px 8px 8px;
    border-radius: 16px;
    background: #DCE3EE;
    box-shadow: 0 3px 0 var(--crm-ink);
  }
  /* game.html greys the whole locked card (filter on .mode-col.demo-locked,
     which outranks the shared reset above). In a list that turned every row
     into dead grey text: only the thumbnail is muted now, the lock says the
     rest. */
  html body #demo-midi-overlay .mode-col.demo-locked,
  html body #demo-midi-overlay .mode-col.demo-locked:hover,
  html body #demo-midi-overlay .mode-col.demo-locked:active {
    filter: none;
    opacity: 1;
    transform: none;
  }
  html body #demo-midi-overlay .mode-col.demo-locked .mode-card-banner {
    grid-column: 1;
    grid-row: 1 / -1;
    width: 62px;
    height: 62px;
    border: 2px solid var(--crm-ink);
    border-radius: 12px;
  }
  html body #demo-midi-overlay .mode-col.demo-locked .mode-card-banner::after,
  html body #demo-midi-overlay .mode-col.demo-locked .demo-center-locked,
  html body #demo-midi-overlay .mode-col.demo-locked .demo-card-cta {
    display: none;
  }
  html body #demo-midi-overlay .mode-col.demo-locked .mode-card-banner img {
    filter: grayscale(0.45);
  }
  html body #demo-midi-overlay .mode-col.demo-locked .menu-title {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    font-size: 0.98rem;
  }
  html body #demo-midi-overlay .mode-col.demo-locked .mode-card-desc {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    margin: 0;
    font-size: 0.7rem;
    line-height: 1.35;
  }
  /* "🔒 Premium" corner badge → a gold lock button at the row's end, in
     the menu's cartoon language (flat gold, ink outline, solid drop).
     The glyph is a drawn SVG used as a mask, not the 🔒 emoji: emoji sit
     on the font's baseline, so they never land in the optical centre and
     look different on every phone. Painted with --crm-ink through the
     mask, so it follows the menu palette; the keyhole is cut out and
     shows the gold underneath. */
  html body #demo-midi-overlay .mode-col.demo-locked .demo-lock-badge {
    position: relative;
    top: auto;
    left: auto;
    grid-column: 3;
    grid-row: 1 / -1;
    align-self: center;
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0 0 3px;            /* room for the drop, so it centres visually */
    font-size: 0;               /* hides the "🔒 Premium" text */
    line-height: 0;
    border-radius: 50%;
    background: var(--crm-gold);
    border: 2.5px solid var(--crm-ink);
    box-shadow: 0 3px 0 var(--crm-ink);
    backdrop-filter: none;
  }
  html body #demo-midi-overlay .mode-col.demo-locked .demo-lock-badge::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    background: var(--crm-ink);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 10.5V7.6a4 4 0 0 1 8 0v2.9' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'/%3E%3Cpath fill-rule='evenodd' d='M7 10h10a2.5 2.5 0 0 1 2.5 2.5v6A2.5 2.5 0 0 1 17 21H7a2.5 2.5 0 0 1-2.5-2.5v-6A2.5 2.5 0 0 1 7 10zM11.3 16.26A1.8 1.8 0 1 1 12.7 16.26V18.4H11.3z'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 10.5V7.6a4 4 0 0 1 8 0v2.9' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'/%3E%3Cpath fill-rule='evenodd' d='M7 10h10a2.5 2.5 0 0 1 2.5 2.5v6A2.5 2.5 0 0 1 17 21H7a2.5 2.5 0 0 1-2.5-2.5v-6A2.5 2.5 0 0 1 7 10zM11.3 16.26A1.8 1.8 0 1 1 12.7 16.26V18.4H11.3z'/%3E%3C/svg%3E") center / contain no-repeat;
    /* the glyph's mass sits low (body is heavier than the shackle) */
    transform: translateY(-0.5px);
  }

  /* ── Multiplayer row: the gold one (see the all-sizes block) ── */
  html body #demo-midi-overlay .mode-col.demo-locked.demo-locked-mp,
  html body #demo-midi-overlay .mode-col.demo-locked.demo-locked-mp:hover,
  html body #demo-midi-overlay .mode-col.demo-locked.demo-locked-mp:active {
    margin-top: 8px;          /* room for the sticker under the heading */
    padding-top: 18px;        /* and between the sticker and the title */
    background: #FFE7A6;
    box-shadow: 0 3px 0 var(--crm-ink), 0 0 0 3px rgba(255, 209, 102, 0.8), 0 0 22px 4px rgba(255, 186, 40, 0.55);
  }
  html body #demo-midi-overlay .mode-col.demo-locked-mp .mode-card-banner img {
    filter: none;
  }
  /* Gold lock on a gold row would vanish: white plate instead */
  html body #demo-midi-overlay .mode-col.demo-locked.demo-locked-mp .demo-lock-badge {
    background: #FFFFFF;
  }
  html body #demo-midi-overlay .mode-col.demo-locked-mp .demo-hot-badge {
    top: -12px;
    left: 80px;               /* over the text column, not the thumbnail */
    padding: 4px 11px 3px 8px;
    font-size: 0.8rem;
  }

  /* ── Unlock bar + promo: a little tighter ── */
  html body #demo-midi-overlay .demo-unlock-bar {
    margin: 8px 0 0;
    padding: 14px 14px;
    gap: 10px;
  }
  html body #demo-midi-overlay .demo-unlock-text { font-size: 0.95rem; }
  html body #demo-midi-overlay .demo-unlock-btn {
    padding: 10px 18px !important;
    font-size: 0.9rem !important;
  }
  /* ── Multiplayer promo: one message, one picture, one button ──
     The desktop promo stacks an eyebrow, a two-line slogan, a paragraph,
     a scoreboard, four feature tiles, a price box and a two-line button —
     on a phone that was a page of its own, and the price repeated the
     offer panel above. Here: the phone heading (.demo-mp-phone-head,
     `hidden` in the markup), the live scoreboard as the picture, the
     upgrade button. */
  html body #demo-midi-overlay .demo-mp-promo {
    margin-top: 8px;
    padding: 16px 14px 16px;
  }
  html body #demo-midi-overlay .demo-mp-header { margin-bottom: 12px; }
  html body #demo-midi-overlay .demo-mp-eyebrow,
  html body #demo-midi-overlay .demo-mp-headline,
  html body #demo-midi-overlay .overlay-box p.demo-mp-sub,
  html body #demo-midi-overlay .demo-mp-feat-grid,
  html body #demo-midi-overlay .overlay-box p.demo-mp-cta-label,
  html body #demo-midi-overlay .demo-mp-price-banner,
  html body #demo-midi-overlay .overlay-box p.demo-mp-cta-note,
  html body #demo-midi-overlay .demo-mp-btn > span:first-child,
  html body #demo-midi-overlay .demo-mp-btn-sub {
    display: none;
  }

  html body #demo-midi-overlay .demo-mp-phone-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  html body #demo-midi-overlay .demo-mp-phone-title {
    font-family: 'Lilita One', 'Outfit', sans-serif;
    font-size: 1.35rem;
    line-height: 1.15;
    letter-spacing: 0.01em;
    color: #1C2230;
  }
  html body #demo-midi-overlay .demo-mp-phone-sub {
    display: inline-block;
    padding: 4px 12px;
    border: 2px solid var(--crm-ink);
    border-radius: 99px;
    background: var(--crm-gold);
    color: #1C2230;
    font-family: 'Outfit', sans-serif;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.02em;
  }

  /* Scoreboard: names and scores only. The streak tags pushed the score
     ("2,450") past the board's edge on 360px phones; the locked row keeps
     its "Upgrade to compete", under the name. */
  html body #demo-midi-overlay .demo-mp-board { margin-bottom: 14px; }
  html body #demo-midi-overlay .demo-mp-board-top { padding: 6px 12px; }
  html body #demo-midi-overlay .demo-mp-sb-row {
    grid-template-columns: 40px 24px minmax(0, 1fr) auto;
    gap: 6px;
    padding: 6px 12px;
    text-align: left;
  }
  html body #demo-midi-overlay .demo-mp-sb-name { font-size: 0.85rem; line-height: 1.2; }
  html body #demo-midi-overlay .demo-mp-sb-row:not(.demo-mp-sb-locked) .demo-mp-sb-tag { display: none; }
  html body #demo-midi-overlay .demo-mp-sb-locked .demo-mp-sb-name {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    white-space: nowrap;
  }
  html body #demo-midi-overlay .demo-mp-sb-locked .demo-mp-sb-tag { display: block; font-size: 0.68rem; }
  html body #demo-midi-overlay .demo-mp-sb-score { font-size: 1rem; }

  html body #demo-midi-overlay .demo-mp-cta { gap: 0; }
  html body #demo-midi-overlay .demo-mp-btn {
    width: 100%;
    justify-content: center;
    padding: 11px 14px !important;
  }
  html body #demo-midi-overlay .demo-mp-btn-text { align-items: center; text-align: center; }
  html body #demo-midi-overlay .demo-mp-btn-main { font-size: 0.92rem; line-height: 1.2; }
}
