* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #333;
  background-color: #f5f5f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}

body.page-lesson {
  height: 100vh;
  overflow: hidden;
}

.page-title {
  font-size: 1rem;
  font-weight: bold;
  margin: 0 0 1.25rem;
}

.page-title a {
  color: inherit;
  text-decoration: none;
}

.page-title a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

ul {
  list-style: none;
}

li {
  margin: 0;
}

/* catalog card grids */
.page-index,
.page-nce1,
.page-nce2,
.page-nce3,
.page-nce4,
.page-phonetic,
.page-words,
.page-grammar {
  padding: 0 1rem 2rem;
}

.page-nce1,
.page-nce2,
.page-nce3,
.page-nce4,
.page-phonetic,
.page-words,
.page-grammar {
  position: relative;
  padding-top: 3.25rem;
  align-items: stretch;
}

.catalog-tabs {
  position: absolute;
  top: 0.75rem;
  left: 1rem;
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  background: #e2e8f0;
  border-radius: 999px;
  z-index: 10;
}

.catalog-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: #475569;
  font: inherit;
  font-size: 0.875rem;
  line-height: 1;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
}

.catalog-tab.is-active {
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.catalog-panel {
  width: 100%;
}

.catalog-panel[hidden] {
  display: none !important;
}

/* shadowing cards: very light tint so the tab switch is subtle but visible */
#panel-shadowing .card-list a {
  background-color: #f7fdf9;
  border-color: #e5f3ea;
  color: #334155;
}

#panel-shadowing .card-list a:hover {
  background-color: #eefaf3;
  border-color: #d4ebdd;
  color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

#panel-recite .card-list a {
  background-color: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

#panel-recite .card-list a:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

#panel-words .card-list a {
  background-color: #faf5ff;
  border-color: #e9d5ff;
  color: #334155;
}

#panel-words .card-list a:hover {
  background-color: #f3e8ff;
  border-color: #d8b4fe;
  color: #6d28d9;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.12);
}

/* NCE2 Chinese recitation page — large type for looking at ZH while recalling EN */
body.page-nce2-recite,
body.page-nce1-recite,
body.page-nce3-recite,
body.page-nce4-recite {
  margin: 0;
  padding: 1rem;
  background: #f8fafc;
  color: #0f172a;
  min-height: 100vh;
  box-sizing: border-box;
  /* Override global body flex centering so toolbar can be full-width */
  align-items: stretch;
  text-align: left;
}

.page-nce2-recite .recite-toolbar,
.page-nce1-recite .recite-toolbar,
.page-nce3-recite .recite-toolbar,
.page-nce4-recite .recite-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto 1.25rem;
  min-height: 2.25rem;
}

.page-nce2-recite .recite-back,
.page-nce1-recite .recite-back,
.page-nce3-recite .recite-back,
.page-nce4-recite .recite-back {
  position: relative;
  z-index: 1;
  color: #1d4ed8;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
  line-height: 1;
  padding: 0.35rem 0;
}

.page-nce2-recite .recite-back:hover,
.page-nce1-recite .recite-back:hover,
.page-nce3-recite .recite-back:hover,
.page-nce4-recite .recite-back:hover {
  text-decoration: underline;
}

.page-nce2-recite .recite-nav,
.page-nce1-recite .recite-nav,
.page-nce3-recite .recite-nav,
.page-nce4-recite .recite-nav {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}

.page-nce2-recite .recite-nav a,
.page-nce1-recite .recite-nav a,
.page-nce3-recite .recite-nav a,
.page-nce4-recite .recite-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  text-decoration: none;
  font-size: 0.8125rem;
  line-height: 1;
  white-space: nowrap;
}

.page-nce2-recite .recite-nav a:hover,
.page-nce1-recite .recite-nav a:hover,
.page-nce3-recite .recite-nav a:hover,
.page-nce4-recite .recite-nav a:hover {
  background: #cbd5e1;
  color: #1d4ed8;
}

.page-nce2-recite .recite-modes,
.page-nce1-recite .recite-modes,
.page-nce3-recite .recite-modes,
.page-nce4-recite .recite-modes {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  gap: 0.1rem;
  padding: 0.15rem;
  margin: 0;
  background: #e2e8f0;
  border-radius: 999px;
}

