:root {
  --bg: #f7f5f3;
  --ink: #151313;
  --muted: #6d6662;
  --line: #dfd8d2;
  --panel: #ffffff;
  --panel-2: #f1eeeb;
  --accent: #c9172f;
  --accent-deep: #9f1024;
  --accent-soft: #fff0f2;
  --gold: #c88a34;
  --accent-2: #151313;
  --good: #16765f;
  --bad: #b91c1c;
  --shadow: 0 18px 48px rgba(25, 19, 17, 0.08);
  --shadow-soft: 0 8px 22px rgba(25, 19, 17, 0.06);
  --radius: 8px;
  --control-h: 40px;
}

* {
  box-sizing: border-box;
}

html.auth-pending body {
  visibility: hidden;
  pointer-events: none;
}

html {
  scrollbar-gutter: stable;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(247, 245, 243, 0) 280px),
    var(--bg);
  font-family: "Inter", "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

button,
select,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 30px;
}

body.screening-mode .app-shell {
  padding-bottom: 10px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.brand-title h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 900;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-logo {
  display: block;
  width: 37px;
  height: auto;
  flex: 0 0 auto;
}

.brand-title p {
  display: inline-block;
  margin: 2px 0 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-align: left;
  transform-origin: left center;
  white-space: nowrap;
}

@media (min-width: 861px) {
  .topbar {
    align-items: flex-start;
  }

  .brand-title {
    align-items: flex-start;
  }

  .brand-logo {
    margin-top: 2px;
  }

  .brand-copy {
    padding-top: 2px;
  }

  .brand-title h1 {
    line-height: 1;
  }

  .brand-title p {
    margin-top: 0;
    line-height: 1.08;
  }
}

.student-dashboard {
  border: 1px solid rgba(201, 23, 47, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(201, 23, 47, 0.16), rgba(201, 23, 47, 0.03) 42%, rgba(21, 19, 19, 0.04)) top left / 100% 3px no-repeat,
    #ffffff;
  box-shadow: var(--shadow-soft);
}

.student-menu {
  position: relative;
  display: grid;
  justify-items: end;
  flex: 0 0 auto;
}

.student-identity {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px 0 7px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
  box-shadow: none;
}

.student-identity strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.student-role {
  padding: 3px 6px;
  border: 1px solid rgba(201, 23, 47, 0.25);
  border-radius: 6px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 850;
}

.student-identity:hover {
  background: #f2efec;
}

.student-avatar {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  background: transparent;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
}

.student-avatar svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
  stroke: none;
}

.student-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.student-dropdown svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.student-caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--ink);
}

.student-dropdown {
  position: absolute;
  z-index: 40;
  top: calc(100% + 7px);
  right: 0;
  min-width: 154px;
  margin-top: 0;
  padding: 5px;
  border: 1px solid rgba(21, 19, 19, 0.1);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(25, 19, 17, 0.14);
}

.admin-menu-group {
  display: grid;
}

.student-dropdown-divider {
  display: block;
  height: 1px;
  margin: 4px 6px;
  background: var(--line);
}

.module-quick-entry {
  position: relative;
  flex: 0 0 auto;
}

