/* Child screens. Spec 3.5.3: large, separated tap targets; nothing
   interactive near the bottom edge; landscape layout. */

* { box-sizing: border-box; }

/* laptops and desktops: the mouse pointer shows what a click does */
button:not(:disabled), select, input[type="file"] { cursor: pointer; }
button:disabled { cursor: not-allowed; }

html, body {
  margin: 0;
  height: 100%;
  background: #fdf8ef;
  font-family: system-ui, sans-serif;
  color: #222;
  /* 3.5.2: no double-tap zoom, no text selection on press */
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

main#screen {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6vh;
  /* keep the bottom 18% free of anything interactive */
  padding: 6vh 6vw 18vh;
}

/* flash quantity (1.3.1) */

educa-flash-quantity { display: flex; flex-direction: column; align-items: center; gap: 6vh; width: 100%; }

.stimulus { height: 40vh; display: flex; align-items: center; justify-content: center; }
.stimulus.hidden { visibility: hidden; }
.stimulus-art { height: 100%; max-width: 80vw; }

.dot.first-five { fill: #1f5fbf; }
.dot.after-five { fill: #d1452b; }
.palm { fill: #f2c39b; }
.finger.raised { fill: #f2c39b; stroke: #b07a4f; stroke-width: 3; }
.finger.folded { fill: #e0a97d; }

.choices { display: flex; gap: 3vw; }

.choice {
  width: 14vmin;
  height: 14vmin;
  border: 0.5vmin solid #333;
  border-radius: 3vmin;
  background: white;
  font-size: 8vmin;
  font-weight: 700;
}

.choices.answered .choice, .choices.waiting .choice { opacity: 0.5; }

/* 3.4.2, help step 3: the correct number stands out. */
.choice.highlighted { border-color: #1a9c3c; background: #c9f2d3; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }

@media (orientation: portrait) {
  main#screen::before {
    content: "↻";
    font-size: 20vmin;
  }
}

/* introduction (3.2.1) */

.start {
  flex-shrink: 0;
  width: 30vmin;
  height: 22vmin;
  border: 0.8vmin solid #1a9c3c;
  border-radius: 5vmin;
  background: #c9f2d3;
  font-size: 14vmin;
  line-height: 1;
}
.introduction { max-width: 80vw; font-size: 5vmin; text-align: center; }

/* openings and results of reviews and checks (4.2.3) */

.opening, .result { display: flex; flex-direction: column; align-items: center; gap: 2vh; max-width: 80vw; text-align: center; }
.activity-label { margin: 0; font-size: 9vmin; font-weight: 700; color: #1f5fbf; }
.topic-title { margin: 0; font-size: 6vmin; font-weight: 700; }
.opening .sentence, .result .sentence { margin: 0; font-size: 5vmin; }
.result .star.mastered-topic { font-size: 25vmin; }
.marks { display: flex; gap: 2vmin; font-size: 9vmin; line-height: 1; }
.mark.full { color: #1a9c3c; }
.mark.empty { color: #999; }
.score { margin: 0; font-size: 5vmin; }

/* lesson events (3.2.2, 3.3.2) */

.star.mastered-topic { font-size: 50vmin; }

/* end of session (3.1.8) */

.home {
  align-self: flex-start;
  flex-shrink: 0;
  width: 18vmin;
  height: 18vmin;
  border: 0.6vmin solid #333;
  border-radius: 4vmin;
  background: white;
  font-size: 12vmin;
  line-height: 1;
}

.progress { display: flex; flex-direction: column; align-items: center; gap: 4vh; max-width: 90vw; }
.progress .mastered, .progress .answered { display: flex; flex-wrap: wrap; justify-content: center; gap: 1vmin; }
/* rewards at session end (11.5) */

.session-end, .after-rewards, .rewards { display: flex; flex-direction: column; align-items: center; gap: 4vh; width: 100%; }
.rewards .coins, .rewards .flames { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.5vmin; max-width: 90vw; }
/* Coins and flames by worth, as the stars: each worth larger than the
   one below. A coin is a drawn disc, no glyph to miss on a tablet. */
.coin { display: inline-block; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe680, #e0a800); border: 0.5vmin solid #b88600; }
.coin[data-worth="1"] { width: 7vmin; height: 7vmin; }
.coin[data-worth="10"] { width: 10vmin; height: 10vmin; }
.coin[data-worth="100"] { width: 13vmin; height: 13vmin; background: radial-gradient(circle at 35% 35%, #ffd0a0, #f07800); border-color: #b85a00; }
.coin[data-worth="1000"] { width: 16vmin; height: 16vmin; background: radial-gradient(circle at 35% 35%, #d9b8f5, #7b2cbf); border-color: #4e1a7f; }
.flame { line-height: 1; }
.flame[data-worth="1"] { font-size: 6vmin; }
.flame[data-worth="10"] { font-size: 9vmin; }
.flame[data-worth="100"] { font-size: 12vmin; }
.flame[data-worth="1000"] { font-size: 15vmin; }
.reward-numbers { margin: 0; font-size: 5vmin; }

/* A star's worth (owner, 2026-10-17): each worth is larger than the one
   below; 1 and 10 are gold, 100 orange, 1000 purple. */
.star { line-height: 1; color: #f2b600; }
.star[data-worth="100"] { color: #f07800; }
.star[data-worth="1000"] { color: #7b2cbf; }
.star.big[data-worth="1"] { font-size: 10vmin; }
.star.big[data-worth="10"] { font-size: 13vmin; }
.star.big[data-worth="100"] { font-size: 16vmin; }
.star.big[data-worth="1000"] { font-size: 19vmin; }
.star.little[data-worth="1"] { font-size: 5vmin; }
.star.little[data-worth="10"] { font-size: 7vmin; }
.star.little[data-worth="100"] { font-size: 9vmin; }
.star.little[data-worth="1000"] { font-size: 11vmin; }

/* continue choice (3.1.7) */

/* 3.1.7.3 (owner, C2): each choice always has the same colour, and no two
   share one: math blue, Portuguese green, stop (✋) grey. Wraps when held
   in portrait (three buttons are wider than the screen there). */
.continue-choice { display: flex; flex-wrap: wrap; gap: 6vmin; align-items: center; align-content: center; justify-content: center; flex: 1; }
.continue {
  width: 30vmin;
  height: 30vmin;
  border: 0.8vmin solid;
  border-radius: 5vmin;
  font-size: 10vmin;
  font-weight: 700;
  line-height: 1;
}
.continue.math { border-color: #1f5fbf; background: #cfe0fb; color: #1f5fbf; }
.continue.portuguese { border-color: #1a9c3c; background: #c9f2d3; color: #1a9c3c; }
.continue.stop { border-color: #666; background: #e4e4e4; color: #444; font-size: 16vmin; }

/* sound to letter (1.3.2, 7.2) */

educa-sound-to-letter { display: flex; flex-direction: column; align-items: center; gap: 8vh; width: 100%; }
/* owner D6: 🔊 replays the letter's sound */
.replay {
  width: 22vmin;
  height: 22vmin;
  border: 0.6vmin solid #333;
  border-radius: 50%;
  background: white;
  font-size: 11vmin;
  line-height: 1;
}
.choice.letter { font-size: 9vmin; }

/* Dante's items (1.3.3, 1.3.4; owner D2, D7) */

/* Question on the left, input on the right; a long passage may make the
   page scroll (owner D7: Dante's screens, unlike Benja's). */
.reading-item { display: flex; gap: 5vw; width: 100%; align-items: flex-start; }
.question-text { flex: 1; min-width: 0; font-size: 3.4vmin; line-height: 1.45; user-select: text; -webkit-user-select: text; }
.question-text .prompt { white-space: pre-wrap; margin: 0 0 2vh; }
.question-text .help { color: #8a4b00; background: #fff1d6; border-radius: 2vmin; padding: 1.5vmin 2vmin; margin: 0 0 2vh; }
/* help step 3 of an equation: the worked solution (owner, 2026-10-19),
   one MathLive block; wider than the column, it scrolls sideways and
   never covers the keypad (1.8.9). min-width: 0 above lets the column
   shrink below its content, so the scroll happens here. */
/* 1.8.1: a math block takes its own lines */
.math-block { display: block; margin: 0.5vh 0; }
.question-text .solution-steps { margin: 0 0 2vh; padding: 0.5vh 0; overflow-x: auto; overflow-y: hidden; max-width: 100%; }
.question-text .answer-shown { color: #1a9c3c; font-weight: 700; font-size: 4.5vmin; margin: 0; }

educa-typed-number { display: flex; flex-direction: column; align-items: center; gap: 2vh; }
.typed-display {
  min-width: 42vmin;
  min-height: 11vmin;
  border: 0.5vmin solid #333;
  border-radius: 2vmin;
  background: white;
  font-size: 7vmin;
  font-weight: 700;
  text-align: right;
  padding: 0 2vmin;
  line-height: 11vmin;
}
.keypad { display: grid; grid-template-columns: repeat(3, 13vmin); gap: 1.5vmin; }
.key { height: 10vmin; border: 0.4vmin solid #333; border-radius: 2vmin; background: white; font-size: 5.5vmin; font-weight: 700; }
.key.confirm { grid-column: span 3; border-color: #1a9c3c; background: #c9f2d3; }
.keypad.answered .key { opacity: 0.5; }

educa-multiple-choice { display: flex; flex-direction: column; gap: 2vh; width: 44vw; }
.option {
  min-height: 10vmin;
  border: 0.4vmin solid #333;
  border-radius: 2vmin;
  background: white;
  font-size: 3.6vmin;
  text-align: left;
  padding: 1.5vmin 2.5vmin;
}
educa-multiple-choice.answered .option { opacity: 0.5; }
.option.highlighted { border-color: #1a9c3c; background: #c9f2d3; }

/* parent's preview (owner, P8): the child's screen, a way out */

.preview-exit { position: fixed; top: 0.5rem; left: 0.5rem; z-index: 10; font: 1rem system-ui, sans-serif; background: white; padding: 0.3rem 0.6rem; border-radius: 0.4rem; }
.preview-result { font-size: 8rem; color: #1a9c3c; text-align: center; margin: 2rem 0 0; }
.preview-again { display: block; text-align: center; font: 1.5rem system-ui, sans-serif; }