.page-nce2-recite .recite-modes button,
.page-nce1-recite .recite-modes button,
.page-nce3-recite .recite-modes button,
.page-nce4-recite .recite-modes button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #475569;
  font: inherit;
  font-size: 0.8125rem;
  line-height: 1;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .page-nce2-recite .recite-modes button,
  .page-nce1-recite .recite-modes button,
  .page-nce3-recite .recite-modes button,
  .page-nce4-recite .recite-modes button {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
  }
}

.page-nce2-recite .recite-modes button.is-active,
.page-nce1-recite .recite-modes button.is-active,
.page-nce3-recite .recite-modes button.is-active,
.page-nce4-recite .recite-modes button.is-active {
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.page-nce2-recite .recite-title,
.page-nce1-recite .recite-title,
.page-nce3-recite .recite-title,
.page-nce4-recite .recite-title {
  max-width: 40rem;
  margin: 0 auto 1.5rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.page-nce2-recite .recite-title .recite-zh,
.page-nce2-recite .recite-title .recite-en,
.page-nce1-recite .recite-title .recite-zh,
.page-nce3-recite .recite-title .recite-zh,
.page-nce4-recite .recite-title .recite-zh,
.page-nce1-recite .recite-title .recite-en,
.page-nce3-recite .recite-title .recite-en,
.page-nce4-recite .recite-title .recite-en {
  display: block;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
}

.page-nce2-recite.mode-both .recite-title .recite-en,
.page-nce1-recite.mode-both .recite-title .recite-en,
.page-nce3-recite.mode-both .recite-title .recite-en,
.page-nce4-recite.mode-both .recite-title .recite-en {
  margin-top: 0.35rem;
  color: #64748b;
  font-weight: 600;
}

.page-nce2-recite .recite-body,
.page-nce1-recite .recite-body,
.page-nce3-recite .recite-body,
.page-nce4-recite .recite-body {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 2rem;
  user-select: none;
}

.page-nce2-recite .recite-pair,
.page-nce1-recite .recite-pair,
.page-nce3-recite .recite-pair,
.page-nce4-recite .recite-pair {
  margin: 0 0 0.85rem;
  padding: 0.15rem 0;
  border-radius: 0;
}

.page-nce2-recite .recite-pair[data-start],
.page-nce1-recite .recite-pair[data-start],
.page-nce3-recite .recite-pair[data-start],
.page-nce4-recite .recite-pair[data-start] {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  outline: none;
  touch-action: pan-y;
}

.recite-word-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
}

.recite-word-popup {
  background: #fff;
  border-radius: 1.25rem;
  padding: 1.5rem;
  max-width: 36rem;
  width: 100%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  max-height: 80vh;
  overflow-y: auto;
  -webkit-touch-callout: none;
  user-select: none;
}

.recite-word-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.recite-word-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: none;
  background: #e2e8f0;
  color: #1e293b;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.3;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

.recite-word-btn:hover {
  background: #cbd5e1;
  color: #1d4ed8;
}

.recite-word-btn:active {
  background: #bfdbfe;
  color: #1d4ed8;
  transform: scale(0.96);
}

.page-nce2-recite .recite-pair.is-scrubbing,
.page-nce1-recite .recite-pair.is-scrubbing,
.page-nce3-recite .recite-pair.is-scrubbing,
.page-nce4-recite .recite-pair.is-scrubbing {
  user-select: none;
  cursor: ew-resize;
}

.page-nce2-recite .recite-pair[data-start]:focus,
.page-nce2-recite .recite-pair[data-start]:focus-visible,
.page-nce1-recite .recite-pair[data-start]:focus,
.page-nce3-recite .recite-pair[data-start]:focus,
.page-nce4-recite .recite-pair[data-start]:focus,
.page-nce1-recite .recite-pair[data-start]:focus-visible,
.page-nce3-recite .recite-pair[data-start]:focus-visible,
.page-nce4-recite .recite-pair[data-start]:focus-visible {
  outline: none;
  box-shadow: none;
}

.page-nce2-recite .recite-pair.is-loading,
.page-nce1-recite .recite-pair.is-loading,
.page-nce3-recite .recite-pair.is-loading,
.page-nce4-recite .recite-pair.is-loading {
  cursor: wait;
  opacity: 0.85;
}

.page-nce2-recite .recite-pair .recite-zh,
.page-nce2-recite .recite-pair .recite-en,
.page-nce1-recite .recite-pair .recite-zh,
.page-nce3-recite .recite-pair .recite-zh,
.page-nce4-recite .recite-pair .recite-zh,
.page-nce1-recite .recite-pair .recite-en,
.page-nce3-recite .recite-pair .recite-en,
.page-nce4-recite .recite-pair .recite-en {
  margin: 0;
  font-size: clamp(1.15rem, 2.6vw, 1.35rem);
  line-height: 1.85;
  letter-spacing: 0.02em;
}

.page-nce2-recite .recite-pair .recite-en,
.page-nce1-recite .recite-pair .recite-en,
.page-nce3-recite .recite-pair .recite-en,
.page-nce4-recite .recite-pair .recite-en {
  color: #334155;
}

.page-nce2-recite.mode-both .recite-pair .recite-en,
.page-nce1-recite.mode-both .recite-pair .recite-en,
.page-nce3-recite.mode-both .recite-pair .recite-en,
.page-nce4-recite.mode-both .recite-pair .recite-en {
  margin-top: 0.35rem;
  color: #64748b;
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
}

/* Progressive highlight only — no page dim, no row background */
.page-nce2-recite .recite-karaoke,
.page-nce1-recite .recite-karaoke,
.page-nce3-recite .recite-karaoke,
.page-nce4-recite .recite-karaoke {
  display: inline;
}

.page-nce2-recite .rk-unit,
.page-nce2-recite .rk-space,
.page-nce1-recite .rk-unit,
.page-nce3-recite .rk-unit,
.page-nce4-recite .rk-unit,
.page-nce1-recite .rk-space,
.page-nce3-recite .rk-space,
.page-nce4-recite .rk-space {
  display: inline;
}

.page-nce2-recite .recite-pair.is-playing .rk-unit.is-lit,
.page-nce1-recite .recite-pair.is-playing .rk-unit.is-lit,
.page-nce3-recite .recite-pair.is-playing .rk-unit.is-lit,
.page-nce4-recite .recite-pair.is-playing .rk-unit.is-lit {
  color: #4f46e5;
}

.page-nce2-recite .recite-pair.is-playing .rk-unit.is-active,
.page-nce1-recite .recite-pair.is-playing .rk-unit.is-active,
.page-nce3-recite .recite-pair.is-playing .rk-unit.is-active,
.page-nce4-recite .recite-pair.is-playing .rk-unit.is-active {
  color: transparent;
  background-image: linear-gradient(
    90deg,
    #4f46e5 0%,
    #4f46e5 calc(var(--u, 0) * 100%),
    currentColor calc(var(--u, 0) * 100%),
    currentColor 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Restore base text color under the active-unit wipe (currentColor is lost when transparent) */
.page-nce2-recite .recite-pair.is-playing .recite-zh .rk-unit.is-active,
.page-nce1-recite .recite-pair.is-playing .recite-zh .rk-unit.is-active,
.page-nce3-recite .recite-pair.is-playing .recite-zh .rk-unit.is-active,
.page-nce4-recite .recite-pair.is-playing .recite-zh .rk-unit.is-active {
  background-image: linear-gradient(
    90deg,
    #4f46e5 0%,
    #4f46e5 calc(var(--u, 0) * 100%),
    #0f172a calc(var(--u, 0) * 100%),
    #0f172a 100%
  );
}

.page-nce2-recite .recite-pair.is-playing .recite-en .rk-unit.is-active,
.page-nce1-recite .recite-pair.is-playing .recite-en .rk-unit.is-active,
.page-nce3-recite .recite-pair.is-playing .recite-en .rk-unit.is-active,
.page-nce4-recite .recite-pair.is-playing .recite-en .rk-unit.is-active {
  background-image: linear-gradient(
    90deg,
    #4f46e5 0%,
    #4f46e5 calc(var(--u, 0) * 100%),
    #334155 calc(var(--u, 0) * 100%),
    #334155 100%
  );
}

.page-nce2-recite.mode-both .recite-pair.is-playing .recite-en .rk-unit.is-active,
.page-nce1-recite.mode-both .recite-pair.is-playing .recite-en .rk-unit.is-active,
.page-nce3-recite.mode-both .recite-pair.is-playing .recite-en .rk-unit.is-active,
.page-nce4-recite.mode-both .recite-pair.is-playing .recite-en .rk-unit.is-active {
  background-image: linear-gradient(
    90deg,
    #4f46e5 0%,
    #4f46e5 calc(var(--u, 0) * 100%),
    #64748b calc(var(--u, 0) * 100%),
    #64748b 100%
  );
}

.page-nce2-recite #recite-player,
.page-nce1-recite #recite-player,
.page-nce3-recite #recite-player,
.page-nce4-recite #recite-player {
  display: none;
}

.page-nce2-recite.mode-zh .recite-en,
.page-nce1-recite.mode-zh .recite-en,
.page-nce3-recite.mode-zh .recite-en,
.page-nce4-recite.mode-zh .recite-en {
  display: none;
}

.page-nce2-recite.mode-en .recite-zh,
.page-nce1-recite.mode-en .recite-zh,
.page-nce3-recite.mode-en .recite-zh,
.page-nce4-recite.mode-en .recite-zh {
  display: none;
}

.page-nce2-recite .recite-empty,
.page-nce1-recite .recite-empty,
.page-nce3-recite .recite-empty,
.page-nce4-recite .recite-empty {
  text-align: center;
  color: #64748b;
}

/* series lists on phonetic / words / grammar */
#panel-ipa .card-list a,
#panel-phonics .card-list a,
#panel-study .card-list a,
#panel-essentials .card-list a,
#panel-tenses .card-list a {
  background-color: #f7fdf9;
  border-color: #e5f3ea;
  color: #334155;
}

#panel-ipa .card-list a:hover,
#panel-phonics .card-list a:hover,
#panel-study .card-list a:hover,
#panel-essentials .card-list a:hover,
#panel-tenses .card-list a:hover {
  background-color: #eefaf3;
  border-color: #d4ebdd;
  color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

/* phonetic / words / grammar: min-width only, grow with label (single line) */
.page-phonetic .card-list,
.page-words .card-list,
.page-grammar .card-list {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-width: none;
  margin: 0;
  gap: 0.75rem;
  align-items: stretch;
  justify-content: flex-start;
}

.page-phonetic .card-list li,
.page-words .card-list li,
.page-grammar .card-list li {
  flex: 0 1 auto;
  max-width: 100%;
}

.page-phonetic .card-list a,
.page-words .card-list a,
.page-grammar .card-list a {
  width: auto;
  min-width: 7.5rem;
  white-space: nowrap;
}

/* course entry cards (音标速学 / 单词速读) — full-row like xdf */
#panel-quick,
#panel-speed {
  width: 100%;
  max-width: none;
  align-self: stretch;
}

