:root {
  --ink: #203047;
  --muted: #65738a;
  --paper: #fffdf7;
  --panel: #ffffff;
  --line: #dce4ee;
  --blue: #3b6fd8;
  --blue-dark: #254fa8;
  --yellow: #ffd86b;
  --green: #39a978;
  --red: #dc5c62;
  --purple: #7657c8;
  --shadow: 0 14px 36px rgba(32, 48, 71, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", "Microsoft YaHei UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  letter-spacing: -0.05em;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  letter-spacing: -0.035em;
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.profile-chip,
.main-nav button,
.button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.profile-chip {
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 0 7px 0 #e5b944;
}

.main-nav {
  position: relative;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(55, 104, 201, 0.28) transparent;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.main-nav button {
  flex: 1 0 auto;
  min-height: 44px;
  scroll-snap-align: start;
  color: var(--muted);
  background: transparent;
}

.main-nav.can-scroll-right::after {
  content: "";
  position: absolute;
  top: 1px;
  right: 8px;
  bottom: 1px;
  width: 38px;
  border-radius: 0 17px 17px 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.96));
  pointer-events: none;
}

.main-nav.can-scroll-right {
  padding-right: 20px;
}

.main-nav button:hover,
.main-nav button.active {
  color: #fff;
  background: var(--blue);
}

.view {
  padding: 34px 2px 0;
}

.hero {
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.hero-companion-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.home-intro-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 18%, rgba(103, 164, 240, 0.12), transparent 28%),
    linear-gradient(135deg, #fff, #f7fbff);
  box-shadow: 0 12px 28px rgba(63, 83, 123, 0.1);
}

.home-intro-strip .hero-companion-row {
  justify-content: flex-start;
  gap: 18px;
}

.home-intro-strip .hero-mascot {
  flex-basis: 82px;
  width: 82px;
  height: 82px;
  border-radius: 26px;
  font-size: 3.15rem;
}

.home-intro-strip h2 {
  margin: 2px 0 4px;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
}

.home-intro-strip p:not(.eyebrow) {
  margin-bottom: 0;
}

.home-intro-strip .level-chip {
  max-width: none;
  margin-top: 0;
}

.home-intro-strip + .module-grid {
  margin-top: 14px;
}

.hero-mascot {
  display: grid;
  flex: 0 0 112px;
  width: 112px;
  height: 112px;
  place-items: center;
  border: 5px solid #fff;
  border-radius: 34px;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.95), transparent 24%),
    linear-gradient(145deg, #dff2ff, #eee4ff 58%, #fff1bf);
  box-shadow: 0 18px 38px rgba(83, 105, 168, 0.18);
  font-size: 4.25rem;
  animation: companion-float 2.8s ease-in-out infinite;
}

.profile-card-heading {
  display: flex;
  align-items: center;
  gap: 13px;
}

.profile-card-heading h3,
.profile-card-heading p {
  margin-bottom: 0;
}

.profile-mascot {
  display: grid;
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 19px;
  background: linear-gradient(145deg, #eaf5ff, #f2eaff);
  box-shadow: inset 0 0 0 1px rgba(59, 111, 216, 0.1);
  font-size: 2.35rem;
}

.profile-mascot--result {
  width: 76px;
  height: 76px;
  margin: 0 auto 10px;
  border: 4px solid #fff;
  border-radius: 24px;
  background: linear-gradient(145deg, #dff5ff, #f5e7ff);
  box-shadow: 0 14px 30px rgba(82, 104, 171, 0.2);
  font-size: 3.15rem;
  animation: companion-float 2.5s ease-in-out infinite;
}

.profile-mascot-picker {
  display: grid;
  gap: 6px;
  margin: 14px 0 16px;
}

.profile-mascot-picker span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.profile-mascot-picker select {
  min-height: 42px;
  font-size: 1.35rem;
}

.result-companion {
  margin: 2px 0 8px;
  text-align: center;
}

.result-companion strong,
.result-companion small {
  display: block;
}

.result-companion small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
}

.level-chip,
.level-result-card {
  display: flex;
  align-items: center;
  gap: 13px;
  max-width: 430px;
  margin-top: 18px;
  padding: 13px 15px;
  border: 1px solid #c9d9f5;
  border-radius: 18px;
  text-align: left;
  background: linear-gradient(135deg, #f2f7ff, #fff);
}

.level-result-card {
  max-width: 650px;
  margin: 18px auto;
}

.level-icon {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(32, 48, 71, 0.07);
  font-size: 1.8rem;
}

.level-chip strong,
.level-chip small,
.level-result-card strong,
.level-result-card small {
  display: block;
}

.level-chip small,
.level-result-card small {
  margin-top: 5px;
  color: var(--muted);
}

.start-nudge {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  padding: 16px 18px;
  border: 1px solid rgba(83, 173, 118, 0.28);
  border-radius: 20px;
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 220, 93, 0.22), transparent 32%),
    linear-gradient(135deg, #effcf3, #fff9df 58%, #eef6ff);
  box-shadow: 0 14px 32px rgba(68, 156, 103, 0.12);
}

.start-nudge-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(74, 151, 102, 0.13);
  font-size: 1.95rem;
  animation: recovery-float 2.4s ease-in-out infinite;
}

.start-nudge strong,
.start-nudge p {
  display: block;
}

.start-nudge p {
  margin: 4px 0 0;
  color: var(--muted);
}

.paused-session-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  padding: 17px 18px;
  border: 1px solid rgba(74, 127, 211, 0.26);
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 20%, rgba(255, 221, 92, 0.2), transparent 32%),
    linear-gradient(135deg, #edf5ff, #fff 55%, #fff8dc);
  box-shadow: 0 14px 32px rgba(63, 112, 184, 0.13);
  animation: celebration-arrive 460ms cubic-bezier(.2, .9, .25, 1.08);
}

.paused-session-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(65, 112, 181, 0.14);
  font-size: 1.85rem;
}

.paused-session-card strong,
.paused-session-card p {
  display: block;
}

.paused-session-card strong {
  margin: 3px 0 4px;
  color: var(--blue-dark);
}

.paused-session-card p {
  margin: 0;
  color: var(--muted);
}

.level-track {
  height: 8px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe8f5;
}

.level-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #62c8a2, var(--yellow));
}

.progress-panel {
  margin-top: 22px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.progress-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding-top: 4px;
  color: var(--muted);
}

.progress-meta strong {
  color: var(--ink);
}

.mastery-progress-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 6px 0 20px;
}

.mastery-progress-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #f7faff);
}

.mastery-progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
  font-size: 0.86rem;
}

.mastery-progress-label strong {
  color: var(--blue-dark);
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf5;
  box-shadow: inset 0 2px 4px rgba(32, 48, 71, 0.08);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #54c99a, var(--yellow));
  box-shadow: 0 2px 8px rgba(59, 111, 216, 0.22);
}

.mastery-progress-item small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.personal-best-home {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 0 0 14px;
  padding: 17px 18px;
  border: 1px solid rgba(226, 170, 55, 0.34);
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 215, 92, 0.22), transparent 30%),
    linear-gradient(135deg, #fff9df, #fff);
}

.personal-best-home-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 9px 20px rgba(175, 125, 28, 0.13);
  font-size: 2.05rem;
}

.personal-best-home-copy strong,
.personal-best-home-copy p {
  display: block;
}

.personal-best-home-copy p {
  margin: 4px 0 0;
  color: var(--muted);
}

.personal-best-home-scores {
  display: flex;
  gap: 10px;
}

.personal-best-home-scores > div {
  min-width: 112px;
  padding: 11px 13px;
  border: 1px solid rgba(225, 181, 76, 0.22);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.personal-best-home-scores span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.personal-best-home-scores strong {
  display: block;
  margin-top: 3px;
  color: #8b641d;
}

.mastered-constellation-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 14px 0;
  padding: 17px 18px;
  border: 1px solid #c9d6ff;
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 20%, rgba(113, 143, 255, 0.18), transparent 28%),
    linear-gradient(135deg, #eef3ff, #fff);
}

.mastered-constellation-card.has-stars {
  border-color: #b9a7ff;
  background:
    radial-gradient(circle at 12% 20%, rgba(137, 112, 255, 0.24), transparent 30%),
    linear-gradient(135deg, #f2efff, #fff);
  box-shadow: 0 12px 28px rgba(102, 79, 194, 0.1);
}

.mastered-constellation-icon {
  display: grid;
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(91, 112, 190, 0.16);
  font-size: 2.25rem;
}

.mastered-constellation-copy {
  min-width: 0;
}

.mastered-constellation-copy strong {
  display: block;
  font-size: 1.08rem;
}

.mastered-constellation-copy > p:not(.eyebrow) {
  margin: 4px 0 9px;
  color: var(--muted);
}

.mastered-word-stars {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mastered-word-stars span {
  padding: 6px 10px;
  border: 1px solid rgba(137, 112, 255, 0.22);
  border-radius: 999px;
  color: #58439c;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 5px 12px rgba(102, 79, 194, 0.08);
  font-size: 0.84rem;
  font-weight: 800;
  animation: mastered-star-arrive 420ms cubic-bezier(.2, .9, .25, 1.2) both;
  animation-delay: calc(var(--star-index, 0) * 55ms);
}

.mastered-word-stars small {
  align-self: center;
  color: var(--muted);
}

.reignite-callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 11px;
  padding: 10px 12px;
  border: 1px solid rgba(242, 190, 67, 0.38);
  border-radius: 14px;
  background: linear-gradient(135deg, #fff9dc, rgba(255, 255, 255, 0.88));
}

.reignite-callout > span {
  font-size: 1.35rem;
}

.reignite-callout p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.reignite-callout strong {
  display: block;
  color: var(--ink);
}

.study-streak-card,
.home-next-task {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 14px 0;
  padding: 17px 18px;
  border-radius: 20px;
}

.study-streak-card {
  border: 1px solid #f0cf6b;
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 216, 107, 0.28), transparent 30%),
    linear-gradient(135deg, #fff9df, #fff);
}

.study-streak-card--risk {
  border-color: #f0aa68;
  background: linear-gradient(135deg, #fff1e5, #fff);
}

.study-streak-flame {
  display: grid;
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(213, 139, 38, 0.16);
  font-size: 2.35rem;
  animation: streak-glow 2.2s ease-in-out infinite;
}

.study-streak-copy {
  flex: 1;
  min-width: 0;
}

.study-streak-copy strong,
.home-next-task strong {
  display: block;
  font-size: 1.08rem;
}

.study-streak-copy p {
  margin: 4px 0 10px;
  color: var(--muted);
}

.study-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(34px, 1fr));
  gap: 7px;
  max-width: 470px;
}

