:root {
  --ink: #172033;
  --ink-soft: #344054;
  --muted: #667085;
  --muted-light: #98a2b3;
  --line: #dfe5ec;
  --line-soft: #edf0f4;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --canvas: #f3f5f8;
  --primary: #2457c5;
  --primary-dark: #1c46a1;
  --primary-soft: #eaf0ff;
  --teal: #0f8f82;
  --teal-soft: #e7f7f4;
  --green: #1b8d52;
  --green-soft: #e9f7ef;
  --amber: #c77808;
  --amber-soft: #fff4dc;
  --rose: #c9435b;
  --rose-soft: #ffedf1;
  --shadow: 0 10px 28px rgba(23, 32, 51, 0.07);
  --font: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
[data-action],
[data-nav] {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(36, 87, 197, 0.24);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
}

svg {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 999;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--primary);
  font-size: 13px;
  font-weight: 700;
  transform: translateY(-130%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 22px 16px 18px;
  border-right: 1px solid #dbe0e8;
  background: #ffffff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 6px 22px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  background: var(--primary);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand strong {
  font-size: 16px;
  letter-spacing: -0.02em;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.main-nav button {
  display: grid;
  grid-template-columns: 39px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  transition: color 160ms ease, background-color 160ms ease;
}

.main-nav button:hover {
  color: var(--ink);
  background: #f3f6fb;
}

.main-nav button.is-active {
  color: var(--primary);
  background: var(--primary-soft);
}

.main-nav button > svg {
  width: 21px;
  height: 21px;
  margin: auto;
}

.main-nav button > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.main-nav strong {
  font-size: 13px;
}

.main-nav small {
  color: inherit;
  font-size: 10px;
  opacity: 0.72;
}

.sidebar-panel {
  margin-top: 28px;
  padding-top: 21px;
  border-top: 1px solid var(--line-soft);
}

.textbook-button {
  display: grid;
  grid-template-columns: 42px 1fr 16px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 65px;
  margin-top: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  text-align: left;
}

.book-cover {
  display: grid;
  width: 39px;
  height: 45px;
  place-items: center;
  border-radius: 5px 8px 8px 5px;
  color: #ffffff;
  background: #315da8;
  font-size: 12px;
  font-weight: 850;
}

.textbook-button > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.textbook-button strong {
  font-size: 12px;
}

.textbook-button small {
  color: var(--muted);
  font-size: 10px;
}

.textbook-button > svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.sidebar-class {
  display: grid;
  grid-template-columns: 38px 1fr 32px;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 11px 8px;
  border-top: 1px solid var(--line-soft);
}

.class-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--teal);
  font-size: 14px;
  font-weight: 850;
}

.sidebar-class > div:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.sidebar-class strong {
  font-size: 11px;
}

.sidebar-class small {
  color: var(--muted);
  font-size: 9px;
}

.sidebar-class button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
}

.sidebar-class button:hover {
  background: #f0f3f7;
}

.sidebar-class button svg {
  width: 15px;
  height: 15px;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 25;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 28px;
  border-bottom: 1px solid rgba(219, 224, 232, 0.94);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb svg {
  width: 13px;
  height: 13px;
}

.breadcrumb strong {
  color: var(--ink);
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.test-mode-toggle {
  display: grid;
  grid-template-columns: 20px 1fr 38px;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 5px 8px 5px 10px;
  border: 1px solid #c7d8f4;
  border-radius: 8px;
  color: var(--primary-dark);
  background: #f5f8ff;
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.test-mode-toggle:hover {
  border-color: #9fb8e7;
  background: #edf3ff;
}

.test-mode-toggle > svg {
  width: 18px;
  height: 18px;
}

.test-mode-toggle > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.test-mode-toggle strong {
  font-size: 9px;
}

.test-mode-toggle small {
  color: #5575ad;
  font-size: 7px;
}

.mode-switch {
  position: relative;
  display: block;
  width: 35px;
  height: 20px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background-color 160ms ease;
}

.mode-switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(23, 32, 51, 0.2);
  transition: transform 160ms ease;
}

.test-mode-toggle.is-on .mode-switch {
  background: var(--primary);
}

.test-mode-toggle.is-on .mode-switch i {
  transform: translateX(15px);
}

.role-switch-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid #cdd8e9;
  border-radius: 8px;
  color: var(--teal);
  background: #ffffff;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.role-switch-button:hover {
  border-color: #9ed8cf;
  background: var(--teal-soft);
}

.role-switch-button svg {
  width: 16px;
  height: 16px;
}

.topbar-stat,
.student-button,
.icon-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.topbar-stat {
  gap: 8px;
  padding: 0 11px;
}

.topbar-stat > svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.topbar-stat > span {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}

.topbar-stat strong {
  font-size: 10px;
}

.topbar-stat small {
  color: var(--muted);
  font-size: 8px;
}

.icon-button {
  position: relative;
  min-width: 44px;
  justify-content: center;
  color: var(--ink-soft);
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.icon-button:hover {
  border-color: #bdcbe1;
  color: var(--primary);
  background: #f8faff;
}

.icon-button > svg {
  width: 18px;
  height: 18px;
}

.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  color: #ffffff;
  background: var(--rose);
  font-size: 8px;
  font-weight: 850;
}

.student-button {
  gap: 8px;
  padding: 5px 9px 5px 6px;
}

.student-avatar {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--primary);
  font-size: 11px;
  font-weight: 850;
}

.student-button > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}

.student-button strong {
  font-size: 10px;
}

.student-button small {
  color: var(--muted);
  font-size: 8px;
}

.student-button > svg {
  width: 13px;
  height: 13px;
  color: var(--muted);
}

.main-content {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px 32px 56px;
}

.app-screen {
  display: none;
  animation: screen-in 180ms ease-out;
}

.app-screen.is-active {
  display: block;
}

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

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-heading.compact-heading {
  align-items: center;
}

.page-heading h1 {
  margin: 5px 0 6px;
  font-size: 30px;
  letter-spacing: -0.035em;
}

.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.test-mode-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 13px 14px;
  border: 1px solid #bfd2f2;
  border-radius: 8px;
  color: var(--primary-dark);
  background: #f3f7ff;
}

.test-mode-banner.is-hidden {
  display: none;
}

.test-mode-banner > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.test-mode-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--primary);
}

.test-mode-icon svg {
  width: 18px;
  height: 18px;
}

.test-mode-banner strong {
  font-size: 11px;
}

.test-mode-banner p {
  margin: 3px 0 0;
  color: #5873a4;
  font-size: 9px;
}

.primary-button.compact-test {
  min-height: 39px;
  flex: 0 0 auto;
  padding: 0 12px;
  font-size: 10px;
  box-shadow: none;
}

.eyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-button,
.secondary-button,
.text-button,
.back-link {
  border: 0;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.primary-button {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(36, 87, 197, 0.18);
}

.primary-button:hover {
  background: var(--primary-dark);
}

.secondary-button {
  border: 1px solid #d4dce7;
  color: var(--ink-soft);
  background: #ffffff;
}

.secondary-button:hover {
  border-color: #b8c8e1;
  color: var(--primary);
  background: #f8faff;
}

.primary-button svg,
.secondary-button svg {
  width: 16px;
  height: 16px;
}

.primary-button.full,
.secondary-button.full {
  width: 100%;
}

.text-button {
  min-height: 36px;
  padding: 0 4px;
  color: var(--primary);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.back-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  margin-bottom: 11px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.back-link:hover {
  color: var(--primary);
}

.back-link svg {
  width: 15px;
  height: 15px;
}

.overview-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.overview-strip article {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 11px;
  min-height: 88px;
  padding: 14px 16px;
  border-right: 1px solid var(--line-soft);
}

.overview-strip article:last-child {
  border-right: 0;
}

.overview-icon,
.review-icon,
.mini-icon,
.mode-icon,
.my-card-icon {
  display: grid;
  place-items: center;
}

.overview-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.overview-icon.blue,
.review-icon.blue,
.mini-icon.blue,
.mode-icon.blue,
.my-card-icon.blue {
  color: var(--primary);
  background: var(--primary-soft);
}

.overview-icon.green,
.review-icon.green,
.mini-icon.green,
.mode-icon.green {
  color: var(--green);
  background: var(--green-soft);
}

.overview-icon.amber,
.review-icon.amber,
.mini-icon.amber,
.mode-icon.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.overview-icon.teal,
.mode-icon.teal {
  color: var(--teal);
  background: var(--teal-soft);
}

.review-icon.rose,
.mode-icon.rose {
  color: var(--rose);
  background: var(--rose-soft);
}

.overview-icon svg,
.review-icon svg,
.mini-icon svg,
.mode-icon svg,
.my-card-icon svg {
  width: 19px;
  height: 19px;
}

.overview-strip article > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.overview-strip strong {
  font-size: 20px;
  letter-spacing: -0.03em;
}

.overview-strip small {
  color: var(--muted);
  font-size: 10px;
}

.delta {
  white-space: nowrap;
  font-size: 9px;
  font-weight: 750;
}

.delta.positive {
  color: var(--green);
}

.delta.warning {
  color: var(--amber);
}

.delta.neutral {
  color: var(--muted);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 334px;
  align-items: start;
  gap: 22px;
}

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

.main-column,
.side-column {
  min-width: 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.section-heading.compact {
  align-items: flex-start;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.unit-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.unit-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(23, 32, 51, 0.03);
}

.unit-head {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 12px;
}

.unit-number {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 6px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 10px;
  font-weight: 850;
}

.unit-head > div {
  min-width: 0;
}

.unit-head h3 {
  margin: 0 0 4px;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unit-head p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.unit-progress {
  color: var(--primary);
  font-size: 16px;
  font-weight: 850;
}

.unit-progress-bar,
.progress-track,
.flow-summary-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebf1;
}

.unit-progress-bar {
  margin: 15px 0;
}

.unit-progress-bar > span,
.progress-track > span,
.flow-summary-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.unit-progress-bar.empty > span {
  background: transparent;
}

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

.group-task {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 11px;
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.group-task:hover:not(:disabled) {
  border-color: #b9c9e4;
  background: #f8faff;
  transform: translateY(-1px);
}

.group-task.is-complete {
  background: #fbfdfc;
}

.group-task.is-current {
  border-color: #a8bde8;
  background: #f5f8ff;
  box-shadow: 0 0 0 2px rgba(36, 87, 197, 0.06);
}

.group-code {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 13px;
  font-weight: 850;
}

.group-task.is-complete .group-code {
  color: var(--green);
  background: var(--green-soft);
}

.group-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.group-copy strong {
  font-size: 11px;
}

.group-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-status {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 800;
}

.group-status svg {
  width: 11px;
  height: 11px;
}

.group-status.complete {
  color: var(--green);
}

.group-status.current {
  padding: 4px 7px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--primary);
}

.group-status.locked {
  color: var(--muted-light);
}

.side-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.side-card + .side-card {
  margin-top: 14px;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.review-list button {
  display: grid;
  grid-template-columns: 37px 1fr 16px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-soft);
  text-align: left;
}

.review-list button:hover {
  background: #eef3fb;
}

.review-icon {
  width: 37px;
  height: 37px;
  border-radius: 8px;
}

.review-list button > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.review-list strong {
  font-size: 10px;
}

.review-list small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-list button > svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.wordbook-preview {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
}

.mini-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.wordbook-preview > div {
  min-width: 0;
}

.wordbook-preview strong {
  font-size: 11px;
}

.wordbook-preview p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.wordbook-preview button {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid #d3dce9;
  border-radius: 7px;
  color: var(--primary);
  background: #ffffff;
  font-size: 9px;
  font-weight: 800;
}

.record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.record-head > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.record-head strong {
  font-size: 13px;
}

.record-head > span {
  color: var(--muted);
  font-size: 8px;
}

.week-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 8px;
  height: 120px;
  margin-top: 17px;
  padding-top: 12px;
  border-bottom: 1px solid var(--line);
}

.week-bars > div {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.week-bars span {
  width: 100%;
  min-height: 7px;
  border-radius: 5px 5px 0 0;
  background: #cbd8ee;
}

.week-bars > div:nth-child(4) span {
  background: var(--primary);
}

.week-bars small {
  color: var(--muted);
  font-size: 8px;
}

.stage-count,
.group-chip,
.task-progress-chip,
.timer-info {
  display: inline-flex;
  min-height: 38px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-soft);
  background: #ffffff;
  font-size: 10px;
  font-weight: 800;
}

.process-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.process-heading {
  display: flex;
  align-items: center;
  gap: 11px;
}

.process-index {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--primary);
  font-size: 11px;
  font-weight: 850;
}

.process-heading > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.process-heading strong {
  font-size: 12px;
}

.process-heading small {
  color: var(--muted);
  font-size: 9px;
}

.process-progress {
  display: flex;
  align-items: center;
  gap: 5px;
}

.process-progress span {
  width: 28px;
  height: 5px;
  border-radius: 999px;
  background: #e5e9ef;
}

.process-progress span.is-active {
  background: var(--primary);
}

.precheck-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
}

.precheck-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.precheck-item.is-known {
  border-color: #9dd4b3;
  background: #f8fdf9;
}

.precheck-item.is-unknown {
  border-color: #a9bde6;
  background: #f7f9ff;
}

.precheck-word {
  text-align: center;
}

.precheck-word > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.precheck-word h2 {
  margin: 11px 0 5px;
  overflow-wrap: anywhere;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.precheck-word p {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 10px;
}

.precheck-word .small-sound {
  width: 34px;
  height: 34px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--primary);
  background: #ffffff;
}

