:root {
  --brand: #0eae7b;
  --brand-strong: #087d5d;
  --brand-soft: #e7f8f1;
  --ink: #172f2a;
  --muted: #667974;
  --line: #dde7e4;
  --canvas: #eef2f4;
  --paper: #ffffff;
  --blue: #3477c8;
  --blue-soft: #eaf3ff;
  --amber: #e89428;
  --amber-soft: #fff5e5;
  --red: #d95c55;
  --red-soft: #fff0ef;
  --shadow: 0 12px 28px rgba(36, 65, 58, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

html,
body {
  height: 100%;
}

body {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  background: #f5f8f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

input,
select {
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
}

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

body.is-focused-workspace .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body.is-focused-workspace .task-rail,
body.is-focused-workspace .wrongbook-fab {
  display: none;
}

.task-rail {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
  padding: 16px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  margin-bottom: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  padding: 0;
  border-radius: var(--radius);
  color: #fff;
  background: transparent;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(14, 174, 123, 0.18);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 42px;
  max-height: 42px;
  border-radius: inherit;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.upload-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 20px rgba(36, 65, 58, 0.06);
}

.upload-card {
  padding: 12px;
}

.upload-card input {
  display: none;
}

.upload-card p {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

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

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

.material-entry-heading div { display: grid; gap: 2px; min-width: 0; }
.material-entry-heading small { color: var(--muted); }
.material-entry-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #0eae7b;
  border-radius: 7px;
  font-size: 18px;
}

.vip-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 16px;
  padding: 0 5px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f5b83b, #e98a1d);
  box-shadow: 0 2px 6px rgba(184, 109, 14, .2);
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .2px;
  vertical-align: middle;
}

.material-entry-heading strong { display: flex; align-items: center; gap: 6px; }

.vip-badge.is-corner {
  position: absolute;
  z-index: 2;
  top: 3px;
  right: 3px;
  min-width: 22px;
  height: 13px;
  padding: 0 3px;
  font-size: 7px;
}

.task-bulk-toolbar {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0 7px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.task-bulk-toolbar #task-selected-count { margin-left: auto; color: var(--muted); font-size: 12px; }
.danger-text { color: #dc5149 !important; }
.bulk-check-control {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  cursor: pointer;
}

.bulk-check-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.bulk-check-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: transparent;
  background: #fff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.bulk-check-control:hover .bulk-check-icon,
.bulk-check-control input:focus-visible + .bulk-check-icon {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.bulk-check-control input:checked + .bulk-check-icon {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
}

.bulk-check-control input:indeterminate + .bulk-check-icon {
  border-color: var(--brand);
  color: transparent;
  background: linear-gradient(#fff, #fff) center / 12px 2px no-repeat, var(--brand);
}

.bulk-check-control input:disabled + .bulk-check-icon {
  opacity: .45;
  cursor: not-allowed;
}

.bulk-icon-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.bulk-icon-button:hover:not(:disabled) { border-color: #edaaa5; background: #fff1ef; }
.bulk-icon-button:disabled { opacity: .42; cursor: not-allowed; }
.bulk-icon-button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.task-title { align-items: center; }
.task-select { flex: 0 0 20px; display: grid; place-items: center; cursor: pointer; }
.task-select input {
  width: 17px;
  height: 17px;
  margin: 0;
  cursor: pointer;
  accent-color: #0eae7b;
}
.task-select span { display: none; }
.task-card.is-selected { box-shadow: inset 0 0 0 1px #0eae7b; background: #effbf7; }
.task-delete-button {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #dc5149;
  font-size: 18px;
  cursor: pointer;
  border-radius: 4px;
}
.task-delete-button:hover { background: #fff0ee; }

.task-rename-button {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  padding: 4px;
  border: 0;
  border-radius: 5px;
  color: #64736f;
  background: transparent;
}

.task-rename-button:hover { color: var(--brand-strong); background: var(--brand-soft); }
.task-rename-button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.material-library-dialog {
  width: min(1180px, calc(100vw - 56px));
  height: min(760px, calc(100vh - 56px));
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(21, 47, 42, .24);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.material-library-dialog > header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.material-library-dialog header h2 { margin: 2px 0 4px; }
.material-library-dialog header p { margin: 0; color: var(--muted); }
.material-library-body { min-height: 0; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.material-folder-pane { padding: 16px; border-right: 1px solid var(--line); background: #f7faf9; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.material-folder-item,
.material-folder-open {
  width: 100%;
  min-height: 38px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 8px 10px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--ink);
}
.material-folder-item.is-active,
.material-folder-row.is-active > .material-folder-open { background: #dcf5ed; color: #087b59; font-weight: 700; }
.material-folder-item.is-drop-target,
.material-folder-row.is-drop-target > .material-folder-open {
  background: #eeeaff;
  color: #5c46c7;
  box-shadow: inset 0 0 0 2px #7a64df;
}
.material-selection-toolbar { display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 6px 8px; border: 1px solid #dce9e5; border-radius: 7px; background: #f8fbfa; }
.material-selection-toolbar > span { margin-left: auto; color: var(--muted); font-size: 12px; }
.material-folder-selection-toolbar { margin-top: 8px; flex: 0 0 auto; }
.material-folder-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 0; margin: 5px 0 10px; padding-right: 2px; scrollbar-gutter: stable; }
.material-folder-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 28px 28px; align-items: center; min-width: 0; padding: 3px 0; border-bottom: 1px dashed #c9d8d3; border-radius: 7px; }
.material-folder-row:last-child { border-bottom-color: transparent; }
.material-folder-open { min-width: 0; overflow: hidden; }
.material-folder-icon { flex: 0 0 auto; }
.material-folder-name { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.material-folder-row.is-selected { background: #eefaf6; }
.material-folder-delete,
.material-folder-rename { border: 0; background: transparent; cursor: pointer; font-size: 16px; }
.material-folder-delete { color: #c85049; }
.material-folder-rename { color: #5f6f6a; }
.material-folder-create { flex: 0 0 auto; display: grid; gap: 7px; padding-top: 12px; border-top: 1px solid var(--line); }
.material-folder-create input { width: 100%; }
.material-storage-card {
  flex: 0 0 auto;
  margin-top: auto;
  padding: 14px 12px 12px;
  border: 1px solid #d5e7e1;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(25, 84, 68, .06);
}
.material-storage-heading,
.material-storage-heading > div,
.material-storage-amount { display: flex; align-items: center; }
.material-storage-heading { justify-content: space-between; gap: 6px; }
.material-storage-heading > div { gap: 6px; min-width: 0; }
.material-storage-heading strong { font-size: 14px; }
.material-storage-icon { width: 18px; height: 18px; display: inline-grid; place-items: center; color: #0d9f74; }
.material-storage-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.material-storage-badge { flex: 0 0 auto; padding: 3px 6px; border-radius: 999px; color: #087b59; background: #dcf5ed; font-size: 10px; font-weight: 700; }
.material-storage-amount { align-items: baseline; gap: 4px; margin-top: 12px; }
.material-storage-amount strong { font-size: 17px; color: #173e34; }
.material-storage-amount span { color: var(--muted); font-size: 11px; }
.material-storage-progress { height: 7px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: #e5efec; }
.material-storage-progress > span { display: block; width: 0; min-width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #16b888, #42cda4); transition: width .35s ease; }
.material-storage-progress.has-usage > span { min-width: 2px; }
.material-storage-progress.is-near-limit > span { background: linear-gradient(90deg, #f0a43b, #efc15e); }
.material-storage-progress.is-full > span { background: linear-gradient(90deg, #df5a50, #f07b70); }
.material-storage-card p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.material-file-pane { min-width: 0; min-height: 0; padding: 16px 18px 20px; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); gap: 12px; }
.material-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.material-toolbar > div:first-child { display: grid; gap: 3px; }
.material-toolbar span { color: var(--muted); font-size: 12px; }
.material-dropzone { border: 1px dashed #9fc8bc; background: #f7fcfa; min-height: 62px; display: grid; place-items: center; color: var(--muted); border-radius: 7px; }
.material-dropzone.is-dragover { border-color: #0eae7b; background: #e6f8f2; color: #087b59; }
.material-file-grid { min-height: 0; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); align-content: start; gap: 10px; padding-right: 4px; }
.material-file-card { position: relative; border: 1px solid var(--line); border-radius: 7px; padding: 10px 10px 10px 42px; display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 9px; background: #fff; cursor: grab; transition: opacity .15s ease, transform .15s ease, box-shadow .15s ease; }
.material-file-card:hover { box-shadow: 0 8px 22px rgba(36, 65, 58, .1); }
.material-file-card.is-selected { border-color: #13ad80; background: #effbf7; box-shadow: inset 0 0 0 1px #13ad80; }
.material-file-card.is-dragging { opacity: .45; transform: scale(.98); cursor: grabbing; }
.material-file-preview { width: 50px; height: 58px; display: grid; place-items: center; border-radius: 5px; background: #e8f5f1; color: #087b59; font-weight: 800; font-size: 12px; }
.material-file-preview.word { background: #e9f2ff; color: #286bc4; }
.material-file-preview.ppt { background: #fff0e7; color: #c45b22; }
.material-file-preview.pdf { background: #fff0ef; color: #c84840; }
.material-file-info { display: grid; align-content: center; gap: 4px; min-width: 0; }
.material-file-info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.material-file-info span { color: var(--muted); font-size: 12px; }
.material-move { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.material-move select { height: 32px; min-width: 0; }
.material-file-actions { grid-column: 1 / -1; display: flex; gap: 7px; align-items: center; }
.material-file-actions .danger-action { margin-left: auto; }
.material-item-check { width: 22px; height: 22px; display: inline-grid; place-items: center; cursor: pointer; }
.material-item-check input { position: absolute; opacity: 0; pointer-events: none; }
.material-item-check span { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid #c8d8d3; border-radius: 5px; color: transparent; background: #fff; font-size: 12px; font-weight: 900; transition: .15s ease; }
.material-item-check input:focus-visible + span { outline: 2px solid rgba(14,174,123,.28); outline-offset: 2px; }
.material-item-check input:checked + span { border-color: #0eae7b; color: #fff; background: #0eae7b; }
.material-file-check { position: absolute; left: 10px; top: 10px; }
.material-empty { grid-column: 1 / -1; min-height: 240px; border: 1px dashed #bfd2cd; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--muted); border-radius: 7px; }
.material-recycle-button { margin-top: 5px; color: #6750cf; }
.material-recycle-panel { grid-row: 2 / -1; min-height: 0; overflow: auto; }
.material-recycle-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.material-recycle-panel > header > div { display: grid; gap: 3px; }
.material-recycle-panel header span { color: var(--muted); font-size: 12px; }
.material-recycle-list { display: grid; gap: 8px; }
.material-recycle-selection-toolbar { margin-bottom: 10px; }
.material-recycle-item { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.material-recycle-item.is-selected { border-color: #13ad80; background: #effbf7; }
.material-recycle-item > div { display: flex; align-items: center; gap: 8px; }
.material-recycle-item > .material-recycle-info { display: grid; gap: 4px; }
.material-recycle-item span { color: var(--muted); font-size: 12px; }

@media (max-width: 900px) {
  .material-library-body { grid-template-columns: 180px minmax(0, 1fr); }
  .material-file-grid { grid-template-columns: 1fr; }
}

.merge-option {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: #3c574f;
  font-size: 12px;
  font-weight: 700;
}

.rail-section {
  min-height: 0;
  margin-top: 16px;
}

.task-rail > .rail-section {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.rail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #4a625c;
  font-weight: 700;
}

.task-list,
.report-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 328px);
  overflow: auto;
  padding-right: 2px;
}

.task-list {
  flex: 1 1 0;
  min-height: 0;
  max-height: none;
  grid-auto-rows: max-content;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.report-list {
  max-height: 280px;
}

.rail-recycle-entry {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  flex: 0 0 auto;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #f8fbfa;
  text-align: left;
  position: relative;
  z-index: 2;
}

.rail-recycle-entry:hover { border-color: #a9d9ca; background: var(--brand-soft); }
.rail-recycle-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: #087b59; background: #dcf5ed; font-size: 19px; }
.rail-recycle-entry > span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.rail-recycle-entry small { color: var(--muted); font-size: 11px; }
.rail-recycle-entry b { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; color: #fff; background: var(--brand); font-size: 11px; }
.rail-recycle-entry b[hidden] { display: none; }

@media (min-width: 901px) and (max-height: 760px) {
  .task-rail {
    padding-block: 10px;
  }

  .brand {
    min-height: 44px;
    margin-bottom: 8px;
  }

  .rail-recycle-entry {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 42px;
    margin-bottom: 8px;
    padding: 6px 9px;
  }

  .rail-recycle-icon {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }

  .rail-recycle-entry small {
    display: none;
  }
}

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

.task-card {
  min-width: 0;
  min-height: 118px;
  align-self: start;
  overflow: hidden;
  cursor: pointer;
}

.report-card {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}

.report-card:hover {
  border-color: #8fd7c1;
  background: #f7fcfa;
  transform: translateY(-1px);
}

.report-card:focus-visible {
  outline: 3px solid rgba(14, 174, 123, .2);
  outline-offset: 1px;
}

.report-card.is-active {
  border-color: var(--brand);
  background: #ecfaf5;
  box-shadow: inset 3px 0 0 var(--brand);
}

.recent-reports-panel { min-height: 0; }
.report-bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.report-bulk-toolbar #report-selected-count { margin-left: auto; color: var(--muted); font-size: 12px; }
.report-list-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 7px;
  border-radius: var(--radius);
}
.report-list-item.is-selected { background: #effbf7; box-shadow: 0 0 0 1px #b4e2d3; }
.report-list-item .report-card { grid-column: 2; }
.report-edit-button {
  display: grid;
  place-items: center;
  grid-column: 3;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #b9ddd2;
  border-radius: 8px;
  color: #087b59;
  background: #f2fbf8;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease, transform .15s ease;
}
.report-edit-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.report-edit-button:hover { border-color: var(--brand); color: #fff; background: var(--brand); transform: translateY(-1px); }
.report-edit-button:focus-visible { outline: 3px solid rgba(14, 174, 123, .2); outline-offset: 1px; }
.item-check-control { position: relative; display: grid; place-items: center; cursor: pointer; }
.item-check-control input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.item-check-control span { display: grid; place-items: center; width: 20px; height: 20px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 5px; color: transparent; background: #fff; font-size: 12px; font-weight: 900; }
.item-check-control input:checked + span { border-color: var(--brand); color: #fff; background: var(--brand); }
.item-check-control input:focus-visible + span { outline: 3px solid rgba(14, 174, 123, .2); }

.task-card.is-active {
  border-color: var(--brand);
  background: #f3fbf8;
  box-shadow: inset 3px 0 0 var(--brand);
}

.task-title {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 24px 26px 24px;
  align-items: start;
  gap: 6px;
  min-width: 0;
}

.task-title strong {
  display: -webkit-box;
  min-width: 0;
  max-height: 2.7em;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.task-title .task-select { grid-column: 1; grid-row: 1; margin-top: 2px; }
.task-title strong { grid-column: 2; grid-row: 1; }
.task-title .task-rename-button { grid-column: 3; grid-row: 1; }
.task-title .task-cloud-button { grid-column: 4; grid-row: 1; }
.task-title .task-delete-button { grid-column: 5; grid-row: 1; }
.task-title .status-pill { grid-column: 2 / -1; grid-row: 2; justify-self: start; }

.task-cloud-button {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  padding: 4px;
  border: 1px solid #cfc7f5;
  border-radius: 6px;
  color: #6750cf;
  background: #f3f0ff;
  cursor: pointer;
}

.task-cloud-button:hover { border-color: #7964da; background: #eae5ff; }
.task-cloud-button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.task-cloud-button.is-syncing { color: #826fe1; opacity: .75; cursor: wait; animation: cloud-sync-pulse 1s ease-in-out infinite alternate; }
.task-cloud-button.is-synced { color: #087b59; border-color: #9edbc8; background: #e7f8f1; }
.task-cloud-button.is-error { color: #c64e48; border-color: #efbbb7; background: #fff0ef; }

@keyframes cloud-sync-pulse {
  from { box-shadow: 0 0 0 0 rgba(103, 80, 207, .12); }
  to { box-shadow: 0 0 0 5px rgba(103, 80, 207, .04); }
}

.task-meta,
.report-card small {
  color: var(--muted);
  font-size: 12px;
}

.task-analysis-state {
  display: flex;
  width: fit-content;
  min-height: 25px;
  align-items: center;
  gap: 6px;
  margin: -2px 0 0 auto;
  padding: 4px 9px;
  border: 1px solid #d6dfdc;
  border-radius: 999px;
  color: #73827d;
  background: #f6f8f7;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.task-analysis-state i { width: 7px; height: 7px; border-radius: 50%; background: #a7b2ae; }
.task-analysis-state.is-analyzed { border-color: #79cfb2; color: #087557; background: #e8f8f2; cursor: pointer; }
.task-analysis-state.is-analyzed i { background: #13a979; box-shadow: 0 0 0 3px rgba(19,169,121,.12); }
.task-analysis-state.is-analyzed:hover { border-color: #16a779; background: #dff5ed; box-shadow: 0 0 0 2px rgba(22,167,121,.09); }

.mini-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaf0ee;
}

.mini-progress b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #42c69c);
  transition: width 0.25s ease;
}

.task-progress-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: #087b59;
  font-size: 11px;
  font-weight: 700;
}

.task-progress-line em {
  font-style: normal;
  color: var(--muted);
}

.scanner-workspace {
  display: grid;
  grid-template-rows: 40px 54px minmax(0, 1fr);
  min-width: 0;
  height: 100vh;
}

.workspace-tabbar {
  grid-row: 1;
  display: flex;
  align-items: end;
  gap: 4px;
  min-width: 0;
  padding: 6px 10px 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  border-bottom: 1px solid #cfdcd8;
  background: linear-gradient(180deg, #edf3f1, #e4ece9);
}

.workspace-tabbar::-webkit-scrollbar { display: none; }

.workspace-tab,
.workspace-tab-shell {
  height: 34px;
}

.workspace-tab-shell {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}

.workspace-tab-shell[hidden] { display: none; }

.workspace-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 154px;
  padding: 0 34px 0 13px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  color: #536a63;
  background: rgba(255, 255, 255, .42);
  font: 12px/1 "Microsoft YaHei UI", sans-serif;
  text-align: left;
}

.workspace-tabbar > .workspace-tab { padding-right: 14px; }
.workspace-tab:hover { color: #173e33; background: rgba(255, 255, 255, .72); }
.workspace-tab.is-active {
  color: #123f33;
  background: #fff;
  border-color: #cfdcd8;
  box-shadow: 0 -3px 12px rgba(38, 74, 64, .07);
}

.workspace-tab-dot { width: 8px; height: 8px; border-radius: 50%; background: #12b982; box-shadow: 0 0 0 3px rgba(18,185,130,.12); }
.workspace-tab-book { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; color: #fff; background: linear-gradient(145deg, #18bd87, #087d5d); font-size: 10px; font-weight: 900; }
.workspace-tab-book.is-course { background: linear-gradient(145deg, #4d91d8, #2861a8); }
.workspace-tab-book.is-experiment { background: linear-gradient(145deg, #8b70df, #6247b8); }
.workspace-tab-close {
  position: absolute;
  z-index: 2;
  top: 6px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #70827c;
  background: transparent;
  font-size: 15px;
}
.workspace-tab-close:hover { color: #a83f39; background: #f7e9e7; }

.top-toolbar {
  grid-row: 2;
  display: grid;
  grid-template-columns: max-content auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.toolbar-left,
.toolbar-right,
.page-switcher,
.zoom-control,
.button-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.button-row {
  flex-wrap: wrap;
}

.toolbar-right {
  min-width: 0;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.toolbar-left {
  min-width: 0;
  flex-wrap: nowrap;
}

.toolbar-left > *,
.toolbar-right > *,
.page-switcher > * {
  flex: 0 0 auto;
}

.mobile-transfer-button {
  position: relative;
  z-index: 3;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #b7dfd2;
  border-radius: var(--radius);
  color: var(--brand-strong);
  background: linear-gradient(180deg, #f5fffb, #e6f8f2);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.mobile-transfer-button:hover,
.mobile-transfer-button:focus-visible {
  border-color: var(--brand);
  background: #dcf7ee;
  box-shadow: 0 0 0 3px rgba(14, 174, 123, .12);
}

.mobile-transfer-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.course-entry-button {
  display:inline-flex;
  flex:0 0 auto;
  align-items:center;
  gap:6px;
  min-height:34px;
  padding:0 13px;
  border:1px solid #73cdb1;
  border-radius:var(--radius);
  color:#08795c;
  background:linear-gradient(180deg,#f2fff9,#ddf7ed);
  box-shadow:0 4px 12px rgba(14,174,123,.08);
  font-size:12px;
  font-weight:850;
  text-decoration:none;
  white-space:nowrap;
}
.course-entry-button:hover,.course-entry-button:focus-visible {
  color:#fff;
  border-color:#0eae7b;
  background:#0eae7b;
  box-shadow:0 0 0 3px rgba(14,174,123,.13);
}
.course-entry-button svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

.experiment-page-entry-button {
  position: relative;
  display: inline-flex;
  min-height: 34px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #73cdb1;
  border-radius: var(--radius);
  color: #08795c;
  background: linear-gradient(180deg, #f2fff9, #ddf7ed);
  box-shadow: 0 4px 12px rgba(14, 174, 123, .08);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}

.experiment-page-entry-button:hover,
.experiment-page-entry-button:focus-visible {
  color: #fff;
  border-color: #0eae7b;
  background: #0eae7b;
  box-shadow: 0 0 0 3px rgba(14, 174, 123, .13);
}

.experiment-page-entry-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.experiment-page-entry-button .vip-badge {
  margin-left: 0;
}

.account-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px 0 6px;
  border: 1px solid #b9ded2;
  border-radius: var(--radius);
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-weight: 800;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-size: 12px;
}

.account-avatar.large {
  width: 38px;
  height: 38px;
  font-size: 15px;
}

.account-card {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #cfe7df;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f4fcf8, #ffffff);
  box-shadow: 0 8px 20px rgba(36, 65, 58, 0.06);
}

.account-card-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-card-main strong,
.account-card-main small {
  display: block;
}

.account-card-main small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.page-switcher {
  justify-content: center;
  min-width: 86px;
  padding: 0 8px;
  color: #4d615c;
}

.workspace-grid {
  grid-row: 3;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 360px;
  min-height: 0;
}

.page-strip {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 16px 10px;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: #fbfcfd;
}

.page-strip.is-dragover {
  background: #effaf6;
  box-shadow: inset 0 0 0 2px rgba(14, 174, 123, 0.22);
}

.thumb {
  position: relative;
  width: 78px;
  min-height: 104px;
  padding: 4px;
  border: 1px solid #cfd9d6;
  border-radius: 4px;
  background: #fff;
  cursor: grab;
  user-select: none;
}

.thumb.is-dragging {
  opacity: 0.46;
  outline: 2px dashed var(--brand);
}

.thumb.is-drop-target {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(14, 174, 123, 0.16);
}

.thumb:active {
  cursor: grabbing;
}

.drag-grip {
  position: absolute;
  z-index: 2;
  top: 6px;
  left: 6px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  color: #5d756e;
  background: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  line-height: 1;
  pointer-events: none;
}

.thumb-preview {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
}

.thumb.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(14, 174, 123, 0.18);
}

.thumb img,
.thumb embed {
  display: block;
  width: 100%;
  height: 72px;
  border: 0;
  object-fit: cover;
  background: #eef2f4;
  transform-origin: center center;
}

.thumb small {
  display: block;
  margin-top: 5px;
  color: #213a35;
  text-align: center;
  font-size: 12px;
}

.thumb-loading {
  display: grid;
  place-items: center;
  gap: 8px;
  height: 72px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 800;
}

.thumb-progress {
  display: block;
  width: 54px;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(14, 174, 123, 0.16);
}

.thumb-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #41c99f);
}

.thumb-tools {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  grid-template-columns: repeat(2, 20px);
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.thumb:hover .thumb-tools,
.thumb.is-active .thumb-tools {
  opacity: 1;
}

.thumb-tools button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid rgba(8, 125, 93, 0.28);
  border-radius: 5px;
  color: var(--brand-strong);
  background: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  line-height: 1;
}

.thumb-tools button[data-page-delete] {
  color: var(--red);
  border-color: rgba(217, 92, 85, 0.3);
}

.add-page {
  display: grid;
  place-items: center;
  width: 78px;
  min-height: 104px;
  border: 1px dashed #b8c5c1;
  border-radius: 4px;
  color: #748783;
  background: #eef0f2;
  font-size: 28px;
}

.document-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--canvas);
}

.document-stage.is-dragover {
  outline: 3px solid rgba(14, 174, 123, 0.35);
  outline-offset: -8px;
}

.preview-shell {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: 86px 52px 54px;
}

.preview-shell[data-tool="pan"] {
  cursor: grab;
}

.preview-shell.is-panning {
  cursor: grabbing;
}

.import-processing-overlay {
  position: absolute;
  inset: 0;
  z-index: 29;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(231, 239, 236, .72);
  backdrop-filter: blur(5px);
}

.import-processing-overlay[hidden] { display: none; }

.import-processing-card {
  display: grid;
  grid-template-columns: 54px minmax(260px, 420px);
  gap: 14px 16px;
  width: min(510px, calc(100vw - 64px));
  padding: 20px;
  border: 1px solid #acd9cb;
  border-radius: 15px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 20px 55px rgba(25, 69, 57, .2);
}

.import-processing-spinner {
  grid-row: 1 / span 2;
  align-self: center;
  width: 48px;
  height: 48px;
  border: 5px solid #d9eee7;
  border-top-color: var(--brand);
  border-right-color: #48c8a0;
  border-radius: 50%;
  animation: import-processing-spin .9s linear infinite;
}

.import-processing-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.import-processing-copy small {
  color: #0b8f68;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
}

.import-processing-copy strong {
  overflow: hidden;
  color: #173c32;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-processing-copy span {
  color: var(--muted);
  font-size: 12px;
}

.import-processing-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
}

.import-processing-progress > span {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2eeea;
}

.import-processing-progress b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #079d70, #4bd1a7);
  transition: width .22s ease;
}

.import-processing-progress em {
  color: #087b59;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

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

.overlay-selection-controls {
  position: absolute;
  z-index: 24;
  top: 66px;
  left: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: min(720px, calc(100% - 36px));
  pointer-events: none;
}

.overlay-selection-controls > * { pointer-events: auto; }
.overlay-selection-controls > button,
.overlay-selection-actions {
  border: 1px solid #c8dbd4;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 28px rgba(26, 48, 43, .14);
}
.overlay-selection-controls > button.is-active { color: #fff; border-color: var(--brand); background: var(--brand); }
.overlay-selection-actions { display: flex; align-items: center; gap: 7px; min-height: 38px; padding: 4px 5px 4px 10px; border-radius: 9px; }
.overlay-selection-actions strong { color: #31574d; font-size: 12px; white-space: nowrap; }
.overlay-selection-actions button { min-height: 30px; }
.overlay-selection-tip { flex-basis: 100%; width: max-content; max-width: 620px; margin: 0; padding: 7px 10px; border: 1px solid #d8e2df; border-radius: 8px; color: #61716d; background: rgba(255,255,255,.94); box-shadow: 0 7px 20px rgba(26,48,43,.09); font-size: 11px; line-height: 1.45; pointer-events: none; }
.overlay-selection-tip b { margin-right: 5px; color: #31574d; }
.overlay-selection-marquee { position: fixed; z-index: 80; border: 1px solid #0eae7b; background: rgba(14, 174, 123, .12); box-shadow: 0 0 0 1px rgba(255,255,255,.7) inset; pointer-events: none; }

.filter-processing-overlay {
  --filter-frame-left: 16%;
  --filter-frame-top: 12%;
  --filter-frame-width: 68%;
  --filter-frame-height: 76%;
  position: absolute;
  inset: 0;
  z-index: 32;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  isolation: isolate;
  transition: opacity .24s ease;
}

.filter-processing-overlay.is-visible { opacity: 1; }

.filter-processing-ambient {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 46%, rgba(255,255,255,.04) 0 28%, rgba(9,42,35,.1) 72%, rgba(8,29,25,.2) 100%),
    linear-gradient(180deg, rgba(227,250,243,.06), rgba(7,55,44,.12));
  backdrop-filter: saturate(.88) contrast(.98);
}

.filter-processing-frame {
  position: absolute;
  left: var(--filter-frame-left);
  top: var(--filter-frame-top);
  width: var(--filter-frame-width);
  height: var(--filter-frame-height);
  overflow: hidden;
  border: 1px solid rgba(123, 241, 205, .72);
  border-radius: 3px;
  background: linear-gradient(135deg, rgba(91,235,192,.035), transparent 36%, rgba(76,198,255,.025));
  box-shadow:
    0 0 0 1px rgba(255,255,255,.3) inset,
    0 0 40px rgba(26,201,149,.12),
    0 18px 70px rgba(8,36,30,.16);
  transition: left .22s ease, top .22s ease, width .22s ease, height .22s ease, border-color .2s ease;
}

.filter-processing-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 48%, transparent 44%, rgba(20,155,116,.06) 100%);
}

.filter-processing-grid {
  position: absolute;
  inset: 0;
  opacity: .24;
  background-image:
    linear-gradient(rgba(78,224,180,.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78,224,180,.12) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent);
  animation: filter-grid-drift 8s linear infinite;
}

.filter-processing-beam {
  position: absolute;
  z-index: 3;
  left: -2%;
  top: -24%;
  width: 104%;
  height: 24%;
  opacity: .94;
  background: linear-gradient(180deg, transparent 0, rgba(67,236,186,.035) 24%, rgba(67,236,186,.24) 78%, rgba(204,255,240,.68) 98%, transparent 100%);
  filter: drop-shadow(0 8px 12px rgba(22,216,159,.26));
  animation: filter-scan-pass 2.35s cubic-bezier(.42,0,.58,1) infinite;
}

.filter-processing-beam::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(207,255,241,.95) 16%, #5ff1c2 50%, rgba(207,255,241,.95) 84%, transparent);
  box-shadow: 0 0 12px rgba(68,237,184,.9), 0 0 30px rgba(68,237,184,.44);
}

.filter-processing-corner {
  position: absolute;
  z-index: 4;
  width: 24px;
  height: 24px;
  border-color: rgba(211,255,242,.94);
  border-style: solid;
  filter: drop-shadow(0 0 5px rgba(60,232,180,.7));
}

.filter-processing-corner.is-top-left { top: 11px; left: 11px; border-width: 2px 0 0 2px; }
.filter-processing-corner.is-top-right { top: 11px; right: 11px; border-width: 2px 2px 0 0; }
.filter-processing-corner.is-bottom-right { right: 11px; bottom: 11px; border-width: 0 2px 2px 0; }
.filter-processing-corner.is-bottom-left { bottom: 11px; left: 11px; border-width: 0 0 2px 2px; }

.filter-processing-hud {
  position: absolute;
  z-index: 5;
  top: 18px;
  left: 50%;
  display: grid;
  grid-template-columns: 36px auto auto;
  align-items: center;
  gap: 10px;
  min-width: 330px;
  min-height: 54px;
  padding: 8px 10px 8px 9px;
  border: 1px solid rgba(174,230,213,.58);
  border-radius: 14px;
  color: #effff9;
  background: linear-gradient(135deg, rgba(13,49,42,.92), rgba(14,73,60,.86));
  box-shadow: 0 18px 55px rgba(7,36,30,.28), 0 1px 0 rgba(255,255,255,.12) inset;
  backdrop-filter: blur(16px) saturate(1.15);
  transform: translate(-50%, -8px) scale(.98);
  opacity: 0;
  transition: opacity .22s ease, transform .28s cubic-bezier(.2,.85,.25,1.1), border-color .2s ease;
}

.filter-processing-overlay.is-visible .filter-processing-hud {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.filter-processing-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  color: #cffff0;
  background: linear-gradient(145deg, rgba(47,218,168,.3), rgba(53,160,255,.14));
  box-shadow: 0 0 22px rgba(52,225,173,.18) inset;
}

.filter-processing-mark::before {
  content: '';
  position: absolute;
  inset: -3px;
  border: 1px solid transparent;
  border-top-color: #6df0c8;
  border-right-color: rgba(109,240,200,.2);
  border-radius: 14px;
  animation: filter-mark-orbit 1.45s linear infinite;
}

.filter-processing-mark svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
  filter: drop-shadow(0 0 7px rgba(111,246,205,.55));
  animation: filter-mark-breathe 1.5s ease-in-out infinite alternate;
}

.filter-processing-copy { display: grid; gap: 2px; min-width: 190px; }
.filter-processing-copy small { color: #79dabb; font-size: 8px; font-weight: 800; letter-spacing: .16em; line-height: 1; }
.filter-processing-copy strong { color: #f3fffb; font-size: 12px; font-weight: 700; line-height: 1.35; white-space: nowrap; }
.filter-processing-count { padding: 5px 8px; border: 1px solid rgba(131,226,197,.22); border-radius: 999px; color: #b9f2df; background: rgba(255,255,255,.055); font-size: 10px; font-weight: 800; white-space: nowrap; }

.filter-processing-overlay.is-settling .filter-processing-beam { opacity: 0; transition: opacity .18s ease; }
.filter-processing-overlay[data-state="success"] .filter-processing-frame { border-color: rgba(135,245,184,.88); }
.filter-processing-overlay[data-state="success"] .filter-processing-mark { color: #dcffea; background: rgba(50,202,130,.28); }
.filter-processing-overlay[data-state="error"] .filter-processing-frame { border-color: rgba(255,190,127,.78); }
.filter-processing-overlay[data-state="error"] .filter-processing-mark { color: #ffe4c4; background: rgba(222,142,62,.24); }

@keyframes filter-scan-pass {
  0% { transform: translateY(0); opacity: 0; }
  9% { opacity: .92; }
  88% { opacity: .92; }
  100% { transform: translateY(520%); opacity: 0; }
}

@keyframes filter-grid-drift { to { background-position: 42px 42px, 42px 42px; } }
@keyframes filter-mark-orbit { to { transform: rotate(360deg); } }
@keyframes filter-mark-breathe { from { opacity: .72; transform: scale(.92); } to { opacity: 1; transform: scale(1.06); } }

@media (prefers-reduced-motion: reduce) {
  .filter-processing-overlay,
  .filter-processing-frame,
  .filter-processing-hud,
  .filter-processing-beam { transition-duration: .01ms; }
  .filter-processing-grid,
  .filter-processing-mark::before,
  .filter-processing-mark svg { animation: none; }
  .filter-processing-beam {
    top: 50%;
    height: 1px;
    opacity: .62;
    animation: none;
    background: rgba(95,241,194,.58);
  }
}

.paper-preview {
  display: inline-block;
  border: 1px solid #d0dbd7;
  background: #fff;
  box-shadow: var(--shadow);
  transform-origin: center center;
}

.paper-preview iframe {
  display: block;
  height: min(74vh, 820px);
  width: min(72vw, 900px);
  border: 0;
  background: #fff;
}

.paper-preview img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(78vw, 1120px);
  max-height: calc(100vh - 210px);
  object-fit: contain;
  background: #fff;
  image-rendering: auto;
}

.image-editor {
  position: relative;
  display: block;
  line-height: 0;
  background: #fff;
}

.image-editor[data-tool="pan"] {
  cursor: grab;
}

.image-editor.is-panning {
  cursor: grabbing;
}

#annotation-canvas,
#laser-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  z-index: 3;
}

#laser-canvas { z-index: 4; pointer-events: none; }

#annotation-canvas[data-tool="pen"] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M20.8 2.8 25.2 7.2 9.2 23.2 3.5 24.5 4.8 18.8Z' fill='%23e53935' stroke='%23172f2a' stroke-width='1.6'/%3E%3Cpath d='m18.8 4.8 4.4 4.4' stroke='white' stroke-width='1.4'/%3E%3C/svg%3E") 3 25, crosshair;
}

#annotation-canvas[data-tool="eraser"] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cpath d='M9 5h13a3 3 0 0 1 3 3v9a3 3 0 0 1-3 3H9a4 4 0 0 1-4-4V9a4 4 0 0 1 4-4Z' fill='%23ffffff' stroke='%23172f2a' stroke-width='1.8'/%3E%3Cpath d='M9 20h13' stroke='%230eae7b' stroke-width='2'/%3E%3C/svg%3E") 8 8, cell;
}

#annotation-canvas[data-tool="laser"] {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='6' fill='%23ff2d55'/%3E%3Ccircle cx='16' cy='16' r='10' fill='none' stroke='%23ff2d55' stroke-opacity='.45' stroke-width='3'/%3E%3C/svg%3E") 16 16, crosshair;
}

#annotation-canvas[data-tool="pan"] {
  pointer-events: none;
  cursor: grab;
}

.overlay-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.overlay-item {
  position: absolute;
  min-width: 36px;
  border: 2px solid transparent;
  background: transparent;
  cursor: move;
  line-height: 0;
  transform-origin: center center;
  touch-action: none;
}

.image-editor[data-tool="pan"] .overlay-item {
  pointer-events: auto;
}

.overlay-item img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  max-height: none;
  height: auto;
  display: block;
  background: transparent !important;
  pointer-events: none;
}

.overlay-kind-text,
.overlay-kind-shape {
  min-height: 42px;
  background: transparent;
}

.overlay-text-content {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: 8px;
  overflow: hidden;
  outline: 0;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  pointer-events: none;
}

.overlay-kind-text.is-editing .overlay-text-content {
  cursor: text;
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.88);
}

.overlay-shape-svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.overlay-item.is-cropped {
  overflow: visible;
}

.overlay-item.is-cropped img {
  height: 100%;
  object-fit: cover;
}

.overlay-item.is-free-crop img {
  object-fit: contain;
}

.overlay-free-crop-viewport {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  overflow: hidden;
  background: transparent !important;
  pointer-events: none;
}

.overlay-free-crop-viewport img {
  position: absolute;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

.overlay-item.is-moving,
.overlay-item.is-resizing,
.overlay-item.is-rotating,
.overlay-item.is-cropping,
.overlay-item.is-selected { border-color: #a7adb4; box-shadow: none; }

.overlay-frame-fill,
.overlay-frame-stroke { position: absolute; inset: 0; pointer-events: none; }
.overlay-frame-fill { z-index: 0; }
.overlay-frame-stroke { z-index: 5; box-sizing: border-box; border-style: solid; }

.overlay-remove {
  position: absolute;
  top: -12px;
  right: -12px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #ffb9b1;
  border-radius: 50%;
  color: var(--red);
  background: #fff;
  font-weight: 800;
  line-height: 1;
}

.overlay-remove,
.overlay-rotate,
.overlay-resize,
.overlay-quick-toolbar {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
}

.overlay-item.is-active-selection .overlay-rotate,
.overlay-item.is-active-selection .overlay-resize,
.overlay-item.is-active-selection .overlay-quick-toolbar,
.overlay-item.is-moving .overlay-rotate,
.overlay-item.is-moving .overlay-resize,
.overlay-item.is-resizing .overlay-rotate,
.overlay-item.is-resizing .overlay-resize,
.overlay-item.is-rotating .overlay-rotate,
.overlay-item.is-rotating .overlay-resize {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
}

.overlay-rotate {
  position: absolute;
  top: -38px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #aeb4bb;
  border-radius: 50%;
  color: #687078;
  background: #fff;
  font-weight: 900;
  line-height: 1;
  cursor: grab;
  touch-action: none;
  transform: translateX(-50%);
}

.overlay-rotate::after { content: ''; position: absolute; left: 50%; top: 100%; width: 1px; height: 15px; background: #aeb4bb; transform: translateX(-50%); pointer-events: none; }

.overlay-item.is-rotating .overlay-rotate {
  cursor: grabbing;
}

.overlay-resize {
  position: absolute;
  z-index: 10;
  width: 12px;
  height: 12px;
  border: 1px solid #8e969e;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(25,36,34,.18);
  transform: translate(-50%, -50%);
}

.overlay-resize-nw { left: 0; top: 0; cursor: nwse-resize; }
.overlay-resize-n { left: 50%; top: 0; cursor: ns-resize; }
.overlay-resize-ne { left: 100%; top: 0; cursor: nesw-resize; }
.overlay-resize-e { left: 100%; top: 50%; cursor: ew-resize; }
.overlay-resize-se { left: 100%; top: 100%; cursor: nwse-resize; }
.overlay-resize-s { left: 50%; top: 100%; cursor: ns-resize; }
.overlay-resize-sw { left: 0; top: 100%; cursor: nesw-resize; }
.overlay-resize-w { left: 0; top: 50%; cursor: ew-resize; }

.overlay-quick-toolbar { position: absolute; z-index: 14; left: calc(100% + 16px); top: 50%; display: grid; gap: 7px; padding: 6px; border: 1px solid #d3d8dd; border-radius: 8px; background: rgba(255,255,255,.98); box-shadow: 0 8px 22px rgba(27,38,36,.16); transform: translateY(-50%) rotate(var(--overlay-counter-rotation, 0deg)); }
.overlay-quick-toolbar button,
.overlay-quick-toolbar label { position: relative; display: grid; width: 30px; height: 30px; margin: 0; padding: 0; place-items: center; border: 1px solid #e1e4e7; border-radius: 6px; color: #4f575e; background: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.overlay-quick-toolbar button:hover,
.overlay-quick-toolbar label:hover { border-color: #aeb8b5; background: #f5f7f7; }
.overlay-quick-toolbar button:disabled { color: #b9bec3; cursor: not-allowed; opacity: .55; }
.overlay-quick-toolbar input[type="color"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.overlay-color-swatch { position: relative; display: grid; width: 100%; height: 100%; place-items: center; }
.overlay-color-swatch::after { content: ''; position: absolute; right: 4px; bottom: 3px; left: 4px; height: 4px; border: 1px solid rgba(0,0,0,.13); border-radius: 2px; background: var(--overlay-swatch); }

.overlay-item.is-crop-editing .overlay-resize,
.overlay-item.is-crop-editing .overlay-remove,
.overlay-item.is-crop-editing .overlay-rotate,
.overlay-item.is-crop-editing .overlay-quick-toolbar {
  display: none;
}

.overlay-item.is-crop-editing {
  border: 2px solid #172f2a;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.92), 0 8px 24px rgba(17, 40, 34, 0.2);
}

.overlay-crop-frame {
  position: absolute;
  inset: -2px;
  z-index: 5;
  pointer-events: none;
}

.overlay-crop-handle {
  position: absolute;
  width: 30px;
  height: 30px;
  pointer-events: auto;
}

.overlay-crop-handle::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-color: #172f2a;
  border-style: solid;
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff);
}

.overlay-crop-handle[data-crop-handle="nw"] {
  left: -17px;
  top: -17px;
  cursor: nwse-resize;
}

.overlay-crop-handle[data-crop-handle="nw"]::before {
  border-width: 4px 0 0 4px;
}

.overlay-crop-handle[data-crop-handle="ne"] {
  right: -17px;
  top: -17px;
  cursor: nesw-resize;
}

.overlay-crop-handle[data-crop-handle="ne"]::before {
  border-width: 4px 4px 0 0;
}

.overlay-crop-handle[data-crop-handle="se"] {
  right: -17px;
  bottom: -17px;
  cursor: nwse-resize;
}

.overlay-crop-handle[data-crop-handle="se"]::before {
  border-width: 0 4px 4px 0;
}

.overlay-crop-handle[data-crop-handle="sw"] {
  left: -17px;
  bottom: -17px;
  cursor: nesw-resize;
}

.overlay-crop-handle[data-crop-handle="sw"]::before {
  border-width: 0 0 4px 4px;
}

.overlay-crop-handle[data-crop-handle="n"],
.overlay-crop-handle[data-crop-handle="s"] {
  left: 50%;
  transform: translateX(-50%);
  cursor: ns-resize;
}

.overlay-crop-handle[data-crop-handle="n"] {
  top: -17px;
}

.overlay-crop-handle[data-crop-handle="s"] {
  bottom: -17px;
}

.overlay-crop-handle[data-crop-handle="n"]::before,
.overlay-crop-handle[data-crop-handle="s"]::before {
  left: 5px;
  top: 12px;
  width: 20px;
  height: 0;
  border-width: 4px 0 0;
  background: #fff;
}

.overlay-crop-handle[data-crop-handle="e"],
.overlay-crop-handle[data-crop-handle="w"] {
  top: 50%;
  transform: translateY(-50%);
  cursor: ew-resize;
}

.overlay-crop-handle[data-crop-handle="e"] {
  right: -17px;
}

.overlay-crop-handle[data-crop-handle="w"] {
  left: -17px;
}

.overlay-crop-handle[data-crop-handle="e"]::before,
.overlay-crop-handle[data-crop-handle="w"]::before {
  left: 12px;
  top: 5px;
  width: 0;
  height: 20px;
  border-width: 0 0 0 4px;
  background: #fff;
}

.overlay-crop-actions {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: -48px;
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid #c7d7d2;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(18, 42, 35, 0.2);
  transform: translateX(-50%);
  line-height: 1;
  white-space: nowrap;
}

.overlay-crop-actions button {
  min-width: 64px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #29443d;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.overlay-crop-actions button:first-child {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.overlay-context-menu {
  position: fixed;
  z-index: 60;
  min-width: 205px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 44px rgba(26, 48, 43, 0.18);
}

.overlay-context-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.overlay-context-menu button:disabled {
  color: #a5b0ac;
  cursor: default;
}

.overlay-context-menu button:disabled:hover { background: transparent; }

.overlay-context-menu kbd {
  color: #80908a;
  font-family: inherit;
  font-size: 10px;
}

.overlay-context-menu button:hover {
  background: var(--brand-soft);
}

.overlay-context-menu hr {
  height: 1px;
  margin: 5px 2px;
  border: 0;
  background: var(--line);
}

.empty-preview,
.empty-box {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 120px;
  padding: 18px;
  color: var(--muted);
  border: 1px dashed #c2ceca;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.empty-preview strong {
  color: #324b45;
  font-size: 18px;
}

.preview-progress {
  display: grid;
  grid-template-columns: minmax(180px, 320px) auto;
  align-items: center;
  gap: 10px;
  width: min(360px, 100%);
  margin-top: 8px;
}

.preview-progress div {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e0ebe7;
}

.preview-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #43cba2);
  transition: width 0.25s ease;
}

.preview-progress em {
  min-width: 38px;
  color: #087b59;
  font-style: normal;
  font-weight: 800;
}

.floating-tools {
  position: absolute;
  z-index: 3;
  top: 180px;
  left: 12px;
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.annotation-toolbar {
  --laser-color: #ff2d55;
  --laser-range-progress: 27.78%;
  position: absolute;
  z-index: 6;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(36, 65, 58, 0.1);
}

.annotation-toolbar[hidden] {
  display: none;
}

.annotation-tool,
.annotation-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #243f39;
  background: #fff;
  font-weight: 700;
}

.annotation-action.has-text {
  gap: 5px;
  width: auto;
  min-width: 62px;
  padding: 0 9px;
}

.tool-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: currentColor;
}

.tool-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-text {
  color: currentColor;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.annotation-tool.is-active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.annotation-action.danger-action {
  color: var(--red);
}

.color-field,
.range-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #425b55;
  font-size: 12px;
  font-weight: 700;
}

.opacity-field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  color: #dce8e5;
  font-size: 11px;
}

.opacity-field input[type="number"] {
  width: 50px;
  min-width: 0;
  height: 28px;
  padding: 3px 5px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 6px;
  color: #fff;
  background: rgba(255, 255, 255, .1);
}

.opacity-input {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.annotation-object-settings .opacity-input input[type="number"] {
  width: 46px;
}

.annotation-object-settings .opacity-field input[type="number"] {
  width: 50px;
}

.color-field input {
  width: 44px;
  padding: 3px;
}

.range-field input {
  width: 150px;
  padding: 0;
}

.range-field b {
  min-width: 22px;
  text-align: right;
}

.eraser-size-field {
  padding-left: 8px;
  border-left: 1px solid var(--line);
}

.annotation-toolbar[data-active-tool="eraser"] .eraser-size-field {
  color: var(--brand-strong);
}

.autosave-state {
  margin-left: auto;
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--brand-strong);
  background: #fff;
  font-size: 0;
}

.autosave-state::before {
  content: "✓";
  font-size: 18px;
  font-weight: 900;
}

/* Draggable annotation assistive dock */
.annotation-toolbar {
  top: 28%;
  left: 72%;
  right: auto;
  display: block;
  width: 64px;
  height: 64px;
  min-height: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  touch-action: none;
}

.annotation-dock-toggle {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  color: #fff;
  background: rgba(26, 45, 60, 0.88);
  box-shadow: 0 8px 24px rgba(19, 36, 48, 0.28), inset 0 0 0 1px rgba(14, 174, 123, 0.5);
  cursor: grab;
  opacity: 0.84;
  transition: opacity 0.16s ease, transform 0.18s ease, background 0.18s ease;
  user-select: none;
}

.annotation-dock-toggle:hover,
.annotation-toolbar.is-expanded .annotation-dock-toggle {
  opacity: 1;
  background: #17384a;
}

.annotation-toolbar.is-dragging .annotation-dock-toggle {
  cursor: grabbing;
  transform: scale(1.04);
}

.annotation-dock-toggle .tool-icon,
.annotation-dock-toggle .tool-icon svg {
  width: 22px;
  height: 22px;
}

.annotation-dock-toggle > span:last-child {
  max-width: 52px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.annotation-dock-active-icon[hidden] {
  display: none;
}

.annotation-dock-toggle:has(.annotation-dock-active-icon[hidden]) {
  background: rgba(26, 45, 60, 0.78);
}

.annotation-dock-panel {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: calc(50% + 15px);
  width: 380px;
  height: 380px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  background: rgba(31, 46, 59, 0.94);
  box-shadow: 0 20px 52px rgba(18, 32, 41, 0.32), inset 0 0 0 1px rgba(14, 174, 123, 0.24);
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center;
  backdrop-filter: blur(12px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.annotation-toolbar:not(.is-expanded) .annotation-dock-panel {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.22);
}

.annotation-dock-panel > .annotation-tool,
.annotation-dock-panel > .annotation-action {
  position: absolute;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  width: 56px;
  min-width: 56px;
  height: 52px;
  min-height: 52px;
  padding: 3px;
  border-color: rgba(255, 255, 255, 0.28);
  border-radius: 9px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.annotation-dock-panel > .annotation-tool:hover,
.annotation-dock-panel > .annotation-action:hover {
  background: rgba(255, 255, 255, 0.2);
}

.annotation-dock-panel > .annotation-tool.is-active {
  border-color: #55d2aa;
  background: #0eae7b;
}

.annotation-dock-panel > .annotation-action.is-active,
.annotation-dock-panel > .annotation-action.is-triggered {
  color: #fff;
  border-color: #55d2aa;
  background: #0eae7b;
  box-shadow: 0 0 0 3px rgba(85, 210, 170, 0.15);
}

.annotation-dock-panel > .annotation-action .vip-badge.is-corner {
  top: 2px;
  right: 2px;
}

.annotation-dock-panel .tool-caption,
.annotation-dock-panel .tool-text {
  display: block;
  color: currentColor;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.annotation-dock-panel > [data-annotation-tool="pen"] { left: 27px; top: 18px; }
.annotation-dock-panel > [data-annotation-tool="pan"] { left: 115px; top: 18px; }
.annotation-dock-panel > [data-annotation-tool="eraser"] { left: 209px; top: 18px; }
.annotation-dock-panel > #insert-overlay-image { left: 297px; top: 18px; }
.annotation-dock-panel > #insert-shape { left: 27px; top: 88px; }
.annotation-dock-panel > #insert-text-box { left: 115px; top: 88px; }
.annotation-dock-panel > #undo-annotation { left: 209px; top: 88px; }
.annotation-dock-panel > #clear-annotation { left: 297px; top: 88px; }
.annotation-dock-panel > #capture-screen { left: 27px; top: 158px; }
.annotation-dock-panel > [data-annotation-tool="laser"] { left: 115px; top: 158px; }
.annotation-dock-panel > [data-annotation-tool="pen"].is-active { border-color: #ff8c8c; background: #cf3434; box-shadow: 0 0 0 3px rgba(255,87,87,.16); }
#annotation-canvas[data-tool="check"],
#annotation-canvas[data-tool="cross"] { cursor: crosshair; }

.annotation-dock-panel > [data-annotation-tool="laser"] .tool-icon,
.laser-color-field .tool-icon,
.laser-range-field .tool-icon {
  color: var(--laser-color);
}

.annotation-dock-panel > .color-field,
.annotation-dock-panel > .range-field,
.annotation-dock-panel > .opacity-field {
  position: absolute;
  z-index: 3;
  top: 220px;
  display: none;
  min-height: 54px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.annotation-toolbar[data-active-tool="pen"] .annotation-dock-panel > .color-field {
  left: 14px;
  display: flex;
  width: 92px;
}

.annotation-toolbar[data-active-tool="pen"] .annotation-dock-panel > .opacity-field {
  left: 114px;
  display: flex;
  width: 116px;
  min-height: 54px;
  padding: 8px;
  color: #fff;
}

.annotation-toolbar[data-active-tool="pen"] .annotation-dock-panel > .range-field:not(.eraser-size-field) {
  left: 14px;
  top: 282px;
  display: flex;
  width: 352px;
}

.annotation-toolbar[data-active-tool="eraser"] .annotation-dock-panel > .eraser-size-field {
  left: 40px;
  top: 250px;
  display: flex;
  width: 300px;
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.annotation-dock-panel > .laser-color-field,
.annotation-dock-panel > .laser-trail-field,
.annotation-dock-panel > .laser-range-field {
  position: absolute;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 7px;
  min-height: 54px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.annotation-toolbar[data-active-tool="laser"] .annotation-dock-panel > .laser-color-field {
  left: 14px;
  top: 220px;
  display: flex;
  width: 112px;
}

.annotation-toolbar[data-active-tool="laser"] .annotation-dock-panel > .laser-trail-field {
  left: 134px;
  top: 220px;
  display: flex;
  width: 150px;
  cursor: pointer;
}

.annotation-toolbar[data-active-tool="laser"] .annotation-dock-panel > .laser-range-field {
  left: 14px;
  top: 282px;
  display: flex;
  width: 352px;
}

.laser-color-field input[type="color"] { width: 40px; height: 34px; padding: 2px; border-radius: 6px; }
.laser-trail-field input { accent-color: var(--laser-color); }
.laser-trail-field span,
.laser-color-field .tool-text,
.laser-range-field .tool-text { color: #fff; font-size: 11px; font-weight: 800; white-space: nowrap; }
.laser-color-field .tool-icon,
.laser-range-field .tool-icon { width: 18px; height: 18px; }
.laser-range-field input[type="range"] {
  width: 100%;
  min-width: 0;
  height: 6px;
  appearance: none;
  border-radius: 999px;
  outline: 0;
  background: linear-gradient(to right, var(--laser-color) 0 var(--laser-range-progress), rgba(230, 239, 236, .92) var(--laser-range-progress) 100%);
  accent-color: var(--laser-color);
}
.laser-range-field input[type="range"]::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  appearance: none;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: var(--laser-color);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .28);
}
.laser-range-field input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--laser-color); }
.laser-range-field input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(230, 239, 236, .92); }
.laser-range-field input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .9); border-radius: 50%; background: var(--laser-color); }
.laser-range-field b { min-width: 22px; color: #fff; text-align: right; }

.annotation-toolbar[data-object-mode="text"] .annotation-dock-panel > .color-field,
.annotation-toolbar[data-object-mode="text"] .annotation-dock-panel > .range-field,
.annotation-toolbar[data-object-mode="shape"] .annotation-dock-panel > .color-field,
.annotation-toolbar[data-object-mode="shape"] .annotation-dock-panel > .range-field {
  display: none;
}

.annotation-dock-panel > .range-field input {
  min-width: 0;
  width: 100%;
}

.annotation-dock-panel > .color-field input {
  width: 42px;
  height: 34px;
}

.annotation-object-settings {
  position: absolute;
  z-index: 5;
  left: 8px;
  right: 8px;
  top: 220px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  align-items: end;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  color: #fff;
  background: rgba(20, 34, 45, 0.96);
}

.annotation-object-settings[hidden] {
  display: none;
}

.annotation-object-settings label {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.annotation-object-settings select,
.annotation-object-settings input:not([type="checkbox"]),
.annotation-object-settings button {
  min-width: 0;
  width: 100%;
  height: 30px;
  padding: 3px 6px;
}

.annotation-object-settings input[type="color"] {
  padding: 2px;
}

.text-object-settings {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 7px;
}

.text-font-field { grid-column: 1 / span 2; grid-row: 1; }
.text-size-field { grid-column: 3 / span 2; grid-row: 1; }
.text-color-field { grid-column: 1; grid-row: 2; }
.text-opacity-field { grid-column: 2 / span 2; grid-row: 2; }
.text-bold-field { grid-column: 4; grid-row: 2; }

.text-size-field {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 5px;
}

.text-size-field > span {
  grid-column: 1 / -1;
}

.text-size-field input {
  grid-column: 1;
}

.text-size-field b {
  grid-column: 2;
  min-width: 18px;
  color: #fff;
  text-align: right;
}

.shape-object-settings {
  grid-template-columns: 78px 56px 88px minmax(96px, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 7px;
}

.shape-type-field { grid-column: 1; grid-row: 1 / span 2; align-self: stretch; grid-template-rows: auto minmax(0, 1fr); }
.shape-stroke-color-field { grid-column: 2; grid-row: 1; }
.shape-stroke-opacity-field { grid-column: 3; grid-row: 1; }
.shape-stroke-width-field { grid-column: 4; grid-row: 1; }
.shape-fill-color-field { grid-column: 2; grid-row: 2; }
.shape-fill-opacity-field { grid-column: 3; grid-row: 2; }

.shape-stroke-width-field {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 5px;
}

.shape-stroke-width-field > span {
  grid-column: 1 / -1;
}

.shape-stroke-width-field input {
  grid-column: 1;
}

.shape-stroke-width-field b {
  grid-column: 2;
  min-width: 12px;
  color: #fff;
  text-align: right;
}

.text-bold-field {
  align-self: stretch;
}

.text-bold-field > span {
  color: #fff;
}

.text-bold-field #text-bold {
  display: grid;
  place-items: center;
  padding: 3px;
}

.annotation-object-settings .secondary-button.is-active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.annotation-dock-panel > .autosave-state {
  position: absolute;
  z-index: 3;
  left: auto;
  right: 24px;
  top: 160px;
  width: 42px;
  height: 24px;
  min-width: 42px;
  margin: 0;
  border-color: rgba(255, 255, 255, 0.26);
  color: #8be0c2;
  background: rgba(13, 29, 38, 0.76);
  transform: none;
}

.annotation-dock-panel > .autosave-state::before {
  font-size: 14px;
}

.recording-panel {
  position: absolute;
  z-index: 12;
  right: 28px;
  bottom: 96px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: min(680px, calc(100% - 56px));
  padding: 12px;
  border: 1px solid #b8dfd2;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 36px rgba(36, 65, 58, 0.16);
}

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

.recording-panel strong,
.recording-panel small {
  display: block;
}

.recording-panel small {
  margin-top: 3px;
  color: var(--muted);
}

.recording-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stage-controls {
  position: absolute;
  z-index: 11;
  right: 28px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(184, 203, 197, 0.78);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 34px rgba(36, 65, 58, 0.14);
}

body:has(#lens-modal:not([hidden])) .stage-controls {
  display: none !important;
}

.fullscreen-add-panel {
  position: absolute;
  inset: 0;
  z-index: 13;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(238, 244, 242, 0.72);
  backdrop-filter: blur(3px);
}

.fullscreen-add-card {
  width: min(520px, calc(100% - 40px));
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #b8dfd2;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 24px 58px rgba(36, 65, 58, 0.2);
}

.fullscreen-add-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.fullscreen-add-card strong,
.fullscreen-add-card small,
.fullscreen-add-drop span {
  display: block;
}

.fullscreen-add-card small,
.fullscreen-add-drop span {
  margin-top: 4px;
  color: var(--muted);
}

.fullscreen-add-drop {
  display: grid;
  place-items: center;
  min-height: 168px;
  padding: 22px;
  border: 1px dashed #9dcabe;
  border-radius: var(--radius);
  background: #f6fbf9;
  text-align: center;
}

.fullscreen-add-drop.is-dragover {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 2px rgba(14, 174, 123, 0.16);
}

.floating-tools button {
  position: relative;
  display: grid;
  place-items: center;
  gap: 5px;
  width: 74px;
  height: 68px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: #263d38;
  background: #fff;
  font-size: 12px;
}

.floating-tools button:last-child {
  border-bottom: 0;
}

.floating-tools span {
  color: var(--brand-strong);
  font-size: 19px;
}

.floating-tools .vip-badge.is-corner {
  position: absolute;
  top: 4px;
  right: 3px;
  min-width: 21px;
  height: 12px;
  padding: 0 3px;
  color: #fff;
  font-size: 7px;
}

.filter-popover {
  position: absolute;
  z-index: 4;
  top: 180px;
  left: 96px;
  width: 380px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.filter-popover.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.popover-tabs {
  display: flex;
  gap: 22px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.popover-tabs button {
  height: 30px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  background: transparent;
}

.popover-tabs .is-active {
  color: var(--ink);
  border-bottom-color: var(--brand);
  font-weight: 700;
}

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

.filter-choice {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 72px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #304841;
  background: #fff;
}

.filter-choice span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-weight: 800;
}

.filter-choice strong {
  font-size: 12px;
}

.filter-choice.is-active {
  border-color: #8fcfbb;
  background: #f3fbf8;
}

.auto-filter-options {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.auto-filter-options label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px;
  border: 1px solid #dce7e3;
  border-radius: 9px;
  background: #f9fbfa;
  cursor: pointer;
}

.auto-filter-options label:has(input:checked) {
  border-color: #8fcfbb;
  background: #effaf6;
}

.auto-filter-options input {
  margin-top: 3px;
  accent-color: var(--brand);
}

.auto-filter-options span {
  display: grid;
  gap: 2px;
}

.auto-filter-options strong { font-size: 12px; }
.auto-filter-options small { color: var(--muted); font-size: 10px; line-height: 1.4; }

.filter-popover p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.inspector {
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 16px;
  border-left: 1px solid var(--line);
  background: #f8fbfa;
}

.inspector::-webkit-scrollbar {
  width: 11px;
}

.inspector::-webkit-scrollbar-track {
  background: #edf3f1;
}

.inspector::-webkit-scrollbar-thumb {
  border: 3px solid #edf3f1;
  border-radius: 999px;
  background: #9eb5ae;
}

.inspector::-webkit-scrollbar-thumb:hover {
  background: #789a90;
}

.panel {
  padding: 15px;
  margin-bottom: 14px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

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

.panel-heading h1,
.panel-heading h2 {
  margin: 0;
}

.panel-heading h1 {
  font-size: 20px;
}

.panel-heading h2 {
  font-size: 16px;
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
}

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

.analysis-actions {
  margin-top: 14px;
}

.lens-button {
  white-space: nowrap;
}

.lens-stage {
  position: absolute;
  z-index: 9;
  inset: 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #a9c8bd;
  border-radius: 14px;
  background: #17251f;
  box-shadow: 0 24px 60px rgba(12, 30, 24, 0.28);
}

.lens-video-viewport {
  position: relative;
  grid-row: 2;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #050908;
}

.lens-stage > header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  color: #fff;
  background: #243831;
}

.lens-stage > header > div:first-child {
  display: grid;
  gap: 2px;
}

.lens-stage > header small {
  color: #b9cbc4;
}

.lens-stage > header > div:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.lens-stage video {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  background: #0b100e;
  transform: translate(-50%, -50%);
  transform-origin: center;
}

.lens-stage video.is-quarter-turned {
  transform-origin: center;
}

.lens-zoom-value {
  display: inline-grid;
  min-width: 48px;
  min-height: 34px;
  place-items: center;
  padding: 0 6px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 8px;
  color: #fff;
  background: rgba(7,20,16,.46);
  font-size: 12px;
  font-weight: 800;
}

.lens-mirror-control.is-active {
  color: #fff;
  border-color: #0eae7b;
  background: #0eae7b;
}

body.is-lens-presenting .lens-stage {
  display: grid;
}

body.is-lens-presenting .lens-stage > header {
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

body.is-lens-presenting .lens-stage video {
  display: block;
}

body.is-lens-presenting .lens-video-viewport,
body.is-lens-presenting .lens-video-viewport video {
  cursor: none;
}

body.is-lens-presenting .stage-controls {
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

body.is-lens-presenting.is-lens-controls-hidden .lens-stage > header {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
}

body.is-lens-presenting.is-lens-controls-hidden .stage-controls {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(100% + 36px));
}

.choice-dialog.lens-dialog {
  width: min(860px, calc(100vw - 36px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.lens-dialog > header p {
  max-width: 660px;
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.55;
}

.lens-dialog > .choice-actions {
  margin-top: 16px;
}

.mobile-transfer-dialog {
  width: min(720px, calc(100vw - 36px));
}

.mobile-transfer-dialog header p {
  margin: 5px 0 0;
}

.mobile-transfer-content {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 22px;
  margin: 18px 0;
}

.mobile-transfer-qr-wrap {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7faf9;
}

.mobile-transfer-qr-wrap img {
  width: 190px;
  height: 190px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.mobile-transfer-qr-wrap span {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.mobile-transfer-steps {
  display: grid;
  align-content: start;
  gap: 14px;
}

.mobile-transfer-steps ol {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 22px;
  color: #40554e;
  line-height: 1.5;
}

.mobile-transfer-status-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid #cfe0da;
  border-radius: 10px;
  background: #f7fbf9;
}

.mobile-transfer-status-card i {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #e9a23b;
  box-shadow: 0 0 0 5px rgba(233, 162, 59, .13);
}

.mobile-transfer-status-card i.is-connected {
  background: var(--brand);
  box-shadow: 0 0 0 5px rgba(14, 174, 123, .13);
}

.mobile-transfer-status-card > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.mobile-transfer-status-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-transfer-note {
  margin: 0 !important;
  padding: 10px 11px;
  border-radius: 8px;
  color: #5e736c !important;
  background: #f1f6f4;
  font-size: 11px;
}

.mobile-transfer-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.mobile-placement-dialog {
  width: min(640px, calc(100vw - 36px));
}

.mobile-placement-files {
  display: flex;
  gap: 7px;
  margin: -8px 0 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.mobile-placement-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  max-width: 210px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #50645e;
  background: #f8fbfa;
  font-size: 11px;
}

.mobile-placement-file b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-placement-file i {
  color: var(--brand-strong);
  font-style: normal;
  font-weight: 900;
}

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

.placement-option {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 76px;
  padding: 11px;
  border: 1px solid #cfded9;
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.placement-option.is-accent {
  grid-column: 1 / -1;
  border-color: #9ddac7;
  background: #f1fbf7;
}

.placement-option:hover:not(:disabled) {
  border-color: var(--brand);
  box-shadow: 0 6px 18px rgba(18, 112, 83, .1);
}

.placement-option:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.placement-option > span:last-child {
  display: grid;
  gap: 4px;
}

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

.placement-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-size: 20px;
  font-weight: 900;
}

.mobile-placement-hint {
  min-height: 18px;
  margin: 12px 0 0 !important;
  color: #8a5b16 !important;
  font-size: 11px;
}

.lens-connect-content {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 22px;
  margin: 0;
}

.lens-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 14px;
  padding: 5px;
  border: 1px solid #d8e5e0;
  border-radius: 13px;
  background: #f3f7f5;
}

.lens-mode-tabs > button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #5d7069;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, color .16s ease;
}

.lens-mode-tabs > button:hover {
  color: #234d42;
  background: rgba(255, 255, 255, .72);
}

.lens-mode-tabs > button:focus-visible,
.mirror-platform-tabs button:focus-visible,
.mirror-features-link:focus-visible {
  outline: 2px solid rgba(14, 174, 123, .42);
  outline-offset: 2px;
}

.lens-mode-tabs > button.is-active {
  border-color: #b8ddd1;
  color: #087b5d;
  background: #fff;
  box-shadow: 0 5px 16px rgba(30, 77, 64, .09);
}

.lens-mode-tabs > button > span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.lens-mode-tabs strong {
  font-size: 13px;
}

.lens-mode-tabs small {
  overflow: hidden;
  color: #7b8d87;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lens-mode-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  color: #668078;
  background: #e8efec;
}

.lens-mode-tabs button.is-active .lens-mode-icon {
  color: #07805f;
  background: #dcf5ec;
}

.lens-mode-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.lens-mode-panel[hidden],
.mirror-platform-guide[hidden] {
  display: none;
}

.lens-qr-wrap {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7faf9;
}

.lens-qr-wrap img {
  width: 190px;
  height: 190px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.lens-qr-wrap span {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.lens-connect-steps {
  display: grid;
  align-content: start;
  gap: 14px;
}

.lens-connect-steps ol {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 22px;
  color: #40554e;
  line-height: 1.5;
}

.lens-ca-setup {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid #b7d9ce;
  border-radius: 10px;
  background: #effaf6;
}

.lens-ca-setup[hidden] {
  display: none;
}

.lens-ca-setup img {
  width: 82px;
  height: 82px;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 7px;
  background: #fff;
}

.lens-ca-setup > div {
  display: grid;
  gap: 5px;
}

.lens-ca-setup small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.lens-ca-setup a {
  width: fit-content;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 700;
}

.lens-status-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid #cfe0da;
  border-radius: 10px;
  background: #f7fbf9;
}

.lens-status-card i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #e9a23b;
  box-shadow: 0 0 0 5px rgba(233, 162, 59, 0.13);
}

.lens-status-card i.is-connected {
  background: var(--brand);
  box-shadow: 0 0 0 5px rgba(14, 174, 123, 0.13);
}

.lens-status-card > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.lens-status-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lens-mirror-panel {
  display: grid;
  gap: 14px;
}

.mirror-network-note {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid #c8e5db;
  border-radius: 11px;
  background: linear-gradient(100deg, #edf9f5, #f8fcfa);
}

.mirror-network-note > div {
  display: grid;
  gap: 3px;
}

.mirror-network-note strong {
  color: #214d40;
  font-size: 12px;
}

.mirror-network-note small {
  color: #71857e;
  font-size: 10px;
  line-height: 1.45;
}

.mirror-network-icon {
  position: relative;
  display: grid;
  place-items: end center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #d9f2e9;
}

.mirror-network-icon i {
  position: absolute;
  bottom: 9px;
  border: 2px solid #0a8c68;
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(45deg);
}

.mirror-network-icon i:nth-child(1) { width: 18px; height: 18px; bottom: 2px; }
.mirror-network-icon i:nth-child(2) { width: 11px; height: 11px; bottom: 6px; }
.mirror-network-icon i:nth-child(3) { width: 3px; height: 3px; bottom: 10px; border-width: 2px; background: #0a8c68; }

.mirror-system-badge {
  padding: 5px 9px;
  border-radius: 999px;
  color: #08795b;
  background: #ddf4eb;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.mirror-connect-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
}

.mirror-device-preview {
  display: grid;
  align-content: start;
  place-items: center;
  min-height: 320px;
  padding: 22px 16px 16px;
  border: 1px solid #d3e1dc;
  border-radius: 12px;
  background: radial-gradient(circle at 48% 28%, #effbf7 0, #f8fbfa 46%, #f1f5f3 100%);
  text-align: center;
}

.mirror-control-guide {
  position: relative;
  width: min(232px, 100%);
  margin-bottom: 17px;
  padding: 9px;
  overflow: hidden;
  border-radius: 18px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(24, 56, 91, .92), rgba(112, 83, 74, .7)),
    radial-gradient(circle at 20% 10%, #f4d2b3, transparent 44%),
    linear-gradient(160deg, #8796a2, #e6b99b);
  box-shadow: 0 18px 36px rgba(29, 54, 48, .2);
}

.mirror-control-guide[hidden] { display: none; }

.mirror-control-status,
.mirror-android-status {
  display: flex;
  justify-content: space-between;
  padding: 0 4px 7px;
  font-size: 8px;
  font-weight: 800;
}

.mirror-control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr .72fr .72fr;
  grid-template-rows: 58px 58px 58px;
  gap: 6px;
}

.mirror-control-tile,
.mirror-control-slider {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  background: rgba(26, 31, 39, .72);
  backdrop-filter: blur(7px);
}

.mirror-control-connections {
  grid-column: 1 / 3;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  padding: 7px 16px;
}

.mirror-control-connections i {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  color: #fff;
  background: #1886ef;
  font-size: 12px;
  font-style: normal;
}

.mirror-control-connections i:nth-child(2) { background: #43ce65; }
.mirror-control-connections i:nth-child(4) { background: #62676d; }

.mirror-control-media {
  grid-column: 3 / 5;
  align-content: center;
  gap: 10px;
  font-size: 8px;
}

.mirror-control-media b { font-size: 9px; }
.mirror-control-lock { grid-column: 1; font-size: 23px; }

.mirror-control-cast {
  position: relative;
  grid-column: 2 / 4;
  gap: 3px;
  border: 2px solid #ff7e62;
  background: rgba(20, 24, 29, .86);
}

.mirror-control-cast svg {
  width: 31px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
}

.mirror-control-cast strong { font-size: 9px; }
.mirror-control-focus { grid-column: 1 / 3; font-size: 8px; }

.mirror-control-slider {
  grid-row: 2 / 4;
  grid-column: 4;
  align-items: end;
  padding: 5px;
  background: rgba(236, 239, 241, .8);
}

.mirror-control-slider i {
  width: 100%;
  height: 45%;
  border-radius: 8px;
  background: #fff;
}

.mirror-control-slider.is-volume { display: none; }

.mirror-guide-arrow {
  position: absolute;
  left: 86px;
  top: 116px;
  color: #ff765b;
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 2px #fff;
  transform: rotate(-18deg);
}

.mirror-control-guide > p {
  margin: 9px 2px 0;
  color: #fff;
  font-size: 9px;
  line-height: 1.45;
}

.mirror-control-guide > p b {
  display: block;
  color: #ffe2d9;
  font-size: 10px;
}

.mirror-control-guide.is-android {
  background: linear-gradient(155deg, #1f4854, #3e777b 52%, #c4d6d1);
}

.mirror-android-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.mirror-android-tiles > span {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(25, 37, 40, .7);
  font-size: 8px;
}

.mirror-android-tiles > span.is-on { background: #2f8fe8; }

.mirror-android-tiles > .mirror-android-cast {
  grid-column: 1 / 3;
  grid-template-columns: 34px 1fr;
  border: 2px solid #ff7e62;
  background: rgba(19, 31, 35, .88);
}

.mirror-android-cast svg {
  width: 28px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
}

.mirror-guide-arrow.is-android { left: 74px; top: 110px; }

.mirror-preview-computer {
  position: absolute;
  right: 0;
  bottom: 25px;
  display: grid;
  place-items: center;
  width: 190px;
  height: 119px;
  padding: 7px;
  border: 1px solid #18382f;
  border-radius: 12px;
  background: #29463d;
  box-shadow: 0 18px 30px rgba(28, 66, 55, .2);
}

.mirror-preview-computer > div {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 7px;
  color: #fff;
  background: radial-gradient(circle at 50% 25%, #41695d, #20372f 72%);
}

.mirror-preview-computer b {
  margin-top: 6px;
  font-size: 11px;
}

.mirror-preview-computer small {
  margin-top: 3px;
  color: #b9cec7;
  font-size: 8px;
}

.mirror-preview-stand {
  position: absolute;
  right: 66px;
  bottom: 8px;
  width: 58px;
  height: 18px;
  border-bottom: 6px solid #29463d;
  border-radius: 50%;
}

.mirror-preview-stand::before {
  position: absolute;
  left: 25px;
  bottom: 0;
  width: 9px;
  height: 24px;
  background: #29463d;
  content: '';
}

.mirror-preview-phone {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 28px;
  width: 62px;
  height: 116px;
  padding: 5px;
  border: 2px solid #263d36;
  border-radius: 14px;
  background: #f9fbfa;
  box-shadow: 0 12px 24px rgba(26, 55, 47, .2);
}

.mirror-preview-phone::before {
  position: absolute;
  z-index: 2;
  top: 7px;
  left: 50%;
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: #27463c;
  content: '';
  transform: translateX(-50%);
}

.mirror-preview-phone i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 9px;
  background: linear-gradient(155deg, #c7eee1 0 37%, #8dd8bf 37% 58%, #3da986 58%);
}

.mirror-preview-phone span {
  position: absolute;
  right: -12px;
  top: 34px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5ce3b4;
  box-shadow: 0 0 0 5px rgba(92, 227, 180, .18);
}

.mirror-cast-mark {
  position: relative;
  width: 33px;
  height: 26px;
  border: 1.5px solid #8fe3c5;
  border-radius: 5px;
}

.mirror-cast-mark i {
  position: absolute;
  left: 4px;
  bottom: 4px;
  border: 1.5px solid #8fe3c5;
  border-top-color: transparent;
  border-right-color: transparent;
  border-radius: 0 0 0 12px;
}

.mirror-cast-mark i:nth-child(1) { width: 5px; height: 5px; }
.mirror-cast-mark i:nth-child(2) { width: 11px; height: 11px; }
.mirror-cast-mark i:nth-child(3) { width: 17px; height: 17px; }

.mirror-device-label {
  color: #81928d;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
}

.mirror-device-preview > strong {
  max-width: 100%;
  margin-top: 5px;
  overflow: hidden;
  color: #203f36;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mirror-device-preview > small {
  max-width: 220px;
  margin-top: 7px;
  color: #73857f;
  font-size: 9px;
  line-height: 1.55;
}

.mirror-guide-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 15px;
  border: 1px solid #d5e2de;
  border-radius: 12px;
  background: #fff;
}

.mirror-platform-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  border-radius: 9px;
  background: #f0f4f2;
}

.mirror-platform-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  color: #65766f;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

.mirror-platform-tabs button.is-active {
  color: #087b5c;
  background: #fff;
  box-shadow: 0 3px 10px rgba(36, 75, 64, .1);
}

.mirror-platform-guide ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mirror-platform-guide li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 39px;
  padding: 6px 9px;
  border: 1px solid #e4ece9;
  border-radius: 8px;
  color: #4f625b;
  background: #fbfdfc;
  font-size: 10px;
  line-height: 1.45;
}

.mirror-platform-guide li b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #087c5d;
  background: #def5ed;
  font-size: 10px;
}

.mirror-platform-guide p {
  margin: 9px 0 0;
  padding: 9px 10px;
  border-left: 3px solid #e5ad4c;
  border-radius: 0 7px 7px 0;
  color: #735d34;
  background: #fff9ec;
  font-size: 9px;
  line-height: 1.5;
}

.mirror-platform-guide p strong {
  display: block;
  margin-bottom: 2px;
}

.mirror-receiver-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
  padding: 9px 10px;
  border: 1px solid #dce7e3;
  border-radius: 8px;
  background: #f8fbfa;
}

.mirror-receiver-status > i {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e8a43d;
  box-shadow: 0 0 0 4px rgba(232, 164, 61, .13);
}

.mirror-receiver-status.is-running > i {
  background: #11a779;
  box-shadow: 0 0 0 4px rgba(17, 167, 121, .13);
}

.mirror-receiver-status.is-missing > i {
  background: #df6c64;
  box-shadow: 0 0 0 4px rgba(223, 108, 100, .12);
}

.mirror-receiver-status > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.mirror-receiver-status strong {
  color: #31554b;
  font-size: 10px;
}

.mirror-receiver-status small {
  overflow: hidden;
  color: #758780;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mirror-system-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.mirror-system-actions button {
  min-height: 38px;
  padding-inline: 10px;
  font-size: 10px;
}

.mirror-features-link {
  justify-self: start;
  padding: 0;
  border: 0;
  color: #147a61;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mirror-features-link[hidden] {
  display: none;
}

.mirror-compatibility-note {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #dde6e3;
  border-radius: 9px;
  background: #f7f9f8;
}

.mirror-compatibility-note > span {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  color: #fff;
  background: #6c827a;
  font-size: 11px;
  font-weight: 800;
}

.mirror-compatibility-note > div {
  display: grid;
  gap: 3px;
}

.mirror-compatibility-note strong {
  color: #4c6059;
  font-size: 10px;
}

.mirror-compatibility-note small {
  color: #768781;
  font-size: 9px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .choice-dialog.lens-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 14px;
  }

  .lens-mode-tabs > button {
    grid-template-columns: 32px minmax(0, 1fr);
    padding-inline: 8px;
  }

  .lens-mode-icon {
    width: 31px;
    height: 31px;
  }

  .lens-mode-tabs small,
  .mirror-system-badge {
    display: none;
  }

  .lens-connect-content,
  .mirror-connect-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .lens-qr-wrap img {
    width: 168px;
    height: 168px;
  }

  .mirror-device-preview {
    min-height: 270px;
  }

  .mirror-network-note {
    grid-template-columns: 38px minmax(0, 1fr);
  }
}

@media (max-width: 460px) {
  .lens-mode-tabs > button {
    grid-template-columns: 1fr;
    place-items: center;
    text-align: center;
  }

  .lens-mode-tabs > button > span:last-child {
    display: block;
  }

  .mirror-system-actions,
  .lens-dialog > .choice-actions {
    grid-template-columns: 1fr;
  }
}

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

.account-strip span {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid #cfe7df;
  border-radius: var(--radius);
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 800;
}

.form-grid label {
  display: grid;
  gap: 5px;
}

.form-grid span {
  color: #526961;
  font-size: 12px;
  font-weight: 700;
}

.option-stack {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  color: #435a54;
}

.option-stack label,
.task-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.file-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

.file-meta div {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.file-meta div:last-child {
  border-bottom: 0;
}

.file-meta dt {
  color: var(--muted);
}

.file-meta dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.result-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.wrongbook-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.wrongbook-options label {
  display: grid;
  gap: 5px;
}

.wrongbook-options span {
  color: #526961;
  font-size: 12px;
  font-weight: 700;
}

.wrongbook-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 24;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 18px 0 10px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(145deg, #12bf87, #087d5d);
  box-shadow: 0 18px 36px rgba(8, 125, 93, 0.28);
  font-weight: 800;
}

.wrongbook-fab span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--brand-strong);
  background: #fff;
}

.wrongbook-workspace {
  position: static;
  grid-row: 2 / 4;
  z-index: 10;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #f5f8f7;
}

.wrongbook-workspace[hidden] {
  display: none;
}

.wrongbook-workspace.has-embedded-workspace {
  grid-template-rows: minmax(0, 1fr);
}

.wrongbook-workspace.has-embedded-workspace > .wrongbook-page-header,
.wrongbook-workspace.has-embedded-workspace > .wrongbook-layout {
  display: none;
}

#wrongbook-workspace-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  background: #f5f8f7;
}

.wrongbook-body {
  height: 100vh;
  overflow: hidden;
}

.wrongbook-body .wrongbook-workspace.standalone {
  height: 100vh;
  grid-template-rows: auto minmax(0, 1fr);
}

.scanner-workspace.is-content-view > .top-toolbar,
.scanner-workspace.is-content-view > .workspace-grid {
  display: none;
}

.embedded-workspace-page {
  grid-row: 2 / 4;
  z-index: 10;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #f5f8f7;
}

.embedded-workspace-page[hidden] {
  display: none;
}

.embedded-workspace-page iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

/* The desktop shell enters native fullscreen for the experiment workspace.
   Remove the parent tab row as well so the embedded lab owns every pixel. */
html.desktop-runtime body.is-experiment-workspace.is-experiment-immersive .workspace-tabbar {
  display: none !important;
}

html.desktop-runtime body.is-experiment-workspace.is-experiment-immersive .scanner-workspace {
  grid-template-rows: minmax(0, 1fr) !important;
}

html.desktop-runtime body.is-experiment-workspace.is-experiment-immersive #experiment-workspace-page {
  grid-row: 1 !important;
}

/* Course video uses the native Electron window as a fallback when Chromium
   rejects Fullscreen API requests made by the embedded course frame. */
html.desktop-runtime body.is-course-video-immersive .workspace-tabbar {
  display: none !important;
}

html.desktop-runtime body.is-course-video-immersive .scanner-workspace {
  grid-template-rows: minmax(0, 1fr) !important;
}

html.desktop-runtime body.is-course-video-immersive #course-workspace-page {
  grid-row: 1 !important;
}

.wrongbook-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 8px 22px rgba(36, 65, 58, 0.08);
}

.wrongbook-page-header h2 {
  margin: 2px 0 4px;
  font-size: 22px;
}

.wrongbook-page-header p {
  margin: 0;
  color: var(--muted);
}

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

.wrongbook-layout {
  display: grid;
  grid-template-columns: 320px 400px minmax(520px, 1fr);
  gap: 16px;
  min-height: 0;
  padding: 16px;
}

.wrongbook-source-panel,
.wrongbook-folder-panel,
.wrongbook-generate-panel {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 24px rgba(36, 65, 58, 0.08);
}

.wrongbook-source-panel,
.wrongbook-generate-panel {
  padding: 14px;
}

.wrongbook-folder-panel {
  order: 3;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
  overflow: hidden;
}

.wrongbook-source-panel {
  order: 1;
}

.wrongbook-generate-panel {
  order: 2;
  display: grid;
  grid-auto-rows: max-content;
  gap: 10px;
  align-content: start;
}


.template-preview {
  padding: 0;
  border: 0;
  background: transparent;
}

.template-preview-card {
  display: grid;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--template-accent), #ffffff 52%);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--template-accent), transparent 90%);
}

.template-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px 9px;
  border-bottom: 2px solid var(--template-accent);
}

.template-sheet-head > div { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.template-sheet-head strong {
  color: var(--template-accent);
  font-size: 17px;
  letter-spacing: .04em;
}

.template-sheet-head span {
  color: var(--template-accent);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.template-sheet-head p { margin: 0; color: #667670; font-size: 9px; white-space: nowrap; }
.template-sheet-body {
  display: grid;
  grid-template-columns: 38% minmax(0, 1fr);
  min-height: 156px;
}
.template-sheet-body > aside {
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 10px;
  border-right: 1px solid color-mix(in srgb, var(--template-accent), #ffffff 62%);
  color: #596a65;
  font-size: 9px;
}
.template-sheet-body > aside > strong { color: var(--template-accent); font-size: 11px; }
.template-sheet-body > aside > b { margin-top: 2px; padding: 5px 6px; border-radius: 5px 5px 0 0; color: var(--template-accent); background: var(--template-soft); font-size: 9px; }
.template-sheet-body > aside > small { margin-top: -5px; padding: 7px 6px; border-radius: 0 0 5px 5px; color: #596a65; background: var(--template-soft); font-size: 8px; line-height: 1.65; }
.template-sheet-body > section { display: grid; grid-template-rows: 1fr 1fr auto; min-width: 0; }
.template-original,
.template-answer { position: relative; display: grid; align-content: start; border-bottom: 1px dashed color-mix(in srgb, var(--template-accent), #ffffff 42%); }
.template-original b,
.template-answer b { justify-self: center; padding: 4px 10px; color: #4d5d58; background: var(--template-soft); font-size: 8px; }
.template-original i,
.template-answer i { display: block; height: 1px; margin: 13px 10px 0; background: #e2e9e6; }
.template-answer i + i { margin-top: 13px; }
.template-sheet-body footer { padding: 5px 8px; color: var(--template-accent); background: var(--template-soft); font-size: 8px; font-weight: 700; text-align: right; }
.workspace-note {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.wrongbook-source-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.wrongbook-candidate-list,
.wrongbook-folder-list,
.wrongbook-result-slot {
  display: grid;
  gap: 10px;
}

.wrongbook-result-slot {
  min-height: 0;
  align-content: start;
}

.wrongbook-result-slot:empty { display: none; }

.wrongbook-result-slot .empty-box {
  min-height: 84px;
}

.wrongbook-generate-error {
  align-content: center;
  gap: 7px;
  border-color: #f3c3be;
  color: #a43b32;
  background: #fff8f7;
}

.wrongbook-generate-error strong,
.wrongbook-generate-error span {
  display: block;
}

.wrongbook-folder-list {
  min-height: 0;
  overflow: auto;
  align-content: start;
  padding-right: 2px;
}

.wrongbook-candidate {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdfc;
}

.candidate-delete-button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #efcece;
  border-radius: 7px;
  color: #df5656;
  background: #fff;
  cursor: pointer;
}

.candidate-delete-button:hover {
  border-color: #df5656;
  background: #fff4f4;
}

.wrongbook-candidate.is-selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.wrongbook-page-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 100px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: crosshair;
}

.wrongbook-page-preview::after {
  content: '框选';
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 2px 5px;
  border-radius: 999px;
  color: #fff;
  background: rgba(7, 126, 91, .88);
  font-size: 9px;
  font-weight: 800;
}

.wrongbook-candidate img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.wrongbook-page-meta { display: grid; min-width: 0; gap: 5px; padding-top: 2px; }
.wrongbook-page-meta .secondary-button { justify-self: start; min-height: 30px; padding: 5px 9px; }
.wrongbook-page-question-list { grid-column: 1 / -1; display: grid; gap: 6px; }
.wrongbook-page-question-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  padding: 7px;
  border: 1px solid #dce8e4;
  border-radius: 7px;
  background: #fff;
}
.wrongbook-page-question-row.is-selected { border-color: #8bd8c0; background: #effbf7; }
.wrongbook-question-edit {
  display: grid;
  min-width: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.wrongbook-question-edit strong,
.wrongbook-question-edit small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrongbook-question-edit small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.wrongbook-question-link,
.wrongbook-question-delete { width: 27px; height: 27px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.wrongbook-question-link { color: #6a52d1; }
.wrongbook-question-delete { color: #d24b47; }
.wrongbook-page-empty { grid-column: 1 / -1; padding: 7px 8px; border-radius: 6px; color: var(--muted); background: #f4f8f7; font-size: 11px; }

.wrongbook-candidate strong,
.wrongbook-candidate small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wrongbook-candidate small {
  margin-top: 4px;
  color: var(--muted);
}

.check-button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #fff;
  background: #fff;
  font-weight: 800;
}

.check-button.is-checked {
  border-color: var(--brand);
  background: var(--brand);
}

.folder-create-card {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
}

.folder-create-card h3,
.wrongbook-source-panel h3,
.wrongbook-generate-panel h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 17px;
}

.wrongbook-source-panel h3::before,
.wrongbook-generate-panel h3::before,
.folder-create-card h3::before {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.wrongbook-source-panel h3::before {
  content: "1";
}

.wrongbook-generate-panel h3::before {
  content: "2";
}

.folder-create-card h3::before {
  content: "3";
}

.generate-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #b8dfd2;
  border-radius: var(--radius);
  background: var(--brand-soft);
}

.generate-summary span {
  color: #526961;
  font-size: 12px;
  font-weight: 700;
}

.generate-summary strong {
  color: var(--brand-strong);
  font-size: 18px;
}

.folder-create-grid {
  display: grid;
  grid-template-columns: 120px 120px minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.folder-create-grid label,
.workspace-field {
  display: grid;
  gap: 5px;
}

.folder-create-grid span,
.workspace-field span {
  color: #526961;
  font-size: 12px;
  font-weight: 700;
}

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

.wrongbook-folder-card.is-active {
  border-color: var(--brand);
  box-shadow: inset 3px 0 0 var(--brand);
}

.wrongbook-folder-card.is-dropover {
  border-color: var(--brand);
  background: #effbf6;
  outline: 2px dashed rgba(14, 174, 123, 0.35);
  outline-offset: -6px;
}

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

.folder-card-head strong,
.folder-card-head small {
  display: block;
}

.folder-card-head small {
  margin-top: 4px;
  color: var(--muted);
}

.folder-drop-hint {
  display: grid;
  place-items: center;
  min-height: 52px;
  border: 1px dashed #b8cbc5;
  border-radius: var(--radius);
  color: var(--muted);
  background: #fff;
  font-size: 12px;
}

.folder-items {
  display: grid;
  gap: 8px;
}

.folder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  background: #fff;
}

.folder-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.folder-item small,
.folder-empty {
  color: var(--muted);
  font-size: 12px;
}

.wrongbook-library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7faf9;
}

.wrongbook-library-toolbar > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.wrongbook-library-toolbar > div,
.folder-card-actions,
.recycle-item-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.wrongbook-library-actions {
  flex-wrap: nowrap !important;
}

.wrongbook-library-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
}

.wrongbook-library-icon:hover:not(:disabled) {
  color: var(--brand-strong);
  border-color: var(--brand);
  background: var(--brand-soft);
}

.wrongbook-library-icon.danger-action:hover:not(:disabled) {
  color: var(--red);
  border-color: #ffb9b1;
  background: var(--red-soft);
}

.wrongbook-library-icon.recycle-action {
  color: #6750cf;
  border-color: #d8d0f6;
  background: #f6f3ff;
}

.wrongbook-library-icon.recycle-action:hover:not(:disabled) {
  color: #5139bd;
  border-color: #8f7ae3;
  background: #eeeaff;
}

.wrongbook-library-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrongbook-folder-card.is-selected,
.folder-item.is-selected,
.wrongbook-recycle-item.is-selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.folder-card-head {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
}

.folder-card-head > div:nth-child(2) {
  min-width: 0;
}

.folder-card-actions {
  justify-content: flex-end;
}

.folder-card-actions .icon-button,
.folder-item > .icon-button {
  width: 32px;
  height: 32px;
  min-height: 32px;
}

.wrongbook-rename-button {
  color: #315c51;
  font-size: 16px;
}

.wrongbook-rename-button:hover {
  color: #087b59;
  border-color: #8fcfbb;
  background: #eefaf6;
}

.folder-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 32px 32px;
  align-items: center;
}

.wrongbook-vip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.wrongbook-vip-button .vip-badge {
  position: static;
  pointer-events: none;
}

.folder-item > a {
  display: grid;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.wrongbook-recycle-panel {
  display: grid;
  gap: 12px;
  min-height: 280px;
  padding: 14px;
  border: 1px solid #c7d7d2;
  border-radius: var(--radius);
  background: #f8fbfa;
}

.wrongbook-recycle-panel[hidden],
.wrongbook-folder-list[hidden] {
  display: none;
}

.wrongbook-recycle-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.wrongbook-recycle-panel h3,
.wrongbook-recycle-panel p {
  margin: 0;
}

.wrongbook-recycle-panel p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.wrongbook-recycle-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.wrongbook-recycle-actions > span {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.wrongbook-recycle-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.wrongbook-recycle-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.wrongbook-recycle-item strong,
.wrongbook-recycle-item small {
  display: block;
}

.wrongbook-recycle-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1100px) {
  .wrongbook-library-toolbar,
  .wrongbook-recycle-panel > header {
    align-items: stretch;
    flex-direction: column;
  }

  .folder-card-head,
  .wrongbook-recycle-item {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .folder-card-actions,
  .recycle-item-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

.button-row.vertical {
  grid-template-columns: 1fr;
}

.wrongbook-result-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  background: var(--brand-soft);
  box-shadow: 0 10px 22px rgba(14, 174, 123, 0.12);
  cursor: grab;
}

.wrongbook-result-card:active {
  cursor: grabbing;
}

.wrongbook-result-card small {
  color: var(--muted);
}

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

.result-card-actions a {
  display: grid;
  place-items: center;
  height: 30px;
  border: 1px solid #b8dfd2;
  border-radius: var(--radius);
  color: var(--brand-strong);
  text-decoration: none;
  background: #fff;
  font-weight: 700;
}

body.is-immersive {
  background: #101815;
}

body.is-immersive .app-shell {
  grid-template-columns: 1fr;
}

body.is-immersive .task-rail,
body.is-immersive .inspector,
body.is-immersive .wrongbook-fab {
  display: none;
}

body.is-immersive .workspace-grid {
  grid-template-columns: 104px minmax(0, 1fr);
}

body.is-immersive .scanner-workspace,
body.is-immersive .document-stage {
  height: 100vh;
}

body.is-immersive .preview-shell {
  padding: 78px 30px 34px;
}

body.is-immersive .paper-preview img {
  max-width: min(90vw, 1320px);
  max-height: calc(100vh - 150px);
}

body.is-immersive .stage-controls {
  position: fixed;
  right: 32px;
  bottom: 28px;
}

body.is-immersive .recording-panel {
  position: fixed;
  right: 32px;
  bottom: 106px;
  max-width: min(720px, calc(100vw - 64px));
}

body.is-immersive .fullscreen-add-panel {
  position: fixed;
}

body.is-immersive.is-lens-presenting .workspace-tabbar,
body.is-immersive.is-lens-presenting .top-toolbar,
body.is-immersive.is-lens-presenting .page-strip {
  display: none !important;
}

body.is-immersive.is-lens-presenting .scanner-workspace {
  grid-template-rows: minmax(0, 1fr);
}

body.is-immersive.is-lens-presenting .workspace-grid {
  grid-row: 1;
  grid-template-columns: minmax(0, 1fr);
}

body.is-immersive.is-lens-presenting .lens-stage {
  inset: 0;
  border: 0;
  border-radius: 0;
}

body.is-controls-hidden .top-toolbar,
body.is-controls-hidden .page-strip,
body.is-controls-hidden .floating-tools,
body.is-controls-hidden .filter-popover,
body.is-controls-hidden .recording-panel {
  display: none !important;
}

body.is-controls-hidden .scanner-workspace {
  grid-template-rows: 0 minmax(0, 1fr);
}

body.is-controls-hidden .workspace-grid {
  grid-template-columns: minmax(0, 1fr);
}

body.is-controls-hidden .preview-shell {
  padding: 30px;
}

body.is-controls-hidden .stage-controls button:not(#toggle-presentation-controls) {
  display: none;
}

body.is-controls-hidden .stage-controls {
  background: rgba(255, 255, 255, 0.98);
}

.analysis-summary {
  display: grid;
  gap: 12px;
}

.score-box {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.score-ring {
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  border: 11px solid var(--brand);
  border-right-color: var(--amber);
  border-radius: 50%;
  background: #fff;
}

.score-ring strong {
  font-size: 20px;
}

.weak-list {
  display: grid;
  gap: 9px;
}

.weak-item {
  display: grid;
  grid-template-columns: 88px 1fr 42px;
  gap: 8px;
  align-items: center;
  color: #41574f;
  font-size: 12px;
}

.weak-item i {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f0ed;
}

.weak-item b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber), var(--red));
}

.primary-button,
.secondary-button,
.tool-button,
.icon-button,
.text-button {
  border-radius: var(--radius);
}

.primary-button,
.secondary-button,
.tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #25c494, var(--brand));
  box-shadow: 0 8px 18px rgba(14, 174, 123, 0.18);
}

.secondary-button,
.tool-button {
  color: #214a40;
  background: #fff;
  border-color: var(--line);
}

.secondary-button:hover,
.tool-button:hover,
.icon-button:hover,
.text-button:hover,
.filter-choice:hover,
.task-card:hover {
  border-color: #a8cec2;
  background: #f7fcfa;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.full {
  width: 100%;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  color: #304841;
  background: #fff;
}

.text-button {
  min-height: 28px;
  padding: 0 6px;
  border: 0;
  color: var(--brand-strong);
  background: transparent;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.pending {
  color: #53635f;
  background: #edf2f0;
}

.status-pill.processing {
  color: var(--blue);
  background: var(--blue-soft);
}

.status-pill.warning {
  color: #a45d13;
  background: var(--amber-soft);
}

.status-pill.error {
  color: var(--red);
  background: var(--red-soft);
}

.status-pill.done {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 86px;
  z-index: 25;
  width: max-content;
  max-width: min(320px, calc(100vw - 48px));
  padding: 12px 14px;
  border-radius: var(--radius);
  color: #fff;
  background: rgba(23, 47, 42, 0.92);
  box-shadow: var(--shadow);
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.is-immersive .toast {
  right: 28px;
  bottom: 28px;
}

.app-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(53, 62, 60, 0.34);
  backdrop-filter: blur(3px);
}

.app-dialog-backdrop[hidden] {
  display: none;
}

.app-dialog {
  position: relative;
  width: min(440px, calc(100vw - 48px));
  padding: 24px;
  border: 1px solid #d6dfdc;
  border-radius: 14px;
  color: #213a34;
  background: linear-gradient(180deg, #ffffff, #f4f7f6);
  box-shadow: 0 28px 80px rgba(25, 43, 38, 0.28);
  animation: app-dialog-enter 0.18s ease-out;
}

@keyframes app-dialog-enter {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.app-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #64746f;
  background: transparent;
  font-size: 20px;
}

.app-dialog-close:hover {
  border-color: #d5dfdc;
  background: #edf2f0;
}

.app-dialog-heading {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding-right: 28px;
}

.app-dialog-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #8a621d;
  background: #f5ead3;
  font-size: 20px;
  font-weight: 900;
}

.app-dialog h2 {
  margin: 1px 0 6px;
  font-size: 18px;
}

.app-dialog p {
  margin: 0;
  color: #60716c;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-line;
}

.app-dialog-input {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  color: #52645f;
  font-size: 12px;
  font-weight: 800;
}

.app-dialog-input[hidden] {
  display: none;
}

.app-dialog-input input {
  width: 100%;
  height: 40px;
  background: #fff;
}

.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #dce4e1;
}

.app-dialog-actions button {
  min-width: 84px;
  height: 38px;
}

.app-dialog-confirm.is-danger {
  border-color: #cf514b;
  background: #cf514b;
  box-shadow: 0 8px 18px rgba(207, 81, 75, 0.2);
}

.marking-readiness-backdrop {
  position: fixed;
  inset: 0;
  z-index: 91;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 39, 35, .58);
  backdrop-filter: blur(6px);
}

.marking-readiness-backdrop[hidden] { display: none; }

.marking-readiness-dialog {
  position: relative;
  width: min(940px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 22px;
  color: #173b34;
  background: linear-gradient(180deg,#fff 0%,#f4f8f6 100%);
  box-shadow: 0 32px 90px rgba(10,29,24,.36);
  animation: app-dialog-enter .18s ease-out;
}

.marking-readiness-header {
  display: grid;
  grid-template-columns: 48px minmax(0,1fr);
  gap: 14px;
  padding-right: 42px;
}

.marking-readiness-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg,#0aa77c,#16bf8e);
  box-shadow: 0 9px 22px rgba(10,167,124,.22);
  font-size: 24px;
  font-weight: 900;
}

.marking-readiness-header h2 { margin: 4px 0 6px; color: #173b34; font-size: 23px; }
.marking-readiness-header p { max-width: 740px; margin: 0; color: #5d716b; font-size: 13px; line-height: 1.6; }

.marking-readiness-content {
  display: grid;
  grid-template-columns: minmax(330px,.96fr) minmax(360px,1.04fr);
  gap: 20px;
  margin-top: 20px;
}

.marking-readiness-example {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid #d6e3df;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(28,62,52,.08);
}

.marking-readiness-image-wrap { position: relative; overflow: hidden; border-radius: 11px; background: #eceae3; }
.marking-readiness-image-wrap img { display: block; width: 100%; max-height: 390px; object-fit: cover; object-position: center; }
.marking-readiness-image-wrap > span { position: absolute; top: 10px; left: 10px; padding: 6px 10px; border-radius: 999px; color: #fff; background: rgba(8,132,96,.94); box-shadow: 0 5px 14px rgba(5,90,66,.24); font-size: 11px; font-weight: 850; }
.marking-readiness-example figcaption { margin-top: 10px; color: #657871; font-size: 11px; line-height: 1.55; }

.marking-readiness-checks { display: grid; min-width: 0; align-content: start; gap: 11px; }
.marking-readiness-checks section { padding: 15px 16px; border: 1px solid #d9e5e1; border-radius: 14px; background: #fff; }
.marking-readiness-checks section.is-ready { border-color: #b9dfd2; background: #f1fbf7; }
.marking-readiness-checks section.is-not-ready { border-color: #f0d3c4; background: #fff8f4; }
.marking-readiness-checks section > strong { display: flex; align-items: center; gap: 8px; color: #245247; font-size: 13px; }
.marking-readiness-checks section.is-not-ready > strong { color: #9c4d2e; }
.marking-readiness-checks section > strong i { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #fff; background: #12a77d; font-size: 11px; font-style: normal; }
.marking-readiness-checks section.is-not-ready > strong i { background: #df744c; }
.marking-readiness-checks ul { display: grid; gap: 7px; margin: 11px 0 0; padding: 0; list-style: none; }
.marking-readiness-checks li { position: relative; padding-left: 16px; color: #657871; font-size: 11px; line-height: 1.45; }
.marking-readiness-checks li::before { position: absolute; top: .55em; left: 2px; width: 5px; height: 5px; border-radius: 50%; background: #6ec1a8; content: ''; }
.marking-readiness-checks .is-not-ready li::before { background: #e4a187; }
.marking-readiness-file { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid #cfe0db; border-radius: 12px; color: #5f746d; background: #fff; font-size: 11px; }
.marking-readiness-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marking-readiness-file strong { color: #08795d; font-size: 12px; white-space: nowrap; }

.marking-readiness-actions { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #dce6e2; }
.marking-readiness-actions p { margin: 0; color: #71817c; font-size: 10px; line-height: 1.5; }
.marking-readiness-actions p strong { color: #ad5c34; }
.marking-readiness-actions > div { display: flex; gap: 9px; }
.marking-readiness-actions button { min-height: 40px; padding-inline: 16px; white-space: nowrap; }

@media (max-width: 760px) {
  .marking-readiness-backdrop { align-items: end; padding: 12px; }
  .marking-readiness-dialog { width: 100%; max-height: calc(100vh - 24px); padding: 18px; border-radius: 22px; }
  .marking-readiness-header { grid-template-columns: 42px minmax(0,1fr); gap: 11px; }
  .marking-readiness-icon { width: 42px; height: 42px; border-radius: 13px; font-size: 21px; }
  .marking-readiness-header h2 { font-size: 19px; }
  .marking-readiness-content { grid-template-columns: 1fr; }
  .marking-readiness-image-wrap img { max-height: 270px; }
  .marking-readiness-actions { grid-template-columns: 1fr; }
  .marking-readiness-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
  .marking-readiness-actions button { min-width: 0; padding-inline: 10px; }
}

.analysis-template-backdrop {
  position: fixed;
  inset: 0;
  z-index: 92;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(39, 51, 48, .48);
  backdrop-filter: blur(5px);
}

.analysis-template-backdrop[hidden] { display: none; }

.analysis-template-dialog {
  position: relative;
  width: min(920px, calc(100vw - 48px));
  max-height: min(860px, calc(100vh - 48px));
  overflow: auto;
  padding: 24px;
  border: 1px solid #d5e0dc;
  border-radius: 18px;
  color: #173b34;
  background: linear-gradient(180deg, #fff 0%, #f5f8f7 100%);
  box-shadow: 0 32px 90px rgba(16, 38, 31, .32);
  animation: app-dialog-enter .18s ease-out;
}

.analysis-template-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  padding-right: 38px;
}

.analysis-template-header .app-dialog-icon {
  width: 44px;
  height: 44px;
  color: #fff;
  background: linear-gradient(135deg, #0aa77c, #1768d6);
  font-size: 13px;
  letter-spacing: -.5px;
}

.analysis-template-header h2 {
  margin: 2px 0 6px;
  font-size: 22px;
}

.analysis-template-header p {
  margin: 0;
  color: #5d706a;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-line;
}

.analysis-template-fieldset {
  min-width: 0;
  margin: 20px 0 0;
  padding: 16px;
  border: 1px solid #d9e4e0;
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
}

.analysis-template-fieldset legend {
  padding: 0 8px;
  font-size: 14px;
  font-weight: 900;
}

.analysis-template-fieldset > p {
  margin: 0 0 12px;
  color: #6a7b76;
  font-size: 12px;
}

.analysis-generation-fieldset {
  min-width: 0;
  margin: 16px 0 0;
  padding: 14px 16px 16px;
  border: 1px solid #d9e4e0;
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
}

.analysis-generation-fieldset legend {
  padding: 0 8px;
  font-size: 14px;
  font-weight: 900;
}

.analysis-generation-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.analysis-generation-option {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 76px;
  padding: 12px 38px 12px 12px;
  border: 1px solid #d8e2df;
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.analysis-generation-option:hover { border-color: #74bdaa; transform: translateY(-1px); }
.analysis-generation-option:has(input:checked) { border-color: #11a77c; box-shadow: 0 0 0 2px rgba(17, 167, 124, .14); background: #f5fffb; }
.analysis-generation-option input { position: absolute; right: 12px; top: 12px; width: 18px; height: 18px; accent-color: #11a77c; }
.analysis-generation-option > span:last-child { display: grid; gap: 5px; }
.analysis-generation-option strong { color: #173b34; font-size: 14px; }
.analysis-generation-option strong em { display: inline-block; margin-left: 5px; padding: 2px 6px; border-radius: 999px; color: #087456; background: #dff7ef; font-size: 10px; font-style: normal; vertical-align: 1px; }
.analysis-generation-option small { color: #677a74; font-size: 12px; line-height: 1.5; }
.analysis-generation-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: #087456; background: #e5f7f1; font-size: 18px; font-weight: 900; }

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

.analysis-template-card {
  --template-accent: #1475d1;
  --template-accent-2: #11a780;
  --template-ink: #12346a;
  --template-surface: #eef7ff;
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 128px;
  padding: 10px;
  border: 1px solid #d9e2df;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.analysis-template-card:hover {
  border-color: color-mix(in srgb, var(--template-accent) 58%, #d9e2df);
  transform: translateY(-1px);
}

.analysis-template-card:has(input:checked) {
  border-color: var(--template-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--template-accent) 18%, transparent), 0 10px 24px rgba(21, 54, 44, .09);
}

.analysis-template-context { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 10px; margin: 10px 0 14px; }
.analysis-template-match { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 9px; margin: 0; padding: 10px 12px; border: 1px solid #c9e1d9; border-radius: 10px; color: #527068; background: #f2faf7; font-size: 11px; line-height: 1.45; }
.analysis-template-match strong { padding: 4px 7px; border-radius: 999px; color: #fff; background: #0b8f6b; font-size: 10px; white-space: nowrap; }
.analysis-template-context-controls { display: grid; grid-template-columns: 106px 122px; gap: 7px; min-width: 245px; padding: 8px 10px; border: 1px solid #d6e2de; border-radius: 10px; background: #fff; }
.analysis-template-context-controls label { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 5px; color: #49645c; font-size: 10px; font-weight: 800; }
.analysis-template-context-controls select { min-width: 0; height: 30px; padding: 0 24px 0 8px; border: 1px solid #c8d9d3; border-radius: 7px; color: #173b34; background: #f8fbfa; font-size: 11px; font-weight: 750; }
.analysis-template-context-controls small { grid-column: 1 / -1; color: #72837e; font-size: 9px; line-height: 1.35; }
.analysis-template-card.is-recommended::after { position: absolute; right: 9px; bottom: 8px; padding: 3px 6px; border-radius: 999px; color: #fff; background: linear-gradient(135deg,#0b9871,#147dd1); box-shadow: 0 4px 10px rgba(10,139,104,.18); content: "学段学科推荐"; font-size: 8px; font-weight: 850; }

.analysis-template-card input {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 18px;
  height: 18px;
  accent-color: var(--template-accent);
}

.analysis-template-preview {
  position: relative;
  display: block;
  width: 104px;
  height: 104px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--template-accent) 32%, #dfe7e4);
  border-radius: 9px;
  background: var(--template-surface);
}

.analysis-template-preview i { position: absolute; display: block; }
.analysis-template-preview .mini-title { inset: 0 0 auto; height: 20px; background: var(--template-ink); }
.analysis-template-preview .mini-metrics { top: 27px; left: 7px; width: 90px; height: 15px; border-radius: 3px; background: repeating-linear-gradient(90deg, var(--template-accent) 0 15px, transparent 15px 18px); opacity: .9; }
.analysis-template-preview .mini-donut { top: 50px; left: 8px; width: 34px; height: 34px; border: 7px solid var(--template-accent-2); border-right-color: #ef584f; border-radius: 50%; }
.analysis-template-preview .mini-bars { top: 52px; right: 7px; width: 48px; height: 31px; background: repeating-linear-gradient(180deg, var(--template-accent) 0 5px, transparent 5px 10px); clip-path: polygon(0 0, 100% 0, 100% 18%, 68% 18%, 68% 50%, 86% 50%, 86% 68%, 47% 68%, 47% 100%, 0 100%); }
.analysis-template-preview .mini-notes { left: 7px; right: 7px; bottom: 7px; height: 8px; border-radius: 2px; background: color-mix(in srgb, var(--template-accent) 28%, white); }

.analysis-template-name { display: grid; gap: 6px; padding-right: 18px; }
.analysis-template-name strong { color: var(--template-ink); font-size: 15px; }
.analysis-template-name small { color: #6c7b77; font-size: 12px; }

.theme-warm-orange { --template-accent: #ff6a28; --template-accent-2: #36b86d; --template-ink: #7a2608; --template-surface: #fff6e9; }
.theme-future-purple { --template-accent: #965bff; --template-accent-2: #33d7f1; --template-ink: #e8e8ff; --template-surface: #090737; background: #12104b; }
.theme-future-purple .analysis-template-name small { color: #bbb8ed; }
.theme-campus-green { --template-accent: #16a663; --template-accent-2: #62cc87; --template-ink: #0b5f39; --template-surface: #f1fff4; }
.theme-cyber-blue { --template-accent: #00c8ef; --template-accent-2: #5cff98; --template-ink: #a9ecff; --template-surface: #00122d; background: #061a37; }
.theme-cyber-blue .analysis-template-name small { color: #a5bed5; }
.theme-youth-color { --template-accent: #f63483; --template-accent-2: #15b8c4; --template-ink: #25175b; --template-surface: #fff5fb; }

.analysis-template-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.analysis-template-choice {
  color: #147c61;
  font-size: 13px;
  font-weight: 800;
}

.analysis-template-actions button { min-width: 94px; height: 40px; }

.report-review-backdrop {
  position: fixed;
  inset: 0;
  z-index: 94;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(32, 46, 42, .56);
  backdrop-filter: blur(6px);
}

.report-review-backdrop[hidden] { display: none; }

.report-review-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1420px, calc(100vw - 48px));
  height: min(920px, calc(100vh - 48px));
  overflow: hidden;
  padding: 24px;
  border: 1px solid #d2dfda;
  border-radius: 18px;
  color: #173b34;
  background: linear-gradient(180deg, #fff 0%, #f4f8f6 100%);
  box-shadow: 0 32px 90px rgba(13, 36, 29, .34);
  animation: app-dialog-enter .18s ease-out;
}

.report-review-header { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding-right: 38px; }
.report-review-header .app-dialog-icon { color: #fff; background: linear-gradient(135deg, #0aa77c, #1768d6); }
.report-review-header h2 { margin: 2px 0 6px; font-size: 22px; }
.report-review-header p { margin: 0; color: #5d706a; font-size: 13px; line-height: 1.6; }
.report-review-workspace { display: grid; grid-template-columns: minmax(390px, .9fr) minmax(520px, 1.1fr); min-height: 0; gap: 18px; margin-top: 18px; }
.report-review-preview-pane { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; overflow: hidden; border: 1px solid #cfddd8; border-radius: 14px; background: #e9efed; }
.report-review-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #d1ddd9; background: rgba(255, 255, 255, .88); }
.report-review-preview-heading > div { display: grid; gap: 3px; min-width: 0; }
.report-review-preview-heading strong { color: #173b34; font-size: 14px; }
.report-review-preview-heading small { overflow: hidden; color: #677a74; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.report-review-preview-heading small.has-mismatch { color: #b44a2c; font-weight: 800; }
.report-review-preview-heading > span { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; color: #087759; background: #e5f7f0; font-size: 11px; font-weight: 800; }
.report-review-preview-heading > span i { width: 7px; height: 7px; border-radius: 50%; background: #10a97c; box-shadow: 0 0 0 4px rgba(16, 169, 124, .12); }
.report-review-preview-heading > span.is-updating i { animation: report-preview-pulse .55s ease-out; }
.report-review-preview-scroll { min-height: 0; overflow: auto; padding: 16px; scrollbar-gutter: stable; }
.report-review-preview {
  --report-preview-bg: #f2f5f9;
  --report-preview-surface: #fff;
  --report-preview-header: #081f3a;
  --report-preview-header-2: #164f88;
  --report-preview-accent: #1769d2;
  --report-preview-accent-2: #0c9477;
  --report-preview-ink: #10263f;
  --report-preview-muted: #53687d;
  --report-preview-border: #c8d5e3;
  --report-preview-danger: #d84545;
  --report-preview-warning: #d79222;
  min-height: 820px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--report-preview-border);
  border-radius: 3px;
  color: var(--report-preview-ink);
  background: var(--report-preview-bg);
  box-shadow: 0 14px 35px rgba(27, 49, 42, .2);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}
.report-review-preview.report-export-snapshot { margin: 0; box-shadow: none; }
.report-export-snapshot .report-decoration-item { border-color: transparent !important; background: transparent !important; box-shadow: none !important; cursor: default; pointer-events: none; }
.report-export-snapshot [data-report-decoration-remove],
.report-export-snapshot [data-report-decoration-rotate],
.report-export-snapshot [data-report-decoration-resize] { display: none !important; }
.report-review-preview.report-preview-theme-warm_orange { --report-preview-bg: #f8f3ec; --report-preview-surface: #fffdf9; --report-preview-header: #321d15; --report-preview-header-2: #8a3a16; --report-preview-accent: #cf5419; --report-preview-accent-2: #11816b; --report-preview-ink: #3c2419; --report-preview-muted: #755d50; --report-preview-border: #decdbb; --report-preview-danger: #c83e38; --report-preview-warning: #c58a1b; }
.report-review-preview.report-preview-theme-future_purple { --report-preview-bg: #070a1b; --report-preview-surface: #11172f; --report-preview-header: #080b1d; --report-preview-header-2: #422184; --report-preview-accent: #8d5cf6; --report-preview-accent-2: #25c7df; --report-preview-ink: #f3f1ff; --report-preview-muted: #aaa7c9; --report-preview-border: #3e4772; --report-preview-danger: #f05b7f; --report-preview-warning: #e4af45; }
.report-review-preview.report-preview-theme-campus_green { --report-preview-bg: #f1f6f2; --report-preview-surface: #fff; --report-preview-header: #0a3529; --report-preview-header-2: #176d4d; --report-preview-accent: #16845c; --report-preview-accent-2: #6aad55; --report-preview-ink: #183a2e; --report-preview-muted: #5d7269; --report-preview-border: #c6d9ce; --report-preview-danger: #d9573d; --report-preview-warning: #c69328; }
.report-review-preview.report-preview-theme-cyber_blue { --report-preview-bg: #020d1b; --report-preview-surface: #071d33; --report-preview-header: #031326; --report-preview-header-2: #064a70; --report-preview-accent: #08bddb; --report-preview-accent-2: #58df91; --report-preview-ink: #e8f9ff; --report-preview-muted: #95b4c4; --report-preview-border: #175776; --report-preview-danger: #ff6863; --report-preview-warning: #bad94f; }
.report-review-preview.report-preview-theme-youth_color { --report-preview-bg: #f7f3f8; --report-preview-surface: #fff; --report-preview-header: #281743; --report-preview-header-2: #7b2557; --report-preview-accent: #e43d71; --report-preview-accent-2: #138fa3; --report-preview-ink: #291d3e; --report-preview-muted: #70657f; --report-preview-border: #d9cbdc; --report-preview-danger: #d93662; --report-preview-warning: #cf8d20; }
.report-review-preview.report-preview-stage-primary .report-preview-card, .report-review-preview.report-preview-stage-primary .report-preview-metric, .report-review-preview.report-preview-stage-primary .report-preview-accuracy-hero { border-radius: 14px; }
.report-review-preview.report-preview-stage-primary .report-preview-cover h3 { letter-spacing: 0; }
.report-review-preview.report-preview-stage-senior .report-preview-card, .report-review-preview.report-preview-stage-senior .report-preview-metric, .report-review-preview.report-preview-stage-senior .report-preview-accuracy-hero { border-radius: 6px; }
.report-review-preview.report-preview-stage-senior .report-preview-cover h3 { letter-spacing: -.035em; }
.report-preview-cover { position: relative; padding: 21px 24px 24px; overflow: hidden; color: #fff; background: linear-gradient(120deg, var(--report-preview-header), var(--report-preview-header-2)); }
.report-preview-cover::before, .report-preview-cover::after { position: absolute; z-index: 0; content: ""; pointer-events: none; }
.report-preview-cover::after { right: -45px; bottom: -90px; width: 220px; height: 220px; border: 2px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 36px rgba(255,255,255,.05), 0 0 0 76px rgba(255,255,255,.035); }
.report-preview-theme-academic_blue .report-preview-cover::before { top: -40px; right: 30px; width: 170px; height: 230px; opacity: .14; background: repeating-linear-gradient(120deg,#fff 0 2px,transparent 2px 28px); }
.report-preview-theme-future_purple .report-preview-cover::before { inset: 0 0 0 52%; opacity: .18; background: radial-gradient(circle at 12% 28%,#fff 0 3px,transparent 4px),radial-gradient(circle at 58% 62%,#fff 0 4px,transparent 5px),linear-gradient(32deg,transparent 35%,#fff 36% 37%,transparent 38%); }
.report-preview-theme-campus_green .report-preview-cover::after { border-radius: 70% 0 0; transform: rotate(-18deg); }
.report-preview-theme-cyber_blue .report-preview-cover::before { inset: 0 0 0 55%; opacity: .13; background-image: linear-gradient(#fff 1px,transparent 1px),linear-gradient(90deg,#fff 1px,transparent 1px); background-size: 28px 28px; }
.report-preview-theme-youth_color .report-preview-cover::before { top: -30px; right: 86px; width: 48px; height: 210px; background: rgba(255,255,255,.12); transform: rotate(18deg); }
.report-preview-cover > * { position: relative; z-index: 1; }
.report-preview-cover-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 15px; font-size: 9px; font-weight: 800; letter-spacing: .09em; }
.report-preview-cover-meta span { display: flex; align-items: center; gap: 8px; opacity: .78; }
.report-preview-cover-meta span::before { width: 26px; height: 3px; background: var(--report-preview-accent); content: ""; }
.report-preview-cover-meta b { padding: 5px 9px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: rgba(255,255,255,.09); font-size: 9px; letter-spacing: 0; }
.report-preview-cover h3 { margin: 0 0 9px; color: inherit; font-size: clamp(23px, 2.2vw, 30px); font-weight: 900; line-height: 1.22; letter-spacing: -.02em; }
.report-preview-cover p { margin: 0; opacity: .82; font-size: 12px; font-weight: 600; }
.report-preview-content { display: grid; gap: 14px; padding: 18px; }
.report-preview-metrics { display: grid; grid-template-columns: minmax(185px,1.75fr) repeat(4,minmax(0,1fr)); gap: 8px; }
.report-preview-accuracy-hero { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 48px; grid-template-rows: 1fr auto auto; align-items: center; min-width: 0; min-height: 128px; padding: 12px 13px; overflow: hidden; border: 1px solid color-mix(in srgb,var(--report-preview-accent) 35%,var(--report-preview-border)); border-radius: 9px; background: radial-gradient(circle at 85% 20%,color-mix(in srgb,var(--report-preview-accent-2) 14%,transparent),transparent 43%),linear-gradient(145deg,var(--report-preview-surface),color-mix(in srgb,var(--report-preview-accent) 7%,var(--report-preview-surface))); box-shadow: 0 10px 24px rgba(20,35,50,.11); }
.report-preview-accuracy-hero::before { position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(180deg,var(--report-preview-accent),var(--report-preview-accent-2)); content: ""; }
.report-preview-accuracy-hero strong { align-self: end; color: var(--report-preview-accent); font-size: clamp(39px,4.1vw,56px); font-weight: 950; font-variant-numeric: tabular-nums; letter-spacing: -2.8px; line-height: .92; text-shadow: 0 8px 24px color-mix(in srgb,var(--report-preview-accent) 19%,transparent); transform: translateY(-8px); }
.report-preview-accuracy-hero strong sup { margin-left: 2px; font-size: .5em; letter-spacing: -.5px; vertical-align: super; }
.report-preview-accuracy-hero > i { grid-column: 2; grid-row: 1 / 3; display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid color-mix(in srgb,var(--report-preview-accent-2) 65%,#fff); border-radius: 50%; color: #fff; background: linear-gradient(145deg,var(--report-preview-accent-2),var(--report-preview-accent)); box-shadow: 0 8px 18px color-mix(in srgb,var(--report-preview-accent) 27%,transparent),inset 0 1px 0 rgba(255,255,255,.35); font-size: 22px; font-style: normal; font-weight: 900; transform: translateY(40px); }
.report-preview-accuracy-hero > small { color: var(--report-preview-ink); font-size: 13px; font-weight: 900; letter-spacing: .04em; }
.report-preview-accuracy-hero > span { grid-column: 1 / -1; margin-top: 5px; color: var(--report-preview-muted); font-size: 8px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.report-preview-metric { position: relative; display: grid; grid-template-rows: auto 1fr auto; align-items: center; justify-items: center; min-width: 0; min-height: 128px; padding: 12px 6px 10px; overflow: hidden; border: 1px solid var(--report-preview-border); border-radius: 9px; background: var(--report-preview-surface); box-shadow: 0 7px 16px rgba(20,35,50,.08); text-align: center; }
.report-preview-metric::before { position: absolute; inset: 0 0 auto; height: 4px; background: var(--metric-color, var(--report-preview-accent)); content: ""; }
.report-preview-metric i { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: #fff; background: var(--metric-color, var(--report-preview-accent)); font-size: 11px; font-style: normal; font-weight: 900; line-height: 1; }
.report-preview-metric small { max-width: 100%; color: var(--report-preview-muted); font-size: 10px; font-weight: 750; white-space: nowrap; }
.report-preview-metric strong { max-width: 100%; margin-top: 8px; color: var(--metric-color, var(--report-preview-accent)); font-size: clamp(20px,2vw,27px); font-weight: 950; font-variant-numeric: tabular-nums; letter-spacing: -1.2px; line-height: 1; white-space: nowrap; }
.report-preview-metric.is-rate strong { padding-inline: 2px; font-size: clamp(16px,1.55vw,21px); letter-spacing: -1px; }
.report-preview-card { min-width: 0; padding: 15px; border: 1px solid var(--report-preview-border); border-radius: 10px; background: var(--report-preview-surface); box-shadow: 0 5px 15px rgba(20,35,50,.045); }
.report-preview-card h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--report-preview-ink); font-size: 14px; font-weight: 850; }
.report-preview-card h4::before { width: 4px; height: 20px; border-radius: 3px; background: var(--report-preview-accent); content: ""; }
.report-preview-card h4 > i { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; border-radius: 8px; color: #fff; background: linear-gradient(145deg, var(--report-preview-accent), var(--report-preview-accent-2)); font-size: 12px; font-style: normal; }
.report-preview-conclusion p { margin: 0; color: var(--report-preview-muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.report-preview-insights { display: grid; grid-template-columns: .86fr 1.14fr; gap: 10px; }
.report-preview-score { display: grid; place-items: center; }
.report-preview-ring { display: grid; place-items: center; width: 112px; height: 112px; margin: 4px auto 13px; border-radius: 50%; background: conic-gradient(var(--report-preview-accent-2) calc(var(--report-preview-accuracy, 0) * 1%), color-mix(in srgb, var(--report-preview-border) 55%, transparent) 0); transform: translateX(18px); }
.report-preview-ring::before { grid-area: 1 / 1; width: 80px; height: 80px; border-radius: 50%; background: var(--report-preview-surface); content: ""; }
.report-preview-ring span { z-index: 1; grid-area: 1 / 1; display: grid; color: var(--report-preview-ink); font-size: 19px; font-weight: 950; text-align: center; }
.report-preview-ring small { display: block; margin-top: 3px; color: var(--report-preview-muted); font-size: 9px; font-weight: 700; }
.report-preview-statline { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; color: var(--report-preview-muted); font-size: 10px; font-weight: 700; }
.report-preview-bars { display: grid; width: 100%; gap: 10px; }
.report-preview-score .report-preview-bars { margin-top: 5px; }
.report-preview-bar { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; }
.report-preview-row-icon { display: grid; place-items: center; width: 32px; height: 32px; color: var(--bar-color, var(--report-preview-accent)); font-style: normal; }
.report-preview-row-icon svg { width: 27px; height: 27px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.report-preview-bar > div { display: grid; min-width: 0; gap: 4px; }
.report-preview-bar > div > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; color: var(--report-preview-ink); font-size: 11px; }
.report-preview-bar > div > span b { overflow: hidden; min-width: 0; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.report-preview-bar > div > span small { flex: 0 0 auto; color: var(--report-preview-muted); font-size: inherit; }
.report-preview-bar em { display: block; height: 11px; overflow: hidden; border-radius: 9px; background: color-mix(in srgb, var(--report-preview-border) 55%, transparent); box-shadow: inset 0 1px 2px rgba(20,40,35,.08); }
.report-preview-bar em > b { display: block; height: 100%; border-radius: inherit; background: var(--bar-color, var(--report-preview-accent)); }
.report-preview-reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.report-preview-reason { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 10px; min-width: 0; padding: 10px 11px; border: 1px solid color-mix(in srgb, var(--reason-color, var(--report-preview-accent)) 28%, transparent); border-radius: 9px; color: var(--report-preview-ink); background: color-mix(in srgb, var(--reason-color, var(--report-preview-accent)) 7%, var(--report-preview-surface)); }
.report-preview-reason-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; background: var(--reason-color, var(--report-preview-accent)); font-size: 16px; font-style: normal; }
.report-preview-reason-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.report-preview-reason > div { display: grid; min-width: 0; gap: 5px; }
.report-preview-reason > div > span { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.report-preview-reason > div > span b { overflow: hidden; min-width: 0; color: var(--report-preview-ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.report-preview-reason strong { flex: 0 0 auto; color: var(--reason-color, var(--report-preview-accent)); font-size: 12px; }
.report-preview-reason em { display: block; height: 6px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--report-preview-border) 48%, transparent); }
.report-preview-reason em b { display: block; height: 100%; border-radius: inherit; background: var(--reason-color, var(--report-preview-accent)); }
.report-preview-weakness { display: flex; flex-direction: column; }
.report-preview-weakness > .report-preview-bars { flex: 0 0 auto; }
.report-preview-advantage { display: grid; grid-template-columns: 38px auto minmax(0,1fr); align-items: center; gap: 8px; min-height: 62px; margin-top: auto; padding: 10px 12px; border: 1px solid color-mix(in srgb,var(--report-preview-accent-2) 34%,var(--report-preview-border)); border-radius: 10px; color: var(--report-preview-ink); background: linear-gradient(100deg,color-mix(in srgb,var(--report-preview-accent-2) 10%,var(--report-preview-surface)),var(--report-preview-surface)); box-shadow: 0 7px 18px rgba(20,55,45,.06); }
.report-preview-advantage > i { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 12px 12px 16px 16px; color: #fff; background: linear-gradient(145deg,var(--report-preview-accent-2),var(--report-preview-accent)); box-shadow: 0 5px 12px color-mix(in srgb,var(--report-preview-accent) 22%,transparent); font-size: 18px; font-style: normal; font-weight: 900; }
.report-preview-advantage > strong { color: var(--report-preview-accent-2); font-size: 12px; white-space: nowrap; }
.report-preview-advantage > span { padding-left: 8px; border-left: 1px solid var(--report-preview-border); font-size: 10px; font-weight: 700; line-height: 1.5; }
.report-preview-advice { position: relative; overflow: hidden; }
.report-preview-advice::after { position: absolute; z-index: 0; top: 52px; right: 14px; bottom: 14px; width: clamp(70px,17%,92px); border-left: 1px solid color-mix(in srgb,var(--report-preview-border) 70%,transparent); border-radius: 0 9px 9px 0; background: radial-gradient(circle at 68% 46%,color-mix(in srgb,var(--report-preview-accent-2) 9%,transparent),transparent 62%); content: ""; pointer-events: none; }
.report-preview-suggestions { position: relative; z-index: 1; display: grid; gap: 9px; margin: 0; padding: 0 clamp(82px,20%,108px) 0 0; list-style: none; }
.report-preview-suggestions li { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: start; gap: 8px; color: var(--report-preview-ink); font-size: 11px; font-weight: 600; line-height: 1.55; }
.report-preview-suggestions b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; background: var(--report-preview-accent); font-size: 10px; }
.report-preview-footer { padding: 11px; color: #fff; background: var(--report-preview-header); font-size: 10px; font-weight: 800; text-align: center; letter-spacing: .03em; }
.report-review-editor { min-width: 0; min-height: 0; overflow: auto; padding-right: 4px; scrollbar-gutter: stable; }
.report-review-body { display: grid; gap: 14px; }
.report-review-section { padding: 14px; border: 1px solid #d9e4e0; border-radius: 12px; background: #fff; }
.report-review-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.report-review-section-heading span { color: #0b8061; font-size: 13px; font-weight: 900; }
.report-style-selector { padding: 14px; border: 1px solid #d4e1dd; border-radius: 12px; background: #fff; }
.report-style-selector > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.report-style-selector .eyebrow { color: #0a8564; font-size: 9px; letter-spacing: .08em; }
.report-style-selector h3 { margin: 3px 0 0; color: #173b34; font-size: 14px; }
.report-style-selector > header > small { color: #72857f; font-size: 9px; text-align: right; }
.report-style-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.report-style-options button { --style-accent:#1872ca; position: relative; display: grid; grid-template-columns: 54px minmax(0,1fr); align-items: center; gap: 8px; min-width: 0; min-height: 72px; padding: 8px; border: 1px solid #d7e1de; border-radius: 9px; color: #48635b; background: #fbfdfc; text-align: left; }
.report-style-options button:hover { border-color: color-mix(in srgb,var(--style-accent) 58%,#d7e1de); transform: translateY(-1px); }
.report-style-options button.is-selected { border-color: var(--style-accent); color: #173f35; background: color-mix(in srgb,var(--style-accent) 7%,#fff); box-shadow: 0 0 0 2px color-mix(in srgb,var(--style-accent) 14%,transparent); }
.report-style-options button > i { display: grid; grid-template-columns: repeat(3,1fr); grid-template-rows: 13px 1fr 7px; gap: 3px; width: 54px; height: 52px; padding: 5px; border: 1px solid color-mix(in srgb,var(--style-accent) 32%,#dbe5e1); border-radius: 6px; background: color-mix(in srgb,var(--style-accent) 7%,#fff); }
.report-style-options button > i b { display: block; border-radius: 2px; background: color-mix(in srgb,var(--style-accent) 74%,#fff); }
.report-style-options button > i b:first-child { grid-column: 1 / -1; background: var(--style-accent); }
.report-style-options button > i b:last-child { grid-column: 1 / -1; }
.report-style-options button > span { display: grid; min-width: 0; gap: 4px; }
.report-style-options button strong { overflow: hidden; color: inherit; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.report-style-options button small { display: -webkit-box; overflow: hidden; color: #7b8c87; font-size: 8px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.report-style-options button > em { position: absolute; top: 5px; right: 5px; padding: 2px 4px; border-radius: 999px; color: #fff; background: var(--style-accent); font-size: 7px; font-style: normal; font-weight: 850; }
.report-copy-template-panel { padding: 16px; border: 1px solid #bddfd4; border-radius: 13px; background: linear-gradient(145deg,#f8fffc,#f1f8f5); box-shadow: 0 8px 22px rgba(20,82,65,.055); }
.report-copy-template-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.report-copy-template-panel > header > div { min-width: 0; }
.report-copy-template-panel .eyebrow { color: #078362; font-size: 10px; letter-spacing: .08em; }
.report-copy-template-panel h3 { margin: 5px 0 7px; color: #173d33; font-size: 16px; }
.report-copy-template-panel header p { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.report-copy-template-panel header p span { padding: 4px 7px; overflow: hidden; border: 1px solid #d4e6e0; border-radius: 999px; color: #4b6b62; background: rgba(255,255,255,.86); font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.report-copy-template-panel header p span:last-child { max-width: 240px; }
.report-copy-template-panel header p .is-smart-reason { max-width: 100%; color: #176b55; border-color: #b9ddcf; background: #eaf8f2; }
.report-copy-recommend-badge { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; color: #fff; background: linear-gradient(135deg,#0a9a72,#0b7fbe); box-shadow: 0 5px 14px rgba(10,139,104,.18); font-size: 10px; font-weight: 850; }
.report-copy-template-options { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; margin-top: 14px; }
.report-copy-template-options button { display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; gap: 7px; min-width: 0; min-height: 68px; padding: 8px; border: 1px solid #d1e0dc; border-radius: 10px; color: #446159; background: #fff; text-align: left; }
.report-copy-template-options button:hover { border-color: #75bda8; background: #f8fffc; transform: translateY(-1px); }
.report-copy-template-options button.is-selected { border-color: #0a9871; color: #17604d; background: #e9f8f2; box-shadow: 0 0 0 2px rgba(10,152,113,.12),0 6px 14px rgba(15,100,75,.08); }
.report-copy-template-options button > i { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 7px; color: #fff; background: #91aaa2; font-size: 10px; font-style: normal; font-weight: 900; }
.report-copy-template-options button.is-selected > i { background: #0a9871; }
.report-copy-template-options button > span { display: grid; min-width: 0; gap: 4px; }
.report-copy-template-options strong { display: flex; align-items: center; gap: 4px; overflow: hidden; color: inherit; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.report-copy-template-options strong em { padding: 2px 4px; border-radius: 4px; color: #08785a; background: #cdf0e3; font-size: 7px; font-style: normal; }
.report-copy-template-options small { display: -webkit-box; overflow: hidden; color: #7a8d87; font-size: 8px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.report-copy-template-panel > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #d8e7e2; }
.report-copy-template-panel > footer > span { min-width: 0; color: #60766f; font-size: 9px; line-height: 1.45; }
.report-copy-template-panel > footer > div { display: flex; flex: 0 0 auto; gap: 7px; }
.report-copy-template-panel > footer button { min-height: 34px; padding: 0 10px; font-size: 10px; }
.report-advantage-editor { padding: 15px; border: 1px solid #cddfd9; border-radius: 13px; background: linear-gradient(145deg,#ffffff,#f5faf8); }
.report-advantage-editor > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.report-advantage-editor .eyebrow { color: #0b8263; font-size: 9px; letter-spacing: .07em; }
.report-advantage-editor h3 { margin: 4px 0 0; color: #173d33; font-size: 15px; }
.report-advantage-toggle { display: flex; align-items: center; flex: 0 0 auto; gap: 6px; min-height: 30px; padding: 0 9px; border: 1px solid #bee0d4; border-radius: 999px; color: #17624f; background: #ecf9f4; font-size: 9px; font-weight: 800; cursor: pointer; }
.report-advantage-toggle input { accent-color: #0b9b72; }
.report-advantage-options { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; margin-top: 12px; }
.report-advantage-options button { display: grid; grid-template-columns: 23px minmax(0,1fr); align-items: center; gap: 6px; min-width: 0; min-height: 61px; padding: 7px; border: 1px solid #d3e1dd; border-radius: 9px; color: #456259; background: #fff; text-align: left; }
.report-advantage-options button.is-selected { border-color: #0b9b72; color: #155e4b; background: #eaf8f2; box-shadow: 0 0 0 2px rgba(11,155,114,.11); }
.report-advantage-options button > i { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 7px; color: #fff; background: #90aaa2; font-size: 9px; font-style: normal; font-weight: 900; }
.report-advantage-options button.is-selected > i { background: #0b9b72; }
.report-advantage-options button > span { display: grid; min-width: 0; gap: 3px; }
.report-advantage-options strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.report-advantage-options small { display: -webkit-box; overflow: hidden; color: #788b85; font-size: 8px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.report-advantage-options.is-disabled { opacity: .45; pointer-events: none; filter: grayscale(.5); }
.report-advantage-text { display: grid; grid-template-columns: auto minmax(220px,1fr); align-items: center; gap: 10px; margin-top: 11px; }
.report-advantage-text > span { display: grid; gap: 2px; color: #294d43; font-size: 10px; }
.report-advantage-text small { color: #7a8c86; font-size: 8px; font-weight: 500; }
.report-advantage-text input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid #cedcd7; border-radius: 8px; color: #173b32; background: #fff; font: inherit; }
.report-advantage-editor > p { margin: 8px 0 0; color: #6b7e77; font-size: 9px; }
.report-review-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.report-review-metrics label, .report-review-field { display: grid; gap: 7px; }
.report-review-metrics label > span, .report-review-field > span { color: #536963; font-size: 12px; font-weight: 800; }
.report-review-metrics input, .report-review-field textarea { width: 100%; border: 1px solid #cedbd7; border-radius: 9px; color: #173b34; background: #fff; font: inherit; outline: none; }
.report-review-metrics input { height: 40px; padding: 0 11px; }
.report-review-field textarea { min-height: 112px; padding: 10px 11px; line-height: 1.55; resize: vertical; }
.report-review-metrics input:focus, .report-review-field textarea:focus { border-color: #11a77c; box-shadow: 0 0 0 3px rgba(17, 167, 124, .12); }
.report-review-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.report-review-field { padding: 14px; border: 1px solid #d9e4e0; border-radius: 12px; background: #fff; }
.report-review-field.is-wide { grid-column: 1 / -1; }
.report-review-field > span { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.report-review-field > span strong { color: #173b34; font-size: 14px; }
.report-review-field > span small { color: #7a8b86; font-size: 11px; font-weight: 500; }
.report-review-field.is-full textarea { min-height: 88px; }
.report-decoration-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.report-decoration-panel { min-width: 0; padding: 14px; border: 1px solid #d9e4e0; border-radius: 12px; background: #fff; }
.report-decoration-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.report-decoration-panel-heading > span { display: grid; gap: 3px; min-width: 0; }
.report-decoration-panel-heading strong { color: #173b34; font-size: 14px; }
.report-decoration-panel-heading small { color: #7a8b86; font-size: 10px; }
.report-decoration-panel-heading button { flex: none; min-height: 32px; padding: 0 10px; font-size: 11px; }
.report-decoration-panel > p { margin: 9px 0 11px; color: #71837d; font-size: 10px; line-height: 1.5; }
.report-logo-library { display: grid; grid-template-columns: repeat(3, minmax(82px, 1fr)); gap: 9px; min-height: 96px; }
.report-logo-library-item { position: relative; display: grid; grid-template-rows: 76px auto; min-width: 0; gap: 5px; }
.report-logo-library-item > button:first-child { display: grid; place-items: center; min-width: 0; width: 100%; height: 76px; padding: 8px; overflow: hidden; border: 1px solid #d6e1de; border-radius: 9px; background: repeating-conic-gradient(#f1f5f3 0 25%,#fff 0 50%) 50% / 12px 12px; }
.report-logo-library-item.is-active > button:first-child { border-color: #10a77c; box-shadow: 0 0 0 2px rgba(16, 167, 124, .15); background: #ecfbf5; }
.report-logo-library-item > button:first-child img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; }
.report-logo-library-item > span { display: -webkit-box; overflow: hidden; min-height: 24px; color: #5d716a; font-size: 9px; line-height: 1.35; text-align: center; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.report-logo-library-item > button:last-child { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 1px solid #f1c5c1; border-radius: 50%; color: #b23b33; background: #fff4f2; font-size: 12px; line-height: 1; }
.report-decoration-empty { grid-column: 1 / -1; display: grid; place-items: center; min-height: 60px; border: 1px dashed #cfddd8; border-radius: 9px; color: #8a9994; }
.report-system-icon-library { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.report-system-icon-library button { display: grid; place-items: center; min-width: 0; min-height: 61px; padding: 6px 3px; border: 1px solid #d9e3df; border-radius: 9px; color: #526b63; background: #f8fbfa; }
.report-system-icon-library button:hover { border-color: #79b9a7; transform: translateY(-1px); }
.report-system-icon-library button.is-active { border-color: #10a77c; color: #08765a; background: #eaf9f3; box-shadow: 0 0 0 2px rgba(16, 167, 124, .12); }
.report-system-icon-library i { font-size: 21px; font-style: normal; line-height: 1; }
.report-system-icon-library span { overflow: hidden; width: 100%; margin-top: 4px; font-size: 8px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.report-decoration-overlay { position: absolute; inset: 0; z-index: 8; overflow: hidden; pointer-events: none; }
.report-decoration-item { position: absolute; z-index: 1; display: grid; place-items: center; min-width: 28px; min-height: 28px; border: 1px solid transparent; touch-action: none; user-select: none; pointer-events: auto; cursor: grab; }
.report-decoration-item.is-system_icon { container-type: inline-size; }
.report-decoration-item:hover, .report-decoration-item.is-selected, .report-decoration-item.is-moving, .report-decoration-item.is-resizing, .report-decoration-item.is-rotating { border-color: #10a77c; background: rgba(255,255,255,.15); box-shadow: 0 0 0 2px rgba(16,167,124,.15); }
.report-decoration-item.is-moving { cursor: grabbing; }
.report-decoration-item > img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 3px 5px rgba(14, 43, 34, .16)); }
.report-decoration-item > span { display: grid; place-items: center; width: 100%; height: 100%; font-size: 76cqw; line-height: 1; filter: drop-shadow(0 4px 6px rgba(20, 45, 38, .18)); pointer-events: none; }
.report-decoration-item > button { position: absolute; top: -10px; right: -10px; display: none; place-items: center; width: 20px; height: 20px; padding: 0; border: 1px solid #efbdb8; border-radius: 50%; color: #b23b33; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.14); font-size: 13px; line-height: 1; }
.report-decoration-item:hover > button, .report-decoration-item.is-selected > button, .report-decoration-item:focus-within > button { display: grid; }
.report-decoration-item > i[data-report-decoration-resize] { position: absolute; right: -9px; bottom: -9px; display: none; width: 18px; height: 18px; border: 3px solid #fff; border-radius: 4px; background: #10a77c; box-shadow: 0 2px 6px rgba(0,0,0,.24); cursor: nwse-resize; }
.report-decoration-item:hover > i[data-report-decoration-resize], .report-decoration-item.is-selected > i[data-report-decoration-resize], .report-decoration-item.is-resizing > i[data-report-decoration-resize] { display: block; }
.report-decoration-item > i[data-report-decoration-rotate] { position: absolute; top: -12px; left: 50%; display: none; place-items: center; width: 23px; height: 23px; border: 2px solid #fff; border-radius: 50%; color: #fff; background: #1677d2; box-shadow: 0 2px 7px rgba(0,0,0,.23); font-size: 15px; font-style: normal; font-weight: 900; line-height: 1; cursor: grab; transform: translateX(-50%); }
.report-decoration-item > i[data-report-decoration-rotate]::after { position: absolute; top: 20px; left: 50%; width: 1px; height: 10px; background: #1677d2; content: ""; transform: translateX(-50%); }
.report-decoration-item:hover > i[data-report-decoration-rotate], .report-decoration-item.is-selected > i[data-report-decoration-rotate], .report-decoration-item.is-rotating > i[data-report-decoration-rotate] { display: grid; }
.report-decoration-item.is-rotating > i[data-report-decoration-rotate] { cursor: grabbing; }
.report-review-error { margin: 0; padding: 10px 12px; border-radius: 8px; color: #a03832; background: #fff0ef; font-size: 12px; font-weight: 700; }
.report-review-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #dbe5e2; }
.report-review-actions > span { color: #6b7c77; font-size: 12px; }
.report-review-actions button { min-width: 100px; height: 40px; }

@keyframes report-preview-pulse {
  0% { transform: scale(.7); box-shadow: 0 0 0 0 rgba(16, 169, 124, .35); }
  100% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 169, 124, 0); }
}

@media (max-width: 1100px) {
  .report-review-dialog { width: calc(100vw - 24px); height: calc(100vh - 24px); padding: 18px; }
  .report-review-workspace { grid-template-columns: minmax(350px, .88fr) minmax(480px, 1.12fr); gap: 12px; }
  .report-review-preview-scroll { padding: 10px; }
  .report-review-columns { grid-template-columns: 1fr; }
  .report-decoration-editor-grid { grid-template-columns: 1fr; }
  .report-copy-template-options { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .report-style-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 820px) {
  .analysis-template-dialog { width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 18px; }
  .analysis-template-context { grid-template-columns: 1fr; }
  .analysis-template-context-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; }
  .analysis-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-generation-options { grid-template-columns: 1fr; }
  .analysis-template-card { grid-template-columns: 84px minmax(0, 1fr); }
  .analysis-template-preview { width: 84px; height: 96px; }
  .analysis-template-actions { grid-template-columns: 1fr 1fr; }
  .analysis-template-choice { grid-column: 1 / -1; }
  .report-review-dialog { display: block; overflow: auto; }
  .report-review-workspace { display: grid; grid-template-columns: 1fr; }
  .report-review-preview-pane { min-height: 520px; }
  .report-review-editor { overflow: visible; }
  .report-review-actions { grid-template-columns: 1fr 1fr; }
  .report-review-actions > span { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .analysis-template-grid { grid-template-columns: 1fr; }
  .report-review-metrics { grid-template-columns: 1fr; }
  .report-copy-template-panel > header, .report-copy-template-panel > footer { align-items: stretch; flex-direction: column; }
  .report-copy-template-options { grid-template-columns: 1fr; }
  .report-copy-template-panel > footer > div { display: grid; grid-template-columns: 1fr 1fr; }
  .report-review-actions { grid-template-columns: 1fr; }
  .report-review-actions > span { grid-column: auto; }
}

.wrongbook-crop-backdrop {
  position: fixed;
  inset: 0;
  z-index: 86;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(32, 48, 44, .48);
  backdrop-filter: blur(5px);
}

.wrongbook-crop-backdrop[hidden] { display: none; }

.wrongbook-crop-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1240px, calc(100vw - 48px));
  height: min(860px, calc(100vh - 48px));
  min-height: 560px;
  overflow: hidden;
  border: 1px solid #d3dfdb;
  border-radius: 15px;
  color: var(--ink);
  background: #f6f9f8;
  box-shadow: 0 32px 90px rgba(20, 42, 36, .34);
  animation: app-dialog-enter .18s ease-out;
}

.wrongbook-crop-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px 15px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.wrongbook-crop-dialog h2 { margin: 2px 0 4px; font-size: 20px; }
.wrongbook-crop-dialog header p { margin: 0; color: var(--muted); font-size: 12px; }

.wrongbook-crop-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  min-height: 0;
}

.wrongbook-crop-canvas-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  padding: 18px;
  overflow: hidden;
  background: #e9efed;
}

.wrongbook-crop-loading { align-self: center; justify-self: center; color: var(--muted); font-weight: 700; }
.wrongbook-crop-loading[hidden] { display: none; }
.wrongbook-crop-stage-scroll {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  text-align: center;
  scrollbar-gutter: stable;
}
.wrongbook-crop-stage-scroll[hidden] { display: none; }
.wrongbook-crop-stage {
  position: relative;
  display: inline-block;
  max-width: 100%;
  border: 1px solid #c6d3cf;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(31, 54, 48, .16);
  line-height: 0;
  touch-action: none;
  cursor: crosshair;
  user-select: none;
}
.wrongbook-crop-stage img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 230px);
  pointer-events: none;
  user-select: none;
}
.wrongbook-crop-selection {
  position: absolute;
  z-index: 2;
  border: 2px solid #08a977;
  background: rgba(15, 185, 130, .12);
  box-shadow: 0 0 0 9999px rgba(26, 43, 38, .18), inset 0 0 0 1px rgba(255,255,255,.85);
  pointer-events: none;
}
.wrongbook-crop-selection[hidden] { display: none; }
.wrongbook-crop-selection span { position: absolute; right: -5px; bottom: -5px; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: #08a977; }
.wrongbook-crop-tip { margin: 12px 2px 0; color: #667771; font-size: 11px; line-height: 1.55; text-align: left; }

.wrongbook-crop-inspector {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 12px;
  min-height: 0;
  padding: 18px;
  overflow: auto;
  border-left: 1px solid var(--line);
  background: #fff;
}
.wrongbook-crop-mode-card { display: grid; gap: 5px; padding: 13px; border: 1px solid #b9dfd3; border-radius: 9px; background: #eefaf6; }
.wrongbook-crop-mode-card > span { color: #087e5c; font-size: 11px; font-weight: 800; }
.wrongbook-crop-mode-card > strong { font-size: 15px; }
.wrongbook-crop-mode-card > p { margin: 0; color: #60736d; font-size: 11px; line-height: 1.55; }
.wrongbook-crop-source-field { display: grid; gap: 5px; margin-top: 7px; padding-top: 10px; border-top: 1px solid #c6e4da; }
.wrongbook-crop-source-field[hidden] { display: none; }
.wrongbook-crop-source-field > span { color: #31584c; font-size: 11px; font-weight: 800; }
.wrongbook-crop-source-field select { width: 100%; height: 36px; background: #fff; }
.wrongbook-crop-source-field small { color: #6f7f7a; font-size: 10px; line-height: 1.45; }
.wrongbook-mark-policy-card { display: grid; gap: 9px; padding: 12px; border: 1px solid #d8e4e0; border-radius: 9px; background: #fbfdfc; }
.wrongbook-mark-policy-card > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrongbook-mark-policy-card > div > strong { font-size: 13px; }
.wrongbook-mark-policy-card > div > span { padding: 3px 7px; border-radius: 999px; color: #087e5c; background: #e6f7f1; font-size: 10px; font-weight: 800; }
.wrongbook-mark-policy-card > label { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 9px; cursor: pointer; }
.wrongbook-mark-policy-card input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--brand); }
.wrongbook-mark-policy-card label span { display: grid; gap: 3px; }
.wrongbook-mark-policy-card label strong { font-size: 12px; }
.wrongbook-mark-policy-card label small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.wrongbook-mark-policy-card .text-button { justify-self: start; padding: 0; color: #087e5c; font-size: 10px; }
.wrongbook-mark-policy-card .text-button:disabled { color: #a8b3af; cursor: not-allowed; }
.wrongbook-crop-actions { display: grid; gap: 7px; }
.wrongbook-crop-question-heading { display: flex; align-items: center; justify-content: space-between; padding-top: 4px; }
.wrongbook-crop-question-heading span { color: var(--muted); font-size: 11px; }
.wrongbook-crop-question-list { display: grid; gap: 7px; }
.wrongbook-crop-question-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: #fafcfb; }
.wrongbook-crop-question-item.is-active { border-color: var(--brand); background: var(--brand-soft); }
.wrongbook-crop-question-item > button:first-child { display: grid; gap: 2px; min-width: 0; padding: 0; border: 0; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.wrongbook-crop-question-item strong,
.wrongbook-crop-question-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrongbook-crop-question-item small { color: var(--muted); font-size: 10px; }
.wrongbook-crop-question-item .icon-button { width: 28px; height: 28px; }
.wrongbook-related-region-list { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 5px; padding-top: 3px; }
.wrongbook-related-region-list button { display: inline-flex; align-items: center; gap: 5px; min-height: 25px; padding: 3px 7px; border: 1px solid #d8d0f5; border-radius: 999px; color: #5e49bc; background: #f5f2ff; font-size: 10px; cursor: pointer; }
.wrongbook-related-region-list button span { color: #c24a46; font-weight: 900; }

.wrongbook-generation-modes { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; }
.wrongbook-generation-modes legend { margin-bottom: 6px; color: #52645f; font-size: 12px; font-weight: 800; }
.wrongbook-generation-mode {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.wrongbook-generation-mode.is-active { border-color: var(--brand); background: #eefaf6; box-shadow: inset 3px 0 0 var(--brand); }
.wrongbook-generation-mode input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.generation-mode-radio { display: grid; place-items: center; width: 17px; height: 17px; margin-top: 2px; border: 1.5px solid #aabbb5; border-radius: 50%; background: #fff; }
.wrongbook-generation-mode input:checked + .generation-mode-radio { border: 5px solid var(--brand); }
.wrongbook-generation-mode input:focus-visible + .generation-mode-radio { outline: 3px solid rgba(14, 174, 123, .22); outline-offset: 2px; }
.wrongbook-generation-mode > span:last-child { display: grid; gap: 3px; min-width: 0; }
.wrongbook-generation-mode strong { font-size: 12px; }
.wrongbook-generation-mode small { color: var(--muted); font-size: 10px; line-height: 1.45; }

.wrongbook-manual-backdrop {
  position: fixed;
  inset: 0;
  z-index: 87;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(32, 48, 44, .5);
  backdrop-filter: blur(5px);
}
.wrongbook-manual-backdrop[hidden] { display: none; }
.wrongbook-manual-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1360px, calc(100vw - 44px));
  height: min(900px, calc(100vh - 44px));
  min-height: 620px;
  overflow: hidden;
  border: 1px solid #d2dfda;
  border-radius: 15px;
  background: #f5f8f7;
  box-shadow: 0 32px 90px rgba(20, 42, 36, .36);
  animation: app-dialog-enter .18s ease-out;
}
.wrongbook-manual-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 22px 15px; border-bottom: 1px solid var(--line); background: #fff; }
.wrongbook-manual-dialog h2 { margin: 2px 0 4px; font-size: 20px; }
.wrongbook-manual-dialog header p { margin: 0; color: var(--muted); font-size: 12px; }
.wrongbook-manual-body { display: grid; grid-template-columns: 220px minmax(500px, 1fr) 250px; min-height: 0; }
.wrongbook-manual-question-panel,
.wrongbook-manual-inspector { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; align-content: start; gap: 12px; min-height: 0; padding: 16px; overflow: hidden; background: #fff; }
.wrongbook-manual-question-panel { border-right: 1px solid var(--line); }
.wrongbook-manual-inspector { border-left: 1px solid var(--line); }
.wrongbook-manual-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wrongbook-manual-section-heading span { color: var(--muted); font-size: 11px; }
.wrongbook-manual-question-list,
.wrongbook-manual-item-list { display: grid; align-content: start; gap: 7px; min-height: 0; overflow: auto; }
.wrongbook-manual-question-list button,
.wrongbook-manual-item-list button { display: grid; gap: 3px; width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; text-align: left; cursor: pointer; }
.wrongbook-manual-question-list button.is-active,
.wrongbook-manual-item-list button.is-active { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.wrongbook-manual-question-list small,
.wrongbook-manual-item-list small { color: var(--muted); font-size: 10px; }
.wrongbook-manual-workspace { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-width: 0; min-height: 0; padding: 18px; overflow: hidden; background: #e8eeec; }
.wrongbook-manual-page-shell { display: grid; place-items: center; min-width: 0; min-height: 0; overflow: auto; }
.wrongbook-manual-page {
  position: relative;
  width: min(100%, calc((100vh - 210px) * 1.353));
  aspect-ratio: 1096 / 980;
  overflow: hidden;
  border: 1px solid #b9c9c4;
  border-radius: 6px;
  background-color: #fff;
  background-image: linear-gradient(rgba(15,143,114,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(15,143,114,.055) 1px, transparent 1px);
  background-size: 5% 5%;
  box-shadow: 0 18px 46px rgba(30, 51, 45, .18);
  touch-action: none;
  user-select: none;
}
.wrongbook-manual-media { position: absolute; display: grid; overflow: visible; border: 2px solid #0f9e76; border-radius: 7px; background: #fff; box-shadow: 0 5px 16px rgba(21, 54, 45, .13); cursor: move; touch-action: none; }
.wrongbook-manual-media.is-related { border-color: #7456d7; }
.wrongbook-manual-media.is-selected { z-index: 3; box-shadow: 0 0 0 3px rgba(15,158,118,.2), 0 8px 20px rgba(21,54,45,.2); }
.wrongbook-manual-media.is-related.is-selected { box-shadow: 0 0 0 3px rgba(116,86,215,.2), 0 8px 20px rgba(21,54,45,.2); }
.wrongbook-manual-media img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; background: #fff; }
.wrongbook-manual-media > span { position: absolute; top: 5px; left: 5px; z-index: 2; padding: 3px 6px; border-radius: 999px; color: #fff; background: rgba(8,126,91,.9); font-size: 10px; font-weight: 800; line-height: 1.2; pointer-events: none; }
.wrongbook-manual-media.is-related > span { background: rgba(102,71,198,.92); }
.wrongbook-manual-resize { position: absolute; right: -7px; bottom: -7px; width: 15px; height: 15px; border: 2px solid #fff; border-radius: 50%; background: #0f9e76; box-shadow: 0 2px 6px rgba(0,0,0,.2); cursor: nwse-resize; }
.wrongbook-manual-media.is-related .wrongbook-manual-resize { background: #7456d7; }
.wrongbook-manual-workspace > p { margin: 10px 0 0; color: #64756f; font-size: 11px; text-align: center; }
.wrongbook-manual-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wrongbook-manual-fields label { position: relative; display: grid; gap: 4px; color: #52645f; font-size: 10px; font-weight: 700; }
.wrongbook-manual-fields input { width: 100%; height: 34px; padding-right: 24px; background: #fff; }
.wrongbook-manual-fields label small { position: absolute; right: 8px; bottom: 9px; color: var(--muted); font-size: 10px; }
.wrongbook-manual-tools { display: grid; gap: 7px; }
.wrongbook-manual-dialog > footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 18px; border-top: 1px solid var(--line); background: #fff; }
.wrongbook-manual-step-actions { display: flex; align-items: center; gap: 8px; }

@media (max-width: 1050px) {
  .wrongbook-manual-body { grid-template-columns: 180px minmax(420px, 1fr); }
  .wrongbook-manual-inspector { display: none; }
}

@media (max-width: 900px) {
  .wrongbook-crop-body { grid-template-columns: minmax(0, 1fr); }
  .wrongbook-crop-inspector { max-height: 250px; border-top: 1px solid var(--line); border-left: 0; }
}

.danger {
  color: var(--red);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 31, 27, 0.36);
  backdrop-filter: blur(8px);
}

.modal-backdrop[hidden] {
  display: none;
}

.main-recycle-dialog {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(860px, calc(100vw - 48px));
  max-height: min(720px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(18, 38, 33, .26);
}

.main-recycle-capacity {
  display: inline-flex;
  margin-top: 7px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #735318;
  background: #fff4d7;
  font-size: 11px;
  font-weight: 800;
}

.main-recycle-capacity.is-member {
  color: #087b59;
  background: #e4f8f1;
}

@media (prefers-reduced-motion: reduce) {
  .import-processing-spinner { animation-duration: 1.8s; }
  .import-processing-progress b { transition: none; }
}

.main-recycle-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.main-recycle-dialog h2 { margin: 3px 0 4px; }
.main-recycle-dialog header p { margin: 0; color: var(--muted); line-height: 1.55; }
.main-recycle-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfa;
}
.main-recycle-toolbar > span { margin-right: auto; color: var(--muted); font-size: 12px; font-weight: 700; }
.main-recycle-list { display: grid; align-content: start; gap: 9px; min-height: 180px; overflow: auto; padding: 16px 22px 22px; }
.main-recycle-item {
  display: grid;
  grid-template-columns: 24px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}
.main-recycle-item.is-selected { border-color: var(--brand); background: var(--brand-soft); }
.recycle-type-badge { padding: 4px 7px; border-radius: 999px; color: #087b59; background: #dcf5ed; font-size: 11px; font-weight: 800; }
.main-recycle-item-copy { display: grid; gap: 4px; min-width: 0; }
.main-recycle-item-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main-recycle-item-copy small { color: var(--muted); font-size: 12px; }
.main-recycle-item-actions { display: flex; align-items: center; gap: 7px; }

.login-dialog {
  width: min(620px, 96vw);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(18, 38, 33, 0.26);
}

.choice-dialog {
  width: min(520px, 94vw);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(18, 38, 33, 0.26);
}

.multi-page-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1120px, 96vw);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(18, 38, 33, 0.26);
}

.multi-page-dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.multi-page-dialog h2 {
  margin: 0;
  font-size: 22px;
}

.multi-page-dialog p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.multi-page-dialog footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: #fbfdfc;
}

.multi-page-bulk-actions,
.multi-page-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.multi-page-bulk-actions span {
  color: var(--brand-strong);
  font-weight: 800;
}

.multi-page-body {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.05fr);
  min-height: 0;
  overflow: hidden;
  background: #eef2f4;
}

.multi-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  align-items: start;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background: transparent;
}

.multi-page-grid.is-single-page {
  grid-template-columns: minmax(210px, 250px);
  justify-content: start;
}

.multi-page-preview-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  padding: 18px;
  border-left: 1px solid var(--line);
  background: #f8faf9;
}

.multi-page-preview-large {
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #e8eeec;
}

.manager-large-paper {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  padding: 16px;
  border: 1px solid #d0dbd7;
  background: #fff;
  box-shadow: var(--shadow);
}

.manager-large-paper img,
.manager-large-paper embed {
  display: block;
  border: 0;
  object-fit: contain;
  background: #fff;
  transform-origin: center center;
}

.manager-page-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid #cfddd8;
  border-radius: var(--radius);
  background: #fff;
  cursor: grab;
  user-select: none;
  align-self: start;
}

.manager-page-card.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(14, 174, 123, 0.16);
}

.manager-page-card.is-selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.manager-page-card.is-dragging {
  opacity: 0.5;
}

.manager-page-card.is-drop-target {
  border-color: var(--brand);
  outline: 2px dashed rgba(14, 174, 123, 0.5);
  outline-offset: -5px;
}

.manager-page-card:active {
  cursor: grabbing;
}

.manager-select-toggle {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #b8dfd2;
  border-radius: 50%;
  color: #fff;
  background: #fff;
  font-size: 13px;
  font-weight: 900;
}

.manager-select-toggle.is-checked {
  border-color: var(--brand);
  background: var(--brand);
}

.manager-page-preview {
  display: grid;
  place-items: center;
  height: 180px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
}

.manager-page-preview img,
.manager-page-preview embed {
  display: block;
  border: 0;
  object-fit: contain;
  background: #fff;
  transform-origin: center center;
}

.manager-page-preview embed,
.manager-large-paper embed {
  width: 100%;
  height: 100%;
}

.manager-page-meta strong,
.manager-page-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manager-page-meta small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.manager-page-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.manager-page-actions .secondary-button {
  min-height: 30px;
  padding: 0 8px;
}

.danger-action {
  color: var(--red);
}

.choice-dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.choice-dialog h2 {
  margin: 0;
  font-size: 20px;
}

.choice-dialog p {
  margin: 14px 0 18px;
  color: var(--muted);
  line-height: 1.65;
}

.blank-page-dialog {
  width: min(720px, calc(100vw - 32px));
}

.blank-page-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: stretch;
  margin: 18px 0;
}

.blank-page-options {
  display: grid;
  gap: 16px;
  align-content: start;
}

.blank-ratio-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  border: 0;
}

.blank-ratio-options legend {
  grid-column: 1 / -1;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.blank-ratio-options label {
  position: relative;
  cursor: pointer;
}

.blank-ratio-options input {
  position: absolute;
  opacity: 0;
}

.blank-ratio-options span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 700;
}

.blank-ratio-options input:checked + span {
  border-color: var(--brand);
  color: var(--brand-strong);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.blank-color-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px auto;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.blank-color-field input {
  width: 54px;
  height: 36px;
  padding: 2px;
}

.blank-color-field b {
  color: var(--ink);
  font-size: 12px;
}

.blank-color-presets {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.blank-color-presets button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px #b8c9c4;
}

.blank-color-presets button:hover {
  box-shadow: 0 0 0 2px var(--brand);
}

.blank-color-presets button.is-selected {
  box-shadow: 0 0 0 3px var(--brand);
  transform: scale(1.08);
}

.blank-page-preview-wrap {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 270px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f2f6f5;
}

.blank-page-preview {
  border: 1px solid #b9c8c4;
  background: #fff;
  box-shadow: 0 10px 22px rgba(36, 65, 58, 0.12);
}

.blank-page-preview.is-portrait {
  width: 126px;
  height: 224px;
}

.blank-page-preview.is-landscape {
  width: 224px;
  height: 126px;
}

.blank-page-preview-wrap > span,
.blank-page-footer > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.blank-page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (max-width: 680px) {
  .blank-page-content {
    grid-template-columns: 1fr;
  }

  .blank-page-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

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

.choice-actions.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.filter-scope-dialog .merge-option {
  margin: -4px 0 16px;
}

.login-dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.login-dialog h2 {
  margin: 0;
  font-size: 20px;
}

.login-dialog header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.auth-view-tabs,
.auth-method-tabs {
  display: grid;
  gap: 6px;
  margin: 14px 18px 0;
  padding: 4px;
  border-radius: 10px;
  background: #eef3f1;
}

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

.auth-method-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 14px;
}

.auth-view[data-auth-view-panel="register"] .auth-method-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-view-tabs button,
.auth-method-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  color: #536861;
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.auth-view-tabs button.is-active,
.auth-method-tabs button.is-active {
  color: var(--brand-strong);
  background: #fff;
  box-shadow: 0 2px 8px rgba(24, 55, 46, 0.08);
}

.auth-view {
  margin: 14px 18px;
}

.account-center-panel {
  display: grid;
  gap: 14px;
  margin: 14px 18px;
}

.account-balance-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid #b9dfd2;
  border-radius: 12px;
  background: linear-gradient(135deg, #effbf6, #f8fcfa);
}

.account-balance-card > div {
  display: grid;
  gap: 3px;
}

.account-balance-card span,
.account-balance-card small,
.commerce-heading small,
.commerce-card small,
.gift-card-redeem small {
  color: var(--muted);
  font-size: 11px;
}

.account-balance-card strong {
  color: var(--brand-strong);
  font-size: 20px;
}

.commerce-section {
  display: grid;
  gap: 9px;
}

.commerce-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f1f5f3;
}

.commerce-mode-tabs button {
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #4f625c;
  background: transparent;
  cursor: pointer;
}

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

.commerce-mode-tabs button.is-active {
  border-color: #94d7c1;
  color: var(--brand-strong);
  background: #fff;
  box-shadow: 0 4px 12px rgba(14, 174, 123, 0.1);
}

.commerce-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.commerce-heading > div {
  display: grid;
  gap: 2px;
}

.commerce-heading > span {
  color: #758881;
  font-size: 10px;
}

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

.commerce-card-grid.points {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.commerce-card {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.commerce-card.is-recommended {
  border-color: #67c8aa;
  box-shadow: 0 5px 16px rgba(14, 174, 123, 0.1);
}

.commerce-card.is-selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(14, 174, 123, 0.17), 0 8px 18px rgba(14, 174, 123, 0.12);
}

.commerce-card.is-selected::after {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  content: '✓';
  font-size: 11px;
  font-weight: 900;
}

.commerce-card.is-selected > button {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
}

.commerce-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commerce-card b {
  color: var(--brand-strong);
  font-size: 18px;
}

.commerce-card button {
  min-height: 30px;
  padding: 5px 8px;
}

.gift-card-redeem {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px dashed #a8c9be;
  border-radius: 10px;
  background: #f8fbfa;
}

.gift-card-redeem > div {
  display: grid;
  gap: 2px;
}

.auth-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f9fbfa;
}

.auth-panel label {
  display: grid;
  gap: 6px;
}

.auth-panel label > span:first-child {
  color: #536861;
  font-size: 12px;
  font-weight: 800;
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.auth-code-row .secondary-button {
  min-width: 118px;
  white-space: nowrap;
}

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

.auth-hint,
.auth-wechat-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.auth-wechat-panel {
  place-items: center;
  text-align: center;
}

.auth-wechat-panel > img {
  width: 196px;
  height: 196px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  object-fit: contain;
}

.auth-wechat-panel > img:not([src]) {
  background: linear-gradient(135deg, #f3f7f5, #e6efeb);
}

.auth-inline-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.wechat-phone-bind {
  display: grid;
  gap: 10px;
  width: 100%;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.auth-dev-only {
  color: #7b5b15;
}

.login-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px 16px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 640px) {
  .auth-field-grid {
    grid-template-columns: 1fr;
  }

  .auth-method-tabs button {
    font-size: 12px;
  }

  .commerce-card-grid,
  .commerce-card-grid.points,
  .account-balance-card {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .workspace-grid {
    grid-template-columns: 92px minmax(0, 1fr) 330px;
  }

  .top-toolbar {
    grid-template-columns: max-content auto minmax(0, 1fr);
    gap: 8px;
  }

  .toolbar-left,
  .toolbar-right {
    gap: 6px;
  }

  .tool-button,
  .toolbar-right .secondary-button,
  .toolbar-right .primary-button {
    padding-inline: 9px;
    white-space: nowrap;
  }

  .mobile-transfer-button span {
    display: none;
  }

  .mobile-transfer-button {
    flex-basis: 34px;
    width: 34px;
    min-width: 34px;
    padding: 0;
    justify-content: center;
  }

  .course-entry-button,
  .experiment-page-entry-button {
    width: 34px;
    min-width: 34px;
    padding: 0;
    justify-content: center;
  }

  .course-entry-button > span,
  .experiment-page-entry-button > span:not(.vip-badge) {
    display: none;
  }

  .experiment-page-entry-button .vip-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 21px;
    height: 13px;
    padding-inline: 3px;
    font-size: 7px;
  }

  .multi-page-body {
    grid-template-columns: 1fr;
  }

  .multi-page-preview-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .manager-large-paper img,
  .manager-large-paper embed {
    max-height: 520px;
  }
}

@media (min-width: 901px) and (max-width: 1200px) {
  .toolbar-right #print-current,
  .toolbar-right #open-lens {
    display: none;
  }

  .toolbar-right .account-button {
    width: 34px;
    min-width: 34px;
    padding: 0;
    justify-content: center;
  }

  .toolbar-right #login-label {
    display: none;
  }
}

/* Product pages also run in mobile browsers opened from WeChat. */
@media (max-width: 900px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
  }

  .app-shell {
    display: block;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .task-rail {
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .task-rail > .rail-section {
    flex: none;
    overflow: visible;
  }

  .task-list,
  .report-list {
    max-height: 42dvh;
  }

  .scanner-workspace {
    height: auto;
    min-height: 100dvh;
    grid-template-rows: auto auto;
  }

  .top-toolbar {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .toolbar-left,
  .toolbar-right {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .page-switcher {
    justify-content: flex-start;
  }

  .workspace-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(68dvh, 1fr) auto;
    min-height: 0;
  }

  .page-strip {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .thumb,
  .add-page {
    flex: 0 0 78px;
  }

  .document-stage {
    min-height: 68dvh;
  }

  .preview-shell {
    padding: 72px 18px 48px;
  }

  .inspector {
    height: auto;
    max-height: none;
    overflow: visible;
    scrollbar-gutter: auto;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .wrongbook-workspace {
    overflow: auto;
  }

  .wrongbook-page-header {
    position: sticky;
    z-index: 4;
    top: 0;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

  .wrongbook-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .wrongbook-layout {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    overflow: visible;
    padding: 12px;
  }

  .wrongbook-source-panel,
  .wrongbook-generate-panel,
  .wrongbook-folder-panel {
    overflow: visible;
  }

  .wrongbook-folder-panel {
    min-height: 520px;
  }
}

@media (max-width: 520px) {
  .top-toolbar {
    padding: 8px;
  }

  .toolbar-left,
  .toolbar-right {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar-left > *,
  .toolbar-right > * {
    min-width: 0;
  }

  .course-entry-button,
  .experiment-page-entry-button,
  .mobile-transfer-button,
  .account-button {
    width: 100%;
    justify-content: center;
  }

  .wrongbook-page-header p {
    font-size: 12px;
    line-height: 1.45;
  }

  .wrongbook-layout {
    gap: 12px;
    padding: 8px;
  }
}

@media (max-width: 720px) {
  .mobile-transfer-content {
    grid-template-columns: 1fr;
  }

  .mobile-transfer-qr-wrap {
    padding: 12px;
  }

  .mobile-placement-actions {
    grid-template-columns: 1fr;
  }

  .placement-option.is-accent {
    grid-column: auto;
  }
}

.account-avatar img,
.settings-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.settings-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(900px, calc(100vw - 64px));
  max-height: min(760px, calc(100vh - 64px));
  overflow: hidden;
  border: 1px solid #d5e1dd;
  border-radius: 16px;
  background: #f7f9f8;
  box-shadow: 0 28px 80px rgba(20, 43, 36, 0.24);
}

.settings-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px 17px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.settings-dialog > header h2,
.settings-dialog > header p,
.settings-section-heading h3,
.settings-section-heading p {
  margin: 0;
}

.settings-dialog > header h2 {
  margin-top: 2px;
  font-size: 22px;
}

.settings-dialog > header p,
.settings-section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.settings-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 0;
}

.settings-nav {
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 16px 12px;
  border-right: 1px solid var(--line);
  background: #f1f5f3;
}

.settings-nav button {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  color: #30453f;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.settings-nav button:hover {
  background: #e7efec;
}

.settings-nav button.is-active {
  color: var(--brand-strong);
  background: #d9f2e9;
}

.settings-nav span {
  font-weight: 800;
}

.settings-nav small {
  color: #73857f;
  font-size: 11px;
}

.settings-content {
  min-height: 0;
  overflow: auto;
  background: #fff;
}

.settings-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 430px;
  padding: 24px 26px 28px;
}

.settings-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.settings-section-heading h3 {
  font-size: 18px;
}

.settings-sync-badge {
  padding: 5px 9px;
  border-radius: 999px;
  color: #536861;
  background: #eef2f0;
  font-size: 11px;
  font-weight: 800;
}

.settings-sync-badge.is-online {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.profile-settings-form {
  display: grid;
  gap: 16px;
}

.profile-avatar-editor,
.account-settings-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbfa;
}

.profile-avatar-editor > div,
.account-settings-card > div {
  display: grid;
  flex: 1;
  gap: 4px;
}

.profile-avatar-editor small,
.account-settings-card small {
  color: var(--muted);
  font-size: 11px;
}

.profile-avatar-editor button {
  justify-self: start;
  margin-top: 5px;
}

.settings-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #18b889, #0b8f6a);
  box-shadow: 0 0 0 1px #b8d8cd, 0 8px 18px rgba(14, 174, 123, 0.14);
  font-size: 24px;
}

.settings-avatar.compact {
  width: 48px;
  height: 48px;
  font-size: 17px;
}

.settings-field {
  display: grid;
  gap: 6px;
}

.settings-field > span {
  color: #52665f;
  font-size: 12px;
  font-weight: 800;
}

.settings-field input[readonly] {
  color: #7b8a85;
  background: #f3f6f5;
}

.settings-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 66px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

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

.settings-row > span {
  display: grid;
  gap: 3px;
}

.settings-row small {
  color: var(--muted);
  font-size: 11px;
}

.settings-row select {
  min-width: 112px;
}

.settings-row em {
  color: var(--brand-strong);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.settings-row.is-readonly {
  background: #fafcfb;
}

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

.cache-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  border: 1px solid #d8e3df;
  border-radius: 12px;
  background: #f8fbfa;
}

.cache-summary-card > div {
  display: grid;
  gap: 3px;
}

.cache-summary-card strong {
  color: var(--brand-strong);
  font-size: 24px;
}

.cache-summary-card small,
.settings-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.settings-note {
  padding: 12px 14px;
  border-radius: 9px;
  background: #f3f6f5;
}

.settings-gift-card-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #b9ded2;
  border-radius: 13px;
  background: linear-gradient(135deg, #f2fbf8, #fffaf0);
}

.settings-gift-card-form label {
  display: grid;
  gap: 3px;
}

.settings-gift-card-form label small,
.settings-course-benefits header small,
.settings-course-benefit-card small,
.settings-course-benefit-card time span {
  color: var(--muted);
  font-size: 11px;
}

.settings-gift-card-input-row {
  display: flex;
  gap: 9px;
}

.settings-gift-card-input-row input {
  min-width: 0;
  flex: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.settings-gift-card-input-row button {
  flex: none;
}

.settings-redemption-result {
  margin: 0;
  padding: 9px 11px;
  border-radius: 8px;
  color: #08795c;
  background: #dcf5ec;
  font-size: 12px;
  font-weight: 750;
}

.settings-redemption-result.is-error {
  color: #b33d48;
  background: #fff0f1;
}

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

.settings-benefit-summary article {
  min-width: 0;
  padding: 14px 15px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbfa;
}

.settings-benefit-summary article > span,
.settings-benefit-summary article > small {
  color: var(--muted);
  font-size: 11px;
}

.settings-benefit-summary article > strong {
  overflow: hidden;
  color: var(--brand-strong);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 20px;
}

.settings-course-benefits {
  display: grid;
  gap: 10px;
}

.settings-course-benefits > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.settings-course-benefits > header > div {
  display: grid;
  gap: 3px;
}

.settings-course-benefits > header b {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-size: 11px;
}

.settings-course-benefit-list {
  display: grid;
  gap: 8px;
}

.settings-course-benefit-card {
  min-width: 0;
  padding: 12px 13px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.settings-course-benefit-card > div,
.settings-course-benefit-card time {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.settings-course-benefit-card > div > span {
  color: var(--brand-strong);
  font-size: 10px;
  font-weight: 800;
}

.settings-course-benefit-card > div > strong,
.settings-course-benefit-card > div > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-course-benefit-card time {
  padding-left: 14px;
  border-left: 1px solid var(--line);
  text-align: right;
}

.settings-course-benefit-card time strong {
  color: #9a6518;
  font-size: 12px;
}

.settings-benefit-empty {
  padding: 22px 16px;
  border: 1px dashed #cbd9d4;
  border-radius: 11px;
  color: var(--muted);
  background: #fafcfb;
  text-align: center;
  font-size: 12px;
}

.settings-benefit-empty.is-error {
  color: #b33d48;
  border-color: #efc4c8;
  background: #fff8f8;
}

.danger-outline,
.danger-text {
  color: #d34c4c !important;
}

.danger-outline {
  border-color: #f0c5c5 !important;
  background: #fffafa !important;
}

.account-actions .primary-button[hidden],
.account-actions .secondary-button[hidden],
.account-actions .text-button[hidden] {
  display: none;
}

.about-settings-list {
  display: grid;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.about-settings-list > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}

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

.about-settings-list dt {
  color: #50645d;
  font-weight: 800;
}

.about-settings-list dd {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 760px) {
  .settings-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    grid-template-columns: repeat(6, minmax(92px, 1fr));
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .settings-nav small {
    display: none;
  }

  .settings-panel {
    min-height: 0;
    padding: 18px;
  }

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

  .settings-course-benefit-card {
    grid-template-columns: 1fr;
  }

  .settings-course-benefit-card time {
    padding-top: 8px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
    text-align: left;
  }
}

.screenshot-cropper {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  color: #f7fffd;
  background: rgba(10, 18, 22, 0.96);
  user-select: none;
}

.screenshot-cropper[hidden] { display: none; }

.screenshot-crop-header,
.screenshot-crop-actions {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 12px 22px;
  background: rgba(22, 35, 42, 0.96);
  border-color: rgba(255, 255, 255, 0.12);
}

.screenshot-crop-header {
  border-bottom-style: solid;
  border-bottom-width: 1px;
}

.screenshot-crop-header > div { display: grid; gap: 4px; }
.screenshot-crop-header strong { font-size: 17px; }

.screenshot-crop-header span,
.screenshot-crop-actions > span {
  color: rgba(239, 252, 248, 0.7);
  font-size: 13px;
}

.screenshot-crop-close {
  width: 36px;
  height: 36px;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  cursor: pointer;
}

.screenshot-crop-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  cursor: crosshair;
}

#screenshot-crop-canvas {
  display: block;
  max-width: calc(100% - 40px);
  max-height: calc(100% - 40px);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.42);
}

.screenshot-crop-selection {
  position: absolute;
  z-index: 2;
  min-width: 48px;
  min-height: 48px;
  border: 2px solid #16d5aa;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.56), inset 0 0 0 1px rgba(255, 255, 255, 0.85);
  cursor: move;
  touch-action: none;
}

.screenshot-crop-selection > span {
  position: absolute;
  left: 50%;
  bottom: -32px;
  transform: translateX(-50%);
  padding: 4px 8px;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  background: rgba(10, 18, 22, 0.88);
  border-radius: 5px;
  pointer-events: none;
}

.screenshot-crop-selection > i {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #f8fffd;
  border: 3px solid #12bd96;
  border-radius: 50%;
}

.screenshot-crop-selection > i[data-screenshot-handle="nw"] { left: -8px; top: -8px; cursor: nwse-resize; }
.screenshot-crop-selection > i[data-screenshot-handle="ne"] { right: -8px; top: -8px; cursor: nesw-resize; }
.screenshot-crop-selection > i[data-screenshot-handle="sw"] { left: -8px; bottom: -8px; cursor: nesw-resize; }
.screenshot-crop-selection > i[data-screenshot-handle="se"] { right: -8px; bottom: -8px; cursor: nwse-resize; }

.screenshot-crop-actions {
  justify-content: flex-end;
  border-top-style: solid;
  border-top-width: 1px;
}

.screenshot-crop-actions .secondary-button {
  color: #e9f6f2;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}

body.is-selecting-screenshot { overflow: hidden; }

@media (max-width: 680px) {
  .screenshot-crop-header span,
  .screenshot-crop-actions > span { display: none; }

  .screenshot-crop-header,
  .screenshot-crop-actions {
    min-height: 58px;
    padding: 10px 14px;
  }
}


/* Color-aware pen thickness control. */
.annotation-toolbar { --pen-color: #e53935; --pen-range-progress: 15.38%; }
.annotation-toolbar[data-active-tool="pen"] .annotation-dock-panel > .range-field:not(.eraser-size-field) input[type="range"] { width: 100%; min-width: 0; height: 6px; appearance: none; border-radius: 999px; outline: 0; background: linear-gradient(to right, var(--pen-color) 0 var(--pen-range-progress), rgba(230,239,236,.92) var(--pen-range-progress) 100%); accent-color: var(--pen-color); }
.annotation-toolbar[data-active-tool="pen"] .annotation-dock-panel > .range-field:not(.eraser-size-field) input[type="range"]::-webkit-slider-thumb { width: 16px; height: 16px; appearance: none; border: 2px solid rgba(255,255,255,.9); border-radius: 50%; background: var(--pen-color); box-shadow: 0 1px 5px rgba(0,0,0,.28); }
.annotation-toolbar[data-active-tool="pen"] .annotation-dock-panel > .range-field:not(.eraser-size-field) input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--pen-color); }
.annotation-toolbar[data-active-tool="pen"] .annotation-dock-panel > .range-field:not(.eraser-size-field) input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(230,239,236,.92); }
.annotation-toolbar[data-active-tool="pen"] .annotation-dock-panel > .range-field:not(.eraser-size-field) input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.9); border-radius: 50%; background: var(--pen-color); }
.capture-setup-backdrop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: rgba(238,243,241,.82); backdrop-filter: blur(5px); }
.capture-setup-backdrop[hidden], .recording-countdown[hidden] { display: none; }
.capture-setup-dialog { width: min(440px, calc(100vw - 32px)); overflow: hidden; border: 1px solid #d5e1dd; border-radius: 14px; background: #fff; box-shadow: 0 24px 64px rgba(24,49,43,.24); }
.capture-setup-dialog header { padding: 20px 22px 12px; }
.capture-setup-dialog header h2 { margin-top: 3px; font-size: 20px; }
.capture-mode-options { display: grid; gap: 9px; padding: 4px 22px 12px; }
.capture-mode-options label, .capture-sound-option { display: flex; align-items: flex-start; gap: 11px; padding: 12px 13px; border: 1px solid #d9e4e0; border-radius: 10px; background: #f9fbfa; cursor: pointer; }
.capture-mode-options label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.capture-mode-options input, .capture-sound-option input { margin-top: 3px; accent-color: var(--brand); }
.capture-mode-options span, .capture-sound-option span { display: grid; gap: 3px; }
.capture-mode-options small, .capture-sound-option small { color: var(--muted); font-size: 11px; }
.capture-sound-option { margin: 0 22px 14px; }
.capture-setup-dialog footer { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 22px 20px; border-top: 1px solid #e1e9e6; }
.recording-countdown { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; background: rgba(239,244,242,.76); backdrop-filter: blur(4px); }
.recording-countdown > div { display: grid; justify-items: center; gap: 2px; min-width: 180px; padding: 22px 30px; border: 1px solid #d3e1dc; border-radius: 18px; color: #29443d; background: rgba(255,255,255,.96); box-shadow: 0 20px 56px rgba(21,47,40,.2); font-weight: 800; }
.recording-countdown strong { color: var(--brand); font-size: 64px; line-height: 1; }
/* Keep the expanded dock controls above the tool rows instead of covering them. */
.annotation-toolbar.is-expanded .annotation-dock-toggle { left: -4px; top: -190px; }
.annotation-dock-panel > .autosave-state { top: -36px; right: 24px; }
.annotation-dock-panel > #open-resource-library { left: 209px; top: 158px; }
.annotation-dock-panel > #open-experiment-library { left: 297px; top: 158px; }
.asset-library-backdrop { position: fixed; inset: 0; z-index: 94; display: grid; place-items: center; padding: 22px; background: rgba(235,241,239,.84); backdrop-filter: blur(6px); }
.asset-library-backdrop[hidden] { display: none; }
.asset-library-dialog { display: grid; grid-template-rows: auto auto minmax(0,1fr); width: min(980px, calc(100vw - 36px)); max-height: min(780px, calc(100vh - 36px)); overflow: hidden; border: 1px solid #d3dfdb; border-radius: 16px; background: #fff; box-shadow: 0 26px 70px rgba(20,45,38,.26); }
.asset-library-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 19px 22px 15px; border-bottom: 1px solid #e0e9e6; }
.asset-library-dialog > header p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.asset-library-search, .experiment-library-filters { display: flex; align-items: center; gap: 10px; padding: 12px 22px; border-bottom: 1px solid #e3ebe8; background: #f8fbfa; }
.asset-library-search span, .experiment-library-filters span { color: #52675f; font-size: 11px; font-weight: 800; }
.asset-library-search input { flex: 1; }
.experiment-library-filters label { display: flex; align-items: center; gap: 7px; }
.asset-library-grid, .shape-library-content { min-height: 260px; overflow: auto; padding: 18px 22px 24px; }
.asset-library-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); align-content: start; gap: 12px; }
.asset-card { display: grid; gap: 8px; min-width: 0; padding: 12px; border: 1px solid #d9e4e0; border-radius: 12px; text-align: left; background: #fff; transition: .15s ease; }
.asset-card:hover { border-color: var(--brand); background: var(--brand-soft); transform: translateY(-1px); }
.asset-card-preview { display: grid; place-items: center; height: 112px; overflow: hidden; border-radius: 8px; background: linear-gradient(145deg,#f4f8f6,#eaf3ef); }
.asset-card-preview img, .asset-card-preview svg { width: 100%; height: 100%; object-fit: contain; }
.asset-card small { color: var(--muted); }
.resource-library-dialog { width: min(1240px, calc(100vw - 36px)); height: min(820px, calc(100vh - 36px)); max-height: none; }
.resource-library-heading { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.resource-library-heading > div { min-width: 0; }
.resource-library-heading h2 { margin: 2px 0 0; }
.resource-library-back { width: 36px; height: 36px; flex: 0 0 auto; border: 1px solid #d8e4e0; border-radius: 9px; color: #31564c; background: #f6faf8; font-size: 18px; }
.resource-library-back:hover { border-color: #8cc9b6; color: #087b59; background: #eaf8f3; }
.resource-library-filters { display: flex; align-items: end; gap: 12px; padding: 12px 22px; border-bottom: 1px solid #e3ebe8; background: #f8fbfa; }
.resource-library-filters label { display: grid; gap: 5px; color: #52675f; font-size: 11px; font-weight: 800; }
.resource-library-filters select { min-width: 118px; }
.resource-library-search { flex: 1; }
.resource-library-search input { width: 100%; min-width: 200px; }
.resource-library-filters > strong { min-width: 74px; padding-bottom: 10px; color: #657a73; text-align: right; font-size: 11px; }
.resource-library-content { min-width: 0; min-height: 0; overflow: auto; background: #fbfcfc; }
.resource-card-grid { padding: 22px; display: grid; grid-template-columns: repeat(auto-fill,minmax(190px,1fr)); align-content: start; gap: 18px; }
.resource-card { min-width: 0; padding: 0; overflow: hidden; display: grid; grid-template-rows: 206px auto; border: 1px solid #dce6e3; border-radius: 14px; text-align: left; color: #223e36; background: #fff; box-shadow: 0 5px 18px rgba(29,72,59,.05); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.resource-card:hover { transform: translateY(-3px); border-color: #64c7a7; box-shadow: 0 14px 34px rgba(25,102,79,.13); }
.resource-card-cover { padding: 16px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg,#f3f8f6,#e8f1ee); }
.resource-card-cover img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 9px rgba(30,57,49,.14)); }
.resource-card-copy { min-width: 0; padding: 13px 14px 15px; display: grid; gap: 5px; border-top: 1px solid #edf2f0; }
.resource-card-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.resource-card-copy small { overflow: hidden; color: #7a8c86; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.resource-card-copy em { color: #098565; font-size: 10px; font-style: normal; font-weight: 750; }
.resource-empty { min-height: 340px; padding: 32px; display: grid; place-content: center; justify-items: center; gap: 8px; color: #6f817b; text-align: center; }
.resource-empty > span:first-child { display: grid; width: 62px; height: 62px; place-items: center; border-radius: 18px; color: #1aaa80; background: #e6f7f1; font-size: 28px; }
.resource-empty strong { color: #29483f; font-size: 15px; }
.resource-empty p { max-width: 420px; margin: 0; font-size: 12px; line-height: 1.65; }
.resource-loading { width: 28px !important; height: 28px !important; border: 3px solid #d8eee7; border-top-color: #11a979; border-radius: 999px !important; background: transparent !important; animation: resource-spin .7s linear infinite; }
@keyframes resource-spin { to { transform: rotate(360deg); } }
.resource-detail-layout { min-height: 100%; display: grid; grid-template-columns: 318px minmax(0,1fr); }
.resource-detail-sidebar { min-width: 0; min-height: 0; padding: 16px 12px 18px 16px; overflow: hidden; display: grid; grid-template-rows: auto auto minmax(0,1fr); border-right: 1px solid #dfe8e5; background: #f7faf9; }
.resource-detail-book { min-width: 0; padding: 10px; display: grid; grid-template-columns: 58px minmax(0,1fr); align-items: center; gap: 11px; border: 1px solid #dfe9e6; border-radius: 11px; background: #fff; }
.resource-detail-book img { width: 58px; height: 72px; object-fit: contain; border-radius: 5px; background: #eef4f2; }
.resource-detail-book div { min-width: 0; display: grid; gap: 5px; }
.resource-detail-book strong,.resource-detail-book small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resource-detail-book small { color: #788a84; font-size: 10px; }
.resource-tree-heading { padding: 16px 6px 8px; display: flex; justify-content: space-between; align-items: center; }
.resource-tree-heading strong { font-size: 12px; }
.resource-tree-heading span { color: #789087; font-size: 10px; }
.resource-knowledge-tree { min-height: 0; overflow: auto; padding-right: 4px; }
.resource-knowledge-level { margin: 0; padding: 0; list-style: none; }
.resource-knowledge-level .resource-knowledge-level { margin-left: 14px; padding-left: 9px; border-left: 1px solid #d8e4e0; }
.resource-knowledge-row { min-width: 0; display: grid; grid-template-columns: 22px minmax(0,1fr); align-items: center; border-radius: 7px; }
.resource-knowledge-row:hover,.resource-knowledge-row.is-active { background: #e7f7f1; }
.resource-tree-toggle { width: 22px; height: 30px; padding: 0; border: 0; color: #82948e; background: transparent; font-size: 14px; }
.resource-tree-toggle:disabled { cursor: default; opacity: .55; }
.resource-node-button { min-width: 0; min-height: 34px; padding: 4px 7px 4px 2px; display: grid; grid-template-columns: 20px minmax(0,1fr) auto; align-items: center; gap: 5px; border: 0; color: #2b463e; text-align: left; background: transparent; }
.resource-node-button span { font-size: 13px; }
.resource-node-button b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.resource-node-button em { min-width: 19px; padding: 2px 5px; border-radius: 999px; color: #087b59; background: #d7f3e9; text-align: center; font-size: 9px; font-style: normal; font-weight: 800; }
.resource-preview-pane { min-width: 0; min-height: 0; padding: 16px 18px 18px; overflow: auto; display: grid; grid-template-rows: auto minmax(320px,1fr) auto auto; gap: 10px; background: #fff; }
.resource-preview-heading { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.resource-preview-heading > div { min-width: 0; display: grid; gap: 3px; }
.resource-preview-heading span,.resource-preview-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resource-preview-heading span { color: #71847e; font-size: 10px; }
.resource-preview-heading strong { color: #29473f; font-size: 13px; }
.resource-preview-heading > b { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: #087b59; background: #e3f7f0; font-size: 10px; }
.resource-preview-stage { min-width: 0; min-height: 320px; overflow: hidden; display: grid; place-items: center; padding: 18px; border: 1px solid color-mix(in srgb,var(--resource-preview-bg,#edf3f1),#a8b9b3 30%); border-radius: 12px; background: var(--resource-preview-bg,#edf3f1); transition: background-color .2s ease,border-color .2s ease; }
.resource-preview-stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; background: transparent; box-shadow: 0 12px 28px rgba(30,58,50,.11); }
.resource-preview-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.resource-preview-nav { display: flex; gap: 7px; }
.resource-preview-nav button { min-height: 34px; padding: 0 11px; border: 1px solid #d8e3df; border-radius: 8px; color: #425d55; background: #fff; font-size: 11px; }
.resource-preview-nav button:disabled { cursor: default; opacity: .45; }
.resource-insert-button { min-height: 38px; padding-inline: 18px; }
.resource-thumbnail-strip { min-width: 0; padding: 7px 2px 2px; overflow-x: auto; display: flex; gap: 8px; }
.resource-thumbnail-strip button { position: relative; width: 66px; height: 54px; flex: 0 0 auto; padding: 3px; overflow: hidden; border: 1px solid #d7e1de; border-radius: 7px; background: #f7faf9; }
.resource-thumbnail-strip button.is-active { border-color: #0cad7c; box-shadow: 0 0 0 2px rgba(12,173,124,.17); }
.resource-thumbnail-strip img { width: 100%; height: 100%; object-fit: contain; }
.resource-thumbnail-strip span { position: absolute; right: 2px; bottom: 2px; min-width: 15px; padding: 1px 3px; border-radius: 4px; color: #fff; background: rgba(25,52,44,.72); font-size: 8px; }
.resource-preview-pane .detail-empty { min-height: 100%; }
.shape-library-group + .shape-library-group { margin-top: 20px; }
.shape-library-group h3 { margin-bottom: 10px; color: #2d4b43; font-size: 14px; }
.shape-library-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(112px,1fr)); gap: 9px; }
.shape-library-item { display: grid; grid-template-rows: 72px auto; gap: 5px; padding: 8px; border: 1px solid #dbe5e2; border-radius: 10px; color: #29453d; background: #fff; font-size: 11px; font-weight: 800; }
.shape-library-item:hover, .shape-library-item.is-active { border-color: var(--brand); background: var(--brand-soft); }
.shape-library-item svg { width: 100%; height: 100%; }
@media (max-width: 860px) {
  .resource-library-dialog { width: calc(100vw - 16px); height: calc(100dvh - 16px); }
  .resource-library-filters { flex-wrap: wrap; }
  .resource-library-search { flex-basis: 100%; order: 3; }
  .resource-library-filters > strong { margin-left: auto; }
  .resource-detail-layout { grid-template-columns: 240px minmax(0,1fr); }
}
@media (max-width: 640px) {
  .resource-library-dialog { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  .resource-library-dialog > header { padding: 14px; }
  .resource-library-filters { padding: 10px 14px; gap: 8px; }
  .resource-library-filters label:not(.resource-library-search) { flex: 1; }
  .resource-library-filters select { width: 100%; min-width: 0; }
  .resource-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 12px; gap: 10px; }
  .resource-card { grid-template-rows: 150px auto; }
  .resource-detail-layout { display: block; }
  .resource-detail-sidebar { max-height: 40vh; border-right: 0; border-bottom: 1px solid #dfe8e5; }
  .resource-preview-pane { min-height: 58vh; padding: 12px; }
  .resource-preview-footer { align-items: stretch; flex-direction: column; }
  .resource-insert-button { width: 100%; }
}
.shape-object-settings .shape-library-trigger {
  display: grid !important;
  grid-template-rows: minmax(30px,1fr) auto;
  grid-template-columns: minmax(0,1fr);
  place-items: center;
  gap: 2px;
  width: 100%;
  height: 100%;
  min-height: 67px;
  padding: 5px 6px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 8px;
  color: #f4f8f7;
  background: rgba(255,255,255,.1);
  text-align: center;
}
.shape-object-settings .shape-library-trigger:hover { border-color: #61d4b3; background: rgba(83,207,166,.16); }
.shape-library-trigger > span { display: grid; width: 32px; height: 32px; place-items: center; padding: 3px; overflow: hidden; }
.shape-library-trigger > span svg { display: block; width: 100%; height: 100%; }
.shape-library-trigger b { display: block; max-width: 100%; overflow: hidden; font-size: 10px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.shape-library-item .is-shape-preview { width: calc(100% - 12px); height: calc(100% - 10px); margin: 5px 6px; }
.experiment-library-dialog { width: min(1180px, calc(100vw - 36px)); max-height: min(860px, calc(100vh - 36px)); }
.experiment-library-dialog > header { align-items: center; background: linear-gradient(135deg,#ffffff 0%,#f1fbf7 100%); }
.experiment-library-summary { display: grid; flex: none; min-width: 150px; margin-left: auto; padding: 9px 14px; border: 1px solid #cde7dd; border-radius: 12px; background: #fff; text-align: right; }
.experiment-library-summary strong { color: #087c5c; font-size: 18px; }
.experiment-library-summary small { margin-top: 2px; color: #6b7f79; font-size: 10px; }
.experiment-library-filters { display: grid; grid-template-columns: auto auto minmax(150px,auto) minmax(240px,1fr); gap: 12px; }
.experiment-library-filters select, .experiment-library-filters input { min-height: 36px; border: 1px solid #d3dfdb; border-radius: 8px; background: #fff; }
.experiment-library-filters select { min-width: 105px; padding: 0 28px 0 10px; }
.experiment-library-search { min-width: 0; }
.experiment-library-search input { width: 100%; padding: 0 11px; }
.experiment-library-grid { display: block; min-height: 420px; }
.experiment-library-section + .experiment-library-section { margin-top: 24px; }
.experiment-library-section > header { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 11px; padding: 0 2px 9px; border-bottom: 1px solid #deebe7; }
.experiment-library-section > header div { display: flex; align-items: baseline; gap: 9px; }
.experiment-library-section > header span { color: #0d8b67; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.experiment-library-section > header h3 { margin: 0; color: #183c33; font-size: 16px; }
.experiment-library-section > header > b { color: #70857e; font-size: 11px; }
.experiment-library-section-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; align-items: stretch; }
.experiment-asset-card { grid-template-rows: 198px minmax(0,1fr); align-content: start; gap: 0; min-height: 390px; padding: 0; overflow: hidden; border-color: #d7e4df; border-radius: 16px; box-shadow: 0 8px 24px rgba(28,67,56,.06); }
.experiment-asset-card:hover { border-color: #76c9ae; background: #fff; box-shadow: 0 14px 32px rgba(19,99,76,.12); transform: translateY(-2px); }
.experiment-library-grid .asset-card-preview { position: relative; height: 198px; border: 0; border-bottom: 1px solid #dce8e4; border-radius: 0; background: #12152e; }
.experiment-library-grid .asset-card-preview svg { width: 100%; height: 100%; }
.experiment-preview-badges { position: absolute; right: 12px; top: 12px; display: flex; gap: 6px; pointer-events: none; }
.experiment-preview-badges i { padding: 4px 8px; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; color: #f7fbfa; background: rgba(12,25,35,.72); box-shadow: 0 3px 10px rgba(0,0,0,.15); font-size: 10px; font-style: normal; font-weight: 800; backdrop-filter: blur(6px); }
.experiment-card-body { display: grid; grid-template-rows: auto auto minmax(38px,auto) auto auto; align-content: start; gap: 9px; min-width: 0; padding: 14px 16px 13px; }
.experiment-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.experiment-card-meta em, .experiment-card-meta b { padding: 4px 8px; border-radius: 999px; font-size: 10px; font-style: normal; font-weight: 800; }
.experiment-card-meta em { color: #17644f; background: #e4f5ef; }
.experiment-card-meta b { color: #6a5511; background: #fff2bd; }
.experiment-card-title { overflow: hidden; color: #143b31; font-size: 16px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.experiment-card-description { display: -webkit-box; min-height: 38px; overflow: hidden; color: #62776f; font-size: 11px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.experiment-card-variables { display: flex; min-width: 0; gap: 6px; overflow: hidden; }
.experiment-card-variables i { overflow: hidden; padding: 4px 8px; border: 1px solid #dce8e4; border-radius: 7px; color: #547168; background: #f7faf9; font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.experiment-card-action { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid #e6eeeb; color: #087f5e; font-size: 12px; font-weight: 850; }
.experiment-card-action i { font-size: 15px; font-style: normal; transition: transform .15s ease; }
.experiment-asset-card:hover .experiment-card-action i { transform: translateX(3px); }
.interactive-experiment { display: grid; grid-template-rows: auto auto minmax(120px,1fr) auto auto; width: 100%; height: 100%; overflow: hidden; border: 1px solid #555876; border-radius: 14px; color: #f1f1f7; background: #11142d; box-shadow: 0 14px 36px rgba(7,9,25,.35); line-height: 1.25; }
.interactive-experiment > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; padding: 7px 11px; border-bottom: 1px solid #353854; background: linear-gradient(90deg,#171a38,#11142d); }
.interactive-experiment > header > div { display: grid; min-width: 0; gap: 2px; }
.interactive-experiment > header span { overflow: hidden; color: #ffc857; font-size: 8px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.interactive-experiment > header strong { overflow: hidden; color: #ffc857; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.experiment-live-state { flex: none; padding: 4px 7px; border: 1px solid #4e516e; border-radius: 999px; color: #b9bbcf; background: #1b1e3e; font-size: 8px; }
.is-running .experiment-live-state { color: #101329; border-color: #57cbb4; background: #57cbb4; }
.experiment-guide { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid #30334f; background: #151831; }
.experiment-guide p { min-width: 0; margin: 0; overflow: hidden; color: #b9bbcf; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.experiment-guide p b { margin-right: 6px; color: #ffc857; font-size: 9px; }
.experiment-guide ol { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.experiment-guide li { display: flex; align-items: center; gap: 3px; color: #b9bbcf; font-size: 7px; white-space: nowrap; }
.experiment-guide li i { display: grid; width: 14px; height: 14px; place-items: center; border-radius: 50%; color: #11142d; background: #ffc857; font-size: 7px; font-style: normal; font-weight: 900; }
.experiment-stage-layout { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(150px,.72fr); min-height: 0; gap: 7px; padding: 6px 8px 0; background: #0d1026; }
.experiment-scene { display: grid; min-height: 0; place-items: center; overflow: hidden; border: 1px solid #30334f; border-radius: 10px; background: #11142d; }
.experiment-scene svg { width: 100%; height: 100%; min-height: 112px; }
.experiment-3d-host { position: relative; width: 100%; height: 100%; min-height: 150px; overflow: hidden; border-radius: inherit; background: radial-gradient(circle at 50% 30%,#162b39,#071018 72%); touch-action: none; }
.experiment-3d-host canvas { display: block; width: 100%; height: 100%; min-height: 150px; }
.experiment-3d-host .vl3d-hint { max-width: calc(100% - 16px); font-size: 8px; }
.experiment-formula-motion { display: grid; grid-template-rows: auto minmax(44px,auto) auto auto auto 3px; align-content: center; gap: 7px; min-width: 0; padding: 10px; overflow: hidden; border: 1px solid #474b6c; border-radius: 10px; color: #f5f5fa; background: radial-gradient(circle at 70% 20%,rgba(102,78,95,.32),transparent 42%),#151831; }
.experiment-formula-motion > header { display: grid; gap: 2px; }
.experiment-formula-motion > header span { color: #ff6f69; font-size: 6px; font-weight: 900; letter-spacing: .12em; }
.experiment-formula-motion > header strong { color: #ffc857; font-size: 10px; }
.formula-expression { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; min-height: 44px; padding: 8px 5px; border: 1px solid #685460; border-radius: 7px; color: #fff; background: rgba(9,11,30,.42); font-family: Cambria Math,STIX Two Math,serif; font-size: clamp(12px,1.5vw,19px); }
.formula-token { display: inline-block; color: #f5f5fa; font-style: italic; opacity: .82; transform-origin: center; }
.formula-expression.is-katex { display: grid; padding: 6px 4px; font-family: inherit; font-size: clamp(10px,1.15vw,16px); }
.formula-expression.is-katex .vl-math, .formula-expression.is-katex .katex-display { width: 100%; max-width: 100%; margin: 0; overflow-x: auto; overflow-y: hidden; text-align: center; scrollbar-width: thin; }
.formula-expression.is-katex .katex { color: #f7f3ff; font-size: 1em; }
.formula-expression.is-katex .katex-mathml { position: absolute; }
.formula-token:nth-child(4n+1) { color: #57cbb4; }
.formula-token:nth-child(4n+3) { color: #ff8a84; }
.formula-substitution, .formula-result { display: grid; gap: 2px; padding-left: 7px; border-left: 2px solid #57cbb4; }
.formula-result { border-left-color: #ff6f69; }
.formula-substitution span, .formula-result span { color: #8588a5; font-size: 6px; }
.formula-substitution b, .formula-result b { overflow: hidden; color: #d9daea; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.experiment-formula-motion > p { margin: 0; color: #aeb0c5; font-size: 7px; line-height: 1.5; }
.formula-progress { height: 3px; overflow: hidden; border-radius: 999px; background: #2c304d; }
.formula-progress i { display: block; width: 38%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#ffc857,#ff6f69); transform: translateX(-110%); }
.experiment-readout { display: flex; align-items: center; gap: 7px; margin: 3px 9px; padding: 5px 7px; border: 1px solid #343753; border-radius: 8px; background: #171a36; }
.experiment-readout > b { flex: none; color: #ffc857; font-size: 8px; }
.experiment-readout > div { display: flex; flex: 1; flex-wrap: wrap; justify-content: center; gap: 5px; }
.experiment-readout span { padding: 3px 7px; border: 1px solid #3d4160; border-radius: 999px; color: #dfe0ee; background: #202442; font-size: 9px; font-weight: 800; }
.experiment-controls { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 5px 8px; align-items: center; padding: 5px 8px 8px; cursor: default; pointer-events: auto; touch-action: auto; }
.experiment-control-heading { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 8px; color: #9699b2; font-size: 7px; }
.experiment-control-heading strong { color: #ffc857; font-size: 9px; }
.experiment-transport { display: flex; grid-column: 1 / -1; align-items: center; gap: 5px; }
.experiment-controls button { min-height: 24px; padding: 3px 8px; border: 1px solid #505473; border-radius: 6px; color: #ddddeb; background: #202442; font-size: 9px; font-weight: 800; cursor: pointer; }
.experiment-controls button:hover { border-color: #ffc857; color: #ffc857; background: #292d4e; }
.experiment-controls .experiment-run-button { color: #11142d; border-color: #ffc857; background: #ffc857; }
.experiment-controls label { display: grid; min-width: 0; gap: 2px; color: #b9bbcf; font-size: 8px; font-weight: 700; }
.experiment-controls label span { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.experiment-controls output { color: #ffc857; font-size: 9px; font-weight: 800; }
.experiment-controls input { min-width: 0; width: 100%; height: 16px; accent-color: #ffc857; cursor: ew-resize; }
.interactive-experiment.is-running { border-color: #ffc857; box-shadow: 0 0 0 2px rgba(255,200,87,.14),0 14px 36px rgba(7,9,25,.38); }
.interactive-experiment.is-running .formula-token { animation: lab-formula-token calc(var(--lab-speed,1.4s) * 4) ease-in-out infinite; animation-delay: calc(var(--formula-index) * .16s); }
.interactive-experiment.is-running .formula-progress i { animation: lab-formula-progress calc(var(--lab-speed,1.4s) * 3) linear infinite; }
.interactive-experiment.is-running .formula-result { animation: lab-formula-result calc(var(--lab-speed,1.4s) * 2) ease-in-out infinite alternate; }
.interactive-experiment.is-running .lab-moving { animation: lab-swing var(--lab-speed,1.4s) ease-in-out infinite alternate; }
.interactive-experiment.is-running .lab-drop { animation: lab-drop var(--lab-speed,1.4s) linear infinite; }
.interactive-experiment.is-running .lab-bubbles circle, .interactive-experiment.is-running .lab-particles circle { animation: lab-bubble var(--lab-speed,1.4s) ease-in-out infinite alternate; }
.interactive-experiment.is-running .lab-cells, .interactive-experiment.is-running .lab-pulse { animation: lab-pulse var(--lab-speed,1.4s) ease-in-out infinite alternate; transform-origin: center; }
.interactive-experiment.is-running .lab-dash { animation: lab-dash calc(var(--lab-speed,1.4s) * 1.5) linear infinite; }
.interactive-experiment.is-running .lab-rise { animation: lab-rise var(--lab-speed,1.4s) ease-in-out infinite alternate; }
.interactive-experiment.is-running .lab-rotate { animation: lab-rotate calc(var(--lab-speed,1.4s) * 2.8) linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes lab-swing { from { transform: rotate(-14deg) translateY(1px); } to { transform: rotate(14deg) translateY(-2px); } }
@keyframes lab-drop { from { transform: translateY(-18px); opacity:.2; } to { transform: translateY(14px); opacity:1; } }
@keyframes lab-bubble { from { transform: translateY(6px); opacity:.5; } to { transform: translateY(-7px); opacity:1; } }
@keyframes lab-pulse { from { transform: scale(.95); filter:saturate(.9); } to { transform: scale(1.05); filter:saturate(1.2); } }
@keyframes lab-dash { to { stroke-dashoffset: -36; } }
@keyframes lab-rise { from { transform: translateY(8px); } to { transform: translateY(-12px); } }
@keyframes lab-rotate { to { transform: rotate(360deg); } }
@keyframes lab-formula-token { 0%,72%,100% { opacity:.28; transform:translateY(0) scale(.94); } 12%,38% { opacity:1; color:#ffc857; text-shadow:0 0 12px rgba(255,200,87,.65); transform:translateY(-2px) scale(1.1); } }
@keyframes lab-formula-progress { from { transform:translateX(-110%); } to { transform:translateX(290%); } }
@keyframes lab-formula-result { from { filter:saturate(.8); opacity:.72; } to { filter:saturate(1.35); opacity:1; } }
.lab-apparatus path[stroke="#163f3a"], .lab-apparatus circle[stroke="#163f3a"], .lab-apparatus rect[stroke="#163f3a"] { stroke:#e6e7f3; }
.lab-apparatus path[stroke="#3b5261"], .lab-apparatus path[stroke="#495b66"] { stroke:#aaaec7; }
.overlay-kind-experiment { min-height: 300px; }
.overlay-kind-experiment .overlay-resize { z-index: 12; }
.overlay-kind-experiment .interactive-experiment button, .overlay-kind-experiment .interactive-experiment input { pointer-events: auto; }
@media (max-width: 860px) {
  .experiment-library-filters { grid-template-columns: 1fr 1fr; }
  .experiment-library-search { grid-column: 1 / -1; }
  .experiment-library-summary { display: none; }
  .experiment-library-section-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) { .experiment-asset-card { grid-template-rows: 166px minmax(0,1fr); min-height: 352px; } .experiment-library-grid .asset-card-preview { height: 166px; } .experiment-guide ol { display: none; } .experiment-stage-layout { grid-template-columns: 1fr; } .experiment-formula-motion { display: none; } }
.overlay-context-menu button:disabled { color: #9ca9a5; cursor: not-allowed; opacity: .5; background: transparent; }
.overlay-context-menu button:not(:disabled):hover { background: #edf6f2; }
.context-menu-label { display: block; padding: 5px 10px 3px; color: #6e807a; font-size: 10px; font-weight: 800; }
.overlay-item.is-selected { outline: 1px solid #a7adb4; outline-offset: 0; }
.overlay-item.is-selected[data-overlay-id]::after { content: none; }
.scan-quality-options { display: grid; gap: 10px; margin: 14px 0 4px; }
.scan-quality-options .merge-option { align-items: flex-start; gap: 12px; margin: 0; padding: 12px 14px; border: 1px solid #d9e7e2; border-radius: 12px; background: #f7fbf9; }
.scan-quality-options .merge-option input { margin-top: 3px; accent-color: var(--brand); }
.scan-quality-options .merge-option span { display: grid; gap: 3px; }
.scan-quality-options .merge-option strong { color: #173a31; font-size: 14px; }
.scan-quality-options .merge-option small { color: #6b7f79; line-height: 1.5; }
.shape-vertex-layer { position: absolute; inset: 0; z-index: 8; overflow: visible; pointer-events: none; }
.shape-vertex-handle { position: absolute; width: 16px; height: 16px; padding: 0; border: 2px solid #fff; border-radius: 50%; color: #fff; background: #2674d9; box-shadow: 0 0 0 2px #2674d9, 0 3px 10px rgba(24, 67, 119, .28); cursor: grab; pointer-events: auto; transform: translate(-50%, -50%); touch-action: none; }
.shape-vertex-handle:hover { background: #1258b0; transform: translate(-50%, -50%) scale(1.16); }
.shape-vertex-handle:active { cursor: grabbing; }
.shape-vertex-handle span { position: absolute; left: 50%; top: -25px; min-width: 19px; padding: 2px 4px; border-radius: 5px; color: #fff; background: #164b8c; font-size: 10px; line-height: 15px; opacity: 0; transform: translateX(-50%); }
.shape-vertex-handle:hover span { opacity: 1; }
.shape-edit-hint { position: absolute; left: 50%; bottom: -38px; width: max-content; max-width: 300px; padding: 7px 11px; border: 1px solid #c6dbf5; border-radius: 8px; color: #194a82; background: rgba(246, 251, 255, .96); box-shadow: 0 7px 20px rgba(23, 70, 122, .14); font-size: 12px; line-height: 1.35; pointer-events: none; transform: translateX(-50%); }
.overlay-item.is-editing-points { cursor: default; }
.overlay-item.is-editing-points .overlay-remove, .overlay-item.is-editing-points .overlay-rotate, .overlay-item.is-editing-points .overlay-resize { opacity: .25; pointer-events: none; }
.overlay-context-menu .context-menu-label { display: block; padding: 5px 10px 3px; color: #63766f; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.processing-scope-note { margin: 14px 0 16px; padding: 12px 14px 12px 42px; border: 1px solid #cfe5dc; border-radius: 12px; color: #4a655d; background: #f3faf7; font-size: 13px; line-height: 1.6; position: relative; }
.processing-scope-note::before { content: '✓'; position: absolute; left: 14px; top: 13px; display: grid; width: 20px; height: 20px; place-items: center; border-radius: 50%; color: #fff; background: var(--brand); font-size: 12px; font-weight: 800; }
.marking-flow-card { margin-top: 14px; padding: 11px 12px 10px; overflow: hidden; border: 1px solid #d8e7e2; border-radius: 13px; background: linear-gradient(180deg,#fbfefd,#f3faf7); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.marking-flow-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.marking-flow-card header strong { color: #24483e; font-size: 11px; letter-spacing: .02em; }
.marking-flow-card header small { min-width: 0; overflow: hidden; color: #70867f; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.marking-flow-card ol { position: relative; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 0; padding: 0; list-style: none; }
.marking-flow-card ol::before { content: ''; position: absolute; z-index: 0; top: 12px; right: 12.5%; left: 12.5%; height: 2px; border-radius: 99px; background: #d6e3df; }
.marking-flow-card li { position: relative; z-index: 1; display: grid; min-width: 0; justify-items: center; gap: 5px; color: #84938e; text-align: center; }
.marking-flow-card li b { display: grid; width: 24px; height: 24px; place-items: center; border: 2px solid #edf3f1; border-radius: 50%; color: #82918c; background: #dfe8e5; box-shadow: 0 0 0 2px #f7fbf9; font-size: 9px; line-height: 1; }
.marking-flow-card li span { width: 100%; overflow: hidden; font-size: 9px; font-weight: 750; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.marking-flow-card li.is-complete { color: #477267; }
.marking-flow-card li.is-complete b { color: #fff; border-color: #bfe9dc; background: #24b88f; }
.marking-flow-card li.is-active { color: #08775b; }
.marking-flow-card li.is-active b { color: #0a8666; border-color: #18b78a; background: #fff; box-shadow: 0 0 0 3px rgba(24,183,138,.13),0 4px 11px rgba(17,139,106,.16); }
.marking-flow-card.is-finished { border-color: #bde5d8; background: linear-gradient(180deg,#f7fffc,#ebf9f4); }

.web-marking-backdrop { position: fixed; inset: 0; z-index: 180; display: grid; place-items: center; padding: 20px; background: rgba(22, 36, 34, .68); backdrop-filter: blur(7px); }
.has-web-marking-modal { overflow: hidden; }
.web-marking-backdrop[hidden] { display: none; }
.web-marking-dialog { display: flex; width: min(1180px, 96vw); max-height: 94vh; overflow: hidden; flex-direction: column; border: 1px solid rgba(255,255,255,.76); border-radius: 22px; background: #f4f7f6; box-shadow: 0 28px 80px rgba(11, 31, 26, .28); }
.web-marking-header { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 19px 24px 17px; border-bottom: 1px solid #dce6e2; background: #fff; }
.web-marking-header h2 { margin: 3px 0 4px; color: #173b32; font-size: 22px; }
.web-marking-header p { margin: 0; color: #6b7f79; font-size: 13px; }
.web-marking-header .app-dialog-close { position: static; flex: none; }
.web-marking-steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; margin: 0; padding: 13px 24px; border-bottom: 1px solid #dce6e2; background: #fbfdfc; list-style: none; }
.web-marking-steps li { position: relative; display: flex; align-items: center; gap: 9px; color: #87958f; }
.web-marking-steps li:not(:last-child)::after { content: ''; position: absolute; right: 14px; width: calc(100% - 110px); height: 2px; background: #dce6e2; }
.web-marking-steps li b { display: grid; width: 28px; height: 28px; flex: none; place-items: center; border-radius: 50%; color: #73847e; background: #e6ecea; font-size: 12px; }
.web-marking-steps li span { display: grid; font-size: 12px; font-weight: 850; }
.web-marking-steps li small { margin-top: 1px; font-size: 9px; font-weight: 600; }
.web-marking-steps li.is-active, .web-marking-steps li.is-complete { color: #0b7e60; }
.web-marking-steps li.is-active b, .web-marking-steps li.is-complete b { color: #fff; background: var(--brand); box-shadow: 0 4px 12px rgba(18, 174, 130, .2); }
.web-marking-body { min-height: 0; flex: 1; overflow: auto; padding: 18px 20px; }
.web-marking-loading { min-height: 430px; display: grid; width: min(580px,100%); margin: 0 auto; place-items: center; align-content: center; gap: 12px; color: #6d8079; text-align: center; }
.web-marking-loading > strong { margin-top: 3px; color: #173b32; font-size: 18px; }
.web-marking-loading > p { max-width: 540px; margin: 0; line-height: 1.65; }
.web-marking-ai-visual { --ai-progress: 0%; position: relative; display: grid; width: 176px; height: 176px; margin-bottom: 5px; place-items: center; isolation: isolate; }
.web-marking-ai-halo { position: absolute; inset: 10px; z-index: -2; border-radius: 50%; background: conic-gradient(from 25deg,rgba(19,188,143,.06),rgba(29,128,224,.34),rgba(103,85,238,.17),rgba(19,188,143,.46),rgba(19,188,143,.06)); filter: blur(16px); animation: web-marking-halo 3.8s ease-in-out infinite; }
.web-marking-ai-progress-ring { position: absolute; inset: 17px; border-radius: 50%; background: conic-gradient(from -90deg,#0fbd8a 0 var(--ai-progress),rgba(161,192,182,.2) var(--ai-progress) 100%); filter: drop-shadow(0 5px 12px rgba(10,153,112,.18)); -webkit-mask: radial-gradient(farthest-side,transparent calc(100% - 6px),#000 calc(100% - 5px)); mask: radial-gradient(farthest-side,transparent calc(100% - 6px),#000 calc(100% - 5px)); transition: background .45s ease; }
.web-marking-ai-core { position: relative; display: grid; width: 104px; height: 104px; place-content: center; gap: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.8); border-radius: 32px; color: #fff; background: radial-gradient(circle at 30% 20%,rgba(255,255,255,.32),transparent 32%),linear-gradient(145deg,#13bd8d 0%,#078b72 44%,#176aa5 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.38),0 16px 36px rgba(5,111,88,.24),0 0 0 8px rgba(255,255,255,.74); transform: rotate(-2deg); animation: web-marking-core 2.6s ease-in-out infinite; }
.web-marking-ai-core::before { content: ''; position: absolute; inset: -55%; background: linear-gradient(115deg,transparent 38%,rgba(255,255,255,.34) 50%,transparent 62%); transform: translateX(-45%) rotate(8deg); animation: web-marking-core-shine 2.8s ease-in-out infinite; }
.web-marking-ai-core em { position: relative; font-size: 34px; font-style: normal; font-weight: 950; line-height: 1; letter-spacing: -.05em; text-shadow: 0 5px 14px rgba(0,49,42,.24); }
.web-marking-ai-core small { position: relative; margin-top: 6px; color: rgba(255,255,255,.82); font-size: 9px; font-weight: 850; letter-spacing: .24em; }
.web-marking-ai-orbit { position: absolute; inset: 2px; border: 1px solid rgba(20,161,125,.2); border-radius: 50%; animation: web-marking-orbit 4.5s linear infinite; }
.web-marking-ai-orbit i { position: absolute; left: 50%; top: -4px; width: 9px; height: 9px; border: 2px solid #f8fffd; border-radius: 50%; background: #15bd8e; box-shadow: 0 0 0 4px rgba(21,189,142,.13),0 5px 14px rgba(7,112,86,.3); }
.web-marking-ai-orbit-two { inset: 9px; border-style: dashed; border-color: rgba(29,117,177,.19); animation-duration: 7s; animation-direction: reverse; transform: rotate(38deg); }
.web-marking-ai-orbit-two i { left: auto; right: 12px; top: 28px; width: 7px; height: 7px; background: #347ed0; box-shadow: 0 0 0 4px rgba(52,126,208,.11); }
.web-marking-progress-status { display: flex; width: min(440px,86vw); align-items: center; justify-content: space-between; gap: 16px; color: #55736a; }
.web-marking-progress-status > span { display: flex; min-width: 0; align-items: center; gap: 8px; }
.web-marking-progress-status i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #12b887; box-shadow: 0 0 0 5px rgba(18,184,135,.11); animation: web-marking-status-pulse 1.5s ease-in-out infinite; }
.web-marking-progress-status b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.web-marking-progress-status > strong { flex: none; color: #087b60; font-size: 15px; font-variant-numeric: tabular-nums; }
.web-marking-progress-track { position: relative; width: min(440px,86vw); height: 6px; overflow: hidden; border-radius: 999px; background: #dfeae6; box-shadow: inset 0 1px 2px rgba(23,59,50,.08); }
.web-marking-progress-track i { position: relative; display: block; width: 0; height: 100%; overflow: hidden; border-radius: inherit; background: linear-gradient(90deg,#12b887,#0aa083 56%,#3a83d1); box-shadow: 0 0 12px rgba(18,184,135,.32); transition: width .5s cubic-bezier(.22,.75,.22,1); }
.web-marking-progress-track i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg,transparent 30%,rgba(255,255,255,.72) 50%,transparent 70%); transform: translateX(-100%); animation: web-marking-progress-shine 1.4s ease-in-out infinite; }
.web-marking-ai-visual.is-error .web-marking-ai-core { background: linear-gradient(145deg,#ef8c5e,#c84646); animation: none; }
.web-marking-ai-visual.is-error .web-marking-ai-progress-ring { background: conic-gradient(from -90deg,#dc6554 0 var(--ai-progress),rgba(206,155,145,.2) var(--ai-progress) 100%); }
@keyframes web-marking-orbit { to { transform: rotate(360deg); } }
@keyframes web-marking-halo { 0%,100% { opacity: .58; transform: scale(.94) rotate(0); } 50% { opacity: 1; transform: scale(1.08) rotate(18deg); } }
@keyframes web-marking-core { 0%,100% { transform: translateY(0) rotate(-2deg) scale(.98); } 50% { transform: translateY(-4px) rotate(1deg) scale(1.02); } }
@keyframes web-marking-core-shine { 0%,20% { transform: translateX(-62%) rotate(8deg); } 58%,100% { transform: translateX(62%) rotate(8deg); } }
@keyframes web-marking-status-pulse { 50% { opacity: .56; transform: scale(.72); } }
@keyframes web-marking-progress-shine { 65%,100% { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) {
  .web-marking-ai-halo, .web-marking-ai-core, .web-marking-ai-core::before, .web-marking-ai-orbit, .web-marking-progress-status i, .web-marking-progress-track i::after { animation: none; }
}
.web-marking-editor { display: grid; gap: 14px; }
.web-marking-mode-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; border: 1px solid #dbe7e3; border-radius: 14px; background: #fff; }
.web-marking-mode-row > div:first-child > strong { color: #173b32; font-size: 14px; }
.web-marking-mode-row > div:first-child > p { margin: 4px 0 0; color: #70817b; font-size: 11px; }
.web-marking-quick-entry { display: flex; min-width: 154px; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid #e7b7b7; border-radius: 11px; color: #9d2c2c; background: linear-gradient(135deg,#fff8f8,#fff); box-shadow: 0 3px 12px rgba(180,56,56,.07); cursor: pointer; }
.web-marking-quick-entry:hover { border-color: #e36a6a; background: #fff2f2; box-shadow: 0 0 0 2px rgba(220,65,65,.09); }
.web-marking-quick-entry:disabled { cursor: wait; opacity: .58; }
.web-marking-quick-entry > span:first-child { display: grid; width: 28px; height: 28px; flex: none; place-items: center; border-radius: 8px; color: #fff; background: #e65252; font-size: 17px; font-weight: 900; }
.web-marking-quick-entry > span:last-child { display: grid; min-width: 0; text-align: left; }
.web-marking-quick-entry b { font-size: 12px; }
.web-marking-quick-entry small { margin-top: 2px; color: #aa6969; font-size: 8px; white-space: nowrap; }
.web-marking-mode-options { display: grid; grid-template-columns: repeat(2,minmax(190px,1fr)); gap: 9px; }
.web-marking-mode-options label { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 10px 12px; border: 1px solid #dce6e2; border-radius: 11px; background: #fafcfb; cursor: pointer; }
.web-marking-mode-options label.is-selected { border-color: #38b996; background: #ecf9f4; box-shadow: 0 0 0 2px rgba(36, 181, 143, .1); }
.web-marking-mode-options input { flex: none; accent-color: var(--brand); }
.web-marking-mode-options span { display: grid; min-width: 0; }
.web-marking-mode-options b { color: #24463e; font-size: 12px; }
.web-marking-mode-options small { margin-top: 2px; overflow: hidden; color: #6d817a; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.web-marking-academic-context { display: grid; grid-template-columns: minmax(220px,.7fr) minmax(520px,1.3fr); align-items: center; gap: 8px 16px; padding: 12px 14px; border: 1px solid #cfe3dc; border-radius: 13px; background: linear-gradient(135deg,#f7fcfa,#eef8f5); }
.web-marking-academic-context > div:first-child strong { color: #173b32; font-size: 13px; }
.web-marking-academic-context > div:first-child p { margin: 4px 0 0; color: #667c74; font-size: 10px; line-height: 1.45; }
.web-marking-academic-controls { display: grid; grid-template-columns: 120px 150px minmax(180px,1fr); align-items: end; gap: 8px; }
.web-marking-academic-controls label { display: grid; gap: 4px; color: #557068; font-size: 9px; font-weight: 800; }
.web-marking-academic-controls select { min-width: 0; height: 34px; padding: 0 28px 0 9px; border: 1px solid #c5d9d2; border-radius: 8px; color: #173b32; background: #fff; font-size: 11px; font-weight: 750; }
.web-marking-academic-controls button { height: 34px; white-space: nowrap; }
.web-marking-academic-context > small { grid-column: 1 / -1; color: #31745f; font-size: 9px; font-weight: 700; }
.web-marking-summary { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; }
.web-marking-summary > span, .web-marking-pending-summary { min-width: 0; padding: 10px 12px; border: 1px solid #dce7e3; border-radius: 11px; color: #71817b; background: #fff; font: inherit; font-size: 10px; text-align: left; }
.web-marking-summary > span > strong, .web-marking-pending-summary > strong { display: block; margin-top: 3px; color: #173b32; font-size: 18px; }
.web-marking-pending-summary { position: relative; cursor: pointer; }
.web-marking-pending-summary small { position: absolute; right: 10px; bottom: 8px; color: #82918c; font-size: 8px; }
.web-marking-pending-summary.has-pending { border-color: #ff9c28; color: #9a5700; background: #fff8ed; box-shadow: 0 0 0 2px rgba(255,156,40,.1); }
.web-marking-pending-summary.has-pending > strong { color: #d66f00; }
.web-marking-pending-summary:disabled { cursor: default; opacity: .72; }
.web-marking-pending-panel { grid-column: 1 / -1; display: grid; gap: 8px; padding: 11px 12px; border: 1px solid #f2c17d; border-radius: 11px; background: #fffaf2; box-shadow: 0 8px 24px rgba(78,57,22,.08); }
.web-marking-pending-panel > b { color: #7e520d; font-size: 11px; }
.web-marking-pending-panel > div { display: flex; flex-wrap: wrap; gap: 7px; }
.web-marking-pending-panel button { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #efc990; border-radius: 8px; color: #744a09; background: #fff; font-size: 10px; cursor: pointer; }
.web-marking-pending-panel button:hover { border-color: #e9951f; background: #fff3df; }
.web-marking-pending-panel button span { font-weight: 800; }
.web-marking-pending-panel button small { color: #a67937; font-size: 8px; }
.web-quick-marking-backdrop { position: fixed; inset: 0; z-index: 220; display: grid; place-items: center; padding: 24px; background: rgba(21,34,32,.58); backdrop-filter: blur(8px); }
.web-quick-marking-backdrop[hidden] { display: none; }
.web-quick-marking-dialog { display: flex; width: min(980px,94vw); max-height: 90vh; overflow: hidden; flex-direction: column; border: 1px solid rgba(255,255,255,.9); border-radius: 24px; background: #f7f9f9; box-shadow: 0 30px 90px rgba(14,31,27,.3); }
.web-quick-marking-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 22px 24px 17px; border-bottom: 1px solid #e3e9e7; background: #fff; }
.web-quick-marking-header h2 { margin: 3px 0 4px; color: #243f4e; font-size: 25px; }
.web-quick-marking-header p { margin: 0; color: #70817c; font-size: 11px; }
.web-quick-marking-header-side { display: flex; align-items: flex-start; gap: 18px; }
.web-quick-marking-header-side .app-dialog-close { position: static; flex: none; }
.web-quick-marking-legend { display: flex; max-width: 480px; flex-wrap: wrap; justify-content: flex-end; gap: 6px 12px; padding-top: 4px; }
.web-quick-marking-legend span { display: inline-flex; align-items: center; gap: 5px; color: #65756f; font-size: 9px; white-space: nowrap; }
.web-quick-marking-legend i { width: 9px; height: 9px; border-radius: 50%; background: #94a3ad; box-shadow: 0 0 0 3px #edf0f2; }
.web-quick-marking-legend b { color: #42544e; font-size: 10px; }
.web-quick-marking-legend .is-correct i { background: #e65454; box-shadow: 0 0 0 3px #fde8e8; }
.web-quick-marking-legend .is-wrong i { background: #2fad73; box-shadow: 0 0 0 3px #e3f6ec; }
.web-quick-marking-legend .is-partial i { background: #ed78a7; box-shadow: 0 0 0 3px #fde5ef; }
.web-quick-marking-legend .is-unanswered i { background: #e3a13c; box-shadow: 0 0 0 3px #fff0d8; }
.web-quick-marking-bulk { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 14px 20px 0; padding: 11px 13px; border: 1px solid #dfe7e4; border-radius: 13px; background: #fff; }
.web-quick-marking-bulk > div:first-child { display: grid; gap: 2px; }
.web-quick-marking-bulk strong { color: #30483f; font-size: 11px; }
.web-quick-marking-bulk small { color: #7c8985; font-size: 9px; }
.web-quick-marking-bulk > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.web-quick-marking-bulk button { min-height: 30px; padding: 5px 9px; border: 1px solid #d9e2df; border-radius: 8px; color: #52645e; background: #f8faf9; font-size: 9px; font-weight: 800; cursor: pointer; }
.web-quick-marking-bulk button:hover { border-color: #aebdb8; background: #fff; }
.web-quick-marking-bulk button:disabled { cursor: default; opacity: .42; }
.web-quick-marking-body { display: grid; min-height: 300px; grid-template-columns: minmax(0,1fr) 250px; gap: 15px; overflow: auto; padding: 16px 20px 18px; }
.web-quick-marking-grid { display: grid; align-content: start; grid-template-columns: repeat(auto-fill,minmax(88px,1fr)); gap: 10px; }
.web-quick-marking-card { position: relative; display: grid; min-height: 70px; place-items: center; padding: 12px 8px 17px; border: 2px solid #d2dbe0; border-radius: 15px; color: #354959; background: #eef2f4; box-shadow: 0 4px 10px rgba(41,61,71,.05); cursor: pointer; transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; }
.web-quick-marking-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(41,61,71,.11); }
.web-quick-marking-card.is-selected { box-shadow: 0 0 0 3px #fff,0 0 0 6px #4d9df0,0 9px 20px rgba(31,95,156,.17); }
.web-quick-marking-card > span { overflow: hidden; max-width: 100%; font-size: 18px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.web-quick-marking-card > b { position: absolute; top: 5px; right: 7px; font-size: 12px; }
.web-quick-marking-card > small { position: absolute; right: 6px; bottom: 4px; left: 6px; overflow: hidden; color: inherit; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; opacity: .68; }
.web-quick-marking-card.is-correct { border-color: #ee7272; color: #b82f2f; background: #fff0f0; }
.web-quick-marking-card.is-wrong { border-color: #55bd88; color: #15734a; background: #eaf8f1; }
.web-quick-marking-card.is-partial { border-color: #ef95ba; color: #a53b69; background: #fff0f6; }
.web-quick-marking-card.is-unanswered { border-color: #e8b766; color: #966019; background: #fff7e8; }
.web-quick-marking-inspector { display: grid; align-content: start; gap: 14px; padding: 15px; border: 1px solid #dce5e2; border-radius: 15px; background: #fff; }
.web-quick-marking-inspector > div:first-child { display: grid; gap: 3px; }
.web-quick-marking-inspector > div:first-child > span { color: #7b8984; font-size: 9px; font-weight: 800; }
.web-quick-marking-inspector > div:first-child > strong { color: #263f4d; font-size: 18px; }
.web-quick-marking-inspector > div:first-child > small { color: #71817b; font-size: 9px; }
.web-quick-marking-result-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.web-quick-marking-result-buttons button { display: flex; min-height: 38px; align-items: center; justify-content: center; gap: 5px; padding: 7px; border: 1px solid #d5dedb; border-radius: 9px; color: #52645e; background: #f8faf9; font-size: 9px; font-weight: 800; cursor: pointer; }
.web-quick-marking-result-buttons button:hover, .web-quick-marking-result-buttons button.is-active { border-width: 2px; background: #fff; }
.web-quick-marking-result-buttons .is-correct:hover, .web-quick-marking-result-buttons .is-correct.is-active { border-color: #e65454; color: #b82f2f; background: #fff0f0; }
.web-quick-marking-result-buttons .is-wrong:hover, .web-quick-marking-result-buttons .is-wrong.is-active { border-color: #2fad73; color: #15734a; background: #eaf8f1; }
.web-quick-marking-result-buttons .is-partial:hover, .web-quick-marking-result-buttons .is-partial.is-active { border-color: #ed78a7; color: #a53b69; background: #fff0f6; }
.web-quick-marking-result-buttons .is-pending:hover, .web-quick-marking-result-buttons .is-pending.is-active { border-color: #8999a3; color: #465862; background: #eef2f4; }
.web-quick-marking-result-buttons .is-unanswered:hover, .web-quick-marking-result-buttons .is-unanswered.is-active { border-color: #e3a13c; color: #966019; background: #fff7e8; }
.web-quick-marking-empty { grid-column: 1 / -1; display: grid; min-height: 100px; place-items: center; color: #7b8984; font-size: 11px; text-align: center; }
.web-quick-marking-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 14px 20px 18px; border-top: 1px solid #e1e8e5; background: #fff; }
.web-quick-marking-add { display: grid; flex: 1; grid-template-columns: minmax(210px,1fr) 100px auto; align-items: end; gap: 7px; }
.web-quick-marking-add label { display: grid; gap: 4px; color: #52645e; font-size: 9px; font-weight: 800; }
.web-quick-marking-add input, .web-quick-marking-add select { width: 100%; height: 34px; padding: 0 9px; border: 1px solid #cfdcd7; border-radius: 8px; color: #294239; background: #fff; font: inherit; font-size: 10px; }
.web-quick-marking-add button { min-height: 34px; white-space: nowrap; }
.web-quick-marking-add > small { grid-column: 1 / -1; color: #7f8d88; font-size: 8px; }
.web-quick-marking-add > small.is-error { color: #c13f3f; }
.web-quick-marking-add > small.is-success { color: #17845b; }
.web-quick-marking-footer > .primary-button { min-height: 38px; padding-inline: 18px; white-space: nowrap; }
.web-marking-layout { display: grid; grid-template-columns: minmax(330px,.82fr) minmax(520px,1.3fr); align-items: start; gap: 14px; }
.web-marking-preview { position: sticky; top: 0; margin: 0; padding: 12px; border: 1px solid #dce7e3; border-radius: 14px; background: #fff; }
.web-marking-page-tabs { display: grid; grid-template-columns: repeat(auto-fit,minmax(90px,1fr)); gap: 7px; margin-bottom: 10px; }
.web-marking-page-tab { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 7px; padding: 8px 10px; border: 1px solid #d5e2de; border-radius: 9px; color: #557069; background: #f8fbfa; font-size: 11px; cursor: pointer; }
.web-marking-page-tab strong { color: #29483f; font-size: 11px; }
.web-marking-page-tab small { color: #758780; font-size: 9px; white-space: nowrap; }
.web-marking-page-tab:hover { border-color: #8fcfbc; background: #f1faf7; }
.web-marking-page-tab.is-active { border-color: #19aa82; color: #08775b; background: #eaf8f3; box-shadow: 0 0 0 2px rgba(25,170,130,.1); }
.web-marking-page-tab.is-active strong, .web-marking-page-tab.is-active small { color: #08775b; }
.web-marking-crop-tools { display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; padding: 7px 9px; border: 1px solid #dbe6e2; border-radius: 9px; color: #667b74; background: #f8fbfa; }
.web-marking-crop-tools > div:first-child { display: grid; min-width: 0; gap: 2px; }
.web-marking-crop-tools strong { color: #29483f; font-size: 10px; }
.web-marking-crop-tools span { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.web-marking-crop-tools > div:last-child { display: flex; flex: none; gap: 5px; }
.web-marking-crop-tools button { min-height: 28px; padding: 5px 8px; border: 1px solid #cddfd9; border-radius: 7px; color: #08795e; background: #fff; font-size: 9px; font-weight: 800; cursor: pointer; }
.web-marking-crop-tools button:hover { border-color: #54b99b; background: #eff9f6; }
#web-marking-preview-stage { position: relative; display: grid; min-height: 430px; max-height: 570px; place-items: center; overflow: auto; border-radius: 9px; color: #73847e; background: #e8eeec; }
.web-marking-preview img { display: block; width: 100%; height: auto; }
.web-marking-image-frame { position: relative; width: 100%; line-height: 0; }
.web-marking-image-frame.is-drawing-region { cursor: crosshair; }
.web-marking-preview iframe { width: 100%; min-height: 540px; border: 0; background: #fff; }
.web-marking-preview figcaption { margin-top: 9px; color: #71817b; font-size: 10px; line-height: 1.5; }
.web-marking-box { position: absolute; z-index: 3; border: 2px solid #f5a524; border-radius: 4px; background: rgba(245, 165, 36, .1); box-shadow: 0 0 0 1px rgba(255,255,255,.9); cursor: move; touch-action: none; }
.web-marking-box.is-related { z-index: 4; border-color: #2789d8; border-style: dashed; background: rgba(39, 137, 216, .09); }
.web-marking-box.is-mark { z-index: 2; border-color: #ef4444; background: rgba(239, 68, 68, .09); box-shadow: 0 0 0 2px rgba(255,255,255,.9); pointer-events: none; }
.web-marking-box.is-draft { z-index: 6; border-style: dashed; pointer-events: none; }
.web-marking-box.is-draft[hidden] { display: none; }
.web-marking-region-label { position: absolute; top: -20px; left: -2px; display: flex; height: 19px; align-items: center; gap: 4px; padding: 0 6px; border-radius: 5px 5px 0 0; color: #fff; background: #d88a12; font-size: 9px; font-weight: 850; line-height: 19px; white-space: nowrap; pointer-events: none; }
.web-marking-box.is-related .web-marking-region-label { background: #277fbd; }
.web-marking-region-label button { width: 15px; height: 15px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: rgba(255,255,255,.2); font-size: 11px; line-height: 14px; cursor: pointer; pointer-events: auto; }
.web-marking-region-handle { position: absolute; width: 12px; height: 12px; border: 2px solid #e59419; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(59,48,23,.2); }
.web-marking-box.is-related .web-marking-region-handle { border-color: #277fbd; }
.web-marking-region-handle.is-nw { top: -7px; left: -7px; cursor: nwse-resize; }
.web-marking-region-handle.is-ne { top: -7px; right: -7px; cursor: nesw-resize; }
.web-marking-region-handle.is-se { right: -7px; bottom: -7px; cursor: nwse-resize; }
.web-marking-region-handle.is-sw { bottom: -7px; left: -7px; cursor: nesw-resize; }
.web-marking-question-panel { min-width: 0; overflow: hidden; border: 1px solid #dce7e3; border-radius: 14px; background: #fff; }
.web-marking-question-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #e3ebe8; background: #fbfdfc; }
.web-marking-question-toolbar > div { display: flex; align-items: baseline; gap: 8px; }
.web-marking-question-toolbar span { color: #71817b; font-size: 10px; }
.web-marking-question-toolbar button { min-height: 32px; padding: 6px 10px; }
.web-marking-question-list { display: grid; max-height: 570px; overflow: auto; }
.web-marking-question-card { position: relative; display: grid; grid-template-columns: 112px minmax(0,1fr) 126px 116px; gap: 9px; padding: 13px 14px 13px 30px; border-bottom: 1px solid #e6ecea; cursor: pointer; outline: 0; transition: background .16s ease, box-shadow .16s ease, opacity .16s ease; }
.web-marking-question-card:last-child { border-bottom: 0; }
.web-marking-question-card:hover { background: #f6fbf9; }
.web-marking-question-card.is-pending { background: #fffaf4; }
.web-marking-question-card.is-active { background: #eaf8f3; box-shadow: inset 4px 0 #16a67d, inset 0 0 0 1px rgba(22,166,125,.2); }
.web-marking-question-card.is-active.is-pending { background: linear-gradient(90deg,#eaf8f3 0 76%,#fff8ed); }
.web-marking-question-card:focus-visible { box-shadow: inset 4px 0 #16a67d, inset 0 0 0 2px rgba(22,166,125,.38); }
.web-marking-question-card.is-dragging { opacity: .44; }
.web-marking-question-card.is-drop-before::before,
.web-marking-question-card.is-drop-after::after { position: absolute; right: 10px; left: 10px; z-index: 12; height: 3px; border-radius: 3px; background: #12a77d; box-shadow: 0 0 0 2px rgba(18,167,125,.14); content: ''; pointer-events: none; }
.web-marking-question-card.is-drop-before::before { top: -2px; }
.web-marking-question-card.is-drop-after::after { bottom: -2px; }
.web-marking-question-drag-handle { position: absolute; top: 12px; left: 7px; display: grid; width: 17px; height: 34px; place-items: center; border-radius: 6px; color: #8a9b95; font-size: 15px; font-weight: 900; line-height: 1; letter-spacing: -3px; cursor: grab; touch-action: none; user-select: none; }
.web-marking-question-drag-handle:hover,
.web-marking-question-drag-handle:focus-visible { color: #08795e; background: #dff3ed; outline: 0; }
.web-marking-question-drag-handle:active { cursor: grabbing; }
.web-marking-question-card input,
.web-marking-question-card select,
.web-marking-question-card textarea,
.web-marking-question-card button { cursor: auto; }
.web-marking-question-card label { display: grid; min-width: 0; gap: 4px; color: #657872; font-size: 9px; font-weight: 750; }
.web-marking-question-card input, .web-marking-question-card select, .web-marking-question-card textarea { width: 100%; min-width: 0; padding: 8px 9px; border: 1px solid #d8e2de; border-radius: 8px; color: #203d36; background: #fff; font: inherit; font-size: 11px; outline: 0; }
.web-marking-question-card textarea { min-height: 62px; resize: vertical; line-height: 1.5; }
.web-marking-question-card input:focus, .web-marking-question-card select:focus, .web-marking-question-card textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(24, 182, 139, .1); }
.web-marking-question-main { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.web-marking-question-main .is-full { grid-column: 1 / -1; }
.web-marking-icon-input { display: grid; grid-template-columns: 30px minmax(0,1fr); align-items: center; border: 1px solid #d8e2de; border-radius: 8px; background: #fff; overflow: hidden; }
.web-marking-icon-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(24, 182, 139, .1); }
.web-marking-icon-input > i { display: grid; height: 100%; min-height: 32px; place-items: center; color: #08795e; background: #eff9f6; font-size: 15px; font-style: normal; }
.web-marking-icon-input > input, .web-marking-icon-input > select { border: 0; border-radius: 0; box-shadow: none !important; }
.web-marking-knowledge-field { display: grid !important; gap: 6px; }
.web-marking-knowledge-result { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 7px 5px 10px; border: 1px solid #d5e5df; border-radius: 9px; background: linear-gradient(135deg, #fff, #f2fbf8); }
.web-marking-knowledge-result > span { min-width: 0; display: grid; grid-template-columns: 25px minmax(0, 1fr); align-items: center; column-gap: 6px; }
.web-marking-knowledge-result i { grid-row: 1 / span 2; font-size: 17px; font-style: normal; }
.web-marking-knowledge-result strong { overflow: hidden; color: #153e34; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.web-marking-knowledge-result small { color: #69827a; font-size: 9px; }
.web-marking-knowledge-result button { flex: none; min-height: 28px; padding: 0 10px; border: 1px solid #b8d8ce; border-radius: 7px; color: #08795e; background: #fff; font-size: 11px; font-weight: 700; }
.web-marking-knowledge-search { display: grid; gap: 3px; }
.web-marking-knowledge-search input { min-width: 0; height: 34px; border: 1px solid #d8e2de; border-radius: 8px; padding: 0 10px; background: #fff; }
.web-marking-knowledge-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(24, 182, 139, .1); outline: 0; }
.web-marking-knowledge-search small { color: #74877f; font-size: 9px; line-height: 1.35; }
.web-marking-question-card select:disabled { color: #82948e; background: #f2f6f4; cursor: not-allowed; }
.web-marking-match-note { overflow: hidden; color: #438071; font-size: 9px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.web-marking-question-identifiers { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 7px; }
.web-marking-question-number input { text-align: center; font-weight: 850; }
.web-marking-subquestion-number input { text-align: center; font-weight: 800; }
.web-marking-question-result select { font-weight: 800; }
.web-marking-question-delete { align-self: start; width: 32px; height: 32px; padding: 0; border: 1px solid #f1d2d2; border-radius: 8px; color: #c74b4b; background: #fff7f7; cursor: pointer; }
.web-marking-question-actions { display: grid; grid-template-columns: 1fr 32px; align-content: start; gap: 5px; }
.web-marking-wrongbook-button { grid-column: 1 / -1; min-height: 32px; padding: 6px 8px; border: 1px solid #f0c67b; border-radius: 8px; color: #9a5b00; background: #fff8e9; font-size: 10px; font-weight: 850; white-space: nowrap; cursor: pointer; }
.web-marking-wrongbook-button:hover { border-color: #e4a63f; background: #fff2d5; }
.web-marking-wrongbook-button.is-added { border-color: #e79a94; color: #b6332d; background: #fff0ee; }
.web-marking-wrongbook-button.is-added:hover { border-color: #d9574f; color: #a52620; background: #ffe2df; }
.web-marking-wrongbook-button:disabled { cursor: not-allowed; opacity: .55; }
.web-marking-add-subquestion { min-height: 32px; padding: 6px 7px; border: 1px solid #cfe4dc; border-radius: 8px; color: #087c61; background: #f0faf7; font-size: 10px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.web-marking-error-reasons { position: relative; display: grid; min-width: 0; gap: 4px; color: #657872; font-size: 9px; font-weight: 750; }
.web-marking-error-trigger { display: flex; width: 100%; min-height: 35px; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 9px; overflow: hidden; border: 1px solid #d8e2de; border-radius: 8px; color: #203d36; background: #fff; font-size: 11px; text-align: left; cursor: pointer; }
.web-marking-error-trigger:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(24, 182, 139, .1); outline: 0; }
.web-marking-error-summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.web-marking-error-trigger b { color: #658078; font-size: 12px; }
.web-marking-error-menu { position: absolute; top: calc(100% + 5px); left: 0; z-index: 8; display: grid; width: min(320px,100%); max-height: 220px; padding: 7px; overflow: auto; border: 1px solid #cee0da; border-radius: 10px; background: #fff; box-shadow: 0 12px 28px rgba(24,54,46,.16); }
.web-marking-error-menu[hidden] { display: none; }
.web-marking-error-option { display: flex !important; grid-template-columns: 16px 1fr; align-items: center; gap: 7px !important; padding: 6px 7px; border-radius: 7px; color: #29483f !important; font-size: 10px !important; cursor: pointer; }
.web-marking-error-option:hover { background: #eef8f5; }
.web-marking-error-option input { width: 15px; height: 15px; padding: 0; accent-color: var(--brand); }
.web-marking-error-option span { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.web-marking-error-option span i { display: inline-grid; place-items: center; width: 19px; height: 19px; flex: 0 0 19px; border-radius: 6px; background: #eef8f5; font-style: normal; font-size: 12px; }
.web-marking-empty { padding: 45px 20px; color: #72827c; text-align: center; }
.web-marking-error { margin: 0; padding: 11px 13px; border: 1px solid #f0caca; border-radius: 10px; color: #a83939; background: #fff3f3; font-size: 12px; }
.web-marking-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 20px; border-top: 1px solid #dce6e2; background: #fff; }
.web-marking-actions > span { color: #6d7e78; font-size: 11px; }
.web-marking-actions > div { display: flex; gap: 9px; }
.web-marking-actions button:disabled { cursor: not-allowed; opacity: .5; }
@media (max-width: 980px) {
  .web-marking-dialog { width: 98vw; max-height: 96vh; }
  .web-marking-mode-row { align-items: stretch; flex-direction: column; }
  .web-marking-quick-entry { width: 100%; }
  .web-marking-academic-context { grid-template-columns: 1fr; }
  .web-marking-academic-controls { grid-template-columns: 1fr 1fr minmax(180px,1.2fr); }
  .web-marking-layout { grid-template-columns: 1fr; }
  .web-marking-preview { position: static; }
  .web-marking-page-tabs { display: flex; overflow-x: auto; }
  .web-marking-page-tab { min-width: 100px; }
  #web-marking-preview-stage { min-height: 280px; max-height: 390px; }
  .web-marking-question-list { max-height: none; }
  .web-quick-marking-body { grid-template-columns: 1fr; }
  .web-quick-marking-inspector { grid-template-columns: minmax(150px,.5fr) minmax(0,1.5fr); }
  .web-quick-marking-result-buttons { grid-template-columns: repeat(5,1fr); }
}
@media (max-width: 680px) {
  .marking-flow-card { padding-inline: 10px; }
  .web-marking-backdrop { padding: 0; }
  .web-marking-dialog { width: 100vw; height: 100vh; max-height: none; border-radius: 0; }
  .web-marking-header { padding: 15px; }
  .web-marking-steps { padding: 10px 14px; }
  .web-marking-steps li:not(:last-child)::after, .web-marking-steps li small { display: none; }
  .web-marking-steps li { gap: 5px; }
  .web-marking-mode-options, .web-marking-summary { grid-template-columns: 1fr 1fr; }
  .web-marking-academic-controls { grid-template-columns: 1fr 1fr; }
  .web-marking-academic-controls button { grid-column: 1 / -1; }
  .web-marking-question-card { grid-template-columns: 104px minmax(0,1fr); }
  .web-marking-question-identifiers { grid-column: 1; grid-row: 1; }
  .web-marking-question-main { grid-column: 2; grid-row: 1; }
  .web-marking-question-result { grid-column: 2; grid-row: 2; }
  .web-marking-question-actions { grid-column: 1; grid-row: 2 / span 2; flex-wrap: wrap; }
  .web-marking-crop-tools { align-items: stretch; flex-direction: column; }
  .web-marking-error-menu { position: static; width: 100%; margin-top: 2px; }
  .web-marking-actions { align-items: stretch; flex-direction: column; }
  .web-marking-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
  .web-marking-actions #web-marking-confirm { grid-column: 1 / -1; }
  .web-quick-marking-backdrop { padding: 0; }
  .web-quick-marking-dialog { width: 100vw; height: 100vh; max-height: none; border-radius: 0; }
  .web-quick-marking-header { align-items: stretch; flex-direction: column; gap: 10px; padding: 16px; }
  .web-quick-marking-header-side { justify-content: space-between; }
  .web-quick-marking-legend { justify-content: flex-start; }
  .web-quick-marking-bulk { align-items: stretch; flex-direction: column; margin-inline: 12px; }
  .web-quick-marking-bulk > div:last-child { justify-content: flex-start; }
  .web-quick-marking-body { min-height: 0; padding-inline: 12px; }
  .web-quick-marking-grid { grid-template-columns: repeat(auto-fill,minmax(72px,1fr)); }
  .web-quick-marking-inspector { grid-template-columns: 1fr; }
  .web-quick-marking-result-buttons { grid-template-columns: repeat(3,1fr); }
  .web-quick-marking-footer { align-items: stretch; flex-direction: column; padding-inline: 12px; }
  .web-quick-marking-add { grid-template-columns: minmax(0,1fr) 90px; }
  .web-quick-marking-add button { grid-column: 1 / -1; }
  .web-quick-marking-footer > .primary-button { width: 100%; }
}
.manual-crop-entry { margin-top: 10px; }
.manual-crop-backdrop { position: fixed; inset: 0; z-index: 170; display: grid; place-items: center; padding: 24px; background: rgba(25, 42, 38, .58); backdrop-filter: blur(8px); }
.manual-crop-backdrop[hidden] { display: none; }
.manual-crop-dialog { width: min(1100px, calc(100vw - 48px)); max-height: calc(100vh - 48px); overflow: auto; border: 1px solid #cadbd5; border-radius: 18px; background: linear-gradient(180deg, #fff, #f5f8f7); box-shadow: 0 28px 80px rgba(18, 38, 33, .28); }
.manual-crop-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 22px 16px; border-bottom: 1px solid #dce7e3; }
.manual-crop-dialog > header h2 { margin: 5px 0 4px; font-size: 21px; }
.manual-crop-dialog > header p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.manual-crop-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 18px; align-items: center; min-height: 520px; padding: 20px 22px; background: #e9efed; }
.manual-crop-stage { position: relative; justify-self: center; width: min(100%, 720px); height: 500px; overflow: hidden; border-radius: 12px; background: #242b2a; box-shadow: 0 12px 34px rgba(26, 43, 39, .2); user-select: none; touch-action: none; }
.manual-crop-stage img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; pointer-events: none; }
.manual-crop-outline { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.manual-crop-outline polygon { fill: rgba(34, 104, 255, .09); stroke: #2468ff; stroke-width: .55; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 2px rgba(255,255,255,.9)); }
.manual-crop-handle { position: absolute; z-index: 2; display: block; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 3px solid #2468ff; border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgba(24,55,122,.32); cursor: move; touch-action: none; }
.manual-crop-handle.is-edge { width: 16px; height: 16px; margin: -8px 0 0 -8px; border-width: 2px; }
.manual-crop-help { align-self: stretch; padding: 18px; border: 1px solid #d4e3de; border-radius: 14px; color: #405b53; background: rgba(255,255,255,.92); }
.manual-crop-help strong { display: block; color: #183e34; font-size: 15px; }
.manual-crop-help small { display: block; margin-top: 7px; color: #6a817a; line-height: 1.55; }
.manual-crop-help ol { margin: 18px 0 0; padding-left: 20px; font-size: 12px; line-height: 1.8; }
.manual-crop-dialog > footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 22px 18px; }
.manual-crop-dialog > footer > div { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 800px) { .manual-crop-workspace { grid-template-columns: 1fr; } .manual-crop-help { display: none; } .manual-crop-stage { height: min(62vh, 520px); } .manual-crop-dialog > footer { align-items: stretch; flex-direction: column; } }