.module-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.official-home-button {
  min-width: 96px;
  height: var(--control-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid rgba(21, 19, 19, 0.12);
  border-radius: var(--radius);
  color: var(--ink);
  background: #ffffff;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.official-home-button:hover {
  border-color: rgba(201, 23, 47, 0.34);
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.official-home-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.module-quick-button {
  width: auto;
  min-width: 124px;
  height: var(--control-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--accent);
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.module-quick-button:hover,
.module-quick-button[aria-expanded="true"] {
  color: #ffffff;
  border-color: var(--accent-deep);
  background: var(--accent-deep);
}

.module-quick-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.module-quick-button[aria-expanded="true"] svg {
  transform: rotate(90deg);
}

.module-quick-menu {
  position: absolute;
  z-index: 38;
  top: calc(100% + 7px);
  left: 0;
  width: 100%;
  min-width: 100%;
  padding: 5px;
  border: 1px solid rgba(21, 19, 19, 0.1);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(25, 19, 17, 0.14);
}

.module-quick-menu button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 4px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.module-option-icon,
.control-module-icon {
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.module-option-icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

.control-module-icon {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}

.module-quick-menu button:hover:not(:disabled) {
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.module-quick-menu button.active,
.module-quick-menu button:disabled {
  color: var(--accent);
  background: var(--accent-soft);
  cursor: default;
  opacity: 1;
}

.unified-select-menu {
  position: fixed;
  z-index: 300;
  max-width: calc(100vw - 20px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  touch-action: pan-y;
  padding: 5px;
  border: 1px solid rgba(21, 19, 19, 0.1);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(25, 19, 17, 0.14);
}

.unified-select-menu button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

.unified-select-menu button:hover:not(:disabled),
.unified-select-menu button.active {
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.unified-select-menu button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

select.unified-select-open {
  border-color: rgba(201, 23, 47, 0.48) !important;
  box-shadow: 0 0 0 3px rgba(201, 23, 47, 0.09);
}

.student-dropdown button {
  width: 100%;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
}

.student-dropdown button:hover {
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.student-dashboard {
  --practice-time-collapsed-width: 158px;
  --practice-time-expanded-width: 390px;
  --practice-time-motion: 500ms;
  --practice-time-ease: cubic-bezier(0.16, 1.06, 0.28, 1);
  position: relative;
  width: var(--practice-time-collapsed-width);
  max-width: var(--practice-time-expanded-width);
  min-height: 40px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  transition: width var(--practice-time-motion) var(--practice-time-ease);
}

.student-dashboard.is-expanded {
  width: var(--practice-time-expanded-width);
}

.practice-time-toggle {
  position: relative;
  width: 100%;
  height: var(--control-h);
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--ink);
  background: #f2efec;
  box-shadow: none;
}

.practice-time-summary,
.time-breakdown {
  position: absolute;
  inset: 0;
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0 10px;
  border-radius: var(--radius);
  white-space: nowrap;
}

.practice-time-summary {
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  opacity: 1;
  transform: translateX(0) scale(1);
  visibility: visible;
  transition:
    opacity 120ms ease,
    transform 235ms var(--practice-time-ease),
    visibility 0s linear;
}

.practice-time-summary b {
  color: var(--accent-deep);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.practice-time-hint {
  width: 0;
  height: 0;
  flex: 0 0 auto;
  border-top: 4px solid transparent;
  border-right: 6px solid var(--ink);
  border-bottom: 4px solid transparent;
  transition: transform 285ms var(--practice-time-ease);
}

.student-dashboard.is-expanded .practice-time-hint {
  transform: rotate(180deg);
}

.time-breakdown {
  padding: 0 5px;
  background: transparent;
  clip-path: inset(0 0 0 100% round var(--radius));
  opacity: 0;
  transform: translateX(18px);
  visibility: hidden;
  transition:
    clip-path var(--practice-time-motion) var(--practice-time-ease),
    opacity 220ms ease,
    transform 420ms var(--practice-time-ease),
    visibility 0s linear var(--practice-time-motion);
}

.student-dashboard.is-expanded .practice-time-summary {
  opacity: 0;
  transform: translateX(14px) scale(0.98);
  visibility: hidden;
  transition-delay: 0s, 0s, 120ms;
}

.student-dashboard.is-expanded .time-breakdown {
  clip-path: inset(0 round var(--radius));
  opacity: 1;
  transform: translateX(0);
  visibility: visible;
  transition-delay: 35ms, 70ms, 35ms, 0s;
}

.time-breakdown span {
  position: relative;
  flex: 0 0 auto;
  height: 100%;
  min-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 13px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.time-breakdown span + span::before {
  content: "|";
  position: absolute;
  left: -2px;
  color: rgba(21, 19, 19, 0.22);
  font-weight: 500;
}

.time-breakdown b {
  color: var(--accent-deep);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.control-strip {
  position: relative;
  z-index: 30;
  width: 100%;
  display: block;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.module-hub {
  margin-bottom: 18px;
}

.module-tabs {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.module-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid rgba(15, 118, 110, 0.26);
  border-radius: 8px;
  color: var(--accent-deep);
  background: #e8f4f1;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.module-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.95;
}

.module-tab.practice-module {
  padding-right: 18px;
}

.module-arrow {
  width: 9px;
  height: 9px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  transform: rotate(45deg);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.control-strip.is-expanded .module-arrow {
  transform: rotate(45deg);
}

.module-tab.active {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.16);
}

.screening-controls {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  flex: 1 1 auto;
  gap: 6px;
  padding: 0;
  overflow: visible;
  opacity: 1;
  transform: translateX(0);
  transform-origin: left center;
  visibility: visible;
  transition:
    width 320ms cubic-bezier(0.22, 1, 0.36, 1),
    max-width 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease,
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear;
}

.active-module-label {
  height: 44px;
  min-height: 44px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.control-module-entry {
  flex: 0 0 152px;
  width: 152px;
}

.practice-module-entry {
  flex-basis: 152px;
  width: 152px;
}

.control-module-button {
  width: 100%;
  gap: 10px;
  padding-right: 13px;
  padding-left: 14px;
  cursor: pointer;
}

.control-module-button:hover,
.control-module-button[aria-expanded="true"] {
  border-color: var(--accent-deep);
  background: var(--accent-deep);
}

.control-module-chevron {
  width: 0;
  height: 0;
  flex: 0 0 auto;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  border-top: 6px solid currentColor;
  transform: none;
  transition: transform 180ms ease;
}

.control-module-button[aria-expanded="true"] .control-module-chevron {
  transform: rotate(180deg);
}

.control-module-menu {
  width: 100%;
  min-width: 100%;
}

.screening-controls.is-collapsed {
  width: 0;
  max-width: 0;
  height: 0;
  min-height: 0;
  max-height: 0;
  flex: 0 0 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
  visibility: hidden;
  transition:
    width 260ms cubic-bezier(0.4, 0, 0.2, 1),
    max-width 260ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 150ms ease,
    transform 260ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s linear 260ms;
}

.screening-controls-row,
.screening-range-row {
  min-width: 0;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.screening-controls-row > strong,
.screening-range-row > strong {
  flex: 0 0 56px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.screening-controls select,
.screening-controls input[type="number"] {
  min-width: 0;
  min-height: 44px;
  height: 44px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 13px;
  font-weight: 800;
}

.range-select-group {
  min-width: 0;
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.range-select-group select {
  min-width: 0;
  padding-right: 28px;
  padding-left: 10px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
}

.range-select-group select + select {
  border-left: 1px solid var(--line);
}

.screening-range-select-group {
  height: 44px;
  flex: 0 0 180px;
  min-width: 180px;
}

.screening-range-select-group select {
  height: 42px;
  min-height: 42px;
}

#screeningBankProxy {
  flex: 0 0 170px;
  min-width: 170px;
}

#screeningModeProxy {
  flex: 0 0 154px;
  width: 154px;
  min-width: 154px;
  max-width: 154px;
  padding-right: 34px;
}

#screeningCountProxy {
  flex: 0 0 130px;
  width: 130px;
  min-width: 130px;
  max-width: 130px;
  padding-right: 34px;
  padding-left: 12px;
}

#screeningCustomCountProxy {
  flex: 0 0 62px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
}

#screeningStartProxy {
  flex: 0 0 98px;
  width: 98px;
  height: 44px;
  min-height: 44px;
  margin-right: 0;
  padding: 0 12px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

#screeningStartProxy:hover {
  border-color: var(--accent-deep);
  background: var(--accent-deep);
}

.screening-range-row select {
  flex: 1 1 70px;
}

#screeningStartPageProxy,
#screeningEndPageProxy {
  flex: 1.08 1 0;
  width: 0;
}

#screeningStartSideProxy,
#screeningEndSideProxy {
  flex: 0.92 1 0;
  width: 0;
}

#screeningSupplementsProxy {
  flex: 0 0 176px;
  width: 176px;
  min-width: 176px;
  font-size: 13px;
}

.screening-range-divider {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.screening-supplement-proxy {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.screening-supplement-proxy input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

.practice-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  overflow: visible;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  opacity: 1;
  transform: translateX(0);
  transform-origin: left center;
  visibility: visible;
  transition:
    width 320ms cubic-bezier(0.22, 1, 0.36, 1),
    max-width 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease,
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear;
}

.practice-controls .active-module-label {
  height: 44px;
  min-height: 44px;
}

.practice-controls.is-collapsed {
  width: 0;
  max-width: 0;
  height: 0;
  min-height: 0;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
  visibility: hidden;
  transition:
    width 260ms cubic-bezier(0.4, 0, 0.2, 1),
    max-width 260ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 150ms ease,
    transform 260ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s linear 260ms;
}

.screening-embed-view {
  width: 100%;
  height: max(572px, calc(100vh - 148px));
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.screening-embed-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--bg);
}

.random-panel {
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.random-panel.word-mode {
  min-height: auto;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 14px 16px;
}

.random-panel.word-mode .random-head {
  margin-bottom: 0;
}

.random-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.random-head strong {
  font-size: 17px;
}

.random-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.word-range-panel {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.word-range-panel label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.word-range-select-group {
  height: 40px;
}

.word-range-panel .word-range-select-group select {
  width: 102px;
  min-width: 102px;
  min-height: 38px;
  height: 38px;
  font-size: 14px;
  font-weight: 800;
}

.random-actions .compact,
.random-actions .primary-button {
  font-size: 15px;
  font-weight: 800;
}

#startRandom {
  min-width: 108px;
  padding-right: 14px;
  padding-left: 14px;
}

.compact {
  min-height: 38px;
  min-width: 76px;
}

.compact-select {
  min-height: 38px;
}

.compact-select select {
  min-height: 38px;
  min-width: 92px;
}

.random-count-select {
  gap: 0;
  min-height: 38px;
  padding: 0 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
  font-size: 15px;
  font-weight: 800;
}

.random-count-select span {
  color: var(--ink);
}

.random-count-select select {
  min-width: 76px;
  min-height: 36px;
  padding: 0 30px 0 2px;
  border: 0;
  background-color: transparent;
  font-size: 15px;
  font-weight: 800;
}

.topic-picker {
  display: grid;
  grid-template-columns: repeat(12, minmax(66px, 1fr));
  gap: 6px;
  overflow: visible;
  padding-bottom: 0;
}

.topic-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 30px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #fbfcfc;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.topic-chip input {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--accent);
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.topic-chip:has(input:checked) {
  color: #76470d;
  border-color: rgba(216, 146, 53, 0.72);
  background: #fff2d8;
}

.topic-chip:has(input:checked) input {
  transform: scale(1.08);
}

.topic-chip.is-selected {
  color: #76470d;
  border-color: rgba(216, 146, 53, 0.72);
  background: #fff2d8;
}

.topic-chip.is-disabled {
  cursor: not-allowed;
  opacity: 1;
  color: var(--ink);
}

.segmented {
  height: 44px;
  display: grid;
  grid-template-columns: repeat(4, 54px);
  gap: 4px;
  padding: 5px 3px;
  border-radius: 8px;
  background: var(--panel-2);
}

.segment {
  min-height: 28px;
  height: 28px;
  align-self: center;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 750;
}

.segment.active {
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 1px 6px rgba(20, 33, 31, 0.08);
}

.select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.random-count-select,
.random-count-select span,
.random-count-select select {
  font-size: 15px;
  font-weight: 800;
}

.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.toggle-wrap input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.timed-practice-control {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 0 0 auto;
}

.timed-toggle-wrap {
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.timed-toggle-wrap input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.timed-practice-control.is-enabled .timed-toggle-wrap {
  border-color: rgba(15, 118, 110, 0.42);
  color: var(--accent-deep);
  background: #f1f8f6;
}

.time-limit-select-wrap {
  width: 0;
  max-width: 0;
  min-width: 0;
  margin-left: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-6px);
  transition:
    width 220ms cubic-bezier(0.22, 1, 0.36, 1),
    max-width 220ms cubic-bezier(0.22, 1, 0.36, 1),
    margin-left 220ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 150ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.time-limit-select-wrap.is-visible {
  width: 116px;
  max-width: 116px;
  margin-left: 6px;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.time-limit-select-wrap select {
  width: 116px;
  min-width: 116px;
  height: 44px;
  min-height: 44px;
  padding-right: 30px;
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
}

select {
  appearance: none;
  min-width: 118px;
  min-height: 38px;
  padding: 0 42px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background-color: var(--panel);
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 24px) 50%, calc(100% - 18px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.mode-select-wrap select {
  width: 194px;
  min-width: 194px;
  height: 44px;
  min-height: 44px;
  padding-right: 32px;
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
}

#roundSize {
  min-width: 86px;
}

.control-strip .toggle-wrap {
  margin-left: 0;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 14px;
  row-gap: 10px;
}

.topic-card {
  position: relative;
  overflow: hidden;
  min-height: 164px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(216, 146, 53, 0.38), rgba(216, 146, 53, 0.06) 34%, rgba(216, 146, 53, 0.06) 66%, rgba(216, 146, 53, 0.38)) top left / 100% 4px no-repeat,
    linear-gradient(180deg, rgba(238, 248, 245, 0.9), #ffffff 44%);
  box-shadow: inset 0 4px 0 rgba(15, 118, 110, 0.16), 0 10px 28px rgba(20, 33, 31, 0.05);
  text-align: left;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.topic-card:not(.word-bank-card) {
  padding-top: 12px;
}

.topic-card::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 0;
  width: 4px;
  height: 34px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--gold) 0 28%, var(--accent) 28%);
  opacity: 0.75;
}

.topic-card:hover {
  border-color: rgba(15, 118, 110, 0.45);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.topic-card.is-selected {
  border-color: rgba(216, 146, 53, 0.72);
  background:
    linear-gradient(90deg, rgba(216, 146, 53, 0.7), rgba(216, 146, 53, 0.16) 34%, rgba(216, 146, 53, 0.16) 66%, rgba(216, 146, 53, 0.7)) top left / 100% 4px no-repeat,
    #fff8ed;
  box-shadow: inset 0 4px 0 rgba(216, 146, 53, 0.22), 0 10px 28px rgba(20, 33, 31, 0.06);
}

.topic-card.is-disabled {
  cursor: default;
  opacity: 1;
  filter: none;
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
}

.topic-card.is-disabled:hover {
  border-color: var(--line);
  box-shadow: inset 0 4px 0 rgba(15, 118, 110, 0.16), 0 10px 28px rgba(20, 33, 31, 0.05);
  transform: none;
}

.topic-card::after {
  content: "✓";
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--accent);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.72);
  transition: opacity 180ms ease, transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.topic-card.is-selected::after {
  opacity: 1;
  transform: scale(1);
}

.topic-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: 0;
}

.topic-card p {
  min-height: 18px;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.topic-meta {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--accent);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0;
}

.topic-meta::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  width: 42px;
  height: 3px;
  border-radius: 999px;
  background: var(--gold);
}

.topic-card:not(.word-bank-card) .topic-meta::before {
  top: -6px;
}

.topic-frequency {
  color: #8a9491;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-style: italic;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.word-bank-card p::after {
  content: "";
}

.word-bank-card {
  min-height: 178px;
  padding: 20px;
}

.word-bank-card p {
  display: none;
}

.word-bank-card .topic-meta {
  margin-top: 56px;
}

.word-bank-card.is-disabled .topic-meta {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
}

.practice-view {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 14px;
}

.hidden {
  display: none !important;
}

.practice-side,
.practice-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(20, 33, 31, 0.05);
}

.practice-side {
  padding: 14px;
}

.icon-button,
.ghost-button,
.primary-button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
}

.icon-button {
  width: 44px;
  display: inline-grid;
  place-items: center;
  font-size: 18px;
}

.icon-button.wide {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 800;
}

.icon-button.wide > span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.primary-button {
  min-width: 142px;
  border-color: var(--accent);
  color: white;
  background: var(--accent);
}

.ghost-button {
  min-width: 86px;
  padding: 0 16px;
}

.topic-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.topic-mini p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.topic-mini strong {
  font-size: 20px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--panel-2);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-deep);
  transition: width 180ms ease;
}

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

.mistake-box p {
  margin: 0 0 10px;
  font-weight: 850;
}

.mistake-list {
  display: grid;
  gap: 8px;
  max-height: min(620px, calc(100vh - 330px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 118, 110, 0.3) transparent;
}

.mistake-list::-webkit-scrollbar {
  width: 6px;
}

.mistake-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.3);
}

.mistake-list::-webkit-scrollbar-track {
  background: transparent;
}

.mistake-item {
  padding: 13px;
  border-radius: 8px;
  background: var(--panel-2);
  font-size: 13px;
  line-height: 1.28;
}

.mistake-item strong,
.mistake-en {
  display: block;
}

.mistake-item strong {
  margin-bottom: 8px;
}

.mistake-item.word-review .mistake-en {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 15.6px;
  font-weight: 850;
}

.mistake-item.word-review strong {
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 650;
}

.mistake-en {
  line-height: 1.22;
}

.mistake-reason {
  display: inline-block;
  margin-top: 10px;
  padding: 2px 7px;
  border: 1px solid rgba(216, 146, 53, 0.42);
  border-radius: 999px;
  color: #9a5d11;
  background: rgba(216, 146, 53, 0.14);
  font-size: 12px;
  font-weight: 850;
}

.practice-card {
  padding: 22px;
}

.prompt-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 18px;
}