.precheck-word .small-sound svg {
  width: 15px;
  height: 15px;
  margin: auto;
}

.precheck-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 17px;
}

.precheck-choice button {
  min-height: 39px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #ffffff;
  font-size: 10px;
  font-weight: 800;
}

.precheck-choice button.is-selected.known {
  border-color: #7ec99b;
  color: #12683a;
  background: var(--green-soft);
}

.precheck-choice button.is-selected.unknown {
  border-color: #91ace0;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.sticky-action-bar {
  position: sticky;
  z-index: 20;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #cfd9e8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(23, 32, 51, 0.12);
  backdrop-filter: blur(14px);
}

.sticky-action-bar > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sticky-action-bar strong {
  font-size: 12px;
}

.sticky-action-bar small {
  color: var(--muted);
  font-size: 9px;
}

.flow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 20px;
}

.flow-board {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.flow-summary {
  display: grid;
  grid-template-columns: 150px minmax(120px, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.flow-summary > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flow-summary strong {
  font-size: 15px;
}

.learning-record {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--teal);
  font-size: 9px;
  font-weight: 750;
}

.learning-record svg {
  width: 14px;
  height: 14px;
}

.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.word-progress-card {
  display: grid;
  grid-template-columns: 42px 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.word-progress-card:hover:not(.is-locked) {
  border-color: #b8c8e2;
  transform: translateY(-1px);
}

.word-progress-card.is-current {
  border-color: #9db5e6;
  background: #f6f9ff;
  box-shadow: 0 0 0 2px rgba(36, 87, 197, 0.06);
}

.word-progress-card.is-complete {
  background: #fbfdfc;
}

.word-progress-card.is-locked {
  color: var(--muted-light);
  background: #f8f9fb;
}

.word-progress-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 850;
}

.word-progress-card.is-complete .word-progress-number {
  color: var(--green);
  background: var(--green-soft);
}

.word-progress-card.is-locked .word-progress-number {
  color: #98a2b3;
  background: #e9edf2;
}

.word-progress-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.word-progress-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-progress-copy small {
  color: var(--muted);
  font-size: 9px;
}

.word-progress-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.word-progress-steps > span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 7px;
  color: #9aa4b2;
  background: #f0f2f5;
  font-size: 8px;
  font-weight: 750;
}

.word-progress-steps > span.is-current {
  color: var(--primary);
  background: var(--primary-soft);
}

.word-progress-steps > span.is-done {
  color: #11613d;
  background: var(--green-soft);
}

.word-progress-steps svg {
  width: 11px;
  height: 11px;
}

.flow-step {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 13px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.flow-step:hover:not(.is-locked) {
  border-color: #b8c8e2;
  transform: translateY(-1px);
}

.flow-step.is-current {
  border-color: #9db5e6;
  background: #f6f9ff;
  box-shadow: 0 0 0 2px rgba(36, 87, 197, 0.06);
}

.flow-step.is-complete {
  background: #fbfdfc;
}

.flow-step.is-locked {
  color: var(--muted-light);
  background: #f8f9fb;
}

.flow-step-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 850;
}

.flow-step.is-complete .flow-step-number {
  color: var(--green);
  background: var(--green-soft);
}

.flow-step.is-locked .flow-step-number {
  color: #98a2b3;
  background: #e9edf2;
}

.flow-step-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.flow-step-copy strong {
  font-size: 12px;
}

.flow-step-copy small {
  color: var(--muted);
  font-size: 9px;
}

.flow-step-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-size: 9px;
  font-weight: 800;
}

.flow-step-state svg {
  width: 12px;
  height: 12px;
}

.flow-step.is-complete .flow-step-state {
  color: var(--green);
}

.flow-step.is-locked .flow-step-state {
  color: var(--muted-light);
}

.rule-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #d7e2f6;
  border-radius: 8px;
  color: var(--primary-dark);
  background: #f5f8ff;
}

.rule-note svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.rule-note p {
  margin: 0;
  font-size: 9px;
  line-height: 1.6;
}

.group-word-list {
  display: flex;
  flex-direction: column;
}

.group-word-list > div {
  display: grid;
  grid-template-columns: 22px 1fr auto 17px;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  border-bottom: 1px solid var(--line-soft);
}

.group-word-list > div:last-child {
  border-bottom: 0;
}

.group-word-list span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: #eef1f5;
  font-size: 8px;
  font-weight: 800;
}

.group-word-list strong {
  font-size: 10px;
}

.group-word-list small {
  color: var(--muted);
  font-size: 8px;
}

.group-word-list svg {
  width: 15px;
  height: 15px;
  color: #cbd2dc;
}

.group-word-list > div.is-current {
  color: var(--primary);
}

.group-word-list > div.is-current svg {
  color: var(--primary);
}

.group-word-list > div.is-complete svg {
  color: var(--green);
}

.group-word-list > div.is-locked {
  color: var(--muted-light);
}

.learning-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  gap: 20px;
}

.learning-stage,
.question-stage,
.input-stage,
.sentence-learning-stage,
.sentence-order-stage,
.oral-stage {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.learning-stage {
  min-height: 570px;
  padding: 22px;
}

.word-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.word-order {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.13em;
}

.inline-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 750;
}

.inline-status svg {
  width: 14px;
  height: 14px;
}

.pronunciation-word {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 44px 0 30px;
  text-align: center;
}

.pronunciation-word h2 {
  margin: 0 0 11px;
  font-size: 58px;
  letter-spacing: -0.055em;
}

.pronunciation-word p {
  display: flex;
  align-items: center;
  gap: 1px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 17px;
}

.pronunciation-word p span.is-weak {
  color: var(--rose);
  font-weight: 800;
}

.sound-button {
  display: grid;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--primary);
  background: #ffffff;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.sound-button:hover {
  border-color: #9fb7e7;
  background: var(--primary-soft);
}

.sound-button.hero {
  width: 84px;
  height: 84px;
  min-width: 84px;
  min-height: 84px;
  border: 0;
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 12px 28px rgba(36, 87, 197, 0.24);
}

.sound-button.hero:hover {
  color: #ffffff;
  background: var(--primary-dark);
}

.sound-button.hero svg {
  width: 29px;
  height: 29px;
}

.sound-button.compact-hero {
  width: 66px;
  height: 66px;
  min-width: 66px;
  min-height: 66px;
}

.sound-button.compact-hero svg {
  width: 24px;
  height: 24px;
}

.recording-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 132px;
}

.mic-button,
.record-button {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: var(--teal);
  transition: background-color 160ms ease, transform 160ms ease;
}

.mic-button {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(15, 143, 130, 0.2);
}

.mic-button:hover,
.mic-button.is-recording,
.record-button:hover,
.record-button.is-recording {
  background: #0b746a;
}

