/* 固定两行外壳：公开频道绿色，编辑工作区蓝色；不随页面布局改变。 */
body { --site-shell-height:112px; }
body .site-header.nb-top { box-sizing:border-box; position:sticky; top:0; z-index:40; display:flex; flex-wrap:nowrap; justify-content:flex-start; align-items:center; gap:24px; height:64px; min-height:64px; margin:0; padding:0 24px; border:0; border-bottom:1px solid var(--reader-line); background:var(--reader-paper); color:var(--reader-body); font:400 14px/1.5 var(--ui-font,var(--crm-font)); backdrop-filter:none; }
body .site-header .nb-brand { flex:none; display:inline-flex; margin:0; padding:0; text-decoration:none; }
body .site-header .nb-nav { order:0; align-self:center; display:flex; flex:none; align-items:center; gap:4px; width:auto; height:40px; padding:0; overflow:auto; }
body .site-header .nb-nav a, body .site-header .nb-nav a[aria-current="page"] { box-sizing:border-box; align-self:center; display:inline-flex; align-items:center; justify-content:center; flex:none; height:34px; margin:0; padding:0 12px; border:0; border-radius:2px; background:transparent; color:var(--reader-body); font:500 14px/1.3 var(--ui-font,var(--crm-font)); text-decoration:none; white-space:nowrap; }
body .site-header .nb-nav a[aria-current="page"] { background:var(--reader-selected-bg,#d7ff35); color:var(--reader-selected-ink,#172126); font-weight:600; }
body .site-header .nb-right { display:flex; flex:none; align-items:center; gap:8px; margin-left:auto; height:44px; }
body .site-header>.nb-search-link { margin-left:auto; }
body .site-header .nb-right>.nb-search-link { margin-left:0; }
body .site-header .nb-search-link { box-sizing:border-box; display:inline-flex; flex:none; align-items:center; justify-content:center; width:34px; height:34px; padding:7px; border-radius:2px; color:var(--reader-body); text-decoration:none; }
body .site-header .nb-search-link:hover,body .site-header .nb-search-link[aria-current="page"] { background:var(--reader-selected-bg,#d7ff35); color:var(--reader-selected-ink,#172126); }
body .site-header .nb-search-link svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
body .site-header .nb-status { display:none; }
body .site-header .sd-menu { position:relative; }
body .site-header .sd-menu__btn { display:block; max-width:130px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:6px 10px; border:1px solid var(--reader-line); border-radius:2px; background:transparent; color:var(--reader-body); font:500 13px/1.5 var(--ui-font,var(--crm-font)); cursor:pointer; }
body .site-header .sd-menu__pop { position:absolute; right:0; top:calc(100% + 7px); z-index:50; width:260px; max-width:calc(100vw - 24px); border:1px solid var(--reader-line); background:var(--reader-paper); box-shadow:0 8px 24px #0002; }
body .site-header [hidden] { display:none; }
body .site-header .sd-menu__who { padding:12px; overflow-wrap:anywhere; color:var(--reader-muted); font:400 12px/1.6 var(--ui-font,var(--crm-font)); }
body .site-header .sd-menu__who b { display:block; }
body .site-header .sd-menu__group { border-top:1px solid var(--reader-line); }
body .site-header .sd-menu__group :is(a,button) { box-sizing:border-box; display:block; width:100%; padding:10px 12px; border:0; background:none; color:var(--reader-body); text-decoration:none; text-align:left; font:400 14px/1.5 var(--ui-font,var(--crm-font)); cursor:pointer; }
body .site-header .sd-menu__group :is(a,button):hover { background:var(--reader-hover); }
body .site-header .sd-menu__group [hidden] { display:none; }
body .four-nav { box-sizing:border-box; height:48px; min-height:48px; gap:8px; padding:6px 24px; z-index:35; background:var(--crm-info-bg,#edf2ff); color:var(--crm-info-ink,#3555a2); }
body .four-nav .four-links { flex:0 1 auto; gap:4px; }
body .four-nav .four-tab, body .four-nav .four-home { box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; height:34px; padding:0 12px; margin:0; font:500 14px/1.3 var(--ui-font,var(--crm-font)); }
body .four-nav .four-tab[aria-current="page"] { background:#3555a2; color:#fff; font-weight:600; }
body .four-nav .four-home { border:0; color:inherit; }
body .four-nav .four-side { margin:0 0 0 auto; font-size:12px; }
body .four-nav .four-side[aria-pressed="true"] { background:var(--crm-info-ink); border-color:var(--crm-info-ink); color:var(--crm-info-bg); }
body:has(.site-header) .tp-side { top:var(--site-shell-height); max-height:calc(100dvh - var(--site-shell-height)); }
body.library-page .tp-side { max-height:none; }
body:has(.site-header) h2[id] { scroll-margin-top:calc(var(--site-shell-height) + 16px); }
/* 账号弹窗沿用 auth.js；独立后台也使用同一套登录交互。 */
body .sd-modal { position:fixed; inset:0; z-index:100; display:grid; place-items:center; background:#151c1fbb; color:var(--reader-body); font:400 14px/1.6 var(--ui-font,var(--crm-font)); }
body .sd-modal.sd-hide { display:none; }
body .sd-modal__box { box-sizing:border-box; width:min(400px,calc(100vw - 32px)); margin:0; padding:0; border:1px solid var(--reader-line); border-radius:6px; background:var(--reader-paper); }
body .sd-modal__head, body .sd-modal__foot { display:flex; align-items:center; justify-content:space-between; padding:16px; gap:10px; }
body .sd-modal__body { padding:16px; }
body .sd-modal__body label { display:block; margin-bottom:12px; }
body .sd-modal__body span { display:block; margin-bottom:4px; }
body .sd-modal__body input { box-sizing:border-box; width:100%; padding:8px; border:1px solid var(--reader-border); background:var(--reader-paper); color:inherit; font:inherit; }
body .sd-modal__row { display:grid; grid-template-columns:1fr auto; gap:8px; }
body .sd-modal__msg { padding:0 16px; color:var(--sd-alert,#b33); }
body .sd-modal button { padding:6px 10px; border:1px solid var(--reader-border); border-radius:2px; background:var(--reader-panel); color:inherit; font:inherit; cursor:pointer; }
@media(max-width:800px) {
  body .site-header.nb-top { flex-wrap:wrap; height:84px; min-height:84px; gap:0 12px; padding:0 16px; }
  body .site-header .nb-brand,body .site-header .nb-right { height:44px; }
  body .site-header .nb-nav { order:3; flex:1 1 100%; height:40px; width:100%; gap:4px; }
  body .site-header .sd-menu__pop { position:fixed; right:12px; top:48px; }
  body .four-nav { padding:6px 16px; gap:0; }
  body .four-nav .four-links { flex:1; }
  body .four-nav .four-tab, body .four-nav .four-home { padding:0 10px; font-size:13px; }
  body .four-nav .four-side { display:none; }
}

.body-return { padding:12px 24px; font:400 13px/1.5 var(--ui-font,var(--crm-font)); }

/* Compact shared shell: navigation stays readable; secondary controls scroll with content. */
body .site-header.nb-top{height:48px;min-height:48px;gap:16px;padding:0 20px}
body .four-nav{height:38px;min-height:38px;padding:2px 20px}
body .four-nav .four-tab,body .four-nav .four-home{height:32px}
@media(max-width:800px){
 body .site-header.nb-top{height:48px;min-height:48px;flex-wrap:nowrap;gap:8px;padding:0 10px}
 body .site-header .nb-nav{order:0;flex:1 1 auto;width:auto;min-width:0;height:40px;gap:0}
 body .site-header .nb-nav a{font-size:12px;padding:0 6px}
 body .site-header .nb-right{height:40px;gap:0}
 body .site-header .nb-right inews-appearance{display:none}
 body .site-header .sd-menu__btn{font-size:12px;padding:5px 6px}
 body .four-nav{position:static;height:36px;min-height:36px;padding:1px 10px;gap:4px}
 body .four-nav .four-tab,body .four-nav .four-home{height:32px;padding:0 8px;font-size:12px}
 body .four-nav .four-side{display:block;padding:4px 6px;white-space:nowrap}
 body:has(.site-header) .nb-toolbar{position:static}
}

/* Official C-orange artwork; theme changes swap files without recoloring. */
body .nb-brand .nb-logo-set{display:block;line-height:0}
body .nb-brand .nb-logo{display:block;width:150px;height:auto;max-height:40px;object-fit:contain;filter:none;opacity:1}
body .nb-brand .nb-logo--dark{display:none}
:root:is([data-appearance="dark"],[data-ui-theme="dark"]) .nb-brand .nb-logo--light{display:none}
:root:is([data-appearance="dark"],[data-ui-theme="dark"]) .nb-brand .nb-logo--dark{display:block}
@media(max-width:800px){body .nb-brand .nb-logo{width:118px}}

/* Four public destinations remain visible on narrow phones. */
@media(max-width:600px){
 body .site-header.nb-top{height:82px;min-height:82px;flex-wrap:wrap;gap:0 8px}
 body .site-header .nb-brand,body .site-header .nb-right{height:44px}
 body .site-header .nb-nav{order:3;flex:1 1 100%;width:100%;height:36px;gap:4px}
 body .site-header .nb-nav a{height:32px;padding:0 10px;font-size:13px}
}