.course-entry-list {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-width: none;
  margin: 0;
  gap: 0.75rem;
  align-items: stretch;
  justify-content: flex-start;
}

.course-entry-list li {
  flex: 0 1 auto;
  max-width: 100%;
}

.course-entry-list a {
  width: auto;
  min-width: 7.5rem;
  white-space: nowrap;
  background-color: #fffaf5;
  border-color: #f3e7d8;
  color: #334155;
}

.course-entry-list a:hover {
  background-color: #fff4e8;
  border-color: #ead5b8;
  color: #c2410c;
  box-shadow: 0 4px 12px rgba(194, 65, 12, 0.12);
}

/* xdf (新东方) catalog — use full page width */
#panel-xdf {
  width: 100%;
  max-width: none;
  align-self: stretch;
}

.xdf-catalog {
  width: 100%;
  max-width: none;
  margin: 0;
  text-align: left;
  box-sizing: border-box;
}

.xdf-catalog-status {
  text-align: center;
  color: #64748b;
  padding: 1rem;
}

.xdf-lesson-block {
  margin-bottom: 1.25rem;
}

.xdf-lesson-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #334155;
  margin: 0 0 0.55rem;
  padding: 0 0.15rem;
  text-align: left;
}

.xdf-lesson-sub {
  font-weight: 500;
  color: #64748b;
  font-size: 0.9rem;
}

