:root {
  --ink: #14231f;
  --ink-soft: #20352f;
  --paper: #f2f0e8;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --line: #deddd3;
  --line-dark: #c7cbc0;
  --muted: #758079;
  --muted-dark: #52615a;
  --lime: #d8f26b;
  --lime-deep: #9ab531;
  --coral: #ff8069;
  --coral-soft: #fff0eb;
  --blue: #7e9fff;
  --blue-soft: #eef2ff;
  --yellow: #f7d36c;
  --shadow: 0 20px 60px rgba(20, 35, 31, 0.08);
  --shadow-soft: 0 8px 24px rgba(20, 35, 31, 0.06);
  --font-body: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Avenir Next Condensed", "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.auth-button {
  min-height: 34px;
  padding: 7px 12px;
  color: var(--ink-soft);
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}

.auth-button:hover,
.is-developer .auth-button {
  border-color: var(--lime-deep);
  background: var(--lime);
}

.account-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 11px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.account-panel[hidden] {
  display: none;
}

[data-developer-only][hidden] {
  display: none !important;
}

.account-copy {
  display: grid;
  line-height: 1.2;
}

.account-copy strong {
  font-size: 10px;
}

.account-copy span {
  max-width: 180px;
  overflow: hidden;
  color: var(--muted-dark);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-button {
  padding: 7px 10px;
  color: #9d3f31;
  border: 0;
  border-radius: 999px;
  background: var(--coral-soft);
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}

.auth-dialog,
.question-editor-dialog {
  width: min(460px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: 0 28px 90px rgba(20, 35, 31, 0.24);
}

.question-editor-dialog {
  width: min(760px, calc(100vw - 28px));
}

.auth-gate {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 70% 20%, rgba(216, 242, 107, 0.2), transparent 28rem),
    rgba(20, 35, 31, 0.94);
  backdrop-filter: blur(10px);
}

.auth-gate[hidden] {
  display: none;
}

.auth-gate-card {
  display: grid;
  justify-items: start;
  gap: 14px;
  width: min(440px, 100%);
  padding: 34px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}

.auth-gate-card h1,
.auth-gate-card p {
  margin: 0;
}

.auth-gate-card h1 {
  font-family: var(--font-display);
  font-size: 32px;
}

.auth-gate-card p {
  color: var(--muted-dark);
  line-height: 1.7;
}

.auth-gate-actions,
.auth-dialog-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-dialog-links {
  justify-content: space-between;
}

.auth-dialog-links button {
  padding: 2px 0;
  color: var(--muted-dark);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.feedback-button {
  position: fixed;
  z-index: 80;
  right: 22px;
  bottom: 22px;
  padding: 11px 16px;
  color: var(--ink);
  border: 1px solid rgba(20, 35, 31, 0.18);
  border-radius: 999px;
  background: var(--lime);
  box-shadow: var(--shadow);
  cursor: pointer;
  font-weight: 800;
}

.feedback-intro {
  margin-bottom: 16px;
}

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

.feedback-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--coral);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.feedback-card.feedback-status-processing {
  border-left-color: var(--blue);
}

.feedback-card.feedback-status-resolved {
  border-left-color: var(--lime-deep);
}

.feedback-card-head,
.feedback-meta,
.feedback-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.feedback-card-head {
  justify-content: space-between;
}

.feedback-card-head > div {
  display: grid;
  gap: 3px;
}

.feedback-card-head span,
.feedback-meta {
  color: var(--muted-dark);
  font-size: 11px;
}

.feedback-card > p {
  margin: 16px 0;
  line-height: 1.7;
  white-space: pre-wrap;
}

.feedback-state {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--paper);
  font-weight: 750;
}

.feedback-meta a {
  color: var(--ink-soft);
}

.feedback-actions {
  margin-top: 16px;
}

.auth-dialog::backdrop,
.question-editor-dialog::backdrop {
  background: rgba(20, 35, 31, 0.56);
  backdrop-filter: blur(4px);
}

.dialog-card {
  display: grid;
  gap: 16px;
  padding: 25px;
  background: var(--surface);
}

.dialog-card > p {
  margin: 0;
  color: var(--muted-dark);
}

.dialog-heading,
.dialog-actions,
.question-admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dialog-heading h2 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 24px;
}

.dialog-close {
  width: 34px;
  height: 34px;
  color: var(--muted-dark);
  border-radius: 50%;
  background: #ecece4;
  cursor: pointer;
  font-size: 20px;
}

.dialog-field {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.dialog-field input,
.dialog-field select,
.dialog-field textarea {
  width: 100%;
  padding: 10px 11px;
}

.dialog-error {
  padding: 9px 11px;
  color: #a34535 !important;
  border-radius: 8px;
  background: var(--coral-soft);
  font-size: 11px;
  font-weight: 700;
}

.editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  max-height: 62vh;
  overflow: auto;
  padding: 2px 4px 2px 2px;
}

.editor-wide {
  grid-column: 1 / -1;
}

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

