/* Shared look for the learning apps (math, reading): top bar, topic grid, cards, buttons,
   progress dots, choices, keypad, results, end screen, grown-ups. Builds on /style.css. */
[hidden] { display: none !important; }
.topbar { display: flex; align-items: center; }
.home-btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px;
  border-radius: 999px; background: #4dabf7; color: #fff; text-decoration: none;
  font-size: 1.1rem; font-weight: 700; box-shadow: 0 4px 0 rgba(0,0,0,.15);
}
.home-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,.15); }
h1 { font-size: 2rem; margin: 0.4em 0 0.3em; }
.counter-row { text-align: center; margin: 0 0 16px; }
.counter { display: inline-block; padding: 8px 18px; background: #fff3bf; border-radius: 999px; font-size: 1.15rem; font-weight: 700; }

.topics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.topic, .btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 64px; padding: 12px 10px; border: 0; border-radius: 22px;
  font: inherit; font-size: 1.15rem; font-weight: 700; color: #fff; cursor: pointer; text-align: center;
  box-shadow: 0 6px 0 rgba(0,0,0,.15); transition: transform .1s ease; touch-action: manipulation;
}
.topic { min-height: 96px; }
.topic .emoji { font-size: 1.9rem; line-height: 1; }
.topic small { font-size: .85rem; font-weight: 600; }
.topic:active, .btn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.topic:focus-visible, .btn:focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; }
.topic.on { outline: 4px solid var(--ink); outline-offset: 2px; }
.topic.soon-t { background: #c9c9c9 !important; color: #6b6b6b; box-shadow: none; }
.c1 { background: #ff6b6b; grid-column: 1 / -1; }
.c2 { background: #4dabf7; } .c3 { background: #9775fa; } .c4 { background: #51cf66; }
.c5 { background: #ff922b; } .c6 { background: #20c997; } .c7 { background: #f06595; }

.stage { min-height: 40px; }
.card {
  background: #fff; border: 4px solid #ffcc33; border-radius: 28px; padding: 20px 16px;
  text-align: center; box-shadow: 0 8px 0 rgba(0,0,0,.08); display: flex; flex-direction: column; gap: 14px;
}
.card h2 { margin: 0; font-size: 1.6rem; }
.soon { text-align: center; padding: 28px 16px; background: #fff; border-radius: 24px; font-size: 1.6rem; font-weight: 700; }
.soon .emoji { display: block; font-size: 3rem; }
.pick-label { font-size: .95rem; font-weight: 700; color: #495057; }
.picker {
  width: 100%; min-height: 52px; padding: 10px 14px; font: inherit; font-size: 1.1rem; font-weight: 700;
  color: var(--ink); background: #fff; border: 3px solid #ffcc33; border-radius: 18px;
}
.btn-go { background: #51cf66; font-size: 1.5rem; min-height: 72px; }
.btn-say { background: #4dabf7; font-size: 1.3rem; min-height: 60px; }
.btn-next { background: #9775fa; }
.btn-yes { background: #51cf66; }

.dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.dot { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: #e9ecef; color: #868e96; font-size: .8rem; font-weight: 700; }
.dot.now { outline: 3px solid var(--ink); }
.dot.right { background: #51cf66; color: #fff; }
.dot.wrong { background: #ffa94d; color: #fff; }

.problem { font-size: clamp(3rem, 15vw, 4.6rem); font-weight: 700; line-height: 1.1; white-space: nowrap; }
.problem .blank { display: inline-block; min-width: 1.4em; border-bottom: 6px solid var(--ink); color: #4dabf7; }
.answer { min-height: 1.3em; font-size: 3rem; font-weight: 700; color: #4dabf7; }
.result { font-size: 1.35rem; font-weight: 700; min-height: 1.4em; }
.result .big { display: block; font-size: 3.2rem; line-height: 1.1; }

/* keypad */
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.key {
  min-height: 64px; border: 0; border-radius: 18px; background: #ffcc33; color: var(--ink);
  font: inherit; font-size: 2rem; font-weight: 700; box-shadow: 0 5px 0 rgba(0,0,0,.15);
  touch-action: manipulation; cursor: pointer;
}
.key:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.15); }
.key.back { background: #868e96; color: #fff; }
.key.ok { background: #51cf66; color: #fff; font-size: 1.4rem; }
.key:disabled { opacity: .4; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { min-height: 72px; font-size: 2rem; background: #ffcc33; color: var(--ink); }
.choice.ok { background: #51cf66; color: #fff; }
.choice.bad { background: #ffa94d; color: #fff; }

.end .stars { font-size: 3.5rem; letter-spacing: 6px; animation: bounce .7s ease; }
.score { font-size: 1.6rem; font-weight: 700; margin: 0; }
.card-btns { display: grid; grid-template-columns: 1fr; gap: 12px; }
@keyframes bounce { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.12) translateY(-10px); } 60% { transform: scale(.96); } }
.bounce { animation: bounce .5s ease; }
@media (prefers-reduced-motion: reduce) { .bounce, .end .stars { animation: none; } }

/* grown-ups */
.foot { text-align: center; margin: 28px 0 8px; }
.grownups { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; color: #6c757d; font-size: 1rem; text-decoration: none; border-radius: 999px; }
.grownups:active { background: #f1f3f5; }
.parents { text-align: left; font-family: system-ui, -apple-system, sans-serif; }
.parents h2 { text-align: center; }
.parents h3 { margin: 6px 0 0; }
.stats { width: 100%; border-collapse: collapse; font-size: 1rem; }
.stats th, .stats td { padding: 8px 6px; border-bottom: 1px solid #e9ecef; text-align: left; }
.tricky { margin: 0; padding-left: 1.4em; font-size: 1.05rem; line-height: 1.6; }
.btn-voice { background: #4dabf7; font-size: 1.1rem; min-height: 52px; }
.btn-reset { background: #e03131; font-size: 1.1rem; min-height: 52px; }
@media (min-width: 560px) {
  .topics { grid-template-columns: repeat(3, 1fr); }
  .card-btns { grid-template-columns: 1fr 1fr; }
}


/* prompts, show-me area, compact dots, long problems */
.prompt { margin: 0; font-size: 1.25rem; font-weight: 700; color: #495057; }
.show { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.show-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.show-op { font-size: 1.1rem; font-weight: 700; }
.show-note { margin: 4px 0 0; font-size: 1.05rem; font-weight: 700; color: #495057; }
.choice:disabled { opacity: .6; }
.show-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dots { gap: 4px; }
.dot { width: 26px; height: 26px; font-size: .75rem; }
.choice.pic { padding: 6px; min-height: 120px; }
.choice.pic .clock { width: 112px; height: 112px; }
.choice.pic.ok { background: #b2f2bb; } .choice.pic.bad { background: #ffd8a8; }
.problem.long { font-size: clamp(2rem, 10.5vw, 3.2rem); }
.problem.xlong { font-size: clamp(1.6rem, 7.5vw, 2.6rem); }
.show:empty { display: none; }

/* TapUI: tap-a-word sentence and tap-to-order tiles (/shared/tapui.js) */
.tapsent { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tw {
  min-height: 56px; min-width: 48px; padding: 6px 14px; border: 3px solid #ffe066; border-radius: 16px; background: #fff9db;
  font: inherit; font-size: 1.5rem; font-weight: 700; color: var(--ink); cursor: pointer; touch-action: manipulation;
}
.tw:active { transform: translateY(2px); }
.tw.ok { background: #51cf66; border-color: #51cf66; color: #fff; }
.tw.bad { background: #ffa94d; border-color: #ffa94d; color: #fff; }
.tw:disabled { cursor: default; }

/* ABC order */
.order { display: grid; gap: 12px; }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.slot { min-height: 48px; display: flex; align-items: center; justify-content: center; border: 3px dashed #ced4da; border-radius: 14px; font-size: 1.2rem; font-weight: 700; color: #adb5bd; }
.slot.filled { border-style: solid; border-color: #4dabf7; background: #e7f5ff; color: var(--ink); }
.abc-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.abc-tile.btn { min-height: 64px; font-size: 1.6rem; background: #ffcc33; color: var(--ink); }
.abc-tile.btn:disabled { opacity: .35; }
.btn-undo { background: #868e96; min-height: 52px; font-size: 1.1rem; }
.btn-undo:disabled { opacity: .4; }

/* Learn deck (/shared/deck.js) */
.deck-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.deck-count { font-weight: 700; color: #868e96; }
.deck-art { font-size: 4.2rem; line-height: 1.15; text-align: center; min-height: 1.2em; letter-spacing: 4px; }
.deck-art.svg { font-size: 1rem; letter-spacing: 0; }
.deck-title { margin: 0; text-align: center; }
.deck-text { margin: 0; font-size: 1.35rem; line-height: 1.6; text-align: left; }
.deck-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-prev { background: #adb5bd; } .btn-prev:disabled { opacity: .4; }

.btn-back { background: #868e96; min-height: 48px; font-size: 1rem; padding: 8px 14px; }
