:root {

  --ink: #23304d;

  --muted: #6f7892;

  --paper: #fffdf7;

  --purple: #646bd4;

  --yellow: #ffbd50;

  --mint: #55c8a9;

  --pink: #ff829f;

  --blue: #65a9ec;

  --shadow: 0 12px 34px rgba(61, 70, 112, 0.12);

}

* {

  box-sizing: border-box;

}

html {

  background: #fff8ea;

  font-size: 16px;

}

body {

  margin: 0;

  min-height: 100vh;

  color: var(--ink);

  font-family: "Nunito", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;

  background: radial-gradient(circle at 8% 5%, #fff0b8 0 9%, transparent 22%),

              radial-gradient(circle at 92% 11%, #d8f4ec 0 8%, transparent 22%),

              linear-gradient(150deg, #fffaf0, #f5f7ff 68%, #fff1f4);

  overflow-x: hidden;

}

.shell {

  width: min(100%, 54rem);

  min-height: 100vh;

  margin: auto;

  padding: max(1.1rem, env(safe-area-inset-top)) 1rem max(1.5rem, env(safe-area-inset-bottom));

}

.top {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 0.75rem;

}

.brand {

  display: flex;

  align-items: center;

  gap: 0.7rem;

}

.logo {

  width: 3rem;

  height: 3rem;

  display: grid;

  place-items: center;

  border-radius: 1rem;

  background: var(--purple);

  color: #fff;

  font-size: 1.35rem;

  font-weight: 900;

  box-shadow: 0 8px 18px rgba(100, 107, 212, 0.27);

}

h1 {

  font-size: clamp(1.45rem, 6vw, 2.15rem);

  line-height: 1.15;

  margin: 0;

  font-weight: 900;

  letter-spacing: 0.01em;

}

.sub {

  margin: 0.3rem 0 0;

  color: var(--muted);

  font-weight: 650;

}

.sound {

  width: 3rem;

  height: 3rem;

  border: 0;

  border-radius: 50%;

  background: #fff;

  color: var(--ink);

  box-shadow: var(--shadow);

  font-size: 1.25rem;

  cursor: pointer;

}

.course-tabs {

  position: sticky;

  top: max(0.55rem, env(safe-area-inset-top));

  z-index: 5;

  display: grid;

  grid-template-columns: repeat(5, minmax(0, 1fr));

  gap: 0.25rem;

  margin: 1.25rem 0 1rem;

  padding: 0.35rem;

  border: 1px solid rgba(100, 107, 212, 0.14);

  border-radius: 1.25rem;

  background: rgba(255, 255, 255, 0.86);

  box-shadow: 0 8px 24px rgba(61, 70, 112, 0.1);

  backdrop-filter: blur(12px);

}

.course-tab {

  min-width: 0;

  border: 0;

  border-radius: 0.95rem;

  padding: 0.65rem 0.2rem;

  background: transparent;

  color: var(--muted);

  font: inherit;

  font-size: clamp(0.72rem, 2.5vw, 0.95rem);

  font-weight: 850;

  line-height: 1.2;

  cursor: pointer;

  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;

}

.course-tab:active {

  transform: scale(0.97);

}

.course-tab.active {

  background: linear-gradient(135deg, var(--purple), #8f73d8);

  color: #fff;

  box-shadow: 0 6px 16px rgba(100, 107, 212, 0.23);

}

.hero {

  margin: 1.8rem 0 1rem;

  padding: 1.25rem 1.35rem;

  border-radius: 1.6rem;

  background: linear-gradient(135deg, #6872d9, #8f73d8);

  color: #fff;

  box-shadow: 0 18px 42px rgba(93, 96, 191, 0.22);

  position: relative;

  overflow: hidden;

}

.hero:after {

  content: "Aa";

  position: absolute;

  right: 1.1rem;

  bottom: -1.2rem;

  font-size: 6.5rem;

  font-weight: 900;

  opacity: 0.11;

}

.hero strong {

  display: block;

  font-size: 1.35rem;

}

.hero span {

  display: block;

  margin-top: 0.4rem;

  opacity: 0.88;

}

.section-title {

  display: flex;

  align-items: center;

  gap: 0.55rem;

  margin: 1.5rem 0.2rem 0.8rem;

  font-size: 1.08rem;

  font-weight: 900;

}

.dot {

  width: 0.7rem;

  height: 0.7rem;

  border-radius: 50%;

  background: var(--pink);

}

.letter-grid {

  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: 0.85rem;

}

.letter {

  border: 0;

  border-radius: 1.45rem;

  min-height: 8rem;

  padding: 1rem;

  background: #fff;

  box-shadow: var(--shadow);

  color: var(--ink);

  cursor: pointer;

  text-align: left;

  transition: transform 0.18s ease;

}

.letter:active {

  transform: scale(0.97);

}

.letter b {

  display: block;

  font-size: 2.65rem;

  line-height: 1;

}

.letter small {

  display: block;

  margin-top: 0.55rem;

  color: var(--muted);

  font-size: 0.95rem;

}

.letter.new:nth-child(1) {

  border-bottom: 0.45rem solid var(--blue);

}

.letter.new:nth-child(2) {

  border-bottom: 0.45rem solid var(--mint);

}

.letter.review {

  min-height: 6.8rem;

}

.letter.review:nth-child(1) {

  border-bottom: 0.4rem solid var(--yellow);

}

.letter.review:nth-child(2) {

  border-bottom: 0.4rem solid var(--pink);

}

.letter.review:nth-child(3) {

  border-bottom: 0.4rem solid var(--mint);

}

.letter.review:nth-child(4) {

  border-bottom: 0.4rem solid var(--blue);

}

.letter-grid .letter.new:only-child {

  grid-column: 1 / -1;

  min-height: 7.2rem;

  background: linear-gradient(135deg, #ffffff, #f4f7ff);

  border-left: 0.45rem solid var(--purple);

}

.lesson-head {

  display: flex;

  align-items: center;

  gap: 0.85rem;

  margin: 0.45rem 0 1.2rem;

}

.back {

  border: 0;

  background: #fff;

  border-radius: 999px;

  width: 3rem;

  height: 3rem;

  box-shadow: var(--shadow);

  font-size: 1.35rem;

  cursor: pointer;

}

.letter-badge {

  display: grid;

  place-items: center;

  width: 4.25rem;

  height: 4.25rem;

  border-radius: 1.35rem;

  background: var(--purple);

  color: #fff;

  font-size: 2rem;

  font-weight: 900;

  box-shadow: 0 10px 25px rgba(100, 107, 212, 0.25);

}

.letter-badge.playable {

  position: relative;

  border: 0;

  cursor: pointer;

  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;

}

.letter-badge.playable:active {

  transform: scale(0.93);

}

.letter-badge.playable.playing {

  transform: scale(1.06);

  box-shadow: 0 12px 28px rgba(255, 189, 80, 0.45);

  background: linear-gradient(135deg, #ffbd50, #ff829f);

}

.badge-sound-icon {

  position: absolute;

  right: 0.35rem;

  bottom: 0.35rem;

  font-size: 0.85rem;

  opacity: 0.85;

}

.writing-tip {

  display: flex;

  align-items: center;

  gap: 0.75rem;

  margin: -0.3rem 0 1.15rem;

  padding: 0.75rem 1rem;

  border-radius: 1.2rem;

  background: #ffffff;

  border: 1.5px solid rgba(100, 107, 212, 0.16);

  box-shadow: var(--shadow);

}

.writing-icon {

  font-size: 1.5rem;

  line-height: 1;

}

.writing-text strong {

  display: block;

  font-size: 0.98rem;

  color: var(--ink);

}

.writing-text small {

  display: block;

  color: var(--muted);

  font-size: 0.84rem;

  margin-top: 0.15rem;

}

.lesson-copy strong {

  font-size: 1.35rem;

}

.lesson-copy span {

  display: block;

  color: var(--muted);

  margin-top: 0.25rem;

}

.picture-grid {

  display: grid;

  grid-template-columns: 1fr;

  gap: 1.15rem;

}

.picture {

  position: relative;

  display: flex;

  flex-direction: column;

  align-items: center;

  width: 100%;

  max-width: 480px;

  margin: 0 auto;

  border: 3px solid transparent;

  border-radius: 1.8rem;

  background: rgba(255, 255, 255, 0.92);

  box-shadow: var(--shadow);

  padding: 0.9rem;

  cursor: pointer;

  overflow: hidden;

  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;

}

@media (min-width: 640px) {

  .picture-grid {

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 1.25rem;

  }

}

.picture img {

  display: block;

  width: 100%;

  height: auto;

  aspect-ratio: 1;

  object-fit: contain;

  pointer-events: none;

}

.picture-word {

  display: block;

  padding: 0.45rem 0 0.1rem;

  color: var(--ink);

  font-size: 1.3rem;

  line-height: 1.2;

  text-align: center;

  pointer-events: none;

}

.picture-sentence {

  display: block;

  margin-top: 0.15rem;

  color: var(--purple);

  font-size: 1.1rem;

  font-weight: 800;

  line-height: 1.3;

  text-align: center;

}

.picture-main {

  display: block;

  width: 100%;

  padding: 0;

  border: 0;

  background: transparent;

  cursor: pointer;

}

.picture-sentence-button {

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  gap: 0.15rem;

  padding: 0.4rem 0.6rem;

  border: 0;

  border-radius: 0.85rem;

  background: rgba(100, 107, 212, 0.1);

  cursor: pointer;

  margin-top: 0.35rem;

  width: 100%;

  transition: background 0.18s ease, transform 0.18s ease;

}

.picture-sentence-button .sentence-en {

  font-size: clamp(0.85rem, 2.8vw, 1rem);

  font-weight: 850;

  color: var(--purple);

  line-height: 1.25;

}

.picture-sentence-button .sentence-zh {

  font-size: clamp(0.72rem, 2.2vw, 0.8rem);

  font-weight: 700;

  color: var(--muted);

  line-height: 1.2;

}

.picture-sentence-button:hover,

.picture-sentence-button:focus-visible {

  background: rgba(100, 107, 212, 0.18);

  outline: 2px solid var(--purple);

}

.picture:active {

  transform: scale(0.97);

}

.picture.playing {

  border-color: var(--yellow);

  transform: translateY(-4px) scale(1.025);

  box-shadow: 0 16px 38px rgba(255, 183, 65, 0.3);

}

.picture.playing:after {

  content: "🔊";

  position: absolute;

  right: 0.6rem;

  top: 0.6rem;

  width: 2.15rem;

  height: 2.15rem;

  display: grid;

  place-items: center;

  border-radius: 50%;

  background: #fff;

  font-size: 1rem;

  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.12);

}

.controls {

  position: sticky;

  bottom: max(0.75rem, env(safe-area-inset-bottom));

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 0.7rem;

  margin: 1.15rem auto 0;

  padding: 0.7rem 0.8rem;

  border: 1px solid rgba(100, 107, 212, 0.12);

  border-radius: 1.4rem;

  background: rgba(255, 255, 255, 0.92);

  box-shadow: 0 12px 36px rgba(49, 57, 97, 0.17);

  backdrop-filter: blur(12px);

}

.status {

  min-width: 0;

  flex: 1;

  font-weight: 800;

}

.status small {

  display: block;

  color: var(--muted);

  font-weight: 650;

  margin-top: 0.15rem;

}

.replay {

  border: 0;

  border-radius: 1rem;

  background: var(--purple);

  color: white;

  padding: 0.85rem 1rem;

  font-size: 1rem;

  font-weight: 850;

  cursor: pointer;

}

.replay:disabled {

  opacity: 0.45;

}

.error {

  color: #bb3651;

}

.footer {

  text-align: center;

  color: var(--muted);

  font-size: 0.85rem;

  margin: 1.7rem 0 0.4rem;

}

/* 26个字母自然拼读点读表 */

.alpha-section {

  margin: 1.5rem 0 1.2rem;

  background: rgba(255, 255, 255, 0.75);

  border: 1.5px solid rgba(100, 107, 212, 0.16);

  border-radius: 1.6rem;

  padding: 1.1rem 1rem;

  box-shadow: var(--shadow);

  backdrop-filter: blur(8px);

}

.alpha-section .section-title {

  margin: 0 0 0.9rem;

}

.title-tip {

  margin-left: auto;

  font-size: 0.82rem;

  font-weight: 700;

  color: var(--purple);

  background: rgba(100, 107, 212, 0.1);

  padding: 0.2rem 0.65rem;

  border-radius: 999px;

}

.alpha-grid {

  display: grid;

  grid-template-columns: repeat(5, minmax(0, 1fr));

  gap: 0.65rem;

}

.alpha-card {

  position: relative;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  min-height: 7rem;

  background: #ffffff;

  border: 2px solid #edf0f7;

  border-radius: 1.15rem;

  padding: 0.85rem 0.3rem 0.75rem;

  cursor: pointer;

  box-shadow: 0 4px 12px rgba(61, 70, 112, 0.05);

  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);

  user-select: none;

}

.alpha-card:active {

  transform: scale(0.92);

}

.alpha-card:hover {

  border-color: var(--purple);

  box-shadow: 0 8px 18px rgba(100, 107, 212, 0.16);

}

.alpha-card.playing {

  border-color: var(--yellow);

  background: #fffdf5;

  transform: translateY(-3px) scale(1.04);

  box-shadow: 0 10px 22px rgba(255, 189, 80, 0.35);

}

.alpha-card.playing::after {

  content: "🔊";

  position: absolute;

  top: -0.35rem;

  right: -0.35rem;

  width: 1.45rem;

  height: 1.45rem;

  background: var(--yellow);

  color: #fff;

  border-radius: 50%;

  display: grid;

  place-items: center;

  font-size: 0.75rem;

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);

  animation: pulse-speaker 0.8s infinite alternate;

}

@keyframes pulse-speaker {

  from {

    transform: scale(0.9);

  }

  to {

    transform: scale(1.15);

  }

}

.alpha-char {

  font-size: 2.1rem;

  font-weight: 900;

  color: var(--ink);

  line-height: 1.1;

}

.alpha-char b {

  font-size: 1.6rem;

  color: var(--purple);

  margin-left: 2px;

}

.alpha-word {

  font-size: 0.98rem;

  font-weight: 750;

  color: var(--muted);

  margin-top: 0.2rem;

  overflow-wrap: anywhere;

  max-width: 96%;

}

.alpha-badge {

  display: block;

  font-size: 0.78rem;

  font-weight: 800;

  color: #fff;

  background: linear-gradient(135deg, var(--blue), var(--purple));

  padding: 0.12rem 0.4rem;

  border-radius: 999px;

  margin-top: 0.25rem;

  line-height: 1.2;

}

.alpha-badge:hover {

  opacity: 0.9;

}

.lesson-divider {

  margin-top: 1rem;

}

.home-controls {

  margin-top: 1.5rem;

}

.course-banner {

  margin: 1.2rem 0 1rem;

  padding: 1.35rem;

  border-radius: 1.6rem;

  color: #fff;

  box-shadow: 0 18px 42px rgba(93, 96, 191, 0.18);

}

.course-banner strong {

  display: block;

  font-size: clamp(1.25rem, 5vw, 1.7rem);

}

.course-banner span {

  display: block;

  margin-top: 0.45rem;

  opacity: 0.9;

}

.raz-banner {

  background: linear-gradient(135deg, #49b99b, #65a9ec);

}

.book-choice {

  display: flex;

  flex-wrap: wrap;

  gap: 0.5rem;

  margin: 1.2rem 0 0.7rem;

}

.book-choice button {

  flex: 1 1 calc(33.333% - 0.5rem);

  min-width: 125px;

  text-align: center;

  padding: 0.75rem 0.4rem;

}

@media (max-width: 520px) {

  .book-choice button {

    flex: 1 1 calc(50% - 0.4rem);

    min-width: 110px;

    font-size: 0.84rem;

    padding: 0.65rem 0.3rem;

  }

}

.festival-choice {

  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: 0.65rem;

  margin: 1.2rem 0 0.7rem;

}

.book-choice button,
.festival-choice button,

.speaking-choice button {

  border: 1px solid rgba(100, 107, 212, 0.18);

  border-radius: 1rem;

  padding: 0.8rem 0.4rem;

  background: #fff;

  color: var(--ink);

  box-shadow: var(--shadow);

  font: inherit;

  font-weight: 850;

  cursor: pointer;

}

.book-choice button.selected,
.festival-choice button.selected,

.speaking-choice button.selected {

  background: linear-gradient(135deg, var(--purple), #8f73d8);

  color: #fff;

}

.speaking-choice {

  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 0.65rem;

  margin: 0.9rem 0 1rem;

}

.book-panel[hidden],
.fest-panel[hidden],

.speaking-panel[hidden] { display: none !important; }

.go-banner {

  margin-top: 1.8rem;

}

.go-page-grid {

  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 0.85rem;

}

.go-page-card {

  position: relative;

  min-width: 0;

  padding: 0.5rem;

  border: 2.5px solid #edf0f7;

  border-radius: 1.35rem;

  background: #fff;

  color: var(--ink);

  font: inherit;

  text-align: left;

  cursor: pointer;

  box-shadow: var(--shadow);

  transition: transform 0.18s ease, border-color 0.18s ease;

}

.go-page-card img {

  display: block;

  width: 100%;

  aspect-ratio: 1;

  object-fit: contain;

  border-radius: 0.95rem;

  background: #fffaf1;

}

.go-page-copy {

  display: grid;

  gap: 0.15rem;

  padding: 0.45rem 0.25rem 0.3rem;

}

.go-page-copy small,

.go-page-copy span {

  color: var(--muted);

  font-size: 0.8rem;

}

.go-page-copy strong {

  font-size: clamp(0.88rem, 3.5vw, 1.1rem);

  line-height: 1.25;

}

.go-page-sound {

  position: absolute;

  right: 0.8rem;

  top: 0.8rem;

  padding: 0.25rem;

  border-radius: 50%;

  background: #fff;

}

.go-page-card:active { transform: scale(0.97); }

.go-page-card.playing { border-color: var(--yellow); transform: translateY(-2px); }

.go-full-btn { margin-top: 1rem; }

.midautumn-banner {

  background: linear-gradient(135deg, #ec8a73, #9d72d8);

}

.content-card {

  margin: 1rem 0;

  padding: 1.1rem;

  border: 1px solid rgba(100, 107, 212, 0.13);

  border-radius: 1.6rem;

  background: rgba(255, 255, 255, 0.86);

  box-shadow: var(--shadow);

}

.content-title {

  display: flex;

  align-items: center;

  gap: 0.55rem;

  margin-bottom: 0.9rem;

  font-size: 1.08rem;

  font-weight: 900;

}

.content-title .dot {

  flex: 0 0 auto;

}

.content-title .title-tip {

  margin-left: auto;

  color: var(--muted);

  font-size: 0.74rem;

  font-weight: 700;

}

.pets-picture-grid {

  display: grid !important;

  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;

  gap: 0.85rem !important;

}

.pets-picture-card {

  position: relative;

  display: flex !important;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  width: 100% !important;

  min-width: 0 !important;

  aspect-ratio: 1 / 1 !important;

  overflow: hidden;

  padding: 0.5rem;

  border: 2.5px solid #edf0f7;

  border-radius: 1.4rem;

  background: #ffffff;

  box-shadow: var(--shadow);

  cursor: pointer;

  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);

}

.pets-picture-card img {

  width: 100%;

  height: 100%;

  border-radius: 1.05rem;

  object-fit: contain;

  object-position: center;

  user-select: none;

  display: block;

}

.pets-picture-sound {

  position: absolute;

  right: 0.55rem;

  top: 0.55rem;

  display: grid;

  place-items: center;

  width: 1.85rem;

  height: 1.85rem;

  border-radius: 999px;

  background: rgba(255, 255, 255, 0.92);

  box-shadow: 0 3px 10px rgba(77, 92, 122, 0.2);

  font-size: 0.9rem;

}

.pets-picture-card:active {

  transform: scale(0.96);

}

.pets-picture-card.playing {

  border-color: var(--yellow);

  box-shadow: 0 10px 26px rgba(255, 189, 80, 0.35);

  transform: translateY(-2px) scale(1.02);

}

.vocab-grid {

  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 1rem;

}

.vocab-card {

  display: grid;

  grid-template-columns: auto 1fr;

  grid-template-rows: auto auto;

  align-items: center;

  column-gap: 0.9rem;

  padding: 1rem;

  border-radius: 1.2rem;

  background: linear-gradient(135deg, #fffdf7, #f5f7ff);

  border: 1px solid #edf0f7;

}

.pets-vocab-card {

  position: relative;

  width: 100%;

  font: inherit;

  color: inherit;

  text-align: left;

  cursor: pointer;

  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;

}

.pets-vocab-card strong,

.pets-vocab-card small {

  min-width: 0;

  overflow-wrap: anywhere;

}

.pets-vocab-card::after {

  content: "🔊";

  position: absolute;

  right: 0.55rem;

  top: 0.45rem;

  font-size: 0.78rem;

  opacity: 0.7;

}

.pets-vocab-card:active {

  transform: scale(0.97);

}

.pets-vocab-card.playing {

  border-color: var(--yellow);

  box-shadow: 0 10px 24px rgba(255, 189, 80, 0.28);

  transform: translateY(-2px);

}

.vocab-image {

  grid-row: 1 / span 2;

  width: clamp(5rem, 13vw, 7rem);

  height: clamp(5rem, 13vw, 7rem);

  line-height: 1;

  border-radius: 0.85rem;

  object-fit: contain;

  object-position: center;

  background: #fff;

  box-shadow: 0 4px 12px rgba(77, 92, 122, 0.14);

}

.vocab-card strong {

  align-self: end;

  font-size: 1.02rem;

}

.vocab-card small,

.festival-word small,

.dialogue-line small {

  display: block;

  color: var(--muted);

  font-size: 0.86rem;

  font-weight: 650;

}

.course-note {

  margin: 1.1rem 0;

  padding: 0.9rem 1rem;

  border-radius: 1.15rem;

  color: var(--muted);

  background: rgba(255, 255, 255, 0.7);

  text-align: center;

  font-weight: 750;

}

.festival-picture-grid {

  display: grid;

  grid-template-columns: 1fr;

  gap: 1.25rem;

}

.tricky-word-title { margin-top: 0; }

.festival-picture-grid.tricky-word-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.6rem, 2vw, 1.1rem);
  margin-bottom: 1.5rem;
}

.tricky-word-grid .festival-pic-card {
  min-width: 0;
  padding: clamp(0.45rem, 1.4vw, 0.85rem);
}

.festival-pic-card {

  position: relative;

  display: flex;

  flex-direction: column;

  width: 100%;

  max-width: 480px;

  margin: 0 auto;

  background: #ffffff;

  border: 2.5px solid transparent;

  border-radius: 1.6rem;

  padding: 0.85rem;

  box-shadow: var(--shadow);

  cursor: pointer;

  text-align: center;

  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);

}

.festival-pic-card:hover {

  border-color: var(--purple);

  box-shadow: 0 10px 24px rgba(100, 107, 212, 0.18);

  transform: translateY(-3px);

}

.festival-pic-card:active {

  transform: scale(0.96);

}

.festival-pic-card.playing {

  border-color: var(--yellow);

  background: #fffdf5;

  transform: translateY(-4px) scale(1.02);

  box-shadow: 0 14px 34px rgba(255, 189, 80, 0.38);

}

.festival-pic-card.playing::after {

  content: "🔊";

  position: absolute;

  top: -0.35rem;

  right: -0.35rem;

  width: 1.7rem;

  height: 1.7rem;

  background: var(--yellow);

  color: #fff;

  border-radius: 50%;

  display: grid;

  place-items: center;

  font-size: 0.85rem;

  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);

  animation: pulse-speaker 0.8s infinite alternate;

  z-index: 2;

}

@keyframes pulse-speaker {

  from {

    transform: scale(0.9);

  }

  to {

    transform: scale(1.15);

  }

}

.pic-wrap {

  position: relative;

  aspect-ratio: 1;

  border-radius: 1.15rem;

  overflow: hidden;

  background: #fff8f0;

  display: grid;

  place-items: center;

}

.pic-wrap img {

  width: 100%;

  height: 100%;

  object-fit: cover;

  display: block;

}

.pic-info {

  margin-top: 0.5rem;

}

.pic-info strong {

  display: block;

  font-size: 1.05rem;

  font-weight: 850;

  color: var(--ink);

}

.pic-info small {

  display: block;

  color: var(--muted);

  font-size: 0.85rem;

  font-weight: 650;

  margin-top: 0.12rem;

}

.dialogue-card {

  background: linear-gradient(145deg, #fff, #fff9f6);

}

.dialogue-layout {

  display: grid;

  grid-template-columns: 1fr;

  gap: 0.95rem;

  margin-top: 0.4rem;

}

.dialogue-scene-card {

  position: relative;

  border-radius: 1.45rem;

  overflow: hidden;

  border: 2.5px solid transparent;

  padding: 0;

  background: #fff;

  cursor: pointer;

  box-shadow: var(--shadow);

  transition: all 0.2s ease;

  display: block;

  width: 100%;

  text-align: left;

}

.dialogue-scene-card:hover {

  border-color: var(--yellow);

  transform: translateY(-2px);

  box-shadow: 0 10px 26px rgba(255, 189, 80, 0.25);

}

.dialogue-scene-card:active {

  transform: scale(0.98);

}

.dialogue-scene-card.playing {

  border-color: var(--yellow);

  box-shadow: 0 14px 34px rgba(255, 189, 80, 0.4);

  transform: scale(1.015);

}

.scene-img-wrap {

  aspect-ratio: 1;

  width: 100%;

  overflow: hidden;

  display: block;

}

.scene-img-wrap img {

  width: 100%;

  height: 100%;

  object-fit: cover;

  display: block;

}

.scene-overlay {

  position: absolute;

  left: 0;

  right: 0;

  bottom: 0;

  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0) 100%);

  padding: 1.2rem 0.8rem 0.65rem;

  text-align: center;

}

.scene-badge {

  display: inline-block;

  background: rgba(255, 189, 80, 0.95);

  color: #451a03;

  font-size: 0.84rem;

  font-weight: 850;

  padding: 0.28rem 0.8rem;

  border-radius: 999px;

  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);

}

.dialogue-bubbles {

  display: flex;

  flex-direction: column;

  gap: 0.75rem;

  justify-content: center;

}

.dialogue-bubble {

  border: 2px solid transparent;

  border-radius: 1.25rem;

  padding: 0.85rem 1rem;

  text-align: left;

  cursor: pointer;

  transition: all 0.18s ease;

  box-shadow: 0 4px 14px rgba(61, 70, 112, 0.06);

  width: 100%;

  background: #ffffff;

}

.dialogue-bubble.question {

  background: linear-gradient(135deg, #ffffff, #f0f4ff);

  border-color: rgba(100, 107, 212, 0.16);

}

.dialogue-bubble.answer {

  background: linear-gradient(135deg, #ffffff, #fff1f4);

  border-color: rgba(255, 130, 159, 0.18);

}

.dialogue-bubble:hover {

  transform: translateY(-2px);

  box-shadow: 0 8px 20px rgba(61, 70, 112, 0.1);

}

.dialogue-bubble:active {

  transform: scale(0.98);

}

.dialogue-bubble.playing {

  border-color: var(--yellow) !important;

  background: #fffdf5 !important;

  transform: translateY(-3px) scale(1.02);

  box-shadow: 0 10px 24px rgba(255, 189, 80, 0.35);

}

.bubble-tag-row {

  display: flex;

  align-items: center;

  justify-content: space-between;

  margin-bottom: 0.35rem;

}

.speaker-tag {

  font-size: 0.76rem;

  font-weight: 800;

  padding: 0.15rem 0.55rem;

  border-radius: 999px;

}

.question-tag {

  background: #dbeafe;

  color: #1e40af;

}

.answer-tag {

  background: #fce7f3;

  color: #9d174d;

}

.bubble-sound-badge {

  font-size: 0.76rem;

  color: var(--purple);

  font-weight: 750;

}

.bubble-en {

  display: block;

  font-size: 1.06rem;

  line-height: 1.35;

  color: var(--ink);

}

.bubble-zh {

  display: block;

  color: var(--muted);

  font-size: 0.88rem;

  margin-top: 0.25rem;

  font-weight: 650;

}

.dialogue-full-btn {

  border: 0;

  border-radius: 1.15rem;

  background: linear-gradient(135deg, #646bd4, #8b5cf6);

  color: #fff;

  font-size: 0.96rem;

  font-weight: 850;

  padding: 0.85rem 1rem;

  cursor: pointer;

  text-align: center;

  box-shadow: 0 6px 18px rgba(100, 107, 212, 0.25);

  transition: all 0.18s ease;

  width: 100%;

  margin-top: 0.2rem;

}

.dialogue-full-btn:active {

  transform: scale(0.97);

}

.dialogue-full-btn.playing {

  background: linear-gradient(135deg, #ffbd50, #f59e0b);

  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.38);

  transform: scale(1.02);

}

.more-dialogue .dialogue-bubbles { gap: 0.7rem; }

.more-dialogue .speaker-tag { display: inline-block; margin-bottom: 0.35rem; }

.more-dialogue .course-note { margin-bottom: 0; }

.more-dialogue .dialogue-bubble { padding: 1rem 1.15rem; }

.more-dialogue .bubble-en { font-size: 1.45rem; line-height: 1.4; }

.more-dialogue .bubble-zh { font-size: 1.08rem; line-height: 1.4; }
.more-dialogue .dialogue-bubble { cursor: default; }
.more-dialogue .dialogue-bubble:hover { transform: none; }
.bubble-voice {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.bubble-voice.bubble-en { font-weight: 850; }
.bubble-voice.bubble-zh { font-weight: 650; }
.bubble-voice:hover { text-decoration: underline; }
.bubble-voice:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 0.25rem; }
.bubble-voice.playing { color: var(--purple); }

.practice-pair {

  display: grid;

  gap: 0.85rem;

  margin: 0.9rem 0 1.4rem;

}

.question-image-card {

  overflow: hidden;

  width: 100%;

  padding: 0.55rem;

  border: 2.5px solid #edf0f7;

  border-radius: 1.35rem;

  background: #fff;

  color: var(--ink);

  box-shadow: var(--shadow);

  font: inherit;

  font-weight: 850;

  cursor: pointer;

}

.question-image-card img {

  display: block;

  width: 100%;

  max-height: 22rem;

  aspect-ratio: 4 / 3;

  object-fit: contain;

  border-radius: 0.95rem;

  background: #fff9ef;

}

.question-image-card span { display: block; padding: 0.55rem 0.25rem 0.25rem; }

.question-image-card.playing { border-color: var(--yellow); }

.illustrated-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 0.75rem;
}

.illustrated-dialogue {
  position: relative;
  width: min(100%, 760px);
  aspect-ratio: 1;
  margin: 1rem auto 1.5rem;
  overflow: hidden;
  border: 6px solid #fff;
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
  background: #fff9ef;
}

.illustrated-dialogue > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.illustrated-scene-play {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 1;
}

.illustrated-scene-play span {
  position: absolute;
  right: 0.7rem;
  bottom: 0.65rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(25, 32, 74, 0.82);
  font-size: 0.8rem;
  font-weight: 750;
}

.illustrated-scene-play:focus-visible { outline: 4px solid var(--purple); outline-offset: -6px; }
.illustrated-scene-play.playing span { background: var(--purple); }

.illustrated-lines {
  position: absolute;
  inset: 0.8rem 0.8rem 2.7rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.35rem;
  pointer-events: none;
  z-index: 2;
}

.illustrated-lines .dialogue-bubble {
  width: max-content;
  max-width: min(88%, 560px);
  padding: 0.55rem 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 18px rgba(20, 28, 70, 0.22);
  backdrop-filter: blur(6px);
  pointer-events: auto;
  cursor: default;
}

.illustrated-lines .dialogue-bubble:hover { transform: none; }
.illustrated-lines .dialogue-bubble.question { align-self: flex-start; }
.illustrated-lines .dialogue-bubble.answer { align-self: flex-end; }
.illustrated-lines .bubble-voice { width: auto; max-width: 100%; }
.illustrated-lines .bubble-en { font-size: clamp(0.98rem, 2.8vw, 1.5rem); line-height: 1.2; }
.illustrated-lines .bubble-zh { font-size: clamp(0.78rem, 1.9vw, 1rem); line-height: 1.2; margin-top: 0.12rem; }
.illustrated-lines .speaker-tag { margin-bottom: 0.15rem; }
.mooncake-scene .dialogue-bubble:nth-child(2) { margin-top: auto; }

.illustrated-grid .illustrated-dialogue {
  width: 100%;
  aspect-ratio: 1 / 1.15;
  margin: 0;
  border-width: 4px;
}

.illustrated-grid .illustrated-lines { inset: 0.45rem 0.45rem 2rem; gap: 0.25rem; }
.illustrated-grid .dialogue-bubble { max-width: 96%; padding: 0.35rem 0.5rem; border-radius: 0.85rem; }
.illustrated-grid .speaker-tag { font-size: 0.68rem; padding: 0.1rem 0.38rem; }
.illustrated-grid .bubble-en { font-size: clamp(0.72rem, 1.4vw, 1.1rem); line-height: 1.18; }
.illustrated-grid .bubble-zh { font-size: clamp(0.62rem, 1.05vw, 0.88rem); line-height: 1.18; }
.illustrated-grid .illustrated-scene-play span { font-size: 0.68rem; padding: 0.2rem 0.45rem; }

@media (max-width: 600px) {
  .illustrated-grid { gap: 0.45rem; }
  .illustrated-grid .illustrated-dialogue { aspect-ratio: 1 / 1.9; border-width: 3px; border-radius: 0.85rem; }
  .illustrated-grid .illustrated-dialogue > img { object-fit: contain; }
  .illustrated-grid .illustrated-lines { inset: 0.28rem 0.25rem 1.5rem; gap: 0.12rem; }
  .illustrated-grid .illustrated-lines .dialogue-bubble { max-width: 100%; padding: 0.2rem 0.28rem; border-radius: 0.55rem; }
  .illustrated-grid .illustrated-lines .speaker-tag { font-size: 0.55rem; padding: 0.04rem 0.24rem; margin-bottom: 0.06rem; }
  .illustrated-grid .illustrated-lines .bubble-en { font-size: 0.68rem; line-height: 1.13; }
  .illustrated-grid .illustrated-lines .bubble-zh { font-size: 0.57rem; line-height: 1.13; margin-top: 0.04rem; }
  .illustrated-grid .illustrated-scene-play span { right: 0.18rem; bottom: 0.18rem; font-size: 0.53rem; padding: 0.12rem 0.3rem; }
}

@media (max-width: 520px) {
  .illustrated-dialogue { border-width: 4px; border-radius: 1.2rem; }
  .illustrated-lines { inset: 0.4rem 0.4rem 2rem; gap: 0.2rem; }
  .illustrated-lines .dialogue-bubble { max-width: 92%; padding: 0.32rem 0.45rem; border-radius: 0.75rem; }
  .illustrated-lines .speaker-tag { font-size: 0.65rem; padding: 0.08rem 0.4rem; }
  .illustrated-lines .bubble-en { font-size: 0.9rem; }
  .illustrated-lines .bubble-zh { font-size: 0.72rem; }
  .illustrated-scene-play span { right: 0.35rem; bottom: 0.3rem; font-size: 0.65rem; padding: 0.2rem 0.5rem; }
}

.audio-credit { margin: 1rem 0; color: var(--muted); font-size: 0.75rem; }

.audio-credit a { color: var(--purple); }

@media (min-width: 700px) {

  .shell {

    padding-left: 2rem;

    padding-right: 2rem;

  }

  .letter-grid {

    grid-template-columns: repeat(4, 1fr);

  }

  .hero {

    padding: 1.7rem;

  }

  .picture-grid {

    gap: 1.2rem;

  }

  .picture {

    border-radius: 2rem;

  }

  .alpha-grid {

    grid-template-columns: repeat(5, minmax(0, 1fr));

    gap: 0.85rem;

  }

  .vocab-grid {

    grid-template-columns: repeat(2, minmax(0, 1fr));

  }

  .pets-picture-grid {

    gap: 1.15rem;

  }

  .festival-picture-grid {

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 1.1rem;

  }

  .dialogue-layout {

    grid-template-columns: 1fr 1.25fr;

    gap: 1.25rem;

    align-items: center;

  }

  .practice-pair { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; }

}

@media (prefers-reduced-motion: reduce) {

  * {

    scroll-behavior: auto !important;

    transition: none !important;

  }

  .picture.playing {

    transform: none;

  }

}

/* RAZ Jumps Over & National Day Styles */
.jumps-banner {
  background: linear-gradient(135deg, #e65c00, #f9d423);
}
.jumps-full-btn {
  margin-top: 1rem;
}
.midautumn-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}
.banner-main-text {
  flex: 1 1 240px;
}
.banner-national-day {
  flex: 0 1 280px;
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 1.25rem;
  padding: 0.75rem 0.9rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.national-tag {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.national-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.national-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  color: var(--ink);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 0.85rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: all 0.18s ease;
  text-align: left;
}
.national-btn strong {
  font-size: 0.95rem;
  color: #d32f2f;
  display: block;
}
.national-btn small {
  font-size: 0.8rem;
  color: #555;
  display: block;
  margin-left: 0.4rem;
}
.national-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  background: #fff8f6;
}
.national-btn:active {
  transform: scale(0.97);
}
.national-btn.playing {
  border-color: #ff3b30;
  background: #ffebee;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(230, 50, 50, 0.28);
}
.national-day-card {
  margin: 1.2rem 0;
}

.national-banner {
  background: linear-gradient(135deg, #e53935, #ff9800);
}
.national-scene {
  position: relative;
  overflow: hidden;
  border-radius: 1.4rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}
.national-scene img {
  width: 100%;
  display: block;
  border-radius: 1.4rem;
}
.national-vocab-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}


/* Speed Switcher (1.0x / 0.8x) */
.banner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.banner-text-group {
  flex: 1 1 200px;
}

.speed-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  padding: 3px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.lesson-head .speed-switcher {
  background: rgba(100, 107, 212, 0.08);
  border-color: rgba(100, 107, 212, 0.18);
  margin-left: auto;
}

.speed-btn {
  border: none;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-weight: 850;
  font-size: 0.92rem;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}

.lesson-head .speed-btn {
  color: var(--muted);
}

.speed-btn:hover {
  opacity: 1;
}

.speed-btn.active {
  background: #fff;
  color: #d84315;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
  opacity: 1;
  font-weight: 900;
  transform: scale(1.03);
}

.raz-banner .speed-btn.active {
  color: #53389e;
}

.jumps-banner .speed-btn.active {
  color: #d84315;
}

.lesson-head .speed-btn.active {
  background: var(--purple);
  color: #fff;
}


.national-banner .speed-btn.active {
  color: #c62828;
}

.midautumn-banner .speed-btn.active {
  color: #6a1b9a;
}

.farm-banner .speed-btn.active {
  color: #2e7d32;
}

.plains-banner .speed-btn.active {
  color: #e65100;
}

.speaking-banner .speed-btn.active {
  color: #c2185b;
}

/* 重点掌握角标与高亮 */
.card-focus-badge {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  background: linear-gradient(135deg, #ff9100, #ff3d00);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 850;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(255, 61, 0, 0.35);
  z-index: 2;
  letter-spacing: 0.02em;
}

.go-page-card.focus-card {
  border: 2.5px solid #ffb300;
  box-shadow: 0 6px 18px rgba(255, 179, 0, 0.25);
  background: #fffdf5;
}

/* 课程提示小横幅 */
.lesson-tip-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #fff9e6, #fff3cd);
  border: 1px solid #ffeeba;
  color: #856404;
}

.lesson-tip-banner .tip-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.lesson-tip-banner strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 850;
  margin-bottom: 0.15rem;
}

.lesson-tip-banner p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #6c5405;
}

/* 新增横幅专属背景 */
.farm-banner {
  background: radial-gradient(circle at 10% 15%, rgba(255, 235, 150, 0.75) 0, transparent 40%), linear-gradient(135deg, #e8f5e9, #fff9c4);
}

.plains-banner {
  background: radial-gradient(circle at 10% 15%, rgba(255, 204, 128, 0.75) 0, transparent 40%), linear-gradient(135deg, #fff3e0, #ffe0b2);
}

.rainforest-banner {
  background: linear-gradient(135deg, #258a68, #418f9e);
}

.rainforest-word-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 520px) {
  .rainforest-word-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.speaking-banner {
  background: radial-gradient(circle at 10% 15%, rgba(255, 180, 200, 0.75) 0, transparent 40%), linear-gradient(135deg, #fce4ec, #ede7f6);
}

/* 口语练习大卡片网格 */
.speaking-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
  margin: 1rem 0;
}

.speaking-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(100, 107, 212, 0.16);
  box-shadow: 0 8px 22px rgba(61, 70, 112, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.speaking-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(100, 107, 212, 0.16);
}

.speaking-card.playing {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 189, 80, 0.4), 0 12px 28px rgba(100, 107, 212, 0.2);
  transform: translateY(-4px) scale(1.02);
}

.speaking-card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fdfaf5;
  overflow: hidden;
}

.speaking-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.speaking-card:hover .speaking-card-cover img {
  transform: scale(1.03);
}

.speaking-card-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: rgba(35, 48, 77, 0.75);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.speaking-card-content {
  padding: 0.9rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.speaking-card-en {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.25;
}

.speaking-card-zh {
  font-size: 1.02rem;
  font-weight: 750;
  color: var(--purple);
  line-height: 1.3;
}

.speaking-card-tip {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
  margin-bottom: 0.4rem;
}

.speaking-play-btn {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple), #8f73d8);
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 850;
  padding: 0.55rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.speaking-play-btn:active {
  transform: scale(0.96);
}

.speaking-play-btn.playing {
  background: linear-gradient(135deg, var(--yellow), #ff9800);
  box-shadow: 0 4px 14px rgba(255, 152, 0, 0.4);
}


/* ==========================================================
   自然拼读跟读打分机 (Follow-along Reading Practice Machine)
   参考科大讯飞学习机设计 (Image 2)
   ========================================================== */
.practice-entrance-card {
  margin: 1.1rem 0 1.25rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
  border: 1.5px solid #a7f3d0;
  border-radius: 1.25rem;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.practice-entrance-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.18);
}
.practice-entrance-card:active {
  transform: scale(0.98);
}
.pe-main {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.pe-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #10b981, #0d9488);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
  flex-shrink: 0;
}
.pe-content strong {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.08rem;
  color: #064e3b;
  margin-bottom: 0.2rem;
}
.pe-tag {
  background: #10b981;
  color: #fff;
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 700;
}
.pe-content p {
  font-size: 0.85rem;
  color: #047857;
  margin: 0;
}
.pe-btn {
  background: linear-gradient(135deg, #0d9488, #059669);
  color: #fff;
  border: none;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  font-weight: 750;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
  flex-shrink: 0;
}

/* Machine View Container */
.pm-wrapper {
  max-width: 520px;
  margin: 0 auto 2rem;
  background: #f8fafc;
  border-radius: 26px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pm-header {
  background: #ffffff;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
}
.pm-back-btn {
  border: none;
  background: transparent;
  color: #0f766e;
  font-size: 1rem;
  font-weight: 750;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.pm-back-btn:hover {
  background: #f0fdfa;
}
.pm-title {
  font-size: 1.15rem;
  font-weight: 850;
  color: #1e293b;
}
.pm-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.pm-pill-btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pm-pill-btn.active {
  background: #0d9488;
  color: #ffffff;
  border-color: #0d9488;
}

.pm-progress-box {
  background: #ffffff;
  padding: 0 1.25rem 0.6rem;
}
.pm-progress-bar-bg {
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.pm-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.pm-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.35rem;
  font-weight: 700;
}

/* Central Focus Screen */
.pm-screen {
  background: #ffffff;
  padding: 1.35rem 1.25rem 1rem;
  text-align: center;
  position: relative;
  border-bottom: 1px solid #f1f5f9;
}
.pm-focus-pic {
  width: 84px;
  height: 84px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  margin: 0 auto 0.75rem;
  display: block;
  border: 2px solid #f8fafc;
}
.pm-target-word {
  font-size: 2.2rem;
  font-weight: 900;
  color: #f43f5e;
  letter-spacing: -0.5px;
  margin: 0 0 0.35rem;
  line-height: 1.2;
}
.pm-target-sentence {
  font-size: 1.45rem;
  font-weight: 850;
  color: #f43f5e;
  margin: 0 0 0.35rem;
  line-height: 1.3;
}
.pm-target-zh {
  font-size: 0.95rem;
  color: #64748b;
  margin-bottom: 1.1rem;
  min-height: 1.4rem;
  transition: opacity 0.2s ease;
}
.pm-target-zh.hidden {
  visibility: hidden;
}

/* 3 Circular Buttons Row (Image 2) */
.pm-buttons-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  margin: 0.6rem 0 1.1rem;
}
.pm-circle-btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pm-circle-btn {
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  color: #ffffff;
}
.pm-circle-btn:active {
  transform: scale(0.92);
}
.pm-circle-btn.btn-play {
  width: 58px;
  height: 58px;
  background: #0284c7;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.3);
}
.pm-circle-btn.btn-play.playing {
  background: #0369a1;
  animation: pmPulse 1s infinite alternate;
}
.pm-circle-btn.btn-mic {
  width: 72px;
  height: 72px;
  background: #0d9488;
  box-shadow: 0 8px 22px rgba(13, 148, 136, 0.35);
}
.pm-circle-btn.btn-mic.recording {
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: none;
  transition: transform 0.12s linear;
  will-change: transform;
}
.pm-circle-btn.btn-user-voice {
  width: 58px;
  height: 58px;
  background: #0284c7;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.3);
}
.pm-circle-btn.btn-user-voice:disabled {
  background: #cbd5e1;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.65;
}
.pm-circle-btn svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}
.pm-circle-btn.btn-mic svg {
  width: 32px;
  height: 32px;
}
.pm-btn-label {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.35rem;
  font-weight: 650;
}

@keyframes pmRecordPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 16px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
@keyframes pmPulse {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

/* Score Dashboard (Image 2) */
.pm-score-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.1rem;
  background: #f8fafc;
  border-radius: 16px;
  margin: 0.5rem 0 0.5rem;
  border: 1px solid #f1f5f9;
}
.pm-score-left {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
}
.pm-score-val {
  font-size: 2.2rem;
  font-weight: 900;
  color: #ef4444;
  line-height: 1;
}
.pm-score-unit {
  font-size: 0.95rem;
  font-weight: 800;
  color: #ef4444;
}
.pm-metrics-row {
  display: flex;
  gap: 0.9rem;
}
.pm-metric-col {
  text-align: center;
}
.pm-metric-col .pm-metric-label {
  font-size: 0.72rem;
  color: #64748b;
  display: block;
}
.pm-metric-col .pm-metric-val {
  font-size: 1.05rem;
  font-weight: 850;
  color: #0f172a;
}
.pm-feedback-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.4rem;
}
.pm-feedback-msg {
  font-size: 0.82rem;
  color: #059669;
  font-weight: 750;
}
.pm-manual-score-pills {
  display: flex;
  gap: 0.35rem;
}
.pm-score-pill-btn {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  cursor: pointer;
  color: #475569;
  font-weight: 600;
}
.pm-score-pill-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Upcoming items scroll list (Image 2) */
.pm-list-wrapper {
  background: #ffffff;
  padding: 0.75rem 0.85rem;
  flex: 1;
  max-height: 280px;
  overflow-y: auto;
}
.pm-list-title {
  font-size: 0.78rem;
  font-weight: 750;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  padding-left: 0.4rem;
}
.pm-list-item {
  padding: 0.75rem 1rem;
  margin-bottom: 0.45rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
}
.pm-list-item:hover {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.pm-list-item.active {
  background: #ecfdf5;
  border-left: 4px solid #10b981;
  border-color: #a7f3d0;
}
.pm-item-text {
  font-size: 0.98rem;
  font-weight: 750;
  color: #1e293b;
}
.pm-list-item.active .pm-item-text {
  color: #065f46;
}
.pm-item-status {
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
}
.pm-item-status.scored {
  background: #dcfce7;
  color: #15803d;
}
.pm-item-status.current {
  background: #d1fae5;
  color: #065f46;
}
.pm-item-status.pending {
  color: #94a3b8;
}

/* Bottom Nav bar */
.pm-nav-row {
  background: #ffffff;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f1f5f9;
}
.pm-nav-btn {
  background: #f1f5f9;
  border: none;
  padding: 0.6rem 1.15rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s;
}
.pm-nav-btn:hover {
  background: #e2e8f0;
}
.pm-nav-btn.primary {
  background: #0d9488;
  color: #ffffff;
}
.pm-nav-btn.primary:hover {
  background: #0f766e;
}

/* 已学内容的本机跟读练习 */
.practice-entrance-card { width:100%; font:inherit; text-align:left; }
.pe-caption { display:block; font-size:.85rem; line-height:1.5; color:#047857; }
.pm-wrapper { max-width:940px; scroll-margin-top:5rem; }
.pm-header { flex-wrap:wrap; gap:.65rem; }
.pm-actions { flex-wrap:wrap; }
.pm-service { display:flex; align-items:center; justify-content:space-between; gap:.7rem; padding:.7rem 1.25rem; background:#f1f5f9; font-size:.82rem; color:#475569; line-height:1.5; }
.pm-service.ready { color:#0f766e; background:#f0fdfa; }
.pm-service.offline { color:#805c20; background:#fff8eb; }
.pm-service.setup,.pm-service.locked { color:#805c20; background:#fff8eb; flex-wrap:wrap; }
.pm-service form { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; }
.pm-service input { min-width:0; width:10rem; max-width:100%; border:1px solid #cbd5e1; border-radius:8px; padding:.45rem; font:inherit; }
.pm-service button { border:1px solid currentColor; border-radius:999px; background:white; color:inherit; padding:.25rem .7rem; font:inherit; white-space:nowrap; cursor:pointer; }
.pm-progress-text { gap:.6rem; line-height:1.5; }
.pm-screen { display:grid; grid-template-columns:minmax(210px,.8fr) minmax(0,1.2fr); gap:1.35rem; align-items:center; }
.pm-focus-panel { min-width:0; }
.pm-response-panel { min-width:0; }
.pm-focus-pic { width:100%; height:auto; max-width:290px; aspect-ratio:1; object-fit:contain; border-radius:22px; background:white; }
.pm-type-badge { display:inline-block; font-size:.8rem; color:#0f766e; background:#f0fdfa; border-radius:999px; padding:.3rem .8rem; }
.pm-target-word { font-size:clamp(1.8rem,4.4vw,2.8rem); overflow-wrap:anywhere; }
.pm-target-sentence { font-size:clamp(1.25rem,2.6vw,1.65rem); }
.pm-circle-btn { font-size:1.65rem; }
.pm-circle-btn:disabled { opacity:.5; cursor:not-allowed; }
.pm-record-clock { min-height:1.3rem; color:#b45309; font-size:.8rem; }
.pm-score-bar { flex-wrap:wrap; justify-content:center; gap:.75rem; }
.pm-score-left { min-width:100px; justify-content:center; }
.pm-score-unit { font-size:.78rem; }
.pm-metrics-row { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.5rem; flex:1; min-width:220px; }
.pm-metric-label { white-space:nowrap; }
.pm-feedback-msg { line-height:1.6; margin:.6rem 0; min-height:1.6em; }
.pm-recognition { text-align:left; padding:.7rem; border-radius:12px; background:#f8fafc; margin-top:.7rem; color:#475569; font-size:.85rem; }
.pm-recognition p { margin:.4rem 0 0; line-height:1.5; overflow-wrap:anywhere; }
.pm-word-feedback { display:flex; flex-wrap:wrap; gap:.35rem; }
.pm-read-word { display:inline-block; padding:.2rem .5rem; border-radius:7px; font-weight:750; }
.pm-read-word.matched { color:#166534; background:#dcfce7; }
.pm-read-word.close { color:#854d0e; background:#fef3c7; }
.pm-read-word.developing { color:#854d0e; background:#fef3c7; }
.pm-read-word small { font-size:.72em; font-weight:600; }
.pm-read-word.missing,.pm-read-word.substituted { color:#b91c1c; background:#fee2e2; }
.pm-read-word.uncertain { color:#64748b; background:#e2e8f0; }
.pm-parent-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:.5rem; align-items:center; margin-top:.8rem; }
.pm-parent-actions span { font-size:.72rem; color:#64748b; }
.pm-help { padding:.8rem 1.25rem; background:#f8fafc; color:#64748b; font-size:.8rem; line-height:1.7; border-bottom:1px solid #e2e8f0; }
.pm-help summary { cursor:pointer; color:#0f766e; font-weight:750; }
.pm-help p { margin:.5rem 0; }
.pm-help a { color:#0f766e; text-decoration:underline; }
.pm-list-wrapper { max-height:250px; }
.pm-list-item { width:100%; text-align:left; font:inherit; gap:.7rem; }
.pm-list-item:focus-visible,.pm-circle-btn:focus-visible,.pm-pill-btn:focus-visible,.pm-nav-btn:focus-visible,.practice-entrance-card:focus-visible { outline:3px solid #38bdf8; outline-offset:3px; }
.pm-item-text { min-width:0; overflow-wrap:anywhere; }
.pm-item-status { flex-shrink:0; }
.pm-nav-row { gap:.6rem; }
.pm-nav-row>span { font-size:.82rem; color:#64748b; }
.pm-progress-text { align-items:center; gap:.6rem; flex-wrap:wrap; }
.pm-progress-next { display:flex; align-items:center; gap:.75rem; margin-left:auto; }
.pm-summary { padding:2rem; text-align:center; }
.pm-summary-icon { font-size:3rem; }
.pm-summary h2 { margin:.5rem 0; }
.pm-summary>p { color:#64748b; line-height:1.7; }
.pm-summary-score { background:#ecfdf5; border:1px solid #a7f3d0; border-radius:20px; padding:1.5rem; margin:1rem auto; width:min(100%,380px); }
.pm-summary-score span,.pm-summary-score small { display:block; color:#047857; }
.pm-summary-score strong { display:block; font-size:3.2rem; color:#059669; margin:.3rem 0; }
.pm-review { text-align:left; margin:1rem 0; }
.pm-review h3 { color:#475569; font-size:1rem; }
.pm-summary-actions { display:flex; justify-content:center; flex-wrap:wrap; gap:.75rem; margin-top:1rem; }
@media(max-width:680px) {
  .pm-screen { grid-template-columns:1fr; gap:.8rem; padding:1rem; }
  .pm-focus-pic { max-width:180px; margin-bottom:.5rem; }
  .pm-header { padding:.8rem; }
  .pm-actions { gap:.3rem; }
  .pm-pill-btn { padding:.35rem .55rem; }
  .pm-service { padding:.65rem .9rem; }
  .pm-summary { padding:1.25rem; }
  .pm-nav-btn { padding:.65rem .75rem; }
  .pe-content strong { flex-wrap:wrap; }
  .practice-entrance-card { padding:1rem; gap:.6rem; }
  .pe-avatar { display:none; }
  .pe-btn { padding:.6rem .75rem; }
}
@media(prefers-reduced-motion:reduce) {
  .pm-circle-btn.recording,.pm-circle-btn.playing { animation:none!important; }
}

/* Enhanced Child Follow-along Practice Machine & Instant Scoring */
.pm-circle-btn.btn-mic {
  transition: transform 0.12s ease-out;
}
.pm-circle-btn.btn-mic.recording {
  animation: none;
}
.pm-star-icons {
  font-size: 1.15rem;
  margin-left: 0.35rem;
  display: inline-block;
  animation: pmStarBounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes pmStarBounce {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}
.pm-score-val.score-excellent {
  color: #059669;
}
.pm-score-val.score-good {
  color: #0284c7;
}
.pm-score-val.score-fair {
  color: #d97706;
}
.pm-live-interim {
  font-size: 0.88rem;
  color: #4f46e5;
  font-weight: 700;
  min-height: 1.25rem;
  margin: 0.25rem 0;
}

/* 首页顶部新学字母与跟读练习并排布局 */
.home-top-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0.85rem !important;
  margin: 1.4rem 0 1.2rem !important;
  align-items: stretch !important;
}
.home-top-grid .hero,
.home-top-grid .practice-entrance-card {
  margin: 0 !important;
  height: 100% !important;
  border-radius: 1.4rem !important;
  box-sizing: border-box !important;
}
.home-top-grid .hero {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  padding: 1.05rem 1.2rem !important;
  position: relative !important;
  overflow: hidden !important;
}
.home-top-grid .hero:after {
  content: "Aa";
  position: absolute;
  right: 0.6rem;
  bottom: -0.9rem;
  font-size: 4.4rem;
  font-weight: 900;
  opacity: 0.08;
  pointer-events: none;
}
.home-top-grid .hero strong {
  font-size: 1.22rem !important;
  line-height: 1.3 !important;
}
.home-top-grid .hero span {
  font-size: 0.82rem !important;
  line-height: 1.45 !important;
  margin-top: 0.35rem !important;
  opacity: 0.92 !important;
}
.home-top-grid .practice-entrance-card {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
  padding: 1rem 1.15rem !important;
}
.home-top-grid .pe-main {
  min-width: 0 !important;
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
}
.home-top-grid .pe-avatar {
  width: 44px !important;
  height: 44px !important;
  font-size: 1.4rem !important;
  border-radius: 12px !important;
  flex-shrink: 0 !important;
}
.home-top-grid .pe-content {
  min-width: 0 !important;
}
.home-top-grid .pe-content strong {
  font-size: 0.98rem !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  margin-bottom: 0.15rem !important;
}
.home-top-grid .pe-tag {
  font-size: 0.7rem !important;
  padding: 0.12rem 0.45rem !important;
}
.home-top-grid .pe-caption {
  font-size: 0.8rem !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  overflow: hidden !important;
  display: block !important;
}
.home-top-grid .pe-btn {
  padding: 0.55rem 0.95rem !important;
  font-size: 0.86rem !important;
  flex-shrink: 0 !important;
}
@media (max-width: 480px) {
  .home-top-grid {
    grid-template-columns: 1fr !important;
  }
}

/* The Coast: speaking lesson and picture-book reading. */
.coast-lesson .scene-img-wrap{background:#e1f3f6}
.coast-lesson .scene-img-wrap img{object-fit:contain}
.coast-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:24px 0 14px;flex-wrap:wrap}
.coast-section-heading h3{font-size:1rem;margin:0;color:var(--text)}
.coast-section-heading .dialogue-full-btn{margin:0;width:auto;font-size:.85rem;padding:10px 16px}
.coast-book .go-page-card img{aspect-ratio:3/2;object-fit:cover;background:#e1f3f6}
.coast-book .go-page-copy strong{white-space:normal;line-height:1.5}
.coast-sentence-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.coast-book .go-page-card.playing,.coast-lesson .playing{outline:3px solid var(--purple);outline-offset:2px}
@media(max-width:700px){.coast-sentence-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.coast-book .go-page-copy strong{font-size:.95rem}.coast-lesson .title-tip{white-space:normal}}

/* Content tabs and paired vocabulary / sentence picture cards. */
.speaking-topic-choice{display:flex;gap:10px;flex-wrap:wrap}
.speaking-topic-choice button{flex:1 1 130px;white-space:nowrap;padding:13px 14px;font-size:.94rem}
.coast-listen-actions{display:flex;gap:8px;flex-wrap:wrap}
.coast-reading-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.coast-reading-card{background:#fff;border:2px solid #eef0fb;border-radius:24px;overflow:hidden;box-shadow:0 8px 22px rgba(67,65,117,.07)}
.coast-picture{display:block;position:relative;border:0;background:#fff;width:100%;padding:8px 8px 0;cursor:pointer}
.coast-picture img{display:block;width:100%;aspect-ratio:1;object-fit:contain;border-radius:17px}
.coast-page-number{position:absolute;top:19px;left:19px;background:rgba(255,255,255,.93);color:#8584a3;border-radius:20px;padding:4px 9px;font-size:.75rem;font-weight:700}
.coast-reading-copy{padding:0 16px 14px}
.coast-word-row,.coast-sentence-row{display:flex;align-items:center;justify-content:space-between;gap:8px;background:none;border:0;text-align:left;width:100%;padding:12px 4px;cursor:pointer;font-family:inherit;color:var(--ink,#20395e);border-radius:10px}
.coast-word-row{border-bottom:1px dashed #e2e4f0;border-radius:0;color:#7467cd}
.coast-word-row strong{font-size:1.2rem}.coast-sentence-row strong{font-size:1.08rem}
.coast-word-row small,.coast-sentence-row small{display:block;font-size:.82rem;color:#8390a9;margin-top:5px}
.coast-row-sound{font-size:1rem;flex:none;background:#f2f0ff;border-radius:50%;padding:7px}
.coast-word-row:hover,.coast-sentence-row:hover{background:#f8f7ff}
.coast-book .coast-audio.playing{outline:2px solid var(--purple);outline-offset:-2px;background:#f3efff}
@media(max-width:560px){.speaking-topic-choice{gap:8px}.speaking-topic-choice button{flex:1 1 100px;font-size:.8rem;padding:11px 7px}.coast-reading-grid{gap:10px}.coast-reading-card{border-radius:18px}.coast-reading-copy{padding:0 8px 6px}.coast-word-row strong{font-size:1rem}.coast-sentence-row strong{font-size:.94rem;line-height:1.45}.coast-row-sound{font-size:.8rem;padding:4px}.coast-word-row small,.coast-sentence-row small{font-size:.72rem}.coast-page-number{top:12px;left:12px}.coast-section-heading{align-items:flex-start}}

/* Highlight the sounds being compared without changing audio text. */
.pronunciation-focus{color:#dc2626;font-weight:900}

/* Grammar topics: one small lesson at a time, with existing picture/audio cards. */
.grammar-banner{background:linear-gradient(125deg,#e9e5ff,#e2f7ef);border:1px solid #d6d3f3;color:var(--ink)}
.grammar-banner .banner-text-group span{color:#52627e}
.grammar-banner .speed-switcher{background:rgba(255,255,255,.55);border-color:#d4d1ed}
.grammar-banner .speed-btn{color:#626b86}
.grammar-banner .speed-btn.active{color:#5149b6}
.grammar-start-note{margin:0 0 16px;padding:12px 16px;border-radius:16px;background:#fff7df;color:#745525;font-size:.92rem;line-height:1.7}
.grammar-topics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:0 0 18px}
.grammar-topic{display:flex;align-items:center;justify-content:center;gap:7px;min-height:50px;padding:11px 7px;border:1px solid #e1def2;border-radius:15px;background:rgba(255,255,255,.85);color:var(--ink);font:inherit;font-size:.9rem;font-weight:800;cursor:pointer}
.grammar-topic.selected{background:#eeebff;border:2px solid var(--purple);color:#5149b6;padding:10px 6px}
.grammar-topic:focus-visible,.grammar-card:focus-visible,.grammar-parent summary:focus-visible{outline:3px solid #c3731d;outline-offset:3px}
.grammar-panel[hidden]{display:none}
.grammar-heading{display:flex;align-items:center;gap:13px}
.grammar-topic-icon{display:grid;place-items:center;flex-shrink:0;width:54px;height:54px;border-radius:17px;background:#efecff;font-size:1.8rem}
.grammar-heading h2{margin:0;font-size:clamp(1.1rem,2.5vw,1.45rem);line-height:1.5}
.grammar-heading p{margin:5px 0 0;color:#586482;font-size:.94rem;line-height:1.6}
.grammar-intro{margin:16px 0;color:#586482;font-size:.94rem;line-height:1.8}
.grammar-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.grammar-example-group+.grammar-example-group{margin-top:28px;padding-top:8px;border-top:1px dashed #dfdaee}
.grammar-example-group h3{margin:18px 0 8px;color:#62559b;font-size:1.06rem;line-height:1.7}
.grammar-group-description{margin:0 0 14px;color:#586482;font-size:.93rem;line-height:1.9}
.grammar-card{display:flex;flex-direction:column;min-width:0;padding:9px;border:2px solid #e9e8f3;border-radius:21px;background:#fff;color:var(--ink);font:inherit;text-align:left;cursor:pointer;box-shadow:0 5px 15px rgba(61,70,112,.05)}
.grammar-picture{position:relative;display:block;width:100%;height:180px;background:#fffaf1;border-radius:14px;overflow:hidden}
.grammar-picture img{display:block;width:100%;height:100%;object-fit:contain}
.grammar-sound{position:absolute;top:9px;right:9px;display:grid;place-items:center;width:35px;height:35px;background:rgba(255,255,255,.95);border-radius:50%;font-size:1.1rem}
.grammar-card-copy{display:flex;flex-direction:column;gap:7px;padding:13px 8px 8px}
.grammar-card-copy strong{font-size:clamp(1.03rem,2.1vw,1.2rem);line-height:1.6;overflow-wrap:anywhere}
.grammar-card mark{padding:1px 3px;border-radius:5px;background:#fff0bc;color:#a84816;font-weight:900}
.grammar-translation{font-size:.9rem;color:#626e86;line-height:1.5}
.grammar-card-note{padding-top:7px;border-top:1px dashed #ece8f5;color:#526d61;font-size:.84rem;line-height:1.7}
.grammar-breakdown{display:grid;gap:5px;margin:3px 0;padding:10px;border-radius:11px;background:#f6f3ff}
.grammar-part{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:8px;font-size:.86rem;line-height:1.6;overflow-wrap:anywhere}
.grammar-part b{color:#6250a0}
.grammar-part>span{color:#586482}
.grammar-reminder{margin-top:20px;padding:15px 18px;border:1px solid #f0dfae;border-radius:16px;background:#fff8e7;color:#765722;font-size:.93rem;line-height:1.9}
.grammar-reminder p{margin:5px 0 0}
.grammar-people{margin:18px 0 28px;padding:16px;border:1px solid #ddd7f2;border-radius:18px;background:#fcfbff}
.grammar-people h3{margin:0 0 8px;color:#62559b;font-size:1.1rem;line-height:1.7}
.grammar-people>p{margin:0 0 14px;color:#586482;font-size:.92rem;line-height:1.8}
.grammar-people-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.grammar-person-card{min-width:0;padding:9px;border:2px solid #e2ddef;border-radius:18px;background:#fff;overflow:hidden;transition:border-color .18s,box-shadow .18s}
.grammar-person-card.playing{border-color:var(--purple);box-shadow:0 0 0 3px #ebe7ff;background:#fcfbff}
.grammar-person-image-btn{position:relative;display:block;width:100%;padding:0;border:2px solid transparent;border-radius:14px;background:#fffaf3;cursor:pointer;overflow:hidden;transition:border-color .18s,box-shadow .18s,transform .15s}
.grammar-person-image-btn:hover{border-color:#d1c7f0}
.grammar-person-image-btn:active{transform:scale(.99)}
.grammar-person-image-btn.playing{border-color:var(--purple);box-shadow:0 0 0 3px #ebe7ff}
.grammar-person-image{display:block;width:100%;aspect-ratio:1;object-fit:contain;border-radius:12px;background:#fffaf3}
.grammar-person-copy{display:grid;gap:4px;padding:9px 3px 4px;font-size:.83rem;line-height:1.65;overflow-wrap:anywhere}
.grammar-person-line{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:center;gap:8px;width:100%;margin:0;padding:5px 9px;border:1.5px solid transparent;border-radius:10px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;transition:background .15s,border-color .15s,box-shadow .15s}
.grammar-person-line:hover{background:#f6f3ff;border-color:#e2ddef}
.grammar-person-line.is-top{background:#f8f5ff;border-color:#e7e0f8}
.grammar-person-line.playing{background:#efeaff;border-color:var(--purple);box-shadow:0 0 0 2px rgba(109,93,211,.16)}
.grammar-person-copy strong{color:#51429b;font-size:.95rem}
.grammar-person-copy span{color:#586482}
.grammar-line-sound{font-style:normal;font-size:.78rem;opacity:.55;transition:opacity .15s,transform .15s}
.grammar-person-line:hover .grammar-line-sound,.grammar-person-line.playing .grammar-line-sound{opacity:1;transform:scale(1.1)}
.grammar-person-example{margin-top:4px;padding-top:7px;border-top:1px dashed #e2ddef;font-size:.79rem}
.grammar-person-example b{color:#42644e}
.grammar-people-tip{margin-top:13px;color:#586482;font-size:.9rem;line-height:1.9}
.grammar-people-tip p{margin:6px 0 0}
@media(max-width:560px){.grammar-people{padding:10px}.grammar-people-grid{gap:10px}.grammar-person-card{padding:6px;border-radius:14px}.grammar-person-copy{padding:7px 2px 3px;font-size:.75rem}.grammar-person-copy strong{font-size:.84rem}.grammar-person-line{gap:4px;padding:4px 6px}.grammar-person-example{font-size:.73rem}}
.grammar-card.playing{border-color:var(--purple);box-shadow:0 0 0 3px #ebe7ff;background:#fcfbff}
.grammar-activity{margin-top:21px;padding:16px 18px;background:#eff9f3;border:1px solid #cfeadc;border-radius:16px;color:#345c48;line-height:1.8}
.grammar-activity strong{font-size:.98rem}
.grammar-activity p{margin:5px 0 0;font-size:.9rem}
.grammar-parent{margin-top:16px;border:1px solid #e8e2f3;border-radius:15px;background:#fcfaff;font-size:.9rem;line-height:1.9}
.grammar-parent summary{padding:14px 16px;color:#65579a;font-weight:800;cursor:pointer}
.grammar-parent ul{margin:0;padding:0 22px 16px 36px;color:#586482}
.grammar-parent li+li{margin-top:10px}
.grammar-table-wrap{margin-top:20px;overflow-x:auto}
.grammar-table-hint{color:#526d61;font-size:.9rem;line-height:1.7}
.grammar-table{width:100%;border-collapse:collapse;font-size:.87rem;line-height:1.8}
.grammar-table th,.grammar-table td{padding:11px;text-align:left;border:1px solid #e5e3ee}
.grammar-table th{background:#f1eefb;color:#62588b}
.grammar-table td:first-child{width:34%;color:#52627e}
@media(max-width:560px){
 .course-tab{font-size:.75rem;line-height:1.5;padding:.55rem .15rem;overflow-wrap:anywhere}
 .course-tab[data-course="grammar"]{font-size:.7rem}
 .course-tab[data-course="grammar"] span{display:block}
 .grammar-topics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .grammar-topic{min-height:48px;font-size:.86rem}
 .grammar-heading{align-items:flex-start;gap:10px}
 .grammar-topic-icon{width:44px;height:44px;font-size:1.45rem}
 .grammar-cards{gap:10px}
 .grammar-card{padding:6px;border-radius:16px}
 .grammar-picture{height:130px}
 .grammar-card-copy{padding:9px 4px 5px;gap:6px}
 .grammar-card-copy strong{font-size:1rem}
 .grammar-translation,.grammar-card-note{font-size:.8rem}
 .grammar-breakdown{padding:8px}
 .grammar-part{grid-template-columns:1fr;gap:1px;font-size:.82rem}
 .grammar-activity{padding:13px}
 .grammar-table th,.grammar-table td{padding:8px}
}
@media(max-width:350px){.grammar-cards{grid-template-columns:1fr}.grammar-picture{height:160px}}

/* Collapsible letter course picker; only shown on phonics home and lessons. */
.phonics-layout{padding-left:344px;min-height:100vh}
.phonics-layout.is-collapsed{padding-left:0}
.letter-sidebar{position:fixed;inset:12px auto 12px 12px;width:320px;z-index:20;display:flex;flex-direction:column;background:rgba(255,253,248,.98);border:1px solid #e4e2f4;border-radius:24px;box-shadow:0 12px 34px rgba(61,70,112,.12);overflow:hidden}
.letter-sidebar[hidden],.letter-sidebar-open[hidden],.letter-sidebar-backdrop[hidden]{display:none}
.letter-sidebar-heading{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:18px 16px 14px;border-bottom:1px solid #eceaf7;flex-shrink:0}
.letter-sidebar-heading strong{display:block;font-size:1.12rem}
.letter-sidebar-heading small{display:block;margin-top:5px;font-size:.75rem;color:var(--muted)}
.letter-sidebar-collapse{border:1px solid #dfdcf6;border-radius:20px;background:#f2efff;color:var(--purple);min-height:44px;padding:9px 13px;font:inherit;font-size:.82rem;font-weight:800;cursor:pointer;white-space:nowrap}
.letter-sidebar-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-content:start;gap:10px;padding:14px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;min-height:0}
.letter-mini-card{position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;min-width:0;min-height:106px;border:2px solid #eeedf7;border-radius:15px;background:#fff;color:var(--ink);padding:7px 3px;cursor:pointer;font:inherit;box-shadow:0 3px 8px rgba(61,70,112,.04)}
.letter-mini-card img{display:block;width:48px;height:48px;object-fit:contain;border-radius:7px}
.letter-mini-card strong{font-size:1.4rem;line-height:1.1}
.letter-mini-card small{color:#b96d0e;font-size:.65rem;font-weight:800;line-height:1}
.letter-mini-card.is-today{background:#fff9e9;border-color:#ffdc8f}
.letter-mini-card.is-current{border-color:var(--purple);background:#f0edff;box-shadow:0 0 0 2px rgba(100,107,212,.16)}
.letter-mini-card:hover{border-color:#9b91dd;background:#f7f5ff}
.letter-mini-card:focus-visible,.letter-sidebar-collapse:focus-visible,.letter-sidebar-open:focus-visible{outline:3px solid #c3731d;outline-offset:2px}
.letter-sidebar-open{position:fixed;left:0;top:42%;z-index:18;display:flex;align-items:center;gap:6px;flex-direction:column;border:1px solid #dcd7fa;border-left:0;border-radius:0 16px 16px 0;background:#fff;color:var(--purple);box-shadow:0 6px 22px rgba(61,70,112,.14);padding:13px 9px;font:inherit;font-size:.8rem;font-weight:900;cursor:pointer}
.letter-sidebar-backdrop{display:none}
@media(max-width:899px){
 .phonics-layout,.phonics-layout.is-collapsed{padding-left:0}
 .letter-sidebar{width:min(340px,86vw);inset:8px auto 8px 8px;z-index:31;box-shadow:0 14px 45px rgba(35,48,77,.23)}
 .letter-sidebar-heading{padding:18px 14px}
 .letter-sidebar-grid{gap:10px;padding:14px}
 .letter-mini-card{min-height:106px}
 .letter-sidebar-backdrop{position:fixed;inset:0;z-index:30;display:block;border:0;background:rgba(35,48,77,.35);cursor:pointer}
 .letter-sidebar-open{padding:12px 7px;font-size:.7rem}
}
@media(prefers-reduced-motion:no-preference){.letter-mini-card{transition:border-color .15s,background .15s}}

.winter-sentence-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.winter-sentence-grid .go-page-copy{min-width:0}

.nine-count-picture {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  aspect-ratio: 1;
  width: 100%;
  gap: 4px;
  padding: 4px;
  box-sizing: border-box;
  border-radius: .95rem;
  background: #fffaf1;
  overflow: hidden;
}
.nine-count-picture img { border-radius: .4rem; min-width: 0; min-height: 0; object-fit: contain; }
@media(max-width:520px) {
  #topic-nine .winter-sentence-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
