.mr-stage { display: flex; justify-content: center; padding: 8px 0 12px; }
.mr-card {
  --acc: #22d3ee;
  --acc-glow: rgba(34, 211, 238, 0.35);
  position: relative;
  container-type: inline-size;
  width: min(400px, 100%, max(280px, calc((100svh - 150px) * 9 / 14)));
  aspect-ratio: 9 / 14;
  display: flex;
  flex-direction: column;
  padding: 18px 16px 16px;
  border-radius: 24px;
  border: 2px solid var(--acc);
  background: radial-gradient(120% 70% at 50% 0%, #272163 0%, #1d1946 55%, #16123a 100%);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.12), 0 0 32px -6px var(--acc-glow), 0 24px 50px -24px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.mr-card.m2 { --acc: #fbbf24; --acc-glow: rgba(251, 191, 36, 0.45); }
.mr-card.m3 { --acc: #f472b6; --acc-glow: rgba(244, 114, 182, 0.55); }

.mr-top { display: flex; align-items: center; gap: 8px; min-height: 30px; font-size: 15px; font-weight: 700; color: var(--muted); }
.mr-streak b { color: #eef0ff; font-variant-numeric: tabular-nums; }
.mr-mult { padding: 3px 10px; border-radius: 999px; background: var(--acc); color: #0d0b26; font-weight: 900; font-size: 15px; }
.mr-mult.pop { animation: mr-pop 0.4s cubic-bezier(0.2, 0.8, 0.2, 1.4); }
.mr-time { margin-left: auto; color: #eef0ff; font-variant-numeric: tabular-nums; font-size: 17px; }
.mr-card.low .mr-time { color: #fb923c; }

.mr-bar { height: 14px; margin-top: 8px; border-radius: 999px; background: #0d0b26; border: 1px solid rgba(255, 255, 255, 0.1); overflow: hidden; }
.mr-fill { height: 100%; width: 80%; border-radius: inherit; background: linear-gradient(90deg, #22d3ee, #a78bfa); transform-origin: left; }
.mr-card.m2 .mr-fill { background: linear-gradient(90deg, #fbbf24, #fb923c); }
.mr-card.m3 .mr-fill { background: linear-gradient(90deg, #f472b6, #a78bfa); }
.mr-card.low .mr-fill { background: #fb923c; animation: mr-blink 0.5s ease-in-out infinite alternate; }

.mr-qwrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 0; }
.mr-tag { min-height: 22px; padding: 2px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: var(--muted); font-size: 14px; font-weight: 700; letter-spacing: 0.02em; }
.mr-tag:empty { visibility: hidden; }
.mr-q { font-size: 44px; font-size: 13.5cqi; font-weight: 900; letter-spacing: -0.01em; color: #eef0ff; white-space: nowrap; font-variant-numeric: tabular-nums; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); }
.mr-q.in { animation: mr-in 0.18s ease-out; }

.mr-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mr-ans {
  position: relative;
  min-height: 84px;
  height: 22cqi;
  padding: 0;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #272163;
  color: #eef0ff;
  font-family: inherit;
  font-size: 34px;
  font-size: 10cqi;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25), inset 0 2px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.12s, transform 0.08s;
}
.mr-ans:hover { background: #312a78; }
.mr-ans:active { transform: scale(0.97); }
.mr-ans:focus-visible { outline: 3px solid #eef0ff; outline-offset: 2px; }
.mr-k { position: absolute; top: 7px; left: 10px; font-size: 12px; font-weight: 700; color: var(--muted); opacity: 0.8; }
.mr-ans.ok { background: #34d399; color: #0d0b26; }
.mr-ans.bad { background: #f472b6; color: #0d0b26; animation: mr-shake 0.3s; }
.mr-ans.reveal { background: #1f6f5a; box-shadow: 0 0 0 3px #34d399; }
.mr-ans.ok .mr-k, .mr-ans.bad .mr-k { color: #0d0b26; }

.mr-float { position: absolute; inset: 0; pointer-events: none; }
.mr-pop { position: absolute; left: 50%; top: 31%; transform: translateX(-50%); font-weight: 900; font-size: 26px; white-space: nowrap; animation: mr-rise 0.8s ease-out forwards; }
.mr-pop.plus { color: #34d399; }
.mr-pop.minus { color: #f472b6; }

.mr-start {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 28px; border: 0; border-radius: inherit;
  background: rgba(13, 11, 38, 0.9);
  color: #eef0ff; font-family: inherit; text-align: center; cursor: pointer;
}
.mr-start[hidden] { display: none; }
.mr-start-ops { display: flex; gap: 10px; }
.mr-start-ops i { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: #272163; font-style: normal; font-size: 28px; font-weight: 900; line-height: 1; }
.mr-start-ops i:nth-child(1) { color: #fbbf24; }
.mr-start-ops i:nth-child(2) { color: #22d3ee; }
.mr-start-ops i:nth-child(3) { color: #f472b6; }
.mr-start-ops i:nth-child(4) { color: #34d399; }
.mr-start-title { font-size: 34px; font-weight: 900; color: #fbbf24; }
.mr-start-text { font-size: 17px; line-height: 1.45; color: #eef0ff; max-width: 270px; text-wrap: balance; }
.mr-start-keys { font-size: 13px; color: var(--muted); }
.mr-start:focus-visible { outline: 3px solid #eef0ff; outline-offset: -6px; }

.tip { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 10px; }

@keyframes mr-pop { from { transform: scale(0.4); } }
@keyframes mr-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes mr-rise { 0% { opacity: 0; transform: translate(-50%, 6px); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -40px); } }
@keyframes mr-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes mr-blink { to { opacity: 0.55; } }

@media (hover: none) { .mr-start-keys, .tip { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .mr-card, .mr-ans { transition: none; }
  .mr-mult.pop, .mr-q.in, .mr-ans.bad, .mr-card.low .mr-fill { animation: none; }
  .mr-pop { animation: mr-fade 0.8s linear forwards; }
}
@keyframes mr-fade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