#panel-xdf .card-list,
#panel-speed .card-list {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-width: none;
  margin: 0;
  gap: 0.75rem;
  align-items: stretch;
  justify-content: flex-start;
}

#panel-xdf .card-list li,
#panel-speed .card-list li {
  flex: 0 1 auto;
  max-width: 100%;
}

#panel-xdf .card-list a,
#panel-speed .card-list a {
  width: auto;
  min-width: 7.5rem;
  white-space: nowrap;
  background-color: #fffaf5;
  border-color: #f3e7d8;
  color: #334155;
}

#panel-xdf .card-list a:hover,
#panel-speed .card-list a:hover {
  background-color: #fff4e8;
  border-color: #ead5b8;
  color: #c2410c;
  box-shadow: 0 4px 12px rgba(194, 65, 12, 0.12);
}

.page-xdf-player .xdf-playlist {
  position: fixed;
  top: 3.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  max-width: min(920px, calc(100vw - 1.5rem));
}

.page-xdf-player .xdf-playlist-item {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.75rem;
  line-height: 1.2;
}

.page-xdf-player .xdf-playlist-item.is-active,
.page-xdf-player .xdf-playlist-item:hover {
  background: rgba(194, 65, 12, 0.9);
  color: #fff;
}

/* fullscreen shadowing player */
body.page-shadowing-player {
  margin: 0;
  padding: 0;
  background: #000;
  min-height: 100vh;
  align-items: stretch;
  justify-content: center;
  text-align: left;
}

