:root {
  font:
    14px/1.5 "Segoe UI",
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    system-ui, sans-serif;
  color: #20243a;
  background: #f7f8fc;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
summary {
  cursor: pointer;
}
button {
  border: 1px solid #dbe0ed;
  background: #fff;
  color: #3b4360;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 3px;
}
button:hover {
  background: #f0f1ff;
  border-color: #aaaef1;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.button-processing:disabled { cursor: progress; }
input:not([type="checkbox"]),
textarea,
select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #dbe0ed;
  border-radius: 6px;
  background: #fff;
  color: #20243a;
}
textarea {
  min-height: 84px;
  resize: vertical;
}
.pricing-compatibility { margin: 0 20px 8px; color: #8a6227; font-size: 12px; }
#feedback {
  overflow-y: hidden;
  resize: none;
}
label {
  display: block;
  margin: 10px 0;
}
small {
  color: #7c849c;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 23px;
}
h2 {
  font-size: 16px;
}
h3 {
  font-size: 14px;
}
header {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  background: #fff;
  border-bottom: 1px solid #e7eaf2;
}
header strong {
  font-size: 17px;
  margin-right: auto;
}
#headerTaskActions { display: flex; align-items: center; gap: 8px; }
#headerTaskActions[hidden] { display: none; }
#headerTaskActions button { margin: 0; white-space: nowrap; }
.selection-count { display: block; padding: 0 16px 8px; color: #8a94ac; font-size: 12px; }
#notice {
  margin: 0;
  padding: 0 20px;
  color: #ad3d39;
}
#notice:empty {
  display: none;
}
main {
  min-height: calc(100vh - 58px);
}
#login {
  max-width: 420px;
  margin: 9vh auto;
  background: #fff;
  padding: 32px;
  border: 1px solid #e7eaf2;
  border-radius: 10px;
}
#sessionRecovery:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #f7f8fc;
  text-align: center;
}
#sessionRecovery[data-state="loading"] #sessionRecoveryTitle,
#sessionRecovery[data-state="loading"] #sessionRecoveryMessage {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
#sessionRecoverySpinner:not([hidden]) {
  display: block;
  width: 40px;
  height: 40px;
  border: 4px solid #e0e2fb;
  border-top-color: #5653df;
  border-radius: 50%;
  animation: processing-spin 1s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  #sessionRecoverySpinner:not([hidden]) { animation: none; }
}
#sessionRecoveryMessage { color: #7c849c; }
body.restoring-login #workspace { display: none !important; }
#makeReport {
  background: #5653df;
  color: white;
  border-color: #5653df;
}
#workspace:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: calc(100vh - 58px);
}
.queue {
  background: #fff;
  border-right: 1px solid #e2e6f0;
  min-width: 0;
  padding: 23px 0;
}
.queue-add { padding: 12px 16px; }
.queue-add button { width: 100%; margin: 0; }
.job-row {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  border-bottom: 1px solid #f0f1f6;
}
.job-row label {
  font-size: 0;
  margin: 0;
}
.job-row label input {
  margin: 5px;
}
.job {
  flex: 1;
  text-align: left;
  border: 0;
  padding: 10px;
  background: transparent;
  overflow-wrap: anywhere;
  font-weight: 600;
}
.job small {
  display: block;
  font-weight: 400;
  margin-top: 5px;
}
.job-status {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.4;
}
.job-status--processing { color: #4b5563; background: #e9ecf0; }
.job-status--review { color: #925209; background: #fff0d7; }
.job-status--reviewed { color: #1f6840; background: #e3f4e8; }
.job-row.selected,
.job-row:has(.job:focus) {
  background: #eeefff;
}
.job:hover {
  border: 0;
  background: #f4f5ff;
}
#detail {
  min-width: 0;
  padding: 24px;
  background: #f8f9fd;
}
.detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.detail-heading h1 {
  margin: 8px 0 2px;
}
.detail-heading p,
.breadcrumb {
  font-size: 13px;
  color: #8790a7;
  margin: 0;
}
.status {
  font-size: 12px;
  color: #c57822;
  background: #fff1de;
  padding: 4px 8px;
  border-radius: 5px;
  vertical-align: middle;
}
.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 16px;
  align-items: start;
}
.review-layout.split-review {
  grid-template-columns: minmax(0, var(--review-left, 1.2fr)) 16px minmax(0, var(--review-right, .8fr));
  gap: 0;
}
.review-splitter {
  position: relative;
  align-self: stretch;
  min-height: 44px;
  cursor: col-resize;
  touch-action: none;
}
.review-splitter::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 7px;
  width: 2px;
  border-radius: 2px;
  background: #dbe0ed;
}
.review-splitter:hover::after, .review-splitter:focus-visible::after, .resizing-review .review-splitter::after { background: #7773e8; }
.review-splitter:focus-visible { outline: 2px solid #7773e8; outline-offset: -2px; }
body.resizing-review, body.resizing-review * { cursor: col-resize !important; user-select: none !important; }
.image-panel,
.review-panel {
  background: #fff;
  border: 1px solid #e9ebf2;
  border-radius: 8px;
  padding: 16px;
  min-width: 0;
}
.panel-heading {
  font-weight: 700;
  margin-bottom: 12px;
}
.panel-heading small,
.review-panel h2 small {
  font-weight: 400;
  margin-left: 8px;
}
.images {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.images > div {
  max-width: 100%;
  background: #f2f3f7;
  padding: 8px;
  border-radius: 5px;
}
.images img {
  display: block;
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
}
.images a {
  display: inline-block;
  color: #5554d9;
  margin: 8px;
}
.review-panel h2:not(:first-child) {
  margin-top: 20px;
}
.issue {
  padding: 12px 0;
  border-top: 1px solid #e9ebf2;
}
.issue label {
  font-size: 12px;
  color: #66708a;
}
.issue input,
.issue textarea {
  font-size: 13px;
}
.issue textarea {
  min-height: 72px;
}
.page-management {
  margin-top: 16px;
  border-top: 1px solid #e9ebf2;
  padding-top: 14px;
}
.page-management summary {
  color: #5554d9;
  font-weight: 600;
}
.page-management #pageTools {
  padding-top: 12px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}
#detail > p {
  margin: 25vh auto;
  text-align: center;
  color: #8490aa;
}
#detail > p::before {
  content: "作业工作台";
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: #394462;
  margin-bottom: 10px;
}
@media (max-width: 1100px) {
  .review-layout,
  .review-layout.split-review {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .review-splitter { display: none; }
  .images img {
    max-height: 65vh;
  }
}
@media (max-width: 800px) {
  header {
    height: auto;
    min-height: 58px;
    flex-wrap: wrap;
    padding: 10px 14px;
  }
  header strong { width: 100%; }
  #workspace:not([hidden]) {
    display: flex;
    flex-direction: column;
  }
  .queue {
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid #e2e6f0;
  }
  .selection-count { padding-left: 2px; padding-right: 2px; }
  .job-row {
    padding: 2px;
  }
  .job {
    padding: 8px;
  }
  .review-layout {
    grid-template-columns: 1fr;
  }
  #detail {
    padding: 16px;
  }
  .detail-heading {
    align-items: flex-start;
  }
  .images img {
    max-height: 55vh;
  }
  #login {
    margin: 30px 12px;
  }
}

.queue-search {
  display: block;
  margin: 0 14px 14px;
}
.queue-search input {
  font-size: 13px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.job-row[hidden] {
  display: none;
}

/* 登录页：对应参考页面的绿色教师工作台样式。 */
#login:not([hidden]) {
  max-width: 448px;
  margin: 0 auto;
  padding: clamp(36px, 10vh, 100px) 16px 28px;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.login-card {
  padding: 32px;
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  box-shadow: 0 18px 36px rgba(148, 163, 184, 0.18);
  color: #1e293b;
}
#desktopDownloadLatest { display: none; }
body:has(#login:not([hidden])) #desktopDownloadLatest:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 8px;
  background: #047857;
  color: #fff;
  font-weight: 650;
  text-decoration: none;
  text-align: center;
}
#desktopDownloadLatest:hover { background: #065f46; }
#login h1 {
  margin: 0 0 24px;
  color: #0f172a;
  font-size: 28px;
  line-height: 1.25;
}
.login-tabs {
  display: flex;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 20px;
}
.login-tabs button {
  flex: 1;
  margin: 0;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: #94a3b8;
  background: transparent;
  font-weight: 500;
}
.login-tabs button[aria-selected="true"] {
  color: #059669;
  border-bottom-color: #059669;
  font-weight: 600;
}
#auth label {
  margin: 0 0 16px;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}
