:root {
  --bg: #e8f2e4;
  --bg-soft: #f4fbf1;
  --card: rgba(248, 253, 245, 0.94);
  --card-strong: #eef7ea;
  --text: #1d2a20;
  --muted: #546357;
  --line: #bfd0bb;
  --accent: #2f6b3c;
  --accent-soft: #dcecd7;
  --danger: #ff0000;
  --danger-soft: #ffe4e4;
  --warning: #9b6500;
  --warning-soft: #f8edd2;
  --duplicate: #b86d00;
  --duplicate-soft: #fff2de;
  --shadow: 0 14px 32px rgba(51, 76, 54, 0.08);
  --page-gutter: 24px;
  --drawer-width: clamp(380px, 31vw, 620px);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-size: 14px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.85), transparent 24%),
    linear-gradient(180deg, #edf6e8 0%, #e5f0df 48%, #dde8d7 100%);
  font-family: "Times New Roman", "SimSun", "Songti SC", serif;
}

body.has-drawer-open {
  overflow: auto;
}

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

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.page {
  width: min(1380px, calc(100vw - var(--drawer-width) - (var(--page-gutter) * 2)));
  margin: 0 auto 0 var(--page-gutter);
  padding: 24px 0 40px;
}

.workspace-page {
  display: grid;
  gap: 18px;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.workspace-header-copy {
  min-width: 0;
}

.workspace-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.record-meta {
  display: grid;
  gap: 4px;
  min-width: 220px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.auth-meta {
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.auth-status-text {
  font-weight: 700;
  color: var(--accent);
}

.auth-user-text {
  color: var(--muted);
  line-height: 1.4;
}

.record-title {
  font-weight: 700;
  line-height: 1.5;
}

.record-status {
  color: var(--muted);
}

.draft-restore-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(166, 140, 67, 0.32);
  border-radius: 14px;
  background: rgba(248, 237, 210, 0.82);
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(22, 31, 24, 0.38);
  backdrop-filter: blur(6px);
}

.auth-card {
  width: min(420px, calc(100vw - 32px));
  padding: 22px 24px;
  border: 1px solid rgba(191, 208, 187, 0.95);
  border-radius: 18px;
  background: rgba(248, 253, 245, 0.98);
  box-shadow: 0 24px 48px rgba(24, 40, 29, 0.18);
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.draft-restore-text {
  color: #6d5720;
  line-height: 1.6;
}

.draft-restore-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.workspace-tab {
  padding: 10px 18px;
  border: 1px solid rgba(191, 208, 187, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent);
}

.workspace-tab.is-active {
  border-color: rgba(47, 107, 60, 0.5);
  background: rgba(220, 236, 215, 0.92);
  color: var(--accent);
}

.workspace-view {
  display: grid;
  gap: 18px;
}

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

.workbench-shell {
  grid-template-columns: 220px minmax(0, 1fr);
}

.history-shell {
  grid-template-columns: 300px minmax(0, 1fr) 240px;
}

.workspace-sidebar,
.workspace-context,
.workspace-main {
  min-width: 0;
}

.workspace-sidebar:empty,
.workspace-context:empty,
.workbench-context-body:empty {
  display: none;
}

.workbench-sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
  max-height: calc(100vh - 36px);
}

.workbench-nav {
  display: grid;
  gap: 12px;
}

.workbench-nav-group {
  display: grid;
  gap: 10px;
}

.workbench-nav-children {
  display: grid;
  gap: 8px;
}

.workbench-nav-children.level-1 {
  padding-left: 0;
}

.workbench-nav-children.level-2,
.workbench-nav-children.level-3 {
  padding-left: 0;
}

.workbench-nav-child-row {
  display: grid;
  gap: 6px;
}

.sidebar-card {
  position: sticky;
  top: 18px;
}

.workbench-sidebar .sidebar-card {
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.workbench-nav,
.history-list,
.history-actions,
.workbench-context-body {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.workbench-nav-item,
.history-record-item {
  padding: 12px 14px;
  border: 1px solid #d1e5df;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

.workbench-nav-subitem {
  padding: 10px 14px;
  border: 1px solid rgba(209, 229, 223, 0.72);
  border-radius: 8px;
  background: transparent;
  color: #d1e5df;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: none;
}

.workbench-nav-subitem.is-class {
  background: transparent;
  color: #d1e5df;
}

.history-record-item {
  display: grid;
  gap: 4px;
}

.history-record-item.is-active,
.workbench-nav-item.is-active,
.workbench-nav-subitem.is-active,
.workbench-nav-item:hover:not(:disabled) {
  border-color: #d1e5df;
  background: #e4f0ec;
}

.workbench-nav-subitem:hover:not(:disabled) {
  border-color: rgba(209, 229, 223, 0.92);
  background: #2c8a72;
  color: #ffffff;
}

.workbench-nav-item.is-active,
.workbench-nav-subitem.is-active {
  color: #237b64;
  font-weight: 700;
}

.workbench-sidebar .workbench-nav-item {
  border-color: rgba(35, 123, 100, 0.14);
  background: #2c8a72;
  color: #f2f8f6;
}

.workbench-sidebar .workbench-nav-item:hover:not(:disabled) {
  background: #1e6b56;
  color: #ffffff;
}

.workbench-sidebar .workbench-nav-item.is-active {
  border-color: #d1e5df;
  background: #e4f0ec;
  color: #237b64;
}

.history-record-title {
  font-weight: 700;
  line-height: 1.5;
}

.history-record-meta,
.workbench-nav-empty,
.history-empty-state {
  color: var(--muted);
  line-height: 1.6;
}

.history-filters {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.history-detail-card {
  display: grid;
  gap: 14px;
}

#historyDetail.card {
  min-height: 260px;
}

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

.history-detail-grid div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #d1e5df;
  border-radius: 8px;
  background: #ffffff;
}

.history-empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  border: 1px dashed #d1e5df;
  border-radius: 8px;
  background: #f7faf9;
}

.history-action-button.is-danger {
  color: var(--danger);
}

.context-card {
  display: grid;
  gap: 8px;
  color: var(--muted);
  line-height: 1.7;
}

.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 18px;
  margin-bottom: 20px;
}

.hero-copy,
.hero-panel,
.card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 24px 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(238, 247, 234, 0.92)),
    linear-gradient(180deg, rgba(220, 236, 215, 0.6), rgba(248, 253, 245, 0.4));
}

.hero-panel {
  padding: 22px 24px;
}

.eyebrow {
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.lede {
  margin-top: 12px;
  max-width: 48ch;
  line-height: 1.8;
  color: var(--muted);
}

.panel-label {
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--accent);
}

.config-info {
  line-height: 1.8;
  color: var(--muted);
  white-space: pre-wrap;
}

.result-class-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.result-class-similar,
.output-card-note,
.output-card-detail {
  line-height: 1.7;
  color: var(--muted);
}