.page-shadowing-player .shadowing-back {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1;
}

.page-shadowing-player .shadowing-back:hover {
  background: rgba(29, 78, 216, 0.9);
}

.page-shadowing-player #shadowing-video {
  width: 100vw;
  height: 100vh;
  max-height: 100dvh;
  object-fit: contain;
  background: #000;
}

.page-shadowing-player .shadowing-error {
  margin: auto;
  color: #fecaca;
  font-size: 1rem;
}

.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  gap: 0.75rem;
  width: min(1366px, 100%);
  margin: 0 auto;
  align-items: stretch;
  justify-content: stretch;
}

.page-index .card-list {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  width: min(720px, 100%);
}

.site-footer {
  margin-top: 2.5rem;
  padding: 0 1rem 1.5rem;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.6;
  text-align: left;
}

.site-footer a {
  color: #1d4ed8;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer-note {
  margin-top: 0.15rem;
  color: #94a3b8;
  font-size: 0.8125rem;
}

.card-list li {
  margin: 0;
}

.card-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.85rem 0.75rem;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #334155;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}
.card-list a.recite {
  position: relative;
  /* font-weight: bolder; */
  /* color: #f59e0b; */
}

.card-list a.recite::after {
  content: "★";
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-size: 0.75rem;
  font-weight: normal;
  line-height: 1;
  color: rgba(245, 158, 11,0.5);
}

.card-list a:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  transform: translateY(-1px);
}

/* nce1.html */
/* nce2.html */

/* lesson pages */
.page-lesson .page-title {
  flex-shrink: 0;
  margin-bottom: 0;
  text-align: center;
  width: 100%;
  padding: 0 0.5rem;
}

.page-lesson .container {
  display: flex;
  flex: 1;
  gap: 1rem;
  align-items: stretch;
  align-self: center;
  width: min(1400px, 100%);
  min-height: 0;
  padding: 0 0.4rem 0.4rem;
  text-align: left;
}

.page-lesson .left,
.page-lesson .right {
  min-width: 0;
  min-height: 0;
}

