:root {
  color-scheme: light;
  --ink: #18201d;
  --muted: #65706a;
  --line: #dce3dd;
  --paper: #f7f8f4;
  --panel: #ffffff;
  --green: #1f6f55;
  --green-dark: #124535;
  --gold: #d99a2b;
  --coral: #e86d4d;
  --blue: #3e6fa8;
  --shadow: 0 24px 70px rgba(35, 42, 38, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.topbar {
  align-items: center;
  background: rgba(247, 248, 244, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(220, 227, 221, 0.76);
  display: flex;
  gap: 24px;
  height: 68px;
  justify-content: space-between;
  left: 0;
  padding: 0 28px;
  position: sticky;
  right: 0;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: flex;
  font-weight: 800;
  gap: 10px;
  min-width: 130px;
}

.brand-mark {
  align-items: center;
  background: var(--green);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  height: 32px;
  justify-content: center;
  width: 42px;
}

.nav {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 15px;
}

.nav a:hover {
  color: var(--ink);
}

.nav-cta,
.primary-btn,
.secondary-btn {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 750;
  height: 44px;
  justify-content: center;
  padding: 0 18px;
}

.nav-cta,
.primary-btn {
  background: var(--green);
  color: #fff;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.48);
  color: #fff;
}

.hero {
  min-height: calc(100vh - 68px);
  overflow: hidden;
  position: relative;
}

.hero-image,
.hero-shade {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.hero-image {
  object-fit: cover;
}

.hero-shade {
  background: linear-gradient(90deg, rgba(13, 24, 19, 0.88) 0%, rgba(13, 24, 19, 0.7) 35%, rgba(13, 24, 19, 0.12) 72%);
}

.hero-content {
  color: #fff;
  max-width: 760px;
  padding: 12vh 28px 18vh;
  position: relative;
  width: min(100%, 1180px);
  margin: 0 auto;
}

.kicker,
.section-label {
  color: var(--gold);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0;
  margin: 0 0 14px;
}

.hero h1 {
  font-size: clamp(64px, 9vw, 126px);
  line-height: 0.92;
  letter-spacing: 0;
  margin: 0;
}

.hero-copy {
  font-size: 22px;
  line-height: 1.58;
  margin: 28px 0 0;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-stats {
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 52px;
  padding-top: 22px;
}

.hero-stats span {
  color: rgba(255, 255, 255, 0.82);
}

.hero-stats strong {
  color: #fff;
  font-size: 24px;
  margin-right: 6px;
}

.section,
.workspace,
.word-bank {
  margin: 0 auto;
  max-width: 1180px;
  padding: 82px 28px;
}

.intro,
.scenes {
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(260px, 0.8fr) minmax(300px, 1.2fr);
}

h2 {
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.08;
  letter-spacing: 0;
  margin: 0;
}

.intro p:last-child {
  color: var(--muted);
  font-size: 20px;
  line-height: 1.8;
  margin: 34px 0 0;
}

.workspace {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: 340px minmax(0, 1fr);
}

.panel,
.trainer {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 28px;
  position: sticky;
  top: 92px;
}

.progress-wrap {
  margin: 28px 0;
}

.progress-bar {
  background: #e7ece7;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.progress-bar span {
  background: linear-gradient(90deg, var(--green), var(--gold));
  display: block;
  height: 100%;
  width: 33%;
}

#progressText {
  color: var(--muted);
  margin: 12px 0 0;
}

.steps {
  display: grid;
  gap: 10px;
}

.step {
  background: #f7f8f4;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  height: 44px;
  text-align: left;
  padding: 0 14px;
}

.step:hover,
.word-pill:hover,
.option-grid button:hover {
  border-color: rgba(31, 111, 85, 0.45);
}

.step.is-done {
  color: var(--green);
}

.step.is-active {
  background: #eef6f0;
  border-color: rgba(31, 111, 85, 0.35);
  color: var(--green-dark);
  font-weight: 800;
}

.trainer {
  padding: 28px;
}

.trainer-head,
.word-row,
.word-bank-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.counter {
  background: #f3efe5;
  border-radius: 8px;
  color: var(--green-dark);
  font-weight: 850;
  padding: 12px 14px;
}

.course-nav {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.nav-word {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-dark);
  cursor: pointer;
  display: inline-flex;
  font-size: 15px;
  font-weight: 850;
  height: 44px;
  justify-content: center;
  line-height: 1;
  padding: 0 12px;
  white-space: nowrap;
}

.nav-word:hover:not(:disabled) {
  border-color: rgba(31, 111, 85, 0.45);
  background: #eef6f0;
}

.nav-word:disabled {
  color: #aeb8b1;
  cursor: not-allowed;
  opacity: 0.55;
}

.scene-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}

.scene-tab,
.chip {
  background: #f7f8f4;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  min-height: 38px;
  padding: 0 15px;
}

.scene-tab.is-active,
.chip.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.lesson-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
}

.muted {
  color: var(--muted);
  margin: 0 0 6px;
}

.word-row h3 {
  font-size: 64px;
  line-height: 0.95;
  margin: 0;
}

.icon-btn {
  align-items: center;
  background: var(--coral);
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.meaning {
  color: var(--green-dark);
  font-size: 18px;
  font-weight: 750;
}

.sentence-box {
  background: #f7f8f4;
  border-radius: 8px;
  margin: 22px 0;
  padding: 22px;
}

.sentence {
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.16;
  margin: 0;
}

.translation {
  color: var(--muted);
  font-size: 18px;
  margin: 12px 0 0;
}

.swap-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.step-content {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 22px;
}

.step-content h4 {
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 10px;
}

.step-content p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 16px;
}

.repeat-line {
  background: #f3efe5;
  border-radius: 8px;
  color: var(--green-dark);
  font-size: 22px;
  font-weight: 850;
  line-height: 1.35;
  margin: 14px 0;
  padding: 16px;
}

.practice-actions,
.option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.practice-actions button,
.option-grid button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-dark);
  cursor: pointer;
  font-weight: 850;
  min-height: 42px;
  padding: 0 14px;
}