.question-admin-actions {
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .auth-button {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

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

  .editor-wide {
    grid-column: auto;
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% -10%, rgba(216, 242, 107, 0.18), transparent 30rem),
    radial-gradient(circle at 20% 100%, rgba(126, 159, 255, 0.1), transparent 34rem),
    var(--paper);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(126, 159, 255, 0.45);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

input,
select,
textarea {
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(126, 159, 255, 0.14);
  outline: 0;
}

input::placeholder,
textarea::placeholder {
  color: #a1aaa3;
}

textarea {
  resize: vertical;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 10;
  display: flex;
  width: 220px;
  height: 100vh;
  flex-direction: column;
  padding: 24px 16px 18px;
  color: #eef4e8;
  background:
    radial-gradient(circle at 10% 0%, rgba(216, 242, 107, 0.12), transparent 17rem),
    var(--ink);
}

.brand-lockup,
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ink);
  border-radius: 12px 12px 12px 4px;
  background: var(--lime);
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
  transform: rotate(-5deg);
}

.brand-mark.small {
  width: 30px;
  height: 30px;
  border-radius: 9px 9px 9px 3px;
  font-size: 18px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sidebar-label {
  margin: 42px 12px 10px;
  color: #71847a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.main-nav {
  display: grid;
  gap: 6px;
}

.sidebar-subject-label {
  margin-top: 24px;
  margin-bottom: 10px;
}

.sidebar-subjects {
  display: grid;
  max-height: min(34vh, 290px);
  gap: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-color: rgba(216, 242, 107, 0.35) transparent;
  scrollbar-width: thin;
}

.subject-nav-item {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  color: #9aac9f;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.subject-nav-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 3px;
}

.subject-nav-row .subject-nav-item {
  flex: 1;
}

.subject-nav-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
  opacity: 1;
}

.subject-nav-actions button {
  width: 22px;
  height: 22px;
  padding: 0;
  color: #9aac9f;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

.subject-nav-actions button:hover {
  color: #f4faed;
  background: rgba(255, 255, 255, 0.14);
}

.subject-nav-item:hover {
  color: #f4faed;
  background: rgba(255, 255, 255, 0.07);
  transform: translateX(2px);
}

.subject-nav-item.is-active {
  color: var(--ink);
  background: rgba(216, 242, 107, 0.88);
}

.subject-nav-index {
  width: 26px;
  flex: 0 0 26px;
  color: var(--lime);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
}

.subject-nav-item.is-active .subject-nav-index {
  color: var(--ink);
}

.subject-nav-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subject-nav-count {
  color: #71847a;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.subject-nav-item.is-active .subject-nav-count {
  color: var(--ink);
}

.subject-empty {
  padding: 8px 10px;
  color: #71847a;
  font-size: 10px;
  line-height: 1.5;
}

.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  color: #9aac9f;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-item:hover {
  color: #f4faed;
  background: rgba(255, 255, 255, 0.07);
  transform: translateX(2px);
}

.nav-item.is-active {
  color: var(--ink);
  background: var(--lime);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.nav-index {
  width: 23px;
  color: inherit;
  font-size: 10px;
  font-weight: 700;
  opacity: 0.7;
}

.nav-text {
  flex: 1;
  font-size: 13px;
  font-weight: 650;
}

.nav-count {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  place-items: center;
  color: var(--ink);
  border-radius: 999px;
  background: var(--coral);
  font-size: 11px;
  font-weight: 800;
}

.nav-item.is-active .nav-count {
  background: var(--ink);
  color: var(--lime);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 17px;
  padding: 0 8px;
}

.engine-status {
  display: flex;
  align-items: center;
  gap: 9px;
}

.engine-status strong,
.engine-status span:not(.status-dot) {
  display: block;
}

.engine-status strong {
  color: #eaf2e8;
  font-size: 11px;
}

.engine-status span:not(.status-dot) {
  margin-top: 2px;
  color: #84978d;
  font-size: 10px;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 128, 105, 0.12);
}

.status-dot.is-online {
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(216, 242, 107, 0.12);
}

.status-dot.is-loading {
  animation: pulse 1.2s ease-in-out infinite;
}

.app-main {
  width: calc(100% - 220px);
  min-width: 0;
  margin-left: 220px;
}

.topbar {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 40px;
  border-bottom: 1px solid rgba(222, 221, 211, 0.72);
  background: rgba(242, 240, 232, 0.78);
  backdrop-filter: blur(14px);
}

.mobile-brand {
  display: none;
}

.page-heading h1,
.section-intro h2,
.welcome-copy h2,
.panel-heading h2,
.maintenance-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 750;
  letter-spacing: -0.035em;
}

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

.topbar-actions,
.workspace-chip,
.toolbar-actions,
.welcome-actions,
.upload-actions,
.maintenance-actions,
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sync-text {
  color: var(--muted);
  font-size: 11px;
}

.extension-launcher {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  color: #eef7e7;
  border: 1px solid rgba(20, 35, 31, 0.14);
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 8px 20px rgba(20, 35, 31, 0.12);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.extension-launcher:hover {
  color: var(--ink);
  background: var(--lime);
  transform: translateY(-1px);
}

.extension-launcher-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(216, 242, 107, 0.12);
}

.extension-launcher:hover .extension-launcher-dot {
  background: var(--ink);
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--muted-dark);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.72);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.icon-button:hover {
  color: var(--ink);
  border-color: var(--ink);
  transform: rotate(25deg);
}