.page-lesson .left {
  flex: 0 1 300px;
  max-width: 300px;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.page-lesson .left .lyrics {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.page-lesson .right {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page-lesson .right > h2,
.page-lesson .analysis-toolbar,
.page-lesson .audio-progress {
  flex-shrink: 0;
}

.page-lesson h2 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.page-lesson .lyrics {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.page-lesson .lyric-line {
  display: flex;
  gap: 0.35rem;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.page-lesson .lyric-index {
  flex: 0 0 1.5em;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  text-align: right;
  user-select: none;
}

.page-lesson .lyric-line.active .lyric-index {
  color: #1e40af;
}

.page-lesson .lyric-text {
  flex: 1;
  min-width: 0;
}

.page-lesson .lyric-line:hover {
  background-color: #e8e8e8;
}

.page-lesson .lyric-line.active {
  background-color: #dbeafe;
  color: #1e40af;
}

.page-lesson .lyrics-error {
  color: #b91c1c;
}

.page-lesson .analysis-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  margin-bottom: 0;
  padding: 0;
  background-color: #f5f5f5;
  margin-bottom: 0.25rem;
}

.page-lesson .toolbar-playback,
.page-lesson .progress-percents {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
}

.page-lesson .toolbar-playback {
  flex: 0 0 auto;
}

.page-lesson .progress-percents {
  flex: 0 0 auto;
  margin-left: auto;
  justify-content: flex-end;
}

.page-lesson .analysis-toolbar button {
  padding: 0.2rem 0.35rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background-color: #fff;
  color: #333;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  font-size: 14px;
}

.page-lesson .analysis-toolbar button:hover:not(:disabled) {
  background-color: #e2e8f0;
}

.page-lesson .analysis-toolbar button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-lesson .audio-progress {
  margin-bottom: 0.25rem;
}

.page-lesson .progress-track {
  height: 8px;
  border-radius: 999px;
  background-color: #e2e8f0;
  overflow: hidden;
  cursor: pointer;
}

.page-lesson .progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background-color: #3b82f6;
}

.page-lesson .progress-percents button {
  font-size: 0.8rem;
  color: #334155;
}

.page-lesson .analysis {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  line-height: 1.7;
}

.page-lesson .analysis-placeholder {
  color: #64748b;
}

.page-lesson .analysis h1,
.page-lesson .analysis h2,
.page-lesson .analysis h3,
.page-lesson .analysis h4 {
  margin: 1.25rem 0 0.6rem;
  line-height: 1.3;
}

.page-lesson .analysis h1 {
  font-size: 1.35rem;
}

.page-lesson .analysis h2 {
  font-size: 1.2rem;
}

.page-lesson .analysis h3 {
  font-size: 1.05rem;
}

.page-lesson .analysis p,
.page-lesson .analysis ul,
.page-lesson .analysis ol,
.page-lesson .analysis blockquote,
.page-lesson .analysis pre,
.page-lesson .analysis table {
  margin: 0.6rem 0;
}

.page-lesson .analysis ul,
.page-lesson .analysis ol {
  padding-left: 1.4rem;
  list-style: revert;
  display: block;
  align-items: initial;
}

.page-lesson .analysis li {
  margin-bottom: 0.25rem;
}

.page-lesson .analysis blockquote {
  padding: 0.35rem 0.75rem;
  border-left: 3px solid #94a3b8;
  color: #334155;
  background-color: #f8fafc;
}

.page-lesson .analysis code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.3em;
  background-color: #f1f5f9;
  border-radius: 3px;
}

.page-lesson .analysis pre {
  padding: 0.75rem;
  overflow-x: auto;
  background-color: #f1f5f9;
  border-radius: 4px;
}

.page-lesson .analysis pre code {
  padding: 0;
  background: none;
}

.page-lesson .analysis table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.page-lesson .analysis th,
.page-lesson .analysis td {
  border: 1px solid #e2e8f0;
  padding: 0.4rem 0.55rem;
  vertical-align: top;
}

.page-lesson .analysis th {
  background-color: #f8fafc;
}

.page-lesson .analysis hr {
  margin: 1rem 0;
  border: none;
  border-top: 1px solid #e2e8f0;
}

.page-lesson audio {
  display: none;
}

/* nce3.html */
/* nce4.html */