.mic-button > span {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 5px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.mic-button svg {
  width: 19px;
  height: 19px;
}

.mic-button strong {
  font-size: 11px;
}

.mic-button small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 8px;
}

.record-button.wide {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  width: min(420px, 100%);
  min-height: 72px;
  margin: 20px auto 0;
  padding: 10px;
  text-align: left;
}

.record-button.wide > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.record-button.wide svg {
  width: 20px;
  height: 20px;
}

.record-button.wide > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.record-button.wide strong {
  font-size: 11px;
}

.record-button.wide small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 8px;
}

.score-result {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid #b7dfcc;
  border-radius: 8px;
  background: #f3fbf6;
}

.score-result.is-hidden,
.sentence-score.is-hidden {
  display: none;
}

.score-message {
  display: flex;
  align-items: center;
  gap: 11px;
}

.score-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--green);
}

.score-icon svg {
  width: 20px;
  height: 20px;
}

.score-message > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.score-message strong {
  color: #12683a;
  font-size: 18px;
}

.score-message p {
  margin: 0;
  color: #39745a;
  font-size: 9px;
}

.stars {
  display: flex;
  gap: 4px;
  margin: 12px 0;
}

.stars svg {
  width: 23px;
  height: 23px;
  color: #d8dee7;
  fill: #d8dee7;
}

.stars svg.is-filled {
  color: #efb13b;
  fill: #efb13b;
}

.score-actions {
  display: flex;
  gap: 8px;
}

.score-actions .primary-button {
  flex: 1;
}

.recording-zone.is-recording .record-rings i {
  animation: record-ring 1.1s ease-out infinite;
}

.record-rings {
  position: absolute;
  inset: 0;
}

.record-rings i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 138px;
  height: 138px;
  border: 2px solid rgba(15, 143, 130, 0.25);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
}

.record-rings i:nth-child(2) {
  animation-delay: 240ms;
}

.record-rings i:nth-child(3) {
  animation-delay: 480ms;
}

@keyframes record-ring {
  0% {
    opacity: 0.75;
    transform: translate(-50%, -50%) scale(0.82);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.32);
  }
}

.score-rules {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.score-rules > div {
  display: grid;
  grid-template-columns: 10px 1fr;
  align-items: center;
  gap: 3px 8px;
  padding: 9px;
  border-radius: 7px;
  background: var(--surface-soft);
}

.score-rules strong {
  font-size: 10px;
}

.score-rules small {
  grid-column: 2;
  color: var(--muted);
  font-size: 8px;
}

.score-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.score-dot.excellent {
  background: var(--green);
}

.score-dot.medium {
  background: var(--amber);
}

.score-dot.basic {
  background: var(--rose);
}

.pass-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 10px;
  border-radius: 7px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 9px;
  font-weight: 750;
}

.pass-line svg {
  width: 14px;
  height: 14px;
}

.mini-flow-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
}

.mini-flow-list > div {
  display: grid;
  grid-template-columns: 23px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 39px;
  font-size: 9px;
}

.mini-flow-list span {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: #eef1f5;
  font-size: 8px;
  font-weight: 800;
}

.mini-flow-list i {
  width: 13px;
  height: 13px;
  color: #c8d0da;
}

.mini-flow-list .is-current,
.mini-flow-list .is-complete {
  color: var(--primary);
  font-weight: 750;
}

.mini-flow-list .is-current span {
  color: #ffffff;
  background: var(--primary);
}

.mini-flow-list .is-complete span {
  color: #ffffff;
  background: var(--green);
}

.question-stage {
  padding: 34px;
  text-align: center;
}

.question-stage.wide {
  padding: 55px 34px;
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.question-meta > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.inline-sound {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--primary);
  background: #ffffff;
}

.inline-sound svg {
  width: 15px;
  height: 15px;
}

.question-stage h2 {
  margin: 16px 0 7px;
  font-size: 44px;
  letter-spacing: -0.05em;
}

.question-stage p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.answer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin-top: 16px;
}

.answer-grid button {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 11px;
  min-height: 66px;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
  font-size: 12px;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.answer-grid button:hover {
  border-color: #b8c8e2;
  background: #f8faff;
  transform: translateY(-1px);
}

.answer-grid button > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 850;
}

.answer-grid button.is-correct {
  border-color: #83c59d;
  background: var(--green-soft);
}

.answer-grid button.is-correct > span {
  color: #ffffff;
  background: var(--green);
}

.answer-grid button.is-wrong {
  border-color: #e2a0ad;
  background: var(--rose-soft);
}

.answer-grid button.is-wrong > span {
  color: #ffffff;
  background: var(--rose);
}

.inline-feedback {
  min-height: 26px;
  margin-top: 13px;
}

.feedback-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
}

.feedback-bar.correct {
  color: #11613d;
  background: var(--green-soft);
}

.feedback-bar.wrong {
  color: #9d3042;
  background: var(--rose-soft);
}

.feedback-bar svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.feedback-bar button {
  min-height: 34px;
  margin-left: auto;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  color: #ffffff;
  background: var(--primary);
  font-size: 9px;
  font-weight: 800;
}

.input-stage {
  display: flex;
  min-height: 430px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px;
  text-align: center;
}

.input-stage h2 {
  margin: 17px 0 6px;
  font-size: 21px;
}

.input-stage > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.large-input {
  width: min(520px, 100%);
  margin: 25px 0 13px;
}

.large-input input,
.large-input textarea {
  width: 100%;
  min-height: 62px;
  padding: 0 17px;
  border: 1px solid #c9d4e4;
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 18px;
  font-weight: 750;
  text-align: center;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.large-input input:focus,
.large-input textarea:focus {
  border-color: #89a6df;
  background: #ffffff;
}

.large-input input::placeholder,
.large-input textarea::placeholder {
  color: #a3adbb;
  font-weight: 500;
}

.chinese-prompt {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  padding: 0 17px;
  border-radius: 8px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 22px;
  font-weight: 850;
}

.test-timer {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid #efd6ab;
  border-radius: 8px;
  color: #9b6508;
  background: var(--amber-soft);
}

.test-timer svg {
  width: 17px;
  height: 17px;
}

.test-timer strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.test-progress {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.test-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.test-progress span {
  color: var(--muted);
  font-size: 9px;
}

.test-progress strong {
  font-size: 11px;
}

.result-page {
  max-width: 900px;
  margin: 10px auto 0;
}

.result-hero {
  text-align: center;
}

.result-icon {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--green);
  box-shadow: 0 12px 26px rgba(27, 141, 82, 0.2);
}

.result-icon.teal {
  background: var(--teal);
  box-shadow: 0 12px 26px rgba(15, 143, 130, 0.2);
}

.result-icon svg {
  width: 34px;
  height: 34px;
}

.result-hero h1 {
  margin: 8px 0 7px;
  font-size: 30px;
}

.result-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.result-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  margin: 26px 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.result-metrics > div {
  display: flex;
  min-height: 116px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-right: 1px solid var(--line-soft);
}

.result-metrics > div:last-child {
  border-right: 0;
}

.result-metrics span,
.result-metrics small {
  color: var(--muted);
  font-size: 9px;
}

.result-metrics strong {
  font-size: 23px;
}

.result-suggestion {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 15px;
  border: 1px solid #d4e0f5;
  border-radius: 8px;
  background: #f6f9ff;
}

.result-suggestion strong {
  font-size: 11px;
}

.result-suggestion p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.review-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 17px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
}

