html, body {
      height: 100%;
      height: 100vh;
      height: 100dvh;
      margin: 0;
      padding: 0;
      overflow: hidden;
    }
    body {
      font-family: 'Plus Jakarta Sans', 'Noto Sans SC', sans-serif;
    }
    /* 高对比度深色滚动条 */
    .custom-scrollbar::-webkit-scrollbar { width: 8px; height: 8px; display: block; }
    .custom-scrollbar::-webkit-scrollbar-track { background: #0f172a; }
    .custom-scrollbar::-webkit-scrollbar-thumb { background: #4f46e5; border-radius: 9999px; border: 2px solid #0f172a; }
    .custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #6366f1; }
    .custom-scrollbar { scrollbar-width: thin; scrollbar-color: #4f46e5 #0f172a; }

    /* 透明棋盘格底纹 */
    .checkerboard {
      background-color: #ffffff;
      background-image: linear-gradient(45deg, #e2e8f0 25%, transparent 25%),
                        linear-gradient(-45deg, #e2e8f0 25%, transparent 25%),
                        linear-gradient(45deg, transparent 75%, #e2e8f0 75%),
                        linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
      background-size: 20px 20px;
      background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    }
  

    /* ===== MIMO Studio 品牌化主题 ===== */
    :root {
      --mimo-radius: 18px;
      --mimo-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    }
    body.mimo-theme { 
      --mimo-bg: #fff7fa;
      --mimo-bg-soft: #fffdfd;
      --mimo-panel: #ffffff;
      --mimo-panel-2: #fff1f7;
      --mimo-panel-3: #ffe8f2;
      --mimo-border: #f0c5d8;
      --mimo-border-strong: #e9a5c3;
      --mimo-text: #23141c;
      --mimo-muted: #674958;
      --mimo-subtle: #8e7181;
      --mimo-accent: #e84a8a;
      --mimo-accent-2: #ff86b6;
      --mimo-accent-soft: rgba(232, 74, 138, 0.12);
      --mimo-success: #5f9f7f;
      --mimo-canvas-bg: #fffdfd;
      background: radial-gradient(circle at top, #fff8fb 0%, #fff4f8 40%, #fff1f7 100%) !important;
      color: var(--mimo-text) !important;
      transition: background .25s ease, color .25s ease;
    }
    body.mimo-theme[data-theme="dark"] {
      --mimo-bg: #0d0a0f;
      --mimo-bg-soft: #151018;
      --mimo-panel: #171119;
      --mimo-panel-2: #21151f;
      --mimo-panel-3: #291925;
      --mimo-border: #422234;
      --mimo-border-strong: #a63b71;
      --mimo-text: #fff6fb;
      --mimo-muted: #d5adc3;
      --mimo-subtle: #9c7f90;
      --mimo-accent: #ff4f9c;
      --mimo-accent-2: #ff8dc1;
      --mimo-accent-soft: rgba(255, 79, 156, 0.15);
      --mimo-success: #86d1a7;
      --mimo-canvas-bg: #fcf8fb;
      background: radial-gradient(circle at top, #171019 0%, #100c12 45%, #09070a 100%) !important;
      color: var(--mimo-text) !important;
    }
    body.mimo-theme, body.mimo-theme * { scrollbar-color: var(--mimo-accent) transparent; }
    body.mimo-theme .custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
    body.mimo-theme .custom-scrollbar::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--mimo-accent) 85%, white 15%); border: 2px solid transparent; }
    body.mimo-theme .custom-scrollbar::-webkit-scrollbar-thumb:hover { background: var(--mimo-accent); }
    body.mimo-theme header {
      background: color-mix(in srgb, var(--mimo-panel) 88%, white 12%) !important;
      border-color: var(--mimo-border) !important;
      box-shadow: 0 10px 32px rgba(232,74,138,.08);
    }
    body.mimo-theme aside,
    body.mimo-theme main,
    body.mimo-theme #modal-tiling > div,
    body.mimo-theme #export-menu {
      background: var(--mimo-panel) !important;
      border-color: var(--mimo-border) !important;
      color: var(--mimo-text) !important;
    }
    body.mimo-theme #canvas-viewport {
      background: radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--mimo-panel-2) 80%, white 20%) 0%, var(--mimo-bg) 72%) !important;
    }
    body.mimo-theme #canvas-wrapper {
      background: var(--mimo-canvas-bg) !important;
      border-color: var(--mimo-border-strong) !important;
      border-radius: 18px !important;
      box-shadow: 0 22px 44px rgba(232,74,138,.14) !important;
    }
    body.mimo-theme aside > section,
    body.mimo-theme #sticker-mode-panel,
    body.mimo-theme #shared-common-panel,
    body.mimo-theme #seamless-module-panel {
      background: transparent !important;
      border-color: var(--mimo-border) !important;
    }
    body.mimo-theme #drop-zone,
    body.mimo-theme #elements-list > div,
    body.mimo-theme #export-menu,
    body.mimo-theme .bg-slate-900,
    body.mimo-theme .bg-slate-900\/40,
    body.mimo-theme .bg-slate-900\/60,
    body.mimo-theme .bg-slate-950,
    body.mimo-theme .bg-slate-950\/70,
    body.mimo-theme .bg-slate-950\/90,
    body.mimo-theme .bg-slate-800,
    body.mimo-theme .bg-slate-800\/80 {
      background-color: var(--mimo-panel-2) !important;
      border-color: var(--mimo-border) !important;
      color: var(--mimo-text) !important;
    }
    body.mimo-theme .from-pink-950\/20,
    body.mimo-theme .from-indigo-950\/20,
    body.mimo-theme .to-transparent {
      background-image: none !important;
    }
    body.mimo-theme input[type="number"],
    body.mimo-theme input[type="text"],
    body.mimo-theme select,
    body.mimo-theme input[type="color"],
    body.mimo-theme textarea {
      background: var(--mimo-bg-soft) !important;
      color: var(--mimo-text) !important;
      border-color: var(--mimo-border-strong) !important;
    }
    body.mimo-theme input[type="range"] { accent-color: var(--mimo-accent); }
    body.mimo-theme button,
    body.mimo-theme .layout-mode-btn,
    body.mimo-theme .sizemode-btn,
    body.mimo-theme .rot-mode-btn,
    body.mimo-theme .canvas-preset-btn,
    body.mimo-theme .dpi-preset-btn {
      border-color: var(--mimo-border) !important;
      color: var(--mimo-text) !important;
      transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
    }
    body.mimo-theme button:hover { box-shadow: 0 6px 20px rgba(232,74,138,.12); }
    body.mimo-theme .layout-mode-btn.active,
    body.mimo-theme .sizemode-btn.active,
    body.mimo-theme .rot-mode-btn.active,
    body.mimo-theme .canvas-preset-btn.active,
    body.mimo-theme .dpi-preset-btn.bg-indigo-600 {
      background: var(--mimo-accent-soft) !important;
      border-color: var(--mimo-accent) !important;
      color: var(--mimo-accent) !important;
    }
    body.mimo-theme #btn-shuffle,
    body.mimo-theme #btn-quick-export,
    body.mimo-theme #btn-export-tile,
    body.mimo-theme #btn-apply-custom-size,
    body.mimo-theme #btn-delete-active,
    body.mimo-theme #btn-sticker-randomize,
    body.mimo-theme #btn-sticker-fill {
      background-image: linear-gradient(135deg, var(--mimo-accent), var(--mimo-accent-2)) !important;
      color: #fff !important;
      border: none !important;
      box-shadow: 0 10px 20px rgba(232,74,138,.22) !important;
    }
    body.mimo-theme #btn-export-dropdown {
      background: color-mix(in srgb, var(--mimo-accent) 82%, black 18%) !important;
      color: #fff !important;
      border-color: transparent !important;
    }
    body.mimo-theme #btn-preview-tile,
    body.mimo-theme #btn-save-preset,
    body.mimo-theme #btn-load-preset-file,
    body.mimo-theme #btn-toggle-guidelines,
    body.mimo-theme #btn-close-modal,
    body.mimo-theme #btn-load-presets,
    body.mimo-theme #btn-clear-assets,
    body.mimo-theme .btn-del-el {
      background: var(--mimo-panel-2) !important;
      color: var(--mimo-muted) !important;
    }
    body.mimo-theme #loading-overlay { background: rgba(20, 10, 16, 0.48) !important; }
    body.mimo-theme #loading-text { color: var(--mimo-text) !important; }
    body.mimo-theme #toast-container > div { border-radius: 16px !important; }
    body.mimo-theme .text-slate-100,
    body.mimo-theme .text-slate-200,
    body.mimo-theme .text-slate-300,
    body.mimo-theme .text-slate-900 { color: var(--mimo-text) !important; }
    body.mimo-theme .text-slate-400,
    body.mimo-theme .text-slate-500,
    body.mimo-theme .text-slate-600,
    body.mimo-theme .text-slate-700 { color: var(--mimo-muted) !important; }
    body.mimo-theme .border-slate-700,
    body.mimo-theme .border-slate-700\/60,
    body.mimo-theme .border-slate-700\/80,
    body.mimo-theme .border-slate-800,
    body.mimo-theme .border-slate-800\/60,
    body.mimo-theme .border-slate-800\/70,
    body.mimo-theme .border-slate-800\/80,
    body.mimo-theme .border-pink-500\/25,
    body.mimo-theme .border-amber-500\/20,
    body.mimo-theme .border-sky-500\/20,
    body.mimo-theme .border-indigo-500\/25,
    body.mimo-theme .border-indigo-500\/20 { border-color: var(--mimo-border) !important; }
    body.mimo-theme .text-indigo-300,
    body.mimo-theme .text-indigo-400,
    body.mimo-theme .text-purple-400,
    body.mimo-theme .text-pink-200,
    body.mimo-theme .text-pink-400,
    body.mimo-theme .text-sky-200,
    body.mimo-theme .text-amber-200,
    body.mimo-theme .text-emerald-400,
    body.mimo-theme .text-rose-400 { color: var(--mimo-accent) !important; }
    body.mimo-theme .checkerboard {
      background-color: #fff;
      background-image: linear-gradient(45deg, #f6dce7 25%, transparent 25%),
                        linear-gradient(-45deg, #f6dce7 25%, transparent 25%),
                        linear-gradient(45deg, transparent 75%, #f6dce7 75%),
                        linear-gradient(-45deg, transparent 75%, #f6dce7 75%);
    }
    body.mimo-theme .mimo-brand-title {
      background: linear-gradient(90deg, var(--mimo-accent), var(--mimo-accent-2));
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent !important;
    }
    .mimo-theme-switch {
      display: inline-flex; align-items: center; gap: 6px; padding: 4px; border-radius: 999px;
      background: var(--mimo-panel-2); border: 1px solid var(--mimo-border);
    }
    .mimo-theme-chip {
      border: none; border-radius: 999px; padding: 6px 10px; font-size: 11px; font-weight: 700;
      color: var(--mimo-muted) !important; background: transparent !important; box-shadow: none !important;
    }
    .mimo-theme-chip.active {
      background: linear-gradient(135deg, var(--mimo-accent), var(--mimo-accent-2)) !important;
      color: #fff !important; box-shadow: 0 8px 18px rgba(232,74,138,.22) !important;
    }
    .mimo-catmark {
      width: 38px; height: 38px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
      background: linear-gradient(135deg, var(--mimo-accent), var(--mimo-accent-2));
      box-shadow: 0 12px 24px rgba(232,74,138,.18);
    }
    .mimo-catmark svg { width: 22px; height: 22px; fill: white; }
    body.mimo-theme #modal-tiling,
    body.mimo-theme #loading-overlay { backdrop-filter: blur(12px); }

  

    /* ===== 3.1 左侧工具栏扁平高级化 ===== */
    body.mimo-theme {
      --mimo-title: #b93d73;
      --mimo-title-dark: #ff8fbd;
      --mimo-aside-line: rgba(233, 165, 195, 0.7);
      --mimo-flat-panel: rgba(255, 255, 255, 0.78);
      --mimo-flat-panel-2: rgba(255, 241, 247, 0.9);
      --mimo-flat-panel-dark: rgba(31, 21, 31, 0.96);
      --mimo-flat-panel-dark-2: rgba(39, 25, 37, 0.98);
    }
    body.mimo-theme[data-theme="dark"] {
      --mimo-title: var(--mimo-title-dark);
      --mimo-aside-line: rgba(166, 59, 113, 0.9);
    }
    body.mimo-theme aside {
      background: linear-gradient(180deg, color-mix(in srgb, var(--mimo-panel) 90%, white 10%) 0%, var(--mimo-bg) 100%) !important;
      border-right-color: var(--mimo-border) !important;
    }
    body.mimo-theme[data-theme="dark"] aside {
      background: linear-gradient(180deg, rgba(19, 13, 19, 0.98) 0%, rgba(13, 10, 15, 1) 100%) !important;
    }
    body.mimo-theme aside > section,
    body.mimo-theme #sticker-mode-panel,
    body.mimo-theme #shared-common-panel,
    body.mimo-theme #seamless-module-panel {
      position: relative;
      margin: 10px 12px 0 12px;
      padding: 16px 16px 15px !important;
      border: 1px solid var(--mimo-aside-line) !important;
      border-radius: 18px !important;
      background: var(--mimo-flat-panel) !important;
      box-shadow: none !important;
      backdrop-filter: blur(10px);
    }
    body.mimo-theme[data-theme="dark"] aside > section,
    body.mimo-theme[data-theme="dark"] #sticker-mode-panel,
    body.mimo-theme[data-theme="dark"] #shared-common-panel,
    body.mimo-theme[data-theme="dark"] #seamless-module-panel {
      background: var(--mimo-flat-panel-dark) !important;
    }
    body.mimo-theme aside > section::before,
    body.mimo-theme #sticker-mode-panel::before,
    body.mimo-theme #shared-common-panel::before,
    body.mimo-theme #seamless-module-panel::before {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: inherit;
      pointer-events: none;
      background: linear-gradient(180deg, rgba(255,255,255,0.28), rgba(255,255,255,0));
      opacity: .65;
    }
    body.mimo-theme[data-theme="dark"] aside > section::before,
    body.mimo-theme[data-theme="dark"] #sticker-mode-panel::before,
    body.mimo-theme[data-theme="dark"] #shared-common-panel::before,
    body.mimo-theme[data-theme="dark"] #seamless-module-panel::before {
      background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0));
      opacity: 1;
    }
    body.mimo-theme aside > section > * { position: relative; z-index: 1; }
    body.mimo-theme aside h2,
    body.mimo-theme aside .uppercase,
    body.mimo-theme aside label.text-xs.font-semibold,
    body.mimo-theme #sticker-mode-panel h2,
    body.mimo-theme #shared-common-panel h2,
    body.mimo-theme #seamless-module-panel h2 {
      color: var(--mimo-title) !important;
      letter-spacing: .06em;
    }
    body.mimo-theme aside .text-indigo-400,
    body.mimo-theme aside .text-indigo-300,
    body.mimo-theme aside .text-purple-400,
    body.mimo-theme aside .text-pink-200,
    body.mimo-theme aside .text-pink-400,
    body.mimo-theme aside .text-sky-200,
    body.mimo-theme aside .text-amber-200,
    body.mimo-theme aside .text-emerald-400,
    body.mimo-theme aside .text-rose-400,
    body.mimo-theme aside .text-rose-300 {
      color: var(--mimo-title) !important;
    }
    body.mimo-theme aside .bg-indigo-500\/15,
    body.mimo-theme aside .bg-indigo-500\/10,
    body.mimo-theme aside .bg-indigo-500\/20,
    body.mimo-theme aside .bg-pink-500\/10,
    body.mimo-theme aside .bg-sky-500\/10,
    body.mimo-theme aside .bg-amber-500\/10,
    body.mimo-theme aside .bg-emerald-500\/20,
    body.mimo-theme aside .bg-rose-500\/10,
    body.mimo-theme aside .bg-slate-900\/60,
    body.mimo-theme aside .bg-slate-900\/90,
    body.mimo-theme aside .bg-slate-900\/40,
    body.mimo-theme aside .bg-slate-950\/70,
    body.mimo-theme aside .bg-slate-950\/90,
    body.mimo-theme aside .bg-slate-800,
    body.mimo-theme aside .bg-slate-900,
    body.mimo-theme aside .bg-slate-950 {
      background: var(--mimo-flat-panel-2) !important;
    }
    body.mimo-theme[data-theme="dark"] aside .bg-indigo-500\/15,
    body.mimo-theme[data-theme="dark"] aside .bg-indigo-500\/10,
    body.mimo-theme[data-theme="dark"] aside .bg-indigo-500\/20,
    body.mimo-theme[data-theme="dark"] aside .bg-pink-500\/10,
    body.mimo-theme[data-theme="dark"] aside .bg-sky-500\/10,
    body.mimo-theme[data-theme="dark"] aside .bg-amber-500\/10,
    body.mimo-theme[data-theme="dark"] aside .bg-emerald-500\/20,
    body.mimo-theme[data-theme="dark"] aside .bg-rose-500\/10,
    body.mimo-theme[data-theme="dark"] aside .bg-slate-900\/60,
    body.mimo-theme[data-theme="dark"] aside .bg-slate-900\/90,
    body.mimo-theme[data-theme="dark"] aside .bg-slate-900\/40,
    body.mimo-theme[data-theme="dark"] aside .bg-slate-950\/70,
    body.mimo-theme[data-theme="dark"] aside .bg-slate-950\/90,
    body.mimo-theme[data-theme="dark"] aside .bg-slate-800,
    body.mimo-theme[data-theme="dark"] aside .bg-slate-900,
    body.mimo-theme[data-theme="dark"] aside .bg-slate-950 {
      background: var(--mimo-flat-panel-dark-2) !important;
    }
    body.mimo-theme aside #drop-zone,
    body.mimo-theme aside #elements-list > div,
    body.mimo-theme aside .rounded-lg,
    body.mimo-theme aside .rounded-xl,
    body.mimo-theme aside .rounded-2xl {
      box-shadow: none !important;
    }
    body.mimo-theme aside #drop-zone {
      border-style: solid !important;
      border-width: 1px !important;
      background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,240,248,0.88)) !important;
    }
    body.mimo-theme[data-theme="dark"] aside #drop-zone {
      background: linear-gradient(180deg, rgba(34,22,31,.98), rgba(24,16,23,.98)) !important;
    }
    body.mimo-theme aside #elements-list > div {
      border-radius: 16px !important;
      border: 1px solid var(--mimo-border) !important;
      background: rgba(255,255,255,0.62) !important;
    }
    body.mimo-theme[data-theme="dark"] aside #elements-list > div {
      background: rgba(35,22,30,0.96) !important;
    }
    body.mimo-theme aside input[type="number"],
    body.mimo-theme aside select,
    body.mimo-theme aside input[type="text"] {
      min-height: 36px;
      border-radius: 12px !important;
      background: rgba(255,255,255,0.74) !important;
    }
    body.mimo-theme[data-theme="dark"] aside input[type="number"],
    body.mimo-theme[data-theme="dark"] aside select,
    body.mimo-theme[data-theme="dark"] aside input[type="text"] {
      background: rgba(30,20,27,0.98) !important;
    }
    body.mimo-theme aside input[type="range"] {
      height: 6px;
      filter: saturate(1.05);
    }
    body.mimo-theme aside .layout-mode-btn,
    body.mimo-theme aside .sizemode-btn,
    body.mimo-theme aside .rot-mode-btn,
    body.mimo-theme aside .canvas-preset-btn,
    body.mimo-theme aside .dpi-preset-btn {
      border-radius: 14px !important;
      min-height: 38px;
      background: rgba(255,255,255,0.58) !important;
      border: 1px solid var(--mimo-border) !important;
    }
    body.mimo-theme[data-theme="dark"] aside .layout-mode-btn,
    body.mimo-theme[data-theme="dark"] aside .sizemode-btn,
    body.mimo-theme[data-theme="dark"] aside .rot-mode-btn,
    body.mimo-theme[data-theme="dark"] aside .canvas-preset-btn,
    body.mimo-theme[data-theme="dark"] aside .dpi-preset-btn {
      background: rgba(35,22,30,0.96) !important;
    }
    body.mimo-theme aside .layout-mode-btn.active,
    body.mimo-theme aside .sizemode-btn.active,
    body.mimo-theme aside .rot-mode-btn.active,
    body.mimo-theme aside .canvas-preset-btn.active,
    body.mimo-theme aside .dpi-preset-btn.bg-indigo-600 {
      background: color-mix(in srgb, var(--mimo-accent) 13%, white 87%) !important;
      color: var(--mimo-title) !important;
      border-color: color-mix(in srgb, var(--mimo-accent) 50%, white 50%) !important;
    }
    body.mimo-theme[data-theme="dark"] aside .layout-mode-btn.active,
    body.mimo-theme[data-theme="dark"] aside .sizemode-btn.active,
    body.mimo-theme[data-theme="dark"] aside .rot-mode-btn.active,
    body.mimo-theme[data-theme="dark"] aside .canvas-preset-btn.active,
    body.mimo-theme[data-theme="dark"] aside .dpi-preset-btn.bg-indigo-600 {
      background: rgba(255,79,156,.16) !important;
      border-color: rgba(255,79,156,.55) !important;
      color: #ff9bc7 !important;
    }
    body.mimo-theme aside button:hover {
      transform: translateY(-1px);
      box-shadow: none !important;
    }
    body.mimo-theme aside .text-[10px],
    body.mimo-theme aside .text-[11px],
    body.mimo-theme aside .text-xs { line-height: 1.45; }
    body.mimo-theme aside .font-mono {
      font-family: 'Plus Jakarta Sans', 'Noto Sans SC', sans-serif !important;
      font-weight: 600;
    }
