:root {
  --ros-ink: #142b43;
  --ros-navy: #102a43;
  --ros-navy-2: #1e3a5f;
  --ros-ocean: #2563eb;
  --ros-teal: #2563eb;
  --ros-mint: #8eb4ff;
  --ros-bg: #eef3f9;
  --ros-paper: #f8faff;
  --ros-surface: #ffffff;
  --ros-line: #d3deeb;
  --ros-muted: #6e8097;
  --ros-shadow: 0 10px 28px rgb(30 64 120 / 7%);
}

body.redactos-theme {
  margin: 0;
  background: var(--ros-bg);
  color: var(--ros-ink);
  font-family: "Segoe UI Variable Text", "Microsoft YaHei UI", "HarmonyOS Sans SC", MiSans,
    "Noto Sans SC", sans-serif;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
}

.redactos-theme button,
.redactos-theme input,
.redactos-theme textarea,
.redactos-theme select {
  font: inherit;
}

.redactos-theme .ros-shell {
  gap: 0;
  padding: 0 16px 0 0;
  background:
    radial-gradient(circle at 88% -8%, rgb(20 184 166 / 14%), transparent 34rem),
    linear-gradient(135deg, #eaf2f3 0%, #f7faf9 50%, #e8f3f3 100%);
  color: var(--ros-ink);
}

/* Full-height navigation rail. */
.redactos-theme .ros-sidebar {
  width: 256px;
  height: 100%;
  margin: 0;
  border: 0;
  border-right: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 22% 5%, rgb(116 234 220 / 13%), transparent 12rem),
    linear-gradient(175deg, #0c3e55 0%, #082c40 48%, #061f30 100%);
  color: #c8dae1;
  box-shadow: 0 28px 60px rgb(6 31 48 / 24%);
}

.redactos-theme .ros-sidebar[class~="w-20"] {
  width: 86px;
}

.redactos-theme .ros-sidebar > div:first-child {
  min-height: 84px;
  margin: 0 8px;
  padding: 18px 12px;
  border-color: rgb(255 255 255 / 9%);
}

.redactos-theme .ros-sidebar .ros-brand-wordmark {
  width: 100%;
  height: 42px;
  padding: 3px 6px;
  border-radius: 10px;
  background: #ffffff;
  object-fit: contain;
  object-position: left center;
  box-shadow: 0 7px 18px rgb(0 15 25 / 16%);
}

.redactos-theme .ros-sidebar .ros-brand-mark {
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 7px 18px rgb(0 15 25 / 18%);
}

.redactos-theme .ros-sidebar .ros-brand-mark:first-child {
  display: none !important;
}

/* The compact mark was rendered as an isolated “脱” character. Keep the full wordmark
   in the expanded rail, and remove the redundant character-only mark when collapsed. */
.redactos-theme .ros-sidebar img[src$="desensitization-guard-mark.svg"] {
  display: none !important;
}

.redactos-theme .ros-sidebar[class~="w-20"] > div:first-child > button {
  pointer-events: auto;
  opacity: 1;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  box-shadow: 0 4px 10px rgb(37 99 235 / 12%);
}

.redactos-theme .ros-sidebar nav {
  gap: 8px;
  padding: 14px 10px;
}

.redactos-theme .ros-sidebar nav button {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 15px;
  color: #bdd0d7;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.025em;
}

.redactos-theme .ros-sidebar nav button span {
  color: inherit;
  font-size: 14px;
  line-height: 1.4;
}

.redactos-theme .ros-sidebar nav button svg {
  width: 19px;
  height: 19px;
  color: #84aab7;
}

.redactos-theme .ros-sidebar button:hover {
  border-color: rgb(116 234 220 / 14%);
  background: rgb(255 255 255 / 7%);
  color: #ffffff;
}

.redactos-theme .ros-sidebar button[class~="bg-blue-50"] {
  border-color: rgb(116 234 220 / 26%);
  background: linear-gradient(135deg, rgb(20 184 166 / 26%), rgb(255 255 255 / 8%));
  color: #f2fffd;
  box-shadow: inset 3px 0 var(--ros-mint), 0 12px 30px rgb(0 18 29 / 18%);
}

.redactos-theme .ros-sidebar button[class~="bg-blue-50"] svg,
.redactos-theme .ros-sidebar button[class~="bg-blue-50"] span {
  color: #eafffb;
}

.redactos-theme .ros-sidebar [class*="border-t"] {
  margin: 8px 10px 10px;
  border-color: rgb(255 255 255 / 9%);
}

.redactos-theme .ros-sidebar [class~="text-slate-500"] {
  color: #b9ced5;
}

/* Main command surface. */
.redactos-theme .ros-main {
  min-width: 0;
  margin-block: 0;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 65%);
  border-radius: 0;
  background: rgb(248 251 251 / 78%);
  box-shadow: 0 26px 80px rgb(8 36 51 / 9%);
  backdrop-filter: none;
}