.review-tabs button {
  min-height: 41px;
  padding: 0 16px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 750;
}

.review-tabs button:hover {
  color: var(--ink);
}

.review-tabs button.is-active {
  color: var(--primary);
  background: var(--primary-soft);
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
  gap: 20px;
}

.review-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #ffffff;
  background: #183f79;
}

.review-hero-card h2 {
  margin: 8px 0 7px;
  font-size: 23px;
}

.review-hero-card p {
  max-width: 640px;
  margin: 0;
  color: #cedbf0;
  font-size: 11px;
  line-height: 1.6;
}

.review-hero-card .eyebrow {
  color: #cad9ef;
}

.review-hero-card .primary-button {
  flex: 0 0 auto;
  color: #183f79;
  background: #ffffff;
  box-shadow: none;
}

.review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 15px;
  margin-top: 14px;
}

.review-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #d7e1f2;
  font-size: 9px;
}

.review-meta svg {
  width: 13px;
  height: 13px;
}

.review-mode-section {
  margin-top: 20px;
}

.review-modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.review-volume-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  padding: 12px;
  border: 1px solid #cad8ef;
  border-radius: 8px;
  background: #f5f8ff;
}

.review-volume-selector > span {
  margin-right: auto;
  font-size: 10px;
  font-weight: 800;
}

.review-volume-selector button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #ffffff;
  font-size: 9px;
  font-weight: 800;
}

.review-volume-selector button.is-active {
  border-color: #9fb8e7;
  color: var(--primary);
  background: var(--primary-soft);
}

.review-modes article {
  display: flex;
  min-height: 124px;
  flex-direction: column;
  align-items: flex-start;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.review-mode-button {
  display: flex;
  min-height: 124px;
  flex-direction: column;
  align-items: flex-start;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.review-mode-button:hover,
.review-mode-button.is-active {
  border-color: #9fb8e7;
  background: #f7f9ff;
}

.review-mode-button strong {
  font-size: 10px;
}

.review-mode-button small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.mode-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 13px;
  border-radius: 8px;
}

.review-modes strong {
  font-size: 10px;
}

.review-modes small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.overall-report-card {
  padding: 20px;
}

.report-score {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 14px 0 16px;
}

.report-score strong {
  font-size: 38px;
  letter-spacing: -0.05em;
}

.report-score span {
  color: var(--muted);
  font-size: 9px;
}

.report-bars {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 17px;
}

.report-bars > div > span,
.ability-list > div > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.report-bars b,
.ability-list b {
  font-size: 9px;
}

.report-bars small,
.ability-list small {
  color: var(--muted);
  font-size: 8px;
}

.report-bars > div > i,
.ability-list > div > i {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ecf1;
}

.report-bars em,
.ability-list em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.report-bars em.amber,
.ability-list em.amber {
  background: var(--amber);
}

.report-bars em.rose,
.ability-list em.rose {
  background: var(--rose);
}

.review-answer-grid {
  max-width: 880px;
  margin-right: auto;
  margin-left: auto;
}

.review-group-progress {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 14px;
  max-width: 880px;
  margin: 0 auto 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.review-group-progress > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.review-group-progress span,
.review-group-progress strong {
  font-size: 9px;
}

.review-game-area {
  max-width: 880px;
  margin: 0 auto 14px;
}

.puzzle-answer {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px dashed #b6c4d9;
  border-radius: 8px;
  background: var(--surface-soft);
}

.puzzle-answer span {
  display: grid;
  min-width: 38px;
  height: 46px;
  place-items: center;
  border-bottom: 2px solid #8fa0b7;
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
  text-transform: lowercase;
}

.puzzle-answer em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.puzzle-letters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.puzzle-letters button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.puzzle-letters button:disabled {
  color: #b7bec9;
  background: #eef1f5;
}

.matching-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.matching-card button {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-size: 11px;
  font-weight: 750;
}

.matching-card button.is-selected {
  border-color: #9fb8e7;
  color: var(--primary);
  background: var(--primary-soft);
}

.matching-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.matching-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.matching-column-title {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.matching-column button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 750;
}

.matching-column button:hover,
.matching-column button.is-selected {
  border-color: #9fb8e7;
  color: var(--primary);
  background: var(--primary-soft);
}

.matching-column button.is-matched {
  border-color: #9dd4b3;
  color: #11613d;
  background: var(--green-soft);
  opacity: 0.7;
}

.shop-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 17px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
}

.shop-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}

.shop-tabs button.is-active {
  color: var(--primary);
  background: var(--primary-soft);
}

.coin-balance-card {
  display: flex;
  min-width: 150px;
  min-height: 60px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #efd6a6;
  border-radius: 8px;
  background: #fff8e8;
}

.coin-balance-card > svg {
  width: 23px;
  height: 23px;
  color: #c77808;
}

.coin-balance-card > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.coin-balance-card strong {
  color: #9b6508;
  font-size: 20px;
}

.coin-balance-card small {
  color: #9b6508;
  font-size: 8px;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.shop-item-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.shop-item-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 15px;
  place-items: center;
  border-radius: 9px;
  color: var(--primary);
  background: var(--primary-soft);
}

.shop-item-icon svg {
  width: 22px;
  height: 22px;
}

.shop-item-card h2 {
  margin: 0 0 6px;
  font-size: 15px;
}

.shop-item-card p {
  min-height: 38px;
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.shop-item-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.shop-item-price span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #9b6508;
  font-size: 13px;
  font-weight: 850;
}

.shop-item-price svg {
  width: 16px;
  height: 16px;
}

.shop-item-price button {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  color: #ffffff;
  background: var(--primary);
  font-size: 9px;
  font-weight: 800;
}

.exchange-panel {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
}