.result-class-similar.is-warning,
.output-card-note.is-warning {
  color: var(--danger);
  font-weight: 700;
}

.item-output-grid {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.item-output-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.item-output-label {
  color: var(--muted);
  font-weight: 700;
}

.item-output-value {
  min-width: 0;
  word-break: break-word;
}

.output-card-note {
  margin-top: 6px;
}

.output-card-detail {
  margin-top: 4px;
  word-break: break-word;
}

.card {
  margin-bottom: 20px;
  padding: 22px 24px;
}

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

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-grid label span {
  font-weight: 700;
}

.full {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(47, 107, 60, 0.65);
  box-shadow: 0 0 0 3px rgba(47, 107, 60, 0.1);
}

textarea {
  min-height: 170px;
  resize: vertical;
  line-height: 1.8;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.materials-extract-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

button {
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #2f6b3c, #3c7d4a);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(47, 107, 60, 0.16);
}

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

.ghost-button,
.drawer-close-button {
  padding: 9px 16px;
  border: 1px solid rgba(47, 107, 60, 0.22);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: none;
}

.ghost-button:hover:not(:disabled),
.drawer-close-button:hover:not(:disabled) {
  box-shadow: 0 10px 22px rgba(47, 107, 60, 0.08);
}

.secondary-button {
  background: linear-gradient(135deg, #857037, #a68c43);
}

.loading-state,
.field-note,
.section-note,
.country-meta,
.feedback,
.panel-feedback,
.search-feedback,
.suggestion-zh {
  color: var(--muted);
  line-height: 1.7;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.summary-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  text-align: left;
  border: 1px solid #d1e5df;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
}

.summary-card strong {
  font-size: 26px;
  color: #237b64;
}

.summary-card.is-active {
  border-color: #237b64;
  background: #e4f0ec;
  color: #237b64;
  box-shadow: var(--shadow-soft);
}

.summary-card:hover {
  background: #f2f8f6;
}

.results-stack,
.output-stack {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.country-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.country-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #f2f8f6;
  border-bottom: 1px solid var(--line);
}

.item-list {
  display: grid;
}

.result-class-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #f2f8f6;
  border-top: 1px solid #d1e5df;
  border-bottom: 1px solid #d1e5df;
  color: #237b64;
}

.result-class-title {
  font-weight: 700;
}

.result-class-count {
  color: var(--muted);
}

.review-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.review-header h3 {
  margin: 0;
}

.review-list {
  display: grid;
}

.item-card {
  padding: 16px 18px;
  border-bottom: 1px solid #e2e8f0;
}

.item-card:last-child {
  border-bottom: none;
}

.item-card.is-replaced,
.item-card.is-replaceable {
  background: #fff9e6;
}

.item-card.is-rejected,
.item-card.is-unsupported_country,
.item-card.is-invalid_language,
.item-card.is-ambiguous_class {
  background: #fee2e2;
}

.item-card.has-duplicate {
  background: #fff4de;
  box-shadow: inset 4px 0 0 var(--duplicate);
}

.compact-review-card {
  display: grid;
  gap: 10px;
  padding: 12px 16px;
  background: #ffffff;
}

.review-row-title {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 700;
  line-height: 1.6;
}

.review-row-seq {
  flex: 0 0 auto;
  color: #237b64;
}

.review-compare-grid {
  display: grid;
  gap: 10px;
}

.review-compare-grid.columns-1 {
  grid-template-columns: 1fr;
}

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

.review-compare-grid.columns-3,
.review-compare-grid.columns-4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.review-country-cell {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e4f0ec;
  border-radius: 8px;
  background: #ffffff;
}

.review-country-cell.is-replaceable,
.review-country-cell.is-replaced {
  background: #fff9e6;
}

.review-country-cell.is-rejected,
.review-country-cell.is-unsupported_country,
.review-country-cell.is-invalid_language,
.review-country-cell.is-ambiguous_class {
  background: #fee2e2;
}

.review-country-cell.has-duplicate {
  background: #fff4de;
  box-shadow: inset 4px 0 0 var(--duplicate);
}

.review-country-cell.has-interface-error {
  box-shadow: inset 4px 0 0 var(--danger);
}

.review-country-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 10px;
  row-gap: 4px;
}

.review-country-name {
  font-weight: 700;
  color: #237b64;
  min-width: 0;
}

.review-country-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-self: end;
  justify-content: flex-end;
  align-self: start;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: none;
}

.review-inline-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  border: 1px solid #d1e5df;
  background: #f2f8f6;
  color: #4b5563;
}

.review-inline-tag.status-accepted,
.review-inline-tag.status-class_unknown {
  border-color: #d1e5df;
  background: #e4f0ec;
  color: #237b64;
}

.review-inline-tag.status-replaceable {
  border-color: #f5deb3;
  background: #fff9e6;
  color: #b8860b;
}

.review-inline-tag.status-replaced,
.review-inline-tag.status-rejected,
.review-inline-tag.status-unsupported_country,
.review-inline-tag.status-invalid_language,
.review-inline-tag.status-ambiguous_class {
  border-color: #f3b5b3;
  background: #fee2e2;
  color: #d9534f;
}

.review-inline-tag.status-duplicate {
  border-color: #f5deb3;
  background: #fff4de;
  color: #b8860b;
}

.review-country-body {
  display: grid;
  gap: 6px;
}

.review-country-output {
  font-weight: 700;
  line-height: 1.6;
  word-break: break-word;
}

.review-country-note {
  color: var(--muted);
  line-height: 1.6;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.review-country-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px dashed #d1e5df;
}

.review-country-action-note {
  color: var(--muted);
  font-size: 12px;
}

