:root {
  --ink: #13202a;
  --muted: #687789;
  --line: #d8e2e4;
  --bg: #f4f7f6;
  --panel: #ffffff;
  --surface: #f9fbfa;
  --green: #17684f;
  --green-soft: #e4f2ec;
  --blue: #265f99;
  --blue-soft: #e7f0fa;
  --rose: #a94052;
  --rose-soft: #faeaed;
  --gold: #7b5b14;
  --gold-soft: #f7eed8;
  --shadow: 0 16px 42px rgba(20, 33, 43, 0.08);
  --shadow-strong: 0 22px 58px rgba(20, 33, 43, 0.13);
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-reading: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

.hidden { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.6) 0 18%, transparent 18% 100%),
    radial-gradient(circle at 14% 8%, rgba(231, 240, 250, 0.9), transparent 30%),
    linear-gradient(180deg, #edf5f2 0%, #f8faf8 360px, var(--bg) 100%);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea, select { font: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 {
  font-family: var(--font-display);
  color: #12222d;
}
h1 {
  font-size: 27px;
  letter-spacing: 0;
  line-height: 1.18;
  font-weight: 800;
}
h2 {
  font-size: 23px;
  letter-spacing: 0;
  line-height: 1.34;
  font-weight: 780;
}
h3 {
  font-size: 16px;
  letter-spacing: 0;
  line-height: 1.42;
  font-weight: 760;
}

.shell {
  width: min(1160px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 26px 0 48px;
  position: relative;
  z-index: 1;
}

.fixed-watermark {
  position: fixed;
  right: clamp(18px, 3vw, 38px);
  bottom: clamp(18px, 3vw, 34px);
  width: clamp(128px, 12vw, 176px);
  opacity: 0.11;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid rgba(214, 224, 228, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 248, 0.92)),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px rgba(20, 33, 43, 0.07);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.top:hover {
  border-color: rgba(38, 95, 153, 0.24);
}

.top::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(23, 104, 79, 0.28), transparent);
}

.top::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 0;
  width: 76px;
  height: 4px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.brand {
  display: flex;
  gap: 0;
  align-items: center;
}

.brand-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.top-actions {
  justify-content: flex-end;
  gap: 8px;
}

.top .btn {
  min-height: 38px;
  padding: 0 14px;
  box-shadow: none;
}

.muted {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.68;
  font-weight: 430;
}

.panel, .card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 253, 252, 0.98)),
    var(--panel);
  border: 1px solid rgba(216, 226, 228, 0.96);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(20, 33, 43, 0.065);
}

.panel {
  padding: 25px;
  position: relative;
}

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

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.topic-panel {
  gap: 13px;
}

.sentence-topic-grid {
  gap: 10px;
}

.topic-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 14px;
}

.sentence-card {
  min-height: 0;
  padding: 14px 15px;
  gap: 12px;
  align-content: start;
  box-shadow: none;
}

.sentence-card h3 {
  font-size: 17px;
  line-height: 1.34;
}

.sentence-card .row.between {
  align-items: flex-start;
  gap: 12px;
}

.sentence-card .mini-status {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 0 8px;
  font-size: 12px;
}

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

.topic-progress div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px;
  display: grid;
  gap: 3px;
}

.topic-progress b {
  font-size: 18px;
}

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

.topic-progress-line {
  display: grid;
  gap: 8px;
}

.topic-progress-copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.topic-progress-copy b {
  font-size: 18px;
  letter-spacing: 0;
}

.topic-progress-copy span {
  color: var(--muted);
  font-size: 13px;
}

.topic-meter {
  height: 7px;
  border-radius: 999px;
  background: #edf3f4;
  overflow: hidden;
}

.topic-meter i {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

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

.sentence-card .topic-actions {
  display: flex;
  justify-content: flex-start;
}

.sentence-card .btn {
  min-height: 36px;
  padding: 0 14px;
  box-shadow: none;
}

.card {
  padding: 20px;
  text-align: left;
  cursor: pointer;
  min-height: 156px;
  display: grid;
  gap: 10px;
  align-content: start;
  position: relative;
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.card h3 {
  line-height: 1.48;
  font-weight: 720;
}

.card-kicker {
  width: fit-content;
  border: 1px solid rgba(38, 95, 153, 0.16);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 820;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--green), #2b7896 60%, transparent);
}

.card > * {
  position: relative;
  z-index: 1;
}

.card:hover {
  border-color: rgba(23, 104, 79, 0.38);
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
  background: #fcfefd;
}

.card:disabled {
  cursor: default;
  opacity: 0.78;
  transform: none;
}

.card:disabled:hover {
  border-color: var(--line);
  box-shadow: var(--shadow);
  background: var(--panel);
}

.card-foot {
  align-self: end;
  margin-top: auto;
  width: fit-content;
  border-radius: 999px;
  background: #eef6f2;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.logic-practice-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 246, 0.98)),
    var(--panel);
  border-color: rgba(23, 104, 79, 0.24);
}

.logic-practice-card::before {
  background: linear-gradient(90deg, var(--green), var(--gold), var(--blue));
}

.logic-practice-card .card-kicker,
.logic-task-card .card-kicker {
  border-color: rgba(23, 104, 79, 0.18);
  background: var(--green-soft);
  color: var(--green);
}

.student-home {
  gap: 18px;
}

.student-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  align-items: stretch;
}

.learning-summary {
  padding: 24px;
  display: grid;
  align-content: center;
  gap: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 253, 0.92)),
    #fff;
}

.learning-summary h2 {
  font-size: 21px;
  line-height: 1.38;
  font-weight: 760;
}

.student-task-panel-empty {
  padding-bottom: 20px;
}