.redactos-theme .ros-command-bar {
  position: relative;
  z-index: 15;
  height: 108px;
  min-height: 108px;
  margin: 0;
  padding: 22px 28px;
  overflow: hidden;
  border: 0;
  background:
    radial-gradient(circle at 68% 10%, rgb(116 234 220 / 13%), transparent 20rem),
    linear-gradient(105deg, #082c40 0%, #0b3e53 55%, #0c4c59 100%);
  box-shadow: none;
}

.redactos-theme .ros-command-bar::after {
  content: "";
  position: absolute;
  right: 30%;
  bottom: -42px;
  width: 190px;
  height: 90px;
  border: 1px solid rgb(116 234 220 / 14%);
  border-radius: 50%;
  pointer-events: none;
}

.redactos-theme .ros-command-bar nav > div:first-child {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: rgb(116 234 220 / 13%);
  color: var(--ros-mint);
  box-shadow: inset 0 0 0 1px rgb(116 234 220 / 13%);
}

.redactos-theme .ros-command-bar nav > div:last-child {
  border-color: rgb(255 255 255 / 14%);
}

.redactos-theme .ros-command-bar nav p {
  color: #91b8c4;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.redactos-theme .ros-command-bar nav h2 {
  margin-top: 6px;
  color: #ffffff;
  font-family: "Segoe UI Variable Display", "Microsoft YaHei UI", "Noto Sans SC", sans-serif;
  font-size: 24px;
  font-weight: 720;
  letter-spacing: -0.025em;
}

.redactos-theme .ros-command-bar > div:last-child {
  gap: 12px;
}

.redactos-theme .ros-return-website {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px 0 9px;
  border: 1px solid #1d4ed8;
  border-radius: 7px;
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 12px rgb(37 99 235 / 20%);
  font-family: "Segoe UI Variable Text", "Microsoft YaHei UI", "Noto Sans SC", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.redactos-theme .ros-return-website__icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: rgb(255 255 255 / 16%);
}

.redactos-theme .ros-return-website:hover {
  border-color: #1e40af;
  background: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 5px 15px rgb(37 99 235 / 26%);
}

.redactos-theme .ros-return-website:focus-visible {
  outline: 3px solid rgb(96 165 250 / 38%);
  outline-offset: 3px;
}

.redactos-theme .ros-command-bar button {
  min-height: 36px;
  border-color: rgb(255 255 255 / 14%);
  border-radius: 12px;
  background: rgb(255 255 255 / 8%);
  color: #d7e8ec;
  box-shadow: none;
}

.redactos-theme .ros-command-bar button:hover {
  border-color: rgb(116 234 220 / 38%);
  background: rgb(116 234 220 / 12%);
  color: #ffffff;
}

.redactos-theme .ros-command-bar > div:last-child > div[class*="w-64"] {
  width: 280px;
  min-height: 38px;
  border-color: rgb(255 255 255 / 12%);
  border-radius: 12px;
  background: rgb(2 24 36 / 32%);
}

.redactos-theme .ros-command-bar input {
  color: #eefbfb;
}

.redactos-theme .ros-command-bar input::placeholder {
  color: #8fb0bc;
}

/* Asymmetric dual-canvas workspace. */
.redactos-theme .ros-workspace {
  padding: 22px;
  background: radial-gradient(circle at 82% 2%, rgb(20 184 166 / 7%), transparent 28rem);
}

.redactos-theme .ros-stage {
  gap: 18px;
}

.redactos-theme .ros-source-column,
.redactos-theme .ros-result-column {
  border-radius: 26px;
}

.redactos-theme .ros-result-column {
  padding: 0;
}

.redactos-theme .ros-source-card,
.redactos-theme .ros-result-card {
  overflow: hidden;
  border: 1px solid rgb(8 66 82 / 10%);
  border-radius: 26px;
  background: var(--ros-surface);
  box-shadow: 0 14px 34px rgb(8 36 51 / 8%);
  transition: none;
  contain: paint;
}

.redactos-theme .ros-source-card {
  border-top: 4px solid var(--ros-teal);
  container-type: inline-size;
}

.redactos-theme .ros-source-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  min-height: 126px;
  padding: 18px 20px 16px;
  column-gap: 16px;
  row-gap: 14px;
  border-color: #dbe7e9;
  background: linear-gradient(110deg, #f8fbfb 0%, #eef8f7 100%);
}

.redactos-theme .ros-source-toolbar > div:first-child {
  gap: 10px;
}

.redactos-theme .ros-source-toolbar > div:first-child > div:first-child {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 12px;
  background: #dff6f2;
  color: #087b7d;
}

.redactos-theme .ros-source-toolbar h2 {
  color: var(--ros-ink);
  font-family: "Segoe UI Variable Display", "Microsoft YaHei UI", "Noto Sans SC", sans-serif;
  font-size: 16px;
  font-weight: 720;
  letter-spacing: -0.01em;
}

.redactos-theme .ros-source-toolbar::after {
  content: "SOURCE  /  原始文档";
  grid-row: 1;
  grid-column: 2;
  align-self: center;
  justify-self: end;
  color: #728b94;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.15em;
}

.redactos-theme .redact-source-toolbar-scroll {
  grid-row: 2;
  grid-column: 1 / -1;
  width: 100%;
  scrollbar-color: #8fc8c4 transparent;
}

.redactos-theme .redact-source-toolbar-scroll > div {
  min-width: 100%;
  justify-content: flex-start;
  gap: 8px;
}

.redactos-theme .ros-source-toolbar .ros-upload-action {
  order: 1;
  min-height: 34px;
  padding-inline: 12px;
  border: 1px solid #cfe1e3;
  background: #ffffff;
}

.redactos-theme .ros-source-toolbar .ros-upload-action + span {
  order: 2;
  margin-right: 8px;
  color: #758c95;
}

.redactos-theme .ros-source-toolbar .ros-mode-control {
  order: 3;
  min-height: 38px;
  padding: 5px 7px;
  border-color: #cbdfe1;
  box-shadow: none;
}

.redactos-theme .ros-source-toolbar .ros-config-action {
  order: 4;
  min-height: 38px;
  margin-left: auto;
  padding-inline: 14px;
}

.redactos-theme .ros-source-toolbar .ros-config-action + div {
  order: 5;
}

.redactos-theme .ros-source-toolbar .ros-exit-action {
  order: 6;
  min-height: 38px;
  padding-inline: 13px;
}

.redactos-theme .ros-source-toolbar button,
.redactos-theme .ros-source-toolbar [role="group"],
.redactos-theme .ros-source-toolbar > div:last-child > div {
  border-radius: 11px;
}

.redactos-theme .ros-editor {
  position: relative;
  background:
    linear-gradient(90deg, rgb(8 127 140 / 4%) 1px, transparent 1px),
    linear-gradient(rgb(8 127 140 / 4%) 1px, transparent 1px),
    #fbfdfd;
  background-size: 32px 32px;
}

.redactos-theme .ros-editor::before {
  content: "SOURCE  /  原始文档";
  position: absolute;
  top: 22px;
  left: 28px;
  z-index: 1;
  color: #7b939c;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.16em;
  pointer-events: none;
}

.redactos-theme .ros-editor::after {
  content: "粘贴需要处理的文本，或使用上方“上传”导入文档";
  position: absolute;
  top: 48px;
  left: 28px;
  z-index: 3;
  color: #8599a1;
  font-size: 13px;
  font-weight: 450;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.redactos-theme .ros-editor:has(textarea:not(:placeholder-shown))::after {
  opacity: 0;
}

.redactos-theme .ros-editor::before,
.redactos-theme .ros-editor::after {
  display: none;
}

.redactos-theme .ros-editor textarea {
  position: relative;
  z-index: 2;
  padding: 32px;
  background: transparent;
  color: #153541;
  font-family: "Microsoft YaHei UI", "HarmonyOS Sans SC", MiSans, "Noto Sans SC", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.012em;
  caret-color: var(--ros-ocean);
}

.redactos-theme .ros-editor > div[class*="overflow-auto"] {
  padding: 32px;
}

.redactos-theme .ros-editor [class~="whitespace-pre-wrap"] {
  color: #153541;
  font-family: "Microsoft YaHei UI", "HarmonyOS Sans SC", MiSans, "Noto Sans SC", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.012em;
}

.redactos-theme .ros-result-card [class~="whitespace-pre-wrap"],
.redactos-theme .ros-restore-page textarea,
.redactos-theme .ros-restore-page pre,
.redactos-theme .ros-restore-page [class~="whitespace-pre-wrap"] {
  color: #153541;
  font-family: "Microsoft YaHei UI", "HarmonyOS Sans SC", MiSans, "Noto Sans SC", sans-serif;
  font-size: 15px !important;
  font-weight: 400;
  line-height: 1.9 !important;
  letter-spacing: 0.012em;
}

/* Paired document reading: shared metrics, height, scroll position and active line. */
.redactos-theme .ros-document-scroll {
  padding: 32px !important;
  overflow-anchor: none;
  overscroll-behavior: contain;
  scroll-behavior: auto !important;
  scrollbar-gutter: stable;
}

.redactos-theme .ros-result-toolbar {
  height: var(--ros-paired-toolbar-height, auto);
  min-height: var(--ros-paired-toolbar-height, 72px) !important;
  gap: 12px;
}

.redactos-theme .ros-result-toolbar > :first-child {
  flex: 1 1 180px;
  min-width: 0;
}

.redactos-theme .ros-result-toolbar > :last-child {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.redactos-theme .ros-result-toolbar,
.redactos-theme .ros-result-toolbar button,
.redactos-theme .ros-result-toolbar button span {
  font-family: "Segoe UI Variable Text", "Microsoft YaHei UI", "Noto Sans SC", sans-serif !important;
}

.redactos-theme .ros-result-toolbar button,
.redactos-theme .ros-result-toolbar button span {
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
}

.redactos-theme .ros-export-pair {
  display: inline-flex !important;
  flex: none;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 7px !important;
}

.redactos-theme .ros-export-pair > .ros-desensitized-file-export,
.redactos-theme .ros-export-pair > .ros-restore-json-export {
  margin: 0 !important;
}

.redactos-theme .ros-restore-json-export,
.redactos-theme .ros-restore-json-upload {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #b8d4d8;
  border-radius: 10px;
  background: #f5fbfa;
  color: #0d5265;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.redactos-theme .ros-restore-json-export:hover,
.redactos-theme .ros-restore-json-upload:hover {
  border-color: #58aea8;
  background: #e9f7f4;
  color: #087f8c;
}

.redactos-theme .ros-restore-json-export:focus-visible,
.redactos-theme .ros-restore-json-upload:focus-visible {
  outline: 3px solid rgb(13 82 101 / 22%);
  outline-offset: 2px;
}

.redactos-theme .ros-restore-json-export:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.redactos-theme .ros-restore-json-export svg,
.redactos-theme .ros-restore-json-upload svg {
  width: 17px;
  height: 17px;
}

.redactos-theme .ros-restore-json-input {
  display: none !important;
}

.redactos-theme .ros-restore-json-status {
  margin: 7px 0 9px;
  padding: 8px 10px;
  border: 1px solid #d5e5e7;
  border-radius: 9px;
  background: #f7fbfb;
  color: #58717b;
  font-size: 15px;
  line-height: 1.45;
}

/* Restore workspace: stable upload actions and a structured input/result layout. */
.redactos-theme .ros-restore-page .ros-workspace {
  padding: 18px !important;
  background:
    radial-gradient(circle at 12% 10%, rgb(45 190 173 / 8%), transparent 30%),
    linear-gradient(145deg, #eef7f7 0%, #f6f9f9 52%, #edf5f5 100%);
}

.redactos-theme .ros-restore-workspace {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr) !important;
  gap: 12px !important;
  height: 100%;
}

.redactos-theme .ros-restore-input-card,
.redactos-theme .ros-restore-dictionary-card,
.redactos-theme .ros-restore-result-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  border: 1px solid #cfe0e1 !important;
  border-radius: 22px !important;
  background: rgb(255 255 255 / 96%) !important;
  box-shadow: 0 18px 45px rgb(22 66 75 / 9%) !important;
  overflow: hidden;
}

.redactos-theme .ros-restore-input-card {
  position: relative;
}

.redactos-theme .ros-restore-input-card::before,
.redactos-theme .ros-restore-dictionary-card::before,
.redactos-theme .ros-restore-result-card::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: 24px;
  right: 24px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, #0ca392, #65d8c4);
}

.redactos-theme .ros-restore-result-card {
  position: relative;
}

.redactos-theme .ros-restore-dictionary-card {
  position: relative;
}

.redactos-theme .ros-restore-card-header {
  position: relative;
  z-index: 40;
  isolation: isolate;
  overflow: visible !important;
  pointer-events: auto !important;
  min-height: 74px !important;
  height: auto !important;
  padding: 16px 20px !important;
  border-bottom: 1px solid #dce9e9 !important;
  background: linear-gradient(135deg, #f8fcfb 0%, #f0f8f7 100%) !important;
}

.redactos-theme .ros-restore-card-header h2 {
  flex: 0 0 auto;
  color: #133e48 !important;
  font-size: 17px !important;
  font-weight: 760 !important;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.redactos-theme .ros-restore-card-header h2 > svg {
  width: 38px !important;
  height: 38px !important;
  padding: 9px;
  border-radius: 12px;
  background: #dff5f0;
  color: #078b7a !important;
  box-shadow: inset 0 0 0 1px rgb(7 139 122 / 9%);
}

.redactos-theme .ros-restore-header-actions,
.redactos-theme .ros-restore-import-actions {
  display: inline-flex !important;
  position: relative;
  z-index: 60;
  flex: none;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 8px !important;
  pointer-events: auto;
}

.redactos-theme .ros-restore-header-actions > div[class*="w-px"] {
  display: none;
}

.redactos-theme .ros-restore-history-action,
.redactos-theme .ros-restore-page button[aria-hidden="true"] {
  display: none !important;
}

.redactos-theme .ros-restore-document-upload,
.redactos-theme .ros-restore-clear-action,
.redactos-theme .ros-restore-import-actions > button,
.redactos-theme .ros-restore-import-actions > .ros-restore-json-upload {
  display: inline-flex !important;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0 !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  cursor: pointer;
  pointer-events: auto !important;
  touch-action: manipulation;
  user-select: none;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.redactos-theme .ros-restore-document-upload {
  border: 1px solid #0b9586 !important;
  background: #0b9586 !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgb(11 149 134 / 18%);
}

.redactos-theme .ros-restore-document-upload:hover {
  border-color: #087f74 !important;
  background: #087f74 !important;
}

.redactos-theme .ros-restore-clear-action {
  border: 1px solid #dce6e6 !important;
  background: #ffffff !important;
  color: #6a7f84 !important;
}

.redactos-theme .ros-restore-clear-action:hover {
  border-color: #f2b8b5 !important;
  background: #fff6f5 !important;
  color: #bd413b !important;
}

.redactos-theme .ros-restore-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding: 16px !important;
  gap: 0 !important;
  overflow: hidden !important;
  background: #f8fbfb;
}

.redactos-theme .ros-restore-dictionary-card-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px;
  background: #f8fbfb;
}

.redactos-theme .ros-restore-dictionary-section,
.redactos-theme .ros-restore-document-section {
  min-height: 0 !important;
  gap: 10px !important;
  padding: 15px;
  border: 1px solid #d9e6e7;
  border-radius: 15px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgb(24 72 78 / 4%);
}

.redactos-theme .ros-restore-dictionary-section {
  display: flex !important;
  flex: 1 1 auto !important;
  width: 100%;
}

.redactos-theme .ros-restore-document-section {
  display: flex !important;
  flex: 1 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
}

.redactos-theme .ros-restore-dictionary-header {
  display: none !important;
}

.redactos-theme .ros-restore-document-section > label {
  color: #173f48 !important;
  font-size: 15px !important;
  font-weight: 750 !important;
}

.redactos-theme .ros-restore-document-section > label {
  display: none;
}

.redactos-theme .ros-restore-dictionary-card-header h2 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.redactos-theme .ros-restore-dictionary-card-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px;
}

.redactos-theme .ros-restore-dictionary-card-header h2 > svg {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 12px;
  background: #dff5f0;
  color: #078b7a;
}

/* Route-transition guard: this selector survives removal of restore-page theme classes. */
[data-ros-restore-dictionary-header="1"] > h2 > svg {
  width: 38px !important;
  height: 38px !important;
  max-width: 38px !important;
  max-height: 38px !important;
  flex: none !important;
}

.redactos-theme .ros-restore-document-upload,
.redactos-theme .ros-restore-import-actions > .ros-restore-json-upload {
  position: relative;
  z-index: 70;
  min-height: 38px;
  border: 1px solid #0b9586 !important;
  background: #0b9586 !important;
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgb(11 149 134 / 18%);
  cursor: pointer;
  pointer-events: auto;
}

.redactos-theme .ros-restore-import-actions > .ros-restore-json-upload > .ros-restore-json-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  pointer-events: none !important;
}

.redactos-theme .ros-restore-import-actions > .ros-restore-json-upload,
.redactos-theme .ros-restore-import-actions > .ros-restore-dictionary-clear {
  box-sizing: border-box;
  width: auto;
  min-width: 78px;
  height: 38px;
  min-height: 38px;
  padding: 8px 12px !important;
  border-radius: 7px !important;
  font-family: inherit;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 20px;
  appearance: none;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap !important;
}

.redactos-theme .ros-restore-import-actions > .ros-restore-json-upload > svg,
.redactos-theme .ros-restore-import-actions > .ros-restore-dictionary-clear > svg {
  display: block;
  width: 16px !important;
  min-width: 16px !important;
  height: 16px !important;
  flex: 0 0 16px !important;
}

.redactos-theme .ros-restore-import-actions > .ros-restore-json-upload > span,
.redactos-theme .ros-restore-import-actions > .ros-restore-dictionary-clear > span {
  display: inline !important;
  width: auto !important;
  height: auto !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

.redactos-theme .ros-restore-import-actions > .ros-restore-json-upload {
  width: 82px;
  min-width: 82px;
  padding: 8px 14px !important;
  font-weight: 600 !important;
}

.redactos-theme .ros-restore-import-actions > .ros-restore-dictionary-clear {
  width: 80px;
  min-width: 80px;
  padding: 8px 13px !important;
  border-color: #cdd9e8 !important;
  color: #52677f !important;
  font-weight: 600 !important;
}

.redactos-theme .ros-restore-dictionary-card {
  z-index: 20;
  isolation: isolate;
}

.redactos-theme .ros-restore-document-upload:hover,
.redactos-theme .ros-restore-import-actions > .ros-restore-json-upload:hover {
  border-color: #087f74 !important;
  background: #087f74 !important;
}

.redactos-theme .ros-restore-clear-action,
.redactos-theme .ros-restore-import-actions > .ros-restore-dictionary-clear {
  min-height: 38px;
  border: 1px solid #dce6e6 !important;
  background: #ffffff !important;
  color: #6a7f84 !important;
}

.redactos-theme .ros-restore-clear-action:hover,
.redactos-theme .ros-restore-import-actions > .ros-restore-dictionary-clear:hover {
  border-color: #f2b8b5 !important;
  background: #fff6f5 !important;
  color: #bd413b !important;
}

.redactos-theme .ros-restore-import-actions > .ros-restore-json-upload svg,
.redactos-theme .ros-restore-dictionary-clear svg {
  width: 0.875rem;
  height: 0.875rem;
}

.redactos-theme .ros-restore-json-status {
  margin: 0 !important;
  padding: 8px 11px !important;
  border-color: #d7e8e7 !important;
  background: #f4faf9 !important;
  color: #4f6f73 !important;
  font-size: 15px !important;
  line-height: 1.45;
}

.redactos-theme .ros-restore-dictionary-textarea,
.redactos-theme .ros-restore-document-textarea {
  min-height: 0 !important;
  padding: 13px 14px !important;
  border: 1px solid #cfdddf !important;
  border-radius: 11px !important;
  background: #f9fbfb !important;
  box-shadow: none !important;
  resize: none !important;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.redactos-theme .ros-restore-dictionary-textarea:focus,
.redactos-theme .ros-restore-document-textarea:focus {
  border-color: #36a89e !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgb(12 150 137 / 12%) !important;
}

.redactos-theme .ros-restore-dictionary-section {
  position: relative;
  flex-direction: column !important;
  overflow: hidden;
}

.redactos-theme .ros-restore-dictionary-textarea {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  pointer-events: none;
}

.redactos-theme .ros-restore-dictionary-preview {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dce9e8;
  border-radius: 12px;
  background: #f8fbfb;
}

.redactos-theme .ros-restore-dictionary-summary {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border-bottom: 1px solid #dce9e8;
  background: #eef8f6;
  color: #587177;
  font-size: 13px;
}

.redactos-theme .ros-restore-dictionary-summary > div {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  color: #31555d;
  white-space: nowrap;
}

.redactos-theme .ros-restore-dictionary-summary strong {
  color: #087f74;
  font-size: 20px;
  line-height: 1;
}

.redactos-theme .ros-restore-dictionary-list {
  flex: 1 1 auto;
  min-height: 0;
  padding: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.redactos-theme .ros-restore-dictionary-row {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px 10px;
  padding: 11px;
  border: 1px solid #e0ebeb;
  border-radius: 11px;
  background: #ffffff;
  box-shadow: 0 3px 10px rgb(24 72 78 / 3%);
  transition: border-color 180ms ease, background-color 180ms ease;
}

.redactos-theme .ros-restore-dictionary-row + .ros-restore-dictionary-row {
  margin-top: 8px;
}

.redactos-theme .ros-restore-dictionary-row:hover {
  border-color: #bcded9;
  background: #fbfefd;
}

.redactos-theme .ros-restore-dictionary-order {
  display: inline-flex;
  grid-row: 1 / span 2;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #e6f5f2;
  color: #087f74;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.redactos-theme .ros-restore-dictionary-pair {
  display: grid;
  grid-column: 2;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.redactos-theme .ros-restore-dictionary-value {
  min-width: 0;
}

.redactos-theme .ros-restore-dictionary-value > span {
  display: block;
  margin-bottom: 3px;
  color: #71878c;
  font-size: 12px;
  font-weight: 650;
}

.redactos-theme .ros-restore-dictionary-value > strong {
  display: block;
  overflow: hidden;
  color: #183f48;
  font-size: 15px;
  font-weight: 720;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.redactos-theme .ros-restore-dictionary-masked > strong {
  color: #a33f4d;
}

.redactos-theme .ros-restore-dictionary-original > strong {
  color: #087f74;
}

.redactos-theme .ros-restore-dictionary-arrow {
  width: 18px;
  height: 18px;
  color: #8da2a6;
}

.redactos-theme .ros-restore-dictionary-type {
  display: inline-flex;
  grid-column: 2;
  justify-self: start;
  align-items: center;
  min-height: 23px;
  padding: 3px 8px;
  border: 1px solid #d9e6e6;
  border-radius: 999px;
  background: #f4f8f8;
  color: #587177;
  font-size: 12px;
  font-weight: 700;
}

.redactos-theme .ros-restore-dictionary-state {
  display: flex;
  flex: 1 1 auto;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 28px;
  text-align: center;
}

.redactos-theme .ros-restore-dictionary-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 15px;
  background: #e3f5f1;
  color: #087f74;
}

.redactos-theme .ros-restore-dictionary-state strong {
  color: #234b54;
  font-size: 16px;
  font-weight: 760;
}

.redactos-theme .ros-restore-dictionary-state span {
  max-width: 260px;
  margin-top: 7px;
  color: #637b80;
  font-size: 14px;
  line-height: 1.55;
}

.redactos-theme .ros-restore-dictionary-state-error svg {
  background: #fff0ef;
  color: #bd413b;
}

.redactos-theme .ros-restore-dictionary-remainder {
  flex: none;
  margin: 0;
  padding: 9px 12px;
  border-top: 1px solid #dce9e8;
  background: #fffaf0;
  color: #826123;
  font-size: 12px;
  line-height: 1.5;
}

.redactos-theme .ros-restore-card-footer {
  display: none !important;
}

.redactos-theme .ros-restore-run-action {
  width: 190px !important;
  min-height: 44px;
  padding: 10px 18px !important;
  border: 1px solid #087f78 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #087f78, #12a391) !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 760 !important;
  box-shadow: 0 10px 22px rgb(8 127 120 / 20%) !important;
  cursor: pointer;
}

.redactos-theme .ros-restore-run-action:hover {
  background: linear-gradient(135deg, #066d68, #0d8f82) !important;
}

.redactos-theme .ros-restore-result-actions {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

.redactos-theme .ros-restore-result-actions .ros-restore-run-action {
  width: auto !important;
  min-height: 38px;
  padding: 8px 14px !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 18px rgb(8 127 120 / 16%) !important;
}

.redactos-theme .ros-restore-export-placeholder,
.redactos-theme .ros-restore-native-export > button {
  display: inline-flex !important;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px !important;
  border: 1px solid #c9dcde !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  color: #315b64 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  cursor: pointer;
}

.redactos-theme .ros-restore-export-placeholder svg,
.redactos-theme .ros-restore-native-export > button svg {
  width: 16px;
  height: 16px;
}

.redactos-theme .ros-restore-export-placeholder:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.redactos-theme .ros-restore-export-placeholder[hidden] {
  display: none !important;
}

.redactos-theme .ros-restore-native-export {
  position: relative;
}

.redactos-theme .ros-restore-result-body {
  padding: 24px !important;
  background:
    linear-gradient(rgb(255 255 255 / 91%), rgb(255 255 255 / 91%)),
    repeating-linear-gradient(0deg, transparent 0 31px, #dcebea 31px 32px) !important;
}

.redactos-theme .ros-restore-result-body > div[class*="items-center"] {
  gap: 13px !important;
  color: #789095 !important;
}

.redactos-theme .ros-restore-result-body svg[class*="animate-spin"] {
  width: 56px !important;
  height: 56px !important;
  padding: 14px;
  border: 1px solid #dce9e8;
  border-radius: 17px;
  background: #f4faf9;
  color: #2f9f92;
  opacity: 1 !important;
  animation: none !important;
}

.redactos-theme .ros-restore-result-body p {
  color: #607b80 !important;
  font-size: 15px !important;
}

/* Keep the result drawer responsive during open/close, scrolling and pane resizing. */
.redactos-theme .ros-result-drawer {
  contain: layout paint;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.redactos-theme .ros-drawer-list {
  contain: layout paint;
  overflow-anchor: none;
  overscroll-behavior: contain;
  scroll-behavior: auto !important;
  scrollbar-gutter: stable;
}

.redactos-theme .ros-drawer-item {
  contain: layout paint;
}

.redactos-theme .ros-restore-json-status[data-state="success"] {
  border-color: #9fd5c8;
  background: #edf9f4;
  color: #16634f;
}

.redactos-theme .ros-restore-json-status[data-state="warning"] {
  border-color: #e8cf91;
  background: #fff9e9;
  color: #8a5a08;
}

.redactos-theme .ros-restore-json-status[data-state="error"] {
  border-color: #f0b5b5;
  background: #fff3f3;
  color: #a23434;
}

.redactos-theme .ros-document-scroll:has(.ros-document-result) {
  margin-bottom: var(--ros-paired-footer-height, 0px);
}

.redactos-theme .ros-document-copy {
  position: relative;
  width: min(100%, var(--ros-paired-width, 100%));
  min-height: var(--ros-paired-height, auto);
  isolation: isolate;
}

.redactos-theme .ros-paired-token,
.redactos-theme .ros-editor [data-token-highlight],
.redactos-theme .ros-result-card [data-token-highlight] {
  display: inline-block;
  width: auto !important;
  margin-inline: 2px !important;
  padding-inline: 6px !important;
  box-sizing: border-box;
  border-width: 1px !important;
  border-radius: 4px !important;
  font: inherit;
  line-height: 24px;
  vertical-align: baseline;
  transform: none !important;
}

.redactos-theme .ros-result-card [data-ros-token-type] {
  border-color: var(--ros-token-border) !important;
  background: var(--ros-token-bg) !important;
  color: var(--ros-token-text) !important;
  box-shadow: 0 1px 2px rgb(15 23 42 / 7%);
}

.redactos-theme .ros-result-card [data-ros-token-type]:hover,
.redactos-theme .ros-result-card [data-ros-token-type].shadow-sm {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ros-token-border) 52%, transparent);
}

.redactos-theme .ros-result-card [data-ros-token-type="person"] {
  --ros-token-bg: #f3e8ff; --ros-token-border: #c4b5fd; --ros-token-text: #6d28d9;
}
.redactos-theme .ros-result-card [data-ros-token-type="organization"] {
  --ros-token-bg: #dbeafe; --ros-token-border: #93c5fd; --ros-token-text: #1d4ed8;
}
.redactos-theme .ros-result-card [data-ros-token-type="phone"] {
  --ros-token-bg: #ffedd5; --ros-token-border: #fdba74; --ros-token-text: #c2410c;
}
.redactos-theme .ros-result-card [data-ros-token-type="email"] {
  --ros-token-bg: #cffafe; --ros-token-border: #67e8f9; --ros-token-text: #0e7490;
}
.redactos-theme .ros-result-card [data-ros-token-type="date"] {
  --ros-token-bg: #fef3c7; --ros-token-border: #fcd34d; --ros-token-text: #a16207;
}
.redactos-theme .ros-result-card [data-ros-token-type="location"] {
  --ros-token-bg: #dcfce7; --ros-token-border: #86efac; --ros-token-text: #15803d;
}
.redactos-theme .ros-result-card [data-ros-token-type="identity"] {
  --ros-token-bg: #ffe4e6; --ros-token-border: #fda4af; --ros-token-text: #be123c;
}
.redactos-theme .ros-result-card [data-ros-token-type="amount"] {
  --ros-token-bg: #fce7f3; --ros-token-border: #f9a8d4; --ros-token-text: #be185d;
}
.redactos-theme .ros-result-card [data-ros-token-type="network"] {
  --ros-token-bg: #e0e7ff; --ros-token-border: #a5b4fc; --ros-token-text: #4338ca;
}
.redactos-theme .ros-result-card [data-ros-token-type="account"] {
  --ros-token-bg: #f5f5f4; --ros-token-border: #d6d3d1; --ros-token-text: #57534e;
}
.redactos-theme .ros-result-card [data-ros-token-type="other"] {
  --ros-token-bg: #f1f5f9; --ros-token-border: #cbd5e1; --ros-token-text: #475569;
}

/* Temporary linked-token focus from the result drawer; does not alter category colors or layout. */
.redactos-theme .ros-document-copy [data-token-highlight].ros-token-flash {
  position: relative;
  z-index: 3;
  outline: 3px solid #0d5265 !important;
  outline-offset: 2px;
  box-shadow:
    0 0 0 5px rgb(255 255 255 / 94%),
    0 0 0 8px rgb(13 82 101 / 30%),
    0 8px 18px rgb(8 36 51 / 20%) !important;
}

.redactos-theme ::highlight(ros-corresponding-block) {
  background-color: rgb(51 65 85 / 11%);
  text-decoration: underline 1px rgb(100 116 139 / 58%);
}

.redactos-theme .ros-editor textarea::placeholder {
  color: #8ca0a8;
}

/* Keep operational copy readable across the recovered app's compact utility classes. */
.redactos-theme [class~="text-xs"],
.redactos-theme [class~="text-sm"],
.redactos-theme [class*="text-[10px]"],
.redactos-theme [class*="text-[11px]"],
.redactos-theme [class*="text-[12px]"],
.redactos-theme [class*="text-[13px]"],
.redactos-theme [class*="text-[14px]"],
.redactos-theme .ros-sidebar nav button,
.redactos-theme .ros-sidebar nav button span,
.redactos-theme .ros-command-bar nav p,
.redactos-theme .ros-source-toolbar,
.redactos-theme .ros-source-toolbar button,
.redactos-theme .ros-source-toolbar input,
.redactos-theme .ros-source-footer,
.redactos-theme .ros-source-footer button,
.redactos-theme .ros-result-card,
.redactos-theme .ros-result-drawer,
.redactos-theme .ros-result-drawer button,
.redactos-theme .ros-result-drawer input,
.redactos-theme .ros-drawer-item {
  font-size: 15px !important;
}

.redactos-theme .ros-source-toolbar::after,
.redactos-theme .ros-source-footer::before,
.redactos-theme .ros-result-card::before,
.redactos-theme .ros-result-card::after,
.redactos-theme .ros-result-card > .absolute p::after {
  font-size: 15px !important;
}

.redactos-theme .ros-source-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px 18px;
  border-color: #dbe7e9;
  background: #ffffff;
}

.redactos-theme .ros-source-footer::before {
  content: "就绪  ·  文档内容仅用于当前处理任务";
  padding-left: 4px;
  color: #667f89;
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.02em;
}

.redactos-theme .ros-source-footer button {
  width: 238px;
  flex: none;
  min-height: 50px;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.redactos-theme .ros-source-footer button:not(:disabled) {
  border-color: transparent;
  background: linear-gradient(100deg, #087f8c, #0da391);
  color: #ffffff;
  box-shadow: 0 14px 28px rgb(8 127 140 / 22%);
}

.redactos-theme .ros-source-footer button:disabled {
  background: #eaf0f1;
  color: #879ba3;
}

.redactos-theme .ros-resizer {
  width: 14px;
  border-radius: 999px;
  background: transparent;
  touch-action: none;
  transition: none;
  will-change: background-color;
}

.redactos-theme .ros-resizer > div {
  width: 5px;
  height: 54px;
  background: #bdd2d5;
  box-shadow: 0 0 0 5px rgb(255 255 255 / 55%);
}

.redactos-theme .ros-result-card {
  position: relative;
  border-top: 4px solid #0d5265;
  background:
    radial-gradient(circle at 80% 10%, rgb(20 184 166 / 10%), transparent 20rem),
    #f8fbfb;
}

.redactos-theme .ros-result-card::before {
  content: "REDACTED OUTPUT";
  position: absolute;
  top: 24px;
  left: 28px;
  z-index: 2;
  color: #587783;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.18em;
  pointer-events: none;
}

.redactos-theme .ros-result-card::after {
  content: "识别后的敏感信息与替换结果将在这里生成";
  position: absolute;
  top: 48px;
  left: 28px;
  z-index: 2;
  color: #8298a0;
  font-size: 12px;
  font-weight: 450;
  pointer-events: none;
}

.redactos-theme .ros-result-card:has(h2)::before,
.redactos-theme .ros-result-card:has(h2)::after {
  display: none;
}

/* Completed-result drawer. */
.redactos-theme .ros-drawer-host {
  display: flex;
  min-width: 0;
  min-height: 0;
  align-items: stretch;
  gap: 14px;
  overflow: hidden;
  isolation: isolate;
}

.redactos-theme .ros-drawer-host > .ros-stage {
  min-width: 0;
  flex: 1 1 auto;
}

.redactos-theme .ros-result-drawer {
  position: relative;
  inset: auto;
  z-index: 2;
  flex: 0 0 clamp(300px, 21vw, 340px);
  width: clamp(300px, 21vw, 340px);
  max-width: 340px;
  height: 100% !important;
  border-color: #cddfe2;
  border-radius: 26px;
  background: #f6faf9;
  box-shadow: 0 14px 34px rgb(8 36 51 / 8%);
  contain: paint;
}

.redactos-theme .ros-drawer-header {
  min-height: 104px;
  padding: 18px 18px 14px;
  border-color: #d8e5e7;
  background: linear-gradient(135deg, #eef8f6, #ffffff);
}

.redactos-theme .ros-drawer-header h3 {
  color: #123743;
  font-size: 15px;
  font-weight: 750;
}

.redactos-theme .ros-drawer-search {
  padding: 12px 14px;
  border-color: #d8e5e7;
  background: #ffffff;
}

.redactos-theme .ros-drawer-search input {
  min-height: 38px;
  border-radius: 11px;
  background: #f7faf9;
}

.redactos-theme .ros-drawer-list {
  padding: 12px;
  background: #f6faf9;
}

.redactos-theme .ros-drawer-list > .ros-drawer-item {
  margin-bottom: 10px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid #d8e5e7;
  border-left: 3px solid #4ebfb1;
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 5px 14px rgb(8 36 51 / 4%);
  transition: border-color 160ms ease, background-color 160ms ease;
}

.redactos-theme .ros-drawer-list > .ros-drawer-item:hover {
  border-color: #87cbc5;
  border-left-color: var(--ros-ocean);
  background: #fbfefd;
}

.redactos-theme .ros-drawer-item [class*="truncate"] {
  min-width: 0;
}

.redactos-theme .ros-result-card > .absolute {
  color: #6f8790;
}

.redactos-theme .ros-result-card > .absolute svg {
  width: 72px;
  height: 72px;
  padding: 16px;
  border: 1px solid #dce9ea;
  border-radius: 22px;
  background: #ffffff;
  color: #9fc3c4;
  box-shadow: 0 16px 40px rgb(8 36 51 / 8%);
}

.redactos-theme .ros-result-card > .absolute p {
  margin-top: 2px;
  color: #5d7680;
  font-size: 0;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.redactos-theme .ros-result-card > .absolute p::after {
  content: "等待生成脱敏结果";
  font-size: 13px;
}

/* In-workbench custom regex generator. */
body.ros-regex-generator-open {
  overflow: hidden;
}

.redactos-theme .ros-regex-generator-trigger {
  border: 1px solid #0e7181;
  background: #0d5265;
  color: #ffffff;
  box-shadow: 0 8px 18px rgb(8 54 69 / 16%);
}

.redactos-theme .ros-regex-generator-trigger:hover {
  border-color: #087f8c;
  background: #087f8c;
}

.ros-regex-generator-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgb(2 18 29 / 72%);
  backdrop-filter: blur(7px);
  font-family: "Segoe UI Variable Text", "Microsoft YaHei UI", "Noto Sans SC", sans-serif;
}

.ros-regex-generator-shell {
  display: flex;
  width: min(960px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgb(123 173 180 / 45%);
  border-radius: 22px;
  background: #f8fbfc;
  box-shadow: 0 30px 90px rgb(0 12 22 / 46%);
}

.ros-regex-generator-header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 84px;
  padding: 15px 20px 15px 24px;
  border-bottom: 1px solid rgb(79 131 144 / 28%);
  background:
    radial-gradient(circle at 92% -30%, rgb(36 195 172 / 20%), transparent 38%),
    linear-gradient(115deg, #081d2b 0%, #0b2c3b 100%);
}

.ros-regex-generator-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.ros-regex-generator-brand img {
  width: 152px;
  height: 42px;
  flex: none;
  padding: 3px 7px;
  border-radius: 10px;
  background: #ffffff;
  object-fit: contain;
  box-shadow: 0 8px 22px rgb(0 14 23 / 24%);
}

.ros-regex-generator-brand p {
  margin: 0 0 2px;
  color: #f3fbfc;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.ros-regex-generator-brand h2 {
  margin: 0;
  color: #9fb6bf;
  font-size: 13px;
  font-weight: 560;
  letter-spacing: 0.01em;
}

.ros-regex-generator-close {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(151 185 194 / 24%);
  border-radius: 12px;
  background: rgb(255 255 255 / 6%);
  color: #a9bec6;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.ros-regex-generator-close:hover {
  border-color: rgb(70 211 189 / 55%);
  background: rgb(33 189 168 / 13%);
  color: #e9ffff;
}

.ros-regex-generator-close svg,
.ros-regex-generator-section-title svg,
.ros-regex-generator-panel-heading svg,
.ros-regex-generator-command button svg,
.ros-regex-generator-result-head button svg,
.ros-regex-generator-apply svg,
.ros-regex-generator-test-command button svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.ros-regex-generator-body {
  display: grid;
  min-height: 0;
  overflow-y: auto;
  padding: 22px;
  gap: 18px;
  background:
    radial-gradient(circle at 100% 0, rgb(36 183 166 / 6%), transparent 30%),
    #f5f9fa;
  overscroll-behavior: contain;
}

.ros-regex-generator-card {
  padding: 20px;
  border: 1px solid #d9e6e9;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 9px 28px rgb(8 54 69 / 5%);
}

.ros-regex-generator-compose {
  flex: none;
}

.ros-regex-generator-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 18px;
}

.ros-regex-generator-result-panel,
.ros-regex-generator-test {
  min-height: 310px;
}

.ros-regex-generator-section-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.ros-regex-generator-section-title > span {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #dcf6f1;
  color: #078b7a;
}

.ros-regex-generator-section-title h3 {
  margin: 0;
  color: #123743;
  font-size: 16px;
  font-weight: 760;
}

.ros-regex-generator-section-title p {
  margin: 4px 0 0;
  color: #607983;
  font-size: 13px;
  line-height: 1.5;
}

.ros-regex-generator-command,
.ros-regex-generator-test-command {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ros-regex-generator-command input,
.ros-regex-generator-test-command textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbdcde;
  border-radius: 12px;
  outline: none;
  background: #f9fbfb;
  color: #153541;
  font-size: 15px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.ros-regex-generator-command input {
  height: 50px;
  padding: 0 15px;
}

.ros-regex-generator-test-command textarea {
  min-height: 104px;
  padding: 12px 13px;
  resize: vertical;
  line-height: 1.65;
}

.ros-regex-generator-command input:focus,
.ros-regex-generator-test-command textarea:focus {
  border-color: #3ba7a2;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgb(20 143 144 / 14%);
}

.ros-regex-generator-command button,
.ros-regex-generator-test-command button,
.ros-regex-generator-apply,
.ros-regex-generator-result-head button {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.ros-regex-generator-command button,
.ros-regex-generator-test-command button {
  border: 1px solid #18a993;
  background: linear-gradient(135deg, #18b6a0, #38cfb8);
  color: #062b2c;
  box-shadow: 0 8px 18px rgb(19 169 147 / 18%);
}

.ros-regex-generator-command button:hover,
.ros-regex-generator-test-command button:hover {
  border-color: #108c7b;
  background: linear-gradient(135deg, #12a38f, #25bda8);
}

.ros-regex-generator-command button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.ros-regex-generator-status {
  margin: 12px 0 0;
  padding: 9px 11px;
  border: 1px solid #cfe1e3;
  border-radius: 10px;
  background: #f5f9f9;
  color: #4a6772;
  font-size: 14px;
  line-height: 1.45;
}

.ros-regex-generator-panel-heading {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ros-regex-generator-panel-heading > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.ros-regex-generator-panel-heading > div > span {
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #e1f6f2;
  color: #0b8d7b;
}

.ros-regex-generator-panel-heading h3 {
  margin: 0;
  color: #102f3e;
  font-size: 16px;
  font-weight: 760;
}

.ros-regex-generator-panel-heading > button {
  display: inline-flex;
  min-height: 34px;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #b9d8d6;
  border-radius: 9px;
  background: #f7fbfa;
  color: #0d6e67;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.ros-regex-generator-panel-heading > button:hover:not(:disabled) {
  border-color: #65bbb2;
  background: #ebf8f5;
}

.ros-regex-generator-panel-heading > button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.ros-regex-generator-panel-description {
  margin: -5px 0 13px 39px;
  color: #607983;
  font-size: 13px;
  line-height: 1.45;
}

.ros-regex-generator-empty {
  display: flex;
  min-height: 216px;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border: 1px dashed #bfd4d9;
  border-radius: 12px;
  background: #f8fbfc;
  color: #6c838c;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.ros-regex-generator-empty[hidden],
.ros-regex-generator-result[hidden] {
  display: none;
}

.ros-regex-generator-status[data-state="success"] {
  border-color: #a9d8ca;
  background: #edf9f4;
  color: #17634f;
}

.ros-regex-generator-status[data-state="warning"] {
  border-color: #e8cf91;
  background: #fff9e9;
  color: #845708;
}

.ros-regex-generator-status[data-state="error"] {
  border-color: #edb4b4;
  background: #fff3f3;
  color: #a23c3c;
}

.ros-regex-generator-result {
  position: relative;
  margin-top: 0;
}

.ros-regex-generator-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: #4f6d77;
  font-size: 13px;
  font-weight: 750;
}

.ros-regex-generator-result-head button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #9bc9ca;
  background: #ffffff;
  color: #0d5265;
  font-size: 14px;
}

.ros-regex-generator-result > code {
  display: block;
  padding: 12px;
  overflow-wrap: anywhere;
  border: 1px solid #c9e1df;
  border-radius: 10px;
  background: #092433;
  color: #75e7d5;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 14px;
  line-height: 1.65;
  user-select: text;
}

.ros-regex-generator-explanation,
.ros-regex-generator-examples,
.ros-regex-generator-test-result {
  margin-top: 14px;
}

.ros-regex-generator-explanation > span,
.ros-regex-generator-examples > span,
.ros-regex-generator-test-result > span {
  color: #54717b;
  font-size: 13px;
  font-weight: 750;
}

.ros-regex-generator-explanation p {
  margin: 5px 0 0;
  color: #294955;
  font-size: 14px;
  line-height: 1.65;
}

.ros-regex-generator-examples ul {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
}

.ros-regex-generator-examples li {
  padding: 5px 8px;
  border: 1px solid #bce0d2;
  border-radius: 8px;
  background: #edf9f4;
  color: #216450;
  font-size: 13px;
}

.ros-regex-generator-apply {
  margin-top: 16px;
  border: 1px solid #b4ded6;
  background: #e0f6f2;
  color: #087d6e;
}

.ros-regex-generator-apply:hover {
  border-color: #72c5b8;
  background: #ccefe8;
}

.ros-regex-generator-test-result pre {
  min-height: 72px;
  margin: 6px 0 0;
  padding: 12px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid #d4e2e4;
  border-radius: 10px;
  background: #f4f8f9;
  color: #183b47;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 14px;
  line-height: 1.65;
}

@media (max-width: 860px) {
  .ros-regex-generator-workspace { grid-template-columns: minmax(0, 1fr); }
  .ros-regex-generator-result-panel,
  .ros-regex-generator-test { min-height: auto; }
}

@media (max-width: 680px) {
  .ros-regex-generator-modal { padding: 8px; }
  .ros-regex-generator-shell { max-height: calc(100vh - 16px); border-radius: 18px; }
  .ros-regex-generator-header { min-height: 74px; padding: 12px 14px; }
  .ros-regex-generator-brand img { width: 126px; height: 36px; }
  .ros-regex-generator-brand h2 { font-size: 12px; }
  .ros-regex-generator-brand p { font-size: 13px; }
  .ros-regex-generator-body { padding: 12px; gap: 12px; }
  .ros-regex-generator-card { padding: 16px; border-radius: 15px; }
  .ros-regex-generator-command,
  .ros-regex-generator-test-command { flex-direction: column; }
  .ros-regex-generator-command button,
  .ros-regex-generator-test-command button { width: 100%; }
}

/* Shared controls and utility colors. */
.redactos-theme [class~="text-slate-900"] { color: var(--ros-ink); }
.redactos-theme [class~="text-slate-700"] { color: #304f5b; }
.redactos-theme [class~="text-slate-600"] { color: #4d6974; }
.redactos-theme [class~="text-slate-500"],
.redactos-theme [class~="text-slate-400"] { color: var(--ros-muted); }
.redactos-theme [class~="border-slate-100"] { border-color: #e1eaec; }
.redactos-theme [class~="border-slate-200"] { border-color: var(--ros-line); }
.redactos-theme [class~="bg-blue-600"] { border-color: var(--ros-ocean); background-color: var(--ros-ocean); }
.redactos-theme [class~="bg-blue-50"] { background-color: #e2f5f3; }
.redactos-theme [class~="text-blue-600"],
.redactos-theme [class~="text-blue-700"] { color: var(--ros-ocean); }
.redactos-theme [class~="border-blue-600"] { border-color: var(--ros-ocean); }
.redactos-theme [class~="ring-blue-200/80"] { --tw-ring-color: #92d8d1; }

.redactos-theme input:focus,
.redactos-theme textarea:focus,
.redactos-theme [contenteditable="true"]:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgb(20 184 166 / 15%);
}

.redactos-theme button,
.redactos-theme a {
  cursor: pointer;
  transition-duration: 200ms;
}

.redactos-theme button:disabled {
  cursor: not-allowed;
}

.redactos-theme :focus-visible {
  outline: 2px solid var(--ros-teal);
  outline-offset: 3px;
}

@media (max-width: 1180px) {
  .redactos-theme .ros-shell { gap: 0; padding: 0 10px 0 0; }
  .redactos-theme .ros-sidebar { width: 216px; margin: 0; border-radius: 0; }
  .redactos-theme .ros-sidebar[class~="w-20"] { width: 78px; }
  .redactos-theme .ros-main { margin-block: 0; border-radius: 0; }
  .redactos-theme .ros-command-bar { height: 96px; min-height: 96px; padding: 18px 22px; }
  .redactos-theme .ros-command-bar nav h2 { font-size: 20px; }
  .redactos-theme .ros-command-bar > div:last-child > div[class*="w-64"] { width: 220px; }
  .redactos-theme .ros-workspace { padding: 16px; }
  .redactos-theme .ros-stage { gap: 12px; }
  .redactos-theme .ros-result-column { padding: 0; }
  .redactos-theme .ros-drawer-host { gap: 10px; }
  .redactos-theme .ros-result-drawer {
    flex-basis: clamp(280px, 25vw, 310px);
    width: clamp(280px, 25vw, 310px);
  }
  .redactos-theme .ros-source-toolbar { min-height: 120px; padding-inline: 16px; }
  .redactos-theme .ros-source-footer button { width: 210px; }
}

@media (max-width: 900px) {
  .redactos-theme .ros-sidebar,
  .redactos-theme .ros-sidebar[class~="w-20"] { width: 76px; }
  .redactos-theme .ros-sidebar img[class*="flex-1"],
  .redactos-theme .ros-sidebar button span { display: none; }
  .redactos-theme .ros-sidebar button { justify-content: center; }
  .redactos-theme .ros-command-bar > div:last-child > div[class*="w-64"] { display: none; }
  .redactos-theme .ros-source-toolbar { min-height: 116px; padding: 14px; row-gap: 10px; }
  .redactos-theme .ros-editor textarea { padding-inline: 24px; }
  .redactos-theme .ros-source-footer::before { display: none; }
  .redactos-theme .ros-source-footer button { width: 100%; }
  .redactos-theme .ros-result-drawer {
    flex-basis: 270px;
    width: 270px;
  }
}

/* Final specificity guards for legacy utility classes inside primary actions and empty states. */
.redactos-theme .ros-restore-document-upload,
.redactos-theme .ros-restore-import-actions > .ros-restore-json-upload,
.redactos-theme .ros-restore-run-action,
.redactos-theme .ros-config-action,
.redactos-theme .ros-source-footer button:not(:disabled) {
  color: #ffffff !important;
}

.redactos-theme .ros-result-card > .absolute > svg,
.redactos-theme .ros-restore-result-body > div > svg {
  color: #b9c8da !important;
  opacity: 0.55 !important;
}

.redactos-theme .ros-result-card > .absolute > p,
.redactos-theme .ros-restore-result-body > div > p {
  color: #73869c !important;
}

.ros-upload-notice {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 99999;
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px 18px;
  border: 1px solid #f3c86b;
  border-radius: 8px;
  background: #fff9e8;
  box-shadow: 0 12px 32px rgba(34, 55, 88, 0.16);
  color: #9a5b00;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.ros-upload-notice.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Final parity guard: dictionary actions mirror the document-card actions. */
.redactos-theme .ros-restore-import-actions > .ros-restore-json-upload {
  border-color: #2563eb !important;
  background: #2563eb !important;
  color: #ffffff !important;
}

.redactos-theme .ros-restore-import-actions > .ros-restore-dictionary-clear {
  border-color: #cdd9e8 !important;
  background: #ffffff !important;
  color: #52677f !important;
}

/* Reference-aligned button system: compact, flat and consistent across every
   workbench action while preserving the existing action hierarchy and behavior. */
.redactos-theme {
  --ros-button-primary: #2563eb;
  --ros-button-primary-hover: #1d4ed8;
  --ros-button-border: #cdd9e8;
  --ros-button-text: #314a64;
  --ros-button-disabled-bg: #e8eef5;
  --ros-button-disabled-text: #8a9caf;
}

.redactos-theme .ros-main button,
.ros-regex-generator-modal button {
  border-radius: 7px !important;
  font-family: "Segoe UI Variable Text", "Microsoft YaHei UI", "Noto Sans SC", sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  box-shadow: none !important;
  transform: none !important;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease !important;
}

.redactos-theme .ros-upload-action,
.redactos-theme .ros-exit-action,
.redactos-theme .ros-result-toolbar button,
.redactos-theme .ros-restore-clear-action,
.redactos-theme .ros-restore-dictionary-clear,
.redactos-theme .ros-restore-native-export,
.redactos-theme .ros-command-bar > div:last-child > button {
  min-height: 38px !important;
  padding: 8px 13px !important;
  border: 1px solid var(--ros-button-border) !important;
  background: #ffffff !important;
  color: var(--ros-button-text) !important;
}

.redactos-theme .ros-upload-action:hover,
.redactos-theme .ros-exit-action:hover,
.redactos-theme .ros-result-toolbar button:hover:not(:disabled),
.redactos-theme .ros-restore-clear-action:hover,
.redactos-theme .ros-restore-dictionary-clear:hover,
.redactos-theme .ros-restore-native-export:hover,
.redactos-theme .ros-command-bar > div:last-child > button:hover {
  border-color: #9bb8fa !important;
  background: #f4f7ff !important;
  color: #1d4ed8 !important;
}

.redactos-theme .ros-config-action,
.redactos-theme .ros-restore-document-upload,
.redactos-theme .ros-restore-json-upload,
.redactos-theme .ros-restore-run-action,
.redactos-theme .ros-regex-generator-apply,
.redactos-theme .ros-regex-generator-trigger,
.redactos-theme .ros-regex-generator-command,
.redactos-theme .ros-source-footer button:not(:disabled) {
  min-height: 38px !important;
  padding: 8px 14px !important;
  border: 1px solid var(--ros-button-primary) !important;
  background: var(--ros-button-primary) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.redactos-theme .ros-config-action:hover,
.redactos-theme .ros-restore-document-upload:hover,
.redactos-theme .ros-restore-json-upload:hover,
.redactos-theme .ros-restore-run-action:hover,
.redactos-theme .ros-regex-generator-apply:hover,
.redactos-theme .ros-regex-generator-trigger:hover,
.redactos-theme .ros-regex-generator-command:hover,
.redactos-theme .ros-source-footer button:not(:disabled):hover {
  border-color: var(--ros-button-primary-hover) !important;
  background: var(--ros-button-primary-hover) !important;
  color: #ffffff !important;
}

.redactos-theme .ros-source-footer button {
  min-height: 52px !important;
}

.redactos-theme .ros-main button:disabled,
.ros-regex-generator-modal button:disabled {
  border-color: #e1e8f1 !important;
  background: var(--ros-button-disabled-bg) !important;
  color: var(--ros-button-disabled-text) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

.redactos-theme .ros-main button svg,
.ros-regex-generator-modal button svg {
  width: 16px !important;
  height: 16px !important;
  flex: none;
}

.redactos-theme .ros-main button:focus-visible,
.ros-regex-generator-modal button:focus-visible {
  outline: 3px solid rgb(37 99 235 / 20%) !important;
  outline-offset: 2px !important;
}

@media (prefers-reduced-motion: reduce) {
  .redactos-theme .ros-main button,
  .ros-regex-generator-modal button {
    transition: none !important;
  }
}

/* Standalone annual plan: keep pricing, activation and download in one decision flow. */
.redactos-theme .ros-standalone-download-page {
  max-width: 880px !important;
}

.redactos-theme .ros-standalone-download-hero {
  margin-bottom: 24px !important;
}

.redactos-theme .ros-standalone-license-card {
  align-items: center;
  background: linear-gradient(135deg, #0f2f5f 0%, #154a8a 62%, #1d5fb1 100%);
  border: 1px solid #17477f;
  box-shadow: 0 18px 42px rgba(15, 47, 95, 0.18);
  color: #fff;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(190px, 0.78fr) minmax(320px, 1.45fr) auto;
  margin-bottom: 18px;
  overflow: hidden;
  padding: 24px;
  position: relative;
}

.redactos-theme .ros-standalone-license-card::after {
  border: 1px solid rgba(147, 197, 253, 0.16);
  border-radius: 50%;
  content: "";
  height: 220px;
  pointer-events: none;
  position: absolute;
  right: -100px;
  top: -130px;
  width: 220px;
}

.redactos-theme .ros-standalone-plan-price,
.redactos-theme .ros-standalone-activation,
.redactos-theme .ros-standalone-pricing-link {
  position: relative;
  z-index: 1;
}

.redactos-theme .ros-standalone-plan-kicker {
  color: #bfdbfe;
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.redactos-theme .ros-standalone-price {
  align-items: baseline;
  display: flex;
  line-height: 1;
  margin: 0 0 8px;
}

.redactos-theme .ros-standalone-price > span {
  font-size: 20px;
  font-weight: 700;
}

.redactos-theme .ros-standalone-price > strong {
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.redactos-theme .ros-standalone-price > small {
  color: #dbeafe;
  font-size: 15px;
  font-weight: 650;
  margin-left: 3px;
}

.redactos-theme .ros-standalone-plan-price > p:last-child {
  color: #dbeafe;
  font-size: 13px;
  margin: 0;
}

.redactos-theme .ros-standalone-activation {
  border-left: 1px solid rgba(219, 234, 254, 0.22);
  padding-left: 24px;
}

.redactos-theme .ros-standalone-activation-title {
  align-items: center;
  display: flex;
  gap: 12px;
}

.redactos-theme .ros-standalone-license-icon {
  align-items: center;
  background: rgba(219, 234, 254, 0.12);
  border: 1px solid rgba(219, 234, 254, 0.2);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.redactos-theme .ros-standalone-license-icon svg {
  fill: none;
  height: 23px;
  stroke: #93c5fd;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 23px;
}

.redactos-theme .ros-standalone-activation-title strong,
.redactos-theme .ros-standalone-activation-title small {
  display: block;
}

.redactos-theme .ros-standalone-activation-title strong {
  font-size: 16px;
}

.redactos-theme .ros-standalone-activation-title small {
  color: #bfdbfe;
  font-size: 13px;
  margin-top: 3px;
}

.redactos-theme .ros-standalone-activation-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.redactos-theme .ros-standalone-activation-steps li {
  align-items: center;
  color: #eaf2ff;
  display: inline-flex;
  font-size: 13px;
  gap: 6px;
}

.redactos-theme .ros-standalone-activation-steps li > span {
  align-items: center;
  background: #dbeafe;
  color: #17477f;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 20px;
  justify-content: center;
  width: 20px;
}

.redactos-theme .ros-standalone-pricing-link {
  align-items: center;
  background: #fff;
  border: 1px solid #fff;
  color: #17477f;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
  white-space: nowrap;
}

.redactos-theme .ros-standalone-pricing-link:hover {
  background: #dbeafe;
  border-color: #dbeafe;
  color: #0f2f5f;
}

.redactos-theme .ros-standalone-pricing-link:focus-visible {
  outline: 3px solid rgba(191, 219, 254, 0.7);
  outline-offset: 3px;
}

.redactos-theme .ros-standalone-download-card {
  border-radius: 12px !important;
}

@media (max-width: 980px) {
  .redactos-theme .ros-standalone-license-card {
    grid-template-columns: minmax(170px, 0.7fr) minmax(280px, 1.3fr);
  }

  .redactos-theme .ros-standalone-pricing-link {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 700px) {
  .redactos-theme .ros-standalone-license-card {
    align-items: stretch;
    gap: 18px;
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .redactos-theme .ros-standalone-activation {
    border-left: 0;
    border-top: 1px solid rgba(219, 234, 254, 0.22);
    padding-left: 0;
    padding-top: 18px;
  }

  .redactos-theme .ros-standalone-pricing-link {
    grid-column: auto;
    justify-self: stretch;
  }
}

/* Source card layout matching the approved workbench reference. */
.redactos-theme .ros-source-card {
  border-top: 1px solid #cbd8e8 !important;
  border-radius: 9px !important;
  background: #ffffff !important;
}

.redactos-theme .ros-source-toolbar {
  display: flex !important;
  min-height: 66px !important;
  height: 66px !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 12px 16px !important;
  border-bottom: 1px solid #d8e2ee !important;
  background: #ffffff !important;
}

.redactos-theme .ros-source-toolbar::after {
  display: none !important;
}

.redactos-theme .ros-source-toolbar > div:first-child {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
}

.redactos-theme .ros-source-toolbar > div:first-child > div:first-child {
  width: 34px !important;
  height: 34px !important;
  padding: 8px !important;
  border-radius: 7px !important;
  background: #edf3ff !important;
  color: #2563eb !important;
}

.redactos-theme .ros-source-toolbar h2 {
  color: #172b43 !important;
  font-size: 17px !important;
  font-weight: 750 !important;
}

.redactos-theme .ros-source-control-stash {
  display: none !important;
}

.redactos-theme .ros-source-header-actions {
  position: relative;
  z-index: 60;
  display: flex;
  min-width: 0;
  flex: none;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  pointer-events: auto !important;
}

.redactos-theme .ros-source-native-upload {
  position: relative;
  z-index: 70;
  display: inline-flex;
  min-height: 38px;
  flex: none;
  align-items: stretch;
  cursor: pointer;
  touch-action: manipulation;
}

.redactos-theme .ros-source-native-upload > .ros-upload-action {
  min-height: 38px !important;
  padding: 8px 13px !important;
  pointer-events: none !important;
}

.redactos-theme .ros-source-native-upload > .ros-source-native-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  pointer-events: none !important;
}

.redactos-theme .ros-source-exit-hidden {
  display: none !important;
}

.redactos-theme .ros-source-header-actions > button {
  min-height: 38px !important;
  padding: 8px 13px !important;
}

.redactos-theme .ros-source-toolbar,
.redactos-theme .ros-source-mode-row,
.redactos-theme .ros-source-footer {
  position: relative;
  z-index: 40;
  pointer-events: auto !important;
}

.redactos-theme .ros-source-header-actions .ros-config-action,
.redactos-theme .ros-source-mode-row button,
.redactos-theme .ros-source-footer button:not(:disabled) {
  position: relative;
  z-index: 65;
  pointer-events: auto !important;
  touch-action: manipulation;
}

.redactos-theme .ros-source-header-actions .ros-upload-action,
.redactos-theme .ros-source-header-actions .ros-exit-action {
  border: 1px solid #cdd9e8 !important;
  background: #ffffff !important;
  color: #314a64 !important;
}

.redactos-theme .ros-source-header-actions .ros-config-action {
  border: 1px solid #2563eb !important;
  background: #2563eb !important;
  color: #ffffff !important;
}

.redactos-theme .ros-source-mode-row {
  display: flex;
  min-height: 56px;
  flex: none;
  align-items: center;
  padding: 8px 18px;
  border-bottom: 1px solid #d8e2ee;
  background: #f8fafd;
}

.redactos-theme .ros-source-mode-row .ros-mode-control {
  display: inline-flex;
  min-height: 0;
  align-items: center;
  gap: 14px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.redactos-theme .ros-source-mode-row .ros-mode-control > span {
  color: #1e293b !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

.redactos-theme .ros-source-mode-row .ros-mode-control > div {
  display: inline-flex;
  gap: 12px;
  padding: 0 !important;
  background: transparent !important;
}

.redactos-theme .ros-source-mode-row .ros-mode-control button {
  position: relative;
  min-height: 38px !important;
  padding: 8px 15px 8px 36px !important;
  border: 1px solid #cdd9e8 !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #334a62 !important;
  box-shadow: none !important;
}

.redactos-theme .ros-source-mode-row .ros-mode-control button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 14px;
  width: 16px;
  height: 16px;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  background: #ffffff;
  transform: translateY(-50%);
}

.redactos-theme .ros-source-mode-row .ros-mode-control button[aria-pressed="true"] {
  border-color: #b9ceff !important;
  color: #1d4ed8 !important;
}

.redactos-theme .ros-source-mode-row .ros-mode-control button[aria-pressed="true"]::before {
  border-color: #3b82f6;
  box-shadow: inset 0 0 0 3px #ffffff;
  background: #3b82f6;
}

.redactos-theme .ros-source-hint-row {
  display: flex;
  min-height: 44px;
  flex: none;
  align-items: center;
  padding: 9px 18px;
  border-bottom: 1px solid #d8e2ee;
  background: #f4f7fb;
  color: #71839a;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.redactos-theme .ros-rule-code-badge {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  margin-top: 5px;
  padding: 2px 7px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  white-space: nowrap;
}

.redactos-theme .ros-rule-compat-note {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.redactos-theme .ros-source-card label[data-ros-unsupported-amount-handled="1"],
.redactos-theme .ros-source-card label[data-ros-non-interface-rule="1"],
.redactos-theme .ros-source-card label[data-ros-disabled-interface-rule="1"] {
  display: none !important;
}

.redactos-theme [data-ros-legacy-preset-table="1"] {
  display: none !important;
}

.redactos-theme .ros-interface-rule-manager {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid #dbe5f1;
  border-radius: 10px;
  background: #f8fafc;
}

.redactos-theme .ros-interface-rule-manager-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.redactos-theme .ros-interface-rule-manager-head h3 {
  margin: 0;
  color: #172033;
  font-size: 18px;
  font-weight: 700;
}

.redactos-theme .ros-interface-rule-manager-head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
}

.redactos-theme .ros-interface-rule-manager-head > span {
  flex: none;
  padding: 4px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.redactos-theme .ros-interface-rule-manager-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.redactos-theme .ros-managed-rule-card {
  display: flex;
  min-height: 82px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.redactos-theme .ros-managed-rule-card:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.redactos-theme .ros-managed-rule-card:has(input:checked) {
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: inset 3px 0 0 #2563eb;
}

.redactos-theme .ros-managed-rule-card > div:first-child {
  display: flex;
  width: 20px;
  height: 20px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1 !important;
  border-radius: 5px;
  background: #ffffff !important;
}

.redactos-theme .ros-managed-rule-card:has(input:checked) > div:first-child {
  border-color: #2563eb !important;
  background: #2563eb !important;
}

.redactos-theme .ros-managed-rule-card:not(:has(input:checked)) > div:first-child svg {
  opacity: 0;
}

.redactos-theme .ros-managed-rule-card:focus-within {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.redactos-theme .ros-auxiliary-rules {
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid #dbe5f1;
}

.redactos-theme .ros-auxiliary-rules-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.redactos-theme .ros-auxiliary-rules-head strong {
  color: #172033;
  font-size: 14px;
}

.redactos-theme .ros-auxiliary-rules-head span {
  color: #64748b;
  font-size: 12px;
}

.redactos-theme .ros-auxiliary-rules-grid {
  display: grid;
  gap: 10px;
}

.redactos-theme .ros-auxiliary-rule-card {
  padding: 12px 14px;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  background: #ffffff;
}

.redactos-theme .ros-auxiliary-rule-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.redactos-theme .ros-auxiliary-rule-card strong {
  color: #172033;
  font-size: 14px;
}

.redactos-theme .ros-auxiliary-rule-card > div span {
  padding: 2px 7px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 650;
}

.redactos-theme .ros-auxiliary-rule-card.is-blacklist > div span {
  background: #fff1f2;
  color: #be123c;
}

.redactos-theme .ros-auxiliary-rule-card.is-whitelist > div span {
  background: #ecfdf5;
  color: #047857;
}

.redactos-theme .ros-auxiliary-rule-card p,
.redactos-theme .ros-auxiliary-rule-card small {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .redactos-theme .ros-interface-rule-manager-grid {
    grid-template-columns: 1fr;
  }
}

.redactos-theme .ros-always-interface-rule {
  display: inline-flex;
  width: fit-content;
  margin: 8px 0 0;
  padding: 5px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 600;
}

.redactos-theme .ros-source-card.ros-rule-panel-open .ros-source-mode-row,
.redactos-theme .ros-source-card.ros-rule-panel-open .ros-source-hint-row,
.redactos-theme .ros-source-card.ros-rule-panel-open .ros-editor {
  display: none !important;
}

.redactos-theme .ros-source-card .ros-rule-panel {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 20px 22px 24px !important;
  border-bottom: 0 !important;
  background: #f8fafc !important;
  box-shadow: none !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.redactos-theme .ros-source-card .ros-rule-panel > div {
  border-color: #dbe5f1 !important;
  background: #ffffff !important;
}

.redactos-theme .ros-rule-panel [data-ros-rule-section-heading="1"] {
  display: none !important;
}

.redactos-theme .ros-rule-panel > div:first-child {
  margin-bottom: 16px !important;
  padding-bottom: 12px !important;
  border-color: #dbe5f1 !important;
}

.redactos-theme .ros-rule-panel > .space-y-6 {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.redactos-theme .ros-rule-panel [data-ros-rule-group="1"] {
  margin: 0 !important;
}

.redactos-theme .ros-rule-panel [data-ros-rule-group="1"] .grid {
  gap: 10px !important;
}

.redactos-theme .ros-rule-panel [data-ros-rule-help-card="1"] {
  margin: 0 0 12px !important;
  padding: 14px 16px !important;
  border: 1px solid #bfdbfe !important;
  border-radius: 8px !important;
  background: #eff6ff !important;
}

.redactos-theme .ros-rule-panel [data-ros-rule-help-card="1"] > div {
  gap: 12px !important;
}

.redactos-theme .ros-rule-panel [data-ros-rule-help-card="1"] > div > div:first-child {
  background: #dbeafe !important;
  color: #2563eb !important;
}

.redactos-theme .ros-rule-panel [data-ros-rule-help-card="1"] svg,
.redactos-theme .ros-rule-panel [data-ros-rule-help-card="1"] p:first-child {
  color: #1d4ed8 !important;
}

.redactos-theme .ros-rule-panel [data-ros-rule-help-card="1"] p:last-child {
  margin-top: 3px !important;
  color: #475569 !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
}

.redactos-theme .ros-rule-panel label[data-ros-current-rule-code] {
  gap: 12px !important;
  min-height: 76px;
  margin: 0 !important;
  padding: 12px 14px !important;
  border: 1px solid #dbe5f1 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease !important;
}

.redactos-theme .ros-rule-panel label[data-ros-current-rule-code]:hover {
  border-color: #93c5fd !important;
  background: #f8fbff !important;
}

.redactos-theme .ros-rule-panel label[data-ros-current-rule-code]:has(input:checked) {
  border-color: #93c5fd !important;
  background: #eff6ff !important;
  box-shadow: inset 3px 0 0 #2563eb !important;
}

.redactos-theme .ros-rule-panel label[data-ros-current-rule-code] > div:first-child {
  width: 20px !important;
  height: 20px !important;
  border-color: #cbd5e1 !important;
  border-radius: 5px !important;
  background: #ffffff !important;
}

.redactos-theme .ros-rule-panel label[data-ros-current-rule-code]:has(input:checked) > div:first-child {
  border-color: #2563eb !important;
  background: #2563eb !important;
}

.redactos-theme .ros-rule-panel label[data-ros-lawyer-license-rule="1"]:not(:has(input:checked)) > div:first-child svg {
  opacity: 0;
}

.redactos-theme .ros-rule-panel label[data-ros-current-rule-code] .text-slate-800 {
  color: #172033 !important;
}

.redactos-theme .ros-rule-panel label[data-ros-current-rule-code] .text-slate-500 {
  color: #64748b !important;
}

.redactos-theme .ros-rule-panel label[data-ros-current-rule-code]:focus-within {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .redactos-theme .ros-source-card .ros-rule-panel {
    padding: 16px !important;
  }
}

.redactos-theme .ros-source-card .ros-editor {
  background: #ffffff !important;
}

.redactos-theme .ros-source-card .ros-editor textarea {
  padding: 24px !important;
  background: #ffffff !important;
}

.redactos-theme .ros-source-footer {
  display: block !important;
  padding: 14px 16px 18px !important;
  border-top: 0 !important;
  background: #ffffff !important;
}

.redactos-theme .ros-source-footer::before {
  display: none !important;
}

.redactos-theme .ros-source-footer button {
  width: 100% !important;
  min-height: 52px !important;
  border-radius: 8px !important;
}

@container (max-width: 520px) {
  .redactos-theme .ros-source-toolbar {
    height: auto !important;
    min-height: 66px !important;
    flex-wrap: wrap;
  }

  .redactos-theme .ros-source-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .redactos-theme .ros-source-mode-row .ros-mode-control {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

/* Unified desensitization / restoration workflow. */
.redactos-theme .ros-workflow-legacy-restore {
  display: none !important;
}

.redactos-theme .ros-history-menu-hidden {
  display: none !important;
}

.redactos-theme .ros-drawer-item .ros-drawer-original::before,
.redactos-theme .ros-drawer-item .ros-drawer-replacement::before {
  display: inline-block;
  margin-right: 6px;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
}

.redactos-theme .ros-drawer-item .ros-drawer-original::before {
  content: "原文";
}

.redactos-theme .ros-drawer-item .ros-drawer-replacement::before {
  content: "替换为";
}

.redactos-theme .ros-drawer-item .ros-drawer-type {
  max-width: 116px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.redactos-theme .ros-sidebar nav button.ros-workflow-menu-active {
  border-color: #b9ceff;
  background: #eaf1ff;
  color: #1d4ed8;
  box-shadow: inset 3px 0 #2563eb;
}

.redactos-theme .ros-sidebar nav button.ros-workflow-menu-active svg,
.redactos-theme .ros-sidebar nav button.ros-workflow-menu-active span {
  color: #1d4ed8;
}

.redactos-theme .ros-workflow-page {
  display: flex !important;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
}

.redactos-theme .ros-workflow-page > .ros-workspace-inner,
.redactos-theme .ros-workflow-page > .ros-restore-workspace {
  flex: 1 1 auto;
  min-height: 0;
  height: auto !important;
}

.redactos-theme .ros-workflow-switcher {
  display: grid;
  flex: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 8px;
  border: 1px solid #cbd8e8;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgb(37 75 130 / 4%);
}

.redactos-theme .ros-workflow-switcher > a {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #60758d;
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.redactos-theme .ros-workflow-switcher > a:hover {
  border-color: #c9d9f5;
  background: #f5f8fe;
  color: #1d4ed8;
}

.redactos-theme .ros-workflow-switcher > a.is-active {
  border-color: #a9c5ff;
  background: #eaf1ff;
  color: #1d4ed8;
}

.redactos-theme .ros-workflow-step-number {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1px solid #d4e0f0;
  border-radius: 50%;
  background: #ffffff;
  color: #6b8199;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.redactos-theme .ros-workflow-switcher > a.is-active .ros-workflow-step-number {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.redactos-theme .ros-workflow-switcher > a > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.redactos-theme .ros-workflow-switcher strong {
  color: currentColor;
  font-size: 15px;
  font-weight: 760;
}

.redactos-theme .ros-workflow-switcher small {
  overflow: hidden;
  color: #8293a8;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .redactos-theme .ros-workflow-switcher {
    grid-template-columns: 1fr;
  }

  .redactos-theme .ros-workflow-switcher small {
    white-space: normal;
  }
}

@media (max-width: 1050px) {
  .redactos-theme .ros-restore-page .ros-workspace {
    overflow-y: auto;
  }
  .redactos-theme .ros-restore-workspace {
    grid-template-columns: minmax(0, 1fr) !important;
    height: auto !important;
  }
  .redactos-theme .ros-restore-input-card,
  .redactos-theme .ros-restore-dictionary-card,
  .redactos-theme .ros-restore-result-card {
    min-height: 620px;
  }
}

@media (max-width: 680px) {
  .redactos-theme .ros-restore-card-header,
  .redactos-theme .ros-restore-dictionary-header {
    align-items: flex-start !important;
    flex-direction: column;
  }
  .redactos-theme .ros-restore-header-actions,
  .redactos-theme .ros-restore-import-actions {
    width: 100%;
  }
  .redactos-theme .ros-restore-header-actions > button,
  .redactos-theme .ros-restore-import-actions > button {
    flex: 1 1 0;
  }
  .redactos-theme .ros-restore-run-action {
    width: 100% !important;
  }
}

@media (max-width: 680px) {
  .redactos-theme .ros-shell { padding: 8px 8px 8px 0; }
  .redactos-theme .ros-sidebar,
  .redactos-theme .ros-sidebar[class~="w-20"] { width: 66px; margin-left: 8px; border-radius: 20px; }
  .redactos-theme .ros-command-bar { height: 84px; min-height: 84px; padding: 14px 16px; }
  .redactos-theme .ros-command-bar nav > div:first-child { display: none; }
  .redactos-theme .ros-command-bar nav h2 { font-size: 17px; }
  .redactos-theme .ros-command-bar > div:last-child { display: none; }
  .redactos-theme .ros-workspace { padding: 10px; }
  .redactos-theme .ros-stage { flex-direction: column; overflow-y: auto; }
  .redactos-theme .ros-source-column,
  .redactos-theme .ros-result-column { min-height: 460px; flex: none; padding: 0; }
  .redactos-theme .ros-resizer { display: none; }
  .redactos-theme .ros-drawer-host {
    flex-direction: column;
    overflow-y: auto;
  }
  .redactos-theme .ros-drawer-host > .ros-stage {
    flex: none;
  }
  .redactos-theme .ros-result-drawer {
    width: 100%;
    max-width: none;
    min-height: 420px;
    flex: 0 0 auto;
  }
}

@container (max-width: 620px) {
  .redactos-theme .ros-source-toolbar {
    min-height: 170px;
    overflow: visible;
  }

  .redactos-theme .ros-source-toolbar::after {
    display: none;
  }

  .redactos-theme .redact-source-toolbar-scroll {
    overflow: visible;
  }

  .redactos-theme .redact-source-toolbar-scroll > div {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .redactos-theme .ros-source-toolbar .ros-config-action {
    margin-left: 0;
  }
}

@container (max-width: 430px) {
  .redactos-theme .ros-source-toolbar {
    min-height: 218px;
  }

  .redactos-theme .ros-source-toolbar .ros-mode-control {
    width: 100%;
    justify-content: space-between;
  }

  .redactos-theme .ros-source-toolbar .ros-upload-action + span {
    display: none;
  }

  .redactos-theme .ros-source-toolbar .ros-config-action,
  .redactos-theme .ros-source-toolbar .ros-exit-action {
    flex: 1 1 auto;
    justify-content: center;
  }

  .redactos-theme .ros-source-footer {
    padding: 12px;
  }

  .redactos-theme .ros-source-footer::before {
    display: none;
  }

  .redactos-theme .ros-source-footer button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .redactos-theme *,
  .redactos-theme *::before,
  .redactos-theme *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* 2026 light-blue enterprise theme, inspired by the provided workstation reference. */
body.redactos-theme {
  background: #eef3f9;
  color: #142b43;
}

.redactos-theme .ros-shell {
  gap: 0;
  padding: 0;
  background: #eef3f9;
}

.redactos-theme .ros-sidebar {
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: #334861;
  box-shadow: none;
}

.redactos-theme .ros-sidebar > div:first-child {
  border-color: #dbe4ef;
}

.redactos-theme .ros-sidebar .ros-brand-wordmark,
.redactos-theme .ros-sidebar .ros-brand-mark {
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
}

.redactos-theme .ros-sidebar nav {
  gap: 5px;
  padding-inline: 9px;
}

.redactos-theme .ros-sidebar nav button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #52677f;
  font-size: 15px;
  font-weight: 650;
}

.redactos-theme .ros-sidebar nav button span {
  color: inherit;
  font-size: 15px;
}

.redactos-theme .ros-sidebar nav button svg {
  color: #73869c;
}

.redactos-theme .ros-sidebar button:hover {
  border-color: #d6e2f1;
  background: #f4f7fb;
  color: #1d4ed8;
}

.redactos-theme .ros-sidebar button[class~="bg-blue-50"] {
  border-color: #b9ceff;
  background: #eaf1ff;
  color: #1d4ed8;
  box-shadow: inset 3px 0 #2563eb;
}

.redactos-theme .ros-sidebar button[class~="bg-blue-50"] svg,
.redactos-theme .ros-sidebar button[class~="bg-blue-50"] span {
  color: #1d4ed8;
}

.redactos-theme .ros-sidebar [class*="border-t"] {
  border-color: #dbe4ef;
}

.redactos-theme .ros-sidebar [class~="text-slate-500"] {
  color: #697d94;
}

.redactos-theme .ros-main {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #eef3f9;
  box-shadow: none;
}

.redactos-theme .ros-command-bar {
  height: 72px;
  min-height: 72px;
  padding: 14px 22px;
  border: 0;
  border-bottom: 1px solid #d5dfeb;
  background: #ffffff;
  box-shadow: none;
}

.redactos-theme .ros-command-bar::before,
.redactos-theme .ros-command-bar::after {
  display: none;
}

.redactos-theme .ros-command-bar nav > div:first-child {
  width: 38px;
  height: 38px;
  border: 1px solid #d6e3f7;
  border-radius: 8px;
  background: #edf3ff;
  color: #2563eb;
}

.redactos-theme .ros-command-bar nav > div:last-child {
  border-color: #d5dfeb;
}

.redactos-theme .ros-command-bar nav p {
  color: #7a8ca2 !important;
  font-size: 12px !important;
}

.redactos-theme .ros-command-bar nav h2 {
  color: #142b43 !important;
  font-size: 16px !important;
  font-weight: 750 !important;
}

.redactos-theme .ros-command-bar > div:last-child > button {
  border-color: #cfdaea;
  border-radius: 7px;
  background: #ffffff;
  color: #425a73;
  box-shadow: none;
}

.redactos-theme .ros-command-bar > div:last-child > button:hover {
  border-color: #9db9f9;
  background: #f4f7ff;
  color: #1d4ed8;
}

.redactos-theme .ros-command-bar > div:last-child > div[class*="w-64"] {
  border-color: #d5dfeb;
  border-radius: 7px;
  background: #f7f9fc;
}

.redactos-theme .ros-workspace {
  padding: 16px;
  background: #eef3f9;
}

.redactos-theme .ros-stage {
  gap: 14px;
}

.redactos-theme .ros-source-column,
.redactos-theme .ros-result-column {
  border-radius: 9px;
}

.redactos-theme .ros-source-card,
.redactos-theme .ros-result-card {
  border: 1px solid #cbd8e8;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 7px 20px rgb(37 75 130 / 5%);
}

.redactos-theme .ros-source-toolbar,
.redactos-theme .ros-result-toolbar {
  min-height: 66px;
  padding: 10px 16px;
  border-color: #d8e2ee;
  background: #ffffff;
}

.redactos-theme .ros-source-toolbar::after {
  display: none;
}

.redactos-theme .ros-source-toolbar h2,
.redactos-theme .ros-result-toolbar h2 {
  color: #172b43;
  font-size: 17px;
  font-weight: 750;
}

.redactos-theme .ros-source-toolbar h2 + span,
.redactos-theme .ros-result-toolbar h2 + span {
  color: #74869b;
}

.redactos-theme .ros-source-toolbar h2 > svg,
.redactos-theme .ros-result-toolbar h2 > svg,
.redactos-theme .ros-source-toolbar > div:first-child > svg,
.redactos-theme .ros-result-toolbar > div:first-child > svg {
  border-radius: 7px;
  background: #edf3ff;
  color: #2563eb;
}

.redactos-theme .ros-mode-control {
  border-color: #d3deeb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.redactos-theme .ros-mode-control [role="group"] {
  background: #f1f5fa;
}

.redactos-theme .ros-mode-control button {
  border-radius: 6px;
  color: #51657c;
}

.redactos-theme .ros-mode-control button[aria-pressed="true"] {
  background: #ffffff;
  color: #1d4ed8;
  box-shadow: 0 1px 4px rgb(30 64 120 / 12%);
}

.redactos-theme .ros-upload-action,
.redactos-theme .ros-exit-action,
.redactos-theme .ros-result-toolbar button,
.redactos-theme .ros-document-copy button {
  border: 1px solid #cdd9e8 !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  color: #314a64 !important;
  box-shadow: none !important;
}

.redactos-theme .ros-upload-action:hover,
.redactos-theme .ros-exit-action:hover,
.redactos-theme .ros-result-toolbar button:hover {
  border-color: #9bb8fa !important;
  background: #f4f7ff !important;
  color: #1d4ed8 !important;
}

.redactos-theme .ros-config-action {
  border: 1px solid #2563eb !important;
  border-radius: 7px !important;
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 6px 14px rgb(37 99 235 / 18%) !important;
}

.redactos-theme .ros-config-action:hover {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
}

.redactos-theme .ros-editor,
.redactos-theme .ros-document-scroll,
.redactos-theme .ros-document-copy,
.redactos-theme .ros-document-result {
  background: #ffffff;
}

.redactos-theme .ros-editor textarea,
.redactos-theme .ros-document-scroll,
.redactos-theme .ros-document-copy,
.redactos-theme .ros-document-result {
  color: #263d55;
}

.redactos-theme .ros-source-footer {
  padding: 12px 16px;
  border-color: #d8e2ee;
  background: #f8fafd;
}

.redactos-theme .ros-source-footer::before {
  color: #75879c;
}

.redactos-theme .ros-source-footer button {
  min-height: 46px;
  border: 1px solid #2563eb !important;
  border-radius: 8px !important;
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 7px 16px rgb(37 99 235 / 18%) !important;
}

.redactos-theme .ros-source-footer button:disabled {
  border-color: #e1e8f1 !important;
  background: #e8eef5 !important;
  color: #8a9caf !important;
  box-shadow: none !important;
}

.redactos-theme .ros-resizer {
  background: transparent;
}

.redactos-theme .ros-resizer > div {
  background: #c5d2e2;
}

.redactos-theme .ros-resizer:hover > div {
  background: #5d8ef1;
}

.redactos-theme .ros-result-drawer {
  border: 1px solid #cbd8e8;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: -8px 0 24px rgb(30 64 120 / 7%);
}

.redactos-theme .ros-drawer-header {
  border-color: #d8e2ee;
  background: #f7f9fc;
}

.redactos-theme .ros-drawer-search {
  border-color: #d3deeb;
  border-radius: 7px;
  background: #ffffff;
}

.redactos-theme .ros-drawer-item {
  border-color: #dbe4ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.redactos-theme .ros-drawer-item:hover {
  border-color: #aac2f7;
  background: #f6f8ff;
}

.redactos-theme .ros-restore-workspace {
  gap: 12px !important;
}

.redactos-theme .ros-restore-input-card,
.redactos-theme .ros-restore-dictionary-card,
.redactos-theme .ros-restore-result-card {
  border: 1px solid #cbd8e8 !important;
  border-radius: 9px !important;
  background: #ffffff !important;
  box-shadow: 0 7px 20px rgb(37 75 130 / 5%) !important;
}

.redactos-theme .ros-restore-input-card::before,
.redactos-theme .ros-restore-dictionary-card::before,
.redactos-theme .ros-restore-result-card::before {
  display: none;
}

.redactos-theme .ros-restore-card-header {
  min-height: 66px !important;
  padding: 12px 16px !important;
  border-color: #d8e2ee !important;
  background: #ffffff !important;
}

.redactos-theme .ros-restore-card-header h2 {
  color: #172b43 !important;
  font-size: 17px !important;
}

.redactos-theme .ros-restore-card-header h2 > svg,
.redactos-theme .ros-restore-dictionary-card-header h2 > svg {
  border-radius: 7px;
  background: #edf3ff;
  color: #2563eb !important;
  box-shadow: none;
}

.redactos-theme .ros-restore-card-body,
.redactos-theme .ros-restore-dictionary-card-body,
.redactos-theme .ros-restore-result-body {
  background: #f8fafd;
}

.redactos-theme .ros-restore-dictionary-section,
.redactos-theme .ros-restore-document-section {
  border-color: #d7e1ed;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.redactos-theme .ros-restore-document-upload,
.redactos-theme .ros-restore-import-actions > .ros-restore-json-upload,
.redactos-theme .ros-restore-run-action {
  border-color: #2563eb !important;
  border-radius: 7px !important;
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 6px 14px rgb(37 99 235 / 17%) !important;
}

.redactos-theme .ros-restore-document-upload:hover,
.redactos-theme .ros-restore-import-actions > .ros-restore-json-upload:hover,
.redactos-theme .ros-restore-run-action:hover {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
}

.redactos-theme .ros-restore-clear-action,
.redactos-theme .ros-restore-dictionary-clear,
.redactos-theme .ros-restore-native-export,
.redactos-theme .ros-restore-export-placeholder {
  border-color: #cdd9e8 !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  color: #52677f !important;
  box-shadow: none !important;
}

.redactos-theme .ros-restore-json-status {
  border-color: #d5e1f2 !important;
  border-radius: 7px !important;
  background: #f2f6fc !important;
  color: #5d7189 !important;
}

.redactos-theme .ros-restore-dictionary-preview {
  border-color: #d5e0ec;
  border-radius: 8px;
  background: #f8fafd;
}

.redactos-theme .ros-restore-dictionary-summary {
  border-color: #d6e1ef;
  background: #edf3ff;
  color: #566c85;
}

.redactos-theme .ros-restore-dictionary-summary strong,
.redactos-theme .ros-restore-dictionary-original > strong {
  color: #1d4ed8;
}

.redactos-theme .ros-restore-dictionary-row {
  border-color: #dbe4ef;
  border-radius: 8px;
  box-shadow: none;
}

.redactos-theme .ros-restore-dictionary-order,
.redactos-theme .ros-restore-dictionary-state svg {
  background: #eaf1ff;
  color: #2563eb;
}

.redactos-theme .ros-regex-generator-modal {
  background: rgb(16 42 67 / 42%);
}

.redactos-theme .ros-regex-generator-shell,
.redactos-theme .ros-regex-generator-card,
.redactos-theme .ros-regex-generator-result-panel {
  border-color: #cbd8e8;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgb(30 64 120 / 14%);
}

.redactos-theme .ros-regex-generator-header,
.redactos-theme .ros-regex-generator-result-head {
  border-color: #d8e2ee;
  background: #f7f9fc;
}

.redactos-theme .ros-regex-generator-brand,
.redactos-theme .ros-regex-generator-section-title,
.redactos-theme .ros-regex-generator-panel-heading {
  color: #172b43;
}

.redactos-theme .ros-regex-generator-apply,
.redactos-theme .ros-regex-generator-trigger,
.redactos-theme .ros-regex-generator-command {
  border-color: #2563eb !important;
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.redactos-theme [class~="bg-blue-600"] {
  background-color: #2563eb !important;
}

.redactos-theme [class~="hover:bg-blue-700"]:hover {
  background-color: #1d4ed8 !important;
}

.redactos-theme [class~="bg-blue-50"],
.redactos-theme [class~="bg-blue-50/50"] {
  background-color: #edf3ff !important;
}

.redactos-theme [class~="text-blue-600"],
.redactos-theme [class~="text-blue-700"] {
  color: #1d4ed8 !important;
}

.redactos-theme [class~="border-blue-200"],
.redactos-theme [class~="border-blue-300"] {
  border-color: #b9ceff !important;
}

.redactos-theme [class~="bg-slate-50"],
.redactos-theme [class~="bg-slate-50/30"],
.redactos-theme [class~="bg-slate-50/40"] {
  background-color: #f7f9fc !important;
}

.redactos-theme [class~="rounded-xl"] {
  border-radius: 9px;
}

.redactos-theme [class~="rounded-2xl"] {
  border-radius: 10px;
}

.redactos-theme :focus-visible {
  outline-color: #2563eb;
}

@media (max-width: 1180px) {
  .redactos-theme .ros-shell {
    gap: 0;
    padding: 0;
  }

  .redactos-theme .ros-sidebar,
  .redactos-theme .ros-main {
    margin: 0;
    border-radius: 0;
  }

  .redactos-theme .ros-command-bar {
    height: 72px;
    min-height: 72px;
    padding: 14px 18px;
  }
}

.redactos-theme button.ros-restore-document-upload,
.redactos-theme button.ros-restore-json-upload,
.redactos-theme button.ros-restore-run-action,
.redactos-theme button.ros-config-action,
.redactos-theme .ros-source-footer button:not(:disabled) {
  color: #ffffff !important;
}

.redactos-theme .ros-result-card > .absolute > svg,
.redactos-theme .ros-restore-result-body > div > svg {
  color: #b9c8da !important;
  opacity: 0.55 !important;
}

.redactos-theme .ros-result-card > .absolute > p,
.redactos-theme .ros-restore-result-body > div > p {
  color: #73869c !important;
}
/* The internal test workbench is deliberately account-free. */
.redactos-theme .ros-auth-panel-hidden {
  display: none !important;
}