.prompt-title-line {
  display: flex;
  align-items: baseline;
  min-width: 0;
  gap: 14px;
}

.prompt-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
  margin-left: auto;
}

.question-timer {
  min-width: 50px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid rgba(15, 118, 110, 0.26);
  border-radius: 8px;
  color: var(--accent-deep);
  background: #f1f8f6;
  font-size: 14px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.question-timer.is-urgent {
  border-color: rgba(154, 96, 40, 0.38);
  color: #8a6028;
  background: #fbf4e9;
}

.word-day-range {
  color: var(--muted);
  font-size: 18px;
  font-weight: 850;
  white-space: nowrap;
}

.practice-nav-row {
  display: none;
}

.completion-meta {
  display: inline-flex;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.topic-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px 1px;
  border: 1px solid rgba(216, 146, 53, 0.42);
  border-radius: 999px;
  color: #9a5d11;
  background: rgba(216, 146, 53, 0.14);
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
}

.zh-prompt,
.audio-prompt {
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  height: var(--prompt-fixed-height, 152px);
  min-height: var(--prompt-fixed-height, 152px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(216, 146, 53, 0.38), rgba(216, 146, 53, 0.06) 34%, rgba(216, 146, 53, 0.06) 66%, rgba(216, 146, 53, 0.38)) top left / 100% 4px no-repeat,
    linear-gradient(180deg, rgba(238, 248, 245, 0.9), #ffffff 44%);
  font-size: 30px;
  font-weight: 850;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: center;
}

.zh-prompt::before,
.audio-prompt::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 0;
  width: 4px;
  height: 34px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--gold) 0 28%, var(--accent) 28%);
  opacity: 0.72;
}