.student-help-footer {
  margin-top: 18px;
  border: 1px solid rgba(216, 226, 228, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px 14px;
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.student-help-footer .btn {
  min-height: 34px;
  padding: 0 12px;
}

.task-empty-strip {
  border: 1px solid rgba(216, 226, 228, 0.96);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(249, 251, 250, 0.96), rgba(240, 247, 253, 0.72)),
    #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
}

.task-empty-strip b {
  color: var(--ink);
}

.issue-modal {
  width: min(680px, calc(100vw - 34px));
}

.issue-actions {
  justify-content: flex-end;
}

.issue-copy-box {
  min-height: 130px;
  font-size: 13px;
}

.issue-report-list {
  display: grid;
  gap: 12px;
}

.issue-report-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 15px;
  display: grid;
  gap: 12px;
}

.issue-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.issue-check-grid span {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 780;
}

.issue-check-grid .ok {
  background: var(--green-soft);
  color: var(--green);
}

.issue-check-grid .bad {
  background: var(--rose-soft);
  color: var(--rose);
}

.report-entry-btn {
  width: fit-content;
  margin-top: 2px;
  min-height: 50px;
  padding: 0 18px;
  gap: 10px;
  background: linear-gradient(135deg, var(--green), #235f91);
  box-shadow: 0 14px 26px rgba(23, 104, 79, 0.18);
}

.report-entry-btn small {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.report-mini-btn {
  color: var(--green);
  background: var(--green-soft);
}

.report-mini-btn:hover {
  background: #d7ece3;
}

.daily-quote {
  border: 1px solid rgba(23, 104, 79, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(228, 242, 236, 0.72), rgba(231, 240, 250, 0.72)),
    #fff;
  box-shadow: 0 14px 34px rgba(20, 33, 43, 0.06);
  padding: 22px;
  display: grid;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.daily-quote::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 0;
  width: 54px;
  height: 4px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.quote-text {
  display: grid;
  gap: 8px;
}

.daily-quote p {
  margin: 0;
  font-family: var(--font-reading);
  font-size: 20px;
  line-height: 1.62;
  font-weight: 680;
}

.daily-quote .quote-zh {
  color: var(--muted);
  font-size: 17px;
  font-weight: 560;
}

.daily-quote.compact {
  padding: 14px;
  gap: 9px;
  box-shadow: none;
}

.daily-quote.compact p {
  font-size: 15px;
  line-height: 1.68;
  font-weight: 650;
}

.daily-quote.compact .quote-zh {
  font-size: 14px;
  font-weight: 540;
}

.quote-label,
.quote-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.quote-foot {
  justify-content: flex-end;
}

.quote-label span,
.quote-foot span {
  font-weight: 800;
}

.quote-controls {
  display: inline-flex;
  gap: 6px;
}

.quote-controls button {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(38, 95, 153, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--blue);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.quote-controls button:hover {
  background: #fff;
  border-color: rgba(23, 104, 79, 0.34);
  color: var(--green);
}

.student-panel {
  overflow: hidden;
}

.teacher-section {
  overflow: hidden;
  border-color: rgba(104, 119, 137, 0.18);
}

.section-heading {
  padding-bottom: 4px;
}

.section-heading h2 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.section-heading h2::before {
  content: "";
  width: 5px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--green), var(--blue));
}

.teacher-add-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 0.8fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(248, 251, 250, 0.94)),
    var(--surface);
}

.teacher-action-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(23, 104, 79, 0.16);
  border-radius: 8px;
  background: #f4faf7;
}

.teacher-workflow-strip {
  display: none;
}

.workflow-step {
  min-height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(241, 247, 245, 0.94)),
    #f6f9f8;
  color: #425264;
  font-size: 13px;
  font-weight: 850;
  border: 1px solid rgba(214, 224, 228, 0.62);
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, color 0.16s ease;
}

.workflow-step:hover {
  border-color: rgba(23, 104, 79, 0.36);
  color: #17684f;
  box-shadow: 0 10px 22px rgba(20, 33, 43, 0.08);
  transform: translateY(-1px);
}

.workflow-step.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--green), var(--blue));
  box-shadow: 0 12px 26px rgba(23, 104, 79, 0.18);
}

.practice-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.94)),
    var(--panel);
}

.answer-textarea {
  min-height: 190px;
  font-size: 17px;
  line-height: 1.7;
}

.answer-actions {
  padding-top: 2px;
}

.stack {
  display: grid;
  gap: 15px;
}

.stack.compact { gap: 7px; }

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

.between { justify-content: space-between; }

.btn {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  padding: 0 17px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(20, 33, 43, 0.13);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.btn.secondary {
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: none;
}

.btn.ghost {
  background: transparent;
  color: var(--blue);
  box-shadow: none;
  border: 1px solid rgba(38, 95, 153, 0.18);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn.secondary:hover, .btn.ghost:hover {
  background: #f1f7fc;
  box-shadow: none;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.input, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: #fff;
  color: var(--ink);
  line-height: 1.5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.input:focus, .textarea:focus {
  outline: 0;
  border-color: #7aa9d4;
  box-shadow: 0 0 0 3px rgba(38, 95, 153, 0.13);
}

.rename-input {
  min-width: 0;
  width: 100%;
}

.note-input {
  min-width: 0;
  width: 100%;
  min-height: 76px;
  line-height: 1.5;
}

.note-display {
  min-width: 0;
  max-width: 100%;
  min-height: 34px;
  line-height: 1.5;
  color: var(--ink);
  white-space: normal;
}

.note-editor {
  display: grid;
  gap: 8px;
}

.compact-select {
  min-width: 150px;
  padding: 8px 10px;
}

.task-target-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 12px;
  background: var(--surface);
}

.task-settings-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) repeat(2, minmax(150px, 0.7fr)) minmax(210px, 0.95fr);
  gap: 10px;
  align-items: start;
}