.ghost-button.compact-more-button,
.ghost-button.compact-country-button {
  padding: 9px 14px;
  font-size: 13px;
  min-height: 40px;
  border-color: #2f7b64;
  background: linear-gradient(135deg, #2f7b64, #3b8a73);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(47, 107, 60, 0.14);
}

.ghost-button.compact-more-button:hover:not(:disabled),
.ghost-button.compact-country-button:hover:not(:disabled) {
  border-color: #256a56;
  background: linear-gradient(135deg, #256a56, #347c67);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(37, 106, 86, 0.18);
}

.review-country-empty {
  color: var(--muted);
  line-height: 1.6;
}

.compact-suggestion-bar {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d1e5df;
  border-radius: 8px;
  background: #f7faf9;
}

.compact-suggestion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.compact-suggestion-title {
  font-weight: 600;
  color: #237b64;
}

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

.compact-suggestion-chip {
  display: grid;
  gap: 4px;
  min-width: 160px;
  max-width: 320px;
  padding: 8px 10px;
  border: 1px solid #c4ddd2;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #eef7f2 100%);
  text-align: left;
  color: #234338;
  box-shadow: none;
}

.compact-suggestion-chip:hover:not(:disabled) {
  border-color: rgba(35, 123, 100, 0.42);
  box-shadow: 0 8px 18px rgba(51, 76, 54, 0.08);
  transform: translateY(-1px);
}

.compact-suggestion-chip-main {
  font-weight: 700;
  line-height: 1.5;
  word-break: break-word;
}

.compact-suggestion-chip-alt,
.compact-suggestion-chip-countries {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.compact-suggestion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.compact-sync-block {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px dashed #d1e5df;
  border-radius: 8px;
  background: #ffffff;
}

.compact-sync-block.is-inline {
  margin-bottom: 10px;
}

.compact-sync-title {
  font-weight: 600;
  color: #237b64;
}

.compact-sync-note {
  color: var(--muted);
  line-height: 1.6;
}

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

.compact-sync-chip {
  display: grid;
  gap: 4px;
  min-width: 170px;
  max-width: 340px;
  padding: 8px 10px;
  border: 1px solid rgba(191, 208, 187, 0.95);
  border-radius: 12px;
  background: rgba(246, 250, 244, 0.98);
  text-align: left;
  color: var(--text);
  box-shadow: none;
}

.compact-sync-chip:hover:not(:disabled) {
  border-color: rgba(47, 107, 60, 0.4);
  box-shadow: 0 8px 18px rgba(51, 76, 54, 0.08);
  transform: translateY(-1px);
}

.compact-sync-chip-main {
  font-weight: 700;
  line-height: 1.5;
  word-break: break-word;
}

.compact-sync-chip-alt,
.compact-sync-chip-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.decision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
}

.ghost-button.decision-button {
  box-shadow: none;
  padding: 6px 10px;
  font-size: 12px;
  min-height: 32px;
  border-color: rgba(205, 92, 92, 0.3);
  background: rgba(255, 244, 244, 0.98);
  color: #a24a4a;
}

.ghost-button.decision-button:hover:not(:disabled) {
  border-color: rgba(205, 92, 92, 0.42);
  background: rgba(255, 236, 236, 0.98);
  color: #8f3e3e;
  box-shadow: none;
}

.decision-button.is-active {
  border-color: rgba(47, 107, 60, 0.42);
  background: rgba(220, 236, 215, 0.92);
  color: var(--accent);
}

.item-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 204px);
  gap: 16px;
  align-items: start;
}

.item-main {
  min-width: 0;
}

.item-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.item-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
}

.item-badges {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  align-items: center;
}

.item-badges {
  justify-content: flex-end;
}

