.sound-train-ic {
  background: linear-gradient(150deg, #ffd66d, #bee9bb);
  color: #173a43;
}
#soundTrain.on {
  align-items: stretch;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  border-radius: 22px;
  background: #fff9e8;
  color: #193b44;
  font-family: system-ui, sans-serif;
  color-scheme: light;
}
#soundTrain .st-panel { width: 100%; text-align: left; }
#soundTrain nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .5rem .65rem;
  background: #193b44;
  color: #fff5d9;
  font-size: .95rem;
  font-weight: 750;
}
#soundTrain main { padding: .8rem clamp(.65rem, 4vw, 1.2rem) 1rem; }
#soundTrain h1 {
  margin: .15rem 0 .6rem;
  font-size: clamp(1.65rem, 7vw, 2.5rem);
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: -.04em;
}
#soundTrain p { margin: .4rem 0 .65rem; line-height: 1.32; font-size: 1.05rem; }
#soundTrain button {
  min-width: 44px;
  min-height: 44px;
  padding: .5rem .65rem;
  border: 1px solid #577374;
  border-radius: 12px;
  background: #fffdfa;
  color: #193b44;
  font: inherit;
  font-weight: 740;
  line-height: 1.2;
  touch-action: manipulation;
  cursor: pointer;
}
#soundTrain button:focus-visible { outline: 3px solid #234dad; outline-offset: 3px; }
#soundTrain button:disabled { cursor: default; opacity: .56; }
#soundTrain button.st-back { background: transparent; color: #fff5d9; border-color: #9ab7b5; }
#soundTrain button.st-primary {
  width: 100%;
  min-height: 50px;
  background: #17615c;
  border-color: #145752;
  color: white;
  box-shadow: inset 0 -3px 0 #104440;
  font-size: 1.1rem;
}
#soundTrain .st-secondary { background: #f4e7c4; border-color: #937a4c; }
#soundTrain .st-full { width: 100%; margin-top: .5rem; }
#soundTrain .st-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  height: 28px;
  margin: .45rem .35rem;
}
#soundTrain .st-route::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 12px;
  border-block: 2px solid #39595a;
  background: repeating-linear-gradient(90deg, #39595a 0 3px, transparent 3px 14px);
}
#soundTrain .st-route span {
  z-index: 1;
  width: 22px;
  height: 22px;
  border: 2px solid #39595a;
  border-radius: 50%;
  background: #fadb82;
}
#soundTrain .st-route span:nth-child(2) { background: #c6ddc0; }
#soundTrain .st-count, #soundTrain .st-step { color: #395b60; font-size: .95rem; font-weight: 750; }
#soundTrain .st-stars { color: #274e48; font-size: .9rem; font-weight: 750; margin-block: .2rem .5rem; }
#soundTrain .st-award { color: #345456; font-weight: 650; margin-block: .4rem; }
#soundTrain .st-award-earned { color: #205747; font-weight: 800; }
#soundTrain .st-stops {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .45rem;
  padding: 0;
  margin: .7rem 0 .25rem;
  list-style: none;
}
#soundTrain .st-stops button {
  position: relative;
  display: grid;
  gap: .16rem;
  width: 100%;
  height: 100%;
  min-height: 63px;
  text-align: left;
  background: #eaf1dc;
  border-color: #6c8e79;
}
#soundTrain .st-stops li:nth-child(even) button { background: #f6e9cd; }
#soundTrain .st-stops strong { font-size: 1.35rem; line-height: 1; }
#soundTrain .st-stops small { font-size: .79rem; }
#soundTrain .st-check { position: absolute; right: .3rem; top: .25rem; font-size: .85rem; color: #12603e; }
#soundTrain .st-sound-card {
  display: grid;
  place-items: center;
  text-align: center;
  background: #e4efdd;
  border-radius: 18px;
  padding: .35rem;
  margin-bottom: .55rem;
}
#soundTrain .st-sound-card img { width: 130px; height: 97px; object-fit: contain; }
#soundTrain .st-sound-card strong { font-size: 1.65rem; }
#soundTrain .st-warm { display: grid; gap: .42rem; margin: 0 0 .65rem; }
#soundTrain .st-audio { background: #e7efff; border-color: #52749d; color: #193f67; }
#soundTrain .st-audio span { white-space: nowrap; }
#soundTrain .st-instruction { font-weight: 650; }
#soundTrain .st-instruction-audio { flex: 0 0 auto; }
#soundTrain .st-listen { display: flex; gap: .45rem; margin-bottom: .55rem; }
#soundTrain .st-listen .st-audio:not(.st-instruction-audio) { flex: 1; }
#soundTrain .st-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .38rem; margin: .65rem 0; }
#soundTrain .st-phrase-choices { grid-template-columns: repeat(2,minmax(0,1fr)); }
#soundTrain .st-option { display: grid; grid-template-rows: 1fr auto; gap: .28rem; }
#soundTrain .st-choice { width: 100%; min-height: 60px; font-size: 1.18rem; padding-inline: .2rem; }
#soundTrain .st-choice[data-correct=true] { opacity: 1; background: #d2ecd0; border: 2px solid #176346; }
#soundTrain .st-choice img { display: block; width: 100%; height: auto; max-height: 98px; aspect-ratio: 4 / 3; object-fit: contain; }
#soundTrain .st-phrase-choices .st-choice img { aspect-ratio: 240 / 174; }
#soundTrain .st-option > .st-audio { font-size: .79rem; width: 100%; padding-inline: .14rem; }
#soundTrain .st-build-slots, #soundTrain .st-tiles, #soundTrain .st-sound-track {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: .38rem;
  margin: .6rem 0;
}
#soundTrain .st-build-slots > span, #soundTrain .st-tiles button, #soundTrain .st-sound-track button {
  display: grid;
  place-content: center;
  justify-items: center;
  min-width: 48px;
  min-height: 53px;
  font-size: 1.5rem;
  line-height: 1;
}
#soundTrain .st-build-slots > span {
  border: 2px dashed #688987;
  border-radius: 11px;
  background: #eaf1dc;
  min-width: 55px;
}
#soundTrain .st-build-actions { display: grid; gap: .5rem; grid-template-columns: 1fr 2fr; }
#soundTrain .st-sound-track button { flex: 0 1 75px; background: #f7e2a7; border-color: #807043; }
#soundTrain .st-dot, #soundTrain .st-long {
  display: block;
  margin: .19rem auto 0;
  width: 7px;
  height: 7px;
  border-radius: 8px;
  background: #275951;
}
#soundTrain .st-long { width: 22px; }
#soundTrain .st-blend { text-align: center; }
#soundTrain .st-sound-track.is-blending button { animation: st-blend-pulse .42s ease both; }
#soundTrain .st-sound-track.is-blending button:nth-child(2) { animation-delay: .14s; }
#soundTrain .st-sound-track.is-blending button:nth-child(3) { animation-delay: .28s; }
@keyframes st-blend-pulse { 50% { background: #ecb84d; transform: translateY(-3px); } }
#soundTrain .st-reading {
  display: block;
  text-align: center;
  padding: .65rem .35rem;
  border-radius: 12px;
  background: #eaf1dc;
  font-size: clamp(1.45rem, 6vw, 2rem);
}
#soundTrain .st-small { font-size: .95rem; text-align: center; }
#soundTrain .st-feedback { min-height: 1.3em; color: #32584e; }
#soundTrain .st-ticket { display: grid; place-items: center; width: 85px; aspect-ratio: 1; margin-block: 1rem; border-radius: 18px; background: #d2ecd0; font-size: 2.6rem; }
#soundTrain .st-grid { display: grid; grid-template-columns: repeat(5, minmax(44px,1fr)); gap: .2rem; }
#soundTrain .st-grid button { padding-inline: .1rem; font-size: 1.27rem; }
#soundTrain .st-grid button[aria-pressed=true] { background: #f4d176; border: 2px solid #745522; }
#soundTrain .st-paper { display: grid; place-items: center; position: relative; aspect-ratio: 360 / 224; border: 2px dashed #698685; border-radius: 14px; background: #fff; }
#soundTrain .st-paper span { color: #a2b1b1; font-size: clamp(82px, 29vw, 140px); line-height: 1; font-family: 'Trebuchet MS', system-ui, sans-serif; }
#soundTrain .st-paper canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
#soundTrain .st-trace-tools { display: flex; flex-wrap: wrap; gap: .35rem; margin: .6rem 0; }
@media (prefers-reduced-motion: reduce) {
  #soundTrain.on, #soundTrain .st-sound-track.is-blending button { animation: none; }
}

#soundTrain .st-credits { margin-top: .75rem; text-align: center; font-size: .79rem; }
#soundTrain .st-credits a { display: inline-flex; align-items: center; min-height: 44px; color: #395b60; }
#soundTrain .st-guide { color: #9eaca8; }
#soundTrain .st-sound-track button.st-heard { background: #e4efdd; border-color: #517e63; }

#soundTrain .st-course {
  padding: .9rem;
  border: 1px solid #829d86;
  border-radius: 16px;
  background: #eaf1dc;
}
#soundTrain .st-course h2 { font-size: 1.7rem; margin: 0; }
#soundTrain .st-course progress { display: block; width: 100%; margin: 0 0 .65rem; accent-color: #17615c; }
#soundTrain .st-text-button { display: block; margin: .35rem auto 0; border-color: transparent; background: transparent; text-decoration: underline; }
#soundTrain .st-hub-practice { display: grid; gap: .45rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .65rem; }
#soundTrain[data-train-screen=alphabet] h1 { font-size: clamp(2.4rem, 12vw, 3rem); margin-block: 0; }
#soundTrain .st-example {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: .15rem .5rem;
  margin: .4rem 0 .65rem;
  padding: .35rem .45rem;
  border-radius: 15px;
  background: #eaf1dc;
}
#soundTrain .st-example img { width: 100%; height: 72px; object-fit: contain; }
#soundTrain .st-example figcaption { justify-self: start; font-size: clamp(1.35rem, 7vw, 1.8rem); font-weight: 800; }
#soundTrain .st-example mark { color: #104d4c; background: #f6d879; border-radius: .17em; }
#soundTrain .st-example small { grid-column: 1 / -1; font-weight: 650; }
#soundTrain .st-alphabet-steps { display: grid; gap: .37rem; list-style: none; margin: 0 0 .6rem; padding: 0; }
#soundTrain .st-alphabet-steps button { width: 100%; text-align: left; }
#soundTrain .st-alphabet-steps button[aria-current=step] { border-width: 2px; border-color: #17615c; }
#soundTrain .st-alphabet-steps button[data-heard=true] { background: #dcebd9; border-color: #6b9679; }
#soundTrain .st-alphabet-steps button span { display: inline-block; min-width: 1.6em; color: #17615c; }
#soundTrain .st-target-picture { display: grid; place-items: center; padding: .15rem; background: #eaf1dc; border-radius: 12px; }
#soundTrain .st-target-picture img { display: block; width: 89px; height: 65px; object-fit: contain; }
#soundTrain .st-search-example {
  display: grid;
  align-items: center;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: .45rem;
  padding: .35rem .5rem;
  background: #eaf1dc;
  border-radius: 14px;
}
#soundTrain .st-search-example img { width: 100%; height: 65px; object-fit: contain; }
#soundTrain .st-spelling { display: flex; flex-wrap: wrap; gap: .18rem; margin-bottom: .25rem; }
#soundTrain .st-spelling span { display: grid; place-items: center; width: 1.35em; min-height: 1.3em; border-radius: 5px; background: #fffdfa; font-size: 1.2rem; font-weight: 780; }
#soundTrain .st-spelling span[data-selected=true] { background: #f4d176; color: #483410; }
#soundTrain .st-search-actions { display: grid; grid-template-columns: auto 1fr; gap: .45rem; margin-top: .45rem; }
#soundTrain .st-grid button[data-found=true] { background: #d2ecd0; border-color: #428068; opacity: 1; }
#soundTrain[data-train-screen=search] .st-feedback { display: none; }
#soundTrain p.st-search-instruction { min-height: 2.4em; margin: .3rem 0; font-size: .94rem; line-height: 1.2; }
@media (max-width: 380px) {
  #soundTrain[data-train-screen=search] nav { padding-block: .3rem; }
  #soundTrain[data-train-screen=search] main { padding-top: .45rem; }
  #soundTrain[data-train-screen=search] h1 { margin-bottom: .2rem; }
  #soundTrain[data-train-screen=search] .st-step { margin-bottom: .25rem; }
  #soundTrain .st-search-example { padding-block: .2rem; }
  #soundTrain .st-search-example img { height: 52px; }
}