.task-settings-grid[data-task-kind-fields="logic"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.task-settings-grid .form-field,
.task-target-grid .form-field {
  min-width: 0;
}

.task-target-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(280px, 1.1fr);
  gap: 10px;
  align-items: stretch;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field > span {
  font-size: 13px;
  font-weight: 760;
  color: var(--ink);
}

.form-field > small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.class-code-grid {
  display: grid;
  grid-template-columns: minmax(112px, 0.34fr) minmax(96px, 0.28fr) minmax(0, 1fr);
  gap: 10px;
}

.class-code-preview {
  border: 1px solid rgba(216, 226, 228, 0.96);
  border-radius: 8px;
  background: #f8fbfa;
  color: var(--muted);
  padding: 9px 11px;
  font-size: 13px;
  line-height: 1.35;
}

.class-code-preview.ready {
  border-color: rgba(23, 104, 79, 0.34);
  background: rgba(230, 244, 239, 0.82);
  color: var(--green);
  font-weight: 750;
}

.student-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.check-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
}

.check-row:hover {
  border-color: rgba(23, 104, 79, 0.34);
  background: #fbfefd;
}

.check-row small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
}

.textarea {
  min-height: 150px;
  font-family: var(--font-reading);
  line-height: 1.72;
  resize: vertical;
}

.report-textarea {
  min-height: min(62vh, 620px);
  white-space: pre-wrap;
}

.export-report-textarea {
  min-height: min(64vh, 680px);
  font-size: 15px;
  line-height: 1.72;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 250, 0.98)),
    #fff;
}

.question {
  font-family: var(--font-reading);
  font-size: clamp(21px, 2vw, 29px);
  line-height: 1.76;
  font-weight: 700;
  padding: 8px 0;
  white-space: pre-wrap;
}

.question-media {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.question-media img {
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

.logic-entry-grid,
.logic-form-grid,
.logic-select-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.logic-pick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.logic-pick-card {
  border: 1px solid rgba(216, 226, 228, 0.96);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 253, 252, 0.96)),
    #fff;
  padding: 18px;
  min-height: 250px;
  display: grid;
  gap: 12px;
  grid-template-rows: auto auto 1fr auto;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(20, 33, 43, 0.055);
}

.logic-pick-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.logic-pick-card.challenge::before {
  background: linear-gradient(90deg, var(--gold), var(--rose));
}

.logic-pick-card.custom::before {
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.logic-pick-card > * {
  position: relative;
  z-index: 1;
}

.logic-pick-card .btn {
  align-self: end;
  width: 100%;
}

.logic-pick-card h3 {
  font-size: 18px;
}

.logic-pick-card:hover {
  border-color: rgba(23, 104, 79, 0.28);
  box-shadow: var(--shadow);
}

.logic-entry-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 13px;
  min-height: 92px;
}

.logic-entry-grid b {
  color: var(--green);
}

.logic-select-grid {
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  align-items: end;
}

.logic-chain-panel {
  overflow: visible;
}

.logic-step-head {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.logic-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.logic-segment-list {
  display: grid;
  gap: 8px;
}

.logic-segment-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 3px;
}

.logic-segment-list div.active {
  border-color: rgba(23, 104, 79, 0.42);
  background: var(--green-soft);
}

.logic-segment-list span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.logic-reference-list {
  display: grid;
  gap: 10px;
}

.logic-reference-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.logic-prompt {
  border: 1px solid rgba(216, 226, 228, 0.96);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  font-family: var(--font-reading);
  font-size: 18px;
  line-height: 1.72;
  font-weight: 680;
}

.logic-template {
  border: 1px solid rgba(23, 104, 79, 0.18);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  border-color: var(--green);
  background: var(--green-soft);
  padding: 13px 14px;
  line-height: 1.62;
}

.logic-template span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.logic-hint-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.logic-angle-hint {
  border: 1px solid rgba(38, 95, 153, 0.18);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--blue-soft);
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.logic-angle-hint b {
  color: var(--blue);
}

.logic-textarea {
  min-height: 120px;
}

