/* Hear the Number (Math, counting piece 3). Tap, chart and block levels. Every tap target is 44 px or more. */
.hn-intro { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.hn-piko { width: 84px; height: auto; flex: none; }
.hn-screen h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 4px 0 6px; }
.hn-play { background: var(--paper); border: 2px solid var(--border); border-radius: 18px; padding: 16px; }
.hn-prompt { margin: 0 0 8px; color: var(--ink); font-weight: 800; font-size: 1.15rem; text-align: center; }
.hn-hear { display: flex; justify-content: center; margin: 4px 0 12px; }
.hn-first { min-height: 64px; font-size: 1.4rem; padding: 10px 28px; }
.hn-speaker.fd-speaker { display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: 10px; width: auto; height: auto; min-height: 56px; padding: 8px 22px; border-radius: 999px; font-size: 1.15rem; font-weight: 900; }
.hn-wait { opacity: .45; }
/* tap levels: every number on the page (L1, L2) or 6 choices (L3, L4) */
.hn-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 8px 0 14px; }
.hn-tile { position: relative; min-width: 72px; min-height: 72px; padding: 6px 12px; font-size: 2rem; font-weight: 900; font-family: inherit; color: var(--ink); background: #ffe9a8; border: 4px solid var(--ink); border-radius: 14px; box-shadow: 0 3px 0 rgba(0, 0, 0, .25); cursor: pointer; touch-action: manipulation; }
.hn-tiles.hn-n6 .hn-tile { min-width: 96px; min-height: 84px; font-size: 2.2rem; }
.hn-tiles.hn-n20 { max-width: 760px; margin-left: auto; margin-right: auto; }
.hn-tiles.hn-n20 .hn-tile { min-width: 60px; min-height: 60px; font-size: 1.6rem; }
.hn-tile.hn-out { background: #dcdcdc; color: #777; border-color: #999; box-shadow: none; cursor: default; text-decoration: line-through; }
.hn-tile.hn-right, .hn-box.hn-right { background: #e6f6ec; border-color: var(--green-dark); }
.hn-tile.hn-reveal, .hn-box.hn-reveal { background: #fff3c4; border: 4px dotted #b07a00; }
.hn-tile:disabled { cursor: default; }
.hn-mark { position: absolute; top: -12px; right: -8px; width: 28px; height: 28px; border-radius: 50%; color: white; font-size: 1rem; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.hn-check { background: var(--green-dark); }
.hn-star { background: #b07a00; }
/* a wrong answer is loud: red fill, thick red border, a cross sign (not colour alone), a short shake. It stays until the child's next tap. */
.hn-tile.hn-wrong, .hn-box.hn-wrong { background: #ffd0d0; color: #8a0018; border: 5px solid #c4001f; animation: hn-shake .4s; }
.hn-x { background: #c4001f; left: -8px; right: auto; }
.hn-x-big { top: -16px; left: -12px; width: 38px; height: 38px; font-size: 1.4rem; z-index: 2; }
.hn-chart-wrong { outline: 5px solid #c4001f; outline-offset: 4px; background: #fff0f0 !important; }
.hn-feedback { min-height: 3em; margin: 0 0 6px; text-align: center; font-weight: 800; font-size: 1.15rem; }
.hn-feedback-wrong { padding: 8px 14px; border: 3px solid #c4001f; border-radius: 14px; background: #fff0f0; color: #8a0018; }
.hn-earned { margin: 0 0 8px; text-align: center; font-weight: 900; color: var(--green-dark); font-size: 1.2rem; }
.hn-actions { display: flex; justify-content: center; }
.hn-actions .btn { min-width: 170px; min-height: 54px; font-size: 1.1rem; }
/* chart (L5) */
.hn-chart { position: relative; display: flex; justify-content: center; gap: 14px; margin: 8px 0 12px; padding: 12px; border-radius: 16px; background: var(--sky); }
.hn-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hn-head { font-weight: 900; font-size: 1.05rem; color: var(--green-dark); }
.hn-box { display: inline-flex; align-items: center; justify-content: center; min-width: 84px; min-height: 84px; font-size: 2.6rem; font-weight: 900; font-family: inherit; color: var(--ink); background: white; border: 4px dashed var(--blue-action); border-radius: 14px; cursor: pointer; touch-action: manipulation; }
.hn-box.hn-active { border-style: solid; border-color: var(--ink); box-shadow: 0 0 0 4px #ffe14d; }
.hn-box.hn-static { cursor: default; border-style: solid; }
.hn-pad { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 6px 0 10px; }
.hn-key { min-width: 56px; min-height: 56px; font-size: 1.6rem; font-weight: 900; font-family: inherit; color: var(--ink); background: #ffe9a8; border: 3px solid var(--ink); border-radius: 12px; cursor: pointer; touch-action: manipulation; }
.hn-key:disabled { opacity: .5; cursor: default; }
.hn-ctl { display: flex; justify-content: center; gap: 12px; margin: 6px 0 10px; }
.hn-btn { min-width: 120px; min-height: 52px; font-size: 1.1rem; }
/* blocks (L6) */
.hn-adds { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 8px 0; }
.hn-add { display: inline-flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 120px; min-height: 100px; padding: 8px 12px; font-family: inherit; font-weight: 900; font-size: 1rem; color: var(--ink); background: #ffe9a8; border: 3px solid var(--ink); border-radius: 12px; cursor: pointer; touch-action: manipulation; }
.hn-add:disabled { opacity: .5; cursor: default; }
.hn-mat { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 120px; margin: 8px 0 10px; padding: 12px; border-radius: 16px; background: var(--sky); border: 3px dashed var(--blue-action); }
.hn-lane { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px; min-height: 52px; padding: 2px 4px; border-bottom: 2px dotted rgba(0, 0, 0, .2); }
.hn-lane:last-of-type { border-bottom: 0; }
.hn-mat-block { display: inline-flex; align-items: flex-end; justify-content: center; min-width: 44px; min-height: 44px; padding: 2px; background: transparent; border: 0; cursor: pointer; touch-action: manipulation; }
.hn-mat-block:disabled { cursor: default; }
.hn-mat-right { background: #e6f6ec; border: 3px solid var(--green-dark); }
.hn-mat-reveal { background: #fff3c4; border: 3px dotted #b07a00; }
.hn-mat-block img, .hn-add img { display: block; }
.hn-add .ns-blocks, .hn-mat-block .ns-blocks { display: inline-flex; align-items: flex-end; }
/* level choice, end page, hint and help pages */
.hn-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.hn-level { min-height: 56px; font-size: 1.1rem; }
.hn-end-page { text-align: center; }
.hn-end-piko { width: 140px; height: auto; }
.hn-total { font-size: 1.6rem; font-weight: 900; color: var(--green-dark); margin: 6px 0 14px; }
.hn-hint-row { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.hn-hint-used { margin: 0; font-size: 1.4rem; font-weight: 900; }
.hn-hint-text, .hn-help-text { font-size: 1.3rem; font-weight: 700; line-height: 1.5; max-width: 46em; }
.hn-example { display: flex; justify-content: flex-start; gap: 14px; margin: 8px 0; }
@keyframes hn-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .hn-tile.hn-wrong, .hn-box.hn-wrong { animation: none; } }
@media (max-width: 600px) {
  .hn-piko { width: 56px; }
  .hn-play { padding: 10px; }
  .hn-tiles { gap: 8px; }
  .hn-tile { min-width: 60px; min-height: 60px; font-size: 1.7rem; }
  .hn-tiles.hn-n6 .hn-tile { min-width: 88px; min-height: 72px; font-size: 1.9rem; }
  .hn-tiles.hn-n20 .hn-tile { min-width: 56px; min-height: 52px; font-size: 1.4rem; }
  .hn-chart { gap: 8px; padding: 8px; }
  .hn-box { min-width: 76px; min-height: 76px; font-size: 2.2rem; }
  .hn-key { min-width: 50px; min-height: 50px; font-size: 1.4rem; }
  .hn-add { min-width: 96px; font-size: .9rem; }
}
