/* 사칙연산 속셈 게임 (mathrush) */
.mr-wrap { max-width: 480px; margin: 0 auto; padding: 12px 14px 32px; }

.mr-head { text-align: center; margin-bottom: 18px; }
.mr-head h1 { font-size: 1.5rem; font-weight: 800; margin: 0 0 4px; }
.mr-head .sub { color: #6b7280; font-size: 0.9rem; }

/* 셋업 */
.mr-section { margin-bottom: 20px; }
.mr-section > .lbl { font-weight: 700; font-size: 0.85rem; color: #374151; margin-bottom: 8px; }
.mr-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mr-opts.cols2 { grid-template-columns: repeat(2, 1fr); }
.mr-opt {
  border: 2px solid #e5e7eb; background: #fff; border-radius: 12px;
  padding: 12px 8px; text-align: center; cursor: pointer; transition: all .12s;
  font-weight: 700; color: #374151;
}
.mr-opt .sym { font-size: 1.3rem; display: block; }
.mr-opt .nm { font-size: 0.82rem; }
.mr-opt .ds { font-size: 0.7rem; color: #9ca3af; font-weight: 500; display: block; margin-top: 2px; }
.mr-opt.sel { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.mr-opt:active { transform: scale(.97); }

.mr-start {
  width: 100%; margin-top: 8px; padding: 16px; border: none; border-radius: 14px;
  background: #2563eb; color: #fff; font-size: 1.1rem; font-weight: 800; cursor: pointer;
}
.mr-start:active { background: #1d4ed8; }

/* 플레이 */
.mr-hud { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.mr-hud .box { text-align: center; flex: 1; }
.mr-hud .box .v { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.mr-hud .box .k { font-size: 0.72rem; color: #9ca3af; }
.mr-hud .timer .v { color: #2563eb; }
.mr-hud .timer .v.low { color: #dc2626; }

.mr-qbox {
  position: relative; background: #f9fafb; border-radius: 16px; padding: 28px 16px;
  text-align: center; margin-bottom: 16px;
}
.mr-q { font-size: 2.2rem; font-weight: 800; letter-spacing: 1px; }
.mr-eq { font-size: 1.6rem; color: #9ca3af; margin: 0 8px; }
.mr-a {
  display: inline-block; min-width: 60px; font-size: 2.2rem; font-weight: 800;
  color: #2563eb; border-bottom: 3px solid #2563eb; margin-top: 8px;
}
.mr-feedback {
  position: absolute; top: 8px; right: 14px; font-size: 1.6rem; font-weight: 800;
}
.mr-feedback.ok { color: #16a34a; }
.mr-feedback.no { color: #dc2626; }

/* 키패드 */
.mr-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mr-keypad button {
  padding: 18px 0; border: none; border-radius: 12px; background: #f3f4f6;
  font-size: 1.4rem; font-weight: 700; cursor: pointer; color: #1f2937;
}
.mr-keypad button:active { background: #e5e7eb; }
.mr-keypad button.ok { background: #2563eb; color: #fff; }
.mr-keypad button.c { background: #fef2f2; color: #dc2626; }

/* 결과 */
.mr-result { text-align: center; }
.mr-result .final { font-size: 3rem; font-weight: 800; color: #2563eb; }
.mr-result .final-lbl { color: #6b7280; margin-bottom: 14px; }
.mr-rankmsg { font-weight: 700; color: #16a34a; min-height: 24px; margin: 8px 0; }
.mr-save-row { display: flex; gap: 8px; margin: 14px 0; }
.mr-save-row input {
  flex: 1; padding: 12px; border: 2px solid #e5e7eb; border-radius: 10px; font-size: 1rem;
}
.mr-save-row button {
  padding: 12px 18px; border: none; border-radius: 10px; background: #2563eb;
  color: #fff; font-weight: 700; cursor: pointer;
}
.mr-save-row button:disabled { background: #9ca3af; }
.mr-save-note { font-size: 0.78rem; color: #9ca3af; margin: 6px 0 0; }
.mr-again {
  width: 100%; padding: 14px; border: 2px solid #2563eb; border-radius: 12px;
  background: #fff; color: #2563eb; font-weight: 700; cursor: pointer; margin-top: 6px;
}

/* 리더보드 */
.mr-board { margin-top: 18px; }
.mr-board h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; text-align: center; }
.mr-rank { list-style: none; padding: 0; margin: 0; counter-reset: r; }
.mr-rank li {
  display: flex; justify-content: space-between; padding: 9px 14px;
  border-bottom: 1px solid #f3f4f6; counter-increment: r;
}
.mr-rank li::before { content: counter(r); width: 24px; color: #9ca3af; font-weight: 700; }
.mr-rank li .nm { flex: 1; }
.mr-rank li .sc { font-weight: 800; color: #2563eb; }
.mr-rank li:nth-child(1) .sc { color: #d97706; }
.mr-empty { text-align: center; color: #9ca3af; padding: 20px; font-size: 0.9rem; }

/* SEO 본문 */
.mr-seo { max-width: 680px; margin: 24px auto 0; padding: 0 14px; }
.mr-seo .card {
  background: #f9fafb; border-radius: 14px; padding: 20px; margin-bottom: 16px;
}
.mr-seo h2 { font-size: 1.1rem; font-weight: 800; margin: 0 0 10px; }
.mr-seo p, .mr-seo li { color: #4b5563; line-height: 1.8; font-size: 0.92rem; }
.mr-seo ul { padding-left: 18px; margin: 0; }
.mr-seo .modes-links { display: flex; flex-wrap: wrap; gap: 8px; }
.mr-seo .modes-links a {
  padding: 8px 14px; border: 1px solid #d1d5db; border-radius: 999px;
  text-decoration: none; color: #374151; font-size: 0.85rem;
}
.mr-seo .modes-links a:hover { background: #eff6ff; border-color: #2563eb; color: #1d4ed8; }
