/* ==========================================================================
   SENTENCE STATION
   Layout for the four sentence games. Shared chrome (screens, top bar, score
   pill, chips, answer buttons, settings, confetti) lives in kids-common.css.
   ========================================================================= */

.game-btn.mode-build { background: #c0504d; }
.game-btn.mode-words { background: #7f77dd; }
.game-btn.mode-gap { background: #1d9e75; }
.game-btn.mode-ending { background: #e08a2e; }

#scr-play {
  align-items: stretch;
}

#level-chips .chip-note {
  white-space: nowrap;
}

/* The sentences themselves: a school-friendly face with single-storey a and
   g where the device has one. */
.sentence-line,
.build-hint,
.carriage {
  font-family: "Century Gothic", "Comic Sans MS", "Chalkboard SE", "Andika", inherit;
}

/* ===================== Build a sentence ===================== */

.build-hint {
  color: #a49fd8;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

/* The train: an engine, then one carriage per word, wrapping onto a second
   line for the longer level 3 sentences rather than scrolling sideways. */
.train {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 64px;
  width: 100%;
  max-width: 460px;
  padding: 10px 8px;
  background: var(--kids-card);
  border: 3px solid #efe9e0;
  border-bottom: 6px solid #8a7a6a;   /* the rails */
  border-radius: 20px;
}

.train-engine {
  font-size: 2.2rem;
  line-height: 1;
  transform: scaleX(-1);   /* facing the way the sentence reads */
}

.train.depart .train-engine {
  animation: train-toot 0.6s ease-in-out 2;
}

@keyframes train-toot {
  0%, 100% { transform: scaleX(-1) translateY(0); }
  50% { transform: scaleX(-1) translateY(-6px); }
}

/* A word carriage. The same look in the yard and on the train, so it is
   obviously the same thing moving. */
.carriage {
  min-width: 52px;
  min-height: 48px;
  padding: 6px 12px;
  border-radius: 12px;
  border: 3px solid var(--kids-border);
  background: #fffdf8;
  color: var(--kids-ink);
  font-size: 1.35rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 0 #d9d3c7;
}

.carriage:active {
  transform: translateY(2px);
  box-shadow: none;
}

.carriage.placed {
  border-color: var(--kids-lilac);
  background: var(--kids-lilac-pale);
}

/* Punctuation carriages: the mark is the point, so it is big and red. */
.carriage.mark {
  min-width: 48px;
  color: var(--kids-red);
  font-size: 1.8rem;
  font-weight: 900;
}

.carriage.empty {
  display: inline-block;
  min-width: 44px;
  border-style: dashed;
  background: transparent;
  box-shadow: none;
  cursor: default;
}

.yard {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  max-width: 460px;
}

/* ===================== The other three modes ===================== */

.sentence-card {
  background: var(--kids-card);
  border: 3px solid #efe9e0;
  border-radius: 24px;
  padding: 18px 16px;
  width: 100%;
  max-width: 460px;
}

.sentence-line {
  font-size: clamp(1.5rem, 6.5vw, 2rem);
  font-weight: 700;
  color: var(--kids-ink);
  line-height: 1.5;
  text-align: center;
}

/* The word being asked about. */
.sentence-line .shine {
  background: #fff1c2;
  border: 3px solid #f4b942;
  border-radius: 10px;
  padding: 0 6px;
}

.sentence-line .blank,
.sentence-line .end-box {
  display: inline-block;
  min-width: 2.4em;
  border-bottom: 4px solid var(--kids-amber);
  color: var(--kids-amber);
  text-align: center;
  margin: 0 4px;
}

.sentence-line .end-box {
  min-width: 1.2em;
  margin-left: 2px;
}

.sentence-line .blank.filled,
.sentence-line .end-box.filled {
  color: var(--kids-green);
  border-bottom-color: var(--kids-green);
}

/* ===================== Answers ===================== */

.station-answers.mode-gap .answer-btn {
  font-family: "Century Gothic", "Comic Sans MS", "Chalkboard SE", "Andika", inherit;
  font-size: 1.6rem;
  min-width: 110px;
}

.station-answers.mode-words,
.station-answers.mode-ending {
  max-width: 420px;
}

.station-answers.mode-words .answer-btn,
.station-answers.mode-ending .answer-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 150px;
  min-height: 92px;
  padding: 8px 10px;
}

.answer-btn .opt-pic {
  font-size: 1.8rem;
  line-height: 1.1;
}

.answer-btn .opt-word {
  font-size: 1.1rem;
  font-weight: 900;
}

.answer-btn .opt-note {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--kids-muted);
}

.answer-btn .opt-mark {
  font-size: 2.6rem;
  line-height: 1;
  color: var(--kids-red);
}
