:root {
  --purple: #f4a000;
  --purple-soft: #fff5dc;
  --ink: #181713;
  --muted: #817c73;
  --line: #e6e1d8;
  --bg: #f6f4ef;
  --green: #2f9d63;
  --red: #dc554c;
  --white: #ffffff;
  --amber: #f4a000;
  --amber-deep: #d98200;
}

html, body { color: var(--ink); background: #f6f4ef; }
.topbar {
  color: #1b1a17;
  background: rgba(255, 255, 255, .96);
  border-bottom-color: #e8e4dc;
  box-shadow: 0 3px 16px rgba(42, 36, 25, .035);
}
.brand { color: #171612; letter-spacing: -.02em; }
.brand-mark {
  color: #17130b;
  background: linear-gradient(145deg, #ffb214, #ee9200);
  border-radius: 7px;
  box-shadow: 0 5px 13px rgba(226, 137, 0, .18);
}
.crumb { color: #87827a; }
.crumb b { color: #d2cdc4; }
.crumb strong { color: #24221e; }
.model-state, .history-btn { color: #5d5952; background: #faf9f6; border-color: #e7e2da; }
.model-state i { background: var(--amber); }
.avatar { color: #3c2a0a; background: #ffd47e; border-color: #ffd47e; }

.product-sidebar {
  color: #24221e;
  background: #f6f4ef;
  border-right-color: #e7e2d9;
  scrollbar-color: #cbc5bb transparent;
}
.side-title { background: rgba(255, 255, 255, .97); border-bottom-color: #e8e4dc; }
.side-title h1, .section-head h2 { color: #1d1b18; }
.side-title button, .section-head button { color: #dc8500; }
.side-section {
  margin: 6px 8px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e7e2d9;
  border-radius: 9px;
  box-shadow: 0 3px 12px rgba(43, 37, 25, .035);
}
.side-section label > span, .spec-grid label span, .stacked-field > span, .plain-note { color: #6f6a62; }
.product-sidebar input, .product-sidebar textarea, .product-sidebar select {
  color: #292722;
  background: #fff;
  border-color: #e1dcd3;
  font-size: 12px;
  line-height: 1.5;
}
.product-sidebar input::placeholder, .product-sidebar textarea::placeholder { color: #aaa59d; }
.product-sidebar input:focus, .product-sidebar textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(244, 160, 0, .11);
}
.document-section { background: #fff; }
.document-callout h2 { color: #211f1b; }
.document-callout p { color: #7c776f; }
.document-icon {
  color: #fff;
  background: linear-gradient(145deg, #ffb316, #ec9000);
  border-color: #f0a018;
  box-shadow: 0 5px 12px rgba(224, 137, 0, .16);
}
.document-upload { color: #3d3933; background: #fff; border-color: #ddd7cd; }
.document-upload span { color: #555048 !important; }
.document-upload b { color: #df8700; }
.document-generate-btn, .primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #ffad0a, #ee9300);
  box-shadow: 0 6px 14px rgba(221, 133, 0, .16);
}
.document-generate-btn:hover, .primary-btn:hover { background: linear-gradient(135deg, #ffb622, #f19a08); }
.document-generate-btn:disabled { color: #aaa69e; background: #f5f4f1; box-shadow: none; }
.upload-tile, .image-tile { background: #fff; border-color: #d8d3ca; }
.upload-tile span { color: #e28a00 !important; }
.upload-tile small { color: #777269; font-size: 12px; }
.add-spec-btn { color: #d98200; background: #fffaf0; border-color: #dfd7ca; }
.tone-row span { color: #6f6a62; background: #fff; border-color: #e1dcd3; }
.tone-row input:checked + span { color: #9a5b00; background: #fff4d8; border-color: #eda426; }

.content-area { background: #f6f4ef; }
.editor-card {
  background: #fff;
  border-color: #e4dfd6;
  box-shadow: 0 10px 30px rgba(42, 36, 25, .055);
}
.editor-toolbar { background: #fff; border-bottom-color: #e9e5dd; }
.language-control > strong { color: #24221e; }
.language-control label { color: #625d55; }
.language-control input { accent-color: var(--amber-deep); }
#showChinese { accent-color: #f6a000; }
#showChinese:focus-visible { outline: 2px solid rgba(246, 160, 0, .28); outline-offset: 2px; }
.document-actions button, .inline-actions button { color: #4e4942; background: #fff; border-color: #dfdad1; }
.document-actions button:last-child { color: #3d2906; background: #ffc14e; border-color: #ffc14e; }
.inline-actions button:first-child { color: #d98200; }
.listing-result .tab-panel { border-bottom-color: #ece8e0; }
.field-heading h2 { color: #1d1b18; letter-spacing: -.01em; }
.field-heading p { color: #817c73; }
.field-heading em { color: #d47e00; }
.main-editor, .translation {
  color: #2a2823;
  background: #fff;
  border-color: #dfdad1;
}
.translation { color: #5d5851; background: #fdfcf9; border-color: #e8e4dc; }
.main-editor:focus, .translation:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(244, 160, 0, .1); }
.bullet-row { border-color: #e2ddd4; background: #fff; }
.bullet-row:last-of-type { border-bottom-color: #e2ddd4; }
.bullet-index { color: #d47e00; background: #fff2d1; border-right-color: #e8e2d8; font-weight: 700; }
.bullet-row textarea { color: #302d28; background: transparent; }
.bullet-row textarea.zh { color: #68635b; border-top-color: #e5e0d7; }
.coming-box { color: #7a756c; background: #fbfaf7; border-color: #ded8ce; }

.bottom-bar {
  color: #5e5951;
  background: rgba(255, 255, 255, .97);
  border-top-color: #e5e0d7;
  box-shadow: 0 -5px 18px rgba(40, 34, 23, .05);
}
.footer-select, .save-state { color: #817c73; }
.footer-select strong { color: #302d28; background: #fff; border-color: #e1dcd3; }
.marketplace-select select { color: #302d28; background-color: #fff; border-color: #dfdad1; }
.marketplace-select select:hover, .marketplace-select select:focus { border-color: var(--amber); }
.toast { color: #fff; background: #292620; font-weight: 600; }
.modal-card { background: #fff; box-shadow: 0 28px 80px rgba(37, 31, 21, .2); }

button, select, input, textarea { transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, color .16s ease; }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { button, select, input, textarea { transition: none; } }