.logic-topic-task {
  border: 1px solid rgba(216, 226, 228, 0.96);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.logic-write-head {
  display: grid;
  gap: 8px;
}

.logic-topic-textarea {
  min-height: 210px;
  font-size: 17px;
  line-height: 1.72;
}

.logic-optional {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.logic-optional summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 780;
}

.logic-optional .form-field {
  margin-top: 12px;
}

.flashcard {
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
}

.flashcard b {
  font-size: 34px;
  line-height: 1.25;
}

.compact-card {
  min-height: 170px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 56px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  line-height: 1.45;
}

.choice:hover:not(:disabled) {
  border-color: #9fbedb;
  background: #f8fbff;
}

.choice.correct {
  border-color: rgba(31, 117, 91, 0.45);
  background: var(--green-soft);
  color: var(--green);
}

.choice.wrong {
  border-color: rgba(169, 64, 82, 0.45);
  background: var(--rose-soft);
  color: var(--rose);
}

.practice-locked .question,
.practice-locked .hint,
.practice-locked .reference,
.practice-locked .review-block,
.practice-locked .notice {
  -webkit-user-select: none;
  user-select: none;
}

.practice-locked textarea {
  -webkit-user-select: text;
  user-select: text;
}

.pill, .hint {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 680;
  width: fit-content;
  line-height: 1.2;
}

.pill {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid rgba(23, 104, 79, 0.1);
}

.pill.warm {
  background: var(--gold-soft);
  color: var(--gold);
  border-color: rgba(123, 91, 20, 0.14);
}

.hint {
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid rgba(123, 91, 20, 0.1);
}

.notice, .reference {
  border-left: 4px solid var(--blue);
  background: var(--blue-soft);
  padding: 13px 14px;
  border-radius: 8px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.reference {
  border-color: var(--green);
  background: var(--green-soft);
}

.danger {
  border-color: var(--rose);
  background: var(--rose-soft);
  color: var(--rose);
}

.student-hint-box {
  border: 1px solid rgba(38, 95, 153, 0.18);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(231, 240, 250, 0.72), rgba(255, 255, 255, 0.96));
  padding: 14px;
  display: grid;
  gap: 10px;
}

.student-hint-box b {
  color: var(--blue);
}

.student-hint-card {
  border: 1px solid rgba(216, 226, 228, 0.92);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 5px;
}

.student-hint-card.soft {
  background: #fbfdfc;
}

.student-hint-card span {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.student-hint-card p {
  line-height: 1.65;
  font-weight: 650;
}

.student-hint-card small {
  color: var(--muted);
  line-height: 1.55;
}

.side {
  position: sticky;
  top: 18px;
}

.progress {
  height: 10px;
  border-radius: 999px;
  background: #e4ecef;
  overflow: hidden;
}

.bar {
  height: 100%;
  background: linear-gradient(90deg, var(--green), #2b7896);
}

.feedback {
  border: 1px solid var(--line);
  border-left: 4px solid var(--rose);
  border-radius: 8px;
  padding: 12px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(104, 119, 137, 0.16);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(20, 33, 43, 0.05);
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.table th, .table td {
  border-bottom: 1px solid rgba(104, 119, 137, 0.14);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

.table th {
  color: #425264;
  font-size: 13px;
  font-weight: 760;
  background: linear-gradient(180deg, #fbfdfc, #f2f7f6);
  position: sticky;
  top: 0;
  z-index: 1;
}

.table tbody tr:hover {
  background: #fbfdfd;
}

.exercise-upload-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(360px, 1fr);
  gap: 12px;
  align-items: stretch;
}

.exercise-group-bar {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) minmax(220px, 0.9fr) auto;
  gap: 10px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid rgba(104, 119, 137, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 252, 250, 0.94)),
    #fff;
}

.group-filter-section,
.group-filter-primary {
  min-width: 0;
  border: 1px solid rgba(104, 119, 137, 0.14);
  border-radius: 8px;
  background: rgba(244, 248, 251, 0.62);
  padding: 8px;
}

.group-filter-section > span {
  display: block;
  color: #687789;
  font-size: 12px;
  font-weight: 820;
  margin: 0 0 7px;
}

.group-filter-section > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.group-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 13px;
  background: #f4f8fb;
  color: #41546a;
  border: 1px solid var(--line);
}

.group-filter-primary .group-filter {
  width: 100%;
  height: 100%;
  justify-content: center;
  min-width: 104px;
}

.group-filter span {
  color: #6d7b8d;
  font-size: 12px;
}

.group-filter.active {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.group-filter.active span {
  color: rgba(255, 255, 255, 0.78);
}

.upload-group-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.group-multi {
  display: grid;
  gap: 8px;
}

.group-check-section {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
  row-gap: 6px;
}

.group-check-section > span {
  color: #687789;
  font-size: 12px;
  font-weight: 820;
  line-height: 30px;
}

.group-check-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, max-content));
  gap: 7px;
  min-width: 0;
}

.group-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid rgba(104, 119, 137, 0.2);
  border-radius: 8px;
  background: #f8fbfb;
  color: #344154;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
  white-space: nowrap;
}

.group-check input {
  accent-color: var(--green);
}

.group-check:has(input:checked) {
  border-color: rgba(23, 104, 79, 0.34);
  background: var(--green-soft);
  color: var(--green);
}

.exercise-manage-list {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(104, 119, 137, 0.18);
  border-radius: 8px;
  background: #fff;
}

.exercise-list-head,
.exercise-manage-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.05fr) minmax(330px, 1.8fr) minmax(130px, 0.72fr) minmax(170px, 0.95fr);
  gap: 16px;
  align-items: start;
  padding: 14px 16px;
}

.exercise-list-head {
  background: linear-gradient(180deg, #f8fbfa, #f1f6f5);
  color: #425264;
  font-size: 13px;
  font-weight: 820;
}

.exercise-manage-row {
  border-top: 1px solid rgba(104, 119, 137, 0.14);
}

.exercise-manage-row:hover {
  background: #fbfdfd;
}

.exercise-name-cell,
.exercise-groups-cell,
.exercise-meta-cell {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.exercise-name-cell small {
  width: fit-content;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 820;
}

.exercise-source-cell {
  min-width: 0;
  color: #253244;
  line-height: 1.55;
  word-break: break-word;
}

.exercise-meta-cell .btn {
  width: 100%;
}

.exercise-meta-cell .mini-btn {
  width: fit-content;
}

.group-hint {
  margin-top: 6px;
  color: #6d7b8d;
  font-size: 12px;
  line-height: 1.4;
}

.student-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.student-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 5px 4px 10px;
  background: #fff;
}

.mini-btn {
  border: 0;
  border-radius: 999px;
  min-height: 28px;
  padding: 0 10px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
  margin: 2px 2px 2px 0;
}

.mini-btn:hover {
  transform: translateY(-1px);
  background: #dcebf8;
}

.danger-mini {
  color: var(--rose);
  background: var(--rose-soft);
}

.diagnosis-panel {
  display: grid;
  gap: 14px;
  white-space: normal;
  border-left-color: var(--green);
  background:
    linear-gradient(180deg, rgba(248, 252, 250, 0.98), rgba(241, 247, 245, 0.96)),
    #f6faf8;
  padding: 16px;
}

.api-route-list {
  display: grid;
  gap: 8px;
}

.api-route {
  display: grid;
  grid-template-columns: minmax(120px, 1.1fr) minmax(120px, 1fr) minmax(80px, auto);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(36, 95, 158, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.api-route.ok {
  border-color: rgba(43, 127, 90, 0.24);
}

.api-route.bad {
  border-color: rgba(188, 72, 72, 0.22);
}

.api-route span,
.api-route small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

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

.diagnosis-grid div {
  border: 1px solid rgba(23, 104, 79, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 13px 14px;
  display: grid;
  gap: 4px;
  min-height: 74px;
}

.diagnosis-grid b {
  color: var(--green);
  font-size: 24px;
  line-height: 1.1;
}

.diagnosis-grid span {
  color: var(--muted);
  font-size: 13px;
}

.diagnosis-overview {
  border: 1px solid rgba(48, 111, 107, 0.2);
  border-radius: 8px;
  background: rgba(240, 248, 246, 0.78);
  padding: 13px 15px;
  line-height: 1.75;
  color: var(--ink);
  font-weight: 560;
}

.diagnosis-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.diagnosis-columns > div,
.diagnosis-section,
.diagnosis-recent {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  padding: 13px;
  box-shadow: 0 8px 18px rgba(20, 33, 43, 0.04);
}

.diagnosis-columns h4,
.diagnosis-section h4,
.diagnosis-recent h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.diagnosis-sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.diagnosis-section ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #425264;
  line-height: 1.65;
}

.diagnosis-recent {
  display: grid;
  gap: 10px;
  max-height: 280px;
  overflow: auto;
}

.diagnosis-recent p {
  margin: 0;
  line-height: 1.65;
  border-bottom: 1px solid rgba(216, 226, 228, 0.72);
  padding-bottom: 9px;
}

.diagnosis-recent span {
  color: var(--muted);
}

.diagnosis-text {
  min-height: 136px;
  font-size: 13px;
  background: #fff;
}

.empty {
  padding: 28px 24px;
  text-align: center;
  border: 1px dashed rgba(104, 119, 137, 0.28);
  border-radius: 8px;
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(249, 252, 251, 0.92)),
    #fafcfc;
  line-height: 1.7;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(104, 119, 137, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 251, 250, 0.86)),
    rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 26px rgba(20, 33, 43, 0.045);
}

.tab {
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  min-height: 40px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 820;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
  text-align: center;
  white-space: nowrap;
}

.tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--green), #1f5e8f);
  border-color: var(--green);
  box-shadow: 0 10px 22px rgba(23, 104, 79, 0.18);
}

