/* Workspace hierarchy: one header, one tool row, a canvas and contextual panels. */
/* 工作台色板（绿灰，与品牌酸橙协调）：预览模式与编辑模式共用同一组 --ws-* 变量，
   不再在规则里硬编码蓝灰 hex。editor-workspace-refinement.css 使用同一套取值。 */
body {
  --ws-bg: #121917;
  --ws-panel: #1b2421;
  --ws-raised: #242f2b;
  --ws-raised-hover: #2e3b35;
  --ws-field: #141c18;
  --ws-border: #36433d;
  --ws-border-strong: #4c5b52;
  --ws-text: #f0f4f1;
  --ws-muted: #a7b6ad;
  --ws-dot: #2b3931;
  --ws-accent: #c5f582;
  --ws-accent-hover: #d4ffa1;
  --ws-on-accent: #192319;
}
body[data-mode="preview"] {
  --border: var(--ws-border);
  --muted: var(--ws-muted);
  background: var(--ws-bg);
}
body[data-mode="preview"] .topbar,
body[data-mode="preview"] .rail,
body[data-mode="preview"] .details {
  background: var(--ws-panel);
}
body[data-mode="preview"] .workspace {
  background: var(--ws-bg);
}
body[data-mode="preview"] .viewer {
  background: radial-gradient(var(--ws-dot) 1px, transparent 1px) 0 0/20px 20px
    var(--ws-bg);
}
body[data-mode="preview"] .button.secondary,
body[data-mode="preview"] .mode-switch {
  background: var(--ws-raised);
  border-color: var(--ws-border);
}
body[data-mode="preview"] .button.secondary:hover:not(:disabled) {
  background: var(--ws-raised-hover);
  border-color: var(--ws-border-strong);
}
body[data-mode="preview"][data-preview-document="false"] .layout {
  grid-template-columns: minmax(0, 1fr);
}
body[data-mode="preview"][data-preview-document="false"]
  :is(.layout > .rail, .layout > .details, .workspace-heading, .toolbar) {
  display: none;
}
body[data-mode="preview"][data-preview-document="false"] .workspace {
  padding: 0;
}
body[data-mode="preview"][data-preview-document="false"] .viewer {
  border: 0;
  border-radius: 0;
  min-height: 400px;
}
body[data-mode="preview"][data-preview-document="false"] .empty h2 {
  font-size: 30px;
  letter-spacing: -0.6px;
}
body[data-mode="preview"][data-preview-document="false"] #empty-open {
  margin-top: 12px;
}
@media (max-width: 760px) {
  body[data-mode="preview"][data-preview-document="false"] .empty h2 {
    font-size: 23px;
  }
}
body[data-mode="editor"] {
  --border: var(--ws-border);
  --muted: var(--ws-muted);
  height: 100dvh;
  overflow: hidden;
  background: var(--ws-bg);
}
body[data-mode="editor"] .topbar {
  position: absolute;
  left: 0;
  top: var(--workspace-account-height, 38px);
  width: 218px;
  height: 66px;
  min-height: 0;
  padding: 0 20px;
  border: 0;
  background: var(--ws-panel);
  z-index: 3;
  box-sizing: border-box;
}
body[data-mode="editor"] .topbar .mode-switch {
  display: none;
}
body[data-mode="editor"] .brand {
  font-size: 17px;
  white-space: nowrap;
}
.workspace-refined {
  background: var(--ws-bg);
  color: var(--ws-text);
  font-size: 13px;
  min-height: 0;
  flex: none;
  height: calc(
    var(--editor-visible-height, 100dvh) - var(--workspace-account-height, 44px)
  );
}
.workspace-refined [hidden] {
  display: none !important;
}
.workspace-refined button {
  font: inherit;
  color: var(--ws-text);
  background: var(--ws-raised);
  border: 1px solid var(--ws-border);
  border-radius: 9px;
  min-height: 36px;
  padding: 8px 12px;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.workspace-refined button:not(.primary):hover:not(:disabled) {
  background: var(--ws-raised-hover);
  border-color: var(--ws-border-strong);
}
.workspace-refined button:disabled {
  opacity: 0.4;
  cursor: default;
}
.workspace-refined .button.primary,
.workspace-refined button.primary {
  background: var(--ws-accent);
  border-color: var(--ws-accent);
  color: var(--ws-on-accent);
  font-weight: 600;
}
.workspace-refined .button.primary:hover:not(:disabled),
.workspace-refined button.primary:hover:not(:disabled) {
  background: var(--ws-accent-hover);
  border-color: var(--ws-accent-hover);
  color: var(--ws-on-accent);
}
.workspace-refined :is(button, input, select, textarea, summary):focus-visible {
  outline: 2px solid #c5f582;
  outline-offset: 3px;
}
.workspace-refined
  :is(
    input:not([type="checkbox"]):not([type="range"]):not([type="color"]),
    select,
    textarea
  ) {
  width: 100%;
  box-sizing: border-box;
  background: var(--ws-field);
  color: var(--ws-text);
  border: 1px solid var(--ws-border);
  border-radius: 8px;
  padding: 9px 10px;
  min-height: 38px;
  font: inherit;
}
.workspace-refined input[type="checkbox"] {
  accent-color: #c5f582;
  width: 16px;
  height: 16px;
}
.workspace-refined input[type="range"] {
  accent-color: #c5f582;
}
.workspace-refined input[type="color"] {
  width: 100%;
  height: 36px;
  padding: 3px;
  background: var(--ws-raised);
  border: 1px solid var(--ws-border);
  border-radius: 8px;
}
.workspace-refined label {
  color: var(--ws-muted);
  font-size: 12px;
  gap: 7px;
}
.workspace-refined .inline-label {
  align-items: center;
  gap: 8px;
}
.workspace-refined label:has(> input[type="checkbox"]) {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.workspace-refined #workspace-install-slot .workspace-tool-command {
  width: 100%;
}
.workspace-refined .queue-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.workspace-refined .queue-controls > label {
  flex: 1;
  min-width: 180px;
  margin: 0;
}
.workspace-refined .queue-controls > button {
  min-height: 38px;
}
.workspace-refined .workspace-queue-upload {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 22px;
  border: 1px dashed #687c60;
  border-radius: 12px;
  background: #26332a;
}
.workspace-refined .workspace-queue-upload strong {
  color: #d7fab3;
  font-size: 14px;
  display: block;
}
.workspace-refined .workspace-queue-upload small {
  color: var(--ws-muted);
  font-size: 12px;
  display: block;
  margin-top: 5px;
}
.workspace-refined .workspace-queue-upload #queue-files {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}
.workspace-refined .workspace-queue-upload:focus-within {
  outline: 2px solid #c5f582;
  outline-offset: 3px;
}
.workspace-refined .workspace-queue-upload:has(input:disabled) {
  opacity: 0.5;
}
.workspace-refined #workspace-queue-settings {
  color: #c4d6b8;
  font-size: 12px;
  margin: 10px 0 18px;
}
.workspace-refined .workspace-icon {
  width: 20px;
  height: 20px;
  flex: none;
}
.workspace-refined .editor-top {
  height: 66px;
  flex: none;
  flex-wrap: nowrap;
  padding: 0 20px 0 220px;
  gap: 12px;
  background: var(--ws-panel);
  border-color: var(--ws-border);
}
.workspace-refined .editor-top > button,
.workspace-refined .editor-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
}
.workspace-refined .editor-title {
  min-width: 0;
  gap: 8px;
}
.workspace-refined .editor-title > span:first-child {
  display: none;
}
.workspace-refined .editor-title #editor-name {
  width: 190px;
  min-width: 60px;
  background: transparent;
  border-color: transparent;
  padding: 8px;
  font-size: 14px;
}
.workspace-refined .editor-title #editor-name:focus {
  border-color: var(--ws-border);
  background: var(--ws-field);
}
.workspace-refined .editor-actions {
  flex: none;
  flex-wrap: nowrap;
  gap: 8px;
  width: auto;
  margin-left: auto;
}
.workspace-refined #editor-export {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.workspace-refined #workspace-quick-export {
  margin-left: -9px;
  width: 32px;
  padding: 6px;
  border-radius: 0 9px 9px 0;
  background: #c5f582;
  color: #192319;
  border-color: #a9d374;
}
.workspace-refined #workspace-quick-export span {
  display: none;
}
.workspace-refined .workspace-legacy-toolbar {
  display: none !important;
}
.workspace-refined .editor-body {
  grid-template-columns: 64px minmax(0, 1fr) 292px;
  min-height: 0;
  height: auto;
  flex: 1;
  overflow: hidden;
}
.workspace-refined .editor-workspace {
  min-height: 0;
}
.workspace-refined .editor-commandbar {
  height: 48px;
  flex: none;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow: hidden;
  gap: 6px;
  padding: 6px 14px;
  background: var(--ws-panel);
  border-bottom: 1px solid var(--ws-border);
  box-sizing: border-box;
}
.workspace-refined .editor-commandbar > button,
.workspace-refined .workspace-context button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 9px;
  background: transparent;
  border-color: transparent;
  white-space: nowrap;
}
.workspace-refined .editor-commandbar > #editor-undo,
.workspace-refined .editor-commandbar > #editor-redo {
  width: 32px;
  padding: 6px;
}
.workspace-refined #editor-undo span,
.workspace-refined #editor-redo span {
  display: none;
}
.workspace-refined #workspace-tools-toggle {
  border-color: var(--ws-border);
  background: var(--ws-raised);
}
.workspace-refined .workspace-context {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-left: auto;
  min-width: 0;
}
.workspace-refined #workspace-selection-name {
  font-size: 12px;
  color: var(--ws-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
  margin-right: 7px;
}
.workspace-refined .workspace-context button[aria-pressed="true"] {
  background: #364932;
  color: #d7fab3;
}
.workspace-refined .editor-tools {
  background: var(--ws-panel);
  border-color: var(--ws-border);
  gap: 5px;
  padding: 12px 6px;
}
.workspace-refined .editor-tools button {
  background: transparent;
  border-color: transparent;
  border-radius: 10px;
  min-height: 52px;
  padding: 7px 2px;
  gap: 4px;
  color: var(--ws-muted);
  font-size: 10px;
}
.workspace-refined .editor-tools button > span:first-child {
  line-height: 0;
}
.workspace-refined .editor-tools button[aria-pressed="true"] {
  background: #33472d;
  border-color: #587247;
  color: #d7fab3;
}
.workspace-refined .editor-viewport {
  flex: 1;
  min-height: 160px;
  background: radial-gradient(var(--ws-dot) 1px, transparent 1px) 0 0/20px 20px
    var(--ws-bg);
}
.workspace-refined .editor-artboard {
  z-index: 0;
  background: repeating-conic-gradient(#dce0e6 0 25%, #f3f5f8 0 50%) 0/16px 16px;
  border: 1px solid var(--ws-border-strong);
  box-shadow: 0 8px 40px #0006;
}
.workspace-refined .canvas-container {
  position: relative;
  z-index: 1;
}
.workspace-refined .editor-viewbar {
  height: 36px;
  min-height: 36px;
  flex: none;
  padding: 4px 14px;
  gap: 7px;
  background: var(--ws-panel);
  border-color: var(--ws-border);
  box-sizing: border-box;
}
.workspace-refined .editor-viewbar button {
  padding: 3px 8px;
  min-height: 26px;
  font-size: 12px;
}
.workspace-refined .editor-viewbar output {
  min-width: 40px;
}
.workspace-refined #editor-offline {
  font-size: 11px;
  color: var(--ws-muted);
}
.workspace-refined .editor-message {
  min-height: 27px;
  flex: none;
  padding: 4px 14px;
  background: var(--ws-bg);
  color: var(--ws-muted);
  font-size: 11px;
  box-sizing: border-box;
}
.workspace-refined .editor-message p {
  margin: 0;
}
.workspace-refined[data-workspace-document="false"] .editor-body {
  grid-template-columns: minmax(0, 1fr);
}
.workspace-refined[data-workspace-document="false"] .editor-tools,
.workspace-refined[data-workspace-document="false"] .editor-inspector {
  display: none;
}
.workspace-refined .editor-empty {
  background: transparent;
  padding: 24px;
  gap: 0;
}
.workspace-refined .editor-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border: 1px solid #39443f;
  border-radius: 24px;
  background: linear-gradient(135deg, #344732, #212b29);
  margin-bottom: 24px;
  color: #c5f582;
}
.workspace-refined .editor-empty-icon .workspace-icon {
  width: 38px;
  height: 38px;
}
.workspace-refined .editor-empty h2 {
  font-size: 30px;
  letter-spacing: -0.6px;
  margin: 0 0 12px;
}
.workspace-refined .editor-empty p {
  font-size: 14px;
  color: var(--ws-muted);
  margin: 0 0 24px;
  line-height: 1.7;
}
.workspace-refined #editor-empty-import {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 46px;
  padding: 12px 26px;
}
.workspace-refined .workspace-start-options {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.workspace-refined .workspace-start-options button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ws-panel);
  padding: 12px 18px;
}
.workspace-refined .editor-empty .format-note {
  margin-top: 22px;
  font-size: 11px;
  color: var(--ws-muted);
}
.workspace-refined .workspace-inspector {
  padding: 0;
  background: var(--ws-panel);
  border-color: var(--ws-border);
  overflow-y: auto;
  min-height: 0;
}
.workspace-refined .workspace-inspector-tabs {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--ws-panel);
  border-bottom: 1px solid var(--ws-border);
  height: 48px;
  padding: 0 12px;
  gap: 4px;
}
.workspace-refined .workspace-inspector-tabs > button {
  flex: 1;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ws-muted);
  font-size: 12px;
}
.workspace-refined .workspace-inspector-tabs > button[aria-selected="true"] {
  color: #d5f8b0;
  box-shadow: inset 0 -2px #c5f582;
}
.workspace-refined .workspace-inspector-pane {
  padding: 16px;
}
.workspace-refined .workspace-inspector-pane details {
  padding: 14px 0;
  border-bottom: 1px solid var(--ws-border);
}
.workspace-refined .workspace-inspector-pane summary {
  color: var(--ws-text);
  font-size: 13px;
  padding: 3px 0;
}
.workspace-refined .workspace-primary-section {
  padding-top: 0 !important;
}
.workspace-refined .workspace-primary-section > summary {
  display: none;
}
.workspace-refined #editor-properties > label {
  margin-bottom: 12px;
}
.workspace-refined #text-properties {
  padding: 0;
  border: 0;
}
.workspace-refined .property-grid {
  gap: 10px;
  margin: 12px 0;
}
.workspace-refined #property-apply {
  width: 100%;
  margin-top: 8px;
}
.workspace-refined .workspace-auto-hint {
  color: var(--ws-muted);
  font-size: 11px;
  line-height: 1.6;
  margin: 12px 0 0;
}
.workspace-refined .workspace-property-empty {
  color: var(--ws-muted);
  line-height: 1.8;
  margin: 8px 0 20px;
}
.workspace-refined:not([data-workspace-selection="image"])
  .workspace-image-section {
  display: none;
}
.workspace-refined:not([data-workspace-tool="brush"])
  .workspace-appearance
  label:has(#brush-width),
.workspace-refined[data-workspace-selection="image"]
  .workspace-appearance
  label:has(#property-fill),
.workspace-refined:is(
    [data-workspace-selection="image"],
    [data-workspace-selection="text"]
  )
  .workspace-appearance
  label:has(#property-stroke) {
  display: none;
}
.workspace-refined[data-workspace-selection="none"]
  #editor-properties
  > :not(.workspace-appearance),
.workspace-refined[data-workspace-selection="none"]
  .workspace-appearance
  label:has(#property-opacity) {
  display: none;
}
.workspace-refined .editor-layers {
  max-height: none;
}
.workspace-refined .layer-row {
  background: var(--ws-raised);
  border-color: var(--ws-border);
  margin-bottom: 6px;
  border-radius: 8px;
}
.workspace-refined .layer-row.selected {
  background: #33472d;
  border-color: #658b49;
}
.workspace-refined .layer-row button {
  border: 0;
  background: transparent;
  border-radius: 5px;
  min-height: 32px;
}
.workspace-refined .layer-select {
  color: var(--ws-text);
}
.workspace-refined .mobile-memory-mode {
  display: flex;
  align-items: center;
  margin-top: 18px;
  gap: 8px;
}
.workspace-refined #workspace-inspector-close {
  display: none;
}
.workspace-refined dialog.workspace-dialog {
  color: var(--ws-text);
  background: var(--ws-panel);
  border: 1px solid var(--ws-border-strong);
  border-radius: 18px;
  padding: 26px;
  width: 880px;
  max-width: calc(100vw - 48px);
  max-height: calc(100dvh - 56px);
  box-sizing: border-box;
  overflow: auto;
  box-shadow: 0 25px 100px #0009;
  font-size: 13px;
}
.workspace-refined dialog.workspace-dialog::backdrop {
  background: #08120ccc;
  backdrop-filter: blur(4px);
}
.workspace-refined dialog.workspace-dialog h2 {
  font-size: 22px;
  margin: 0 42px 16px 0;
  letter-spacing: -0.3px;
}
.workspace-refined dialog.workspace-dialog h3 {
  font-size: 15px;
}
.workspace-refined dialog.workspace-dialog p {
  color: var(--ws-muted);
  line-height: 1.7;
}
.workspace-refined dialog.workspace-dialog label {
  margin: 12px 0;
}
.workspace-refined dialog.workspace-dialog fieldset {
  border: 1px solid var(--ws-border);
  border-radius: 10px;
  padding: 14px;
  margin: 16px 0;
}
.workspace-refined dialog.workspace-dialog legend {
  color: var(--ws-muted);
  padding: 0 6px;
}
.workspace-refined dialog.workspace-dialog .dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  align-items: center;
}
.workspace-refined dialog.workspace-dialog .dialog-actions:empty {
  display: none;
}
.workspace-refined .workspace-dialog-close {
  position: absolute;
  right: 18px;
  top: 18px;
  padding: 8px;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-color: transparent;
}
.workspace-refined .workspace-advanced-options {
  border-top: 1px solid var(--ws-border);
  border-bottom: 1px solid var(--ws-border);
  margin: 16px 0;
  padding: 12px 0;
}
.workspace-refined .workspace-advanced-options summary {
  cursor: pointer;
  color: var(--ws-muted);
  font-size: 12px;
  padding: 4px 0;
}
.workspace-refined .workspace-advanced-options[open] summary {
  color: #d5f8b0;
  margin-bottom: 10px;
}
.workspace-refined .workspace-advanced-options fieldset {
  border: 0 !important;
  padding: 0 !important;
}
.workspace-refined .workspace-advanced-options fieldset > legend {
  display: none;
}
.workspace-refined .workspace-advanced-options > button {
  margin: 4px;
}
.workspace-refined .workspace-tools-dialog {
  width: 720px !important;
}
.workspace-refined .workspace-dialog-heading p {
  margin: 0 0 18px;
}
.workspace-refined .workspace-tool-search {
  display: flex;
  flex-direction: row;
  align-items: center;
  border: 1px solid var(--ws-border-strong);
  border-radius: 10px;
  padding: 0 12px;
  margin-bottom: 14px;
  background: var(--ws-field);
}
.workspace-refined .workspace-tool-search input {
  background: transparent;
  border: 0;
  min-height: 44px;
}
.workspace-refined .workspace-tool-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0;
}
.workspace-refined .workspace-tool-categories button {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  font-size: 12px;
  padding: 6px 9px;
}
.workspace-refined .workspace-tool-categories .workspace-icon {
  display: none;
}
.workspace-refined .workspace-tool-categories button[aria-pressed="true"] {
  background: #33472d;
  border-color: #739752;
  color: #d7fab3;
}
.workspace-refined .workspace-tool-list {
  max-height: 55dvh;
  overflow: auto;
  padding-right: 4px;
}
.workspace-refined .workspace-tool-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 20px;
}
.workspace-refined .workspace-tool-group h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  grid-column: 1/-1;
  color: var(--ws-muted);
  font-size: 12px !important;
  margin: 8px 0;
}
.workspace-refined .workspace-tool-group h3 .workspace-icon {
  width: 16px;
  height: 16px;
}
.workspace-refined .workspace-tool-command {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  min-height: 66px;
  padding: 12px !important;
  background: var(--ws-raised);
}
.workspace-refined .workspace-tool-command > .workspace-icon {
  color: #c5f582;
}
.workspace-refined .workspace-tool-command > span {
  display: block;
  min-width: 0;
}
.workspace-refined .workspace-tool-command strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
}
.workspace-refined .workspace-tool-command small {
  display: block;
  margin-top: 4px;
  color: var(--ws-muted);
  font-size: 11px;
  line-height: 1.55;
}
.workspace-refined .workspace-tool-footer {
  display: flex;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--ws-border);
  margin-top: 8px;
  font-size: 11px;
  color: var(--ws-muted);
}
.workspace-refined #editor-export-dialog {
  width: 850px;
}
.workspace-refined .workspace-export-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 30px;
  align-items: start;
}
.workspace-refined .workspace-export-preview {
  margin: 12px 0 0;
  position: sticky;
  top: 0;
}
.workspace-refined .workspace-export-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 280px;
  background: repeating-conic-gradient(#222d28 0 25%, #2e3b35 0 50%) 0/16px 16px;
  border: 1px solid var(--ws-border);
  border-radius: 12px;
  overflow: hidden;
  padding: 12px;
}
.workspace-refined .workspace-export-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 4px 20px #0005;
}
.workspace-refined #workspace-export-preview-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 20px;
}
.workspace-refined #workspace-export-preview-status .workspace-icon {
  width: 32px;
  height: 32px;
}
.workspace-refined .workspace-export-preview figcaption {
  color: var(--ws-text);
  font-size: 12px;
  margin-top: 14px;
}
.workspace-refined .workspace-export-preview > p {
  margin: 6px 0;
  font-size: 11px;
}
.workspace-refined fieldset.workspace-export-formats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0 !important;
  gap: 8px;
  border: 0 !important;
}
.workspace-refined fieldset.workspace-export-sizes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 !important;
  gap: 6px;
  border: 0 !important;
}
.workspace-refined .workspace-export-formats legend,
.workspace-refined .workspace-export-sizes legend {
  margin-bottom: 9px;
  padding: 0 !important;
  font-size: 12px;
}
.workspace-refined .workspace-export-formats button {
  text-align: left;
  padding: 10px 8px;
}
.workspace-refined .workspace-export-formats strong {
  display: block;
  font-size: 13px;
}
.workspace-refined .workspace-export-formats small {
  display: block;
  font-size: 10px;
  color: var(--ws-muted);
  margin-top: 5px;
  white-space: nowrap;
}
.workspace-refined .workspace-export-formats button[aria-pressed="true"],
.workspace-refined .workspace-export-sizes button[aria-pressed="true"] {
  border-color: #c5f582;
  background: #33472d;
  color: #d7fab3;
}
.workspace-refined .workspace-export-sizes button {
  font-size: 12px;
  padding: 8px 5px;
}
.workspace-refined #editor-export-form > .dialog-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--ws-border);
  padding-top: 18px;
}
.workspace-refined #editor-export-form [type="submit"] {
  min-width: 120px;
}
.workspace-refined #export-size {
  font-size: 11px;
  margin: 12px 0;
}
.workspace-refined #main-selection-panel {
  flex: none;
  position: static;
  padding: 12px 18px 12px 76px;
  max-height: 32dvh;
  overflow: auto;
  border-bottom: 1px solid var(--ws-border);
  background: var(--ws-panel);
  color: var(--ws-text);
}
.workspace-refined #main-selection-panel > p {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--ws-muted);
}
.workspace-refined #main-selection-panel > .studio-grid {
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) auto;
  align-items: end;
}
.workspace-refined #main-selection-panel label {
  display: grid;
  gap: 5px;
  font-size: 11px;
  color: var(--ws-muted);
}
.workspace-refined #main-selection-panel label:has([type="checkbox"]) {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 8px;
}
.workspace-refined .workspace-selection-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.workspace-refined .workspace-selection-options details {
  margin: 0;
  padding: 0;
  border-bottom: 0;
}
.workspace-refined .workspace-selection-options summary {
  padding: 6px 0;
  font-size: 12px;
}
.workspace-refined .workspace-selection-options .color-controls {
  margin-top: 10px;
}
.workspace-refined .workspace-selection-options #main-select-apply {
  margin-top: 10px;
}
.workspace-refined .workspace-selection-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.workspace-refined .workspace-selection-footer p {
  font-size: 11px;
  color: var(--ws-muted);
  margin: 0;
}
.workspace-refined .workspace-selection-footer .dialog-actions {
  gap: 6px;
  margin: 0;
}
.workspace-refined .workspace-selection-footer button {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 12px;
}
@media (max-width: 760px) {
  .workspace-refined #main-selection-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(
      58px +
        max(
          0px,
          100dvh - var(--editor-visible-height, 100dvh) -
            var(--editor-visible-top, 0px)
        )
    );
    z-index: 7;
    padding: 12px;
    max-height: calc(var(--editor-visible-height, 100dvh) * 0.35);
    box-shadow: 0 -8px 30px #0006;
  }
  .workspace-refined #main-selection-panel > .studio-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 8px;
  }
  .workspace-refined .workspace-selection-options {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .workspace-refined .workspace-selection-footer {
    flex-wrap: wrap;
  }
  .workspace-refined .workspace-selection-footer button {
    min-height: 44px;
  }
}
@media (max-width: 1240px) {
  .workspace-refined .editor-body {
    grid-template-columns: 60px minmax(0, 1fr) 268px;
  }
  .workspace-refined .editor-title #editor-name {
    width: 140px;
  }
  .workspace-refined .editor-save-state {
    display: none;
  }
  .workspace-refined #workspace-selection-name {
    max-width: 80px;
  }
  .workspace-refined .workspace-category-shortcut {
    font-size: 12px;
    padding: 6px !important;
  }
}
@media (max-width: 1050px) {
  .workspace-refined #workspace-selection-name {
    display: none;
  }
  .workspace-refined .editor-top {
    padding-right: 12px;
    gap: 6px;
  }
  .workspace-refined .editor-title #editor-name {
    width: 120px;
  }
  .workspace-refined .workspace-category-shortcut {
    display: none !important;
  }
  .workspace-refined .editor-body {
    grid-template-columns: 58px minmax(0, 1fr) 250px;
  }
  .workspace-refined #editor-save span {
    display: none;
  }
  .workspace-refined .editor-actions {
    gap: 6px;
  }
}
@media (max-width: 760px) {
  .workspace-refined[data-workspace-selection="image"] .editor-commandbar {
    height: 80px;
    flex-wrap: wrap;
    align-content: center;
  }
  .workspace-refined[data-workspace-selection="image"] .workspace-context {
    flex-basis: 100%;
    justify-content: flex-end;
  }
  .workspace-refined[data-workspace-selection="image"]
    #workspace-selection-name {
    display: block;
    flex: 1;
    min-width: 0;
    max-width: none;
  }
  body[data-mode="editor"] {
    height: var(--editor-visible-height, 100dvh);
  }
  body[data-mode="editor"] .topbar {
    width: 58px;
    height: 58px;
    padding: 0 12px;
  }
  body[data-mode="editor"] .brand > span:last-child {
    display: none;
  }
  body[data-mode="editor"] .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }
  .workspace-refined .editor-top {
    height: 58px;
    padding: 0 10px 0 60px;
    gap: 4px;
  }
  .workspace-refined #workspace-project-menu {
    width: 36px;
    min-width: 36px;
    padding: 8px;
    border: 0;
    background: transparent;
  }
  .workspace-refined #workspace-project-menu span {
    display: none;
  }
  .workspace-refined .editor-title {
    flex: 1;
    width: auto;
  }
  .workspace-refined .editor-title #editor-name {
    width: 100%;
    background: var(--ws-panel);
    min-width: 0;
    font-size: 12px;
    padding: 6px 2px;
  }
  .workspace-refined .editor-actions {
    gap: 4px;
  }
  .workspace-refined .editor-actions button {
    min-height: 40px;
    padding: 8px;
    flex: none;
  }
  .workspace-refined #editor-import span,
  .workspace-refined #editor-save span,
  .workspace-refined #workspace-quick-export {
    display: none;
  }
  .workspace-refined #editor-export {
    border-radius: 9px;
    font-size: 12px;
    gap: 5px;
  }
  .workspace-refined #editor-export span {
    font-size: 0;
  }
  .workspace-refined #editor-export span::after {
    content: "导出";
    font-size: 12px;
  }
  .workspace-refined .editor-body {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
  }
  .workspace-refined .editor-workspace {
    order: 1;
    flex: 1;
    height: auto;
    min-height: 0;
  }
  .workspace-refined .editor-commandbar {
    height: 46px;
    padding: 5px 8px;
    gap: 2px;
  }
  .workspace-refined .workspace-context {
    gap: 0;
  }
  .workspace-refined #workspace-selection-name {
    display: none;
  }
  .workspace-refined .workspace-context button {
    font-size: 11px;
    padding: 6px;
    gap: 3px;
  }
  .workspace-refined .workspace-context .workspace-icon {
    width: 16px;
    height: 16px;
  }
  .workspace-refined .editor-viewport {
    min-height: 150px;
  }
  .workspace-refined .editor-tools {
    order: 2;
    flex: none;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    padding: 4px 6px;
    gap: 0;
    border-right: 0;
    border-top: 1px solid var(--ws-border);
    border-bottom: 0;
  }
  .workspace-refined .editor-tools button {
    min-width: 40px;
    min-height: 48px;
    padding: 5px 3px;
    font-size: 9px;
  }
  .workspace-refined .editor-viewbar {
    padding: 4px 8px;
    gap: 3px;
  }
  .workspace-refined #editor-offline {
    display: none;
  }
  .workspace-refined .editor-message {
    min-height: 25px;
    padding: 4px 8px;
    font-size: 10px;
  }
  .workspace-refined .mobile-editor-panels {
    display: flex;
    order: 3;
    flex: none;
    padding: 6px 10px;
    gap: 8px;
    background: var(--ws-panel);
    border-top: 1px solid var(--ws-border);
  }
  .workspace-refined .mobile-editor-panels button {
    flex: 1;
    min-height: 40px;
    font-size: 12px;
  }
  .workspace-refined .workspace-inspector,
  .workspace-refined.mobile-inspector-open .workspace-inspector {
    display: none;
    position: fixed;
    z-index: 8;
    inset: auto 0
      calc(
        58px +
          max(
            0px,
            100dvh - var(--editor-visible-height, 100dvh) -
              var(--editor-visible-top, 0px)
          )
      )
      0;
    background: var(--ws-panel);
    max-height: min(65dvh, calc(var(--editor-visible-height, 100dvh) - 180px));
    border: 1px solid var(--ws-border);
    border-radius: 16px 16px 0 0;
    padding: 0;
    box-shadow: 0 -12px 50px #0007;
    overflow: auto;
    width: 100%;
  }
  .workspace-refined.mobile-inspector-open .workspace-inspector {
    display: block;
  }
  .workspace-refined .workspace-inspector-tabs {
    padding: 0 12px;
  }
  .workspace-refined #workspace-inspector-close {
    display: flex;
    flex: 0 0 36px;
    padding: 8px;
  }
  .workspace-refined #workspace-inspector-close span {
    display: none;
  }
  .workspace-refined .workspace-inspector-pane {
    padding: 16px;
  }
  .workspace-refined .workspace-inspector :is(input, select, textarea),
  .workspace-refined dialog.workspace-dialog :is(input, select, textarea) {
    font-size: 16px;
  }
  .workspace-refined dialog.workspace-dialog {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    padding: 20px 16px;
    max-height: calc(var(--editor-visible-height, 100dvh) - 32px);
    border-radius: 14px;
  }
  .workspace-refined dialog.workspace-dialog h2 {
    font-size: 20px;
  }
  .workspace-refined .workspace-dialog-close {
    top: 12px;
    right: 12px;
  }
  .workspace-refined .workspace-tool-group {
    grid-template-columns: minmax(0, 1fr);
  }
  .workspace-refined .workspace-tool-list {
    max-height: 49dvh;
  }
  .workspace-refined .workspace-tool-categories {
    gap: 5px;
  }
  .workspace-refined .workspace-tool-categories button {
    min-height: 36px;
  }
  .workspace-refined .workspace-tool-footer {
    font-size: 10px;
  }
  .workspace-refined .workspace-export-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .workspace-refined .workspace-export-preview {
    position: static;
    margin: 0;
  }
  .workspace-refined .workspace-export-image {
    height: 145px;
    padding: 8px;
  }
  .workspace-refined .workspace-export-preview figcaption {
    margin-top: 8px;
  }
  .workspace-refined .workspace-export-preview > p {
    display: none;
  }
  .workspace-refined .workspace-export-formats small {
    font-size: 9px;
  }
  .workspace-refined #editor-export-form > .dialog-actions {
    position: sticky;
    bottom: -20px;
    background: var(--ws-panel);
    padding-bottom: 16px;
    margin-bottom: -16px;
  }
  .workspace-refined .editor-empty {
    padding: 20px 12px;
  }
  .workspace-refined .editor-empty-icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    margin-bottom: 18px;
  }
  .workspace-refined .editor-empty h2 {
    font-size: 23px;
  }
  .workspace-refined .editor-empty p {
    font-size: 12px;
    margin-bottom: 18px;
  }
  .workspace-refined .workspace-start-options {
    gap: 6px;
  }
  .workspace-refined .workspace-start-options button {
    flex-direction: column;
    gap: 7px;
    padding: 12px;
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .workspace-refined button {
    transition: none;
  }
}
@media (min-width: 761px) {
  .workspace-refined .workspace-inspector,
  .workspace-refined.mobile-inspector-open .workspace-inspector {
    display: block;
    position: static;
    width: auto;
    max-height: none;
    background: var(--ws-panel);
    box-shadow: none;
  }
  .workspace-refined .mobile-editor-panels {
    display: none;
  }
}