#auth label span:not(.password-field) {
  color: #059669;
  font-weight: 400;
}
#auth input:not([type="checkbox"]) {
  display: block;
  margin-top: 6px;
  padding: 11px 13px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #1e293b;
  font-size: 14px;
  font-weight: 400;
}
#auth input:focus {
  outline: 2px solid rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  background: #fff;
}
.password-field {
  display: flex;
  align-items: end;
  position: relative;
}
#auth .password-field input {
  padding-right: 65px;
}
#toggle-password {
  position: absolute;
  right: 4px;
  bottom: 4px;
  margin: 0;
  padding: 7px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 12px;
}
#auth .auth-submit,
#auth .auth-switch {
  display: block;
  width: 100%;
  margin: 10px 0 0;
  padding: 11px 14px;
  border-radius: 12px;
  font-weight: 600;
}
#auth .auth-submit {
  color: #fff;
  background: #059669;
  border-color: #059669;
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.18);
}
#auth .auth-submit:hover {
  background: #047857;
}
#auth .auth-switch {
  color: #475569;
  background: #f1f5f9;
  border-color: #e2e8f0;
}
#auth .auth-switch:hover {
  background: #e2e8f0;
}
#auth .auth-submit[hidden],
#register-fields[hidden] {
  display: none;
}
@media (max-width: 480px) {
  .login-card {
    padding: 24px;
  }
  #login:not([hidden]) {
    padding-top: 32px;
  }
}
/* 较矮窗口中减少登录页留白，保留输入框和按钮的可用尺寸。 */
@media (max-height: 700px) {
  #login:not([hidden]) {
    padding-top: 16px;
    padding-bottom: 16px;
  }
  .login-card {
    padding: 24px;
  }
  #login h1 {
    margin-bottom: 16px;
  }
  .login-tabs {
    margin-bottom: 16px;
  }
  #auth label {
    margin-bottom: 12px;
  }
  #auth input:not([type="checkbox"]) {
    padding-top: 9px;
    padding-bottom: 9px;
  }
  #auth .auth-submit,
  #auth .auth-switch {
    padding-top: 9px;
    padding-bottom: 9px;
  }
}
@media (max-height: 520px) {
  #login:not([hidden]) {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .login-card {
    padding: 20px;
  }
  #login h1 {
    font-size: 24px;
    margin-bottom: 12px;
  }
  .login-tabs {
    margin-bottom: 12px;
  }
  #auth label {
    margin-bottom: 8px;
  }
  #auth input:not([type="checkbox"]),
  #auth .auth-submit,
  #auth .auth-switch {
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

/* 当前任务工具布局 */
.tool-content {
  min-width: 0;
}
#importPage {
  max-width: 1100px;
  margin: auto;
  padding: 32px;
}
#importPage > h1 {
  font-size: 30px;
  margin-bottom: 8px;
}
.muted {
  color: #808ba3;
  font-size: 13px;
}
.drop-zone {
  display: block;
  text-align: center;
  padding: 30px 18px;
  color: #5653df;
  border: 1px dashed #b8bdf0;
  border-radius: 10px;
  background: #f9faff;
  font-weight: 600;
  cursor: pointer;
}
.drop-zone span {
  display: block;
  color: #8892ac;
  font-weight: 400;
  font-size: 12px;
  margin: 8px 0 18px;
}
#files {
  max-width: 340px;
  font-size: 12px;
}
.primary {
  color: white;
  background: #5653df;
  border-color: #5653df;
}
.primary:hover {
  background: #4542c7;
  color: white;
}
.queue-splitter {
  position: relative;
  align-self: stretch;
  cursor: col-resize;
  touch-action: none;
}
.queue-splitter::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 7px;
  width: 2px;
  background: #dbe0ed;
}
.queue-splitter:hover::after, .queue-splitter:focus-visible::after, .resizing-queue .queue-splitter::after { background: #7773e8; }
.queue-splitter:focus-visible { outline: 2px solid #7773e8; outline-offset: -2px; }
body.resizing-queue, body.resizing-queue * { cursor: col-resize !important; user-select: none !important; }
.task-layout {
  display: grid;
  grid-template-columns: var(--queue-width, 235px) 16px minmax(0, 1fr);
  min-height: calc(100vh - 58px);
}
#reviewPage[hidden],
#importPage[hidden] {
  display: none;
}
.queue-empty {
  padding: 16px;
}
@media (max-width: 1100px) {
  .task-layout {
    grid-template-columns: var(--queue-width, 235px) 16px minmax(0, 1fr);
  }
}
@media (max-width: 800px) {
  #workspace:not([hidden]) {
    display: flex;
  }
  .task-layout {
    grid-template-columns: 1fr;
  }
  .queue-splitter { display: none; }
  #importPage {
    padding: 20px 14px;
  }
  .task-layout .queue {
    max-height: 280px;
    overflow: hidden;
  }
  .drop-zone {
    padding: 24px 10px;
  }
}

/* 使导入主流程在常见桌面窗口内保持紧凑。 */
#importPage {
  padding-top: 24px;
}
.drop-zone {
  position: relative;
  padding: 22px 16px;
}
.drop-zone span {
  margin: 6px 0 0;
}
#files {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  opacity: 0;
  cursor: pointer;
}
.drop-zone:focus-within {
  outline: 2px solid #aaaef1;
  outline-offset: 3px;
}

/* 账户页：余额与兑换并排，账单置于下方。 */
#accountPage {
  max-width: 1260px;
  margin: auto;
  padding: 36px 40px;
}
#accountPage[hidden],
#wallet[hidden],
#ledgerSection[hidden] {
  display: none;
}
.account-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.account-page-heading h1 {
  font-size: 30px;
  margin: 0;
}
.account-page-heading button {
  flex-shrink: 0;
}
.account-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0 18px;
}
.account-identity > #accountNickname {
  color: #8490a7;
  padding-left: 14px;
  border-left: 1px solid #dce1ef;
}
#changePassword { margin: 0 0 0 auto; flex-shrink: 0; }
#passwordChangeStatus { color: #087457; }
#passwordChangeStatus:empty { margin: 0; }
.account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e9e8ff;
  color: #5653df;
  font-size: 22px;
  font-weight: 600;
}
.account-overview {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  border: 1px solid #e0e4f4;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.balance-panel {
  background: #eeefff;
  padding: 30px;
  min-width: 0;
}
.balance-panel h2 {
  font-size: 15px;
  margin: 0;
  font-weight: 500;
}
.balance-amount {
  font-size: clamp(30px, 4vw, 58px);
  font-weight: 700;
  letter-spacing: -1.5px;
  margin: 10px 0 20px;
  overflow-wrap: anywhere;
}
.balance-panel > p:last-child {
  margin: 0;
}
.redemption-panel {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.redemption-panel h2 {
  font-size: 22px;
  margin-bottom: 8px;
}
#redeem input {
  margin: 18px 0 14px;
  padding: 14px;
  border-radius: 7px;
}
#redeem button {
  margin: 0;
  width: 100%;
  padding: 13px;
  font-weight: 600;
}
.account-overview:has(#wallet[hidden]) {
  grid-template-columns: 1fr;
}
.ledger-section {
  margin-top: 18px;
  border: 1px solid #e0e4f4;
  border-radius: 10px;
  padding: 26px 30px;
  background: #fff;
}
#personalInviteDetails:not([hidden]) {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
}
#personalInviteDetails label {
  flex: 1 1 280px;
  min-width: 0;
}
#personalInviteDetails button {
  margin: 0;
}
.ledger-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.ledger-heading h2 {
  margin: 0 auto 0 0;
  font-size: 21px;
}
.ledger-table-wrap {
  overflow-x: auto;
}
.ledger-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.ledger-table th {
  background: #f1f3fa;
  color: #64708c;
  font-weight: 600;
  padding: 13px 16px;
  white-space: nowrap;
}
.ledger-table td {
  padding: 16px;
  border-bottom: 1px solid #edf0f7;
  vertical-align: top;
}
.ledger-table td:nth-child(3) {
  overflow-wrap: anywhere;
}
.ledger-table td:first-child {
  white-space: nowrap;
  color: #68758e;
}
.ledger-table td:last-child,
.ledger-table th:last-child {
  text-align: right;
}
.ledger-amount {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 600;
}
.ledger-kind {
  font-size: 12px;
  white-space: nowrap;
}
.credit {
  color: #168b51;
}
.debit {
  color: #7b85a1;
}
#ledgerStatus:empty {
  display: none;
}
@media (max-width: 1100px) {
  #accountPage {
    padding: 28px 24px;
  }
  .balance-panel,
  .redemption-panel {
    padding: 24px;
  }
}
@media (max-width: 800px) {
  #accountPage {
    padding: 24px 16px;
  }
  .account-overview {
    grid-template-columns: 1fr;
  }
  .balance-panel {
    border-bottom: 1px solid #dce1f3;
  }
  .ledger-section {
    padding: 20px 16px;
  }
  .ledger-heading h2 {
    font-size: 18px;
  }
  .ledger-table {
    min-width: 550px;
  }
  .ledger-table-wrap {
    max-width: 100%;
  }
  .account-identity {
    gap: 10px;
    flex-wrap: wrap;
  }
}

