:root {
  --wr-navy-950: #102536;
  --wr-navy-900: #18324a;
  --wr-navy-800: #21445f;
  --wr-blue: #2479e8;
  --wr-teal: #149b8f;
  --wr-amber: #d88a18;
  --wr-red: #d94949;
  --wr-canvas: #f4f7fa;
  --wr-line: #dfe7ee;
  --wr-text: #203040;
  --wr-muted: #68798a;
  --wr-sidebar-width: 248px;
  --tblr-primary: #2479e8;
  --tblr-primary-rgb: 36, 121, 232;
}

html { background: var(--wr-canvas); }
body {
  color: var(--wr-text);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { text-underline-offset: .2em; }
.app-icon {
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-body { min-height: 100vh; background: var(--wr-canvas); }
.app-layout { min-height: 100vh; }
.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1030;
  width: var(--wr-sidebar-width);
  background: var(--wr-navy-950);
  color: #dce8f2;
  box-shadow: 12px 0 30px rgba(16, 37, 54, .08);
}
.sidebar-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  padding: 1.2rem .85rem 1rem;
}
.app-brand {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: .45rem .65rem;
  margin-bottom: 1.2rem;
  color: #fff;
  text-decoration: none;
}
.app-brand:hover { color: #fff; }
.platform-brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
}
.platform-brand-logo {
  display: block;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.platform-brand--sidebar {
  width: 178px;
}
.platform-brand--sidebar .platform-brand-logo {
  max-width: 178px;
  height: 42px;
}
.platform-brand--sidebar.platform-brand--custom {
  justify-content: center;
  padding: .25rem .45rem;
  border-radius: 9px;
  background: rgba(255, 255, 255, .96);
}
.platform-brand--sidebar.platform-brand--custom .platform-brand-logo {
  height: 34px;
}
.platform-brand--mobile {
  width: 98px;
}
.platform-brand--mobile .platform-brand-logo {
  max-width: 98px;
  height: 31px;
}
.platform-brand--auth {
  flex-direction: column;
  gap: .2rem;
  max-width: min(286px, 80vw);
}
.platform-brand--auth .platform-brand-logo {
  max-width: min(286px, 80vw);
  height: 88px;
}
.platform-brand-domain {
  color: var(--wr-muted);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1;
}
.mobile-topbar-brand {
  display: inline-flex;
  min-width: 0;
}
.app-nav { display: flex; flex-direction: column; gap: .18rem; }
.app-nav-label {
  padding: 1rem .75rem .35rem;
  color: #6f8ca2;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
}
.app-nav-link {
  display: flex;
  align-items: center;
  gap: .78rem;
  min-height: 44px;
  padding: .62rem .75rem;
  border-radius: 10px;
  color: #bdcfdd;
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .16s ease, color .16s ease, transform .16s ease;
}
.app-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, .07);
  transform: translateX(2px);
}
.app-nav-link.active {
  color: #fff;
  background: #244b66;
  box-shadow: inset 3px 0 0 var(--wr-teal);
}

.app-nav-sublink {
  display: block;
  margin: .1rem .75rem .1rem 2.9rem;
  padding: .35rem .65rem;
  border-left: 1px solid rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .62);
  font-size: .82rem;
  text-decoration: none;
}

.app-nav-sublink:hover,
.app-nav-sublink.active {
  color: #fff;
  border-left-color: #31c6b4;
}

.metric-mini {
  padding: .75rem;
  border: 1px solid var(--tblr-border-color);
  background: #f8fafc;
}

.metric-mini strong,
.metric-mini span {
  display: block;
}

.metric-mini strong {
  color: #15324b;
  font-family: Georgia, "Songti SC", serif;
  font-size: 1.35rem;
}

.metric-mini span {
  color: var(--tblr-secondary);
  font-size: .75rem;
}

.textbook-description {
  min-height: 3rem;
}

.import-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.import-step > span {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  background: #0d9488;
  color: #fff;
  font-weight: 700;
}

.import-step h2,
.import-step p {
  margin: 0;
}

.difficulty-explainer {
  display: flex;
  gap: .5rem 1rem;
  flex-wrap: wrap;
  padding: .9rem 1rem;
  border-left: 3px solid #0d9488;
  background: #effcf9;
  color: #164e4a;
}

.share-sheet {
  max-width: 74rem;
  margin: 0 auto;
}

.share-sheet-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid #15324b;
}

.share-sheet-header h1 {
  margin: .25rem 0;
  font-family: Georgia, "Songti SC", serif;
}

