/* Image Studio project tree. Loaded globally so AJAX navigation never flashes legacy styles. */
.image-studio .image-sidebar{display:flex;min-height:0;flex-direction:column;padding:16px 12px;border-right:1px solid #263441;background:#111922;color:#dbe6ef}
.image-studio .image-side-title{display:flex;align-items:center;justify-content:space-between;margin:0 2px 12px;padding:0 2px 12px;border-bottom:1px solid #293845}
.image-studio .image-side-title span{color:#f2f7fb;font-size:13px;font-weight:800;letter-spacing:.08em}
.image-studio .image-side-title [data-new-project]{display:grid;place-items:center;width:32px;height:32px;padding:0;border:1px solid #3d5365;border-radius:9px;background:#1c2a36;color:#82d2f6;font-size:20px;line-height:1;cursor:pointer;transition:border-color .16s,background .16s,color .16s}
.image-studio .image-side-title [data-new-project]:hover{border-color:#55b9e9;background:#203b4e;color:#fff}
.image-studio .project-list{display:grid;align-content:start;gap:7px;flex:1;min-height:280px;padding:0 2px 20px;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#536879 #111922}
.image-studio .project-list::-webkit-scrollbar{width:7px}.image-studio .project-list::-webkit-scrollbar-track{background:#111922}.image-studio .project-list::-webkit-scrollbar-thumb{border-radius:99px;background:#536879}
.image-studio .project-group{min-width:0;overflow:hidden;border:1px solid #2a3946;border-radius:10px;background:#17212b;transition:border-color .16s,background .16s}
.image-studio .project-group:hover{border-color:#405465}.image-studio .project-group.active{border-color:#3d88ad;background:#172733;box-shadow:inset 3px 0 0 #48b5e6}
.image-studio .project-row{display:grid;grid-template-columns:minmax(0,1fr) 30px;align-items:center;gap:4px;min-height:46px;padding:4px 7px 4px 10px}
.image-studio .project-name{display:flex;min-width:0;align-items:center;justify-content:space-between;gap:8px;min-height:36px;padding:0;border:0;background:transparent;color:#cbd7e1;text-align:left;cursor:pointer}
.image-studio .project-name-main{display:flex;min-width:0;align-items:center;gap:9px}.image-studio .project-name-main>i{width:7px;height:7px;flex:0 0 auto;border-radius:50%;background:#718494}.image-studio .project-group.active .project-name-main>i{background:#55c1ef}
.image-studio .project-name-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:750}.image-studio .project-group.active .project-name-text{color:#f3fbff}
.image-studio .project-chevron{position:relative;width:20px;height:20px;flex:0 0 auto}.image-studio .project-chevron::after{content:"";position:absolute;left:6px;top:5px;width:6px;height:6px;border-right:2px solid #8495a4;border-bottom:2px solid #8495a4;transform:rotate(45deg);transition:top .16s,transform .16s}.image-studio .project-name[aria-expanded="true"] .project-chevron::after{top:8px;border-color:#67c9f1;transform:rotate(225deg)}
.image-studio .project-more{display:grid;place-items:center;width:29px;height:29px;padding:0 0 5px;border:1px solid transparent;border-radius:8px;background:transparent;color:#8193a3;font-size:15px;letter-spacing:1px;cursor:pointer}.image-studio .project-more:hover,.image-studio .project-more[aria-expanded="true"]{border-color:#40586a;background:#22323f;color:#eef7fc}
.image-studio .project-actions-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:0 8px 8px;padding:7px;border:1px solid #304250;border-radius:8px;background:#111a23}.image-studio .project-actions-menu[hidden],.image-studio .project-subnav[hidden]{display:none!important}
.image-studio .project-actions-menu button{min-height:32px;padding:6px 8px;border:1px solid #334655;border-radius:7px;background:#1a2732;color:#c9d5df;font-size:11px;cursor:pointer}.image-studio .project-actions-menu button:hover{border-color:#4e92b5;background:#20394a;color:#8ad9fb}.image-studio .project-actions-menu [data-sync-video]{border-color:#386d88;color:#7ccbed}
/* Expanded assets: one clean row per item. */
.image-studio .project-subnav{display:grid;grid-template-columns:1fr;gap:2px;margin:0;padding:5px 8px 9px 19px;border-top:1px solid #293946;background:#121c25}
.image-studio .project-subnav button{display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:8px;width:100%;min-width:0;min-height:35px;padding:4px 8px;border:0;border-radius:7px;background:transparent;color:#91a1af;text-align:left;font-size:12px;cursor:pointer}
.image-studio .project-subnav button::before{display:grid;place-items:center;width:23px;height:23px;border-radius:6px;background:#26343f;color:#aebbc6;font-size:10px;font-weight:800}.image-studio .project-subnav button[data-kind=""]::before{content:"全"}.image-studio .project-subnav button[data-kind="CHARACTER"]::before{content:"人"}.image-studio .project-subnav button[data-kind="SCENE"]::before{content:"景"}.image-studio .project-subnav button[data-kind="PROP"]::before{content:"道"}
.image-studio .project-subnav button span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.image-studio .project-subnav button:hover{background:#1d2c38;color:#eaf4f9}.image-studio .project-subnav button.active{background:#19374a;color:#7bd3f8;font-weight:750}.image-studio .project-subnav button.active::before{background:#318fbd;color:#fff}
.image-studio .project-subnav em{min-width:22px;padding:2px 6px;border-radius:99px;background:#26343f;color:#9eacb8;text-align:center;font-size:10px;font-style:normal}.image-studio .project-subnav button.active em{background:#28627f;color:#effaff}
.image-studio .project-name:focus-visible,.image-studio .project-more:focus-visible,.image-studio .project-subnav button:focus-visible,.image-studio .project-actions-menu button:focus-visible{outline:2px solid #5bc6f1;outline-offset:1px}
/* Complete light palette. */
html[data-theme="light"] .image-studio{color-scheme:light}
html[data-theme="light"] .image-studio .image-sidebar{border-color:#d7e1ea;background:#f3f6f9;color:#2c4053}
html[data-theme="light"] .image-studio .image-side-title{border-color:#d9e2ea}html[data-theme="light"] .image-studio .image-side-title span{color:#24384b}
html[data-theme="light"] .image-studio .image-side-title [data-new-project]{border-color:#b9ccda;background:#fff;color:#237da6;box-shadow:0 4px 12px rgba(39,72,96,.08)}
html[data-theme="light"] .image-studio .project-list{scrollbar-color:#afbfcc #f3f6f9}html[data-theme="light"] .image-studio .project-list::-webkit-scrollbar-track{background:#f3f6f9}html[data-theme="light"] .image-studio .project-list::-webkit-scrollbar-thumb{background:#afbfcc}
html[data-theme="light"] .image-studio .project-group{border-color:#d8e2ea;background:#fff;box-shadow:0 3px 12px rgba(39,66,88,.05)}html[data-theme="light"] .image-studio .project-group:hover{border-color:#b8cad8}
html[data-theme="light"] .image-studio .project-group.active{border-color:#f0b08d;background:#fff9f5;box-shadow:inset 3px 0 0 #f06a32}
html[data-theme="light"] .image-studio .project-name{color:#334b60}html[data-theme="light"] .image-studio .project-name-main>i{background:#8094a6}html[data-theme="light"] .image-studio .project-group.active .project-name-main>i{background:#f06a32}html[data-theme="light"] .image-studio .project-group.active .project-name-text{color:#bd481d}
html[data-theme="light"] .image-studio .project-chevron::after{border-color:#657c90}html[data-theme="light"] .image-studio .project-name[aria-expanded="true"] .project-chevron::after{border-color:#d45725}
html[data-theme="light"] .image-studio .project-more{color:#61788d}html[data-theme="light"] .image-studio .project-more:hover,html[data-theme="light"] .image-studio .project-more[aria-expanded="true"]{border-color:#f0c0a8;background:#fff0e7;color:#bd481d}
html[data-theme="light"] .image-studio .project-actions-menu{border-color:#d8e2ea;background:#f7fafc}html[data-theme="light"] .image-studio .project-actions-menu button{border-color:#d5e0e8;background:#fff;color:#40586c}html[data-theme="light"] .image-studio .project-actions-menu button:hover{border-color:#a6c9da;background:#eef8fc;color:#17698f}
html[data-theme="light"] .image-studio .project-subnav{border-color:#e0e7ed;background:#f8fafc}html[data-theme="light"] .image-studio .project-subnav button{color:#526a7e}html[data-theme="light"] .image-studio .project-subnav button::before{background:#e7edf2;color:#5c7285}
html[data-theme="light"] .image-studio .project-subnav button:hover{background:#edf5f9;color:#205f7d}html[data-theme="light"] .image-studio .project-subnav button.active{background:#e6f4fa;color:#17698f}html[data-theme="light"] .image-studio .project-subnav button.active::before{background:#4a9fc5;color:#fff}
html[data-theme="light"] .image-studio .project-subnav em{background:#e8eef3;color:#627789}html[data-theme="light"] .image-studio .project-subnav button.active em{background:#c7e5f1;color:#176383}
@media(max-width:760px){.image-studio .project-list{min-height:0;max-height:50vh}.image-studio .project-subnav{grid-template-columns:1fr}}

/* Simple project navigation: one label and one count per row. */
.image-studio .project-name::before{display:none!important;content:none!important}
.image-studio .project-name-main>i{display:none!important}
.image-studio .project-name-main{gap:0!important}
.image-studio .project-subnav{
    display:block!important;
    margin:0!important;
    padding:4px 10px 8px 18px!important;
    border-top:1px solid #293946!important;
    background:transparent!important;
}
.image-studio .project-subnav button{
    display:flex!important;
    width:100%!important;
    min-height:34px!important;
    align-items:center!important;
    gap:8px!important;
    margin:0!important;
    padding:0 9px!important;
    border:0!important;
    border-radius:6px!important;
    background:transparent!important;
    box-shadow:none!important;
    color:#91a1af!important;
    font-size:12px!important;
    text-align:left!important;
}
.image-studio .project-subnav button+button{border-top:1px solid rgba(128,151,170,.12)!important;border-radius:0!important}
.image-studio .project-subnav button::before{display:none!important;content:none!important}
.image-studio .project-subnav button span{
    display:block!important;
    flex:1 1 auto!important;
    min-width:0!important;
    overflow:hidden!important;
    color:inherit!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
}
.image-studio .project-subnav button em{
    display:block!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:18px!important;
    margin:0 0 0 auto!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    color:#718596!important;
    font-size:11px!important;
    font-style:normal!important;
    line-height:1!important;
    text-align:right!important;
}
.image-studio .project-subnav button:hover{background:#1c2a35!important;color:#d9e8f1!important}
.image-studio .project-subnav button.active{background:#203746!important;color:#72cef5!important;font-weight:750!important}
.image-studio .project-subnav button.active em{background:transparent!important;color:#72cef5!important}

html[data-theme="light"] .image-studio .project-subnav{border-color:#e0e6eb!important;background:transparent!important}
html[data-theme="light"] .image-studio .project-subnav button{background:transparent!important;color:#52697c!important}
html[data-theme="light"] .image-studio .project-subnav button+button{border-color:#e8edf1!important}
html[data-theme="light"] .image-studio .project-subnav button em{background:transparent!important;color:#8293a2!important}
html[data-theme="light"] .image-studio .project-subnav button:hover{background:#edf3f7!important;color:#264e68!important}
html[data-theme="light"] .image-studio .project-subnav button.active{background:#e6f2f8!important;color:#17698f!important}
html[data-theme="light"] .image-studio .project-subnav button.active em{background:transparent!important;color:#17698f!important}

