.stage { max-width: 560px; }
.m3-info { display: flex; align-items: center; gap: 12px; margin: 2px 4px 12px; }
.m3-stat { text-align: center; min-width: 64px; }
.m3-stat small { display: block; color: var(--faint); font-size: .68rem; }
.m3-stat b { font-family: var(--mono); font-weight: 400; color: var(--gold-l); font-size: 1.2rem; }
.m3-stat.low b { color: var(--red, #e0705c); }
.m3-goal { flex: 1; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.m3-goal span { font-size: .78rem; color: var(--muted); }
.m3-goal b { font-family: var(--mono); font-weight: 400; color: var(--text); }
.m3-bar { width: 100%; height: 8px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); overflow: hidden; }
.m3-bar i { display: block; height: 100%; width: 0; background: var(--gold-grad); transition: width .4s; }
.m3-board {
  position: relative; width: 100%; aspect-ratio: 1; direction: ltr; overflow: hidden;
  border-radius: 16px; background: linear-gradient(160deg, #1a1510, #0f0c09);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 0 40px rgba(0,0,0,.6);
  background-image: linear-gradient(rgba(239,233,221,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(239,233,221,.035) 1px, transparent 1px);
  background-size: 12.5% 12.5%; touch-action: none; cursor: pointer;
}
.tile {
  position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%; padding: 0; box-sizing: border-box;
  transform: translate(calc(var(--col) * 100%), calc(var(--r) * 100%));
  transition: transform .2s cubic-bezier(.3,.8,.4,1), opacity .2s; color: var(--c);
  will-change: transform;
}
.tile.noanim { transition: none; }
.tile svg { position: absolute; inset: 16%; width: 68%; height: 68%; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.tile::before { content: ""; position: absolute; inset: 9%; border-radius: 26%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 32%, transparent), transparent 70%); }
.tile.sel::before { background: color-mix(in srgb, var(--c) 28%, transparent); box-shadow: 0 0 0 2px var(--c); }
.tile.hint { animation: m3hint .8s ease-in-out infinite alternate; }
@keyframes m3hint { to { transform: translate(calc(var(--col) * 100%), calc(var(--r) * 100% - 6%)) scale(1.08); } }
.tile.no { animation: m3no .25s; }
@keyframes m3no { 30% { translate: -4px 0; } 70% { translate: 4px 0; } }
.tile.pop { transform: translate(calc(var(--col) * 100%), calc(var(--r) * 100%)) scale(.1) rotate(30deg); opacity: 0; }
.tile.born { animation: m3born .45s; }
@keyframes m3born { 40% { scale: 1.3; filter: brightness(1.8); } }
.tile.line::before { box-shadow: 0 0 14px var(--c); background: color-mix(in srgb, var(--c) 30%, transparent); }
.tile.line::after { content: ""; position: absolute; inset: 44% 12%; border-radius: 2px; background: #fff; opacity: .55; }
.tile.bomb::before { background: radial-gradient(circle, rgba(243,226,179,.5), rgba(201,168,106,.15) 70%); box-shadow: 0 0 18px rgba(243,226,179,.8); animation: m3glow 1.2s ease-in-out infinite alternate; }
@keyframes m3glow { to { box-shadow: 0 0 30px rgba(243,226,179,1); } }
.tile.zap { filter: brightness(2.5); }
.flash { position: absolute; left: 0; top: 0; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(243,226,179,.85), transparent); animation: m3flash .4s forwards; }
.flash.row { width: 100%; height: 12.5%; transform: translateY(calc(var(--r) * 100%)); }
.flash.col { width: 12.5%; height: 100%; transform: translateX(calc(var(--col) * 100%)); background: linear-gradient(180deg, transparent, rgba(243,226,179,.85), transparent); }
@keyframes m3flash { to { opacity: 0; } }
.m3-msg { margin: 12px 4px 0; text-align: center; color: var(--muted); font-size: .9rem; min-height: 1.4em; }
.stars { font-size: 2.4rem; color: var(--gold-l); letter-spacing: .1em; margin: 6px 0; }
.stars span { color: rgba(239,233,221,.18); }