.workspace-chip {
  padding: 5px 10px 5px 5px;
  color: var(--muted-dark);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.74);
  font-size: 11px;
  font-weight: 650;
}

.chip-avatar {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font-size: 11px;
  font-weight: 800;
}

.workspace {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 40px 56px;
}

.view[hidden] {
  display: none;
}

.view {
  animation: view-in 260ms ease both;
}

[data-workspace-only][hidden] {
  display: none !important;
}

[data-workspace-sidebar] {
  transition: opacity 180ms ease;
}

[data-workspace-sidebar].is-context-muted {
  opacity: 0.62;
}

.feature-hub {
  display: grid;
  gap: 18px;
}

.feature-hero {
  padding: 28px 32px;
  color: #eef8d9;
  border-radius: 20px;
  background:
    radial-gradient(circle at 84% 22%, rgba(216, 242, 107, 0.2), transparent 18rem),
    linear-gradient(120deg, #14231f 0%, #1b3b31 100%);
  box-shadow: var(--shadow);
}

.feature-hero h2 {
  max-width: 700px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

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

.feature-card {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--shadow-soft);
}

.feature-card-primary {
  border-color: rgba(154, 181, 49, 0.42);
  background: linear-gradient(145deg, rgba(216, 242, 107, 0.13), rgba(255, 253, 248, 0.94) 52%);
}

.feature-card-uooc {
  border-color: rgba(126, 159, 255, 0.36);
  background: linear-gradient(145deg, rgba(126, 159, 255, 0.12), rgba(255, 253, 248, 0.94) 52%);
}

.feature-card-placeholder {
  min-height: 170px;
  border-style: dashed;
  color: var(--muted-dark);
  background: rgba(255, 253, 248, 0.38);
}

.feature-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--ink);
  border-radius: 14px 14px 14px 5px;
  background: var(--lime);
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 800;
}

.feature-card-uooc .feature-icon {
  background: #dbe4ff;
}

.feature-card-placeholder .feature-icon {
  color: var(--muted-dark);
  background: var(--line);
  font-family: var(--font-body);
}

.feature-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 27px;
  letter-spacing: -0.035em;
}

.feature-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.feature-meta span {
  padding: 5px 8px;
  color: var(--muted-dark);
  border-radius: 7px;
  background: rgba(20, 35, 31, 0.055);
  font-size: 9px;
  font-weight: 700;
}

.feature-card .button {
  margin-top: auto;
}

.welcome-banner {
  position: relative;
  display: flex;
  min-height: 160px;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 30px 36px;
  color: #eef8d9;
  border-radius: 18px;
  background:
    linear-gradient(115deg, rgba(20, 35, 31, 0.99) 0%, rgba(25, 51, 43, 0.98) 60%, rgba(31, 63, 51, 0.94) 100%);
  box-shadow: var(--shadow);
}

.welcome-copy {
  position: relative;
  z-index: 1;
  max-width: 570px;
}

.welcome-copy h2 {
  margin-top: 8px;
  color: #f2f8df;
  font-size: clamp(28px, 3.3vw, 40px);
  line-height: 1.06;
}

.welcome-copy h2 em {
  color: var(--lime);
  font-style: normal;
}

.welcome-copy p {
  max-width: 500px;
  margin: 10px 0 18px;
  color: #b9cdb7;
  font-size: 13px;
  line-height: 1.75;
}

.welcome-visual {
  position: relative;
  width: 255px;
  height: 220px;
  flex: 0 0 auto;
  margin-right: 25px;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(216, 242, 107, 0.34);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(25deg);
}

.orbit-one {
  width: 190px;
  height: 115px;
}

.orbit-two {
  width: 130px;
  height: 195px;
  border-color: rgba(126, 159, 255, 0.35);
  transform: translate(-50%, -50%) rotate(-28deg);
}

.orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  color: var(--ink);
  border: 7px solid rgba(216, 242, 107, 0.25);
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 10px rgba(216, 242, 107, 0.06), 0 18px 35px rgba(0, 0, 0, 0.2);
  font-family: Georgia, serif;
  font-size: 34px;
  font-weight: 800;
  transform: translate(-50%, -50%);
}

