:root {
  --topone-yellow: #fff200;
  --topone-black: #171715;
  --navy: #171715;
  --navy-deep: #171715;
  --ink: #292925;
  --text: #55574d;
  --muted: #70716a;
  --line: #e1e2da;
  --paper: #f6f6f1;
  --bg: #f6f6f1;
  --accent: #fff200;
  --accent-soft: #faf8d8;
  --gold: #7b6b22;
  --blue: #f2f1dc;
  --danger: #a13730;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
body { color: var(--ink); background: var(--paper); }
button, input, select, textarea { font-family: inherit; }
button, a, input, select, textarea { outline-offset: 4px; }
:focus-visible { outline: 2px solid #8c8015 !important; }
::selection { background: var(--topone-yellow); color: var(--topone-black); }
.brand { gap: 12px; color: var(--topone-black); letter-spacing: 0; }
.brand img.topone-symbol { width: 44px; height: 44px; display: block; flex: none; border-radius: 10px; }
.brand > .topone-wordmark { font-size: 21px; font-weight: 700; line-height: 1.2; letter-spacing: .5px; }
.brand small, .brand .brand-sub { font-size: 11px; font-weight: 400; line-height: 1.5; letter-spacing: 1px; margin-top: 4px; }
.brand .topone-cn { font-size: 13px; font-weight: 500; letter-spacing: 0; margin-left: 6px; }
.topbar { border-bottom-color: var(--line); }
.topbar nav a[aria-current] { border-bottom-color: #c7bc00; }
.button.primary, .button.button-primary, #start-remix {
  background: var(--topone-yellow); border-color: #ded100; color: var(--topone-black); font-weight: 600;
}
.button.primary:hover:not(:disabled), .button.button-primary:hover:not(:disabled), #start-remix:hover:not(:disabled) {
  background: #f1e500; border-color: #cfc400;
}
.button:hover:not(:disabled), .button.button-outline:hover:not(:disabled) { background-color: #f4f4e8; }
.button:disabled { opacity: .5; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--topone-black); }
input, select, textarea { border-color: #d5d6ce; }
.panel, .project-bar, .frame-card, .result-card, .job-card, .settings-drawer { border-color: var(--line); }
.eyebrow, .step-no, .step, .small-overline { color: var(--gold); }
.step { border-color: #dfdbb8; background: #fbfaed; }
.heading h1 > span, .heading-dot { color: #b4a900; }
.heading h1 { font-size: 30px; line-height: 1.45; font-weight: 600; }
.heading p { color: #686961; }
.hint, .muted, .field-note, .source-meta { color: var(--muted); }
.tag, .version { background: #f4f3e5; color: #686650; border-color: #e2e0cf; }
.reference-preview, .product-images, .frame-target-empty, .frame-compare img { background: #f1f1e9; border-color: #dedfd5; }
.reference-preview video, .source-screen, .task-result video, .result-card video { background: #1f201c; }
.product-images { border-style: dashed; }
.preview-mark, .product-empty, #source-empty > span:last-of-type { color: #77786f; }
.setup-card, .plan-limits, .task-notes p, .generation-controls, .plan-summary, .job-detail-grid div { background: #f4f4e9; }
.flow-strip, .plan-models li > span:first-child { color: #76766b; }
.flow-strip b { color: #969686; }
.run-panel { border-top: 3px solid var(--topone-yellow); }
.progress-track { background: #e7e7dc; }
.progress-track span { background: var(--topone-black); }
.stage-steps li.current::before { background: var(--topone-black); border-color: var(--topone-black); }
.task-result { background: #f3f3e9; }
.task-empty { color: #77786f; }
.frame-card.is-approved { border-color: #78917a; }
.text-link { color: #6c651a; }
footer, .app-footer { color: #75766e; font-size: 11px; }
.topone-account { display: inline-flex; align-items: center; gap: 10px; flex: none; font-size: 12px; color: var(--muted); }
.topone-account[hidden] { display: none !important; }
.topone-account-name { max-width: 112px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topone-account button { padding: 6px 10px; border: 1px solid #d8d9d0; background: white; color: #52534a; border-radius: 6px; font-size: 12px; cursor: pointer; }
.topone-account button:hover { background: #f3f3e7; }
html[data-deployment="cloud"] .workspace-exit { display: none !important; }
html[data-deployment="cloud"] [data-job-action="reveal"] { display: none !important; }
.topone-welcome { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 24px; padding: 16px 20px; border: 1px solid #e1dfb2; border-left: 4px solid var(--topone-yellow); border-radius: 8px; background: #fffef1; }
.topone-welcome strong { display: block; font-size: 13px; font-weight: 600; }
.topone-welcome p { margin: 4px 0 0; font-size: 12px; color: #71715f; line-height: 1.8; }
.topone-welcome a { flex: none; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }

/* The classic editor retains its controls and event IDs, with the same brand tokens. */
.sidebar { background: #1a1b17; border-right-color: #1a1b17; }
.sidebar .brand { color: #fffef2; }
.sidebar .brand img.topone-symbol { width: 38px; height: 38px; border-radius: 8px; }
.sidebar .brand > .topone-wordmark { font-size: 19px; }
.sidebar .brand .brand-sub { font-size: 10px; color: #b5b6a8; }
.sidebar .brand .topone-cn { font-size: 12px; color: #fffef2; }
.workspace-tag { color: #d0d1c2; border-color: #3c3d34; font-size: 11px; }
.workspace-tag .version { border: 0; background: #37382d; color: #d2d3bf; font-size: 10px; }
.sidebar .nav-item { color: #c7c8b9; font-size: 12px; }
.sidebar .nav-item:hover { background: #2b2c25; color: #fffef2; }
.sidebar .nav-item.active { background: var(--topone-yellow); color: var(--topone-black); }
.sidebar .nav-item.active .nav-icon, .sidebar .nav-item.active .nav-tail { color: var(--topone-black); }
.sidebar .nav-count { background: #34352d; color: #dadbc9; }
.sidebar .sidebar-note p { color: #efefe1; }
.sidebar .sidebar-note .small-overline { color: #d5cc3d; }
.sidebar .sidebar-note > span:last-child { color: #aaac99; }
.sidebar .note-line { background: #4c4e3a; }
.sidebar .sidebar-bottom { border-color: #3a3c31; color: #d6d7c8; }
.sidebar .sidebar-bottom small { color: #9a9d87; }
.sidebar .local-icon { color: #d6d7c8; }
.app-shell .page-heading h1 { font-size: 30px; letter-spacing: 0; }
.app-shell .page-heading p { font-size: 13px; line-height: 1.8; }
.app-shell .eyebrow { color: var(--gold); font-size: 10px; }
.app-shell .panel { border-color: var(--line); }
.app-shell .field > label, .app-shell .field-heading > label, .app-shell .section-label h2 { font-size: 13px; }
.app-shell .field-note, .app-shell .source-meta, .app-shell .optional-label, .app-shell .section-hint { font-size: 11px; }
.app-shell input, .app-shell select, .app-shell textarea { font-size: 12px; }
.app-shell .prompt-editor { font-size: 13px; }
.app-shell .mode-card.active { border-color: #b9b220; background: #fffde9; }
.app-shell .mode-card.active .mode-check { border-color: #6a652c; background: var(--topone-black); }
.app-shell .mode-card .mode-name { color: #3d3e34; font-size: 12px; }
.app-shell .mode-card .mode-description { color: #737468; font-size: 10px; }
.app-shell .mode-glyph { color: #77764c; }
.app-shell .dropzone { background: #fafaf5; border-color: #d6d8c9; }
.app-shell .dropzone:hover { border-color: #a39f49; background: #fffef0; }
.app-shell .drop-empty strong, .app-shell .image-drop strong { font-size: 12px; }
.app-shell .drop-empty > span:not(.upload-symbol), .app-shell .image-drop > span:not(.image-symbol) { color: #7f8171; font-size: 11px; }
.app-shell .banner { border-color: #e3dfac; background: #fffef0; }
.app-shell .banner strong { font-size: 12px; }
.app-shell .banner p { font-size: 11px; color: #747460; }
.app-shell .generation-panel > .eyebrow { color: var(--gold); }
.app-shell .generation-panel, .app-shell .latest-panel, .app-shell .advanced-panel { border-color: var(--line); }
.app-shell .creative-note { background: #f4f3df; color: #74725b; }
.app-shell .button { font-size: 12px; }
.app-shell .breadcrumb { font-size: 12px; }
.app-shell .service-state { font-size: 11px; }
.app-shell .heading-mark { color: #a49d3d; }
.settings-drawer .field > label, .settings-drawer .checkbox-label, .settings-drawer .profiles-heading h3 { font-size: 13px; }
.settings-drawer input, .settings-drawer select, .settings-drawer textarea { font-size: 12px !important; }
.settings-drawer .field-note, .settings-drawer .grok-footnote, .settings-drawer .grok-heading p { font-size: 11px; }
.settings-drawer .grok-card { background: #f8f8f1; border-color: var(--line); }
.settings-drawer .grok-mark { background: var(--topone-black); }
.settings-drawer .profile-entry strong { font-size: 12px; }
.settings-drawer .profile-entry small { font-size: 11px; }
.toast, .toast.success { background: #303226; color: #fffef0; }
.toast.error { background: #913c33; }

@media (max-width: 1150px) {
  .topbar { gap: 20px; flex-wrap: wrap; }
  .topbar nav { gap: 18px; }
  .topone-account { margin-left: auto; }
  .topbar #connection { font-size: 11px; }
  .sidebar .brand { gap: 8px; }
  .sidebar .brand img.topone-symbol { width: 32px; height: 32px; }
  .sidebar .brand > .topone-wordmark { font-size: 17px; }
  .sidebar .brand .topone-cn { font-size: 10px; margin-left: 4px; }
  .sidebar .brand .brand-sub { font-size: 9px; }
}
@media (max-width: 720px) {
  .brand > .topone-wordmark { font-size: 19px; }
  .brand img.topone-symbol { width: 38px; height: 38px; }
  .brand .topone-cn { font-size: 12px; }
  .topbar { gap: 12px; padding: 16px 20px; }
  .topbar nav { order: 3; width: 100%; overflow: auto; white-space: nowrap; font-size: 12px; }
  .topbar #connection { margin-left: auto; }
  .heading h1, .app-shell .page-heading h1 { font-size: 25px; }
  .heading { align-items: flex-start; gap: 16px; }
  .heading .version { display: none; }
  .topone-welcome { padding: 12px 16px; align-items: flex-start; flex-direction: column; gap: 8px; }
  .topone-account { gap: 8px; }
  .topone-account-name { max-width: 80px; }
  .app-shell .topbar { min-height: 52px; height: auto; }
  .sidebar { flex-wrap: wrap; gap: 16px; }
  .sidebar .brand > .topone-wordmark { font-size: 18px; }
  .sidebar nav { width: 100%; overflow-x: auto; justify-content: flex-start; }
  .sidebar .nav-item { width: auto; min-width: 44px; height: 40px; padding: 8px 10px; gap: 6px; font-size: 11px; flex-shrink: 0; }
  .sidebar .nav-item .nav-icon { font-size: 17px; }
  .sidebar .nav-tail, .sidebar .nav-count { display: none; }
  .app-shell .topbar .topone-account { margin-left: auto; }
  .app-shell .topbar-right { gap: 8px; }
  .app-shell .field-note, .app-shell .source-meta { font-size: 11px; }
  footer { flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