.share-kicker {
  color: #0d9488;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.share-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.share-meta span {
  padding: .65rem .9rem;
  background: #eef3f7;
  color: #486174;
}
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-top: auto;
  padding: .85rem .7rem .25rem;
  color: #9eb3c3;
  font-size: .72rem;
}
.sidebar-footer strong,
.sidebar-footer small { display: block; }
.sidebar-footer small { color: #6f8ca2; margin-top: .08rem; }
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #42c6a7;
  box-shadow: 0 0 0 4px rgba(66, 198, 167, .12);
}
.app-main { min-height: 100vh; margin-left: var(--wr-sidebar-width); }
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  min-height: 72px;
  border-bottom: 1px solid rgba(31, 68, 95, .09);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 6px 24px rgba(16, 37, 54, .025);
}
.topbar-context strong,
.topbar-context span { display: block; }
.topbar-context strong { font-size: .96rem; }
.topbar-eyebrow {
  color: var(--wr-muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
}
.teacher-chip {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-width: 0;
  padding: .2rem .3rem;
}
.teacher-chip small,
.teacher-chip strong { display: block; line-height: 1.2; }
.teacher-chip small { color: var(--wr-muted); font-size: .66rem; }
.teacher-chip strong { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; }
.teacher-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e6f1fb;
  color: #246492;
  font-weight: 800;
}
.app-content { padding: 2rem 0 3rem; }
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.page-heading h1 {
  margin: 0;
  color: var(--wr-navy-950);
  font-family: Georgia, "STSong", "SimSun", serif;
  font-size: clamp(1.65rem, 2.4vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -.02em;
}
.page-heading p { max-width: 760px; margin: .45rem 0 0; color: var(--wr-muted); line-height: 1.7; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .6rem; }
.page-actions form { margin: 0; }
.section-title {
  margin: 0;
  color: var(--wr-navy-900);
  font-family: Georgia, "STSong", "SimSun", serif;
  font-size: 1.12rem;
  font-weight: 700;
}

.card {
  border-color: var(--wr-line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(28, 56, 78, .045);
}
.card-header {
  min-height: 58px;
  border-bottom-color: var(--wr-line);
  background: #fff;
}
.btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .58rem 1rem;
  border-width: 1px;
  border-radius: 9px;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.2;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 .2rem rgba(36, 121, 232, .2);
}
.btn:disabled,
.btn.disabled {
  cursor: not-allowed;
  opacity: .52;
  box-shadow: none;
}
.btn-primary {
  border-color: var(--wr-blue);
  background: var(--wr-blue);
  color: #fff;
}
.btn-primary:hover,
.btn-primary:focus {
  border-color: #1768ca;
  background: #1768ca;
  color: #fff;
}
.btn-outline-primary,
.btn-outline-secondary {
  border-color: #9bb1c4;
  background: #fff;
  color: #34546e;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  border-color: #5f89ab;
  background: #edf4fa;
  color: #183f60;
}
.btn-warning,
.btn-outline-warning {
  border-color: #d39a42;
  background: #fff8e9;
  color: #8a5a0c;
}
.btn-warning:hover,
.btn-outline-warning:hover {
  border-color: #b77a1d;
  background: #f8e8c6;
  color: #714807;
}
.btn-danger {
  border-color: #c93636;
  background: #d94949;
  color: #fff;
}
.btn-danger:hover,
.btn-danger:focus {
  border-color: #aa2929;
  background: #bd3030;
  color: #fff;
}
.btn-outline-danger {
  border-color: #d76666;
  background: #fff;
  color: #b52f2f;
}
.btn-outline-danger:hover,
.btn-outline-danger:focus {
  border-color: #b52f2f;
  background: #fff0f0;
  color: #982424;
}
.btn-sm { min-height: 34px; padding: .38rem .7rem; border-radius: 8px; font-size: .8rem; }
.btn-icon { min-width: 42px; padding-right: .65rem; padding-left: .65rem; }
.btn .app-icon { margin-right: .35rem; }
.btn-icon .app-icon { margin: 0; }
.form-control,
.form-select {
  min-height: 44px;
  border-color: #cbd7e0;
  border-radius: 9px;
}
.form-control:focus,
.form-select:focus {
  border-color: #70a8e8;
  box-shadow: 0 0 0 .2rem rgba(36, 121, 232, .12);
}
.form-label { color: #334b5d; font-weight: 700; }
.form-hint { color: var(--wr-muted); line-height: 1.6; }
.table { margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .9rem 1rem; border-bottom-color: #e8eef3; vertical-align: middle; }
.table thead th {
  color: #6b7d8c;
  background: #f8fafc;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .05em;
  white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfdff; }
.badge { border-radius: 999px; padding: .42em .7em; font-weight: 700; }
.alert { border: 0; border-radius: 11px; }
.breadcrumb { color: var(--wr-muted); font-size: .82rem; }

.metric-card { overflow: hidden; position: relative; height: 100%; }
.metric-card::after {
  position: absolute;
  right: -24px;
  bottom: -32px;
  width: 100px;
  height: 100px;
  border: 18px solid rgba(36, 121, 232, .05);
  border-radius: 50%;
  content: "";
}
.metric-card .metric-label { color: var(--wr-muted); font-size: .78rem; font-weight: 700; }
.metric-card .metric-value { display: block; margin-top: .35rem; color: var(--wr-navy-950); font-family: Georgia, "Times New Roman", serif; font-size: 2rem; line-height: 1; }
.metric-card .metric-note { display: block; margin-top: .55rem; color: #82919f; font-size: .72rem; }
.metric-accent-teal { border-top: 3px solid var(--wr-teal); }
.metric-accent-blue { border-top: 3px solid var(--wr-blue); }
.metric-accent-amber { border-top: 3px solid var(--wr-amber); }
.metric-accent-red { border-top: 3px solid var(--wr-red); }

.advice-card { border: 0; background: var(--wr-navy-900); color: #edf6fc; }
.advice-card .card-body { padding: clamp(1.25rem, 3vw, 2rem); }
.advice-card h2 { color: #fff; font-family: Georgia, "STSong", "SimSun", serif; }
.advice-kicker { color: #75dac9; font-size: .72rem; font-weight: 800; letter-spacing: .14em; }
.advice-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1.2rem 0; }
.advice-stat { padding: .8rem .9rem; border: 1px solid rgba(255,255,255,.11); border-radius: 10px; background: rgba(255,255,255,.045); }
.advice-stat span,
.advice-stat strong { display: block; }
.advice-stat span { color: #9fb7c9; font-size: .72rem; }
.advice-stat strong { margin-top: .2rem; color: #fff; font-size: 1.15rem; }
.advice-card .btn-primary { background: #fff; border-color: #fff; color: var(--wr-navy-900); }
.advice-card .btn-primary:hover { background: #edf6fc; border-color: #edf6fc; }

.list-clean { margin: 0; padding: 0; list-style: none; }
.list-clean > li { display: flex; align-items: center; gap: .8rem; min-height: 58px; padding: .75rem 0; border-bottom: 1px solid #edf1f4; }
.list-clean > li:last-child { border-bottom: 0; }
.rank-number { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #edf4fb; color: #3c719b; font-size: .76rem; font-weight: 800; }
.list-primary { min-width: 0; flex: 1; }
.list-primary strong,
.list-primary small { display: block; }
.list-primary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-primary small { color: var(--wr-muted); margin-top: .18rem; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.quick-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: .85rem 1rem;
  border: 1px solid var(--wr-line);
  border-radius: 11px;
  color: var(--wr-navy-900);
  background: #fff;
  font-weight: 700;
  text-decoration: none;
}
.quick-link:hover { border-color: #a9c8e5; color: var(--wr-blue); box-shadow: 0 8px 20px rgba(28,56,78,.06); }
.quick-link .app-icon:last-child { width: 1rem; }
.distribution-row { display: grid; grid-template-columns: 70px 1fr 54px; align-items: center; gap: .75rem; margin-bottom: .9rem; }
.distribution-row:last-child { margin-bottom: 0; }
.distribution-row strong { text-align: right; font-size: .82rem; }
.distribution-row .progress { height: 8px; background: #eaf0f5; }
.distribution-row .progress-bar { background: var(--wr-teal); }

.empty-state { padding: 2.5rem 1.25rem; text-align: center; }
.empty-state-icon { display: grid; place-items: center; width: 42px; height: 42px; margin: 0 auto .85rem; border-radius: 50%; background: #eaf2f8; color: var(--wr-teal); font-size: 2rem; line-height: 1; }
.empty-state h3 { margin-bottom: .35rem; color: var(--wr-navy-900); font-size: 1rem; }
.empty-state p { max-width: 480px; margin: 0 auto 1rem; color: var(--wr-muted); }
.pagination-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.toast-stack { position: fixed; top: 86px; right: 1rem; z-index: 1090; display: grid; gap: .5rem; width: min(380px, calc(100vw - 2rem)); }
.app-toast { border: 0; border-radius: 10px; box-shadow: 0 16px 35px rgba(16,37,54,.18); }

.filter-card .card-body { padding: 1rem; }
.action-strip { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin-bottom: 1rem; }
.status-badge-active { color: #147a6d; background: #e3f6f2; }
.status-badge-muted { color: #68798a; background: #edf1f4; }
.status-badge-warning { color: #9a620b; background: #fff2d7; }
.status-badge-danger { color: #a32f2f; background: #fde8e8; }
.question-button { min-width: 58px; min-height: 58px; font-size: 1.15rem; }
.question-button.is-wrong { background: var(--wr-red); color: white; border-color: var(--wr-red); }
.qr-camera-frame { position: relative; min-height: 280px; overflow: hidden; border-radius: 12px; background: #0e1d29; }
.qr-camera-frame video { display: block; min-height: 280px; max-height: 430px; object-fit: cover; }
.qr-camera-guide { position: absolute; inset: 50% auto auto 50%; width: min(220px, 60%); aspect-ratio: 1; border: 2px solid rgba(255,255,255,.9); border-radius: 16px; box-shadow: 0 0 0 999px rgba(5,15,22,.28); transform: translate(-50%,-50%); pointer-events: none; }
.grading-summary { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border-radius: 10px; background: #f3f7fa; color: var(--wr-muted); }
.grading-summary strong { margin-left: .25rem; color: var(--wr-navy-900); font-size: 1.1rem; }
.sticky-action-bar { position: sticky; bottom: 1rem; z-index: 10; display: flex; align-items: center; gap: .6rem; width: fit-content; margin-top: 1.25rem; padding: .55rem; border: 1px solid var(--wr-line); border-radius: 12px; background: rgba(255,255,255,.96); box-shadow: 0 14px 35px rgba(16,37,54,.13); }
.app-form-card { max-width: 860px; }
.app-form-card .card-body { padding: clamp(1rem, 3vw, 1.75rem); }
.app-form-card input:not([type="checkbox"]):not([type="radio"]),
.app-form-card select,
.app-form-card textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: .55rem .75rem;
  border: 1px solid #cbd7e0;
  border-radius: 9px;
  color: var(--wr-text);
  background: #fff;
}
.app-form-card textarea { min-height: 110px; }
.app-form-card input:focus,
.app-form-card select:focus,
.app-form-card textarea:focus { border-color: #70a8e8; outline: 0; box-shadow: 0 0 0 .2rem rgba(36,121,232,.12); }
.field-row { margin-bottom: 1.15rem; }
.field-error { color: var(--wr-red); font-size: .78rem; margin-top: .35rem; }
.form-check-input { width: 1.2rem; height: 1.2rem; }
.mode-switcher { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.mode-option { display: flex; align-items: center; gap: .85rem; min-height: 76px; padding: 1rem; border: 1px solid var(--wr-line); border-radius: 12px; color: var(--wr-text); background: #fff; text-decoration: none; }
.mode-option:hover { border-color: #a9c8e5; color: var(--wr-text); box-shadow: 0 7px 20px rgba(28,56,78,.06); }
.mode-option.is-active { border-color: #6ebcb0; box-shadow: inset 0 0 0 1px #6ebcb0; }
.mode-option > span:nth-child(2) { min-width: 0; flex: 1; }
.mode-option strong, .mode-option small { display: block; }
.mode-option strong { color: var(--wr-navy-900); }
.mode-option small { margin-top: .2rem; color: var(--wr-muted); }
.mode-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #edf4f8; color: var(--wr-teal); font-family: Georgia, "STSong", serif; font-weight: 700; }
.mode-option.is-active .mode-icon { color: #fff; background: var(--wr-teal); }
.test-builder { overflow: hidden; }
.test-builder > .card-body { padding: 0; }
.test-builder input:not([type="checkbox"]):not([type="radio"]),
.test-builder select,
.test-builder textarea { display: block; width: 100%; min-height: 44px; padding: .55rem .75rem; border: 1px solid #cbd7e0; border-radius: 9px; color: var(--wr-text); background: #fff; }
.test-builder input:focus, .test-builder select:focus, .test-builder textarea:focus { border-color: #70a8e8; outline: 0; box-shadow: 0 0 0 .2rem rgba(36,121,232,.12); }
.builder-section { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: .4rem; padding: clamp(1.1rem, 3vw, 1.8rem); border-bottom: 1px solid #e7edf2; }
.builder-section:last-child { border-bottom: 0; }
.section-number { color: #7e99aa; font-family: Georgia, "Times New Roman", serif; font-size: .78rem; font-weight: 700; letter-spacing: .08em; }
.section-content { min-width: 0; }
.section-heading { margin-bottom: 1rem; }
.section-heading h2 { margin: 0; color: var(--wr-navy-900); font-family: Georgia, "STSong", "SimSun", serif; font-size: 1.12rem; }
.section-heading p { margin: .28rem 0 0; color: var(--wr-muted); font-size: .82rem; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.option-card { min-height: 64px; padding: .8rem .9rem; border: 1px solid #dce5eb; border-radius: 10px; background: #fafcfd; }
.option-card.has-error { border-color: #eaa4a4; background: #fff8f8; }
.option-card .form-check { margin: 0; }
.option-card .form-check-label { color: var(--wr-navy-900); font-weight: 700; }
.review-scope-warning { padding: 1rem; border: 1px solid #ecd49d; border-radius: 11px; background: #fffbf1; }
.availability-panel { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .2rem 1rem; padding: 1rem 1.1rem; border: 1px solid #cde2de; border-radius: 11px; background: #f2faf8; }
.availability-panel span { color: #52736e; font-size: .8rem; font-weight: 700; }
.availability-panel strong { grid-row: 1 / span 2; grid-column: 2; color: #147a6d; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; }
.availability-panel small { color: var(--wr-muted); }
.preview-stat { height: 100%; padding: .9rem 1rem; border-top: 3px solid #9bcfc7; }
.preview-stat span, .preview-stat strong { display: block; }
.preview-stat span { color: var(--wr-muted); font-size: .72rem; font-weight: 700; }
.preview-stat strong { margin-top: .25rem; color: var(--wr-navy-900); font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; }
.preview-roster .card-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.student-plan { border-top: 1px solid #e8eef2; }
.student-plan:first-child { border-top: 0; }
.student-plan > summary { display: grid; grid-template-columns: minmax(145px, .75fr) 2fr auto; align-items: center; gap: 1rem; min-height: 72px; padding: .9rem 1rem; cursor: pointer; list-style: none; }
.student-plan > summary::-webkit-details-marker { display: none; }
.student-plan > summary:hover { background: #f8fafc; }
.student-plan[open] > summary { background: #f3f7fa; }
.student-plan-name strong, .student-plan-name small { display: block; }
.student-plan-name small { margin-top: .15rem; color: var(--wr-muted); }
.student-plan-counts { display: flex; flex-wrap: wrap; gap: .35rem; }
.student-plan-toggle { color: var(--wr-blue); font-size: .76rem; font-weight: 700; }
.student-plan[open] .student-plan-toggle::after { content: "收起"; }
.student-plan[open] .student-plan-toggle { font-size: 0; }
.student-plan[open] .student-plan-toggle::after { font-size: .76rem; }
.plan-items-table { background: #fff; }
.preview-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.preview-actions > span { margin-left: auto; color: var(--wr-muted); font-size: .76rem; }
.review-load-chart { display: grid; grid-template-columns: repeat(7, minmax(34px, 1fr)); align-items: end; gap: clamp(.4rem, 2vw, 1rem); min-height: 190px; padding: .5rem .4rem 0; }
.review-load-chart.is-compact { min-height: 150px; }
.load-column { display: grid; grid-template-rows: 24px 1fr 24px; align-items: end; height: 170px; text-align: center; }
.is-compact .load-column { height: 130px; }
.load-value { color: var(--wr-navy-900); font-size: .72rem; font-weight: 800; }
.load-track { position: relative; width: min(34px, 70%); height: 100%; min-height: 78px; margin: 0 auto; overflow: hidden; border-radius: 7px 7px 3px 3px; background: #edf2f5; }
.load-bar { position: absolute; right: 0; bottom: 0; left: 0; min-height: 3px; border-radius: 7px 7px 3px 3px; background: var(--wr-teal); }
.load-bar.is-overloaded { background: var(--wr-red); }
.load-label { color: var(--wr-muted); font-size: .7rem; white-space: nowrap; }
.load-advice-list { display: grid; gap: .4rem; margin: 1rem 0 0; padding: .85rem 1rem .85rem 2rem; border-radius: 10px; color: #5f6f7c; background: #f5f8fa; font-size: .8rem; }
.learning-event-note { margin-top: 1rem; padding: .85rem 1rem; border-left: 3px solid var(--wr-blue); border-radius: 0 9px 9px 0; color: #526675; background: #f3f7fb; font-size: .8rem; }
.learning-event-note strong { color: var(--wr-navy-900); }
.concept-strip { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem 1rem; padding: .7rem .9rem; border: 1px solid #dfe7ec; border-radius: 10px; color: #607484; background: #f8fafb; font-size: .76rem; }
.concept-strip > span:first-child { color: var(--wr-navy-900); font-weight: 800; }
.concept-help { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: .15rem; padding: 0; border: 1px solid #abc1d1; border-radius: 50%; color: #477795; background: #fff; font-size: .7rem; font-weight: 800; vertical-align: middle; }
.concept-help:hover, .concept-help:focus { border-color: var(--wr-blue); color: var(--wr-blue); outline: 0; box-shadow: 0 0 0 3px rgba(36,121,232,.12); }
.onboarding-card { border-top: 3px solid var(--wr-teal); }
.onboarding-card .card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.onboarding-progress > div:first-child { display: flex; justify-content: space-between; margin-bottom: .45rem; color: var(--wr-muted); font-size: .76rem; }
.onboarding-progress .progress, .settings-list + .progress { height: 7px; }
.onboarding-progress .progress-bar, .progress-bar { background: var(--wr-teal); }
.onboarding-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin-top: 1rem; }
.onboarding-task { display: flex; align-items: center; gap: .7rem; min-height: 72px; padding: .75rem; border: 1px solid #dce5ea; border-radius: 10px; color: var(--wr-text); text-decoration: none; }
.onboarding-task:hover { border-color: #a9c8e5; color: var(--wr-text); }
.onboarding-task.is-done { background: #f1faf7; border-color: #cce6df; }
.task-check { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; color: #597483; background: #e9f0f4; font-size: .76rem; font-weight: 800; }
.is-done .task-check { color: #fff; background: var(--wr-teal); }
.onboarding-task strong, .onboarding-task small { display: block; }
.onboarding-task small { margin-top: .2rem; color: var(--wr-muted); font-size: .7rem; }
.settings-list { margin: 0; }
.settings-list > div { display: grid; grid-template-columns: 130px 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid #e9eef2; }
.settings-list > div:last-child { border-bottom: 0; }
.settings-list dt { color: var(--wr-muted); font-size: .78rem; }
.settings-list dd { margin: 0; color: var(--wr-navy-900); font-weight: 700; }
.review-class-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.review-class-card { overflow: hidden; border-top: 3px solid var(--wr-teal); }
.review-card-eyebrow { color: var(--wr-teal); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.review-class-card h2 { margin: .35rem 0 0; color: var(--wr-navy-900); font-family: Georgia, "STSong", "SimSun", serif; font-size: 1.35rem; }
.review-class-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; margin-top: 1.15rem; }
.review-class-metrics > div { padding: .75rem; border: 1px solid #e1e9ee; border-radius: 10px; background: #f8fafb; }
.review-class-metrics span, .review-class-metrics small { display: block; color: var(--wr-muted); font-size: .7rem; }
.review-class-metrics strong { display: inline-block; margin: .25rem .18rem 0 0; color: var(--wr-navy-900); font-size: 1.45rem; }
.review-filter-pills, .review-category-tabs { display: flex; flex-wrap: wrap; gap: .45rem; }
.review-filter-pills a, .review-category-tabs a { padding: .55rem .8rem; border: 1px solid #d7e2e9; border-radius: 999px; color: #566d7c; background: #fff; font-size: .78rem; font-weight: 700; text-decoration: none; }
.review-filter-pills a.active, .review-category-tabs a.active { border-color: var(--wr-teal); color: #fff; background: var(--wr-teal); }
.review-category-tabs { margin-bottom: 1rem; }
.review-category-tabs a { padding: .7rem 1rem; border-radius: 10px; }
.review-category-tabs strong { margin-left: .35rem; }
.review-student-cards { display: none; }
.review-word-row { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) minmax(280px, 1.4fr); align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid #e7edf1; }
.review-word-row:last-child { border-bottom: 0; }
.review-word-row h2 { margin: 0; color: var(--wr-navy-900); font-family: Georgia, "Times New Roman", serif; font-size: 1.1rem; }
.review-word-row p { margin: .2rem 0 0; color: var(--wr-muted); }
.review-word-labels, .review-word-stats { display: flex; flex-wrap: wrap; gap: .4rem; }
.review-word-stats { color: var(--wr-muted); font-size: .74rem; }
.review-word-stats span { padding-right: .65rem; border-right: 1px solid #dfe7ec; }
.review-word-stats span:last-child { border-right: 0; }
.review-source-picker { padding: 1rem; border: 1px solid #cfe0e8; border-radius: 11px; background: #f4f9fb; }
.review-source-picker > div:first-child strong, .review-source-picker > div:first-child small { display: block; }
.review-source-picker > div:first-child small { margin-top: .2rem; color: var(--wr-muted); }
.settings-section + .settings-section { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid #e4ebef; }
.settings-section h2 { color: var(--wr-navy-900); font-family: Georgia, "STSong", "SimSun", serif; font-size: 1.1rem; }
.brand-source-options ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: 0; padding: 0; list-style: none; }
.brand-source-options label { display: block; padding: .85rem; border: 1px solid #dbe5eb; border-radius: 10px; cursor: pointer; }
.brand-logo-preview { max-width: 220px; max-height: 80px; padding: .6rem; border: 1px solid #dce5ea; border-radius: 9px; object-fit: contain; }
.paper-setting-note { display: flex; align-items: flex-start; gap: .8rem; margin-top: 1.25rem; padding: 1rem; border-left: 4px solid var(--wr-teal); border-radius: 0 10px 10px 0; background: #eef8f6; }
.paper-setting-note strong { color: #126f65; white-space: nowrap; }
.paper-setting-note span { color: #526a76; }
.help-layout { display: grid; grid-template-columns: 245px minmax(0, 1fr); align-items: start; gap: 1rem; }
.help-toc { position: sticky; top: 82px; }
.help-toc strong { display: block; margin-bottom: .7rem; color: var(--wr-navy-900); }
.help-toc nav { display: grid; }
.help-toc a { padding: .38rem 0; color: #597080; font-size: .78rem; text-decoration: none; }
.help-toc a:hover { color: var(--wr-blue); }
.help-chapters { display: grid; gap: .8rem; }
.help-section { scroll-margin-top: 82px; }
.help-section .card-body { position: relative; padding-left: 4rem; }
.help-section .card-body > span { position: absolute; left: 1.25rem; top: 1.35rem; color: #86a0b0; font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
.help-section h2 { color: var(--wr-navy-900); font-family: Georgia, "STSong", "SimSun", serif; font-size: 1.1rem; }
.help-section p { color: #5c6e7a; line-height: 1.75; }

.offcanvas.app-mobile-nav {
  width: min(290px, 86vw);
  max-width: 86vw;
  border: 0;
  background: var(--wr-navy-950);
  color: #fff;
}
.app-mobile-nav .offcanvas-header { border-bottom: 1px solid rgba(255,255,255,.08); }
.app-mobile-nav .sidebar-inner { min-height: calc(100vh - 66px); }
.auth-body { min-height: 100vh; background: #eef3f7; }
.auth-shell { width: min(1040px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0; }
.auth-brand { display: flex; align-items: center; justify-content: center; margin: 0 auto 2rem; }
.auth-card { max-width: 430px; margin: 7vh auto 0; overflow: hidden; border: 0; box-shadow: 0 20px 60px rgba(16,37,54,.12); }
.auth-card::before { display: block; width: 100%; height: 5px; background: var(--wr-teal); content: ""; }

@media (max-width: 991.98px) {
  .app-main { margin-left: 0; }
  .app-content { padding-top: 1.25rem; }
}
@media (max-width: 767.98px) {
  .app-topbar { min-height: 62px; }
  .topbar-context { display: none; }
  .page-heading { display: block; }
  .page-actions { justify-content: flex-start; margin-top: 1rem; }
  .advice-stats { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .table-responsive .table { min-width: 680px; }
  .pagination-wrap { align-items: flex-start; flex-direction: column; }
  .toast-stack { top: 72px; }
  .mode-switcher { grid-template-columns: 1fr; }
  .mode-option { min-height: 68px; }
  .builder-section { grid-template-columns: 1fr; }
  .section-number { margin-bottom: .25rem; }
  .option-grid { grid-template-columns: 1fr; }
  .student-plan > summary { grid-template-columns: 1fr auto; gap: .5rem; }
  .student-plan-counts { grid-column: 1 / -1; }
  .preview-actions { align-items: stretch; flex-direction: column; }
  .preview-actions form, .preview-actions .btn { width: 100%; }
  .preview-actions > span { margin: .35rem 0 0; }
  .review-load-chart { gap: .25rem; padding-inline: 0; }
  .load-track { width: min(28px, 72%); }
  .onboarding-grid { grid-template-columns: 1fr; }
  .help-layout { grid-template-columns: 1fr; }
  .help-toc { position: static; }
  .settings-list > div { grid-template-columns: 1fr; gap: .25rem; }
  .review-class-grid { grid-template-columns: 1fr; }
  .review-class-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-student-table { display: none; }
  .review-student-cards { display: grid; gap: .75rem; }
  .review-student-cards h2 { margin: 0; font-size: 1rem; }
  .review-mobile-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; margin-top: .9rem; }
  .review-mobile-metrics span { padding: .55rem .3rem; border-radius: 8px; color: var(--wr-muted); background: #f3f7f9; font-size: .7rem; text-align: center; }
  .review-mobile-metrics strong { display: block; margin-top: .15rem; color: var(--wr-navy-900); font-size: 1rem; }
  .review-word-row { grid-template-columns: 1fr; gap: .65rem; }
  .review-category-tabs { display: grid; grid-template-columns: 1fr; }
  .brand-source-options ul { grid-template-columns: 1fr; }
  .paper-setting-note { display: block; }
  .paper-setting-note span { display: block; margin-top: .35rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
.answer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .65rem;
}

.continuous-answer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .65rem;
  min-height: 48px;
  text-align: left;
  border: 1px solid var(--tblr-border-color, #dce1e7);
}

.continuous-answer > span {
  display: inline-grid;
  place-items: center;
  min-width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  background: #eef2f6;
  color: #52606d;
}

.continuous-answer.is-wrong {
  border-color: #d63939;
  background: #fff1f1;
  color: #a61e1e;
}

.continuous-answer.is-wrong > span {
  background: #d63939;
  color: #fff;
}

/* 全站操作反馈：颜色之外同时使用图标、标题、实色边框和文字层级。 */
.toast-stack {
  position: fixed;
  top: 82px;
  left: 50%;
  right: auto;
  z-index: 1090;
  display: grid;
  gap: .75rem;
  width: min(420px, calc(100vw - 2rem));
  transform: translateX(-50%);
  pointer-events: none;
}
.app-toast {
  position: relative;
  display: grid;
  grid-template-columns: 6px 38px minmax(0, 1fr) 32px;
  align-items: start;
  width: 100%;
  max-width: none;
  min-height: 80px;
  overflow: hidden;
  border: 1px solid;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(16, 37, 54, .22);
  color: var(--wr-text);
  pointer-events: auto;
}
.app-toast-error { width: min(480px, calc(100vw - 2rem)); min-height: 120px; margin-left: max(-30px, calc((420px - 100vw + 2rem) / 2)); border-color: #d63939; background: #fff7f7; }
.app-toast-warning { border-color: #d89216; background: #fffaf0; }
.app-toast-success { border-color: #19917f; background: #f3fbf9; }
.app-toast-info { border-color: #2479e8; background: #f4f8fe; }
.app-toast-accent { align-self: stretch; min-height: 76px; }
.app-toast-error .app-toast-accent { background: #c92a2a; }
.app-toast-warning .app-toast-accent { background: #d17b0f; }
.app-toast-success .app-toast-accent { background: #158574; }
.app-toast-info .app-toast-accent { background: #2479e8; }
.app-toast-icon { padding: 17px 0 0 12px; font-size: 1.25rem; line-height: 1; }
.app-toast-copy { display: grid; gap: .25rem; padding: 14px 10px 15px 12px; font-size: .94rem; line-height: 1.45; }
.app-toast-copy strong { color: var(--wr-navy-950); font-size: 1rem; }
.app-toast-copy span { overflow-wrap: anywhere; }
.app-toast-close { margin: 12px 9px 0 0; padding: .55rem; opacity: .7; }
.app-toast-close:hover, .app-toast-close:focus { opacity: 1; }

.feedback-inline {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: .85rem;
  padding: 1rem 1.1rem;
  border: 1px solid;
  border-left-width: 5px;
  border-radius: 11px;
}
.feedback-inline-icon { padding-top: .05rem; font-size: 1.35rem; text-align: center; }
.feedback-inline-content h2 { margin: 0 0 .3rem; color: var(--wr-navy-950); font-size: 1rem; }
.feedback-inline-content p { margin: 0; line-height: 1.55; }
.feedback-inline-success { border-color: #19917f; background: #f2fbf8; color: #12695d; }
.feedback-inline-info { border-color: #2479e8; background: #f3f8fe; color: #245f9d; }
.feedback-inline-warning { border-color: #d89216; background: #fff9ec; color: #80500b; }
.feedback-inline-error { border-color: #d63939; background: #fff5f5; color: #8e2525; }
.feedback-details summary { width: fit-content; margin-top: .65rem; cursor: pointer; color: inherit; font-weight: 700; }

.status-banner {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid;
  border-left-width: 5px;
  border-radius: 13px;
  box-shadow: 0 8px 22px rgba(18, 49, 72, .06);
}
.status-banner-success { border-color: #19917f; background: #f2fbf8; }
.status-banner-info { border-color: #2479e8; background: #f3f8fe; }
.status-banner-warning { border-color: #d89216; background: #fff9ec; }
.status-banner-error { border-color: #d63939; background: #fff5f5; }
.status-banner-icon { font-size: 1.55rem; text-align: center; }
.status-banner-copy h2 { margin: 0; color: var(--wr-navy-950); font-size: 1.12rem; }
.status-banner-copy p { margin: .25rem 0 0; color: var(--wr-muted); }
.status-banner-stats { margin-top: .55rem; color: var(--wr-navy-900); font-weight: 700; }

.field-row.has-error .form-control,
.field-row.has-error .form-select,
.field-row .is-invalid,
.option-card.has-error {
  border-color: #c92a2a !important;
  box-shadow: 0 0 0 .12rem rgba(201, 42, 42, .08);
}
.field-error {
  display: flex;
  align-items: flex-start;
  gap: .3rem;
  margin-top: .4rem;
  color: #a61e1e;
  font-size: .83rem;
  font-weight: 700;
}
.field-error::before { content: "⛔"; font-size: .74rem; line-height: 1.5; }

.app-confirm-dialog { overflow: hidden; border: 0; border-radius: 14px; box-shadow: 0 24px 70px rgba(16, 37, 54, .25); }
.app-confirm-modal { width: min(460px, calc(100vw - 2rem)); max-width: 460px; margin-right: auto; margin-left: auto; }
.app-confirm-dialog .modal-body { padding: 1.5rem 1.5rem 1.1rem; }
.app-confirm-dialog .modal-footer { padding: 1rem 1.5rem 1.4rem; border-top: 0; }
.app-confirm-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 1rem; border-radius: 12px; background: #fff1d6; font-size: 1.4rem; }
.app-confirm-dialog .modal-title { margin-bottom: .45rem; color: var(--wr-navy-950); font-size: 1.15rem; }

@media (max-width: 575.98px) {
  .toast-stack {
    top: 70px;
    width: calc(100vw - 1.25rem);
  }
  .app-toast,
  .app-toast-error {
    width: 100%;
    margin-left: 0;
  }
  .feedback-inline,
  .status-banner {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: .95rem;
  }
  .status-banner-actions { grid-column: 1 / -1; }
  .status-banner-actions .btn { width: 100%; }
  .app-confirm-dialog .modal-footer {
    display: grid;
    grid-template-columns: 1fr;
  }
  .app-confirm-dialog .modal-footer .btn { width: 100%; }
  .grading-scan-grid { margin-right: 0; margin-left: 0; }
}
