/* v0.5.25 platform shell, modelled on the 灵境 console shell (lingjing-console AppShell/TopNav/SideNav):
   56px top bar and 220px sidebar share the page background with no dividers; content floats on a white 12px canvas.
   Loaded last; selectors are prefixed with "html body" so they win over the layered reference styles. */
:root{--shell-bg:#F6F6FC;--shell-text:#3F3F51;--shell-strong:#0B0B0F;--shell-muted:#5F6585;--shell-hover:#EFF0F6;--shell-active:rgba(231,232,242,.86);
 --shell-title:#161A3B;--shell-line:#E3E6F4;--shell-grad:linear-gradient(90deg,#5235F5 0%,#6A55F7 56%,#4F8FF2 100%);--shell-avatar:linear-gradient(135deg,#5235F5 0%,#4F8FF2 100%)}
/* Pages stay hidden until the session check decides which one to show; the bare page shares the shell background. */
html,html body{background:var(--shell-bg)}
html body .reference-library,html body .app{background:var(--shell-bg)}

/* Top bar */
html body .ref-topbar{height:56px;padding:0 18px 0 0;background:var(--shell-bg);border-bottom:0;box-shadow:none}
html body .ref-topbar .ref-brand{width:220px;padding:0 0 0 20px;gap:10px;border-right:0;color:var(--shell-title)}
html body .ref-topbar .ref-brand>span,html body .ref-topbar .ref-brand>span svg,html body .ref-brand .reference-brand-mark{width:27px;height:27px}
html body .ref-topbar .ref-brand>b{font-size:16px;font-weight:700;letter-spacing:.01em}
html body .ref-topnav{gap:16px;padding:0 0 0 8px;height:100%}
html body .ref-topnav>button{height:100%;padding:0 8px;background:none;border-radius:0;color:var(--shell-text);font-size:14px;font-weight:400;transition:color .22s}
html body .ref-topnav>button:hover:not(:disabled){color:#191922}
html body .ref-topnav>button.active{background:none;color:var(--shell-strong);font-weight:600}
html body .ref-topnav>button.active::after{content:'';position:absolute;left:8px;right:8px;bottom:0;height:2px;border-radius:2px 2px 0 0;background:var(--shell-grad);box-shadow:0 -1px 6px rgba(82,53,245,.18)}
html body .ref-topnav>button:disabled{color:#A3A8BE;cursor:default}
html body .ref-top-actions{gap:14px;margin-left:auto}
html body .ref-top-actions select{height:32px;border:1px solid var(--shell-line);border-radius:8px;background:#fff;font-size:13px;color:var(--shell-text);padding:0 28px 0 10px}
html body .ref-top-separator{display:none}
html body .ref-bell{padding:6px;border-radius:8px;color:var(--shell-muted)}
html body .ref-bell:hover{background:#EEF1F6;color:var(--shell-title)}
html body .ref-bell>svg{width:18px;height:18px}
html body .ref-bell>span{right:2px;top:2px;min-width:0;width:7px;height:7px;padding:0;border:0;font-size:0;background:#F24F63}
/* Avatar only: name, role and chevron move into the account menu. */
html body .ref-account{gap:0;padding:0}
html body .ref-account>:not(.ref-avatar){display:none}
html body .ref-account .ref-avatar{width:29px;height:29px;background:var(--shell-avatar);color:#fff;font-size:12px;font-weight:500}
html body .ref-account:focus-visible .ref-avatar{outline:2px solid #B9AEFB;outline-offset:2px}

/* Shell and sidebar */
html body .ref-shell{height:calc(100dvh - 56px);grid-template-columns:220px minmax(0,1fr);background:var(--shell-bg)}
html body .ref-sidebar{background:transparent;border-right:0;padding:8px 12px 18px;gap:4px}
html body .ref-back{height:40px;margin:0 0 6px;padding:0 12px;gap:8px;border-radius:8px;color:var(--shell-text);font-size:13px}
html body #homeRefresh{display:none}
html body .ref-back:hover{background:var(--shell-hover);color:#25324A}
html body .ref-back svg{width:16px;height:16px}
html body .ref-project{margin:2px 0 10px;padding:4px 12px 10px;border-bottom:1px solid var(--shell-line)}
html body .ref-project h2{margin:0 0 4px;font-size:14px;font-weight:600;line-height:1.5;color:var(--shell-title)}
html body .ref-project p{margin:2px 0;font-size:12px;color:var(--shell-muted)}
html body .ref-sidenav{gap:4px}
html body .ref-sidenav>button{height:40px;min-height:40px;padding:0 12px;gap:8px;border-radius:8px;color:var(--shell-text);font-size:13px;font-weight:400;
 transition:background-color .18s cubic-bezier(.2,.72,.24,1),color .18s,box-shadow .18s}
html body .ref-sidenav>button svg{width:16px;height:16px}
html body .ref-sidenav>button:hover:not(:disabled){background:var(--shell-hover);color:#25324A}
html body .ref-sidenav>button.active{background:var(--shell-active);color:#243149;font-weight:500;box-shadow:inset 0 1px 0 rgba(255,255,255,.82),0 5px 16px rgba(42,61,96,.045)}
html body .ref-sidenav>button.active svg{color:var(--brand)}
html body .ref-sidenav>button:active{transform:translate3d(0,1px,0)}
html body .ref-help{margin:auto 0 0;height:40px;padding:0 12px;gap:8px;border:0;border-radius:8px;background:transparent;color:var(--shell-text);font-size:13px}
html body .ref-help:hover{background:var(--shell-hover)}
html body .ref-help small,html body .ref-help>span:last-child:not(:first-child) svg{display:none}
html body .ref-help b{font-size:13px;font-weight:400}
html body .ref-help svg{width:16px;height:16px}

/* Bottom entry "账号管理 ›" and the account sub-navigation (like the 灵境 "组织管理 ›" product view). */
html body .ref-side-entry{margin-top:auto;height:40px;display:flex;align-items:center;gap:8px;width:100%;padding:0 12px;border:0;border-radius:8px;background:transparent;color:var(--shell-text);font-size:13px;cursor:pointer;white-space:nowrap}
html body .ref-side-entry:hover{background:var(--shell-hover);color:#25324A}
html body .ref-side-entry svg{width:16px;height:16px;flex:none}html body .ref-side-entry>svg:last-child{width:14px;height:14px;margin-left:auto;color:#8A8EA6}
html body .ref-side-entry+.ref-help{margin-top:0}
html body .account-page .pf-card+.pf-card{margin-top:20px}
html body .account-page .admin-create{margin:20px 0 0}html body .account-page .admin-table-wrap{margin-top:16px}
html body .account-page .pf-card-head{display:flex;align-items:center;justify-content:space-between;background:#F8F8FE;border-radius:8px 8px 0 0}html body .account-page .pf-card-head h2{background:none}html body .account-page .pf-card-head small{padding-right:22px}
html body .account-page .admin-note{margin:16px 0 0}
html body .admin-table-wrap{overflow-x:auto}html body .admin-table{width:100%;border-collapse:collapse;font-size:13px}
html body .admin-table th{text-align:left;font-weight:500;color:var(--shell-muted);background:#F8F8FE;padding:11px 12px;border-bottom:1px solid #EFEFF8;white-space:nowrap}
html body .admin-table td{padding:12px;border-bottom:1px solid #EFEFF8;color:#26294A;vertical-align:middle}html body .admin-table tr:last-child td{border-bottom:0}
html body .admin-table td b{display:block;font-weight:500}html body .admin-table td small{display:block;margin-top:3px;color:#8A8EA6;font-size:12px}
html body .admin-table .admin-ops{display:flex;flex-wrap:nowrap;gap:6px;align-items:center;white-space:nowrap}html body .admin-table .admin-ops select{width:auto;min-width:150px;max-width:210px;height:32px;margin:0;font-size:13px}html body .admin-table .admin-ops a{text-decoration:none;display:inline-flex;align-items:center}html body .admin-table .admin-ops .ref-btn{height:32px;padding:0 12px;font-size:13px}html body .admin-table .role-chip{font-size:12px}

/* Floating white canvas */
html body .ref-main{margin:0 10px 10px 0;background:#fff;border-radius:12px;box-shadow:inset 0 0 0 1px rgba(221,226,246,.82);padding:32px clamp(20px,2.6vw,56px) 56px}
html body .projects-page .ref-main{padding-top:32px}
html body .ref-page-heading{margin-bottom:22px}
html body .ref-page-heading h1{font-size:24px;font-weight:700;line-height:1.25;letter-spacing:0;color:var(--shell-title);margin:0 0 6px}
html body .ref-page-heading p{font-size:12.5px;line-height:1.6;color:var(--shell-muted)}

/* Workbench keeps its own tool layout under the shared 56px bar. */
html body .app{grid-template-rows:56px 64px minmax(0,1fr) 146px 66px}
html body .app:has(>.image-queue.collapsed){grid-template-rows:56px 64px minmax(0,1fr) 54px 66px}
html body #createProjectDialog.reference-create-page{inset:56px 10px 10px 230px;height:calc(100dvh - 66px);border-radius:12px}
html body .member-edit-drawer{inset:66px 20px 20px auto;height:calc(100dvh - 86px)}

@media(max-width:1250px){html body .ref-topbar .ref-brand{width:200px}html body .ref-shell{grid-template-columns:200px minmax(0,1fr)}}
@media(max-width:900px){html body .ref-topbar .ref-brand{width:auto;padding-right:12px}html body .ref-shell{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr)}
 html body .ref-sidebar{flex-direction:row;overflow-x:auto;padding:4px 10px}html body .ref-project,html body .ref-help{display:none}html body .ref-sidenav{display:flex}html body .ref-main{margin:0 8px 8px;border-radius:10px;padding:20px 16px 48px}}

/* v0.5.27 navigation model: top bar = scenes, sidebar = navigation inside 工作台. */
html body .ref-topnav>button[hidden],html body .ref-bell,html body #libraryProjectSelector,html body .ref-help,html body #projectsPage .ref-project{display:none}
html body .projects-page.global-mode .ref-shell{grid-template-columns:minmax(0,1fr)}html body .projects-page.global-mode .ref-sidebar{display:none}
html body .projects-page.global-mode .ref-main{margin-left:10px}html body .global-page{max-width:1320px;margin:0 auto}
html body .global-page .template-library-grid{margin-top:16px}
html body .help-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}@media(max-width:1100px){html body .help-grid{grid-template-columns:minmax(0,1fr)}}
html body .help-body{padding-top:16px;font-size:13px;line-height:1.75;color:#353A5C}html body .help-body ol{margin:0;padding-left:20px}html body .help-body li+li{margin-top:6px}
html body .help-keys td:first-child{width:150px;font-family:'IBM Plex Mono',Consolas,monospace;color:var(--brand)}
html body .help-faq dt{font-weight:500;color:var(--shell-title)}html body .help-faq dd{margin:4px 0 14px;color:var(--shell-muted)}

/* v0.5.29 scenes: 研究项目 sidebar = 首页 · 全部项目 · 我的项目; 工作台 sidebar = project card + stages. */
html body #libraryBack{display:none}
html body .mine-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:18px}
html body .mine-card{display:flex;flex-direction:column;border:1px solid #EFEFF8;border-radius:10px;background:#fff;overflow:hidden;cursor:pointer;transition:border-color .18s,box-shadow .18s,transform .18s}
html body .mine-card:hover{border-color:#D9D3FA;box-shadow:0 10px 26px rgba(22,26,59,.08);transform:translateY(-1px)}html body .mine-card:focus-visible{outline:2px solid #B9AEFB;outline-offset:2px}
html body .mine-thumbs{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:2px;height:112px;background:#F5F5FA}html body .mine-thumbs img{width:100%;height:112px;object-fit:cover}
html body .mine-no-image{grid-column:1/-1;display:grid;place-items:center;font-size:12px;color:#8A8EA6}
html body .mine-body{display:grid;gap:10px;padding:16px 18px 16px}
html body .mine-title{display:flex;align-items:center;justify-content:space-between;gap:10px}html body .mine-title h2{margin:0;font-size:15px;font-weight:600;color:var(--shell-title);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body .mine-title .role-chip{flex:none;font-size:12px}html body .mine-meta{margin:-4px 0 0;font-size:12px;color:#8A8EA6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body .mine-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}html body .mine-stats>div{padding:8px 10px;border-radius:8px;background:#F8F8FE}
html body .mine-stats b{display:block;font-size:17px;font-weight:600;color:var(--shell-title)}html body .mine-stats small{font-size:11.5px;color:#8A8EA6}
html body .mine-progress{height:4px;border-radius:4px;background:#EEEDF7;overflow:hidden}html body .mine-progress>span{display:block;height:100%;background:var(--shell-grad)}
html body .mine-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}html body .mine-actions{display:flex;gap:6px;flex-wrap:wrap}
html body .mine-actions .ref-btn{height:30px;padding:0 11px;font-size:12.5px}
html body .mine-empty{padding:60px 20px;text-align:center}html body .mine-empty h2{margin:0 0 6px;font-size:16px}
html body #libraryPage .ref-project{margin:0 0 12px;padding:10px 12px;border:1px solid var(--shell-line);border-radius:8px;background:#fff;box-shadow:0 1px 2px rgba(22,26,59,.04)}
html body #libraryPage .ref-project h2{margin:0;font-size:13.5px;line-height:1.45}
html body #libraryPage .ref-project p{display:none}html body #libraryPage .ref-project p:first-of-type{display:flex;margin:4px 0 0;font-size:11.5px;color:#8A8EA6}
html body #libraryPage .ref-project:hover{border-color:#CFC8F7}

/* v0.5.31 灵境-style level-2 views: the sidebar swaps to the product nav with a back row. */
html body .level1-entry>svg:last-child{width:14px;height:14px;margin-left:auto;color:#8A8EA6}
html body .ref-sidebar.product-mode>:not(.product-nav):not(.ref-side-entry){display:none}
html body .ref-sidebar.product-mode[data-product="account"]>.ref-side-entry{display:none}
html body .product-nav{gap:4px}
html body .product-nav>.product-back{margin-bottom:6px;color:var(--shell-title);font-weight:500}
html body .product-nav>.product-back svg{color:var(--shell-text)}

/* v0.5.32 project card (single line, full name on hover) and switcher dropdown. */
html body #libraryPage .ref-project h2.project-switch{position:relative;display:block;padding-right:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;border-radius:0}
html body #libraryPage .ref-project h2.project-switch::after{content:'';position:absolute;right:4px;top:50%;width:6px;height:6px;margin-top:-5px;border-right:1.5px solid #8A8EA6;border-bottom:1.5px solid #8A8EA6;transform:rotate(45deg);transition:transform .18s}
html body #libraryPage .ref-project h2.project-switch[aria-expanded="true"]::after{transform:rotate(225deg);margin-top:-2px}
html body #libraryPage .ref-project:has(.project-switch:hover){border-color:#CFC8F7}
html body #libraryPage .ref-project h2.project-switch:focus-visible{outline:2px solid #B9AEFB;outline-offset:3px}
html body .project-switcher{position:fixed;inset:auto;margin:0;z-index:90;display:none;flex-direction:column;max-height:min(420px,70vh);padding:6px;border:1px solid #E6E4F3;border-radius:10px;background:#fff;box-shadow:0 12px 32px rgba(22,26,59,.12),0 2px 6px rgba(22,26,59,.05);overflow:hidden}
html body .project-switcher[open]{display:flex;animation:psIn .14s ease-out}
@keyframes psIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
html body .project-switcher .ps-search{flex:none;width:100%;height:32px;margin:0 0 6px;padding:0 10px;border:1px solid #ECEBF5;border-radius:7px;background:#FAFAFD;font-size:12.5px;color:var(--shell-title);outline:none;box-shadow:none}
html body .project-switcher .ps-search:focus{border-color:#D3CCF8;background:#fff;box-shadow:0 0 0 3px rgba(82,53,245,.07)}
html body .ps-list{flex:1;min-height:0;overflow-x:hidden;overflow-y:auto;display:grid;grid-template-columns:minmax(0,1fr);align-content:start;gap:1px;padding-right:2px}
html body .ps-list::-webkit-scrollbar{width:5px;height:0}html body .ps-list::-webkit-scrollbar-button{display:none;height:0}html body .ps-list::-webkit-scrollbar-thumb{background:#DAD7EC;border-radius:6px}html body .ps-list::-webkit-scrollbar-track{background:transparent}
html body .ps-item{display:flex;align-items:center;gap:6px;width:100%;height:34px;padding:0 8px 0 4px;border:0;border-radius:7px;background:none;text-align:left;font-size:13px;color:#353A5C;cursor:pointer}
html body .ps-item:hover{background:#F4F3FB}html body .ps-item.current{color:var(--brand);font-weight:500}
html body .ps-item:focus-visible{outline:2px solid #B9AEFB;outline-offset:-2px}
html body .ps-check{flex:none;width:16px;display:grid;place-items:center;color:var(--brand)}html body .ps-check svg{width:14px;height:14px}
html body .ps-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body .ps-count{flex:none;font-size:11px;color:#A0A4BA;font-variant-numeric:tabular-nums}
html body .ps-empty{margin:0;padding:10px;font-size:12px;color:#8A8EA6}
html body .ps-all{flex:none;display:flex;align-items:center;justify-content:space-between;margin-top:6px;padding:9px 8px 3px;border:0;border-top:1px solid #F0EFF7;background:none;font-size:12.5px;color:var(--brand);cursor:pointer}
html body .ps-all svg{width:14px;height:14px}html body .ps-all:hover{color:#3D22D9}

/* v0.5.34 project overview: facts in the heading, no 继续研究 / 项目信息 panels. */
html body .overview-heading>div{min-width:0}
html body .overview-heading h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body .overview-meta{display:flex;flex-wrap:wrap;gap:6px 0;margin-top:8px}
html body .overview-meta>span{display:inline-flex;align-items:baseline;gap:6px;padding:0 14px;font-size:12.5px;line-height:1.6;border-left:1px solid #E6E4F3}
html body .overview-meta>span:first-child{padding-left:0;border-left:0}
html body .overview-meta small{font-size:12px;color:#8A8EA6}html body .overview-meta b{font-weight:500;color:#353A5C}
html body .overview-title{display:flex;align-items:center;gap:14px;min-width:0}
html body .overview-title h1{margin:0;min-width:0}
html body .overview-badges{display:flex;flex:none;gap:8px;align-items:center}
html body .ov-badge{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border-radius:13px;font-size:12px;font-weight:500;line-height:1;white-space:nowrap}
html body .ov-badge svg{width:14px;height:14px;flex:none}
html body .ov-dot{width:7px;height:7px;border-radius:50%;background:currentColor;box-shadow:0 0 0 3px color-mix(in srgb,currentColor 18%,transparent)}
html body .ov-badge.is-active{background:#E9F7EF;color:#1F9254}
html body .ov-badge.is-archived{background:#F1F1F5;color:#7C8097}
html body .ov-badge.is-mode{background:#EEF3FF;color:#2F62D8}
html body .ov-badge.is-ai{background:#F1EEFF;color:#5235F5}
html body .ov-badge.is-manual{background:#F4F4F7;color:#8A8EA6}
html body .ov-badge.ov-glyph{gap:4px;padding:0 11px 0 6px;background:#F6F5FD;color:#353A5C;box-shadow:inset 0 0 0 1px #ECE9FA}html body .ov-badge .ov-key{color:#8A8EA6;font-weight:400}
html body .ov-badge.ov-glyph svg{width:22px;height:22px}

/* v0.5.38 研究图片: filter pills, fixed footer with selection, floating image card. */
html body #librarySearchForm.ref-filter-line{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px;padding:0;border:0;background:none;box-shadow:none}
html body #librarySearchForm .ref-filters{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:0;border:0;background:none}
html body #librarySearchForm .filter-pill{display:inline-flex;align-items:center;gap:2px;height:32px;margin:0;padding:0 2px 0 11px;border:1px solid #E6E4F3;border-radius:8px;background:#fff;font-size:12.5px;color:#8A8EA6;transition:border-color .15s,background .15s}
html body #librarySearchForm .filter-pill:hover{border-color:#D3CCF8}
html body #librarySearchForm .filter-pill .fp-key{white-space:nowrap}
html body #librarySearchForm .filter-pill select{height:30px;min-width:56px;max-width:160px;margin:0;padding:0 26px 0 4px;background-position:calc(100% - 8px) 50%;border:0;background-color:transparent;box-shadow:none;font-size:12.5px;font-weight:500;color:var(--shell-title);cursor:pointer}
html body #librarySearchForm .filter-pill select:focus{outline:none}
html body #librarySearchForm .filter-pill:focus-within{border-color:#B9AEFB;box-shadow:0 0 0 3px rgba(82,53,245,.07)}
html body #librarySearchForm .filter-pill.active{border-color:#CFC6FB;background:#F5F3FF}html body #librarySearchForm .filter-pill.active .fp-key{color:var(--brand)}
html body #librarySearchForm .filter-clear{height:32px;padding:0 6px;font-size:12.5px;color:var(--brand);background:none;border:0;cursor:pointer}
html body #librarySearchForm .ref-view-tools{display:flex;align-items:center;gap:8px;padding:0;border:0;flex:none}
html body #librarySearchForm .ref-view-switch{height:32px;padding:2px;border:1px solid #E6E4F3;border-radius:8px;background:#fff}
html body #librarySearchForm .ref-view-switch{display:inline-flex;align-items:center;gap:2px}html body #librarySearchForm .ref-view-switch button{display:grid;place-items:center;width:30px;height:26px;padding:0;border:0;border-radius:6px;background:none;color:#8A8EA6}html body #librarySearchForm .ref-view-switch button.active{background:#F1EEFF;color:var(--brand)}html body #librarySearchForm .ref-view-switch button svg{width:16px;height:16px}
html body #librarySearchForm #librarySort{height:32px;padding:0 26px 0 10px;border:1px solid #E6E4F3;border-radius:8px;background-color:#fff;font-size:12.5px;color:var(--shell-title)}
html body #libraryPage .ref-main:has(#refLibraryView:not([hidden])){padding-bottom:0}
html body #refLibraryView:not([hidden]){display:flex;flex-direction:column;min-height:100%}
html body #refLibraryBody{flex:1;display:flex;align-items:stretch;min-height:0}html body #refLibraryBody .ref-library-center{flex:1;display:flex;flex-direction:column;min-width:0}
html body #refInspector{display:none}
html body .library-footer{position:sticky;bottom:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:auto;padding:12px 0 16px;border-top:1px solid #F0EFF7;background:#fff}
html body .lib-foot-left{display:flex;align-items:center;gap:12px;min-width:0;flex-wrap:wrap}
html body .lib-foot-left .ref-check{display:inline-flex;align-items:center;margin:0}html body .lib-foot-left .ref-check input{width:16px;height:16px;accent-color:var(--brand)}
html body .lib-foot-left #libraryPageCount{font-size:13px;color:var(--shell-muted)}
html body .lib-selected{display:inline-flex;align-items:center;height:22px;padding:0 9px;border-radius:11px;background:#F1EEFF;color:var(--brand);font-size:12px;font-weight:500}
html body .lib-selected[hidden],html body .lib-batch[hidden]{display:none}
html body .lib-batch{display:flex;align-items:center;gap:6px}html body .lib-batch .ref-btn{height:30px;padding:0 10px;font-size:12.5px}html body .lib-batch .ref-btn svg{width:14px;height:14px}
html body .lib-batch .ref-text-btn{font-size:12.5px}
html body .image-card{position:fixed;inset:auto;margin:0;z-index:80;width:300px;padding:0;border:1px solid #E6E4F3;border-radius:12px;background:#fff;box-shadow:0 14px 36px rgba(22,26,59,.14),0 2px 6px rgba(22,26,59,.05);color:var(--shell-title)}
html body .image-card[open]{animation:psIn .14s ease-out}
html body .image-card header{display:flex;align-items:center;gap:8px;padding:14px 14px 10px}
html body .image-card header b{flex:1;min-width:0;font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body .image-card header .ref-card-status{position:static;flex:none}
html body .image-card-close{flex:none;width:24px;height:24px;display:grid;place-items:center;border:0;border-radius:6px;background:none;color:#8A8EA6;cursor:pointer}html body .image-card-close:hover{background:#F4F3FB}
html body .image-card dl{display:grid;grid-template-columns:64px minmax(0,1fr);gap:7px 10px;margin:0;padding:4px 14px 12px;font-size:12.5px}
html body .image-card dt{color:#8A8EA6}html body .image-card dd{margin:0;overflow-wrap:anywhere}
html body .image-card-actions{display:flex;justify-content:flex-end;gap:8px;padding:10px 14px 14px;border-top:1px solid #F0EFF7}
html body .image-card-actions .ref-btn{height:30px;padding:0 12px;font-size:12.5px}
html body .library-footer .ref-pages{margin-left:auto}html body .library-footer #libraryPageSize{margin-left:4px}

/* v0.5.39 研究图片: 进入标注 in the header (enabled with a selection), per-image edit icon, click to select. */
html body #refLibraryView .ref-page-heading{align-items:flex-start}
html body #refLibraryView .ref-page-heading>button{margin-left:10px}
html body #refLibraryView .ref-page-heading>div{margin-right:auto}
html body .lib-annotate{display:inline-flex;align-items:center;gap:6px}
html body .lib-annotate:disabled{opacity:.5;cursor:not-allowed}
html body .lib-annotate-count{font-variant-numeric:tabular-nums}
html body #libraryGrid .ref-card-photo{position:relative}
html body #libraryGrid .ref-card-photo>button:first-child{cursor:pointer}
html body .ref-card-edit{position:absolute;top:10px;right:10px;z-index:2;width:30px;height:30px;display:grid;place-items:center;border:0;border-radius:8px;background:rgba(255,255,255,.92);color:#353A5C;box-shadow:0 2px 8px rgba(22,26,59,.16);cursor:pointer;opacity:0;transform:translateY(-2px);transition:opacity .15s,transform .15s}
html body .library-card:hover .ref-card-edit,html body .ref-card-edit:focus-visible{opacity:1;transform:none}
html body .ref-card-edit:hover{background:#fff;color:var(--brand)}
html body .library-card.is-selected{box-shadow:0 0 0 2px var(--brand)}
html body .lib-legacy-actions[hidden]{display:none!important}
html body #refLibraryView .ref-page-heading>button{height:40px;min-height:40px;padding:0 18px;font-size:14px;border-radius:8px;display:inline-flex;align-items:center;gap:6px}
html body #refLibraryView .ref-page-heading>button svg{width:16px;height:16px}
html body #metadataClose[hidden]{display:none}
html body #metadataDialog::backdrop{background:rgba(22,26,59,.18);cursor:pointer}

/* v0.5.41 研究信息抽屉精简：去说明文字、训练使用范围、进入标注；备注输入框统一样式。 */
html body #metadataForm>.section-note,html body #metadataDialog .metadata-training,html body #metadataDialog .drawer-section:has(#metadataAnnotate){display:none}
html body #metadataFields .form-field:has(#meta_notes){grid-column:1/-1}
html body #metadataDialog #meta_notes{display:block;width:100%;min-height:96px;max-height:220px;margin-top:6px;padding:9px 11px;border:1px solid #E3E6F4;border-radius:8px;background:#fff;font:inherit;font-size:13px;line-height:1.6;color:var(--shell-title);resize:vertical;box-shadow:none}
html body #metadataDialog #meta_notes:focus{outline:none;border-color:#B9AEFB;box-shadow:0 0 0 3px rgba(82,53,245,.08)}
html body #metadataFields input,html body #metadataFields select{height:40px;min-height:40px;padding:0 11px;border:1px solid #E3E6F4;border-radius:8px;font-size:13px;color:var(--shell-title);box-shadow:none}
html body #metadataFields select{padding-right:30px;background-position:calc(100% - 10px) 50%}
html body #metadataFields input:focus,html body #metadataFields select:focus{outline:none;border-color:#B9AEFB;box-shadow:0 0 0 3px rgba(82,53,245,.08)}

/* v0.5.41 unified, quieter focus for text entry (replaces stacked 2px outline + purple shadow from older sheets). */
html body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),select,textarea){transition:border-color .15s ease,box-shadow .15s ease}
html body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),select,textarea):is(:focus,:focus-visible){outline:none;border-color:#B4A8FA;box-shadow:0 0 0 3px rgba(82,53,245,.09)}
html body #librarySearchForm .filter-pill select:is(:focus,:focus-visible){border:0;box-shadow:none}
html body .project-switcher .ps-search:is(:focus,:focus-visible){border-color:#D3CCF8;box-shadow:0 0 0 3px rgba(82,53,245,.07)}

/* v0.5.42 标注方案与规则 */
html body .rule-hint{position:relative;display:inline-grid;place-items:center;width:16px;height:16px;margin-left:6px;border-radius:50%;background:#EFEEF6;color:#8A8EA6;font-size:11px;font-weight:600;line-height:1;cursor:help;vertical-align:middle;flex:none}
html body .rule-hint:hover,html body .rule-hint:focus-visible{background:#E6E1FD;color:var(--brand);outline:none}
html body .rule-hint::after{content:attr(data-tip);position:absolute;left:50%;top:calc(100% + 8px);transform:translate(-50%,-2px);width:max-content;max-width:280px;padding:9px 11px;border-radius:8px;background:#1E2140;color:#fff;font-size:12px;font-weight:400;line-height:1.6;white-space:normal;text-align:left;box-shadow:0 10px 24px rgba(22,26,59,.18);opacity:0;pointer-events:none;transition:opacity .15s,transform .15s;z-index:30}
html body .rule-hint:hover::after,html body .rule-hint:focus-visible::after{opacity:1;transform:translate(-50%,0)}
html body .rules-v2 .project-page-actions{display:flex;gap:8px;align-items:center}
html body .rules-v2 .ref-page-heading p{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
html body .rule-history{height:26px;padding:0 24px 0 8px;border:1px solid #E6E4F3;border-radius:6px;background-color:#fff;font-size:12px;color:#5F6585;background-position:calc(100% - 7px) 50%}
html body .rule-mode-row{display:flex;align-items:center;gap:4px;margin:0 0 18px}
html body .rule-mode-select{display:flex;align-items:center;gap:10px;font-size:13px;color:#5F6585}html body .rule-mode-select select{height:34px;padding:0 28px 0 10px;border:1px solid #E3E6F4;border-radius:8px;font-size:13px}
html body .rules-v2 .rule-doc h2,html body .rules-v2 .rule-section-title h2{margin:0;font-size:15px;font-weight:600}
html body .rules-v2 .rule-section-title{display:flex;align-items:center;margin:0 0 12px}
html body .rules-v2 .rule-section-title:not(:first-child){margin-top:24px}
html body .rules-v2 .rule-doc>h2{margin:4px 0 8px}
html body .rules-v2.rules-reading .rule-field{display:grid;grid-template-columns:88px minmax(0,1fr);gap:12px;margin:0;padding:12px 0;border-bottom:1px solid #F0EFF7}
html body .rules-v2.rules-reading .rule-field:last-child{border-bottom:0}
html body .rules-v2.rules-reading .rule-field>span{font-size:13px;color:#8A8EA6}
html body .rules-v2.rules-reading .rule-field .rule-readable{margin:0;font-size:13.5px;line-height:1.7;color:var(--shell-title)}
html body .rules-v2:not(.rules-reading) .rule-field{margin:0 0 14px}html body .rules-v2:not(.rules-reading) .rule-field>span{display:block;margin-bottom:6px;font-size:13px;color:#5F6585}
html body .rules-v2:not(.rules-reading) .rule-field textarea{min-height:76px;width:100%;padding:9px 11px;border:1px solid #E3E6F4;border-radius:8px;font:inherit;font-size:13px;line-height:1.6;resize:vertical}
html body .rules-v2:not(.rules-reading) .rule-field input{width:100%;height:40px;padding:0 11px;border:1px solid #E3E6F4;border-radius:8px;font-size:13px}
html body .rules-v2 .rule-preset-table{width:100%;border-collapse:collapse;font-size:13px}
html body .rules-v2 .rule-preset-table th{padding:8px 10px;text-align:left;font-weight:500;color:#8A8EA6;background:#F8F8FE}
html body .rules-v2 .rule-preset-table td{padding:10px;border-bottom:1px solid #F0EFF7}
html body .rules-v2 .rule-preset-table kbd{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border:1px solid #E3E6F4;border-bottom-width:2px;border-radius:5px;background:#fff;font:600 12px/1 'IBM Plex Mono',Consolas,monospace;color:#353A5C}
html body .rules-v2 .rule-preset-table input[type=text],html body .rules-v2 .rule-preset-table input[type=number]{width:100%;height:34px;padding:0 9px;border:1px solid #E3E6F4;border-radius:7px;font-size:13px}
html body .rules-v2 .rule-preset-table input[type=color]{width:34px;height:34px;padding:2px;border:1px solid #E3E6F4;border-radius:7px;background:#fff}
html body .rule-preview-live{border:1px solid #F0EFF7;border-radius:10px;overflow:hidden;background:#FAFAFD}
html body .rule-preview-stage{display:block;padding:12px 12px 0;background:#fff}
html body .rule-preview-stage>.ui-mode-art{width:100%;height:auto;max-height:240px}
html body .rule-preview-stage.rule-photo-preview .rule-photo-sample{height:220px;margin:0}
html body .rule-preview-legend{display:flex;flex-wrap:wrap;gap:8px 18px;padding:10px 14px;font-size:12.5px;color:#353A5C}
html body .rule-preview-legend span{display:inline-flex;align-items:center;gap:8px}html body .rule-preview-legend i{display:inline-block;width:22px;height:3px;border-radius:3px}
html body .rules-v2 .project-publish-bar{display:flex;align-items:center;justify-content:flex-end;gap:16px}
html body .rule-photo-sample>.ui-mode-art>path:nth-child(3){display:inline}
html body .rule-line-table td{vertical-align:middle}html body .rule-line-table .rule-readable.muted{color:#B0B3C6}
html body .rule-line-table input[type=text]{min-width:0}
html body .rule-line-del{width:30px;height:30px;display:grid;place-items:center;border:0;border-radius:7px;background:none;color:#8A8EA6;cursor:pointer}html body .rule-line-del:hover:not(:disabled){background:#FDEEEF;color:#D93F4C}html body .rule-line-del:disabled{opacity:.35;cursor:not-allowed}
html body .rule-add{display:inline-flex;align-items:center;gap:6px;margin-top:12px;height:34px;padding:0 14px;font-size:13px;border-style:dashed}
html body .rule-add:disabled{opacity:.5;cursor:not-allowed}
html body .rule-line-table{table-layout:fixed}html body .rule-line-table th{white-space:nowrap}
html body .rule-line-table th:nth-child(1){width:auto}html body .rule-line-table th:nth-child(2){width:24%}html body .rule-line-table th:nth-child(3){width:58px}html body .rule-line-table th:nth-child(4){width:84px}html body .rule-line-table th:nth-child(5){width:56px}html body .rule-line-table th:nth-child(6){width:44px}
html body .rule-line-table td{padding:8px 6px}html body .rule-line-table td:first-child{padding-left:10px}html body .rules-v2 .rule-line-table input[type=number]{width:100%;padding:0 6px;text-align:center}
/* v0.6.3 AI 预标注页：研究图片式卡片 + 右上角开始/停止 + 渐变进度条 + 底部固定栏 */
html body .pl-page{display:flex;flex-direction:column;gap:14px;min-height:100%;padding-bottom:0}
html body .pl-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
html body .pl-head h1{margin:0}
html body .pl-head p{margin:6px 0 0}
html body .pl-action{display:flex;align-items:center;gap:8px;height:38px;padding:0 18px;border:0;border-radius:10px;color:#fff;font-weight:600;background:linear-gradient(90deg,#5235F5,#4F8FF2);box-shadow:0 4px 12px rgba(82,53,245,.25);white-space:nowrap;cursor:pointer}
html body .pl-action:disabled{opacity:.45;box-shadow:none;cursor:not-allowed}
html body .pl-action.stop{background:#fff;color:#D64545;border:1px solid #F3C2C2;box-shadow:none}
html body .pl-action.stop:hover{background:#FDEDED}
html body .pl-progress{background:#fff;border:1px solid #E7E8F0;border-radius:12px;padding:14px 16px}
html body .pl-progress[hidden]{display:none}
html body .pl-ptop{display:flex;align-items:baseline;gap:14px;margin-bottom:10px;font-size:13px;color:#4A4E6A}
html body .pl-ptop b{font-size:14px;color:#1F2140}
html body .pl-eta{margin-left:auto;color:#5235F5;font-weight:600}
html body .pl-track{height:10px;border-radius:6px;background:#EEF0F6;overflow:hidden}
html body .pl-fill{position:relative;height:100%;border-radius:6px;background:linear-gradient(90deg,#5235F5,#4F8FF2 70%,#3DC6D6);overflow:hidden;transition:width .6s ease}
html body .pl-fill:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.45),transparent);transform:translateX(-100%);animation:plflow 1.8s ease-in-out infinite}
@keyframes plflow{to{transform:translateX(100%)}}
html body .pl-notice:empty{display:none}
html body .pl-filters{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
html body .pl-pick{display:flex;align-items:center;height:34px;border:1px solid #E7E8F0;border-radius:17px;background:#fff;padding:0 4px 0 12px;font-size:13px;margin:0}
html body .pl-pick .pl-key{color:#8A8EA6;margin-right:4px;white-space:nowrap}
html body .pl-pick select{border:0;background:transparent;font-size:13px;color:#1F2140;height:30px;min-height:30px;padding:0 22px 0 4px;box-shadow:none}
html body .pl-spacer{flex:1}
html body .pl-view{display:flex;background:#F0F1F6;border-radius:8px;padding:2px}
html body .pl-view button{width:32px;height:28px;border:0;border-radius:6px;background:none;color:#8A8EA6;display:grid;place-items:center;padding:0;cursor:pointer}
html body .pl-view button.on{background:#fff;color:#5235F5;box-shadow:0 1px 2px rgba(20,22,50,.12)}
html body .pl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:14px;flex:1;align-content:start}
html body .pl-list{display:flex;flex-direction:column;gap:6px;flex:1}
html body .pl-card{position:relative;background:#fff;border:1px solid #E7E8F0;border-radius:12px;overflow:hidden;cursor:pointer;transition:border-color .15s,box-shadow .15s;outline:0}
html body .pl-card:hover{border-color:#CFC7FF;box-shadow:0 6px 18px rgba(20,22,50,.08)}
html body .pl-card.on{border-color:#5235F5;box-shadow:0 0 0 2px rgba(82,53,245,.18)}
html body .pl-thumb{position:relative;aspect-ratio:1.41;background:#E4E5EA}
html body .pl-thumb img{width:100%;height:100%;object-fit:cover;display:block}
html body .pl-check{position:absolute;left:10px;top:10px;width:20px;height:20px;border-radius:6px;border:1.5px solid #fff;background:rgba(20,22,50,.25);box-shadow:0 1px 3px rgba(0,0,0,.25)}
html body .pl-card.on .pl-check{background:#5235F5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/14px no-repeat;border-color:#5235F5}
html body .pl-badge{position:absolute;right:8px;bottom:8px;display:flex;align-items:center;gap:5px;height:24px;padding:0 9px;border-radius:12px;background:rgba(255,255,255,.94);font-size:12px;color:#4A4E6A;box-shadow:0 1px 3px rgba(0,0,0,.15)}
html body .pl-badge i{width:7px;height:7px;border-radius:50%;background:#C3C5D3}
html body .pl-badge.pl-queued i{background:#9AA0B8}
html body .pl-badge.pl-running{color:#5235F5}
html body .pl-badge.pl-running i{background:#5235F5;animation:plpulse 1s ease-in-out infinite}
html body .pl-badge.pl-ready{color:#5235F5;font-weight:600}
html body .pl-badge.pl-ready i{background:#5235F5}
html body .pl-badge.pl-merged{color:#22A06B}
html body .pl-badge.pl-merged i,html body .pl-badge.pl-partial i{background:#22A06B}
html body .pl-badge.pl-outdated{color:#B7791F}
html body .pl-badge.pl-outdated i{background:#E8A23A}
html body .pl-badge.pl-failed{color:#D64545}
html body .pl-badge.pl-failed i{background:#D64545}
@keyframes plpulse{50%{opacity:.25}}
html body .pl-meta{display:flex;flex-direction:column;gap:2px;padding:9px 12px 11px;min-width:0}
html body .pl-meta b{font-size:13px;font-weight:600;color:#1F2140;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
html body .pl-meta small{font-size:12px;color:#8A8EA6}
html body .pl-go{position:absolute;right:12px;bottom:11px;font-size:12px;color:#5235F5;text-decoration:none;font-weight:600}
html body .pl-list .pl-card{display:flex;align-items:center;height:64px}
html body .pl-list .pl-thumb{width:90px;height:64px;aspect-ratio:auto;flex:none}
html body .pl-list .pl-badge{position:static;margin-left:auto;margin-right:14px;box-shadow:none;background:#F4F4F9;order:3}
html body .pl-list .pl-thumb .pl-badge{display:none}
html body .pl-list .pl-meta{flex:1}
html body .pl-list .pl-go{position:static;align-self:flex-start}
html body .pl-noresult{color:#8A8EA6;padding:40px 0;text-align:center;grid-column:1/-1}
html body .pl-footer{position:sticky;bottom:0;display:flex;align-items:center;gap:14px;padding:12px 4px;margin-top:4px;background:#fff;border-top:1px solid #E7E8F0;font-size:13px;color:#4A4E6A;z-index:5}
html body .pl-all{display:flex;align-items:center;gap:6px;margin:0;cursor:pointer}
html body .pl-selected{padding:2px 10px;border-radius:11px;background:#EEEBFF;color:#5235F5;font-weight:600}
html body .pl-clear{border:0;background:none;color:#8A8EA6;font-size:12px;cursor:pointer;padding:0}
html body .pl-pager{display:flex;align-items:center;gap:4px}
html body .pl-pager button{min-width:30px;height:30px;border:1px solid #E7E8F0;border-radius:8px;background:#fff;color:#4A4E6A;font-size:13px;cursor:pointer}
html body .pl-pager button.on{border-color:#5235F5;color:#5235F5;font-weight:600;background:#EEEBFF}
html body .pl-pager button:disabled{opacity:.4;cursor:default}
html body .pl-gap{color:#8A8EA6;padding:0 4px}
html body .pl-badge.pl-empty i{background:#9AA0B8}
/* v0.6.3 模型库 */
html body .ml-lib-tools{margin:4px 0 14px}
html body .ml-lib-search{min-width:240px}
html body .ml-lib-search input{border:0;outline:0;box-shadow:none;background:none;font-size:13px;height:30px;min-height:30px;padding:0 8px 0 0;width:100%}
html body .ml-lib-table td{vertical-align:middle}
html body .ml-lib-name b{display:block;font-weight:600;color:#1F2140}
html body .ml-lib-name small,html body .ml-lib-table td>small{display:block;font-size:12px;color:#8A8EA6;margin-top:2px}
html body .ml-lib-scene{max-width:340px;color:#4A4E6A;font-size:13px;line-height:1.5}
html body .ml-lib-kind{display:inline-block;padding:2px 8px;border-radius:10px;font-size:12px;font-weight:600}
html body .ml-lib-kind.base{background:#EEEBFF;color:#5235F5}
html body .ml-lib-kind.project{background:#E7F6EE;color:#22A06B}
html body .ml-lib-date{white-space:nowrap;font-variant-numeric:tabular-nums;color:#4A4E6A}
html body .ml-lib-used{display:flex;flex-wrap:wrap;gap:6px}
html body .ml-lib-used a{padding:2px 8px;border-radius:10px;background:#F0F1F6;color:#1F2140;font-size:12px;text-decoration:none}
html body .ml-lib-used a:hover{background:#EEEBFF;color:#5235F5}
html body .ml-lib-foot{margin-top:12px}
/* v0.6.5 模型训练：任务列表 + 新建 / 详情抽屉 + 曲线 */
html body .tr-page{display:flex;flex-direction:column;gap:14px}
html body .tr-current{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 16px;background:#fff;border:1px solid #E7E8F0;border-radius:12px}
html body .tr-cur-info{display:flex;align-items:baseline;gap:10px;min-width:0}
html body .tr-cur-key{font-size:12px;color:#5235F5;background:#EEEBFF;border-radius:10px;padding:2px 8px}
html body .tr-cur-info b{font-size:15px;color:#1F2140}
html body .tr-switch-wrap select{max-width:280px}
html body .tr-notice:empty{display:none}
html body .tr-table td{vertical-align:middle}
html body .tr-row{cursor:pointer}
html body .tr-row:hover td{background:#F7F7FC}
html body .tr-row.on td{background:#F1EEFF}
html body .tr-name b{display:block;color:#1F2140;font-weight:600}
html body .tr-name small{color:#8A8EA6;font-size:12px}
html body .tr-muted{color:#4A4E6A;font-size:13px}
html body .tr-prog{position:relative;min-width:220px}
html body .tr-pwrap small{display:block;margin-top:5px;font-size:12px;color:#8A8EA6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}
html body .tr-pwrap .pl-track{height:8px}
html body .pl-fill.static:after{display:none}
html body .tr-f1{font-variant-numeric:tabular-nums;font-weight:600;color:#1F2140;white-space:nowrap}
html body .tr-f1 small{margin-left:6px;font-size:11px;font-weight:600}
html body .tr-f1 small.up{color:#22A06B}
html body .tr-f1 small.down{color:#D64545}
html body .tr-badge{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:11px;font-size:12px;background:#F0F1F6;color:#4A4E6A;white-space:nowrap}
html body .tr-badge:before{content:"";width:7px;height:7px;border-radius:50%;background:#9AA0B8}
html body .tr-running{background:#EEEBFF;color:#5235F5}
html body .tr-running:before{background:#5235F5;animation:plpulse 1s ease-in-out infinite}
html body .tr-completed{background:#E7F6EE;color:#22A06B}
html body .tr-completed:before{background:#22A06B}
html body .tr-failed,html body .tr-interrupted{background:#FDEDED;color:#D64545}
html body .tr-failed:before,html body .tr-interrupted:before{background:#D64545}
html body .tr-ops{white-space:nowrap;text-align:right}
html body .tr-btn{height:28px;padding:0 10px;margin-left:6px;border:1px solid #E7E8F0;border-radius:7px;background:#fff;color:#4A4E6A;font-size:12px;cursor:pointer}
html body .tr-btn:hover{border-color:#CFC7FF;color:#5235F5}
html body .tr-btn.primary{background:#5235F5;border-color:#5235F5;color:#fff}
html body .tr-btn.danger{color:#D64545;border-color:#F3C2C2}
html body .tr-cur-tag{font-size:12px;color:#5235F5;font-weight:600}
html body .tr-empty{text-align:center;color:#8A8EA6;padding:36px 0!important}
html body .tr-pop{position:absolute;left:0;top:100%;z-index:30;background:#fff;border:1px solid #E7E8F0;border-radius:12px;box-shadow:0 14px 36px rgba(20,22,50,.16);padding:10px 12px;margin-top:6px}
html body .tr-curves{display:flex;gap:14px;flex-wrap:wrap}
html body .tr-pop .tr-curves{flex-wrap:nowrap}
html body .tr-chart{flex:1;min-width:240px}
html body .tr-chart-t{font-size:12px;color:#4A4E6A;font-weight:600;margin-bottom:4px}
html body .tr-chart-empty{height:80px;display:grid;place-items:center;color:#8A8EA6;font-size:12px;background:#F7F7FC;border-radius:8px}
html body .tr-svgwrap{position:relative}
html body .tr-svg{width:100%;height:auto;display:block;overflow:visible}
html body .tr-svg .grid{stroke:#EEF0F6;stroke-width:1}
html body .tr-svg .ax{font-size:9px;fill:#8A8EA6;font-variant-numeric:tabular-nums}
html body .tr-tip{position:absolute;top:-4px;transform:translate(-50%,-100%);background:#23243A;color:#fff;font-size:11px;padding:3px 7px;border-radius:6px;white-space:nowrap;pointer-events:none}
html body .tr-backdrop{position:fixed;inset:0;background:rgba(20,22,50,.18);z-index:200;display:flex;justify-content:flex-end}
html body .tr-drawer{width:520px;max-width:96vw;height:100%;background:#fff;box-shadow:-12px 0 36px rgba(20,22,50,.16);display:flex;flex-direction:column;animation:trin .18s ease-out}
html body .tr-drawer.wide{width:640px}
@keyframes trin{from{transform:translateX(30px);opacity:.4}}
html body .tr-dhead{padding:18px 22px 12px;border-bottom:1px solid #EEF0F6}
html body .tr-dhead h2{margin:0;font-size:18px;color:#1F2140}
html body .tr-dbody{flex:1;overflow:auto;padding:16px 22px 22px;display:flex;flex-direction:column;gap:16px}
html body .tr-dfoot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 22px;border-top:1px solid #EEF0F6;font-size:12px}
html body .tr-dstate{display:flex;align-items:center;gap:10px;font-size:12px}
html body .tr-dstate .tr-btn{margin-left:auto}
html body .tr-err{color:#D64545;font-size:13px;margin:0}
html body .tr-nodes{list-style:none;display:flex;margin:0;padding:0}
html body .tr-node{flex:1;position:relative;padding-top:20px;text-align:center;min-width:0}
html body .tr-node i{position:absolute;top:2px;left:50%;width:12px;height:12px;margin-left:-6px;border-radius:50%;background:#E4E5EA;border:2px solid #fff;box-shadow:0 0 0 1px #D5D7E2;z-index:1;box-sizing:border-box}
html body .tr-node:before{content:"";position:absolute;top:7px;left:-50%;width:100%;height:2px;background:#E4E5EA}
html body .tr-node:first-child:before{display:none}
html body .tr-node.done i{background:#5235F5;box-shadow:0 0 0 1px #5235F5}
html body .tr-node.done:before{background:#5235F5}
html body .tr-node.now i{background:#fff;box-shadow:0 0 0 3px #5235F5;animation:plpulse 1.2s ease-in-out infinite}
html body .tr-node.stop i{background:#D64545;box-shadow:0 0 0 1px #D64545}
html body .tr-node b{display:block;font-size:12px;color:#1F2140}
html body .tr-node small{display:block;font-size:10px;color:#8A8EA6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .tr-eta{margin:0;font-size:13px;color:#5235F5;font-weight:600}
html body .tr-result,html body .tr-cfg{border-top:1px solid #EEF0F6;padding-top:12px}
html body .tr-result h3,html body .tr-cfg h3{font-size:14px;margin:0 0 8px}
html body .tr-dl{display:grid;grid-template-columns:110px 1fr;gap:6px 12px;margin:0 0 10px;font-size:13px}
html body .tr-dl dt{color:#8A8EA6;margin:0}
html body .tr-dl dd{margin:0;color:#1F2140;word-break:break-all}
html body .tr-step h3{display:flex;align-items:center;gap:8px;font-size:14px;margin:0 0 10px;color:#1F2140}
html body .tr-no{width:20px;height:20px;border-radius:50%;background:#5235F5;color:#fff;font-size:12px;display:grid;place-items:center}
html body .tr-hint{position:relative;width:18px;height:18px;border-radius:50%;border:1px solid #C9CBD8;color:#8A8EA6;font-size:11px;display:grid;place-items:center;cursor:help}
html body .tr-hint:hover:after{content:attr(data-tip);position:absolute;top:24px;left:0;width:240px;white-space:normal;background:#23243A;color:#fff;font-size:12px;line-height:1.6;padding:8px 10px;border-radius:8px;z-index:10;font-weight:400}
html body .tr-grid2{display:grid;grid-template-columns:1fr 1.4fr;gap:12px}
html body .tr-grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:10px}
html body .tr-field label{display:block;font-size:12px;color:#8A8EA6;margin-bottom:4px}
html body .tr-input{width:100%;height:34px;min-height:34px;border:1px solid #E7E8F0;border-radius:8px;padding:0 10px;font-size:13px;background:#fff;box-sizing:border-box}
html body .tr-ds-sum{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:13px;color:#4A4E6A;margin-bottom:6px}
html body .tr-ds-sum b{color:#1F2140}
html body .tr-ds-tools{display:flex;gap:12px;margin-bottom:6px}
html body .tr-link{border:0;background:none;padding:0;color:#5235F5;font-size:12px;cursor:pointer}
html body .tr-ds-list{max-height:280px;overflow:auto;border:1px solid #EEF0F6;border-radius:10px;padding:4px}
html body .tr-ds-item{display:flex;align-items:center;gap:10px;height:40px;padding:0 8px;border-radius:7px;cursor:pointer;margin:0}
html body .tr-ds-item:hover{background:#F7F7FC}
html body .tr-ds-item img{width:46px;height:32px;object-fit:cover;border-radius:5px;background:#E4E5EA}
html body .tr-ds-name{flex:1;min-width:0;font-size:13px;color:#1F2140;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
html body .tr-ds-item small{font-size:12px;color:#8A8EA6;white-space:nowrap}
html body .tr-ds-item.off{opacity:.5;cursor:default}
html body .tr-val{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:10px}
html body .tr-val-k{font-size:12px;color:#8A8EA6;margin-right:4px}
html body .tr-chip{height:26px;padding:0 10px;border:1px solid #E7E8F0;border-radius:13px;background:#fff;font-size:12px;color:#4A4E6A;cursor:pointer}
html body .tr-chip.on{background:#E7F6EE;border-color:#A8DFC2;color:#22A06B;font-weight:600}
html body .tr-adv summary{cursor:pointer;font-size:13px;color:#4A4E6A}
html body .tr-f1 small.flat{color:#8A8EA6}
html body .tr-base b{display:block;font-weight:500;color:#1F2140;font-size:13px}
html body .tr-base small{display:block;font-size:12px;color:#8A8EA6}
html body .tr-use{margin:0;font-size:12px}
html body .pl-acts{display:flex;align-items:center;gap:10px}
html body .pl-model select{max-width:260px}
/* v0.6.8 评测集 / 模型分析 */
html body .an-tabs{margin-top:-4px}
html body .an-body{display:flex;flex-direction:column;gap:18px}
html body .an-runs{display:flex;gap:10px;flex-wrap:wrap}
html body .an-run{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:10px 14px;border:1px solid #E7E8F0;border-radius:10px;background:#fff;cursor:pointer;min-width:200px;text-align:left}
html body .an-run b{font-size:13px;color:#1F2140}
html body .an-run small{font-size:12px;color:#8A8EA6}
html body .an-run.on{border-color:#5235F5;box-shadow:0 0 0 2px rgba(82,53,245,.15)}
html body .an-prog .pl-ptop .tr-btn{margin-left:12px}
html body .an-sec{background:#fff;border:1px solid #E7E8F0;border-radius:12px;padding:16px 18px}
html body .an-sec h2{font-size:15px;margin:0 0 4px;color:#1F2140}
html body .an-sec h3{font-size:13px;margin:14px 0 8px;color:#1F2140}
html body .an-note{margin:0 0 12px;font-size:12px}
html body .an-board td{font-variant-numeric:tabular-nums}
html body .an-board td.best{color:#22A06B;font-weight:700}
html body .an-model{display:flex;align-items:center;gap:8px}
html body .an-model i{width:10px;height:10px;border-radius:3px;flex:none}
html body .an-heat td.an-cell{text-align:center;cursor:pointer;font-variant-numeric:tabular-nums;font-weight:600;color:#1F2140;border-radius:4px}
html body .an-heat td.an-cell:hover{outline:2px solid #5235F5}
html body .an-img{max-width:240px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
html body .an-legend{display:flex;flex-wrap:wrap;gap:12px;font-size:12px;color:#4A4E6A;margin-top:6px}
html body .an-legend span{display:flex;align-items:center;gap:5px}
html body .an-legend i{width:12px;height:3px;border-radius:2px}
html body .tr-chip.on[style]{background:color-mix(in srgb,var(--c) 14%,#fff);border-color:var(--c);color:var(--c)}
html body .an-viewer{width:min(1100px,96vw)}
html body .an-seg{height:32px;align-self:flex-start;flex-wrap:wrap;height:auto}
html body .an-seg button{height:28px}
html body .an-vinfo{display:flex;gap:16px;font-size:13px;color:#1F2140;font-variant-numeric:tabular-nums}
html body .an-stage{position:relative;width:100%;border-radius:8px;overflow:hidden;background:#2A2B30}
html body .an-stage img{display:block;width:100%;height:auto}
html body .an-stage svg{position:absolute;inset:0;width:100%;height:100%}
html body .an-ai-head{display:flex;align-items:center;justify-content:space-between}
html body .an-summary p{font-size:14px;line-height:1.8;color:#1F2140;margin:0;padding:12px 14px;background:#F7F5FF;border-radius:10px}
html body .an-rank{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:6px;font-size:13px}
html body .an-rank b{margin-right:8px;color:#1F2140}
html body .an-rank span{color:#4A4E6A}
html body .an-findings{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px}
html body .an-finding{border:1px solid #EEF0F6;border-radius:10px;padding:12px 14px}
html body .an-finding b{font-size:13px;color:#1F2140}
html body .an-finding p{margin:6px 0 8px;font-size:13px;line-height:1.7;color:#4A4E6A}
html body .an-ev{display:flex;flex-wrap:wrap;gap:6px}
html body .an-ev span{font-size:11px;padding:2px 8px;border-radius:10px;background:#EEEBFF;color:#5235F5;font-variant-numeric:tabular-nums}
html body .an-sugg{margin:0;padding-left:20px;font-size:13px;line-height:1.9;color:#1F2140}
html body .an-foot{margin-top:14px;font-size:12px}
html body .an-models{max-height:300px}
html body .an-warn{margin:0 0 12px;padding:10px 12px;border-radius:8px;background:#FFF7E8;color:#9A5B00;font-size:13px;line-height:1.6}
html body .an-badge-warn{display:inline-block;margin-top:4px;font-size:11px;padding:1px 8px;border-radius:10px;background:#FFF7E8;color:#9A5B00}
/* v0.6.10 training parameters: label + ? + default, tooltip on hover or keyboard focus */
html body .tr-param label{display:flex;align-items:center;gap:6px}
html body .tr-param label small{margin-left:auto;color:#A6AABF;font-size:11px}
html body .tr-param .tr-hint{width:16px;height:16px;font-size:10px;flex:none}
html body .tr-hint:focus:after{content:attr(data-tip);position:absolute;top:24px;left:0;width:240px;white-space:normal;background:#23243A;color:#fff;font-size:12px;line-height:1.6;padding:8px 10px;border-radius:8px;z-index:10;font-weight:400}
html body .tr-param:nth-child(3n) .tr-hint:after{left:auto;right:-60px}
html body .tr-params+.tr-link{margin-top:10px}
/* v0.6.12 validation mode segmented control + post-training evaluation */
html body .tr-seg{display:inline-flex;border:1px solid #DCE2F0;border-radius:8px;overflow:hidden;margin-right:12px}
html body .tr-seg button{border:0;background:#fff;color:#5B6080;font-size:12px;padding:6px 12px;cursor:pointer}
html body .tr-seg button.on{background:#EEEBFF;color:#5335F4;font-weight:600}
html body .tr-val-note{font-size:12px;color:#9A6B12;line-height:1.6}
html body .tr-pe-note{font-size:12px;margin:6px 0 0}
html body .tr-post{margin-top:10px;font-size:13px}
/* v0.6.13 数据集 */
html body .ds-ver{display:inline-block;margin-left:6px;padding:0 6px;border-radius:5px;background:#EEEBFF;color:#5335F4;font-size:11px;font-weight:600;line-height:18px;vertical-align:1px}
html body .ds-upd{display:block;margin-top:4px;font-size:12px;color:#9A6B12}
/* v0.6.14 批量预测 */
html body .an-pcell{cursor:pointer;white-space:nowrap;font-variant-numeric:tabular-nums;background:#F6F4FF}
html body .an-pcell:hover{background:#EEEBFF}
/* v0.6.15 模型预测 viewer: full-screen, image with numbered lines on the left, line list on the right */
html body .pd-export{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
html body .pd-export a.tr-btn{text-decoration:none;display:inline-flex;align-items:center}
html body .pd-export a.tr-btn[aria-disabled=true]{opacity:.45;pointer-events:none}
html body .pd-pngmodel{width:auto;max-width:220px;height:32px;padding:0 8px}
html body .pd-viewer{position:fixed;inset:16px;z-index:60;background:#fff;border-radius:12px;box-shadow:0 0 0 100vmax rgba(20,22,40,.45),0 20px 60px rgba(20,22,40,.3);display:flex;flex-direction:column;overflow:hidden;outline:none}
html body .pd-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 14px;border-bottom:1px solid #E6EAF3}
html body .pd-nav{display:flex;align-items:center;gap:8px;margin-right:auto;min-width:0}
html body .pd-nav b{max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body .pd-nav small{color:#8A8EA6}
html body .pd-seg{display:inline-flex}
html body .pd-only{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:#4A4E6A;cursor:pointer}
html body .pd-close{margin-left:4px}
html body .pd-main{flex:1;display:grid;grid-template-columns:minmax(0,1fr) 360px;min-height:0}
html body .pd-stage{position:relative;overflow:hidden;background:#1C1D2B;cursor:grab;touch-action:none}
html body .pd-stage.drag{cursor:grabbing}
html body .pd-layer{position:absolute;left:0;top:0;transform-origin:0 0}
html body .pd-layer .pd-img,html body .pd-layer .pd-svg{position:absolute;left:0;top:0;max-width:none;max-height:none;user-select:none}
html body .pd-svg .pd-hit{fill:none;stroke:transparent;pointer-events:stroke;cursor:pointer}
html body .pd-svg .pd-halo{fill:none;stroke:rgba(255,255,255,.85);stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
html body .pd-svg .pd-badge{cursor:pointer}
html body .pd-svg .pd-badge text{font:600 11px/1 system-ui,sans-serif;pointer-events:none}
html body .pd-side{display:flex;flex-direction:column;border-left:1px solid #E6EAF3;min-height:0}
html body .pd-sum{padding:12px 14px;font-weight:600;color:#23243A;border-bottom:1px solid #EEF1F7}
html body .pd-listwrap{flex:1;overflow:auto}
html body .pd-list{width:100%;border-collapse:collapse;font-size:13px;font-variant-numeric:tabular-nums}
html body .pd-list th{position:sticky;top:0;background:#F7F8FC;color:#8A8EA6;font-weight:500;text-align:left;padding:7px 10px}
html body .pd-list td{padding:7px 10px;border-bottom:1px solid #F1F3F8;color:#3A3D55}
html body .pd-list tr{cursor:pointer}
html body .pd-list tr.hov td{background:#F6F4FF}
html body .pd-list tr.on td{background:#E9F0FF}
html body .pd-list .pd-no{font-weight:700;color:#23243A;width:36px}
html body .pd-grade{display:inline-block;padding:0 7px;border-radius:9px;font-size:12px;line-height:18px;color:var(--g);background:color-mix(in srgb,var(--g) 14%,#fff)}
html body .pd-hint{font-size:12px;padding:10px 14px;margin:0;border-top:1px solid #EEF1F7}
html body .pd-loading{padding:14px}
@media(max-width:900px){html body .pd-main{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) 40%}html body .pd-side{border-left:0;border-top:1px solid #E6EAF3}}
/* v0.6.16 模型预测: run list → result image grid → viewer */
html body .pd-runs .tr-row{cursor:pointer}
html body .pd-mcell{display:flex;flex-wrap:wrap;gap:4px;max-width:320px}
html body .pd-mname{font-size:12px;padding:1px 8px;border-radius:9px;background:#F1EFFE;color:#4B3BC4;white-space:nowrap;max-width:300px;overflow:hidden;text-overflow:ellipsis}
html body .pd-back{margin:0 0 6px;display:inline-flex;align-items:center;gap:6px;background:none;border:0;color:#5B6080;font-size:13px;cursor:pointer;padding:4px 0}
html body .pd-back:hover{color:#5335F4}
html body .pd-runprog{padding:10px 14px}
html body .pd-warn{color:#9A6B12;font-size:12px}
html body .pd-card{cursor:pointer}
html body .pd-card.off{cursor:default;opacity:.7}
html body .pl-badge.pd-count{background:rgba(255,255,255,.92);color:#23243A}
html body .pl-badge.pd-count i{background:#E8338C}
html body .pl-badge.pd-fail{color:#C2362F}
html body .pl-badge.pd-fail i{background:#C2362F}
html body .pl-badge.pd-wait{color:#8A8EA6}
html body .pl-badge.pd-wait i{background:#C9CBD8}
html body .pd-res div{white-space:nowrap}
/* v0.6.17 one model per prediction: plain summary line */
html body .pd-sumline{display:flex;flex-wrap:wrap;gap:6px 18px;margin:2px 0 14px;font-size:14px;color:#3A3D55}
html body .pd-sumline span{white-space:nowrap}