.zh-prompt.is-complete::after {
  content: "✓";
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--good);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(21, 128, 61, 0.22);
  animation: pop 180ms ease-out;
}

.zh-prompt.is-low-score {
  color: #8a6028;
  border-color: rgba(154, 93, 17, 0.28);
  background:
    linear-gradient(90deg, rgba(154, 93, 17, 0.3), rgba(154, 93, 17, 0.04) 34%, rgba(154, 93, 17, 0.04) 66%, rgba(154, 93, 17, 0.3)) top left / 100% 4px no-repeat,
    linear-gradient(180deg, #f4f5f4, #ffffff 52%);
  animation: lowScoreSettle 520ms ease-out;
}

.zh-prompt.is-low-score::after {
  content: "✓";
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #ffffff;
  background: #8a6028;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

@keyframes lowScoreSettle {
  from {
    opacity: 0.55;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.zh-prompt.is-bilingual {
  flex-direction: column;
  gap: 12px;
}

.practice-card.level-word,
.practice-card.level-collocation {
  --prompt-fixed-height: 152px;
}

.practice-card.level-sentence {
  --prompt-fixed-height: 176px;
}

.practice-card.level-paragraph {
  --prompt-fixed-height: 220px;
}

.practice-card.word-practice .zh-prompt,
.practice-card.word-practice .audio-prompt {
  height: 152px;
  min-height: 152px;
  margin-top: 6px;
}

.prompt-en,
.prompt-zh {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.prompt-en {
  color: var(--accent);
  font-family: "Arial Narrow", "Inter", "Segoe UI", Arial, sans-serif;
  font-size: 36px;
  font-weight: 950;
  line-height: 1.08;
  animation: promptEnglishReveal 190ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.prompt-zh {
  color: var(--ink);
  font-size: 23px;
  font-weight: 800;
  line-height: 1.32;
  animation: promptChineseSettle 210ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.zh-prompt.is-answer-assisted .prompt-en {
  color: var(--accent-2);
}

.audio-prompt {
  color: var(--muted);
  font-size: 24px;
}

.play-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 10px;
}

.practice-card.word-practice .speed-select {
  display: none;
}

.practice-card.word-practice .play-row {
  gap: 8px;
  margin-top: 18px;
  margin-bottom: 10px;
}

.practice-card.word-practice .answer-area {
  margin-top: 16px;
}

.practice-card.word-practice .word-inputs.is-vocabulary .letter-word {
  transform: translateY(-5px);
}

@keyframes promptEnglishReveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes promptChineseSettle {
  from { transform: translateY(-18px); }
  to { transform: translateY(0); }
}

.export-practice-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 850;
}

.practice-result-button {
  width: 112px;
  min-width: 112px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 850;
  white-space: nowrap;
}

.play-row #showAnswerButton,
.play-row #skipButton {
  width: 98px;
  min-width: 98px;
}

.practice-end-button {
  border: 1px solid var(--accent);
  color: #ffffff;
  background: var(--accent);
}

.export-practice-button:hover {
  border-color: var(--accent-deep);
  background: var(--accent-deep);
}

.review-nav-button {
  min-height: 42px;
  border: 1px solid rgba(15, 118, 110, 0.4);
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 850;
}

.review-nav-button:disabled {
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(15, 118, 110, 0.45);
  border-color: transparent;
}

.speed-select {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 4px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
  font-size: 13px;
  font-weight: 850;
}

.speed-select select {
  width: 37px;
  min-width: 37px;
  min-height: 32px;
  padding: 0 10px 0 0;
  border: 0;
  color: var(--ink);
  appearance: none;
  background: transparent;
  font-weight: 850;
  text-align: center;
}

.speed-select::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--muted);
  transform: translateY(-35%);
  pointer-events: none;
}

.audio-toggle-button {
  position: relative;
  width: 42px;
  min-width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent);
  background: var(--panel);
}

.audio-toggle-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.audio-toggle-button svg > path:first-child {
  fill: currentColor;
  stroke: none;
}

.audio-toggle-button .audio-off-mark {
  display: none;
}

.audio-toggle-button.is-muted {
  color: var(--muted);
  background: #f2f5f4;
}

.audio-toggle-button.is-muted .audio-icon-wave {
  display: none;
}

.audio-toggle-button.is-muted .audio-off-mark {
  position: absolute;
  top: 50%;
  right: 5px;
  display: block;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-52%);
}