.float-tag {
  position: absolute;
  padding: 5px 9px;
  color: #dcebd0;
  border: 1px solid rgba(216, 242, 107, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.tag-top {
  top: 14px;
  right: 31px;
}

.tag-right {
  top: 106px;
  right: -3px;
  color: #b9caff;
  border-color: rgba(126, 159, 255, 0.35);
}

.tag-bottom {
  bottom: 14px;
  left: 26px;
  color: #ffe3a5;
  border-color: rgba(247, 211, 108, 0.35);
}

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button span {
  font-size: 15px;
  line-height: 0.7;
}

.button-primary {
  color: var(--ink);
  background: var(--lime);
  box-shadow: 0 8px 18px rgba(154, 181, 49, 0.2);
}

.button-primary:hover:not(:disabled) {
  background: #e4fa88;
  box-shadow: 0 11px 22px rgba(154, 181, 49, 0.27);
}

.button-light {
  color: var(--ink);
  background: var(--lime);
}

.button-light:hover:not(:disabled) {
  background: #e9fb9b;
}

.button-dark {
  color: #f7fbe9;
  background: var(--ink);
}

.button-dark:hover:not(:disabled) {
  background: var(--ink-soft);
}

.button-outline {
  color: var(--ink);
  border-color: var(--line-dark);
  background: transparent;
}

.button-outline:hover:not(:disabled) {
  border-color: var(--ink);
  background: #f4f4eb;
}

.button-danger-ghost {
  color: #bd5542;
  border-color: #f0c4bb;
  background: var(--coral-soft);
}

.button-danger-ghost:hover:not(:disabled) {
  border-color: var(--coral);
  background: #ffe5de;
}

.small-button {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 11px;
}

.full-button {
  width: 100%;
  margin-top: auto;
}

.text-button {
  padding: 3px 0;
  color: var(--muted-dark);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

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

.text-button span {
  margin-left: 4px;
  font-size: 14px;
}

.light-text {
  color: #c2d5bd;
}

.light-text:hover {
  color: var(--lime);
}

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

.stat-card {
  min-height: 104px;
  padding: 15px 17px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.75);
  box-shadow: var(--shadow-soft);
}

.stat-card-main {
  color: #f3f8e7;
  border-color: var(--ink);
  background: var(--ink);
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 700;
}

.stat-card-main .stat-label {
  color: #a7bba9;
}

.stat-symbol {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
}

.stat-symbol.ink {
  color: var(--ink);
  background: var(--lime);
}

.stat-symbol.coral {
  color: #a54837;
  background: #ffd1c7;
}

.stat-symbol.lime {
  color: #617612;
  background: #e8f5b3;
}

.stat-symbol.blue {
  color: #4665a9;
  background: #dbe4ff;
}

.stat-value {
  display: block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 31px;
  font-weight: 750;
  letter-spacing: -0.06em;
  line-height: 1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 12px;
  margin-top: 12px;
}

.dashboard-grid-single {
  grid-template-columns: 1fr;
}

.surface-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 253, 248, 0.84);
  box-shadow: var(--shadow-soft);
}

.panel-tall {
  display: flex;
  min-height: 300px;
  flex-direction: column;
}

.panel-heading,
.maintenance-heading,
.section-intro,
.library-subtoolbar,
.review-toolbar,
.chapter-tools,
.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading h2 {
  margin-top: 3px;
  font-size: 20px;
}

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

.count-pill,
.format-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
}

.count-pill {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  color: #a84e3b;
  background: #ffe1d8;
}

.category-overview {
  display: grid;
  gap: 15px;
  margin-top: 27px;
}

.category-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.35fr) minmax(120px, 1fr) 40px;
  align-items: center;
  gap: 12px;
}

.category-row-label {
  overflow: hidden;
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e9df;
}

.category-fill {
  height: 100%;
  min-width: 5px;
  border-radius: inherit;
  background: var(--ink);
}

.category-row:nth-child(2n) .category-fill {
  background: var(--lime-deep);
}

.category-row:nth-child(3n) .category-fill {
  background: var(--blue);
}