.tab:hover:not(.active) {
  color: var(--blue);
  background: #f3f8fb;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

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

.stat-grid div {
  border: 1px solid rgba(104, 119, 137, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 250, 0.98)),
    #fff;
  padding: 15px 16px;
  display: grid;
  gap: 4px;
  box-shadow: 0 10px 26px rgba(20, 33, 43, 0.055);
  position: relative;
  overflow: hidden;
}

.stat-grid div::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -24px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(38, 95, 153, 0.05);
}

.stat-grid div::before {
  content: "";
  width: 46px;
  height: 4px;
  border-radius: 999px;
  background: var(--green);
}

.stat-grid b {
  font-size: 26px;
  position: relative;
  z-index: 1;
}

.stat-grid span {
  color: var(--muted);
  font-size: 13px;
  position: relative;
  z-index: 1;
}

.audit-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
}

.audit-stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 249, 0.96)),
    #fff;
  padding: 15px 16px;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.audit-stat b {
  font-size: 25px;
  line-height: 1;
}

.audit-stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.audit-stat.ok {
  border-color: rgba(23, 104, 79, 0.28);
  background: var(--green-soft);
}

.audit-stat.warn {
  border-color: rgba(180, 125, 30, 0.35);
  background: var(--gold-soft);
}

.audit-stat.bad {
  border-color: rgba(178, 54, 72, 0.32);
  background: #fff1f3;
}

.audit-list {
  display: grid;
  gap: 12px;
}

.audit-row {
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  display: grid;
  gap: 14px;
}

.audit-row.bad {
  border-left-color: #b23648;
}

.audit-row.warn {
  border-left-color: var(--gold);
}

.audit-score {
  min-width: 68px;
  text-align: center;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 8px 12px;
  font-weight: 900;
}

.audit-issue-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.audit-issue {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.audit-issue.bad {
  background: #fff7f8;
}

.audit-issue.warn {
  background: #fffaf0;
}

.audit-issue ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

.sync-dashboard {
  gap: 18px;
}

.sync-heading {
  align-items: flex-start;
}

.sync-overview {
  border: 1px solid rgba(216, 226, 228, 0.96);
  border-radius: 8px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 249, 0.96)),
    #fff;
  box-shadow: 0 12px 28px rgba(20, 33, 43, 0.055);
}

.sync-overview.ok {
  border-color: rgba(23, 104, 79, 0.26);
  background:
    linear-gradient(135deg, rgba(228, 242, 236, 0.88), rgba(255, 255, 255, 0.98)),
    #fff;
}

.sync-overview.warn {
  border-color: rgba(180, 125, 30, 0.34);
  background:
    linear-gradient(135deg, rgba(247, 238, 216, 0.92), rgba(255, 255, 255, 0.98)),
    #fff;
}

.sync-pulse {
  width: 12px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--green), var(--blue));
}