.badge,
.suggestion-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.status-accepted,
.badge.status-class_unknown {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge.status-replaceable {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge.status-replaced,
.badge.status-rejected,
.badge.status-unsupported_country,
.badge.status-invalid_language,
.badge.status-ambiguous_class {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.status-duplicate {
  background: var(--duplicate-soft);
  color: var(--duplicate);
}

.badge.status-interface_error {
  background: rgba(255, 0, 0, 0.12);
  color: var(--danger);
}

.item-detail {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  line-height: 1.7;
}

.item-side {
  display: grid;
  gap: 8px;
  align-content: start;
  padding-left: 14px;
  border-left: 1px solid #e2e8f0;
}

.item-side-block {
  padding: 10px 12px;
  border: 1px solid #e4f0ec;
  border-radius: 8px;
  background: #ffffff;
}

.item-side-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.item-side-value {
  margin-top: 3px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text);
  word-break: break-word;
}

.item-card.has-interface-error {
  box-shadow: inset 4px 0 0 var(--danger);
}

.danger-text {
  color: var(--danger);
  font-weight: 700;
}

.warning-text {
  color: #b86d00;
  font-weight: 700;
}

.duplicate-text {
  color: var(--duplicate);
  font-weight: 700;
}

.interface-error-text {
  color: var(--danger);
  font-weight: 700;
}

.suggestion-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #d1e5df;
  border-radius: 8px;
  background: #f7faf9;
}

.suggestion-panel.has-interface-error {
  border-color: rgba(217, 83, 79, 0.35);
  background: #fee2e2;
}

.suggestion-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.suggestion-panel-title,
.search-box-title {
  font-weight: 600;
  color: #237b64;
}

.replacement-color-preset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.replacement-color-label {
  color: var(--muted);
  white-space: nowrap;
}

.replacement-color-options {
  display: inline-flex;
  gap: 6px;
  padding: 3px;
  border: 1px solid rgba(191, 208, 187, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
}

.replacement-color-button {
  min-width: 58px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.replacement-color-button:hover {
  border-color: rgba(47, 107, 60, 0.18);
  color: var(--text);
}

.replacement-color-button:focus-visible {
  outline: 2px solid rgba(47, 107, 60, 0.3);
  outline-offset: 1px;
}

.replacement-color-button.is-active.is-black {
  border-color: rgba(29, 42, 32, 0.18);
  background: rgba(29, 42, 32, 0.08);
  color: #1d2a20;
  box-shadow: inset 0 0 0 1px rgba(29, 42, 32, 0.08);
}

.replacement-color-button.is-active.is-red {
  border-color: rgba(255, 0, 0, 0.22);
  background: rgba(255, 0, 0, 0.1);
  color: #ff0000;
  box-shadow: inset 0 0 0 1px rgba(255, 0, 0, 0.08);
}

.output-color-select {
  min-width: 94px;
  padding: 6px 10px;
}

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

.suggestion-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) minmax(188px, 236px);
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.suggestion-item:hover {
  border-color: rgba(47, 107, 60, 0.35);
  box-shadow: 0 8px 18px rgba(51, 76, 54, 0.08);
  transform: translateY(-1px);
}

.suggestion-item:has(input:checked) {
  border-color: rgba(47, 107, 60, 0.55);
  background: rgba(220, 236, 215, 0.5);
}

.suggestion-item input {
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  accent-color: var(--accent);
}

.suggestion-content {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.suggestion-meta {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.suggestion-main {
  font-weight: 700;
  line-height: 1.7;
  word-break: break-word;
}

.suggestion-alt {
  color: var(--accent);
  line-height: 1.7;
  word-break: break-word;
}

.suggestion-tag {
  border: 1px solid rgba(191, 208, 187, 0.9);
  background: rgba(238, 247, 234, 0.9);
  color: var(--muted);
}

.suggestion-empty,
.results-empty {
  padding: 14px 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
}

.panel-feedback {
  margin-top: 10px;
}

.panel-feedback.is-interface-error {
  color: var(--danger);
  font-weight: 700;
}

.materials-section {
  margin-top: 22px;
  display: grid;
  gap: 18px;
}

.materials-toolbar,
.materials-panel-head,
.materials-toolbar-actions,
.company-check-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.materials-translate-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 6px;
}

#retranslateApplicantButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  min-width: 0;
  padding: 11px 18px;
  font-size: inherit;
  line-height: 1;
  white-space: nowrap;
}

.materials-toolbar-copy {
  display: grid;
  gap: 4px;
}

.materials-record-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.materials-staging-panel {
  margin-top: 2px;
  gap: 10px;
  background: linear-gradient(180deg, rgba(252, 253, 250, 0.96), rgba(244, 248, 242, 0.92));
}

.materials-staging-textarea {
  width: 100%;
  min-height: 240px;
  padding: 14px 16px;
  border: 1px solid rgba(191, 208, 187, 0.96);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  line-height: 1.75;
  resize: vertical;
  white-space: pre-wrap;
}

.materials-staging-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.materials-inline-select {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
}

.materials-inline-select span {
  white-space: nowrap;
}

.materials-inline-select select {
  min-width: 112px;
  width: auto;
  padding: 8px 12px;
}

.materials-staging-actions button {
  margin-left: auto;
}

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

.materials-review-summary-card {
  padding: 12px 14px;
  border: 1px solid rgba(191, 208, 187, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  display: grid;
  gap: 4px;
}

.materials-review-summary-card.is-high {
  border-color: rgba(205, 92, 92, 0.34);
  background: rgba(255, 244, 244, 0.92);
}

.materials-review-summary-card.is-medium {
  border-color: rgba(220, 162, 71, 0.38);
  background: rgba(255, 249, 239, 0.92);
}

.materials-review-summary-card.is-auto {
  border-color: rgba(63, 129, 187, 0.32);
  background: rgba(244, 249, 255, 0.92);
}

.materials-review-summary-card.is-unresolved {
  border-color: rgba(110, 129, 118, 0.28);
  background: rgba(247, 249, 248, 0.94);
}

.materials-review-summary-label {
  color: var(--muted);
  font-size: 12px;
}

.materials-review-summary-value {
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.materials-record-tab {
  min-width: 220px;
  padding: 10px 14px;
  border: 1px solid rgba(191, 208, 187, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent);
  display: grid;
  gap: 4px;
  text-align: left;
  box-shadow: none;
}

.materials-record-tab:hover:not(:disabled) {
  box-shadow: 0 10px 22px rgba(76, 112, 70, 0.08);
}

.materials-record-tab.is-active {
  border-color: rgba(108, 143, 96, 0.96);
  background: rgba(234, 245, 229, 0.95);
}

.materials-record-tab-index {
  font-size: 12px;
  color: var(--muted);
}

.materials-record-tab-title {
  font-weight: 700;
  line-height: 1.5;
}

.materials-draft-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 16px;
}

.materials-panel {
  border: 1px solid rgba(191, 208, 187, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.materials-fields {
  display: grid;
  gap: 10px;
}

.materials-translate-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -2px;
}

.materials-panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

.materials-fields .materials-field {
  gap: 6px;
}

.materials-review-field-meta {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(209, 229, 223, 0.86);
  border-radius: 10px;
  background: rgba(247, 250, 249, 0.94);
}

.materials-review-meta-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.materials-review-meta-issues,
.materials-review-candidate-issues {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.materials-review-issue-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.4;
  border: 1px solid transparent;
}

.materials-review-issue-pill.is-high {
  border-color: rgba(205, 92, 92, 0.34);
  background: rgba(255, 244, 244, 0.98);
  color: #a24a4a;
}

.materials-review-issue-pill.is-medium {
  border-color: rgba(220, 162, 71, 0.34);
  background: rgba(255, 249, 239, 0.98);
  color: #9d6913;
}

.materials-review-issue-pill.is-low {
  border-color: rgba(110, 129, 118, 0.28);
  background: rgba(247, 249, 248, 0.98);
  color: #5a6b60;
}

.materials-review-candidates {
  display: grid;
  gap: 10px;
}

.materials-review-candidate-card {
  padding: 12px;
  border: 1px solid rgba(209, 229, 223, 0.86);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  gap: 8px;
}

.materials-review-candidate-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.materials-review-candidate-title {
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
  word-break: break-word;
}

.materials-review-candidate-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.materials-review-candidate-evidence {
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.materials-review-toggle,
.materials-review-apply {
  justify-self: start;
}

.materials-fields textarea,
.materials-fields input {
  line-height: 1.6;
}

.materials-fields textarea.is-auto-translated,
.materials-fields input.is-auto-translated {
  color: #ff0000;
  border-color: rgba(255, 0, 0, 0.42);
  background: rgba(255, 244, 244, 0.96);
}

.materials-translation-meta {
  color: #ff0000;
  font-weight: 700;
}

.materials-fields textarea {
  min-height: 78px;
}

.materials-fields textarea#draftApplicantAddressInput,
.materials-fields textarea#draftApplicantAddressEnInput,
.materials-fields textarea#draftGoodsTextInput {
  min-height: 108px;
}

.materials-fields textarea#draftGoodsTextInput {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow-x: hidden;
}

.materials-fields textarea#draftCountriesInput {
  min-height: 58px;
}

.materials-applicant-fields textarea {
  min-height: 42px;
}

.materials-applicant-fields textarea#draftApplicantAddressInput,
.materials-applicant-fields textarea#draftApplicantAddressEnInput {
  min-height: 54px;
}

#countryClassScopesInput {
  min-height: 92px;
  line-height: 1.7;
}

.materials-scope-editor-wrap {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(209, 229, 223, 0.86);
  border-radius: 12px;
  background: rgba(242, 248, 246, 0.92);
}

.materials-scope-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.materials-scope-editor-head h5 {
  margin: 0;
  color: var(--accent);
  font-size: 15px;
}

.materials-scope-editor {
  display: grid;
  gap: 10px;
}

.materials-filing-preview {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(209, 229, 223, 0.86);
  border-radius: 12px;
  background: rgba(244, 249, 247, 0.92);
}

.materials-filing-preview-head h5 {
  margin: 0;
  color: var(--accent);
  font-size: 15px;
}

.materials-filing-preview-list {
  display: grid;
  gap: 10px;
}

.materials-filing-group-card {
  padding: 12px;
  border: 1px solid rgba(209, 229, 223, 0.86);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  display: grid;
  gap: 8px;
}

.materials-filing-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.materials-filing-group-title {
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
}

.materials-filing-group-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.materials-filing-group-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(63, 129, 187, 0.28);
  background: rgba(244, 249, 255, 0.98);
  color: #356fa4;
  font-size: 12px;
  line-height: 1.4;
}

.materials-filing-group-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.materials-filing-group-goods {
  display: grid;
  gap: 6px;
}