.category-row-count {
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.type-breakdown-wrap {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.mini-heading {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

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

.type-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  color: var(--muted-dark);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f8f1;
  font-size: 10px;
  font-weight: 650;
}

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

.overview-pending-list {
  display: grid;
  gap: 8px;
  margin: 24px 0 18px;
}

.overview-pending-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.overview-pending-item:last-child {
  border-bottom: 0;
}

.overview-pending-id {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #ae5947;
  border-radius: 8px;
  background: var(--coral-soft);
  font-size: 10px;
  font-weight: 800;
}

.overview-pending-stem {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-pending-meta {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.empty-state {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state.compact {
  min-height: 150px;
}

.empty-state p {
  margin: 0;
  font-size: 12px;
}

.empty-mark {
  color: var(--lime-deep);
  font-family: Georgia, serif;
  font-size: 24px;
  letter-spacing: 0.18em;
}

.workflow-strip {
  display: grid;
  grid-template-columns: 1.3fr auto auto auto auto auto;
  align-items: center;
  gap: 17px;
  margin-top: 16px;
  padding: 17px 22px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.58);
}

.workflow-intro {
  display: grid;
  gap: 4px;
}

.workflow-intro strong {
  font-size: 13px;
}

.workflow-step {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.workflow-step > span {
  color: var(--lime-deep);
  font-size: 10px;
  font-weight: 800;
}

.workflow-step strong,
.workflow-step small {
  display: block;
}

.workflow-step strong {
  font-size: 11px;
}

.workflow-step small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.workflow-arrow {
  color: #a8b0a5;
  font-size: 18px;
}

.extension-guide {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(420px, 1.18fr);
  gap: 28px;
  margin-top: 14px;
  padding: 24px;
}

.uooc-helper-guide {
  border-color: rgba(154, 181, 49, 0.42);
  background:
    linear-gradient(135deg, rgba(216, 242, 107, 0.1), transparent 42%),
    var(--surface);
}

.extension-guide h2 {
  margin: 7px 0 12px;
  font-size: clamp(23px, 2.5vw, 31px);
  line-height: 1.08;
}

.extension-guide-copy > p {
  max-width: 520px;
  margin: 0;
  color: var(--muted-dark);
  font-size: 12px;
  line-height: 1.75;
}

.extension-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.extension-security-note {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 13px 15px;
  border-left: 3px solid var(--lime-deep);
  background: rgba(216, 242, 107, 0.12);
  font-size: 10px;
  line-height: 1.55;
}

.extension-security-note span {
  color: var(--muted-dark);
}

.extension-steps {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.extension-steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 13px;
  align-items: start;
  padding: 11px 13px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.7);
}

.extension-steps li > span {
  color: var(--lime-deep);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.extension-steps strong,
.extension-steps p {
  display: block;
}

.extension-steps strong {
  font-size: 12px;
}

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

.extension-steps code {
  padding: 1px 4px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 9px;
}

.section-intro {
  align-items: flex-end;
  margin-bottom: 25px;
}

.section-intro h2 {
  margin-top: 6px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.05;
}

.section-intro p {
  max-width: 640px;
  margin: 12px 0 0;
  color: var(--muted-dark);
  font-size: 12px;
  line-height: 1.7;
}

.format-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.format-list span {
  padding: 6px 8px;
  color: var(--muted-dark);
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.66);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(270px, 0.65fr);
  gap: 16px;
}

.upload-panel,
.settings-panel,
.utility-panel {
  min-height: 0;
}

.dropzone {
  display: grid;
  min-height: 250px;
  place-items: center;
  align-content: center;
  gap: 9px;
  margin-top: 23px;
  padding: 28px;
  border: 1.5px dashed #b9c6a5;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(244, 249, 222, 0.72), rgba(255, 253, 248, 0.3));
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--lime-deep);
  background: #f0f7d2;
  transform: translateY(-1px);
}

.dropzone input,
.mini-file-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.upload-glyph {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--ink);
  border-radius: 14px;
  background: var(--lime);
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
}

.dropzone strong {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 17px;
}

.selected-files {
  max-width: 100%;
  overflow: hidden;
  padding: 5px 9px;
  color: var(--lime-deep);
  border-radius: 999px;
  background: rgba(216, 242, 107, 0.25);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-actions {
  margin-top: 15px;
}

.upload-actions .button-primary {
  min-width: 140px;
}

.progress-wrap {
  width: 100%;
  height: 8px;
  margin-top: 19px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e8db;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lime-deep), var(--lime));
  transition: width 220ms ease;
}

.progress-text {
  min-height: 19px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}

.result-console {
  max-height: 220px;
  margin: 12px 0 0;
  overflow: auto;
  padding: 12px;
  color: #496056;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f4f5ed;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  white-space: pre-wrap;
}

.settings-panel {
  background: var(--ink);
}

.settings-panel h2,
.settings-panel .field-label,
.settings-panel .threshold-row > span {
  color: #eef6df;
}

.settings-panel h2 {
  font-size: 20px;
}

.field-label {
  display: block;
  margin: 20px 0 7px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.settings-panel .field-label {
  margin-top: 19px;
}

.field-input {
  width: 100%;
  min-height: 38px;
  padding: 9px 11px;
}

.settings-panel .field-input {
  color: #eff6e5;
  border-color: #3c554a;
  background: #20352f;
}

.settings-panel .field-input:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 4px rgba(216, 242, 107, 0.12);
}

.toggle-row {
  padding: 12px 0;
  border-bottom: 1px solid #2e483e;
}

.switch-label,
.check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-dark);
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.settings-panel .switch-label {
  color: #c6d6c7;
}

.switch-label input,
.check-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.switch {
  position: relative;
  width: 29px;
  height: 17px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #53675c;
  transition: background 160ms ease;
}

.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #e8eee3;
  content: "";
  transition: transform 160ms ease;
}

.switch-label input:checked + .switch {
  background: var(--lime-deep);
}

.switch-label input:checked + .switch::after {
  transform: translateX(12px);
}

.threshold-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.threshold-row .field-label {
  margin-bottom: 7px;
}

.threshold-row > span {
  color: #8ea398;
  font-size: 9px;
}

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

.utility-panel {
  display: flex;
  min-height: 270px;
  flex-direction: column;
}

.mini-file-field {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding: 0 12px;
  color: var(--muted-dark);
  border: 1px dashed var(--line-dark);
  border-radius: 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.mini-file-field::after {
  color: var(--lime-deep);
  content: "选择 →";
  font-size: 10px;
}

.utility-panel > .button {
  align-self: flex-start;
  margin-top: 10px;
}

.recognize-output {
  max-height: 135px;
  margin-top: 14px;
  overflow: auto;
  padding: 11px;
  color: var(--muted-dark);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f5f6ee;
  font-size: 11px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.recognize-output .result-heading {
  color: var(--ink);
  font-weight: 750;
}

.recognize-output .result-answer {
  margin-top: 4px;
  color: #55730e;
  font-weight: 750;
}

.json-details {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 11px;
}

.json-details summary {
  color: var(--muted-dark);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.json-details textarea {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  line-height: 1.55;
}

.json-details .button {
  margin-top: 9px;
}

.inline-result {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--lime-deep);
  font-size: 10px;
}

.library-intro,
.review-intro {
  align-items: center;
}

.library-panel,
.review-panel,
.maintenance-panel {
  padding: 0;
  overflow: hidden;
}

.library-toolbar {
  padding: 17px 21px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
}

.search-box {
  display: flex;
  min-width: min(440px, 100%);
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-box:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(126, 159, 255, 0.14);
}

.search-box input {
  width: 100%;
  min-height: 39px;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  outline: 0;
}

.search-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--muted);
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  font-size: 12px;
  transform: rotate(-25deg);
}