.sync-overview.warn .sync-pulse {
  background: linear-gradient(180deg, var(--gold), #d19832);
}

.sync-overview-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sync-overview-text b {
  font-size: 16px;
}

.sync-overview-text span {
  color: var(--muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sync-badge,
.sync-panel-title span {
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.sync-overview.ok .sync-badge {
  background: rgba(23, 104, 79, 0.12);
  color: var(--green);
}

.sync-material-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.sync-line,
.sync-subject {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  display: grid;
  gap: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 250, 0.98)),
    #fff;
  min-width: 0;
}

.sync-line-head,
.sync-panel-title {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.sync-line-head b,
.sync-panel-title h3,
.sync-subject b {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sync-line-head code {
  max-width: 55%;
  border: 1px solid rgba(38, 95, 153, 0.18);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 4px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 760;
  white-space: normal;
  overflow-wrap: anywhere;
}

.sync-line span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.sync-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.sync-chip-row small,
.sync-subject span {
  display: inline-flex;
  max-width: 100%;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 5px 9px;
  font-size: 13px;
  font-weight: 800;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sync-subject span {
  width: auto;
}

.sync-empty-state {
  min-height: 150px;
  border: 1px dashed rgba(23, 104, 79, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(228, 242, 236, 0.62), rgba(231, 240, 250, 0.52)),
    #fff;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px;
}

.sync-empty-state b {
  font-size: 18px;
}

.sync-empty-state span {
  color: var(--muted);
  max-width: 620px;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.status-pill, .mini-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.status-pill.ok {
  background: var(--green-soft);
  color: var(--green);
}

.status-pill.warn {
  background: var(--gold-soft);
  color: var(--gold);
}

.teacher-table {
  min-width: 1080px;
}

.teacher-table th,
.teacher-table td {
  padding: 14px 16px;
  vertical-align: middle;
}

.teacher-table tbody tr {
  transition: background 0.16s ease;
}

.teacher-table th:first-child,
.teacher-table td:first-child {
  width: 20%;
}

.teacher-table th:nth-child(2),
.teacher-table td:nth-child(2) {
  width: 10%;
}

.teacher-table th:nth-child(3),
.teacher-table td:nth-child(3) {
  width: 34%;
}

.teacher-table th:nth-child(4),
.teacher-table td:nth-child(4) {
  width: 14%;
}

.teacher-table tr.needs-attention {
  background: #fffdf7;
  box-shadow: inset 3px 0 0 #d18812;
}

.teacher-table tr.needs-attention:hover {
  background: #fffaf0;
}

.student-cell {
  display: grid;
  gap: 3px;
}

.student-cell b {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.student-cell span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.student-cell .privacy-chip {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid rgba(31, 94, 143, 0.2);
  border-radius: 999px;
  padding: 0 8px;
  background: #f4f9fc;
  color: #1f5e8f;
  font-size: 12px;
  font-weight: 700;
}

.student-correct-panel {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(150px, 1fr);
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid rgba(216, 226, 228, 0.95);
  border-radius: 8px;
  background: #f8fbfa;
}

.student-correct-panel label {
  display: grid;
  gap: 4px;
}

.student-correct-panel label span {
  color: var(--muted);
  font-size: 12px;
}

.student-correct-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.teacher-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  white-space: nowrap;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 820;
  background: #edf4f8;
  color: #516578;
}

.teacher-status.ok {
  background: var(--green-soft);
  color: var(--green);
}

.teacher-status.warn {
  background: var(--gold-soft);
  color: var(--gold);
}

.teacher-status.archived {
  background: #eef2f4;
  color: #506170;
}

.task-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #ead39e;
  border-radius: 8px;
  padding: 9px 10px;
  margin-bottom: 7px;
  background: #fffaf1;
  color: #6f4d09;
}

.task-line.late {
  border-color: #ead39e;
}

.task-line.done {
  background: var(--green-soft);
  border-color: rgba(23, 104, 79, 0.16);
  color: var(--green);
}

.task-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.task-main b {
  display: block;
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-count {
  color: inherit;
  font-weight: 850;
  white-space: nowrap;
}

.mini-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(111, 77, 9, 0.12);
}

.mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
}

.teacher-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.teacher-actions .mini-btn {
  margin: 0;
  min-height: 30px;
  padding: 0 11px;
}

.quiet-danger {
  background: #f7eef1;
  color: #8e3b4b;
}

.quiet-danger:hover {
  background: #f3dfe5;
}

.archive-block {
  display: grid;
  gap: 12px;
  margin-top: 2px;
  padding: 16px;
  border: 1px solid rgba(104, 119, 137, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 250, 0.96)),
    #fff;
}

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

.archive-head h3 {
  font-size: 17px;
}

.archive-head > span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #eef4f5;
  color: #526675;
  font-size: 13px;
  font-weight: 820;
  white-space: nowrap;
}

.archive-table {
  min-width: 900px;
}

.archive-table th:first-child,
.archive-table td:first-child {
  width: 28%;
}

.archive-table th:nth-child(2),
.archive-table td:nth-child(2) {
  width: 18%;
}

.archive-table th:nth-child(3),
.archive-table td:nth-child(3) {
  width: 12%;
}

.compact-empty {
  padding: 18px;
  border: 1px dashed rgba(104, 119, 137, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.action-note {
  padding: 0 3px;
  white-space: nowrap;
}

.analysis-overview-grid {
  display: grid;
  grid-template-columns: 0.72fr 0.72fr 1.56fr;
  gap: 12px;
}

.analysis-card {
  display: grid;
  gap: 5px;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 249, 0.96)),
    #fff;
  box-shadow: 0 12px 28px rgba(20, 33, 43, 0.045);
}

.analysis-card > span,
.analysis-card .row span {
  color: #415264;
  font-size: 13px;
  font-weight: 820;
}

.analysis-card b {
  color: var(--green);
  font-size: 32px;
  line-height: 1;
}

.analysis-card small {
  color: var(--muted);
  font-size: 12px;
}

.analysis-card.wide {
  align-content: start;
}

.analysis-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 5px;
}

.analysis-chip-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 780;
}

.analysis-samples {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(23, 104, 79, 0.13);
  border-radius: 8px;
  background: #fbfdfc;
}

.analysis-samples h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.analysis-samples p {
  margin: 0;
  color: #415264;
  line-height: 1.6;
}

.warning-text {
  color: var(--rose);
  font-size: 13px;
  font-weight: 750;
}

.hint-warning-chip {
  width: fit-content;
  margin-top: 8px;
  border: 1px solid rgba(169, 64, 82, 0.18);
  border-radius: 999px;
  background: var(--rose-soft);
  color: var(--rose);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 780;
}

