/* Find the Missing Number (Math). Chart on the left, question on the right; stacks on narrow screens. Motion only on the Hint page (off for reduced-motion). */
.mn-topline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 10px; }
.mn-lead { margin: 0; }
.mn-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.mn-chart { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; padding: 6px; border: 3px solid var(--ink); border-radius: 14px; background: white; }
.mn-cell { position: relative; border: 0; padding: 0; font-family: inherit; cursor: pointer; touch-action: manipulation; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 6px; background: var(--sky); font-weight: 800; font-size: clamp(.7rem, 1.9vw, 1.15rem); color: var(--ink); user-select: none; }
.mn-cell.mn-yellow { background: #ffe14d; box-shadow: inset 0 0 0 2px #d9a800; }
.mn-cell.mn-outline { outline: 4px solid var(--ink); outline-offset: -3px; background: white; position: relative; z-index: 1; }
.mn-right { background: var(--paper); border: 2px solid var(--border); border-radius: 18px; padding: 18px; min-height: 320px; }
.mn-prompt { margin: 0 0 10px; color: var(--muted); font-weight: 800; }
.mn-equation { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; font-size: clamp(1.8rem, 4.6vw, 2.8rem); font-weight: 900; margin: 10px 0 14px; }
.mn-input, .mn-blank { width: 3.2ch; min-width: 76px; height: 1.5em; text-align: center; font-size: inherit; font-weight: 900; border: 4px dashed var(--blue-action); border-radius: 14px; background: white; color: var(--ink); }
.mn-input:focus-visible { outline: 4px solid var(--blue-action); outline-offset: 2px; }
.mn-blank { display: inline-flex; align-items: center; justify-content: center; border-style: solid; border-color: var(--green-dark); background: #e6f6ec; }
.mn-feedback { min-height: 3em; margin: 0 0 6px; text-align: center; font-weight: 800; font-size: 1.1rem; }
.mn-earned { margin: 0 0 8px; text-align: center; font-weight: 900; color: var(--green-dark); font-size: 1.2rem; }
.mn-hint-text { margin: 0 0 10px; padding: 8px 14px; border-radius: 14px; background: #fff3b0; border: 2px solid #d9a800; font-weight: 800; }
.mn-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.mn-actions .btn { min-width: 130px; min-height: 54px; font-size: 1.1rem; }
.mn-end { text-align: center; }
.mn-piko { width: 140px; height: auto; }
.mn-total { font-size: 1.6rem; font-weight: 900; color: var(--green-dark); margin: 6px 0 14px; }
@media (max-width: 900px) { .mn-layout { grid-template-columns: 1fr; } .mn-right { min-height: 0; } }
.mn-screen h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 4px 0 6px; }
.mn-chart { max-width: 560px; }
/* Tap-to-count: green box + small red counter in the top-left corner; light red X on a wrong tap (~1s). */
.mn-cell:focus-visible { outline: 4px solid var(--blue-action); outline-offset: 1px; z-index: 2; }
.mn-cell.mn-tapped { background: #7fdc9a; box-shadow: inset 0 0 0 2px var(--green-dark); }
.mn-count { position: absolute; top: 1px; left: 2px; padding: 0 3px; border-radius: 6px; background: white; color: #b00020; font-size: clamp(.5rem, 1.2vw, .75rem); font-weight: 900; line-height: 1.25; pointer-events: none; }
.mn-cell.mn-wrong::after { content: "\2715"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: rgba(255, 200, 200, .8); color: #e57373; font-size: clamp(1rem, 3vw, 1.8rem); font-weight: 900; pointer-events: none; }
/* Score + Hint now live in the top bar (same as the Halloween Graveyard Maze). */
.mn-screen .game-topbar { margin-bottom: 10px; align-items: flex-start; }
.mn-screen .game-topbar .stat-row { align-items: flex-start; }
/* Hint page: step-by-step demo on the real chart. */
.mn-hintpage { font-size: 1.15rem; }
.mn-chart-demo .mn-cell { cursor: default; }
.mn-chart-demo .mn-cell.mn-outline { background: white; }
.mn-hint-blank { width: 3.2ch; min-width: 76px; height: 1.5em; border-style: dashed; border-color: var(--blue-action); background: white; }
.mn-hint-blank.mn-blank-done { border-style: solid; border-color: var(--green-dark); background: #e6f6ec; }
.mn-caption { min-height: 4.2em; margin: 0 0 8px; text-align: center; font-weight: 800; font-size: 1.25rem; }
.mn-bigcount { min-height: 1.3em; text-align: center; font-size: 3.2rem; font-weight: 900; color: #b00020; line-height: 1.2; }
.mn-rule { margin: 8px 0 0; padding-left: 1.4em; font-weight: 700; }
.mn-play { background: #ffe14d; border-color: #d9a800; min-height: 54px; font-size: 1.15rem; }
.mn-replay { min-height: 54px; font-size: 1.15rem; }
.mn-cell.mn-pop { animation: mn-pop .45s ease-out; }
.mn-bigcount.mn-bump { animation: mn-pop .45s ease-out; }
@keyframes mn-pop { 0% { transform: scale(.4); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .mn-cell.mn-pop, .mn-bigcount.mn-bump { animation: none; } }
/* Challenge button sits directly under Hint (same button styles; blue = on). */
.mn-hint-col { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