.search-box button {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}

.compact-select,
.chapter-focus-input {
  min-height: 38px;
  padding: 8px 10px;
  color: var(--muted-dark);
  font-size: 11px;
}

.compact-select {
  min-width: 116px;
}

.library-subtoolbar {
  justify-content: flex-start;
  flex-wrap: wrap;
  padding: 12px 21px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}

.library-subtoolbar > span {
  margin-right: auto;
}

.library-focus-input {
  width: 165px;
}

.library-content {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: 490px;
}

.category-rail {
  min-width: 0;
  max-height: 720px;
  overflow-y: auto;
  padding: 22px 14px;
  border-right: 1px solid var(--line);
  background: #f7f7ef;
}

.rail-group + .rail-group {
  margin-top: 2px;
}

.rail-divider {
  height: 1px;
  margin: 18px 7px;
  background: var(--line);
}

.rail-heading {
  margin: 0 7px 13px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
}

.category-rail-list {
  display: grid;
  gap: 4px;
}

.category-filter {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 8px 7px;
  color: var(--muted-dark);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  text-align: left;
}

.category-filter:hover,
.category-filter.is-active {
  color: var(--ink);
  background: var(--lime);
}

.category-filter span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-filter span:last-child {
  color: var(--muted);
  font-size: 9px;
}

.subject-filter {
  position: relative;
  padding: 9px 7px;
}

.subject-filter-mark {
  width: 13px;
  flex: 0 0 13px;
  color: var(--line-dark);
  font-size: 8px;
  text-align: center;
}

.subject-filter-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subject-filter-count {
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.subject-filter.is-active .subject-filter-mark,
.subject-filter.is-active .subject-filter-count {
  color: var(--ink);
}

.question-tree {
  min-width: 0;
  padding: 20px 22px 28px;
}

.tree-course,
.tree-chapter,
.tree-category,
.question-row,
.pending-course,
.pending-chapter {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.5);
}

.tree-course,
.pending-course {
  overflow: hidden;
  border-color: #c8d49f;
}

.tree-course + .tree-course,
.pending-course + .pending-course {
  margin-top: 10px;
}

.tree-course > summary,
.pending-course > summary {
  padding: 14px 16px;
  color: var(--ink);
  background: #f1f6d9;
  font-size: 12px;
  font-weight: 800;
}

.tree-course > div,
.pending-course > div {
  padding: 8px;
}

.tree-chapter,
.pending-chapter {
  margin: 7px 0;
  border-color: #d7ddd0;
}

.tree-chapter > summary,
.pending-chapter > summary {
  padding: 11px 13px;
  color: var(--muted-dark);
  background: rgba(247, 248, 240, 0.7);
  font-size: 11px;
  font-weight: 750;
}

.tree-chapter > div,
.pending-chapter > div {
  padding: 5px;
}

.tree-category {
  margin: 6px 0;
  border-color: #e4e4d9;
}

.tree-category > summary {
  padding: 9px 11px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.6);
  font-size: 10px;
  font-weight: 750;
}

.tree-category > div {
  padding: 4px;
}

details > summary {
  cursor: pointer;
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}

details > summary::before {
  display: inline-block;
  margin-right: 8px;
  color: var(--lime-deep);
  content: "+";
  font-weight: 800;
  transition: transform 160ms ease;
}

details[open] > summary::before {
  content: "−";
}

.question-row {
  margin: 5px 0;
  overflow: hidden;
  border-color: #e7e7de;
  background: #fffefa;
}

.question-row > summary {
  display: grid;
  grid-template-columns: 47px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
}

.question-row > summary::before {
  margin-right: 0;
}