.materials-filing-group-goods-text {
  color: var(--text);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.materials-filing-group-goods-count {
  color: var(--muted);
  font-size: 12px;
}

.materials-filing-group-issues {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scope-editor-empty {
  padding: 10px 12px;
  border: 1px dashed rgba(47, 107, 60, 0.24);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
}

.scope-editor-row {
  display: grid;
  grid-template-columns: minmax(104px, 148px) minmax(168px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(209, 229, 223, 0.86);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.scope-editor-row input {
  width: 100%;
}

.scope-editor-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scope-editor-button {
  padding: 7px 12px;
  border: 1px solid rgba(47, 107, 60, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent);
  box-shadow: none;
}

.scope-editor-button.scope-editor-delete {
  border-color: rgba(255, 0, 0, 0.16);
  color: var(--danger);
}

.materials-dropzone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 132px;
  padding: 18px 16px;
  border: 1.5px dashed rgba(47, 107, 60, 0.42);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(238, 247, 234, 0.84));
  text-align: center;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.materials-dropzone.is-dragover {
  border-color: rgba(47, 107, 60, 0.8);
  background: linear-gradient(180deg, rgba(237, 248, 232, 0.98), rgba(220, 236, 215, 0.95));
  box-shadow: 0 0 0 4px rgba(47, 107, 60, 0.1);
}

.materials-dropzone-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.materials-dropzone-hint {
  color: var(--muted);
  line-height: 1.7;
}

.materials-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.materials-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.materials-file-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid rgba(191, 208, 187, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  line-height: 1.5;
  word-break: break-all;
  cursor: pointer;
}

.materials-file-chip.is-active {
  border-color: rgba(35, 123, 100, 0.95);
  background: rgba(228, 240, 236, 0.96);
  color: #237b64;
  font-weight: 700;
}

.materials-file-preview {
  margin-top: 12px;
}

.materials-file-preview-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(191, 208, 187, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.materials-file-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.materials-file-preview-title {
  font-weight: 700;
  color: #237b64;
  line-height: 1.5;
  word-break: break-word;
}

.materials-file-preview-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.materials-file-preview-body {
  min-height: 120px;
}

.materials-file-preview-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  max-height: 420px;
  overflow: auto;
  border-radius: 12px;
  background: rgba(242, 248, 246, 0.92);
}

.materials-file-preview-media img {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
}

.materials-file-preview-frame {
  width: 100%;
  min-height: 420px;
  border: 1px solid rgba(209, 229, 223, 0.9);
  border-radius: 12px;
  background: #ffffff;
}

.materials-file-preview-text {
  margin: 0;
  min-height: 160px;
  max-height: 420px;
  overflow: auto;
  padding: 14px 16px;
  border: 1px solid rgba(209, 229, 223, 0.9);
  border-radius: 12px;
  background: rgba(247, 250, 249, 0.96);
  color: var(--text);
  font-family: "Times New Roman", "SimSun", serif;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.doc-preview-sheet {
  min-height: 220px;
  max-height: 560px;
  overflow: auto;
  padding: 28px 32px;
  border: 1px solid rgba(209, 229, 223, 0.9);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(247, 250, 249, 0.8);
}

.doc-preview-paragraph {
  margin: 0 0 14px;
  color: var(--text);
  font-family: "Times New Roman", "SimSun", serif;
  font-size: 14px;
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
}

.doc-preview-table-wrap {
  margin: 16px 0;
  overflow: auto;
}

.doc-preview-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.doc-preview-table td {
  min-width: 88px;
  padding: 8px 10px;
  border: 1px solid #d1e5df;
  vertical-align: top;
  color: var(--text);
  font-family: "Times New Roman", "SimSun", serif;
  font-size: 14px;
  line-height: 1.75;
  word-break: break-word;
}

.doc-preview-image-wrap {
  display: flex;
  justify-content: center;
  margin: 18px 0;
}

.doc-preview-image {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  border: 1px solid rgba(209, 229, 223, 0.9);
  background: #ffffff;
}

.trademark-card-body textarea {
  min-height: 44px;
  height: 44px;
  line-height: 1.5;
  overflow-y: auto;
}

.materials-notes {
  display: grid;
  gap: 8px;
}

.materials-note-item,
.mini-status,
.pending-chip {
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(220, 236, 215, 0.78);
  color: var(--accent);
  display: inline-flex;
  width: fit-content;
}

.trademark-list {
  display: grid;
  gap: 14px;
}

.trademark-card {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid rgba(191, 208, 187, 0.86);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.trademark-card-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 156px;
  border-radius: 12px;
  background: rgba(238, 247, 234, 0.9);
  overflow: hidden;
}

.trademark-card-media img {
  max-width: 100%;
  max-height: 190px;
  object-fit: contain;
}

.trademark-card-body {
  display: grid;
  gap: 8px;
}

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

.trademark-card-title {
  font-weight: 700;
  color: var(--accent);
}

.trademark-delete-button {
  position: relative;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 0, 0, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: transparent;
  font-size: 0;
  box-shadow: none;
  flex: 0 0 32px;
}

.trademark-delete-button::before {
  content: "×";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--danger);
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
}

.trademark-delete-button:hover:not(:disabled) {
  box-shadow: 0 8px 18px rgba(255, 0, 0, 0.08);
}

.trademark-card-meta {
  color: var(--muted);
}

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

.materials-empty {
  color: var(--muted);
}

.search-feedback.is-interface-error {
  color: var(--danger);
  font-weight: 700;
}

.search-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #d1e5df;
  background: #f7faf9;
}

.search-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.search-input {
  flex: 1 1 auto;
}

.suggestion-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(191, 208, 187, 0.95);
}

.suggestion-actions-note {
  color: var(--muted);
  line-height: 1.7;
}

.suggestion-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--drawer-width);
  z-index: 40;
  pointer-events: none;
}

.suggestion-drawer-backdrop {
  display: none;
}

.suggestion-drawer-backdrop:hover {
  transform: none;
  box-shadow: none;
}

.suggestion-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  padding: 18px;
  border-left: 1px solid #d1e5df;
  background: #f7faf9;
  box-shadow: -8px 0 24px rgba(35, 123, 100, 0.08);
  pointer-events: auto;
}

.suggestion-drawer-panel.is-idle {
  background: #f7faf9;
}

.suggestion-drawer-shell {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 14px;
  height: 100%;
}

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

.suggestion-drawer-heading {
  display: grid;
  gap: 6px;
}

.drawer-eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #237b64;
}

.suggestion-drawer-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
}

.drawer-search-input {
  min-width: 0;
}

.suggestion-drawer-controls {
  display: flex;
  justify-content: flex-end;
}

#suggestionDrawerSearch {
  border-color: #f5deb3;
  background: #f5deb3;
  color: #b8860b;
  box-shadow: none;
}

#suggestionDrawerSearch:hover:not(:disabled) {
  background: #edd29c;
  box-shadow: none;
}

#suggestionDrawerReload {
  border-color: #d1e5df;
  background: #ffffff;
  color: #237b64;
  box-shadow: none;
}

#suggestionDrawerReload:hover:not(:disabled) {
  background: #e4f0ec;
  box-shadow: none;
}