.audio-toggle-button.is-muted svg {
  width: 18px;
  height: 18px;
  transform: translateX(-3px);
}

.strict-note {
  margin-top: 10px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.answer-area {
  display: grid;
  gap: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.word-inputs {
  width: 100%;
  min-height: 152px;
  display: grid;
  place-items: center;
  padding: 22px 16px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.word-input-flow {
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: flex-end;
  align-content: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 18px 10px;
}

.word-inputs.is-vocabulary {
  min-height: 108px;
  padding-top: 15px;
  padding-bottom: 17px;
}

.word-inputs.is-vocabulary.is-phrase .word-input-flow {
  column-gap: 24px;
}

.letter-word {
  position: relative;
  width: var(--field-width);
  max-width: 100%;
  display: grid;
  place-items: center;
  height: 54px;
}

.letter-word .word-field {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-bottom: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  padding: 0;
  font-family: "Arial Narrow", "Inter", "Segoe UI", Arial, sans-serif;
  font-weight: 900;
  letter-spacing: 16px;
  text-align: left;
}

.letter-slots {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 54px;
  display: grid;
  grid-template-columns: repeat(var(--letter-count), minmax(10px, 1fr));
  align-items: end;
  gap: 6px;
  pointer-events: none;
}

.letter-slot {
  position: relative;
  height: 34px;
  display: grid;
  place-items: center;
  border-bottom: 3px solid #cbd5d1;
  border-radius: 0;
  background: transparent;
}

.letter-slot.is-caret::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 8px solid var(--accent);
  transform: translateX(-50%);
}

.letter-char {
  min-height: 31px;
  color: var(--ink);
  font-family: "Arial Narrow", "Inter", "Segoe UI", Arial, sans-serif;
  font-size: 27px;
  font-weight: 950;
  -webkit-text-stroke: 0.2px currentColor;
  transform: scaleX(0.94);
  line-height: 1;
}

.letter-char.initial-hint {
  color: rgba(41, 72, 112, 0.58);
}

.word-field:focus + .letter-slots .letter-slot {
  border-bottom-color: var(--accent);
}

.word-field.correct + .letter-slots .letter-slot {
  border-bottom-color: var(--good);
}

.word-field.wrong + .letter-slots .letter-slot {
  border-bottom-color: var(--bad);
}

.word-field {
  width: var(--field-width);
  flex: 0 0 var(--field-width);
  min-width: 34px;
  max-width: 100%;
  height: 42px;
  border: 0;
  border-bottom: 2px solid #cbd5d1;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font-size: 25px;
  font-weight: 850;
  letter-spacing: 0;
  text-align: center;
}

.word-field:focus {
  outline: 0;
  border-bottom-color: var(--accent);
  background: rgba(232, 244, 241, 0.55);
}

.letter-word .word-field:focus {
  background: transparent;
}

.word-field.correct {
  border-bottom-color: var(--good);
}

.word-field.wrong {
  border-bottom-color: var(--bad);
  background: rgba(255, 247, 247, 0.65);
}

select:focus,
button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  outline-offset: 2px;
}

.feedback {
  min-height: 34px;
  margin: 14px 0;
  color: var(--muted);
  font-weight: 800;
}

.feedback.good {
  color: var(--good);
}

.success-feedback {
  display: flex;
  align-items: center;
  gap: 10px;
}

.success-mark {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--good);
  font-size: 20px;
  line-height: 1;
  animation: pop 180ms ease-out;
}

