:root {
    --bg-black: #0f0f0f;
    --bg-dark: #1a1a1a;
    --panel-gray: #151515;
    --toolbar-black: #0d0d0d;
    --border-gray: #2a2a2a;
    --accent-white: #ffffff;
    --accent-red: #FF0000;
    --accent-blue: #3B82F6;
    --text-primary: #e8e8e8;
    --text-secondary: #a0a0a0;
    --text-dim: #6f6f6f;
    --font-mono: 'JetBrains Mono', monospace;
    --mobile-sheet-height: min(46dvh, 420px);
    --mobile-canvas-top: 52px;
    --mobile-canvas-bottom: 0px;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body, html {
    margin: 0; 
    padding: 0;
    background: linear-gradient(135deg, var(--bg-black) 0%, var(--bg-dark) 100%);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 'Inter', sans-serif;
    overflow: hidden;
}

.velecore-app { display: flex; flex-direction: column; height: 100vh; }

/* 頭部按鈕容器 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 標準文字按鈕 */
.btn-text {
    padding: 10px 18px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-text:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-text:active {
    transform: translateY(0);
}

/* 主要操作按鈕 */
.btn-primary {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--accent-red) 0%, #E60000 100%);
    border: none;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #FF1a1a 0%, #FF0000 100%);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.5);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.3);
}

/* 頂部導航 */
.app-header {
    display: flex;
    justify-content: space-between;
    padding: 12px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(30, 30, 30, 0.8) 0%, rgba(20, 20, 20, 0.6) 100%);
    backdrop-filter: blur(20px);
    align-items: center;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.brand { 
    font-weight: 900; 
    letter-spacing: 2px; 
    font-size: 15px;
    background: linear-gradient(90deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand span { 
    font-weight: 300; 
    color: var(--text-dim);
}

/* 主佈局 */
.main-layout { display: flex; flex: 1; overflow: hidden; }

/* 左側畫布區 */
.canvas-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
}

.canvas-wrapper {
    width: 100%; 
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    overflow: hidden;
}

/* 右側整合側邊欄 */
.editor-sidebar {
    display: flex;
    flex-direction: row-reverse;
    width: 400px;
    background: linear-gradient(180deg, var(--panel-gray) 0%, #0f0f0f 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    height: 100%;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
}

/* 垂直工具列 (Toolbar) */
.v-toolbar {
    width: 50px;
    background: var(--toolbar-black);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    border-left: 1px solid var(--border-gray);
}

/* 垂直工具列 (Toolbar) */
.v-toolbar {
    width: 60px;
    background: linear-gradient(180deg, #0d0d0d 0%, #0a0a0a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    gap: 12px;
}

.tool-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid transparent;
    color: #666;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    position: relative;
}

.tool-btn:hover { 
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.tool-btn.active { 
    color: #fff; 
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.2), rgba(59, 130, 246, 0.2));
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* 參數控制面板 (Control Panel) */
.control-panel {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
    background: var(--panel-gray);
}

.control-panel::-webkit-scrollbar { 
    width: 6px; 
}

.control-panel::-webkit-scrollbar-track {
    background: transparent;
}

.control-panel::-webkit-scrollbar-thumb { 
    background: rgba(255, 255, 255, 0.1); 
    border-radius: 3px;
    transition: all 0.3s ease;
}

.control-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.panel-content { display: none; }
.panel-content.active { display: block; }

/* 模組區塊樣式 */
.v-section { 
    margin-bottom: 28px; 
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.v-section:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.v-header {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-dim);
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
    font-weight: 600;
}

/* 滑桿與數值 */
.s-item { 
    margin-bottom: 14px; 
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.s-item span { 
    font-size: 13px; 
    color: var(--text-secondary);
    font-weight: 500;
}

.s-item input[type="number"] {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-white); 
    font-family: var(--font-mono);
    font-size: 12px; 
    text-align: right; 
    width: 70px; 
    padding: 6px 10px;
    outline: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.s-item input[type="number"]:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.s-item input[type="number"]:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

input[type="range"] {
    -webkit-appearance: none; 
    width: 100%; 
    height: 4px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    margin-top: 8px; 
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s ease;
}

input[type="range"]:hover {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; 
    width: 14px; 
    height: 14px;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.6);
}

input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

/* 色彩混合點 */
.color-dots { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.dot {
    width: 18px; 
    height: 18px; 
    border-radius: 50%; 
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.15); 
    filter: grayscale(70%); 
    opacity: 0.6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dot:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.dot.active { 
    border-color: #fff; 
    transform: scale(1.3); 
    filter: grayscale(0%); 
    opacity: 1;
    box-shadow: 0 0 15px currentColor;
}

.dot.red { background: #ff4d4d; } 
.dot.orange { background: #ff9f4d; }
.dot.yellow { background: #ffd94d; } 
.dot.green { background: #4dff88; }
.dot.aqua { background: #4dffff; } 
.dot.blue { background: #4d88ff; }
.dot.purple { background: #9f4dff; } 
.dot.magenta { background: #ff4dff; }

/* 顏色分級色輪 */
.grading-container { display: flex; justify-content: space-between; gap: 8px; }
.wheel-box { text-align: center; font-size: 9px; color: #666; }
.color-wheel {
    width: 75px; height: 75px; border-radius: 50%;
    background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red);
    margin-top: 10px; border: 1px solid #333; position: relative; cursor: crosshair;
}
/* 1. 刪除原本這個 */
/* .color-wheel::after { ... } */

/* 2. 加入這個新的樣式 */
.wheel-handle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    border: 1px solid #000;
    /* 關鍵：讓中心點對準座標 */
    transform: translate(-50%, -50%);
    pointer-events: none; /* 確保 handle 不會擋住滑鼠點擊色輪 */

    /* 初始位置在正中間 */
    top: 50%;
    left: 50%;
}

/* 確保色輪本身是 relative */
.color-wheel {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red);
    margin-top: 10px;
    border: 1px solid #333;
    position: relative; /* 必須是 relative 讓 handle 參考 */
    cursor: crosshair;
}

/* 曲線 */
.curve-container { background: #000; border: 1px solid #222; margin-top: 10px; padding: 5px; }
.v-tabs.mini { 
    margin-bottom: 10px; 
    display: flex; 
    gap: 6px;
}

.v-tabs.mini button {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    padding: 6px 12px; 
    font-size: 11px; 
    cursor: pointer; 
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.v-tabs.mini button:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    border-color: rgba(255, 255, 255, 0.2);
}

.v-tabs.mini button.active { 
    color: var(--text-primary); 
    border-color: rgba(59, 130, 246, 0.6);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
}

/* AI 功能按鈕 */
.btn-full {
    width: 100%; 
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary); 
    padding: 11px 16px; 
    margin-bottom: 10px;
    cursor: pointer; 
    font-size: 12px; 
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
}

.btn-full:hover { 
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-full:active {
    transform: translateY(0);
}

.mask-create-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.mask-workspace-top {
    display: grid;
    grid-template-columns: 1fr 80px;
    gap: 8px;
    margin-bottom: 10px;
}

.mask-create-menu {
    margin-bottom: 10px;
}

.mask-guide {
    font-size: 10px;
    color: #9d9d9d;
    line-height: 1.45;
    padding: 8px;
    border: 1px solid #2a2a2a;
    background: #141414;
    margin-bottom: 10px;
}

.mask-ai-status {
    margin: 0 0 12px 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.5;
    border-radius: 6px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mask-ai-status.is-error {
    border-color: rgba(255, 0, 0, 0.3);
    background: rgba(255, 0, 0, 0.08);
    color: #ff9090;
}

.mask-ai-status.is-success {
    border-color: rgba(0, 255, 100, 0.3);
    background: rgba(0, 255, 100, 0.08);
    color: #90ffb0;
}

.mask-create-grid .btn-full {
    margin-bottom: 0;
    padding: 8px;
    font-size: 10px;
}

.mask-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.mask-item {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mask-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(2px);
}

.mask-item.active {
    border-color: rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.08));
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.mask-item-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mask-item-name {
    font-size: 11px;
    color: #e9e9e9;
}

.mask-item-meta {
    font-size: 10px;
    color: #7f7f7f;
}

.mask-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mask-visibility {
    width: 22px;
    height: 22px;
    border: 1px solid #3a3a3a;
    background: #101010;
    color: #eee;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.mask-controls.hidden {
    display: none;
}

.mask-empty {
    font-size: 11px;
    color: #666;
    margin-bottom: 12px;
}

.mask-inline-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

.mask-component-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 8px;
}

.mask-component-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.mask-component-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #2f2f2f;
    background: #151515;
    border-radius: 3px;
    padding: 6px 8px;
    font-size: 10px;
    color: #cfcfcf;
    cursor: pointer;
}

.mask-component-item.active {
    border-color: #507d66;
    background: #18231c;
    color: #e9fff3;
}

.btn-small {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    color: var(--text-secondary);
    padding: 9px 12px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-small:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-small.active {
    border-color: rgba(59, 130, 246, 0.6);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
    color: #a0d8ff;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.btn-small.danger {
    border-color: rgba(255, 0, 0, 0.3);
    color: #ff9090;
}

.btn-small.danger:hover {
    background: rgba(255, 0, 0, 0.15);
    border-color: rgba(255, 0, 0, 0.5);
}

.mask-select {
    width: 100%;
    margin-top: 8px;
    background: #1b1b1b;
    border: 1px solid #333;
    color: #e4e4e4;
    padding: 7px;
    font-size: 11px;
    border-radius: 2px;
}

.local-header {
    margin-top: 12px;
}

.local-controls {
    border: 1px solid #272727;
    background: #131313;
    padding: 8px;
    border-radius: 3px;
    max-height: 300px;
    overflow-y: auto;
}

.local-group {
    border: 1px solid #222;
    background: #101010;
    border-radius: 3px;
    padding: 8px;
    margin-bottom: 8px;
}

.local-group:last-child {
    margin-bottom: 0;
}

.local-group-title {
    font-size: 10px;
    letter-spacing: 1px;
    color: #8d8d8d;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.mask-hint {
    margin-top: 10px;
    font-size: 10px;
    color: #6f6f6f;
}

.hidden {
    display: none !important;
}

.auth-user-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border: 1px solid #2a2a2a;
    background: #141414;
    color: #bdbdbd;
    font-size: 11px;
    border-radius: 999px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.auth-modal-card {
    position: relative;
    width: min(420px, calc(100vw - 30px));
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.mobile-sheet-handle {
    display: none;
}

/* 導出設置面板樣式 */
#export-filename-template {
    font-family: 'Courier New', monospace;
}

.mask-hint {
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.6;
    padding: 8px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.mask-hint strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* --- 響應式設計 (RWD) --- */
@media (max-width: 1024px) {
    .editor-sidebar {
        width: 280px;
    }

    .v-section {
        padding: 16px;
    }

    .control-panel {
        max-height: calc(100vh - 80px);
    }
}

@media (max-width: 768px) {
    body, html {
        height: 100%;
        overflow: hidden;
    }

    .velecore-app {
        position: relative;
        height: 100dvh;
        min-height: 100dvh;
    }

    .app-header {
        position: absolute;
        left: 0;
        top: 0;
        right: 0;
        z-index: 30;
        padding: 10px 12px;
        border-bottom: none;
        box-shadow: none;
        background: linear-gradient(180deg, rgba(8, 8, 10, 0.82), rgba(8, 8, 10, 0.34) 60%, rgba(8, 8, 10, 0));
        backdrop-filter: blur(6px);
    }

    .main-layout {
        position: relative;
        flex-direction: column;
        min-height: 0;
        flex: 1 1 auto;
    }

    .canvas-area {
        flex: 1 1 auto;
        min-height: 0;
        padding-top: var(--mobile-canvas-top);
        padding-bottom: var(--mobile-canvas-bottom);
    }

    .canvas-wrapper {
        border-radius: 0;
        border: none;
        box-shadow: none;
    }

    .editor-sidebar {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: var(--mobile-sheet-height);
        min-height: 180px;
        max-height: 72%;
        display: flex;
        flex-direction: column-reverse;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.14);
        background: linear-gradient(180deg, rgba(14, 14, 16, 0.72), rgba(10, 10, 12, 0.9));
        backdrop-filter: blur(14px);
        box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.45);
        overflow: hidden;
        z-index: 8;
    }

    .mobile-sheet-handle {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 78px;
        height: 24px;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 12;
        touch-action: none;
        cursor: ns-resize;
    }

    .mobile-sheet-handle span {
        width: 42px;
        height: 4px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.55);
        box-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
    }

    .header-actions {
        flex-wrap: wrap;
        gap: 6px;
        row-gap: 6px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .header-actions::-webkit-scrollbar { display: none; }

    .btn-text, .btn-primary {
        padding: 7px 10px;
        font-size: 11px;
        white-space: nowrap;
    }

    .v-toolbar {
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        padding: 8px;
        border-left: none;
        border-bottom: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(9, 9, 11, 0.82);
    }

    .tool-btn {
        flex: 0 0 auto;
        width: auto;
        min-width: 56px;
        height: 38px;
        padding: 8px 10px;
        font-size: 11px;
        border-radius: 8px;
    }

    .control-panel {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        padding: 12px 12px 18px;
        background: transparent;
    }

    body.mobile-slider-focus .app-header {
        opacity: 0.08;
        pointer-events: none;
        transition: opacity 120ms ease;
    }

    body.mobile-slider-focus .v-toolbar {
        opacity: 0.08;
        pointer-events: none;
        transition: opacity 120ms ease;
    }

    body.mobile-slider-focus .control-panel .v-section {
        opacity: 0.15;
        filter: blur(1px);
        transition: opacity 120ms ease, filter 120ms ease;
        pointer-events: none;
    }

    body.mobile-slider-focus .control-panel .v-section.slider-focus-section {
        opacity: 1;
        filter: none;
        pointer-events: auto;
    }

    body.mobile-slider-focus .control-panel .v-section.slider-focus-section .s-item {
        opacity: 0.18;
        transition: opacity 120ms ease;
    }

    body.mobile-slider-focus .control-panel .v-section.slider-focus-section .s-item.slider-focus-item {
        opacity: 1;
    }

    .v-section {
        padding: 12px;
        margin-bottom: 12px;
    }

    .v-header {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .s-item {
        font-size: 12px;
        gap: 8px;
    }

    .s-item input, .s-item select {
        font-size: 12px;
        padding: 6px;
    }

    input[type="range"] {
        height: 4px;
    }

    .mask-list, .mask-component-list {
        max-height: 150px;
    }
}

@media (max-width: 480px) {
    .app-header {
        height: auto;
        flex-wrap: wrap;
        padding: 8px;
    }

    .brand {
        font-size: 16px;
    }

    .header-actions {
        width: 100%;
        margin-top: 8px;
        gap: 6px;
    }

    .btn-text, .btn-primary {
        padding: 6px 10px;
        font-size: 11px;
        flex: 1;
        min-width: 50px;
    }

    .main-layout {
        min-height: 0;
    }

    .canvas-area {
        flex: 1 1 auto;
        min-height: 0;
        padding: 0;
    }

    .editor-sidebar {
        height: min(52dvh, 470px);
        max-height: 78%;
        overflow: hidden;
    }

    .mobile-sheet-handle {
        width: 70px;
    }

    .mobile-sheet-handle span {
        width: 36px;
    }

    .v-toolbar {
        gap: 4px;
        padding: 4px;
    }

    .tool-btn {
        min-width: 50px;
        padding: 6px 6px;
        font-size: 10px;
    }

    .control-panel {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        padding: 8px;
    }

    .v-section {
        padding: 8px;
        margin-bottom: 8px;
    }

    .feature-item, .product-card {
        padding: 20px 12px;
    }

    .mask-list {
        max-height: 100px;
        font-size: 11px;
    }

    input[type="range"] {
        height: 3px;
    }

    .auth-modal-card {
        width: 90vw;
        max-width: 100%;
        margin: 16px;
    }

    .s-item input[type="text"], 
    .s-item input[type="email"],
    .s-item select {
        font-size: 14px;
    }
}