.suggestion-drawer-list {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  padding-right: 4px;
}

.output-block {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

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

.output-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow-x: auto;
}

.output-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.output-pairs {
  display: grid;
  grid-template-columns: 43% 43% 14%;
  min-width: 760px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.output-cell {
  padding: 10px 12px;
  line-height: 1.2;
  white-space: pre-wrap;
  word-break: break-word;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.output-cell:nth-child(3n + 1),
.output-cell:nth-child(3n + 2) {
  border-right: 1px solid rgba(191, 208, 187, 0.85);
}

.output-cell:nth-last-child(-n + 3) {
  border-bottom: none;
}

.output-cell.is-header {
  font-weight: 700;
  color: var(--accent);
  background: rgba(220, 236, 215, 0.75);
}

.output-cell.is-color {
  display: flex;
  align-items: center;
  justify-content: stretch;
  width: auto;
  min-width: 0;
}

.output-cell.is-duplicate {
  background: var(--duplicate-soft);
}

.output-editor {
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(191, 208, 187, 0.9);
  background: rgba(255, 255, 255, 0.96);
  line-height: 1.2;
  resize: vertical;
}

.output-color-toggle-group {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.output-color-button {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  padding: 6px 0;
  border: 1px solid #d1e5df;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  line-height: 1;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.output-color-button:hover {
  border-color: #9cc7b8;
  background: #f7faf9;
}

.output-color-button.is-active {
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(35, 123, 100, 0.08);
}

.output-color-button.is-black.is-active {
  border-color: rgba(31, 41, 55, 0.24);
  color: #1f2937;
  background: rgba(31, 41, 55, 0.08);
}

.output-color-button.is-red.is-active {
  border-color: rgba(255, 0, 0, 0.26);
  color: #ff0000;
  background: rgba(255, 0, 0, 0.1);
}

.output-color-button.is-orange.is-active {
  border-color: rgba(230, 184, 73, 0.38);
  color: #b86d00;
  background: rgba(230, 184, 73, 0.14);
}

.word-preview-section {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
}

.word-preview-doc {
  display: grid;
  gap: 14px;
}

.word-preview-doc-cn {
  gap: 12px;
}

.word-preview-doc-en {
  gap: 12px;
  color: #000;
}

.word-preview-title,
.word-preview-country {
  color: var(--text);
}

.word-preview-title {
  font-size: 18px;
}

.word-preview-sheet {
  display: grid;
  gap: 10px;
}

.word-preview-materials {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(191, 208, 187, 0.88);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
}

.word-preview-cn-header {
  text-align: center;
  color: #000;
}

.word-preview-en-header {
  text-align: center;
  color: #000;
}

.word-preview-cn-title-main {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.word-preview-en-title-main {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  font-family: "Times New Roman", serif;
}

.word-preview-cn-title-sub {
  margin-top: 4px;
  font-size: 24px;
  font-weight: 700;
  font-family: "Times New Roman", serif;
}

.word-preview-cn-section {
  display: grid;
  gap: 6px;
}

.word-preview-en-section {
  display: grid;
  gap: 8px;
}

.word-preview-cn-heading {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.word-preview-en-heading {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  font-family: "Times New Roman", serif;
}

.word-preview-cn-heading-en {
  font-size: 18px;
  font-weight: 700;
  font-family: "Times New Roman", serif;
}

.word-preview-cn-mini-title,
.word-preview-cn-mini-title-en,
.word-preview-cn-country,
.word-preview-cn-footer p {
  color: #000;
}

.word-preview-cn-mini-title {
  font-size: 15px;
}

.word-preview-en-mini-title,
.word-preview-en-body,
.word-preview-en-footer p {
  font-size: 15px;
  font-family: "Times New Roman", serif;
  color: #000;
}

.word-preview-en-body {
  min-height: 18px;
  line-height: 1.7;
}

.word-preview-cn-mini-title-en {
  font-size: 15px;
  font-family: "Times New Roman", serif;
}

.word-preview-cn-country {
  font-size: 14px;
}

.word-preview-table-meta td:first-child {
  width: 180px;
  text-align: center;
}

.word-preview-doc-en .word-preview-table-meta td:last-child {
  text-align: center;
}

.word-preview-table-mark td {
  min-height: 80px;
}

.word-preview-mark-head {
  margin-bottom: 10px;
}

.word-preview-mark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 160px));
  gap: 10px;
  margin-top: 6px;
  justify-items: center;
}

.word-preview-mark-item-label {
  width: 100%;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}

.word-preview-mark-grid img {
  max-width: 160px;
  max-height: 120px;
  object-fit: contain;
  border: 1px solid rgba(191, 208, 187, 0.8);
  background: #fff;
}

.word-preview-mark-desc-label {
  color: #ff0000;
}

.word-preview-mark-desc-line {
  line-height: 1.8;
}

.word-preview-mark-desc-item-label {
  font-weight: 700;
}

.word-preview-mark-desc-body,
.word-preview-mark-desc-text,
.word-preview-auto-translated {
  color: #ff0000;
}

.word-preview-mark-text-only {
  min-height: 56px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px solid rgba(191, 208, 187, 0.8);
  background: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.word-preview-cn-footer {
  display: grid;
  gap: 6px;
}

.word-preview-en-footer {
  display: grid;
  gap: 12px;
}

.word-preview-cn-footer p {
  margin: 0;
  line-height: 1.7;
}

.word-preview-en-footer p {
  margin: 0;
  line-height: 1.7;
}

.word-preview-cn-footer .is-right {
  text-align: right;
}

.word-preview-en-footer .is-right {
  text-align: right;
}

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

.word-preview-material-grid .full {
  grid-column: 1 / -1;
}

.word-preview-material-marks {
  display: grid;
  gap: 10px;
}

.word-preview-mark {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.word-preview-mark img {
  max-width: 160px;
  max-height: 120px;
  object-fit: contain;
  border: 1px solid rgba(191, 208, 187, 0.8);
  background: #fff;
}

.word-preview-mark-text {
  line-height: 1.7;
}

.word-preview-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: rgba(255, 255, 255, 0.96);
}

.word-preview-table th,
.word-preview-table td {
  padding: 10px 12px;
  border: 1px solid rgba(191, 208, 187, 0.88);
  vertical-align: top;
  text-align: left;
}

.word-preview-table th {
  background: rgba(220, 236, 215, 0.72);
  color: var(--accent);
}

.word-preview-table th:first-child,
.word-preview-class {
  width: 88px;
}

.word-preview-line {
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.word-preview-line.is-black {
  color: #1d2a20;
}

.word-preview-line.is-red {
  color: #ff0000;
}

.word-preview-line.is-orange {
  color: #b86d00;
}

:root {
  --bg: #f7faf9;
  --bg-soft: #f2f8f6;
  --card: #ffffff;
  --card-strong: #e4f0ec;
  --text: #1f2937;
  --muted: #4b5563;
  --line: #e2e8f0;
  --line-strong: #d1e5df;
  --accent: #237b64;
  --accent-strong: #1e6b56;
  --accent-muted: #2c8a72;
  --accent-soft: #d1e5df;
  --warning: #e6b849;
  --warning-soft: #fff9e6;
  --danger: #d9534f;
  --danger-soft: #fee2e2;
  --duplicate: #e6b849;
  --duplicate-soft: #fff4de;
  --shadow: 0 2px 8px rgba(35, 123, 100, 0.08);
  --shadow-soft: 0 2px 8px rgba(35, 123, 100, 0.06);
}

html {
  scrollbar-gutter: stable;
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.96), transparent 24%),
    radial-gradient(circle at 88% 8%, rgba(228, 240, 236, 0.78), transparent 20%),
    linear-gradient(180deg, #f7faf9 0%, #f2f8f6 100%);
  font-family: "Inter", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei UI", "PingFang SC", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.14)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 18%);
  opacity: 0.42;
}

.page {
  width: min(1420px, calc(100vw - var(--drawer-width) - (var(--page-gutter) * 2)));
  padding: 32px 0 48px;
}

.workspace-page,
.workspace-view,
.workspace-shell {
  gap: 20px;
}

.workspace-header {
  position: relative;
  overflow: hidden;
  align-items: center;
  padding: 24px 28px;
  border: 1px solid #e4f0ec;
  border-radius: 8px;
  background: linear-gradient(90deg, #1e6b56 0%, #237b64 100%);
  box-shadow: var(--shadow);
}

.workspace-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #e4f0ec;
}

.workspace-header-copy {
  display: grid;
  gap: 6px;
}

.workspace-header .eyebrow,
.workspace-header h1,
.workspace-header .lede,
.workspace-header .record-title,
.workspace-header .record-status {
  color: #ffffff;
}

.workspace-header .lede,
.workspace-header .record-status,
.workbench-sidebar .workbench-nav-item,
.workbench-sidebar .workbench-nav-subitem {
  color: rgba(255, 255, 255, 0.9);
}

.workspace-header .eyebrow {
  margin-bottom: 0;
  color: #d1e5df;
  font-size: 12px;
  letter-spacing: 0.12em;
}

.workspace-header h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.workspace-header .lede {
  margin: 0;
  color: #d1e5df;
  font-size: 14px;
  line-height: 1.6;
}

.workspace-header-actions {
  align-items: center;
  gap: 8px;
}

.record-meta {
  min-width: 220px;
  padding: 10px 14px;
  border: 1px solid rgba(209, 229, 223, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.record-title {
  font-size: 14px;
}

.record-status {
  font-size: 13px;
  color: #d1e5df;
}

#topSaveRecordButton {
  border-color: #e6b849;
  background: #e6b849;
  color: #1f2937;
  box-shadow: 0 2px 8px rgba(230, 184, 73, 0.18);
}

#topNewRecordButton {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

#topNewRecordButton:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
}

#topSaveRecordButton:hover:not(:disabled) {
  background: #d4a23a;
  box-shadow: 0 2px 8px rgba(212, 162, 58, 0.22);
}

#topSaveCompletedButton {
  background: #237b64;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(35, 123, 100, 0.18);
}

#topSaveCompletedButton:hover:not(:disabled) {
  background: #1e6b56;
}

