.vocabulary-page {
  min-height: auto;
  padding: 14px 0 34px;
  background:
    linear-gradient(180deg, rgba(255, 248, 242, 0.74) 0%, rgba(247, 249, 251, 0.88) 48%, #ffffff 100%),
    var(--bg);
}

.main-content {
  flex: 0 0 auto;
}

.vocabulary-console {
  width: min(100% - 32px, 1040px);
  display: grid;
  gap: 10px;
}

.learning-hero-inner {
  width: min(100%, 1040px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(286px, 330px);
  gap: 16px;
  align-items: center;
}

.vocabulary-heading {
  min-height: 100%;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 4px 0;
}

.vocabulary-kicker {
  width: max-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0 10px;
  border: 1px solid rgba(255, 106, 0, 0.2);
  border-radius: 999px;
  background: #fff7f0;
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 780;
}

.vocabulary-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.vocabulary-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.vocabulary-heading h1 {
  max-width: 620px;
  margin: 0;
  color: #18202a;
  font-size: clamp(1.62rem, 3vw, 2.08rem);
  line-height: 1.16;
  font-weight: 780;
  text-wrap: balance;
}

.vocabulary-change-course {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(255, 106, 0, 0.28);
  border-radius: 999px;
  background: #fff7ed;
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 780;
  white-space: nowrap;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.vocabulary-change-course[hidden] {
  display: none;
}

.vocabulary-change-course:hover,
.vocabulary-change-course:focus-visible {
  border-color: rgba(255, 106, 0, 0.44);
  background: #fff2e4;
  box-shadow: 0 10px 22px rgba(255, 106, 0, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.vocabulary-heading p:not(.vocabulary-kicker),
.vocabulary-meta-line p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 640;
}

.vocabulary-status {
  width: max-content;
  max-width: min(100%, 620px);
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-self: center;
  margin-top: 0;
  padding: 4px 10px;
  border: 1px solid rgba(101, 113, 127, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
}

.vocabulary-status[hidden] {
  display: none;
}

.vocabulary-status.is-success {
  border-color: rgba(60, 151, 92, 0.2);
  background: #eefaf2;
  color: #206a42;
}

.vocabulary-status.is-error {
  border-color: rgba(191, 87, 36, 0.22);
  background: #fff4ed;
  color: #9a4218;
}

.vocabulary-progress-card,
.vocabulary-word-card {
  border: 1px solid rgba(220, 231, 238, 0.9);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 56px rgba(42, 53, 66, 0.08);
}

.vocabulary-progress-card {
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 18px;
  border-radius: 20px;
}

.vocabulary-current-progress span,
.vocabulary-summary > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.vocabulary-current-progress {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 0;
}

.vocabulary-current-progress strong {
  color: var(--primary-dark);
  font-size: 1.2rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.vocabulary-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f5;
}

.vocabulary-progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #ff9f3f);
  transition: width 220ms ease;
}

.vocabulary-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.vocabulary-actions-row .button {
  min-height: 38px;
  padding-inline: 14px;
  font-size: 0.9rem;
}

.vocabulary-study-area {
  display: grid;
  align-content: start;
  gap: 10px;
  justify-items: center;
}

.vocabulary-toolbar {
  width: min(100%, 740px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: center;
}

.vocabulary-mode-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.vocabulary-mode-switch button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(220, 231, 238, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 780;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.vocabulary-mode-switch button:hover,
.vocabulary-mode-switch button:focus-visible {
  border-color: rgba(255, 106, 0, 0.32);
  background: #fff8f2;
  color: var(--primary-dark);
  outline: none;
  transform: translateY(-1px);
}

.vocabulary-mode-switch button.is-active {
  border-color: rgba(255, 106, 0, 0.32);
  background: #fff4e8;
  color: var(--primary-dark);
  box-shadow: 0 10px 22px rgba(255, 106, 0, 0.07);
}

.vocabulary-mode-dock {
  width: min(100%, 740px);
  justify-self: center;
  gap: 8px;
  padding-top: 2px;
}

.vocabulary-mode-dock button {
  min-height: 38px;
  padding: 0 15px;
}

.vocabulary-nav-cluster {
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(112px, 1fr) auto minmax(112px, 1fr);
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border: 1px solid rgba(220, 231, 238, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 28px rgba(42, 53, 66, 0.045);
}

.vocabulary-toolbar [data-word-progress] {
  grid-column: 2;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.vocabulary-mini-button,
.vocabulary-batch-select {
  min-height: 36px;
  border: 1px solid rgba(220, 231, 238, 0.96);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 760;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.vocabulary-mini-button {
  padding: 0 14px;
}

.vocabulary-mini-button.is-audio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--primary-dark);
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
}

.vocabulary-mini-button:hover:not(:disabled),
.vocabulary-mini-button:focus-visible,
.vocabulary-batch-select:hover,
.vocabulary-batch-select:focus-visible,
.vocabulary-helper-row button:hover,
.vocabulary-helper-row button:focus-visible {
  border-color: rgba(255, 106, 0, 0.32);
  background: #fff8f2;
  color: var(--primary-dark);
  outline: none;
  transform: translateY(-1px);
}

.vocabulary-mini-button:disabled {
  cursor: not-allowed;
  opacity: 0.44;
}

.vocabulary-batch-control {
  display: inline-flex;
  align-items: center;
  grid-column: 3;
  justify-self: end;
  gap: 7px;
  min-height: 36px;
  padding: 0 10px 0 12px;
  border-left: 1px solid rgba(220, 231, 238, 0.82);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 760;
  white-space: nowrap;
}

.vocabulary-batch-select {
  min-height: 32px;
  padding: 0 10px;
  background: #f8fafb;
  color: var(--ink-soft);
}

.vocabulary-word-card {
  width: min(100%, 740px);
  display: grid;
  gap: 16px;
  padding: clamp(22px, 3.4vw, 32px);
  border-radius: 26px;
  box-shadow:
    0 30px 80px rgba(42, 53, 66, 0.12),
    0 8px 24px rgba(255, 106, 0, 0.045);
}

.vocabulary-word-card:focus-visible {
  outline: 3px solid rgba(255, 106, 0, 0.18);
  outline-offset: 4px;
}

.vocabulary-loading {
  min-height: 280px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 760;
}

.vocabulary-word-top {
  display: grid;
  gap: 7px;
  justify-items: center;
  text-align: center;
}

.vocabulary-card-head {
  max-width: 100%;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.vocabulary-memory-pill {
  max-width: 100%;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.vocabulary-memory-pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid rgba(255, 106, 0, 0.18);
  border-radius: 999px;
  background: #fff8f2;
  color: var(--primary-dark);
  font-size: 0.82rem;
}

.vocabulary-pronunciation {
  max-width: 100%;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: center;
}

.vocabulary-word {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 9px;
  justify-items: center;
}

.vocabulary-word strong {
  max-width: 100%;
  color: var(--ink);
  font-size: clamp(3.3rem, 9vw, 5.45rem);
  line-height: 0.98;
  font-weight: 830;
  overflow-wrap: anywhere;
}

.vocabulary-audio-button {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(255, 106, 0, 0.92);
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 14px 30px rgba(255, 106, 0, 0.22);
  color: #ffffff;
  cursor: pointer;
  font-size: 1.22rem;
  font-weight: 900;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.vocabulary-audio-icon {
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: currentColor;
  overflow: visible;
}

.vocabulary-audio-button .vocabulary-audio-icon {
  width: 26px;
  height: 26px;
}

.vocabulary-mini-button.is-audio .vocabulary-audio-icon {
  width: 18px;
  height: 18px;
}

.vocabulary-audio-icon-body {
  fill: currentColor;
}

.vocabulary-audio-icon-wave {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vocabulary-auto-audio-toggle {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(220, 231, 238, 0.94);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 780;
  white-space: nowrap;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.vocabulary-auto-audio-toggle:hover,
.vocabulary-auto-audio-toggle:focus-visible {
  border-color: rgba(255, 106, 0, 0.32);
  background: #fff8f2;
  color: var(--primary-dark);
  outline: none;
  transform: translateY(-1px);
}

.vocabulary-auto-audio-toggle.is-on {
  border-color: rgba(24, 134, 75, 0.28);
  background: #eefaf2;
  color: #206a42;
  box-shadow: 0 10px 20px rgba(24, 134, 75, 0.08);
}

.vocabulary-audio-button:hover,
.vocabulary-audio-button:focus-visible {
  background: var(--primary-dark);
  outline: none;
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 18px 36px rgba(255, 106, 0, 0.28);
}

.vocabulary-audio-button:active,
.vocabulary-mini-button:active,
.vocabulary-helper-row button:active,
.vocabulary-actions button:active {
  transform: translateY(1px) scale(0.99);
}

.vocabulary-phonetic {
  width: fit-content;
  max-width: min(100%, 360px);
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 6px 18px 7px;
  border: 1px solid rgba(220, 231, 238, 0.9);
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: clamp(1.18rem, 2.4vw, 1.42rem);
  font-weight: 820;
  line-height: 1.22;
  text-align: center;
  overflow-wrap: anywhere;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.vocabulary-phonetic:empty {
  display: none;
}

.vocabulary-meaning {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid rgba(220, 231, 238, 0.72);
  border-radius: 18px;
  background: #f5f7f9;
  color: var(--ink-soft);
  line-height: 1.58;
  text-align: center;
}

.vocabulary-meaning-line {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}

.vocabulary-meaning .vocabulary-pos-label {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: rgba(100, 116, 139, 0.82);
  font-size: 0.78rem;
  font-weight: 680;
  line-height: 1;
}

.vocabulary-meaning strong {
  color: #1d2731;
  font-size: 1.15rem;
  line-height: 1.45;
}

.vocabulary-meaning span {
  color: var(--muted);
}

.vocabulary-helper-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding-top: 2px;
}

.vocabulary-helper-row button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(220, 231, 238, 0.96);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 780;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.vocabulary-examples,
.vocabulary-spelling {
  border: 1px solid rgba(220, 231, 238, 0.76);
  border-radius: 18px;
  background: #fbfcfd;
}

.vocabulary-examples {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
}

.vocabulary-examples[hidden],
.vocabulary-spelling[hidden] {
  display: none;
}

.vocabulary-example {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 10px 44px 0 12px;
  padding-right: 44px;
  border-top: 1px solid rgba(220, 231, 238, 0.76);
  border-left: 3px solid rgba(255, 106, 0, 0.18);
  color: var(--ink-soft);
  line-height: 1.55;
}

.vocabulary-example:first-child {
  padding-top: 0;
  border-top: 0;
}

.vocabulary-example span {
  color: #1f2937;
  font-size: 1rem;
  font-weight: 780;
}

.vocabulary-example em {
  color: #788391;
  font-style: normal;
  font-size: 0.92rem;
  line-height: 1.5;
}

.vocabulary-example .vocabulary-mini-button {
  position: absolute;
  right: 0;
  top: 10px;
  min-width: 34px;
  width: 34px;
  min-height: 34px;
  padding: 0;
}

.vocabulary-example:first-child .vocabulary-mini-button {
  top: 0;
}

.vocabulary-spelling {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 16px;
}

.vocabulary-spelling input {
  width: min(100%, 420px);
  min-height: 50px;
  border: 1px solid rgba(186, 213, 223, 0.95);
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink);
  text-align: center;
  font-size: 1.22rem;
  font-weight: 800;
}

.vocabulary-spelling input:focus-visible {
  border-color: rgba(255, 106, 0, 0.45);
  outline: 3px solid rgba(255, 106, 0, 0.12);
}

.vocabulary-spelling-feedback {
  min-height: 24px;
  color: var(--muted);
  font-weight: 780;
}

.vocabulary-spelling-feedback.is-success {
  color: #15803d;
}

.vocabulary-spelling-feedback.is-error {
  color: #b45309;
}

.vocabulary-word-card.is-spelling-mode {
  gap: 18px;
}

.vocabulary-spelling-practice {
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.vocabulary-spelling-head {
  display: grid;
  gap: 5px;
}

.vocabulary-spelling-head span {
  width: fit-content;
  justify-self: center;
  padding: 5px 11px;
  border: 1px solid rgba(255, 106, 0, 0.24);
  border-radius: 999px;
  background: #fff8f2;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 820;
}

.vocabulary-spelling-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.04rem, 2.8vw, 1.26rem);
  line-height: 1.35;
}

.vocabulary-meaning.is-spelling-meaning {
  width: min(100%, 560px);
}

.vocabulary-spelling-translations {
  width: min(100%, 560px);
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.vocabulary-spelling-input-zone {
  position: relative;
  width: min(100%, 560px);
  display: block;
  cursor: text;
}

.vocabulary-spelling-letter-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(var(--spelling-letter-count, 1), minmax(0, 1fr));
  gap: clamp(4px, 1.2vw, 8px);
}

.vocabulary-spelling-letter {
  min-width: 0;
  min-height: clamp(38px, 9vw, 54px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(220, 231, 238, 0.98);
  border-radius: 12px;
  background: #f8fafc;
  color: transparent;
  font-size: clamp(1rem, 4vw, 1.34rem);
  font-weight: 840;
  line-height: 1;
  text-transform: lowercase;
}

.vocabulary-spelling-letter.is-empty {
  background: #f8fafc;
  color: transparent;
}

.vocabulary-spelling-letter.is-correct {
  border-color: rgba(24, 134, 75, 0.34);
  background: #eefaf2;
  color: #18864b;
}

.vocabulary-spelling-letter.is-wrong {
  border-color: rgba(190, 54, 54, 0.34);
  background: #fff1f2;
  color: #b4232f;
}

.vocabulary-spelling-input-proxy {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  opacity: 0.01;
}

.vocabulary-spelling-input-proxy:focus-visible {
  outline: 3px solid rgba(255, 106, 0, 0.12);
  outline-offset: 4px;
}

.vocabulary-spelling-result {
  width: min(100%, 560px);
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(220, 231, 238, 0.86);
  border-radius: 16px;
  background: #fbfcfd;
}

.vocabulary-spelling-result.is-correct {
  border-color: rgba(24, 134, 75, 0.24);
  background: #f0faf4;
  color: #206a42;
}

.vocabulary-spelling-result.is-wrong {
  border-color: rgba(190, 54, 54, 0.2);
  background: #fff7f7;
  color: #9f1f2c;
}

.vocabulary-spelling-result > strong {
  font-size: 1rem;
  line-height: 1.35;
}

.vocabulary-spelling-answer,
.vocabulary-spelling-answer-block strong {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 850;
}

.vocabulary-spelling-answer-block {
  display: grid;
  gap: 4px;
}

.vocabulary-spelling-answer-block span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.vocabulary-spelling-actions,
.vocabulary-spelling-footer {
  width: min(100%, 560px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.vocabulary-spelling-actions button,
.vocabulary-spelling-footer button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(220, 231, 238, 0.94);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 780;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.vocabulary-spelling-actions button:hover:not(:disabled),
.vocabulary-spelling-footer button:hover,
.vocabulary-spelling-actions button:focus-visible,
.vocabulary-spelling-footer button:focus-visible {
  border-color: rgba(255, 106, 0, 0.32);
  background: #fff8f2;
  color: var(--primary-dark);
  outline: none;
  transform: translateY(-1px);
}

.vocabulary-spelling-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.vocabulary-memory-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 106, 0, 0.18);
  border-radius: 14px;
  background: #fff8f2;
  color: #8a4b1c;
  font-size: 0.84rem;
  font-weight: 720;
  line-height: 1.45;
  text-align: left;
}

.vocabulary-memory-hint[hidden] {
  display: none;
}

.vocabulary-memory-hint button {
  min-height: 32px;
  flex: 0 0 auto;
  padding: 0 10px;
  border: 1px solid rgba(255, 106, 0, 0.24);
  border-radius: 999px;
  background: #ffffff;
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 780;
}

.vocabulary-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 2px;
}

.vocabulary-actions button {
  min-height: 50px;
  border: 1px solid rgba(220, 231, 238, 0.94);
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.98rem;
  font-weight: 820;
  box-shadow: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.vocabulary-actions button:hover,
.vocabulary-actions button:focus-visible {
  outline: none;
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.vocabulary-actions button.is-selected {
  filter: brightness(1.02);
  color: #ffffff;
  outline: 3px solid rgba(255, 106, 0, 0.12);
  transform: translateY(1px) scale(0.985);
}

.vocabulary-word-card.is-advancing .vocabulary-actions button:not(.is-selected),
.vocabulary-word-card.is-advancing .vocabulary-card-nav button,
.vocabulary-word-card.is-advancing .vocabulary-auto-audio-toggle {
  opacity: 0.58;
  pointer-events: none;
}

.vocabulary-actions .is-hard {
  border-color: rgba(183, 101, 47, 0.26);
  color: #96552a;
}

.vocabulary-actions .is-hard.is-selected {
  background: #b7652f;
  box-shadow: 0 14px 28px rgba(183, 101, 47, 0.18);
}

.vocabulary-actions .is-known {
  border-color: rgba(255, 106, 0, 0.26);
  color: var(--primary-dark);
}

.vocabulary-actions .is-known.is-selected {
  background: var(--primary);
  box-shadow: 0 14px 28px rgba(255, 106, 0, 0.2);
}

.vocabulary-actions .is-mastered {
  border-color: rgba(24, 134, 75, 0.24);
  color: #206a42;
}

.vocabulary-actions .is-mastered.is-selected {
  background: #18864b;
  box-shadow: 0 14px 28px rgba(24, 134, 75, 0.18);
}

.vocabulary-card-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 2px;
}

.vocabulary-card-nav button {
  min-height: 42px;
  border: 1px solid rgba(220, 231, 238, 0.94);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 780;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.vocabulary-card-nav button:hover:not(:disabled),
.vocabulary-card-nav button:focus-visible {
  border-color: rgba(255, 106, 0, 0.32);
  background: #fff8f2;
  color: var(--primary-dark);
  outline: none;
  transform: translateY(-1px);
}

.vocabulary-card-nav .is-next {
  border-color: rgba(220, 231, 238, 0.94);
  background: #f8fafc;
  color: rgba(38, 52, 46, 0.62);
  box-shadow: none;
}

.vocabulary-card-nav .is-next.is-ready,
.vocabulary-spelling-actions .is-primary.is-ready {
  border-color: rgba(255, 106, 0, 0.32);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(255, 106, 0, 0.18);
}

.vocabulary-card-nav button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.vocabulary-summary {
  width: min(100%, 740px);
  display: flex;
  align-items: center;
  justify-self: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(220, 231, 238, 0.84);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  box-shadow: 0 10px 28px rgba(42, 53, 66, 0.04);
}

.vocabulary-summary p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  font-size: 0.9rem;
}

.vocabulary-summary strong {
  color: var(--ink);
  font-weight: 830;
  font-variant-numeric: tabular-nums;
}

.vocabulary-course-modal[hidden] {
  display: none;
}

.vocabulary-course-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.vocabulary-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 31, 40, 0.42);
  backdrop-filter: blur(8px);
}

.vocabulary-modal-panel {
  position: relative;
  width: min(100%, 640px);
  max-height: min(82dvh, 720px);
  display: grid;
  gap: 14px;
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(220, 231, 238, 0.92);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 34px 90px rgba(24, 31, 40, 0.22);
}

.vocabulary-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.vocabulary-modal-head span,
.vocabulary-modal-status {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.vocabulary-modal-head h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 1.32rem;
  line-height: 1.2;
}

.vocabulary-modal-close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(220, 231, 238, 0.94);
  border-radius: 50%;
  background: #ffffff;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.vocabulary-modal-close:hover,
.vocabulary-modal-close:focus-visible {
  border-color: rgba(255, 106, 0, 0.32);
  background: #fff8f2;
  color: var(--primary-dark);
  outline: none;
  transform: translateY(-1px);
}

.vocabulary-modal-status {
  min-height: 22px;
}

.vocabulary-modal-status.is-error {
  color: #9a4218;
}

.vocabulary-course-options {
  display: grid;
  gap: 10px;
}

.vocabulary-course-option,
.vocabulary-course-empty {
  width: 100%;
  border: 1px solid rgba(220, 231, 238, 0.86);
  border-radius: 18px;
  background: #fbfcfd;
}

.vocabulary-course-option {
  display: grid;
  gap: 6px;
  padding: 14px 15px;
  color: var(--ink-soft);
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

button.vocabulary-course-option:hover:not(:disabled),
button.vocabulary-course-option:focus-visible {
  border-color: rgba(255, 106, 0, 0.32);
  background: #fff8f2;
  box-shadow: 0 14px 30px rgba(255, 106, 0, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.vocabulary-course-option:disabled {
  cursor: default;
}

.vocabulary-course-option.is-current {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-color: rgba(24, 134, 75, 0.26);
  background: #f0faf4;
  cursor: default;
}

.vocabulary-course-option-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.vocabulary-course-option span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.vocabulary-course-option strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.28;
}

.vocabulary-course-option p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.vocabulary-course-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 2px;
}

.vocabulary-course-tags em {
  padding: 3px 8px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 760;
}

.vocabulary-course-option-action {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 106, 0, 0.42);
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 820;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 12px 24px rgba(255, 106, 0, 0.18);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.vocabulary-course-option-action:hover,
.vocabulary-course-option-action:focus-visible {
  border-color: rgba(255, 106, 0, 0.56);
  background: var(--primary-dark);
  color: #ffffff;
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 15px 28px rgba(255, 106, 0, 0.23);
}

.vocabulary-course-empty {
  padding: 18px;
  color: var(--muted);
  font-weight: 720;
  line-height: 1.5;
}

.vocabulary-round-panel {
  width: min(100%, 520px);
}

.vocabulary-round-copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
}

.vocabulary-round-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.vocabulary-round-actions button {
  min-height: 48px;
  border: 1px solid rgba(255, 106, 0, 0.32);
  border-radius: 16px;
  background: var(--primary);
  color: #ffffff;
  cursor: pointer;
  font-size: 0.96rem;
  font-weight: 820;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.vocabulary-round-actions button:hover,
.vocabulary-round-actions button:focus-visible {
  border-color: rgba(255, 106, 0, 0.48);
  background: var(--primary-dark);
  box-shadow: 0 14px 28px rgba(255, 106, 0, 0.18);
  outline: none;
  transform: translateY(-1px);
}

.vocabulary-round-actions button.secondary {
  border-color: rgba(220, 231, 238, 0.94);
  background: #ffffff;
  color: var(--ink-soft);
}

.vocabulary-round-actions button.secondary:hover,
.vocabulary-round-actions button.secondary:focus-visible {
  border-color: rgba(255, 106, 0, 0.32);
  background: #fff8f2;
  color: var(--primary-dark);
  box-shadow: 0 12px 24px rgba(42, 53, 66, 0.08);
}

.site-footer {
  border-top-color: rgba(15, 23, 42, 0.06);
  background: rgba(251, 252, 253, 0.72);
  color: rgba(107, 114, 128, 0.78);
}

@media (max-width: 960px) {
  .learning-hero-inner {
    grid-template-columns: 1fr;
  }

  .vocabulary-heading {
    padding-top: 0;
  }

  .vocabulary-batch-control {
    justify-self: end;
  }
}

@media (max-width: 620px) {
  .vocabulary-page {
    min-height: auto;
    padding: 10px 0 28px;
  }

  .vocabulary-console {
    width: min(100% - 24px, 1080px);
    gap: 10px;
  }

  .learning-hero-inner {
    gap: 10px;
  }

  .vocabulary-heading {
    gap: 6px;
  }

  .vocabulary-heading h1 {
    font-size: 1.46rem;
  }

  .vocabulary-title-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .vocabulary-meta-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .vocabulary-change-course {
    min-height: 32px;
  }

  .vocabulary-heading p:not(.vocabulary-kicker) {
    font-size: 0.9rem;
  }

  .vocabulary-status {
    width: 100%;
    max-width: 100%;
    border-radius: 16px;
    font-size: 0.8rem;
  }

  .vocabulary-progress-card {
    gap: 8px;
    padding: 14px;
    border-radius: 18px;
  }

  .vocabulary-current-progress {
    padding-top: 2px;
  }

  .vocabulary-nav-cluster {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px;
    min-height: 40px;
    padding: 4px;
    border-radius: 999px;
  }

  .vocabulary-toolbar [data-word-progress] {
    grid-column: 1;
    text-align: left;
    padding-left: 10px;
  }

  .vocabulary-mini-button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.84rem;
  }

  .vocabulary-batch-control {
    grid-column: 2;
    width: auto;
    justify-content: flex-end;
    justify-self: end;
    min-height: 30px;
    padding: 0 4px 0 0;
    border-left: 0;
  }

  .vocabulary-batch-select {
    min-height: 30px;
  }

  .vocabulary-study-area {
    min-height: auto;
  }

  .vocabulary-word-card {
    gap: 14px;
    border-radius: 24px;
  }

  .vocabulary-pronunciation {
    width: 100%;
    gap: 10px;
  }

  .vocabulary-word {
    gap: 8px;
  }

  .vocabulary-word strong {
    font-size: clamp(2.76rem, 17vw, 4.2rem);
  }

  .vocabulary-audio-button {
    width: 48px;
    height: 48px;
  }

  .vocabulary-audio-button .vocabulary-audio-icon {
    width: 24px;
    height: 24px;
  }

  .vocabulary-phonetic {
    max-width: 100%;
    min-height: 34px;
    padding: 5px 14px 6px;
    font-size: clamp(1.08rem, 4.8vw, 1.24rem);
  }

  .vocabulary-auto-audio-toggle {
    min-height: 32px;
  }

  .vocabulary-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .vocabulary-actions button {
    min-height: 48px;
    border-radius: 14px;
    font-size: 0.9rem;
  }

  .vocabulary-card-nav {
    gap: 10px;
  }

  .vocabulary-card-nav button {
    min-height: 40px;
  }

  .vocabulary-summary {
    align-items: flex-start;
    border-radius: 18px;
    flex-direction: column;
  }

  .vocabulary-summary p {
    justify-content: flex-start;
  }

  .vocabulary-course-modal {
    align-items: end;
    padding: 12px;
  }

  .vocabulary-modal-panel {
    width: 100%;
    max-height: 86dvh;
    gap: 12px;
    padding: 18px;
    border-radius: 22px;
  }

  .vocabulary-course-option.is-current {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .vocabulary-course-option-action {
    width: 100%;
    min-height: 40px;
  }

  .vocabulary-round-actions {
    grid-template-columns: 1fr;
  }
}