#newTask {
  margin-left: 12px;
  border-color: #c9cfed;
  color: #5653df;
}
#notice {
  color: #535f7c;
}
#notice[data-kind="error"] {
  color: #b43c43;
  background: #fff3f3;
  padding: 10px 20px;
}
.processing-state {
  padding: 40px 10px;
  text-align: center;
  color: #68748e;
}
.processing-state h2 {
  color: #5653df;
  font-size: 20px;
  margin: 18px 0 10px;
}
.processing-state p {
  font-size: 13px;
  line-height: 1.8;
}
.processing-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid #e1e4fb;
  border-top-color: #5653df;
  border-radius: 50%;
  animation: processing-spin 1s linear infinite;
}
.is-processing > :not(.processing-state) {
  display: none;
}
#runSelected {
  position: relative;
  padding-left: 28px;
}
.button-processing::before {
  content: "";
  position: absolute;
  left: 9px;
  top: calc(50% - 5px);
  display: block;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: processing-spin 1s linear infinite;
}
.detail-transition-image {
  position: fixed;
  z-index: 30;
  pointer-events: auto;
}
.failure-state {
  background: #fff4f4;
  border: 1px solid #f1d4d6;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 18px;
}
.failure-state h2 {
  color: #b43c43;
  margin-bottom: 10px;
}
.failure-state p,
.job-error {
  color: #b43c43;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.failure-state small {
  display: block;
  margin-top: 8px;
}
.job small.job-error {
  color: #b43c43;
  font-size: 12px;
}
@keyframes processing-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .processing-spinner,
  .button-processing::before {
    animation: none;
  }
}
#taskResults[hidden] {
  display: none;
}
.share-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 24px;
  background: #eef0ff;
  color: #5653df;
  border-bottom: 1px solid #dde2fb;
}
.share-notice[hidden] {
  display: none;
}
#reviewPage > #importPage {
  max-width: 1100px;
}
.detail-heading h1 {
  margin: 0;
}
.image-more {
  display: inline-block;
  position: relative;
  vertical-align: middle;
  margin: 4px 3px;
}
.image-more > summary {
  list-style: none;
  padding: 8px 12px;
  border: 1px solid #dbe0ed;
  border-radius: 6px;
  background: #fff;
  color: #5653df;
  cursor: pointer;
}
.image-more > summary::-webkit-details-marker {
  display: none;
}
.image-more > summary:hover {
  background: #f0f1ff;
}
.image-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 5;
  min-width: 166px;
  padding: 5px;
  background: #fff;
  border: 1px solid #dfe3f2;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(40, 48, 88, 0.12);
}
.images .image-menu a,
.image-menu button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px;
  text-align: left;
  white-space: nowrap;
  font-size: 13px;
  border: 0;
  background: transparent;
  border-radius: 4px;
  text-decoration: none;
  color: #414967;
}
.images .image-menu a:hover,
.image-menu button:hover {
  background: #f0f1ff;
  color: #5653df;
}
.image-more:focus-within > summary {
  outline: 2px solid #aaaef1;
  outline-offset: 2px;
}
.issue-compact {
  padding: 14px 0;
}
.issue-insert {
  position: relative;
  z-index: 1;
  height: 16px;
  margin: -8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.issue-insert::before {
  content: '';
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid #aaa8f4;
  opacity: 0;
}
.issue-insert-button {
  position: relative;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #a7a5ef;
  border-radius: 50%;
  background: #fff;
  color: #5653df;
  font-size: 19px;
  line-height: 1;
  opacity: 0;
}
.issue-insert:hover::before, .issue-insert:focus-within::before,
.issue-insert:hover .issue-insert-button, .issue-insert:focus-within .issue-insert-button { opacity: 1; }
@media (hover: none) {
  .issue-insert-button { opacity: 1; }
}
.issue-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}
.issue-heading strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.issue-edit-toggle {
  flex-shrink: 0;
  margin: 0;
  border: 0;
  padding: 3px 6px;
  font-size: 12px;
  color: #5653df;
  background: transparent;
}
.issue-compact[tabindex="0"]:focus-visible { outline: 2px solid #7773e8; outline-offset: 2px; }
.issue-compact.annotation-focused { background: #f3f2ff; box-shadow: inset 3px 0 #7773e8; }
.issue-heading .issue-remove {
  flex-shrink: 0;
  margin: 0;
  border: 0;
  padding: 3px 6px;
  font-size: 12px;
  color: #b85864;
  background: transparent;
}
.issue-answer-preview {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  line-height: 1.5;
}
.issue-answer-preview > span {
  overflow-wrap: anywhere;
  min-width: 0;
}
.student-answer {
  color: #a44a55;
  background: #fff1f2;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: pre-wrap;
}
.correct-answer {
  color: #227558;
  background: #edf8f2;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: pre-wrap;
}
.issue-reason {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: #75819b;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.issue-edit-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 10px;
  margin-top: 12px;
  padding: 12px;
  background: #f8f9fd;
  border-radius: 6px;
}
.issue-edit-fields[hidden] {
  display: none;
}
.issue-completion-hint {
  grid-column: 1 / -1;
  margin: 0 0 10px;
  color: #687892;
  font-size: 13px;
}
.issue-completion-hint[hidden] { display: none; }
.issue-edit-fields label {
  margin: 0 0 10px;
  min-width: 0;
}
.issue-field-location,
.issue-field-analysis {
  grid-column: 1/-1;
}
.issue-edit-fields input,
.issue-edit-fields textarea {
  margin-top: 4px;
}
#detail .issue-edit-fields textarea {
  min-height: 76px;
}
/* 桌面复核工作台：图片与问题清单各自滚动，工具栏固定在可视范围。 */
@media (min-width: 1101px) and (min-height: 600px) {
  body.review-workspace {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  body.review-workspace > header,
  body.review-workspace > #notice {
    flex-shrink: 0;
  }
  body.review-workspace > main {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
  body.review-workspace #workspace {
    height: 100%;
    min-height: 0;
  }
  body.review-workspace .tool-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  body.review-workspace .share-notice {
    flex-shrink: 0;
  }
  body.review-workspace #reviewPage {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }
  body.review-workspace #taskResults {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
  body.review-workspace .task-layout > .queue {
    min-height: 0;
    overflow: hidden;
  }
  body.review-workspace #detail {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }
  body.review-workspace .detail-heading {
    flex-shrink: 0;
  }
  body.review-workspace .review-layout {
    flex: 1;
    min-height: 0;
    align-items: stretch;
  }
  body.review-workspace .image-panel,
  body.review-workspace .review-panel {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}
.image-panel:focus-visible,
.review-panel:focus-visible {
  outline: 2px solid #aaaef1;
  outline-offset: 2px;
}
header #showAccount {
  flex-shrink: 0;
}
header #showAccount.nav-active {
  background: #eeefff;
  color: #5653df;
  border-color: #c6caf5;
}
header button[hidden] {
  display: none;
}