.draft-restore-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid #f5deb3;
  border-radius: 8px;
  background: #fff9e6;
  box-shadow: var(--shadow-soft);
}

.draft-restore-text {
  color: #4b5563;
  font-size: 13px;
  line-height: 1.6;
}

.draft-restore-actions {
  gap: 8px;
}

#restoreDraftButton {
  border-color: #f5deb3;
  background: #f5deb3;
  color: #b8860b;
  box-shadow: none;
}

#restoreDraftButton:hover:not(:disabled) {
  background: #efd29d;
  box-shadow: none;
}

#discardDraftButton {
  border-color: #d1d5db;
  background: #ffffff;
  color: #4b5563;
  box-shadow: none;
}

#discardDraftButton:hover:not(:disabled) {
  background: #f3f4f6;
}

.workspace-tabs {
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 4px;
  border: 1px solid rgba(35, 123, 100, 0.12);
  border-radius: 8px;
  background: #237b64;
  box-shadow: var(--shadow);
}

.workspace-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 10px 16px;
  border-radius: 8px;
  border-color: transparent;
  background: transparent;
  color: #d1e5df;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: none;
}

.workspace-tab:hover:not(.is-active) {
  background: #1e6b56;
  color: #ffffff;
}

.workspace-tab.is-active {
  border-color: #d1e5df;
  background: #e4f0ec;
  color: #237b64;
  box-shadow: none;
}

.card,
.hero-copy,
.hero-panel,
.materials-panel,
.review-block,
.country-block,
.output-block,
.sidebar-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.card {
  margin-bottom: 24px;
  padding: 16px;
}

.sidebar-card {
  box-shadow: var(--shadow-soft);
}

.workbench-sidebar .sidebar-card {
  padding-top: 18px;
  padding-bottom: 18px;
  border-color: rgba(35, 123, 100, 0.14);
  border-radius: 8px;
  background: #237b64;
  box-shadow: var(--shadow);
}