.exchange-preview,
.exchange-confirm {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.exchange-preview {
  display: flex;
  min-height: 240px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.exchange-preview .shop-item-icon {
  width: 64px;
  height: 64px;
}

.exchange-preview h2 {
  margin: 12px 0 6px;
  font-size: 20px;
}

.exchange-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.exchange-confirm {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.exchange-confirm > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  border-bottom: 1px solid var(--line-soft);
}

.exchange-confirm span {
  color: var(--muted);
  font-size: 9px;
}

.exchange-confirm strong {
  font-size: 11px;
}

.exchange-confirm .primary-button {
  margin-top: auto;
}

.redemption-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.redemption-list article {
  display: grid;
  grid-template-columns: 42px 1fr 100px 90px 70px;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line-soft);
}

.redemption-list article:last-child {
  border-bottom: 0;
}

.redemption-list article > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.redemption-list strong {
  font-size: 10px;
}

.redemption-list span,
.redemption-list small {
  color: var(--muted);
  font-size: 8px;
}

.redemption-coins {
  color: #9b6508 !important;
  font-weight: 800;
}

.empty-exchange {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 25px;
  border: 1px dashed #b8c5d7;
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
}

.empty-exchange svg {
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  color: #9aa5b4;
}

.report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
  gap: 20px;
}

.report-main-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.report-overall {
  display: flex;
  align-items: center;
  gap: 20px;
}

.ring-chart {
  display: grid;
  width: 120px;
  height: 120px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--teal) 0 72%, #e8edf3 72% 100%);
}

.ring-chart::before {
  grid-area: 1 / 1;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: #ffffff;
  content: "";
}

.ring-chart span {
  z-index: 1;
  grid-area: 1 / 1;
  font-size: 24px;
  font-weight: 850;
}

.report-overall h2 {
  margin: 7px 0 5px;
  font-size: 24px;
}

.report-overall p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.report-trend {
  margin-top: 22px;
  padding-top: 19px;
  border-top: 1px solid var(--line-soft);
}

.report-trend svg {
  width: 100%;
  height: 180px;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 8px;
}

.ability-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 15px;
}

.weak-word-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 45px;
  border-bottom: 1px solid var(--line-soft);
}

.weak-word-card > div:last-child {
  border-bottom: 0;
}

.weak-word-card strong {
  font-size: 10px;
}

.weak-word-card small {
  color: var(--rose);
  font-size: 8px;
}

.sentence-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 23px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #ffffff;
  background: #164f64;
}

.sentence-hero h2 {
  margin: 7px 0 6px;
  font-size: 23px;
}

.sentence-hero p {
  margin: 0;
  color: #c8e1e8;
  font-size: 12px;
}

.sentence-hero .eyebrow {
  color: #c8e1e8;
}

.sentence-hero-progress {
  width: 190px;
  flex: 0 0 auto;
}

.sentence-hero-progress > span {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 850;
  text-align: right;
}

.sentence-hero-progress > div {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.sentence-hero-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #ffffff;
}

.sentence-unit-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sentence-unit-list article {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 13px;
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.sentence-unit-list article.is-locked {
  color: var(--muted-light);
  background: #f7f8fa;
}

.sentence-unit-list h3 {
  margin: 0 0 5px;
  font-size: 14px;
}

.sentence-unit-list p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.sentence-unit-list button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 5px;
  padding: 0 13px;
  border: 1px solid #d4dce7;
  border-radius: 7px;
  color: var(--primary);
  background: #ffffff;
  font-size: 9px;
  font-weight: 800;
}

.sentence-unit-list button svg {
  width: 14px;
  height: 14px;
}

.sentence-overview-steps {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 13px;
}

.sentence-overview-steps > div {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 45px;
}

.sentence-overview-steps span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 9px;
  font-weight: 850;
}

.sentence-overview-steps strong {
  font-size: 10px;
}

.sentence-overview-steps small {
  color: var(--muted);
  font-size: 8px;
}

.sentence-group-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
}

.sentence-group-list p {
  margin: 0;
  padding: 10px;
  border-radius: 7px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  font-size: 9px;
  line-height: 1.45;
}

.sentence-learning-stage {
  min-height: 540px;
  padding: 36px;
  text-align: center;
}

.sentence-learning-stage h2 {
  max-width: 860px;
  margin: 13px auto 8px;
  font-size: 34px;
  letter-spacing: -0.035em;
}

.sentence-learning-stage > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.sentence-audio-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 8px;
  color: var(--muted);
  font-size: 10px;
}

.sentence-score {
  max-width: 560px;
  margin: 22px auto 0;
  padding: 18px;
  border: 1px solid #b7dfcc;
  border-radius: 8px;
  background: #f3fbf6;
}

.sentence-score > strong {
  color: #12683a;
  font-size: 24px;
}

.sentence-score .stars {
  justify-content: center;
}

.sentence-order-stage {
  padding: 28px;
}

.sentence-order-stage > h2 {
  margin: 12px 0 14px;
  font-size: 30px;
}

.sentence-order-stage > .sound-button {
  margin-bottom: 20px;
}

.ordered-answer {
  display: flex;
  min-height: 102px;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  padding: 15px;
  border: 1px dashed #b8c6da;
  border-radius: 8px;
  background: var(--surface-soft);
}

.ordered-answer > span {
  color: var(--muted);
  font-size: 10px;
}

.ordered-answer button,
.order-tokens button {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.ordered-answer button {
  border-color: #abc0e8;
  color: var(--primary);
}

.order-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0;
}

.order-tokens button:hover {
  border-color: #b8c8e2;
  color: var(--primary);
}

.order-tokens button:disabled {
  color: #b0b8c2;
  background: #eef1f5;
}

.sentence-answer-grid button {
  text-align: left;
}

.sentence-input-stage .large-input textarea {
  min-height: 120px;
  padding: 15px;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}

.sentence-prompt {
  font-size: 18px;
}

.oral-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 500px;
  overflow: hidden;
}

.oral-listen,
.oral-read {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px;
  text-align: center;
}

.oral-listen {
  border-right: 1px solid var(--line);
  background: #f8fbff;
}

.oral-listen h2 {
  max-width: 420px;
  margin: 13px 0 25px;
  font-size: 25px;
  letter-spacing: -0.03em;
}

.oral-read .sentence-score {
  width: 100%;
}

.profile-banner {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.assignment-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.assignment-summary article {
  display: flex;
  min-height: 82px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.assignment-summary article > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.assignment-summary strong {
  font-size: 19px;
}

.assignment-summary small {
  color: var(--muted);
  font-size: 8px;
}

.assignment-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
}

.assignment-tabs button {
  min-height: 40px;
  padding: 0 15px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 750;
}

.assignment-tabs button.is-active {
  color: var(--primary);
  background: var(--primary-soft);
}

.assignment-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.assignment-card {
  padding: 19px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--primary);
  border-radius: 8px;
  background: #ffffff;
}

.assignment-card:nth-child(2) {
  border-top-color: var(--amber);
}

.assignment-card.is-complete {
  border-top-color: var(--green);
}

.assignment-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-level-pill {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
}

.task-level-pill.level-a {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.task-level-pill.level-b {
  color: #11613d;
  background: var(--green-soft);
}

.task-level-pill.level-c {
  color: #9b6508;
  background: var(--amber-soft);
}

.assignment-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 800;
}

