/* Einmaleins – 1×1 Mission (ergänzt site.css) */

:root { --dot-a: #3b82f6; --dot-b: #f59e0b; }

#row-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.row-card {
  background: var(--card); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 14px 6px 10px; text-align: center; cursor: pointer; user-select: none;
  transition: transform .1s, border-color .15s;
}
.row-card:hover { border-color: var(--primary); }
.row-card:active { transform: scale(.95); }
.row-card .num { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.row-card .medal { font-size: 1.1rem; margin-top: 4px; min-height: 1.4em; }
.row-card .medal.none { color: #cbd5e1; font-size: .85rem; padding-top: 4px; }
.row-card .rcount { font-size: .68rem; color: var(--muted); margin-top: 2px; min-height: 1.2em; }

/* Punktefeld */
.dotfield-wrap { display: flex; justify-content: center; margin: 14px 0; }
.dotfield { display: flex; flex-direction: column; gap: 4px; }
.dotrow { display: flex; gap: 4px; }
.dotrow.gap-after { margin-bottom: 8px; }
.dot { width: clamp(16px, 6.5vw, 26px); height: clamp(16px, 6.5vw, 26px); border-radius: 50%; background: var(--dot-a); transition: opacity .2s, transform .2s; }
.dot.alt { background: var(--dot-b); }
.dot.gap-after { margin-right: 8px; }
.dot.pop { animation: pop .35s ease; }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* Entdecken */
.discover-eq { font-size: 2rem; font-weight: 800; text-align: center; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.discover-eq .res { color: var(--success-dark); }
.discover-eq .qmark, .question .qmark { color: var(--primary); }
.discover-hint { text-align: center; color: var(--muted); font-size: .95rem; min-height: 1.5em; margin-bottom: 8px; }
.stepper { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 14px; }
.stepper button { width: 56px; height: 56px; border-radius: 50%; border: none; background: var(--primary); color: #fff; font-size: 1.6rem; font-weight: 700; }
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper .pos { font-size: 1.1rem; font-weight: 700; color: var(--muted); min-width: 70px; text-align: center; }
.reveal-btn { display: block; margin: 10px auto 0; background: var(--warn); color: #fff; border: none; border-radius: var(--radius-sm); padding: 12px 24px; font-size: 1rem; font-weight: 700; }

/* Fragen */
.q-progress { display: flex; gap: 5px; margin-bottom: 16px; }
.q-progress span { flex: 1; height: 8px; border-radius: 4px; background: var(--border); }
.q-progress span.done { background: var(--success); }
.q-progress span.miss { background: var(--warn); }
.q-progress span.current { background: var(--primary); }
.question { font-size: 2.4rem; font-weight: 800; text-align: center; margin: 10px 0; font-variant-numeric: tabular-nums; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.choice-btn {
  background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); padding: 18px 8px;
  font-size: 1.5rem; font-weight: 700; transition: transform .1s; font-variant-numeric: tabular-nums;
}
.choice-btn:active { transform: scale(.96); }
.choice-btn.right { background: var(--success); border-color: var(--success); color: #fff; }
.choice-btn.wrong { background: var(--error); border-color: var(--error); color: #fff; animation: shake .4s; }
.choice-btn:disabled { cursor: default; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.hint-box { background: var(--warn-soft); border: 2px solid #fde68a; border-radius: var(--radius-sm); padding: 12px 14px; font-size: .95rem; margin-top: 12px; line-height: 1.45; }
.hint-box b { color: var(--primary-dark); }
.feedback-m { text-align: center; font-size: 1.1rem; font-weight: 700; min-height: 1.6em; margin-top: 10px; }
.feedback-m.good { color: var(--success-dark); }
.feedback-m.bad { color: var(--warn-dark); }

/* Rakete */
.rocket-track { position: relative; height: 44px; margin-bottom: 14px; background: linear-gradient(90deg, #1e293b, #312e81); border-radius: 22px; overflow: hidden; }
.rocket-track .stars-bg { position: absolute; inset: 0; opacity: .7; font-size: .6rem; color: #fff; }
.rocket-track .planet { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; }
.rocket-track .rocket { position: absolute; left: 0; top: 50%; transform: translateY(-50%); font-size: 1.6rem; transition: left .5s ease; }

/* Nummernblock */
.answer-display { text-align: center; font-size: 2.2rem; font-weight: 800; min-height: 1.4em; margin: 6px 0 10px; color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.answer-display .placeholder { color: #cbd5e1; }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.numpad button { background: var(--card); border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 14px 0; font-size: 1.4rem; font-weight: 700; }
.numpad button:active { background: var(--border); }
.numpad .ok { background: var(--success); border-color: var(--success); color: #fff; }
.numpad .del { font-size: 1.2rem; }

/* Ergebnis */
.result-medal { font-size: 4rem; text-align: center; margin: 10px 0; }
.result-text { text-align: center; font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }
.result-sub { text-align: center; color: var(--muted); margin-bottom: 18px; }

.toggle-btn { background: var(--border); border: none; border-radius: 10px; padding: 10px 16px; font-weight: 700; }
.toggle-btn.on { background: var(--success); color: #fff; }

/* ── Erweiterung: großes 1×1, Geteilt, Hundeschule ── */
.row-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.row-card .medals { display: flex; justify-content: center; gap: 8px; font-size: .78rem; color: var(--muted); margin-top: 4px; min-height: 1.4em; font-variant-numeric: tabular-nums; }
.dotfield-lg .dot { width: clamp(8px, 3.1vw, 14px); height: clamp(8px, 3.1vw, 14px); }
.dotfield-lg .dotrow { gap: 3px; }
.dotfield-lg .dot.gap-after { margin-right: 6px; }

.challenge { background: var(--warn-soft); border: 1.5px solid #fde68a; border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 12px; }
.challenge-text { font-size: .92rem; line-height: 1.4; }
.challenge-bar { height: 8px; background: rgba(0,0,0,.08); border-radius: 99px; overflow: hidden; margin: 8px 0 6px; }
.challenge-bar > div { height: 100%; background: var(--warn-dark); border-radius: 99px; transition: width .4s; }
.challenge-status { font-size: .8rem; color: #92400e; font-weight: 600; }

.pack { font-size: 2rem; line-height: 1.4; letter-spacing: 4px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.badge { background: var(--card-2); border-radius: var(--radius-sm); padding: 12px 6px; text-align: center; opacity: .45; filter: grayscale(1); }
.badge.got { opacity: 1; filter: none; background: var(--warn-soft); }
.badge-e { font-size: 1.9rem; line-height: 1.2; }
.badge-name { font-weight: 700; font-size: .82rem; margin-top: 4px; }
.badge-desc { font-size: .7rem; color: var(--muted); margin-top: 2px; line-height: 1.3; }
.badge-date { font-size: .66rem; color: var(--warn-dark); margin-top: 3px; }

.toast {
  position: fixed; left: 50%; top: 14px; transform: translate(-50%, -30px); opacity: 0;
  background: #1e293b; color: #fff; border-radius: var(--radius-sm); padding: 12px 18px;
  font-size: .92rem; line-height: 1.4; box-shadow: 0 8px 30px rgba(0,0,0,.25); z-index: 100;
  max-width: calc(100vw - 32px); text-align: center; transition: transform .3s, opacity .3s; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* Zehnerreihen: Stangen statt Punkte */
.tensfield .dotrow { gap: 3px; }
.tens {
  width: clamp(22px, 7vw, 34px); height: clamp(14px, 4.5vw, 20px); border-radius: 5px;
  background: var(--dot-a); color: #fff; font-size: .6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; transition: opacity .2s;
}
.tens.alt { background: var(--dot-b); }
.tens.gap-after { margin-right: 8px; }
.tens.pop { animation: pop .35s ease; }