.section-head {
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.section-head h2,
.section-head h3,
.materials-panel-head h4 {
  color: #237b64;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.workbench-sidebar .sidebar-card h3,
.workbench-sidebar .workbench-nav-empty {
  color: #ffffff;
}

.section-note,
.config-info,
.lede {
  color: var(--muted);
}

.workbench-sidebar .workbench-nav {
  gap: 12px;
}

.workbench-sidebar .workbench-nav-group {
  gap: 10px;
}

.workbench-sidebar .workbench-nav-children {
  gap: 8px;
}

.workbench-sidebar .workbench-nav-item {
  padding: 12px 16px;
  border: 1px solid rgba(35, 123, 100, 0.14);
  border-radius: 8px;
  background: #2c8a72;
  color: #f2f8f6;
  text-align: left;
  box-shadow: none;
}

.workbench-sidebar .workbench-nav-item:hover:not(:disabled) {
  background: #1e6b56;
  color: #ffffff;
}

.workbench-sidebar .workbench-nav-item.is-active {
  border-color: #d1e5df;
  background: #e4f0ec;
  color: #237b64;
  font-weight: 700;
  box-shadow: none;
}

.workbench-sidebar .workbench-nav-subitem {
  padding: 10px 14px;
  border: 1px solid rgba(209, 229, 223, 0.72);
  border-radius: 8px;
  background: transparent;
  color: #d1e5df;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: none;
}

.workbench-sidebar .workbench-nav-subitem:hover:not(:disabled) {
  background: #2c8a72;
  border-color: rgba(209, 229, 223, 0.9);
  color: #ffffff;
}

.workbench-sidebar .workbench-nav-subitem.is-active {
  background: #e4f0ec;
  border-color: #d1e5df;
  color: #237b64;
  font-weight: 700;
}

.workbench-sidebar .workbench-nav-subitem.is-class,
.workbench-sidebar .workbench-nav-subitem.is-country {
  background: transparent;
  color: #d1e5df;
}

input,
select,
textarea {
  padding: 12px 14px;
  border: 1px solid #d1e5df;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(35, 123, 100, 0.55);
  box-shadow: 0 0 0 3px rgba(35, 123, 100, 0.08);
}

button {
  padding: 11px 18px;
  border-radius: 4px;
  border-color: rgba(35, 123, 100, 0.12);
  background: #237b64;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-soft);
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.secondary-button {
  border-color: #e6b849;
  background: #f5deb3;
  color: #b8860b;
  box-shadow: none;
}

.secondary-button:hover:not(:disabled) {
  background: #edd29c;
  box-shadow: var(--shadow-soft);
}

.ghost-button,
.drawer-close-button,
.trademark-delete-button {
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #ffffff;
  color: #1f2937;
  box-shadow: none;
}

.ghost-button:hover:not(:disabled),
.drawer-close-button:hover:not(:disabled),
.trademark-delete-button:hover:not(:disabled) {
  background: #f3f4f6;
  box-shadow: none;
}

.summary-card {
  border: 1px solid #d1e5df;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.summary-card.is-active {
  border-color: #237b64;
  background: #e4f0ec;
  box-shadow: var(--shadow-soft);
}

.summary-card:hover {
  background: #f2f8f6;
}

.summary-card strong {
  color: #237b64;
  font-size: 26px;
  font-weight: 700;
}

.country-header,
.result-class-divider {
  border: 1px solid #d1e5df;
  border-radius: 8px;
  background: #f2f8f6;
  color: #237b64;
}

.item-card,
.compact-review-card {
  padding: 16px;
}

.item-layout {
  grid-template-columns: minmax(0, 1fr) minmax(200px, 228px);
  gap: 16px;
}

.item-side {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.item-side-block,
.review-country-cell,
.output-card {
  border: 1px solid #e4f0ec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.review-country-cell {
  padding: 12px;
}

.review-country-cell.is-accepted,
.review-country-cell.is-class_unknown {
  background: #ffffff;
}

.review-country-cell.is-replaceable {
  background: #fff9e6;
}

.review-country-cell.is-replaced,
.review-country-cell.is-rejected,
.review-country-cell.is-unsupported_country,
.review-country-cell.is-invalid_language,
.review-country-cell.is-ambiguous_class {
  background: #fee2e2;
}

.badge,
.suggestion-tag,
.review-inline-tag {
  letter-spacing: 0.02em;
}

.suggestion-panel,
.compact-suggestion-bar,
.search-box {
  border: 1px solid #d1e5df;
  border-radius: 8px;
  background: #f7faf9;
  box-shadow: none;
}

.suggestion-item {
  grid-template-columns: 20px minmax(0, 1fr) minmax(210px, 248px);
  padding: 14px 16px;
  border: 1px solid #e4f0ec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.suggestion-meta {
  padding: 10px 12px;
  border: 1px solid #e4f0ec;
  border-radius: 8px;
  background: #f7faf9;
}

.materials-panel {
  padding: 18px;
}

.materials-dropzone {
  border-radius: 8px;
  background: #f7faf9;
  box-shadow: none;
}

.materials-record-tab {
  border-radius: 8px;
}

.materials-record-tab.is-active {
  box-shadow: var(--shadow-soft);
}

.trademark-card {
  border: 1px solid #e4f0ec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.trademark-card-media {
  border: 1px solid #e4f0ec;
  border-radius: 8px;
  background: #f7faf9;
}

.suggestion-drawer-panel,
.word-preview-section {
  border-color: #d1e5df;
  border-radius: 8px 0 0 8px;
  box-shadow: -8px 0 24px rgba(35, 123, 100, 0.08);
}

.word-preview-section {
  border-radius: 8px;
  background: #ffffff;
}

.output-block {
  padding: 18px;
}

.output-pairs {
  border: 1px solid #d1e5df;
  border-radius: 8px;
  box-shadow: none;
}

.output-cell {
  background: #ffffff;
}

.output-cell.is-header {
  color: #237b64;
  background: #f2f8f6;
}

.output-editor {
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(223, 231, 223, 0.8);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  background: rgba(110, 129, 118, 0.48);
  border: 2px solid rgba(223, 231, 223, 0.82);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(78, 97, 86, 0.62);
}

@media (max-width: 1180px) {
  .workspace-shell,
  .history-shell,
  .hero,
  .form-grid,
  .output-grid {
    grid-template-columns: 1fr;
  }

  .page {
    width: min(100% - 24px, 1400px);
    margin: 0 auto;
  }

  .sidebar-card {
    position: static;
  }

  body.has-drawer-open {
    overflow: hidden;
  }

  .suggestion-drawer {
    inset: 0;
    width: auto;
    pointer-events: auto;
  }

  .suggestion-drawer-backdrop {
    position: absolute;
    inset: 0;
    display: block;
    border: none;
    border-radius: 0;
    background: rgba(32, 47, 35, 0.2);
    box-shadow: none;
  }

  .suggestion-drawer-panel {
    width: min(760px, calc(100vw - 20px));
    box-shadow: -18px 0 48px rgba(42, 61, 46, 0.16);
  }
}

@media (max-width: 980px) {
  .workspace-header,
  .draft-restore-bar,
  .section-head,
  .country-header,
  .item-row,
  .suggestion-head,
  .suggestion-actions,
  .suggestion-drawer-head,
  .search-row,
  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .suggestion-drawer-panel {
    width: 100%;
    padding: 14px;
  }

  .suggestion-drawer-toolbar {
    grid-template-columns: 1fr;
  }

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

  .history-detail-grid,
  .materials-draft-grid,
  .trademark-card {
    grid-template-columns: 1fr;
  }

  .materials-review-summary {
    grid-template-columns: 1fr 1fr;
  }

  .review-compare-grid.columns-2,
  .review-compare-grid.columns-3,
  .review-compare-grid.columns-4 {
    grid-template-columns: 1fr;
  }

  .suggestion-item {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .suggestion-meta {
    grid-column: 2;
    justify-items: start;
  }

  .item-side {
    padding-left: 0;
    padding-top: 12px;
    border-left: none;
    border-top: 1px solid rgba(191, 208, 187, 0.88);
  }

  .output-pairs {
    grid-template-columns: 1fr;
  }

  .output-cell {
    border-right: none !important;
  }

  .output-cell.is-header:not(:first-child) {
    border-top: 1px solid rgba(191, 208, 187, 0.85);
  }
}
