.play { --accent-ink: var(--on-accent); }

.play-top {
  display: grid;
  grid-template-columns: var(--tap) 1fr var(--tap);
  align-items: center;
  gap: 8px;
  padding: 8px 8px 2px;
}

.combo-track {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 6px;
}
.combo-pip {
  width: 22px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  transition: background-color .3s var(--ease-out), width .35s var(--ease-out);
}
.combo-pip.done { background: var(--pip); }
.combo-pip.current { width: 34px; background: color-mix(in srgb, var(--pip) 35%, var(--surface-3)); position: relative; overflow: hidden; }
.combo-pip.current::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--pip);
  transform-origin: left;
  animation: pip-breathe 1.6s var(--ease-in-out) infinite alternate;
}
.combo-pip.current.done::after { animation: none; transform: none; }
.combo-count { margin-left: 6px; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
@keyframes pip-breathe { from { transform: scaleX(.25); opacity: .7; } to { transform: scaleX(.65); opacity: 1; } }

.level-label { justify-self: center; display: flex; align-items: baseline; gap: 8px; }
.level-label strong { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }

.play-title {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px var(--gutter) 0;
}
.play-badge {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
}
.play-badge svg { width: 22px; height: 22px; }
.play-heading { min-width: 0; flex: 1; }
.play-heading h1 { font-size: 20px; font-weight: 800; line-height: 1.15; }
.play-rule { font-size: 14px; color: var(--ink-2); line-height: 1.3; }
.play-theme {
  flex: none;
  font-size: 26px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.play-status {
  min-height: 22px;
  padding: 6px var(--gutter) 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.play-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 4px 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.play-footer {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 6px var(--gutter) 12px;
}
.play-footer:empty { min-height: 16px; padding: 0; }

/* Interstitial between daily games */
.intro {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  text-align: center;
}
.intro-inner { display: grid; justify-items: center; gap: 14px; padding: 24px; }
.intro-icon { width: 96px; height: 96px; border-radius: 28px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); }
.intro-icon svg { width: 52px; height: 52px; }
.intro-count { font-weight: 800; font-size: 15px; letter-spacing: .1em; opacity: .85; }
.intro-name { font-size: 40px; font-weight: 800; line-height: 1; }
.intro-rule { font-size: 17px; max-width: 300px; opacity: .92; }

/* Short screens: tighter chrome so the stage keeps its room. */
@media (max-height: 640px) {
  .play-top { padding-top: 4px; }
  .play-title { padding-top: 0; gap: 10px; }
  .play-badge { width: 32px; height: 32px; border-radius: 10px; }
  .play-badge svg { width: 18px; height: 18px; }
  .play-heading h1 { font-size: 17px; }
  .play-rule { font-size: 12.5px; }
  .play-theme { width: 36px; height: 36px; font-size: 20px; }
  .play-status { min-height: 18px; padding-top: 2px; font-size: 13px; }
  .play-footer { min-height: 56px; padding-bottom: 8px; }
}

/* First-play coach: ghost hand + trail over the board; caption replaces the rule line. */
.coach { position: absolute; inset: 0; z-index: 25; pointer-events: none; opacity: 0; transition: opacity .18s; }
.coach-trail { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.coach-trail path { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; opacity: .35; }
.coach-ring {
  position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border: 3px solid var(--accent); opacity: 0;
}
.coach-hand { position: absolute; left: 0; top: 0; width: 46px; transform-origin: 39% 2%; will-change: transform; }
.coach-hand svg { display: block; width: 46px; height: auto; overflow: visible; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .28)); }
.coach-hand path { fill: #fff; stroke: #2e2722; stroke-width: 2.2; stroke-linejoin: round; }
.play-rule.coaching { color: color-mix(in srgb, var(--accent) var(--text-mix), var(--ink)); font-weight: 800; }
.play-rule.coaching::before { content: '👆 '; }
.play-rule.coach-good { color: var(--good); }
.play-rule.coach-good::before { content: '✓ '; }

/* Odometer (IQ readouts) */
.odometer { display: inline-flex; font-variant-numeric: tabular-nums; line-height: 1; }
.odo-reel { display: inline-block; height: 1em; overflow: hidden; width: .64em; text-align: center; }
.odo-reel.blank { width: 0; }
.odo-strip { display: flex; flex-direction: column; will-change: transform; }
.odo-d { display: block; height: 1em; line-height: 1em; }

/* Today's IQ meter in the daily title row */
.iq-meter {
  flex: none; position: relative; display: inline-flex; align-items: center; gap: 6px;
  height: 44px; padding: 0 12px 0 8px; border-radius: var(--r-pill);
  background: var(--surface); box-shadow: var(--shadow-1);
}
.iq-meter .iq-emoji { font-size: 22px; }
.iq-meter .iq-label { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--ink-3); }
.iq-meter .odometer { font-size: 20px; font-weight: 800; color: var(--ink); }
.iq-meter.rise { animation: iq-glow 1.2s var(--ease-out); }
@keyframes iq-glow { 30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent), var(--shadow-2); transform: scale(1.06); } }
.iq-plus {
  position: absolute; right: 8px; top: -6px; font-size: 13px; font-weight: 800; color: var(--good);
  pointer-events: none; animation: iq-plus 1.4s var(--ease-out) forwards;
}
@keyframes iq-plus { from { opacity: 0; transform: translateY(8px); } 20% { opacity: 1; } to { opacity: 0; transform: translateY(-22px); } }
@media (max-height: 640px) { .iq-meter { height: 36px; } .iq-meter .iq-emoji { font-size: 18px; } .iq-meter .odometer { font-size: 17px; } }