.assignment-status svg {
  width: 13px;
  height: 13px;
}

.assignment-status.in-progress {
  color: var(--primary);
}

.assignment-status.not-started {
  color: var(--amber);
}

.assignment-status.complete {
  color: var(--green);
}

.assignment-card h2 {
  margin: 15px 0 6px;
  font-size: 15px;
  line-height: 1.45;
}

.assignment-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.assignment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 15px;
  margin: 15px 0;
}

.assignment-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 8px;
}

.assignment-meta svg {
  width: 13px;
  height: 13px;
}

.assignment-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
}

.assignment-progress strong {
  color: var(--muted);
  font-size: 8px;
}

.assignment-result {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 15px;
}

.assignment-result strong {
  color: var(--green);
  font-size: 24px;
}

.assignment-result span {
  color: var(--muted);
  font-size: 8px;
}

.assignment-card > .primary-button,
.assignment-card > .secondary-button {
  min-height: 42px;
}

.profile-avatar {
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--primary);
  font-size: 20px;
  font-weight: 850;
}

.profile-banner > div {
  min-width: 0;
  flex: 1;
}

.profile-banner h2 {
  margin: 0 0 5px;
  font-size: 20px;
}

.profile-banner p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.grade-pill {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 9px;
  font-weight: 800;
}

.my-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.my-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.my-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.my-card-head h2 {
  margin: 5px 0 0;
  font-size: 18px;
}

.class-info-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 17px 0;
}

.class-info-list > div {
  display: flex;
  min-height: 66px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 7px;
  background: var(--surface-soft);
}

.class-info-list span {
  color: var(--muted);
  font-size: 8px;
}

.class-info-list strong {
  font-size: 10px;
}

.join-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.my-card-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 8px;
}

.join-card h2 {
  margin: 7px 0 7px;
  font-size: 19px;
}

.join-card p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.record-detail-card {
  grid-column: 1 / -1;
}

.history-list {
  margin-top: 15px;
}

.history-list > div {
  display: grid;
  grid-template-columns: 150px 1fr 80px;
  gap: 12px;
  min-height: 50px;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
}

.history-list > div:last-child {
  border-bottom: 0;
}

.history-list span,
.history-list small {
  color: var(--muted);
  font-size: 9px;
}

.history-list strong {
  font-size: 10px;
}

.history-list small {
  text-align: right;
}

.preference-card {
  grid-column: 1 / -1;
}

.preference-row {
  display: flex;
  min-height: 49px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
}

.preference-row:last-child {
  border-bottom: 0;
}

.preference-row > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
}

.preference-row svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.preference-row strong {
  color: var(--muted);
  font-size: 9px;
}

.history-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.history-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.history-summary > div {
  display: flex;
  min-height: 88px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-right: 1px solid var(--line-soft);
}

.history-summary > div:last-child {
  border-right: 0;
}

.history-summary span {
  color: var(--muted);
  font-size: 9px;
}

.history-summary strong {
  font-size: 18px;
}

.history-table {
  min-width: 720px;
}

.history-table > div {
  display: grid;
  grid-template-columns: 180px 1fr 100px 80px;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  border-bottom: 1px solid var(--line-soft);
}

.history-table > div:last-child {
  border-bottom: 0;
}

.history-table-head {
  color: var(--muted);
  background: var(--surface-soft);
}

.history-table span,
.history-table small {
  color: var(--muted);
  font-size: 9px;
}

.history-table strong {
  font-size: 10px;
}

.status {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.status.complete {
  color: #12683a;
  background: var(--green-soft);
}

.status.interrupted {
  color: #9b6508;
  background: var(--amber-soft);
}

.drawer {
  position: fixed;
  z-index: 80;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(430px, calc(100vw - 24px));
  padding: 22px;
  border-left: 1px solid var(--line);
  background: #ffffff;
  box-shadow: -20px 0 50px rgba(23, 32, 51, 0.16);
  transform: translateX(105%);
  transition: transform 220ms ease;
}

.drawer.is-open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.drawer-head h2 {
  margin: 5px 0 0;
  font-size: 20px;
}

.drawer-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin: 20px 0 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

.drawer-tabs button {
  min-height: 39px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 750;
}

.drawer-tabs button.is-active {
  color: var(--primary);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(23, 32, 51, 0.06);
}

.drawer-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  border: 1px solid #f0dcb5;
  border-radius: 8px;
  color: #8c5b09;
  background: var(--amber-soft);
}

.drawer-note svg {
  width: 15px;
  height: 15px;
}

.drawer-note p {
  margin: 0;
  font-size: 9px;
  line-height: 1.55;
}

.drawer-list {
  margin: 15px 0 18px;
}