.hint-warning-panel {
  border: 1px solid rgba(169, 64, 82, 0.18);
  border-left: 5px solid var(--rose);
  border-radius: 8px;
  background: var(--rose-soft);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.hint-warning-panel div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.hint-warning-panel b {
  color: var(--rose);
}

.hint-warning-panel span {
  color: #7f3b48;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.task-card {
  border-left: 5px solid var(--gold);
}

.task-card.done-task {
  border-left-color: var(--green);
  opacity: 0.82;
}

.task-card::before {
  background: var(--gold);
}

.task-card.done-task::before {
  background: var(--green);
}

.logic-task-card {
  border-left-color: var(--blue);
}

.logic-task-card::before {
  background: var(--blue);
}

.task-kind-switch {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 8px;
  width: min(100%, 640px);
}

.task-kind-switch label {
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 760;
  cursor: pointer;
}

.task-kind-switch label span {
  display: grid;
  gap: 3px;
}

.task-kind-switch label b {
  color: #182430;
  font-size: 15px;
}

.task-kind-switch label small {
  color: #687789;
  font-size: 12px;
  font-weight: 680;
}

.task-kind-switch label:has(input:checked) {
  border-color: rgba(23, 104, 79, 0.32);
  background: var(--green-soft);
  color: var(--green);
}

.task-kind-switch label:has(input:checked) b {
  color: var(--green);
}

.compact-notice {
  font-size: 13px;
  padding: 9px;
}

.security-notice {
  font-weight: 750;
}

.side .btn {
  width: 100%;
}

.timer {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 8px;
  align-items: center;
  border: 1px solid #cfe1ef;
  border-radius: 8px;
  background: #f0f7fd;
  padding: 10px 12px;
  color: var(--blue);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.timer b {
  font-size: 28px;
  line-height: 1;
}

.timer span {
  font-weight: 800;
}

.timer small {
  color: var(--muted);
  text-align: right;
}

.timer.urgent {
  color: var(--rose);
  background: var(--rose-soft);
  border-color: #edc0c9;
}

.detail-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
}

.detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.record-line {
  border-left: 4px solid var(--blue);
  background: var(--blue-soft);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 7px;
}

.inner-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.auth-panel {
  max-width: 900px;
  margin: 0 auto;
}

.student-auth-panel {
  width: 100%;
  max-width: none;
}

.teacher-login-shell {
  width: min(960px, calc(100vw - 56px));
  padding-top: 28px;
}

.teacher-login-shell .top {
  margin-bottom: 30px;
}

.teacher-auth-panel {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 34px 34px 36px;
  gap: 24px;
  text-align: center;
}

.teacher-login-copy {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.teacher-login-copy p {
  max-width: 480px;
}

.teacher-auth-panel form {
  width: min(500px, 100%);
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  justify-items: stretch;
}

.teacher-auth-panel form .input,
.teacher-auth-panel form .btn {
  width: 100%;
}

.teacher-login-watermark {
  opacity: 0.08;
  width: clamp(104px, 9vw, 138px);
  right: 22px;
  bottom: 18px;
  z-index: 0;
}

.auth-hero {
  gap: 18px;
}

.auth-panel form {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 251, 250, 0.98)),
    var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.teacher-auth-panel form {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.review-surface { gap: 18px; }

.review-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  display: grid;
  gap: 12px;
  line-height: 1.65;
  box-shadow: 0 10px 28px rgba(20, 33, 43, 0.05);
}

.review-comment {
  background: var(--blue-soft);
  border-left: 5px solid var(--blue);
}

.review-grammar {
  background: #fff;
  border-left: 5px solid var(--rose);
}

.review-vocab {
  background: #fffaf1;
  border-left: 5px solid var(--gold);
}

.review-upgrade {
  background: var(--green-soft);
  border-left: 5px solid var(--green);
}

.review-upgrade p {
  font-size: 20px;
  line-height: 1.7;
}

.issue-card {
  border: 1px solid rgba(23, 33, 43, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  padding: 14px;
  display: grid;
  gap: 8px;
}

.issue-compare-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(104, 119, 137, 0.18);
}

.issue-compare-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.issue-compare-row b {
  color: var(--ink);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.issue-compare-row.bad {
  background: #fff2f2;
  border-color: rgba(181, 70, 70, 0.2);
}

.issue-compare-row.good {
  background: #edf8f2;
  border-color: rgba(23, 104, 79, 0.2);
}

.issue-compare-row.bad span { color: #9a3d3d; }
.issue-compare-row.good span { color: var(--green); }

.issue-explain {
  margin: 0;
}

.label {
  display: inline-flex;
  margin-right: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.example {
  color: var(--blue);
  background: #edf5ff;
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}

.example b {
  color: #1d4f87;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chips span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 750;
  color: var(--gold);
}

.loading-panel {
  min-height: 260px;
  place-items: center;
  text-align: center;
}

.loader {
  width: 42px;
  height: 42px;
  border: 4px solid #d9e6ec;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 30, 0.34);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 20;
  backdrop-filter: blur(6px);
}

.modal {
  width: min(560px, 100%);
  box-shadow: 0 24px 70px rgba(20, 30, 40, 0.22);
}

.tutorial-backdrop {
  z-index: 35;
  background: rgba(12, 28, 38, 0.38);
}

.tutorial-card {
  width: min(720px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 24px;
  box-shadow: 0 26px 76px rgba(20, 30, 40, 0.24);
}

.tutorial-head {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
}

.tutorial-head .pill {
  width: fit-content;
}

.tutorial-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tutorial-step {
  border: 1px solid rgba(216, 226, 228, 0.96);
  border-radius: 8px;
  padding: 13px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  background: linear-gradient(180deg, rgba(249, 252, 251, 0.98), rgba(255, 255, 255, 0.98));
}

.tutorial-step > b {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green);
  font-size: 15px;
}

.tutorial-step p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.56;
}

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

.teacher-modal {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 44px);
  overflow: auto;
}

.profile-modal {
  width: min(1060px, calc(100vw - 28px));
  padding: 22px;
}

.report-modal {
  width: min(1040px, calc(100vw - 32px));
  max-height: calc(100vh - 44px);
  overflow: auto;
}

.report-preview {
  display: grid;
  gap: 16px;
  padding: 4px 0;
}

.report-cover {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #f6faf8);
}

.report-logo {
  width: 146px;
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
}

.report-kicker {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.report-cover h3 {
  font-size: 24px;
  margin: 2px 0 4px;
}

.report-cover p:last-child {
  color: var(--muted);
  font-size: 13px;
}

.report-callout {
  border-left: 6px solid var(--green);
  border-radius: 8px;
  padding: 16px 18px;
  background: #f5fbf8;
  display: grid;
  gap: 6px;
}

.report-callout b {
  color: var(--green);
  font-size: 14px;
}

.report-callout p {
  font-size: 18px;
  line-height: 1.7;
  font-weight: 680;
}

.report-position-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.report-position-grid div {
  border: 1px solid rgba(23, 104, 79, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 11px;
  display: grid;
  gap: 5px;
}

.report-position-grid span {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.report-position-grid p {
  font-size: 14px;
  line-height: 1.62;
  font-weight: 520;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.report-metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  display: grid;
  gap: 3px;
}

.report-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.report-metrics b {
  color: var(--green);
  font-size: 22px;
}

.report-section,
.report-page {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  display: grid;
  gap: 12px;
}

.report-section > h3 {
  font-size: 17px;
  color: var(--green);
}

.report-section p,
.report-section li,
.report-page li {
  line-height: 1.72;
}

.report-two-col,
.report-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.report-diagnosis-list {
  display: grid;
  gap: 12px;
}

.report-diagnosis-list > div {
  border: 1px solid rgba(216, 226, 228, 0.88);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfc;
  display: grid;
  gap: 8px;
}

.report-diagnosis-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.report-diagnosis-head b {
  color: var(--ink);
  font-size: 16px;
}

.report-diagnosis-head span,
.report-diagnosis-list small {
  color: var(--muted);
  font-size: 12px;
}

.report-diagnosis-list p {
  font-size: 14px;
  line-height: 1.65;
}

.report-diagnosis-list strong {
  color: var(--green);
  font-weight: 850;
}

.report-mini-grid div,
.report-memory-list div,
.report-error-list div {
  border: 1px solid rgba(216, 226, 228, 0.82);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfc;
  display: grid;
  gap: 5px;
}

.report-mini-grid span,
.report-memory-list small,
.report-error-list b {
  color: var(--muted);
  font-size: 12px;
}

.report-memory-groups {
  display: grid;
  gap: 14px;
}

.report-memory-group {
  display: grid;
  gap: 8px;
}

.report-memory-group h4 {
  margin: 0;
  width: fit-content;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 850;
}

.report-memory-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.report-memory-list b {
  color: var(--blue);
  font-size: 15px;
}

.report-page {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 251, 0.98)),
    #fff;
}

.report-answer-page {
  border-style: dashed;
}

.report-page-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.report-page-head span {
  color: var(--green);
  font-weight: 850;
}

.report-task-list,
.report-answer-list {
  padding-left: 24px;
  display: grid;
  gap: 10px;
}

.report-task-list li,
.report-answer-list li {
  padding-left: 4px;
}

.report-task-list small,
.report-answer-list small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.report-raw-text {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
}

.report-raw-text summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 780;
}

.report-raw-text textarea {
  margin-top: 10px;
  width: 100%;
}

.report-actions {
  justify-content: flex-end;
}

.report-primary-action {
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.teacher-overlay {
  align-items: start;
  padding-top: 28px;
}

@media (max-width: 880px) {
  .shell { width: min(100vw - 24px, 680px); padding-top: 18px; }
  .fixed-watermark { width: 112px; opacity: 0.08; bottom: 12px; right: 14px; z-index: 0; }
  .grid, .cards, .topic-grid, .topic-actions, .choice-grid, .summary-grid, .stat-grid, .stat-grid.compact, .audit-stat-grid, .audit-issue-list, .sync-material-grid, .inline-form, .student-picker, .task-settings-grid, .task-target-grid, .teacher-add-row, .student-hero-grid, .teacher-workflow-strip, .diagnosis-grid, .diagnosis-columns, .diagnosis-sections, .exercise-upload-grid, .analysis-overview-grid, .logic-entry-grid, .logic-form-grid, .logic-select-grid, .logic-pick-grid, .exercise-group-bar, .exercise-list-head, .exercise-manage-row, .class-code-grid { grid-template-columns: 1fr; }
  .task-settings-grid[data-task-kind-fields="logic"] { grid-template-columns: 1fr; }
  .exercise-list-head { display: none; }
  .exercise-manage-row { gap: 12px; }
  .exercise-source-cell::before {
    content: "文档来源";
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 820;
  }
  .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teacher-action-bar { display: grid; }
  .topic-progress { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side { position: static; }
  .top { align-items: flex-start; flex-direction: column; padding: 20px 18px; }
  .top-actions { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); }
  .top .btn { width: 100%; }
  .report-entry-btn { width: 100%; }
  .report-cover { align-items: flex-start; flex-direction: column; }
  .report-logo { width: 126px; }
  .report-metrics, .report-position-grid, .report-two-col, .report-mini-grid, .report-memory-list { grid-template-columns: 1fr; }
  .report-actions { display: grid; }
  .logic-step-head, .logic-choice-row, .logic-hint-row, .task-kind-switch { display: grid; }
  .tutorial-steps { grid-template-columns: 1fr; }
  .tutorial-actions { display: grid; }
  h1 { font-size: 26px; }
  .question { font-size: 19px; }
  .daily-quote p { font-size: 18px; }
  .flashcard b { font-size: 26px; }
  .rename-input { min-width: 0; }
  .panel { padding: 18px; }
  .btn { width: 100%; }
  .timer { grid-template-columns: auto 1fr; }
  .timer small { grid-column: 1 / -1; text-align: left; }
}

@media (min-width: 721px) and (max-width: 880px) {
  .shell {
    width: min(100vw - 36px, 820px);
  }

  .exercise-manage-row {
    grid-template-columns: minmax(220px, 0.95fr) minmax(360px, 1.35fr);
    grid-template-areas:
      "name groups"
      "source meta";
    align-items: start;
  }

  .exercise-name-cell {
    grid-area: name;
  }

  .exercise-groups-cell {
    grid-area: groups;
  }

  .exercise-source-cell {
    grid-area: source;
  }

  .exercise-meta-cell {
    grid-area: meta;
  }

  .exercise-source-cell::before {
    display: block;
  }

}