.study-streak-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.study-streak-footer small {
  color: var(--muted);
  font-weight: 700;
}

.study-streak-footer .button {
  min-height: 38px;
  padding: 8px 13px;
}

.study-day {
  display: grid;
  min-height: 48px;
  place-items: center;
  padding: 4px;
  border: 1px solid #eadba8;
  border-radius: 12px;
  color: #9a8151;
  background: rgba(255, 255, 255, 0.72);
}

.study-day b {
  color: #c6ad73;
  font-size: 1.12rem;
}

.study-day small {
  font-size: 0.72rem;
}

.study-day.active {
  border-color: #e8b833;
  color: #815e00;
  background: linear-gradient(145deg, #fff0a8, #fff9dc);
  box-shadow: 0 5px 12px rgba(227, 178, 41, 0.16);
}

.study-day.active b {
  color: #e6a900;
}

.study-day.today {
  outline: 3px solid rgba(59, 111, 216, 0.18);
}

.weekly-reward-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 14px 0;
  padding: 17px 18px;
  border: 1px solid #d8c5ff;
  border-radius: 20px;
  background:
    radial-gradient(circle at 88% 15%, rgba(191, 142, 255, 0.26), transparent 30%),
    linear-gradient(135deg, #f4efff, #fff);
  box-shadow: 0 12px 28px rgba(118, 79, 194, 0.1);
}

.weekly-reward-card--unlocked {
  border-color: #f0c75b;
  background:
    radial-gradient(circle at 88% 15%, rgba(255, 210, 90, 0.3), transparent 32%),
    linear-gradient(135deg, #fff8d7, #fff);
  box-shadow: 0 14px 30px rgba(226, 167, 38, 0.16);
}

.weekly-reward-card.is-celebrating {
  animation: weekly-reward-burst 720ms cubic-bezier(.2, .9, .25, 1.18);
}

.weekly-reward-card.is-celebrating .weekly-reward-chest {
  animation: weekly-chest-burst 720ms cubic-bezier(.2, .9, .25, 1.25);
}

.weekly-reward-chest {
  display: grid;
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(118, 79, 194, 0.16);
  font-size: 2.25rem;
  animation: weekly-chest-float 2.4s ease-in-out infinite;
}

.weekly-reward-copy {
  min-width: 0;
}

.weekly-reward-copy strong {
  display: block;
  font-size: 1.08rem;
}

.weekly-reward-copy p {
  margin: 4px 0 9px;
  color: var(--muted);
}

.weekly-reward-days {
  display: flex;
  gap: 7px;
}

.weekly-reward-days span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #d9caef;
  border-radius: 50%;
  color: #aa96c7;
  background: rgba(255, 255, 255, 0.75);
  font-weight: 900;
}

.weekly-reward-days span.quality {
  border-color: #e4b93f;
  color: #a66e00;
  background: linear-gradient(145deg, #fff0a8, #fff9dc);
  box-shadow: 0 5px 12px rgba(227, 178, 41, 0.18);
}

.weekly-reward-days span.today {
  outline: 3px solid rgba(118, 79, 194, 0.18);
}

.home-next-task {
  border: 1px solid #b9d2ff;
  background: linear-gradient(135deg, #edf5ff, #fff);
  box-shadow: 0 12px 28px rgba(59, 111, 216, 0.1);
}

.home-next-task > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.home-next-task small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.home-next-task-icon {
  display: grid;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 17px;
  background: #fff;
  font-size: 2rem;
}

.achievement-panel {
  margin-top: 18px;
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 210, 90, 0.18), transparent 24%),
    var(--panel);
}

.achievement-count {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--blue-dark);
  background: #e9f0ff;
  font-weight: 900;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-top: 18px;
}

.achievement-card {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #fff;
}

.achievement-card.unlocked {
  border-color: rgba(232, 178, 49, 0.55);
  background: linear-gradient(145deg, #fffdf4, #fff4c9);
  box-shadow: 0 12px 28px rgba(218, 164, 38, 0.13);
}

.achievement-card.locked {
  color: var(--muted);
  background: #f7f9fc;
}

.achievement-icon {
  display: grid;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(32, 48, 71, 0.07);
  font-size: 2rem;
}

.achievement-card.unlocked .achievement-icon {
  animation: medal-shine 2.4s ease-in-out infinite;
}

.achievement-copy strong,
.achievement-copy p,
.achievement-copy small {
  display: block;
}

.achievement-copy p {
  margin: 5px 0 8px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.achievement-copy small {
  color: var(--muted);
  font-weight: 800;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.daily-victory-banner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
  overflow: hidden;
  padding: 22px 24px;
  border: 1px solid rgba(238, 180, 56, 0.5);
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 20%, rgba(255, 255, 255, 0.95) 0 3px, transparent 4px),
    radial-gradient(circle at 92% 78%, rgba(255, 255, 255, 0.8) 0 4px, transparent 5px),
    linear-gradient(120deg, #fff4bd, #ffe4a3 52%, #fff9df);
  box-shadow: 0 14px 32px rgba(218, 151, 38, 0.18);
  animation: celebration-arrive 520ms cubic-bezier(.2, .9, .25, 1.12);
}

.daily-victory-banner::before,
.daily-victory-banner::after {
  position: absolute;
  width: 90px;
  height: 90px;
  border: 2px dashed rgba(232, 167, 43, 0.25);
  border-radius: 50%;
  content: '';
}

.daily-victory-banner::before {
  top: -52px;
  right: 84px;
}

.daily-victory-banner::after {
  bottom: -60px;
  left: 34%;
}

.daily-victory-banner--complete {
  border-color: rgba(224, 139, 30, 0.58);
  background:
    radial-gradient(circle at 15% 25%, rgba(255, 255, 255, 0.95) 0 4px, transparent 5px),
    radial-gradient(circle at 84% 25%, rgba(255, 255, 255, 0.88) 0 3px, transparent 4px),
    linear-gradient(120deg, #ffe182, #ffb95c 52%, #fff0b5);
  box-shadow: 0 18px 38px rgba(224, 139, 30, 0.28);
}

.daily-victory-banner--building {
  border-color: rgba(83, 176, 139, 0.42);
  background:
    radial-gradient(circle at 12% 24%, rgba(255, 255, 255, 0.92) 0 3px, transparent 4px),
    linear-gradient(120deg, #e9fff4, #d8f7e8 52%, #f2fff9);
  box-shadow: 0 14px 32px rgba(53, 151, 111, 0.16);
}

.daily-victory-banner--building strong {
  color: #246b50;
}

.daily-victory-banner--building p {
  color: #40775f;
}

.daily-victory-banner--building .daily-victory-score {
  background: rgba(255, 255, 255, 0.62);
}

.daily-victory-banner--building .daily-victory-score strong,
.daily-victory-banner--building .daily-victory-score span {
  color: #2c7658;
}

.daily-victory-icon {
  z-index: 1;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 22px rgba(169, 108, 23, 0.16);
  font-size: 2.45rem;
  animation: medal-shine 2.6s ease-in-out infinite;
}

.daily-victory-banner > div:not(.daily-victory-icon):not(.daily-victory-score) {
  z-index: 1;
}

.daily-victory-banner strong {
  display: block;
  margin: 3px 0 5px;
  color: #6f4313;
  font-size: 1.28rem;
}

.daily-victory-banner p {
  margin: 0;
  color: #8a5b22;
  line-height: 1.55;
}

.daily-victory-score {
  z-index: 1;
  min-width: 92px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  text-align: center;
}

.daily-victory-score strong {
  margin: 0;
  color: #9b5c12;
  font-size: 1.55rem;
}

.daily-victory-score span {
  display: block;
  color: #98651f;
  font-size: 0.78rem;
  font-weight: 800;
}

.module-card {
  position: relative;
  overflow: hidden;
  min-height: 310px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.module-card::before {
  content: "";
  position: absolute;
  top: -42px;
  right: -32px;
  width: 150px;
  height: 150px;
  border-radius: 42% 58% 63% 37%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.9), rgba(102, 157, 235, 0.18));
  transform: rotate(16deg);
  pointer-events: none;
}

.module-card > * {
  position: relative;
  z-index: 1;
}

.module-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(63, 83, 123, 0.18);
}

.module-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.module-card--practice {
  background: linear-gradient(145deg, #ffffff 20%, #eaf0ff 100%);
}

.module-card--dictation {
  background: linear-gradient(145deg, #ffffff 20%, #fff5cf 100%);
}

.module-card--dictation::before {
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.92), rgba(246, 193, 62, 0.2));
}

.module-card h2 {
  margin-bottom: 10px;
}

.module-card p:not(.eyebrow) {
  max-width: 440px;
  color: var(--muted);
  line-height: 1.75;
}

.module-card .button {
  margin-top: 16px;
}

.module-icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 20px rgba(32, 48, 71, 0.12);
  font-size: 1.35rem;
  font-weight: 900;
}

@media (prefers-reduced-motion: no-preference) {
  .module-icon {
    animation: module-icon-bob 2.8s ease-in-out infinite;
  }

  .module-card:hover .module-icon {
    animation-duration: 1.2s;
  }
}

@keyframes module-icon-bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-5px) rotate(2deg); }
}

.button {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 6px 0 var(--blue-dark);
}

.button.secondary {
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 0 6px 0 #e5b944;
}

.button.danger {
  color: #fff;
  background: var(--red);
  box-shadow: 0 6px 0 #ad3e44;
}

.button:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

.button:active:not(:disabled),
.icon-button:active:not(:disabled),
.main-nav button:active {
  transform: translateY(3px) scale(0.98);
}