/* 新建页仅保留一个可点击、拖放和自动接收微信图片的入口。 */
#importPage:not([hidden]) {
  min-height: calc(100dvh - 150px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.camera-entry { margin-top: 16px; }
.queue-add #appendCamera { min-height: 44px; margin-top: 8px; }
.action-confirmation { width: min(440px, calc(100% - 32px)); padding: 20px; border: 1px solid #dbe0ed; border-radius: 12px; color: inherit; }
.action-confirmation::backdrop { background: #18213b99; }
.action-confirmation h2 { margin: 0; font-size: 18px; }
.action-confirmation p { max-height: 50dvh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
#passwordForm label { margin-top: 12px; }
#passwordForm .password-visibility {
  display: flex;
  align-items: center;
  gap: 6px;
}
#passwordForm .password-visibility input { width: auto; }
#passwordForm .password-error { color: #a12828; margin: 6px 0 0; }
#passwordForm .password-error:empty { margin: 0; }
.paste-dialog { width: min(640px, 94vw); max-height: 90dvh; padding: 0; border: 1px solid #dbe0ed; border-radius: 12px; color: inherit; }
.paste-dialog[open] { display: flex; flex-direction: column; }
.paste-dialog::backdrop { background: #18213b99; }
.paste-heading, .paste-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.paste-heading { border-bottom: 1px solid #e2e6f0; }
.paste-heading h2 { margin: 0; font-size: 18px; }
.paste-dialog button { margin: 0; min-height: 36px; }
.paste-body { padding: 12px 16px; overflow-y: auto; }
.paste-body p { margin: 0 0 8px; }
.paste-body p:empty { display: none; }
.paste-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.paste-photos li { min-width: 0; border: 1px solid #dbe0ed; border-radius: 8px; padding: 6px; }
.paste-photos img { display: block; width: 100%; height: 92px; object-fit: contain; background: #f1f3f8; border-radius: 4px; }
.paste-photos li[draggable="true"] { border-color: #aba8ef; }
.paste-photos li[draggable="true"] img { cursor: grab; }
.paste-existing { position: relative; background: #f7f8fc; }
.paste-existing img:not([src]) { visibility: hidden; }
.paste-existing[data-drop-side]::before { content: ""; position: absolute; inset-block: 0; width: 4px; border-radius: 2px; background: #514bd9; pointer-events: none; }
.paste-existing[data-drop-side="before"]::before { left: -6px; }
.paste-existing[data-drop-side="after"]::before { right: -6px; }
.paste-position-control { margin-top: 4px; font-size: 12px; }
.paste-position-control summary { cursor: pointer; color: #4338ca; padding: 5px 0; }
.paste-position { width: 100%; margin-top: 4px; padding: 5px; font-size: 12px; }
.paste-photo-caption { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 4px; font-size: 13px; white-space: nowrap; }
.paste-photo-caption button { padding: 4px 8px; }
.paste-actions { justify-content: flex-end; border-top: 1px solid #e2e6f0; }
.paste-heading h2 { overflow-wrap: anywhere; min-width: 0; }
.camera-dialog { width: min(720px, 96vw); max-width: 96vw; max-height: 94dvh; padding: 0; border: 1px solid #dbe0ed; border-radius: 12px; }
.camera-dialog::backdrop { background: #18213b99; }
.camera-heading { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #e2e6f0; }
.camera-heading button { margin: 0; }
#cameraTitle { min-width: 0; overflow-wrap: anywhere; }
#cameraClose { flex: none; }
.camera-body { padding: 16px; overflow-y: auto; max-height: calc(94dvh - 64px); }
#cameraVideo { display: block; width: 100%; max-height: 52dvh; background: #20243a; object-fit: contain; border-radius: 8px; }
#cameraStatus { margin: 8px 0; }
.camera-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.camera-actions button { margin: 0; }
.camera-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 16px; }
.camera-photos figure { margin: 0; min-width: 0; }
.camera-photos button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #dbe0ed;
  border-radius: 8px;
}
.camera-photos img { display: block; width: 100%; height: 100px; object-fit: contain; background: #f1f3f8; }
.camera-photos span {
  position: absolute;
  inset: auto auto 3px 3px;
  min-width: 17px;
  padding: 0 3px;
  border-radius: 4px;
  background: #08090bd9;
  color: #fff;
  font-size: 11px;
  line-height: 17px;
}
.camera-preview { background: #08090b; color: #fff; }
.camera-preview[open] { display: flex; flex-direction: column; height: min(94dvh, 900px); }
.camera-preview .camera-heading { flex: none; border-color: #30323a; }
.camera-preview img { display: block; flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.camera-preview-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
.camera-preview button {
  min-height: 44px;
  margin: 0;
  border-color: #4c4f56;
  background: #222429;
  color: #fff;
}
.camera-preview button:disabled { opacity: .55; }
#cameraPreviewDelete { color: #ffc0c0; }
@media (max-width: 700px), (hover: none) and (pointer: coarse) {
  .camera-dialog {
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    overscroll-behavior: contain;
    background: #08090b;
    color: #fff;
  }
  .camera-dialog[open] { display: flex; flex-direction: column; }
  .camera-preview[open] { height: 100dvh; }
  .camera-heading {
    flex: none;
    border: 0;
    padding: max(4px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 4px max(12px, env(safe-area-inset-left));
  }
  .camera-heading button, .camera-actions button {
    min-height: 44px;
    border-color: #4c4f56;
    background: #222429;
    color: #fff;
  }
  .camera-body {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto auto auto;
    flex: 1;
    min-height: 0;
    max-height: none;
    padding: 0 0 max(8px, env(safe-area-inset-bottom));
    overflow: hidden;
  }
  #cameraVideo {
    height: 100%;
    min-height: 0;
    max-height: none;
    border-radius: 0;
    background: #101114;
  }
  #cameraStatus {
    margin: 4px max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
    text-align: center;
    color: #dddfe5;
    font-size: 13px;
  }
  .camera-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 4px max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  }
  #cameraCapture, #cameraResume { grid-area: 1 / 2; }
  .camera-actions:has(#cameraResume:not([hidden])) #cameraCapture { visibility: hidden; }
  #cameraCapture {
    width: 64px;
    height: 64px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: inset 0 0 0 3px #08090b;
    background: #fff;
    color: #15161a;
    font-weight: 650;
  }
  .camera-actions button:disabled { opacity: .55; }
  #cameraUse { grid-area: 1 / 3; justify-self: end; padding-inline: 8px; font-size: 13px; }
  .camera-photos {
    display: flex;
    gap: 8px;
    margin: 6px 0 0;
    padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }
  .camera-photos:empty { display: none; }
  .camera-photos figure { flex: 0 0 64px; }
  .camera-photos button { border-color: #4c4f56; }
  .camera-photos img { height: 62px; background: #222429; }
}
#importPage .drop-zone {
  width: 100%;
  min-height: 280px;
  margin: 0;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fff;
}
#importPage .drop-zone::before {
  content: "+";
  font-size: 52px;
  font-weight: 300;
  line-height: 1;
  color: #8986ed;
}
#importPage .drop-zone.is-importing::before {
  content: "";
  width: 30px;
  height: 30px;
  border: 3px solid #e3e4fa;
  border-top-color: #5653df;
  border-radius: 50%;
  animation: processing-spin 1s linear infinite;
}
.drop-zone.is-importing {
  cursor: wait;
}
#newGroupName[hidden] {
  display: none;
}
@media (max-width: 480px) {
  #importPage .drop-zone {
    min-height: 240px;
    padding: 32px 16px;
  }
}

/* 分组操作直接放在列表和图片上。 */
.group-rename {
  flex-shrink: 0;
  min-height: 44px;
  padding: 4px;
  margin: 0;
  white-space: nowrap;
  color: #7b83a3;
  font-size: 11px;
  background: transparent;
  border-color: transparent;
}
.job {
  min-width: 0;
}
.job-row.drop-target {
  background: #e5e7ff;
  box-shadow: inset 0 0 0 2px #7773e8;
}
.image-page[draggable="true"] > img {
  cursor: grab;
}
.image-page.is-dragging {
  opacity: 0.5;
}
.empty-group {
  padding: 24px;
  color: #808ba3;
}
.organize-menu {
  position: fixed;
  z-index: 1000;
  min-width: 180px;
  max-width: min(300px, calc(100vw - 16px));
  max-height: min(420px, calc(100dvh - 16px));
  overflow-y: auto;
  padding: 6px;
  background: white;
  border: 1px solid #e0e3f0;
  border-radius: 8px;
  box-shadow: 0 8px 28px #28345326;
}
.organize-menu[hidden] {
  display: none;
}
.organize-menu button {
  display: block;
  width: 100%;
  margin: 0;
  text-align: left;
  border: 0;
  background: transparent;
  overflow-wrap: anywhere;
}
.organize-menu button:hover,
.organize-menu button:focus-visible {
  background: #eeefff;
}
#groupDialog {
  width: min(400px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid #e0e3f0;
  border-radius: 12px;
  color: #293457;
  box-shadow: 0 18px 60px #28345330;
}
#groupDialog::backdrop {
  background: #20243a55;
}
#groupDialogError {
  margin: 12px 0;
  color: #ad3d39;
  font-size: 12px;
}
#groupDialogError:empty {
  display: none;
}
.group-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

/* Reused HomeworkInk inline editing styles. */
/* Snipaste-like paper text: transparent editing bounds, compact local controls. */
.homework-inline-editor {
  z-index: 6;
  pointer-events: auto;
  cursor: text;
  max-width: 100%;
  text-align: left;
}
.homework-inline-input {
  display: block;
  width: 100%;
  min-height: 0;
  max-height: none;
  box-sizing: border-box;
  margin: 0;
  padding: 1px 2px;
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-all;
  border: 1px solid #a4b4c3;
  border-radius: 0;
  background: transparent;
  font-family: "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: normal;
  box-shadow: none;
  outline: none;
  caret-color: currentColor;
  touch-action: auto;
}
.homework-inline-input:focus {
  outline: none;
  outline-offset: 0;
  border: 1px solid #91a6b8;
  box-shadow: none;
}
.homework-inline-input::placeholder {
  color: #8695a6;
  opacity: 0.7;
}
.homework-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-wrap: nowrap;
  width: max-content;
  max-width: calc(100vw - 48px);
  padding: 3px;
  cursor: default;
  line-height: 1.2;
  background: rgba(250, 252, 255, 0.97);
  border: 1px solid #dbe3ec;
  border-radius: 0;
  box-shadow: none;
}
.homework-inline-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  border-radius: 2px;
  font-size: 11px;
  padding: 3px 7px;
  line-height: 1.2;
  background: transparent;
  border: 1px solid transparent;
  color: #657b9a;
  box-shadow: none;
  white-space: nowrap;
}
.homework-inline-actions button:hover {
  background: #edf2f8;
  color: #284b78;
}
.homework-inline-actions .homework-inline-done {
  background: #e9efff;
  border-color: #d6e1fd;
  color: #2853cf;
  font-weight: 600;
}
.homework-inline-actions .homework-inline-done:hover {
  background: #dce7ff;
}
.homework-inline-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.homework-inline-hint {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.homework-inline-actions {
  gap: 4px;
  padding: 4px;
  max-width: calc(100vw - 34px);
}
.homework-inline-actions button {
  min-height: 44px;
  min-width: 44px;
  padding: 5px 8px;
  font-size: 11px;
}
/* Inline text positioning is restricted to its handle, preserving native caret and IME gestures. */
.homework-inline-move svg,
.homework-ink-move svg {
  display: block;
  flex: none;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 0 0 1px #a7b9d3;
  pointer-events: none;
}
.homework-inline-move:hover svg,
.homework-ink-move:hover svg {
  background: #edf3ff;
}
.homework-inline-move:focus-visible,
.homework-ink-move:focus-visible {
  outline: 2px solid #2853cf;
  outline-offset: -6px;
}
.homework-label-resize svg { pointer-events: none; filter: drop-shadow(0 1px 3px #25305026); }
.homework-label-resize:hover svg rect { stroke: #8582d8; }
.homework-label-resize:focus-visible { outline: 2px solid #7773e8; outline-offset: -4px; border-radius: 8px; }
/* Wrap against the actual paper width, including small papers in wider viewports. */
.homework-inline-editor .homework-inline-actions {
  flex-wrap: wrap;
  box-sizing: border-box;
}
.homework-inline-actions > .homework-inline-cancel,
.homework-inline-actions > .homework-inline-done {
  flex-shrink: 0;
}

.annotation-toolbar {
  padding: 10px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.annotation-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px 12px;
}
.annotation-tools,
.annotation-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.annotation-tools {
  flex: 0 1 auto;
  min-width: 0;
}
.annotation-actions {
  margin-left: auto;
}
.annotation-options {
  flex: 0 0 32px;
  width: 32px;
  height: 30px;
}
.annotation-options > summary {
  display: flex;
  width: 32px;
  height: 30px;
  align-items: center;
  justify-content: center;
  list-style: none;
  cursor: pointer;
  border: 1px solid #dbe0ed;
  border-radius: 6px;
  background: #fff;
  color: #3b4360;
  font-size: 16px;
}
.annotation-options > summary::-webkit-details-marker { display: none; }
.annotation-options > summary:hover { background: #f0f1ff; border-color: #aaaef1; }
.annotation-options > summary:focus-visible { outline: 2px solid #7773e8; outline-offset: 2px; }
.annotation-options[data-available="false"] > summary { visibility: hidden; }
.annotation-options-panel {
  position: fixed;
  z-index: 60;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: min(250px, calc(100vw - 16px));
  padding: 12px;
  border: 1px solid #dbe0ed;
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 24px #25305024;
}
.annotation-toolbar button {
  margin: 0;
  padding: 5px 8px;
  font-size: 12px;
}
.annotation-toolbar button.active {
  color: #5653df;
  background: #e9eaff;
  border-color: #c6caf5;
}
.annotation-options[hidden],
.annotation-options [hidden] { display: none !important; }
.annotation-options label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  gap: 6px;
  font-size: 12px;
  color: #808ba3;
}
.annotation-options input.annotation-font,
.annotation-options input.annotation-label-size,
.annotation-options input.annotation-mark-size {
  width: 60px;
  padding: 4px;
}
.annotation-options input.annotation-color {
  width: 32px;
  height: 28px;
  padding: 2px;
}
.annotation-surface {
  position: relative;
  max-width: 100%;
}
.rotation-preview { display: block; width: 100%; height: auto; }
.annotation-surface .homework-ink-layer {
  max-width: none;
}
.homework-ink-resize:focus-visible { outline: 2px solid #4338ca; outline-offset: -5px; }
.annotation-surface[data-original="true"] > :not(img) {
  display: none !important;
}
.annotation-toolbar[hidden] {
  display: none;
}
.annotation-linked {
  box-shadow: inset 3px 0 #7773e8;
}
.issue-heading .issue-link {
  margin-left: auto;
  font-size: 11px;
}
#detail .homework-inline-input {
  min-height: 0;
  margin: 0;
  border-radius: 0;
  background: transparent;
  resize: none;
}
@media (max-width: 600px) {
  .annotation-tools button,
  .annotation-actions button {
    min-height: 36px;
  }
  .issue-heading {
    flex-wrap: wrap;
  }
}

.annotation-compatibility {
  padding: 12px;
  background: #fff4df;
  border-radius: 6px;
  color: #956627;
  font-size: 12px;
}
.orientation-hint { display: block; color: #77849e; padding: 6px 12px; font-size: 13px; }
.orientation-hint[hidden] { display: none; }
.import-thumbnails { display: grid; grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)); gap: 12px; margin-top: 18px; }
.import-thumbnail { display: flex; flex-direction: column; align-items: stretch; padding: 8px; margin: 0; min-width: 0; gap: 6px; text-align: left; }
.import-thumbnail img { width: 100%; height: 110px; object-fit: contain; background: #f5f6fb; }
.import-thumbnail small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-thumbnail .import-image-status { font-size: 11px; }
.import-image { padding: 12px; margin-bottom: 16px; border-radius: 10px; background: #f1f3f8; }
.import-image > img { width: 100%; display: block; object-fit: contain; }
.import-image > small, .import-image-status { display: block; margin: 8px 0; color: #687892; font-size: 13px; overflow-wrap: anywhere; }
.import-image .import-rotate { margin: 4px 8px 0 0; }
.import-progress { color: #5851dd; overflow-wrap: anywhere; }
.import-group { width: 100%; text-align: left; }
.detail-load-error, .image-load-error { color: #b83232; padding: 16px; background: #fff3f3; border-radius: 8px; }
.detail-loading { padding: 24px; color: #687892; }
#detail[hidden], #incomingPreview[hidden] { display: none !important; }
#incomingPreview { padding: 24px; min-width: 0; overflow-y: auto; }
.incoming-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 16px; margin-top: 20px; }
.incoming-images figure { margin: 0; padding: 12px; border: 1px solid #e0e5f0; border-radius: 10px; background: white; }
.incoming-images img { display: block; width: 100%; max-height: 70vh; object-fit: contain; }
.incoming-images figcaption { margin-top: 8px; font-size: 13px; color: #687892; overflow-wrap: anywhere; }
.incoming-share-error { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.incoming-share-error span { flex: 1 1 300px; }
.incoming-share-error button { flex: none; margin: 0; }


.preparation-info { color: #687892; line-height: 1.8; }
.preparation-info h2 { color: #20243a; }
.task-layout > .queue { display: flex; flex-direction: column; }
.queue-status-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 0 10px 10px; flex-shrink: 0; }
.queue-status-filters button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; min-width: 0; min-height: 52px; margin: 0; padding: 6px 4px; border: 0; border-radius: 5px; background: transparent; color: #404961; font-size: 13px; text-align: center; white-space: nowrap; }
.queue-status-filters button:hover { background: #f3f4fa; }
.queue-status-filters button[aria-pressed="true"] { color: #4d49c8; background: #edecff; }
.queue-status-filters button:focus-visible { outline: 2px solid #7773e8; outline-offset: -2px; }
.queue-status-filters span { color: inherit; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.result-heading { flex-wrap: wrap; }
.queue-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.queue-content > :not(.new-group-drop) { flex-shrink: 0; }
.new-group-drop {
  flex: 1 0 100px;
  min-height: 100px;
  margin: 12px 16px 0;
  border: 1px dashed transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b65db;
  font-size: 13px;
}
.new-group-drop > span { display: none; pointer-events: none; }
body.dragging-pages .new-group-drop { border-color: #c3c0f1; background: #faf9ff; }
body.dragging-pages .new-group-drop > span { display: inline; }
.new-group-drop.drop-target { border-color: #7773e8; background: #eeedff; box-shadow: inset 0 0 0 1px #7773e8; }
.image-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.image-actions > button, .image-actions > .image-more { margin: 0; }
.annotation-tools button:not([data-tool="select"]), .image-actions > button { min-width: 32px; font-size: 17px; line-height: 1; }
.group-draggable-image[draggable="true"] { cursor: grab; }
.image-viewer { width: 96vw; max-width: 96vw; height: 94dvh; max-height: 94dvh; padding: 0; border: 1px solid #dbe0ed; border-radius: 12px; background: #f1f3f8; box-shadow: 0 20px 80px #16203c55; }
.image-viewer[open] { display: flex; flex-direction: column; }
.image-viewer::backdrop { background: #18213b99; }
.image-viewer-heading { display: flex; align-items: center; flex-shrink: 0; gap: 6px; padding: 10px; background: white; border-bottom: 1px solid #e2e6f0; }
.image-viewer-heading strong { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.image-viewer-heading button { margin: 0; flex-shrink: 0; padding: 6px 9px; }
.image-viewer-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; flex: 0 0 auto; padding: 6px 10px; background: white; border-bottom: 1px solid #e2e6f0; }
.image-viewer-tools[hidden] { display: none; }
.image-viewer-tools [hidden] { display: none; }
.image-viewer-tools > span { color: #52627b; font-size: 13px; }
.image-viewer-tools .annotation-toolbar { padding: 0; }
.image-viewer-tools .annotation-top { margin: 0; }
.image-viewer-tools .image-actions { display: none; }
.image-viewer-viewport { flex: 1; min-height: 0; overflow: auto; padding: 16px; overscroll-behavior: contain; }
.image-viewer-paper { position: relative; margin: 0 auto; }
.image-viewer-viewport.can-pan .image-viewer-paper { cursor: grab; }
.image-viewer-viewport.is-panning, .image-viewer-viewport.is-panning * { cursor: grabbing !important; }
.image-viewer-paper > img { display: block; width: 100%; max-width: none; height: auto; user-select: none; }
.image-viewer[data-editing="true"] .image-viewer-paper > img { display: none; }
.image-viewer-paper > .annotation-preview-layout { width: 100%; max-width: 100% !important; }
.image-viewer-paper .annotation-surface > img { display: block; width: 100%; max-width: none; max-height: none; height: auto; user-select: none; }
.image-viewer-paper > #imageViewerMarks { position: absolute; inset: 0; height: 100%; pointer-events: none; }
.image-viewer-paper > img[hidden] { display: none; }
#notice:not(:empty) {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  max-width: min(480px, calc(100vw - 40px));
  padding: 10px 16px;
  border: 1px solid #dbe0ed;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px #25305024;
  overflow-wrap: anywhere;
}
#notice[data-kind="error"] { border-color: #f1caca; background: #fff3f3; }

.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.result-heading h2 { margin: 0; }
#makeReport { margin: 0; }
.report-dialog { width: min(95vw, 1000px); max-width: 95vw; height: 94dvh; max-height: 94dvh; padding: 0; border: 1px solid #dbe0ed; border-radius: 12px; background: #f1f3f8; }
.report-dialog[open] { display: flex; flex-direction: column; }
.report-dialog::backdrop { background: #18213b99; }
.report-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; background: white; }
.report-toolbar strong { flex: 1; min-width: 150px; }
.report-hint { margin: 0; padding: 8px 14px; color: #687994; background: white; font-size: 13px; }
.report-pages { overflow: auto; padding: 16px; text-align: center; }
.report-pages img { display: block; width: min(100%, 760px); height: auto; margin: 0 auto 16px; box-shadow: 0 2px 12px #16203c25; background: white; }

.draft-status { color: #687892; font-size: 12px; }
.draft-status[data-kind="error"] { color: #b83232; }
.issue-answer-preview .pending-answer { color: #765500; background: #fff5d7; }
.issue-reason { white-space: pre-wrap; }
.work-share { position: sticky; top: -16px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: -16px -16px 12px; padding: 8px 16px; background: #fff; border-bottom: 1px solid #e2e6f0; border-radius: 8px 8px 0 0; }
.work-share-heading, .work-share-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.work-share-heading { flex: 1 1 120px; min-width: 0; }
.work-share-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-share-actions { justify-content: flex-end; }
.work-share button { margin: 0; min-height: 30px; padding: 4px 9px; font-size: 13px; }
.work-share button[hidden] { display: none; }
.share-long-dialog { width: min(860px, 96vw); max-width: 96vw; max-height: 94dvh; padding: 0; border: 1px solid #dbe0ed; border-radius: 10px; }
.share-long-dialog::backdrop { background: #18213b99; }
.share-long-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; position: sticky; top: 0; background: #fff; z-index: 1; }
.share-long-heading strong { flex: 1; min-width: 160px; overflow-wrap: anywhere; }
#shareLongHint { padding: 0 12px; }
#shareLongPages { padding: 12px; background: #f5f6fa; }
#shareLongPages figure { margin: 0 0 16px; }
#shareLongPages img { display: block; max-width: 100%; height: auto; margin: 0 auto; background: #fff; }
#shareLongPages figcaption { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
.account-capability { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; padding:16px 0; border-bottom:1px solid #dce3ed; }
.account-capability>div { min-width:0; flex:1 1 240px; overflow-wrap:anywhere; }
.account-capability p { margin:8px 0; }
.account-capability button { min-height:44px; }

.account-capability .muted{color:#596981}

.annotation-tools [data-tool="select"] { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 30px; padding: 5px; }
.annotation-tools [data-tool="select"] svg { width: 18px; height: 18px; display: block; }
.image-actions > .image-more-button { font-size: 20px; }


/* 批改工作台视觉：沿用现有布局和交互，仅调整层次、颜色与间距。 */
body.review-workspace { color: #25334a; background: #f5f7fb; }
body.review-workspace header { border-color: #e3e9f2; box-shadow: 0 1px 4px #2234590a; }
body.review-workspace header strong { color: #17243c; letter-spacing: .01em; }
body.review-workspace header button { border-radius: 8px; }
body.review-workspace .primary,
body.review-workspace #makeReport { background: #4f46e5; border-color: #4f46e5; box-shadow: 0 2px 5px #4f46e526; }
body.review-workspace .primary:hover,
body.review-workspace #makeReport:hover { background: #4338ca; border-color: #4338ca; }
body.review-workspace .queue { background: #fff; border-color: #e4eaf3; padding-top: 18px; }
body.review-workspace .queue-status-filters { gap: 6px; padding: 0 12px 12px; }
body.review-workspace .queue-status-filters button { border: 1px solid #e3e9f2; border-radius: 8px; background: #fff; color: #52637a; }
body.review-workspace .queue-status-filters button:hover { border-color: #c9d2fb; background: #f8f9ff; }
body.review-workspace .queue-status-filters button[aria-pressed="true"] { color: #4338ca; background: #eef2ff; border-color: #c7d2fe; }
body.review-workspace .queue-status-filters span { color: #34445c; font-size: 16px; }
body.review-workspace .queue-status-filters button[aria-pressed="true"] span { color: #4338ca; }
body.review-workspace .queue-search input { border-color: #e4eaf2; background: #f6f8fb; border-radius: 8px; }
body.review-workspace .job-row { margin: 4px 10px 8px; padding: 4px 6px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
body.review-workspace .job-row.selected,
body.review-workspace .job-row:has(.job:focus) { border-color: #b9c1fb; background: #f5f6ff; }
body.review-workspace .job-row.drop-target { border-color: #655eed; background: #eeefff; }
body.review-workspace .job { color: #27364d; border-radius: 7px; }
body.review-workspace .job:hover { background: #f2f4ff; }
body.review-workspace .job-status { border-radius: 999px; padding: 2px 8px; }
body.review-workspace .queue-add button { border: 1px dashed #bdc9db; border-radius: 8px; color: #465b76; font-weight: 600; }
body.review-workspace #detail { background: #f5f7fb; }
body.review-workspace .image-panel,
body.review-workspace .review-panel { border-color: #e1e8f1; border-radius: 10px; box-shadow: 0 2px 8px #253b5b0a; }
body.review-workspace .work-share { border-color: #e5ebf3; border-radius: 10px 10px 0 0; }
body.review-workspace .work-share-title { color: #25344b; }
body.review-workspace .work-share button { border-radius: 7px; }
body.review-workspace .images > .image-page { border: 1px solid #e9edf4; border-radius: 9px; background-color: #f5f7fa; }
body.review-workspace .annotation-tools { padding: 3px; border: 1px solid #e3eaf2; border-radius: 9px; background: #fff; }
body.review-workspace .annotation-toolbar button { border-radius: 7px; }
body.review-workspace .annotation-tools button { border-color: transparent; }
body.review-workspace .annotation-tools button.active { color: #4338ca; background: #eef2ff; border-color: #dbe1ff; }
body.review-workspace .annotation-options > summary { border-radius: 7px; }
body.review-workspace .review-panel h2 { color: #1e2c43; }
body.review-workspace .issue-compact { margin: 0 0 10px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
body.review-workspace .issue-compact:hover { border-color: #c5cdf7; }
body.review-workspace .issue-compact.annotation-focused { border-color: #a9b3f4; background: #f5f5ff; box-shadow: inset 3px 0 #7773e8; }
body.review-workspace .issue-heading strong { color: #27364c; }
body.review-workspace .issue-answer-preview { padding: 6px 8px; border: 1px solid #edf1f6; border-radius: 7px; background: #f8fafc; }
body.review-workspace .student-answer { color: #a4384b; background: #fff0f2; border-radius: 5px; }
body.review-workspace .correct-answer { color: #176c50; background: #e9f8f0; border-radius: 5px; }
body.review-workspace .issue-reason { color: #52627a; }
body.review-workspace .issue-insert { margin: -7px 0; }
body.review-workspace #feedback { border-color: #dce5f0; border-radius: 8px; }


/* 参考界面的分区与工具条细节；保留现有多图片和按钮行为。 */
body.review-workspace .queue-status-filters { gap: 8px; padding: 0 14px 16px; }
body.review-workspace .queue-status-filters button { min-height: 64px; border-radius: 10px; }
body.review-workspace .queue-status-filters button[data-review-filter="pending"] span { color: #b96500; }
body.review-workspace .queue-status-filters button[data-review-filter="progress"] span { color: #4f46e5; }
body.review-workspace .queue-status-filters button[data-review-filter="complete"] span { color: #087c58; }
body.review-workspace .queue-search input { background: #f1f5f9; border-color: #f1f5f9; }
body.review-workspace .job-row { min-height: 82px; margin: 5px 12px 10px; padding: 8px 7px; border-radius: 12px; }
body.review-workspace .job-row.selected { border-color: #bfc7ff; background: #f7f8ff; }
body.review-workspace .job-status--processing { color: #8b5200; background: #fff0c2; }
body.review-workspace .job-status--review { color: #8b5200; background: #fff0c2; }
body.review-workspace .job-status--reviewed { color: #087358; background: #d9f8ea; }
body.review-workspace .group-rename { color: #52637a; }
body.review-workspace .group-rename:hover:not(:disabled) { color: #4338ca; background: #eeefff; }
body.review-workspace .group-rename:focus-visible { outline: 2px solid #7773e8; outline-offset: -2px; }
body.review-workspace #detail { padding: 12px; }
body.review-workspace .image-panel,
body.review-workspace .review-panel { border-color: #e2e8f0; border-radius: 8px; box-shadow: none; }
body.review-workspace .work-share { min-height: 52px; padding-top: 10px; padding-bottom: 10px; }
body.review-workspace .images > .image-page {
  background-color: #f8fafc;
  background-image: radial-gradient(#e1e9f3 .8px, transparent .8px);
  background-size: 16px 16px;
  border-color: #edf1f6;
}
body.review-workspace .image-page > label { color: #33445e; }
body.review-workspace .annotation-toolbar { padding: 9px 0 13px; }
body.review-workspace .annotation-top {
  width: max-content; max-width: 100%; margin: 0 auto;
  align-items: center; justify-content: center; gap: 4px;
  padding: 4px 8px; border: 1px solid #e2e8f0; border-radius: 999px;
  background: #fff; box-shadow: 0 4px 12px #2335521c;
}
body.review-workspace .annotation-tools { padding: 0; border: 0; background: transparent; gap: 3px; }
body.review-workspace .annotation-actions { margin-left: 0; gap: 3px; }
body.review-workspace .annotation-toolbar button { min-height: 30px; border-radius: 999px; }
body.review-workspace .annotation-actions button,
body.review-workspace .image-actions > button { background: transparent; border-color: transparent; }
body.review-workspace .annotation-tools [data-tool="check"] { color: #087c58; }
body.review-workspace .annotation-tools [data-tool="cross"] { color: #d72748; }
body.review-workspace .annotation-tools [data-tool="ellipse"] { color: #b76b0b; }
body.review-workspace .annotation-tools button.active { color: #4338ca; }
body.review-workspace .annotation-options { flex-basis: 32px; }
body.review-workspace .image-page .annotation-surface img { filter: drop-shadow(0 5px 12px #26354824); }
body.review-workspace .result-heading { padding: 3px 0 16px; border-bottom: 1px solid #e2e8f0; }
body.review-workspace .review-panel h2 { font-size: 16px; }
body.review-workspace .issue-compact { padding: 14px; border-radius: 12px; margin-bottom: 12px; }
body.review-workspace .issue-heading { gap: 8px; }
body.review-workspace .issue-heading strong { display: inline-flex; align-items: baseline; gap: 7px; }
body.review-workspace .issue-heading strong::before { content: ''; flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: #f43f5e; }
body.review-workspace .issue-answer-preview { padding: 8px; border-radius: 8px; background: #f8fafc; }
body.review-workspace .student-answer:not(.pending-answer) { text-decoration: line-through; text-decoration-thickness: 1px; }
body.review-workspace .correct-answer:not(.pending-answer) { color: #087358; font-weight: 600; }
body.review-workspace .issue-reason { font-size: 13px; line-height: 1.65; }
@media (max-width: 800px) {
  body.review-workspace #detail { padding: 12px 8px; }
  body.review-workspace .annotation-top { border-radius: 14px; }
}


/* 状态标签与结果操作的视觉层级。 */
body.review-workspace .job-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; font-weight: 600; }
body.review-workspace .job-status::before { content: ''; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #e89516; }
body.review-workspace .job-status--reviewed::before { background: #13a879; }
body.review-workspace .review-panel:not(.is-processing) { display: flex; flex-direction: column; }
body.review-workspace .review-panel > #addIssue { align-self: flex-start; }
body.review-workspace .review-footer {
  position: sticky; bottom: -16px; z-index: 3; flex: none; margin: auto -16px -16px;
  padding: 12px 16px; display: flex; justify-content: flex-end;
  background: #fff; border-top: 1px solid #e2e8f0;
}
body.review-workspace #completeReview {
  margin: 0; padding: 8px 14px; border: 1px solid #4f46e5; border-radius: 8px;
  background: #4f46e5; color: #fff; font-weight: 600; box-shadow: 0 2px 5px #4f46e526;
}
body.review-workspace #completeReview:hover { background: #4338ca; border-color: #4338ca; }
body.review-workspace #makeReport { padding: 6px 8px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #4f46e5; box-shadow: none; font-weight: 600; }
body.review-workspace #makeReport:hover { background: #eef2ff; border-color: transparent; }
body.review-workspace .work-share button:not(.primary),
body.review-workspace #addIssue, body.review-workspace header button:not(.primary) { border-radius: 8px; border-color: #e2e8f0; background: #f1f5f9; color: #334155; }
body.review-workspace .work-share button:not(.primary):hover,
body.review-workspace #addIssue:hover, body.review-workspace header button:not(.primary):hover { background: #e7ebf5; border-color: #cdd5e4; }

body.review-workspace .issue-edit-toggle,
body.review-workspace .issue-heading .issue-remove { color: #60738d; border-color: transparent; background: transparent; }
body.review-workspace .issue-edit-toggle:hover { color: #4f46e5; background: #eef2ff; }
body.review-workspace .issue-heading .issue-remove:hover { color: #b73249; background: #fff1f2; }


/* 本机字体与统一的批改工作台字号层级，无需等待在线字体加载。 */
body.review-workspace header strong { font-size: 18px; font-weight: 700; line-height: 1.35; }
body.review-workspace header button { font-size: 14px; font-weight: 500; line-height: 1.4; }
body.review-workspace .queue-status-filters button { font-size: 13px; font-weight: 500; line-height: 1.4; }
body.review-workspace .queue-status-filters span { font-size: 18px; font-weight: 700; line-height: 1.2; }
body.review-workspace .job { font-size: 14px; font-weight: 600; line-height: 1.45; }
body.review-workspace .job small, body.review-workspace .selection-count,
body.review-workspace .group-rename { font-size: 12px; line-height: 1.5; }
body.review-workspace .job-status { font-size: 12px; font-weight: 600; line-height: 1.4; }
body.review-workspace .queue-search input, body.review-workspace .queue-add button { font-size: 13px; line-height: 1.45; }
body.review-workspace .work-share-title, body.review-workspace .image-page > label { font-size: 14px; font-weight: 600; line-height: 1.5; }
body.review-workspace .work-share button { font-size: 13px; font-weight: 600; line-height: 1.4; }
body.review-workspace .review-panel h2 { font-size: 16px; font-weight: 700; line-height: 1.4; }
body.review-workspace .issue-heading strong { font-size: 14px; font-weight: 600; line-height: 1.45; }
body.review-workspace .issue-answer-preview { font-size: 14px; line-height: 1.5; }
body.review-workspace .issue-reason { font-size: 14px; line-height: 1.6; }
body.review-workspace .issue-edit-toggle, body.review-workspace .issue-heading .issue-remove { font-size: 13px; font-weight: 500; line-height: 1.4; }
body.review-workspace #addIssue, body.review-workspace #makeReport,
body.review-workspace #completeReview { font-size: 13px; font-weight: 600; line-height: 1.4; }
body.review-workspace #feedback, body.review-workspace .issue-edit-fields input,
body.review-workspace .issue-edit-fields textarea { font-size: 14px; line-height: 1.5; }

.annotation-label-actions[hidden] { display: none !important; }
.annotation-label-actions p { margin: 0 0 6px; color: #52627a; font-size: 12px; line-height: 1.5; }
.annotation-label-actions button { display: block; width: 100%; margin: 4px 0 0; text-align: left; }


/* 结果标题和数量采用统一的本机字体与参考样式。 */
body.review-workspace .result-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
body.review-workspace .result-heading .result-summary h2 { margin: 0; color: #1e293b; font-size: 14px; line-height: 1.4; font-weight: 700; }
body.review-workspace .issue-count { flex: 0 0 auto; padding: 3px 9px; border-radius: 999px; background: #ffe4e6; color: #be123c; font-size: 11px; line-height: 1.4; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }


/* 桌面工作区减少模块间留白；分隔线仍保留扩大后的拖动热区。 */
@media (min-width: 801px) {
  body.review-workspace .task-layout { grid-template-columns: var(--queue-width, 235px) 4px minmax(0, 1fr); }
  body.review-workspace #detail { padding: 0; }
  body.review-workspace .queue-splitter { z-index: 6; }
  body.review-workspace .queue-splitter::after { left: 1px; }
  body.review-workspace .queue-splitter::before {
    content: ''; position: absolute; inset: 0 -6px; cursor: col-resize;
  }
}
@media (min-width: 1101px) {
  body.review-workspace .review-layout.split-review { grid-template-columns: minmax(0, var(--review-left, 1.2fr)) 4px minmax(0, var(--review-right, .8fr)); }
  body.review-workspace .review-splitter { z-index: 6; }
  body.review-workspace .review-splitter::after { left: 1px; }
  body.review-workspace .review-splitter::before {
    content: ''; position: absolute; inset: 0 -6px; cursor: col-resize;
  }
}


/* 图片标题与对应工具栏共行；空间不足时自然换行。 */
body.review-workspace .images > .image-page { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
body.review-workspace .image-page > label { flex: 1 1 0; min-width: min(100%, 150px); max-width: 100%; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.review-workspace .image-page > .annotation-toolbar { flex: 0 0 auto; width: max-content; max-width: 100%; min-width: 0; padding: 0; margin-left: auto; }
body.review-workspace .image-page > .annotation-toolbar .annotation-top { margin: 0; }
body.review-workspace .image-page > .annotation-surface,
body.review-workspace .image-page > .annotation-preview-layout,
body.review-workspace .image-page > .rotation-preview,
body.review-workspace .image-page > img,
body.review-workspace .image-page > .orientation-hint { flex: 0 0 100%; min-width: 0; }
.annotation-preview-layout { position: relative; width: 100%; margin-inline: auto; }
.annotation-preview-layout > .annotation-surface { position: relative; margin: 0; }
.annotation-side-preview { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.annotation-side-preview[hidden], .annotation-preview-layout:has(.annotation-surface[data-original="true"]) > .annotation-side-preview,
.annotation-preview-layout:has(.rotation-preview) > .annotation-side-preview { display: none; }
.annotation-preview-layout:has(.annotation-surface[data-original="true"]), .annotation-preview-layout:has(.rotation-preview) { aspect-ratio: auto !important; max-width: 100% !important; }
.annotation-preview-layout:has(.annotation-surface[data-original="true"]) > .annotation-surface { width: 100% !important; }
#mobileQueueToggle { display: none; }
@media (max-width: 800px) {
  body.review-workspace header { gap: 6px; padding: 8px 12px; }
  body.review-workspace header strong { width: 100%; font-size: 16px; }
  body.review-workspace header button { min-height: 40px; padding: 6px 9px; font-size: 13px; }
  body.review-workspace #headerTaskActions { gap: 6px; }
  body.review-workspace .task-layout > .queue { max-height: none; overflow: visible; padding: 10px 0; }
  body.review-workspace .queue-content { overflow: visible; }
  body.review-workspace .queue-content > .selection-count { display: none; }
  body.review-workspace .queue-content > .new-group-drop { display: none; }
  body.review-workspace.dragging-pages .queue-content > .new-group-drop { display: flex; flex: 0 0 72px; min-height: 72px; }
  body.review-workspace .queue-status-filters { padding: 0 10px 8px; }
  body.review-workspace .queue-status-filters button { min-height: 48px; padding: 4px; }
  body.review-workspace .queue-status-filters span { font-size: 16px; }
  #mobileQueueToggle {
    display: block;
    width: calc(100% - 20px);
    min-height: 44px;
    margin: 0 10px;
    padding: 8px 12px;
    text-align: left;
  }
  #mobileQueueToggle::after { content: '展开'; float: right; }
  #mobileQueueToggle[aria-expanded="true"]::after { content: '收起'; }
  #mobileQueueToggle[aria-expanded="false"] + .queue-content { display: none; }
  body.review-workspace .job-row { min-height: 60px; margin: 4px 10px; padding: 4px 6px; }
  body.review-workspace .queue-add { display: flex; gap: 8px; padding: 8px 10px; }
  body.review-workspace .queue-add button { min-width: 0; min-height: 44px; margin: 0 !important; }
  body.review-workspace .image-page .page-image-name { display: none; }
}


/* 批注属性面板与选中手柄。 */
.annotation-options-panel {
  width: min(286px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); overflow-y: auto;
  gap: 0; padding: 14px; border: 1px solid #dce3f1; border-radius: 10px;
  background: #f9faff; box-shadow: 0 8px 24px #25355a24; color: #27364d;
}
.annotation-inspector-heading { display: block; padding: 0 0 10px; font-size: 15px; line-height: 1.4; color: #202b4c; }
.annotation-color-option, .annotation-label-width-option, .annotation-label-size-option,
.annotation-label-actions, .annotation-options-panel > .annotation-size-option,
.annotation-options-panel > .annotation-font-option { padding: 10px 0; border-top: 1px solid #e4e9f2; }
.annotation-options-panel .annotation-option-title,
.annotation-options-panel .annotation-label-width-option > label,
.annotation-options-panel .annotation-label-size-option > label { display: block; margin: 0 0 8px; color: #33445f; font-size: 13px; font-weight: 600; }
.annotation-options-panel .annotation-palette { display: grid; grid-template-columns: repeat(5, 28px); gap: 8px; }
body.review-workspace .annotation-options-panel .annotation-palette button,
.annotation-options-panel .annotation-palette button {
  width: 28px; height: 28px; min-height: 28px; padding: 0; margin: 0;
  border: 2px solid #fff; border-radius: 6px; box-shadow: 0 0 0 1px #d3dbea;
}
.annotation-options-panel .annotation-palette button[aria-pressed="true"] { box-shadow: 0 0 0 2px #4f46e5; }
.annotation-options-panel .annotation-palette button:focus-visible,
.annotation-options-panel button:focus-visible { outline: 2px solid #4338ca; outline-offset: 3px; }
.annotation-options-panel .annotation-custom-color { margin-top: 9px; color: #5f6f85; font-size: 12px; }
.annotation-options-panel .annotation-custom-color .annotation-color { width: 42px; height: 28px; padding: 2px; border-radius: 5px; }
.annotation-options-panel .annotation-control-row { display: flex; align-items: center; gap: 8px; }
.annotation-options-panel .annotation-control-row .annotation-label-width-range {
  flex: 1 1 auto; min-width: 0; width: auto; padding: 0; border: 0; background: transparent; accent-color: #4f46e5;
}
.annotation-options-panel .annotation-control-row .annotation-label-width,
.annotation-options-panel .annotation-control-row .annotation-label-size { flex: 0 0 62px; width: 62px; padding: 5px; font-size: 13px; }
body.review-workspace .annotation-options-panel .annotation-control-row button { flex: 1 1 0; border-radius: 6px; color: #34415d; background: #fff; border-color: #dbe2ef; font-size: 13px; font-weight: 600; }
.annotation-options-panel .annotation-label-actions p { margin: 0 0 7px; color: #5d6c84; font-size: 12px; }
body.review-workspace .annotation-options-panel .annotation-label-actions button { border-radius: 6px; background: #fff; border-color: #dbe2ef; }
.homework-label-grip { display: block; width: 11px; height: 11px; box-sizing: border-box; background: #fff; border: 1.5px solid #4f46e5; }
