/* Spelling app - builds on /style.css */
.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: 1.9rem; margin: 0.4em 0 0.5em; }

.controls { text-align: center; margin-bottom: 16px; }
.picker-label { display: block; font-weight: 700; font-size: 1.1rem; margin-bottom: 6px; }
.picker {
  width: 100%; min-height: 52px; padding: 10px 16px;
  font: inherit; font-size: 1.2rem; font-weight: 700; color: var(--ink);
  background: #fff; border: 3px solid #ffcc33; border-radius: 18px;
}
.counter {
  display: inline-block; margin: 12px 0 0; padding: 8px 18px;
  background: #fff3bf; border-radius: 999px; font-size: 1.15rem; font-weight: 700;
}

.acts { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 18px; }
.act, .btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 64px; padding: 12px 16px; border: 0; border-radius: 22px;
  font: inherit; font-size: 1.3rem; font-weight: 700; color: #fff; cursor: pointer;
  box-shadow: 0 6px 0 rgba(0,0,0,.15); transition: transform .1s ease;
  touch-action: manipulation;
}
.act .emoji { font-size: 1.8rem; line-height: 1; }
.act:active, .btn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.act:focus-visible, .btn:focus-visible, .picker:focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; }
.act.on { outline: 4px solid var(--ink); outline-offset: 2px; }
.a-flash { background: #ff6b6b; }
.a-hear  { background: #9775fa; }
.a-quiz  { background: #20c997; }

.stage { min-height: 120px; }
.soon {
  text-align: center; padding: 28px 16px; background: #fff; border-radius: 24px;
  font-size: 1.6rem; font-weight: 700; box-shadow: 0 6px 0 rgba(0,0,0,.08);
}
.soon .emoji { display: block; font-size: 3rem; }

.card {
  background: #fff; border: 4px solid #ffcc33; border-radius: 28px;
  padding: 24px 16px; text-align: center; box-shadow: 0 8px 0 rgba(0,0,0,.08);
}
.card .word { font-size: clamp(3rem, 16vw, 5rem); font-weight: 700; margin: 8px 0 16px; word-break: break-word; }
.speak {
  width: 96px; height: 96px; border-radius: 50%; border: 0; background: #4dabf7;
  font-size: 2.8rem; cursor: pointer; box-shadow: 0 6px 0 rgba(0,0,0,.15); touch-action: manipulation;
}
.speak:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.card-btns { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 18px; }
.btn-yes  { background: #51cf66; }
.btn-more { background: #ff922b; }
.msg { margin-top: 10px; font-size: 1.1rem; min-height: 1.4em; }

@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 { animation: none; } }
@media (min-width: 560px) {
  .acts { grid-template-columns: repeat(3, 1fr); }
  .card-btns { grid-template-columns: 1fr 1fr; }
}

/* Hear & Spell */
[hidden] { display: none !important; }
.hs { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.btn-hear  { background: #4dabf7; font-size: 1.6rem; min-height: 80px; }
.btn-check { background: #51cf66; }
.btn-next  { background: #9775fa; }
.btn-tool  { background: #868e96; flex: 1; }
.btn:disabled { opacity: .45; }
.slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.slot {
  width: 44px; height: 56px; display: inline-flex; align-items: center; justify-content: center;
  border-bottom: 5px solid var(--ink); font-size: 2rem; font-weight: 700;
  background: #f8f9fa; border-radius: 8px 8px 0 0;
}
.slot.ok  { background: #b2f2bb; border-color: #2f9e44; }
.slot.bad { background: #ffd8a8; border-color: #e8590c; }
.tiles-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tile-btn {
  min-width: 56px; min-height: 56px; padding: 0 10px; border: 0; border-radius: 16px;
  background: #ffcc33; color: var(--ink); font: inherit; font-size: 1.8rem; font-weight: 700;
  box-shadow: 0 5px 0 rgba(0,0,0,.15); cursor: pointer; touch-action: manipulation;
}
.tile-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.15); }
.tile-btn:disabled { opacity: .3; box-shadow: none; }
.type-in {
  width: 100%; min-height: 56px; padding: 8px 14px; font: inherit; font-size: 1.8rem;
  text-align: center; border: 3px solid #4dabf7; border-radius: 16px; color: var(--ink);
}
.tools { display: flex; gap: 10px; }
.result { text-align: center; font-size: 1.4rem; font-weight: 700; min-height: 1.4em; }
.result .big { display: block; font-size: 3.5rem; line-height: 1.1; }
.toggle {
  align-self: center; min-height: 48px; padding: 0 18px; border: 2px solid #ced4da;
  border-radius: 999px; background: #fff; font: inherit; font-size: 1rem; color: var(--ink);
}

/* Quiz */
.dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.dot {
  width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: #e9ecef; color: #868e96; font-size: .85rem; font-weight: 700;
}
.dot.now   { outline: 3px solid var(--ink); }
.dot.right { background: #51cf66; color: #fff; }
.dot.wrong { background: #ffa94d; color: #fff; }
.end { text-align: center; }
.stars { font-size: 3.5rem; letter-spacing: 6px; animation: bounce .7s ease; }
.score { font-size: 1.6rem; font-weight: 700; margin: 8px 0 4px; }
@media (prefers-reduced-motion: reduce) { .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; margin: 0 0 12px; }
.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 { padding-left: 1.4em; font-size: 1.05rem; line-height: 1.6; }
.btn-reset { background: #e03131; width: 100%; margin-top: 12px; font-size: 1.1rem; min-height: 52px; }

/* Word / Sentence buttons */
.say-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.say-row .btn { min-height: 80px; font-size: 1.35rem; padding: 10px 8px; }
.say-word { background: #4dabf7; }
.say-sent { background: #20c997; }