.practice-actions button:first-child {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.cloze {
  color: var(--ink) !important;
  font-size: 28px;
  font-weight: 850;
}

.cloze span {
  color: var(--gold);
}

.feedback {
  background: #eef6f0;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  color: var(--green-dark) !important;
  font-weight: 850;
  margin-top: 14px !important;
  padding: 12px 14px;
}

.saved-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.saved-list p {
  background: #f7f8f4;
  border-radius: 8px;
  margin: 0;
  padding: 12px;
}

.saved-list strong,
.saved-list span {
  display: block;
}

.saved-list span {
  color: var(--muted);
  margin-top: 4px;
}

.empty-state {
  background: #f7f8f4;
  border-radius: 8px;
  padding: 12px;
}

.search-box {
  margin-top: 22px;
}

.search-box label {
  display: block;
  font-weight: 850;
  margin-bottom: 10px;
}

.search-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 96px;
}

.search-row input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 48px;
  min-width: 0;
  padding: 0 14px;
}

.search-row button {
  background: var(--green-dark);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 850;
}

.result {
  background: #eef6f0;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  color: var(--green-dark);
  font-size: 24px;
  font-weight: 850;
  line-height: 1.35;
  margin: 14px 0 0;
  padding: 16px;
}

.scene-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.scene-card,
.word-pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.scene-card strong,
.word-pill strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}

.scene-card span,
.word-pill span,
.word-bank-head span {
  color: var(--muted);
  line-height: 1.55;
}

.word-bank {
  padding-top: 54px;
}

.word-search {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 120px minmax(0, 1fr);
  margin-top: 28px;
}

.word-search label {
  color: var(--green-dark);
  font-weight: 850;
}

.word-search input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 48px;
  min-width: 0;
  padding: 0 14px;
}

.words {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  margin-top: 30px;
}

.word-pill {
  min-height: 82px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
}

.word-pill strong {
  font-size: 17px;
  margin-bottom: 6px;
}

.word-pill small {
  color: var(--muted);
  display: block;
  font-size: 13px;
  line-height: 1;
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  padding: 26px 28px 42px;
}

@media (max-width: 900px) {
  .nav {
    display: none;
  }

  .hero-content {
    padding-bottom: 12vh;
    padding-top: 10vh;
  }

  .intro,
  .scenes,
  .workspace {
    grid-template-columns: 1fr;
  }

  .panel {
    position: static;
  }

  .scene-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .words {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .topbar {
    height: 62px;
    padding: 0 16px;
  }

  .brand {
    min-width: 0;
  }

  .nav-cta {
    display: none;
  }

  .hero {
    min-height: 760px;
  }

  .hero-shade {
    background: linear-gradient(180deg, rgba(13, 24, 19, 0.86) 0%, rgba(13, 24, 19, 0.68) 48%, rgba(13, 24, 19, 0.18) 100%);
  }

  .hero-content,
  .section,
  .workspace,
  .word-bank {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero h1 {
    font-size: 68px;
  }

  .hero-copy,
  .intro p:last-child,
  .intro p:last-child {
    font-size: 18px;
  }

  .trainer,
  .panel,
  .lesson-card {
    padding: 20px;
  }

  .trainer-head,
  .word-row,
  .word-bank-head,
  .swap-row,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .word-row h3 {
    font-size: 54px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .search-row button {
    height: 46px;
  }

  .word-search {
    grid-template-columns: 1fr;
  }

  .scene-grid {
    grid-template-columns: 1fr;
  }

  .words {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
