body.wanweb-header-unified { margin:0!important; padding:0!important; }
/* WanWeb shell: scoped to the shared component, independent of page CSS. */
body.wanweb-header-unified { font-family:system-ui,"Microsoft YaHei",sans-serif; }
body.wanweb-header-unified #header { display:block!important; position:relative!important; inset:auto!important; width:calc(100% - 32px)!important; max-width:1760px!important; min-height:0!important; height:auto!important; margin:12px auto!important; padding:0!important; box-sizing:border-box!important; border:1px solid var(--lh-line)!important; border-radius:10px!important; background:var(--lh-bg)!important; color:var(--lh-text)!important; box-shadow:none!important; backdrop-filter:none!important; transform:none!important; overflow:visible!important; }
body.wanweb-header-unified { --lh-bg:#151c27; --lh-text:#e7edf5; --lh-muted:#a9b5c5; --lh-line:#344052; --lh-hover:#243247; --lh-active:#213c5c; --lh-accent:#a9d4ff; }
html[data-theme="light"] body.wanweb-header-unified { --lh-bg:#fff; --lh-text:#202b3b; --lh-muted:#59687a; --lh-line:#dce3eb; --lh-hover:#f1f5f9; --lh-active:#eaf2fd; --lh-accent:#205daa; }
body.wanweb-header-unified #header::before,body.wanweb-header-unified #header::after { content:none!important; display:none!important; }
body.wanweb-header-unified #header .header-inner { display:grid!important; grid-template-columns:40px max-content minmax(0,1fr) auto!important; gap:14px!important; align-items:center!important; width:100%!important; min-height:72px!important; margin:0!important; padding:12px 18px!important; box-sizing:border-box!important; background:none!important; border:0!important; box-shadow:none!important; }
body.wanweb-header-unified #header .site-logo { display:block!important; position:static!important; width:40px!important; height:40px!important; margin:0!important; padding:0!important; object-fit:contain!important; border:0!important; border-radius:0!important; box-shadow:none!important; transform:none!important; }
body.wanweb-header-unified #header h1.site-title { display:block!important; position:static!important; margin:0!important; padding:0!important; max-width:none!important; width:auto!important; font:700 20px/1.3 system-ui,"Microsoft YaHei",sans-serif!important; letter-spacing:0!important; color:var(--lh-text)!important; -webkit-text-fill-color:currentColor!important; background:none!important; white-space:nowrap!important; text-shadow:none!important; }
body.wanweb-header-unified #header #nav { display:flex!important; grid-column:auto!important; grid-row:auto!important; align-items:center!important; justify-content:flex-end!important; flex-wrap:nowrap!important; gap:4px!important; min-width:0!important; width:auto!important; margin:0!important; padding:0!important; border:0!important; background:none!important; box-shadow:none!important; overflow-x:auto!important; }
body.wanweb-header-unified #header #nav a,body.wanweb-header-unified #header #userArea :is(button,a) { display:inline-flex!important; align-items:center!important; justify-content:center!important; flex:0 0 auto!important; min-height:38px!important; width:auto!important; margin:0!important; padding:8px 11px!important; box-sizing:border-box!important; border:1px solid transparent!important; border-radius:6px!important; font:500 13px/20px system-ui,"Microsoft YaHei",sans-serif!important; letter-spacing:0!important; color:var(--lh-muted)!important; background:transparent!important; text-decoration:none!important; box-shadow:none!important; white-space:nowrap!important; cursor:pointer!important; transition:none!important; transform:none!important; }
body.wanweb-header-unified #header #nav a.active { background:var(--lh-active)!important; color:var(--lh-accent)!important; font-weight:650!important; }
body.wanweb-header-unified #header #nav a::before,body.wanweb-header-unified #header #nav a::after { content:none!important; }
body.wanweb-header-unified #header #userArea { display:flex!important; grid-column:auto!important; grid-row:auto!important; align-items:center!important; gap:8px!important; margin:0!important; padding:0!important; width:auto!important; }
body.wanweb-header-unified #header #userArea :is(button,a) { border-color:var(--lh-line)!important; }
body.wanweb-header-unified #header a:focus-visible,body.wanweb-header-unified #header button:focus-visible { outline:3px solid var(--lh-accent)!important; outline-offset:2px!important; }
@media(hover:hover) and (pointer:fine) { body.wanweb-header-unified #header #nav a:hover,body.wanweb-header-unified #header #userArea :is(button,a):hover { background:var(--lh-hover)!important; } }
@media(max-width:1200px) { body.wanweb-header-unified #header .header-inner { grid-template-columns:40px minmax(0,1fr) auto!important; gap:10px!important; } body.wanweb-header-unified #header #nav { grid-column:1 / -1!important; grid-row:2!important; justify-content:flex-start!important; } body.wanweb-header-unified #header #userArea { grid-column:3!important; grid-row:1!important; } }
@media(max-width:600px) { body.wanweb-header-unified #header { width:calc(100% - 20px)!important; margin:10px auto!important; } body.wanweb-header-unified #header .header-inner { grid-template-columns:32px minmax(0,1fr) auto!important; padding:10px!important; gap:8px!important; } body.wanweb-header-unified #header .site-logo { width:32px!important; height:32px!important; } body.wanweb-header-unified #header h1.site-title { font-size:16px!important; white-space:normal!important; } }

body.wanweb-header-unified #header #userArea :is(button,a) { position:static!important; inset:auto!important; min-width:0!important; height:38px!important; }
body.wanweb-header-unified #header #userArea :is(button,a)::before,body.wanweb-header-unified #header #userArea :is(button,a)::after { content:none!important; }

body.wanweb-header-unified #header #userArea { min-width:0!important; flex-wrap:wrap!important; justify-content:flex-end!important; }
body.wanweb-header-unified #header .user-identity,body.wanweb-header-unified #header .admin-user-badge { color:var(--lh-muted)!important; font:12px/1.4 system-ui,"Microsoft YaHei",sans-serif!important; max-width:190px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media(max-width:1500px) { body.wanweb-header-unified #header .header-inner { grid-template-columns:40px minmax(0,1fr) auto!important; } body.wanweb-header-unified #header #nav { grid-column:1 / -1!important; grid-row:2!important; justify-content:flex-start!important; } body.wanweb-header-unified #header #userArea { grid-column:3!important; grid-row:1!important; } }
@media(max-width:700px) { body.wanweb-header-unified #header .header-inner { grid-template-columns:32px minmax(0,1fr)!important; } body.wanweb-header-unified #header #nav { grid-column:1 / -1!important; grid-row:2!important; } body.wanweb-header-unified #header #userArea { grid-column:1 / -1!important; grid-row:3!important; justify-content:flex-start!important; } }

/* Studio v2 header —「东方动画制作所」顶栏（2026-09-26）
   深墨底 + 暖纸文字 + 鎏金激活；浅色/深色统一为同一身份条。 */
body.wanweb-header-unified { --lh-bg:#17202f; --lh-text:#e7edf5; --lh-muted:#aab4c6; --lh-line:#35445a; --lh-hover:#242f45; --lh-active:#304767; --lh-accent:#9cc9d3; }
html[data-theme="light"] body.wanweb-header-unified { --lh-bg:#17202f; --lh-text:#e7edf5; --lh-muted:#aab4c6; --lh-line:#35445a; --lh-hover:#242f45; --lh-active:#304767; --lh-accent:#9cc9d3; }
body.wanweb-header-unified #header { border-radius:14px!important; border-color:#35445a!important; box-shadow:0 16px 40px rgba(31,44,72,.20)!important; }
body.wanweb-header-unified #header .header-inner { grid-template-columns:46px max-content minmax(0,1fr) auto!important; min-height:76px!important; padding:14px 20px!important; gap:16px!important; }
body.wanweb-header-unified #header .site-logo { width:42px!important; height:42px!important; border-radius:11px!important; background:#21343e!important; }
body.wanweb-header-unified #header h1.site-title { font-size:21px!important; letter-spacing:.01em!important; }
body.wanweb-header-unified #header #nav a { border-radius:9px!important; font-weight:600!important; }
body.wanweb-header-unified #header #nav a.active { background:linear-gradient(180deg,#284b5d,#213f4e)!important; color:#b8dbea!important; box-shadow:inset 0 -2px 0 #80b5cc!important; }
body.wanweb-header-unified #header #userArea :is(button,a) { border-color:#344852!important; border-radius:9px!important; background:#1d2d36!important; color:#d3e2e7!important; }
@media(hover:hover) and (pointer:fine) { body.wanweb-header-unified #header #nav a:hover { background:#22343e!important; color:#d3e6ed!important; } }

/* 加载态骨架（2026-09-27）：导航与用户区要等 /api/me 返回才渲染，先占位，
   避免首帧「空顶栏 → 右侧突然弹出」的跳变。颜色跟随顶栏文字色，白天/夜晚自动适配。 */
body.wanweb-header-unified #header .workbench-skeleton { display:inline-block!important; flex:0 0 auto!important; height:38px!important; border-radius:9px!important; background:currentColor!important; animation:wanwebHeaderSkeleton 1.5s ease-in-out infinite; }
body.wanweb-header-unified #header .workbench-skeleton-nav { width:76px!important; }
body.wanweb-header-unified #header .workbench-skeleton-user { width:118px!important; }
@keyframes wanwebHeaderSkeleton { 0%,100% { opacity:.12; } 50% { opacity:.26; } }
@media (prefers-reduced-motion:reduce) { body.wanweb-header-unified #header .workbench-skeleton { animation:none!important; opacity:.18; } }

/* ── 壳内嵌入模式（控场 ?embed=1）─────────────────────────────────────────────
   壳管导航、页面管内容：隐藏本页顶栏的品牌与导航条，只保留账号/主题区。
   选择器形状与本文件既有的 body.wanweb-header-unified #header #nav 对齐并靠后加载取胜。 */
html[data-embed="1"] body #header #nav,
html[data-embed="1"] body.wanweb-header-unified #header #nav,
html[data-embed="1"] body #header .site-logo,
html[data-embed="1"] body #header h1.site-title,
html[data-embed="1"] body #header .workbench-brand { display: none !important; }
html[data-embed="1"] body #header .header-inner { grid-template-columns: minmax(0, 1fr) auto !important; gap: 8px !important; }
html[data-embed="1"] body #header { margin: 8px auto !important; }

/* ── 壳内嵌入模式：工作区页签交给壳侧栏（2026-10-01）─────────────────────
   控场已经把「项目库 / 排期总览」和「剧本 / 图像 / 视频 / 灵感」做进壳的
   左栏（项目中心 / 生产中心的创作工作区）。页内再显示同一排页签就是两处重复，
   与「壳管导航、页面管内容」冲突。模块页签（漫剧/漫画/游戏）与项目选择器、
   当前项目工作区锚点都是内容级导航，保持可见。 */
html[data-embed="1"] body .workspace-tabs { display: none !important; }

/* 业务模块页签（漫剧/漫画/游戏/电影）：控场左栏「业务模块」已承担同一筛选并带项目数，
   页内在 embed 模式下不再重复（2026-10-01）。模块内的项目选择器与当前项目工作区保持可见。 */
html[data-embed="1"] body .project-kind-tabs { display: none !important; }

/* 壳内嵌入模式收尾（2026-10-01，用户）：网页自己的顶栏整条（品牌/导航/账号/主题/后台/退出）
   与页面标题区都不再显示 —— 壳已提供同样能力（顶栏夜间、状态栏账号与版本、右下角后台/退出、
   五中心与侧栏导航）。腾出的纵向空间全部留给内容。 */
html[data-embed="1"] body #header { display: none !important; }
html[data-embed="1"] body .workspace-page-head,
html[data-embed="1"] body .workspace-page-head + .project-kind-tabs,
html[data-embed="1"] body .workspace-page-head ~ .project-kind-tabs,
html[data-embed="1"] body .workspace-page-head ~ .project-tabs,
html[data-embed="1"] body #main > .section-header,
html[data-embed="1"] body #main > .workspace-page-head { display: none !important; }
/* 嵌入页由控场提供中心标题、一级导航和账号区；WanWeb 自带工作台头部与页面头全部退场。 */
html[data-embed="1"] body #main > .project-layout,
html[data-embed="1"] body #main > .project-selector-strip { margin-top: 0 !important; }
html[data-embed="1"] body #main { padding-top: 0 !important; }