.drawer-list article {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.drawer-list article > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.drawer-list strong {
  font-size: 11px;
}

.drawer-list span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-count {
  flex: 0 0 auto;
  padding: 5px 7px;
  border-radius: 999px;
  color: #9b6508 !important;
  background: var(--amber-soft);
  font-weight: 750;
}

.drawer-backdrop {
  position: fixed;
  z-index: 70;
  inset: 0;
  visibility: hidden;
  background: rgba(17, 24, 39, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.drawer-backdrop.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.modal-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  visibility: hidden;
  place-items: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.modal-layer.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.modal {
  position: relative;
  width: min(490px, 100%);
  padding: 24px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.24);
  animation: modal-in 180ms ease-out;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.modal-content {
  text-align: center;
}

.modal-icon {
  display: grid;
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--primary);
}

.modal-icon.teal {
  background: var(--teal);
}

.modal-icon svg {
  width: 28px;
  height: 28px;
}

.modal h2 {
  margin: 0;
  font-size: 21px;
}

.modal p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 19px;
}

.modal-actions > button {
  flex: 1;
}

.qr-code {
  display: grid;
  grid-template-columns: repeat(17, 1fr);
  grid-template-rows: repeat(17, 1fr);
  gap: 1px;
  width: 150px;
  height: 150px;
  margin: 20px auto;
  padding: 7px;
  border: 1px solid var(--line);
}

.qr-code i {
  background: transparent;
}

.qr-code i.is-dark {
  background: #172033;
}

.join-code {
  margin: 18px 0;
  padding: 15px;
  border-radius: 8px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-size: 24px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.textbook-steps {
  display: grid;
  grid-template-columns: 1fr 11px 1fr 11px 1fr 11px 1fr;
  align-items: center;
  gap: 5px;
  margin: 20px 0 14px;
}

.textbook-steps > button {
  display: grid;
  grid-template-columns: 24px 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 6px;
  min-height: 62px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  text-align: left;
}

.textbook-steps > button > span {
  display: grid;
  width: 24px;
  height: 24px;
  grid-row: 1 / span 2;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: #e6eaf0;
  font-size: 9px;
  font-weight: 850;
}

.textbook-steps > button strong {
  align-self: end;
  font-size: 9px;
}

.textbook-steps > button small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.textbook-steps > button.is-active {
  border-color: #9fb8e7;
  background: var(--primary-soft);
}

.textbook-steps > button.is-active > span {
  color: #ffffff;
  background: var(--primary);
}

.textbook-steps > button.is-complete > span {
  color: #ffffff;
  background: var(--green);
}

.textbook-steps > i {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.textbook-option-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.textbook-option-grid button {
  position: relative;
  display: flex;
  min-height: 82px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.textbook-option-grid button:hover {
  border-color: #b8c8e2;
  background: #f8faff;
}

.textbook-option-grid button.is-selected {
  border-color: #9fb8e7;
  background: var(--primary-soft);
}

.textbook-option-grid strong {
  font-size: 10px;
}

.textbook-option-grid small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.textbook-option-grid svg {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 15px;
  height: 15px;
  padding: 3px;
  border-radius: 50%;
  color: #ffffff;
  background: #cbd5e1;
  opacity: 0.45;
}

.textbook-option-grid button.is-selected svg {
  background: var(--primary);
  opacity: 1;
}

.textbook-selection-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  padding: 11px 12px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.textbook-selection-summary span {
  color: var(--muted);
  font-size: 8px;
}

.textbook-selection-summary strong {
  color: var(--primary-dark);
  font-size: 10px;
}

.toast-region {
  position: fixed;
  z-index: 120;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: inline-flex;
  max-width: 380px;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 8px;
  color: #ffffff;
  background: #1f2937;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.2);
  font-size: 10px;
  font-weight: 700;
  animation: toast-in 180ms ease-out;
}

.toast svg {
  width: 15px;
  height: 15px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 218px minmax(0, 1fr);
  }

  .main-content {
    padding-right: 22px;
    padding-left: 22px;
  }

  .content-grid,
  .words-grid,
  .review-layout,
  .report-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .overview-strip {
    grid-template-columns: 1fr 1fr;
  }

  .overview-strip article:nth-child(2) {
    border-right: 0;
  }

  .overview-strip article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line-soft);
  }

  .review-modes {
    grid-template-columns: repeat(3, 1fr);
  }

  .test-mode-toggle small {
    display: none;
  }
}

@media (max-width: 940px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
    height: auto;
    align-items: center;
    padding: 10px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    padding: 0;
  }

  .brand > div {
    display: none;
  }

  .main-nav {
    flex-direction: row;
    justify-content: center;
  }

  .main-nav button {
    grid-template-columns: 20px auto;
    min-height: 44px;
    padding: 5px 10px;
  }

  .main-nav button > span small {
    display: none;
  }

  .sidebar-panel,
  .sidebar-class {
    display: none;
  }

  .topbar {
    top: 64px;
  }

  .main-content {
    padding: 24px 18px 48px;
  }

  .content-grid,
  .words-grid,
  .flow-layout,
  .learning-layout,
  .review-layout,
  .report-layout {
    grid-template-columns: 1fr;
  }

  .side-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .side-column > .side-card + .side-card {
    margin-top: 0;
  }

  .precheck-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .word-progress-card {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .word-progress-steps {
    grid-column: 2 / -1;
  }

  .oral-stage {
    grid-template-columns: 1fr;
  }

  .oral-listen {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .record-detail-card,
  .preference-card {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  .sidebar {
    grid-template-columns: auto 1fr;
    gap: 8px;
  }

  .main-nav {
    justify-content: flex-end;
  }

  .main-nav button {
    grid-template-columns: 1fr;
    min-width: 55px;
    justify-items: center;
    gap: 2px;
    padding: 4px 6px;
  }

  .main-nav button > span {
    display: block;
  }

  .main-nav button > span small {
    display: none;
  }

  .main-nav strong {
    font-size: 10px;
  }

  .topbar {
    top: 64px;
    padding: 9px 12px;
  }

  .breadcrumb,
  .topbar-stat {
    display: none;
  }

  .role-switch-button {
    display: none;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .student-button > span:nth-child(2),
  .student-button > svg {
    display: none;
  }

  .student-button {
    padding: 4px;
  }

  .test-mode-toggle {
    grid-template-columns: 20px 35px;
  }

  .test-mode-toggle > span:nth-child(2) {
    display: none;
  }

  .main-content {
    padding: 20px 12px 40px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-heading h1 {
    font-size: 25px;
  }

  .test-mode-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .test-mode-banner .compact-test {
    width: 100%;
  }

  .heading-actions {
    width: 100%;
  }

  .heading-actions > button {
    flex: 1;
  }

  .overview-strip {
    grid-template-columns: 1fr;
  }

  .overview-strip article {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .overview-strip article:last-child {
    border-bottom: 0;
  }

  .group-row,
  .answer-grid,
  .result-metrics,
  .history-summary,
  .class-info-list,
  .assignment-summary,
  .assignment-list {
    grid-template-columns: 1fr;
  }

  .shop-grid,
  .exchange-panel {
    grid-template-columns: 1fr;
  }

  .redemption-list article {
    grid-template-columns: 38px 1fr auto;
  }

  .redemption-list article > span:nth-child(3),
  .redemption-list article > span:nth-child(4) {
    display: none;
  }

  .result-metrics > div,
  .history-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .result-metrics > div:last-child,
  .history-summary > div:last-child {
    border-bottom: 0;
  }

  .precheck-list {
    grid-template-columns: 1fr;
  }

  .flow-summary {
    grid-template-columns: 1fr;
  }

  .flow-step {
    grid-template-columns: 36px 1fr;
  }

  .flow-step-state {
    grid-column: 2;
  }

  .word-progress-card {
    grid-template-columns: 36px 1fr;
  }

  .word-progress-number {
    width: 36px;
    height: 36px;
  }

  .word-progress-steps {
    grid-column: 2;
    grid-template-columns: 1fr 1fr;
  }

  .word-progress-card .flow-step-state {
    grid-column: 2;
  }

  .side-column {
    grid-template-columns: 1fr;
  }

  .review-tabs {
    overflow-x: auto;
  }

  .review-tabs button {
    flex: 0 0 auto;
  }

  .review-modes {
    grid-template-columns: 1fr 1fr;
  }

  .review-hero-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .review-hero-card .primary-button {
    width: 100%;
  }

  .sentence-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .sentence-hero-progress {
    width: 100%;
  }

  .sentence-learning-stage {
    padding: 24px 16px;
  }

  .sentence-learning-stage h2 {
    font-size: 25px;
  }

  .history-table {
    overflow-x: auto;
  }

  .textbook-steps {
    grid-template-columns: 1fr;
  }

  .textbook-steps > i {
    margin: 0 auto;
    transform: rotate(90deg);
  }

  .textbook-option-grid {
    grid-template-columns: 1fr 1fr;
  }

  .history-list > div {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 0;
  }

  .history-list small {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