.button:focus-visible,
.icon-button:focus-visible,
.main-nav button:focus-visible {
  outline: 4px solid rgba(75, 134, 222, 0.24);
  outline-offset: 3px;
}

.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 4px 0 #d8e0eb;
  font-size: 1.15rem;
}

.icon-button:hover {
  background: var(--yellow);
}

.icon-button:disabled,
.button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  box-shadow: none;
  transform: none;
}

.practice-status {
  align-items: center;
}

.practice-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: 'count round combo';
  align-items: center;
  gap: 12px;
}

.practice-topbar .practice-count {
  grid-area: count;
  margin-bottom: 0;
}

.practice-topbar .practice-round {
  grid-area: round;
  justify-self: center;
  font-size: 0.85rem;
}

.practice-topbar .combo-meter {
  grid-area: combo;
  justify-self: end;
}

.word-audio {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.word-slots-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  margin-bottom: 13px;
}

.word-slots-head .stage-label {
  margin-bottom: 0;
  text-align: left;
}

.word-audio-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 12px;
  margin: 4px 0 16px;
}

.word-audio-row .muted {
  font-size: 0.85rem;
  text-align: left;
}

.practice-progress-panel {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 12px 0 18px;
  padding: 12px 14px;
  border: 1px solid #d7e4f8;
  border-radius: 16px;
  background: linear-gradient(135deg, #f5f9ff, #fff);
}

.practice-progress-copy {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--muted);
  font-size: 0.85rem;
}

.practice-progress-copy strong {
  color: var(--blue-dark);
  font-size: 1.05rem;
}

.prompt-rounds {
  display: flex;
  align-items: center;
  gap: 6px;
}

.prompt-round {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #c6d5eb;
  border-radius: 50%;
  color: var(--muted);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.prompt-round.done {
  border-color: #69c69a;
  color: #176b3a;
  background: #e4f8ed;
}

.prompt-round.active {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
  box-shadow: 0 5px 13px rgba(59, 111, 216, 0.22);
}

.prompt-rounds small {
  margin-left: 4px;
  color: var(--muted);
  white-space: nowrap;
}

.combo-meter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 132px;
  padding: 7px 10px;
  border: 1px solid rgba(235, 154, 45, 0.28);
  border-radius: 999px;
  color: #9a541c;
  background: #fff6df;
  font-size: 0.82rem;
}

.combo-meter strong {
  white-space: nowrap;
}

.combo-next {
  color: #b4672d;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.combo-track {
  display: block;
  width: 42px;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #f1dfb3;
}

.combo-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb33c, #ff6d55);
}

.combo-meter--burst {
  color: #8b3e14;
  background: linear-gradient(135deg, #ffe18b, #fff4ca);
  box-shadow: 0 0 0 3px rgba(255, 176, 52, 0.16);
  animation: answer-badge-pop 420ms cubic-bezier(.2, .9, .25, 1.35);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.result-actions {
  justify-content: center;
  margin-top: 24px;
}

.card-grid,
.stat-grid,
.form-grid {
  display: grid;
  gap: 16px;
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 22px;
}

.stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin: 22px 0;
}

.form-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.card,
.stat,
.panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.card,
.panel {
  padding: 22px;
}

.stat {
  padding: 18px;
}

.stat strong {
  display: block;
  font-size: 2rem;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-size: 0.88rem;
  font-weight: 800;
}

.form-help-row {
  min-height: 42px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  display: flex;
  align-items: center;
}

.mission-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 10px;
}

