   /* --- 基础重置 & 变量 --- */
        *, ::before, ::after { margin: 0; padding: 0; border-width: 0; border-style: solid; border-color: #e5e7eb; }
        body { font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; }
        img, canvas { display: block; vertical-align: middle; max-width: 100%; height: auto; }
        button, input, select { font-family: inherit; font-size: 100%; margin: 0; text-transform: none; }
        button { cursor: pointer; background: transparent; }
        body, html{ font-size: inherit;}
        
        /* --- 布局工具类 --- */
        .container { width: 100%; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem;  box-sizing: border-box;}
        @media (min-width: 1024px) { .container { max-width: 1024px; } }
        .max-w-6xl { max-width: 72rem; }
        
        .block { display: block; }
        .flex { display: flex; }
        .grid { display: grid; }
        .hidden { display: none; }
        .relative { position: relative; }
        
        .flex-col { flex-direction: column; }
        .items-center { align-items: center; }
        .justify-center { justify-content: center; }
        .justify-between { justify-content: space-between; }
        .flex-grow { flex-grow: 1; }
        
        .grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
        .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
        @media (min-width: 1024px) {
            .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
            .lg\:col-span-1 { grid-column: span 1 / span 1; }
            .lg\:col-span-2 { grid-column: span 2 / span 2; }
        }

        /* --- 尺寸与间距 --- */
        .w-full { width: 100%; }
        .h-fit { height: fit-content; }
        .min-h-screen { min-height: 100vh; }
        .h-2 { height: 0.5rem; }
        .h-8 { height: 2rem; }
        .w-14 { width: 3.5rem; }
        
        .m-0 { margin: 0; }
        .mr-1 { margin-right: 0.25rem; }
        .mr-2 { margin-right: 0.5rem; }
        .mb-1 { margin-bottom: 0.25rem; }
        .mb-2 { margin-bottom: 0.5rem; }
        .mb-4 { margin-bottom: 1rem; }
        .mb-6 { margin-bottom: 1.5rem; }
        .mb-10 { margin-bottom: 2.5rem; }
        .mt-1 { margin-top: 0.25rem; }
        .mt-2 { margin-top: 0.5rem; }
        .mt-12 { margin-top: 3rem; }
        
        .p-0 { padding: 0; }
        .p-2 { padding: 0.5rem; }
        .p-4 { padding: 1rem; }
        .p-6 { padding: 1.5rem; }
        .px-4 { padding-left: 1rem; padding-right: 1rem; }
        .py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
        .py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
        .py-8 { padding-top: 2rem; padding-bottom: 2rem; }
        .pt-4 { padding-top: 1rem; }
        
        .gap-2 { gap: 0.5rem; }
        .gap-8 { gap: 2rem; }
        .space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
        .space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.5rem; }

        /* --- 颜色与背景 --- */
        .bg-white { background-color: #ffffff; }
        .bg-gray-50 { background-color: #f9fafb; }
        .bg-gray-100 { background-color: #f3f4f6; }
        .bg-gray-200 { background-color: #e5e7eb; }
        .bg-indigo-600 { background-color: #4f46e5; }
        
        .text-white { color: #ffffff; }
        .text-gray-400 { color: #9ca3af; }
        .text-gray-500 { color: #6b7280; }
        .text-gray-600 { color: #4b5563; }
        .text-gray-700 { color: #374151; }
        .text-gray-800 { color: #1f2937; }
        .text-indigo-400 { color: #818cf8; }
        .text-indigo-600 { color: #4f46e5; }
        .text-red-500 { color: #ef4444; }

        /* --- 边框与圆角 --- */
        .border { border-width: 1px; }
        .border-2 { border-width: 2px; }
        .border-t { border-top-width: 1px; }
        .border-dashed { border-style: dashed; }
        
        .border-gray-200 { border-color: #e5e7eb; }
        .border-gray-300 { border-color: #d1d5db; }
        .border-indigo-300 { border-color: #a5b4fc; }
        
        .rounded { border-radius: 0.25rem; }
        .rounded-md { border-radius: 0.375rem; }
        .rounded-lg { border-radius: 0.5rem; }
        .rounded-xl { border-radius: 0.75rem; }

        /* --- 字体排版 --- */
        .text-xs { font-size: 0.75rem; line-height: 1rem; }
        .text-sm { font-size: 0.875rem; line-height: 1.25rem; }
        .text-lg { font-size: 1.125rem; line-height: 1.75rem; }
        .text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
        .text-center { text-align: center; }
        .text-right { text-align: right; }
        .font-medium { font-weight: 500; }
        .font-semibold { font-weight: 600; }
        .font-bold { font-weight: 700; }
        .underline { text-decoration: underline; }

        /* --- 效果与交互 --- */
        .shadow { box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px 0 rgba(0,0,0,0.06); }
        .shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); }
        .shadow-xl { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04); }
        .opacity-30 { opacity: 0.3; }
        
        .transition { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
        .transition-colors { transition-property: background-color, border-color, color, fill, stroke; transition-duration: 150ms; }
        .cursor-pointer { cursor: pointer; }
        
        .hover\:bg-gray-50:hover { background-color: #f9fafb; }
        .hover\:bg-indigo-50:hover { background-color: #eef2ff; }
        .hover\:bg-indigo-700:hover { background-color: #4338ca; }
        .hover\:text-red-700:hover { color: #b91c1c; }
        .hover\:opacity-90:hover { opacity: 0.9; }
        
        .focus\:ring-indigo-500:focus { outline: 2px solid transparent; outline-offset: 2px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #6366f1; }
        .focus\:border-indigo-500:focus { border-color: #6366f1; }
        
        .disabled\:opacity-50:disabled { opacity: 0.5; }
        .disabled\:cursor-not-allowed:disabled { cursor: not-allowed; }

        /* --- 其他组件样式 --- */
        .appearance-none { -webkit-appearance: none; appearance: none; }
        .accent-indigo-600 { accent-color: #4f46e5; }
        .object-contain { object-fit: contain; }
        .overflow-auto { overflow: auto; }
        
        /* 布局激活状态（脚本中使用） */
        .layout-btn.active { background-color: #4f46e5; color: white; }

        /* 背景纹理 */
        .canvas-pattern {
            background-color: #f0f0f0;
            background-image: linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0),
            linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0);
            background-size: 20px 20px;
            background-position: 0 0, 10px 10px;
        }
        
        .mlogo a img { display:inline-block;}