.success-mark.is-static {
  animation: none;
}

.success-mark.small {
  width: 24px;
  height: 24px;
  font-size: 16px;
}

.low-score-feedback {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8a6028;
}

.low-score-mark {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 30px;
  border-radius: 50%;
  color: #ffffff;
  background: #8a6028;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.speech-feedback {
  color: var(--muted);
}

.completion-summary-text {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
}

.completion-divider {
  margin: 0 18px;
}

.terminate-practice-dialog {
  width: min(390px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(20, 33, 31, 0.2);
}

.terminate-practice-dialog::backdrop {
  background: rgba(20, 33, 31, 0.3);
  backdrop-filter: blur(2px);
}

.terminate-practice-content {
  padding: 28px;
}

.terminate-practice-content h2 {
  margin: 0 0 24px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
}

.terminate-practice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.terminate-practice-actions button {
  min-height: 44px;
  border-radius: 7px;
  font-weight: 850;
}

.terminate-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--panel);
}

.continue-button {
  border: 1px solid var(--accent);
  color: #ffffff;
  background: var(--accent);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.75);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.feedback.bad {
  color: var(--bad);
}

.answer-reveal {
  color: var(--accent-2);
}

.action-row {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.action-row .primary-button,
.action-row .ghost-button {
  width: 112px;
  min-width: 112px;
}

.leaderboard-menu {
  position: relative;
}

.leaderboard-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

#returnTopicsButton:not(.is-leaderboard) {
  width: 132px;
  min-width: 132px;
  white-space: nowrap;
}

.leaderboard-trigger.is-leaderboard {
  position: relative;
  border-color: #c17a22;
  color: #ffffff;
  background: var(--gold);
  font-weight: 900;
  white-space: nowrap;
}

.action-row .leaderboard-trigger.is-leaderboard {
  width: 112px;
  min-width: 112px;
}

.leaderboard-trigger.is-leaderboard:hover {
  border-color: #a86518;
  background: #c98229;
}

.leaderboard-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.leaderboard-crown {
  position: absolute;
  top: -19px;
  right: 5px;
  width: 29px;
  height: 29px;
  overflow: visible;
  filter: drop-shadow(0 3px 4px rgba(149, 93, 23, 0.28));
  transform: rotate(8deg);
  animation: crownGlow 2.8s ease-in-out infinite;
}

.leaderboard-crown-shape {
  fill: url(#leaderboardCrownGold);
  stroke: rgba(167, 101, 14, 0.48);
  stroke-width: 0.5;
}

.leaderboard-crown-spark {
  fill: none;
  stroke: #ffe58a;
  stroke-width: 1.3;
  stroke-linecap: round;
  transform-origin: center;
  animation: crownSpark 2.8s ease-in-out infinite;
}

.leaderboard-crown-spark.spark-two {
  animation-delay: 0.65s;
}

.leaderboard-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  border: 1px solid rgba(216, 146, 53, 0.42);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(20, 33, 31, 0.2);
  overflow: hidden;
}

.leaderboard-dialog::backdrop {
  background: rgba(20, 33, 31, 0.28);
  backdrop-filter: blur(2px);
}

.leaderboard-dialog-content {
  max-height: calc(100dvh - 30px);
  padding: 22px 22px 14px;
  overflow: auto;
  animation: leaderboardDialogIn 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.leaderboard-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.leaderboard-dialog-title {
  position: relative;
  width: 112px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid #c17a22;
  border-radius: 8px;
  color: #ffffff;
  background: var(--gold);
}

.leaderboard-dialog-head h2 {
  margin: 0;
  color: inherit;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.leaderboard-title-crown {
  position: absolute;
  top: -19px;
  left: 5px;
  width: 29px;
  height: 29px;
  fill: url(#leaderboardCrownGold);
  filter: drop-shadow(0 3px 5px rgba(149, 93, 23, 0.26));
  transform: rotate(-8deg);
}

.leaderboard-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: var(--muted);
  background: #ffffff;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.leaderboard-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.leaderboard-close:hover {
  color: var(--accent);
  background: #f3faf8;
}

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

.leaderboard-board {
  min-width: 0;
  padding: 0 20px 0 0;
}

.leaderboard-board + .leaderboard-board {
  padding: 0 0 0 20px;
  border-left: 1px solid var(--line);
}

.leaderboard-board-head {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.leaderboard-head-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--gold);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.leaderboard-board-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
}

.leaderboard-list {
  display: grid;
  gap: 5px;
  padding: 8px 0 2px;
}

.leaderboard-row {
  min-height: 44px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.leaderboard-row.rank-1 {
  border-color: rgba(216, 146, 53, 0.48);
  background: #fff8ea;
}

.leaderboard-row.rank-2,
.leaderboard-row.rank-3 {
  background: #fbfcfc;
}

.leaderboard-row.is-current {
  border-color: var(--line);
  background: #ffffff;
}

.leaderboard-rank {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #8b5513;
  background: #fff0d7;
  font-weight: 900;
}

.leaderboard-row > span:last-child {
  color: var(--accent-deep);
  font-weight: 850;
}

.leaderboard-status,
.leaderboard-note {
  color: var(--muted);
  text-align: center;
}

.leaderboard-status {
  margin: 20px 0;
}

.leaderboard-note {
  margin: 12px 0 0;
  font-size: 12px;
}

.completion-confetti {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  pointer-events: none;
  contain: layout paint style;
}

.completion-confetti-piece {
  position: absolute;
  top: -18px;
  left: var(--x);
  width: var(--w);
  height: var(--h);
  border-radius: 2px;
  background: var(--color);
  opacity: 0;
  animation: completionConfettiFall var(--duration) cubic-bezier(0.16, 0.72, 0.38, 1) var(--delay) forwards;
}

@keyframes completionConfettiFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -10px, 0) rotate(0deg);
  }
  12% { opacity: 0.96; }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), 66vh, 0) rotate(var(--turn));
  }
}