.mission-preview span {
  padding: 8px 11px;
  border: 1px solid rgba(70, 130, 210, 0.16);
  border-radius: 999px;
  color: #315c91;
  background: linear-gradient(135deg, #edf5ff, #fff9df);
  box-shadow: 0 5px 12px rgba(55, 103, 166, 0.08);
  font-size: 0.8rem;
  font-weight: 800;
}

.mission-preview span:nth-child(2) {
  border-color: rgba(224, 166, 47, 0.18);
  color: #8b641d;
  background: linear-gradient(135deg, #fff7d9, #fff);
}

.mission-preview span:nth-child(3) {
  border-color: rgba(77, 165, 122, 0.18);
  color: #2d7453;
  background: linear-gradient(135deg, #eafaf1, #fff);
}

.plan-notice {
  display: flex;
  gap: 10px;
  align-items: center;
}

.scope-task-guidance {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 8px 0 4px;
  padding: 12px 14px;
  border: 1px solid rgba(76, 145, 214, 0.22);
  background: linear-gradient(135deg, #eff8ff, #fffdf4);
  box-shadow: 0 8px 20px rgba(54, 113, 177, 0.1);
}

.scope-task-guidance > span:last-child {
  display: grid;
  gap: 3px;
}

.scope-task-guidance strong {
  color: #23558b;
  font-size: 0.92rem;
}

.scope-task-guidance small {
  color: #526b86;
  font-size: 0.82rem;
  line-height: 1.55;
}

.scope-task-guidance-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 1.2rem;
  box-shadow: 0 5px 12px rgba(54, 113, 177, 0.1);
}

.scope-task-guidance-action {
  width: fit-content;
  min-height: 34px;
  margin-top: 5px;
  padding: 7px 12px;
  border-color: rgba(63, 124, 198, 0.28);
  color: #245b9d;
  background: linear-gradient(135deg, #edf7ff, #fffdf2);
  box-shadow: 0 7px 16px rgba(54, 113, 177, 0.12);
  font-size: 0.8rem;
}

.scope-task-guidance--needs-new-unit {
  border-color: rgba(221, 158, 46, 0.3);
  background: linear-gradient(135deg, #fff8dc, #fff3eb);
}

.scope-task-guidance--needs-new-unit strong {
  color: #8a5a12;
}

.scope-task-guidance--needs-more-words {
  border-color: rgba(102, 141, 216, 0.28);
  background: linear-gradient(135deg, #f0f6ff, #f6f1ff);
}

.scope-task-guidance--not-counted {
  border-color: rgba(118, 87, 200, 0.24);
  background: linear-gradient(135deg, #f5f1ff, #f1f8ff);
}

.scope-task-guidance--not-counted strong {
  color: #5d429d;
}

.scope-task-guidance--ready {
  border-color: rgba(75, 171, 119, 0.28);
  background: linear-gradient(135deg, #ecfbf3, #fffbea);
}

.scope-task-guidance--ready strong {
  color: #216e48;
}

.mastery-energy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 18px;
  border: 1px solid rgba(83, 173, 118, 0.22);
  background: linear-gradient(135deg, #eefcf3, #fffbea);
}

.mastery-energy-note > span:last-child {
  display: grid;
  gap: 3px;
}

.mastery-energy-note strong {
  color: #216e48;
  font-size: 0.92rem;
}

.mastery-energy-note small {
  color: #526b60;
  font-size: 0.82rem;
  line-height: 1.55;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 2px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: #fff;
}

input:focus,
select:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(59, 111, 216, 0.16);
}

.muted {
  color: var(--muted);
}

.notice {
  margin-bottom: 18px;
  padding: 13px 16px;
  border-radius: 14px;
  background: #fff2c7;
}

.offline-friendly-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(83, 173, 118, 0.28);
  background: linear-gradient(135deg, #effcf3, #fff8dc);
  text-align: left;
}

.offline-friendly-notice > span {
  font-size: 1.75rem;
}

.offline-friendly-notice strong,
.offline-friendly-notice small {
  display: block;
}

.offline-friendly-notice small {
  margin-top: 2px;
  color: var(--muted);
}

.recovery-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 2px solid rgba(59, 111, 216, 0.18);
  background: linear-gradient(135deg, #e8f3ff, #f4ecff);
  box-shadow: 0 10px 24px rgba(74, 111, 190, 0.12);
  text-align: left;
}

.recovery-notice strong,
.recovery-notice small {
  display: block;
}

.recovery-notice small {
  margin-top: 2px;
  color: var(--muted);
}

.recovery-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 14px;
  background: #fff;
  font-size: 1.35rem;
  box-shadow: 0 7px 16px rgba(59, 111, 216, 0.14);
  animation: recovery-float 2.2s ease-in-out infinite;
}

@keyframes recovery-float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-4px) rotate(3deg); }
}

.answer-feedback.correct {
  background: #dff7e8;
}

.answer-feedback.incorrect {
  background: #ffe3e3;
}

.hidden {
  display: none !important;
}

.practice-card {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.meaning-prompt {
  margin: 28px 0 8px;
  color: var(--ink) !important;
  font-size: clamp(1.75rem, 5vw, 3.15rem);
  font-weight: 900;
}

.word-slots {
  margin: 28px auto;
  padding: 24px;
  border: 2px dashed #b8c7de;
  border-radius: 22px;
  background: #f5f8fd;
}

.word-slots .stage-label {
  display: block;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.word-slots strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--blue-dark);
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(2rem, 8vw, 4.8rem);
  letter-spacing: 0.08em;
}

.answer-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  max-width: 650px;
  margin: 0 auto 18px;
}

.answer-form input {
  min-height: 54px;
  font-size: 1.15rem;
}

.exit-save-note {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.answer-entry {
  position: relative;
}

.answer-entry input {
  padding-right: 58px;
}

.answer-input.correct {
  border-color: #28a461;
  background: #f0fbf4;
}

.answer-input.incorrect {
  border-color: var(--red);
  background: #fff3f3;
}

.answer-result {
  position: absolute;
  top: 50%;
  right: 15px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 900;
  transform: translateY(-50%);
}

.answer-result.correct {
  background: #28a461;
}

.answer-result.incorrect {
  background: var(--red);
}

.study-detail-panel {
  display: grid;
  gap: 12px;
  margin: 22px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, #f8fbff, #fff);
}

.study-detail-panel .section-heading {
  margin-bottom: 2px;
}

.study-detail-card {
  display: grid;
  gap: 9px;
  padding: 14px 16px;
  border: 1px solid rgba(59, 111, 216, 0.14);
  border-radius: 15px;
  background: #fff;
}

.study-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.study-detail-head > div {
  display: grid;
  gap: 3px;
}

.study-detail-head small,
.study-detail-result {
  color: var(--muted);
}

.study-detail-result {
  margin: 0;
}

.study-detail-word-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.study-detail-word-row ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.study-detail-word-row li {
  display: inline-flex;
  gap: 5px;
  align-items: baseline;
}

.study-detail-word-row small {
  color: var(--muted);
}

.study-detail-contribution {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  padding: 9px 11px;
  border-radius: 11px;
  background: #fff8dd;
  color: #6a511d;
}

.study-detail-legacy {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.older-study-details {
  margin-top: 4px;
}

.older-study-details summary {
  padding: 11px 14px;
  border-radius: 12px;
  background: #eef5ff;
  color: var(--blue);
  cursor: pointer;
  font-weight: 700;
}

.study-detail-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.review-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 24px;
  padding: 0;
  list-style: none;
}

.section-action {
  margin: 10px 0 14px;
}

.review-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.task-calendar-panel {
  margin-top: 18px;
}

.calendar-weekdays,
.task-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: 44px minmax(150px, 1fr) 44px auto;
  align-items: center;
  gap: 10px;
}

.calendar-toolbar h3 {
  margin: 0;
  text-align: center;
}

.month-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0;
}

.month-summary-title {
  margin: 18px 0 0;
  text-align: center;
}

.month-summary div {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(145deg, #f8fbff, #fff);
  text-align: center;
}

.month-summary span,
.month-summary strong {
  display: block;
}

.month-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.month-summary strong {
  margin-top: 5px;
  color: var(--blue-dark);
  font-size: 1.35rem;
}

.month-empty {
  margin: 12px 0 0;
  color: var(--muted);
  text-align: center;
}

.calendar-weekdays {
  margin: 16px 0 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
  text-align: center;
}

.calendar-day {
  min-height: 74px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.calendar-day:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(39, 72, 132, 0.1);
}

.calendar-day.has-tasks {
  border-color: #81d8a4;
  background: linear-gradient(145deg, #effcf4, #dff7e8);
}

.calendar-day.growing {
  border-color: #f4cf72;
  background: linear-gradient(145deg, #fff9e9, #fff2c7);
}

.calendar-day.outside {
  opacity: 0.38;
}

.calendar-day.today {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 111, 216, 0.14);
}

.calendar-day span,
.calendar-day strong,
.calendar-day small {
  display: block;
}

.calendar-day strong {
  margin-top: 6px;
  color: var(--blue-dark);
}

.calendar-day small {
  color: var(--muted);
}

.calendar-day.has-tasks strong {
  color: #176b3a;
}

.calendar-day.growing strong {
  color: #956716;
}

.calendar-day.quiet {
  background: #fbfcff;
}

.calendar-day .calendar-quiet-mark {
  margin-top: 8px;
  color: #9aa7bb;
  font-size: 0.72rem;
  font-weight: 800;
}

.task-badge {
  display: inline-block;
  margin: 3px 5px 3px 0;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: #eef2f7;
  font-size: 0.78rem;
  font-weight: 800;
}

.task-badge.done {
  color: #176b3a;
  background: #dff7e8;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  background: #f4f7fb;
  font-size: 0.84rem;
}

tr:last-child td {
  border-bottom: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sound-toggle {
  min-height: 42px;
  padding: 8px 13px;
  border: 0;
  border-radius: 999px;
  color: var(--blue-dark);
  background: #eaf1ff;
  font-weight: 800;
  box-shadow: 0 7px 18px rgba(59, 111, 216, 0.12);
}

.sound-toggle[aria-pressed="false"] {
  color: var(--muted);
  background: #edf1f5;
}

.practice-card {
  position: relative;
}

.feedback-burst {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  max-width: 650px;
  margin: 0 auto 20px;
  padding: 16px 18px;
  overflow: hidden;
  border: 2px solid #a8dfbe;
  border-radius: 22px;
  text-align: left;
  background: linear-gradient(135deg, #effcf4, #fff9d9);
  box-shadow: 0 14px 32px rgba(57, 169, 120, 0.17);
  animation: feedback-pop 360ms cubic-bezier(.2, .9, .25, 1.25);
  cursor: pointer;
}

.feedback-burst button,
.feedback-burst a {
  cursor: pointer;
}

.feedback-burst.incorrect {
  border-color: #f1c6a6;
  background: linear-gradient(135deg, #fff8ed, #fff1e8);
  box-shadow: 0 14px 32px rgba(224, 138, 77, 0.15);
}

.feedback-burst--milestone {
  border-color: #7dcdf5;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 213, 92, 0.28), transparent 30%),
    linear-gradient(135deg, #eef9ff, #fff8d8);
  box-shadow: 0 16px 38px rgba(55, 151, 213, 0.22);
  animation: feedback-pop 360ms cubic-bezier(.2, .9, .25, 1.25), milestone-glow 1.2s ease-in-out infinite alternate;
}

.feedback-burst--milestone .feedback-icon {
  box-shadow: 0 0 0 5px rgba(255, 211, 88, 0.2), 0 10px 24px rgba(65, 145, 211, 0.2);
}

.feedback-burst--milestone .feedback-encouragement strong {
  color: #1e5fa8;
}

.feedback-burst--milestone .feedback-countdown > span {
  background: linear-gradient(90deg, #7fb1ff, #3b6fd8);
}

.feedback-burst--first-step {
  border-color: rgba(255, 177, 70, 0.42);
  background: linear-gradient(135deg, #fff4d6, #ffe7f0 58%, #eef6ff);
  box-shadow: 0 16px 38px rgba(238, 151, 55, 0.16);
}

.feedback-burst--first-step .feedback-icon {
  background: linear-gradient(145deg, #ffe38c, #ff9f70);
  box-shadow: 0 12px 26px rgba(239, 135, 58, 0.22);
}

.feedback-burst--confidence-shield {
  border-color: rgba(91, 157, 218, 0.5);
  background:
    radial-gradient(circle at 15% 18%, rgba(118, 202, 255, 0.26), transparent 30%),
    linear-gradient(135deg, #eef8ff, #fff8df);
  box-shadow: 0 16px 38px rgba(72, 145, 204, 0.18);
}

.feedback-burst--confidence-shield .feedback-icon {
  background: linear-gradient(145deg, #dff4ff, #fff1b8);
  box-shadow: 0 12px 26px rgba(66, 143, 205, 0.2);
}

.feedback-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 2.15rem;
  animation: feedback-icon-pop 520ms cubic-bezier(.2, .9, .25, 1.3);
}

.feedback-companion {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 152px;
  padding: 8px 11px;
  border: 1px solid rgba(42, 145, 95, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 18px rgba(38, 125, 83, 0.1);
  animation: companion-arrive 520ms cubic-bezier(.2, .9, .25, 1.2) both;
}

.feedback-companion.incorrect {
  border-color: rgba(213, 126, 67, 0.2);
  box-shadow: 0 8px 18px rgba(190, 111, 56, 0.1);
}

.feedback-companion-mascot {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff4b8, #dff7ff);
  font-size: 1.55rem;
  animation: companion-float 1.8s ease-in-out infinite;
}

.feedback-companion > span:last-child {
  display: grid;
  gap: 1px;
}

.feedback-companion strong {
  color: #24734c;
  font-size: 0.88rem;
}

.feedback-companion.incorrect strong {
  color: #a9572f;
}

.feedback-companion small {
  color: var(--muted);
  font-size: 0.73rem;
  white-space: nowrap;
}

.feedback-encouragement {
  display: grid;
  gap: 3px;
  font-size: 1.05rem;
}

.feedback-encouragement strong {
  color: #18764a;
  font-size: 1.22rem;
}

.feedback-burst.incorrect .feedback-encouragement strong {
  color: #b75b2e;
}

.feedback-encouragement span {
  color: var(--muted);
}

.correction-guide {
  display: grid;
  gap: 9px;
  margin-top: 5px;
  padding: 12px 14px;
  border: 1px solid rgba(57, 169, 120, 0.22);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.78);
}

.correction-guide strong {
  color: #216b48;
  font-size: 0.92rem;
}

.correction-word {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.correction-letter {
  display: grid;
  min-width: 31px;
  height: 36px;
  padding: 0 7px;
  place-items: center;
  border: 2px solid #b8d8c8;
  border-radius: 10px;
  color: #285f49;
  background: #effaf4;
  font-size: 1.12rem;
  font-weight: 900;
  text-transform: lowercase;
}

.correction-letter.changed {
  border-color: #f0bd43;
  color: #7a4c00;
  background: linear-gradient(145deg, #fff3b9, #fff9df);
  box-shadow: 0 6px 15px rgba(226, 169, 43, 0.18);
  animation: correction-letter-glow 680ms ease-in-out infinite alternate;
  animation-delay: calc(var(--letter-index) * 75ms);
}

.correction-audio {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.correction-listen {
  min-height: 36px;
  padding: 7px 12px;
  border-color: rgba(57, 169, 120, 0.28);
  color: #216b48;
  background: linear-gradient(135deg, #effcf4, #fff);
  box-shadow: 0 7px 16px rgba(57, 169, 120, 0.12);
  animation: correction-audio-pulse 1.8s ease-in-out infinite;
}

@keyframes correction-audio-pulse {
  0%, 100% { box-shadow: 0 7px 16px rgba(57, 169, 120, 0.12); }
  50% { box-shadow: 0 9px 22px rgba(57, 169, 120, 0.22); }
}

@keyframes correction-letter-glow {
  from { transform: translateY(0) scale(1); filter: brightness(1); }
  to { transform: translateY(-2px) scale(1.06); filter: brightness(1.08); }
}

.confetti-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.confetti-sparks span {
  position: absolute;
  top: calc(12px + (var(--spark-index) % 2) * 28px);
  left: calc(4% + var(--spark-index) * 12%);
  color: #f1b51d;
  font-size: 0.75rem;
  animation: confetti-float 900ms ease-out both;
  animation-delay: calc(var(--spark-index) * 35ms);
}

@keyframes milestone-glow {
  from {
    box-shadow: 0 16px 38px rgba(55, 151, 213, 0.22);
  }
  to {
    box-shadow: 0 18px 46px rgba(255, 190, 55, 0.3);
  }
}

.answer-result {
  animation: answer-badge-pop 380ms cubic-bezier(.2, .9, .25, 1.35);
}

.celebration-card {
  position: relative;
  max-width: 850px;
  overflow: hidden;
  border: 2px solid #f2d47d;
  border-radius: 32px;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 216, 107, 0.32), transparent 26%),
    radial-gradient(circle at 84% 12%, rgba(118, 87, 200, 0.16), transparent 24%),
    linear-gradient(155deg, #fffdf5, #f2f7ff);
  box-shadow: 0 24px 60px rgba(65, 83, 123, 0.18);
  animation: celebration-arrive 520ms cubic-bezier(.2, .9, .25, 1.12);
}

.celebration-card--perfect {
  border-color: #77d7ff;
  background:
    radial-gradient(circle at 18% 16%, rgba(84, 201, 255, 0.28), transparent 28%),
    radial-gradient(circle at 84% 12%, rgba(118, 87, 200, 0.2), transparent 25%),
    linear-gradient(155deg, #f3fcff, #f7f2ff);
  box-shadow: 0 26px 70px rgba(50, 132, 217, 0.22);
}

.celebration-burst {
  margin: -6px 0 8px;
  color: var(--yellow);
  font-size: clamp(1.45rem, 5vw, 2.45rem);
  letter-spacing: 0.38em;
  animation: medal-shine 1.8s ease-in-out infinite;
}

.achievement-medal {
  display: grid;
  width: 112px;
  height: 112px;
  margin: 6px auto 18px;
  place-items: center;
  border: 8px solid #fff0ae;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffd86b, #ff9d58);
  box-shadow: 0 18px 36px rgba(226, 151, 42, 0.28);
  font-size: 3.85rem;
  animation: medal-shine 1.8s ease-in-out infinite;
}

.celebration-message {
  max-width: 600px;
  margin: -4px auto 24px;
  color: var(--muted);
  font-size: 1.08rem;
}

.task-award-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: -8px auto 22px;
}

.task-award {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 2px solid rgba(242, 190, 67, 0.55);
  border-radius: 999px;
  color: #7b5512;
  background: linear-gradient(135deg, #fff8cf, #fffdf4);
  box-shadow: 0 8px 20px rgba(218, 164, 38, 0.14);
  animation: feedback-icon-pop 520ms cubic-bezier(.2, .9, .25, 1.3);
}

.task-award span {
  font-size: 1.25rem;
}

.weekly-reward-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 660px;
  margin: -8px auto 22px;
  padding: 15px 18px;
  border: 2px solid rgba(242, 190, 67, 0.65);
  border-radius: 18px;
  text-align: left;
  background: linear-gradient(135deg, #fff7c9, #fffdf4);
  box-shadow: 0 12px 28px rgba(218, 164, 38, 0.18);
  animation: celebration-arrive 520ms cubic-bezier(.2, .9, .25, 1.12);
}

.weekly-reward-banner > span {
  font-size: 2.15rem;
}

.weekly-reward-banner p {
  margin: 3px 0 0;
  color: var(--muted);
}

.personal-best-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 660px;
  margin: -8px auto 22px;
  padding: 15px 18px;
  border: 2px solid rgba(80, 132, 221, 0.38);
  border-radius: 18px;
  text-align: left;
  background: linear-gradient(135deg, #eaf3ff, #fff);
  box-shadow: 0 12px 28px rgba(66, 117, 197, 0.15);
  animation: celebration-arrive 520ms cubic-bezier(.2, .9, .25, 1.12);
}

.personal-best-banner > span {
  font-size: 2.15rem;
}

.personal-best-banner strong {
  display: block;
  margin: 2px 0;
  color: var(--blue-dark);
}

.personal-best-banner p {
  margin: 3px 0 0;
  color: var(--muted);
}

.personal-best-banner--new {
  border-color: rgba(235, 164, 43, 0.56);
  background: linear-gradient(135deg, #fff1b7, #fff9e8);
  box-shadow: 0 12px 28px rgba(216, 151, 33, 0.18);
}

.personal-best-banner--new strong {
  color: #916012;
}

.personal-best-banner--first,
.personal-best-banner--tie {
  border-color: rgba(78, 173, 126, 0.38);
  background: linear-gradient(135deg, #e8faef, #fff);
}

.personal-best-banner--first strong,
.personal-best-banner--tie strong {
  color: #27714f;
}

.mastered-word-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 700px;
  margin: -8px auto 22px;
  padding: 15px 18px;
  border: 2px solid rgba(137, 112, 255, 0.38);
  border-radius: 18px;
  text-align: left;
  background: linear-gradient(135deg, #f1edff, #fff);
  box-shadow: 0 12px 28px rgba(102, 79, 194, 0.14);
  animation: celebration-arrive 520ms cubic-bezier(.2, .9, .25, 1.12);
}

.mastered-word-banner > span {
  font-size: 2.15rem;
}

.mastered-word-banner .mastered-word-stars {
  margin-top: 8px;
}

.celebration-stat {
  border: 2px solid rgba(57, 169, 120, 0.2);
  background: #effcf4;
}

.next-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 650px;
  margin: 22px auto;
  padding: 15px 18px;
  border: 1px solid #d9c9ff;
  border-radius: 18px;
  text-align: left;
  background: #f5f0ff;
}

.growth-rule-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid rgba(94, 157, 216, 0.22);
  border-radius: 18px;
  color: #315d88;
  background: linear-gradient(135deg, #eef7ff, #f8fbff);
}

.growth-rule-note > span {
  font-size: 1.55rem;
  line-height: 1;
}

.growth-rule-note strong {
  display: block;
  margin-bottom: 4px;
  color: #234d77;
}

.growth-rule-note p {
  margin: 0;
  color: #4b7298;
  font-size: 0.9rem;
  line-height: 1.65;
}

.next-task-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  max-width: 720px;
  margin: 20px auto;
  padding: 17px 19px;
  border: 1px solid #b9d2ff;
  border-radius: 20px;
  text-align: left;
  background: linear-gradient(135deg, #edf5ff, #fff);
  box-shadow: 0 12px 28px rgba(59, 111, 216, 0.12);
}

.next-task-card--complete {
  border-color: #f0cf6b;
  background: linear-gradient(135deg, #fff8d9, #fff);
}

.next-task-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 17px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(32, 48, 71, 0.07);
  font-size: 2rem;
}

.next-task-copy strong,
.next-task-copy p {
  display: block;
}

.next-task-copy p {
  margin: 4px 0 9px;
  color: var(--muted);
}

.next-badge-icon {
  font-size: 2rem;
}

.next-badge p {
  margin: 3px 0 0;
  color: var(--muted);
}

.achievement-unlock-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 650px;
  margin: 18px auto;
  padding: 17px 19px;
  border: 2px solid #f1c653;
  border-radius: 20px;
  text-align: left;
  background: linear-gradient(135deg, #fff8d7, #fff);
  box-shadow: 0 14px 32px rgba(224, 170, 36, 0.18);
  animation: celebration-arrive 520ms cubic-bezier(.2, .9, .25, 1.12);
}

.achievement-unlock-banner > span {
  font-size: 2.35rem;
}

.achievement-unlock-banner strong,
.achievement-unlock-banner p {
  display: block;
}

.achievement-unlock-banner p {
  margin: 4px 0 0;
  color: var(--muted);
}

.level-up-banner {
  border-color: #9ec7ff;
  background: linear-gradient(135deg, #eaf4ff, #fff);
}

.task-badge.done {
  color: #176b3a;
  background: linear-gradient(135deg, #dff7e8, #fff4b7);
  box-shadow: 0 6px 16px rgba(57, 169, 120, 0.12);
}

@keyframes feedback-pop {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes feedback-icon-pop {
  0% { opacity: 0; transform: scale(0.35) rotate(-14deg); }
  70% { transform: scale(1.12) rotate(5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes companion-arrive {
  from { opacity: 0; transform: translateX(12px) scale(0.88); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes answer-badge-pop {
  from { opacity: 0; transform: translateY(-50%) scale(0.25); }
  to { opacity: 1; transform: translateY(-50%) scale(1); }
}

@keyframes confetti-float {
  0% { opacity: 0; transform: translateY(22px) rotate(0deg) scale(0.6); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-34px) rotate(150deg) scale(1.1); }
}

@keyframes celebration-arrive {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes medal-shine {
  0%, 100% { transform: rotate(-2deg) scale(1); filter: brightness(1); }
  50% { transform: rotate(2deg) scale(1.035); filter: brightness(1.08); }
}

@keyframes streak-glow {
  0%, 100% { transform: translateY(0) rotate(-2deg); box-shadow: 0 10px 22px rgba(213, 139, 38, 0.16); }
  50% { transform: translateY(-3px) rotate(2deg); box-shadow: 0 15px 28px rgba(239, 165, 39, 0.26); }
}

@keyframes weekly-chest-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-5px) rotate(2deg); }
}

@keyframes weekly-reward-burst {
  0% { transform: scale(1); filter: brightness(1); }
  45% { transform: scale(1.025); filter: brightness(1.1); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes weekly-chest-burst {
  0% { transform: scale(1) rotate(-1deg); }
  45% { transform: scale(1.18) rotate(5deg); }
  100% { transform: scale(1) rotate(-1deg); }
}

@keyframes mastered-star-arrive {
  from { opacity: 0; transform: translateY(8px) scale(0.82); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes companion-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-7px) rotate(2deg); }
}

/* ===== 单元掌握度卡片选择 ===== */
.field--full {
  grid-column: 1 / -1;
}

.unit-field {
  gap: 12px;
}

.unit-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.unit-field-label {
  font-size: 0.95rem;
  font-weight: 800;
}

.unit-field-label small {
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--blue-dark);
  background: #e9f1ff;
  font-weight: 800;
  font-size: 0.8rem;
}

.unit-field-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 6px;
  border-radius: 50%;
}

.legend-dot--done {
  background: #c3ccd9;
}

.legend-dot--todo {
  background: var(--blue);
}

.unit-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 12px;
}

.unit-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 14px 14px 12px;
  border: 2px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.unit-card:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: #b9cdf0;
  box-shadow: 0 10px 24px rgba(32, 48, 71, 0.1);
}

.unit-card.is-selected {
  border-color: var(--blue);
  background: linear-gradient(160deg, #f2f7ff, #ffffff 72%);
  box-shadow: 0 10px 24px rgba(59, 111, 216, 0.16), 0 0 0 4px rgba(59, 111, 216, 0.1);
}

.unit-card.is-complete {
  color: #7b8798;
  background: #f3f5f9;
  border-color: #e3e8f0;
}

.unit-card.is-complete .unit-card-top strong,
.unit-card.is-complete .unit-card-title {
  color: #8a95a5;
}

.unit-card.is-complete .unit-card-track > span {
  background: #c8d0dc;
}

.unit-card.is-complete .unit-card-percent {
  color: #9aa4b3;
}

.unit-card.is-selected .unit-card-badge {
  color: var(--blue-dark);
  background: #dbe9ff;
}

.unit-card.is-complete.is-selected {
  border-color: #a7b6cd;
  box-shadow: 0 0 0 4px rgba(122, 137, 160, 0.14);
}

.unit-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.unit-card-top strong {
  font-size: 1rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.unit-card-title {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unit-card-track {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef6;
}

.unit-card-track > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7fb1ff, var(--blue));
  transition: width 300ms ease;
}

.unit-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.unit-card-meta > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.unit-card-percent {
  color: var(--blue-dark);
  font-weight: 800;
}

.unit-card-badge {
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: #eef3fb;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.unit-card-badge--done {
  color: #2f8f62;
  background: #e7f7ee;
}

.unit-card-badge--new {
  color: #9a6b00;
  background: #fff4d9;
}

.unit-card-flag {
  position: absolute;
  top: -9px;
  left: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 0.68rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(59, 111, 216, 0.35);
}

.unit-field-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

/* ===== 反馈停留倒计时与继续按钮 ===== */
.feedback-countdown {
  grid-column: 1 / -1;
  height: 5px;
  margin-top: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(32, 48, 71, 0.08);
}

.feedback-countdown > span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7ddfae, #4fc38a);
  animation-name: feedback-countdown-shrink;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.feedback-burst.incorrect .feedback-countdown > span {
  background: linear-gradient(90deg, #ffcf9c, #f2a467);
}

.feedback-burst--hold .feedback-countdown {
  display: none;
}

.feedback-burst--paused {
  border-color: rgba(102, 133, 178, 0.42);
  box-shadow: 0 14px 32px rgba(69, 105, 158, 0.14);
}

.feedback-pause-hint,
.feedback-paused-state {
  justify-self: center;
  padding: 5px 10px;
  border-radius: 999px;
  color: #526b8f;
  background: rgba(255, 255, 255, 0.74);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
}

.feedback-paused-state {
  grid-column: 1 / -1;
  color: #375b8d;
  background: #eaf2ff;
}

@keyframes feedback-countdown-shrink {
  from { width: 100%; }
  to { width: 0%; }
}

.feedback-actions {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.feedback-actions .button {
  min-width: 132px;
}

.feedback-actions > span {
  color: var(--muted);
  font-size: 0.78rem;
}

/* ===== 答题提交按钮 ===== */
.answer-form {
  grid-template-columns: 1fr;
}

.answer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.answer-actions .submit-answer {
  flex: 1 1 200px;
}

.answer-hint {
  margin-top: -6px;
  text-align: center;
}

.answer-hint--warn {
  color: #c46a1c;
  font-weight: 700;
}

#practice-answer {
  scroll-margin-bottom: 42vh;
}

/* ===== 语音自检 ===== */
.speech-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fbff;
}

.speech-status.is-warning {
  border-color: #f0d4a8;
  background: #fffaf0;
}

.speech-status-icon {
  font-size: 1.4rem;
}

.speech-status strong {
  display: block;
  font-size: 0.95rem;
}

.speech-status small {
  color: var(--muted);
  font-size: 0.78rem;
}

.speech-voice-list {
  display: grid;
  gap: 6px;
  max-height: 200px;
  margin: 12px 0 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.speech-voice-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #f7f9fc;
  font-size: 0.82rem;
}

.speech-attempt {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-left: 4px solid var(--accent, #2f7dd1);
  border-radius: 10px;
  background: #f2f7fd;
  color: #22415f;
  font-size: 0.86rem;
  line-height: 1.6;
}

.speech-attempt:empty {
  display: none;
}

.speech-attempt.is-warning {
  border-left-color: #e2a03f;
  background: #fff8ec;
  color: #7a5313;
}

.speech-attempt.is-ok {
  border-left-color: #3aa76d;
  background: #f1faf4;
  color: #1f5c3d;
}

.speech-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 90;
  display: block;
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(23, 43, 68, 0.94);
  color: #fff;
  font-size: 0.86rem;
  line-height: 1.55;
  box-shadow: 0 12px 30px rgba(15, 32, 54, 0.28);
  opacity: 0;
  transform: translate(-50%, 14px);
  transition: opacity 0.24s ease, transform 0.24s ease;
  pointer-events: none;
}

.speech-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 640px) {
  .speech-toast {
    bottom: 84px;
    font-size: 0.84rem;
  }
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--muted);
  background: #f7f9fc;
  font-size: 0.82rem;
  cursor: pointer;
}

.switch-row input {
  width: 18px;
  height: 18px;
  flex: none;
}

@media (max-width: 680px) {
  .app-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 18px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    align-items: flex-end;
    flex-direction: column;
  }

  .profile-chip {
    max-width: 135px;
  }

  .view {
    padding-top: 24px;
  }

  .hero-companion-row {
    align-items: flex-start;
    gap: 14px;
  }

  .hero-mascot {
    flex-basis: 78px;
    width: 78px;
    height: 78px;
    border-radius: 24px;
    font-size: 2.9rem;
  }

  .home-intro-strip {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }

  .home-intro-strip .hero-mascot {
    flex-basis: 68px;
    width: 68px;
    height: 68px;
    font-size: 2.55rem;
  }

  .section-heading {
    flex-direction: column;
  }

  .paused-session-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .paused-session-card .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }

  .daily-victory-banner {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 18px;
  }

  .daily-victory-score {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
  }

  .daily-victory-score span {
    display: inline;
  }

  .mastery-progress-list {
    grid-template-columns: 1fr;
  }

  .study-streak-card,
  .home-next-task,
  .weekly-reward-card,
  .mastered-constellation-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .study-streak-copy {
    flex-basis: calc(100% - 80px);
  }

  .study-week {
    grid-template-columns: repeat(7, minmax(30px, 1fr));
  }

  .study-streak-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .home-next-task .button {
    width: 100%;
  }

  .weekly-reward-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .mastered-constellation-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .personal-best-home {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .personal-best-home-scores {
    grid-column: 1 / -1;
  }

  .personal-best-home-scores > div {
    flex: 1;
    min-width: 0;
  }

  .mastered-constellation-card .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .reignite-callout {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .reignite-callout .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .weekly-reward-card .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .weekly-reward-banner {
    align-items: flex-start;
  }

  .personal-best-banner {
    align-items: flex-start;
  }

  .mastered-word-banner {
    align-items: flex-start;
  }

  .achievement-grid {
    grid-template-columns: 1fr;
  }

  .level-chip,
  .level-result-card {
    max-width: none;
  }

  .module-card {
    min-height: 0;
  }

  .answer-form {
    grid-template-columns: 1fr;
  }

  .answer-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .answer-actions .button {
    width: 100%;
  }

  .answer-actions .submit-answer {
    flex: 1 1 auto;
    min-height: 56px;
    font-size: 1.05rem;
  }

  .answer-actions .hint-answer {
    min-height: 44px;
    border: 1px dashed var(--line);
    color: var(--muted);
    background: transparent;
    box-shadow: none;
    font-size: 0.92rem;
  }

  .unit-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .unit-card {
    padding: 10px 10px 9px;
    gap: 6px;
    border-radius: 14px;
  }

  .unit-card-top strong {
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .unit-card-badge:not(.unit-card-badge--done):not(.unit-card-badge--new) {
    display: none;
  }

  .unit-card-title {
    font-size: 0.73rem;
  }

  .unit-card-meta {
    font-size: 0.66rem;
    white-space: nowrap;
  }

  .unit-field-legend {
    display: none;
  }

  .practice-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      'count combo'
      'round round';
    gap: 6px 10px;
  }

  .practice-topbar .practice-round {
    justify-self: start;
    font-size: 0.78rem;
  }

  .practice-topbar .practice-count {
    white-space: nowrap;
  }

  .practice-topbar .combo-meter {
    min-width: 0;
    justify-self: end;
    gap: 5px;
    padding: 5px 8px;
    font-size: 0.78rem;
  }

  .practice-topbar .combo-track {
    width: 32px;
  }

  .practice-topbar .combo-next {
    display: none;
  }

  .feedback-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .feedback-actions .button {
    width: 100%;
    min-height: 50px;
  }

  .feedback-actions > span {
    text-align: center;
  }

  .practice-progress-panel {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      'copy rounds'
      'track track';
    gap: 7px 10px;
    margin: 8px 0 12px;
    padding: 9px 12px;
  }

  .practice-progress-copy {
    grid-area: copy;
    font-size: 0.8rem;
  }

  .practice-progress-panel .progress-track {
    grid-area: track;
    height: 8px;
  }

  .practice-progress-panel .prompt-rounds {
    grid-area: rounds;
    flex-wrap: nowrap;
    justify-content: flex-end;
    margin: 0;
  }

  .practice-progress-panel .prompt-round {
    width: 24px;
    height: 24px;
    font-size: 0.78rem;
  }

  .practice-progress-panel .prompt-rounds small {
    display: none;
  }

  .meaning-prompt {
    margin: 14px 0 4px;
  }

  .word-slots {
    margin: 14px auto;
    padding: 14px;
  }

  .word-slots-head {
    gap: 8px;
    margin-bottom: 10px;
  }

  .word-slots .stage-label {
    font-size: 0.82rem;
  }

  .word-audio {
    gap: 6px;
  }

  .word-audio .icon-button {
    width: 40px;
    height: 40px;
    font-size: 1.05rem;
  }

  .recovery-notice {
    align-items: flex-start;
    text-align: left;
  }

  .offline-friendly-notice {
    align-items: flex-start;
  }

  .prompt-rounds {
    justify-content: center;
    flex-wrap: wrap;
  }

  .prompt-rounds small {
    flex-basis: 100%;
    margin: 4px 0 0;
    text-align: center;
  }

  .calendar-day {
    min-height: 58px;
    padding: 6px;
    font-size: 0.85rem;
  }

  .calendar-toolbar {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }

  .calendar-toolbar .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .month-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feedback-burst {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .feedback-icon {
    margin: 0 auto;
  }

  .correction-audio {
    flex-direction: column;
    gap: 6px;
  }

  .feedback-companion {
    justify-self: center;
    margin-top: 2px;
  }

  .celebration-card {
    border-radius: 24px;
  }

  .next-badge {
    align-items: flex-start;
  }

  .next-task-card,
  .next-task-card--complete {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .next-task-icon {
    margin: 0 auto;
  }
}

/* ===== 手机端练习页：沉浸式固定布局，避免虚拟键盘把页面推来推去 ===== */
@media (max-width: 680px) {
  body.in-practice {
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.in-practice .app-shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100dvh;
    padding: 0;
  }

  /* 键盘展开后才改用 visualViewport 的实测高度，平时交给 100dvh 自动适配地址栏 */
  body.in-practice.is-keyboard .app-shell {
    height: var(--vvh, 100dvh);
  }

  body.in-practice .topbar,
  body.in-practice .main-nav {
    display: none;
  }

  body.in-practice #app-main {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
  }

  body.in-practice .view[hidden] {
    display: none;
  }

  body.in-practice .view:not([hidden]) {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    padding: 0;
    overflow: hidden;
  }

  body.in-practice .view > * {
    flex: 0 0 auto;
  }

  body.in-practice .view > .practice-card {
    flex: 1 1 auto;
    min-height: 0;
  }

  body.in-practice .practice-card {
    display: flex;
    flex-direction: column;
    max-width: none;
    margin: 0;
    padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    text-align: center;
  }

  body.in-practice .practice-topbar,
  body.in-practice .practice-progress-panel {
    flex: 0 0 auto;
  }

  body.in-practice .practice-stage {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.in-practice .answer-dock {
    flex: 0 0 auto;
    padding-top: 4px;
  }

  body.in-practice .meaning-prompt {
    margin: 8px 0 2px;
  }

  body.in-practice .word-slots {
    margin: 10px auto;
  }

  body.in-practice .answer-form {
    margin-bottom: 6px;
  }

  body.in-practice .answer-actions {
    flex-direction: row;
    gap: 8px;
  }

  body.in-practice .answer-actions .button {
    width: auto;
    min-height: 50px;
  }

  body.in-practice .answer-actions .submit-answer {
    flex: 2 1 0;
  }

  body.in-practice .answer-actions .hint-answer {
    flex: 1 1 0;
    padding: 0 6px;
    font-size: 0.84rem;
  }

  body.in-practice .answer-hint {
    margin-top: 0;
    font-size: 0.78rem;
  }

  body.in-practice .save-exit,
  body.in-practice .exit-save-note {
    margin-top: 8px;
  }

  body.in-practice .speech-toast {
    top: calc(56px + env(safe-area-inset-top, 0px));
    bottom: auto;
    max-width: min(300px, calc(100vw - 28px));
    padding: 7px 13px;
    font-size: 0.74rem;
    line-height: 1.4;
    text-align: center;
    transform: translate(-50%, -10px);
  }

  body.in-practice .speech-toast.is-visible {
    transform: translate(-50%, 0);
  }

  /* 键盘展开：把纵向空间让给词题和输入框 */
  body.in-practice.is-keyboard .practice-progress-panel,
  body.in-practice.is-keyboard .practice-topbar .practice-round,
  body.in-practice.is-keyboard .answer-hint,
  body.in-practice.is-keyboard .save-exit,
  body.in-practice.is-keyboard .exit-save-note {
    display: none;
  }

  body.in-practice.is-keyboard .practice-topbar {
    grid-template-areas: 'count combo';
  }

  body.in-practice.is-keyboard .meaning-prompt {
    margin: 2px 0 0;
    font-size: clamp(1.35rem, 6vw, 1.85rem);
  }

  body.in-practice.is-keyboard .word-slots {
    margin: 6px auto;
    padding: 10px 12px;
  }

  body.in-practice.is-keyboard .word-slots strong {
    font-size: clamp(1.7rem, 9vw, 2.6rem);
  }

  /* 反馈期间不需要打字：让整页可滚动，卡片按内容撑开 */
  body.in-practice.is-feedback .view {
    overflow-y: auto;
  }

  body.in-practice.is-feedback .view > .practice-card {
    flex: 0 0 auto;
  }

  body.in-practice.is-feedback .practice-stage {
    flex: 0 0 auto;
    overflow: visible;
  }
}

/* ===== 用户密码与用户管理 ===== */
.profile-lock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-lock.is-locked {
  color: #1d4ed8;
  background: #eaf1ff;
}

.profile-lock.is-open {
  color: #b45309;
  background: #fff5e6;
}

.profile-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eaf1ff;
  font-size: 0.68rem;
  font-weight: 800;
  vertical-align: middle;
}

.profile-card.is-unlocking {
  border-color: #9dc0f5;
  box-shadow: 0 14px 30px rgba(29, 78, 216, 0.12);
}

.passcode-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed #c7d8f2;
  border-radius: 16px;
  background: #f8fbff;
}

.field > span {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.passcode-note {
  margin: 0;
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.5;
}

.passcode-error {
  display: none;
  margin: 0;
  color: #b91c1c;
  font-size: 0.82rem;
  font-weight: 700;
}

.passcode-error.is-visible {
  display: block;
}

.passcode-error:not(:empty) {
  display: block;
}

.profile-privacy-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.8rem;
}

.manage-panel .manage-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.manage-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fbfdff;
}

.manage-row.is-managing {
  border-color: #f0b6b6;
  background: #fff9f9;
}

.manage-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.manage-row-main small {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
}

.manage-row .passcode-form {
  margin-top: 0;
  border-style: solid;
  border-color: #e6ecf5;
  background: #fff;
}

@media (max-width: 680px) {
  .passcode-form {
    padding: 12px;
  }

  .manage-row {
    padding: 12px;
  }

  .manage-row .button-row {
    gap: 8px;
  }

  .manage-row .button-row .button {
    flex: 0 1 auto;
    padding: 0 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .confetti-sparks {
    display: none;
  }
}

.home-wallet-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(74, 100, 139, 0.18);
}

.home-wallet-strip small {
  flex: 1 1 260px;
  color: var(--muted);
  line-height: 1.55;
}

.coin-balance {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid rgba(214, 151, 36, 0.32);
  border-radius: 999px;
  color: #815212;
  background: linear-gradient(135deg, #fff5c9, #ffe8a4);
  font-weight: 900;
  white-space: nowrap;
}

.coin-balance strong {
  color: #5d3507;
  font-size: 1.2rem;
}

.home-focus-section {
  margin: 22px 0;
  padding: 20px;
  border: 1px solid #dce7f5;
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 10%, rgba(255, 213, 92, 0.22), transparent 24%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(242, 248, 255, 0.96));
  box-shadow: var(--shadow);
}

.home-focus-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 16px;
  margin: 4px 0 15px;
  color: var(--muted);
  font-size: 0.88rem;
}

.home-focus-summary strong {
  color: var(--ink);
}

.text-link {
  min-height: 34px;
  margin-left: auto;
  padding: 4px 2px;
  border: 0;
  color: var(--blue-dark);
  background: transparent;
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.focus-task-list {
  display: grid;
  gap: 12px;
}

.focus-task-card {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e3eaf4;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.focus-task-rank {
  align-self: start;
  padding: 4px 7px;
  border-radius: 999px;
  color: #755016;
  background: #fff1bd;
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
}

.focus-task-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--blue-dark);
  background: #eaf2ff;
  font-size: 1.08rem;
  font-weight: 900;
}

.focus-task-copy {
  min-width: 0;
}

.focus-task-copy > strong {
  display: block;
  margin-bottom: 3px;
}

.focus-task-copy > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.focus-task-rewards {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.reward-chip {
  padding: 4px 8px;
  border: 1px solid rgba(214, 151, 36, 0.28);
  border-radius: 999px;
  color: #7c4d0c;
  background: #fff5c9;
  font-weight: 900;
}

.focus-task-card .button {
  white-space: nowrap;
}

.home-growth-details {
  margin: 18px 0;
  border: 1px solid #e1e9f4;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.home-growth-details > summary {
  padding: 14px 18px;
  color: var(--blue-dark);
  font-weight: 900;
  cursor: pointer;
}

.home-growth-details[open] > summary {
  border-bottom: 1px solid #e1e9f4;
}

.home-growth-details > :not(summary) {
  margin: 16px;
}

.coin-result-stat small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.coin-reward-breakdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: -8px 0 22px;
}

.coin-reward-breakdown span {
  padding: 6px 10px;
  border: 1px solid rgba(214, 151, 36, 0.24);
  border-radius: 999px;
  color: #6d4a18;
  background: #fff8dc;
  font-size: 0.8rem;
}

.growth-level-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}

.growth-level-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.growth-level-main > div {
  min-width: 0;
  flex: 1;
}

.growth-level-main p {
  margin: 6px 0 0;
  color: var(--muted);
}

.growth-achievements {
  margin-top: 18px;
}

.growth-reward-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.growth-reward-rules .card {
  display: grid;
  align-content: start;
  gap: 8px;
}

.growth-reward-rules h3,
.growth-reward-rules p {
  margin: 0;
}

.growth-reward-rules .reward-chip {
  justify-self: start;
}

.task-howto {
  display: grid;
  gap: 14px;
  margin: 20px 0;
  padding: 18px;
  border: 1px solid rgba(59, 111, 216, 0.18);
  border-radius: 20px;
  background:
    radial-gradient(circle at 96% 8%, rgba(255, 210, 76, 0.24), transparent 30%),
    linear-gradient(135deg, #f8fbff, #fffdf5);
}

.task-howto-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.task-howto-heading > span {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 14px;
  background: #fff4c8;
  font-size: 1.35rem;
}

.task-howto-heading p,
.task-howto-heading h3 {
  margin: 0;
}

.task-howto-heading h3 {
  margin-top: 2px;
  font-size: 1.18rem;
}

.task-definition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.task-definition-grid article {
  padding: 13px 14px;
  border: 1px solid rgba(59, 111, 216, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.task-definition-grid strong {
  display: block;
  margin-bottom: 5px;
}

.task-definition-grid p,
.task-howto-footnote,
.task-howto-example {
  margin: 0;
  line-height: 1.65;
}

.task-howto-steps {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 24px;
  color: var(--muted);
  line-height: 1.65;
}

.task-howto-steps li::marker {
  color: var(--blue);
  font-weight: 800;
}

.task-howto-steps strong {
  color: var(--ink);
}

.task-tier-progress-stack {
  display: grid;
  min-width: 170px;
  gap: 8px;
}

.task-tier-progress-stack > small {
  color: var(--muted);
}

.task-tier-progress {
  display: grid;
  gap: 4px;
}

.task-tier-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.task-tier-progress-meta strong {
  color: var(--ink);
  font-size: 0.78rem;
}

.task-tier-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef8;
}

.task-tier-progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #67a4f0, #6f76e8);
  transition: width 180ms ease;
}

.task-quick-link {
  display: inline-flex;
  margin-top: 8px;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 800;
}

.task-lane-purpose {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.35;
}

.task-howto-footnote {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff2c7;
  color: #6d4d13;
}

.task-howto-example {
  color: var(--blue);
  font-weight: 700;
}

.rewards-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 210, 76, 0.24), transparent 28%),
    linear-gradient(145deg, #f1f7ff, #fffaf0);
}

.rewards-hero-copy p {
  margin-bottom: 0;
}

.reward-balance-card {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 10px 12px;
  padding: 16px;
  border: 1px solid rgba(214, 151, 36, 0.28);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
}

.reward-balance-card > span {
  grid-row: 1 / 3;
  font-size: 2rem;
}

.reward-balance-card div {
  display: grid;
}

.reward-balance-card small {
  color: var(--muted);
}

.reward-balance-card strong {
  color: #7b4b0a;
  font-size: 2rem;
}

.reward-balance-card .button {
  grid-column: 1 / -1;
}

.reward-ledger-details {
  grid-column: 1 / -1;
}

.reward-ledger-details > summary {
  justify-content: center;
  width: 100%;
  cursor: pointer;
  list-style: none;
}

.reward-ledger-details > summary::-webkit-details-marker {
  display: none;
}

.reward-ledger-details > summary::after {
  content: "⌄";
  margin-left: 6px;
}

.reward-ledger-details[open] > summary::after {
  content: "⌃";
}

.point-ledger-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(59, 111, 216, 0.14);
  border-radius: 16px;
  background: #f8fbff;
  text-align: left;
}

.point-ledger-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.point-ledger-heading p,
.point-ledger-heading h3 {
  margin: 0;
}

.point-ledger-heading small {
  text-align: right;
}

.point-ledger-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.point-ledger-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid #e4ebf5;
  border-radius: 12px;
  background: #fff;
}

.point-ledger-entry > div {
  display: grid;
  gap: 2px;
}

.point-ledger-entry b {
  flex: 0 0 auto;
  font-size: 1.05rem;
}

.point-ledger-entry.is-income b {
  color: #21824d;
}

.point-ledger-entry.is-spending b {
  color: #b42318;
}

.point-ledger-empty {
  padding: 14px;
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
}

.reward-notice {
  border: 1px solid rgba(67, 169, 110, 0.25);
  background: #ebfbf2;
}

.reward-shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  align-items: start;
  gap: 18px;
  margin-top: 20px;
}

.reward-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.reward-shop-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e1e9f4;
  border-radius: 18px;
  background: #fff;
}

.reward-shop-card.is-affordable {
  border-color: rgba(63, 158, 104, 0.25);
  background: linear-gradient(145deg, #fff, #f0fcf5);
}

.reward-shop-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 16px;
  background: #fff2c9;
  font-size: 1.7rem;
}

.reward-shop-copy h3,
.reward-shop-copy p {
  margin: 0;
}

.reward-shop-copy > strong {
  display: block;
  margin-top: 4px;
  color: #7b4b0a;
}

.reward-shop-copy p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.84rem;
}

.reward-shop-card .button {
  grid-column: 1 / -1;
  width: 100%;
}

.reward-side-stack {
  display: grid;
  gap: 16px;
}

.recent-income-panel ul,
.redemption-list {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.recent-income-panel li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #dfe7f1;
}

.recent-income-panel li:last-child {
  border-bottom: 0;
}

.recent-income-panel li strong {
  color: #26744a;
}

.redemption-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid #e2e9f2;
  border-radius: 14px;
  background: #fbfdff;
}

.redemption-card > span {
  font-size: 1.4rem;
}

.redemption-card p,
.redemption-card small {
  display: block;
  margin: 2px 0 0;
  color: var(--muted);
}

.redemption-card b {
  color: var(--red);
}

.voucher-qr-button {
  min-height: 34px !important;
  margin-top: 8px;
  padding: 5px 10px !important;
  font-size: 0.78rem;
}

.voucher-qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(22, 35, 52, 0.6);
  backdrop-filter: blur(5px);
}

.voucher-qr-card {
  position: relative;
  display: grid;
  width: min(390px, 100%);
  gap: 12px;
  padding: 24px;
  place-items: center;
  border-radius: 24px;
  text-align: center;
  background: #fff;
  box-shadow: 0 24px 70px rgba(20, 36, 58, 0.28);
}

.voucher-qr-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.voucher-qr-canvas {
  display: grid;
  width: min(260px, 72vw);
  aspect-ratio: 1;
  padding: 10px;
  place-items: center;
  border: 1px solid #e2e9f2;
  border-radius: 16px;
  background: #fff;
}

.voucher-qr-canvas svg {
  width: 100%;
  height: 100%;
}

.voucher-code {
  color: #3c506b;
  font-family: Consolas, "Courier New", monospace;
  font-size: 1.35rem;
  letter-spacing: 0.18em;
}

.custom-reward-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed #dce6f2;
}

.custom-reward-form textarea {
  width: 100%;
  min-height: 76px;
  padding: 10px 13px;
  border: 2px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.form-error {
  display: none;
  margin: 0;
  color: var(--red);
  font-weight: 800;
}

.form-error.is-visible {
  display: block;
}

.reward-admin-hero {
  background:
    radial-gradient(circle at 90% 10%, rgba(106, 153, 221, 0.16), transparent 30%),
    linear-gradient(145deg, #f8fbff, #fffaf0);
}

.reward-admin-panel {
  margin-top: 18px;
}

.reward-admin-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.reward-admin-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #dfe8f3;
  border-radius: 18px;
  background: #fff;
}

.reward-admin-card.is-disabled {
  opacity: 0.7;
  background: #f5f7fa;
}

.reward-admin-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reward-admin-card-head div {
  display: grid;
}

.reward-admin-card-head small {
  color: var(--muted);
}

.practice-stage {
  display: flex;
  height: 320px;
  min-height: 320px;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
}

.practice-stage .word-slots {
  margin: 12px auto 10px;
}

.practice-stage .phonetic {
  min-height: 1.4em;
  margin: 0 0 8px;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}

.practice-stage .meaning-prompt {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 4vw, 2.2rem);
}

.practice-stage .feedback-burst {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.practice-stage--feedback {
  justify-content: flex-start;
  overflow-y: auto;
}

.practice-stage--feedback .feedback-burst {
  grid-template-columns: auto minmax(0, 1fr);
}

.practice-stage--feedback .feedback-companion {
  grid-column: 2;
  justify-self: start;
}

.practice-stage--feedback .correction-guide,
.practice-stage--feedback .feedback-actions,
.practice-stage--feedback .feedback-countdown {
  grid-column: 1 / -1;
}

@media (max-width: 680px) {
  .home-wallet-strip small {
    flex-basis: 100%;
  }

  .home-focus-section {
    padding: 16px;
  }

  .home-focus-summary .text-link {
    margin-left: 0;
  }

  .focus-task-card {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .focus-task-rank {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .focus-task-card .button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 46px;
  }

  .growth-level-panel,
  .growth-reward-rules,
  .task-definition-grid {
    grid-template-columns: 1fr;
  }

  .task-howto {
    padding: 15px;
  }

  .study-detail-panel {
    padding: 14px;
  }

  .study-detail-head,
  .study-detail-word-row {
    grid-template-columns: 1fr;
  }

  .study-detail-head {
    display: grid;
  }

  .growth-level-panel .reward-chip {
    justify-self: start;
    white-space: normal;
  }

  .rewards-hero,
  .reward-shop-layout,
  .reward-catalog-grid {
    grid-template-columns: 1fr;
  }

  .reward-balance-card .button {
    width: 100%;
  }

  .point-ledger-heading,
  .point-ledger-entry {
    align-items: flex-start;
  }

  .point-ledger-heading {
    flex-direction: column;
  }

  .point-ledger-heading small {
    text-align: left;
  }

  body.in-practice .practice-stage {
    height: min(44vh, 360px);
    min-height: 230px;
    padding: 6px 0;
  }

  .practice-stage .word-slots {
    margin: 6px auto;
    padding: 16px;
  }

  .practice-stage .feedback-burst {
    gap: 10px;
    padding: 12px;
  }

  .practice-stage--feedback .feedback-companion {
    min-width: 0;
  }

  body.in-practice.is-feedback .practice-stage {
    flex: 0 0 auto;
    overflow-y: auto;
  }
}