.question-id {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.type-pill {
  display: inline-flex;
  justify-content: center;
  padding: 4px 7px;
  color: #5068a7;
  border-radius: 6px;
  background: var(--blue-soft);
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.type-pill.multiple {
  color: #8a6a20;
  background: #fff3cf;
}

.type-pill.judge {
  color: #a45040;
  background: #ffe9e2;
}

.type-pill.fill_blank {
  color: #567718;
  background: #edf5cb;
}

.question-summary-text {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.answer-chip {
  max-width: 190px;
  overflow: hidden;
  padding: 5px 8px;
  color: #55730e;
  border-radius: 7px;
  background: #f0f6d4;
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.question-body {
  padding: 16px 19px 19px;
  border-top: 1px solid #ecece2;
  background: #fffefa;
}

.question-stem {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.75;
  white-space: pre-wrap;
}

.answer-line {
  margin-top: 14px;
  padding: 10px 12px;
  color: #55730e;
  border-left: 3px solid var(--lime-deep);
  background: #f5f8e6;
  font-size: 11px;
  font-weight: 700;
}

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

.option-card {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e9e9df;
  border-radius: 8px;
  background: #fafaf4;
}

.option-letter {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  color: #60711f;
  border-radius: 6px;
  background: #e7f1bb;
  font-size: 10px;
  font-weight: 800;
}

.option-content {
  min-width: 0;
  color: var(--muted-dark);
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.question-explanation {
  margin-top: 13px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.review-counter {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 10px 14px;
  color: #a44f3d;
  border: 1px solid #f0cfc6;
  border-radius: 11px;
  background: var(--coral-soft);
}

.review-counter strong {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
}

.review-counter span {
  font-size: 10px;
  font-weight: 700;
}

.review-toolbar {
  padding: 17px 21px;
  border-bottom: 1px solid var(--line);
}

.chapter-tools {
  justify-content: flex-start;
  flex-wrap: wrap;
  padding: 14px 21px;
  border-bottom: 1px solid var(--line);
  background: #fafaf3;
}

.chapter-tool-copy {
  display: grid;
  min-width: 125px;
  gap: 3px;
  margin-right: auto;
}

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

.chapter-focus-input {
  width: 190px;
  background: var(--surface-strong);
}

.pending-tree {
  padding: 20px 21px 28px;
}

.pending-course > div {
  padding: 9px;
}

.pending-item {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
  gap: 13px 18px;
  margin: 8px 0;
  padding: 18px;
  border: 1px solid #e4e5dc;
  border-radius: 13px;
  background: #fffefa;
}

.pending-head {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ecece2;
}

.pending-head input,
.select-all-label input,
.check-label > input {
  position: static;
  width: 15px;
  height: 15px;
  clip: auto;
  clip-path: none;
  accent-color: var(--lime-deep);
}

.pending-head h3 {
  overflow: hidden;
  margin: 0;
  color: var(--muted-dark);
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-id {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
}

.pending-source {
  margin-left: auto;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.pending-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.pending-field-wide {
  grid-column: 1 / -1;
}

.pending-field label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.pending-field input,
.pending-field select,
.pending-field textarea {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 11px;
}

.pending-field textarea {
  resize: vertical;
}

.pending-item > label {
  display: block;
  align-self: end;
  margin-bottom: -7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.pending-item > input,
.pending-item > textarea,
.pending-item > select {
  width: 100%;
  margin: 0;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 11px;
}

.pending-item > label + input,
.pending-item > label + textarea,
.pending-item > label + select {
  margin-top: 0;
}

.pending-item .pending-course-title,
.pending-item .pending-chapter-title,
.pending-item .pending-stem,
.pending-item .pending-options,
.pending-item .pending-question-type,
.pending-item .pending-answer,
.pending-item .pending-explanation,
.pending-item .pending-category {
  grid-column: auto;
}

.pending-item .pending-stem,
.pending-item .pending-options {
  min-height: 104px;
}

.pending-item .pending-explanation {
  min-height: 73px;
}

.pending-item .answer-preview {
  grid-column: 2;
  margin: -5px 0 0;
  padding: 9px 11px;
  color: #55730e;
  border: 1px solid #dfe8b7;
  border-radius: 8px;
  background: #f5f8e7;
  font-size: 10px;
  font-weight: 700;
}

.pending-item .pending-field + .pending-field {
  margin-top: 0;
}

.answer-preview-value {
  color: var(--ink);
}

.pending-item .actions {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
  padding-top: 5px;
  border-top: 1px solid #ecece2;
}

.pending-item .actions .button,
.pending-item .actions button {
  min-height: 32px;
  margin: 0;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}

.is-spinning {
  animation: spin 650ms ease;
}

.pending-item .save-btn {
  color: var(--ink);
  background: #edf1e2;
}

.pending-item .approve-btn {
  color: var(--ink);
  background: var(--lime);
}

.pending-item .reject-btn {
  color: #a44f3d;
  background: var(--coral-soft);
}

.maintenance-panel {
  margin-top: 16px;
  padding: 20px 21px;
}

.maintenance-heading {
  align-items: center;
}

.maintenance-heading h2 {
  margin-top: 4px;
  font-size: 18px;
}

.maintenance-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.maintenance-summary {
  min-height: 18px;
  margin-top: 17px;
  color: var(--lime-deep);
  font-size: 11px;
  font-weight: 700;
}

.table-wrap {
  max-height: 330px;
  margin-top: 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.preview-table {
  width: 100%;
  min-width: 710px;
  border-collapse: collapse;
  font-size: 10px;
}

.preview-table th,
.preview-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #ecece2;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}

.preview-table th {
  position: sticky;
  top: 0;
  color: var(--muted-dark);
  background: #f3f5ea;
  font-size: 9px;
  font-weight: 800;
}

.preview-table tr:last-child td {
  border-bottom: 0;
}

.preview-stem {
  max-width: 420px;
  overflow-wrap: anywhere;
}

.loading-line {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e8eadf, #f5f6ee, #e8eadf);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.loading-line.short {
  width: 74%;
}

.rail-loading {
  width: 80%;
  height: 90px;
  margin: 15px auto;
  border-radius: 8px;
  background: linear-gradient(90deg, #e8eadf, #f5f6ee, #e8eadf);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.toast-region {
  position: fixed;
  z-index: 30;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 8px;
  width: min(340px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  padding: 12px 14px;
  color: #eef7e7;
  border: 1px solid rgba(216, 242, 107, 0.25);
  border-radius: 11px;
  background: var(--ink);
  box-shadow: var(--shadow);
  font-size: 11px;
  animation: toast-in 220ms ease both;
}

.toast.is-error {
  border-color: rgba(255, 128, 105, 0.5);
}

@keyframes pulse {
  0%,
  100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

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

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

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

@media (max-width: 1120px) {
  .workspace {
    padding-right: 30px;
    padding-left: 30px;
  }

  .topbar {
    padding-right: 30px;
    padding-left: 30px;
  }

  .welcome-banner {
    padding-right: 35px;
    padding-left: 35px;
  }

  .welcome-visual {
    margin-right: 0;
    transform: scale(0.85);
  }

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

  .workflow-arrow:nth-of-type(n + 2) {
    display: none;
  }
}

@media (max-width: 860px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 260px;
  }

  .extension-guide {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    width: 100%;
    height: auto;
    align-items: start;
    gap: 4px 12px;
    padding: 14px 16px 12px;
  }

  .app-shell {
    display: block;
  }

  .app-main {
    width: 100%;
    margin-left: 0;
  }

  .brand-lockup,
  .sidebar-label,
  .sidebar-subjects,
  .sidebar-footer {
    display: none;
  }

  .sidebar::before {
    display: block;
    grid-row: 1 / span 2;
    width: 30px;
    height: 30px;
    content: "Q";
    color: var(--ink);
    border-radius: 9px 9px 9px 3px;
    background: var(--lime);
    font-family: Georgia, serif;
    font-size: 18px;
    font-weight: 800;
    line-height: 30px;
    text-align: center;
  }

  .main-nav {
    position: static;
    display: flex;
    min-width: 0;
    grid-column: 2;
    gap: 3px;
    overflow-x: auto;
  }

  .nav-item {
    width: auto;
    flex: 0 0 auto;
    padding: 8px 10px;
    border-radius: 8px;
  }

  .nav-index {
    display: none;
  }

  .nav-text {
    font-size: 11px;
  }

  .topbar {
    min-height: 74px;
    padding: 15px 22px;
  }

  .mobile-brand {
    display: none;
  }

  .workspace {
    padding: 25px 22px 50px;
  }

  .welcome-visual {
    display: none;
  }

  .dashboard-grid,
  .import-layout {
    grid-template-columns: 1fr;
  }

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

  .library-content {
    grid-template-columns: 1fr;
  }

  .category-rail {
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .category-rail-list {
    display: flex;
    overflow-x: auto;
  }

  .category-filter {
    width: auto;
    flex: 0 0 auto;
  }

  .pending-item {
    grid-template-columns: 1fr;
  }

  .pending-item .answer-preview {
    grid-column: 1;
  }
}

@media (max-width: 620px) {
  .feature-hero {
    padding: 28px 22px;
  }

  .feature-card {
    padding: 21px;
  }

  .extension-guide {
    padding: 24px 20px;
  }

  .extension-guide-actions {
    display: grid;
  }

  .topbar-actions .sync-text,
  .workspace-chip span:last-child {
    display: none;
  }

  .extension-launcher {
    width: auto;
    min-height: 36px;
    justify-content: center;
    padding: 0 10px;
    font-size: 10px;
  }

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

  .topbar {
    justify-content: flex-end;
  }

  .page-heading {
    margin-right: auto;
  }

  .workspace {
    padding: 18px 14px 38px;
  }

  .welcome-banner {
    min-height: 220px;
    padding: 24px 22px;
    border-radius: 16px;
  }

  .welcome-copy h2 {
    font-size: 34px;
  }

  .stat-card {
    min-height: 118px;
    padding: 15px;
  }

  .stat-value {
    font-size: 31px;
  }

  .surface-panel {
    padding: 17px;
    border-radius: 13px;
  }

  .panel-tall {
    min-height: 300px;
  }

  .workflow-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px;
  }

  .workflow-intro {
    grid-column: 1 / -1;
  }

  .workflow-arrow {
    display: none;
  }

  .section-intro,
  .maintenance-heading {
    display: grid;
    align-items: start;
  }

  .section-intro h2 {
    font-size: 29px;
  }

  .format-list {
    justify-content: flex-start;
  }

  .library-toolbar,
  .review-toolbar {
    display: grid;
    align-items: stretch;
  }

  .search-box {
    min-width: 0;
  }

  .toolbar-actions,
  .toolbar-group {
    width: 100%;
  }

  .toolbar-actions .compact-select,
  .toolbar-actions .button {
    flex: 1;
  }

  .chapter-tools {
    align-items: stretch;
  }

  .chapter-tool-copy {
    width: 100%;
  }

  .chapter-focus-input {
    width: 100%;
  }

  .question-tree,
  .pending-tree {
    padding: 13px 10px 20px;
  }

  .question-row > summary {
    grid-template-columns: 40px auto minmax(0, 1fr);
  }

  .question-row .answer-chip {
    display: none;
  }

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

  .pending-item {
    padding: 13px;
  }

  .pending-source {
    display: none;
  }

  .maintenance-actions {
    width: 100%;
  }

  .maintenance-actions .button {
    flex: 1;
  }

  .review-counter {
    justify-self: start;
  }
}