@media (prefers-reduced-motion: reduce) {
  .prompt-en,
  .prompt-zh,
  .completion-confetti-piece {
    animation: none;
  }
}

@keyframes leaderboardDialogIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes crownGlow {
  0%, 100% { filter: drop-shadow(0 3px 4px rgba(149, 93, 23, 0.24)); }
  50% { filter: drop-shadow(0 3px 7px rgba(242, 193, 78, 0.58)); }
}

@keyframes crownSpark {
  0%, 28%, 100% { opacity: 0.25; transform: scale(0.8); }
  42% { opacity: 1; transform: scale(1.16); }
  56% { opacity: 0.35; transform: scale(0.9); }
}

@media (max-width: 700px) {
  .leaderboard-dialog {
    width: min(460px, calc(100vw - 20px));
  }

  .leaderboard-boards {
    grid-template-columns: 1fr;
  }

  .leaderboard-board,
  .leaderboard-board + .leaderboard-board {
    padding: 0;
    border-left: 0;
  }

  .leaderboard-board + .leaderboard-board {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
}

.icon-button.is-playing {
  border-color: var(--accent);
  color: var(--accent);
  background: #e8f4f1;
}

@media (min-width: 861px) and (max-width: 960px) {
  .topbar {
    gap: 12px;
  }

  .brand-title {
    gap: 10px;
  }

  .brand-title h1 {
    font-size: 20px;
  }

  .brand-title p {
    font-size: 11px;
  }

  .topbar-right {
    gap: 6px;
  }

  .student-dashboard {
    --practice-time-collapsed-width: 146px;
    --practice-time-expanded-width: 370px;
  }

  .time-breakdown {
    gap: 4px;
  }

  .time-breakdown span {
    padding-right: 7px;
    padding-left: 7px;
    font-size: 10.5px;
  }

  .student-identity {
    gap: 6px;
    padding-right: 7px;
  }
}

@media (min-width: 1201px) and (max-width: 1320px) {
  .screening-controls {
    gap: 6px;
  }

  #screeningBankProxy {
    flex-basis: 164px;
    min-width: 164px;
  }

  #screeningCountProxy {
    flex: 1 1 0;
    width: auto;
    min-width: 112px;
    max-width: none;
  }

  #screeningModeProxy {
    flex: 1 1 0;
    width: auto;
    min-width: 110px;
    max-width: none;
  }

  #screeningSupplementsProxy {
    flex-basis: 162px;
    width: 162px;
    min-width: 162px;
  }

  #screeningStartProxy {
    flex-basis: 98px;
    width: 98px;
  }
}

@media (min-width: 861px) and (max-width: 1200px) {
  .app-shell {
    width: calc(100% - 20px);
  }

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

  .screening-controls {
    gap: 6px;
  }

  .active-module-label {
    padding: 0 9px;
    font-size: 12px;
  }

  .control-module-entry {
    flex-basis: 116px;
    width: 116px;
  }

  .control-module-button {
    gap: 6px;
    padding-right: 8px;
    padding-left: 9px;
  }

  .control-module-menu {
    min-width: 100%;
  }

  .screening-controls select,
  .screening-controls input[type="number"] {
    padding-right: 23px;
    padding-left: 7px;
    font-size: 13px;
  }

  .screening-range-select-group select {
    padding-right: 21px;
    padding-left: 6px;
    background-position: calc(100% - 14px) 50%, calc(100% - 8px) 50%;
  }

  #screeningBankProxy {
    flex: 0 0 150px;
    min-width: 150px;
  }

  .screening-range-select-group {
    flex-basis: 150px;
    min-width: 150px;
  }

  #screeningCountProxy {
    flex: 1 1 0;
    width: auto;
    min-width: 105px;
    max-width: none;
    padding-right: 21px;
    padding-left: 6px;
  }

  #screeningModeProxy {
    flex: 1 1 0;
    width: auto;
    min-width: 92px;
    max-width: none;
    padding-right: 21px;
    padding-left: 6px;
  }

  #screeningSupplementsProxy {
    flex-basis: 140px;
    width: 140px;
    min-width: 140px;
    font-size: 13px;
  }

  #screeningStartProxy {
    flex-basis: 98px;
    padding: 0 8px;
    font-size: 14px;
  }
}

@media (max-width: 860px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .brand-logo {
    width: 39px;
  }

  .brand-title h1 {
    font-size: 20px;
  }

  .student-identity,
  .student-dashboard,
  .student-dashboard.is-expanded {
    min-width: 0;
    width: 100%;
    max-width: none;
  }

  .topbar-right {
    align-items: stretch;
    flex-direction: column;
  }

  .time-breakdown {
    width: 100%;
  }

  .time-breakdown span {
    flex: 1 1 0;
    padding-right: 5px;
    padding-left: 5px;
    font-size: 10.5px;
  }

  .control-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .module-tabs,
  .practice-controls,
  .screening-controls-row,
  .screening-range-row {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .module-tabs {
    grid-template-columns: 1fr;
  }

  .practice-controls,
  .screening-controls {
    width: 100%;
    max-width: 100%;
  }

  .screening-controls {
    flex-wrap: wrap;
  }

  .practice-controls.is-collapsed,
  .screening-controls.is-collapsed {
    width: 0;
    max-width: 0;
    max-height: 0;
  }

  .screening-controls-row > strong,
  .screening-range-row > strong {
    flex-basis: 100%;
  }

  .screening-embed-view {
    height: max(680px, calc(100vh - 240px));
  }

  .random-head {
    align-items: stretch;
    flex-direction: column;
  }

  .random-actions {
    justify-content: flex-start;
  }

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

  .topic-grid,
  .practice-view {
    grid-template-columns: 1fr;
  }

  .zh-prompt,
  .audio-prompt {
    font-size: 24px;
  }

  .word-field {
    height: 44px;
    font-size: 23px;
  }
}

.topbar {
  min-height: 52px;
  margin-bottom: 18px;
}

.brand-title {
  gap: 12px;
}

.brand-logo {
  width: 40px;
}

.brand-title h1 {
  color: var(--ink);
  font-size: 21px;
  font-weight: 900;
}

.brand-title p {
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 850;
}

.official-home-button,
.module-quick-button,
.student-identity,
.active-module-label,
.screening-controls select,
.screening-controls input[type="number"],
.range-select-group,
.segmented,
.mode-select-wrap select,
.timed-toggle-wrap,
.time-limit-select-wrap select,
.toggle-wrap,
.random-count-select,
.compact,
.primary-button,
.ghost-button,
.icon-button {
  border-radius: var(--radius);
}

.official-home-button,
.student-identity,
.time-breakdown,
.active-module-label,
.screening-controls select,
.range-select-group,
.mode-select-wrap select,
.timed-toggle-wrap,
.time-limit-select-wrap select,
.random-count-select,
.compact,
.primary-button,
.ghost-button,
.icon-button {
  box-shadow: none;
}

.module-tabs {
  gap: 8px;
}

.module-tab {
  min-height: 56px;
  border-color: rgba(21, 19, 19, 0.12);
  color: var(--ink);
  background: #ffffff;
  font-size: 16px;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.module-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 23, 47, 0.3);
  color: var(--accent-deep);
  background: #fffafa;
}

