/* Shared project rail — fill iframe viewport reliably.
   Canvas always locks page scroll (board pans).
   Auto-script locks only on the list gate; editor must be able to scroll. */

html, body {
    width: 100% !important;
    margin: 0 !important;
    overscroll-behavior: none !important;
    scrollbar-gutter: auto;
}

/* Infinite canvas: lock page scroll */
html.studio-project-canvas,
html.studio-project-canvas body {
    height: 100% !important;
    overflow: hidden !important;
}

.shell {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    overflow: hidden !important;
}

/* Auto-script list gate: lock page scroll like canvas */
html.studio-script-gate,
html.studio-script-gate body {
    height: 100% !important;
    overflow: hidden !important;
}

.as-shell {
    position: relative !important;
    width: 100% !important;
    min-height: 100% !important;
}

.as-shell.no-project {
    height: 100% !important;
    overflow: hidden !important;
}

/* Auto-script editor: allow document scroll for the tall table page */
html.studio-script-editor,
html.studio-script-editor body {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

.as-shell:not(.no-project) {
    height: auto !important;
    overflow: visible !important;
}

/* Gate pins to iframe viewport */
.canvas-gate,
.as-gate {
    position: fixed !important;
    inset: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    z-index: 40 !important;
}

/* Show only on list/manager mode; hide after entering canvas/editor */
.shell.no-canvas .canvas-gate,
.as-shell.no-project .as-gate {
    display: flex !important;
    pointer-events: auto !important;
}
.shell:not(.no-canvas) .canvas-gate,
.as-shell:not(.no-project) .as-gate {
    display: none !important;
    pointer-events: none !important;
}

.gate-panel.has-projects,
.as-gate-panel.has-projects,
.gate-panel:has(.studio-proj-workspace),
.as-gate-panel:has(.studio-proj-workspace),
.pv-gate-panel:has(.studio-proj-workspace) {
    position: absolute !important;
    inset: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    flex: none !important;
    display: flex !important;
    flex-direction: column !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
    border: none !important;
}

.gate-panel.has-projects > .gate-panel-frame,
.gate-panel:has(.studio-proj-workspace) > .gate-panel-frame {
    display: none !important;
}

.studio-proj-workspace {
    position: absolute !important;
    inset: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: 8px !important;
    bottom: 8px !important;
    flex: none !important;
    display: grid !important;
    grid-template-columns: 200px minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    width: min(1280px, calc(100% - 56px)) !important;
    max-width: min(1280px, calc(100% - 56px)) !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    gap: 0 !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.studio-proj-rail {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line, #e8e4dc);
    background: color-mix(in srgb, var(--page, #faf9f7) 88%, #fff);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.studio-proj-main {
    grid-column: 2;
    grid-row: 1;
    min-width: 0 !important;
    min-height: 0 !important;
    height: 100% !important;
    width: auto !important;
    max-width: none !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 14px 16px 12px;
    overflow: hidden !important;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

.studio-proj-rail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 14px 10px;
    flex: 0 0 auto;
}
.studio-proj-rail-title {
    font-family: var(--font-display, Georgia, "Noto Serif SC", serif);
    font-size: 15px;
    font-weight: 700;
    color: var(--text, #1c1a17);
}
.studio-proj-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border: 1px solid var(--line, #e8e4dc);
    border-radius: 4px;
    background: #fff;
    color: var(--text, #1c1a17);
    font-size: 18px;
    cursor: pointer;
}
.studio-proj-add:hover {
    border-color: var(--accent, #e11d48);
    color: var(--accent, #e11d48);
}

.studio-proj-create-row {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 0 12px 10px;
    flex: 0 0 auto;
}
.studio-proj-create-row.open { display: flex; }
.studio-proj-create-row input {
    flex: 1; min-width: 0; height: 30px; padding: 0 8px;
    border: 1px solid var(--line, #e8e4dc); border-radius: 4px;
    background: #fff; font-size: 12px; color: var(--text, #1c1a17);
}
.studio-proj-create-row button {
    width: 28px; height: 28px;
    border: 1px solid var(--line, #e8e4dc); border-radius: 4px;
    background: #fff; cursor: pointer; font-size: 13px; color: var(--text, #1c1a17);
}

.studio-proj-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 4px 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.studio-proj-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text, #1c1a17);
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}
.studio-proj-item:hover { background: rgba(28, 26, 23, .05); }
.studio-proj-item.active { background: var(--text, #1c1a17); color: #fff; }
.studio-proj-item.active .studio-proj-count {
    background: rgba(255, 255, 255, .18); color: #fff;
}
.studio-proj-item-icon { flex: 0 0 auto; opacity: .72; display: inline-flex; }
.studio-proj-item.active .studio-proj-item-icon { opacity: 1; }
.studio-proj-item-name {
    flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.studio-proj-count {
    flex: 0 0 auto; min-width: 20px; height: 18px; padding: 0 6px;
    border-radius: 999px; background: rgba(28, 26, 23, .08);
    color: var(--muted, #6b6560); font-size: 10px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center;
}
.studio-proj-item-menu {
    flex: 0 0 auto; width: 22px; height: 22px; border: 0; border-radius: 4px;
    background: transparent; color: inherit; opacity: 0; cursor: pointer; font-size: 14px;
}
.studio-proj-item:hover .studio-proj-item-menu,
.studio-proj-item.active .studio-proj-item-menu { opacity: .85; }

.studio-proj-rail-foot {
    padding: 10px 8px 12px;
    border-top: 1px solid var(--line, #e8e4dc);
    flex: 0 0 auto;
}
.studio-proj-rail-foot .gate-trash-badge,
.studio-proj-rail-foot .as-gate-trash-badge {
    position: static; margin-left: auto; min-width: 18px; height: 18px; border: 0;
}
.studio-proj-trash-btn {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 9px 10px; border: 0; border-radius: 6px;
    background: transparent; color: var(--muted, #6b6560);
    font-size: 13px; font-weight: 650; cursor: pointer; position: relative;
}
.studio-proj-trash-btn:hover { background: rgba(28, 26, 23, .05); color: var(--text, #1c1a17); }
.studio-proj-trash-btn.active {
    background: rgba(225, 29, 72, .1); color: var(--accent, #e11d48);
}

.studio-proj-main .gate-head,
.studio-proj-main .as-gate-head {
    margin-bottom: 10px;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 10px;
}
.studio-proj-main .gate-head-actions,
.studio-proj-main .as-gate-actions {
    flex: 1 1 auto;
    justify-content: flex-end;
    flex-wrap: wrap;
    max-width: 100%;
}

.studio-proj-main .gate-list,
.studio-proj-main .as-gate-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
    width: 100% !important;
    overflow: auto !important;
    margin-top: 8px !important;
    align-content: start !important;
}

.gate-head-actions .gate-trash-entry,
.as-gate-actions #asGateTrashBtn.studio-proj-trash-moved {
    display: none !important;
}

.theme-dark .studio-proj-rail,
html.studio-theme-dark .studio-proj-rail {
    background: color-mix(in srgb, var(--card-solid, #1a1816) 92%, #000);
}
.theme-dark .studio-proj-add,
.theme-dark .studio-proj-create-row input,
.theme-dark .studio-proj-create-row button,
html.studio-theme-dark .studio-proj-add,
html.studio-theme-dark .studio-proj-create-row input,
html.studio-theme-dark .studio-proj-create-row button {
    background: var(--card-solid, #1a1816);
    color: var(--text, #f5f2eb);
    border-color: var(--line, #3a3530);
}
.theme-dark .studio-proj-item:hover,
html.studio-theme-dark .studio-proj-item:hover { background: rgba(255, 255, 255, .06); }
.theme-dark .studio-proj-item.active,
html.studio-theme-dark .studio-proj-item.active { background: #f5f2eb; color: #1c1a17; }
.theme-dark .studio-proj-item.active .studio-proj-count,
html.studio-theme-dark .studio-proj-item.active .studio-proj-count {
    background: rgba(28, 26, 23, .12); color: #1c1a17;
}
.theme-dark .studio-proj-main .gate-list,
.theme-dark .studio-proj-main .as-gate-list,
html.studio-theme-dark .studio-proj-main .gate-list,
html.studio-theme-dark .studio-proj-main .as-gate-list {
    background: rgba(255, 255, 255, .03);
}

@media (max-width: 900px) {
    .studio-proj-workspace {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto minmax(0, 1fr) !important;
    }
    .studio-proj-rail {
        max-height: 160px;
        border-right: 0;
        border-bottom: 1px solid var(--line, #e8e4dc);
    }
    .studio-proj-rail-foot { display: none; }
    .gate-head-actions .gate-trash-entry,
    .as-gate-actions #asGateTrashBtn.studio-proj-trash-moved {
        display: inline-flex !important;
    }
}

.studio-proj-workspace.gate-dash-compact {
    grid-template-columns: minmax(0, 1fr) !important;
}
.studio-proj-workspace.gate-dash-compact > .studio-proj-rail,
.studio-proj-workspace.gate-dash-compact #gateDashSettings {
    display: none !important;
}
.studio-proj-workspace.gate-dash-compact > .studio-proj-main {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: none !important;
}

/* 无限画布门禁：左侧「聚集」项目树 + 右侧「分级」列表 */
.studio-proj-workspace.gate-has-rail {
    grid-template-columns: 200px minmax(0, 1fr) !important;
    gap: 0;
}
.studio-proj-workspace.gate-has-rail > .studio-proj-rail {
    display: flex !important;
}
.studio-proj-workspace.gate-has-rail #gateDashSettings {
    display: none !important;
}
.gate-ep-group {
    margin: 0 0 18px;
}
.gate-ep-group-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    padding: 0 2px;
}
.gate-ep-group-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #c8cdd6;
    letter-spacing: .02em;
}
.gate-ep-group-count {
    font-size: 11px;
    color: #7a8290;
    font-weight: 600;
}
.gate-ep-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 28px 22px;
}
.gate-series-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 12px;
}
.gate-series-chip {
    appearance: none;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.04);
    color: #a4abb6;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 650;
    cursor: pointer;
    font-family: inherit;
}
.gate-series-chip.active,
.gate-series-chip:hover {
    color: #e8eaef;
    border-color: rgba(242, 227, 173, .45);
    background: rgba(242, 227, 173, .14);
}
.gate-create-field-row {
    display: grid;
    grid-template-columns: 1fr 88px;
    gap: 10px;
    width: 100%;
}
.gate-create-field-ep input {
    width: 100%;
}
.canvas-card-ep {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 650;
    color: #9aa3b5;
}
.gate-dash-assets-head .studio-proj-trash-btn,
.gate-dash-assets-acts .studio-proj-trash-btn {
    height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.04);
    color: #a4abb6;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    cursor: pointer;
}
.gate-dash-assets-head .studio-proj-trash-btn:hover,
.gate-dash-assets-acts .studio-proj-trash-btn:hover {
    color: #e6e8ec;
    background: rgba(255,255,255,.08);
}

/* ========== Gate dashboard (参考：资产管理 + 无限画布卡片) ========== */
.studio-proj-main.gate-dash {
    padding: 12px 18px 14px;
    gap: 0;
    background: transparent;
}
.theme-dark .studio-proj-workspace:has(.gate-dash),
html.studio-theme-dark .studio-proj-workspace:has(.gate-dash) {
    background: #121214;
}
.theme-dark .studio-proj-main.gate-dash,
html.studio-theme-dark .studio-proj-main.gate-dash {
    background: #121214;
}
.gate-dash .gate-dash-legacy-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0 10px;
}
/* 创建改走下方「创建画布」按钮，避免右上角重复 */
.gate-dash .gate-dash-legacy-head #gateCreateBtn,
.gate-dash .gate-dash-legacy-head #gateCreateSmartBtn,
.gate-dash .gate-dash-legacy-head #gateAssetManagerBtn {
    display: none !important;
}
.canvas-gate.trash-mode .gate-dash .gate-dash-legacy-head,
.canvas-gate.creating .gate-dash .gate-dash-legacy-head {
    display: flex;
}
.canvas-gate.trash-mode .gate-dash-settings,
.canvas-gate.trash-mode .gate-dash-assets,
.canvas-gate.trash-mode .gate-dash-tabs,
.canvas-gate.trash-mode .gate-dash-workshop,
.canvas-gate.creating .gate-dash-settings,
.canvas-gate.creating .gate-dash-assets,
.canvas-gate.creating .gate-dash-tabs,
.canvas-gate.creating .gate-dash-workshop {
    display: none !important;
}
.canvas-gate.trash-mode .gate-dash-list .gate-create-tile {
    display: none !important;
}

.gate-dash-settings {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 4px 0 14px;
    flex: 0 0 auto;
}
.gate-dash-settings-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 0;
    background: transparent;
    color: var(--text, #f4efe8);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}
.gate-dash-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}
.gate-dash-chip {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    color: #e8e6ef;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.gate-dash-chip.muted { color: #9ca3af; }
.gate-dash-script-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    height: 30px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(96,165,250,.35);
    background: rgba(37,99,235,.18);
    color: #bfdbfe;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.gate-dash-script-btn:hover { background: rgba(37,99,235,.28); }

.gate-dash-assets {
    flex: 0 0 auto;
    margin-bottom: 18px;
}
.gate-dash-assets-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    width: 100%;
}
.gate-dash-assets-title {
    margin: 0;
    font-size: 15px;
    font-weight: 750;
    color: var(--text, #f4efe8);
    flex: 0 0 auto;
}
.gate-dash-assets-head > .gate-dash-ai-btn {
    margin-left: 0;
    flex: 0 0 auto;
}
.gate-dash-search {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    min-width: 200px;
    max-width: 280px;
    flex: 1 1 220px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
    color: #9ca3af;
}
.gate-dash-search:focus-within {
    border-color: rgba(167,139,250,.45);
    background: rgba(255,255,255,.06);
    color: #e5e7eb;
}
.gate-dash-search input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: #f3f4f6;
    font-size: 12px;
    font-weight: 600;
}
.gate-dash-search input::placeholder { color: #6b7280; }
.gate-dash-ai-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(109, 40, 217, .28);
    white-space: nowrap;
}
.gate-dash-ai-btn:hover { filter: brightness(1.06); }
.gate-dash-ai-badge {
    position: absolute;
    top: -10px;
    right: -6px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #f97316;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    line-height: 1.4;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.gate-dash-asset-cards {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}
.gate-dash-asset-cards-compact .gate-dash-asset-card {
    height: 44px;
}
.gate-dash-asset-card {
    position: relative;
    height: 44px;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    padding: 0 14px;
    color: #fff;
    isolation: isolate;
    display: flex;
    align-items: center;
}
.gate-dash-asset-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: .95;
}
.gate-dash-asset-card.cat-script::before {
    background: linear-gradient(120deg, #1a1f3a 0%, #3730a3 55%, #12152a 100%);
}
.gate-dash-asset-card.cat-char::before {
    background: linear-gradient(120deg, #2a1848 0%, #4c1d95 55%, #1e1235 100%);
}
.gate-dash-asset-card.cat-scene::before {
    background: linear-gradient(120deg, #0f2a22 0%, #14532d 55%, #0b1f18 100%);
}
.gate-dash-asset-card.cat-prop::before {
    background: linear-gradient(120deg, #2a2210 0%, #854d0e 55%, #1c1608 100%);
}
.gate-dash-asset-card.cat-other::before {
    background: linear-gradient(120deg, #0c2233 0%, #0e7490 55%, #08202c 100%);
}
.gate-dash-asset-card:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.14); }
.gate-dash-asset-cards-compact .gate-dash-asset-illu { display: none !important; }
.gate-dash-asset-illu { display: none; }
.gate-dash-asset-label {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: .02em;
    color: #fff;
}

.gate-dash-tabs {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 0 0 auto;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding-bottom: 8px;
}
.gate-dash-tab {
    border: 0;
    background: transparent;
    color: #9ca3af !important;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 0;
    position: relative;
    opacity: 1;
}
.gate-dash-tab:hover {
    color: #f3f4f6 !important;
}
.gate-dash-tab.active,
.theme-dark .gate-dash-tab.active,
html.studio-theme-dark .gate-dash-tab.active {
    color: #fafafa !important;
}
.gate-dash-tab.active::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -9px;
    height: 2px;
    border-radius: 2px;
    background: #a78bfa;
}
.gate-dash-tab-count { font-weight: 650; opacity: .9; color: inherit !important; }
.gate-dash-tab:not(.active) .gate-dash-tab-count { opacity: .75; }
.gate-dash-create-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(109, 40, 217, .28);
    white-space: nowrap;
}
.gate-dash-create-btn:hover { filter: brightness(1.06); }
.gate-list-empty .gate-dash-create-btn {
    margin: 16px auto 0;
}
.gate-dash-more { display: none !important; }

.gate-dash-workshop {
    flex: 1 1 auto;
    min-height: 180px;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 12px;
    background: rgba(0,0,0,.22);
    display: flex;
    align-items: center;
    justify-content: center;
}
.gate-dash-workshop[hidden] { display: none !important; }
.gate-dash-workshop-empty {
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 650;
}
.gate-dash-spinner {
    width: 28px; height: 28px;
    margin: 0 auto 12px;
    border-radius: 50%;
    border: 2px solid rgba(167,139,250,.25);
    border-top-color: #a78bfa;
    animation: gate-dash-spin .8s linear infinite;
}
@keyframes gate-dash-spin { to { transform: rotate(360deg); } }

.studio-proj-main.gate-dash .gate-status {
    display: none;
}
.canvas-gate.trash-mode .studio-proj-main.gate-dash .gate-status,
.canvas-gate.creating .studio-proj-main.gate-dash .gate-status {
    display: block;
}

.studio-proj-main.gate-dash .gate-dash-list {
    margin-top: 0 !important;
    padding: 12px 6px 24px !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    grid-template-columns: none !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: auto !important;
}
.studio-proj-main.gate-dash .gate-dash-list[hidden] {
    display: none !important;
}

.studio-proj-main.gate-dash .gate-create-row { display: none !important; }

/* 历史资产风格卡片 */
.studio-proj-main.gate-dash .gate-dash-list .canvas-item.gate-hist-card {
    aspect-ratio: auto !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 !important;
    position: relative;
}
.studio-proj-main.gate-dash .gate-dash-list .canvas-item.gate-hist-card:hover {
    border: 0 !important;
    box-shadow: none !important;
    transform: none;
}
.gate-hist-thumb {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #0f1012;
    border: 1px solid rgba(255,255,255,.08);
    cursor: pointer;
}
.gate-hist-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gate-hist-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #c4b5fd;
    background:
        radial-gradient(circle at 30% 25%, rgba(167,139,250,.28), transparent 55%),
        linear-gradient(160deg, #1c1a24, #121218 70%);
}
.gate-hist-thumb .canvas-kind-chip {
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 2;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(0,0,0,.55);
    color: #e9d5ff;
    border: 1px solid rgba(255,255,255,.12);
}
.gate-hist-meta-btn {
    position: absolute !important;
    left: 8px;
    bottom: 8px;
    z-index: 3;
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
    opacity: 0;
    transition: opacity .15s ease;
}
.gate-hist-card:hover .gate-hist-meta-btn { opacity: 1; }
.gate-hist-top-btn {
    position: absolute !important;
    top: 8px;
    left: 8px;
    z-index: 3;
    width: 28px !important;
    height: 28px !important;
    opacity: 0;
    border-radius: 8px !important;
}
.gate-hist-top-btn-right { left: auto; right: 8px; }
.gate-hist-card:hover .gate-hist-top-btn,
.gate-hist-card .gate-hist-top-btn.active { opacity: 1; }
.gate-hist-actions {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    display: none;
    gap: 6px;
    justify-content: center;
    align-items: center;
    padding: 10px 8px;
    background: linear-gradient(transparent, rgba(0,0,0,.78));
    z-index: 2;
}
.gate-hist-card:hover .gate-hist-actions { display: flex; }
.gate-hist-enter {
    border: 0;
    border-radius: 8px;
    background: rgba(255,255,255,.95);
    color: #111;
    font-size: 12px;
    font-weight: 750;
    padding: 6px 12px;
    cursor: pointer;
}
.gate-hist-enter:hover { background: #fff; }
.gate-hist-edit-title {
    border: 0;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.18);
    color: #fff;
    cursor: pointer;
}
.gate-hist-edit-title:hover { background: rgba(255,255,255,.28); }
.gate-hist-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 0 2px;
}
.studio-proj-main.gate-dash .gate-dash-list .gate-hist-card .canvas-card-title {
    padding: 0 !important;
    font-size: 13px;
    font-weight: 750;
    color: #f3f4f6;
    line-height: 1.35;
    display: block !important;
    flex: 1 1 0% !important;
    min-width: 0;
    overflow: hidden !important;
    text-overflow: ellipsis;
    white-space: nowrap;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    min-height: 1.35em;
    visibility: visible !important;
    opacity: 1 !important;
}
.studio-proj-main.gate-dash .gate-dash-list .gate-hist-card .canvas-card-meta {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    color: #9ca3af !important;
    font-size: 11px;
}
.studio-proj-main.gate-dash .gate-dash-list .gate-hist-card .canvas-owner-chip {
    margin: 0 !important;
    align-self: flex-start;
}
.studio-proj-main.gate-dash .gate-dash-list .gate-hist-card.active .gate-hist-thumb {
    outline: 2px solid rgba(167,139,250,.7);
    outline-offset: 2px;
}
.studio-proj-main.gate-dash .gate-dash-list .gate-hist-card.active .canvas-card-title,
.studio-proj-main.gate-dash .gate-dash-list .gate-hist-card.active .canvas-card-time {
    color: #f8fafc !important;
}
.gate-hist-confirm {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.72);
    padding: 10px;
}

/* 创建画布弹窗 */
.gate-create-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    place-items: center;
    padding: 24px;
    background: rgba(0,0,0,.58);
    backdrop-filter: blur(6px);
}
.gate-create-modal.open,
.gate-create-modal:not([hidden]) {
    display: grid;
}
.gate-create-modal[hidden] { display: none !important; }
.gate-create-modal-panel {
    width: min(420px, 100%);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.1);
    background: #17171c;
    box-shadow: 0 24px 80px rgba(0,0,0,.5);
    overflow: hidden;
}
.gate-create-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 8px;
}
.gate-create-modal-title {
    font-size: 16px;
    font-weight: 780;
    color: #f8fafc;
}
.gate-create-modal-sub {
    margin-top: 4px;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
}
.gate-create-modal-close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    color: #cbd5e1;
    display: grid;
    place-items: center;
    cursor: pointer;
}
.gate-create-modal-close:hover { background: rgba(255,255,255,.1); color: #fff; }
.gate-create-modal-body {
    padding: 8px 18px 6px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.gate-create-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    border: 1px dashed rgba(255,255,255,.18);
    background: rgba(255,255,255,.03);
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    color: #94a3b8;
}
.gate-create-cover:hover {
    border-color: rgba(167,139,250,.45);
    background: rgba(167,139,250,.06);
}
.gate-create-cover.has-cover {
    border-style: solid;
    border-color: rgba(255,255,255,.12);
}
.gate-create-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gate-create-cover-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
}
.gate-create-cover-hint {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}
.gate-create-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #cbd5e1;
}
.gate-create-field input {
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
    color: #f8fafc;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 650;
    outline: none;
}
.gate-create-field input:focus {
    border-color: rgba(167,139,250,.55);
    box-shadow: 0 0 0 3px rgba(167,139,250,.15);
}
.gate-create-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px 18px;
}
.gate-create-modal-cancel {
    height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.1);
    background: transparent;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.gate-create-modal-cancel:hover { background: rgba(255,255,255,.06); color: #fff; }
.gate-create-modal-confirm {
    height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    border: 0;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.gate-create-modal-confirm:hover { filter: brightness(1.06); }
.gate-create-modal-confirm:disabled { opacity: .55; cursor: wait; }

.gate-create-tile {
    aspect-ratio: 4 / 5 !important;
    background: linear-gradient(160deg, rgba(91,33,182,.45), rgba(30,27,46,.9) 55%, #16141c) !important;
    border: 1px dashed rgba(167,139,250,.45) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
}
.gate-create-tile:hover {
    border-color: rgba(196,181,253,.75) !important;
    background: linear-gradient(160deg, rgba(109,40,217,.55), rgba(30,27,46,.95) 55%, #16141c) !important;
}
.gate-create-tile-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #e9d5ff;
    font-size: 13px;
    font-weight: 750;
}
.gate-create-tile-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    color: #f5f3ff;
}

.studio-proj-main.gate-dash .gate-dash-list .canvas-item:not(.gate-create-tile):not(.gate-hist-card) {
    aspect-ratio: 4 / 5;
    background: #1a1a1e;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 12px;
    overflow: hidden;
}
.studio-proj-main.gate-dash .gate-dash-list .canvas-item:not(.gate-create-tile):not(.gate-hist-card):hover {
    border-color: rgba(255,255,255,.14);
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
/* 选中态：深色底 + 亮字，压过 canvas-05「浅底深字」选中样式 */
html.studio-theme-dark body .studio-proj-main.gate-dash .gate-dash-list .canvas-item.active:not(.gate-hist-card),
body.theme-dark .studio-proj-main.gate-dash .gate-dash-list .canvas-item.active:not(.gate-hist-card),
.studio-proj-main.gate-dash .gate-dash-list .canvas-item.active:not(.gate-hist-card) {
    background: #22222a !important;
    border-color: rgba(167,139,250,.55) !important;
    box-shadow: 0 0 0 1px rgba(167,139,250,.28), 0 10px 28px rgba(0,0,0,.4) !important;
    color: #f8fafc !important;
}
html.studio-theme-dark body .studio-proj-main.gate-dash .gate-dash-list .canvas-item.active .canvas-card-title,
html.studio-theme-dark body .studio-proj-main.gate-dash .gate-dash-list .canvas-item.active .canvas-card-time,
body.theme-dark .studio-proj-main.gate-dash .gate-dash-list .canvas-item.active .canvas-card-title,
body.theme-dark .studio-proj-main.gate-dash .gate-dash-list .canvas-item.active .canvas-card-time,
.studio-proj-main.gate-dash .gate-dash-list .canvas-item.active .canvas-card-title,
.studio-proj-main.gate-dash .gate-dash-list .canvas-item.active .canvas-card-time {
    color: #f8fafc !important;
}
html.studio-theme-dark body .studio-proj-main.gate-dash .gate-dash-list .canvas-item.gate-hist-card.active,
body.theme-dark .studio-proj-main.gate-dash .gate-dash-list .canvas-item.gate-hist-card.active,
.studio-proj-main.gate-dash .gate-dash-list .canvas-item.gate-hist-card.active {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
.studio-proj-main.gate-dash .gate-dash-list .canvas-item.active .canvas-card-meta,
.theme-dark .studio-proj-main.gate-dash .gate-dash-list .canvas-item.active .canvas-card-meta {
    color: #c4c9d4 !important;
    background: transparent !important;
    border-color: transparent !important;
}
.studio-proj-main.gate-dash .gate-dash-list .canvas-item.active .canvas-preview-mark,
.theme-dark .studio-proj-main.gate-dash .gate-dash-list .canvas-item.active .canvas-preview-mark {
    background: rgba(167,139,250,.18) !important;
    color: #ede9fe !important;
    border-color: rgba(167,139,250,.35) !important;
}
.studio-proj-main.gate-dash .gate-dash-list .canvas-item.active .canvas-owner-chip,
.theme-dark .studio-proj-main.gate-dash .gate-dash-list .canvas-item.active .canvas-owner-chip {
    background: rgba(255,255,255,.1) !important;
    color: #e5e7eb !important;
    border-color: rgba(255,255,255,.14) !important;
}
.studio-proj-main.gate-dash .gate-dash-list .canvas-open {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}
.studio-proj-main.gate-dash .gate-dash-list .canvas-card-icon-row {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #222228, #141418);
    border-bottom: 1px solid rgba(255,255,255,.05);
    position: relative;
}
.studio-proj-main.gate-dash .gate-dash-list .canvas-preview-mark {
    width: 48px; height: 48px;
    border-radius: 14px;
}
.studio-proj-main.gate-dash .gate-dash-list .canvas-card-title {
    padding: 10px 12px 2px;
    font-size: 13px;
    font-weight: 750;
    color: #f3f4f6;
}
.studio-proj-main.gate-dash .gate-dash-list .canvas-card-meta {
    margin: 0 12px 12px;
    padding: 0;
    background: transparent;
    border: 0;
    color: #9ca3af;
    font-size: 11px;
}
.studio-proj-main.gate-dash .gate-dash-list .canvas-owner-chip {
    margin: 0 12px 4px;
}

/* Light theme */
html:not(.studio-theme-dark):not(.theme-dark) .gate-dash-chip {
    border-color: #e5e7eb;
    background: #f8fafc;
    color: #334155;
}
html:not(.studio-theme-dark):not(.theme-dark) .gate-dash-assets-title,
html:not(.studio-theme-dark):not(.theme-dark) .gate-dash-settings-label { color: #0f172a; }
html:not(.studio-theme-dark):not(.theme-dark) .gate-dash-tab { color: #64748b !important; }
html:not(.studio-theme-dark):not(.theme-dark) .gate-dash-tab.active { color: #0f172a !important; }
html:not(.studio-theme-dark):not(.theme-dark) .studio-proj-main.gate-dash .gate-dash-list .canvas-item:not(.gate-create-tile) {
    background: #fff;
    border-color: #e5e7eb;
}
html:not(.studio-theme-dark):not(.theme-dark) .studio-proj-main.gate-dash .gate-dash-list .canvas-item.gate-hist-card {
    background: transparent !important;
    border: 0 !important;
}
html:not(.studio-theme-dark):not(.theme-dark) .gate-hist-thumb {
    background: #e8eaee;
    border: 1px solid #e5e7eb;
}
html:not(.studio-theme-dark):not(.theme-dark) .gate-hist-fallback {
    color: #64748b;
    background: linear-gradient(160deg, #f8fafc, #eef2f7);
}
html:not(.studio-theme-dark):not(.theme-dark) .studio-proj-main.gate-dash .gate-dash-list .gate-hist-card .canvas-card-title {
    color: #0f172a !important;
}
html:not(.studio-theme-dark):not(.theme-dark) .studio-proj-main.gate-dash .gate-dash-list .gate-hist-card .canvas-card-meta,
html:not(.studio-theme-dark):not(.theme-dark) .studio-proj-main.gate-dash .gate-dash-list .gate-hist-card .canvas-card-time {
    color: #64748b !important;
}
html.studio-theme-dark .studio-proj-main.gate-dash .gate-dash-list .gate-hist-card .canvas-card-title,
.theme-dark .studio-proj-main.gate-dash .gate-dash-list .gate-hist-card .canvas-card-title,
html.studio-theme-dark body .studio-proj-main.gate-dash .gate-dash-list .gate-hist-card .canvas-card-title {
    color: #f3f4f6 !important;
}
html:not(.studio-theme-dark):not(.theme-dark) .studio-proj-main.gate-dash .gate-dash-list .canvas-card-title { color: #0f172a; }
html:not(.studio-theme-dark):not(.theme-dark) .studio-proj-main.gate-dash .gate-dash-list .canvas-card-meta { color: #64748b; }
html:not(.studio-theme-dark):not(.theme-dark) .studio-proj-main.gate-dash .gate-dash-list .canvas-card-icon-row {
    background: linear-gradient(180deg, #f8fafc, #eef2f7);
    border-bottom-color: #e5e7eb;
}
html:not(.studio-theme-dark):not(.theme-dark) .studio-proj-workspace:has(.gate-dash),
html:not(.studio-theme-dark):not(.theme-dark) .studio-proj-main.gate-dash {
    background: #f4f5f7;
}
html:not(.studio-theme-dark):not(.theme-dark) .gate-create-modal {
    background: rgba(15, 23, 42, .32);
}
html:not(.studio-theme-dark):not(.theme-dark) .gate-create-modal-panel {
    background: #fff;
    border-color: #e5e7eb;
    box-shadow: 0 24px 80px rgba(15, 23, 42, .18);
}
html:not(.studio-theme-dark):not(.theme-dark) .gate-create-modal-title { color: #0f172a; }
html:not(.studio-theme-dark):not(.theme-dark) .gate-create-modal-sub { color: #64748b; }
html:not(.studio-theme-dark):not(.theme-dark) .gate-create-modal-close {
    background: #f1f5f9;
    color: #475569;
}
html:not(.studio-theme-dark):not(.theme-dark) .gate-create-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}
html:not(.studio-theme-dark):not(.theme-dark) .gate-create-cover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #64748b;
}
html:not(.studio-theme-dark):not(.theme-dark) .gate-create-cover:hover {
    border-color: rgba(109, 40, 217, .4);
    background: rgba(109, 40, 217, .05);
}
html:not(.studio-theme-dark):not(.theme-dark) .gate-create-cover.has-cover {
    border-color: #e2e8f0;
}
html:not(.studio-theme-dark):not(.theme-dark) .gate-create-cover-hint { color: #94a3b8; }
html:not(.studio-theme-dark):not(.theme-dark) .gate-create-field { color: #334155; }
html:not(.studio-theme-dark):not(.theme-dark) .gate-create-field input {
    background: #fff;
    border-color: #e2e8f0;
    color: #0f172a;
}
html:not(.studio-theme-dark):not(.theme-dark) .gate-create-modal-cancel {
    border-color: #e2e8f0;
    color: #475569;
}
html:not(.studio-theme-dark):not(.theme-dark) .gate-create-modal-cancel:hover {
    background: #f1f5f9;
    color: #0f172a;
}
html:not(.studio-theme-dark):not(.theme-dark) .gate-create-tile {
    background: linear-gradient(160deg, rgba(124, 58, 237, .12), #fff 55%, #f8fafc) !important;
    border-color: rgba(109, 40, 217, .35) !important;
}
html:not(.studio-theme-dark):not(.theme-dark) .gate-create-tile:hover {
    background: linear-gradient(160deg, rgba(124, 58, 237, .18), #fff 55%, #f1f5f9) !important;
    border-color: rgba(109, 40, 217, .55) !important;
}

@media (max-width: 1100px) {
    .gate-dash-asset-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .gate-dash-asset-cards { grid-template-columns: 1fr; }
    .gate-dash-script-btn { margin-left: 0; width: 100%; justify-content: center; }
}

.studio-proj-sheet {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 8, 10, 0.55);
    padding: 20px;
}
.studio-proj-sheet-card {
    width: min(360px, 92vw);
    border-radius: 16px;
    padding: 16px;
    background: #16140f;
    border: 1px solid rgba(242, 227, 173, 0.22);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.studio-proj-sheet-title {
    font-size: 14px;
    font-weight: 800;
    color: #f2f1ea;
    margin-bottom: 4px;
}
.studio-proj-sheet-card button {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #f2f1ea;
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}
.studio-proj-sheet-card button:hover { border-color: rgba(242, 227, 173, 0.4); color: #f2e3ad; }
.studio-proj-sheet-card button.is-danger { color: #f2b8ad; }
.studio-proj-sheet-card button.is-ghost { color: rgba(242, 241, 234, 0.55); }

.studio-project-dialog { width:min(480px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); border:1px solid rgba(242,227,173,.24); border-radius:18px; padding:24px; background:#1b1d20; color:#f2f1ea; box-shadow:0 24px 80px #0008; color-scheme:dark; }
.studio-project-dialog::backdrop { background:rgba(5,8,12,.7); }
.studio-project-dialog h2 { margin:0 0 22px; font-size:19px; font-weight:650; }
.project-dialog-field { display:flex; flex-direction:column; gap:8px; margin:18px 0; font-size:14px; }
.project-dialog-field[hidden] { display:none; }
.project-dialog-field input,.project-dialog-field select { width:100%; box-sizing:border-box; min-height:44px; border:1px solid #ffffff26; background:#111417; color:inherit; border-radius:9px; padding:10px 12px; font:inherit; }
.project-dialog-field select option { background:#1b1d20; color:#f2f1ea; }
.project-dialog-field :focus-visible,.project-scope-options label:focus-within { outline:2px solid #e8d8a2; outline-offset:3px; }
.project-scope-options { border:0; padding:0; margin:18px 0; display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.project-scope-options legend { margin-bottom:10px; font-size:14px; }
.project-scope-options label { border:1px solid #ffffff26; border-radius:10px; padding:14px 12px; cursor:pointer; font-size:14px; display:flex; gap:8px; align-items:center; }
.project-scope-options label:has(:checked) { background:#e8d8a218; border-color:#e8d8a2; color:#f3e6bd; }
.project-scope-options label:has(:disabled) { opacity:.45; cursor:default; }
.project-scope-options input { accent-color:#e8d8a2; }
.project-dialog-hint { font-size:13px; line-height:1.75; color:#b6bac2; margin:16px 0; }
.project-dialog-error { color:#ffb0a9; line-height:1.6; font-size:13px; }
.studio-project-dialog footer { display:flex; justify-content:flex-end; gap:10px; margin-top:24px; }
.studio-project-dialog footer button { min-height:42px; min-width:90px; padding:10px 18px; border:1px solid #ffffff26; border-radius:9px; background:transparent; color:inherit; cursor:pointer; font:inherit; }
.studio-project-dialog footer .project-dialog-primary { background:#e8d8a2; border-color:#e8d8a2; color:#19170f; font-weight:650; }
.studio-project-dialog button:disabled { opacity:.5; cursor:wait; }
.studio-project-dialog[aria-busy="true"] .project-dialog-primary::after { content:' · 处理中'; }
html:not(.studio-theme-dark):not(.theme-dark) .studio-project-dialog { background:#fbfaf7; color:#242831; color-scheme:light; border-color:#d6d0be; }
html:not(.studio-theme-dark):not(.theme-dark) .project-dialog-field input,html:not(.studio-theme-dark):not(.theme-dark) .project-dialog-field select { background:#fff; border-color:#d6d0be; }
html:not(.studio-theme-dark):not(.theme-dark) .project-dialog-field option { background:#fff; color:#242831; }
html:not(.studio-theme-dark):not(.theme-dark) .project-scope-options label { border-color:#d6d0be; }
html:not(.studio-theme-dark):not(.theme-dark) .project-scope-options label:has(:checked) { color:#5a4b23; background:#eee6d1; border-color:#a78c48; }
html:not(.studio-theme-dark):not(.theme-dark) .project-dialog-hint { color:#626874; }
html:not(.studio-theme-dark):not(.theme-dark) .project-dialog-error { color:#a9362e; }
