/* Jogo Leve — Matemática Rápida. A large expression and four big choices. */

.jl-matematica-rapida {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 50% 0%, #17293a 0%, #0a1219 70%);
  color: #e8f1f8;
  overflow: hidden;
}

.jl-mr-col {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  padding: 6px 8px 8px;
}

.jl-mr-hud { display: flex; gap: 14px; padding: 2px 0 6px; flex-wrap: wrap; justify-content: center; }
.jl-mr-stat { display: flex; align-items: baseline; gap: 5px; }
.jl-mr-lab { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #6f90a8; }
.jl-mr-val { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; color: #ffd54f; }

.jl-mr-meterwrap {
  width: 100%;
  max-width: 440px;
  height: 5px;
  border-radius: 3px;
  background: #14212d;
  overflow: hidden;
}
.jl-mr-meter {
  height: 100%; width: 100%;
  background: #4f9dd8;
  transform-origin: left center;
  border-radius: 3px;
}
.jl-mr-meter.urgent { background: #ff6b6b; }

/* THE EXPRESSION IS THE LARGEST THING ON THE SCREEN, because it is the only thing to read. */
.jl-mr-expr {
  flex: 0 0 auto;
  font-size: clamp(34px, 11vh, 68px);
  font-weight: 800;
  letter-spacing: .02em;
  padding: clamp(14px, 4vh, 34px) 0;
  font-variant-numeric: tabular-nums;
  text-align: center;
  min-height: 0;
}

/* A 2x2 grid of choices, each at least 56px tall — a thumb target, not a link. */
.jl-mr-choices {
  flex: 0 1 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 440px;
  margin-top: auto;
  padding-bottom: 4px;
}
.jl-mr-choice {
  min-height: 56px;
  border: 1px solid #2a4358;
  border-radius: 12px;
  background: #14202b;
  color: #dcebf7;
  font-size: clamp(19px, 4.6vh, 26px);
  font-weight: 800;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.jl-mr-choice:active { background: #1c2c3a; }
.jl-mr-choice:focus-visible { outline: 2px solid #ffd54f; outline-offset: 2px; }

/* THE RESULT IS SHOWN ON THE BUTTONS, not as a separate line: the player looks where they
   tapped, and a message elsewhere is missed. */
.jl-mr-choice.jl-mr-right { border-color: #4caf62; background: #15301f; color: #9fe3b0; }
.jl-mr-choice.jl-mr-wrong { border-color: #e8504a; background: #301818; color: #ffb3ae; }

/* ---- the veil ---- */
.jl-mr-veil {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(6, 10, 14, .96);
  z-index: 5;
}
.jl-mr-veil[hidden] { display: none; }
.jl-mr-box { width: 100%; max-width: 320px; text-align: center; }
.jl-mr-box h2 { margin: 0 0 8px; font-size: 21px; }
.jl-mr-sub { margin: 0 0 16px; font-size: 13px; color: #8fa8bd; line-height: 1.5; }

.jl-mr-levels { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; }
.jl-mr-lv {
  flex: 1 1 0; min-height: 44px;
  border: 1px solid #2a4358; border-radius: 9px;
  background: #131f2a; color: #c3d6e6;
  font-size: 13px; font-weight: 650; cursor: pointer;
}
.jl-mr-lv.on { border-color: #ffd54f; color: #ffd54f; background: #1b2937; }

.jl-mr-go {
  width: 100%; min-height: 48px;
  border: 0; border-radius: 11px;
  background: #ffd54f; color: #10161d;
  font-size: 15px; font-weight: 800; cursor: pointer;
}
.jl-mr-go:active { background: #e8bf3d; }
.jl-mr-go:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (max-height: 460px) {
  .jl-mr-expr { padding: 8px 0; font-size: clamp(26px, 9vh, 40px); }
  .jl-mr-choice { min-height: 46px; }
}