.module-tab.active {
  border-color: var(--accent);
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 12px 28px rgba(201, 23, 47, 0.18);
}

.module-icon,
.module-option-icon,
.control-module-icon {
  stroke-width: 2.05;
}

.control-strip {
  margin-top: -4px;
}

.screening-controls,
.practice-controls {
  gap: 7px;
}

.active-module-label,
#screeningStartProxy {
  background: var(--accent);
  border-color: var(--accent);
}

.active-module-label:hover,
.active-module-label[aria-expanded="true"],
#screeningStartProxy:hover,
.primary-button:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.screening-controls select,
.screening-controls input[type="number"],
select,
.random-count-select,
.timed-toggle-wrap,
.mode-select-wrap select,
.time-limit-select-wrap select {
  border-color: rgba(21, 19, 19, 0.13);
  color: var(--ink);
  background-color: #ffffff;
  font-weight: 800;
}

select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
}

.range-select-group {
  border-color: rgba(21, 19, 19, 0.13);
  background: #ffffff;
}

.range-select-group select + select {
  border-left-color: rgba(21, 19, 19, 0.13);
}

.segmented {
  background: #ebe7e4;
  padding: 3px;
}

.segment {
  color: var(--muted);
  font-weight: 760;
  transition:
    transform 160ms cubic-bezier(0.22, 1, 0.36, 1),
    color 160ms ease,
    background-color 160ms ease;
}

.segment.active {
  color: #ffffff;
  background: var(--ink);
  box-shadow: none;
}

.timed-practice-control.is-enabled .timed-toggle-wrap {
  border-color: rgba(201, 23, 47, 0.3);
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.toggle-wrap input,
.timed-toggle-wrap input {
  accent-color: var(--accent);
}

.random-panel,
.practice-side,
.practice-card,
.topic-card,
.word-bank-card {
  border-color: rgba(21, 19, 19, 0.12);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.random-panel {
  padding: 15px 16px;
}

.random-head strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.topic-chip {
  border-color: rgba(21, 19, 19, 0.12);
  color: var(--muted);
  background: #ffffff;
  font-weight: 780;
}

.topic-chip:hover {
  border-color: rgba(201, 23, 47, 0.28);
  color: var(--accent-deep);
}

.topic-chip:has(input:checked),
.topic-chip.is-selected {
  color: #7d1c24;
  border-color: rgba(201, 23, 47, 0.38);
  background: #fff0f2;
}

.topic-card {
  background:
    linear-gradient(180deg, rgba(201, 23, 47, 0.08), rgba(255, 255, 255, 0) 56px),
    #ffffff;
  box-shadow: var(--shadow-soft);
}

.topic-card::before {
  width: 3px;
  background: var(--accent);
  opacity: 0.9;
}

.topic-card:hover {
  border-color: rgba(201, 23, 47, 0.28);
  box-shadow: 0 14px 34px rgba(25, 19, 17, 0.1);
}

.topic-card.is-selected {
  border-color: rgba(201, 23, 47, 0.48);
  background:
    linear-gradient(180deg, rgba(201, 23, 47, 0.12), rgba(255, 255, 255, 0) 64px),
    #fffafa;
  box-shadow: 0 14px 34px rgba(25, 19, 17, 0.08);
}

.topic-card::after {
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(201, 23, 47, 0.22);
}

.topic-card h2 {
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
}

.topic-card p {
  color: var(--muted);
  font-weight: 650;
}

.topic-meta {
  color: var(--accent);
  font-weight: 850;
}

.topic-meta::before {
  background: var(--accent);
}

.topic-frequency {
  color: #9a918c;
  font-family: "Aptos", "Segoe UI", "Microsoft YaHei UI", sans-serif;
  font-size: 14.5px;
  font-style: normal;
  font-weight: 700;
}

.practice-view {
  gap: 16px;
}

.practice-card {
  overflow: visible;
}

.primary-button {
  border-color: var(--accent);
  background: var(--accent);
}

.ghost-button,
.icon-button {
  border-color: rgba(21, 19, 19, 0.13);
  background: #ffffff;
}

.ghost-button:hover,
.icon-button:hover {
  border-color: rgba(201, 23, 47, 0.32);
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.module-quick-menu,
.student-dropdown,
.unified-select-menu,
.control-module-menu,
.leaderboard-dialog,
.terminate-practice-dialog {
  border-color: rgba(21, 19, 19, 0.1);
  box-shadow: 0 18px 40px rgba(25, 19, 17, 0.15);
}

.zh-prompt,
.audio-prompt,
.ready-word {
  color: #a6a09c;
  font-family: "Aptos Display", "Aptos", "Segoe UI", "Microsoft YaHei UI", sans-serif;
  font-weight: 800;
}

.word-field {
  border-color: rgba(21, 19, 19, 0.14);
}

@media (prefers-reduced-motion: reduce) {
  .module-tab,
  .segment,
  .topic-card,
  .topic-chip {
    transition: none !important;
    transform: none !important;
  }
}
